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
This commit is contained in:
Brion Vibber 2008-07-09 17:46:09 +00:00
parent b18e373656
commit b6589d2a07

View file

@ -6,13 +6,11 @@ if ( !defined( 'MEDIAWIKI' ) ) {
$wgExtensionFunctions[] = 'wfSetupParserFunctions';
$wgExtensionCredits['parserhook'][] = array(
'name' => 'ParserFunctions',
'version' => '1.1.2',
'svn-date' => '$LastChangedDate$',
'svn-revision' => '$LastChangedRevision$',
'url' => 'http://meta.wikimedia.org/wiki/Help:ParserFunctions',
'author' => 'Tim Starling',
'description' => 'Enhance parser with logical functions',
'name' => 'ParserFunctions',
'version' => '1.1.1',
'url' => 'http://meta.wikimedia.org/wiki/ParserFunctions',
'author' => 'Tim Starling',
'description' => 'Enhance parser with logical functions',
'descriptionmsg' => 'pfunc_desc',
);
@ -330,7 +328,7 @@ class ExtParserFunctions {
}
function ifexistCommon( &$parser, $frame, $title = '', $then = '', $else = '' ) {
$title = Title::newFromText( urldecode( $title ) );
$title = Title::newFromText( $title );
if ( $title ) {
if( $title->getNamespace() == NS_MEDIA ) {
/* If namespace is specified as NS_MEDIA, then we want to