From f86a944979de75225dc3ddd00920ebedbfe307ed Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Sun, 12 May 2002 15:40:57 +0000 Subject: - applied Stevens link patch. - fixed block permissions. - fixed user admin page errors: http://www.drupal.org/node.php?id=173. - cleaned up common.inc a bit: removed format_info, path_img, field_merge. --- modules/comment/comment.module | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'modules/comment/comment.module') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index e692b9d02..5cd94e596 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -381,7 +381,7 @@ function comment_links($comment, $return = 1) { $links = array(); if ($return) { - $links[] = l("type;\">". t("return") ."", array("id" => $comment->nid ."#". $comment->cid)); + $links[] = l("type;\">". t("return") ."", array("id" => $comment->nid), "node", $comment->cid); } if (user_access("administer comments")) { @@ -398,10 +398,10 @@ function comment_links($comment, $return = 1) { //if (node_comment_mode($comment->nid)) { if (user_access("post comments")) { if (comment_access("edit", $comment)) { - $links[] = lm("type\">". t("edit your comment") ."", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), t("Make changes to your comment.")); + $links[] = lm("type\">". t("edit your comment") ."", array("mod" => "comment", "op" => "edit", "id" => $comment->cid), "", array("title" => t("Make changes to your comment."))); } else { - $links[] = lm("type;\">". t("reply to this comment") ."", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), t("Reply to this comment.")); + $links[] = lm("type;\">". t("reply to this comment") ."", array("mod" => "comment", "op" => "reply", "id" => $comment->nid, "pid" => $comment->cid), "", array("title" => t("Reply to this comment."))); } } //} @@ -420,7 +420,7 @@ function comment_view($comment, $folded = 0) { $theme->comment($comment, $folded); } else { - print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ." by ". format_name($comment) ."

"; + print l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ." by ". format_name($comment) ."

"; } } @@ -521,7 +521,7 @@ function comment_render($nid, $cid) { print " SubjectAuthorDateScore\n"; while ($comment = db_fetch_object($result)) { if (comment_visible($comment, $threshold)) { - print " ". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid ."#". $comment->cid)) ."". format_name($comment) ."". format_date($comment->timestamp, "small") ."$comment->score\n"; + print " ". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid), "node", $comment->cid) ."". format_name($comment) ."". format_date($comment->timestamp, "small") ."$comment->score\n"; } } print "\n"; @@ -624,7 +624,7 @@ function comment_link($type, $node = 0, $main = 0) { $all = comment_num_all($node->nid); $new = comment_num_new($node->nid); - $links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid ."#comment"), t("View this posting and all of its comments.")); + $links[] = l(format_plural($all, "comment", "comments") . ($new ? ", $new ". t("new") : ""), array("id" => $node->nid), "node", "comment", array("title" => t("View this posting and all of its comments."))); } } else { @@ -635,7 +635,7 @@ function comment_link($type, $node = 0, $main = 0) { if (user_access("post comments")) { if ($node->comment == 2) { - $links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid ."#comment"), t("Share your thoughts and opinions related to this posting.")); + $links[] = lm(t("add new comment"), array("mod" => "comment", "op" => "reply", "id" => $node->nid), "comment", array("title" => t("Share your thoughts and opinions related to this posting."))); } else { $links[] = t("This discussion is closed: you can't post new comments."); @@ -662,7 +662,7 @@ function comment_node_link($node) { $output .= " titleauthoroperations"; while ($comment = db_fetch_object($result)) { - $output .= "". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."". format_name($comment) ."". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) .""; + $output .= "". l($comment->subject, array("id" => $node->nid, "cid" => $comment->cid), "node", $comment->cid) ."". format_name($comment) ."". l(t("view comment"), array("id" => $node->nid, "cid" => $comment->cid ."#". $comment->cid)) ."". la(t("edit comment"), array("mod" => "comment", "op" => "edit", "id" => $comment->cid)) ."". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) .""; } $output .= ""; @@ -729,7 +729,7 @@ function comment_admin_overview() { $output .= "\n"; $output .= " \n"; while ($comment = db_fetch_object($result)) { - $output .= " \n"; + $output .= " \n"; } $output .= "
subjectauthordateoperations
". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid ."#". $comment->cid)) ."". format_name($comment) ."". format_date($comment->timestamp, "small") ."". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."
". l(check_output($comment->subject), array("id" => $comment->nid, "cid" => $comment->cid, "pid" => $comment->pid), "node", $comment->cid) ."". format_name($comment) ."". format_date($comment->timestamp, "small") ."". la(t("edit comment"), array("mod" => comment, "op" => edit, "id" => $comment->cid)) ."". la(t("delete comment"), array("mod" => "comment", "op" => "delete", "id" => $comment->cid)) ."
\n"; -- cgit v1.2.3