summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--modules/comment.module7
-rw-r--r--modules/comment/comment.module7
-rw-r--r--modules/node.module3
-rw-r--r--modules/node/node.module3
4 files changed, 14 insertions, 6 deletions
diff --git a/modules/comment.module b/modules/comment.module
index e2938f22d..f8b08f27f 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 = "<div class=\"comment-folded\">\n";
- $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/view/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> ';
+ $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> ';
$output .= '<span class="credit">'. t('by') .' '. format_name($comment) ."</span>\n";
$output .= "</div>\n";
return $output;
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index e2938f22d..f8b08f27f 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 = "<div class=\"comment-folded\">\n";
- $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/view/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> ';
+ $output .= ' <span class="subject">'. l($comment->subject, comment_node_url() .'/'. $comment->cid, NULL, NULL, "comment-$comment->cid") . ($comment->new ? ' '. theme('mark') : '') .'</span> ';
$output .= '<span class="credit">'. t('by') .' '. format_name($comment) ."</span>\n";
$output .= "</div>\n";
return $output;
diff --git a/modules/node.module b/modules/node.module
index 996e7631e..dc7598177 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 996e7631e..dc7598177 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) {