aboutsummaryrefslogtreecommitdiff
path: root/actions/photos
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 /actions/photos
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 'actions/photos')
-rw-r--r--actions/photos/album/sort.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/actions/photos/album/sort.php b/actions/photos/album/sort.php
index 453f51ac5..fd62a7ba7 100644
--- a/actions/photos/album/sort.php
+++ b/actions/photos/album/sort.php
@@ -12,7 +12,10 @@ if (!$album) {
$guids = get_input('guids');
$guids = explode(',', $guids);
-$album->setImageList($guids);
+if ($album->setImageList($guids)) {
+ system_message(elgg_echo('tidypics:album:sorted', array($album->getTitle())));
+} else {
+ register_error(elgg_echo('tidypics:album:could_not_sort', array($album->getTitle())));
+}
-system_message(elgg_echo('tidypics:album:sorted', array($album->getTitle())));
forward($album->getURL()); \ No newline at end of file