From 7936ca36d5c291a66c63d99476fb0a51696a631f Mon Sep 17 00:00:00 2001 From: Bryan Tong Minh Date: Fri, 3 Dec 2010 18:48:11 +0000 Subject: [PATCH] Added uploads link to page subtitle in Special:Contributions Changed query parameter for the username in Special:Listfiles from username to user, which seems to be more consistent with the rest of MediaWiki. Searching by username was introduced in 1.17, so there should be no existing links that can be broken. --- RELEASE-NOTES | 1 + includes/specials/SpecialContributions.php | 8 ++++++++ includes/specials/SpecialListfiles.php | 6 +++--- languages/messages/MessagesEn.php | 1 + maintenance/language/messages.inc | 1 + 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 8e02e788b1..86e3f72875 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -214,6 +214,7 @@ LocalSettings.php. The specific bugs are listed below in the general notes. Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw number of the textsize in Byte * (bug 3276) Give image s fluid width +* Added uploads link to page subtitle in Special:Contributions === Bug fixes in 1.17 === * (bug 17560) Half-broken deletion moved image files to deletion archive diff --git a/includes/specials/SpecialContributions.php b/includes/specials/SpecialContributions.php index cc2f8ac4d6..a01030c05f 100644 --- a/includes/specials/SpecialContributions.php +++ b/includes/specials/SpecialContributions.php @@ -227,6 +227,14 @@ class SpecialContributions extends SpecialPage { ) ); } + # Uploads + $tools[] = $sk->linkKnown( + SpecialPage::getTitleFor( 'Listfiles' ), + wfMsgHtml( 'sp-contributions-uploads' ), + array(), + array( 'user' => $nt->getText() ) + ); + # Other logs link $tools[] = $sk->linkKnown( SpecialPage::getTitleFor( 'Log' ), diff --git a/includes/specials/SpecialListfiles.php b/includes/specials/SpecialListfiles.php index 97b318b05a..bbea46da17 100644 --- a/includes/specials/SpecialListfiles.php +++ b/includes/specials/SpecialListfiles.php @@ -48,7 +48,7 @@ class ImageListPager extends TablePager { $this->mDefaultDirection = false; } - $userName = $wgRequest->getText( 'username', $par ); + $userName = $wgRequest->getText( 'user', $par ); if ( $userName ) { $nt = Title::newFromText( $userName, NS_USER ); if ( !is_null( $nt ) ) { @@ -204,10 +204,10 @@ class ImageListPager extends TablePager { 'id' => 'mw-ilsearch', ) ); } - $inputForm['username'] = Html::input( 'username', $this->mUserName, 'text', array( + $inputForm['username'] = Html::input( 'user', $this->mUserName, 'text', array( 'size' => '40', 'maxlength' => '255', - 'id' => 'mw-listfiles-username', + 'id' => 'mw-listfiles-user', ) ); $s = Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) . Xml::fieldset( wfMsg( 'listfiles' ) ) . diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 147b233e16..670ac45888 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -2925,6 +2925,7 @@ $1', 'sp-contributions-newbies-title' => 'User contributions for new accounts', 'sp-contributions-blocklog' => 'block log', 'sp-contributions-deleted' => 'deleted user contributions', +'sp-contributions-uploads' => 'uploads', 'sp-contributions-logs' => 'logs', 'sp-contributions-talk' => 'talk', 'sp-contributions-userrights' => 'user rights management', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index d97b72a508..27a159f07c 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -1948,6 +1948,7 @@ $wgMessageStructure = array( 'sp-contributions-newbies-title', 'sp-contributions-blocklog', 'sp-contributions-deleted', + 'sp-contributions-uploads', 'sp-contributions-logs', 'sp-contributions-talk', 'sp-contributions-userrights', -- 2.20.1