BUGFIX: Don't load SapphireTest unnecessarily, as this is a slow operation

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@75147 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2009-04-27 00:19:16 +00:00
parent bac89fd2c5
commit 8fcdcfa2eb

View File

@ -775,8 +775,12 @@ class Requirements_Backend {
*
*/
function process_combined_files() {
if((Director::isDev() && !SapphireTest::is_running_test()) || !Requirements::get_combined_files_enabled()) {
// The class_exists call prevents us from loading SapphireTest.php (slow) just to know that
// SapphireTest isn't running :-)
if(class_exists('SapphireTest',false)) $runningTest = SapphireTest::is_running_test();
else $runningTest = false;
if((Director::isDev() && !$runningTest) || !Requirements::get_combined_files_enabled()) {
return;
}