diff options
Diffstat (limited to 'phpBB/phpbb/template/twig')
-rw-r--r-- | phpBB/phpbb/template/twig/environment.php | 2 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/loader.php | 3 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/definenode.php | 3 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/node/includephp.php | 6 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/tokenparser/defineparser.php | 7 | ||||
-rw-r--r-- | phpBB/phpbb/template/twig/tokenparser/includephp.php | 3 |
6 files changed, 16 insertions, 8 deletions
diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index e7b8aeab89..6e75403159 100644 --- a/phpBB/phpbb/template/twig/environment.php +++ b/phpBB/phpbb/template/twig/environment.php @@ -65,7 +65,7 @@ class environment extends \Twig_Environment $options = array_merge(array( 'cache' => (defined('IN_INSTALL')) ? false : $cache_path, - 'debug' => defined('DEBUG'), + 'debug' => false, 'auto_reload' => (bool) $this->phpbb_config['load_tplcompile'], 'autoescape' => false, ), $options); diff --git a/phpBB/phpbb/template/twig/loader.php b/phpBB/phpbb/template/twig/loader.php index df8183c019..8b12188a77 100644 --- a/phpBB/phpbb/template/twig/loader.php +++ b/phpBB/phpbb/template/twig/loader.php @@ -115,7 +115,8 @@ class loader extends \Twig_Loader_Filesystem // If this is in the cache we can skip the entire process below // as it should have already been validated - if (isset($this->cache[$name])) { + if (isset($this->cache[$name])) + { return $this->cache[$name]; } diff --git a/phpBB/phpbb/template/twig/node/definenode.php b/phpBB/phpbb/template/twig/node/definenode.php index 695ec4281f..c110785c4b 100644 --- a/phpBB/phpbb/template/twig/node/definenode.php +++ b/phpBB/phpbb/template/twig/node/definenode.php @@ -31,7 +31,8 @@ class definenode extends \Twig_Node { $compiler->addDebugInfo($this); - if ($this->getAttribute('capture')) { + if ($this->getAttribute('capture')) + { $compiler ->write("ob_start();\n") ->subcompile($this->getNode('value')) diff --git a/phpBB/phpbb/template/twig/node/includephp.php b/phpBB/phpbb/template/twig/node/includephp.php index 826617e8e8..659495fd9e 100644 --- a/phpBB/phpbb/template/twig/node/includephp.php +++ b/phpBB/phpbb/template/twig/node/includephp.php @@ -47,7 +47,8 @@ class includephp extends \Twig_Node return; } - if ($this->getAttribute('ignore_missing')) { + if ($this->getAttribute('ignore_missing')) + { $compiler ->write("try {\n") ->indent() @@ -76,7 +77,8 @@ class includephp extends \Twig_Node ->write("}\n") ; - if ($this->getAttribute('ignore_missing')) { + if ($this->getAttribute('ignore_missing')) + { $compiler ->outdent() ->write("} catch (\Twig_Error_Loader \$e) {\n") diff --git a/phpBB/phpbb/template/twig/tokenparser/defineparser.php b/phpBB/phpbb/template/twig/tokenparser/defineparser.php index cfee84a363..2b88d61118 100644 --- a/phpBB/phpbb/template/twig/tokenparser/defineparser.php +++ b/phpBB/phpbb/template/twig/tokenparser/defineparser.php @@ -33,7 +33,8 @@ class defineparser extends \Twig_TokenParser $name = $this->parser->getExpressionParser()->parseExpression(); $capture = false; - if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) { + if ($stream->test(\Twig_Token::OPERATOR_TYPE, '=')) + { $stream->next(); $value = $this->parser->getExpressionParser()->parseExpression(); @@ -45,7 +46,9 @@ class defineparser extends \Twig_TokenParser } $stream->expect(\Twig_Token::BLOCK_END_TYPE); - } else { + } + else + { $capture = true; $stream->expect(\Twig_Token::BLOCK_END_TYPE); diff --git a/phpBB/phpbb/template/twig/tokenparser/includephp.php b/phpBB/phpbb/template/twig/tokenparser/includephp.php index 38196c5290..c09f7729b0 100644 --- a/phpBB/phpbb/template/twig/tokenparser/includephp.php +++ b/phpBB/phpbb/template/twig/tokenparser/includephp.php @@ -31,7 +31,8 @@ class includephp extends \Twig_TokenParser $stream = $this->parser->getStream(); $ignoreMissing = false; - if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) { + if ($stream->test(\Twig_Token::NAME_TYPE, 'ignore')) + { $stream->next(); $stream->expect(\Twig_Token::NAME_TYPE, 'missing'); |