diff --git a/phpBB/phpbb/template/twig/extension.php b/phpBB/phpbb/template/twig/extension.php index 4b4771c8aa..968a9c9d3e 100644 --- a/phpBB/phpbb/template/twig/extension.php +++ b/phpBB/phpbb/template/twig/extension.php @@ -60,9 +60,7 @@ class extension extends \Twig\Extension\AbstractExtension return array( new \phpbb\template\twig\tokenparser\defineparser, new \phpbb\template\twig\tokenparser\includeparser, - new \phpbb\template\twig\tokenparser\include_js, new \phpbb\template\twig\tokenparser\includejs, - new \phpbb\template\twig\tokenparser\include_css, new \phpbb\template\twig\tokenparser\includecss, new \phpbb\template\twig\tokenparser\event($this->environment), new \phpbb\template\twig\tokenparser\includephp($this->environment), diff --git a/phpBB/phpbb/template/twig/tokenparser/include_css.php b/phpBB/phpbb/template/twig/tokenparser/include_css.php deleted file mode 100644 index 353fb26c9c..0000000000 --- a/phpBB/phpbb/template/twig/tokenparser/include_css.php +++ /dev/null @@ -1,27 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -namespace phpbb\template\twig\tokenparser; - -class include_css extends includecss -{ - /** - * Gets the tag name associated with this token parser. - * - * @return string The tag name - */ - public function getTag(): string - { - return 'include_css'; - } -} diff --git a/phpBB/phpbb/template/twig/tokenparser/include_js.php b/phpBB/phpbb/template/twig/tokenparser/include_js.php deleted file mode 100644 index 5b57fb4d6f..0000000000 --- a/phpBB/phpbb/template/twig/tokenparser/include_js.php +++ /dev/null @@ -1,27 +0,0 @@ - -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -namespace phpbb\template\twig\tokenparser; - -class include_js extends includejs -{ - /** - * Gets the tag name associated with this token parser. - * - * @return string The tag name - */ - public function getTag(): string - { - return 'include_js'; - } -} diff --git a/tests/template/templates/include_css.html b/tests/template/templates/include_css.html index a8f644e406..935633d573 100644 --- a/tests/template/templates/include_css.html +++ b/tests/template/templates/include_css.html @@ -1,10 +1,10 @@ {% if TEST === 1 %} - {% include_css('child_only.css') %} + {% INCLUDECSS('child_only.css') %} {% elseif TEST === 2 %} - {% include_css('parent_only.css') %} + {% INCLUDECSS('parent_only.css') %} {% elseif TEST === 3 %} - {% include_css('@include_css/test.css') %} + {% INCLUDECSS('@include_css/test.css') %} {% elseif TEST === 4 %} - {% include_css('@include_css/child_only.css') %} + {% INCLUDECSS('@include_css/child_only.css') %} {% endif %} {$STYLESHEETS} diff --git a/tests/template/templates/include_js.html b/tests/template/templates/include_js.html index 96ed42ebc7..dcf29bf0d1 100644 --- a/tests/template/templates/include_js.html +++ b/tests/template/templates/include_js.html @@ -1,36 +1,36 @@ {% if TEST === 1 %} - {% include_js('parent_and_child.js') %} + {% INCLUDEJS('parent_and_child.js') %} {% elseif TEST === 2 %} - {% include_js('parent_and_child.js?assets_version=0') %} + {% INCLUDEJS('parent_and_child.js?assets_version=0') %} {% elseif TEST === 3 %} - {% include_js('parent_and_child.js?test=1&assets_version=0') %} + {% INCLUDEJS('parent_and_child.js?test=1&assets_version=0') %} {% elseif TEST === 4 %} - {% include_js('parent_and_child.js?test=1&assets_version=0') %} + {% INCLUDEJS('parent_and_child.js?test=1&assets_version=0') %} {% elseif TEST === 6 %} - {% include_js(PARENT) %} + {% INCLUDEJS(PARENT) %} {% elseif TEST === 7 %} {% set test_var = 'child_only.js' %} - {% include_js(test_var) %} + {% INCLUDEJS(test_var) %} {% elseif TEST === 8 %} - {% include_js('subdir/' ~ PARENT) %} + {% INCLUDEJS('subdir/' ~ PARENT) %} {% elseif TEST === 9 %} - {% include_js(SUBDIR ~ '/subsubdir/' ~ PARENT) %} + {% INCLUDEJS(SUBDIR ~ '/subsubdir/' ~ PARENT) %} {% elseif TEST === 10 %} - {% include_js(SUBDIR ~ '/parent_only.' ~ EXT) %} + {% INCLUDEJS(SUBDIR ~ '/parent_only.' ~ EXT) %} {% elseif TEST === 11 %} {% set test_var = 'child_only.js?test1=1&test2=2#test3' %} - {% include_js(test_var) %} + {% INCLUDEJS(test_var) %} {% elseif TEST === 12 %} - {% include_js('parent_only.js?test1=1&test2=2#test3') %} + {% INCLUDEJS('parent_only.js?test1=1&test2=2#test3') %} {% elseif TEST === 14 %} - {% include_js('parent_only.js?test1="#test3') %} + {% INCLUDEJS('parent_only.js?test1="#test3') %} {% elseif TEST === 15 %} - {% include_js('http://phpbb.com/b.js?c=d#f') %} + {% INCLUDEJS('http://phpbb.com/b.js?c=d#f') %} {% elseif TEST === 16 %} - {% include_js('http://phpbb.com/b.js?c=d&assets_version=2#f') %} + {% INCLUDEJS('http://phpbb.com/b.js?c=d&assets_version=2#f') %} {% elseif TEST === 17 %} - {% include_js('//phpbb.com/b.js') %} + {% INCLUDEJS('//phpbb.com/b.js') %} {% elseif TEST === 18 %} - {% include_js('parent_and_child.js?test=1&test2=0') %} + {% INCLUDEJS('parent_and_child.js?test=1&test2=0') %} {% endif %} {$SCRIPTS}