]> git.mjollnir.org Git - moodle.git/commitdiff
table suggested PHP is using $dbman now. MDL-14941
authorstronk7 <stronk7>
Fri, 23 May 2008 22:34:53 +0000 (22:34 +0000)
committerstronk7 <stronk7>
Fri, 23 May 2008 22:34:53 +0000 (22:34 +0000)
admin/xmldb/actions/view_structure_php/view_structure_php.class.php

index 3e5846c127c4b39adb242ccabddd8ded647167d2..feb47f82adc02c38f2e749499d9c9afaebba571d 100644 (file)
@@ -212,8 +212,8 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Conditionally launch create table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        if (!table_exists($table)) {' . XMLDB_LINEFEED;
-        $result .= '            $result = $result && create_table($table);' . XMLDB_LINEFEED;
+        $result .= '        if (!$dbman->table_exists($table)) {' . XMLDB_LINEFEED;
+        $result .= '            $result = $result && $dbman->create_table($table);' . XMLDB_LINEFEED;
         $result .= '        }' . XMLDB_LINEFEED;
 
     /// Add the proper upgrade_xxxx_savepoint call
@@ -255,8 +255,8 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Conditionally launch drop table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        if (table_exists($table)) {' . XMLDB_LINEFEED;
-        $result .= '            $result = $result && drop_table($table);' . XMLDB_LINEFEED;
+        $result .= '        if ($dbman->table_exists($table)) {' . XMLDB_LINEFEED;
+        $result .= '            $result = $result && $dbman->drop_table($table);' . XMLDB_LINEFEED;
         $result .= '        }' . XMLDB_LINEFEED;
 
     /// Add the proper upgrade_xxxx_savepoint call
@@ -298,7 +298,7 @@ class view_structure_php extends XMLDBAction {
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;
         $result .= '    /// Launch rename table for ' . $table->getName() . XMLDB_LINEFEED;
-        $result .= '        $result = $result && rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
+        $result .= '        $result = $result && $dbman->rename_table($table, ' . "'NEWNAMEGOESHERE'" . ');' . XMLDB_LINEFEED;
 
     /// Add the proper upgrade_xxxx_savepoint call
         $result .= $this->upgrade_savepoint_php ($structure);