Commit bb71ce1f authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#186480 by John Morahan: update chameleon_comment() to latest Drupal API

parent 13f98829
...@@ -152,15 +152,15 @@ function chameleon_node($node, $teaser = 0, $page = 0) { ...@@ -152,15 +152,15 @@ function chameleon_node($node, $teaser = 0, $page = 0) {
return $output; return $output;
} }
function chameleon_comment($comment, $links = "") { function chameleon_comment($comment, $node, $links = array()) {
$submitted['comment_submitted'] = array( $submitted['comment_submitted'] = array(
'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))), 'title' => t('By !author at @date', array('!author' => theme('username', $comment), '@date' => format_date($comment->timestamp, 'small'))),
'html' => TRUE); 'html' => TRUE);
$output = "<div class=\"comment". ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') ."\">\n"; $output = "<div class=\"comment". ($comment->status == COMMENT_NOT_PUBLISHED ? ' comment-unpublished' : '') ."\">\n";
$output .= " <h3 class=\"title\">". l($comment->subject, $_GET['q'], NULL, NULL, "comment-$comment->cid") ."</h3>\n"; $output .= " <h3 class=\"title\">". l($comment->subject, $_GET['q'], array('fragment' => "comment-$comment->cid")) ."</h3>\n";
$output .= " <div class=\"content\">". $comment->comment; $output .= " <div class=\"content\">". $comment->comment;
if ($signature) { if (!empty($signature)) {
$output .= " <div class=\"clear-block\">"; $output .= " <div class=\"clear-block\">";
$output .= "<div></div>\n"; $output .= "<div></div>\n";
$output .= $signature ."\n"; $output .= $signature ."\n";
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment