if ( count( $tags ) ) {
$out = Html::rawElement(
'h2',
- array( 'class' => 'mw-headline plainlinks' ),
+ array(
+ 'class' => 'mw-headline plainlinks',
+ 'id' => 'mw-version-parser-extensiontags',
+ ),
Linker::makeExternalLink(
'//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Tag_extensions',
$this->msg( 'version-parser-extensiontags' )->parse(),
if ( count( $fhooks ) ) {
$out = Html::rawElement(
'h2',
- array( 'class' => 'mw-headline plainlinks' ),
+ array(
+ 'class' => 'mw-headline plainlinks',
+ 'id' => 'mw-version-parser-function-hooks',
+ ),
Linker::makeExternalLink(
'//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Parser_functions',
$this->msg( 'version-parser-function-hooks' )->parse(),
// Properties
this.limit = config.limit || 10;
- this.namespace = config.namespace || null;
+ this.namespace = config.namespace !== undefined ? config.namespace : null;
this.relative = config.relative !== undefined ? config.relative : true;
this.showRedirectTargets = config.showRedirectTargets !== false;
this.showRedlink = !!config.showRedlink;
imageUrl: OO.getProp( suggestionPage, 'thumbnail', 'source' ),
description: OO.getProp( suggestionPage, 'terms', 'description' )
};
- titles.push( suggestionPage.title );
+
+ // Throw away pages from wrong namespaces. This can happen when 'showRedirectTargets' is true
+ // and we encounter a cross-namespace redirect.
+ if ( this.namespace === null || this.namespace === suggestionPage.ns ) {
+ titles.push( suggestionPage.title );
+ }
redirects = redirectsTo[suggestionPage.title] || [];
for ( i = 0, len = redirects.length; i < len; i++ ) {