From 61d5adce1e7861790ad1b77b97d40cbcc5f244dc Mon Sep 17 00:00:00 2001 From: mjollnir_ Date: Tue, 23 Nov 2004 04:31:47 +0000 Subject: [PATCH] Backported Martin D's patch to get rid of adodb debug if feedback off in execute_sql to help with trying to fix up the bad constraint in quiz module for postgres --- lib/datalib.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/datalib.php b/lib/datalib.php index 5c1524f053f..d5740f4faea 100644 --- a/lib/datalib.php +++ b/lib/datalib.php @@ -21,8 +21,16 @@ function execute_sql($command, $feedback=true) { global $db; + $olddebug = $db->debug; + + if (!$feedback) { + $db->debug = false; + } + $result = $db->Execute("$command"); + $db->debug = $olddebug; + if ($result) { if ($feedback) { echo "

".get_string("success")."

";