Skip to content

Commit

Permalink
fixed: do not change default sorting behaviour if search not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalsem committed Jul 26, 2022
1 parent c54471f commit 4eabfd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions classes/ColdTrick/OpenSearch/Views.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ public static function enableSearchScorePresentation(\Elgg\Hook $hook) {
* @return void
*/
public static function setDefaultSearchSorting(\Elgg\Hook $hook): void {
if (elgg_get_plugin_setting('search', 'opensearch') !== 'yes') {
return;
}

$sort = get_input('sort');
$sort_by = get_input('sort_by');

Expand Down

0 comments on commit 4eabfd8

Please sign in to comment.