Skip to content

Commit

Permalink
Simplify get_mapped_defaults function
Browse files Browse the repository at this point in the history
  • Loading branch information
monkeyfeet committed Sep 14, 2020
1 parent 2ceb998 commit 826f718
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/SearchPageController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(){
Expand Down

0 comments on commit 826f718

Please sign in to comment.