$this->ids[$message['message-id']] = $id;
}
+ if (!is_array($this->overview)) {
+ $this->overview = array();
+ }
foreach ($messages as $id=>&$message) {
if (!isset($this->overview[$id])) {
$this->overview[$id] = new BananaSpoolHead($message);
if (is_null($array)) {
$array =& $this->roots;
}
+ if (!is_array($this->roots)) {
+ return;
+ }
foreach ($array as $id) {
if (!$this->overview[$id]->isread) {
$this->markAsRead($id);
}
unset($this->overview[$_id]);
$msgid = array_search($_id, $this->ids);
- if ($msgid) {
+ if ($msgid !== false) {
unset($this->ids[$msgid]);
}
+ $msgid = array_search($_id, $this->roots);
+ if ($msgid !== false) {
+ unset($this->roots[$msgid]);
+ }
if ($write) {
+ $this->markAllAsRead();
$this->saveToFile();
}
}
if (function_exists('hook_formatDisplayHeader')) {
list($subject, $link) = hook_formatDisplayHeader('subject', $subject, true);
} else {
- $subject = banana_catchFormats(stripslashes($subject));
+ $subject = banana_catchFormats(banana_htmlentities(stripslashes($subject)));
$link = null;
}
if (empty($subject)) {