aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/phpbb/template/twig
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-09-15 16:42:02 -0500
committerNathan Guse <nathaniel.guse@gmail.com>2013-09-15 16:42:02 -0500
commit9e8babbf6eae65aa894cb0d8c4b452133ac344a8 (patch)
tree9f43401a858c596cbebf19b750284e772c1c875a /phpBB/phpbb/template/twig
parentb4a374dc73eda55db1c67b87bd65a73f79411ef5 (diff)
downloadforums-9e8babbf6eae65aa894cb0d8c4b452133ac344a8.tar
forums-9e8babbf6eae65aa894cb0d8c4b452133ac344a8.tar.gz
forums-9e8babbf6eae65aa894cb0d8c4b452133ac344a8.tar.bz2
forums-9e8babbf6eae65aa894cb0d8c4b452133ac344a8.tar.xz
forums-9e8babbf6eae65aa894cb0d8c4b452133ac344a8.zip
[ticket/11832] get_url() from phpbb_template_asset should return web path
PHPBB3-11832
Diffstat (limited to 'phpBB/phpbb/template/twig')
-rw-r--r--phpBB/phpbb/template/twig/node/includeasset.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/phpBB/phpbb/template/twig/node/includeasset.php b/phpBB/phpbb/template/twig/node/includeasset.php
index 2dcd2003a3..8629395898 100644
--- a/phpBB/phpbb/template/twig/node/includeasset.php
+++ b/phpBB/phpbb/template/twig/node/includeasset.php
@@ -33,11 +33,11 @@ abstract class phpbb_template_twig_node_includeasset extends Twig_Node
->write("\$asset_file = ")
->subcompile($this->getNode('expr'))
->raw(";\n")
- ->write("\$asset = new phpbb_template_asset(\$asset_file);\n")
+ ->write("\$asset = new phpbb_template_asset(\$asset_file, \$this->getEnvironment()->get_filesystem());\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_web_root_path() . \$asset_path;\n")
+ ->write("\$local_file = \$this->getEnvironment()->get_phpbb_root_path() . \$asset_path;\n")
->write("if (!file_exists(\$local_file)) {\n")
->indent()
->write("\$local_file = \$this->getEnvironment()->findTemplate(\$asset_path);\n")