X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funsubscribepeopletag.php;h=b5757ad6fdb7d719b7ba78e46b5635fe635de6d4;hb=ad3b62cf2f857d53113692f5a12adce616f17829;hp=5e144ab886a0cf975156cf70ebaaab88ea13567e;hpb=2a4dc77a633cc78907934fd93200ac16d55be78e;p=quix0rs-gnu-social.git diff --git a/actions/unsubscribepeopletag.php b/actions/unsubscribepeopletag.php index 5e144ab886..b5757ad6fd 100644 --- a/actions/unsubscribepeopletag.php +++ b/actions/unsubscribepeopletag.php @@ -58,14 +58,12 @@ class UnsubscribepeopletagAction extends Action if (!common_logged_in()) { // TRANS: Client error displayed when trying to perform an action while not logged in. $this->clientError(_('You must be logged in to unsubscribe from a list.')); - return false; } // Only allow POST requests if ($_SERVER['REQUEST_METHOD'] != 'POST') { // TRANS: Client error displayed when trying to use another method than POST. $this->clientError(_('This action only accepts POST requests.')); - return false; } // CSRF protection @@ -76,7 +74,6 @@ class UnsubscribepeopletagAction extends Action // TRANS: Client error displayed when the session token does not match or is not given. $this->clientError(_('There was a problem with your session token.'. ' Try again, please.')); - return false; } $tagger_arg = $this->trimmed('tagger'); @@ -88,13 +85,11 @@ class UnsubscribepeopletagAction extends Action } else { // TRANS: Client error displayed when trying to perform an action without providing an ID. $this->clientError(_('No ID given.'), 404); - return false; } if (!$this->peopletag || $this->peopletag->private) { // TRANS: Client error displayed trying to reference a non-existing list. $this->clientError(_('No such list.'), 404); - return false; } $this->tagger = Profile::getKV('id', $this->peopletag->tagger); @@ -133,15 +128,12 @@ class UnsubscribepeopletagAction extends Action $lf = new SubscribePeopletagForm($this, $this->peopletag); $lf->show(); $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } else { if (common_get_returnto()) { common_redirect(common_get_returnto(), 303); - return true; } - common_redirect(common_local_url('peopletagsbyuser', - array('nickname' => $this->tagger->nickname)), - 303); + common_redirect(common_local_url('peopletagsbyuser', array('nickname' => $this->tagger->nickname)), 303); } } }