Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MINOR: merged patch from #4421. Fixed syntax error with Requirements:…

…:combine_files() and css files

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@83048 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
commit 5329e9bfc5d277c7946ba97f1acf65eb54134106 1 parent 34681d1
Will Rossiter authored sminnee committed
Showing with 3 additions and 2 deletions.
  1. +3 −2 core/Requirements.php
View
5 core/Requirements.php
@@ -878,7 +878,8 @@ function process_combined_files() {
foreach(array_diff($fileList,$this->blocked) as $file) {
$fileContent = file_get_contents($base . $file);
// if we have a javascript file and jsmin is enabled, minify the content
- if(stripos($file, '.js') && $this->combine_js_with_jsmin) {
+ $isJS = stripos($file, '.js');
+ if($isJS && $this->combine_js_with_jsmin) {
require_once('thirdparty/jsmin/JSMin.php');
set_time_limit(0);
@@ -886,7 +887,7 @@ function process_combined_files() {
}
// write a header comment for each file for easier identification and debugging
// also the semicolon between each file is required for jQuery to be combinable properly
- $combinedData .= "/****** FILE: $file *****/\n" . $fileContent . "\n;\n";
+ $combinedData .= "/****** FILE: $file *****/\n" . $fileContent . "\n".($isJS ? ';' : '')."\n";
}
if(!file_exists(dirname($base . $combinedFile))) {
Filesystem::makeFolder(dirname($base . $combinedFile));
Please sign in to comment.
Something went wrong with that request. Please try again.