X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=plugins%2FEvent%2Factions%2Fcancelrsvp.php;h=5fe95358c369bc9c4c1b3a68acffa335239dd218;hb=3326b7b850f538f0e3c2c7969c5e566e2a374ffb;hp=bb13deaa686af622aa6440f302ec4f76e31722db;hpb=fb70dc02362155c8951a1a0ad66a668f1f857ca5;p=quix0rs-gnu-social.git diff --git a/plugins/Event/actions/cancelrsvp.php b/plugins/Event/actions/cancelrsvp.php index bb13deaa68..5fe95358c3 100644 --- a/plugins/Event/actions/cancelrsvp.php +++ b/plugins/Event/actions/cancelrsvp.php @@ -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..."); - $notice->delete(); + common_debug("Deleting notice..."); + $notice->deleteAs($this->scoped); } else { - common_log(LOG_DEBUG, "Deleting RSVP alone..."); + common_debug("Deleting RSVP alone..."); $this->rsvp->delete(); } } catch (ClientException $ce) {