1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16967] Remove support for INCLUDEPHP and PHP/ENDPHP in templates

PHPBB3-16967
This commit is contained in:
Marc Alexander
2022-02-21 21:24:25 +01:00
parent 8284dc2c10
commit d868dbe3aa
20 changed files with 36 additions and 441 deletions

View File

@@ -256,13 +256,6 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
. str_repeat("pass\n", 3) . "\n"
. str_repeat("pass\n", 2) . "\n"),
),
array(
'php.html',
array(),
array(),
array(),
'',
),
array(
'include.html',
array('VARIABLE' => 'value'),
@@ -644,24 +637,6 @@ class phpbb_template_template_test extends phpbb_template_template_test_case
$this->assertEquals(array('POSITION' => 'O3M2', 'ONE' => true, 'TWO' => 'two', 'THREE' => 3), $this->template->retrieve_block_vars('outer[2].middle[1]', array()), 'Retrieve all vars from a block in the template');
}
public function test_php()
{
global $phpbb_root_path;
$template_text = '<!-- PHP -->echo "test";<!-- ENDPHP -->';
$cache_dir = $phpbb_root_path . 'cache/';
$fp = fopen($cache_dir . 'php.html', 'w');
fputs($fp, $template_text);
fclose($fp);
$this->setup_engine(array('tpl_allow_php' => true));
$this->template->set_custom_style('tests', $cache_dir);
$this->run_template('php.html', array(), array(), array(), 'test');
}
public function alter_block_array_data()
{
return array(