]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anonfavor.php
pluginified most of hasFave, getFaves and related calls
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anonfavor.php
index 2d35964c700cee95d1dec826b8dddcbb0388f162..6af874679fb4d7cb14376800a15f6b203c49b3be 100644 (file)
@@ -62,9 +62,9 @@ class AnonFavorAction extends RedirectingAction
         $notice = Notice::getKV($id);
         $token  = $this->checkSessionToken();
 
-        if ($profile->hasFave($notice)) {
+        if (Fave::existsForProfile($notice, $profile)) {
             // TRANS: Client error.
-            $this->clientError(_m('This notice is already a favorite!'));
+            throw new AlreadyFulfilledException(_m('This notice is already a favorite!'));
         }
         $fave = Fave::addNew($profile, $notice);