You are here

function gotwo_update_6100 in Go - url redirects 7

Same name and namespace in other branches
  1. 6 gotwo.install \gotwo_update_6100()

Update the permissions table, to reflect changes to hook_perm.

File

./gotwo.install, line 67
Installation script for the gotwo.module

Code

function gotwo_update_6100() {
  $permissions = array(
    'view gotwo entries' => 'view gotwo redirects',
    'edit gotwo entries' => 'edit gotwo redirects',
  );
  foreach ($permissions as $permission_old => $permission_new) {
    db_update('role_permission')
      ->fields(array(
      'permission' => $permission_new,
    ))
      ->condition('permission', $permission_old)
      ->condition('module', 'gotwo')
      ->execute();
  }
  return t('Gotwo permission have been renamed.');
}