Fixed bug #9282: Allow subkeys for TypoScript "config." array
authorBenni Mack <benni.mack@typo3.org>
Mon, 8 Sep 2008 18:53:53 +0000 (18:53 +0000)
committerBenni Mack <benni.mack@typo3.org>
Mon, 8 Sep 2008 18:53:53 +0000 (18:53 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@4080 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/cms/tslib/class.tslib_fe.php

index 8c7a7ba..71f6118 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-09-08  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #9282: Allow subkeys for TypoScript "config." array
+
 2008-09-08  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Follow-up to issue #8996: htmlArea RTE: link to file not updated when changing case in file name
index fa01257..8551464 100755 (executable)
@@ -2022,18 +2022,17 @@ require_once (PATH_t3lib.'class.t3lib_lock.php');
                                                exit;
                                        }
                                } else {
-                                       $this->config['config']=Array();
+                                       $this->config['config'] = array();
 
-                                               // Filling the config-array.
-                                       if (is_array($this->tmpl->setup['config.']))    {
+                                       // Filling the config-array, first with the main "config." part
+                                       if (is_array($this->tmpl->setup['config.'])) {
                                                $this->config['config'] = $this->tmpl->setup['config.'];
                                        }
-                                       if (is_array($this->pSetup['config.'])) {
-                                               reset($this->pSetup['config.']);
-                                               while(list($theK,$theV)=each($this->pSetup['config.'])) {
-                                                       $this->config['config'][$theK] = $theV;
-                                               }
+                                       // override it with the page/type-specific "config."
+                                       if (is_array($this->pSetup['config.'])) {
+                                               $this->config['config'] = t3lib_div::array_merge_recursive_overrule($this->config['config'], $this->pSetup['config.']); 
                                        }
+
                                                // if .simulateStaticDocuments was not present, the default value will rule.
                                        if (!isset($this->config['config']['simulateStaticDocuments'])) {
                                                $this->config['config']['simulateStaticDocuments'] = trim($this->TYPO3_CONF_VARS['FE']['simulateStaticDocuments']);