]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anonfavor.php
Merge remote-tracking branch 'upstream/master'
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anonfavor.php
index 75537020e20e7b5727ab11063f82bfeb62f225e7..eacd7753310f4753d1f0607b44ea6015e397f3a9 100644 (file)
@@ -66,14 +66,9 @@ class AnonFavorAction extends RedirectingAction
             // TRANS: Client error.
             throw new AlreadyFulfilledException(_m('This notice is already a favorite!'));
         }
-        $fave = Fave::addNew($profile, $notice);
 
-        if (!$fave instanceof Fave) {
-            // TRANS: Server error.
-            $this->serverError(_m('Could not create favorite.'));
-        }
-
-        Fave::blowCacheForProfileId($profile->id);
+        // Throws exception
+        $stored = Fave::addNew($profile, $notice);
 
         if ($this->boolean('ajax')) {
             $this->startHTML('text/xml;charset=utf-8');