You are here

function file_entity_update_7203 in File Entity (fieldable files) 7.2

Same name and namespace in other branches
  1. 7.3 file_entity.install \file_entity_update_7203()

Update permission names.

File

./file_entity.install, line 540
Install, update and uninstall functions for the file_entity module.

Code

function file_entity_update_7203() {
  $permissions = array(
    'view file' => 'view files',
    'edit file' => 'edit any files',
  );
  foreach ($permissions as $old => $new) {
    db_update('role_permission')
      ->fields(array(
      'permission' => $new,
    ))
      ->condition('permission', $old)
      ->execute();
  }
}