Merge "Don't pass USE INDEX to a $dbType parameter" into REL1_31
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 19 Apr 2018 22:15:03 +0000 (22:15 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 19 Apr 2018 22:15:03 +0000 (22:15 +0000)
RELEASE-NOTES-1.31
includes/DefaultSettings.php
includes/api/ApiUserrights.php
resources/src/jquery/jquery.makeCollapsible.css
resources/src/jquery/jquery.makeCollapsible.js

index 97b8f43..de2abdd 100644 (file)
@@ -39,6 +39,10 @@ production.
 * $wgValidateAllHtml was removed and will be ignored.
 * $wgScriptExtension was removed (deprecated and ignored since 1.25).
   See 1.25 release notes for more information.
+* $wgUseAjax is now marked as deprecated, just like the deprecated AJAX
+  framework that it enables. Some extensions mistakenly used this to check
+  whether any AJAX functionality at all should be enabled, further making this
+  problematic to retain.
 
 === New features in 1.31 ===
 * (T76554) User sub-pages named ….json are now protected in the same way that ….js
index 9922410..004a70e 100644 (file)
@@ -8125,6 +8125,8 @@ $wgAPIUselessQueryPages = [
 
 /**
  * Enable AJAX framework
+ *
+ * @deprecated (officially) since MediaWiki 1.31
  */
 $wgUseAjax = true;
 
index 56c2c84..47f3bc5 100644 (file)
@@ -100,7 +100,7 @@ class ApiUserrights extends ApiBase {
                $tags = $params['tags'];
 
                // Check if user can add tags
-               if ( !is_null( $tags ) ) {
+               if ( $tags !== null ) {
                        $ableToTag = ChangeTags::canAddTagsAccompanyingChange( $tags, $pUser );
                        if ( !$ableToTag->isOK() ) {
                                $this->dieStatus( $ableToTag );
@@ -112,8 +112,9 @@ class ApiUserrights extends ApiBase {
                $r['user'] = $user->getName();
                $r['userid'] = $user->getId();
                list( $r['added'], $r['removed'] ) = $form->doSaveUserGroups(
+                       // Don't pass null to doSaveUserGroups() for array params, cast to empty array
                        $user, (array)$add, (array)$params['remove'],
-                       $params['reason'], $tags, $groupExpiries
+                       $params['reason'], (array)$tags, $groupExpiries
                );
 
                $result = $this->getResult();
index 693cd7f..6364c70 100644 (file)
@@ -6,10 +6,10 @@
        -ms-user-select: none;
        user-select: none;
 }
-.mw-collapsible-toggle:before {
+.mw-collapsible-toggle-default:before {
        content: '[';
 }
-.mw-collapsible-toggle:after {
+.mw-collapsible-toggle-default:after {
        content: ']';
 }
 /* Align the toggle based on the direction of the content language */
index 7826bab..1f40e0a 100644 (file)
                        buildDefaultToggleLink = function () {
                                return $( '<a class="mw-collapsible-text"></a>' )
                                        .text( collapseText )
-                                       .wrap( '<span class="mw-collapsible-toggle"></span>' )
+                                       .wrap( '<span class="mw-collapsible-toggle mw-collapsible-toggle-default"></span>' )
                                        .parent()
                                        .attr( {
                                                role: 'button',