summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries/Theme_View.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-11-15 15:24:49 -0800
committerBharat Mediratta <bharat@menalto.com>2009-11-15 15:24:49 -0800
commit5df00737c90058bffeecb55bbc38f3068435c611 (patch)
treea2d13f6937b1015a9df7b5cb9210b6cbdff14442 /modules/gallery/libraries/Theme_View.php
parent967b17204b4e038fa2181473e80fcba143d30970 (diff)
Fix a couple of errors in the refctored paginator code:
1) We weren't showing previous page links for albums when we should have 2) We needed to wrap the results of url::merge() in url::site() so that we generate server-relative urls.
Diffstat (limited to 'modules/gallery/libraries/Theme_View.php')
-rw-r--r--modules/gallery/libraries/Theme_View.php12
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/gallery/libraries/Theme_View.php b/modules/gallery/libraries/Theme_View.php
index b5546a43..e98914c4 100644
--- a/modules/gallery/libraries/Theme_View.php
+++ b/modules/gallery/libraries/Theme_View.php
@@ -154,13 +154,13 @@ class Theme_View_Core extends Gallery_View {
$v->total = $this->children_count;
if ($this->page != 1) {
- $v->first_page_url = url::merge(array("page" => 1));
- $v->first_page_url = url::merge(array("page" => $this->page - 1));
+ $v->first_page_url = url::site(url::merge(array("page" => 1)));
+ $v->previous_page_url = url::site(url::merge(array("page" => $this->page - 1)));
}
if ($this->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->next_page_url = url::site(url::merge(array("page" => $this->page + 1)));
+ $v->last_page_url = url::site(url::merge(array("page" => $this->max_pages)));
}
$v->first_visible_position = ($this->page - 1) * $this->page_size + 1;
@@ -168,11 +168,11 @@ class Theme_View_Core extends Gallery_View {
} else {
$v->position = $this->position;
$v->total = $this->sibling_count;
- if ($v->previous_page = $this->previous_item) {
+ if ($this->previous_item) {
$v->previous_page_url = $this->previous_item->url();
}
- if ($v->next_page = $this->next_item) {
+ if ($this->next_item) {
$v->next_page_url = $this->next_item->url();
}
}