summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/photos.php
diff options
context:
space:
mode:
authorJoe7 <jozsef.rnagy@site.hu>2011-01-02 18:59:23 +0100
committerBharat Mediratta <bharat@menalto.com>2011-01-03 11:38:13 -0800
commitcfaa62370ecbdb3badf4ab68bbefa7cfedaea154 (patch)
tree7cc8dbb5c6c21ca6e693be391c18cc3116bb64b3 /modules/gallery/controllers/photos.php
parente6a5f39b9113fa9cfc526b873947e365793d4e3e (diff)
Reimplemented Kohana 2.3's View::set_global() with array support.
Allows for cleaner code and fewer function calls.
Diffstat (limited to 'modules/gallery/controllers/photos.php')
-rw-r--r--modules/gallery/controllers/photos.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/modules/gallery/controllers/photos.php b/modules/gallery/controllers/photos.php
index 2dc22ca4..e795f336 100644
--- a/modules/gallery/controllers/photos.php
+++ b/modules/gallery/controllers/photos.php
@@ -38,14 +38,15 @@ class Photos_Controller extends Items_Controller {
}
$template = new Theme_View("page.html", "item", "photo");
- $template->set_global("item", $photo);
- $template->set_global("children", array());
- $template->set_global("children_count", 0);
- $template->set_global("parents", $photo->parents()->as_array());
- $template->set_global("next_item", $next_item);
- $template->set_global("previous_item", $previous_item);
- $template->set_global("sibling_count", $photo->parent()->viewable()->children_count($where));
- $template->set_global("position", $position);
+ $template->set_global(array("item" => $photo,
+ "children" => array(),
+ "children_count" => 0,
+ "parents" => $photo->parents()->as_array(),
+ "next_item" => $next_item,
+ "previous_item" => $previous_item,
+ "sibling_count"
+ => $photo->parent()->viewable()->children_count($where),
+ "position" => $position));
$template->content = new View("photo.html");