Merge "OOjs UI: Fix #gatherPreInfuseState called incorrectly, causing TypeErrors"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 25 Feb 2016 15:48:55 +0000 (15:48 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 25 Feb 2016 15:48:55 +0000 (15:48 +0000)
includes/Message.php
includes/content/Content.php
includes/content/MessageContent.php
includes/content/TextContent.php
includes/content/WikitextContent.php
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
tests/phpunit/mocks/content/DummyContentForTesting.php
tests/phpunit/mocks/content/DummyNonTextContent.php

index 4056f38..9d5f5e6 100644 (file)
@@ -810,7 +810,7 @@ class Message implements MessageSpecifier, Serializable {
 
        /**
         * Magic method implementation of the above (for PHP >= 5.2.0), so we can do, eg:
-        *     $foo = Message::get( $key );
+        *     $foo = new Message( $key );
         *     $string = "<abbr>$foo</abbr>";
         *
         * @since 1.18
index 76881bc..931128f 100644 (file)
@@ -243,7 +243,7 @@ interface Content {
         *
         * @since 1.21
         *
-        * @param bool $hasLinks If it is known whether this content contains
+        * @param bool|null $hasLinks If it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out.
         *
index e3f9375..4b58989 100644 (file)
@@ -136,7 +136,7 @@ class MessageContent extends AbstractContent {
        }
 
        /**
-        * @param bool $hasLinks
+        * @param bool|null $hasLinks
         *
         * @return bool Always false.
         *
index baea812..225522e 100644 (file)
@@ -92,7 +92,7 @@ class TextContent extends AbstractContent {
         * Returns true if this content is not a redirect, and $wgArticleCountMethod
         * is "any".
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         *
         * @return bool
index c1fef7c..a63819d 100644 (file)
@@ -258,10 +258,10 @@ class WikitextContent extends TextContent {
         * Returns true if this content is not a redirect, and this content's text
         * is countable according to the criteria defined by $wgArticleCountMethod.
         *
-        * @param bool $hasLinks If it is known whether this content contains
+        * @param bool|null $hasLinks If it is known whether this content contains
         *    links, provide this information here, to avoid redundant parsing to
         *    find out (default: null).
-        * @param Title $title Optional title, defaults to the title from the current main request.
+        * @param Title|null $title Optional title, defaults to the title from the current main request.
         *
         * @return bool
         */
index bd1cad6..06d1538 100644 (file)
 
                        // I'm surprised this doesn't seem to exist in jQuery or mw.util.
                        params = {};
-                       hash = hash.replace( '+', '%20' );
+                       hash = hash.replace( /\+/g, '%20' );
                        re = /([^&=#]+)=?([^&#]*)/g;
                        while ( ( m = re.exec( hash ) ) ) {
                                params[ decodeURIComponent( m[ 1 ] ) ] = decodeURIComponent( m[ 2 ] );
index 0c69027..cdb3f78 100644 (file)
@@ -82,7 +82,7 @@ class DummyContentForTesting extends AbstractContent {
         * Returns true if this content is countable as a "real" wiki page, provided
         * that it's also in a countable location (e.g. a current revision in the main namespace).
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         * @return bool
         */
index 889efb7..afc1a4a 100644 (file)
@@ -82,7 +82,7 @@ class DummyNonTextContent extends AbstractContent {
         * Returns true if this content is countable as a "real" wiki page, provided
         * that it's also in a countable location (e.g. a current revision in the main namespace).
         *
-        * @param bool $hasLinks If it is known whether this content contains links,
+        * @param bool|null $hasLinks If it is known whether this content contains links,
         * provide this information here, to avoid redundant parsing to find out.
         * @return bool
         */