X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fapprovesub.php;h=c9fa804412a97b4abd0669c38be051b77cc81a64;hb=bdc38a7204dc83e17b5a251a568447b8e23d533e;hp=be07b6e877e37a227f87afb15b399a4d103c5983;hpb=0dbdcf2936a00282114f1368ead2f5edebc6ae61;p=quix0rs-gnu-social.git diff --git a/actions/approvesub.php b/actions/approvesub.php index be07b6e877..c9fa804412 100644 --- a/actions/approvesub.php +++ b/actions/approvesub.php @@ -58,14 +58,12 @@ class ApprovesubAction extends Action if (empty($cur)) { // TRANS: Client error displayed trying to approve group membership while not logged in. $this->clientError(_('Must be logged in.'), 403); - return false; } if ($this->arg('profile_id')) { - $this->profile = Profile::staticGet('id', $this->arg('profile_id')); + $this->profile = Profile::getKV('id', $this->arg('profile_id')); } else { // TRANS: Client error displayed trying to approve subscriptionswithout specifying a profile to approve. $this->clientError(_('Must specify a profile.')); - return false; } $this->request = Subscription_queue::pkeyGet(array('subscriber' => $this->profile->id, @@ -73,6 +71,7 @@ class ApprovesubAction extends Action if (empty($this->request)) { // TRANS: Client error displayed trying to approve subscription for a non-existing request. + // TRANS: %s is a user nickname. $this->clientError(sprintf(_('%s is not in the moderation queue for your subscriptions.'), $this->profile->nickname), 403); } @@ -135,7 +134,7 @@ class ApprovesubAction extends Action $this->element('p', 'success', _('Subscription canceled.')); } $this->elementEnd('body'); - $this->elementEnd('html'); + $this->endHTML(); } else { common_redirect(common_local_url('subqueue', array('nickname' => $cur->nickname)),