Skip to content

Commit

Permalink
chore: different check for single sort_by input
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed May 23, 2022
1 parent 26ac194 commit f1ae297
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion classes/ColdTrick/OpenSearch/SearchHooks.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ protected static function transformSearchParamQueryInLivesearch(array &$search_p
protected static function transformSearchParamSorting(array &$search_params) {
$sort = elgg_extract('sort', $search_params);
$sort_by = elgg_extract('sort_by', $search_params, []);
if (isset($sort_by['property_type'])) {
if (isset($sort_by['property'])) {
$sort_by = [$sort_by];
}

Expand Down
2 changes: 1 addition & 1 deletion classes/ColdTrick/OpenSearch/SearchParams/Initialize.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ protected function initializeOwnerGUID(array $search_params = []) {
protected function initializeSorting(array $search_params = []) {

$sort_by = elgg_extract('sort_by', $search_params, []);
if (isset($sort_by['property_type'])) {
if (isset($sort_by['property'])) {
$sort_by = [$sort_by];
}

Expand Down

0 comments on commit f1ae297

Please sign in to comment.