You are here

function taxonomy_permissions_update_7101 in Taxonomy Permissions 7

Fix permission names.

File

./taxonomy_permissions.install, line 54
Install, update and uninstall functions for the taxonomy_permissions module.

Code

function taxonomy_permissions_update_7101() {
  foreach (taxonomy_get_vocabularies() as $vocabulary) {
    db_update('role_permission')
      ->condition('permission', 'view terms in ' . $vocabulary->vid)
      ->fields(array(
      'permission' => 'view terms in ' . $vocabulary->machine_name,
    ));
  }
  drupal_flush_all_caches();
}