/**
* StatusNet, the distributed open-source microblogging tool
*
- * Leave a group
+ * Approve group subscription request
*
* PHP version 5
*
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,
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);
}
$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)),