Added uploads link to page subtitle in Special:Contributions
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 3 Dec 2010 18:48:11 +0000 (18:48 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Fri, 3 Dec 2010 18:48:11 +0000 (18:48 +0000)
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
includes/specials/SpecialContributions.php
includes/specials/SpecialListfiles.php
languages/messages/MessagesEn.php
maintenance/language/messages.inc

index 8e02e78..86e3f72 100644 (file)
@@ -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 <gallery>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
index cc2f8ac..a01030c 100644 (file)
@@ -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' ),
index 97b318b..bbea46d 100644 (file)
@@ -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' ) ) .
index 147b233..670ac45 100644 (file)
@@ -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',
index d97b72a..27a159f 100644 (file)
@@ -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',