]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Event/cancelrsvp.php
Realtime work in progress: switch makeNoticeData to async -- next we'll load fresh...
[quix0rs-gnu-social.git] / plugins / Event / cancelrsvp.php
index 21ed41a4512d6bdbbe03cb4bd3240541c60d2f27..83dabe2de5e084bba93b2d41af404526daf81482 100644 (file)
@@ -72,6 +72,9 @@ class CancelrsvpAction extends Action
     function prepare($argarray)
     {
         parent::prepare($argarray);
+        if ($this->boolean('ajax')) {
+            StatusNet::setApi(true); // short error results!
+        }
 
         $rsvpId = $this->trimmed('rsvp');
 
@@ -133,8 +136,10 @@ class CancelrsvpAction extends Action
             $notice = $this->rsvp->getNotice();
             // NB: this will delete the rsvp, too
             if (!empty($notice)) {
+                common_log(LOG_DEBUG, "Deleting notice...");
                 $notice->delete();
             } else {
+                common_log(LOG_DEBUG, "Deleting RSVP alone...");
                 $this->rsvp->delete();
             }
         } catch (ClientException $ce) {