]> git.mjollnir.org Git - moodle.git/commitdiff
UnitTestCaseUsingDatabase: fix bug with install_one_table_from_xmldb_file
authortjhunt <tjhunt>
Tue, 7 Apr 2009 05:19:20 +0000 (05:19 +0000)
committertjhunt <tjhunt>
Tue, 7 Apr 2009 05:19:20 +0000 (05:19 +0000)
The bug prevented you creating the first table from an install.xml file

lib/ddl/database_manager.php

index 94535623056783ea7fbbdb112ac8d8475ee622a2..b048f8d148b0b6db98ed94a3cc465eeef0a87756 100644 (file)
@@ -432,6 +432,8 @@ class database_manager {
         if (is_null($targettable)) {
             throw new ddl_exception('ddlunknowntable', null, 'The table ' . $tablename . ' is not defined in file ' . $file);
         }
+        $targettable->setNext(NULL);
+        $targettable->setPrevious(NULL);
 
         $tempstructure = new xmldb_structure('temp');
         $tempstructure->addTable($targettable);