Fixed bug #11716: Install Tool always sets TYPO3_CONF_VARS[FE][disableNoCacheParamete...
authorMichael Stucki <michael.stucki@typo3.org>
Tue, 18 Aug 2009 22:19:16 +0000 (22:19 +0000)
committerMichael Stucki <michael.stucki@typo3.org>
Tue, 18 Aug 2009 22:19:16 +0000 (22:19 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@5802 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/mod/class.tx_install.php

index 4cca675..d622966 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-08-19  Michael Stucki  <michael@typo3.org>
+
+       * Fixed bug #11716: Install Tool always sets TYPO3_CONF_VARS[FE][disableNoCacheParameter] upon save
+
 2009-08-14  Michael Stucki  <michael@typo3.org>
 
        * Fixed bug #8968: DBAL incompatible SQL in "impexp" extension (thanks to Marc Bastian Heinrichs)
index b85be38..b2de298 100755 (executable)
@@ -1374,6 +1374,14 @@ From sub-directory:
                                                                                $value = str_replace(chr(13),'',$value);        // Force Unix linebreaks in textareas
                                                                                $value = str_replace(chr(10),"'.chr(10).'",$value);     // Preserve linebreaks
                                                                        }
+                                                                       if (preg_match('/^boolean/i', $description)) {
+                                                                                       // When submitting settings in the Install Tool, values that default to "false" or "true" in config_default.php will be sent as "0" resp. "1". Therefore, reset the values to their boolean equivalent.
+                                                                               if ($GLOBALS['TYPO3_CONF_VARS'][$k][$vk] === false && $value === '0') {
+                                                                                       $value = false;
+                                                                               } elseif ($GLOBALS['TYPO3_CONF_VARS'][$k][$vk] === true && $value === '1') {
+                                                                                       $value = true;
+                                                                               }
+                                                                       }
 
                                                                        if ($doit && strcmp($GLOBALS['TYPO3_CONF_VARS'][$k][$vk],$value))       $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\''.$k.'\'][\''.$vk.'\']', $value);
                                                                }