From 3fd191eed80733a109ae3877a62ac2054baae6b8 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Wed, 3 Jan 2024 14:57:27 -0700 Subject: [PATCH] Modify maintenance.php to improve references checking as in spoolnews/rslight-lib. --- Rocksolid_Light/rslight/scripts/maintenance.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Rocksolid_Light/rslight/scripts/maintenance.php b/Rocksolid_Light/rslight/scripts/maintenance.php index 723fa66..e43a6f9 100644 --- a/Rocksolid_Light/rslight/scripts/maintenance.php +++ b/Rocksolid_Light/rslight/scripts/maintenance.php @@ -259,10 +259,12 @@ function import_articles($group) } if ($is_header == 1) { $response = str_replace("\t", " ", $response); + if (strpos($response, ': ') !== false) { + $ref = 0; + } // Find article date if (stripos($response, "Date: ") === 0) { $finddate = explode(': ', $response, 2); - $ref = 0; } // Get overview data $mid[1] = $row['msgid']; @@ -278,10 +280,8 @@ function import_articles($group) $references = $this_references[1]; $ref = 1; } - if ((stripos($response, ':') === false) && (strpos($response, '>'))) { - if ($ref == 1) { - $references = $references . $response; - } + if (preg_match('/^\s/', $response) && $ref == 1) { + $references = $references . $response; } $response = str_replace("\n", "", str_replace("\r", "", $response)); } else {