mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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
This commit is contained in:
commit
bdbc57e49a
1 changed files with 3 additions and 8 deletions
11
phpBB/includes/cache/service.php
vendored
11
phpBB/includes/cache/service.php
vendored
|
@ -332,27 +332,22 @@ class phpbb_cache_service
|
||||||
$parsed_array = array();
|
$parsed_array = array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$reparse = false;
|
|
||||||
$filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
|
$filename = $phpbb_root_path . 'styles/' . $style['style_path'] . '/style.cfg';
|
||||||
|
|
||||||
if (!file_exists($filename))
|
if (!file_exists($filename))
|
||||||
{
|
{
|
||||||
continue;
|
return $parsed_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
|
if (!isset($parsed_array['filetime']) || (($config['load_tplcompile'] && @filemtime($filename) > $parsed_array['filetime'])))
|
||||||
{
|
{
|
||||||
$reparse = true;
|
// Re-parse cfg file
|
||||||
}
|
|
||||||
|
|
||||||
// Re-parse cfg file
|
|
||||||
if ($reparse)
|
|
||||||
{
|
|
||||||
$parsed_array = parse_cfg_file($filename);
|
$parsed_array = parse_cfg_file($filename);
|
||||||
$parsed_array['filetime'] = @filemtime($filename);
|
$parsed_array['filetime'] = @filemtime($filename);
|
||||||
|
|
||||||
$this->driver->put('_cfg_' . $style['style_path'], $parsed_array);
|
$this->driver->put('_cfg_' . $style['style_path'], $parsed_array);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $parsed_array;
|
return $parsed_array;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue