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));
}
/**
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;
}
}