Index: trunk/extensions/ParserFunctions/ParserFunctions.php |
— | — | @@ -329,8 +329,10 @@ |
330 | 330 | return $this->ifexistCommon( $parser, false, $title, $then, $else ); |
331 | 331 | } |
332 | 332 | |
333 | | - function ifexistCommon( &$parser, $frame, $title = '', $then = '', $else = '' ) { |
334 | | - $title = Title::newFromText( $title ); |
| 333 | + function ifexistCommon( &$parser, $frame, $titletext = '', $then = '', $else = '' ) { |
| 334 | + global $wgContLang; |
| 335 | + $title = Title::newFromText( $titletext ); |
| 336 | + $wgContLang->findVariantLink( $titletext, $title, true ); |
335 | 337 | if ( $title ) { |
336 | 338 | if( $title->getNamespace() == NS_MEDIA ) { |
337 | 339 | /* If namespace is specified as NS_MEDIA, then we want to |