aboutsummaryrefslogtreecommitdiff
path: root/actions/upload.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/upload.php')
-rw-r--r--actions/upload.php17
1 files changed, 9 insertions, 8 deletions
diff --git a/actions/upload.php b/actions/upload.php
index 1b8776075..65005671a 100644
--- a/actions/upload.php
+++ b/actions/upload.php
@@ -190,7 +190,14 @@
// update user/group size for checking quota
$image_repo_size += $sent_file['size'];
- if($img_river_view == "all") {
+ // successful upload so check if this is a new album and throw river event if so
+ if ($album->new_album == TP_NEW_ALBUM) {
+ if (function_exists('add_to_river'))
+ add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
+ $album->new_album = TP_OLD_ALBUM;
+ }
+
+ if ($img_river_view == "all") {
add_to_river('river/object/image/create', 'create', $file->getObjectOwnerGUID(), $file->getGUID());
}
unset($file); // may not be needed but there seems to be a memory leak
@@ -218,14 +225,8 @@
system_message(elgg_echo('tidypics:upl_success'));
}
- // successful upload so check if this is a new album and throw river event if so
- if ($album->new_album == TP_NEW_ALBUM) {
- if (function_exists('add_to_river'))
- add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
- $album->new_album = TP_OLD_ALBUM;
- }
- if(count($uploaded_images) && $img_river_view == "1") {
+ if (count($uploaded_images) && $img_river_view == "1") {
if (function_exists('add_to_river')) {
add_to_river('river/object/image/create', 'create', $file_for_river->getObjectOwnerGUID(), $file_for_river->getGUID());
}