summaryrefslogtreecommitdiff
path: root/actions/subscribers.php
diff options
context:
space:
mode:
Diffstat (limited to 'actions/subscribers.php')
-rw-r--r--actions/subscribers.php32
1 files changed, 24 insertions, 8 deletions
diff --git a/actions/subscribers.php b/actions/subscribers.php
index 4482de9a7..66ac00fb1 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();
+ }
}
}