Merge "Add linktrail for Latvian"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 22 Jul 2015 19:48:45 +0000 (19:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 22 Jul 2015 19:48:45 +0000 (19:48 +0000)
includes/specials/SpecialVersion.php
resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js

index 0a91957..4fb6772 100644 (file)
@@ -575,7 +575,10 @@ class SpecialVersion extends SpecialPage {
                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(),
@@ -615,7 +618,10 @@ class SpecialVersion extends SpecialPage {
                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(),
index bee5920..66b009f 100644 (file)
@@ -38,7 +38,7 @@
 
                // 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++ ) {