From 3d0060fc43fdd6cc014bd80e43309094b3359154 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 14 Nov 2024 11:59:17 -0700 Subject: [PATCH] Continuing trying to fix spooling problem on empty groups. --- Rocksolid_Light/rocksolid/newsportal.php | 8 +------- Rocksolid_Light/rslight/scripts/spoolnews.php | 1 + 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index b285c48..9453502 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -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) diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php index c4f55ca..471e952 100644 --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -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; }