diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-10-16 07:22:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-10-16 07:22:26 +0000 |
commit | 7ebd772f417fe7bd6324fdd12707c1b9c89ce324 (patch) | |
tree | 362127a7a84ed8c7c029579f760e11d1e0de3e34 /modules | |
parent | ba2761929c4200c28ff658ecdb83158f1a9deb36 (diff) | |
download | brdo-7ebd772f417fe7bd6324fdd12707c1b9c89ce324.tar.gz brdo-7ebd772f417fe7bd6324fdd12707c1b9c89ce324.tar.bz2 |
- Patch #10664 by TDobes: fixed collapsed comments + updated the code comments.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment.module | 7 | ||||
-rw-r--r-- | modules/comment/comment.module | 7 | ||||
-rw-r--r-- | modules/node.module | 3 | ||||
-rw-r--r-- | modules/node/node.module | 3 |
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) { |