]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anonfavor.php
More Favorite pluginification (favecount, cache, menus(favecount, cache, menus))
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anonfavor.php
index 6af874679fb4d7cb14376800a15f6b203c49b3be..c9282f15f68df3769399b865c216f83bdd097461 100644 (file)
@@ -68,12 +68,12 @@ class AnonFavorAction extends RedirectingAction
         }
         $fave = Fave::addNew($profile, $notice);
 
-        if (!$fave) {
+        if (!$fave instanceof Fave) {
             // TRANS: Server error.
             $this->serverError(_m('Could not create favorite.'));
         }
 
-        $profile->blowFavesCache();
+        Fave::blowCacheForProfileId($profile->id);
 
         if ($this->boolean('ajax')) {
             $this->startHTML('text/xml;charset=utf-8');