protected function prepare(array $args = array()) { parent::prepare($args); if ($this->scoped->id != $this->target->id) { // TRANS: Client error displayed when trying to approve group applicants without being a group administrator. $this->clientError(_('You may only approve your own pending subscriptions.')); } return true; }
function prepare($args) { parent::prepare($args); $cur = common_current_user(); if (!$cur || $cur->id != $this->profile->id) { // TRANS: Client error displayed when trying to approve group applicants without being a group administrator. $this->clientError(_('You may only approve your own pending subscriptions.')); return false; } return true; }
function showContent() { parent::showContent(); $offset = ($this->page - 1) * PROFILES_PER_PAGE; $limit = PROFILES_PER_PAGE + 1; $cnt = 0; if ($this->tag) { $subscribers = $this->user->getTaggedSubscribers($this->tag, $offset, $limit); } else { $subscribers = $this->user->getSubscribers($offset, $limit); } if ($subscribers) { $subscribers_list = new SubscribersList($subscribers, $this->user, $this); $cnt = $subscribers_list->show(); } $subscribers->free(); $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->page, 'subscribers', array('nickname' => $this->user->nickname)); }
function showContent() { if (Event::handle('StartShowTagSubscriptionsContent', array($this))) { parent::showContent(); $offset = ($this->page - 1) * PROFILES_PER_PAGE; $limit = PROFILES_PER_PAGE + 1; $cnt = 0; $tagsub = new TagSub(); $tagsub->profile_id = $this->getTarget()->getID(); $tagsub->limit($limit, $offset); $tagsub->find(); if ($tagsub->N) { $list = new TagSubscriptionsList($tagsub, $this->getTarget(), $this); $cnt = $list->show(); if (0 == $cnt) { $this->showEmptyListMessage(); } } else { $this->showEmptyListMessage(); } $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->page, 'tagsubs', array('nickname' => $this->getTarget()->getNickname())); Event::handle('EndShowTagSubscriptionsContent', array($this)); } }
function showSections() { parent::showSections(); }
function showScripts() { parent::showScripts(); $this->autofocus('tag'); }
function showSections() { parent::showSections(); $cloud = new SubscribersPeopleTagCloudSection($this); $cloud->show(); $cloud2 = new SubscribersPeopleSelfTagCloudSection($this); $cloud2->show(); }