]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug in PHP generation of indexes.
authorstronk7 <stronk7>
Wed, 27 Sep 2006 18:47:24 +0000 (18:47 +0000)
committerstronk7 <stronk7>
Wed, 27 Sep 2006 18:47:24 +0000 (18:47 +0000)
admin/xmldb/actions/view_table_php/view_table_php.class.php

index 66ef963733db6b2c7256b94d8ebf9372c3b8f54f..88c0abba343bd039ebd401b4cf2f0675883561ac 100644 (file)
@@ -768,7 +768,7 @@ class view_table_php extends XMLDBAction {
         $result .= '    /// Define index ' . $index->getName() . ' ('. ($index->getUnique() ? 'unique' : 'not unique') . ') to be added to ' . $table->getName() . XMLDB_LINEFEED;
         $result .= '        $table = new XMLDBTable(' . "'" . $table->getName() . "'" . ');' . XMLDB_LINEFEED;
         $result .= '        $index = new XMLDBIndex(' . "'" . $index->getName() . "'" . ');' . XMLDB_LINEFEED;
-        $result .= '        $key->setAttributes(' . $index->getPHP(true) . ');' . XMLDB_LINEFEED;
+        $result .= '        $index->setAttributes(' . $index->getPHP(true) . ');' . XMLDB_LINEFEED;
 
     /// Launch the proper DDL
         $result .= XMLDB_LINEFEED;