diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-16 07:02:22 -0700 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-09-16 07:02:22 -0700 |
commit | b8201a71127a096a51ed03e0e08a98a66f847c8f (patch) | |
tree | d806f0b9f35fc3aa912126ad3cf8d67c19ec0def /modules/tag/controllers | |
parent | 15515fd3c64dd626746468862d5b8777679d88f6 (diff) | |
parent | f1887422f8b4ba68dc273fe6f7d3f1123681e89a (diff) |
Merge branch 'master' of git@github.com:gallery/gallery3 into talmdal_dev
Diffstat (limited to 'modules/tag/controllers')
-rw-r--r-- | modules/tag/controllers/tags.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index c993e374..1bd6b3cc 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -22,7 +22,7 @@ class Tags_Controller extends REST_Controller { public function _show($tag) { $page_size = module::get_var("gallery", "page_size", 9); - $page = $this->input->get("page", "1"); + $page = (int) $this->input->get("page", "1"); $children_count = $tag->items_count(); $offset = ($page-1) * $page_size; @@ -43,6 +43,9 @@ class Tags_Controller extends REST_Controller { } public function _index() { + // Far from perfection, but at least require view permission for the root album + $album = ORM::factory("item", 1); + access::required("view", $album); print tag::cloud(30); } |