For clarification: We're running SilverStripe 2.4.0 for a client with DataObjectManager (version from around the end of May, 2010).
In the back-end, the client would like to have the uploaded files lists to be sorted by the upload date, descending - i.e. the most recently uploaded image to be located at the top of the list. The default setting is the reverse order.
I've been searching through the boards and trying to hunt down the template / class responsible for displaying the right-hand side of the "Files & Images" part of SilverStripe ("admin/assets/") but haven't had any luck.
Could anyone point me in the right direction? I assume that the solution would be something along the lines of editing the initialization of a DataObjectManager object in the right class.
I´m not sure if this tip meets your problem, but I had problems with the sortorder in the DataObjectManager too. Every $sourceSort I specified in the constructor was not used anyway.
The problem is the function loadSort() in DataObjectManager
Thanks for your response, chrclaus :) The reason why I haven't posted sooner is because I still haven't gotten around to trying your solution out yet... but it does seem plausible so I'll give it a shot when it's called for again!
However, I noticed that the official SilverStripe Twitter account retweeted a blog post on this subject yesterday, so I thought I'd post that solution here for others who stumble upon this thread.
In case the blog post ever goes down, this is what it basically comes down to: Again, add this to your mysite/_config.php file:
SortableDataObject::$sortable_classes = array();
and then move your existing SortableDataObject::add_sortable_classes declaration below it, if you did already have one. This will not only make the table now sort in the default_sort, but will remove the useful features of dataobject_manager from the table, so I'd generally advise not to do this; I'm simply showing that it can be done.
So this solution does have drawbacks, but it also gets the job done. Chrclaus' solution might be better though ;)