Commit 350e1289 authored by Sarven Capadisli's avatar Sarven Capadisli

Added event hook for before and after personal timeline content

parent 623faf9f
......@@ -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
......
......@@ -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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment