Bug #14775 » installtool-quotes_v2.patch
t3lib/class.t3lib_install.php 19 Jan 2006 12:21:18 -0000 | ||
---|---|---|
$stopAtToken = ($this->localconf_editPointToken && $inArray);
|
||
$comment = ' Modified or inserted by '.$this->updateIdentity.'.';
|
||
$variable2 = str_replace('"','\'',$variable); // replace double quotes by single quote
|
||
// Search for variable name:
|
||
if (!$this->localconf_addLinesOnly && !$tokenSet) {
|
||
$line_array = array_reverse($line_array);
|
||
foreach($line_array as $k => $v) {
|
||
$v2 = trim($v);
|
||
$v1 = str_replace('"','\'',$v); // replace double quotes by single quote for consistency
|
||
$v2 = trim($v1);
|
||
if ($stopAtToken && !strcmp($v2,$commentKey.$this->localconf_editPointToken)) break; // If stopAtToken and token found, break out of the loop..
|
||
if (!strcmp(substr($v2,0,strlen($variable.' ')),$variable.' ')) {
|
||
$mainparts = explode($variable,$v,2);
|
||
if (!strcmp(substr($v2,0,strlen($variable2.' ')),$variable2.' ')) {
|
||
$mainparts = explode($variable2,$v1,2);
|
||
if (count($mainparts)==2) { // should ALWAYS be....
|
||
$subparts = explode('//',$mainparts[1],2);
|
||
$line_array[$k] = $mainparts[0].$variable." = '".$this->slashValueForSingleDashes($value)."'; ".('//'.$comment.str_replace($comment,'',$subparts[1]));
|
||
$line_array[$k] = $mainparts[0].$variable2." = '".$this->slashValueForSingleDashes($value)."'; ".('//'.$comment.str_replace($comment,'',$subparts[1]));
|
||
$this->touchedLine = count($line_array)-$k-1;
|
||
$found = 1;
|
||
break;
|
||
... | ... | |
$line_array[] = $commentKey.$this->localconf_editPointToken;
|
||
$line_array[] = '';
|
||
}
|
||
$line_array[] = $variable." = '".$this->slashValueForSingleDashes($value)."'; // ".$comment;
|
||
$line_array[] = $variable2." = '".$this->slashValueForSingleDashes($value)."'; // ".$comment;
|
||
$this->touchedLine = -1;
|
||
}
|
||
$this->messages[] = $variable." = '".htmlspecialchars($value)."'";
|
||
$this->messages[] = $variable2." = '".htmlspecialchars($value)."'";
|
||
$this->setLocalconf = 1;
|
||
}
|
||
typo3/sysext/install/mod/class.tx_install.php 19 Jan 2006 12:21:21 -0000 | ||
---|---|---|
if (t3lib_div::_GP("installToolPassword_md5")) $value =md5($value);
|
||
} else $doit=0;
|
||
}
|
||
if ($doit && strcmp($GLOBALS["TYPO3_CONF_VARS"][$k][$vk],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["'.$k.'"]["'.$vk.'"]', $value);
|
||
if ($doit && strcmp($GLOBALS["TYPO3_CONF_VARS"][$k][$vk],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\''.$k.'\'][\''.$vk.'\']', $value);
|
||
}
|
||
}
|
||
}
|
||
... | ... | |
} else $this->messages[]= $errorMessages[] = "Database name '".$value."' was longer than 50 chars (...not saved)";
|
||
break;
|
||
case "disable_exec_function":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["BE"]["disable_exec_function"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["BE"]["disable_exec_function"]', $value?1:0);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["BE"]["disable_exec_function"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'BE\'][\'disable_exec_function\']', $value?1:0);
|
||
break;
|
||
case "sitename":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["sitename"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["SYS"]["sitename"]', $value);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["sitename"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'sitename\']', $value);
|
||
break;
|
||
case "encryptionKey":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["encryptionKey"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["SYS"]["encryptionKey"]', $value);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["encryptionKey"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'encryptionKey\']', $value);
|
||
case "compat_version":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["compat_version"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["SYS"]["compat_version"]', $value);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["SYS"]["compat_version"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'SYS\'][\'compat_version\']', $value);
|
||
break;
|
||
case "im_combine_filename":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"]["im_combine_filename"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["im_combine_filename"]', $value);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"]["im_combine_filename"],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'im_combine_filename\']', $value);
|
||
break;
|
||
case "gdlib":
|
||
case "gdlib_png":
|
||
case "im":
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"][$key],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["'.$key.'"]', $value?1:0);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"][$key],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\''.$key.'\']', $value?1:0);
|
||
break;
|
||
case "im_path":
|
||
list($value,$version) = explode("|",$value);
|
||
if (!ereg("[[:space:]]",$value,$reg) && strlen($value)<100) {
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"][$key],$value)) {
|
||
$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["'.$key.'"]', $value);
|
||
$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\''.$key.'\']', $value);
|
||
}
|
||
if(doubleval($version)>0 && doubleval($version)<4) { // Assume GraphicsMagick
|
||
$value_ext = 'gm';
|
||
... | ... | |
$value_ext = 1;
|
||
}
|
||
if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value_ext)) {
|
||
$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["im_version_5"]', $value_ext);
|
||
$this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\']', $value_ext);
|
||
}
|
||
// if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["im_version_5"]', $value);
|
||
// if (strcmp(strtolower($GLOBALS['TYPO3_CONF_VARS']['GFX']['im_version_5']),$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'im_version_5\']', $value);
|
||
} else $this->messages[]= $errorMessages[] = "Path '".$value."' contains spaces or is longer than 100 chars (...not saved)";
|
||
break;
|
||
case "im_path_lzw":
|
||
list($value) = explode("|",$value);
|
||
if (!ereg("[[:space:]]",$value) && strlen($value)<100) {
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"][$key],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["'.$key.'"]', $value);
|
||
if (strcmp($GLOBALS["TYPO3_CONF_VARS"]["GFX"][$key],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\''.$key.'\']', $value);
|
||
} else $this->messages[]= $errorMessages[] = "Path '".$value."' contains spaces or is longer than 100 chars (...not saved)";
|
||
break;
|
||
case 'TTFdpi':
|
||
if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS["GFX"]["TTFdpi"]', $value);
|
||
if (strcmp($GLOBALS['TYPO3_CONF_VARS']['GFX']['TTFdpi'],$value)) $this->setValueInLocalconfFile($lines, '$TYPO3_CONF_VARS[\'GFX\'][\'TTFdpi\']', $value);
|
||
break;
|
||
}
|
||
typo3/sysext/install/updates/class.tx_coreupdates_compatversion.php 19 Jan 2006 12:21:21 -0000 | ||
---|---|---|
$linesArr = $this->pObj->writeToLocalconf_control();
|
||
$version = $this->userInput['version']?$this->userInput['version']:TYPO3_version;
|
||
$this->pObj->setValueInLocalconfFile($linesArr, '$TYPO3_CONF_VARS["SYS"]["compat_version"]', $version);
|
||
$this->pObj->setValueInLocalconfFile($linesArr, '$TYPO3_CONF_VARS[\'SYS\'][\'compat_version\']', $version);
|
||
$this->pObj->writeToLocalconf_control($linesArr,0);
|
||
$customMessages .= '
|
||
The compatibility version has been set to '.$version.'.';
|
- « Previous
- 1
- 2
- Next »