r37420 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r37419‎ | r37420 | r37421 >
Date:17:46, 9 July 2008
Author:brion
Status:old
Tags:
Comment:
Revert r37387 "Let the {{#ifexist}} works with encoded URLs too. See testcase"
Causes regression for titles containing "+".
Proper fix here is to move the existing % decoding into Title::newFromText or Title::secureAndSplit so it's done automatically, rather than attempting to replicate it, with the potential of getting it wrong like this, every place we decide to accept titles
Modified paths:
  • /trunk/extensions/ParserFunctions/ParserFunctions.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ParserFunctions/ParserFunctions.php
@@ -6,13 +6,11 @@
77
88 $wgExtensionFunctions[] = 'wfSetupParserFunctions';
99 $wgExtensionCredits['parserhook'][] = array(
10 - 'name' => 'ParserFunctions',
11 - 'version' => '1.1.2',
12 - 'svn-date' => '$LastChangedDate$',
13 - 'svn-revision' => '$LastChangedRevision$',
14 - 'url' => 'http://meta.wikimedia.org/wiki/Help:ParserFunctions',
15 - 'author' => 'Tim Starling',
16 - 'description' => 'Enhance parser with logical functions',
 10+ 'name' => 'ParserFunctions',
 11+ 'version' => '1.1.1',
 12+ 'url' => 'http://meta.wikimedia.org/wiki/ParserFunctions',
 13+ 'author' => 'Tim Starling',
 14+ 'description' => 'Enhance parser with logical functions',
1715 'descriptionmsg' => 'pfunc_desc',
1816 );
1917
@@ -330,7 +328,7 @@
331329 }
332330
333331 function ifexistCommon( &$parser, $frame, $title = '', $then = '', $else = '' ) {
334 - $title = Title::newFromText( urldecode( $title ) );
 332+ $title = Title::newFromText( $title );
335333 if ( $title ) {
336334 if( $title->getNamespace() == NS_MEDIA ) {
337335 /* If namespace is specified as NS_MEDIA, then we want to
Property changes on: trunk/extensions/ParserFunctions/ParserFunctions.php
___________________________________________________________________
Deleted: svn:keywords
338336 - LastChangedDate LastChangedRevision

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r37387* Let the {{#ifexist}} works with encoded URLs too. See testcase http://test.......raymond13:26, 9 July 2008

Status & tagging log