Fixed bug #11395: TCAdefaults in Page TSConfig without effect on creating new element...
authorOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 16:43:32 +0000 (16:43 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 29 Nov 2009 16:43:32 +0000 (16:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6588 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_transferdata.php

index 94d11b7..ba5d8b6 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,7 @@
        * Fixed bug #12766: CSS in "User Settings" broken (thanks to Georg Ringer)
        * Fixed bug #9766: Use correct memory limit definition in Install Tool (thanks to Steffen Mueller)
        * Fixed bug #12830: Wrong encoding of JSON data in t3lib_PageRenderer
+       * Fixed bug #11395: TCAdefaults in Page TSConfig without effect on creating new element after existing one (thanks to Tolleiv Nietsch)
 
 2009-11-26  Francois Suter  <francois@typo3.org>
 
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.'.']))   {