aboutsummaryrefslogtreecommitdiff
path: root/actions/upload.php
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-21 13:53:40 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-21 13:53:40 +0000
commitf162f786a0b152e37eed2b0e4ec89b51958ac023 (patch)
tree3938d09fca99d939e85cac451bb387907e88448c /actions/upload.php
parentfef76848f2e6f52d5f4941b9b519aadf996070cf (diff)
downloadelgg-f162f786a0b152e37eed2b0e4ec89b51958ac023.tar.gz
elgg-f162f786a0b152e37eed2b0e4ec89b51958ac023.tar.bz2
improved group code including river view
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());
}