diff -ru typo3_src-4.4.10/t3lib/class.t3lib_install.php typo3_src-4.4.10.new/t3lib/class.t3lib_install.php --- typo3_src-4.4.10/t3lib/class.t3lib_install.php 2011-09-07 13:12:15.492098500 +0200 +++ typo3_src-4.4.10.new/t3lib/class.t3lib_install.php 2011-09-13 11:55:18.481633400 +0200 @@ -154,11 +154,19 @@ if (!strcmp(substr($v2,0,strlen($variable.' ')),$variable.' ')) { $mainparts = explode($variable,$v,2); if (count($mainparts)==2) { // should ALWAYS be.... - $subparts = explode('//',$mainparts[1],2); if ($quoteValue) { $value = '\'' . $this->slashValueForSingleDashes($value) . '\''; } - $line_array[$k] = $mainparts[0] . $variable . " = " . $value . "; " . ('//' . $comment . str_replace($comment, '', $subparts[1])); + $oldcomment = ''; + foreach (@token_get_all('") as $token) { + if (is_array($token) && $token[0] == T_COMMENT) { + $oldcomment = (substr($token[1], 0, 2) == '//') ? substr($token[1], 2, 999) : $token[1]; + $oldcomment = str_replace(array($comment, CR, LF, '?>'), '', $oldcomment); + $oldcomment = ' ' . trim($oldcomment); + break; + } + } + $line_array[$k] = $mainparts[0] . $variable . ' = ' . $value . '; //' . $comment . $oldcomment; $this->touchedLine = count($line_array)-$k-1; $found = 1; break; @@ -171,11 +179,19 @@ // double quotes are updated, too. $mainparts = explode($varDoubleQuotes, $v, 2); if (count($mainparts) == 2) { // should ALWAYS be.... - $subparts = explode('//', $mainparts[1], 2); if ($quoteValue) { $value = '\'' . $this->slashValueForSingleDashes($value) . '\''; } - $line_array[$k] = $mainparts[0] . $variable . " = " . $value . "; " . ('//' . $comment . str_replace($comment, '', $subparts[1])); + $oldcomment = ''; + foreach (@token_get_all('") as $token) { + if (is_array($token) && $token[0] == T_COMMENT) { + $oldcomment = (substr($token[1], 0, 2) == '//') ? substr($token[1], 2, 999) : $token[1]; + $oldcomment = str_replace(array($comment, CR, LF, '?>'), '', $oldcomment); + $oldcomment = ' ' . trim($oldcomment); + break; + } + } + $line_array[$k] = $mainparts[0] . $variable . ' = ' . $value . '; //' . $comment . $oldcomment; $this->touchedLine = count($line_array) - $k - 1; $found = 1; break;