Ejemplo n.º 1
0
 function showContent()
 {
     parent::showContent();
     $offset = ($this->page - 1) * PROFILES_PER_PAGE;
     $limit = PROFILES_PER_PAGE + 1;
     $cnt = 0;
     if ($this->tag) {
         $subscriptions = $this->user->getTaggedSubscriptions($this->tag, $offset, $limit);
     } else {
         $subscriptions = $this->user->getSubscriptions($offset, $limit);
     }
     if ($subscriptions) {
         $subscriptions_list = new SubscriptionsList($subscriptions, $this->user, $this);
         $cnt = $subscriptions_list->show();
     }
     $subscriptions->free();
     $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->page, 'subscriptions', array('nickname' => $this->user->nickname));
 }
Ejemplo n.º 2
0
 function showContent()
 {
     if (Event::handle('StartShowSubscriptionsContent', array($this))) {
         parent::showContent();
         $offset = ($this->page - 1) * PROFILES_PER_PAGE;
         $limit = PROFILES_PER_PAGE + 1;
         $cnt = 0;
         if ($this->tag) {
             $subscriptions = $this->target->getTaggedSubscriptions($this->tag, $offset, $limit);
         } else {
             $subscriptions = $this->target->getSubscribed($offset, $limit);
         }
         if ($subscriptions) {
             $subscriptions_list = new SubscriptionsList($subscriptions, $this->target, $this);
             $cnt = $subscriptions_list->show();
             if (0 == $cnt) {
                 $this->showEmptyListMessage();
             }
         }
         $this->pagination($this->page > 1, $cnt > PROFILES_PER_PAGE, $this->page, 'subscriptions', array('nickname' => $this->target->getNickname()));
         Event::handle('EndShowSubscriptionsContent', array($this));
     }
 }