示例#1
0
 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;
 }
示例#2
0
 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;
 }
示例#3
0
 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));
 }
示例#4
0
 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));
     }
 }
示例#5
0
 function showSections()
 {
     parent::showSections();
 }
示例#6
0
 function showScripts()
 {
     parent::showScripts();
     $this->autofocus('tag');
 }
 function showSections()
 {
     parent::showSections();
     $cloud = new SubscribersPeopleTagCloudSection($this);
     $cloud->show();
     $cloud2 = new SubscribersPeopleSelfTagCloudSection($this);
     $cloud2->show();
 }