mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FEATURE: Allow combined files to be disabled
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@71761 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
2bff3054a1
commit
d0ffe4561a
@ -7,6 +7,20 @@
|
||||
* @subpackage view
|
||||
*/
|
||||
class Requirements {
|
||||
/**
|
||||
* Enable combining of css/javascript files.
|
||||
*
|
||||
* @var boolean
|
||||
*/
|
||||
private static $combined_files_enabled = true;
|
||||
public static function set_combined_files_enabled($enable) {
|
||||
self::$combined_files_enabled = (bool) $enable;
|
||||
}
|
||||
|
||||
public static function get_combined_files_enabled() {
|
||||
return self::$combined_files_enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* Instance of requirements for storage
|
||||
*
|
||||
@ -779,7 +793,7 @@ class Requirements_Backend {
|
||||
*/
|
||||
function process_combined_files() {
|
||||
|
||||
if(Director::isDev() && !SapphireTest::is_running_test()) {
|
||||
if(Director::isDev() && !SapphireTest::is_running_test() && Requirements::get_combined_files_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -920,4 +934,4 @@ class Requirements_Backend {
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user