Added event hooks for before and after user groups content

This commit is contained in:
Sarven Capadisli 2010-03-03 15:29:51 -05:00
parent c82efb7fd8
commit 2ce9ae004d
2 changed files with 22 additions and 12 deletions

View File

@ -778,6 +778,12 @@ StartShowSubscriptionsContent: before showing the subscriptions content
EndShowSubscriptionsContent: after showing the subscriptions content
- $action: the current action
StartShowUserGroupsContent: before showing the user groups content
- $action: the current action
EndShowUserGroupsContent: after showing the user groups content
- $action: the current action
StartShowAllContent: before showing the all (you and friends) content
- $action: the current action

View File

@ -130,6 +130,7 @@ class UsergroupsAction extends OwnerDesignAction
_('Search for more groups'));
$this->elementEnd('p');
if (Event::handle('StartShowUserGroupsContent', array($this))) {
$offset = ($this->page-1) * GROUPS_PER_PAGE;
$limit = GROUPS_PER_PAGE + 1;
@ -146,6 +147,9 @@ class UsergroupsAction extends OwnerDesignAction
$this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE,
$this->page, 'usergroups',
array('nickname' => $this->user->nickname));
Event::handle('EndShowUserGroupsContent', array($this));
}
}
function showEmptyListMessage()