1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-14 12:44:06 +02:00

[feature/template-engine] Refactor $config dependency out of the filter

The template stream filter no longer depends on the $config global.
Instead it uses a 'allow_php' param that is passed via
stream_bucket_append's last argument.

Tests also adjusted.

PHPBB3-9726
This commit is contained in:
Igor Wiedler
2011-07-10 00:35:07 +02:00
parent ee0bba3ab6
commit ae53623230
8 changed files with 46 additions and 29 deletions

View File

@@ -376,7 +376,7 @@ class phpbb_template
$source_file = $this->_source_file_for_handle($handle);
$compile = new phpbb_template_compile();
$compile = new phpbb_template_compile($this->config['tpl_allow_php']);
$output_file = $this->_compiled_file_for_handle($handle);
if ($compile->compile_file_to_file($source_file, $output_file) !== false)