summaryrefslogtreecommitdiff
path: root/actions/subscribers.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2009-06-14 14:55:08 -0700
committerEvan Prodromou <evan@controlyourself.ca>2009-06-14 14:55:08 -0700
commit10b7e8ff69a6f003efd7385d38feb2300ef69f10 (patch)
tree620612d2d8377e91c5057b00423b9c59b4214644 /actions/subscribers.php
parentf32799699c516bf78d591624bc60fbbeaced1bc8 (diff)
parentdaf2e7ef47b6ed071e764858c4b1a9f5eaadb65d (diff)
Merge branch '0.8.x' into groupblock
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();
+ }
}
}