From 62d4e774a3db541f2a9355856c57d2b661fd9210 Mon Sep 17 00:00:00 2001 From: stronk7 Date: Sat, 28 Oct 2006 15:20:14 +0000 Subject: [PATCH] New xmldb_debug($message, $object) added. It's the official hook provided by XMLDB's debug() function. MDL-7261 --- lib/datalib.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lib/datalib.php b/lib/datalib.php index c8da862c0b..1f1a576a84 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -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: ?> -- 2.39.5