diff options
author | Pablo Martin <caedes@sindominio.net> | 2012-10-23 02:43:14 +0000 |
---|---|---|
committer | root <root@migration.vz.lan> | 2012-10-23 02:43:26 +0000 |
commit | 2ca39d79862f86065cd2675eab3b795cc8e02411 (patch) | |
tree | ea4fbcee9dc2297f5a32126a9b370413eb2d634b /views/default/object | |
parent | 389a4a5705e7587141a34fb3eb3c5bc355d7846e (diff) | |
download | elgg-2ca39d79862f86065cd2675eab3b795cc8e02411.tar.gz elgg-2ca39d79862f86065cd2675eab3b795cc8e02411.tar.bz2 |
protect from albums with no container.
Diffstat (limited to 'views/default/object')
-rw-r--r-- | views/default/object/album/gallery.php | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/views/default/object/album/gallery.php b/views/default/object/album/gallery.php index 53194b53c..d6fb598e4 100644 --- a/views/default/object/album/gallery.php +++ b/views/default/object/album/gallery.php @@ -10,6 +10,7 @@ $album = elgg_extract('entity', $vars); + $album_cover = elgg_view_entity_icon($album, 'small'); $header = elgg_view('output/url', array( @@ -19,11 +20,14 @@ $header = elgg_view('output/url', array( 'class' => 'tidypics-heading', )); -$footer = elgg_view('output/url', array( - 'text' => $album->getContainerEntity()->name, - 'href' => $album->getContainerEntity()->getURL(), - 'is_trusted' => true, -)); +$footer = ""; +if ($album->getContainerEntity()) { + $footer .= elgg_view('output/url', array( + 'text' => $album->getContainerEntity()->name, + 'href' => $album->getContainerEntity()->getURL(), + 'is_trusted' => true, + )); +} $footer .= '<div class="elgg-subtext">' . elgg_echo('album:num', array($album->getSize())) . '</div>'; $params = array( |