X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fatompubfavoritefeed.php;h=837a9da3e96d7784ad3921c20560e6b38773e50f;hb=67ed1ec77e2d9c3a9486d0734294a8541dc4334a;hp=c31fcbd72ac9d7ce498ae01ee6f7fc1fb55d612d;hpb=99db745f9d8746e3170bf779746d855c44f0b951;p=quix0rs-gnu-social.git diff --git a/actions/atompubfavoritefeed.php b/actions/atompubfavoritefeed.php index c31fcbd72a..837a9da3e9 100644 --- a/actions/atompubfavoritefeed.php +++ b/actions/atompubfavoritefeed.php @@ -34,8 +34,6 @@ if (!defined('STATUSNET')) { exit(1); } -require_once INSTALLDIR . '/lib/apiauth.php'; - /** * Feed of ActivityStreams 'favorite' actions * @@ -62,7 +60,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction { parent::prepare($argarray); - $this->_profile = Profile::staticGet('id', $this->trimmed('profile')); + $this->_profile = Profile::getKV('id', $this->trimmed('profile')); if (empty($this->_profile)) { // TRANS: Client exception thrown when requesting a favorite feed for a non-existing profile. @@ -251,12 +249,12 @@ class AtompubfavoritefeedAction extends ApiAuthAction return; } - $notice = Notice::staticGet('uri', $note->id); + $notice = Notice::getKV('uri', $note->id); if (empty($notice)) { // XXX: import from listed URL or something // TRANS: Client exception thrown when trying favorite a notice without content. - throw new ClientException(_('Unknown note.')); + throw new ClientException(_('Unknown notice.')); } $old = Fave::pkeyGet(array('user_id' => $this->auth_user->id, @@ -362,7 +360,7 @@ class AtompubfavoritefeedAction extends ApiAuthAction */ function notify($fave, $notice, $user) { - $other = User::staticGet('id', $notice->profile_id); + $other = User::getKV('id', $notice->profile_id); if ($other && $other->id != $user->id) { if ($other->email && $other->emailnotifyfav) { mail_notify_fave($other, $user, $notice);