diff --git a/Rocksolid_Light/common/version.txt b/Rocksolid_Light/common/version.txt index 7e310ba..56f3151 100644 --- a/Rocksolid_Light/common/version.txt +++ b/Rocksolid_Light/common/version.txt @@ -1 +1 @@ -0.9.9 +0.9.10 diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index c804a22..8b62631 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -2408,12 +2408,6 @@ function insert_article_from_array($this_article, $check_duplicates = true) return "441 Insert failed (duplicate)\r\n"; } } - // Allow a message to be approximately 2 minutes in the future, but not more. - if ($this_article['epochdate'] > (time() + 120)) { - echo "\n(newsportal)Article date in future. Skipping: " . $group . ":" . $this_article['mid']; - file_put_contents($logfile, "\n" . format_log_date() . " " . $config_name . " Article date in future. Skipping: " . $group . ":" . $this_article['mid'], FILE_APPEND); - return "441 Insert failed (article date in future)\r\n"; - } // Open articles Database if ($CONFIG['article_database'] == '1') { @@ -2830,7 +2824,7 @@ function delete_message($messageid, $group = null, $overview_dbh = null) // Else returns a string with reason for failure function check_article_integrity($rawmessage) { - global $CONFIG, $logfile; + global $CONFIG, $logfile, $config_name; $returnval = false; $count_rawmessage = count($rawmessage); $message = new messageType(); @@ -2842,8 +2836,10 @@ function check_article_integrity($rawmessage) } // Parse the Header: $message->header = parse_header($rawheader); - // Check if date is in future - if ($message->header->date > time()) { + + // 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; return $returnval; }