Fixed bug #11395: TCAdefaults in Page TSConfig without effect on creating new element...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_transferdata.php
index 17bcfff..3cbbf3a 100644 (file)
@@ -160,7 +160,16 @@ class t3lib_transferData {
                                                        }
                                                }
 
-                                               $pageTS = t3lib_beFunc::getPagesTSconfig($id, true);
+                                               if ($id < 0) {
+                                                       $record = t3lib_beFunc::getRecord ($table, abs($id), 'pid');
+                                                       $pid = $record['pid'];
+                                                       unset($record);
+                                               } else {
+                                                       $pid = intval($id);
+                                               }
+
+                                               $pageTS = t3lib_beFunc::getPagesTSconfig($pid);
+
                                                if (isset($pageTS['TCAdefaults.'])) {
                                                        $TCAPageTSOverride  = $pageTS['TCAdefaults.'];
                                                        if (is_array($TCAPageTSOverride[$table.'.']))   {