aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/cache/service.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/cache/service.php')
-rw-r--r--phpBB/includes/cache/service.php55
1 files changed, 22 insertions, 33 deletions
diff --git a/phpBB/includes/cache/service.php b/phpBB/includes/cache/service.php
index aa225ade69..37f32aa753 100644
--- a/phpBB/includes/cache/service.php
+++ b/phpBB/includes/cache/service.php
@@ -321,50 +321,39 @@ class phpbb_cache_service
/**
* Obtain cfg file data
*/
- function obtain_cfg_items($theme)
+ function obtain_cfg_items($style)
{
global $config, $phpbb_root_path;
- $parsed_items = array(
- 'theme' => array(),
- 'template' => array(),
- 'imageset' => array()
- );
+ $parsed_array = $this->driver->get('_cfg_' . $style['style_path']);
- foreach ($parsed_items as $key => $parsed_array)
+ if ($parsed_array === false)
{
- $parsed_array = $this->driver->get('_cfg_' . $key . '_' . $theme[$key . '_path']);
-
- if ($parsed_array === false)
- {
- $parsed_array = array();
- }
+ $parsed_array = array();
+ }
- $reparse = false;
- $filename = $phpbb_root_path . 'styles/' . $theme[$key . '_path'] . '/' . $key . '/' . $key . '.cfg';
+ $reparse = false;
+ $filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
- if (!file_exists($filename))
- {
- continue;
- }
+ if (!file_exists($filename))
+ {
+ continue;
+ }
- if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
- {
- $reparse = true;
- }
+ if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
+ {
+ $reparse = true;
+ }
- // Re-parse cfg file
- if ($reparse)
- {
- $parsed_array = parse_cfg_file($filename);
- $parsed_array['filetime'] = @filemtime($filename);
+ // Re-parse cfg file
+ if ($reparse)
+ {
+ $parsed_array = parse_cfg_file($filename);
+ $parsed_array['filetime'] = @filemtime($filename);
- $this->driver->put('_cfg_' . $key . '_' . $theme[$key . '_path'], $parsed_array);
- }
- $parsed_items[$key] = $parsed_array;
+ $this->driver->put('_cfg_' . $style['style_path'], $parsed_array);
}
-
- return $parsed_items;
+ return $parsed_array;
}
/**