You are here

function advagg_mod_update_7202 in Advanced CSS/JS Aggregation 7.2

Move advagg_mod_js_get_external_dns to advagg_mod_js_inline_resource_hints.

File

advagg_mod/advagg_mod.install, line 41
Handles AdvAgg mod installation and upgrade tasks.

Code

function advagg_mod_update_7202(&$sandbox) {
  $advagg_mod_js_inline_resource_hints = variable_get('advagg_mod_js_inline_resource_hints', NULL);
  $advagg_mod_js_get_external_dns = variable_get('advagg_mod_js_get_external_dns', NULL);
  if (is_null($advagg_mod_js_get_external_dns)) {
    return t('Nothing needed to happen.');
  }
  variable_del('advagg_mod_js_get_external_dns');
  if (!is_null($advagg_mod_js_inline_resource_hints) || empty($advagg_mod_js_inline_resource_hints)) {
    return t('Nothing needed to happen.');
  }
  variable_set('advagg_mod_js_inline_resource_hints', $advagg_mod_js_inline_resource_hints);
  return t('Variable has been moved.');
}