MDL-20695 do not use trigger_error together with echo, it just duplicates info when debugdisplay on

This commit is contained in:
Petr Skoda 2009-10-31 22:55:17 +00:00
parent 10729aaaf2
commit f19b623bd9
2 changed files with 4 additions and 7 deletions

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
/**
* enrolment_factory is used to "manufacture" an instance of required enrolment plugin.
@ -15,10 +15,8 @@ class enrolment_factory {
$class = "enrolment_plugin_$enrol";
return new $class;
} else {
trigger_error("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");
error_log("$CFG->dirroot/enrol/$enrol/enrol.php does not exist");
echo $OUTPUT->notification("Enrolment file $enrol/enrol.php does not exist");
}
}
}
?>

View File

@ -1,4 +1,4 @@
<?php // $Id$
<?php
require_once("$CFG->dirroot/enrol/enrol.class.php");
@ -431,7 +431,7 @@ function enrol_ldap_connect(){
$CFG->enrol_ldap_bind_pw );
if (!$bind) {
echo $OUTPUT->notification("Error in binding to LDAP server");
trigger_error("Error in binding to LDAP server $!");
error_log("Error in binding to LDAP server $!");
}
}
@ -655,4 +655,3 @@ function check_legacy_config () {
} // end of class
?>