]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Added event hook for before and after personal timeline content
authorSarven Capadisli <csarven@status.net>
Tue, 2 Mar 2010 17:33:25 +0000 (12:33 -0500)
committerSarven Capadisli <csarven@status.net>
Tue, 2 Mar 2010 17:33:25 +0000 (12:33 -0500)
EVENTS.txt
actions/all.php

index a2b405acc8e07f01a829e93ed69478088929cfb9..bb4936b354b6f58c927b41993d0802656533fcbb 100644 (file)
@@ -770,6 +770,12 @@ StartShowSubscriptionsContent: before showing the subscriptions content
 EndShowSubscriptionsContent: after showing the subscriptions content
 - $action: the current action
 
+StartShowAllContent: before showing the all (you and friends) content
+- $action: the current action
+
+EndShowAllContent: after showing the all (you and friends) content
+- $action: the current action
+
 StartDeleteUserForm: starting the data in the form for deleting a user
 - $action: action being shown
 - $user: user being deleted
index 3eb1852147f4b8467f27fd2f41b6dbd850101a90..6be0c00e3a36c2722925a4278eca0054cb685cf7 100644 (file)
@@ -144,18 +144,22 @@ class AllAction extends ProfileAction
 
     function showContent()
     {
-        $nl = new NoticeList($this->notice, $this);
+        if (Event::handle('StartShowAllContent', array($this))) {
+            $nl = new NoticeList($this->notice, $this);
 
-        $cnt = $nl->show();
+            $cnt = $nl->show();
 
-        if (0 == $cnt) {
-            $this->showEmptyListMessage();
-        }
+            if (0 == $cnt) {
+                $this->showEmptyListMessage();
+            }
 
-        $this->pagination(
-            $this->page > 1, $cnt > NOTICES_PER_PAGE,
-            $this->page, 'all', array('nickname' => $this->user->nickname)
-        );
+            $this->pagination(
+                $this->page > 1, $cnt > NOTICES_PER_PAGE,
+                $this->page, 'all', array('nickname' => $this->user->nickname)
+            );
+
+            Event::handle('EndShowAllContent', array($this));
+        }
     }
 
     function showPageTitle()