aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/db/mssql.php
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2010-07-11 01:54:03 +0200
committerAndreas Fischer <bantu@phpbb.com>2010-07-11 01:54:03 +0200
commiteeb65d2958fcccc1fd2ccfbf9e154b4e30052977 (patch)
tree3b4ca10805dca7b18e64634709f317256611ff49 /phpBB/includes/db/mssql.php
parenta2918fd98e61db0e7e9885fb546abc024c84d0fc (diff)
parent2d9aa45aefc4d4e4c76edd7763efc2cd97b0801f (diff)
downloadforums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar
forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.gz
forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.bz2
forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.tar.xz
forums-eeb65d2958fcccc1fd2ccfbf9e154b4e30052977.zip
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/9637] Do not cache SQL server version in all cases [ticket/9629] Allow style.php to retrieve its session ID from cookies [ticket/9678] Flash attachments are not displayed in subsilver2. [ticket/9677] Subsilver2 is missing the bbcode-helpline for inline-attachments. [ticket/9650] Do not allow banning the anonymous user by username Conflicts: phpBB/styles/subsilver2/template/attachment.html phpBB/styles/subsilver2/template/posting_buttons.html
Diffstat (limited to 'phpBB/includes/db/mssql.php')
-rw-r--r--phpBB/includes/db/mssql.php7
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);
}