From 826f718f02f71d52e5d66912a28e2a3885df6aa9 Mon Sep 17 00:00:00 2001 From: psdigital Date: Tue, 15 Sep 2020 11:37:43 +1200 Subject: [PATCH] Simplify get_mapped_defaults function --- src/SearchPageController.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/SearchPageController.php b/src/SearchPageController.php index c3537a7..6ef1c50 100755 --- a/src/SearchPageController.php +++ b/src/SearchPageController.php @@ -202,15 +202,7 @@ public static function set_defaults($defaults){ } public static function get_mapped_defaults(){ - $defaults_available = self::get_defaults_available(); - $defaults = self::get_defaults(); - - // If no sort, assume the first item - if (!$defaults){ - return reset($defaults_available); - } else { - return $defaults_available[$defaults]; - } + return self::get_defaults_available(); } public static function get_results(){