ezsystems/ezpublish — pull request #509 by dpobel (2012-11-23 16:02:18+00:00)
Title: Fix EZP-19886: Wrong sort order in object relations list with ezautosave

Issue: https://jira.ez.no/browse/EZP-19886

Description
===========

When a draft is autosaved, an object relation list might not be saved in the correct order. This is due to the fact the ezobjectrelationlist datatype expects the order fields to be send in the same order as the objects are currently stored in the DB which is not the case with ezautosave. This patch changes the way the order is handled by indexing internally the order by content object id. This also allows to simplify the way object relation lists are handled.

Notes:
- The pull request #375 fixes the same issue but it's more complicated
- the anonymous function will be replaced by a create_function() call in older eZ Publish versions to work with PHP 5.2.

Tests
=====
manual tests