$do_save = false;
$first = $banana->maxspool ? max($groupinfo[2]-$banana->maxspool, $groupinfo[1]) : $groupinfo[1];
- $last = $groupinfo[2];
+ $last = $groupinfo[2];
if ($this->version == BANANA_SPOOL_VERSION && is_array($this->overview)) {
- for ($id = min(array_keys($this->overview)); $id<$first; $id++) {
- $this->delid($id, false);
- $do_save = true;
+ if (count($this->overview)) {
+ for ($id = min(array_keys($this->overview)); $id<$first; $id++) {
+ $this->delid($id, false);
+ $do_save = true;
+ }
}
if (!empty($this->overview)) {
$first = max(array_keys($this->overview))+1;
- } else {
- return;
}
} else {
unset($this->overview, $this->ids);
$this->roots[] = $id;
}
}
-
+
file_put_contents($file, serialize($this));
}
$res .= "<td class='subj'>"
."<div class='tree'>$_pfx_node".($hc?($_head?$spfx_f:($this->overview[$_id]->parent_direct?$spfx_s:$spfx_snd)):$spfx_n)
."</div>";
+ $subject = $this->overview[$_id]->subject;
+ if (strlen($subject) == 0) {
+ $subject = _b_('(pas de sujet)');
+ }
if ($_index == $_ref) {
- $res .= '<span class="cur">'.htmlentities($this->overview[$_id]->subject).'</span>';
+ $res .= '<span class="cur">'.htmlentities($subject).'</span>';
} else {
- $res .= "<a href='?group={$this->group}&artid=$_id'>".htmlentities($this->overview[$_id]->subject).'</a>';
+ $res .= "<a href='?group={$this->group}&artid=$_id'>".htmlentities($subject).'</a>';
}
$res .= "</td>\n<td class='from'>".formatFrom($this->overview[$_id]->from)."</td>\n</tr>";