r97558 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97557‎ | r97558 | r97559 >
Date:21:16, 19 September 2011
Author:brion
Status:ok
Tags:
Comment:
* (bug 30977) Remove directions cruft, undo random limitation of input format for Special:Filepath

Reverts r43471 which forced Special:FilePath's input to not accept titles with the File: or Image: namespace on them, or otherwise requiring any normalization beyond space/underscore.
Also removes the extra line saying 'input the name without the file: prefix' which used the native namespace name, which prompted a question about its formatting in mixed-directionality contexts.
Modified paths:
  • /trunk/phase3/includes/specials/SpecialFilepath.php (modified) (history)
  • /trunk/phase3/languages/messages/MessagesEn.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialFilepath.php
@@ -39,7 +39,7 @@
4040 $request = $this->getRequest();
4141 $file = !is_null( $par ) ? $par : $request->getText( 'file' );
4242
43 - $title = Title::makeTitleSafe( NS_FILE, $file );
 43+ $title = Title::newFromText( $file, NS_FILE );
4444
4545 if ( ! $title instanceof Title || $title->getNamespace() != NS_FILE ) {
4646 $this->showForm( $title );
Index: trunk/phase3/languages/messages/MessagesEn.php
@@ -4503,10 +4503,8 @@
45044504 'filepath-page' => 'File:',
45054505 'filepath-submit' => 'Go',
45064506 'filepath-summary' => 'This special page returns the complete path for a file.
4507 -Images are shown in full resolution, other file types are started with their associated program directly.
 4507+Images are shown in full resolution, other file types are started with their associated program directly.',
45084508
4509 -Enter the file name without the "{{ns:file}}:" prefix.',
4510 -
45114509 # Special:FileDuplicateSearch
45124510 'fileduplicatesearch' => 'Search for duplicate files',
45134511 'fileduplicatesearch-summary' => 'Search for duplicate files based on hash values.',

Follow-up revisions

RevisionCommit summaryAuthorDate
r97559MFT r97558: fix/eliminate bug 30977 and restore Special:FilePath's input vali...brion21:18, 19 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r43471Fix incorrect use of Title::newFromText(). That function lets the user choose...tstarling00:44, 14 November 2008

Status & tagging log