]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anondisfavor.php
Update handle() method on Action subclasses.
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anondisfavor.php
index 0060b7fa507df5f5cdd34826534c56df64345d96..82b9ac5917e9d6c466c3cf3322f28e23621580ba 100644 (file)
@@ -47,9 +47,9 @@ class AnonDisfavorAction extends RedirectingAction
      *
      * @return void
      */
-    function handle($args)
+    function handle()
     {
-        parent::handle($args);
+        parent::handle();
 
         $profile = AnonymousFavePlugin::getAnonProfile();
 
@@ -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');
@@ -94,7 +92,7 @@ class AnonDisfavorAction extends RedirectingAction
             $favor = new AnonFavorForm($this, $notice);
             $favor->show();
             $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
         } else {
             $this->returnToPrevious();
         }