diff options
author | Evan Prodromou <evan@status.net> | 2010-03-03 18:20:45 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-03 18:20:45 -0500 |
commit | 0f1c6e239acbf2c024c3aae9819d891f02b05bfd (patch) | |
tree | 42e923d0b8dd35ca2592a68a4dd26e686361b4c2 /actions/usergroups.php | |
parent | 13521cb510f2377e9b865b0506f92ada9ef9b3cd (diff) | |
parent | 4103e8584c7ccfb444af0814345104afedd2c6fc (diff) |
Merge branch 'testing'
Diffstat (limited to 'actions/usergroups.php')
-rw-r--r-- | actions/usergroups.php | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/actions/usergroups.php b/actions/usergroups.php index 97faabae6..29bda0a76 100644 --- a/actions/usergroups.php +++ b/actions/usergroups.php @@ -130,22 +130,26 @@ class UsergroupsAction extends OwnerDesignAction _('Search for more groups')); $this->elementEnd('p'); - $offset = ($this->page-1) * GROUPS_PER_PAGE; - $limit = GROUPS_PER_PAGE + 1; + if (Event::handle('StartShowUserGroupsContent', array($this))) { + $offset = ($this->page-1) * GROUPS_PER_PAGE; + $limit = GROUPS_PER_PAGE + 1; + + $groups = $this->user->getGroups($offset, $limit); + + if ($groups) { + $gl = new GroupList($groups, $this->user, $this); + $cnt = $gl->show(); + if (0 == $cnt) { + $this->showEmptyListMessage(); + } + } - $groups = $this->user->getGroups($offset, $limit); + $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE, + $this->page, 'usergroups', + array('nickname' => $this->user->nickname)); - if ($groups) { - $gl = new GroupList($groups, $this->user, $this); - $cnt = $gl->show(); - if (0 == $cnt) { - $this->showEmptyListMessage(); - } + Event::handle('EndShowUserGroupsContent', array($this)); } - - $this->pagination($this->page > 1, $cnt > GROUPS_PER_PAGE, - $this->page, 'usergroups', - array('nickname' => $this->user->nickname)); } function showEmptyListMessage() |