From 99b776a4e56a9144bddc153ea993a96588b1c73b Mon Sep 17 00:00:00 2001 From: Nathaniel Guse Date: Tue, 25 Jun 2013 14:59:41 -0500 Subject: [PATCH] [feature/twig] Add a comment to tpl output if PHP used, but disabled PHPBB3-11598 --- phpBB/includes/template/twig/node/php.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/template/twig/node/php.php b/phpBB/includes/template/twig/node/php.php index cf60ef33fc..83481b1d69 100644 --- a/phpBB/includes/template/twig/node/php.php +++ b/phpBB/includes/template/twig/node/php.php @@ -28,13 +28,17 @@ class phpbb_template_twig_node_php extends Twig_Node { $compiler->addDebugInfo($this); - $config = $this->environment->get_phpbb_config(); - - if ($config['tpl_allow_php']) + if (!$config['tpl_allow_php']) { $compiler - ->raw($this->getNode('text')->getAttribute('data')) + ->write("// PHP Disabled\n") ; + + return; } + + $compiler + ->raw($this->getNode('text')->getAttribute('data')) + ; } }