Feature #22554 » 14260_v2.patch
t3lib/class.t3lib_install.php (working copy) | ||
---|---|---|
* @param array $line_array the localconf.php file exploded into an array by linebreaks. (see writeToLocalconf_control())
|
||
* @param string $variable The variable name to find and substitute. This string must match the first part of a trimmed line in the line-array. Matching is done backwards so the last appearing line will be substituted.
|
||
* @param string $value Is the value to be insert for the variable
|
||
* @param boolean $quoteValue Whether the given value should be quoted before being written
|
||
* @return void
|
||
* @see writeToLocalconf_control()
|
||
*/
|
||
function setValueInLocalconfFile(&$line_array, $variable, $value) {
|
||
public function setValueInLocalconfFile(&$line_array, $variable, $value, $quoteValue = TRUE) {
|
||
if (!$this->checkForBadString($value)) return 0;
|
||
// Initialize:
|
||
... | ... | |
$mainparts = explode($variable,$v,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]));
|
||
if ($quoteValue) {
|
||
$value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
|
||
}
|
||
$line_array[$k] = $mainparts[0] . $variable . ' = ' . $value . '; ' . ('//' . $comment . str_replace($comment, '', $subparts[1]));
|
||
$this->touchedLine = count($line_array)-$k-1;
|
||
$found = 1;
|
||
break;
|
||
... | ... | |
$mainparts = explode($varDoubleQuotes, $v, 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]));
|
||
if ($quoteValue) {
|
||
$value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
|
||
}
|
||
$line_array[$k] = $mainparts[0] . $variable . ' = ' . $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;
|
||
if ($quoteValue) {
|
||
$value = '\'' . $this->slashValueForSingleDashes($value) . '\'';
|
||
}
|
||
$line_array[] = $variable . ' = ' . $value . '; // ' . $comment;
|
||
$this->touchedLine = -1;
|
||
}
|
||
if ($variable == '$typo_db_password') {
|
||
$this->messages[] = 'Updated ' . $variable;
|
||
} else {
|
||
$this->messages[] = $variable . " = '" . htmlspecialchars($value) . "'";
|
||
$this->messages[] = $variable . ' = ' . htmlspecialchars($value);
|
||
}
|
||
$this->setLocalconf = 1;
|
||
}
|
typo3/sysext/install/mod/class.tx_install.php (working copy) | ||
---|---|---|
@touch($enableInstallToolFile);
|
||
}
|
||
// Let DBAL decide whether to load itself
|
||
$dbalLoaderFile = $this->backPath . 'sysext/dbal/class.tx_dbal_autoloader.php';
|
||
if (@is_file($dbalLoaderFile)) {
|
||
include($dbalLoaderFile);
|
||
}
|
||
if($this->redirect_url) {
|
||
t3lib_utility_Http::redirect($this->redirect_url);
|
||
}
|
||
... | ... | |
*
|
||
* @return array List of available databases
|
||
*/
|
||
function getDatabaseList() {
|
||
public function getDatabaseList() {
|
||
$dbArr = array();
|
||
if ($result = $GLOBALS['TYPO3_DB']->sql_pconnect(TYPO3_db_host, TYPO3_db_username, TYPO3_db_password)) {
|
||
$dbArr = $GLOBALS['TYPO3_DB']->admin_get_dbs();
|
||
... | ... | |
* @param integer $keyLength Desired key length
|
||
* @return string The encryption key
|
||
*/
|
||
protected function createEncryptionKey($keyLength = 96) {
|
||
public function createEncryptionKey($keyLength = 96) {
|
||
$bytes = t3lib_div::generateRandomBytes($keyLength);
|
||
return substr(bin2hex($bytes), -96);
|
||
}
|
- « Previous
- 1
- 2
- Next »