Commit 78420241 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter

#50771, Wrong user name in admin/comment, patach by Markus Petrux

parent 539994e2
...@@ -957,6 +957,7 @@ function comment_admin_overview($type = 'new') { ...@@ -957,6 +957,7 @@ function comment_admin_overview($type = 'new') {
$destination = drupal_get_destination(); $destination = drupal_get_destination();
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comments[$comment->cid] = ''; $comments[$comment->cid] = '';
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, 'comment-'. $comment->cid)); $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, 'comment-'. $comment->cid));
$form['username'][$comment->cid] = array('#value' => theme('username', $comment)); $form['username'][$comment->cid] = array('#value' => theme('username', $comment));
$form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small')); $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
......
...@@ -957,6 +957,7 @@ function comment_admin_overview($type = 'new') { ...@@ -957,6 +957,7 @@ function comment_admin_overview($type = 'new') {
$destination = drupal_get_destination(); $destination = drupal_get_destination();
while ($comment = db_fetch_object($result)) { while ($comment = db_fetch_object($result)) {
$comments[$comment->cid] = ''; $comments[$comment->cid] = '';
$comment->name = $comment->uid ? $comment->registered_name : $comment->name;
$form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, 'comment-'. $comment->cid)); $form['subject'][$comment->cid] = array('#value' => l($comment->subject, 'node/'. $comment->nid, array('title' => truncate_utf8($comment->comment, 128)), NULL, 'comment-'. $comment->cid));
$form['username'][$comment->cid] = array('#value' => theme('username', $comment)); $form['username'][$comment->cid] = array('#value' => theme('username', $comment));
$form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small')); $form['timestamp'][$comment->cid] = array('#value' => format_date($comment->timestamp, 'small'));
......
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