X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapistatusesdestroy.php;h=2d32124c42d48bcd984f0423848f1b374cb05322;hb=64b72a3c9b8c9ee2d8716a3271834293d1e863f8;hp=b4a8870faab92e6e5f5597b8e6701315900d0d7f;hpb=84a2fb44b9f6f2b60124b651bb1d72496e81b5f0;p=quix0rs-gnu-social.git diff --git a/actions/apistatusesdestroy.php b/actions/apistatusesdestroy.php index b4a8870faa..2d32124c42 100644 --- a/actions/apistatusesdestroy.php +++ b/actions/apistatusesdestroy.php @@ -38,8 +38,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; - /** * Deletes one of the authenticating user's statuses (notices). * @@ -77,7 +75,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction $this->notice_id = (int)$this->arg('id'); } - $this->notice = Notice::staticGet((int)$this->notice_id); + $this->notice = Notice::getKV((int)$this->notice_id); return true; } @@ -126,7 +124,7 @@ class ApiStatusesDestroyAction extends ApiAuthAction if ($this->user->id == $this->notice->profile_id) { if (Event::handle('StartDeleteOwnNotice', array($this->user, $this->notice))) { - $this->notice->delete(); + $this->notice->deleteAs($this->scoped); Event::handle('EndDeleteOwnNotice', array($this->user, $this->notice)); } $this->showNotice();