mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 22:28:51 +00:00
[ticket/12633] Doesn't use DEBUG to debug templates events
Check the templates events on runtime only when Twig debug is on PHPBB3-12633
This commit is contained in:
parent
087e219a09
commit
4c00474845
1 changed files with 3 additions and 3 deletions
|
@ -46,7 +46,7 @@ class event extends \Twig_Node
|
||||||
{
|
{
|
||||||
$ext_namespace = str_replace('/', '_', $ext_namespace);
|
$ext_namespace = str_replace('/', '_', $ext_namespace);
|
||||||
|
|
||||||
if (defined('DEBUG'))
|
if ($this->environment->isDebug())
|
||||||
{
|
{
|
||||||
// If debug mode is enabled, lets check for new/removed EVENT
|
// If debug mode is enabled, lets check for new/removed EVENT
|
||||||
// templates on page load rather than at compile. This is
|
// 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
|
$compiler
|
||||||
->write("\$previous_look_up_order = \$this->env->getNamespaceLookUpOrder();\n")
|
->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
|
$compiler
|
||||||
->outdent()
|
->outdent()
|
||||||
|
|
Loading…
Add table
Reference in a new issue