Merge "Add support for new Japanese era name "Reiwa""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Mon, 22 Apr 2019 03:35:58 +0000 (03:35 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 22 Apr 2019 03:35:58 +0000 (03:35 +0000)
RELEASE-NOTES-1.33
RELEASE-NOTES-1.34
includes/MWNamespace.php
includes/libs/rdbms/database/Database.php
includes/linker/LinkRenderer.php
includes/registration/ExtensionRegistry.php
includes/user/User.php
resources/src/jquery/jquery.suggestions.js
tests/phpunit/includes/title/NamespaceInfoTest.php

index 30512ac..f9b2826 100644 (file)
@@ -117,6 +117,8 @@ For notes on 1.32.x and older releases, see HISTORY.
 * (T213893) Added 'MaintenanceUpdateAddParams' hook
 * (T219655) The MarkPatrolled hook has a new parameter for the tags
   associated with this entry in the patrol log.
+* (T212472) Extensions can now specify platform abilities they require to work,
+  limited to shell access for now.
 
 === External library changes in 1.33 ===
 
index 9e8195b..901cd01 100644 (file)
@@ -101,9 +101,13 @@ because of Phabricator reports.
   SearchEngine::create(), SearchEngine::getSearchTypes() and
   SearchEngine::getNearMatch(), methods deprecated in 1.27, have been removed.
 * FileRepo::streamFile(), deprecated in 1.26, has been removed.
+* User::randomPassword() method, deprecated in 1.27, have been removed.
+* MWNamespace::canTalk(), deprecated in 1.30, have been removed.
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
+* ExtensionRegistry->load() is deprecated, as it breaks dependency checking.
+  Instead, use ->queue().
 * …
 
 === Other changes in 1.34 ===
index 1529473..0121bd5 100644 (file)
@@ -176,19 +176,6 @@ class MWNamespace {
                return MediaWikiServices::getInstance()->getNamespaceInfo()->getValidNamespaces();
        }
 
-       /**
-        * Does this namespace ever have a talk namespace?
-        *
-        * @deprecated since 1.30, use hasTalkNamespace() instead.
-        *
-        * @param int $index Namespace index
-        * @return bool True if this namespace either is or has a corresponding talk namespace.
-        */
-       public static function canTalk( $index ) {
-               wfDeprecated( __METHOD__, '1.30' );
-               return self::hasTalkNamespace( $index );
-       }
-
        /**
         * Does this namespace ever have a talk namespace?
         *
index beca663..6e30d3f 100644 (file)
@@ -2713,8 +2713,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                }
 
                // We can't separate explicit JOIN clauses with ',', use ' ' for those
-               $implicitJoins = $ret ? implode( ',', $ret ) : "";
-               $explicitJoins = $retJOIN ? implode( ' ', $retJOIN ) : "";
+               $implicitJoins = implode( ',', $ret );
+               $explicitJoins = implode( ' ', $retJOIN );
 
                // Compile our final table clause
                return implode( ' ', [ $implicitJoins, $explicitJoins ] );
index d096b00..c77b156 100644 (file)
@@ -293,7 +293,7 @@ class LinkRenderer {
                return $this->makePreloadedLink(
                        $target,
                        $text,
-                       $classes ? implode( ' ', $classes ) : '',
+                       implode( ' ', $classes ),
                        $extraAttribs,
                        $query
                );
index 2607e5a..fb89731 100644 (file)
@@ -413,10 +413,12 @@ class ExtensionRegistry {
         *
         * If some extensions are already queued, this will load
         * those as well.
-        *
+        * TODO: Remove in MediaWiki 1.35
+        * @deprecated since 1.34, use ExtensionRegistry->queue() instead
         * @param string $path Absolute path to the JSON file
         */
        public function load( $path ) {
+               wfDeprecated( __METHOD__, '1.34' );
                $this->loadFromQueue(); // First clear the queue
                $this->queue( $path );
                $this->loadFromQueue();
index 981204d..33d216d 100644 (file)
@@ -1290,17 +1290,6 @@ class User implements IDBAccessObject, UserIdentity {
                return $name;
        }
 
-       /**
-        * Return a random password.
-        *
-        * @deprecated since 1.27, use PasswordFactory::generateRandomPasswordString()
-        * @return string New random password
-        */
-       public static function randomPassword() {
-               global $wgMinimalPasswordLength;
-               return PasswordFactory::generateRandomPasswordString( $wgMinimalPasswordLength );
-       }
-
        /**
         * Set cached properties to default.
         *
index d9a094c..a585cf3 100644 (file)
                configure: function ( context, property, value ) {
                        var newCSS,
                                $result, $results, $spanForWidth, childrenWidth,
+                               regionIsFixed, regionPosition,
                                i, expWidth, maxWidth, text;
 
                        // Validate creation using fallback values
                                                        // Rebuild the suggestions list
                                                        context.data.$container.show();
                                                        // Update the size and position of the list
+                                                       regionIsFixed = ( function () {
+                                                               var $el = context.config.$region;
+                                                               do {
+                                                                       if ( $el.css( 'position' ) === 'fixed' ) {
+                                                                               return true;
+                                                                       }
+                                                                       $el = $( $el[ 0 ].offsetParent );
+                                                               } while ( $el.length );
+                                                               return false;
+                                                       }() );
+                                                       regionPosition = regionIsFixed ?
+                                                               context.config.$region[ 0 ].getBoundingClientRect() :
+                                                               context.config.$region.offset();
                                                        newCSS = {
-                                                               top: context.config.$region.offset().top + context.config.$region.outerHeight(),
+                                                               position: regionIsFixed ? 'fixed' : 'absolute',
+                                                               top: regionPosition.top + context.config.$region.outerHeight(),
                                                                bottom: 'auto',
                                                                width: context.config.$region.outerWidth(),
                                                                height: 'auto'
                                                                                        expandFrom = 'start';
                                                                                } else {
                                                                                        // Calculate the center points of the input and document
-                                                                                       regionCenter = $region.offset().left + regionWidth / 2;
+                                                                                       regionCenter = regionPosition.left + regionWidth / 2;
                                                                                        docCenter = docWidth / 2;
                                                                                        if ( Math.abs( regionCenter - docCenter ) < ( 0.10 * docCenter ) ) {
                                                                                                // If the input's center is within 10% of the document center
 
                                                        if ( context.config.expandFrom === 'left' ) {
                                                                // Expand from left
-                                                               newCSS.left = context.config.$region.offset().left;
+                                                               newCSS.left = regionPosition.left;
                                                                newCSS.right = 'auto';
                                                        } else {
                                                                // Expand from right
                                                                newCSS.left = 'auto';
-                                                               newCSS.right = $( 'body' ).width() - ( context.config.$region.offset().left + context.config.$region.outerWidth() );
+                                                               newCSS.right = $( 'body' ).width() - ( regionPosition.left + context.config.$region.outerWidth() );
                                                        }
 
                                                        context.data.$container.css( newCSS );
index cc7df8d..21b6468 100644 (file)
@@ -246,19 +246,6 @@ class NamespaceInfoTest extends MediaWikiTestCase {
                $this->assertSame( $actual, $expected, "NS $index" );
        }
 
-       /**
-        * @dataProvider provideHasTalkNamespace
-        * @covers MWNamespace::canTalk
-        *
-        * @param int $index
-        * @param bool $expected
-        */
-       public function testCanTalk( $index, $expected ) {
-               $this->hideDeprecated( 'MWNamespace::canTalk' );
-               $actual = MWNamespace::canTalk( $index );
-               $this->assertSame( $actual, $expected, "NS $index" );
-       }
-
        private function assertIsContent( $ns ) {
                $this->assertTrue( $this->obj->isContent( $ns ) );
        }