foreach ($this->boxes as $group=>&$desc) {
list($msgnum, $first, $last, $groupname) = $this->group($group);
$this->ingroup = $group;
- $new = count($this->newnews($group, $since));
+ $new = $this->newnews($group, $since);
+ if (!is_array($new)) {
+ $new = 0;
+ } else {
+ $c = count($new);
+ if ($c > 0 && function_exists('hook_listReadMessages')) {
+ $msgs = hook_listReadMessages($group);
+ if (is_array($msgs)) {
+ foreach ($msgs as $msg) {
+ if (is_numeric($msg)) {
+ $c--;
+ } else if (in_array($msg, $new)) {
+ $c--;
+ }
+ }
+ }
+ }
+ $new = $c;
+ }
$desc['msgnum'] = $msgnum;
$desc['unread'] = $new;
}
}
}
-// vim:set et sw=4 sts=4 ts=4 enc=utf-8:
+// vim:set et sw=4 sts=4 ts=4 fenc=utf-8:
?>