ezsystems/ezpublish-legacy — pull request #922 by yannickroger (2014-03-28 12:41:36+00:00)
Title: Fix EZP-22519: Duplicating a content version results in an empty draft i...

...f maximum versions is reached

Link: https://jira.ez.no/browse/EZP-22519

## Description
When copying the oldest version of a content, if the maximum number of items was reached it would create an empty draft.
It was happening because the code would first erase the first version, then try to copy it. This patch makes the copy first and then erases the last verion.

The second problem is that this operation was done twice in the code. The first time in the history module and then in `eZContentObject createNewVersion()`. I removed it from the history module.

## Tests
Manuel tests