MDL-13483 found two more native php mail() commands; merged from MOODLE_19_STABLE
authorskodak <skodak>
Mon, 25 Feb 2008 14:05:06 +0000 (14:05 +0000)
committerskodak <skodak>
Mon, 25 Feb 2008 14:05:06 +0000 (14:05 +0000)
lib/datalib.php
lib/setup.php

index 15363503d0d23bf6456aff8d9ca197002defb4cc..b4598e201adbac388af2a510e5573ab3ef1bbc9a 100644 (file)
@@ -1890,7 +1890,9 @@ function add_to_log($courseid, $module, $action, $url='', $info='', $cm=0, $user
         
         // email_to_user is not usable because email_to_user tries to write to the logs table, and this will get caught
         // in an infinite loop, if disk is full
-        mail($CFG->supportemail, $subject, $message);
+        if (empty($CFG->noemailever)) {
+            mail($CFG->supportemail, $subject, $message);
+        }
     }
 
     if (!$result and debugging()) {
index 1dbc9f90ea400a14aae71ffe5bd9fa485241b8e7..6b0a2c8d022cb89298155cc6b2795a57fa59d9c6 100644 (file)
@@ -155,7 +155,7 @@ global $HTTPSPAGEREQUIRED;
         echo '</td></tr></table>';
         echo '</body></html>';
 
-        if (!empty($CFG->emailconnectionerrorsto)) {
+        if (empty($CFG->noemailever) and !empty($CFG->emailconnectionerrorsto)) {
             mail($CFG->emailconnectionerrorsto, 
                  'WARNING: Database connection error: '.$CFG->wwwroot, 
                  'Connection error: '.$CFG->wwwroot);