r97406 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97405‎ | r97406 | r97407 >
Date:05:03, 18 September 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
Fix lowercase test added in r97405
* (bug 30843) mediawiki.Title should not convert extensions (anything after the last full stop) to lower case
* Follows-up r97405
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.Title.js (modified) (history)
  • /trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
@@ -93,10 +93,10 @@
9494 equal( title.getNamespacePrefix(), 'File:' );
9595 equal( title.getName(), 'Foo_bar' );
9696 equal( title.getNameText(), 'Foo bar' );
97 - equal( title.getMain(), 'Foo_bar.jpg' );
98 - equal( title.getMainText(), 'Foo bar.jpg' );
99 - equal( title.getExtension(), 'jpg' );
100 - equal( title.getDotExtension(), '.jpg' );
 97+ equal( title.getMain(), 'Foo_bar.JPG' );
 98+ equal( title.getMainText(), 'Foo bar.JPG' );
 99+ equal( title.getExtension(), 'JPG' );
 100+ equal( title.getDotExtension(), '.JPG' );
101101 });
102102
103103 test( 'Namespace detection and conversion', function() {
@@ -106,7 +106,7 @@
107107 var title;
108108
109109 title = new mw.Title( 'something.PDF', 6 );
110 - equal( title.toString(), 'File:Something.pdf' );
 110+ equal( title.toString(), 'File:Something.PDF' );
111111
112112 title = new mw.Title( 'NeilK', 3 );
113113 equal( title.toString(), 'User_talk:NeilK' );
Index: trunk/phase3/resources/mediawiki/mediawiki.Title.js
@@ -71,7 +71,7 @@
7272 * Sanitize name.
7373 */
7474 fixExt = function( s ) {
75 - return clean( s.toLowerCase() );
 75+ return clean( s );
7676 },
7777
7878 /**

Follow-up revisions

RevisionCommit summaryAuthorDate
r97407Release-notes for bug 30843 / r97405 / r97406krinkle05:05, 18 September 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97405Add extra unit test in Transformation for mediawiki.Title...krinkle04:58, 18 September 2011

Comments

#Comment by Krinkle (talk | contribs)   05:05, 18 September 2011

Fairly major bug in the module. Tagging for backporting, also include r97405 in the merge (depends on it)

#Comment by Catrope (talk | contribs)   11:32, 18 September 2011

Untagging 1.18, mw.Title doesn't even exist in REL1_18.

Status & tagging log