Details
-
Improvement
-
Resolution: Fixed
-
Medium
-
4.0.6, 4.1.3, 4.2.0alpha1, 4.2.0beta1, 4.2.0rc1, 4.2.0rc2
-
None
Description
In 4 different places, the same algorithm is used when we need to know the version limit for a given content class:
1. fetch the default limit (DefaultVersionHistoryLimit)
2. fetch the limit by class (VersionHistoryClass)
3. convert the class id / identifiers list we got in 2. to an array of numerical ID
4. check if the value we got matches a given class ID. If it does, use the limit for this class rather than the default one.
We should refactor this to a method in eZContentClass. Given a content class ID / identifier / eZContentClass, this method returns the version limit.