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:
Andrew O'Neil 2009-02-12 04:14:55 +00:00 committed by Sam Minnee
parent 2bff3054a1
commit d0ffe4561a

View File

@ -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 {
}
?>
?>