]> git.mjollnir.org Git - moodle.git/commitdiff
Moved debugging() to weblib.php since it's really about output
authormoodler <moodler>
Thu, 14 Sep 2006 04:25:17 +0000 (04:25 +0000)
committermoodler <moodler>
Thu, 14 Sep 2006 04:25:17 +0000 (04:25 +0000)
lib/moodlelib.php
lib/weblib.php

index 36df6cb72878ac4fe8115179bccfb534da669d56..5d4c947bad1c61fc9d6b3968c0d6ad8baa564b64 100644 (file)
@@ -6628,35 +6628,6 @@ function loadeditor($args) {
     return editorObject::loadeditor($args);
 }
 
-/**
- * Returns true if the current enviromental debuggin settings (user+site)
- * are equal to the specified level: E_NOTICE, E_ALL, E_STRICT etc
- * eg use like this:
- *
- * if (debugging()) { echo "some normal debug info" } 
- *
- * debugging("something really picky", E_STRICT);
- *
- * @param int $level the level at which this debugging statement should show
- * @param string $message a message to print if possible
- * @return bool
- */
-function debugging($message='', $level=E_NOTICE) {
-
-    global $CFG;
-
-    if (empty($CFG->debug)) {
-        return false;
-    }
-
-    if ($CFG->debug >= $level) {
-        if ($message) {
-            notify($message, 'notifytiny');
-        }
-        return true;
-    }
-    return false;
-}
 
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>
index 1bb544216ab5457d4f98226e9c4c62661bcd6a03..f3519c8d450493db173e21909393069619c04eb8 100644 (file)
@@ -5213,6 +5213,35 @@ function page_doc_link($text='', $iconpath='') {
     return $str;
 }
 
+/**
+ * Returns true if the current site debugging settings are equal 
+ * to the specified level: E_NOTICE, E_ALL, E_STRICT etc
+ * eg use like this:
+ *
+ * if (debugging()) { echo "some normal debug info" } 
+ *
+ * debugging("something really picky", E_STRICT);
+ *
+ * @param int $level the level at which this debugging statement should show
+ * @param string $message a message to print if possible
+ * @return bool
+ */
+function debugging($message='', $level=E_NOTICE) {
+
+    global $CFG;
+
+    if (empty($CFG->debug)) {
+        return false;
+    }
+
+    if ($CFG->debug >= $level) {
+        if ($message) {
+            notify($message, 'notifytiny');
+        }
+        return true;
+    }
+    return false;
+}
 
 // vim:autoindent:expandtab:shiftwidth=4:tabstop=4:tw=140:
 ?>