Implemented feature request #1919: TCAdefaults setting in page TS
authorWolfgang Klinger <wolfgang@stufenlos.net>
Fri, 6 Jul 2007 14:32:37 +0000 (14:32 +0000)
committerWolfgang Klinger <wolfgang@stufenlos.net>
Fri, 6 Jul 2007 14:32:37 +0000 (14:32 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2384 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_transferdata.php

index c46a55c..04bbda9 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-07-06  Wolfgang Klinger <wk@plan2.net>
+
+       * Implemented feature request #1919: TCAdefaults setting in page TS
+
 2007-07-06  Michael Stucki  <michael@typo3.org>
 
        * Fix in indexed search: List of indexed pages could be broken if mutli-byte chars are cut in the middle (patch by Karsten Dambekalns)
index b87015c..18cdca7 100755 (executable)
@@ -164,6 +164,18 @@ class t3lib_transferData {
                                                        }
                                                }
 
+                                               $pageTS = t3lib_beFunc::getPagesTSconfig($id, true);
+                                               if (isset($pageTS['TCAdefaults.'])) {
+                                                       $TCAPageTSOverride  = $pageTS['TCAdefaults.'];
+                                                       if (is_array($TCAPageTSOverride[$table.'.']))   {
+                                                               foreach($TCAPageTSOverride[$table.'.'] as $theF => $theV)       {
+                                                                       if (isset($TCA[$table]['columns'][$theF]))      {
+                                                                               $newRow[$theF]=$theV;
+                                                                       }
+                                                               }
+                                                       }
+                                               }
+
                                                        // Default values as submitted:
                                                if (is_array($this->defVals[$table]))   {
                                                        foreach($this->defVals[$table] as $theF => $theV)       {
@@ -1018,4 +1030,4 @@ class t3lib_transferData {
 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_transferdata.php'])     {
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_transferdata.php']);
 }
-?>
\ No newline at end of file
+?>