Index: modules/comment.module =================================================================== RCS file: /cvs/drupal/drupal/modules/comment.module,v retrieving revision 1.302.2.10 diff -u -F^f -r1.302.2.10 comment.module --- modules/comment.module 16 Mar 2005 19:32:27 -0000 1.302.2.10 +++ modules/comment.module 20 Mar 2005 19:58:20 -0000 @@ -128,18 +128,25 @@ function comment_menu($may_cache) { 'callback' => 'comment_vote_settings', 'access' => $access,'type' => MENU_LOCAL_TASK); $access = user_access('post comments'); - $items[] = array('path' => 'comment/reply', 'title' => t('reply to comment'), - 'callback' => 'comment_reply', 'access' => $access, 'type' => MENU_CALLBACK); $items[] = array('path' => 'comment/edit', 'title' => t('edit your comment'), 'callback' => 'comment_edit', 'access' => $access, 'type' => MENU_CALLBACK); $items[] = array('path' => 'comment', 'title' => t('reply to comment'), 'callback' => 'comment_save_settings', 'access' => 1, 'type' => MENU_CALLBACK); } - else if ((arg(0) == 'node') && is_numeric(arg(1)) && is_numeric(arg(2))) { - $items[] = array('path' => ('node/'. arg(1) .'/'. arg(2)), 'title' => t('view'), - 'callback' => 'node_page', - 'type' => MENU_CALLBACK); + else { + if (arg(0) == 'comment' && arg(1) == 'reply' && is_numeric(arg(2))) { + $node = node_load(array('nid' => arg(2))); + if ($node->nid) { + $items[] = array('path' => 'comment/reply', 'title' => t('reply to comment'), + 'callback' => 'comment_reply', 'access' => node_access('view', $node), 'type' => MENU_CALLBACK); + } + } + if ((arg(0) == 'node') && is_numeric(arg(1)) && is_numeric(arg(2))) { + $items[] = array('path' => ('node/'. arg(1) .'/'. arg(2)), 'title' => t('view'), + 'callback' => 'node_page', + 'type' => MENU_CALLBACK); + } } return $items;