]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/Event/actions/cancelrsvp.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / Event / actions / cancelrsvp.php
index bb13deaa686af622aa6440f302ec4f76e31722db..f7e922dffb6bccaba36d91304ec221e0cccc1e53 100644 (file)
@@ -72,7 +72,7 @@ class CancelrsvpAction extends Action
     {
         parent::prepare($argarray);
         if ($this->boolean('ajax')) {
-            StatusNet::setApi(true); // short error results!
+            GNUsocial::setApi(true); // short error results!
         }
 
         $rsvpId = $this->trimmed('rsvp');
@@ -89,7 +89,7 @@ class CancelrsvpAction extends Action
             throw new ClientException(_m('No such RSVP.'));
         }
 
-        $this->event = Happening::getKV('id', $this->rsvp->event_id);
+        $this->event = Happening::getKV('uri', $this->rsvp->event_uri);
 
         if (empty($this->event)) {
             // TRANS: Client exception thrown when referring to a non-existing event.
@@ -137,10 +137,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...");
+                common_debug("Deleting notice...");
                 $notice->delete();
             } else {
-                common_log(LOG_DEBUG, "Deleting RSVP alone...");
+                common_debug("Deleting RSVP alone...");
                 $this->rsvp->delete();
             }
         } catch (ClientException $ce) {