prepare('DELETE FROM overview WHERE msgid=:messageid'); $query->execute(['messageid' => $messageid]); $dbh = null; // thread_cache_removearticle($group,$messageid); } if($CONFIG['article_database'] == '1') { $database = $spooldir.'/'.$group.'-articles.db3'; if(is_file($database)) { $articles_dbh = article_db_open($database); $articles_query = $articles_dbh->prepare('DELETE FROM articles WHERE msgid=:messageid'); $articles_query->execute(['messageid' => $messageid]); $articles_dbh = null; } } // Tradspool if($CONFIG['article_database'] != '1') { $database = $spooldir.'/articles-overview.db3'; $dbh = rslight_db_open($database); $query = $dbh->prepare('SELECT FROM overview WHERE newsgroup=:newsgroup AND msgid<:msgid'); $query->execute([':newsgroup' => $group, ':msgid' => $messageid]); $grouppath = preg_replace('/\./', '/', $group); while($row = $query->fetch()) { unlink($spooldir.'/articles/'.$grouppath.'/'.$row['number']); } $dbh = null; } delete_message_from_overboard($config_name, $group, $messageid); return; } function delete_message_from_overboard($config_name, $group, $messageid) { GLOBAL $spooldir; $cachefile=$spooldir."/".$config_name."-overboard.dat"; if(is_file($cachefile)) { $cached_overboard = unserialize(file_get_contents($cachefile)); if($target = $cached_overboard['msgids'][$messageid]) { unset($cached_overboard['threads'][$target['date']]); unset($cached_overboard['msgids'][$messageid]); unset($cached_overboard['threadlink'][$messageid]); file_put_contents($cachefile, serialize($cached_overboard)); } } $cachefile=$spooldir."/".$group."-overboard.dat"; if(is_file($cachefile)) { $cached_overboard = unserialize(file_get_contents($cachefile)); if($target = $cached_overboard['msgids'][$messageid]) { unset($cached_overboard['threads'][$target['date']]); unset($cached_overboard['msgids'][$messageid]); unset($cached_overboard['threadlink'][$messageid]); file_put_contents($cachefile, serialize($cached_overboard)); } } } ?>