aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/cache
diff options
context:
space:
mode:
authorIgor Wiedler <igor@wiedler.ch>2012-08-25 17:00:40 +0200
committerIgor Wiedler <igor@wiedler.ch>2012-08-25 17:00:40 +0200
commitae85d43757463e743917f43ee3e014a8b1af85d6 (patch)
treee4c2b7188baadd74cbf968a4174cd5257ccdfb0e /phpBB/includes/cache
parentfd9fd71a88fad2b33d75722587dbfc0bd100ae50 (diff)
parentbfdba90a34ad95c7cb9e0bc187cb464c83f8ba59 (diff)
downloadforums-ae85d43757463e743917f43ee3e014a8b1af85d6.tar
forums-ae85d43757463e743917f43ee3e014a8b1af85d6.tar.gz
forums-ae85d43757463e743917f43ee3e014a8b1af85d6.tar.bz2
forums-ae85d43757463e743917f43ee3e014a8b1af85d6.tar.xz
forums-ae85d43757463e743917f43ee3e014a8b1af85d6.zip
Merge remote-tracking branch 'upstream/develop' into feature/dic
* upstream/develop: (259 commits) [prep-release-3.0.11] Bumping version number for 3.0.11 final. [feature/php-events] Fix doc of core.viewonline_overwrite_location [feature/php-events] Fix doc of core.user_set_default_group [feature/php-events] Fix doc of core.generate_smilies_after [feature/php-events] Fix doc of core.delete_user_after [feature/php-events] Fix doc of core.delete_user_before [feature/php-events] Fix doc of core.update_username [feature/php-events] Fix doc of core.memberlist_prepare_profile_data [feature/php-events] Fix doc and position of viewonline_overwrite_location [feature/php-events] Fix doc of core.viewtopic_get_post_data [feature/php-events] Fix doc of core.viewtopic_cache_guest_data [ticket/11061] Add the --dev flag to the composer instructions in README [ticket/11060] Make sure pyrus can install everything on travis [ticket/11059] Use https for the README logo [feature/php-events] Fix acp_manage_forums_update_data_before and is_new_forum [feature/php-events] Fix core.acp_manage_forums_update_data_after vars [ticket/11032] fix language of error displayed [ticket/11052] update search backend constructor everywhere [ticket/11052] pass parametes to search construct while posting [ticket/11054] Fixed $config var description ... Conflicts: phpBB/includes/cron/task/core/tidy_cache.php phpBB/includes/cron/task/core/tidy_search.php
Diffstat (limited to 'phpBB/includes/cache')
-rw-r--r--phpBB/includes/cache/driver/file.php4
-rw-r--r--phpBB/includes/cache/driver/interface.php2
-rw-r--r--phpBB/includes/cache/driver/memory.php4
-rw-r--r--phpBB/includes/cache/driver/null.php2
-rw-r--r--phpBB/includes/cache/service.php11
5 files changed, 11 insertions, 12 deletions
diff --git a/phpBB/includes/cache/driver/file.php b/phpBB/includes/cache/driver/file.php
index 0d3b06f621..f64a9e3ea8 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;
@@ -385,6 +385,8 @@ class phpbb_cache_driver_file extends phpbb_cache_driver_base
{
$query_result = $query_id;
}
+
+ return $query_id;
}
/**
diff --git a/phpBB/includes/cache/driver/interface.php b/phpBB/includes/cache/driver/interface.php
index 313a2d4b31..847ba97262 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 e25c9229a1..92971c6cb2 100644
--- a/phpBB/includes/cache/driver/memory.php
+++ b/phpBB/includes/cache/driver/memory.php
@@ -280,7 +280,7 @@ 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;
@@ -335,6 +335,8 @@ class phpbb_cache_driver_memory extends phpbb_cache_driver_base
$this->_write('sql_' . $hash, $this->sql_rowset[$query_id], $ttl);
$query_result = $query_id;
+
+ return $query_id;
}
/**
diff --git a/phpBB/includes/cache/driver/null.php b/phpBB/includes/cache/driver/null.php
index c143803d0e..df2c6c026f 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 37f32aa753..e63ec6e33a 100644
--- a/phpBB/includes/cache/service.php
+++ b/phpBB/includes/cache/service.php
@@ -332,27 +332,22 @@ class phpbb_cache_service
$parsed_array = array();
}
- $reparse = false;
$filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
if (!file_exists($filename))
{
- continue;
+ return $parsed_array;
}
if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
{
- $reparse = true;
- }
-
- // Re-parse cfg file
- if ($reparse)
- {
+ // Re-parse cfg file
$parsed_array = parse_cfg_file($filename);
$parsed_array['filetime'] = @filemtime($filename);
$this->driver->put('_cfg_' . $style['style_path'], $parsed_array);
}
+
return $parsed_array;
}