diff options
author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-09-18 21:23:34 +0200 |
---|---|---|
committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2015-09-18 21:23:34 +0200 |
commit | 4c004748453babcb8f0a277227c366a71c8c1bc6 (patch) | |
tree | f0d5022d9e7d4ca9bd55d84f096f008607f5465e /phpBB/phpbb/template/twig/node | |
parent | 087e219a09a301e193c6e425521deeab89318043 (diff) | |
download | forums-4c004748453babcb8f0a277227c366a71c8c1bc6.tar forums-4c004748453babcb8f0a277227c366a71c8c1bc6.tar.gz forums-4c004748453babcb8f0a277227c366a71c8c1bc6.tar.bz2 forums-4c004748453babcb8f0a277227c366a71c8c1bc6.tar.xz forums-4c004748453babcb8f0a277227c366a71c8c1bc6.zip |
[ticket/12633] Doesn't use DEBUG to debug templates events
Check the templates events on runtime only when Twig debug is on
PHPBB3-12633
Diffstat (limited to 'phpBB/phpbb/template/twig/node')
-rw-r--r-- | phpBB/phpbb/template/twig/node/event.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/phpBB/phpbb/template/twig/node/event.php b/phpBB/phpbb/template/twig/node/event.php index b765bde98d..11fdb75247 100644 --- a/phpBB/phpbb/template/twig/node/event.php +++ b/phpBB/phpbb/template/twig/node/event.php @@ -46,7 +46,7 @@ class event extends \Twig_Node { $ext_namespace = str_replace('/', '_', $ext_namespace); - if (defined('DEBUG')) + if ($this->environment->isDebug()) { // If debug mode is enabled, lets check for new/removed EVENT // templates on page load rather than at compile. This is @@ -58,7 +58,7 @@ class event extends \Twig_Node ; } - if (defined('DEBUG') || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) + if ($this->environment->isDebug() || $this->environment->getLoader()->exists('@' . $ext_namespace . '/' . $location . '.html')) { $compiler ->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n") @@ -70,7 +70,7 @@ class event extends \Twig_Node ; } - if (defined('DEBUG')) + if ($this->environment->isDebug()) { $compiler ->outdent() |