function menu_views_update_7100 in Menu Views 7
Same name and namespace in other branches
- 8.3 menu_views.install \menu_views_update_7100()
- 7.2 menu_views.install \menu_views_update_7100()
Updates module weight in system table. Grants the "administer menu views" permission to roles that currently have the "administer menu" permission.
File
- ./
menu_views.install, line 25 - Install and update functions for the menu_views module.
Code
function menu_views_update_7100() {
db_update('system')
->fields(array(
'weight' => 100,
))
->condition('type', 'module')
->condition('name', 'menu_views')
->execute();
$roles = user_roles(FALSE, 'administer menu');
foreach ($roles as $rid => $role) {
user_role_grant_permissions($rid, array(
'administer menu views',
));
}
return t("Every role with the 'administer menu' permission has also received the 'administer menu views' permission.");
}