You are here

function workbench_access_update_7003 in Workbench Access 7

Use vocabulary machine names, part two.

NOTE: This update only affects sites on the pre-drupal.org release.

File

./workbench_access.install, line 311
Install file for Workbench Access.

Code

function workbench_access_update_7003() {
  $taxonomy = variable_get('workbench_access_taxonomy', array());
  if (!module_exists('taxonomy')) {
    return t('No update is required.');
  }
  $new = array();
  $vocabularies = taxonomy_get_vocabularies();
  foreach ($taxonomy as $vid) {
    $new[] = $vocabularies[$vid]->machine_name;
  }
  variable_set('workbench_access_taxonomy', $new);
}