From 8a5cc20b1f362d64b5906eddb17bb92f0899543f Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sun, 24 Dec 2023 12:03:32 -0700 Subject: [PATCH] Simplify checking whether to check spam in spoolnews.php. --- Rocksolid_Light/rslight/scripts/spoolnews.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php index 4eb7525..b73b003 100644 --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -63,9 +63,9 @@ if (! isset($CONFIG['enable_nntp']) || $CONFIG['enable_nntp'] != true) { $workpath = $spooldir . "/"; $path = $workpath . "articles/"; -if($low_spool_disk_space) { - print "Low Disk Space (less than ".$min_spool_disk_space." available)\n"; - file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Low Disk Space (less than ".$min_spool_disk_space."Gb available for spool). Pausing spoolnews", FILE_APPEND); +if ($low_spool_disk_space) { + print "Low Disk Space (less than " . $min_spool_disk_space . " available)\n"; + file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Low Disk Space (less than " . $min_spool_disk_space . "Gb available for spool). Pausing spoolnews", FILE_APPEND); exit(); } @@ -458,11 +458,8 @@ function get_articles($ns, $group) $current_article['snippet'] = $this_snippet; // Check Spam - if ($OVERRIDES['disable_spamassassin_spooling'] === true) { - $CONFIG['spamassassin'] = false; - $res = 0; - } - if (isset($CONFIG['spamassassin']) && ($CONFIG['spamassassin'] == true)) { + $res = 0; + if (isset($CONFIG['spamassassin']) && ($CONFIG['spamassassin'] == true) && ($OVERRIDES['disable_spamassassin_spooling'] !== true)) { $spam_result_array = check_spam($subject[1], $from[1], $groupnames[1], $references, $body, $mid[1]); $res = $spam_result_array['res']; $spamresult = $spam_result_array['spamresult'];