diff options
author | Nils Adermann <naderman@naderman.de> | 2012-04-21 12:31:43 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2012-04-21 12:31:43 +0200 |
commit | cdf7ff17974eb20f37b25998036a723ea783a381 (patch) | |
tree | cb6fe83f4907aa71f62564438b845be587082b63 /phpBB/install | |
parent | 29a6aec9ad312bb11e19295f0b8d44efbc86d933 (diff) | |
parent | 6293bbf09949335bb8101bcef8f043750d756dc9 (diff) | |
download | forums-cdf7ff17974eb20f37b25998036a723ea783a381.tar forums-cdf7ff17974eb20f37b25998036a723ea783a381.tar.gz forums-cdf7ff17974eb20f37b25998036a723ea783a381.tar.bz2 forums-cdf7ff17974eb20f37b25998036a723ea783a381.tar.xz forums-cdf7ff17974eb20f37b25998036a723ea783a381.zip |
Merge remote-tracking branch 'github-noxwizard/ticket/10492' into develop-olympus
* github-noxwizard/ticket/10492:
[ticket/10492] Fix line endings
[ticket/10492] Backporting functional tests
[ticket/10492] Separate config generation from the installer
Diffstat (limited to 'phpBB/install')
-rw-r--r-- | phpBB/install/install_install.php | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index 454c8b4df0..81dac9ecde 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -884,34 +884,8 @@ class install_install extends module @chmod($phpbb_root_path . 'cache/install_lock', 0777); - $load_extensions = implode(',', $load_extensions); - // Time to convert the data provided into a config file - $config_data = "<?php\n"; - $config_data .= "// phpBB 3.0.x auto-generated configuration file\n// Do not change anything in this file!\n"; - - $config_data_array = array( - 'dbms' => $available_dbms[$data['dbms']]['DRIVER'], - 'dbhost' => $data['dbhost'], - 'dbport' => $data['dbport'], - 'dbname' => $data['dbname'], - 'dbuser' => $data['dbuser'], - 'dbpasswd' => htmlspecialchars_decode($data['dbpasswd']), - 'table_prefix' => $data['table_prefix'], - 'acm_type' => 'file', - 'load_extensions' => $load_extensions, - ); - - foreach ($config_data_array as $key => $value) - { - $config_data .= "\${$key} = '" . str_replace("'", "\\'", str_replace('\\', '\\\\', $value)) . "';\n"; - } - unset($config_data_array); - - $config_data .= "\n@define('PHPBB_INSTALLED', true);\n"; - $config_data .= "// @define('DEBUG', true);\n"; - $config_data .= "// @define('DEBUG_EXTRA', true);\n"; - $config_data .= '?' . '>'; // Done this to prevent highlighting editors getting confused! + $config_data = phpbb_create_config_file_data($data, $available_dbms[$data['dbms']]['DRIVER'], $load_extensions); // Attempt to write out the config file directly. If it works, this is the easiest way to do it ... if ((file_exists($phpbb_root_path . 'config.' . $phpEx) && phpbb_is_writable($phpbb_root_path . 'config.' . $phpEx)) || phpbb_is_writable($phpbb_root_path)) |