summaryrefslogtreecommitdiff
path: root/modules/tag/controllers
diff options
context:
space:
mode:
authormamouneyya <mamoun.diraneyya@gmail.com>2011-02-16 18:25:18 +0300
committermamouneyya <mamoun.diraneyya@gmail.com>2011-02-16 18:25:18 +0300
commit00772aaa62e6bce14e58e163ea72f386136c731d (patch)
treeed658d454d8bea79d551969fffa0bc18faee5d52 /modules/tag/controllers
parent3e2610ea83c60805d5e727df6509da6c49fd6c7b (diff)
parentd2c77fd0590501f7b6b51d9f4cc033ed9485b082 (diff)
Merge remote-tracking branch 'gallery3/master'
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r--modules/tag/controllers/admin_tags.php2
-rw-r--r--modules/tag/controllers/tag.php18
-rw-r--r--modules/tag/controllers/tags.php2
3 files changed, 11 insertions, 11 deletions
diff --git a/modules/tag/controllers/admin_tags.php b/modules/tag/controllers/admin_tags.php
index 99743a8e..73042a55 100644
--- a/modules/tag/controllers/admin_tags.php
+++ b/modules/tag/controllers/admin_tags.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2010 Bharat Mediratta
+ * Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/modules/tag/controllers/tag.php b/modules/tag/controllers/tag.php
index 0e924f3d..7aa038c6 100644
--- a/modules/tag/controllers/tag.php
+++ b/modules/tag/controllers/tag.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2010 Bharat Mediratta
+ * Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -29,18 +29,18 @@ 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");
- $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));
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php
index aa39b6cd..fe6d747b 100644
--- a/modules/tag/controllers/tags.php
+++ b/modules/tag/controllers/tags.php
@@ -1,7 +1,7 @@
<?php defined("SYSPATH") or die("No direct script access.");
/**
* Gallery - a web based photo album viewer and editor
- * Copyright (C) 2000-2010 Bharat Mediratta
+ * Copyright (C) 2000-2011 Bharat Mediratta
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by