Bugfix to mm-relation handling
authorIngmar Schlecht <ingmar.schlecht@typo3.org>
Tue, 23 Jan 2007 20:11:23 +0000 (20:11 +0000)
committerIngmar Schlecht <ingmar.schlecht@typo3.org>
Tue, 23 Jan 2007 20:11:23 +0000 (20:11 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@1929 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_loaddbgroup.php

index 6a58a2c..0484b63 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-01-23  Ingmar Schlecht  <ingmar@typo3.org>
+
+       * Bugfix to mm-relation handling: writeMM() tried to set the "tablenames" field even for simple two-table relationships which then failed
+
 2007-01-23  Michael Stucki  <michael@typo3.org>
 
        * Slightly changed the check for IE browsers in t3lib_div::clientInfo()
index 8a6d94e..1d272b9 100755 (executable)
@@ -405,7 +405,9 @@ class t3lib_loadDBGroup     {
                                        $insertFields[$uidLocal_field] = $uid;
                                        $insertFields[$uidForeign_field] = $val['id'];
                                        $insertFields[$sorting_field] = $c;
-                                       $insertFields['tablenames'] = $tablename;
+                                       if($tablename)  {
+                                               $insertFields['tablenames'] = $tablename;
+                                       }
 
                                        $GLOBALS['TYPO3_DB']->exec_INSERTquery($tableName, $insertFields);
                                }