r77668 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77667‎ | r77668 | r77669 >
Date:18:48, 3 December 2010
Author:btongminh
Status:ok
Tags:
Comment:
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListfiles.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)
  • /trunk/phase3/maintenance/language/messages.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/language/messages.inc
@@ -1948,6 +1948,7 @@
19491949 'sp-contributions-newbies-title',
19501950 'sp-contributions-blocklog',
19511951 'sp-contributions-deleted',
 1952+ 'sp-contributions-uploads',
19521953 'sp-contributions-logs',
19531954 'sp-contributions-talk',
19541955 'sp-contributions-userrights',
Index: trunk/phase3/includes/specials/SpecialListfiles.php
@@ -48,7 +48,7 @@
4949 $this->mDefaultDirection = false;
5050 }
5151
52 - $userName = $wgRequest->getText( 'username', $par );
 52+ $userName = $wgRequest->getText( 'user', $par );
5353 if ( $userName ) {
5454 $nt = Title::newFromText( $userName, NS_USER );
5555 if ( !is_null( $nt ) ) {
@@ -204,10 +204,10 @@
205205 'id' => 'mw-ilsearch',
206206 ) );
207207 }
208 - $inputForm['username'] = Html::input( 'username', $this->mUserName, 'text', array(
 208+ $inputForm['username'] = Html::input( 'user', $this->mUserName, 'text', array(
209209 'size' => '40',
210210 'maxlength' => '255',
211 - 'id' => 'mw-listfiles-username',
 211+ 'id' => 'mw-listfiles-user',
212212 ) );
213213 $s = Html::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript, 'id' => 'mw-listfiles-form' ) ) .
214214 Xml::fieldset( wfMsg( 'listfiles' ) ) .
Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -227,6 +227,14 @@
228228 )
229229 );
230230 }
 231+ # Uploads
 232+ $tools[] = $sk->linkKnown(
 233+ SpecialPage::getTitleFor( 'Listfiles' ),
 234+ wfMsgHtml( 'sp-contributions-uploads' ),
 235+ array(),
 236+ array( 'user' => $nt->getText() )
 237+ );
 238+
231239 # Other logs link
232240 $tools[] = $sk->linkKnown(
233241 SpecialPage::getTitleFor( 'Log' ),
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -2925,6 +2925,7 @@
29262926 'sp-contributions-newbies-title' => 'User contributions for new accounts',
29272927 'sp-contributions-blocklog' => 'block log',
29282928 'sp-contributions-deleted' => 'deleted user contributions',
 2929+'sp-contributions-uploads' => 'uploads',
29292930 'sp-contributions-logs' => 'logs',
29302931 'sp-contributions-talk' => 'talk',
29312932 'sp-contributions-userrights' => 'user rights management',
Index: trunk/phase3/RELEASE-NOTES
@@ -214,6 +214,7 @@
215215 Parameters: $1 shows the formatted textsize in Byte/KB/MB, $2 is the raw
216216 number of the textsize in Byte
217217 * (bug 3276) Give image <gallery>s fluid width
 218+* Added uploads link to page subtitle in Special:Contributions
218219
219220 === Bug fixes in 1.17 ===
220221 * (bug 17560) Half-broken deletion moved image files to deletion archive

Status & tagging log