Commit 47cdc754 authored by gdd's avatar gdd

Reinstated updates to common.inc that had apparently gotten clobbered during a previous merge

parent b537f79f
......@@ -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']);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment