<div dir="ltr">On Thu, Aug 21, 2008 at 7:28 AM, Lluís <span dir="ltr"><<a href="mailto:enboig@gmail.com">enboig@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I forgot to say I added some "extra menu" to make me easy to customize<br>
the menus like:<br>
<br>
........<br>
$items[] = array('path' => 'comptacau/projectes/'. arg(2) .'/delete',<br>
'title' => t('Delete'),<br>
'callback' => 'drupal_get_form',<br>
'callback arguments' =><br>
array('node_delete_confirm', $node),<br>
'access' => node_access('delete', $node),<br>
'weight' => 1,<br>
'type' => MENU_LOCAL_TASK);<br>
........<br>
</blockquote><div><br>node_access() expects a $node object to be passed in. You have not pasted the entire hook_menu function from your module, but I if you do want to check node_access(), you have to make sure you do node_load() beforehand, on that path so node_access has something to check.<br>
<br></div></div><br>-- <br>Khalid M. Baheyeldin<br><a href="http://2bits.com">2bits.com</a>, Inc.<br><a href="http://2bits.com">http://2bits.com</a><br>Drupal optimization, development, customization and consulting.<br>
</div>