Skip to content

Commit

Permalink
Merge pull request #7 from PlasticStudio/feature/defaults
Browse files Browse the repository at this point in the history
Simplify get_mapped_defaults function
  • Loading branch information
monkeyfeet authored Sep 14, 2020
2 parents 2ceb998 + 826f718 commit afb06d3
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 afb06d3

Please sign in to comment.