diff options
author | Andreas Fischer <bantu@phpbb.com> | 2012-08-06 22:47:23 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@phpbb.com> | 2012-08-06 22:47:23 +0200 |
commit | bdbc57e49ad4675c6f1a661db4ee10423ce2caa8 (patch) | |
tree | f58edb86c8a9d4fbb2078035428667983e1b44ba | |
parent | fa06b779ad7c80d76274ee080db494e9d767ae26 (diff) | |
parent | 1b126908c633fa793cf7f3fba1e88139bb599938 (diff) | |
download | forums-bdbc57e49ad4675c6f1a661db4ee10423ce2caa8.tar forums-bdbc57e49ad4675c6f1a661db4ee10423ce2caa8.tar.gz forums-bdbc57e49ad4675c6f1a661db4ee10423ce2caa8.tar.bz2 forums-bdbc57e49ad4675c6f1a661db4ee10423ce2caa8.tar.xz forums-bdbc57e49ad4675c6f1a661db4ee10423ce2caa8.zip |
Merge remote-tracking branch 'EXreaction/ticket/11029' into develop
* EXreaction/ticket/11029:
[ticket/11029] Remove $reparse variable
[ticket/11029] Return $parsed_array (may have loaded from the cache)
[ticket/11029] Cache obtain_cfg_items should return empty array on failure
-rw-r--r-- | phpBB/includes/cache/service.php | 11 |
1 files changed, 3 insertions, 8 deletions
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; } |