Merge "jquery.tablesorter: Remove dead node check in getElementSortKey()"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 8 Mar 2019 20:52:52 +0000 (20:52 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 8 Mar 2019 20:52:52 +0000 (20:52 +0000)
.phpcs.xml
RELEASE-NOTES-1.33
autoload.php
includes/TemplateParser.php
includes/WebResponse.php
includes/filerepo/file/File.php
includes/htmlform/fields/HTMLInfoField.php
includes/jobqueue/aggregator/JobQueueAggregator.php
includes/jobqueue/aggregator/JobQueueAggregatorNull.php [new file with mode: 0644]
includes/registration/ExtensionRegistry.php
languages/Language.php

index b877c96..5a639ad 100644 (file)
                <exclude-pattern>*/includes/gallery/PackedOverlayImageGallery\.php</exclude-pattern>
                <exclude-pattern>*/includes/HistoryBlob\.php</exclude-pattern>
                <exclude-pattern>*/includes/htmlform/HTMLFormElement\.php</exclude-pattern>
-               <exclude-pattern>*/includes/jobqueue/aggregator/JobQueueAggregator\.php</exclude-pattern>
                <exclude-pattern>*/includes/libs/filebackend/FileBackendStore\.php</exclude-pattern>
                <exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
                <exclude-pattern>*/includes/libs/filebackend/SwiftFileBackend\.php</exclude-pattern>
index cff2853..b9331bc 100644 (file)
@@ -282,6 +282,8 @@ because of Phabricator reports.
     AuthManagerAuthPlugin, and AuthManagerAuthPluginUser.
   * The $wgAuth configuration setting and its use in Setup.php and unit tests
 * (T217772) The 'wgAvailableSkins' mw.config key in JavaScript, was removed.
+* Language::markNoConversion, deprecated in 1.32, has been removed. Use
+  LanguageConverter::markNoConversion instead.
 
 === Deprecations in 1.33 ===
 * The configuration option $wgUseESI has been deprecated, and is expected
index fab10fe..be37737 100644 (file)
@@ -705,7 +705,7 @@ $wgAutoloadLocalClasses = [
        'Job' => __DIR__ . '/includes/jobqueue/Job.php',
        'JobQueue' => __DIR__ . '/includes/jobqueue/JobQueue.php',
        'JobQueueAggregator' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php',
-       'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregator.php',
+       'JobQueueAggregatorNull' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorNull.php',
        'JobQueueAggregatorRedis' => __DIR__ . '/includes/jobqueue/aggregator/JobQueueAggregatorRedis.php',
        'JobQueueConnectionError' => __DIR__ . '/includes/jobqueue/exception/JobQueueConnectionError.php',
        'JobQueueDB' => __DIR__ . '/includes/jobqueue/JobQueueDB.php',
index 75494b1..11a8e85 100644 (file)
@@ -220,6 +220,6 @@ class TemplateParser {
         */
        public function processTemplate( $templateName, $args, array $scopes = [] ) {
                $template = $this->getTemplate( $templateName );
-               return call_user_func( $template, $args, $scopes );
+               return $template( $args, $scopes );
        }
 }
index 9396a41..45cc7df 100644 (file)
@@ -205,7 +205,7 @@ class WebResponse {
                                wfDebugLog( 'cookie', 'already set ' . $func . ': "' . implode( '", "', $data ) . '"' );
                        } else {
                                wfDebugLog( 'cookie', $func . ': "' . implode( '", "', $data ) . '"' );
-                               if ( call_user_func_array( $func, array_values( $data ) ) ) {
+                               if ( $func( ...array_values( $data ) ) ) {
                                        self::$setCookies[$key] = $deleting ? null : [ $func, $data ];
                                }
                        }
index 923484a..c3b5199 100644 (file)
@@ -207,7 +207,7 @@ abstract class File implements IDBAccessObject {
                if ( !is_callable( $function ) ) {
                        return null;
                } else {
-                       $this->$name = call_user_func( $function );
+                       $this->$name = $function();
 
                        return $this->$name;
                }
index c0dbf50..b4aab4a 100644 (file)
@@ -22,7 +22,7 @@ class HTMLInfoField extends HTMLFormField {
        public function getDefault() {
                $default = parent::getDefault();
                if ( $default instanceof Closure ) {
-                       $default = call_user_func( $default, $this->mParams );
+                       $default = $default( $this->mParams );
                }
                return $default;
        }
index 27ad88e..b44fc45 100644 (file)
@@ -157,24 +157,3 @@ abstract class JobQueueAggregator {
                return $pendingDBs;
        }
 }
-
-/**
- * @ingroup JobQueue
- */
-class JobQueueAggregatorNull extends JobQueueAggregator {
-       protected function doNotifyQueueEmpty( $wiki, $type ) {
-               return true;
-       }
-
-       protected function doNotifyQueueNonEmpty( $wiki, $type ) {
-               return true;
-       }
-
-       protected function doGetAllReadyWikiQueues() {
-               return [];
-       }
-
-       protected function doPurge() {
-               return true;
-       }
-}
diff --git a/includes/jobqueue/aggregator/JobQueueAggregatorNull.php b/includes/jobqueue/aggregator/JobQueueAggregatorNull.php
new file mode 100644 (file)
index 0000000..c44d70e
--- /dev/null
@@ -0,0 +1,42 @@
+<?php
+/**
+ * Job queue aggregator code.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup JobQueue
+ */
+class JobQueueAggregatorNull extends JobQueueAggregator {
+       protected function doNotifyQueueEmpty( $wiki, $type ) {
+               return true;
+       }
+
+       protected function doNotifyQueueNonEmpty( $wiki, $type ) {
+               return true;
+       }
+
+       protected function doGetAllReadyWikiQueues() {
+               return [];
+       }
+
+       protected function doPurge() {
+               return true;
+       }
+}
index 88d9fd3..e3df499 100644 (file)
@@ -374,7 +374,7 @@ class ExtensionRegistry {
                                }
                                throw new UnexpectedValueException( "callback '$cb' is not callable" );
                        }
-                       call_user_func( $cb, $info['credits'][$name] );
+                       $cb( $info['credits'][$name] );
                }
        }
 
index 3dbde01..bbf2576 100644 (file)
@@ -4331,32 +4331,6 @@ class Language {
                $this->mConverter->updateConversionTable( $title );
        }
 
-       /**
-        * Prepare external link text for conversion. When the text is
-        * a URL, it shouldn't be converted, and it'll be wrapped in
-        * the "raw" tag (-{R| }-) to prevent conversion.
-        *
-        * This function is called "markNoConversion" for historical
-        * reasons *BUT DIFFERS SIGNIFICANTLY* from
-        * LanguageConverter::markNoConversion(), with which it is easily
-        * confused.
-        *
-        * @param string $text Text to be used for external link
-        * @param bool $noParse Wrap it without confirming it's a real URL first
-        * @return string The tagged text
-        * @deprecated since 1.32, use LanguageConverter::markNoConversion()
-        *  instead.
-        */
-       public function markNoConversion( $text, $noParse = false ) {
-               wfDeprecated( __METHOD__, '1.32' );
-               // Excluding protocal-relative URLs may avoid many false positives.
-               if ( $noParse || preg_match( '/^(?:' . wfUrlProtocolsWithoutProtRel() . ')/', $text ) ) {
-                       return $this->mConverter->markNoConversion( $text );
-               } else {
-                       return $text;
-               }
-       }
-
        /**
         * A regular expression to match legal word-trailing characters
         * which should be merged onto a link of the form [[foo]]bar.