]> git.mjollnir.org Git - moodle.git/commitdiff
Adding options for continue and feedback to all the DDL functions.
authorstronk7 <stronk7>
Sun, 10 Sep 2006 18:36:50 +0000 (18:36 +0000)
committerstronk7 <stronk7>
Sun, 10 Sep 2006 18:36:50 +0000 (18:36 +0000)
lib/ddllib.php

index 249ca42469b1604ebbcca0b72ed6c191e659cd76..a94250b562c266b5cae4d293e933e51221597ba2 100644 (file)
@@ -280,9 +280,11 @@ function install_from_xmldb_file($file) {
  * fields/keys/indexes/sequences, everything based in the XMLDB object
  *
  * @param XMLDBtable table object containing all the table info
+ * @param boolean continue to specify if must continue on error (true) or stop (false)
+ * @param boolean feedback to specify to show status info (true) or not (false)
  * @return boolean true on success, false on error
  */
-function create_table($table) {
+function create_table($table, $continue=true, $feedback=true) {
 
     global $CFG, $db;
 
@@ -296,7 +298,7 @@ function create_table($table) {
         return false;
     }
 
-    return execute_sql_arr($sqlarr);
+    return execute_sql_arr($sqlarr, $continue, $feedback);
 }
 
 /**
@@ -305,9 +307,11 @@ function create_table($table) {
  * will be dropped too.
  *
  * @param XMLDBtable table object containing the basic table info
+ * @param boolean continue to specify if must continue on error (true) or stop (false)
+ * @param boolean feedback to specify to show status info (true) or not (false)
  * @return boolean true on success, false on error
  */
-function drop_table($table) {
+function drop_table($table, $continue=true, $feedback=true) {
 
     global $CFG, $db;
 
@@ -321,7 +325,7 @@ function drop_table($table) {
         return false;
     }
 
-    return execute_sql_arr($sqlarr);
+    return execute_sql_arr($sqlarr, $continue, $feedback);
 }
 
 ?>