Use the $sort_direction variable to determine the orderBy direction so setting $dashboard_reorder to true will always use 'desc'

This commit is contained in:
Kevin MacMartin 2018-05-01 19:58:37 -04:00
parent eb69d2fbd7
commit 734268c1dd

View file

@ -138,7 +138,7 @@ class DashboardModel extends Model
public static function getDashboardData()
{
$sort_direction = static::$dashboard_reorder ? 'desc' : static::$dashboard_sort_direction;
$query = self::orderBy(static::$dashboard_sort_column, 'desc');
$query = self::orderBy(static::$dashboard_sort_column, $sort_direction);
foreach (static::$dashboard_columns as $column) {
if (array_key_exists('type', $column) && $column['type'] == 'user') {