diff options
Diffstat (limited to 'phpBB/phpbb/template/twig')
| -rw-r--r-- | phpBB/phpbb/template/twig/twig.php | 13 | 
1 files changed, 9 insertions, 4 deletions
diff --git a/phpBB/phpbb/template/twig/twig.php b/phpBB/phpbb/template/twig/twig.php index 5b71bb5e8a..bd754d9bbd 100644 --- a/phpBB/phpbb/template/twig/twig.php +++ b/phpBB/phpbb/template/twig/twig.php @@ -115,6 +115,11 @@ class twig extends \phpbb\template\base  			)  		); +		if (defined('DEBUG')) +		{ +			$this->twig->addExtension(new \Twig_Extension_Debug()); +		} +  		$lexer = new \phpbb\template\twig\lexer($this->twig);  		$this->twig->setLexer($lexer); @@ -280,19 +285,19 @@ class twig extends \phpbb\template\base  						$ext_style_theme_path = $ext_style_path . 'theme/';  					} -					$ok = false; +					$is_valid_dir = false;  					if (is_dir($ext_style_template_path))  					{ -						$ok = true; +						$is_valid_dir = true;  						$paths[] = $ext_style_template_path;  					}  					if (is_dir($ext_style_theme_path))  					{ -						$ok = true; +						$is_valid_dir = true;  						$paths[] = $ext_style_theme_path;  					} -					if ($ok) +					if ($is_valid_dir)  					{  						// Add the base style directory as a safe directory  						$this->twig->getLoader()->addSafeDirectory($ext_style_path);  | 
