aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/cache
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/cache')
-rw-r--r--phpBB/includes/cache/driver/file.php2
-rw-r--r--phpBB/includes/cache/driver/interface.php2
-rw-r--r--phpBB/includes/cache/driver/memory.php2
-rw-r--r--phpBB/includes/cache/driver/null.php2
-rw-r--r--phpBB/includes/cache/service.php40
5 files changed, 44 insertions, 4 deletions
diff --git a/phpBB/includes/cache/driver/file.php b/phpBB/includes/cache/driver/file.php
index f64a9e3ea8..ced45b29ea 100644
--- a/phpBB/includes/cache/driver/file.php
+++ b/phpBB/includes/cache/driver/file.php
@@ -364,7 +364,7 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
/**
* Save sql query
*/
- function sql_save($query, $query_result, $ttl)
+ function sql_save($query, &$query_result, $ttl)
{
global $db;
diff --git a/phpBB/includes/cache/driver/interface.php b/phpBB/includes/cache/driver/interface.php
index 847ba97262..313a2d4b31 100644
--- a/phpBB/includes/cache/driver/interface.php
+++ b/phpBB/includes/cache/driver/interface.php
@@ -75,7 +75,7 @@ interface phpbb_cache_driver_interface
/**
* Save sql query
*/
- public function sql_save($query, $query_result, $ttl);
+ public function sql_save($query, &$query_result, $ttl);
/**
* Ceck if a given sql query exist in cache
diff --git a/phpBB/includes/cache/driver/memory.php b/phpBB/includes/cache/driver/memory.php
index e0771ab1d3..6142b6f65d 100644
--- a/phpBB/includes/cache/driver/memory.php
+++ b/phpBB/includes/cache/driver/memory.php
@@ -280,7 +280,7 @@ abstract class phpbb_cache_driver_memory extends phpbb_cache_driver_base
/**
* Save sql query
*/
- function sql_save($query, $query_result, $ttl)
+ function sql_save($query, &$query_result, $ttl)
{
global $db;
diff --git a/phpBB/includes/cache/driver/null.php b/phpBB/includes/cache/driver/null.php
index df2c6c026f..c143803d0e 100644
--- a/phpBB/includes/cache/driver/null.php
+++ b/phpBB/includes/cache/driver/null.php
@@ -107,7 +107,7 @@ class phpbb_cache_driver_null extends phpbb_cache_driver_base
/**
* Save sql query
*/
- function sql_save($query, $query_result, $ttl)
+ function sql_save($query, &$query_result, $ttl)
{
}
diff --git a/phpBB/includes/cache/service.php b/phpBB/includes/cache/service.php
index e63ec6e33a..7858e27a5c 100644
--- a/phpBB/includes/cache/service.php
+++ b/phpBB/includes/cache/service.php
@@ -58,6 +58,11 @@ class phpbb_cache_service
return call_user_func_array(array($this->driver, $method), $arguments);
}
+ public function __get($var)
+ {
+ return $this->driver->$var;
+ }
+
/**
* Obtain list of naughty words and build preg style replacement arrays for use by the
* calling script
@@ -408,4 +413,39 @@ class phpbb_cache_service
return $hook_files;
}
+
+ public function sql_load()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
+
+ public function sql_save($query, &$query_result, $ttl)
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), array($query, &$query_result, $ttl));
+ }
+
+ public function sql_exists()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
+
+ public function sql_fetchrow()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
+
+ public function sql_fetchfield()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
+
+ public function sql_rowseek()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
+
+ public function sql_freeresult()
+ {
+ return call_user_func_array(array($this->driver, __FUNCTION__), func_get_args());
+ }
}