diff options
| author | Josh Woody <a_jelly_doughnut@phpbb.com> | 2010-06-06 08:42:27 -0500 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-07-11 01:41:38 +0200 |
| commit | 9c61455d264d92194f66549d244ec68cdb3c9ead (patch) | |
| tree | fb25f7003482ea9f0eb07eb934e5daafe5a3cdc7 /phpBB/includes/db/firebird.php | |
| parent | 355d4b8ff8d616ef8650240f936517ede03296b8 (diff) | |
| download | forums-9c61455d264d92194f66549d244ec68cdb3c9ead.tar forums-9c61455d264d92194f66549d244ec68cdb3c9ead.tar.gz forums-9c61455d264d92194f66549d244ec68cdb3c9ead.tar.bz2 forums-9c61455d264d92194f66549d244ec68cdb3c9ead.tar.xz forums-9c61455d264d92194f66549d244ec68cdb3c9ead.zip | |
[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
Diffstat (limited to 'phpBB/includes/db/firebird.php')
| -rw-r--r-- | phpBB/includes/db/firebird.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php index e554b0f2fb..6f60dd5dad 100644 --- a/phpBB/includes/db/firebird.php +++ b/phpBB/includes/db/firebird.php @@ -63,10 +63,19 @@ class dbal_firebird 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 Interbase * @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 there is no caching code + * but I assume its because the IB extension provides a direct method to access it + * without a query. + */ + + $use_cache = false; + if ($this->service_handle !== false && function_exists('ibase_server_info')) { return @ibase_server_info($this->service_handle, IBASE_SVC_SERVER_VERSION); |
