$this->type = $_type;
$desc = $banana->nntp->xgtitle();
+
+ $this->load();
- if ($_type == BANANA_GROUP_NEW) {
+ if (empty($this->overview) && $_type == BANANA_GROUP_SUB) {
+ $this->type = BANANA_GROUP_ALL;
+ $this->load();
+ }
+ }
+
+ /** Load overviews
+ */
+ function load()
+ {
+ global $banana;
+
+ if ($this->type == BANANA_GROUP_NEW) {
$list = $banana->nntp->newgroups($banana->profile['lastnews']);
} else {
$list = $banana->nntp->liste();
- if ($_type == BANANA_GROUP_SUB) {
+ if ($this->type == BANANA_GROUP_SUB) {
$mylist = Array();
foreach ($banana->profile['subscribe'] as $g) {
if (isset($list[$g])) {
$this->overview[$g][1] = $l[0];
}
ksort($this->overview);
-
- if (empty($this->overview) && $_type == BANANA_GROUP_SUB) {
- $this = new BananaGroups(BANANA_GROUP_ALL);
- }
}
/** updates overview
} elseif ($this->type == BANANA_GROUP_SUB) {
$html .= '<td class="new">'.($new ? $new : '-').'</td>';
}
- $html .= "<td class='grp'><a href='?group=$g'>$g</a></td><td class='dsc'>{$d[0]}</td></tr>";
+ $html .= '<td class="grp">' . makeHREF(Array('group' => $g), $g) . '</td><td class="dsc">' . $d[0] . '</td></tr>';
}
$html .= '</table>';
if ($show_form) {
- return '<form method="post" action="?"><div class="center"><input type="submit" /></div>'
- .$html.'<div class="center"><input type="submit" /></div></form>';
+ return '<form method="post" action="?"><div class="center"><input type="submit" value="Valider" /></div>'
+ .$html.'<div class="center"><input type="submit" value="Valider" /></div></form>';
}
return $html;