]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add an event for subscribers minilist
authorEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:12:40 +0000 (10:12 -0400)
committerEvan Prodromou <evan@status.net>
Mon, 5 Apr 2010 14:12:40 +0000 (10:12 -0400)
lib/profileaction.php

index 029c21845d6630088189eb2c2731537c92011e84..8880faba6f975c67e2dd8633791cd190c3bae653 100644 (file)
@@ -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');