From 11ccd228c6e3503f3d97fdd3f766d2d967e0e1b6 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Thu, 30 May 2024 11:44:14 -0700 Subject: [PATCH] Clean up logging of refusing articles with dates in the future. --- Rocksolid_Light/rocksolid/newsportal.php | 7 +++---- Rocksolid_Light/rslight/scripts/spoolnews.php | 3 --- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 8b62631..ead0e17 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -2837,10 +2837,9 @@ function check_article_integrity($rawmessage) // Parse the Header: $message->header = parse_header($rawheader); - // Check if date is in future (allow up to 120 seconds in future) - if ($message->header->date > (time() + 120)) { - file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Skipping message (date in future): " . $message->header->id, FILE_APPEND); - $returnval = " Skipping message (date in future): " . $message->header->id; + // Check if date is in future (allow up to 60 seconds in future) + if ($message->header->date > (time() + 60)) { + $returnval = " Skipping message (date in future): " . $message->header->id . " (" . date('M d H:i:s', $message->header->date) . ")"; return $returnval; } // Now we know if the message is a mime-multipart message: diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php index b5c6bfe..4e5b5c6 100644 --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -464,9 +464,6 @@ function get_articles($ns, $group) // CREATE SEARCH SNIPPET $this_snippet = get_search_snippet($body, $content_type[1], $content_transfer_encoding); } else { - if ($article_date > time()) { - $article_date = time(); - } touch($articleHandle, $article_date); } $current_article['mid'] = $mid[1];