aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/install/install_install.php
diff options
context:
space:
mode:
authorPatrick Webster <noxwizard@phpbb.com>2012-04-20 23:50:49 -0500
committerPatrick Webster <noxwizard@phpbb.com>2012-04-20 23:50:49 -0500
commitde70b17b1dc19e19faa0d56395a1aba8868c9624 (patch)
tree1c1eaf132d0f4b2bb1d1f7983980e19be244a489 /phpBB/install/install_install.php
parent29a6aec9ad312bb11e19295f0b8d44efbc86d933 (diff)
downloadforums-de70b17b1dc19e19faa0d56395a1aba8868c9624.tar
forums-de70b17b1dc19e19faa0d56395a1aba8868c9624.tar.gz
forums-de70b17b1dc19e19faa0d56395a1aba8868c9624.tar.bz2
forums-de70b17b1dc19e19faa0d56395a1aba8868c9624.tar.xz
forums-de70b17b1dc19e19faa0d56395a1aba8868c9624.zip
[ticket/10492] Separate config generation from the installer
PHPBB3-10492
Diffstat (limited to 'phpBB/install/install_install.php')
-rw-r--r--phpBB/install/install_install.php28
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))