X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsubscribers.php;h=87489fb69a37e8842e462656149366c0df736b56;hb=d295d8b43ceb3b7cb60665817d526fe86186302c;hp=2724927878c586d640c0a827317dd61e59993f3a;hpb=eb7f9645986ade69dd0b111192aa3e05fcfbaa0f;p=quix0rs-gnu-social.git diff --git a/actions/subscribers.php b/actions/subscribers.php index 2724927878..87489fb69a 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -92,7 +92,7 @@ class SubscribersAction extends GalleryAction } if ($subscribers) { - $subscribers_list = new SubscribersList($subscribers, $this->target, $this); + $subscribers_list = new SubscribersList($subscribers, $this->target->getUser(), $this); $cnt = $subscribers_list->show(); if (0 == $cnt) { $this->showEmptyListMessage(); @@ -132,64 +132,3 @@ class SubscribersAction extends GalleryAction parent::showSections(); } } - -class SubscribersList extends SubscriptionList -{ - function newListItem($profile) - { - return new SubscribersListItem($profile, $this->owner, $this->action); - } -} - -class SubscribersListItem extends SubscriptionListItem -{ - function showActions() - { - $this->startActions(); - if (Event::handle('StartProfileListItemActionElements', array($this))) { - $this->showSubscribeButton(); - // Relevant code! - $this->showBlockForm(); - Event::handle('EndProfileListItemActionElements', array($this)); - } - $this->endActions(); - } - - function showBlockForm() - { - $user = common_current_user(); - - if (!empty($user) && $this->owner->id == $user->id) { - $returnto = array('action' => 'subscribers', - 'nickname' => $this->owner->getNickname()); - $page = $this->out->arg('page'); - if ($page) { - $returnto['param-page'] = $page; - } - $bf = new BlockForm($this->out, $this->profile, $returnto); - $bf->show(); - } - } - - function linkAttributes() - { - $aAttrs = parent::linkAttributes(); - - if (common_config('nofollow', 'subscribers')) { - $aAttrs['rel'] .= ' nofollow'; - } - - return $aAttrs; - } - - function homepageAttributes() - { - $aAttrs = parent::linkAttributes(); - - if (common_config('nofollow', 'subscribers')) { - $aAttrs['rel'] = 'nofollow'; - } - - return $aAttrs; - } -}