Continuing trying to fix spooling problem on empty groups.

This commit is contained in:
Retro_Guy 2024-11-14 11:59:17 -07:00
parent d19aa9c7c8
commit 3d0060fc43
2 changed files with 2 additions and 7 deletions

View File

@ -2701,7 +2701,7 @@ function is_moderated($newsgroups)
function get_next_article_number($group)
{
$ok_article = get_article_list($group);
if($ok_article == false) {
if(!is_array($ok_article)) {
return 1;
}
sort($ok_article);
@ -2726,21 +2726,15 @@ function get_article_list($thisgroup)
$table = 'overview';
$dbh = overview_db_open($database, $table);
$stmt = $dbh->prepare("SELECT * FROM $table WHERE newsgroup=:thisgroup ORDER BY number");
$found = false;
$stmt->execute([
'thisgroup' => $thisgroup
]);
$ok_article = array();
while ($found = $stmt->fetch()) {
$ok_article[] = $found['number'];
$found = true;
}
$dbh = null;
if ($found) {
return (array_unique($ok_article));
} else {
return false;
}
}
function check_duplicate_msgid($msgid, $group)

View File

@ -654,4 +654,5 @@ function get_articles($ns, $group)
}
$remote_groups_array[$group] = $article;
file_put_contents($remote_groups_array_file, serialize($remote_groups_array));
return true;
}