summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-04-05 10:12:40 -0400
committerEvan Prodromou <evan@status.net>2010-04-05 10:12:40 -0400
commit5414096c44dd68c3212627320bd71d12e455950b (patch)
treea8b13babe75a3b199d6d1b8d2e37a5c0a09e897b /lib
parentffc1ac02c3f1f566088c8bef7c54d1ae97e56a36 (diff)
add an event for subscribers minilist
Diffstat (limited to 'lib')
-rw-r--r--lib/profileaction.php35
1 files changed, 20 insertions, 15 deletions
diff --git a/lib/profileaction.php b/lib/profileaction.php
index 029c21845..8880faba6 100644
--- a/lib/profileaction.php
+++ b/lib/profileaction.php
@@ -139,25 +139,30 @@ class ProfileAction extends OwnerDesignAction
$this->elementStart('div', array('id' => 'entity_subscribers',
'class' => 'section'));
- $this->element('h2', null, _('Subscribers'));
+ if (Event::handle('StartShowSubscribersMiniList', array($this))) {
- $cnt = 0;
+ $this->element('h2', null, _('Subscribers'));
- if (!empty($profile)) {
- $pml = new ProfileMiniList($profile, $this);
- $cnt = $pml->show();
- if ($cnt == 0) {
- $this->element('p', null, _('(None)'));
+ $cnt = 0;
+
+ if (!empty($profile)) {
+ $pml = new ProfileMiniList($profile, $this);
+ $cnt = $pml->show();
+ if ($cnt == 0) {
+ $this->element('p', null, _('(None)'));
+ }
+ }
+
+ if ($cnt > PROFILES_PER_MINILIST) {
+ $this->elementStart('p');
+ $this->element('a', array('href' => common_local_url('subscribers',
+ array('nickname' => $this->profile->nickname)),
+ 'class' => 'more'),
+ _('All subscribers'));
+ $this->elementEnd('p');
}
- }
- if ($cnt > PROFILES_PER_MINILIST) {
- $this->elementStart('p');
- $this->element('a', array('href' => common_local_url('subscribers',
- array('nickname' => $this->profile->nickname)),
- 'class' => 'more'),
- _('All subscribers'));
- $this->elementEnd('p');
+ Event::handle('EndShowSubscribersMiniList', array($this));
}
$this->elementEnd('div');