From 350e1289af67cb2830c8ca7fc8202566ab32f2e0 Mon Sep 17 00:00:00 2001 From: Sarven Capadisli Date: Tue, 2 Mar 2010 12:33:25 -0500 Subject: [PATCH] Added event hook for before and after personal timeline content --- EVENTS.txt | 6 ++++++ actions/all.php | 22 +++++++++++++--------- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/EVENTS.txt b/EVENTS.txt index a2b405acc8..bb4936b354 100644 --- a/EVENTS.txt +++ b/EVENTS.txt @@ -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 diff --git a/actions/all.php b/actions/all.php index 3eb1852147..6be0c00e3a 100644 --- a/actions/all.php +++ b/actions/all.php @@ -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() -- 2.39.5