function system_update_6034
6.x system.install | system_update_6034() |
Rename permission "administer access control" to "administer permissions".
Related topics
File
- drupal-6.x/
modules/ system/ system.install, line 2241
Code
function system_update_6034() {
$ret = array();
$result = db_query("SELECT rid, perm FROM {permission} ORDER BY rid");
while ($role = db_fetch_object($result)) {
$renamed_permission = preg_replace('/administer access control/', 'administer permissions', $role->perm);
if ($renamed_permission != $role->perm) {
$ret[] = update_sql("UPDATE {permission} SET perm = '$renamed_permission' WHERE rid = $role->rid");
}
}
return $ret;
}