aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/db/dbal.php2
-rw-r--r--phpBB/includes/functions_install.php16
-rw-r--r--phpBB/includes/message_parser.php4
-rw-r--r--phpBB/install/database_update.php4
-rwxr-xr-xphpBB/install/install_install.php22
-rw-r--r--phpBB/install/schemas/schema_data.sql4
6 files changed, 34 insertions, 18 deletions
diff --git a/phpBB/includes/db/dbal.php b/phpBB/includes/db/dbal.php
index a68ce1e2a4..ed6ba71fea 100644
--- a/phpBB/includes/db/dbal.php
+++ b/phpBB/includes/db/dbal.php
@@ -787,6 +787,6 @@ class dbal
/**
* This variable holds the class name to use later
*/
-$sql_db = 'dbal_' . $dbms;
+$sql_db = (!empty($dbms)) ? 'dbal_' . basename($dbms) : 'dbal';
?> \ No newline at end of file
diff --git a/phpBB/includes/functions_install.php b/phpBB/includes/functions_install.php
index 3e4bd27bcc..f43ef7c5c7 100644
--- a/phpBB/includes/functions_install.php
+++ b/phpBB/includes/functions_install.php
@@ -250,37 +250,39 @@ function get_tables($db)
* @param array $dbms should be of the format of an element of the array returned by {@link get_available_dbms get_available_dbms()}
* necessary extensions should be loaded already
*/
-function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true)
+function connect_check_db($error_connect, &$error, $dbms_details, $table_prefix, $dbhost, $dbuser, $dbpasswd, $dbname, $dbport, $prefix_may_exist = false, $load_dbal = true, $unicode_check = true)
{
global $phpbb_root_path, $phpEx, $config, $lang;
+ $dbms = $dbms_details['DRIVER'];
+
if ($load_dbal)
{
// Include the DB layer
- include($phpbb_root_path . 'includes/db/' . $dbms['DRIVER'] . '.' . $phpEx);
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
}
// Instantiate it and set return on error true
- $sql_db = 'dbal_' . $dbms['DRIVER'];
+ $sql_db = 'dbal_' . $dbms;
$db = new $sql_db();
$db->sql_return_on_error(true);
// Check that we actually have a database name before going any further.....
- if ($dbms['DRIVER'] != 'sqlite' && $dbms['DRIVER'] != 'oracle' && $dbname === '')
+ if ($dbms_details['DRIVER'] != 'sqlite' && $dbms_details['DRIVER'] != 'oracle' && $dbname === '')
{
$error[] = $lang['INST_ERR_DB_NO_NAME'];
return false;
}
// Make sure we don't have a daft user who thinks having the SQLite database in the forum directory is a good idea
- if ($dbms['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
+ if ($dbms_details['DRIVER'] == 'sqlite' && stripos(phpbb_realpath($dbhost), phpbb_realpath('../')) === 0)
{
$error[] = $lang['INST_ERR_DB_FORUM_PATH'];
return false;
}
// Check the prefix length to ensure that index names are not too long and does not contain invalid characters
- switch ($dbms['DRIVER'])
+ switch ($dbms_details['DRIVER'])
{
case 'mysql':
case 'mysqli':
@@ -342,7 +344,7 @@ function connect_check_db($error_connect, &$error, $dbms, $table_prefix, $dbhost
}
// Make sure that the user has selected a sensible DBAL for the DBMS actually installed
- switch ($dbms['DRIVER'])
+ switch ($dbms_details['DRIVER'])
{
case 'mysqli':
if (version_compare(mysqli_get_server_info($db->db_connect_id), '4.1.3', '<'))
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index f7ae685e95..acc4547039 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -716,7 +716,7 @@ class bbcode_firstpass extends bbcode
if ($tok == ']')
{
- if ($buffer == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[')
+ if (strtolower($buffer) == '/quote' && sizeof($close_tags) && substr($out, -1, 1) == '[')
{
// we have found a closing tag
$out .= array_pop($close_tags) . ']';
@@ -814,7 +814,7 @@ class bbcode_firstpass extends bbcode
if ($tok == '[')
{
// Search the text for the next tok... if an ending quote comes first, then change tok to []
- $pos1 = strpos($in, '[/quote');
+ $pos1 = stripos($in, '[/quote');
// If the token ] comes first, we change it to ]
$pos2 = strpos($in, ']');
// If the token [ comes first, we change it to [
diff --git a/phpBB/install/database_update.php b/phpBB/install/database_update.php
index 24d8c80bd1..0145c2746a 100644
--- a/phpBB/install/database_update.php
+++ b/phpBB/install/database_update.php
@@ -8,7 +8,7 @@
*
*/
-$updates_to_version = '3.0.RC7';
+$updates_to_version = '3.0.RC8';
// Return if we "just include it" to find out for which version the database update is responsuble for
if (defined('IN_PHPBB') && defined('IN_INSTALL'))
@@ -1014,7 +1014,7 @@ if ($exit)
</div>
<div id="page-footer">
- Powered by phpBB &copy; 2000, 2002, 2005, 2007 <a href="http://www.phpbb.com/">phpBB Group</a>
+ Powered by <a href="http://www.phpbb.com/">phpBB</a> &copy; 2000, 2002, 2005, 2007 phpBB Group
</div>
</div>
diff --git a/phpBB/install/install_install.php b/phpBB/install/install_install.php
index 720eddebcd..3afdb66e1e 100755
--- a/phpBB/install/install_install.php
+++ b/phpBB/install/install_install.php
@@ -1111,11 +1111,18 @@ class install_install extends module
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
$available_dbms = get_available_dbms($data['dbms']);
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
// Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx);
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
// Instantiate the database
- $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER'];
$db = new $sql_db();
$db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false);
@@ -1388,11 +1395,18 @@ class install_install extends module
// If we get here and the extension isn't loaded it should be safe to just go ahead and load it
$available_dbms = get_available_dbms($data['dbms']);
+ if (!isset($available_dbms[$data['dbms']]))
+ {
+ // Someone's been silly and tried providing a non-existant dbms
+ $this->p_master->redirect("index.$phpEx?mode=install");
+ }
+
+ $dbms = $available_dbms[$data['dbms']]['DRIVER'];
+
// Load the appropriate database class if not already loaded
- include($phpbb_root_path . 'includes/db/' . $available_dbms[$data['dbms']]['DRIVER'] . '.' . $phpEx);
+ include($phpbb_root_path . 'includes/db/' . $dbms . '.' . $phpEx);
// Instantiate the database
- $sql_db = 'dbal_' . $available_dbms[$data['dbms']]['DRIVER'];
$db = new $sql_db();
$db->sql_connect($data['dbhost'], $data['dbuser'], $data['dbpasswd'], $data['dbname'], $data['dbport'], false, false);
diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql
index eb333b7e5a..51e87629fe 100644
--- a/phpBB/install/schemas/schema_data.sql
+++ b/phpBB/install/schemas/schema_data.sql
@@ -144,7 +144,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_guests
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_online_time', '5');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_onlinetrack', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_search', '1');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '1');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_tplcompile', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('load_user_activity', '1');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments', '3');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_attachments_pm', '1');
@@ -213,7 +213,7 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('topics_per_page',
INSERT INTO phpbb_config (config_name, config_value) VALUES ('tpl_allow_php', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_icons_path', 'images/upload_icons');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('upload_path', 'files');
-INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC7');
+INSERT INTO phpbb_config (config_name, config_value) VALUES ('version', '3.0.RC8');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_expire_days', '90');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('warnings_gc', '14400');