mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
Merge branch 'develop' into feature/extension-manager
* develop: (93 commits) [ticket/10157] Add notification to update cpfs when installing a language. [ticket/10185] Always set board startdate on conversion [ticket/10419] Reword the language strings [ticket/9361] View correct error messages when editing account information [ticket/10457] Undefined variable $request, when print-viewing PMs [ticket/10452] Fix xHTML errors when print-viewing PMs [ticket/9066] Move regex into get_preg_expression function and add tests [ticket/10254] Add "phpBB Group" to "Modified by" in prosilver stylesheet.css [ticket/10254] Removing the subsilver2 NOTE, incompatible with phpBB.com. [ticket/10254] Removing the NOTE as it is incompatible with phpBB.com. [ticket/10254] Remove subsilver2 as default style on theme. [ticket/10254] Remove style names from themes and fix some informations on it. [ticket/7138] Allow simple header and footer for trigger_error() messages [ticket/9066] Disallow some database prefix to prevent same errors and problems [ticket/10365] Fix up S_POST_UNAPPROVED check, make it easier to read [ticket/10437] Do not display announcements that are waiting for approval [ticket/10087] Organize bans in acp_baninto optgroups [ticket/8616] Include old U_INBOX var for BC [ticket/10435] Remove global announcement from forums total topic count [ticket/10435] Readd local announcements to total topic count in viewforum ... Conflicts: phpBB/install/database_update.php
This commit is contained in:
@@ -546,6 +546,11 @@ class install_install extends module
|
||||
$error[] = $lang['INST_ERR_NO_DB'];
|
||||
$connect_test = false;
|
||||
}
|
||||
else if (!preg_match(get_preg_expression('table_prefix'), $data['table_prefix']))
|
||||
{
|
||||
$error[] = $lang['INST_ERR_DB_INVALID_PREFIX'];
|
||||
$connect_test = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$connect_test = connect_check_db(true, $error, $available_dbms[$data['dbms']], $data['table_prefix'], $data['dbhost'], $data['dbuser'], htmlspecialchars_decode($data['dbpasswd']), $data['dbname'], $data['dbport']);
|
||||
@@ -876,33 +881,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))
|
||||
@@ -1947,7 +1927,7 @@ class install_install extends module
|
||||
'dbname' => array('lang' => 'DB_NAME', 'type' => 'text:25:100', 'explain' => false),
|
||||
'dbuser' => array('lang' => 'DB_USERNAME', 'type' => 'text:25:100', 'explain' => false),
|
||||
'dbpasswd' => array('lang' => 'DB_PASSWORD', 'type' => 'password:25:100', 'explain' => false),
|
||||
'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => false),
|
||||
'table_prefix' => array('lang' => 'TABLE_PREFIX', 'type' => 'text:25:100', 'explain' => true),
|
||||
);
|
||||
var $admin_config_options = array(
|
||||
'legend1' => 'ADMIN_CONFIG',
|
||||
|
Reference in New Issue
Block a user