X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsubscribers.php;h=2845a498e991a0c7033f83fe002f09fd58e5376a;hb=6a848bcc8ac37066f7c4941132195d2d67d3b376;hp=cd3e2ee5bedd136190ddea88971c526345c98b73;hpb=b0aea3f9c1cf9a6402bcb2751ac767445103a70b;p=quix0rs-gnu-social.git diff --git a/actions/subscribers.php b/actions/subscribers.php index cd3e2ee5be..2845a498e9 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -143,9 +143,12 @@ class SubscribersListItem extends SubscriptionListItem function showActions() { $this->startActions(); - $this->showSubscribeButton(); - // Relevant code! - $this->showBlockForm(); + if (Event::handle('StartProfileListItemActionElements', array($this))) { + $this->showSubscribeButton(); + // Relevant code! + $this->showBlockForm(); + Event::handle('EndProfileListItemActionElements', array($this)); + } $this->endActions(); } @@ -154,10 +157,36 @@ class SubscribersListItem extends SubscriptionListItem $user = common_current_user(); if (!empty($user) && $this->owner->id == $user->id) { - $bf = new BlockForm($this->out, $this->profile, - array('action' => 'subscribers', - 'nickname' => $this->owner->nickname)); + $returnto = array('action' => 'subscribers', + 'nickname' => $this->owner->nickname); + $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; + } }