1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-06 16:56:44 +02:00

[ticket/11015] Fixup some things from the big merge

PHPBB3-11015
This commit is contained in:
Igor Wiedler
2012-11-12 11:10:25 +01:00
parent bf641a7f31
commit 0fd3bb170b
18 changed files with 87 additions and 1178 deletions

View File

@@ -137,12 +137,12 @@ class phpbb_db_driver_mssql 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->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)
@@ -152,7 +152,7 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
$this->sql_error($query);
}
if (defined('DEBUG_EXTRA'))
if (defined('DEBUG'))
{
$this->sql_report('stop', $query);
}
@@ -160,14 +160,14 @@ class phpbb_db_driver_mssql extends phpbb_db_driver
if ($cache_ttl && method_exists($cache, 'sql_save'))
{
$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);
}
@@ -232,7 +232,7 @@ class phpbb_db_driver_mssql 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);
}
@@ -269,7 +269,7 @@ class phpbb_db_driver_mssql 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_rowseek($rownum, $query_id);
}
@@ -308,7 +308,7 @@ class phpbb_db_driver_mssql 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);
}