Skip to content

Commit

Permalink
Fix agenda pager, it was always showing page 1
Browse files Browse the repository at this point in the history
  • Loading branch information
zuuperman committed Sep 18, 2013
1 parent f0a3377 commit 3867693
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion culturefeed_agenda/lib/Drupal/AgendaSearchPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ public function initialize() {
$params = drupal_get_query_parameters();
$params += array(
'sort' => $this->getDefaultSort(),
'page' => 0,
'search' => '',
'facet' => array(),
);

$this->pageNumber = empty($params['page']) ? 1 : $params['page'] + 1;

if (!empty($params['search'])) {
$this->addQueryTerm($params['search']);
}
Expand Down
2 changes: 1 addition & 1 deletion culturefeed_search_ui/lib/Drupal/CultureFeedSearchPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@ protected function build() {
$build['pager-container']['pager_summary'] = array(
'#theme' => 'culturefeed_search_pager_summary',
'#result' => $this->result,
'#start' => $this->start,
'#start' => ($this->pageNumber - 1) * $this->resultsPerPage,
);

$build['pager-container']['pager'] = array(
Expand Down

0 comments on commit 3867693

Please sign in to comment.