From 734268c1dd0c2f592bf0db104dd4b0b1730ac1ff Mon Sep 17 00:00:00 2001 From: Kevin MacMartin Date: Tue, 1 May 2018 19:58:37 -0400 Subject: [PATCH] Use the $sort_direction variable to determine the orderBy direction so setting $dashboard_reorder to true will always use 'desc' --- app/Models/DashboardModel.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Models/DashboardModel.php b/app/Models/DashboardModel.php index 44c59fe..5f15804 100644 --- a/app/Models/DashboardModel.php +++ b/app/Models/DashboardModel.php @@ -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') {