diff --git a/core/model/DataObjectSet.php b/core/model/DataObjectSet.php index 7d0d239ec..eacf426b2 100644 --- a/core/model/DataObjectSet.php +++ b/core/model/DataObjectSet.php @@ -850,6 +850,10 @@ class DataObjectSet extends ViewableData implements IteratorAggregate, Countable */ public function sort($fieldname, $direction = "ASC") { if($this->items) { + if (preg_match('/(.+?)(\s+?)(A|DE)SC$/', $fieldname, $matches)) { + $fieldname = $matches[1]; + $direction = $matches[3].'SC'; + } column_sort($this->items, $fieldname, $direction, false); } }