* Let the {{#ifexist}} works with encoded URLs too. See testcase http://test.wikipedia.org/wiki/User:Raymond/ifexist

* Update URL in extension credits
This commit is contained in:
Raimond Spekking 2008-07-09 13:26:53 +00:00
parent a2feae1592
commit b18e373656

View file

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