mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-03 15:27:42 +02:00
[feature/twig] Add a comment to tpl output if PHP used, but disabled
PHPBB3-11598
This commit is contained in:
@@ -28,13 +28,17 @@ class phpbb_template_twig_node_php extends Twig_Node
|
|||||||
{
|
{
|
||||||
$compiler->addDebugInfo($this);
|
$compiler->addDebugInfo($this);
|
||||||
|
|
||||||
$config = $this->environment->get_phpbb_config();
|
if (!$config['tpl_allow_php'])
|
||||||
|
|
||||||
if ($config['tpl_allow_php'])
|
|
||||||
{
|
{
|
||||||
$compiler
|
$compiler
|
||||||
->raw($this->getNode('text')->getAttribute('data'))
|
->write("// PHP Disabled\n")
|
||||||
;
|
;
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$compiler
|
||||||
|
->raw($this->getNode('text')->getAttribute('data'))
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user