aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2010-10-30 14:55:31 +0000
committerCash Costello <cash.costello@gmail.com>2010-10-30 14:55:31 +0000
commitd4394d9645b379c1d57c096ee4136fbae4904b1d (patch)
tree2d80ef62ab9e18eb7c73c2a78721a7ec57720735 /actions
parent94e82c781a9bc5a171193523cac50ea83e69dcfd (diff)
downloadelgg-d4394d9645b379c1d57c096ee4136fbae4904b1d.tar.gz
elgg-d4394d9645b379c1d57c096ee4136fbae4904b1d.tar.bz2
added river events for ajax upload
Diffstat (limited to 'actions')
-rw-r--r--actions/ajax_upload.php5
-rw-r--r--actions/ajax_upload_complete.php3
2 files changed, 7 insertions, 1 deletions
diff --git a/actions/ajax_upload.php b/actions/ajax_upload.php
index a9743cf54..9aea9c19d 100644
--- a/actions/ajax_upload.php
+++ b/actions/ajax_upload.php
@@ -45,7 +45,10 @@ $image->saveThumbnails($image_lib);
$album->prependImageList(array($image->guid));
-error_log('complete');
+
+if (get_plugin_setting('img_river_view', 'tidypics') === "all") {
+ add_to_river('river/object/image/create', 'create', $image->owner_guid, $image->guid);
+}
echo "1";
exit; \ No newline at end of file
diff --git a/actions/ajax_upload_complete.php b/actions/ajax_upload_complete.php
index 4fc96061e..0912854a3 100644
--- a/actions/ajax_upload_complete.php
+++ b/actions/ajax_upload_complete.php
@@ -21,4 +21,7 @@ if ($album->new_album == TP_NEW_ALBUM) {
add_to_river('river/object/album/create', 'create', $album->owner_guid, $album->guid);
}
+// plugins can register to be told when a Tidypics album has had images added
+trigger_elgg_event('upload', 'tp_album', $album);
+
exit; \ No newline at end of file