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; }