mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Merge pull request #3916 from Nicofuma/ticket/12633
[ticket/12633] Doesn't use DEBUG to debug templates events * Nicofuma/ticket/12633: [ticket/12633] Doesn't use DEBUG to debug templates events
This commit is contained in:
commit
4972141a14
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