diff options
| author | Joas Schilling <nickvergessen@gmx.de> | 2012-07-18 11:07:32 +0200 | 
|---|---|---|
| committer | Joas Schilling <nickvergessen@gmx.de> | 2012-07-18 11:07:32 +0200 | 
| commit | f4136eacdc319b2029692a9c19a845a115b94129 (patch) | |
| tree | f610d14df9e80ee74e8b35e4e8b8183170555f02 /phpBB/includes/cache | |
| parent | 3637cd395e39c1fa5b7279222abe1da5d2abcd00 (diff) | |
| parent | b176b86f111a05338ed3c74026bcf19d42ec0ee3 (diff) | |
| download | forums-f4136eacdc319b2029692a9c19a845a115b94129.tar forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.gz forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.bz2 forums-f4136eacdc319b2029692a9c19a845a115b94129.tar.xz forums-f4136eacdc319b2029692a9c19a845a115b94129.zip  | |
Merge branch 'develop' of git://github.com/phpbb/phpbb3 into feature/new-tz-handling
Diffstat (limited to 'phpBB/includes/cache')
| -rw-r--r-- | phpBB/includes/cache/service.php | 55 | 
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;  	}  	/**  | 
