Ignore newsgroup when loading by message-id

This commit is contained in:
Retro_Guy 2021-12-18 22:01:11 +00:00
parent 64802562f5
commit f56337b39a
1 changed files with 3 additions and 2 deletions

View File

@ -28,11 +28,12 @@
if($CONFIG['article_database'] == '1') {
$database = $spooldir.'/articles-overview.db3';
$articles_dbh = rslight_db_open($database);
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid AND newsgroup=:group');
$articles_query->execute(['messageid' => $id, 'group' => $group]);
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid');
$articles_query->execute(['messageid' => $id]);
$found = 0;
while ($row = $articles_query->fetch()) {
$id = $row['number'];
$group = $row['newsgroup'];
$found = 1;
break;
}