You are here

function role_export_features_rebuild in Role Export 6

Implements hook_features_rebuild().

1 call to role_export_features_rebuild()
role_export_features_revert in ./role_export.module
Implements hook_features_revert().

File

./role_export.module, line 248
Role Export's primary module file.

Code

function role_export_features_rebuild($module) {
  if ($defaults = features_get_default('role_export', $module)) {
    $normals = role_export_roles();
    foreach ($defaults as $machine_name => $role) {
      db_query("DELETE FROM {role} WHERE rid = %d OR name = '%s' OR machine_name = '%s'", $role['rid'], $role['name'], $role['machine_name']);
      drupal_write_record('role', $role);
    }
    role_export_normalize();
  }
}