This package has been flagged as retired by the package owner. Continue to use at your own risk
SUMMARY
This package automaticaly removes any previous versions for those times when a version history aren't important, and you don't want to take up the database space.
With Umbraco being such a versatile platform, it's very easy to develop small scale apps that go beyond the regular "Content" paradim. In some situations, version history becomes unimportant, and a waste, so this package automaticaly cleans up any previous versions when a new version is published.
HOW TO USE
The package is configured via an unVersion.config file located in the default umbraco config folder.
To define a new unversion rule, create an add element with the following attributes.
docTypeAlias [Optional] - The doc type alias of the documents to be unversioned, if undefined, applies to all (If you don't define docTypeAlias, it is advised you define rootXpath to narrow down the scope of the unversion).
rootXpath [Optional] - An xpath statment to define the root folder for the unversion rule, ie: //NewsIndex
maxDays [Optional] - The maximum number of days to keep versions. If attribute is not present, defaults to int.MaxValue (Pre v2.0 defaults to 0, so bare this in mind).
maxCount [Optional] - The maximum number of latest versions to keep. If attribute is not present, defaults to int.MaxValue (Pre v2.0 defaults to 0, so bare this in mind).
UPDATE
1.2.0 - Umbraco 4.5 compatable
1.2.1 - Added maxDays attribute
1.2.2 - Added maxCount attriute
1.3 - Umbraco 4.6 (SQL CE 4) compatable
1.4 - Fixed date comparison issue
1.5 - Event handler now checks for HttpContext before commencing
2.0 - Rewritten for Version 7. With this update, maxDays and maxCount are now dependant on each other, so a version must fall within both boundaries to be kept. In previous versions of the package, a node was kept if it was within either one. Because of this update, both properties now default to int.MaxValue if no attribute is defined.
2.1 - Merged in pull request #1 to stop errors on larger sites due to db connection being left undisposed.
3.0 - Umbraco 8.4+ compatible
BUGS & ISSUES
Please raise any issues on the forum below. All feedback is welcome and appreciated.