X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=actions%2Fusergroups.php;h=29bda0a765c289dc107316bd1f1a4a5135346472;hb=ad651c35353021d05ef4a013e57c17d0b885c5dc;hp=97faabae65ad9cd7f02ab1c5cc0cba3d04a21fa1;hpb=78079f34e273357d03ceee13269f9a388e66c4e3;p=quix0rs-gnu-social.git diff --git a/actions/usergroups.php b/actions/usergroups.php index 97faabae65..29bda0a765 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()