aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/template/twig/node/includeasset.php
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-07-13 23:45:49 -0400
committerDavid King <imkingdavid@gmail.com>2013-07-13 23:45:49 -0400
commit6946cea72dae098599e1964c983d373bdd52324b (patch)
treea120dd0c74bebf60580955e89b2f5902d8ecdc5a /phpBB/includes/template/twig/node/includeasset.php
parent71f6f5ad7e095ded7bcad449e0bcd646ac610117 (diff)
parent8d303226351f358b24389fb2fd2d9b6bab7aa565 (diff)
downloadforums-6946cea72dae098599e1964c983d373bdd52324b.tar
forums-6946cea72dae098599e1964c983d373bdd52324b.tar.gz
forums-6946cea72dae098599e1964c983d373bdd52324b.tar.bz2
forums-6946cea72dae098599e1964c983d373bdd52324b.tar.xz
forums-6946cea72dae098599e1964c983d373bdd52324b.zip
Merge remote-tracking branch 'cyberalien/ticket/11694' into develop
* cyberalien/ticket/11694: [ticket/11694] Do not locate assets with root path
Diffstat (limited to 'phpBB/includes/template/twig/node/includeasset.php')
-rw-r--r--phpBB/includes/template/twig/node/includeasset.php2
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")