diff --git a/modules/comment.module b/modules/comment.module index e2938f22d7d..f8b08f27ffb 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -136,6 +136,11 @@ function comment_menu($may_cache) { $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); + } return $items; } @@ -1577,7 +1582,7 @@ function theme_comment($comment, $links = 0) { function theme_comment_folded($comment) { $output = "
\n"; - $output .= ' '. l($comment->subject, comment_node_url() .'/view/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .' '; $output .= ''. t('by') .' '. format_name($comment) ."\n"; $output .= "
\n"; return $output; diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e2938f22d7d..f8b08f27ffb 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -136,6 +136,11 @@ function comment_menu($may_cache) { $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); + } return $items; } @@ -1577,7 +1582,7 @@ function theme_comment($comment, $links = 0) { function theme_comment_folded($comment) { $output = "
\n"; - $output .= ' '. l($comment->subject, comment_node_url() .'/view/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .' '; + $output .= ' '. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .' '; $output .= ''. t('by') .' '. format_name($comment) ."\n"; $output .= "
\n"; return $output; diff --git a/modules/node.module b/modules/node.module index 996e7631e43..dc7598177c5 100644 --- a/modules/node.module +++ b/modules/node.module @@ -1449,9 +1449,8 @@ function node_page() { $op = $_POST['op'] ? $_POST['op'] : arg(1); $edit = $_POST['edit']; - // Temporary solution for backward compatibility. if (is_numeric($op)) { - $op = arg(2) ? arg(2) : 'view'; + $op = (arg(2) && !is_numeric(arg(2))) ? arg(2) : 'view'; } switch ($op) { diff --git a/modules/node/node.module b/modules/node/node.module index 996e7631e43..dc7598177c5 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -1449,9 +1449,8 @@ function node_page() { $op = $_POST['op'] ? $_POST['op'] : arg(1); $edit = $_POST['edit']; - // Temporary solution for backward compatibility. if (is_numeric($op)) { - $op = arg(2) ? arg(2) : 'view'; + $op = (arg(2) && !is_numeric(arg(2))) ? arg(2) : 'view'; } switch ($op) {