mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-08 17:56:52 +02:00
[ticket/11015] Fixup some things from the big merge
PHPBB3-11015
This commit is contained in:
@@ -216,7 +216,6 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
||||
$this->server = $sqlserver . (($port) ? $port_delimiter . $port : '');
|
||||
|
||||
//connect to database
|
||||
error_reporting(E_ALL);
|
||||
$this->db_connect_id = sqlsrv_connect($this->server, array(
|
||||
'Database' => $this->dbname,
|
||||
'UID' => $this->user,
|
||||
@@ -310,13 +309,13 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
||||
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)
|
||||
@@ -328,22 +327,22 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
||||
// 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);
|
||||
}
|
||||
@@ -416,7 +415,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
if ($cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_fetchrow($query_id);
|
||||
}
|
||||
@@ -476,7 +475,7 @@ class phpbb_db_driver_mssqlnative extends phpbb_db_driver
|
||||
$query_id = $this->query_result;
|
||||
}
|
||||
|
||||
if (isset($cache->sql_rowset[$query_id]))
|
||||
if ($cache->sql_exists($query_id))
|
||||
{
|
||||
return $cache->sql_freeresult($query_id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user