mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 22:10:45 +02:00
Try and protect against people trying to select an inappropriate DBAL
git-svn-id: file:///svn/phpbb/trunk@6128 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -1671,6 +1671,26 @@ class install_install extends module
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Make sure that the user has selected a sensible DBAL for the DBMS actually installed
|
||||
switch ($dbms)
|
||||
{
|
||||
case 'mysql4':
|
||||
if (version_compare(mysql_get_server_info(), '4.0.0', '<'))
|
||||
{
|
||||
$error[] = $lang['INST_ERR_DB_NO_MYSQL4'];
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'mysqli':
|
||||
if (version_compare(mysqli_get_server_info(), '4.1.3', '<'))
|
||||
{
|
||||
$error[] = $lang['INST_ERR_DB_NO_MYSQLI'];
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
$db->sql_close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user