Bug #29252 ยป bug_29252.diff
typo3_src-4.4.10.new/t3lib/class.t3lib_install.php 2011-09-13 11:55:18.481633400 +0200 | ||
---|---|---|
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('<?php $dummy = ' . $mainparts[1] . "\n ?>") 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;
|
||
... | ... | |
// 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('<?php $dummy = ' . $mainparts[1] . "\n ?>") 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;
|