diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 16:31:56 -0800 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-11-14 16:31:56 -0800 |
commit | cd8663b81d9ded11a408df5a31212223a6ae554b (patch) | |
tree | 13aa640bdb1fcb0ccb23d3a1fe66e73a8745ee6c /modules/gallery/libraries/Theme_View.php | |
parent | d89b88cededec2ff805c664eaaf9b00472513733 (diff) |
Fix pagination so that it does not require any domain specific logic
to support tags and search. Instead, just modify the page param to
the current page.
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r-- | modules/gallery/libraries/Theme_View.php | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php index 19dc0829..5b7378b6 100644 --- a/modules/gallery/libraries/Theme_View.php +++ b/modules/gallery/libraries/Theme_View.php @@ -153,15 +153,14 @@ class Theme_View_Core extends Gallery_View { $v->max_pages = $this->max_pages; $v->total = $this->children_count; - $model = $this->page_type == "album" ? $this->item : $this->tag; if ($this->page != 1) { - $v->first_page_url = $model->url(); - $v->previous_page_url = $model->url("page=" . ($this->page - 1)); + $v->first_page_url = url::merge(array("page" => 1)); + $v->first_page_url = url::merge(array("page" => $this->page - 1)); } if ($this->page != $this->max_pages) { - $v->next_page_url = $model->url("page=" . ($this->page + 1)); - $v->last_page_url = $model->url("page={$this->max_pages}"); + $v->next_page_url = url::merge(array("page" => $this->page + 1)); + $v->last_page_url = url::merge(array("page" => $this->max_pages)); } $v->first_visible_position = ($this->page - 1) * $this->page_size + 1; |