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:
@@ -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(
|
||||
|
Reference in New Issue
Block a user