1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +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

@@ -17,7 +17,7 @@ class phpbb_template_subdir_includephp_from_subdir_test extends phpbb_template_t
// board root.
public function test_includephp_relative()
{
$GLOBALS['config']['tpl_allow_php'] = true;
$this->setup_engine(array('tpl_allow_php' => true));
$cache_file = $this->template->cachepath . 'includephp_relative.html.php';
@@ -25,7 +25,5 @@ class phpbb_template_subdir_includephp_from_subdir_test extends phpbb_template_t
$this->template->set_filenames(array('test' => 'includephp_relative.html'));
$this->assertEquals("Path is relative to board root.\ntesting included php", $this->display('test'), "Testing INCLUDEPHP");
$GLOBALS['config']['tpl_allow_php'] = false;
}
}