* Can use a user-defined Array instead of $_GET
* Bugfix: can remove all subscriptions
* Bugfix: case sensitivity of newsgroup names
+ * Bugfix: correctly remove outdated cache entries
Sat, 08 Jul 2006 Florent Bruneau <florent.bruneau@m4x.org>
$this->_readFromFile();
$do_save = false;
- $first = $banana->maxspool ? max($groupinfo[2]-$banana->maxspool, $groupinfo[1]) : $groupinfo[1];
- $last = $groupinfo[2];
- if ($this->version == BANANA_SPOOL_VERSION && is_array($this->overview)) {
- if (count($this->overview)) {
- for ($id = min(array_keys($this->overview)); $id<$first; $id++) {
+ $first = $banana->maxspool ? max($groupinfo[2] - $banana->maxspool, $groupinfo[1]) : $groupinfo[1];
+ $last = $groupinfo[2];
+
+ if ($this->version == BANANA_SPOOL_VERSION && is_array($this->overview)) {
+ $mids = array_keys($this->overview);
+ foreach ($mids as $id) {
+ if (($first <= $last && ($id < $first || $id > $last))
+ || ($first > $last && $id < $first && $id > $last))
+ {
$this->delid($id, false);
$do_save = true;
}
}
if (!empty($this->overview)) {
$first = max(array_keys($this->overview))+1;
- }
+ }
} else {
unset($this->overview, $this->ids);
$this->version = BANANA_SPOOL_VERSION;