aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-07 12:49:00 +0100
committerTristan Darricau <tristan.darricau@sensiolabs.com>2016-02-18 17:30:31 +0100
commit99ace63e62fddc934eded20afc6a7aebbc05e13b (patch)
tree744a3d9c86bd27f007bcadb71f980721aa981b26
parentf7c5098c60688ab8553732d5129680c959355e15 (diff)
downloadforums-99ace63e62fddc934eded20afc6a7aebbc05e13b.tar
forums-99ace63e62fddc934eded20afc6a7aebbc05e13b.tar.gz
forums-99ace63e62fddc934eded20afc6a7aebbc05e13b.tar.bz2
forums-99ace63e62fddc934eded20afc6a7aebbc05e13b.tar.xz
forums-99ace63e62fddc934eded20afc6a7aebbc05e13b.zip
[ticket/14457] Don't set CSS to JS and JS to CSS
PHPBB3-14457
-rw-r--r--phpBB/phpbb/template/twig/environment.php4
-rw-r--r--tests/template/template_test_case.php1
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");
}
}