X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fsubscribers.php;h=66ac00fb19aa26d64da5441d07fafec8bc08f36a;hb=da512ad8c2b4cba719204d8a8f42ecba9716702e;hp=4482de9a7c74279b000e042012fbb927a86b5dbd;hpb=ce5b98ca016841edf920ebc062f1b4d53488762c;p=quix0rs-gnu-social.git diff --git a/actions/subscribers.php b/actions/subscribers.php index 4482de9a7c..66ac00fb19 100644 --- a/actions/subscribers.php +++ b/actions/subscribers.php @@ -130,18 +130,34 @@ class SubscribersAction extends GalleryAction } } -class SubscribersList extends ProfileList +class SubscribersList extends SubscriptionList { - function showBlockForm() + function newListItem($profile) { - $bf = new BlockForm($this->out, $this->profile, - array('action' => 'subscribers', - 'nickname' => $this->owner->nickname)); - $bf->show(); + return new SubscribersListItem($profile, $this->owner, $this->action); } +} - function isReadOnly($args) +class SubscribersListItem extends SubscriptionListItem +{ + function showActions() { - return true; + $this->startActions(); + $this->showSubscribeButton(); + // Relevant code! + $this->showBlockForm(); + $this->endActions(); + } + + function showBlockForm() + { + $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)); + $bf->show(); + } } }