diff --git a/modules/monitoring/library/Monitoring/DataView/DataView.php b/modules/monitoring/library/Monitoring/DataView/DataView.php index 9683c468f..c9537eff8 100644 --- a/modules/monitoring/library/Monitoring/DataView/DataView.php +++ b/modules/monitoring/library/Monitoring/DataView/DataView.php @@ -242,6 +242,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable $order = (strtoupper($order) === static::SORT_ASC) ? 'ASC' : 'DESC'; foreach ($sortColumns['columns'] as $column) { + list($column, $direction) = $this->query->splitOrder($column); if (! $this->isValidFilterTarget($column)) { throw new QueryException( mt('monitoring', 'The sort column "%s" is not allowed in "%s".'), @@ -249,7 +250,7 @@ abstract class DataView implements Browsable, Countable, Filterable, Sortable get_class($this) ); } - $this->query->order($column, $order); + $this->query->order($column, $direction !== null ? $direction : $order); } $this->isSorted = true; return $this;