Fixed bug #12829: ALTER TABLE is not able to parse length restriction in index creation
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_loaddbgroup.php
old mode 100755 (executable)
new mode 100644 (file)
index 4cf5340..1ed2245
@@ -2,7 +2,7 @@
 /***************************************************************
 *  Copyright notice
 *
-*  (c) 1999-2008 Kasper Skaarhoj (kasperYYYY@typo3.com)
+*  (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
 *  All rights reserved
 *
 *  This script is part of the TYPO3 project. The TYPO3 project is
@@ -62,7 +62,6 @@
 
 
 
-require_once (PATH_t3lib.'class.t3lib_refindex.php');
 
 
 
@@ -172,7 +171,11 @@ class t3lib_loadDBGroup    {
 
                        // Now, populate the internal itemArray and tableArray arrays:
                if ($MMtable)   {       // If MM, then call this function to do that:
-                       $this->readMM($MMtable,$MMuid);
+                       if ($MMuid)     {
+                               $this->readMM($MMtable, $MMuid);
+                       } else  { // Revert to readList() for new records in order to load possible default values from $itemlist
+                               $this->readList($itemlist);
+                       }
                } elseif ($MMuid && $conf['foreign_field']) {
                                // If not MM but foreign_field, the read the records by the foreign_field
                        $this->readForeignField($MMuid, $conf);
@@ -827,4 +830,5 @@ class t3lib_loadDBGroup     {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_loaddbgroup.php'])      {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_loaddbgroup.php']);
 }
-?>
+
+?>
\ No newline at end of file