New xmldb_debug($message, $object) added. It's the official hook

provided by XMLDB's debug() function. MDL-7261
This commit is contained in:
stronk7
2006-10-28 15:20:14 +00:00
parent 5bbe483102
commit 62d4e774a3
+15
View File
@@ -1517,5 +1517,20 @@ function category_parent_visible($parent = 0) {
return $v;
}
/**
* This function is the official hook inside XMLDB stuff to delegate its debug to one
* external function.
*
* Any script can avoid calls to this function by defining XMLDB_SKIP_DEBUG_HOOK before
* using XMLDB classes. Obviously, also, if this function doesn't exist, it isn't invoked ;-)
*
* @param $message string contains the error message
* @param $object object XMLDB object that fired the debug
*/
function xmldb_debug($message, $object) {
error_log($message);
}
// vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
?>