X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Funsubscribepeopletag.php;h=b5757ad6fdb7d719b7ba78e46b5635fe635de6d4;hb=c85e78ac3c03bd584a6da3a0a7b5cb9160cc9324;hp=bb53766cc1d6bafcb96ec2d99d028cd573f7b9ad;hpb=513c54fa89085fde783a73c298d61576f834b131;p=quix0rs-gnu-social.git diff --git a/actions/unsubscribepeopletag.php b/actions/unsubscribepeopletag.php index bb53766cc1..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'); @@ -84,20 +81,18 @@ class UnsubscribepeopletagAction extends Action $id = intval($this->arg('id')); if ($id) { - $this->peopletag = Profile_list::staticGet('id', $id); + $this->peopletag = Profile_list::getKV('id', $id); } 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::staticGet('id', $this->peopletag->tagger); + $this->tagger = Profile::getKV('id', $this->peopletag->tagger); return true; } @@ -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); } } }