Extension talk:Discussion

Patch to display realname (if known) instead of username:

--- Discussion/Discussion.php.v03      2009-11-26 15:11:46.000000000 +0100 +++ Discussion/Discussion.php  2009-11-26 15:19:15.000000000 +0100 @@ -312,7 +312,15 @@       while ( ( $comment = $dbr->fetchObject( $res ) ) ) {               $author = strtr($comment->author_name, array('<'=>'&lt;', '>'=>'&gt;')); -              if ($comment->user_id) $author = "$author"; +       $realname = User::whoIsReal(User::idFromName($author)); + +              if ($comment->user_id && isset($realname)) +       { +            $author = "$realname"; +              } elseif ($comment->user_id) +       { +            $author = "$author"; +       }

$author = str_replace('|', '#1', str_replace('#', '#0', $author)); $text  = str_replace('|', '#1', str_replace('#', '#0', $comment->text));