1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-13 20:44:43 +01:00

complete check for FB

git-svn-id: file:///svn/phpbb/trunk@6433 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
David M 2006-10-03 03:17:56 +00:00
parent 50dc65177f
commit c4d8c23357

View File

@ -1770,6 +1770,7 @@ class install_install extends module
break;
case 'firebird':
// check the version of FB, use some hackery if we can't get access to the server info
if ($db->service_handle !== false && function_exists('ibase_server_info'))
{
$val = @ibase_server_info($db->service_handle, IBASE_SVC_SERVER_VERSION);
@ -1779,6 +1780,32 @@ class install_install extends module
$error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
}
}
else
{
$sql = "SELECT *
FROM RDB$FUNCTIONS
WHERE RDB$SYSTEM_FLAG IS NULL
AND RDB$FUNCTION_NAME = 'CHAR_LENGTH'";
$result = $db->sql_query($sql);
// if its a UDF, its too old
if ($db->sql_fetchrow($result))
{
$error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
}
else
{
$sql = "SELECT FIRST 0 char_length('')
FROM RDB\$DATABASE";
$result2 = $db->sql_query($sql);
if (!$result2) // This can only fail if char_length is not defined
{
$error[] = $lang['INST_ERR_DB_NO_FIREBIRD'];
}
$db->sql_freeresult($result2);
}
$db->sql_freeresult($result);
}
break;
case 'oracle':