Merge "Lowered $wgUpdateRowsPerJob to avoid slave lag"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 24 Sep 2015 18:20:25 +0000 (18:20 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 24 Sep 2015 18:20:25 +0000 (18:20 +0000)
44 files changed:
RELEASE-NOTES-1.26
UPGRADE
includes/GlobalFunctions.php
includes/HtmlFormatter.php
includes/Import.php
includes/User.php
includes/actions/RollbackAction.php
includes/api/ApiFormatPhp.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryDeletedRevisions.php
includes/changes/EnhancedChangesList.php
includes/db/DatabaseMysqlBase.php
includes/db/DatabaseSqlite.php
includes/filerepo/file/LocalFile.php
includes/installer/Installer.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderModule.php
includes/site/MediaWikiSite.php
includes/specials/SpecialUserlogin.php
languages/Language.php
languages/Names.php
languages/i18n/en.json
languages/i18n/qqq.json
languages/messages/MessagesOlo.php [new file with mode: 0644]
maintenance/archives/patch-archive_ar_revid.sql
maintenance/archives/patch-backlinkindexes.sql
maintenance/archives/patch-categorylinksindex.sql
maintenance/cleanupPreferences.php
resources/Resources.php
resources/src/mediawiki.special/mediawiki.special.upload.js
resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
tests/parser/parserTests.txt
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/HtmlFormatterTest.php
tests/phpunit/includes/ImportTest.php
tests/phpunit/includes/actions/ActionTest.php
tests/phpunit/includes/api/ApiBlockTest.php
tests/phpunit/includes/api/ApiUploadTest.php
tests/phpunit/includes/api/format/ApiFormatPhpTest.php
tests/phpunit/includes/parser/PreprocessorTest.php
tests/phpunit/suite.xml
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js

index 99fc2eb..d4150eb 100644 (file)
@@ -151,6 +151,8 @@ changes to languages because of Phabricator reports.
 ** dty (डोटेली/Doteli), thanks to translators जनक राज भट्ट, बिप्लब आनन्द,
    मेश सिंह बोहरा, and राम प्रसाद जोशी
 ** luz (لئری دوٙمینی / Southern Luri)
+** olo (Livvinкarjala / Livvi-Karelian), thanks to translators Denö, Hiloin Natoi,
+   Ilja.mos, and Mashoi7
 
 === Other changes in 1.26 ===
 * ChangeTags::tagDescription() will return false if the interface message
diff --git a/UPGRADE b/UPGRADE
index 1ff98cd..088701a 100644 (file)
--- a/UPGRADE
+++ b/UPGRADE
@@ -5,7 +5,7 @@ specific problems, check
 * the documentation at https://www.mediawiki.org
 * the mediawiki-l mailing list archive at
   http://lists.wikimedia.org/pipermail/mediawiki-l/
-* the bug tracker at https://bugzilla.wikimedia.org
+* the bug tracker at https://phabricator.wikimedia.org
 
 for information and workarounds to common issues.
 
index 486926f..404d2cf 100644 (file)
@@ -635,7 +635,7 @@ function wfExpandUrl( $url, $defaultProto = PROTO_CURRENT ) {
        $bits = wfParseUrl( $url );
 
        // ensure proper port for HTTPS arrives in URL
-       // https://bugzilla.wikimedia.org/show_bug.cgi?id=65184
+       // https://phabricator.wikimedia.org/T67184
        if ( $defaultProto === PROTO_HTTPS && $wgHttpsPort != 443 ) {
                $bits['port'] = $wgHttpsPort;
        }
index 221cefb..83db268 100644 (file)
@@ -75,7 +75,7 @@ class HtmlFormatter {
 
                        // Workaround for bug that caused spaces before references
                        // to disappear during processing:
-                       // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086
+                       // https://phabricator.wikimedia.org/T55086
                        //
                        // Please replace with a better fix if one can be found.
                        $html = str_replace( ' <', '&#32;<', $html );
index 6a0bfd0..db4a6b2 100644 (file)
@@ -728,13 +728,14 @@ class WikiImporter {
                                        $title = $this->processTitle( $pageInfo['title'],
                                                isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null );
 
-                                       if ( !$title ) {
+                                       // $title is either an array of two titles or false.
+                                       if ( is_array( $title ) ) {
+                                               $this->pageCallback( $title );
+                                               list( $pageInfo['_title'], $foreignTitle ) = $title;
+                                       } else {
                                                $badTitle = true;
                                                $skip = true;
                                        }
-
-                                       $this->pageCallback( $title );
-                                       list( $pageInfo['_title'], $foreignTitle ) = $title;
                                }
 
                                if ( $title ) {
@@ -750,10 +751,17 @@ class WikiImporter {
                        }
                }
 
-               $this->pageOutCallback( $pageInfo['_title'], $foreignTitle,
+               // @note $pageInfo is only set if a valid $title is processed above with
+               //       no error. If we have a valid $title, then pageCallback is called
+               //       above, $pageInfo['title'] is set and we do pageOutCallback here.
+               //       If $pageInfo['_title'] is not set, then $foreignTitle is also not
+               //       set since they both come from $title above.
+               if ( array_key_exists( '_title', $pageInfo ) ) {
+                       $this->pageOutCallback( $pageInfo['_title'], $foreignTitle,
                                        $pageInfo['revisionCount'],
                                        $pageInfo['successfulRevisionCount'],
                                        $pageInfo );
+               }
        }
 
        /**
index 22c90cd..d57dfaa 100644 (file)
@@ -1694,6 +1694,7 @@ class User implements IDBAccessObject {
                        foreach ( (array)$bases as $base ) {
                                // Make hostname
                                // If we have an access key, use that too (ProjectHoneypot, etc.)
+                               $basename = $base;
                                if ( is_array( $base ) ) {
                                        if ( count( $base ) >= 2 ) {
                                                // Access key is 1, base URL is 0
@@ -1701,6 +1702,7 @@ class User implements IDBAccessObject {
                                        } else {
                                                $host = "$ipReversed.{$base[0]}";
                                        }
+                                       $basename = $base[0];
                                } else {
                                        $host = "$ipReversed.$base";
                                }
@@ -1709,11 +1711,11 @@ class User implements IDBAccessObject {
                                $ipList = gethostbynamel( $host );
 
                                if ( $ipList ) {
-                                       wfDebugLog( 'dnsblacklist', "Hostname $host is {$ipList[0]}, it's a proxy says $base!" );
+                                       wfDebugLog( 'dnsblacklist', "Hostname $host is {$ipList[0]}, it's a proxy says $basename!" );
                                        $found = true;
                                        break;
                                } else {
-                                       wfDebugLog( 'dnsblacklist', "Requested $host, not found in $base." );
+                                       wfDebugLog( 'dnsblacklist', "Requested $host, not found in $basename." );
                                }
                        }
                }
index 93669cf..70d7d16 100644 (file)
@@ -109,7 +109,7 @@ class RollbackAction extends FormlessAction {
                $this->getOutput()->returnToMain( false, $this->getTitle() );
 
                if ( !$request->getBool( 'hidediff', false ) &&
-                       !$this->getUser()->getBoolOption( 'norollbackdiff', false )
+                       !$this->getUser()->getBoolOption( 'norollbackdiff' )
                ) {
                        $contentHandler = $current->getContentHandler();
                        $de = $contentHandler->createDifferenceEngine(
index 6420a5b..df9d581 100644 (file)
@@ -69,7 +69,7 @@ class ApiFormatPhp extends ApiFormatBase {
                ) {
                        $this->dieUsage(
                                'This response cannot be represented using format=php. ' .
-                               'See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+                               'See https://phabricator.wikimedia.org/T68776',
                                'internalerror'
                        );
                }
index 172ee99..4f7984e 100644 (file)
@@ -54,7 +54,6 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                $params = $this->extractRequestParams( false );
 
                $result = $this->getResult();
-               $pageSet = $this->getPageSet();
 
                // This module operates in two modes:
                // 'user': List deleted revs by a certain user
index bf48b19..fa1dfc2 100644 (file)
@@ -46,7 +46,6 @@ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase {
                        );
                }
 
-               $result = $this->getResult();
                $pageSet = $this->getPageSet();
                $pageMap = $pageSet->getGoodAndMissingTitlesByNamespace();
                $pageCount = count( $pageSet->getGoodAndMissingTitles() );
index d912e3a..1dcb7ae 100644 (file)
@@ -283,6 +283,10 @@ class EnhancedChangesList extends ChangesList {
                // Further down are some assumptions that $block is a 0-indexed array
                // with (count-1) as last key. Let's make sure it is.
                $block = array_values( $block );
+               if ( empty( $block ) ) {
+                       // if we can't show anything, don't display this block altogether
+                       return '';
+               }
 
                $r .= $this->getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden );
 
@@ -453,6 +457,10 @@ class EnhancedChangesList extends ChangesList {
         * @return string
         */
        protected function getLogText( $block, $queryParams, $allLogs, $isnew, $namehidden ) {
+               if ( empty( $block ) ) {
+                       return '';
+               }
+
                # Changes message
                static $nchanges = array();
                static $sinceLastVisitMsg = array();
index be34242..160c354 100644 (file)
@@ -138,7 +138,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
 
                if ( $set ) {
                        // Use doQuery() to avoid opening implicit transactions (DBO_TRX)
-                       $success = $this->doQuery( 'SET ' . implode( ', ', $set ), __METHOD__ );
+                       $success = $this->doQuery( 'SET ' . implode( ', ', $set ) );
                        if ( !$success ) {
                                wfLogDBError(
                                        'Error setting MySQL variables on server {db_server} (check $wgSQLMode)',
@@ -302,7 +302,7 @@ abstract class DatabaseMysqlBase extends DatabaseBase {
                // We are not checking for any errors here, since
                // these are no errors mysql_num_rows can cause.
                // See http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html.
-               // See https://bugzilla.wikimedia.org/42430
+               // See https://phabricator.wikimedia.org/T44430
                return $n;
        }
 
index 656547b..7ece56d 100644 (file)
@@ -806,7 +806,7 @@ class DatabaseSqlite extends DatabaseBase {
                        // https://bugs.php.net/bug.php?id=62361
                        // There is an additional bug regarding sorting this data after insert
                        // on older versions of sqlite shipped with ubuntu 12.04
-                       // https://bugzilla.wikimedia.org/show_bug.cgi?id=72367
+                       // https://phabricator.wikimedia.org/T74367
                        wfDebugLog( __CLASS__, __FUNCTION__ . ': Quoting value containing null byte. For consistency all binary data should have been first processed with self::encodeBlob()' );
                        return "x'" . bin2hex( $s ) . "'";
                } else {
index d2c37e6..4c9c2aa 100644 (file)
@@ -456,7 +456,7 @@ class LocalFile extends File {
        }
 
        /**
-        * @param array $row Row
+        * @param array|object $row
         * @param string $prefix
         * @throws MWException
         * @return array
index 662469b..72e11db 100644 (file)
@@ -534,7 +534,7 @@ abstract class Installer {
                // then some poorly-formed extensions try to call their own classes
                // after immediately registering them. We really need to get extension
                // registration out of the global scope and into a real format.
-               // @see https://bugzilla.wikimedia.org/67440
+               // @see https://phabricator.wikimedia.org/T69440
                global $wgAutoloadClasses;
                $wgAutoloadClasses = array();
 
@@ -1477,7 +1477,7 @@ abstract class Installer {
                 * want here is $wgHooks['LoadExtensionSchemaUpdates']. This won't work
                 * if the extension has hidden hook registration in $wgExtensionFunctions,
                 * but we're not opening that can of worms
-                * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=26857
+                * @see https://phabricator.wikimedia.org/T28857
                 */
                global $wgAutoloadClasses;
                $wgAutoloadClasses = array();
index 51118b1..ca10ab7 100644 (file)
@@ -417,21 +417,8 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                );
                // Collect referenced files
                $this->localFileRefs = array_unique( $this->localFileRefs );
-               // If the list has been modified since last time we cached it, update the cache
-               try {
-                       if ( $this->localFileRefs !== $this->getFileDependencies( $context->getSkin() ) ) {
-                               $dbw = wfGetDB( DB_MASTER );
-                               $dbw->replace( 'module_deps',
-                                       array( array( 'md_module', 'md_skin' ) ), array(
-                                               'md_module' => $this->getName(),
-                                               'md_skin' => $context->getSkin(),
-                                               'md_deps' => FormatJson::encode( $this->localFileRefs ),
-                                       )
-                               );
-                       }
-               } catch ( Exception $e ) {
-                       wfDebugLog( 'resourceloader', __METHOD__ . ": failed to update DB: $e" );
-               }
+               $this->saveFileDependencies( $context->getSkin(), $this->localFileRefs );
+
                return $styles;
        }
 
index 376b62c..80c8220 100644 (file)
@@ -374,12 +374,13 @@ abstract class ResourceLoaderModule {
 
        /**
         * Get the files this module depends on indirectly for a given skin.
-        * Currently these are only image files referenced by the module's CSS.
+        *
+        * These are only image files referenced by the module's stylesheet.
         *
         * @param string $skin Skin name
         * @return array List of files
         */
-       public function getFileDependencies( $skin ) {
+       protected function getFileDependencies( $skin ) {
                // Try in-object cache first
                if ( isset( $this->fileDeps[$skin] ) ) {
                        return $this->fileDeps[$skin];
@@ -405,8 +406,11 @@ abstract class ResourceLoaderModule {
        }
 
        /**
-        * Set preloaded file dependency information. Used so we can load this
-        * information for all modules at once.
+        * Set in-object cache for file dependencies.
+        *
+        * This is used to retrieve data in batches. See ResourceLoader::preloadModuleInfo().
+        * To save the data, use saveFileDependencies().
+        *
         * @param string $skin Skin name
         * @param array $deps Array of file names
         */
@@ -414,6 +418,31 @@ abstract class ResourceLoaderModule {
                $this->fileDeps[$skin] = $deps;
        }
 
+       /**
+        * Set the files this module depends on indirectly for a given skin.
+        *
+        * @since 1.26
+        * @param string $skin Skin name
+        * @param array $localFileRefs List of files
+        */
+       protected function saveFileDependencies( $skin, $localFileRefs ) {
+               try {
+                       // If the list has been modified since last time we cached it, update the cache
+                       if ( $localFileRefs !== $this->getFileDependencies( $skin ) ) {
+                               $dbw = wfGetDB( DB_MASTER );
+                               $dbw->replace( 'module_deps',
+                                       array( array( 'md_module', 'md_skin' ) ), array(
+                                               'md_module' => $this->getName(),
+                                               'md_skin' => $skin,
+                                               'md_deps' => FormatJson::encode( $localFileRefs ),
+                                       )
+                               );
+                       }
+               } catch ( Exception $e ) {
+                       wfDebugLog( 'resourceloader', __METHOD__ . ": failed to update DB: $e" );
+               }
+       }
+
        /**
         * Get the last modification timestamp of the messages in this module for a given language.
         * @param string $lang Language code
@@ -445,8 +474,10 @@ abstract class ResourceLoaderModule {
        }
 
        /**
-        * Set a preloaded message blob last modification timestamp. Used so we
-        * can load this information for all modules at once.
+        * Set in-object cache for message blob time.
+        *
+        * This is used to retrieve data in batches. See ResourceLoader::preloadModuleInfo().
+        *
         * @param string $lang Language code
         * @param int $mtime UNIX timestamp
         */
index 95631f8..029919c 100644 (file)
@@ -113,9 +113,9 @@ class MediaWikiSite extends Site {
                        return $t->getPrefixedText();
                } else {
 
-                       // Make sure the string is normalized into NFC (due to the bug 40017)
+                       // Make sure the string is normalized into NFC (due to T42017)
                        // but do nothing to the whitespaces, that should work appropriately.
-                       // @see https://bugzilla.wikimedia.org/show_bug.cgi?id=40017
+                       // @see https://phabricator.wikimedia.org/T42017
                        $pageName = UtfNormal\Validator::cleanUp( $pageName );
 
                        // Build the args for the specific call
index 21f1194..ee78a61 100644 (file)
@@ -1380,7 +1380,7 @@ class LoginForm extends SpecialPage {
 
                if ( $this->mType == 'signup' ) {
                        // XXX hack pending RL or JS parse() support for complex content messages
-                       // https://bugzilla.wikimedia.org/show_bug.cgi?id=25349
+                       // https://phabricator.wikimedia.org/T27349
                        $out->addJsConfigVars( 'wgCreateacctImgcaptchaHelp',
                                $this->msg( 'createacct-imgcaptcha-help' )->parse() );
 
index 1613536..8265d69 100644 (file)
@@ -2678,7 +2678,7 @@ class Language {
                # Even with //IGNORE iconv can whine about illegal characters in
                # *input* string. We just ignore those too.
                # REF: http://bugs.php.net/bug.php?id=37166
-               # REF: https://bugzilla.wikimedia.org/show_bug.cgi?id=16885
+               # REF: https://phabricator.wikimedia.org/T18885
                MediaWiki\suppressWarnings();
                $text = iconv( $in, $out . '//IGNORE', $string );
                MediaWiki\restoreWarnings();
index a81f17f..5a14003 100644 (file)
        'nv' => 'Diné bizaad', # Navajo
        'ny' => 'Chi-Chewa',    # Chichewa
        'oc' => 'occitan',              # Occitan
+       'olo' => 'Livvinкarjala',              # Livvi-Karelian
        'om' => 'Oromoo',               # Oromo
        'or' => 'ଓଡ଼ିଆ',              # Oriya
        'os' => 'Ирон', # Ossetic, bug 29091
index 2819dfb..3fc297c 100644 (file)
        "createacct-imgcaptcha-help": "",
        "createacct-imgcaptcha-ph": "Enter the text you see above",
        "createacct-submit": "Create your account",
-       "createacct-another-submit": "Create another account",
+       "createacct-another-submit": "Create account",
        "createacct-benefit-heading": "{{SITENAME}} is made by people like you.",
        "createacct-benefit-icon1": "icon-edits",
        "createacct-benefit-head1": "{{NUMBEROFEDITS}}",
        "upload-http-error": "An HTTP error occurred: $1",
        "upload-copy-upload-invalid-domain": "Copy uploads are not available from this domain.",
        "upload-dialog-title": "Upload file",
-       "upload-dialog-error": "An error occurred",
-       "upload-dialog-warning": "A warning occurred",
        "upload-dialog-button-cancel": "Cancel",
        "upload-dialog-button-done": "Done",
        "upload-dialog-button-save": "Save",
        "upload-dialog-button-upload": "Upload",
-       "upload-dialog-label-select-file": "Select file",
-       "upload-dialog-label-infoform-title": "Details",
-       "upload-dialog-label-infoform-name": "Name",
-       "upload-dialog-label-infoform-description": "Description",
-       "upload-dialog-label-usage-title": "Usage",
-       "upload-dialog-label-usage-filename": "File name",
+       "upload-process-error": "An error occurred",
+       "upload-process-warning": "A warning occurred",
+       "upload-form-label-select-file": "Select file",
+       "upload-form-label-infoform-title": "Details",
+       "upload-form-label-infoform-name": "Name",
+       "upload-form-label-infoform-description": "Description",
+       "upload-form-label-usage-title": "Usage",
+       "upload-form-label-usage-filename": "File name",
        "backend-fail-stream": "Could not stream file \"$1\".",
        "backend-fail-backup": "Could not backup file \"$1\".",
        "backend-fail-notexists": "The file $1 does not exist.",
        "emailccsubject": "Copy of your message to $1: $2",
        "emailsent": "Email sent",
        "emailsenttext": "Your email message has been sent.",
-       "emailuserfooter": "This email was sent by $1 to $2 by the \"{{int:emailuser}}\" function at {{SITENAME}}.",
+       "emailuserfooter": "This email was {{GENDER:$1|sent}} by $1 to {{GENDER:$2|$2}} by the \"{{int:emailuser}}\" function at {{SITENAME}}.",
        "usermessage-summary": "Leaving system message.",
        "usermessage-editor": "System messenger",
        "usermessage-template": "MediaWiki:UserMessage",
index 4474ec4..79d8a69 100644 (file)
        "upload-http-error": "Parameters:\n* $1 - error message",
        "upload-copy-upload-invalid-domain": "Error message shown if a user is trying to upload (i.e. copy) a file from a website that is not in $wgCopyUploadsDomains (if set).\n\nSee also:\n* {{msg-mw|http-invalid-url}}\n* {{msg-mw|tmp-create-error}}\n* {{msg-mw|tmp-write-error}}",
        "upload-dialog-title": "Title of the upload dialog box\n{{Identical|Upload file}}",
-       "upload-dialog-error": "Error message from upload",
-       "upload-dialog-warning": "Warning message from upload",
        "upload-dialog-button-cancel": "Button to cancel the dialog\n{{Identical|Cancel}}",
        "upload-dialog-button-done": "Button to close the dialog once upload is complete\n{{Identical|Done}}",
        "upload-dialog-button-save": "Button to save the file\n{{Identical|Save}}",
        "upload-dialog-button-upload": "Button to initiate upload\n{{Identical|Upload}}",
-       "upload-dialog-label-select-file": "Label for the select file widget\n{{Identical|Select file}}",
-       "upload-dialog-label-infoform-title": "Title for the information form\n{{Identical|Detail}}",
-       "upload-dialog-label-infoform-name": "Label for the file name input\n{{Identical|Name}}",
-       "upload-dialog-label-infoform-description": "Label for the file description input\n{{Identical|Description}}",
-       "upload-dialog-label-usage-title": "Title for the insert form showing how to use the uploaded item.\n{{Identical|Usage}}",
-       "upload-dialog-label-usage-filename": "Label for the file name input\n{{Identical|Filename}}",
+       "upload-process-error": "Error message from upload",
+       "upload-process-warning": "Warning message from upload",
+       "upload-form-label-select-file": "Label for the select file widget\n{{Identical|Select file}}",
+       "upload-form-label-infoform-title": "Title for the information form\n{{Identical|Detail}}",
+       "upload-form-label-infoform-name": "Label for the file name input\n{{Identical|Name}}",
+       "upload-form-label-infoform-description": "Label for the file description input\n{{Identical|Description}}",
+       "upload-form-label-usage-title": "Title for the insert form showing how to use the uploaded item.\n{{Identical|Usage}}",
+       "upload-form-label-usage-filename": "Label for the file name input\n{{Identical|Filename}}",
        "backend-fail-stream": "Parameters:\n* $1 - a filename",
        "backend-fail-backup": "Parameters:\n* $1 - a filename",
        "backend-fail-notexists": "Parameters:\n* $1 - a filename",
diff --git a/languages/messages/MessagesOlo.php b/languages/messages/MessagesOlo.php
new file mode 100644 (file)
index 0000000..ba3d364
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+/** Livvi-Karelian (Livvinкarjala)
+ *
+ * To improve a translation please visit https://translatewiki.net
+ *
+ * @ingroup Language
+ * @file
+ *
+ */
+
+$fallback = 'ru';
+
+$linkTrail = '/^([a-zčČšŠžŽäÄöÖ]+)(.*)$/sDu';
+
index 3b3fdee..f3b9c3c 100644 (file)
@@ -1,3 +1,3 @@
 -- Hopefully temporary index.
--- For https://bugzilla.wikimedia.org/show_bug.cgi?id=21279
+-- For https://phabricator.wikimedia.org/T23279
 CREATE INDEX /*i*/ar_revid ON /*$wgDBprefix*/archive ( ar_rev_id );
\ No newline at end of file
index 22cc587..9a991b8 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- patch-backlinkindexes.sql
 --
--- Per bug 6440 / http://bugzilla.wikimedia.org/show_bug.cgi?id=6440
+-- Per task T8440 / https://phabricator.wikimedia.org/T8440
 --
 -- Improve performance of the "what links here"-type queries
 --
index 24ad84f..e2b2c3a 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- patch-categorylinksindex.sql
 --
--- Per bug 10280 / http://bugzilla.wikimedia.org/show_bug.cgi?id=10280
+-- Per task T12280 / https://phabricator.wikimedia.org/T12280
 --
 -- Improve enum continuation performance of the what pages belong to a category query
 --
index 06ae17f..4e19b79 100644 (file)
@@ -19,7 +19,7 @@
  *
  * @file
  * @author TyA <tya.wiki@gmail.com>
- * @see [[bugzilla:30976]]
+ * @see https://phabricator.wikimedia.org/T32976
  * @ingroup Maintenance
  */
 
index fc0bed1..b35ebad 100644 (file)
@@ -1174,14 +1174,14 @@ return array(
                        'mediawiki.Upload',
                ),
                'messages' => array(
-                       'upload-dialog-error',
-                       'upload-dialog-warning',
-                       'upload-dialog-label-select-file',
-                       'upload-dialog-label-infoform-title',
-                       'upload-dialog-label-infoform-name',
-                       'upload-dialog-label-infoform-description',
-                       'upload-dialog-label-usage-title',
-                       'upload-dialog-label-usage-filename',
+                       'upload-process-error',
+                       'upload-process-warning',
+                       'upload-form-label-select-file',
+                       'upload-form-label-infoform-title',
+                       'upload-form-label-infoform-name',
+                       'upload-form-label-infoform-description',
+                       'upload-form-label-usage-title',
+                       'upload-form-label-usage-filename',
                ),
        ),
        'mediawiki.toc' => array(
index 677d26d..c6ae5ac 100644 (file)
                 *
                 * TODO: Is there a way we can ask the browser what's supported in `<img>`s?
                 *
-                * TODO: Put SVG back after working around Firefox 7 bug <https://bugzilla.wikimedia.org/show_bug.cgi?id=31643>
+                * TODO: Put SVG back after working around Firefox 7 bug <https://phabricator.wikimedia.org/T33643>
                 *
                 * @param {File} file
                 * @return {boolean}
index 0f85154..cb532c3 100644 (file)
                this.uploadPromise.always( function () {
 
                        if ( layout.upload.getState() === mw.Upload.State.ERROR ) {
-                               deferred.reject( new OO.ui.Error( mw.msg( 'upload-dialog-error' )  ) );
+                               deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-error' )  ) );
                                return false;
                        }
 
                        if ( layout.upload.getState() === mw.Upload.State.WARNING ) {
-                               deferred.reject( new OO.ui.Error( mw.msg( 'upload-dialog-error' )  ) );
+                               deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-error' )  ) );
                                return false;
                        }
 
                                var name;
 
                                if ( layout.upload.getState() === mw.Upload.State.ERROR ) {
-                                       deferred.reject( new OO.ui.Error( mw.msg( 'upload-dialog-error' ) ) );
+                                       deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-error' ) ) );
                                        return false;
                                }
 
                                if ( layout.upload.getState() === mw.Upload.State.WARNING ) {
-                                       deferred.reject( new OO.ui.Error( mw.msg( 'upload-dialog-warning' ) ) );
+                                       deferred.reject( new OO.ui.Error( mw.msg( 'upload-process-warning' ) ) );
                                        return false;
                                }
 
                var fieldset;
 
                this.selectFileWidget = new OO.ui.SelectFileWidget();
-               fieldset = new OO.ui.FieldsetLayout( { label: mw.msg( 'upload-dialog-label-select-file' ) } );
+               fieldset = new OO.ui.FieldsetLayout( { label: mw.msg( 'upload-form-label-select-file' ) } );
                fieldset.addItems( [ this.selectFileWidget ] );
                this.uploadForm = new OO.ui.FormLayout( { items: [ fieldset ] } );
 
                } );
 
                fieldset = new OO.ui.FieldsetLayout( {
-                       label: mw.msg( 'upload-dialog-label-infoform-title' )
+                       label: mw.msg( 'upload-form-label-infoform-title' )
                } );
                fieldset.addItems( [
                        new OO.ui.FieldLayout( this.filenameWidget, {
-                               label: mw.msg( 'upload-dialog-label-infoform-name' ),
+                               label: mw.msg( 'upload-form-label-infoform-name' ),
                                align: 'top'
                        } ),
                        new OO.ui.FieldLayout( this.descriptionWidget, {
-                               label: mw.msg( 'upload-dialog-label-infoform-description' ),
+                               label: mw.msg( 'upload-form-label-infoform-description' ),
                                align: 'top'
                        } )
                ] );
 
                this.filenameUsageWidget = new OO.ui.TextInputWidget();
                fieldset = new OO.ui.FieldsetLayout( {
-                       label: mw.msg( 'upload-dialog-label-usage-title' )
+                       label: mw.msg( 'upload-form-label-usage-title' )
                } );
                fieldset.addItems( [
                        new OO.ui.FieldLayout( this.filenameUsageWidget, {
-                               label: mw.msg( 'upload-dialog-label-usage-filename' ),
+                               label: mw.msg( 'upload-form-label-usage-filename' ),
                                align: 'top'
                        } )
                ] );
index 4c6c9a5..7719a28 100644 (file)
@@ -10354,12 +10354,52 @@ BUG 553: link with two variables in a piped link
 {|
 |[[{{{1}}}|{{{2}}}]]
 |}
-!! html
+!! html/php
 <table>
 <tr>
 <td>[[{{{1}}}|{{{2}}}]]
 </td></tr></table>
 
+!! html/parsoid
+<table>
+<tbody><tr><td>[[<span about="#mwt5" typeof="mw:Param" data-parsoid='{"src":"{{{1}}}"}'>{{{1}}}</span>|<span about="#mwt2" typeof="mw:Param" data-parsoid='{"src":"{{{2}}}"}'>{{{2}}}</span>]]</td></tr>
+!! end
+
+# See: T2553
+!! test
+Abort table cell attribute parsing on wikilink
+!! wikitext
+{|
+| testing [[one|two]] | three || four
+| testing one two | three || four
+|}
+!! html/php
+<table>
+<tr>
+<td> testing <a href="/index.php?title=One&amp;action=edit&amp;redlink=1" class="new" title="One (page does not exist)">two</a> | three </td>
+<td> four
+</td>
+<td> three </td>
+<td> four
+</td></tr></table>
+
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"autoInsertedEnd":true,"autoInsertedStart":true}'><td data-parsoid='{"autoInsertedEnd":true}'> testing <a rel="mw:WikiLink" href="./One" title="One" data-parsoid='{"stx":"piped","a":{"href":"./One"},"sa":{"href":"one"}}'>two</a> | three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td>
+<td data-parsoid='{"a":{"testing":null,"one":null,"two":null},"sa":{"testing":"","one":"","two":""},"autoInsertedEnd":true}'> three </td><td data-parsoid='{"stx_v":"row","autoInsertedEnd":true}'> four</td></tr>
+</tbody></table>
+!! end
+
+!! test
+Don't abort table cell attribute parsing if wikilink is found in template arg
+!! wikitext
+{|
+| Test {{#tag:ref|One two "[[three]]" four}}
+|}
+!! html/parsoid
+<table>
+<tbody><tr><td> Test <ref about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"#tag:ref","function":"#tag"},"params":{"1":{"wt":"One two \"[[three]]\" four"}},"i":0}}]}'>One two "<a rel="mw:WikiLink" href="./Three" title="Three">three</a>" four</ref></td></tr>
+</tbody></table>
 !! end
 
 !! test
@@ -11819,6 +11859,17 @@ Templates: Ugly templates: 6. Template encapsulation test: Cyclical nesting of t
 </table></td></tr></tbody></table>
 !! end
 
+!! test
+Templates: Parameters substituted at the top-level
+!! wikitext
+{{{foo|''who'' {{echo|me}}? '''never!'''}}}
+!! html/php
+<p><i>who</i> me? <b>never!</b>
+</p>
+!! html/parsoid
+<p about="#mwt2" typeof="mw:Param" data-parsoid="{&quot;src&quot;:&quot;{{{foo|''who'' {{echo|me}}? '''never!'''}}}&quot;}"><i>who</i> me? <b>never!</b></p>
+!! end
+
 !!test
 Parser Functions: 1. Simple example
 !! wikitext
@@ -17974,11 +18025,15 @@ Special:Search page linking.
 {{!}} is a magic word
 !! wikitext
 {{!}} is a magic word there and {{!}} is still a magic word here
+| is not a magic word here but {{!}} is still a magic word here
 !! html/php
 <p>| is a magic word there and | is still a magic word here
+| is not a magic word here but | is still a magic word here
 </p>
 !! html/parsoid
-<p><span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}' data-parsoid='{"pi":[[]]}'>|</span> is still a magic word here</p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is a magic word there and <span about="#mwt2" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here
+| is not a magic word here but <span about="#mwt3" typeof="mw:Transclusion" data-parsoid='{"pi":[[]]}' data-mw='{"parts":[{"template":{"target":{"wt":"!","href":"./Template:!"},"params":{},"i":0}}]}'>|</span> is still a magic word here</p>
+
 !! end
 
 !! test
@@ -23745,11 +23800,15 @@ RT-ed inter-element separators should be valid separators
 {|
 |- [[foo]]
 |}
-!! html
+!! html/php
 <table>
 
 </table>
 
+!! html/parsoid
+<table>
+<tbody><tr data-parsoid='{"startTagSrc":"|-","a":{"[[foo]]":null},"sa":{"[[foo]]":""},"autoInsertedEnd":true}'></tr>
+</tbody></table>
 !!end
 
 # Parsoid-only since PHP parser relies on Tidy for correct output
@@ -26060,6 +26119,37 @@ parsoid={
 </table>
 !! end
 
+## T111151 Remove font elements without attributes
+!! test
+5a. font tags without attributes should be dropped in scrubWikitext mode
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": true
+}
+!! html
+<font>foo</font>
+<font><font>bar</font></font>
+<font class="x">boo</font>
+!! wikitext
+foo
+bar
+<font class="x">boo</font>
+!! end
+
+!! test
+5b. font tags should not be dropped without scrubWikitext being enabled
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": false
+}
+!! html
+<font>foo</font>
+!! wikitext
+<font>foo</font>
+!! end
+
 !! test
 Escape nowiki DOM elements
 !! options
index 7dc7027..ec95665 100644 (file)
@@ -1151,7 +1151,7 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
 
        /**
         * Note: we are overriding this method to remove the deprecated error
-        * @see https://bugzilla.wikimedia.org/show_bug.cgi?id=69505
+        * @see https://phabricator.wikimedia.org/T71505
         * @see https://github.com/sebastianbergmann/phpunit/issues/1292
         * @deprecated
         *
index e89e36f..69dcd4c 100644 (file)
@@ -551,10 +551,10 @@ class GlobalTest extends MediaWikiTestCase {
 
        public static function provideMakeUrlIndexes() {
                return array(
+                       // Testcase for T30627
                        array(
-                               // just a regular :)
-                               'https://bugzilla.wikimedia.org/show_bug.cgi?id=28627',
-                               array( 'https://org.wikimedia.bugzilla./show_bug.cgi?id=28627' )
+                               'https://example.org/test.cgi?id=12345',
+                               array( 'https://org.example./test.cgi?id=12345' )
                        ),
                        array(
                                // mailtos are handled special
@@ -563,7 +563,7 @@ class GlobalTest extends MediaWikiTestCase {
                                array( 'mailto:org.wikimedia@wiki.' )
                        ),
 
-                       // file URL cases per bug 28627...
+                       // file URL cases per T30627...
                        array(
                                // three slashes: local filesystem path Unix-style
                                'file:///whatever/you/like.txt',
@@ -587,12 +587,12 @@ class GlobalTest extends MediaWikiTestCase {
                        // Those will survive the algorithm but with results that
                        // are less consistent.
 
-                       // protocol-relative URL cases per bug 29854...
+                       // protocol-relative URL cases per T31854...
                        array(
-                               '//bugzilla.wikimedia.org/show_bug.cgi?id=28627',
+                               '//example.org/test.cgi?id=12345',
                                array(
-                                       'http://org.wikimedia.bugzilla./show_bug.cgi?id=28627',
-                                       'https://org.wikimedia.bugzilla./show_bug.cgi?id=28627'
+                                       'http://org.example./test.cgi?id=12345',
+                                       'https://org.example./test.cgi?id=12345'
                                )
                        ),
                );
index 1c3e853..df54914 100644 (file)
@@ -114,7 +114,7 @@ class HtmlFormatterTest extends MediaWikiTestCase {
                                array(),
                                $removeTags, // Have some rules to trigger a DOM parse
                        ),
-                       // https://bugzilla.wikimedia.org/show_bug.cgi?id=53086
+                       // https://phabricator.wikimedia.org/T55086
                        array(
                                'Foo<sup id="cite_ref-1" class="reference"><a href="#cite_note-1">[1]</a></sup>'
                                        . ' <a href="/wiki/Bar" title="Bar" class="mw-redirect">Bar</a>',
index ea753e8..7ef44e7 100644 (file)
@@ -10,6 +10,9 @@
 class ImportTest extends MediaWikiLangTestCase {
 
        private function getInputStreamSource( $xml ) {
+               if ( ini_get( 'allow_url_fopen' ) != 1 ) {
+                       $this->markTestSkipped( 'bug 73283: this test needs allow_url_fopen to be enabled' );
+               }
                $file = 'data:application/xml,' . $xml;
                $status = ImportStreamSource::newFromFile( $file );
                if ( !$status->isGood() ) {
index 3babb97..63e0c8e 100644 (file)
@@ -92,7 +92,7 @@ class ActionTest extends MediaWikiTestCase {
        }
 
        public function testGetActionName_editredlinkWorkaround() {
-               // See https://bugzilla.wikimedia.org/show_bug.cgi?id=20966
+               // See https://phabricator.wikimedia.org/T22966
                $context = $this->getContext( 'editredlink' );
                $actionName = Action::getActionName( $context );
 
@@ -100,7 +100,7 @@ class ActionTest extends MediaWikiTestCase {
        }
 
        public function testGetActionName_historysubmitWorkaround() {
-               // See https://bugzilla.wikimedia.org/show_bug.cgi?id=20966
+               // See https://phabricator.wikimedia.org/T22966
                $context = $this->getContext( 'historysubmit' );
                $actionName = Action::getActionName( $context );
 
@@ -108,7 +108,7 @@ class ActionTest extends MediaWikiTestCase {
        }
 
        public function testGetActionName_revisiondeleteWorkaround() {
-               // See https://bugzilla.wikimedia.org/show_bug.cgi?id=20966
+               // See https://phabricator.wikimedia.org/T22966
                $context = $this->getContext( 'historysubmit' );
                $context->getRequest()->setVal( 'revisiondelete', true );
                $actionName = Action::getActionName( $context );
index 575efd6..e0488b7 100644 (file)
@@ -30,11 +30,11 @@ class ApiBlockTest extends ApiTestCase {
 
        /**
         * This test has probably always been broken and use an invalid token
-        * Bug tracking brokenness is https://bugzilla.wikimedia.org/35646
+        * Bug tracking brokenness is https://phabricator.wikimedia.org/T37646
         *
         * Root cause is https://gerrit.wikimedia.org/r/3434
         * Which made the Block/Unblock API to actually verify the token
-        * previously always considered valid (bug 34212).
+        * previously always considered valid (T36212).
         */
        public function testMakeNormalBlock() {
                $tokens = $this->getTokens();
index c852d72..40de254 100644 (file)
@@ -11,7 +11,7 @@
  * @todo Port the other Upload tests, and other API tests to this framework
  *
  * @todo Broken test, reports false errors from time to time.
- * See https://bugzilla.wikimedia.org/26169
+ * See https://phabricator.wikimedia.org/T28169
  *
  * @todo This is pretty sucky... needs to be prettified.
  *
index 0cb44e9..09c7c0c 100644 (file)
@@ -134,7 +134,7 @@ class ApiFormatPhpTest extends ApiFormatTestBase {
                } catch ( UsageException $ex ) {
                        ob_end_clean();
                        $this->assertSame(
-                               'This response cannot be represented using format=php. See https://bugzilla.wikimedia.org/show_bug.cgi?id=66776',
+                               'This response cannot be represented using format=php. See https://phabricator.wikimedia.org/T68776',
                                $ex->getMessage(),
                                'Expected exception'
                        );
index 345fd0a..1ebba1a 100644 (file)
@@ -193,7 +193,7 @@ class PreprocessorTest extends MediaWikiTestCase {
        }
 
        /**
-        * Tests from Bug 28642 · https://bugzilla.wikimedia.org/28642
+        * Tests from T30642 · https://phabricator.wikimedia.org/T30642
         */
        public static function provideHeadings() {
                // @codingStandardsIgnoreStart Ignore Generic.Files.LineLength.TooLong
index 1acbc24..d93dafb 100644 (file)
@@ -26,6 +26,8 @@ phpunit.php enables colors for other OSs at runtime
                </testsuite>
                <testsuite name="skins">
                        <directory>skins</directory>
+                       <directory>structure</directory>
+                       <file>suites/LessTestSuite.php</file>
                </testsuite>
                <!-- As there is a class Maintenance, we cannot use the
                     name "maintenance" directly -->
index e7f4517..161b8e1 100644 (file)
@@ -41,7 +41,7 @@
                        'gender-msg-currentuser': '{{GENDER:|blue|pink|green}}',
 
                        'plural-msg': 'Found $1 {{PLURAL:$1|item|items}}',
-                       // See https://bugzilla.wikimedia.org/69993
+                       // See https://phabricator.wikimedia.org/T71993
                        'plural-msg-explicit-forms-nested': 'Found {{PLURAL:$1|$1 results|0=no results in {{SITENAME}}|1=$1 result}}',
                        // Assume the grammar form grammar_case_foo is not valid in any language
                        'grammar-msg': 'Przeszukaj {{GRAMMAR:grammar_case_foo|{{SITENAME}}}}',
index 111d85b..cec0552 100644 (file)
 
                hello = mw.message( 'hello' );
 
-               // https://bugzilla.wikimedia.org/show_bug.cgi?id=44459
+               // https://phabricator.wikimedia.org/T46459
                assert.equal( hello.format, 'text', 'Message property "format" defaults to "text"' );
 
                assert.strictEqual( hello.map, mw.messages, 'Message property "map" defaults to the global instance in mw.messages' );