]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
added river events for ajax upload
authorCash Costello <cash.costello@gmail.com>
Sat, 30 Oct 2010 14:55:31 +0000 (14:55 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 30 Oct 2010 14:55:31 +0000 (14:55 +0000)
actions/ajax_upload.php
actions/ajax_upload_complete.php

index a9743cf54baac18306ade45c4fd2d484b3d56b6d..9aea9c19d808fc59dd10675a2ecd01fa78111331 100644 (file)
@@ -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
index 4fc96061e2890e8ff48db0f7cf0ac97e8f264831..0912854a3e6a61383234e7d7d9cfe60f9c4907b2 100644 (file)
@@ -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