diff options
Diffstat (limited to 'phpBB/includes/db/mssqlnative.php')
| -rw-r--r-- | phpBB/includes/db/mssqlnative.php | 29 | 
1 files changed, 17 insertions, 12 deletions
| diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php index b91372ac61..4a969828e7 100644 --- a/phpBB/includes/db/mssqlnative.php +++ b/phpBB/includes/db/mssqlnative.php @@ -2,9 +2,8 @@  /**  *  * @package dbal -* @version $Id$  * @copyright (c) 2010 phpBB Group -* @license http://opensource.org/licenses/gpl-license.php GNU Public License +* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2  *  * This is the MS SQL Server Native database abstraction layer.  * PHP mssql native driver required. @@ -262,6 +261,14 @@ class dbal_mssqlnative extends dbal  	/**  	* {@inheritDoc}  	*/ +	public function sql_concatenate($expr1, $expr2) +	{ +		return $expr1 . ' + ' . $expr2; +	} + +	/** +	* {@inheritDoc} +	*/  	function sql_buffer_nested_transactions()  	{  		return true; @@ -306,13 +313,13 @@ class dbal_mssqlnative extends dbal  			global $cache;  			// EXPLAIN only in extra debug mode -			if (defined('DEBUG_EXTRA')) +			if (defined('DEBUG'))  			{  				$this->sql_report('start', $query);  			}  			$this->last_query_text = $query; -			$this->query_result = ($cache_ttl && method_exists($cache, 'sql_load')) ? $cache->sql_load($query) : false; +			$this->query_result = ($cache_ttl) ? $cache->sql_load($query) : false;  			$this->sql_add_num_queries($this->query_result);  			if ($this->query_result === false) @@ -324,22 +331,22 @@ class dbal_mssqlnative extends dbal  				// reset options for next query  				$this->query_options = array(); -				if (defined('DEBUG_EXTRA')) +				if (defined('DEBUG'))  				{  					$this->sql_report('stop', $query);  				} -				if ($cache_ttl && method_exists($cache, 'sql_save')) +				if ($cache_ttl)  				{  					$this->open_queries[(int) $this->query_result] = $this->query_result; -					$cache->sql_save($query, $this->query_result, $cache_ttl); +					$this->query_result = $cache->sql_save($query, $this->query_result, $cache_ttl);  				}  				else if (strpos($query, 'SELECT') === 0 && $this->query_result)  				{  					$this->open_queries[(int) $this->query_result] = $this->query_result;  				}  			} -			else if (defined('DEBUG_EXTRA')) +			else if (defined('DEBUG'))  			{  				$this->sql_report('fromcache', $query);  			} @@ -412,7 +419,7 @@ class dbal_mssqlnative extends dbal  			$query_id = $this->query_result;  		} -		if (isset($cache->sql_rowset[$query_id])) +		if ($cache->sql_exists($query_id))  		{  			return $cache->sql_fetchrow($query_id);  		} @@ -472,7 +479,7 @@ class dbal_mssqlnative extends dbal  			$query_id = $this->query_result;  		} -		if (isset($cache->sql_rowset[$query_id])) +		if ($cache->sql_exists($query_id))  		{  			return $cache->sql_freeresult($query_id);  		} @@ -648,5 +655,3 @@ class dbal_mssqlnative extends dbal  		$this->query_options = $options;  	}  } - -?> | 
