mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-18 17:28:56 +00:00
Merge remote-tracking branch 'EXreaction/ticket/10875' into develop
* EXreaction/ticket/10875: [ticket/10875] method_exists check is not required, interface declares them [ticket/10875] Changes to Cache Driver caused method_exists checks to fail
This commit is contained in:
commit
fbd75775ef
10 changed files with 19 additions and 20 deletions
|
@ -43,8 +43,7 @@ class phpbb_cron_task_core_tidy_cache extends phpbb_cron_task_base
|
|||
*/
|
||||
public function is_runnable()
|
||||
{
|
||||
global $cache;
|
||||
return method_exists($cache, 'tidy');
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -156,7 +156,7 @@ class dbal_firebird extends dbal
|
|||
}
|
||||
|
||||
$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)
|
||||
|
@ -269,7 +269,7 @@ class dbal_firebird extends dbal
|
|||
}
|
||||
}
|
||||
|
||||
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);
|
||||
|
|
|
@ -144,7 +144,7 @@ class dbal_mssql extends dbal
|
|||
$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)
|
||||
|
@ -159,7 +159,7 @@ class dbal_mssql extends dbal
|
|||
$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);
|
||||
|
|
|
@ -163,7 +163,7 @@ class dbal_mssql_odbc extends dbal
|
|||
}
|
||||
|
||||
$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)
|
||||
|
@ -178,7 +178,7 @@ class dbal_mssql_odbc extends dbal
|
|||
$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);
|
||||
|
|
|
@ -318,7 +318,7 @@ class dbal_mssqlnative extends dbal
|
|||
}
|
||||
|
||||
$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)
|
||||
|
@ -335,7 +335,7 @@ class dbal_mssqlnative extends dbal
|
|||
$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);
|
||||
|
|
|
@ -172,7 +172,7 @@ class dbal_mysql extends dbal
|
|||
$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)
|
||||
|
@ -187,7 +187,7 @@ class dbal_mysql extends dbal
|
|||
$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);
|
||||
|
|
|
@ -179,7 +179,7 @@ class dbal_mysqli extends dbal
|
|||
$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)
|
||||
|
@ -194,7 +194,7 @@ class dbal_mysqli extends dbal
|
|||
$this->sql_report('stop', $query);
|
||||
}
|
||||
|
||||
if ($cache_ttl && method_exists($cache, 'sql_save'))
|
||||
if ($cache_ttl)
|
||||
{
|
||||
$cache->sql_save($query, $this->query_result, $cache_ttl);
|
||||
}
|
||||
|
|
|
@ -242,7 +242,7 @@ class dbal_oracle extends dbal
|
|||
}
|
||||
|
||||
$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)
|
||||
|
@ -418,7 +418,7 @@ class dbal_oracle extends dbal
|
|||
$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);
|
||||
|
|
|
@ -200,7 +200,7 @@ class dbal_postgres extends dbal
|
|||
}
|
||||
|
||||
$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)
|
||||
|
@ -215,7 +215,7 @@ class dbal_postgres extends dbal
|
|||
$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);
|
||||
|
|
|
@ -117,7 +117,7 @@ class dbal_sqlite extends dbal
|
|||
$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)
|
||||
|
@ -132,7 +132,7 @@ class dbal_sqlite extends dbal
|
|||
$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);
|
||||
|
|
Loading…
Add table
Reference in a new issue