diff options
author | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-07-13 23:15:26 -0400 |
---|---|---|
committer | Vjacheslav Trushkin <cyberalien@gmail.com> | 2013-07-13 23:15:26 -0400 |
commit | 8d303226351f358b24389fb2fd2d9b6bab7aa565 (patch) | |
tree | a120dd0c74bebf60580955e89b2f5902d8ecdc5a /phpBB | |
parent | 71f6f5ad7e095ded7bcad449e0bcd646ac610117 (diff) | |
download | forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.gz forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.bz2 forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.tar.xz forums-8d303226351f358b24389fb2fd2d9b6bab7aa565.zip |
[ticket/11694] Do not locate assets with root path
Do not locate assets that start with ./
PHPBB3-11694
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/includes/template/twig/node/includeasset.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/phpBB/includes/template/twig/node/includeasset.php b/phpBB/includes/template/twig/node/includeasset.php index ae113cadc8..990b1c984f 100644 --- a/phpBB/includes/template/twig/node/includeasset.php +++ b/phpBB/includes/template/twig/node/includeasset.php @@ -34,7 +34,7 @@ class phpbb_template_twig_node_includeasset extends Twig_Node ->subcompile($this->getNode('expr')) ->raw(";\n") ->write("\$asset = new phpbb_template_asset(\$asset_file);\n") - ->write("if (\$asset->is_relative()) {\n") + ->write("if (substr(\$asset_file, 0, 2) !== './' && \$asset->is_relative()) {\n") ->indent() ->write("\$asset_path = \$asset->get_path();") ->write("\$local_file = \$this->getEnvironment()->get_phpbb_root_path() . \$asset_path;\n") |