diff --git a/plugins/GroupPrivateMessage/groupinbox.php b/plugins/GroupPrivateMessage/groupinbox.php index 55bf4b0ee2dabdc850aca24a93322e23577d58a7..409f59aa1c0d3e819648c661a3877915109bd669 100644 --- a/plugins/GroupPrivateMessage/groupinbox.php +++ b/plugins/GroupPrivateMessage/groupinbox.php @@ -119,7 +119,13 @@ class GroupinboxAction extends GroupDesignAction function showContent() { $gml = new GroupMessageList($this, $this->gm); - $gml->show(); + $cnt = $gml->show(); + + $this->pagination($this->page > 1, + $cnt > MESSAGES_PER_PAGE, + $this->page, + 'groupinbox', + array('nickname' => $this->group->nickname)); } /** diff --git a/plugins/GroupPrivateMessage/groupmessagelist.php b/plugins/GroupPrivateMessage/groupmessagelist.php index 09f453d5206a0ec9a8df3ff414b6ba32c1349f86..fb49f5c239f59a1949ee5fd2aafacc4bfdd7cbbd 100644 --- a/plugins/GroupPrivateMessage/groupmessagelist.php +++ b/plugins/GroupPrivateMessage/groupmessagelist.php @@ -68,10 +68,23 @@ class GroupMessageList extends Widget function show() { $this->out->elementStart('ul', 'notices messages group-messages'); - while ($this->gm->fetch()) { + + $cnt = 0; + + while ($this->gm->fetch() && $cnt <= MESSAGES_PER_PAGE) { + + $cnt++; + + if ($cnt > MESSAGES_PER_PAGE) { + break; + } + $gmli = new GroupMessageListItem($this->out, $this->gm); $gmli->show(); } + $this->out->elementEnd('ul'); + + return $cnt; } }