mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merged in Requirements::combine_files() fix from branches/2.3 - r83048
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@86684 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
8b6772fff0
commit
0617ab65c0
@ -879,7 +879,8 @@ class Requirements_Backend {
|
|||||||
foreach(array_diff($fileList,$this->blocked) as $file) {
|
foreach(array_diff($fileList,$this->blocked) as $file) {
|
||||||
$fileContent = file_get_contents($base . $file);
|
$fileContent = file_get_contents($base . $file);
|
||||||
// if we have a javascript file and jsmin is enabled, minify the content
|
// 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');
|
require_once('thirdparty/jsmin/JSMin.php');
|
||||||
|
|
||||||
increase_time_limit_to();
|
increase_time_limit_to();
|
||||||
@ -887,7 +888,7 @@ class Requirements_Backend {
|
|||||||
}
|
}
|
||||||
// write a header comment for each file for easier identification and debugging
|
// 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
|
// 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))) {
|
if(!file_exists(dirname($base . $combinedFile))) {
|
||||||
Filesystem::makeFolder(dirname($base . $combinedFile));
|
Filesystem::makeFolder(dirname($base . $combinedFile));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user