diff options
| author | Andreas Fischer <bantu@phpbb.com> | 2010-07-11 01:44:59 +0200 |
|---|---|---|
| committer | Andreas Fischer <bantu@phpbb.com> | 2010-07-11 01:44:59 +0200 |
| commit | 2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f (patch) | |
| tree | 85a0cddad8158b1380b1a4f12b56eed1eb271574 /phpBB/includes/db/mssql.php | |
| parent | 08a34ebe948b4cc4b6f53572a65da23f55613181 (diff) | |
| parent | 9c61455d264d92194f66549d244ec68cdb3c9ead (diff) | |
| download | forums-2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f.tar forums-2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f.tar.gz forums-2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f.tar.bz2 forums-2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f.tar.xz forums-2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f.zip | |
Merge branch 'ticket/jellydoughnut/9637' into develop-olympus
* ticket/jellydoughnut/9637:
[ticket/9637] Do not cache SQL server version in all cases
Diffstat (limited to 'phpBB/includes/db/mssql.php')
| -rw-r--r-- | phpBB/includes/db/mssql.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 7134574691..6899a73902 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -65,13 +65,14 @@ class dbal_mssql extends dbal /** * Version information about used database * @param bool $raw if true, only return the fetched sql_server_version + * @param bool $use_cache If true, it is safe to retrieve the value from the cache * @return string sql server version */ - function sql_server_info($raw = false) + function sql_server_info($raw = false, $use_cache = true) { global $cache; - if (empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false) + if (!$use_cache || empty($cache) || ($this->sql_server_version = $cache->get('mssql_version')) === false) { $result_id = @mssql_query("SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')", $this->db_connect_id); @@ -84,7 +85,7 @@ class dbal_mssql extends dbal $this->sql_server_version = ($row) ? trim(implode(' ', $row)) : 0; - if (!empty($cache)) + if (!empty($cache) && $use_cache) { $cache->put('mssql_version', $this->sql_server_version); } |
