1
0
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:
Graham Eames
2006-06-26 21:05:49 +00:00
parent c476382934
commit b451ced10e
2 changed files with 22 additions and 0 deletions

View File

@@ -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();
}