Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
4.0.3, 4.1.0
-
None
Description
If you want to set a special versionHistoryLimit for a class you have to know its contentclass_id.
It would be much easear if you can use the content_class_identifier.
So it works on all systems development and live systems e.g. after you create lokal a new class and import in on live ( same class_identifier but different class_ids )
I think it is easy to implement and would be a nice enhancement.
current ini style:
# content.ini [VersionManagement] DefaultVersionHistoryLimit=10 VersionHistoryClass[1]=5 DeleteDrafts=disabled
enhanced ini style:
# content.ini [VersionManagement] VersionHistoryClass[my_class]=100
ezcontentobject.php function createNewVersion()
function createNewVersion( $copyFromVersion = false, $versionCheck = true, $languageCode = false, $copyFromLanguageCode = false, $status = eZContentObjectVersion::STATUS_DRAFT ) { ... $contentINI = eZINI::instance( 'content.ini' ); $versionlimit = $contentINI->variable( 'VersionManagement', 'DefaultVersionHistoryLimit' ); $limitList = $contentINI->variable( 'VersionManagement', 'VersionHistoryClass' ); $classID = $this->attribute( 'contentclass_id' ); foreach ( array_keys ( $limitList ) as $key ) { if ( $classID == $key ) { $versionlimit = $limitList[$key]; } } ...