aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/twig/node/php.php
diff options
context:
space:
mode:
authorNathaniel Guse <nathaniel.guse@gmail.com>2013-06-25 14:59:41 -0500
committerNathaniel Guse <nathaniel.guse@gmail.com>2013-06-25 14:59:41 -0500
commit99b776a4e56a9144bddc153ea993a96588b1c73b (patch)
treeccf51f9126b79da80daa8ef1f8e955a05f55d290 /phpBB/includes/template/twig/node/php.php
parent68225d9f298f5f9de5f931b28241329931d16574 (diff)
downloadforums-99b776a4e56a9144bddc153ea993a96588b1c73b.tar
forums-99b776a4e56a9144bddc153ea993a96588b1c73b.tar.gz
forums-99b776a4e56a9144bddc153ea993a96588b1c73b.tar.bz2
forums-99b776a4e56a9144bddc153ea993a96588b1c73b.tar.xz
forums-99b776a4e56a9144bddc153ea993a96588b1c73b.zip
[feature/twig] Add a comment to tpl output if PHP used, but disabled
PHPBB3-11598
Diffstat (limited to 'phpBB/includes/template/twig/node/php.php')
-rw-r--r--phpBB/includes/template/twig/node/php.php12
1 files 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'))
+ ;
}
}