]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixed ajax uploading for walled garden users.
authorBrett Profitt <brett.profitt@gmail.com>
Fri, 13 Apr 2012 23:18:46 +0000 (16:18 -0700)
committerBrett Profitt <brett.profitt@gmail.com>
Fri, 13 Apr 2012 23:18:46 +0000 (16:18 -0700)
start.php
views/default/js/photos/uploading.php

index e98e19261841e5b8db21244f84951d58fe3c6468..2ef7dcb4c0989ccb74b60d77348cb697e369af4e 100644 (file)
--- a/start.php
+++ b/start.php
@@ -78,7 +78,8 @@ function tidypics_init() {
        elgg_register_plugin_hook_handler('notify:entity:message', 'object', 'tidypics_notify_message');
 
        // ajax handler for uploads when use_only_cookies is set
-       elgg_register_plugin_hook_handler('forward', 'csrf', 'tidypics_ajax_session_handler');
+       // using the all forward hook to work with walled gardens.
+       elgg_register_plugin_hook_handler('forward', 'all', 'tidypics_ajax_session_handler');
 
        /*
        // Register for notifications
index cb79dc77cb41b85cbb8314968ac6d00b1562bfee..ae66226b0e4403b27a9d083f4bf3ceea1410d9ba 100644 (file)
@@ -78,6 +78,9 @@ elgg.tidypics.uploading.init = function() {
                        if (data.fileCount == 0) {
                                $("#tidypics-upload-button").addClass('tidypics-disable');
                        }
+               },
+               'onError' : function (event, ID, fileObj, errorObj) {
+                       // @todo do something useful with the limited information in the errorObj.
                }
 
        });