summaryrefslogtreecommitdiff
path: root/modules/gallery/controllers/albums.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-08-29 11:45:27 -0700
committerBharat Mediratta <bharat@menalto.com>2010-08-29 11:45:27 -0700
commit6a13a238bbd2dea9198ac4682faeba18eb6af4a9 (patch)
tree4d234ade4a129041aa46a5beb79af6b6f61f5d89 /modules/gallery/controllers/albums.php
parenta08cd0db4e0b90bd625b8c4c608c41a4c41721d1 (diff)
Convert the "parents" variable from a result iterator to an array so
that the theme can call empty() on it. Fixes #1318.
Diffstat (limited to 'modules/gallery/controllers/albums.php')
-rw-r--r--modules/gallery/controllers/albums.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gallery/controllers/albums.php b/modules/gallery/controllers/albums.php
index fb7d5c59..b0887195 100644
--- a/modules/gallery/controllers/albums.php
+++ b/modules/gallery/controllers/albums.php
@@ -68,7 +68,7 @@ class Albums_Controller extends Items_Controller {
$template->set_global("item", $album);
$template->set_global("children", $album->viewable()->children($page_size, $offset));
$template->set_global("children_count", $children_count);
- $template->set_global("parents", $album->parents());
+ $template->set_global("parents", $album->parents()->as_array()); // view calls empty() on this
$template->content = new View("album.html");
// We can't use math in ORM or the query builder, so do this by hand. It's important