From 99ace63e62fddc934eded20afc6a7aebbc05e13b Mon Sep 17 00:00:00 2001 From: Tristan Darricau Date: Sun, 7 Feb 2016 12:49:00 +0100 Subject: [ticket/14457] Don't set CSS to JS and JS to CSS PHPBB3-14457 --- phpBB/phpbb/template/twig/environment.php | 4 ++-- tests/template/template_test_case.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/phpBB/phpbb/template/twig/environment.php b/phpBB/phpbb/template/twig/environment.php index 27a475f046..65f1af5d9e 100644 --- a/phpBB/phpbb/template/twig/environment.php +++ b/phpBB/phpbb/template/twig/environment.php @@ -230,8 +230,8 @@ class environment extends \Twig_Environment */ private function inject_assets($output, $placeholder_salt) { - $output = str_replace('__SCRIPTS_' . $placeholder_salt . '__', $this->assets_bag->get_stylesheets_content(), $output); - $output = str_replace('__STYLESHEETS_' . $placeholder_salt . '__', $this->assets_bag->get_scripts_content(), $output); + $output = str_replace('__STYLESHEETS_' . $placeholder_salt . '__', $this->assets_bag->get_stylesheets_content(), $output); + $output = str_replace('__SCRIPTS_' . $placeholder_salt . '__', $this->assets_bag->get_scripts_content(), $output); return $output; } diff --git a/tests/template/template_test_case.php b/tests/template/template_test_case.php index 62eea0d361..3c97d30edc 100644 --- a/tests/template/template_test_case.php +++ b/tests/template/template_test_case.php @@ -172,6 +172,7 @@ class phpbb_template_template_test_case extends phpbb_test_case $expected = str_replace(array("\n", "\r", "\t"), '', $expected); $output = str_replace(array("\n", "\r", "\t"), '', $this->display('test')); + $this->assertEquals($expected, $output, "Testing $file"); } } -- cgit v1.2.1