From f1296ef2d21c887679c952ffb2583be5340413ec Mon Sep 17 00:00:00 2001 From: Rob Church Date: Fri, 30 Dec 2005 04:52:50 +0000 Subject: [PATCH] * (bug 4426) Add link to user_talk page on image pages --- RELEASE-NOTES | 1 + includes/ImagePage.php | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 608ff6f41e..1638b5e28e 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/ImagePage.php b/includes/ImagePage.php index d5b4cb01c2..31fe0837cc 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -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 = "
  • ({$dlink}) ({$rlink}) {$datetime} . . {$userlink} . . {$widthheight} ({$nbytes})"; + $s = "
  • ({$dlink}) ({$rlink}) {$datetime} . . {$userdata} . . {$widthheight} ({$nbytes})"; $s .= $this->skin->commentBlock( $description, $wgTitle ); $s .= "
  • \n"; -- 2.20.1