mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
[ticket/11832] get_url() from phpbb_template_asset should return web path
PHPBB3-11832
This commit is contained in:
@@ -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")
|
||||
|
Reference in New Issue
Block a user