From f364e8a96b47f0e4f674c8b36317fc80184b219a Mon Sep 17 00:00:00 2001 From: Joe7 Date: Mon, 3 Jan 2011 20:28:54 +0100 Subject: Using array support introduced in 8295201adf948ea35f21f75801b7a8bf36c27569 --- modules/tag/controllers/tag.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/tag/controllers') diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php index 0e924f3d..7bfa7d58 100644 --- a/modules/tag/controllers/tag.php +++ b/modules/tag/controllers/tag.php @@ -35,12 +35,12 @@ class Tag_Controller extends Controller { } $template = new Theme_View("page.html", "collection", "tag"); - $template->set_global("page", $page); - $template->set_global("max_pages", $max_pages); - $template->set_global("page_size", $page_size); - $template->set_global("tag", $tag); - $template->set_global("children", $tag->items($page_size, $offset)); - $template->set_global("children_count", $children_count); + $template->set_global(array("page" => $page, + "max_pages" => $max_pages, + "page_size" => $page_size, + "tag" => $tag, + "children" => $tag->items($page_size, $offset), + "children_count" => $children_count)); $template->content = new View("dynamic.html"); $template->content->title = t("Tag: %tag_name", array("tag_name" => $tag->name)); -- cgit v1.2.3 From fca6d1254a2aeb95bee15fea4c503e4588fc9f1b Mon Sep 17 00:00:00 2001 From: Joe7 Date: Sun, 9 Jan 2011 14:20:30 +0100 Subject: Fixed offset sanitizing code - Fixes Ticket#1593 --- modules/tag/controllers/tag.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/tag/controllers') diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php index 7bfa7d58..47110540 100644 --- a/modules/tag/controllers/tag.php +++ b/modules/tag/controllers/tag.php @@ -29,9 +29,9 @@ class Tag_Controller extends Controller { // Make sure that the page references a valid offset if ($page < 1) { - url::redirect($album->abs_url()); + url::redirect(url::merge(array("page" => 1))); } else if ($page > $max_pages) { - url::redirect($album->abs_url("page=$max_pages")); + url::redirect(url::merge(array("page" => $max_pages))); } $template = new Theme_View("page.html", "collection", "tag"); -- cgit v1.2.3