Skip to content

Commit

Permalink
MDL-20695 do not use trigger_error together with echo, it just duplic…
Browse files Browse the repository at this point in the history
…ates info when debugdisplay on
  • Loading branch information
skodak committed Oct 31, 2009
1 parent 10729aa commit f19b623
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 2 additions & 4 deletions enrol/enrol.class.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

/**
* enrolment_factory is used to "manufacture" an instance of required enrolment plugin.
Expand All @@ -15,10 +15,8 @@ function factory($enrol = '') {
$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");
}
}
}

?>
5 changes: 2 additions & 3 deletions enrol/ldap/enrol.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php // $Id$
<?php

require_once("$CFG->dirroot/enrol/enrol.class.php");

Expand Down Expand Up @@ -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 $!");
}

}
Expand Down Expand Up @@ -655,4 +655,3 @@ function check_legacy_config () {

} // end of class

?>

0 comments on commit f19b623

Please sign in to comment.