Commit 880a6f6b authored by moodler's avatar moodler
Browse files

Added a new config variable that will mail db connection errors to someone (eg admin)

parent 567709c4
......@@ -274,6 +274,12 @@ $CFG->admin = 'admin';
// If you are going to publish your log, or the output of your web stats analyzer
// this will weaken the security of your website.
// Email database connection errors to someone. If Moodle cannot connect to the
// database, then email this address with a notice.
// $CFG->emailconnectionerrors =;
// NOTE: if you are using custompix in your theme, see /fixpix.php.
......@@ -140,6 +140,12 @@ global $HTTPSPAGEREQUIRED;
echo '<p>The site administrator should also check that the database details have been correctly specified in config.php</p>';
echo '</td></tr></table>';
echo '</body></html>';
if (!empty($CFG->emailconnectionerrorsto)) {
'WARNING: Database connection error: '.$CFG->wwwroot,
'Connection error: '.$CFG->wwwroot);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment