You are here

function variable_features_rebuild in Strongarm 6.2

Same name and namespace in other branches
  1. 7.2 strongarm.module \variable_features_rebuild()

Implementation of hook_features_rebuild(). Same as revert, but we only want to force variables only in code into the database

File

./strongarm.module, line 129

Code

function variable_features_rebuild($module) {
  $defaults = features_get_default('variable', $module);
  if (empty($defaults)) {
    return;
  }
  $vars = strongarm_vars_load(TRUE, TRUE);
  foreach ($defaults as $name => $default) {
    if (isset($vars[$name]->in_code_only) || defined('MAINTENANCE_MODE') && MAINTENANCE_MODE == 'install' && $vars[$name]->export_type & EXPORT_IN_CODE) {
      variable_set($name, $default->value);
    }
  }
}