]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anondisfavor.php
Merge remote-tracking branch 'upstream/master' into social-master
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anondisfavor.php
index c54a39202c654084dbd01c242cf39fafc3739c70..1e42ca652bef22ca4763976cf0ec3d7308876ecd 100644 (file)
@@ -47,7 +47,7 @@ class AnonDisfavorAction extends RedirectingAction
      *
      * @return void
      */
-    function handle($args)
+    function handle(array $args=array())
     {
         parent::handle($args);
 
@@ -58,7 +58,6 @@ class AnonDisfavorAction extends RedirectingAction
                 // TRANS: Client error.
                 _m('Could not disfavor notice! Please make sure your browser has cookies enabled.')
             );
-            return;
         }
 
         $id     = $this->trimmed('notice');
@@ -79,10 +78,9 @@ class AnonDisfavorAction extends RedirectingAction
             common_log_db_error($fave, 'DELETE', __FILE__);
             // TRANS: Server error.
             $this->serverError(_m('Could not delete favorite.'));
-            return;
         }
 
-        $profile->blowFavesCache();
+        Fave::blowCacheForProfileId($profile->id);
 
         if ($this->boolean('ajax')) {
             $this->startHTML('text/xml;charset=utf-8');