#12514: Installtool duplicates values of fields with defaultTypoScript_constants
authorSteffen Kamper <info@sk-typo3.de>
Mon, 5 Jul 2010 19:51:45 +0000 (19:51 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 5 Jul 2010 19:51:45 +0000 (19:51 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8103 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_db.php
typo3/sysext/install/Resources/Private/Templates/GenerateConfigForm.html
typo3/sysext/install/mod/class.tx_install.php

index f732e41..0e17be5 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,7 @@
 
 2010-07-05  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #12514: Installtool duplicates values of fields with defaultTypoScript_constants
        * Fixed bug #10958: Broken i18n_parent relation upon localizing records in workspace (Thanks to Tolleiv Nietsch)
        * Fixed bug #14907: Help Modules can not be disabled on a per user basis (Thanks to Georg Ringer)
        * Fixed bug #14957: Styling of record history (Thanks to Georg Ringer)
index e2eb6d0..df1147d 100644 (file)
@@ -1114,7 +1114,7 @@ class t3lib_DB {
                                4
                        );
                } else {
-                       $setDBinit = t3lib_div::trimExplode(LF, $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit'], TRUE);
+                       $setDBinit = t3lib_div::trimExplode(LF, str_replace("' . LF . '", LF, $GLOBALS['TYPO3_CONF_VARS']['SYS']['setDBinit']), TRUE);
                        foreach ($setDBinit as $v) {
                                if (mysql_query($v, $this->link) === FALSE) {
                                        t3lib_div::sysLog('Could not initialize DB connection with query "' . $v .
index a35616f..2abaf4d 100644 (file)
@@ -17,7 +17,7 @@
                                </li>
                                <!-- ###TEXTAREA### begin -->
                                <li class="t3-install-form-label-above">
-                                       <label for="###ID###" class="t3-install-strong">###KEY### = ###LABEL###</label>
+                                       <label for="###ID###" class="t3-install-strong" title="###VALUE###">###KEY### = ###LABEL###</label>
                                        <textarea id="###ID###" rows="5" cols="60" name="###NAME###">###VALUE###</textarea>
                                </li>
                                <!-- ###TEXTAREA### end -->
index 84eac1d..2690401 100755 (executable)
@@ -1973,8 +1973,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                $textAreaMarkers = array(
                                                                        'id' => $k . '-' . $vk,
                                                                        'name' => 'TYPO3_INSTALL[extConfig]['.$k.']['.$vk.']',
-                                                                       'value' => $value
+                                                                       'value' => str_replace(array("'.chr(10).'", "' . LF . '"), array(LF, LF), $value)
                                                                );
+                                                               $value = str_replace(array("'.chr(10).'", "' . LF . '"), array(' | ', ' | '), $value);
                                                                        // Fill the markers in the subpart
                                                                $textAreaSubpart = t3lib_parsehtml::substituteMarkerArray(
                                                                        $textAreaSubpart,
@@ -2082,9 +2083,9 @@ REMOTE_ADDR was '".t3lib_div::getIndpEnv('REMOTE_ADDR')."' (".t3lib_div::getIndp
                                                                        $description = trim($commentArr[1][$k][$vk]);
                                                                        if (preg_match('/^string \(textarea\)/i', $description)) {
                                                                                        // Force Unix linebreaks in textareas
-                                                                               $value = str_replace(chr(13),'',$value);
+                                                                               $value = str_replace(chr(13), '', $value);
                                                                                        // Preserve linebreaks
-                                                                               $value = str_replace(chr(10),"'.chr(10).'",$value);
+                                                                               $value = str_replace(LF, "' . LF . '", $value);
                                                                        }
                                                                        if (preg_match('/^boolean/i', $description)) {
                                                                                        // When submitting settings in the Install Tool, values that default to "false" or "true"