]> git.mjollnir.org Git - moodle.git/commitdiff
Added the feedback attribute to the execute_sql_arr() function.
authorstronk7 <stronk7>
Sun, 3 Sep 2006 17:56:34 +0000 (17:56 +0000)
committerstronk7 <stronk7>
Sun, 3 Sep 2006 17:56:34 +0000 (17:56 +0000)
lib/dmllib.php

index e647bd2331084640a7364213eaaab427152b2925..bdfa5b83677b90bd38eabe744935fb08f2d32fb8 100644 (file)
@@ -1355,9 +1355,10 @@ function column_type($table, $column) {
  *
  * @param array sqlarr array of sql statements to execute
  * @param boolean continue to specify if must continue on error (true) or stop (false
+ * @param boolean feedback to specify to show debug info (true) or not (false
  * @param boolean true if everything was ok, false if some error was found
  */
-function execute_sql_arr($sqlarr, $continue=true) {
+function execute_sql_arr($sqlarr, $continue=true, $feedback=true) {
 
     if (!is_array($sqlarr)) {
         return false;
@@ -1365,7 +1366,7 @@ function execute_sql_arr($sqlarr, $continue=true) {
 
     $status = true;
     foreach($sqlarr as $sql) {
-        if (!execute_sql($sql)) {
+        if (!execute_sql($sql, $feedback)) {
             $status = false;
             if (!$continue) {
                 break;