]> git.mjollnir.org Git - moodle.git/commitdiff
Decalre some globals so debugging works better
authormoodler <moodler>
Sat, 13 Mar 2004 16:04:52 +0000 (16:04 +0000)
committermoodler <moodler>
Sat, 13 Mar 2004 16:04:52 +0000 (16:04 +0000)
lib/datalib.php

index cf9a0441568118dc107912f231b03983c8d4b49f..215ca898d5cff132542dbb5c8415ecc32f757354 100644 (file)
@@ -256,7 +256,7 @@ function record_exists($table, $field1="", $value1="", $field2="", $value2="", $
 */
 function record_exists_sql($sql) {
 
-    global $db;
+    global $CFG, $db;
 
     if (!$rs = $db->Execute($sql)) {
         if (isset($CFG->debug) and $CFG->debug > 7) {
@@ -328,7 +328,7 @@ function count_records_select($table, $select="") {
 */
 function count_records_sql($sql) {
 
-    global $db;
+    global $CFG, $db;
 
     $rs = $db->Execute("$sql");
     if (!$rs) {
@@ -648,7 +648,7 @@ function get_records_select_menu($table, $select="", $sort="", $fields="*") {
 */
 function get_records_sql_menu($sql) {
 
-    global $db;
+    global $CFG, $db;
 
     if (!$rs = $db->Execute($sql)) {
         if (isset($CFG->debug) and $CFG->debug > 7) {