1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/9637] Do not cache SQL server version in all cases

Because the existing cache is global, there is no way to differentiate between
each of two databases which may be two different DBAL objects pointing to
servers with wildly different versions of an RDBMS. phpBB only has this
situation in the UCF, thus only one file changed outside the DBAL. I have
added a second optional parameter, $use_cache to each of the implementations
of dbal::sql_server_info()

PHPBB3-9637
This commit is contained in:
Josh Woody
2010-06-06 08:42:27 -05:00
committed by Andreas Fischer
parent 355d4b8ff8
commit 9c61455d26
10 changed files with 52 additions and 25 deletions

View File

@@ -56,10 +56,18 @@ class dbal_oracle extends dbal
/**
* Version information about used database
* @param bool $raw if true, only return the fetched sql_server_version
* @param bool $use_cache forced to false for Oracle
* @return string sql server version
*/
function sql_server_info($raw = false)
function sql_server_info($raw = false, $use_cache = true)
{
/**
* force $use_cache false. I didn't research why the caching code below is commented out
* but I assume its because the Oracle extension provides a direct method to access it
* without a query.
*/
$use_cache = false;
/*
global $cache;