By Lakshmipriya-1 on
I have installed the menu per role module and i would like to know how to use its patch.
What shd i do exactly to get it working properly
The Readme.txt says
"Installation : Unfortunately you need to patch the drupal file includes/menu.inc. Use the the patch provided with the module. If you don't know how to patch, you can just insert the three additional lines manually - but remove the leading plus. Then copy the module's whole directory in your drupal modules directory and activate it."
The patch file has these codes:
// If the administrator has changed the item, reflect the change.
if ($item->type & MENU_MODIFIED_BY_ADMIN) {
+ if (module_exists('menu_per_role') && !is_null($access = menu_per_role_access($item->mid))) {
+ $_menu['items'][$item->mid]['access'] = isset($_menu['items'][$item->mid]['access']) ? $_menu['items'][$item->mid]['access'] && $access : $access;
+ }
$_menu['items'][$item->mid]['title'] = $item->title;
$_menu['items'][$item->mid]['description'] = $item->description;
$_menu['items'][$item->mid]['pid'] = $item->pid;
The file includes/menu.inc is has many lines of text and codes. Where shd i insert the patch and which are the lines from the patch tht i need to insert?
pls help.
thnks
Comments
Find the code around line no:1129
Find the code around line no:1129(menu.inc)
and replaced by the code
This is the patch code