aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorAndreas Fischer <bantu@phpbb.com>2012-07-30 23:06:16 +0200
committerAndreas Fischer <bantu@phpbb.com>2012-07-30 23:06:16 +0200
commitfbd75775efbf1f9d98b29835d1ef97b8cf4d55d4 (patch)
tree80a50ce71dac56c6c55a1f489ec6a9492ef03f15 /phpBB/includes
parent17681c0770e3a3fb7a4b0ef74e4038c6de787119 (diff)
parentedcac438df164764c84ca9fb7a7f751bf76d5c34 (diff)
downloadforums-fbd75775efbf1f9d98b29835d1ef97b8cf4d55d4.tar
forums-fbd75775efbf1f9d98b29835d1ef97b8cf4d55d4.tar.gz
forums-fbd75775efbf1f9d98b29835d1ef97b8cf4d55d4.tar.bz2
forums-fbd75775efbf1f9d98b29835d1ef97b8cf4d55d4.tar.xz
forums-fbd75775efbf1f9d98b29835d1ef97b8cf4d55d4.zip
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
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/cron/task/core/tidy_cache.php3
-rw-r--r--phpBB/includes/db/firebird.php4
-rw-r--r--phpBB/includes/db/mssql.php4
-rw-r--r--phpBB/includes/db/mssql_odbc.php4
-rw-r--r--phpBB/includes/db/mssqlnative.php4
-rw-r--r--phpBB/includes/db/mysql.php4
-rw-r--r--phpBB/includes/db/mysqli.php4
-rw-r--r--phpBB/includes/db/oracle.php4
-rw-r--r--phpBB/includes/db/postgres.php4
-rw-r--r--phpBB/includes/db/sqlite.php4
10 files changed, 19 insertions, 20 deletions
diff --git a/phpBB/includes/cron/task/core/tidy_cache.php b/phpBB/includes/cron/task/core/tidy_cache.php
index c9dc0bd9ae..f6cf77d01d 100644
--- a/phpBB/includes/cron/task/core/tidy_cache.php
+++ b/phpBB/includes/cron/task/core/tidy_cache.php
@@ -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;
}
/**
diff --git a/phpBB/includes/db/firebird.php b/phpBB/includes/db/firebird.php
index 7709e8fdf5..06c76fa94a 100644
--- a/phpBB/includes/db/firebird.php
+++ b/phpBB/includes/db/firebird.php
@@ -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);
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php
index fb044b492f..e40510835a 100644
--- a/phpBB/includes/db/mssql.php
+++ b/phpBB/includes/db/mssql.php
@@ -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);
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php
index 64fa9634d1..3c9a9599ec 100644
--- a/phpBB/includes/db/mssql_odbc.php
+++ b/phpBB/includes/db/mssql_odbc.php
@@ -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);
diff --git a/phpBB/includes/db/mssqlnative.php b/phpBB/includes/db/mssqlnative.php
index 1f37d54ecb..d35337d05b 100644
--- a/phpBB/includes/db/mssqlnative.php
+++ b/phpBB/includes/db/mssqlnative.php
@@ -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);
diff --git a/phpBB/includes/db/mysql.php b/phpBB/includes/db/mysql.php
index 8d1f805870..dbab1ec0b8 100644
--- a/phpBB/includes/db/mysql.php
+++ b/phpBB/includes/db/mysql.php
@@ -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);
diff --git a/phpBB/includes/db/mysqli.php b/phpBB/includes/db/mysqli.php
index e07cd35e24..fc98de31fb 100644
--- a/phpBB/includes/db/mysqli.php
+++ b/phpBB/includes/db/mysqli.php
@@ -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);
}
diff --git a/phpBB/includes/db/oracle.php b/phpBB/includes/db/oracle.php
index 2e801532f0..4954f4d398 100644
--- a/phpBB/includes/db/oracle.php
+++ b/phpBB/includes/db/oracle.php
@@ -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);
diff --git a/phpBB/includes/db/postgres.php b/phpBB/includes/db/postgres.php
index bf22cffafa..41838d2613 100644
--- a/phpBB/includes/db/postgres.php
+++ b/phpBB/includes/db/postgres.php
@@ -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);
diff --git a/phpBB/includes/db/sqlite.php b/phpBB/includes/db/sqlite.php
index 86bfa75a13..d930567773 100644
--- a/phpBB/includes/db/sqlite.php
+++ b/phpBB/includes/db/sqlite.php
@@ -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);