From 00ccd7b18b41246fd1cd99b7d33e07ede5618e6b Mon Sep 17 00:00:00 2001 From: Chris Morgan Date: Sat, 16 Jun 2007 03:35:05 +0000 Subject: [PATCH] Fix subject of database error log email sent during cron maintenance --- cron/cleanup.php | 3 ++- include/error_log.php | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cron/cleanup.php b/cron/cleanup.php index 2e0bce6..2f6d628 100644 --- a/cron/cleanup.php +++ b/cron/cleanup.php @@ -251,9 +251,10 @@ function orphanSessionListCheck() $hResult = query_parameters($sQuery, SESSION_DAYS_TO_EXPIRE + 2); } +// report the database error log entries to the mailing list function reportErrorLogEntries() { - error_log::mail_admins_error_log(); + error_log::mail_admins_error_log($sEmailSubject); error_log::flush(); } diff --git a/include/error_log.php b/include/error_log.php index 4d12e3b..abb312a 100644 --- a/include/error_log.php +++ b/include/error_log.php @@ -60,9 +60,9 @@ class error_log else return false; } - function mail_admins_error_log() + function mail_admins_error_log($sSubject = "") { - $sSubject = "Appdb error log\r\n"; + $sSubject .= "Database Error log\r\n"; $sEmail = User::get_notify_email_address_list(null, null); /* get list admins */ $sQuery = "SELECT * from error_log WHERE deleted='0' ORDER BY submitTime";