summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/gallery/libraries/Theme_View.php16
-rw-r--r--modules/search/views/search.html.php2
2 files changed, 10 insertions, 8 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index 5e8bc728..19dc0829 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -140,26 +140,28 @@ class Theme_View_Core extends Gallery_View {
*
* See themes/wind/views/pager.html for documentation on the variables generated here.
*/
- public function pager() {
- $v = new View("pager.html");
+ public function paginator() {
+ $v = new View("paginator.html");
$v->page_type = $this->page_type;
$v->first_page_url = null;
$v->previous_page_url = null;
$v->next_page_url = null;
$v->last_page_url = null;
- if ($this->page_type == "album") {
+ if ($this->page_type == "album" || $this->page_type = "tag") {
$v->page = $this->page;
$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 = $this->item->url();
- $v->previous_page_url = $this->item->url("page=" . ($this->page - 1));
+ $v->first_page_url = $model->url();
+ $v->previous_page_url = $model->url("page=" . ($this->page - 1));
}
if ($this->page != $this->max_pages) {
- $v->next_page_url = $this->item->url("page=" . ($this->page + 1));
- $v->last_page_url = $this->item->url("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->first_visible_position = ($this->page - 1) * $this->page_size + 1;
diff --git a/modules/search/views/search.html.php b/modules/search/views/search.html.php
index 4b67157e..fdf22a9e 100644
--- a/modules/search/views/search.html.php
+++ b/modules/search/views/search.html.php
@@ -40,7 +40,7 @@
</li>
<? endforeach ?>
</ul>
- <?= $theme->pager() ?>
+ <?= $theme->paginator() ?>
<? else: ?>
<p>