-function getAuthorCredits($article) {
- global $wgLang;
-
- $last_author = $article->getUser();
-
- if ($last_author == 0) {
- $author_credit = wfMsg('anonymous');
- } else {
-
- $real_name = User::whoIsReal($last_author);
- $user_name = User::whoIs($last_author);
-
- if (!empty($real_name)) {
- $author_credit = creditLink($user_name, $real_name);
+function getAuthorCredits($article) {
+ global $wgLang, $wgAllowRealName;
+
+ $last_author = $article->getUser();
+
+ if ($last_author == 0) {
+ $author_credit = wfMsg('anonymous');
+ } else {
+ if($wgAllowRealName) { $real_name = User::whoIsReal($last_author); }
+ $user_name = User::whoIs($last_author);
+
+ if (!empty($real_name)) {
+ $author_credit = creditLink($user_name, $real_name);
+ } else {
+ $author_credit = wfMsg('siteuser', creditLink($user_name));
+ }
+ }
+
+ $timestamp = $article->getTimestamp();
+ if ($timestamp) {
+ $d = $wgLang->date($article->getTimestamp(), true);
+ $t = $wgLang->time($article->getTimestamp(), true);