summaryrefslogtreecommitdiff
path: root/actions/subscribers.php
diff options
context:
space:
mode:
authorJeffery To <jeffery.to@gmail.com>2009-06-24 01:25:55 +0800
committerJeffery To <jeffery.to@gmail.com>2009-06-24 01:25:55 +0800
commit280f8faab4f692ff7f4389f82397adfa6db56325 (patch)
tree94a076bfb3d13c7e6699e0149ee75fff6801880c /actions/subscribers.php
parentbb3361467c002e38aa3a424672f332b32a647e17 (diff)
parenteb40fbc17ad1efb0a4c51ee00b1e9408d2af382f (diff)
Merge branch '0.8.x' into small-fixes
Conflicts: lib/peoplesearchresults.php lib/profilelist.php
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();
+ }
}
}