]> 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 83f6a73ae07035f8cf6dd557ad555a0ac153dd4f..f7e922dffb6bccaba36d91304ec221e0cccc1e53 100644 (file)
@@ -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...");
-                $notice->deleteAs($this->scoped);
+                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) {
@@ -190,7 +190,7 @@ class CancelrsvpAction extends Action
      *
      * @return boolean is read only action?
      */
-    function isReadOnly($args)
+    function isReadOnly(array $args=array())
     {
         if ($_SERVER['REQUEST_METHOD'] == 'GET' ||
             $_SERVER['REQUEST_METHOD'] == 'HEAD') {