From 78de57a360bb47e3fc7ce4eb76fc4517e586db52 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Wed, 17 Apr 2024 04:39:20 -0700 Subject: [PATCH] Build (un)moderated files data during daily expire. Future need to automatically update changes to moderation flags. --- Rocksolid_Light/rocksolid/newsportal.php | 3 +++ Rocksolid_Light/rslight/scripts/expire.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index fe2d66c..1549b40 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -2049,6 +2049,9 @@ function is_moderated($newsgroups) } } } + if($CONFIG['remote_server'] == '') { + return false; + } $ns = nntp2_open(); if (! $ns) { return false; diff --git a/Rocksolid_Light/rslight/scripts/expire.php b/Rocksolid_Light/rslight/scripts/expire.php index 0234d3e..7d6f9f9 100644 --- a/Rocksolid_Light/rslight/scripts/expire.php +++ b/Rocksolid_Light/rslight/scripts/expire.php @@ -151,6 +151,9 @@ function vacuum_group_database($group) $data_stmt->execute(); $data_dbh = null; } + // Check for moderation flag here. Yes, in vacuum. + is_moderated($group); + file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " " . $group . " Checked for moderation flag", FILE_APPEND); } function convert_max_articles_to_days($group)