* (bug 4426) Add link to user_talk page on image pages
authorRob Church <robchurch@users.mediawiki.org>
Fri, 30 Dec 2005 04:52:50 +0000 (04:52 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Fri, 30 Dec 2005 04:52:50 +0000 (04:52 +0000)
RELEASE-NOTES
includes/ImagePage.php

index 608ff6f..1638b5e 100644 (file)
@@ -373,6 +373,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Removed Special:Validate, it's been superseded by the Review extension
 * (bug 4424) Update for Spanish language (es) 100% messages translated
 * (bug 4425) Typos in Polish translation
+* (bug 4426) Add link to user_talk page on image pages
 
 === Caveats ===
 
index d5b4cb0..31fe083 100644 (file)
@@ -684,7 +684,7 @@ class ImageHistoryList {
        }
 
        function imageHistoryLine( $iscur, $timestamp, $img, $user, $usertext, $size, $description, $width, $height ) {
-               global $wgUser, $wgLang, $wgTitle;
+               global $wgUser, $wgLang, $wgTitle, $wgContLang;
 
                $datetime = $wgLang->timeanddate( $timestamp, true );
                $del = wfMsg( 'deleteimg' );
@@ -724,15 +724,15 @@ class ImageHistoryList {
                if ( 0 == $user ) {
                        $userlink = $usertext;
                } else {
-                       $userlink = $this->skin->makeLinkObj(
-                               Title::makeTitle( NS_USER, $usertext ),
-                               $usertext );
+                       $userlink = $this->skin->makeLinkObj( Title::makeTitle( NS_USER, $usertext ), $usertext );
+                       $usertalk = $this->skin->makeLinkObj( Title::makeTitle( NS_USER_TALK, $usertext), $wgContLang->getNsText( NS_TALK ) );
+                       $userdata = $userlink . ' (' . $usertalk . ')';
                }
                $nbytes = wfMsg( 'nbytes', $size );
                $widthheight = wfMsg( 'widthheight', $width, $height );
                $style = $this->skin->getInternalLinkAttributes( $url, $datetime );
 
-               $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userlink} . . {$widthheight} ({$nbytes})";
+               $s = "<li> ({$dlink}) ({$rlink}) <a href=\"{$url}\"{$style}>{$datetime}</a> . . {$userdata} . . {$widthheight} ({$nbytes})";
 
                $s .= $this->skin->commentBlock( $description, $wgTitle );
                $s .= "</li>\n";