aboutsummaryrefslogtreecommitdiff
path: root/pages/photos/album/sort.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-06-08 15:23:47 -0700
committerBrett Profitt <brett.profitt@gmail.com>2012-06-08 15:23:47 -0700
commitc1da32e6a7e2f4a15a3b2d69cd38a1c0c164a99d (patch)
treef11839953914d0cc84306526c91ed60d0e746414 /pages/photos/album/sort.php
parent90b3ef93ab20ceb49d0e2f5b40a87dd6608d05f4 (diff)
downloadelgg-c1da32e6a7e2f4a15a3b2d69cd38a1c0c164a99d.tar.gz
elgg-c1da32e6a7e2f4a15a3b2d69cd38a1c0c164a99d.tar.bz2
Fixed invalid SQL caused by sorting an empty album.
Also hiding slideshow and sort links for albums with no images.
Diffstat (limited to 'pages/photos/album/sort.php')
-rw-r--r--pages/photos/album/sort.php12
1 files changed, 11 insertions, 1 deletions
diff --git a/pages/photos/album/sort.php b/pages/photos/album/sort.php
index 8b6d1bfc7..005205dd5 100644
--- a/pages/photos/album/sort.php
+++ b/pages/photos/album/sort.php
@@ -33,8 +33,18 @@ if (elgg_instanceof($owner, 'group')) {
elgg_push_breadcrumb($album->getTitle(), $album->getURL());
elgg_push_breadcrumb(elgg_echo('album:sort'));
+elgg_register_menu_item('title', array(
+ 'name' => 'upload',
+ 'href' => 'photos/upload/' . $album->getGUID(),
+ 'text' => elgg_echo('images:upload'),
+ 'link_class' => 'elgg-button elgg-button-action',
+));
-$content = elgg_view_form('photos/album/sort', array(), array('album' => $album));
+if ($album->getSize()) {
+ $content = elgg_view_form('photos/album/sort', array(), array('album' => $album));
+} else {
+ $content = elgg_echo('tidypics:sort:no_images');
+}
$body = elgg_view_layout('content', array(
'filter' => false,