diff options
-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; |