]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - plugins/AnonymousFave/actions/anonfavor.php
Cosmetic changes to common_redirect, clientError, serverError
[quix0rs-gnu-social.git] / plugins / AnonymousFave / actions / anonfavor.php
index 61868125c12f9b4478d743dfb6221016b33da67a..2d35964c700cee95d1dec826b8dddcbb0388f162 100644 (file)
@@ -55,9 +55,7 @@ class AnonFavorAction extends RedirectingAction
 
         if (empty($profile) || $_SERVER['REQUEST_METHOD'] != 'POST') {
             // TRANS: Client error.
-            $this->clientError(_m('Could not favor notice! Please make sure your browser has cookies enabled.')
-            );
-            return;
+            $this->clientError(_m('Could not favor notice! Please make sure your browser has cookies enabled.'));
         }
 
         $id     = $this->trimmed('notice');
@@ -67,14 +65,12 @@ class AnonFavorAction extends RedirectingAction
         if ($profile->hasFave($notice)) {
             // TRANS: Client error.
             $this->clientError(_m('This notice is already a favorite!'));
-            return;
         }
         $fave = Fave::addNew($profile, $notice);
 
         if (!$fave) {
             // TRANS: Server error.
             $this->serverError(_m('Could not create favorite.'));
-            return;
         }
 
         $profile->blowFavesCache();
@@ -89,7 +85,7 @@ class AnonFavorAction extends RedirectingAction
             $disfavor = new AnonDisFavorForm($this, $notice);
             $disfavor->show();
             $this->elementEnd('body');
-            $this->elementEnd('html');
+            $this->endHTML();
         } else {
             $this->returnToPrevious();
         }