]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - actions/atompubfavoritefeed.php
Repeated and Favorited CSS/mf2 fixes
[quix0rs-gnu-social.git] / actions / atompubfavoritefeed.php
index c31fcbd72ac9d7ce498ae01ee6f7fc1fb55d612d..837a9da3e96d7784ad3921c20560e6b38773e50f 100644 (file)
@@ -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);