You are here

function variable_features_rebuild in Strongarm 7.2

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

Implements 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 (!empty($vars[$name]->in_code_only) || drupal_installation_attempted() && $vars[$name]->export_type & EXPORT_IN_CODE) {
      variable_set($name, $default->value);
    }
  }
}