Fixed bug #4022, #4060: TCAdefaults for MM-Fields did't work (patch by Bernhard...
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Fri, 2 May 2008 21:19:06 +0000 (21:19 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Fri, 2 May 2008 21:19:06 +0000 (21:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3639 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_loaddbgroup.php

index 741da4d..23a5eb4 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-05-02  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Fixed bug #4022, #4060: TCAdefaults for MM-Fields did't work (patch by Bernhard Kraft)
+
 2008-04-29  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #8272: Listview - warning icon goes to new line in iconblock (thanks to Steffen Kamper)
index 4cf5340..e2e500c 100755 (executable)
@@ -172,7 +172,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);