diff options
| author | Nils Adermann <naderman@naderman.de> | 2011-10-14 17:10:21 +0200 |
|---|---|---|
| committer | Nils Adermann <naderman@naderman.de> | 2011-10-14 17:23:31 +0200 |
| commit | a3928bf82d7fd6a1da074716c08c547afc961346 (patch) | |
| tree | 0ad5cd4b50869cf6d8100324cf2cc49751b98bac /phpBB/install | |
| parent | 0ffe494edd274647ba6694648dba070c63e55d89 (diff) | |
| download | forums-a3928bf82d7fd6a1da074716c08c547afc961346.tar forums-a3928bf82d7fd6a1da074716c08c547afc961346.tar.gz forums-a3928bf82d7fd6a1da074716c08c547afc961346.tar.bz2 forums-a3928bf82d7fd6a1da074716c08c547afc961346.tar.xz forums-a3928bf82d7fd6a1da074716c08c547afc961346.zip | |
[feature/functional-tests] Generate config correctly and install only once
PHPBB3-10414
Diffstat (limited to 'phpBB/install')
| -rw-r--r-- | phpBB/install/install_install.php | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php index f8c54678bf..439bebf27e 100644 --- a/phpBB/install/install_install.php +++ b/phpBB/install/install_install.php @@ -876,33 +876,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 = 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)) |
