Merge "API: Allow redirecting a page to itself using action=edit"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 10 Dec 2014 15:26:30 +0000 (15:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 10 Dec 2014 15:26:30 +0000 (15:26 +0000)
includes/Title.php
includes/api/ApiPageSet.php
includes/api/ApiStashEdit.php
includes/changes/OldChangesList.php
includes/libs/GenericArrayObject.php
includes/libs/IPSet.php
includes/libs/XmlTypeCheck.php
includes/resourceloader/ResourceLoaderSkinModule.php
includes/specialpage/WantedQueryPage.php
includes/specials/SpecialWantedfiles.php
tests/qunit/suites/resources/jquery/jquery.mwExtension.test.js

index 638da08..0a9b433 100644 (file)
@@ -747,7 +747,7 @@ class Title {
         * @param string $title The DB key form the title
         * @param string $fragment The link fragment (after the "#")
         * @param string $interwiki The interwiki prefix
-        * @param boolean $canoncialNamespace If true, use the canonical name for
+        * @param bool $canoncialNamespace If true, use the canonical name for
         *   $ns instead of the localized version.
         * @return string The prefixed form of the title
         */
index 39cd6d9..c70629a 100644 (file)
@@ -1213,7 +1213,7 @@ class ApiPageSet extends ApiBase {
         *
         * @param ApiResult|array &$result
         * @param array $path
-        * @return boolean Whether the data fit
+        * @return bool Whether the data fit
         */
        public function populateGeneratorData( &$result, array $path = array() ) {
                if ( $result instanceof ApiResult ) {
index b32d332..2f9f37e 100644 (file)
@@ -159,7 +159,7 @@ class ApiStashEdit extends ApiBase {
         * @param ParserOptions $pstOpts Options for $pstContent (MUST be for prospective author)
         * @param ParserOptions $pOpts Options for $pOut
         * @param string $timestamp TS_MW timestamp of parser output generation
-        * @return boolean Success
+        * @return bool Success
         */
        public static function stashEditFromPreview(
                Page $page, Content $content, Content $pstContent, ParserOutput $pOut,
index 4eed926..c9602cc 100644 (file)
@@ -73,7 +73,7 @@ class OldChangesList extends ChangesList {
        /**
         * @param RecentChange $rc
         * @param string[] &$classes
-        * @param boolean $watched
+        * @param bool $watched
         *
         * @return string
         */
index db8a7ec..93ae83b 100644 (file)
@@ -117,7 +117,7 @@ abstract class GenericArrayObject extends ArrayObject {
         *
         * @param mixed $value
         *
-        * @return boolean
+        * @return bool
         */
        protected function hasValidType( $value ) {
                $class = $this->getObjectType();
@@ -171,7 +171,7 @@ abstract class GenericArrayObject extends ArrayObject {
         * @param integer|string $index
         * @param mixed $value
         *
-        * @return boolean
+        * @return bool
         */
        protected function preSetElement( $index, $value ) {
                return true;
@@ -232,7 +232,7 @@ abstract class GenericArrayObject extends ArrayObject {
         *
         * @since 1.20
         *
-        * @return boolean
+        * @return bool
         */
        public function isEmpty() {
                return $this->count() === 0;
index 3b9f1a8..c1c841e 100644 (file)
@@ -162,7 +162,7 @@ class IPSet {
         * Match an IP address against the set
         *
         * @param string $ip string IPv[46] address
-        * @return boolean true is match success, false is match failure
+        * @return bool true is match success, false is match failure
         *
         * If $ip is unparseable, inet_pton may issue an E_WARNING to that effect
         */
index aca857e..0d6c3a6 100644 (file)
@@ -70,7 +70,7 @@ class XmlTypeCheck {
         *        SAX element handler event. This gives you access to the element
         *        namespace, name, attributes, and text contents.
         *        Filter should return 'true' to toggle on $this->filterMatch
-        * @param boolean $isFile (optional) indicates if the first parameter is a
+        * @param bool $isFile (optional) indicates if the first parameter is a
         *        filename (default, true) or if it is a string (false)
         * @param array $options list of additional parsing options:
         *        processing_instruction_handler: Callback for xml_set_processing_instruction_handler
index 6de1be0..9835932 100644 (file)
@@ -41,7 +41,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
 
        /**
         * @param $context ResourceLoaderContext
-        * @return boolean
+        * @return bool
         */
        public function isKnownEmpty( ResourceLoaderContext $context ) {
                // Regardless of whether the files are specified, we always
index ce28de5..c4140de 100644 (file)
@@ -109,7 +109,7 @@ abstract class WantedQueryPage extends QueryPage {
         * @note This will only be run if the page is cached (ie $wgMiserMode = true)
         *   unless forceExistenceCheck() is true.
         * @since 1.24
-        * @return boolean
+        * @return bool
         */
        protected function existenceCheck( Title $title ) {
                return $title->isKnown();
index 16127d9..8a1a6c6 100644 (file)
@@ -99,7 +99,7 @@ class WantedFilesPage extends WantedQueryPage {
         * Use wfFindFile so we still think file namespace pages without
         * files are missing, but valid file redirects and foreign files are ok.
         *
-        * @return boolean
+        * @return bool
         */
        protected function existenceCheck( Title $title ) {
                return (bool)wfFindFile( $title );
index 7571b92..795c2bb 100644 (file)
                assert.equal( $.escapeRE( '0123456789' ), '0123456789', 'escapeRE - Leave numbers alone' );
        } );
 
-       QUnit.test( 'Is functions', 15, function ( assert ) {
-               assert.strictEqual( $.isDomElement( document.getElementById( 'qunit-header' ) ), true,
-                       'isDomElement: #qunit-header Node' );
-               assert.strictEqual( $.isDomElement( document.getElementById( 'random-name' ) ), false,
-                       'isDomElement: #random-name (null)' );
+       QUnit.test( 'isDomElement', 6, function ( assert ) {
+               assert.strictEqual( $.isDomElement( document.createElement( 'div' ) ), true,
+                       'isDomElement: HTMLElement' );
+               assert.strictEqual( $.isDomElement( document.createTextNode( '' ) ), true,
+                       'isDomElement: TextNode' );
+               assert.strictEqual( $.isDomElement( null ), false,
+                       'isDomElement: null' );
                assert.strictEqual( $.isDomElement( document.getElementsByTagName( 'div' ) ), false,
-                       'isDomElement: getElementsByTagName Array' );
-               assert.strictEqual( $.isDomElement( document.getElementsByTagName( 'div' )[0] ), true,
-                       'isDomElement: getElementsByTagName(..)[0] Node' );
+                       'isDomElement: NodeList' );
                assert.strictEqual( $.isDomElement( $( 'div' ) ), false,
-                       'isDomElement: jQuery object' );
-               assert.strictEqual( $.isDomElement( $( 'div' ).get( 0 ) ), true,
-                       'isDomElement: jQuery object > Get node' );
-               assert.strictEqual( $.isDomElement( document.createElement( 'div' ) ), true,
-                       'isDomElement: createElement' );
+                       'isDomElement: jQuery' );
                assert.strictEqual( $.isDomElement( { foo: 1 } ), false,
-                       'isDomElement: Object' );
+                       'isDomElement: Plain Object' );
+       } );
 
+       QUnit.test( 'isEmpty', 7, function ( assert ) {
                assert.strictEqual( $.isEmpty( 'string' ), false, 'isEmpty: "string"' );
                assert.strictEqual( $.isEmpty( '0' ), true, 'isEmpty: "0"' );
                assert.strictEqual( $.isEmpty( '' ), true, 'isEmpty: ""' );