diff options
Diffstat (limited to 'phpBB/includes/functions_install.php')
-rw-r--r-- | phpBB/includes/functions_install.php | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php index 28cc603bdb..8dacd25230 100644 --- a/phpBB/includes/functions_install.php +++ b/phpBB/includes/functions_install.php @@ -182,18 +182,6 @@ function dbms_select($default = '', $only_20x_options = false) } /** -* Get tables of a database -* -* @deprecated -*/ -function get_tables(&$db) -{ - $db_tools = new \phpbb\db\tools($db); - - return $db_tools->sql_list_tables(); -} - -/** * Used to test whether we are able to connect to the database the user has specified * and identify any problems (eg there are already tables with the names we want to use * @param array $dbms should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()} @@ -276,7 +264,9 @@ function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, $temp_prefix = strtolower($table_prefix); $table_ary = array($temp_prefix . 'attachments', $temp_prefix . 'config', $temp_prefix . 'sessions', $temp_prefix . 'topics', $temp_prefix . 'users'); - $tables = get_tables($db); + $db_tools_factory = new \phpbb\db\tools\factory(); + $db_tools = $db_tools_factory->get($db); + $tables = $db_tools->sql_list_tables(); $tables = array_map('strtolower', $tables); $table_intersect = array_intersect($tables, $table_ary); @@ -451,13 +441,17 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_cont $config_data .= "\n@define('PHPBB_INSTALLED', true);\n"; $config_data .= "// @define('PHPBB_DISPLAY_LOAD_TIME', true);\n"; - if ($debug) + if ($debug_test) + { + $config_data .= "@define('PHPBB_ENVIRONMENT', 'test');\n"; + } + else if ($debug) { - $config_data .= "@define('DEBUG', true);\n"; + $config_data .= "@define('PHPBB_ENVIRONMENT', 'development');\n"; } else { - $config_data .= "// @define('DEBUG', true);\n"; + $config_data .= "@define('PHPBB_ENVIRONMENT', 'production');\n"; } if ($debug_container) @@ -472,6 +466,7 @@ function phpbb_create_config_file_data($data, $dbms, $debug = false, $debug_cont if ($debug_test) { $config_data .= "@define('DEBUG_TEST', true);\n"; + $config_data .= "@define('DEBUG', true);\n"; // Mandatory for the functional tests, will be removed by PHPBB3-12623 } return $config_data; |