From 47cdc7546531e43f6f31c328b3c626959388f257 Mon Sep 17 00:00:00 2001 From: Greg Dunlap Date: Wed, 22 Feb 2012 00:06:14 -0800 Subject: [PATCH] Reinstated updates to common.inc that had apparently gotten clobbered during a previous merge --- core/includes/common.inc | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/core/includes/common.inc b/core/includes/common.inc index 3a79f0e4679..d8fdb0550d3 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -3171,7 +3171,14 @@ function drupal_group_css($css) { * @see system_element_info() */ function drupal_aggregate_css(&$css_groups) { - $preprocess_css = (variable_get('preprocess_css', FALSE) && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update')); + // Only aggregate during normal site operation. + if (defined('MAINTENANCE_MODE')) { + $preprocess_css = FALSE; + } + else { + $config = config('system.performance'); + $preprocess_css = $config->get('preprocess_css'); + } // For each group that needs aggregation, aggregate its items. foreach ($css_groups as $key => $group) { @@ -4404,9 +4411,16 @@ function drupal_group_js($javascript) { * @see drupal_pre_render_scripts() */ function drupal_aggregate_js(&$js_groups) { - // Only aggregate when the site is configured to do so, and not during an - // update. - if (config('system.performance')->get('preprocess_js') && (!defined('MAINTENANCE_MODE') || MAINTENANCE_MODE != 'update')) { + // Only aggregate during normal site operation. + if (defined('MAINTENANCE_MODE')) { + $preprocess_js = FALSE; + } + else { + $config = config('system.performance'); + $preprocess_js = $config->get('preprocess_js'); + } + + if ($preprocess_js) { foreach ($js_groups as $key => $group) { if ($group['type'] == 'file' && $group['preprocess']) { $js_groups[$key]['data'] = drupal_build_js_cache($group['items']);