Fixed bug #12666: Copying Record with TCEMain process cmdmap throws sql errors (Thank...
authorSteffen Kamper <info@sk-typo3.de>
Sun, 22 Nov 2009 23:18:37 +0000 (23:18 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Sun, 22 Nov 2009 23:18:37 +0000 (23:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6490 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index fc97f77..a71ca83 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2009-11-22  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12666: Copying Record with TCEMain process cmdmap throws sql errors (Thanks to Tolleiv Nietsch)
        * Follow-up to bugfix #2314 - moving records doesn't move translations (Thanks to Tolleiv Nietsch)
        * Fixed bug #12680: final adjustments to MediaCE
        * Fixed bug #11468: $altUrl parameter has no effect in t3lib_BEfunc::viewOnClick() (Thanks to Fabrizio Branca)
index df92b59..b992415 100644 (file)
@@ -3385,7 +3385,9 @@ class t3lib_TCEmain       {
         */
        function copyL10nOverlayRecords($table, $uid, $destPid, $first=0, $overrideValues=array(), $excludeFields='') {
                        //there's no need to perform this for page-records
-               if ($table == 'pages') return;
+               if (!t3lib_BEfunc::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) {
+                       return;
+               }
                t3lib_div::loadTCA($table);
 
                $l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid);