Skip to content

Commit

Permalink
Merge pull request #159 from City-of-Helsinki/UHF-9113-drupal10-bug-f…
Browse files Browse the repository at this point in the history
…ixes

UHF-9113: Drupal10 bug fixes
  • Loading branch information
khalima committed Nov 2, 2023
2 parents bc323aa + 35ebe1c commit a562d26
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/helfi_address_search/helfi_address_search.module
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,21 @@ function helfi_address_search_views_data_alter(array &$data): void {
* Implements hook_views_pre_execute().
*/
function helfi_address_search_views_pre_execute(ViewExecutable $view): void {
if (!isset($view->filter["address_search"])) {
if (!isset($view->filter['address_search'])) {
return;
}

// Query all results as the sorting and paging is done with
// AddressSearch::getSortedResultsByAddress().
$view->query->setLimit(NULL);
$view->query->setOffset(NULL);
$view->query->setLimit(0);
$view->query->setOffset(0);
}

/**
* Implements hook_views_pre_render().
*/
function helfi_address_search_views_pre_render(ViewExecutable $view): void {
if (isset($view->filter["address_search"])) {
if (isset($view->filter['address_search'])) {
$view = AddressSearch::sortByAddress($view);
}
}
Expand Down

0 comments on commit a562d26

Please sign in to comment.