From d4fb7c3eea0d4b5d9d1ef7ce4940548c53f6dc15 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Mon, 15 Jan 2024 05:06:28 -0700 Subject: [PATCH] Disable admin mail notifications of errors. Log only. (add toggle in future). --- Rocksolid_Light/rocksolid/article-flat.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Rocksolid_Light/rocksolid/article-flat.php b/Rocksolid_Light/rocksolid/article-flat.php index c75cb2c..2a69be4 100644 --- a/Rocksolid_Light/rocksolid/article-flat.php +++ b/Rocksolid_Light/rocksolid/article-flat.php @@ -12,6 +12,7 @@ include "config.inc.php"; include "$file_newsportal"; $logfile = $logdir . '/newsportal.log'; +$debuglog = $logdir . '/debug.log'; if (isset($_COOKIE['mail_name'])) { if ($userdata = get_user_mail_auth_data($_COOKIE['mail_name'])) { $userfile = $spooldir . '/' . strtolower($_COOKIE['mail_name']) . '-articleviews.dat'; @@ -136,14 +137,14 @@ if ($message) { $msg_body = format_log_date() . " " . $config_name . " GROUP ERROR: " . $group . " may need repair"; $msg_body_2 = "\n\nRun maintenance.php -import " . $group; $msg_subject = "ERROR in $group"; - send_admin_message($msg_to, $msg_from, $msg_subject, $msg_body . $msg_body_2); + // send_admin_message($msg_to, $msg_from, $msg_subject, $msg_body . $msg_body_2); + file_put_contents($debug_log, "\n" . $msg_body, FILE_APPEND); $admin_msg_log[$group] = 0; } else { $admin_msg_log[$group] = time(); } } file_put_contents($msg_log_file, serialize($admin_msg_log)); - file_put_contents($debug_log, "\n" . $msg_body, FILE_APPEND); exit(); } if ($thread_articles == false) {