Fix #2855: Credit for a uniq author showed its realname even with $wgAllowRealName...
authorAntoine Musso <hashar@users.mediawiki.org>
Sat, 13 Aug 2005 09:03:36 +0000 (09:03 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Sat, 13 Aug 2005 09:03:36 +0000 (09:03 +0000)
includes/Credits.php

index 8699c79..7131789 100644 (file)
@@ -68,15 +68,14 @@ function getCredits($article, $cnt, $showIfMax=true) {
  *
  */
 function getAuthorCredits($article) {
-    global $wgLang;
+    global $wgLang, $wgAllowRealName;
 
     $last_author = $article->getUser();
 
     if ($last_author == 0) {
                $author_credit = wfMsg('anonymous');
     } else {
-
-               $real_name = User::whoIsReal($last_author);
+               if($wgAllowRealName) { $real_name = User::whoIsReal($last_author); }
                $user_name = User::whoIs($last_author);
 
                if (!empty($real_name)) {