Merge "RCFilters UI: Dash the border 'none' highlight"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 28 Feb 2017 19:41:46 +0000 (19:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 28 Feb 2017 19:41:47 +0000 (19:41 +0000)
267 files changed:
Gemfile
Gemfile.lock
autoload.php
docs/uidesign/child-selector-emu.html
img_auth.php
includes/Block.php
includes/Category.php
includes/DefaultSettings.php
includes/EditPage.php
includes/FeedUtils.php
includes/GlobalFunctions.php
includes/HistoryBlob.php
includes/Html.php
includes/Linker.php
includes/MagicWord.php
includes/MediaWiki.php
includes/MovePage.php
includes/NoLocalSettings.php
includes/OutputPage.php
includes/PHPVersionCheck.php
includes/Preferences.php
includes/PrefixSearch.php
includes/Revision.php
includes/Sanitizer.php
includes/Setup.php
includes/Title.php
includes/WatchedItemQueryService.php
includes/WebRequest.php
includes/WebStart.php
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiFeedRecentChanges.php
includes/api/ApiFormatBase.php
includes/api/ApiFormatJson.php
includes/api/ApiFormatPhp.php
includes/api/ApiLogin.php
includes/api/ApiMain.php
includes/api/ApiMove.php
includes/api/ApiPageSet.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryAllRevisions.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryDeletedRevisions.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiResult.php
includes/api/ApiUnblock.php
includes/cache/BacklinkCache.php
includes/changes/ChangesFeed.php
includes/changes/EnhancedChangesList.php
includes/changes/OldChangesList.php
includes/collation/CollationEt.php
includes/collation/IcuCollation.php
includes/content/ContentHandler.php
includes/content/FileContentHandler.php
includes/content/TextContentHandler.php
includes/content/WikiTextStructure.php
includes/content/WikitextContentHandler.php
includes/context/RequestContext.php
includes/db/CloneDatabase.php
includes/debug/MWDebug.php
includes/debug/logger/monolog/KafkaHandler.php
includes/deferred/LinksUpdate.php
includes/diff/DifferenceEngine.php
includes/diff/WordAccumulator.php
includes/exception/ErrorPageError.php
includes/exception/MWExceptionHandler.php
includes/exception/UserNotLoggedIn.php
includes/export/WikiExporter.php
includes/filerepo/FileRepo.php
includes/filerepo/file/File.php
includes/filerepo/file/LocalFile.php
includes/htmlform/HTMLForm.php
includes/http/Http.php
includes/http/MWHttpRequest.php
includes/import/WikiImporter.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.php
includes/installer/MysqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/SqliteInstaller.php
includes/installer/WebInstaller.php
includes/installer/WebInstallerName.php
includes/installer/WebInstallerOutput.php
includes/installer/WebInstallerPage.php
includes/installer/WebInstallerUpgrade.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/jobs/DoubleRedirectJob.php
includes/jobqueue/jobs/PublishStashedFileJob.php
includes/jobqueue/jobs/RefreshLinksJob.php
includes/jobqueue/utils/BacklinkJobUtils.php
includes/libs/CSSMin.php
includes/libs/CryptHKDF.php
includes/libs/IP.php
includes/libs/StatusValue.php
includes/libs/filebackend/SwiftFileBackend.php
includes/libs/mime/mime.info
includes/libs/objectcache/RESTBagOStuff.php
includes/libs/objectcache/RedisBagOStuff.php
includes/libs/objectcache/WinCacheBagOStuff.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/lbfactory/LBFactory.php
includes/libs/xmp/XMP.php
includes/libs/xmp/XMPInfo.php
includes/logging/LogFormatter.php
includes/logging/LogPager.php
includes/mail/EmailNotification.php
includes/mail/UserMailer.php
includes/media/Bitmap.php
includes/media/DjVuImage.php
includes/media/Jpeg.php
includes/media/MediaHandler.php
includes/media/SVGMetadataExtractor.php
includes/objectcache/SqlBagOStuff.php
includes/page/Article.php
includes/page/ImagePage.php
includes/page/WikiPage.php
includes/parser/BlockLevelPass.php
includes/parser/CoreParserFunctions.php
includes/parser/DateFormatter.php
includes/parser/Parser.php
includes/parser/ParserCache.php
includes/parser/ParserOptions.php
includes/parser/ParserOutput.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/poolcounter/PoolWorkArticleView.php
includes/profiler/output/ProfilerOutputDb.php
includes/registration/Processor.php
includes/registration/VersionChecker.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderClientHtml.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/search/SearchIndexFieldDefinition.php
includes/session/SessionManagerInterface.php
includes/session/SessionProvider.php
includes/skins/BaseTemplate.php
includes/skins/Skin.php
includes/skins/SkinTemplate.php
includes/specialpage/ChangesListSpecialPage.php
includes/specialpage/LoginSignupSpecialPage.php
includes/specialpage/QueryPage.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialBlock.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialExpandTemplates.php
includes/specials/SpecialExport.php
includes/specials/SpecialLog.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialPrefixindex.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialStatistics.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUnusedcategories.php
includes/specials/SpecialUploadStash.php
includes/specials/SpecialUserLogout.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialWantedfiles.php
includes/specials/pagers/ContribsPager.php
includes/specials/pagers/DeletedContribsPager.php
includes/specials/pagers/ImageListPager.php
includes/specials/pagers/UsersPager.php
includes/tidy/Balancer.php
includes/upload/UploadBase.php
includes/user/PasswordReset.php
includes/user/User.php
includes/utils/BatchRowIterator.php
includes/utils/MWCryptHKDF.php
languages/Language.php
languages/LanguageConverter.php
languages/classes/LanguageAr.php
languages/classes/LanguageKsh.php
languages/classes/LanguageLa.php
languages/classes/LanguageMl.php
languages/classes/LanguageTr.php
languages/data/Names.php
languages/messages/MessagesArz.php
languages/messages/MessagesEn.php
languages/messages/MessagesEu.php
languages/messages/MessagesGn.php
languages/messages/MessagesKbd_cyrl.php
languages/messages/MessagesLad.php
languages/messages/MessagesLn.php
languages/messages/MessagesNah.php
languages/messages/MessagesPl.php
languages/messages/MessagesPt.php
languages/messages/MessagesQu.php
languages/messages/MessagesQug.php
languages/messages/MessagesSv.php
languages/messages/MessagesSzl.php
languages/messages/MessagesTe.php
languages/messages/MessagesZea.php
maintenance/archives/patch-archive-ar_id.sql
maintenance/archives/patch-categorylinks-better-collation.sql
maintenance/archives/patch-externallinks-el_id.sql
maintenance/archives/patch-up_property.sql
maintenance/benchmarks/bench_utf8_title_check.php
maintenance/cleanupImages.php
maintenance/cleanupTitles.php
maintenance/fixDoubleRedirects.php
maintenance/generateSitemap.php
maintenance/hhvm/makeRepo.php
maintenance/importImages.php
maintenance/migrateUserGroup.php
maintenance/mssql/tables.sql
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/rebuildFileCache.php
maintenance/sql.php
maintenance/sqlite/archives/initial-indexes.sql
maintenance/storage/fixBug20757.php [deleted file]
maintenance/storage/fixT22757.php [new file with mode: 0644]
maintenance/storage/trackBlobs.php
maintenance/tables.sql
maintenance/update.php
maintenance/userDupes.inc
resources/src/mediawiki.action/mediawiki.action.view.redirectPage.css
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.FilterItemWidget.less
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CapsuleItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterCapsuleMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FiltersListWidget.js
resources/src/mediawiki.skinning/content.parsoid.less
resources/src/mediawiki.special/mediawiki.special.apisandbox.js
resources/src/mediawiki.special/mediawiki.special.preferences.js
resources/src/mediawiki/mediawiki.requestIdleCallback.js
resources/src/mediawiki/mediawiki.storage.js
resources/src/mediawiki/page/gallery-slideshow.js
tests/browser/features/step_definitions/login_steps.rb
tests/browser/features/step_definitions/preferences_appearance_steps.rb
tests/browser/features/step_definitions/preferences_editing_steps.rb
tests/browser/features/step_definitions/preferences_user_profile_steps.rb
tests/browser/features/support/pages/login_page.rb
tests/phpunit/autoload.ide.php
tests/phpunit/includes/MWNamespaceTest.php
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/content/ContentHandlerTest.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/http/HttpTest.php
tests/phpunit/includes/objectcache/RESTBagOStuffTest.php
tests/phpunit/includes/parser/ParserMethodsTest.php
tests/phpunit/includes/parser/ParserPreloadTest.php
tests/phpunit/includes/parser/TagHooksTest.php
tests/phpunit/includes/search/SearchIndexFieldTest.php
tests/phpunit/includes/tidy/BalancerTest.php
tests/phpunit/includes/utils/UIDGeneratorTest.php
tests/phpunit/suite.xml
tests/qunit/QUnitTestResources.php
tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js [new file with mode: 0644]
thumb.php

diff --git a/Gemfile b/Gemfile
index 8bbd00f..ee0cec0 100644 (file)
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
 source 'https://rubygems.org'
 
-gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.4'
+gem 'mediawiki_selenium', '~> 1.8'
 gem 'rake', '~> 11.1', '>= 11.1.1'
 gem 'rubocop', '~> 0.32.1', require: false
index 8243874..4992303 100644 (file)
@@ -4,8 +4,8 @@ GEM
     ast (2.0.0)
     astrolabe (1.3.0)
       parser (>= 2.2.0.pre.3, < 3.0)
-    builder (3.2.2)
-    childprocess (0.5.9)
+    builder (3.2.3)
+    childprocess (0.6.2)
       ffi (~> 1.0, >= 1.0.11)
     cucumber (1.3.20)
       builder (>= 2.1.2)
@@ -16,40 +16,40 @@ GEM
     data_magic (1.0)
       faker (>= 1.1.2)
       yml_reader (>= 0.6)
-    diff-lcs (1.2.5)
-    domain_name (0.5.20161129)
+    diff-lcs (1.3)
+    domain_name (0.5.20170223)
       unf (>= 0.0.5, < 1.0.0)
-    faker (1.7.1)
+    faker (1.7.3)
       i18n (~> 0.5)
-    faraday (0.10.0)
+    faraday (0.11.0)
       multipart-post (>= 1.2, < 3)
     faraday-cookie_jar (0.0.6)
       faraday (>= 0.7.4)
       http-cookie (~> 1.0.0)
-    faraday_middleware (0.10.1)
+    faraday_middleware (0.11.0.1)
       faraday (>= 0.7.4, < 1.0)
-    ffi (1.9.14)
+    ffi (1.9.17)
     gherkin (2.12.2)
       multi_json (~> 1.3)
     headless (2.3.1)
     http-cookie (1.0.3)
       domain_name (~> 0.5)
-    i18n (0.7.0)
-    json (2.0.2)
-    mediawiki_api (0.7.0)
+    i18n (0.8.1)
+    json (2.0.3)
+    mediawiki_api (0.7.1)
       faraday (~> 0.9, >= 0.9.0)
       faraday-cookie_jar (~> 0.0, >= 0.0.6)
       faraday_middleware (~> 0.10, >= 0.10.0)
-    mediawiki_selenium (1.7.4)
+    mediawiki_selenium (1.8.0)
       cucumber (~> 1.3, >= 1.3.20)
       headless (~> 2.0, >= 2.1.0)
       json (~> 2.0, >= 2.0.2)
       mediawiki_api (~> 0.7, >= 0.7.0)
-      page-object (~> 1.0)
+      page-object (~> 2.0)
       rest-client (~> 1.6, >= 1.6.7)
       rspec-core (~> 2.14, >= 2.14.4)
       rspec-expectations (~> 2.14, >= 2.14.4)
-      selenium-webdriver (< 3)
+      selenium-webdriver (~> 3.1.0)
       syntax (~> 1.2, >= 1.2.0)
       thor (~> 0.19, >= 0.19.1)
     mime-types (2.99.3)
@@ -58,11 +58,11 @@ GEM
     multipart-post (2.0.0)
     net-http-persistent (2.9.4)
     netrc (0.11.0)
-    page-object (1.2.2)
+    page-object (2.0.0)
       net-http-persistent (~> 2.9.4)
       page_navigation (>= 0.9)
-      selenium-webdriver (>= 2.53.0)
-      watir-webdriver (>= 0.6.11, < 0.9.9)
+      selenium-webdriver (~> 3.0)
+      watir (~> 6.0)
     page_navigation (0.10)
       data_magic (>= 0.22)
     parser (2.2.2.6)
@@ -84,8 +84,8 @@ GEM
       rainbow (>= 1.99.1, < 3.0)
       ruby-progressbar (~> 1.4)
     ruby-progressbar (1.7.5)
-    rubyzip (1.2.0)
-    selenium-webdriver (2.53.4)
+    rubyzip (1.2.1)
+    selenium-webdriver (3.1.0)
       childprocess (~> 0.5)
       rubyzip (~> 1.0)
       websocket (~> 1.0)
@@ -94,18 +94,18 @@ GEM
     unf (0.1.4)
       unf_ext
     unf_ext (0.0.7.2)
-    watir-webdriver (0.9.3)
-      selenium-webdriver (>= 2.46.2)
-    websocket (1.2.3)
+    watir (6.2.0)
+      selenium-webdriver (~> 3.0)
+    websocket (1.2.4)
     yml_reader (0.7)
 
 PLATFORMS
   ruby
 
 DEPENDENCIES
-  mediawiki_selenium (~> 1.7, >= 1.7.4)
+  mediawiki_selenium (~> 1.8)
   rake (~> 11.1, >= 11.1.1)
   rubocop (~> 0.32.1)
 
 BUNDLED WITH
-   1.13.7
+   1.14.5
index e56b681..aa4e544 100644 (file)
@@ -487,10 +487,10 @@ $wgAutoloadLocalClasses = [
        'FindHooks' => __DIR__ . '/maintenance/findHooks.php',
        'FindMissingFiles' => __DIR__ . '/maintenance/findMissingFiles.php',
        'FindOrphanedFiles' => __DIR__ . '/maintenance/findOrphanedFiles.php',
-       'FixBug20757' => __DIR__ . '/maintenance/storage/fixBug20757.php',
        'FixDefaultJsonContentPages' => __DIR__ . '/maintenance/fixDefaultJsonContentPages.php',
        'FixDoubleRedirects' => __DIR__ . '/maintenance/fixDoubleRedirects.php',
        'FixExtLinksProtocolRelative' => __DIR__ . '/maintenance/fixExtLinksProtocolRelative.php',
+       'FixT22757' => __DIR__ . '/maintenance/storage/fixT22757.php',
        'FixTimestamps' => __DIR__ . '/maintenance/fixTimestamps.php',
        'FixUserRegistration' => __DIR__ . '/maintenance/fixUserRegistration.php',
        'ForeignAPIFile' => __DIR__ . '/includes/filerepo/file/ForeignAPIFile.php',
index dedb3a6..9db4c54 100644 (file)
@@ -26,7 +26,7 @@
 
                /** second table. Try to emulate child selector */
                table.childemu th,
-               table.childemu td {
+               table.childemu td {
                        border: 1px red solid;
                        background-color:white;
                        padding:1em;
index fa1609f..2052809 100644 (file)
@@ -68,7 +68,7 @@ function wfImageAuthMain() {
                $path = "/" . $path;
        }
 
-       // Check for bug 28235: QUERY_STRING overriding the correct extension
+       // Check for T30235: QUERY_STRING overriding the correct extension
        $whitelist = [];
        $extension = FileBackend::extensionFromPath( $path, 'rawcase' );
        if ( $extension != '' ) {
index 66b9ff0..1f4041b 100644 (file)
@@ -265,7 +265,7 @@ class Block {
                }
 
                # Be aware that the != '' check is explicit, since empty values will be
-               # passed by some callers (bug 29116)
+               # passed by some callers (T31116)
                if ( $vagueTarget != '' ) {
                        list( $target, $type ) = self::parseTarget( $vagueTarget );
                        switch ( $type ) {
@@ -358,7 +358,7 @@ class Block {
                if ( $end === null ) {
                        $end = $start;
                }
-               # Per bug 14634, we want to include relevant active rangeblocks; for
+               # Per T16634, we want to include relevant active rangeblocks; for
                # rangeblocks, we want to include larger ranges which enclose the given
                # range. We know that all blocks must be smaller than $wgBlockCIDRLimit,
                # so we can improve performance by filtering on a LIKE clause
@@ -553,7 +553,7 @@ class Block {
                $affected = $dbw->affectedRows();
 
                if ( $this->isAutoblocking() ) {
-                       // update corresponding autoblock(s) (bug 48813)
+                       // update corresponding autoblock(s) (T50813)
                        $dbw->update(
                                'ipblocks',
                                $this->getAutoblockUpdateArray(),
@@ -1117,7 +1117,7 @@ class Block {
                } elseif ( $target === null && $vagueTarget == '' ) {
                        # We're not going to find anything useful here
                        # Be aware that the == '' check is explicit, since empty values will be
-                       # passed by some callers (bug 29116)
+                       # passed by some callers (T31116)
                        return null;
 
                } elseif ( in_array(
@@ -1142,7 +1142,7 @@ class Block {
         * Get all blocks that match any IP from an array of IP addresses
         *
         * @param array $ipChain List of IPs (strings), usually retrieved from the
-        *         X-Forwarded-For header of the request
+        *     X-Forwarded-For header of the request
         * @param bool $isAnon Exclude anonymous-only blocks if false
         * @param bool $fromMaster Whether to query the master or replica DB
         * @return array Array of Blocks
@@ -1223,9 +1223,9 @@ class Block {
         *
         * @param array $blocks Array of Block objects
         * @param array $ipChain List of IPs (strings). This is used to determine how "close"
-        *        a block is to the server, and if a block matches exactly, or is in a range.
-        *        The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
-        *        local-squid, ...)
+        *     a block is to the server, and if a block matches exactly, or is in a range.
+        *     The order is furthest from the server to nearest e.g., (Browser, proxy1, proxy2,
+        *     local-squid, ...)
         * @throws MWException
         * @return Block|null The "best" block from the list
         */
index d558dbc..ece32ea 100644 (file)
@@ -96,7 +96,7 @@ class Category {
                $this->mSubcats = $row->cat_subcats;
                $this->mFiles = $row->cat_files;
 
-               # (bug 13683) If the count is negative, then 1) it's obviously wrong
+               # (T15683) If the count is negative, then 1) it's obviously wrong
                # and should not be kept, and 2) we *probably* don't have to scan many
                # rows to obtain the correct figure, so let's risk a one-time recount.
                if ( $this->mPages < 0 || $this->mSubcats < 0 || $this->mFiles < 0 ) {
index c64f550..1a82faf 100644 (file)
@@ -1337,7 +1337,7 @@ $wgXMLMimeTypes = [
  * to reduce disk usage, limits can only be selected from a list.
  * The user preference is saved as an array offset in the database, by default
  * the offset is set with $wgDefaultUserOptions['imagesize']. Make sure you
- * change it if you alter the array (see bug 8858).
+ * change it if you alter the array (see T10858).
  * This is the list of settings the user can choose from:
  */
 $wgImageLimits = [
@@ -1442,14 +1442,19 @@ $wgUseTinyRGBForJPGThumbnails = false;
  * Default parameters for the "<gallery>" tag
  */
 $wgGalleryOptions = [
-       'imagesPerRow' => 0, // Default number of images per-row in the gallery. 0 -> Adapt to screensize
-       'imageWidth' => 120, // Width of the cells containing images in galleries (in "px")
-       'imageHeight' => 120, // Height of the cells containing images in galleries (in "px")
-       'captionLength' => true, // Deprecated @since 1.28
-                                // Length to truncate filename to in caption when using "showfilename".
-                                // A value of 'true' will truncate the filename to one line using CSS
-                                // and will be the behaviour after deprecation.
-       'showBytes' => true, // Show the filesize in bytes in categories
+       // Default number of images per-row in the gallery. 0 -> Adapt to screensize
+       'imagesPerRow' => 0,
+       // Width of the cells containing images in galleries (in "px")
+       'imageWidth' => 120,
+       // Height of the cells containing images in galleries (in "px")
+       'imageHeight' => 120,
+       // Length to truncate filename to in caption when using "showfilename".
+       // A value of 'true' will truncate the filename to one line using CSS
+       // and will be the behaviour after deprecation.
+       // @deprecated since 1.28
+       'captionLength' => true,
+       // Show the filesize in bytes in categories
+       'showBytes' => true,
        'mode' => 'traditional',
 ];
 
@@ -3357,7 +3362,7 @@ $wgDisableOutputCompression = false;
  *
  * Currently this appears to work fine in all browsers, but it's disabled by
  * default because it normalizes id's a bit too aggressively, breaking preexisting
- * content (particularly Cite).  See bug 27733, bug 27694, bug 27474.
+ * content (particularly Cite).  See T29733, T29694, T29474.
  */
 $wgExperimentalHtmlIds = false;
 
@@ -4081,7 +4086,7 @@ $wgMaxRedirects = 1;
  * Attempting to create a redirect to any of the pages in this array
  * will make the redirect fail.
  * Userlogout is hard-coded, so it does not need to be listed here.
- * (bug 10569) Disallow Mypage and Mytalk as well.
+ * (T12569) Disallow Mypage and Mytalk as well.
  *
  * As of now, this only checks special pages. Redirects to pages in
  * other namespaces cannot be invalidated by this variable.
@@ -4565,8 +4570,8 @@ $wgAuthManagerAutoConfig = [
                ],
                // Linking during login is experimental, enable at your own risk - T134952
                // MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class => [
-               //      'class' => MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class,
-               //      'sort' => 100,
+               //   'class' => MediaWiki\Auth\ConfirmLinkSecondaryAuthenticationProvider::class,
+               //   'sort' => 100,
                // ],
                MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class => [
                        'class' => MediaWiki\Auth\EmailNotificationSecondaryAuthenticationProvider::class,
@@ -8372,7 +8377,7 @@ $wgPagePropsHaveSortkey = true;
 /**
  * Port where you have HTTPS running
  * Supports HTTPS on non-standard ports
- * @see bug 65184
+ * @see T67184
  * @since 1.24
  */
 $wgHttpsPort = 443;
index 814da6a..a02392e 100644 (file)
@@ -993,7 +993,7 @@ class EditPage {
                        $this->recreate = false;
 
                        // When creating a new section, we can preload a section title by passing it as the
-                       // preloadtitle parameter in the URL (Bug 13100)
+                       // preloadtitle parameter in the URL (T15100)
                        if ( $this->section == 'new' && $request->getVal( 'preloadtitle' ) ) {
                                $this->sectiontitle = $request->getVal( 'preloadtitle' );
                                // Once wpSummary isn't being use for setting section titles, we should delete this.
@@ -1911,7 +1911,7 @@ class EditPage {
 
                        // Don't save a new page if it's blank or if it's a MediaWiki:
                        // message with content equivalent to default (allow empty pages
-                       // in this case to disable messages, see bug 50124)
+                       // in this case to disable messages, see T52124)
                        $defaultMessageText = $this->mTitle->getDefaultMessageText();
                        if ( $this->mTitle->getNamespace() === NS_MEDIAWIKI && $defaultMessageText !== false ) {
                                $defaultText = $defaultMessageText;
@@ -2618,7 +2618,7 @@ class EditPage {
                        return;
                }
 
-               $this->showHeader();
+               $this->showHeader();
 
                $wgOut->addHTML( $this->editFormPageTop );
 
@@ -2731,7 +2731,7 @@ class EditPage {
                if ( $this->hasPresetSummary ) {
                        // If a summary has been preset using &summary= we don't want to prompt for
                        // a different summary. Only prompt for a summary if the summary is blanked.
-                       // (Bug 17416)
+                       // (T19416)
                        $this->autoSumm = md5( '' );
                }
 
@@ -3565,7 +3565,7 @@ HTML
                }
        }
 
-       private function incrementConflictStats() {
+       protected function incrementConflictStats() {
                $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
                $stats->increment( 'edit.failures.conflict' );
                // Only include 'standard' namespaces to avoid creating unknown numbers of statsd metrics
index e143a4c..3268291 100644 (file)
@@ -189,7 +189,7 @@ class FeedUtils {
 
                        if ( $html === null ) {
 
-                               // Omit large new page diffs, bug 29110
+                               // Omit large new page diffs, T31110
                                // Also use diff link for non-textual content
                                $diffText = self::getDiffLink( $title, $newid );
                        } else {
index af5d5fa..3747c23 100644 (file)
@@ -222,18 +222,18 @@ function wfAppendToArrayIfNotDefault( $key, $value, $default, &$changed ) {
 /**
  * Merge arrays in the style of getUserPermissionsErrors, with duplicate removal
  * e.g.
- *     wfMergeErrorArrays(
- *             [ [ 'x' ] ],
- *             [ [ 'x', '2' ] ],
- *             [ [ 'x' ] ],
- *             [ [ 'y' ] ]
- *     );
+ *     wfMergeErrorArrays(
+ *       [ [ 'x' ] ],
+ *       [ [ 'x', '2' ] ],
+ *       [ [ 'x' ] ],
+ *       [ [ 'y' ] ]
+ *     );
  * returns:
- *             [
- *             [ 'x', '2' ],
- *             [ 'x' ],
- *             [ 'y' ]
- *     ]
+ *     [
+ *       [ 'x', '2' ],
+ *       [ 'x' ],
+ *       [ 'y' ]
+ *     ]
  *
  * @param array $array1,...
  * @return array
@@ -2573,8 +2573,8 @@ function wfInitShellLocale() {
  * @param string $script MediaWiki cli script path
  * @param array $parameters Arguments and options to the script
  * @param array $options Associative array of options:
- *             'php': The path to the php executable
- *             'wrapper': Path to a PHP wrapper to handle the maintenance script
+ *     'php': The path to the php executable
+ *     'wrapper': Path to a PHP wrapper to handle the maintenance script
  * @return string
  */
 function wfShellWikiCmd( $script, array $parameters = [], array $options = [] ) {
index 3d86201..56cf815 100644 (file)
@@ -590,7 +590,7 @@ class DiffHistoryBlob implements HistoryBlob {
 
        /**
         * Compute a binary "Adler-32" checksum as defined by LibXDiff, i.e. with
-        * the bytes backwards and initialised with 0 instead of 1. See bug 34428.
+        * the bytes backwards and initialised with 0 instead of 1. See T36428.
         *
         * @param string $s
         * @return string|bool False if the hash extension is not available
index b46ea81..972f62d 100644 (file)
@@ -759,7 +759,7 @@ class Html {
                $attribs['name'] = $name;
 
                if ( substr( $value, 0, 1 ) == "\n" ) {
-                       // Workaround for bug 12130: browsers eat the initial newline
+                       // Workaround for T14130: browsers eat the initial newline
                        // assuming that it's just for show, but they do keep the later
                        // newlines, which we may want to preserve during editing.
                        // Prepending a single newline
index 05e3abb..0c8d1c6 100644 (file)
@@ -590,7 +590,7 @@ class Linker {
 
                # ThumbnailImage::toHtml() already adds page= onto the end of DjVu URLs
                # So we don't need to pass it here in $query. However, the URL for the
-               # zoom icon still needs it, so we make a unique query for it. See bug 14771
+               # zoom icon still needs it, so we make a unique query for it. See T16771
                $url = $title->getLocalURL( $query );
                if ( $page ) {
                        $url = wfAppendQuery( $url, [ 'page' => $page ] );
@@ -892,7 +892,7 @@ class Linker {
                        if ( $altUserName === false ) {
                                $altUserName = IP::prettifyIP( $userName );
                        }
-                       $classes .= ' mw-anonuserlink'; // Separate link class for anons (bug 43179)
+                       $classes .= ' mw-anonuserlink'; // Separate link class for anons (T45179)
                } else {
                        $page = Title::makeTitle( NS_USER, $userName );
                }
@@ -1096,7 +1096,7 @@ class Linker {
        ) {
                # Sanitize text a bit:
                $comment = str_replace( "\n", " ", $comment );
-               # Allow HTML entities (for bug 13815)
+               # Allow HTML entities (for T15815)
                $comment = Sanitizer::escapeHtmlAllowEntities( $comment );
 
                # Render autocomments and make links:
@@ -1165,7 +1165,7 @@ class Linker {
                                                $section = str_replace( '[[', '', $section );
                                                $section = str_replace( ']]', '', $section );
 
-                                               $section = Sanitizer::normalizeSectionNameWhitespace( $section ); # bug 22784
+                                               $section = Sanitizer::normalizeSectionNameWhitespace( $section ); # T24784
                                                if ( $local ) {
                                                        $sectionTitle = Title::newFromText( '#' . $section );
                                                } else {
@@ -1374,7 +1374,7 @@ class Linker {
                        } else {
                                $suffix = '';
                        }
-                       # bug 7425
+                       # T9425
                        $target = trim( $target );
                        # Look at the first character
                        if ( $target != '' && $target[0] === '/' ) {
@@ -1797,7 +1797,7 @@ class Linker {
 
                if ( $context->getRequest()->getBool( 'bot' ) ) {
                        $query['bot'] = '1';
-                       $query['hidediff'] = '1'; // bug 15999
+                       $query['hidediff'] = '1'; // T17999
                }
 
                $disableRollbackEditCount = false;
index 09317d7..ee95918 100644 (file)
@@ -46,8 +46,8 @@
  * $magicWords = [];
  *
  * $magicWords['en'] = [
- *     'magicwordkey' => [ 0, 'case_insensitive_magic_word' ],
- *     'magicwordkey2' => [ 1, 'CASE_sensitive_magic_word2' ],
+ *   'magicwordkey' => [ 0, 'case_insensitive_magic_word' ],
+ *   'magicwordkey2' => [ 1, 'CASE_sensitive_magic_word2' ],
  * ];
  * @endcode
  *
@@ -502,7 +502,7 @@ class MagicWord {
                        # multiple matched parts (variable match); some will be empty because of
                        # synonyms. The variable will be the second non-empty one so remove any
                        # blank elements and re-sort the indices.
-                       # See also bug 6526
+                       # See also T8526
 
                        $matches = array_values( array_filter( $matches ) );
 
index cfe4965..521c02c 100644 (file)
@@ -73,7 +73,7 @@ class MediaWiki {
                if ( $request->getCheck( 'search' ) ) {
                        // Compatibility with old search URLs which didn't use Special:Search
                        // Just check for presence here, so blank requests still
-                       // show the search page when using ugly URLs (bug 8054).
+                       // show the search page when using ugly URLs (T10054).
                        $ret = SpecialPage::getTitleFor( 'Search' );
                } elseif ( $curid ) {
                        // URLs like this are generated by RC, because rc_title isn't always accurate
@@ -183,7 +183,7 @@ class MediaWiki {
                $unused = null; // To pass it by reference
                Hooks::run( 'BeforeInitialize', [ &$title, &$unused, &$output, &$user, $request, $this ] );
 
-               // Invalid titles. Bug 21776: The interwikis must redirect even if the page name is empty.
+               // Invalid titles. T23776: The interwikis must redirect even if the page name is empty.
                if ( is_null( $title ) || ( $title->getDBkey() == '' && !$title->isExternal() )
                        || $title->isSpecial( 'Badtitle' )
                ) {
@@ -203,7 +203,7 @@ class MediaWiki {
                        ? [] // relies on HMAC key signature alone
                        : $title->getUserPermissionsErrors( 'read', $user );
                if ( count( $permErrors ) ) {
-                       // Bug 32276: allowing the skin to generate output with $wgTitle or
+                       // T34276: allowing the skin to generate output with $wgTitle or
                        // $this->context->title set to the input title would allow anonymous users to
                        // determine whether a page exists, potentially leaking private data. In fact, the
                        // curid and oldid request  parameters would allow page titles to be enumerated even
@@ -520,7 +520,7 @@ class MediaWiki {
                        try {
                                $this->main();
                        } catch ( ErrorPageError $e ) {
-                               // Bug 62091: while exceptions are convenient to bubble up GUI errors,
+                               // T64091: while exceptions are convenient to bubble up GUI errors,
                                // they are not internal application faults. As with normal requests, this
                                // should commit, print the output, do deferred updates, jobs, and profiling.
                                $this->doPreOutputCommit();
index ae12ba5..9a83d35 100644 (file)
@@ -501,7 +501,7 @@ class MovePage {
                $defaultContentModelChanging = ( $oldDefault !== $newDefault
                        && $oldDefault === $contentModel );
 
-               // bug 57084: log_page should be the ID of the *moved* page
+               // T59084: log_page should be the ID of the *moved* page
                $oldid = $this->oldTitle->getArticleID();
                $logTitle = clone $this->oldTitle;
 
@@ -550,13 +550,13 @@ class MovePage {
                );
 
                if ( !$redirectContent ) {
-                       // Clean up the old title *before* reset article id - bug 45348
+                       // Clean up the old title *before* reset article id - T47348
                        WikiPage::onArticleDelete( $this->oldTitle );
                }
 
                $this->oldTitle->resetArticleID( 0 ); // 0 == non existing
                $nt->resetArticleID( $oldid );
-               $newpage->loadPageData( WikiPage::READ_LOCKING ); // bug 46397
+               $newpage->loadPageData( WikiPage::READ_LOCKING ); // T48397
 
                $newpage->updateRevisionOn( $dbw, $nullRevision );
 
@@ -581,7 +581,7 @@ class MovePage {
                # Recreate the redirect, this time in the other direction.
                if ( $redirectContent ) {
                        $redirectArticle = WikiPage::factory( $this->oldTitle );
-                       $redirectArticle->loadFromRow( false, WikiPage::READ_LOCKING ); // bug 46397
+                       $redirectArticle->loadFromRow( false, WikiPage::READ_LOCKING ); // T48397
                        $newid = $redirectArticle->insertOn( $dbw );
                        if ( $newid ) { // sanity
                                $this->oldTitle->resetArticleID( $newid );
index b0a6b7b..50950ef 100644 (file)
@@ -20,7 +20,7 @@
  * @file
  */
 
-# bug 30219 : can not use pathinfo() on URLs since slashes do not match
+# T32219 : can not use pathinfo() on URLs since slashes do not match
 $matches = [];
 $ext = 'php';
 $path = '/';
index eb2f7e7..9ecfa23 100644 (file)
@@ -781,7 +781,7 @@ class OutputPage extends ContextSource {
                        'epoch' => $config->get( 'CacheEpoch' )
                ];
                if ( $config->get( 'UseSquid' ) ) {
-                       // bug 44570: the core page itself may not change, but resources might
+                       // T46570: the core page itself may not change, but resources might
                        $modifiedTimes['sepoch'] = wfTimestamp( TS_MW, time() - $config->get( 'SquidMaxage' ) );
                }
                Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
@@ -1466,7 +1466,7 @@ class OutputPage extends ContextSource {
                        ResourceLoaderModule::ORIGIN_CORE_INDIVIDUAL
                );
 
-               // Site-wide styles are controlled by a config setting, see bug 71621
+               // Site-wide styles are controlled by a config setting, see T73621
                // for background on why. User styles are never allowed.
                if ( $this->getConfig()->get( 'AllowSiteCSSOnRestrictedPages' ) ) {
                        $styleOrigin = ResourceLoaderModule::ORIGIN_USER_SITEWIDE;
@@ -2502,7 +2502,7 @@ class OutputPage extends ContextSource {
                ) {
                        $displayReturnto = null;
 
-                       # Due to bug 32276, if a user does not have read permissions,
+                       # Due to T34276, if a user does not have read permissions,
                        # $this->getTitle() will just give Special:Badtitle, which is
                        # not especially useful as a returnto parameter. Use the title
                        # from the request instead, if there was one.
@@ -3084,7 +3084,7 @@ class OutputPage extends ContextSource {
 
                $curRevisionId = 0;
                $articleId = 0;
-               $canonicalSpecialPageName = false; # bug 21115
+               $canonicalSpecialPageName = false; # T23115
 
                $title = $this->getTitle();
                $ns = $title->getNamespace();
@@ -3094,7 +3094,7 @@ class OutputPage extends ContextSource {
 
                $sk = $this->getSkin();
                // Get the relevant title so that AJAX features can use the correct page name
-               // when making API requests from certain special pages (bug 34972).
+               // when making API requests from certain special pages (T36972).
                $relevantTitle = $sk->getRelevantTitle();
                $relevantUser = $sk->getRelevantUser();
 
@@ -3855,7 +3855,7 @@ class OutputPage extends ContextSource {
         *    $wgOut->addWikiText( "<div class='error'>\n"
         *        . wfMessage( 'some-error' )->plain() . "\n</div>" );
         *
-        * The newline after the opening div is needed in some wikitext. See bug 19226.
+        * The newline after the opening div is needed in some wikitext. See T21226.
         *
         * @param string $wrap
         */
index e6e96c7..c56931e 100644 (file)
@@ -75,16 +75,17 @@ class PHPVersionCheck {
         * @return $this
         */
        function checkRequiredPHPVersion() {
-               if ( !function_exists( 'version_compare' )
-                    || version_compare( $this->getPHPImplVersion(), $this->minimumVersionPHP ) < 0
+               if (
+                       !function_exists( 'version_compare' )
+                       || version_compare( $this->getPHPImplVersion(), $this->minimumVersionPHP ) < 0
                ) {
                        $shortText = "MediaWiki $this->mwVersion requires at least PHP version"
-                                    . " $this->minimumVersionPHP, you are using PHP {$this->getPHPImplVersion()}.";
+                               . " $this->minimumVersionPHP, you are using PHP {$this->getPHPImplVersion()}.";
 
                        $longText = "Error: You might be using on older PHP version. \n"
-                                   . "MediaWiki $this->mwVersion needs PHP $this->minimumVersionPHP or higher.\n\n"
-                                   . "Check if you have a newer php executable with a different name, "
-                                   . "such as php5.\n\n";
+                               . "MediaWiki $this->mwVersion needs PHP $this->minimumVersionPHP or higher.\n\n"
+                               . "Check if you have a newer php executable with a different name, "
+                               . "such as php5.\n\n";
 
                        $longHtml = <<<HTML
                        Please consider <a href="http://www.php.net/downloads.php">upgrading your copy of PHP</a>.
@@ -112,10 +113,10 @@ HTML;
                        $shortText = "Installing some external dependencies (e.g. via composer) is required.";
 
                        $longText = "Error: You are missing some external dependencies. \n"
-                                   . "MediaWiki now also has some external dependencies that need to be installed\n"
-                                   . "via composer or from a separate git repo. Please see\n"
-                                   . "https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries\n"
-                                   . "for help on installing the required components.";
+                               . "MediaWiki now also has some external dependencies that need to be installed\n"
+                               . "via composer or from a separate git repo. Please see\n"
+                               . "https://www.mediawiki.org/wiki/Download_from_Git#Fetch_external_libraries\n"
+                               . "for help on installing the required components.";
 
                        $longHtml = <<<HTML
                MediaWiki now also has some external dependencies that need to be installed via
@@ -150,12 +151,12 @@ HTML;
                        foreach ( $missingExtensions as $ext ) {
                                $missingExtText .= " * $ext <$baseUrl/$ext>\n";
                                $missingExtHtml .= "<li><b>$ext</b> "
-                                                  . "(<a href=\"$baseUrl/$ext\">more information</a>)</li>";
+                                       . "(<a href=\"$baseUrl/$ext\">more information</a>)</li>";
                        }
 
                        $cliText = "Error: Missing one or more required components of PHP.\n"
-                                  . "You are missing a required extension to PHP that MediaWiki needs.\n"
-                                  . "Please install:\n" . $missingExtText;
+                               . "You are missing a required extension to PHP that MediaWiki needs.\n"
+                               . "Please install:\n" . $missingExtText;
 
                        $longHtml = <<<HTML
                You are missing a required extension to PHP that MediaWiki
@@ -198,7 +199,7 @@ HTML;
                }
                $encLogo =
                        htmlspecialchars( str_replace( '//', '/', $dirname . '/' ) .
-                                         'resources/assets/mediawiki.png' );
+                               'resources/assets/mediawiki.png' );
                $shortHtml = htmlspecialchars( $shortText );
 
                header( 'Content-type: text/html; charset=UTF-8' );
index 6d15c1e..b428e87 100644 (file)
@@ -120,7 +120,7 @@ class Preferences {
                        }
                }
 
-               # # Make sure that form fields have their parent set. See bug 41337.
+               # # Make sure that form fields have their parent set. See T43337.
                $dummyForm = new HTMLForm( [], $context );
 
                $disable = !$user->isAllowed( 'editmyoptions' );
@@ -1201,8 +1201,7 @@ class Preferences {
 
                if ( $dateopts ) {
                        if ( !in_array( 'default', $dateopts ) ) {
-                               $dateopts[] = 'default'; // Make sure default is always valid
-                                                                               // Bug 19237
+                               $dateopts[] = 'default'; // Make sure default is always valid T21237
                        }
 
                        // FIXME KLUGE: site default might not be valid for user language
index 48b1d72..62ee5c6 100644 (file)
@@ -231,7 +231,7 @@ abstract class PrefixSearch {
                        }
                }
 
-               # normalize searchKey, so aliases with spaces can be found - bug 25675
+               # normalize searchKey, so aliases with spaces can be found - T27675
                $searchKey = str_replace( ' ', '_', $searchKey );
                $searchKey = $wgContLang->caseFold( $searchKey );
 
@@ -243,7 +243,7 @@ abstract class PrefixSearch {
                }
 
                foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
-                       if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# bug 20885
+                       if ( !in_array( $page, SpecialPageFactory::getNames() ) ) {# T22885
                                continue;
                        }
 
@@ -256,7 +256,7 @@ abstract class PrefixSearch {
                $matches = [];
                foreach ( $keys as $pageKey => $page ) {
                        if ( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
-                               // bug 27671: Don't use SpecialPage::getTitleFor() here because it
+                               // T29671: Don't use SpecialPage::getTitleFor() here because it
                                // localizes its input leading to searches for e.g. Special:All
                                // returning Spezial:MediaWiki-Systemnachrichten and returning
                                // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de'
index d9e42ff..d6cfcd9 100644 (file)
@@ -216,7 +216,7 @@ class Revision implements IDBAccessObject {
                        // Pre-1.5 ar_text row
                        $attribs['text'] = self::getRevisionText( $row, 'ar_' );
                        if ( $attribs['text'] === false ) {
-                               throw new MWException( 'Unable to load text from archive row (possibly bug 22624)' );
+                               throw new MWException( 'Unable to load text from archive row (possibly T24624)' );
                        }
                }
                return new self( $attribs );
index 42b166d..5f6abee 100644 (file)
@@ -344,12 +344,12 @@ class Sanitizer {
                        $space = '[\x09\x0a\x0c\x0d\x20]';
                        self::$attribsRegex =
                                "/(?:^|$space)({$attribFirst}{$attrib}*)
-                                 ($space*=$space*
+                                       ($space*=$space*
                                        (?:
-                                        # The attribute value: quoted or alone
-                                         \"([^\"]*)(?:\"|\$)
-                                        | '([^']*)(?:'|\$)
-                                         (((?!$space|>).)*)
+                                               # The attribute value: quoted or alone
+                                               \"([^\"]*)(?:\"|\$)
+                                               | '([^']*)(?:'|\$)
+                                               | (((?!$space|>).)*)
                                        )
                                )?(?=$space|\$)/sx";
                }
@@ -545,7 +545,7 @@ class Sanitizer {
                                                        $badtag = true;
                                                } elseif ( in_array( $t, $tagstack ) && !isset( $htmlnest[$t] ) ) {
                                                        $badtag = true;
-                                               #  Is it a self closed htmlpair ? (bug 5487)
+                                               #  Is it a self closed htmlpair ? (T7487)
                                                } elseif ( $brace == '/>' && isset( $htmlpairs[$t] ) ) {
                                                        // Eventually we'll just remove the self-closing
                                                        // slash, in order to be consistent with HTML5
@@ -922,7 +922,7 @@ class Sanitizer {
 
                // Normalize Halfwidth and Fullwidth Unicode block that IE6 might treat as ascii
                $value = preg_replace_callback(
-                       '/[!-[]-z]/u', // U+FF01 to U+FF5A, excluding U+FF3C (bug 58088)
+                       '/[!-[]-z]/u', // U+FF01 to U+FF5A, excluding U+FF3C (T60088)
                        function ( $matches ) {
                                $cp = UtfNormal\Utils::utf8ToCodepoint( $matches[0] );
                                if ( $cp === false ) {
@@ -1508,7 +1508,7 @@ class Sanitizer {
 
        /**
         * Decode any character references, numeric or named entities,
-        * in the next and normalize the resulting string. (bug 14952)
+        * in the next and normalize the resulting string. (T16952)
         *
         * This is useful for page titles, not for text to be displayed,
         * MediaWiki allows HTML entities to escape normalization as a feature.
@@ -1926,7 +1926,7 @@ class Sanitizer {
         *   3.5.
         *
         * This function is an implementation of the specification as requested in
-        * bug 22449.
+        * T24449.
         *
         * Client-side forms will use the same standard validation rules via JS or
         * HTML 5 validation; additional restrictions can be enforced server-side
@@ -1949,7 +1949,7 @@ class Sanitizer {
 
                // Please note strings below are enclosed in brackets [], this make the
                // hyphen "-" a range indicator. Hence it is double backslashed below.
-               // See bug 26948
+               // See T28948
                $rfc5322_atext = "a-z0-9!#$%&'*+\\-\/=?^_`{|}~";
                $rfc1034_ldh_str = "a-z0-9\\-";
 
index 72ed1fd..b61de73 100644 (file)
@@ -329,7 +329,7 @@ if ( $wgEnableEmail ) {
        $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
 } else {
        // Disable all other email settings automatically if $wgEnableEmail
-       // is set to false. - bug 63678
+       // is set to false. - T65678
        $wgAllowHTMLEmail = false;
        $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
        $wgEnableUserEmail = false;
index 3ce775b..13a6f56 100644 (file)
@@ -134,7 +134,7 @@ class Title implements LinkTarget {
 
        /**
         * @var int Namespace index when there is no namespace. Don't change the
-        *   following default, NS_MAIN is hardcoded in several places. See bug 696.
+        *   following default, NS_MAIN is hardcoded in several places. See T2696.
         *   Zero except in {{transclusion}} tags.
         */
        public $mDefaultNamespace = NS_MAIN;
@@ -307,7 +307,7 @@ class Title implements LinkTarget {
                        }
                }
 
-               // Convert things like &eacute; &#257; or &#x3017; into normalized (bug 14952) text
+               // Convert things like &eacute; &#257; or &#x3017; into normalized (T16952) text
                $filteredText = Sanitizer::decodeCharReferencesAndNormalize( $text );
 
                $t = new Title();
@@ -3741,14 +3741,14 @@ class Title implements LinkTarget {
                        }
                        $newPageName = preg_replace(
                                        '#^' . preg_quote( $this->getDBkey(), '#' ) . '#',
-                                       StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
+                                       StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # T23234
                                        $oldSubpage->getDBkey() );
                        if ( $oldSubpage->isTalkPage() ) {
                                $newNs = $nt->getTalkPage()->getNamespace();
                        } else {
                                $newNs = $nt->getSubjectPage()->getNamespace();
                        }
-                       # Bug 14385: we need makeTitleSafe because the new page names may
+                       # T16385: we need makeTitleSafe because the new page names may
                        # be longer than 255 characters.
                        $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
 
@@ -3865,7 +3865,7 @@ class Title implements LinkTarget {
         * categories' names.
         *
         * @return array Array of parents in the form:
-        *        $parent => $currentarticle
+        *     $parent => $currentarticle
         */
        public function getParentCategories() {
                global $wgContLang;
index 2b8147a..bc57049 100644 (file)
@@ -505,7 +505,7 @@ class WatchedItemQueryService {
                        $conds[] = 'rc_user_text != ' . $db->addQuotes( $options['notByUser'] );
                }
 
-               // Avoid brute force searches (bug 17342)
+               // Avoid brute force searches (T19342)
                $bitmask = 0;
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $bitmask = Revision::DELETED_USER;
index 78d7444..3d5e372 100644 (file)
@@ -216,7 +216,7 @@ class WebRequest {
 
                        $host = $parts[0];
                        if ( $wgAssumeProxiesUseDefaultProtocolPorts && isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) ) {
-                               // Bug 70021: Assume that upstream proxy is running on the default
+                               // T72021: Assume that upstream proxy is running on the default
                                // port based on the protocol. We have no reliable way to determine
                                // the actual port in use upstream.
                                $port = $stdPort;
@@ -308,7 +308,7 @@ class WebRequest {
         * available variant URLs.
         */
        public function interpolateTitle() {
-               // bug 16019: title interpolation on API queries is useless and sometimes harmful
+               // T18019: title interpolation on API queries is useless and sometimes harmful
                if ( defined( 'MW_API' ) ) {
                        return;
                }
@@ -1229,7 +1229,7 @@ HTML;
                                if (
                                        IP::isPublic( $ipchain[$i + 1] ) ||
                                        $wgUsePrivateIPs ||
-                                       $proxyLookup->isConfiguredProxy( $curIP ) // bug 48919; treat IP as sane
+                                       $proxyLookup->isConfiguredProxy( $curIP ) // T50919; treat IP as sane
                                ) {
                                        // Follow the next IP according to the proxy
                                        $nextIP = IP::canonicalize( $ipchain[$i + 1] );
index 861e532..15804c7 100644 (file)
@@ -30,7 +30,7 @@ if ( ini_get( 'mbstring.func_overload' ) ) {
        die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' );
 }
 
-# bug 15461: Make IE8 turn off content sniffing. Everybody else should ignore this
+# T17461: Make IE8 turn off content sniffing. Everybody else should ignore this
 # We're adding it here so that it's *always* set, even for alternate entry
 # points and when $wgOut gets disabled or overridden.
 header( 'X-Content-Type-Options: nosniff' );
index e249810..c03faf0 100644 (file)
@@ -700,7 +700,7 @@ abstract class ApiBase extends ContextSource {
         * @return array
         */
        public function extractRequestParams( $parseLimit = true ) {
-               // Cache parameters, for performance and to avoid bug 24564.
+               // Cache parameters, for performance and to avoid T26564.
                if ( !isset( $this->mParamCache[$parseLimit] ) ) {
                        $params = $this->getFinalParams();
                        $results = [];
@@ -1326,7 +1326,7 @@ abstract class ApiBase extends ContextSource {
                }
 
                if ( !$allowMultiple && count( $valuesList ) != 1 ) {
-                       // Bug 33482 - Allow entries with | in them for non-multiple values
+                       // T35482 - Allow entries with | in them for non-multiple values
                        if ( in_array( $value, $allowedValues, true ) ) {
                                return $value;
                        }
index 58e3d1c..8577ad2 100644 (file)
@@ -46,7 +46,7 @@ class ApiBlock extends ApiBase {
 
                $this->requireOnlyOneParameter( $params, 'user', 'userid' );
 
-               # bug 15810: blocked admins should have limited access here
+               # T17810: blocked admins should have limited access here
                if ( $user->isBlocked() ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
@@ -69,7 +69,7 @@ class ApiBlock extends ApiBase {
                } else {
                        $target = User::newFromName( $params['user'] );
 
-                       // Bug 38633 - if the target is a user (not an IP address), but it
+                       // T40633 - if the target is a user (not an IP address), but it
                        // doesn't exist or is unusable, error.
                        if ( $target instanceof User &&
                                ( $target->isAnon() /* doesn't exist */ || !User::isUsableName( $target->getName() ) )
index e0e50ed..0b04c8c 100644 (file)
@@ -57,7 +57,7 @@ class ApiFeedRecentChanges extends ApiBase {
 
                $this->getMain()->setCacheMode( 'public' );
                if ( !$this->getMain()->getParameter( 'smaxage' ) ) {
-                       // bug 63249: This page gets hit a lot, cache at least 15 seconds.
+                       // T65249: This page gets hit a lot, cache at least 15 seconds.
                        $this->getMain()->setCacheMaxAge( 15 );
                }
 
index 67f54a8..83c348b 100644 (file)
@@ -186,7 +186,7 @@ abstract class ApiFormatBase extends ApiBase {
 
                $this->getMain()->getRequest()->response()->header( "Content-Type: $mime; charset=utf-8" );
 
-               // Set X-Frame-Options API results (bug 39180)
+               // Set X-Frame-Options API results (T41180)
                $apiFrameOptions = $this->getConfig()->get( 'ApiFrameOptions' );
                if ( $apiFrameOptions ) {
                        $this->getMain()->getRequest()->response()->header( "X-Frame-Options: $apiFrameOptions" );
@@ -269,7 +269,7 @@ abstract class ApiFormatBase extends ApiBase {
                                        false, FormatJson::ALL_OK
                                );
 
-                               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+                               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                                // Flash, but what it does isn't friendly for the API, so we need to
                                // work around it.
                                if ( preg_match( '/\<\s*cross-domain-policy\s*\>/i', $json ) ) {
index 8ebfe48..e5dafae 100644 (file)
@@ -91,7 +91,7 @@ class ApiFormatJson extends ApiFormatBase {
                $data = $this->getResult()->getResultData( null, $transform );
                $json = FormatJson::encode( $data, $this->getIsHtml(), $opt );
 
-               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                // Flash, but what it does isn't friendly for the API, so we need to
                // work around it.
                if ( preg_match( '/\<\s*cross-domain-policy(?=\s|\>)/i', $json ) ) {
@@ -103,7 +103,7 @@ class ApiFormatJson extends ApiFormatBase {
                if ( isset( $params['callback'] ) ) {
                        $callback = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $params['callback'] );
                        # Prepend a comment to try to avoid attacks against content
-                       # sniffers, such as bug 68187.
+                       # sniffers, such as T70187.
                        $this->printText( "/**/$callback($json)" );
                } else {
                        $this->printText( $json );
index a744f57..671f356 100644 (file)
@@ -60,7 +60,7 @@ class ApiFormatPhp extends ApiFormatBase {
                }
                $text = serialize( $this->getResult()->getResultData( null, $transforms ) );
 
-               // Bug 66776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
+               // T68776: wfMangleFlashPolicy() is needed to avoid a nasty bug in
                // Flash, but what it does isn't friendly for the API. There's nothing
                // we can do here that isn't actively broken in some manner, so let's
                // just be broken in a useful manner.
index e017eda..d64aeb7 100644 (file)
@@ -202,7 +202,7 @@ class ApiLogin extends ApiBase {
 
                        case 'Aborted':
                                $result['reason'] = 'Authentication requires user interaction, ' .
-                                  'which is not supported by action=login.';
+                                       'which is not supported by action=login.';
                                if ( $this->getConfig()->get( 'EnableBotPasswords' ) ) {
                                        $result['reason'] .= ' To be able to login with action=login, see [[Special:BotPasswords]].';
                                        $result['reason'] .= ' To continue using main-account login, see action=clientlogin.';
index 9e00830..6d76f8c 100644 (file)
@@ -574,7 +574,7 @@ class ApiMain extends ApiBase {
         * @param Exception $e
         */
        protected function handleException( Exception $e ) {
-               // Bug 63145: Rollback any open database transactions
+               // T65145: Rollback any open database transactions
                if ( !( $e instanceof ApiUsageException || $e instanceof UsageException ) ) {
                        // UsageExceptions are intentional, so don't rollback if that's the case
                        try {
@@ -1668,7 +1668,7 @@ class ApiMain extends ApiBase {
                $ret = $this->getRequest()->getVal( $name );
                if ( $ret === null ) {
                        if ( $this->getRequest()->getArray( $name ) !== null ) {
-                               // See bug 10262 for why we don't just implode( '|', ... ) the
+                               // See T12262 for why we don't just implode( '|', ... ) the
                                // array.
                                $this->addWarning( [ 'apiwarn-unsupportedarray', $name ] );
                        }
index ab7199f..566f778 100644 (file)
@@ -103,7 +103,7 @@ class ApiMove extends ApiBase {
                // a redirect to the new title. This is not safe, but what we did before was
                // even worse: we just determined whether a redirect should have been created,
                // and reported that it was created if it should have, without any checks.
-               // Also note that isRedirect() is unreliable because of bug 37209.
+               // Also note that isRedirect() is unreliable because of T39209.
                $r['redirectcreated'] = $fromTitle->exists();
 
                $r['moveoverredirect'] = $toTitleExists;
index d42e306..06019cf 100644 (file)
@@ -1384,7 +1384,7 @@ class ApiPageSet extends ApiBase {
         * @return array
         */
        private static function getPositiveIntegers( $array ) {
-               // bug 25734 API: possible issue with revids validation
+               // T27734 API: possible issue with revids validation
                // It seems with a load of revision rows, MySQL gets upset
                // Remove any < 0 integers, as they can't be valid
                foreach ( $array as $i => $int ) {
index b09b977..020df6d 100644 (file)
@@ -230,7 +230,7 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index b64b2c8..7b43efc 100644 (file)
@@ -131,7 +131,7 @@ class ApiQueryAllRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                $bitmask = Revision::DELETED_USER;
                        } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
index 136f60e..9e7ad67 100644 (file)
@@ -186,7 +186,7 @@ class ApiQueryAllUsers extends ApiQueryBase {
                                ],
                        ] ] );
 
-                       // Actually count the actions using a subquery (bug 64505 and bug 64507)
+                       // Actually count the actions using a subquery (T66505 and T66507)
                        $timestamp = $db->timestamp( wfTimestamp( TS_UNIX ) - $activeUserSeconds );
                        $this->addFields( [
                                'recentactions' => '(' . $db->selectSQLText(
index 613589e..b3ac606 100644 (file)
@@ -152,7 +152,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase {
                if ( $this->params['filterredir'] == 'redirects' ) {
                        $this->addWhereFld( 'page_is_redirect', 1 );
                } elseif ( $this->params['filterredir'] == 'nonredirects' && !$this->redirect ) {
-                       // bug 22245 - Check for !redirect, as filtering nonredirects, when
+                       // T24245 - Check for !redirect, as filtering nonredirects, when
                        // getting what links to them is contradictory
                        $this->addWhereFld( 'page_is_redirect', 0 );
                }
index d0b8214..471aed6 100644 (file)
@@ -123,7 +123,7 @@ class ApiQueryDeletedRevisions extends ApiQueryRevisionsBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index 6a259cd..2959151 100644 (file)
@@ -203,7 +203,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                }
 
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
-                       // Paranoia: avoid brute force searches (bug 17342)
+                       // Paranoia: avoid brute force searches (T19342)
                        // (shouldn't be able to get here without 'deletedhistory', but
                        // check it again just in case)
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
index c9dae8d..e5e45b3 100644 (file)
@@ -509,7 +509,7 @@ class ApiQueryImageInfo extends ApiQueryBase {
                                if ( $mto && !$mto->isError() ) {
                                        $vals['thumburl'] = wfExpandUrl( $mto->getUrl(), PROTO_CURRENT );
 
-                                       // bug 23834 - If the URL's are the same, we haven't resized it, so shouldn't give the wanted
+                                       // T25834 - If the URLs are the same, we haven't resized it, so shouldn't give the wanted
                                        // thumbnail sizes for the thumbnail actual size
                                        if ( $mto->getUrl() !== $file->getUrl() ) {
                                                $vals['thumbwidth'] = intval( $mto->getWidth() );
index 4d84aad..8a13fef 100644 (file)
@@ -198,7 +198,7 @@ class ApiQueryLogEvents extends ApiQueryBase {
                        $this->addWhere( 'log_title ' . $db->buildLike( $title->getDBkey(), $db->anyString() ) );
                }
 
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                if ( $params['namespace'] !== null || !is_null( $title ) || !is_null( $user ) ) {
                        if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                $titleBits = LogPage::DELETED_ACTION;
index 2c76e97..26581a6 100644 (file)
@@ -147,7 +147,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
 
                /* Build our basic query. Namely, something along the lines of:
                 * SELECT * FROM recentchanges WHERE rc_timestamp > $start
-                *              AND rc_timestamp < $end AND rc_namespace = $namespace
+                *   AND rc_timestamp < $end AND rc_namespace = $namespace
                 */
                $this->addTables( 'recentchanges' );
                $this->addTimestampWhereRange( 'rc_timestamp', $params['dir'], $params['start'], $params['end'] );
@@ -320,7 +320,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addWhereFld( 'ct_tag', $params['tag'] );
                }
 
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                if ( !is_null( $params['user'] ) || !is_null( $params['excludeuser'] ) ) {
                        if ( !$user->isAllowed( 'deletedhistory' ) ) {
                                $bitmask = Revision::DELETED_USER;
index 48f6046..c47de9d 100644 (file)
@@ -244,7 +244,7 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                                }
                        }
                        if ( $params['user'] !== null || $params['excludeuser'] !== null ) {
-                               // Paranoia: avoid brute force searches (bug 17342)
+                               // Paranoia: avoid brute force searches (T19342)
                                if ( !$this->getUser()->isAllowed( 'deletedhistory' ) ) {
                                        $bitmask = Revision::DELETED_USER;
                                } elseif ( !$this->getUser()->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
index 5093608..a8c037e 100644 (file)
@@ -772,7 +772,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
        }
 
        public function appendProtocols( $property ) {
-               // Make a copy of the global so we don't try to set the _element key of it - bug 45130
+               // Make a copy of the global so we don't try to set the _element key of it - T47130
                $protocols = array_values( $this->getConfig()->get( 'UrlProtocols' ) );
                ApiResult::setArrayType( $protocols, 'BCarray' );
                ApiResult::setIndexedTagName( $protocols, 'p' );
index e27cf7d..6734740 100644 (file)
@@ -364,7 +364,7 @@ class ApiResult implements ApiSerializable {
                        }
                }
                if ( is_array( $value ) ) {
-                       // Work around PHP bug 45959 by copying to a temporary
+                       // Work around https://bugs.php.net/bug.php?id=45959 by copying to a temporary
                        // (in this case, foreach gets $k === "1" but $tmp[$k] assigns as if $k === 1)
                        $tmp = [];
                        foreach ( $value as $k => $v ) {
index 3eeb7a4..bfb0324 100644 (file)
@@ -44,7 +44,7 @@ class ApiUnblock extends ApiBase {
                if ( !$user->isAllowed( 'block' ) ) {
                        $this->dieWithError( 'apierror-permissiondenied-unblock', 'permissiondenied' );
                }
-               # bug 15810: blocked admins should have limited access here
+               # T17810: blocked admins should have limited access here
                if ( $user->isBlocked() ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
index 9e6cf1e..349b773 100644 (file)
@@ -407,7 +407,7 @@ class BacklinkCache {
 
                // 4) ... finally fetch from the slow database :(
                $cacheEntry = [ 'numRows' => 0, 'batches' => [] ]; // final result
-               // Do the selects in batches to avoid client-side OOMs (bug 43452).
+               // Do the selects in batches to avoid client-side OOMs (T45452).
                // Use a LIMIT that plays well with $batchSize to keep equal sized partitions.
                $selectSize = max( $batchSize, 200000 - ( 200000 % $batchSize ) );
                $start = false;
index 15a00c7..86c07ba 100644 (file)
@@ -152,7 +152,7 @@ class ChangesFeed {
                        if ( $feedAge < $wgFeedCacheTimeout || $feedLastmodUnix > $lastmodUnix ) {
                                wfDebug( "RC: loading feed from cache ($key; $feedLastmod; $lastmod)...\n" );
                                if ( $feedLastmodUnix < $lastmodUnix ) {
-                                       $wgOut->setLastModified( $feedLastmod ); // bug 21916
+                                       $wgOut->setLastModified( $feedLastmod ); // T23916
                                }
                                return $cache->get( $key );
                        } else {
index 3c76f32..d02eec8 100644 (file)
@@ -177,7 +177,6 @@ class EnhancedChangesList extends ChangesList {
                        && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
                ) {
                        $tableClasses[] = 'mw-changeslist-line-watched';
-                       $tableClasses = array_merge( $tableClasses, $this->getHTMLClassesForFilters( $block[0] ) );
                } else {
                        $tableClasses[] = 'mw-changeslist-line-not-watched';
                }
@@ -367,7 +366,7 @@ class EnhancedChangesList extends ChangesList {
                if ( $rcObj->watched
                        && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
                ) {
-                       $classes[] = [ 'mw-enhanced-watched' ];
+                       $classes[] = 'mw-enhanced-watched';
                }
                $classes = array_merge( $classes, $this->getHTMLClassesForFilters( $rcObj ) );
 
index d862ef4..a5d5191 100644 (file)
@@ -34,7 +34,7 @@ class OldChangesList extends ChangesList {
        public function recentChangesLine( &$rc, $watched = false, $linenumber = null ) {
 
                $classes = $this->getHTMLClasses( $rc, $watched );
-               // use mw-line-even/mw-line-odd class only if linenumber is given (feature from bug 14468)
+               // use mw-line-even/mw-line-odd class only if linenumber is given (feature from T16468)
                if ( $linenumber ) {
                        if ( $linenumber & 1 ) {
                                $classes[] = 'mw-line-odd';
index 5dc9fa2..ca7b765 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 /**
- * Workaround for incorrect collation of Estonian language ('et') in ICU (bug 54168).
+ * Workaround for incorrect collation of Estonian language ('et') in ICU (T56168).
  *
  * 'W' and 'V' should not be considered the same letter for the purposes of collation in modern
  * Estonian. We work around this by replacing 'W' and 'w' with 'ᴡ' U+1D21 'LATIN LETTER SMALL
index bc5a209..bf1fe74 100644 (file)
@@ -513,8 +513,12 @@ class IcuCollation extends Collation {
         * can't be determined.
         *
         * The constant INTL_ICU_VERSION this function refers to isn't really
-        * documented. It is available since PHP 5.3.7 (see PHP bug 54561).
-        * This function will return false on older PHPs.
+        * documented. It is available since PHP 5.3.7 (see PHP 54561
+        * https://bugs.php.net/bug.php?id=54561). This function will return
+        * false on older PHPs.
+        *
+        * TODO: Remove the backwards-compatibility as MediaWiki now requires
+        * higher levels of PHP.
         *
         * @since 1.21
         * @return string|bool
index 58665bb..bccb147 100644 (file)
@@ -899,7 +899,7 @@ abstract class ContentHandler {
                        $onlyAuthor = $row->rev_user_text;
                        // Try to find a second contributor
                        foreach ( $res as $row ) {
-                               if ( $row->rev_user_text != $onlyAuthor ) { // Bug 22999
+                               if ( $row->rev_user_text != $onlyAuthor ) { // T24999
                                        $onlyAuthor = false;
                                        break;
                                }
@@ -1157,8 +1157,11 @@ abstract class ContentHandler {
         * @return array Map of name=>value for fields
         * @since 1.28
         */
-       public function getDataForSearchIndex( WikiPage $page, ParserOutput $output,
-                                              SearchEngine $engine ) {
+       public function getDataForSearchIndex(
+               WikiPage $page,
+               ParserOutput $output,
+               SearchEngine $engine
+       ) {
                $fieldData = [];
                $content = $page->getContent();
 
index 26f1190..843d540 100644 (file)
@@ -30,8 +30,11 @@ class FileContentHandler extends WikitextContentHandler  {
                return $fields;
        }
 
-       public function getDataForSearchIndex( WikiPage $page, ParserOutput $parserOutput,
-                                              SearchEngine $engine ) {
+       public function getDataForSearchIndex(
+               WikiPage $page,
+               ParserOutput $parserOutput,
+               SearchEngine $engine
+       ) {
                $fields = [];
 
                $title = $page->getTitle();
index 09cdcee..698a37b 100644 (file)
@@ -30,7 +30,7 @@
  */
 class TextContentHandler extends ContentHandler {
 
-       // @codingStandardsIgnoreStart bug 57585
+       // @codingStandardsIgnoreStart T59585
        public function __construct( $modelId = CONTENT_MODEL_TEXT, $formats = [ CONTENT_FORMAT_TEXT ] ) {
                parent::__construct( $modelId, $formats );
        }
@@ -150,8 +150,11 @@ class TextContentHandler extends ContentHandler {
                return $fields;
        }
 
-       public function getDataForSearchIndex( WikiPage $page, ParserOutput $output,
-                                              SearchEngine $engine ) {
+       public function getDataForSearchIndex(
+               WikiPage $page,
+               ParserOutput $output,
+               SearchEngine $engine
+       ) {
                $fields = parent::getDataForSearchIndex( $page, $output, $engine );
                $fields['language'] =
                        $this->getPageLanguage( $page->getTitle(), $page->getContent() )->getCode();
index f4a6dc6..9f79aa8 100644 (file)
@@ -27,26 +27,32 @@ class WikiTextStructure {
         * @var string[] selectors to elements that are excluded entirely from search
         */
        private $excludedElementSelectors = [
-               'audio', 'video',       // "it looks like you don't have javascript enabled..."
-                                       // do not need to index
-               'sup.reference',        // The [1] for references
-               '.mw-cite-backlink',    // The ↑ next to references in the references section
-               'h1', 'h2', 'h3',       // Headings are already indexed in their own field.
-               'h5', 'h6', 'h4',
-               '.autocollapse',        // Collapsed fields are hidden by default so we don't want them
-                                                               // showing up.
+               // "it looks like you don't have javascript enabled..." – do not need to index
+               'audio', 'video',
+               // The [1] for references
+               'sup.reference',
+               // The ↑ next to references in the references section
+               '.mw-cite-backlink',
+               // Headings are already indexed in their own field.
+               'h1', 'h2', 'h3', 'h4', 'h5', 'h6',
+               // Collapsed fields are hidden by default so we don't want them showing up.
+               '.autocollapse',
        ];
 
        /**
         * @var string[] selectors to elements that are considered auxiliary to article text for search
         */
        private $auxiliaryElementSelectors = [
-               '.thumbcaption',        // Thumbnail captions aren't really part of the text proper
-               'table',                // Neither are tables
-               '.rellink',             // Common style for "See also:".
-               '.dablink',             // Common style for calling out helpful links at the top
-                                                               // of the article.
-               '.searchaux',           // New class users can use to mark stuff as auxiliary to searches.
+               // Thumbnail captions aren't really part of the text proper
+               '.thumbcaption',
+               // Neither are tables
+               'table',
+               // Common style for "See also:".
+               '.rellink',
+               // Common style for calling out helpful links at the top of the article.
+               '.dablink',
+               // New class users can use to mark stuff as auxiliary to searches.
+               '.searchaux',
        ];
 
        /**
index 74b2f1a..9c26ae1 100644 (file)
@@ -128,16 +128,20 @@ class WikitextContentHandler extends TextContentHandler {
 
                $fields['opening_text'] =
                        $engine->makeSearchFieldMapping( 'opening_text', SearchIndexField::INDEX_TYPE_TEXT );
-               $fields['opening_text']->setFlag( SearchIndexField::FLAG_SCORING |
-                                                 SearchIndexField::FLAG_NO_HIGHLIGHT );
+               $fields['opening_text']->setFlag(
+                       SearchIndexField::FLAG_SCORING | SearchIndexField::FLAG_NO_HIGHLIGHT
+               );
                // Until we have full first-class content handler for files, we invoke it explicitly here
                $fields = array_merge( $fields, $this->getFileHandler()->getFieldsForSearchIndex( $engine ) );
 
                return $fields;
        }
 
-       public function getDataForSearchIndex( WikiPage $page, ParserOutput $parserOutput,
-                                              SearchEngine $engine ) {
+       public function getDataForSearchIndex(
+               WikiPage $page,
+               ParserOutput $parserOutput,
+               SearchEngine $engine
+       ) {
                $fields = parent::getDataForSearchIndex( $page, $parserOutput, $engine );
 
                $structure = new WikiTextStructure( $parserOutput );
index ecd274b..3dfa456 100644 (file)
@@ -428,7 +428,7 @@ class RequestContext implements IContextSource, MutableContext {
                                }
 
                                // Normalize the key in case the user is passing gibberish
-                               // or has old preferences (bug 69566).
+                               // or has old preferences (T71566).
                                $normalized = Skin::normalizeKey( $userSkin );
 
                                // Skin::normalizeKey will also validate it, so
index 2b394b6..c4921e2 100644 (file)
@@ -79,7 +79,7 @@ class CloneDatabase {
                foreach ( $this->tablesToClone as $tbl ) {
                        if ( $wgSharedDB && in_array( $tbl, $wgSharedTables, true ) ) {
                                // Shared tables don't work properly when cloning due to
-                               // how prefixes are handled (bug 65654)
+                               // how prefixes are handled (T67654)
                                throw new RuntimeException( "Cannot clone shared table $tbl." );
                        }
                        # Clean up from previous aborted run.  So that table escaping
index 87656f2..e67a0b3 100644 (file)
@@ -370,7 +370,7 @@ class MWDebug {
                                | [\xF0-\xF4](?![\x80-\xBF]{3}) # Invalid UTF-8 Sequence Start
                                | (?<=[\x0-\x7F\xF5-\xFF])[\x80-\xBF] # Invalid UTF-8 Sequence Middle
                                | (?<![\xC2-\xDF]|[\xE0-\xEF]|[\xE0-\xEF][\x80-\xBF]|[\xF0-\xF4]
-                                  |[\xF0-\xF4][\x80-\xBF]|[\xF0-\xF4][\x80-\xBF]{2})[\x80-\xBF] # Overlong Sequence
+                                       | [\xF0-\xF4][\x80-\xBF]|[\xF0-\xF4][\x80-\xBF]{2})[\x80-\xBF] # Overlong Sequence
                                | (?<=[\xE0-\xEF])[\x80-\xBF](?![\x80-\xBF]) # Short 3 byte sequence
                                | (?<=[\xF0-\xF4])[\x80-\xBF](?![\x80-\xBF]{2}) # Short 4 byte sequence
                                | (?<=[\xF0-\xF4][\x80-\xBF])[\x80-\xBF](?![\x80-\xBF]) # Short 4 byte sequence (2)
index 432a9e1..6670fe9 100644 (file)
@@ -33,12 +33,12 @@ use Psr\Log\LoggerInterface;
  *
  * Constructor options array arguments:
  * * alias: map from monolog channel to kafka topic name. When no
- *       alias exists the topic "monolog_$channel" will be used.
+ *   alias exists the topic "monolog_$channel" will be used.
  * * swallowExceptions: Swallow exceptions that occur while talking to
- *    kafka. Defaults to false.
+ *   kafka. Defaults to false.
  * * logExceptions: Log exceptions talking to kafka here. Either null,
- *    the name of a channel to log to, or an object implementing
- *    FormatterInterface. Defaults to null.
+ *   the name of a channel to log to, or an object implementing
+ *   FormatterInterface. Defaults to null.
  *
  * Requires the nmred/kafka-php library, version >= 1.3.0
  *
index 464c908..0133f19 100644 (file)
@@ -145,7 +145,7 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
                        # If the sortkey is longer then 255 bytes,
                        # it truncated by DB, and then doesn't get
                        # matched when comparing existing vs current
-                       # categories, causing bug 25254.
+                       # categories, causing T27254.
                        # Also. substr behaves weird when given "".
                        if ( $sortkey !== '' ) {
                                $sortkey = substr( $sortkey, 0, 255 );
index 5367199..148e50c 100644 (file)
@@ -82,7 +82,7 @@ class DifferenceEngine extends ContextSource {
        /**
         * Set this to true to add debug info to the HTML output.
         * Warning: this may cause RSS readers to spuriously mark articles as "new"
-        * (bug 20601)
+        * (T22601)
         */
        public $enableDebugComment = false;
 
index a26775f..ad80275 100644 (file)
@@ -46,11 +46,9 @@ class WordAccumulator {
        private function flushGroup( $new_tag ) {
                if ( $this->group !== '' ) {
                        if ( $this->tag == 'ins' ) {
-                               $this->line .= "<ins{$this->insClass}>" .
-                                                          htmlspecialchars( $this->group ) . '</ins>';
+                               $this->line .= "<ins{$this->insClass}>" . htmlspecialchars( $this->group ) . '</ins>';
                        } elseif ( $this->tag == 'del' ) {
-                               $this->line .= "<del{$this->delClass}>" .
-                                                          htmlspecialchars( $this->group ) . '</del>';
+                               $this->line .= "<del{$this->delClass}>" . htmlspecialchars( $this->group ) . '</del>';
                        } else {
                                $this->line .= htmlspecialchars( $this->group );
                        }
index 9b5a268..2bed87a 100644 (file)
@@ -39,7 +39,7 @@ class ErrorPageError extends MWException implements ILocalizedException {
                $this->msg = $msg;
                $this->params = $params;
 
-               // Bug 44111: Messages in the log files should be in English and not
+               // T46111: Messages in the log files should be in English and not
                // customized by the local wiki. So get the default English version for
                // passing to the parent constructor. Our overridden report() below
                // makes sure that the page shown to the user is not forced to English.
index 44ab0e4..749be3c 100644 (file)
@@ -342,7 +342,7 @@ TXT;
                                $text .= "{$pad}#{$level} {$frame['file']}({$frame['line']}): ";
                        } else {
                                // 'file' and 'line' are unset for calls via call_user_func
-                               // (bug 55634) This matches behaviour of
+                               // (T57634) This matches behaviour of
                                // Exception::getTraceAsString to instead display "[internal
                                // function]".
                                $text .= "{$pad}#{$level} [internal function]: ";
index 43c5b09..6086d55 100644 (file)
@@ -32,7 +32,7 @@
  * @par Example:
  * @code
  * if( $user->isAnon() ) {
- *     throw new UserNotLoggedIn();
+ *   throw new UserNotLoggedIn();
  * }
  * @endcode
  *
  * @par Example:
  * @code
  * if( $user->isAnon() ) {
- *     throw new UserNotLoggedIn( 'action-require-loggedin' );
+ *   throw new UserNotLoggedIn( 'action-require-loggedin' );
  * }
  * @endcode
  *
- * @see bug 37627
+ * @see T39627
  * @since 1.20
  * @ingroup Exception
  */
index c1f2d59..3949764 100644 (file)
@@ -343,7 +343,7 @@ class WikiExporter {
                                # query optimization for history stub dumps
                                if ( $this->text == WikiExporter::STUB && $orderRevs ) {
                                        $tables = [ 'revision', 'page' ];
-                                       $opts[] = 'STRAIGHT_JOIN';
+                                       $opts[] = 'STRAIGHT_JOIN';
                                        $opts['ORDER BY'] = [ 'rev_page ASC', 'rev_id ASC' ];
                                        $opts['USE INDEX']['revision'] = 'rev_page_id';
                                        $join['page'] = [ 'INNER JOIN', 'rev_page=page_id' ];
index 0e4b2f0..8edf81f 100644 (file)
@@ -1448,7 +1448,7 @@ class FileRepo {
                                'dst' => $archivePath,
                                // We may have 2+ identical files being deleted,
                                // all of which will map to the same destination file
-                               'overwriteSame' => true // also see bug 31792
+                               'overwriteSame' => true // also see T33792
                        ];
                }
 
index be78462..3b873ea 100644 (file)
@@ -919,7 +919,7 @@ abstract class File implements IDBAccessObject {
                        return $this->iconThumb();
                }
                $hp['width'] = $width;
-               // be sure to ignore any height specification as well (bug 62258)
+               // be sure to ignore any height specification as well (T64258)
                unset( $hp['height'] );
 
                return $this->transform( $hp );
@@ -1039,7 +1039,7 @@ abstract class File implements IDBAccessObject {
                                break; // not a bitmap or renderable image, don't try
                        }
 
-                       // Get the descriptionUrl to embed it as comment into the thumbnail. Bug 19791.
+                       // Get the descriptionUrl to embed it as comment into the thumbnail. T21791.
                        $descriptionUrl = $this->getDescriptionUrl();
                        if ( $descriptionUrl ) {
                                $params['descriptionUrl'] = wfExpandUrl( $descriptionUrl, PROTO_CANONICAL );
index 8c088b9..a1cb0a2 100644 (file)
@@ -891,7 +891,7 @@ class LocalFile extends File {
                                $files[] = $file;
                        }
                } catch ( FileBackendError $e ) {
-               } // suppress (bug 54674)
+               } // suppress (T56674)
 
                return $files;
        }
@@ -1353,7 +1353,7 @@ class LocalFile extends File {
                                }
                        }
 
-                       # (bug 34993) Note: $oldver can be empty here, if the previous
+                       # (T36993) Note: $oldver can be empty here, if the previous
                        # version of the file was broken. Allow registration of the new
                        # version to continue anyway, because that's better than having
                        # an image that's not fixable by user operations.
@@ -2007,7 +2007,7 @@ class LocalFile extends File {
                        $dbw = $this->repo->getMasterDB();
                        $makesTransaction = !$dbw->trxLevel();
                        $dbw->startAtomic( self::ATOMIC_SECTION_LOCK );
-                       // Bug 54736: use simple lock to handle when the file does not exist.
+                       // T56736: use simple lock to handle when the file does not exist.
                        // SELECT FOR UPDATE prevents changes, not other SELECTs with FOR UPDATE.
                        // Also, that would cause contention on INSERT of similarly named rows.
                        $status = $this->acquireFileLock(); // represents all versions of the file
@@ -3035,7 +3035,7 @@ class LocalFileMoveBatch {
                        $status->failCount++;
                }
                $status->successCount += $oldRowCount;
-               // Bug 34934: oldCount is based on files that actually exist.
+               // T36934: oldCount is based on files that actually exist.
                // There may be more DB rows than such files, in which case $affected
                // can be greater than $total. We use max() to avoid negatives here.
                $status->failCount += max( 0, $this->oldCount - $oldRowCount );
index 179f6af..399147b 100644 (file)
@@ -1259,7 +1259,7 @@ class HTMLForm extends ContextSource {
         *
         * @param string|array|Status $elements The set of errors/warnings to process.
         * @param string $elementsType Should warnings or errors be returned.  This is meant
-        *      for Status objects, all other valid types are always considered as errors.
+        *     for Status objects, all other valid types are always considered as errors.
         * @return string
         */
        public function getErrorsOrWarnings( $elements, $elementsType ) {
index 779d606..fa2d5a3 100644 (file)
@@ -46,8 +46,8 @@ class Http {
         *    - caInfo              Provide CA information
         *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
         *    - followRedirects     Whether to follow redirects (defaults to false).
-        *                                  Note: this should only be used when the target URL is trusted,
-        *                                  to avoid attacks on intranet services accessible by HTTP.
+        *                          Note: this should only be used when the target URL is trusted,
+        *                          to avoid attacks on intranet services accessible by HTTP.
         *    - userAgent           A user agent, if you want to override the default
         *                          MediaWiki/$wgVersion
         *    - logger              A \Psr\Logger\LoggerInterface instance for debug logging
index fac052f..e04402f 100644 (file)
@@ -132,7 +132,7 @@ class MWHttpRequest implements LoggerAwareInterface {
                foreach ( $members as $o ) {
                        if ( isset( $options[$o] ) ) {
                                // ensure that MWHttpRequest::method is always
-                               // uppercased. Bug 36137
+                               // uppercased. T38137
                                if ( $o == 'method' ) {
                                        $options[$o] = strtoupper( $options[$o] );
                                }
@@ -580,7 +580,7 @@ class MWHttpRequest implements LoggerAwareInterface {
         *
         * Note that the multiple Location: headers are an artifact of
         * CURL -- they shouldn't actually get returned this way. Rewrite
-        * this when bug 29232 is taken care of (high-level redirect
+        * this when T31232 is taken care of (high-level redirect
         * handling rewrite).
         *
         * @return string
index 1769924..06b579a 100644 (file)
@@ -546,7 +546,7 @@ class WikiImporter {
        public function doImport() {
                // Calls to reader->read need to be wrapped in calls to
                // libxml_disable_entity_loader() to avoid local file
-               // inclusion attacks (bug 46932).
+               // inclusion attacks (T48932).
                $oldDisable = libxml_disable_entity_loader( true );
                $this->reader->read();
 
index 6a8a99f..caaab46 100644 (file)
@@ -485,7 +485,7 @@ abstract class DatabaseUpdater {
        public function updateRowExists( $key ) {
                $row = $this->db->selectRow(
                        'updatelog',
-                       # Bug 65813
+                       # T67813
                        '1 AS X',
                        [ 'ul_key' => $key ],
                        __METHOD__
index 9c87cf0..f03fe6a 100644 (file)
@@ -216,7 +216,7 @@ abstract class Installer {
                '_UpgradeKeySupplied' => false,
                '_ExistingDBSettings' => false,
 
-               // $wgLogo is probably wrong (bug 48084); set something that will work.
+               // $wgLogo is probably wrong (T50084); set something that will work.
                // Single quotes work fine here, as LocalSettingsGenerator outputs this unescaped.
                'wgLogo' => '$wgResourceBasePath/resources/assets/wiki.png',
                'wgAuthenticationTokenVersion' => 1,
@@ -1431,7 +1431,7 @@ abstract class Installer {
                        );
                }
                // Unset everyone else's hooks. Lord knows what someone might be doing
-               // in ParserFirstCallInit (see bug 27171)
+               // in ParserFirstCallInit (see T29171)
                $GLOBALS['wgHooks'] = [ 'LoadExtensionSchemaUpdates' => $hooksWeWant ];
 
                return Status::newGood();
index 49bfac1..3131c3c 100644 (file)
@@ -824,7 +824,7 @@ class MysqlUpdater extends DatabaseUpdater {
        /**
         * Set page_random field to a random value where it is equals to 0.
         *
-        * @see bug 3946
+        * @see T5946
         */
        protected function doPageRandomUpdate() {
                $page = $this->db->tableName( 'page' );
index e041fdd..1a7b208 100644 (file)
@@ -496,8 +496,8 @@ class PostgresUpdater extends DatabaseUpdater {
                $q = <<<END
 SELECT attname, attnum FROM pg_namespace, pg_class, pg_attribute
        WHERE pg_class.relnamespace = pg_namespace.oid
-         AND attrelid=pg_class.oid AND attnum > 0
-         AND relname=%s AND nspname=%s
+               AND attrelid=pg_class.oid AND attnum > 0
+               AND relname=%s AND nspname=%s
 END;
                $res = $this->db->query( sprintf( $q,
                        $this->db->addQuotes( $table ),
@@ -523,9 +523,9 @@ END;
                $q = <<<END
 SELECT indkey, indrelid FROM pg_namespace, pg_class, pg_index
        WHERE nspname=%s
-         AND pg_class.relnamespace = pg_namespace.oid
-         AND relname=%s
-         AND indexrelid=pg_class.oid
+               AND pg_class.relnamespace = pg_namespace.oid
+               AND relname=%s
+               AND indexrelid=pg_class.oid
 END;
                $res = $this->db->query(
                        sprintf(
@@ -551,8 +551,8 @@ END;
                        $query = <<<END
 SELECT attname FROM pg_class, pg_attribute
        WHERE attrelid=$relid
-         AND attnum=%d
-         AND attrelid=pg_class.oid
+               AND attnum=%d
+               AND attrelid=pg_class.oid
 END;
                        $r2 = $this->db->query( sprintf( $query, $rid ) );
                        if ( !$r2 ) {
@@ -572,8 +572,8 @@ END;
                $q = <<<END
 SELECT confdeltype FROM pg_constraint, pg_namespace
        WHERE connamespace=pg_namespace.oid
-         AND nspname=%s
-         AND conname=%s;
+               AND nspname=%s
+               AND conname=%s;
 END;
                $r = $this->db->query(
                        sprintf(
@@ -594,8 +594,8 @@ END;
                $q = <<<END
 SELECT definition FROM pg_rules
        WHERE schemaname = %s
-         AND tablename = %s
-         AND rulename = %s
+               AND tablename = %s
+               AND rulename = %s
 END;
                $r = $this->db->query(
                        sprintf(
@@ -981,10 +981,10 @@ END;
 
        protected function rebuildTextSearch() {
                if ( $this->updateRowExists( 'patch-textsearch_bug66650.sql' ) ) {
-                       $this->output( "...bug 66650 already fixed or not applicable.\n" );
+                       $this->output( "...T68650 already fixed or not applicable.\n" );
                        return;
                };
                $this->applyPatch( 'patch-textsearch_bug66650.sql', false,
-                       'Rebuilding text search for bug 66650' );
+                       'Rebuilding text search for T68650' );
        }
 }
index c5c4a7c..0fe7068 100644 (file)
@@ -244,9 +244,9 @@ class SqliteInstaller extends DatabaseInstaller {
                        $sql =
 <<<EOT
        CREATE TABLE IF NOT EXISTS objectcache (
-         keyname BLOB NOT NULL default '' PRIMARY KEY,
-         value BLOB,
-         exptime TEXT
+               keyname BLOB NOT NULL default '' PRIMARY KEY,
+               value BLOB,
+               exptime TEXT
        )
 EOT;
                        $conn->query( $sql );
index c08212e..c94f0bf 100644 (file)
@@ -1083,7 +1083,7 @@ class WebInstaller extends Installer {
 
                foreach ( $varNames as $name ) {
                        $value = $this->request->getVal( $prefix . $name );
-                       // bug 30524, do not trim passwords
+                       // T32524, do not trim passwords
                        if ( stripos( $name, 'password' ) === false ) {
                                $value = trim( $value );
                        }
index e6deed5..81a107d 100644 (file)
@@ -251,7 +251,7 @@ class WebInstallerName extends WebInstallerPage {
                        $retVal = false;
                }
                // If they asked to subscribe to mediawiki-announce but didn't give
-               // an e-mail, show an error. Bug 29332
+               // an e-mail, show an error. T31332
                if ( !$email && $this->getVar( '_Subscribe' ) ) {
                        $this->parent->showError( 'config-subscribe-noemail' );
                        $retVal = false;
index 62fe785..e4eb255 100644 (file)
@@ -299,9 +299,9 @@ class WebInstallerOutput {
 
 <div id="mw-panel">
        <div class="portal" id="p-logo">
-         <a style="background-image: url(images/installer-logo.png);"
-               href="https://www.mediawiki.org/"
-               title="Main Page"></a>
+               <a style="background-image: url(images/installer-logo.png);"
+                       href="https://www.mediawiki.org/"
+                       title="Main Page"></a>
        </div>
 <?php
        $message = wfMessage( 'config-sidebar' )->plain();
index 2ab0554..7a41ceb 100644 (file)
@@ -92,7 +92,7 @@ abstract class WebInstallerPage {
                }
 
                if ( $continue ) {
-                       // Fake submit button for enter keypress (bug 26267)
+                       // Fake submit button for enter keypress (T28267)
                        // Messages: config-continue, config-restart, config-regenerate
                        $s .= Xml::submitButton(
                                wfMessage( "config-$continue" )->text(),
index 72973e7..bf732a4 100644 (file)
@@ -67,7 +67,7 @@ class WebInstallerUpgrade extends WebInstallerPage {
 
                        if ( $result ) {
                                // If they're going to possibly regenerate LocalSettings, we
-                               // need to create the upgrade/secret keys. Bug 26481
+                               // need to create the upgrade/secret keys. T28481
                                if ( !$this->getVar( '_ExistingDBSettings' ) ) {
                                        $this->parent->generateKeys();
                                }
index 0a8ae7f..2f58947 100644 (file)
@@ -346,7 +346,7 @@ class JobQueueDB extends JobQueue {
                                        continue; // try the other direction
                                }
                        } else { // table *may* have >= MAX_OFFSET rows
-                               // Bug 42614: "ORDER BY job_random" with a job_random inequality causes high CPU
+                               // T44614: "ORDER BY job_random" with a job_random inequality causes high CPU
                                // in MySQL if there are many rows for some reason. This uses a small OFFSET
                                // instead of job_random for reducing excess claim retries.
                                $row = $dbw->selectRow( 'job', self::selectFields(), // find a random job
index 25a271c..c2c9d66 100644 (file)
@@ -793,9 +793,9 @@ LUA;
        private function getGlobalKey( $name ) {
                $parts = [ 'global', 'jobqueue', $name ];
                foreach ( $parts as $part ) {
-                   if ( !preg_match( '/[a-zA-Z0-9_-]+/', $part ) ) {
-                       throw new InvalidArgumentException( "Key part characters are out of range." );
-                   }
+                       if ( !preg_match( '/[a-zA-Z0-9_-]+/', $part ) ) {
+                               throw new InvalidArgumentException( "Key part characters are out of range." );
+                       }
                }
 
                return implode( ':', $parts );
index 3cd3448..74c446f 100644 (file)
@@ -137,7 +137,7 @@ class DoubleRedirectJob extends Job {
                        wfDebug( __METHOD__ . " : skipping, already good\n" );
                }
 
-               // Preserve fragment (bug 14904)
+               // Preserve fragment (T16904)
                $newTitle = Title::makeTitle( $newTitle->getNamespace(), $newTitle->getDBkey(),
                        $currentDest->getFragment(), $newTitle->getInterwiki() );
 
@@ -199,7 +199,7 @@ class DoubleRedirectJob extends Job {
                        $seenTitles[$titleText] = true;
 
                        if ( $title->isExternal() ) {
-                               // If the target is interwiki, we have to break early (bug 40352).
+                               // If the target is interwiki, we have to break early (T42352).
                                // Otherwise it will look up a row in the local page table
                                // with the namespace/page of the interwiki target which can cause
                                // unexpected results (e.g. X -> foo:Bar -> Bar -> .. )
index 37e80c2..e89812b 100644 (file)
@@ -128,7 +128,7 @@ class PublishStashedFileJob extends Job {
                        );
                        $this->setLastError( get_class( $e ) . ": " . $e->getMessage() );
                        // To prevent potential database referential integrity issues.
-                       // See bug 32551.
+                       // See T34551.
                        MWExceptionHandler::rollbackMasterChangesAndLog( $e );
 
                        return false;
index 651a332..f9284a5 100644 (file)
@@ -29,7 +29,7 @@ use MediaWiki\MediaWikiServices;
  *   - a) Recursive jobs to update links for backlink pages for a given title.
  *        These jobs have (recursive:true,table:<table>) set.
  *   - b) Jobs to update links for a set of pages (the job title is ignored).
- *           These jobs have (pages:(<page ID>:(<namespace>,<title>),...) set.
+ *        These jobs have (pages:(<page ID>:(<namespace>,<title>),...) set.
  *   - c) Jobs to update links for a single page (the job title)
  *        These jobs need no extra fields set.
  *
index 7f50055..1c12a1c 100644 (file)
@@ -33,7 +33,7 @@
  * For example, if templates A and B are edited (at the same time) the queue will have:
  *     (A base, B base)
  * When these jobs run, the queue will have per-title and remnant partition jobs:
- *        (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
+ *     (titleX,titleY,titleZ,...,A remnant,titleM,titleN,titleO,...,B remnant)
  *
  * This works best when the queue is FIFO, for several reasons:
  *   - a) Since the remnant jobs are enqueued after the leaf jobs, the slower leaf jobs have to
@@ -133,7 +133,7 @@ class BacklinkJobUtils {
                                        'table'         => $params['table'],
                                        'range'         => [
                                                'start'     => $ranges[1][0],
-                                               'end'       => $ranges[count( $ranges ) - 1][1],
+                                               'end'       => $ranges[count( $ranges ) - 1][1],
                                                'batchSize' => $realBSize,
                                                'subranges' => array_slice( $ranges, 1 )
                                        ],
index bc99672..b1cece8 100644 (file)
@@ -8,7 +8,7 @@
  * not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
- *             http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software distributed
  * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
@@ -237,7 +237,7 @@ class CSSMin {
                //       * Otherwise remap the URL to work in generated stylesheets
 
                // Guard against trailing slashes, because "some/remote/../foo.png"
-               // resolves to "some/remote/foo.png" on (some?) clients (bug 27052).
+               // resolves to "some/remote/foo.png" on (some?) clients (T29052).
                if ( substr( $remote, -1 ) == '/' ) {
                        $remote = substr( $remote, 0, -1 );
                }
index 4c86757..6b3e4a7 100644 (file)
@@ -197,11 +197,11 @@ class CryptHKDF {
         * From http://eprint.iacr.org/2010/264.pdf:
         *
         * The scheme HKDF is specifed as:
-        *      HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
+        *   HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
         * where the values K(i) are defined as follows:
-        *      PRK = HMAC(XTS, SKM)
-        *      K(1) = HMAC(PRK, CTXinfo || 0);
-        *      K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
+        *   PRK = HMAC(XTS, SKM)
+        *   K(1) = HMAC(PRK, CTXinfo || 0);
+        *   K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
         * where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits;
         * the counter i is non-wrapping and of a given fixed size, e.g., a single byte.
         * Note that the length of the HMAC output is the same as its key length and therefore
index 21203a4..a6aa0a3 100644 (file)
@@ -675,7 +675,7 @@ class IP {
         * @return string|null Valid dotted quad IPv4 address or null
         */
        public static function canonicalize( $addr ) {
-               // remove zone info (bug 35738)
+               // remove zone info (T37738)
                $addr = preg_replace( '/\%.*/', '', $addr );
 
                if ( self::isValid( $addr ) ) {
index db085da..e860ec4 100644 (file)
@@ -85,7 +85,7 @@ class StatusValue {
         * defined as:
         * [
         *     0 => object(StatusValue) # the StatusValue with error messages, only
-        *         1 => object(StatusValue) # The StatusValue with warning messages, only
+        *     1 => object(StatusValue) # The StatusValue with warning messages, only
         * ]
         *
         * @return StatusValue[]
@@ -154,7 +154,7 @@ class StatusValue {
        }
 
        /**
-        * Change operation resuklt
+        * Change operation result
         *
         * @param bool $ok Whether the operation completed
         * @param mixed $value
index d40e896..c50dfd7 100644 (file)
@@ -1089,7 +1089,7 @@ class SwiftFileBackend extends FileBackendStore {
                        // good
                } elseif ( $rcode === 404 ) {
                        $status->fatal( 'backend-fail-stream', $params['src'] );
-                       // Per bug 41113, nasty things can happen if bad cache entries get
+                       // Per T43113, nasty things can happen if bad cache entries get
                        // stuck in cache. It's also possible that this error can come up
                        // with simple race conditions. Clear out the stat cache to be safe.
                        $this->clearCache( [ $params['src'] ] );
index 5edd889..2468f38 100644 (file)
@@ -95,9 +95,9 @@ application/vnd.ms-powerpoint [OFFICE]
 application/x-director         [OFFICE]
 text/rtf                       [OFFICE]
 
-application/vnd.openxmlformats-officedocument.wordprocessingml.document        [OFFICE]
+application/vnd.openxmlformats-officedocument.wordprocessingml.document        [OFFICE]
 application/vnd.openxmlformats-officedocument.wordprocessingml.template                [OFFICE]
-application/vnd.ms-word.document.macroEnabled.12                               [OFFICE]
+application/vnd.ms-word.document.macroEnabled.12                               [OFFICE]
 application/vnd.ms-word.template.macroEnabled.12                               [OFFICE]
 application/vnd.openxmlformats-officedocument.presentationml.template          [OFFICE]
 application/vnd.openxmlformats-officedocument.presentationml.slideshow         [OFFICE]
index ae91be5..730eed1 100644 (file)
@@ -63,9 +63,9 @@ class RESTBagOStuff extends BagOStuff {
        protected function doGet( $key, $flags = 0 ) {
                $req = [
                        'method' => 'GET',
-                   'url' => $this->url . rawurlencode( $key ),
-
+                       'url' => $this->url . rawurlencode( $key ),
                ];
+
                list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->client->run( $req );
                if ( $rcode === 200 ) {
                        if ( is_string( $rbody ) ) {
index d852f82..583ec37 100644 (file)
@@ -321,7 +321,7 @@ class RedisBagOStuff extends BagOStuff {
         */
        protected function serialize( $data ) {
                // Serialize anything but integers so INCR/DECR work
-               // Do not store integer-like strings as integers to avoid type confusion (bug 60563)
+               // Do not store integer-like strings as integers to avoid type confusion (T62563)
                return is_int( $data ) ? $data : serialize( $data );
        }
 
index d84c959..98f44d1 100644 (file)
@@ -41,7 +41,7 @@ class WinCacheBagOStuff extends BagOStuff {
                $result = wincache_ucache_set( $key, serialize( $value ), $expire );
 
                /* wincache_ucache_set returns an empty array on success if $value
-                  was an array, bool otherwise */
+                * was an array, bool otherwise */
                return ( is_array( $result ) && $result === [] ) || $result;
        }
 
index a7952a6..50522ef 100644 (file)
@@ -846,7 +846,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                }
 
                // Add trace comment to the begin of the sql string, right after the operator.
-               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (bug 42598)
+               // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (T44598)
                $commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 );
 
                # Start implicit transactions that wrap the request if DBO_TRX is enabled
@@ -1025,8 +1025,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
 
        private function handleSessionLoss() {
                $this->mTrxLevel = 0;
-               $this->mTrxIdleCallbacks = []; // bug 65263
-               $this->mTrxPreCommitCallbacks = []; // bug 65263
+               $this->mTrxIdleCallbacks = []; // T67263
+               $this->mTrxPreCommitCallbacks = []; // T67263
                $this->mSessionTempTables = [];
                $this->mNamedLocksHeld = [];
                try {
index c62fec1..7b8a940 100644 (file)
@@ -985,7 +985,7 @@ __INDEXATTR__;
                                /**
                                 * Prepend our schema (e.g. 'mediawiki') in front
                                 * of the search path
-                                * Fixes bug 15816
+                                * Fixes T17816
                                 */
                                $search_path = $this->getSearchPath();
                                array_unshift( $search_path,
@@ -1026,7 +1026,7 @@ __INDEXATTR__;
                                // Normal client
                                $this->numericVersion = $versionInfo['server'];
                        } else {
-                               // Bug 16937: broken pgsql extension from PHP<5.3
+                               // T18937: broken pgsql extension from PHP<5.3
                                $this->numericVersion = pg_parameter_status( $conn, 'server_version' );
                        }
                }
index c4229bc..f05dabc 100644 (file)
@@ -336,7 +336,7 @@ abstract class LBFactory implements ILBFactory {
                $masterPositions = array_fill( 0, count( $lbs ), false );
                foreach ( $lbs as $i => $lb ) {
                        if ( $lb->getServerCount() <= 1 ) {
-                               // Bug 27975 - Don't try to wait for replica DBs if there are none
+                               // T29975 - Don't try to wait for replica DBs if there are none
                                // Prevents permission error when getting master position
                                continue;
                        } elseif ( $opts['ifWritesSince']
index 0d171f5..f1df7f1 100644 (file)
@@ -647,7 +647,7 @@ class XMPReader implements LoggerAwareInterface {
        private function endElementNested( $elm ) {
 
                /* cur item must be the same as $elm, unless if in MODE_STRUCT
-                  in which case it could also be rdf:Description */
+                * in which case it could also be rdf:Description */
                if ( $this->curItem[0] !== $elm
                        && !( $elm === self::NS_RDF . ' Description'
                                && $this->mode[0] === self::MODE_STRUCT )
@@ -895,7 +895,7 @@ class XMPReader implements LoggerAwareInterface {
                if ( $elm === self::NS_RDF . ' Seq' ) {
                        array_unshift( $this->mode, self::MODE_LI );
                } elseif ( $elm === self::NS_RDF . ' Bag' ) {
-                       # bug 27105
+                       # T29105
                        $this->logger->info( __METHOD__ . ' Expected an rdf:Seq, but got an rdf:Bag. Pretending'
                                . ' it is a Seq, since some buggy software is known to screw this up.' );
                        array_unshift( $this->mode, self::MODE_LI );
index 052be33..5211a2c 100644 (file)
@@ -650,7 +650,7 @@ class XMPInfo {
                                'choices' => [ '1' => true, '2' => true ],
                        ],
                        /********
-                        * Disable extracting this property (bug 31944)
+                        * Disable extracting this property (T33944)
                         * Several files have a string instead of a Seq
                         * for this property. XMPReader doesn't handle
                         * mismatched types very gracefully (it marks
@@ -658,7 +658,7 @@ class XMPInfo {
                         * the relavent prop). Since this prop
                         * doesn't communicate all that useful information
                         * just disable this prop for now, until such
-                        * XMPReader is more graceful (bug 32172)
+                        * XMPReader is more graceful (T34172)
                         * 'YCbCrSubSampling'  => array(
                         *    'map_group' => 'exif',
                         *    'mode'      => XMPReader::MODE_SEQ,
index b5af783..68404bf 100644 (file)
@@ -167,7 +167,7 @@ class LogFormatter {
 
        /**
         * Even uglier hack to maintain backwards compatibilty with IRC bots
-        * (bug 34508).
+        * (T36508).
         * @see getActionText()
         * @return string Text
         */
@@ -188,7 +188,7 @@ class LogFormatter {
 
        /**
         * Even uglier hack to maintain backwards compatibilty with IRC bots
-        * (bug 34508).
+        * (T36508).
         * @see getActionText()
         * @return string Text
         */
index 68163c1..ea28ff2 100644 (file)
@@ -181,7 +181,7 @@ class LogPager extends ReverseChronologicalPager {
                } else {
                        $this->mConds['log_user'] = $userid;
                }
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                $user = $this->getUser();
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $this->mConds[] = $this->mDb->bitAnd( 'log_deleted', LogPage::DELETED_USER ) . ' = 0';
@@ -256,7 +256,7 @@ class LogPager extends ReverseChronologicalPager {
                } else {
                        $this->mConds['log_title'] = $title->getDBkey();
                }
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                $user = $this->getUser();
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';
index 1d0bdf6..d66e7e3 100644 (file)
@@ -316,7 +316,7 @@ class EmailNotification {
                $pageTitle = $this->title->getPrefixedText();
 
                if ( $this->oldid ) {
-                       // Always show a link to the diff which triggered the mail. See bug 32210.
+                       // Always show a link to the diff which triggered the mail. See T34210.
                        $keys['$NEWPAGE'] = "\n\n" . wfMessage( 'enotif_lastdiff',
                                        $this->title->getCanonicalURL( [ 'diff' => 'next', 'oldid' => $this->oldid ] ) )
                                        ->inContentLanguage()->text();
@@ -363,7 +363,7 @@ class EmailNotification {
                        Skin::makeInternalOrExternalUrl( wfMessage( 'helppage' )->inContentLanguage()->text() )
                );
 
-               # Replace this after transforming the message, bug 35019
+               # Replace this after transforming the message, T37019
                $postTransformKeys['$PAGESUMMARY'] = $this->summary == '' ? ' - ' : $this->summary;
 
                // Now build message's subject and body
index 21effa0..3858f27 100644 (file)
@@ -103,9 +103,9 @@ class UserMailer {
         * @param string $subject Email's subject.
         * @param string $body Email's text or Array of two strings to be the text and html bodies
         * @param array $options:
-        *              'replyTo' MailAddress
-        *              'contentType' string default 'text/plain; charset=UTF-8'
-        *              'headers' array Extra headers to set
+        *     'replyTo' MailAddress
+        *     'contentType' string default 'text/plain; charset=UTF-8'
+        *     'headers' array Extra headers to set
         *
         * @throws MWException
         * @throws Exception
@@ -197,9 +197,9 @@ class UserMailer {
         * @param string $subject Email's subject.
         * @param string $body Email's text or Array of two strings to be the text and html bodies
         * @param array $options:
-        *              'replyTo' MailAddress
-        *              'contentType' string default 'text/plain; charset=UTF-8'
-        *              'headers' array Extra headers to set
+        *     'replyTo' MailAddress
+        *     'contentType' string default 'text/plain; charset=UTF-8'
+        *     'headers' array Extra headers to set
         *
         * @throws MWException
         * @throws Exception
index ac0564d..0f0b074 100644 (file)
@@ -150,7 +150,7 @@ class BitmapHandler extends TransformationalImageHandler {
                        if ( $params['interlace'] ) {
                                $animation_post = [ '-interlace', 'JPEG' ];
                        }
-                       # Sharpening, see bug 6193
+                       # Sharpening, see T8193
                        if ( ( $params['physicalWidth'] + $params['physicalHeight'] )
                                / ( $params['srcWidth'] + $params['srcHeight'] )
                                < $wgSharpenReductionThreshold
@@ -178,10 +178,10 @@ class BitmapHandler extends TransformationalImageHandler {
                                // be a total drag. :P
                                $scene = 0;
                        } elseif ( $this->isAnimatedImage( $image ) ) {
-                               // Coalesce is needed to scale animated GIFs properly (bug 1017).
+                               // Coalesce is needed to scale animated GIFs properly (T3017).
                                $animation_pre = [ '-coalesce' ];
                                // We optimize the output, but -optimize is broken,
-                               // use optimizeTransparency instead (bug 11822)
+                               // use optimizeTransparency instead (T13822)
                                if ( version_compare( $this->getMagickVersion(), "6.3.5" ) >= 0 ) {
                                        $animation_post = [ '-fuzz', '5%', '-layers', 'optimizeTransparency' ];
                                }
@@ -211,7 +211,7 @@ class BitmapHandler extends TransformationalImageHandler {
                                && $xcfMeta['colorType'] === 'greyscale-alpha'
                                && version_compare( $this->getMagickVersion(), "6.8.9-3" ) < 0
                        ) {
-                               // bug 66323 - Greyscale images not rendered properly.
+                               // T68323 - Greyscale images not rendered properly.
                                // So only take the "red" channel.
                                $channelOnly = [ '-channel', 'R', '-separate' ];
                                $animation_pre = array_merge( $animation_pre, $channelOnly );
@@ -283,7 +283,7 @@ class BitmapHandler extends TransformationalImageHandler {
                        $im->readImage( $params['srcPath'] );
 
                        if ( $params['mimeType'] == 'image/jpeg' ) {
-                               // Sharpening, see bug 6193
+                               // Sharpening, see T8193
                                if ( ( $params['physicalWidth'] + $params['physicalHeight'] )
                                        / ( $params['srcWidth'] + $params['srcHeight'] )
                                        < $wgSharpenReductionThreshold
@@ -312,7 +312,7 @@ class BitmapHandler extends TransformationalImageHandler {
                                        // be a total drag. :P
                                        $im->setImageScene( 0 );
                                } elseif ( $this->isAnimatedImage( $image ) ) {
-                                       // Coalesce is needed to scale animated GIFs properly (bug 1017).
+                                       // Coalesce is needed to scale animated GIFs properly (T3017).
                                        $im = $im->coalesceImages();
                                }
                                // GIF interlacing is only available since 6.3.4
index 5e8f8c8..57b5b36 100644 (file)
@@ -277,9 +277,9 @@ class DjVuImage {
                                $reg = <<<EOR
                                        /\(page\s[\d-]*\s[\d-]*\s[\d-]*\s[\d-]*\s*"
                                        ((?>    # Text to match is composed of atoms of either:
-                                         \\\\. # - any escaped character
-                                         |     # - any character different from " and \
-                                         [^"\\\\]+
+                                               \\\\. # - any escaped character
+                                               |     # - any character different from " and \
+                                               [^"\\\\]+
                                        )*?)
                                        "\s*\)
                                        | # Or page can be empty ; in this case, djvutxt dumps ()
index 6c857a8..c9f0dfa 100644 (file)
@@ -112,8 +112,8 @@ class JpegHandler extends ExifBitmapHandler {
                        wfDebug( __METHOD__ . ': ' . $e->getMessage() . "\n" );
 
                        /* This used to use 0 (ExifBitmapHandler::OLD_BROKEN_FILE) for the cases
-                        *      * No metadata in the file
-                        *      * Something is broken in the file.
+                        *   * No metadata in the file
+                        *   * Something is broken in the file.
                         * However, if the metadata support gets expanded then you can't tell if the 0 is from
                         * a broken file, or just no props found. A broken file is likely to stay broken, but
                         * a file which had no props could have props once the metadata support is improved.
index 2a735a2..6a23bd6 100644 (file)
@@ -762,7 +762,7 @@ abstract class MediaHandler {
         * @param string $cmd
         */
        protected function logErrorForExternalProcess( $retval, $err, $cmd ) {
-               # Keep error output limited (bug 57985)
+               # Keep error output limited (T59985)
                $errMessage = trim( substr( $err, 0, self::MAX_ERR_LOG_SIZE ) );
 
                wfDebugLog( 'thumbnail',
index 6a974c7..4087fb3 100644 (file)
@@ -86,13 +86,13 @@ class SVGReader {
                }
 
                // Expand entities, since Adobe Illustrator uses them for xmlns
-               // attributes (bug 31719). Note that libxml2 has some protection
+               // attributes (T33719). Note that libxml2 has some protection
                // against large recursive entity expansions so this is not as
                // insecure as it might appear to be. However, it is still extremely
                // insecure. It's necessary to wrap any read() calls with
                // libxml_disable_entity_loader() to avoid arbitrary local file
                // inclusion, or even arbitrary code execution if the expect
-               // extension is installed (bug 46859).
+               // extension is installed (T48859).
                $oldDisable = libxml_disable_entity_loader( true );
                $this->reader->setParserProperty( XMLReader::SUBST_ENTITIES, true );
 
index 7e8c2ba..07581d7 100644 (file)
@@ -405,7 +405,7 @@ class SqlBagOStuff extends BagOStuff {
                                $exptime = $this->convertExpiry( $exptime );
                                $encExpiry = $db->timestamp( $exptime );
                        }
-                       // (bug 24425) use a replace if the db supports it instead of
+                       // (T26425) use a replace if the db supports it instead of
                        // delete/insert to avoid clashes with conflicting keynames
                        $db->update(
                                $tableName,
@@ -480,7 +480,7 @@ class SqlBagOStuff extends BagOStuff {
                                ], __METHOD__, 'IGNORE' );
 
                        if ( $db->affectedRows() == 0 ) {
-                               // Race condition. See bug 28611
+                               // Race condition. See T30611
                                $newValue = null;
                        }
                } catch ( DBError $e ) {
index 2787c1b..e7a906d 100644 (file)
@@ -726,7 +726,7 @@ class Article implements Page {
 
                $ns = $this->getTitle()->getNamespace();
 
-               # Don't index user and user talk pages for blocked users (bug 11443)
+               # Don't index user and user talk pages for blocked users (T13443)
                if ( ( $ns == NS_USER || $ns == NS_USER_TALK ) && !$this->getTitle()->isSubpage() ) {
                        $specificTarget = null;
                        $vagueTarget = null;
@@ -784,7 +784,7 @@ class Article implements Page {
                }
 
                if ( isset( $wgArticleRobotPolicies[$this->getTitle()->getPrefixedText()] ) ) {
-                       # (bug 14900) site config can override user-defined __INDEX__ or __NOINDEX__
+                       # (T16900) site config can override user-defined __INDEX__ or __NOINDEX__
                        $policy = array_merge(
                                $policy,
                                self::formatRobotPolicy( $wgArticleRobotPolicies[$this->getTitle()->getPrefixedText()] )
index 53d7e55..714d3a9 100644 (file)
@@ -213,7 +213,7 @@ class ImagePage extends Article {
                }
 
                $out->addModuleStyles( [
-                       'filepage', // always show the local local Filepage.css, bug 29277
+                       'filepage', // always show the local local Filepage.css, T31277
                        'mediawiki.action.view.filepage', // Add MediaWiki styles for a file page
                ] );
        }
@@ -534,7 +534,7 @@ class ImagePage extends Article {
                                // this will get messy.
                                // The dirmark, however, must not be immediately adjacent
                                // to the filename, because it can get copied with it.
-                               // See bug 25277.
+                               // See T27277.
                                // @codingStandardsIgnoreStart Ignore long line
                                $out->addWikiText( <<<EOT
 <div class="fullMedia"><span class="dangerousLink">{$medialink}</span> $dirmark<span class="fileInfo">$longDesc</span></div>
index bc936ab..e49ef2a 100644 (file)
@@ -151,7 +151,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @return WikiPage|null
         */
        public static function newFromID( $id, $from = 'fromdb' ) {
-               // page id's are never 0 or negative, see bug 61166
+               // page ids are never 0 or negative, see T63166
                if ( $id < 1 ) {
                        return null;
                }
@@ -257,7 +257,7 @@ class WikiPage implements Page, IDBAccessObject {
                $this->mTimestamp = '';
                $this->mIsRedirect = false;
                $this->mLatest = false;
-               // Bug 57026: do not clear mPreparedEdit since prepareTextForEdit() already checks
+               // T59026: do not clear mPreparedEdit since prepareTextForEdit() already checks
                // the requested rev ID and content against the cached one for equality. For most
                // content types, the output should not change during the lifetime of this cache.
                // Clearing it can cause extra parses on edit for no reason.
@@ -424,7 +424,7 @@ class WikiPage implements Page, IDBAccessObject {
                        $this->mLinksUpdated = wfTimestampOrNull( TS_MW, $data->page_links_updated );
                        $this->mIsRedirect = intval( $data->page_is_redirect );
                        $this->mLatest = intval( $data->page_latest );
-                       // Bug 37225: $latest may no longer match the cached latest Revision object.
+                       // T39225: $latest may no longer match the cached latest Revision object.
                        // Double-check the ID of any cached latest Revision object for consistency.
                        if ( $this->mLastRevision && $this->mLastRevision->getId() != $this->mLatest ) {
                                $this->mLastRevision = null;
@@ -619,7 +619,7 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( $this->mDataLoadedFrom == self::READ_LOCKING ) {
-                       // Bug 37225: if session S1 loads the page row FOR UPDATE, the result always
+                       // T39225: if session S1 loads the page row FOR UPDATE, the result always
                        // includes the latest changes committed. This is true even within REPEATABLE-READ
                        // transactions, where S1 normally only sees changes committed before the first S1
                        // SELECT. Thus we need S1 to also gets the revision row FOR UPDATE; otherwise, it
@@ -1460,7 +1460,7 @@ class WikiPage implements Page, IDBAccessObject {
                                        $this->getContentHandler()->getModelID() );
                        }
 
-                       // Bug 30711: always use current version when adding a new section
+                       // T32711: always use current version when adding a new section
                        if ( is_null( $baseRevId ) || $sectionId === 'new' ) {
                                $oldContent = $this->getContent();
                        } else {
@@ -1695,7 +1695,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                        return $status;
                } elseif ( !$oldContent ) {
-                       // Sanity check for bug 37225
+                       // Sanity check for T39225
                        throw new MWException( "Could not find text for current revision {$oldid}." );
                }
 
@@ -1783,7 +1783,7 @@ class WikiPage implements Page, IDBAccessObject {
                        $dbw->endAtomic( __METHOD__ );
                        $this->mTimestamp = $now;
                } else {
-                       // Bug 32948: revision ID must be set to page {{REVISIONID}} and
+                       // T34948: revision ID must be set to page {{REVISIONID}} and
                        // related variables correctly. Likewise for {{REVISIONUSER}} (T135261).
                        $revision->setId( $this->getLatest() );
                        $revision->setUserIdAndName(
@@ -2023,7 +2023,7 @@ class WikiPage implements Page, IDBAccessObject {
                $user = is_null( $user ) ? $wgUser : $user;
                // XXX: check $user->getId() here???
 
-               // Use a sane default for $serialFormat, see bug 57026
+               // Use a sane default for $serialFormat, see T59026
                if ( $serialFormat === null ) {
                        $serialFormat = $content->getContentHandler()->getDefaultFormat();
                }
@@ -2195,7 +2195,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Update the links tables and other secondary data
                if ( $content ) {
-                       $recursive = $options['changed']; // bug 50785
+                       $recursive = $options['changed']; // T52785
                        $updates = $content->getSecondaryDataUpdates(
                                $this->getTitle(), null, $recursive, $editInfo->output
                        );
@@ -2297,7 +2297,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                if ( $options['created'] ) {
                        self::onArticleCreate( $this->mTitle );
-               } elseif ( $options['changed'] ) { // bug 50785
+               } elseif ( $options['changed'] ) { // T52785
                        self::onArticleEdit( $this->mTitle, $revision );
                }
 
@@ -2911,7 +2911,7 @@ class WikiPage implements Page, IDBAccessObject {
 
                $dbw->onTransactionPreCommitOrIdle(
                        function () use ( $dbw, $logEntry, $logid ) {
-                               // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+                               // T58776: avoid deadlocks (especially from FileDeleteForm)
                                $logEntry->publish( $logid );
                        },
                        __METHOD__
@@ -3191,7 +3191,7 @@ class WikiPage implements Page, IDBAccessObject {
                );
 
                // Set patrolling and bot flag on the edits, which gets rollbacked.
-               // This is done even on edit failure to have patrolling in that case (bug 62157).
+               // This is done even on edit failure to have patrolling in that case (T64157).
                $set = [];
                if ( $bot && $guser->isAllowed( 'markbotedits' ) ) {
                        // Mark all reverted edits as bot
index 2ef599a..2023d13 100644 (file)
@@ -299,7 +299,7 @@ class BlockLevelPass {
 
                                if ( $openMatch || $closeMatch ) {
                                        $pendingPTag = false;
-                                       # @todo bug 5718: paragraph closed
+                                       # @todo T7718: paragraph closed
                                        $output .= $this->closeParagraph();
                                        if ( $preOpenMatch && !$preCloseMatch ) {
                                                $this->inPre = true;
@@ -353,7 +353,7 @@ class BlockLevelPass {
                                        }
                                }
                        }
-                       # somewhere above we forget to get out of pre block (bug 785)
+                       # somewhere above we forget to get out of pre block (T2785)
                        if ( $preCloseMatch && $this->inPre ) {
                                $this->inPre = false;
                        }
index 6aa3acc..e34d10b 100644 (file)
@@ -157,7 +157,7 @@ class CoreParserFunctions {
        }
 
        /**
-        * urlencodes a string according to one of three patterns: (bug 22474)
+        * urlencodes a string according to one of three patterns: (T24474)
         *
         * By default (for HTTP "query" strings), spaces are encoded as '+'.
         * Or to encode a value for the HTTP "path", spaces are encoded as '%20'.
index 76ee525..605a873 100644 (file)
@@ -107,7 +107,7 @@ class DateFormatter {
                $this->targets[self::ISO2] = '[[y-m-d]]';
 
                # Rules
-               #            pref    source       target
+               #            pref       source      target
                $this->rules[self::DMY][self::MD] = self::DM;
                $this->rules[self::ALL][self::MD] = self::MD;
                $this->rules[self::MDY][self::DM] = self::MD;
@@ -127,7 +127,7 @@ class DateFormatter {
         * Get a DateFormatter object
         *
         * @param Language|string|null $lang In which language to format the date
-        *              Defaults to the site content language
+        *     Defaults to the site content language
         * @return DateFormatter
         */
        public static function getInstance( $lang = null ) {
index 86aa06a..9a9b9d8 100644 (file)
@@ -1450,15 +1450,16 @@ class Parser {
                $spdash = "(?:-|$space)"; # a dash or a non-newline space
                $spaces = "$space++"; # possessive match of 1 or more spaces
                $text = preg_replace_callback(
-                       '!(?:                            # Start cases
-                               (<a[ \t\r\n>].*?</a>) |      # m[1]: Skip link text
-                               (<.*?>) |                    # m[2]: Skip stuff inside
-                                                            #       HTML elements' . "
-                               (\b(?i:$prots)($addr$urlChar*)) | # m[3]: Free external links
-                                                            # m[4]: Post-protocol path
-                               \b(?:RFC|PMID) $spaces       # m[5]: RFC or PMID, capture number
+                       '!(?:                        # Start cases
+                               (<a[ \t\r\n>].*?</a>) |    # m[1]: Skip link text
+                               (<.*?>) |                  # m[2]: Skip stuff inside HTML elements' . "
+                               (\b                        # m[3]: Free external links
+                                       (?i:$prots)
+                                       ($addr$urlChar*)         # m[4]: Post-protocol path
+                               ) |
+                               \b(?:RFC|PMID) $spaces     # m[5]: RFC or PMID, capture number
                                        ([0-9]+)\b |
-                               \bISBN $spaces (             # m[6]: ISBN, capture number
+                               \bISBN $spaces (           # m[6]: ISBN, capture number
                                        (?: 97[89] $spdash? )?   #  optional 13-digit ISBN prefix
                                        (?: [0-9]  $spdash? ){9} #  9 digits with opt. delimiters
                                        [0-9Xx]                  #  check digit
index 9e96540..f76c0b5 100644 (file)
@@ -223,7 +223,7 @@ class ParserCache {
 
                // The edit section preference may not be the appropiate one in
                // the ParserOutput, as we are not storing it in the parsercache
-               // key. Force it here. See bug 31445.
+               // key. Force it here. See T33445.
                $value->setEditSectionTokens( $popts->getEditSection() );
 
                $wikiPage = method_exists( $article, 'getPage' )
index 2900f41..7be8281 100644 (file)
@@ -409,7 +409,7 @@ class ParserOptions {
         * when the page is rendered based on the language of the user.
         *
         * @note When saving, this will return the default language instead of the user's.
-        * {{int: }} uses this which used to produce inconsistent link tables (bug 14404).
+        * {{int: }} uses this which used to produce inconsistent link tables (T16404).
         *
         * @return Language
         * @since 1.19
index 0c162b4..b2f99b3 100644 (file)
@@ -709,7 +709,7 @@ class ParserOutput extends CacheTime {
                        return false;
                }
 
-               // Important to parse with correct title (bug 31469)
+               // Important to parse with correct title (T33469)
                $cat = wfMessage( $msg )
                        ->title( $title )
                        ->inContentLanguage()
index 661318b..b93c617 100644 (file)
@@ -134,7 +134,7 @@ class Preprocessor_DOM extends Preprocessor {
         *                                is to assume a direct page view.
         *
         * The generated DOM tree must depend only on the input text and the flags.
-        * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
+        * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of T6899.
         *
         * Any flag added to the $flags parameter here, or any other parameter liable to cause a
         * change in the DOM tree for a given text, must be passed through the section identifier
index 2666c93..b2e9531 100644 (file)
@@ -107,7 +107,7 @@ class Preprocessor_Hash extends Preprocessor {
         *                                 included. Default is to assume a direct page view.
         *
         * The generated DOM tree must depend only on the input text and the flags.
-        * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of bug 4899.
+        * The DOM tree must be the same in OT_HTML and OT_WIKI mode, to avoid a regression of T6899.
         *
         * Any flag added to the $flags parameter here, or any other parameter liable to cause a
         * change in the DOM tree for a given text, must be passed through the section identifier
index 534e86b..1f1add7 100644 (file)
@@ -129,7 +129,7 @@ class PoolWorkArticleView extends PoolCounterWork {
                        return false;
                }
 
-               // Reduce effects of race conditions for slow parses (bug 46014)
+               // Reduce effects of race conditions for slow parses (T48014)
                $cacheTime = wfTimestampNow();
 
                $time = - microtime( true );
index 088721c..264ec0c 100644 (file)
@@ -41,7 +41,7 @@ class ProfilerOutputDb extends ProfilerOutput {
        }
 
        public function canUse() {
-               # Do not log anything if database is readonly (bug 5375)
+               # Do not log anything if database is readonly (T7375)
                return !wfReadOnly();
        }
 
index a4100bb..210deb1 100644 (file)
@@ -23,11 +23,11 @@ interface Processor {
 
        /**
         * @return array With following keys:
-        *              'globals' - variables to be set to $GLOBALS
-        *              'defines' - constants to define
-        *              'callbacks' - functions to be executed by the registry
-        *              'credits' - metadata to be stored by registry
-        *              'attributes' - registration info which isn't a global variable
+        *     'globals' - variables to be set to $GLOBALS
+        *     'defines' - constants to define
+        *     'callbacks' - functions to be executed by the registry
+        *     'credits' - metadata to be stored by registry
+        *     'attributes' - registration info which isn't a global variable
         */
        public function getExtractedInfo();
 
index 5aaaa1b..a31551c 100644 (file)
@@ -87,17 +87,17 @@ class VersionChecker {
         * installed extensions in the $credits array.
         *
         * Example $extDependencies:
-        *      {
-        *              'FooBar' => {
-        *                      'MediaWiki' => '>= 1.25.0',
-        *                      'extensions' => {
-        *                              'FooBaz' => '>= 1.25.0'
-        *                      },
-        *                      'skins' => {
-        *                              'BazBar' => '>= 1.0.0'
-        *                      }
-        *              }
-        *      }
+        *     {
+        *       'FooBar' => {
+        *         'MediaWiki' => '>= 1.25.0',
+        *         'extensions' => {
+        *           'FooBaz' => '>= 1.25.0'
+        *         },
+        *         'skins' => {
+        *           'BazBar' => '>= 1.0.0'
+        *         }
+        *       }
+        *     }
         *
         * @param array $extDependencies All extensions that depend on other ones
         * @return array
index 59c60df..717fb45 100644 (file)
@@ -714,7 +714,7 @@ class ResourceLoader implements LoggerAwareInterface {
                        $module = $this->getModule( $name );
                        if ( $module ) {
                                // Do not allow private modules to be loaded from the web.
-                               // This is a security issue, see bug 34907.
+                               // This is a security issue, see T36907.
                                if ( $module->getGroup() === 'private' ) {
                                        $this->logger->debug( "Request for private module '$name' denied" );
                                        $this->errors[] = "Cannot show private module \"$name\"";
@@ -1217,7 +1217,7 @@ MESSAGE;
                        $styles = (array)$styles;
                        foreach ( $styles as $style ) {
                                $style = trim( $style );
-                               // Don't output an empty "@media print { }" block (bug 40498)
+                               // Don't output an empty "@media print { }" block (T42498)
                                if ( $style !== '' ) {
                                        // Transform the media type based on request params and config
                                        // The way that this relies on $wgRequest to propagate request params is slightly evil
@@ -1634,7 +1634,7 @@ MESSAGE;
         */
        public function getLessCompiler( $extraVars = [] ) {
                // When called from the installer, it is possible that a required PHP extension
-               // is missing (at least for now; see bug 47564). If this is the case, throw an
+               // is missing (at least for now; see T49564). If this is the case, throw an
                // exception (caught by the installer) to prevent a fatal error later on.
                if ( !class_exists( 'Less_Parser' ) ) {
                        throw new MWException( 'MediaWiki requires the less.php parser' );
index 29f8cfe..8c792ad 100644 (file)
@@ -417,7 +417,7 @@ class ResourceLoaderClientHtml {
                                // Special handling for the user group; because users might change their stuff
                                // on-wiki like user pages, or user preferences; we need to find the highest
                                // timestamp of these user-changeable modules so we can ensure cache misses on change
-                               // This should NOT be done for the site group (bug 27564) because anons get that too
+                               // This should NOT be done for the site group (T29564) because anons get that too
                                // and we shouldn't be putting timestamps in CDN-cached HTML
                                if ( $group === 'user' ) {
                                        // Must setModules() before makeVersionQuery()
index a1a89cb..8955b8c 100644 (file)
@@ -197,7 +197,7 @@ class ResourceLoaderContext {
                if ( $this->direction === null ) {
                        $this->direction = $this->getRequest()->getRawVal( 'dir' );
                        if ( !$this->direction ) {
-                               // Determine directionality based on user language (bug 6100)
+                               // Determine directionality based on user language (T8100)
                                $this->direction = Language::factory( $this->getLanguage() )->getDir();
                        }
                }
index 6d2bc0d..d4dabe7 100644 (file)
@@ -651,7 +651,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
                                        && substr( rtrim( $scripts ), -1 ) !== ';'
                                ) {
                                        // Append semicolon to prevent weird bugs caused by files not
-                                       // terminating their statements right (bug 27054)
+                                       // terminating their statements right (T29054)
                                        $scripts .= ";\n";
                                }
                        }
@@ -662,7 +662,7 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
                if ( $context->shouldIncludeStyles() ) {
                        $styles = [];
                        // Don't create empty stylesheets like [ '' => '' ] for modules
-                       // that don't *have* any stylesheets (bug 38024).
+                       // that don't *have* any stylesheets (T40024).
                        $stylePairs = $this->getStyles( $context );
                        if ( count( $stylePairs ) ) {
                                // If we are in debug mode without &only= set, we'll want to return an array of URLs
index a99305c..48e4a0d 100644 (file)
@@ -82,7 +82,7 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        'wgSearchType' => $conf->get( 'SearchType' ),
                        'wgVariantArticlePath' => $conf->get( 'VariantArticlePath' ),
                        // Force object to avoid "empty" associative array from
-                       // becoming [] instead of {} in JS (bug 34604)
+                       // becoming [] instead of {} in JS (T36604)
                        'wgActionPaths' => (object)$conf->get( 'ActionPaths' ),
                        'wgServer' => $conf->get( 'Server' ),
                        'wgServerName' => $conf->get( 'ServerName' ),
index e8574f4..b0d060b 100644 (file)
@@ -268,7 +268,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                        return true;
                }
 
-               // Bug 68488: For other modules (i.e. ones that are called in cached html output) only check
+               // T70488: For other modules (i.e. ones that are called in cached html output) only check
                // page existance. This ensures that, if some pages in a module are temporarily blanked,
                // we don't end omit the module's script or link tag on some pages.
                return count( $revisions ) === 0;
index 8a06b65..910fd77 100644 (file)
@@ -93,7 +93,7 @@ abstract class SearchIndexFieldDefinition implements SearchIndexField {
        public function merge( SearchIndexField $that ) {
                // TODO: which definitions may be compatible?
                if ( ( $that instanceof self ) && $this->type === $that->type &&
-                    $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
+                       $this->flags === $that->flags && $this->type !== self::INDEX_TYPE_NESTED
                ) {
                        return $that;
                }
index 3ab0f43..c6990fe 100644 (file)
@@ -91,9 +91,9 @@ interface SessionManagerInterface extends LoggerAwareInterface {
         *
         * The return value is such that someone could theoretically do this:
         * @code
-        *  foreach ( $provider->getVaryHeaders() as $header => $options ) {
-        *      $outputPage->addVaryHeader( $header, $options );
-        *  }
+        * foreach ( $provider->getVaryHeaders() as $header => $options ) {
+        *   $outputPage->addVaryHeader( $header, $options );
+        * }
         * @endcode
         *
         * @return array
index 61c7500..e8d81cb 100644 (file)
@@ -397,9 +397,9 @@ abstract class SessionProvider implements SessionProviderInterface, LoggerAwareI
         *
         * The return value is such that someone could theoretically do this:
         * @code
-        *  foreach ( $provider->getVaryHeaders() as $header => $options ) {
-        *      $outputPage->addVaryHeader( $header, $options );
-        *  }
+        * foreach ( $provider->getVaryHeaders() as $header => $options ) {
+        *   $outputPage->addVaryHeader( $header, $options );
+        * }
         * @endcode
         *
         * @protected For use by \MediaWiki\Session\SessionManager only
index eef421c..61d34c6 100644 (file)
@@ -324,12 +324,12 @@ abstract class BaseTemplate extends QuickTemplate {
         *
         * If a "data" key is present, it must be an array, where the keys represent
         * the data-xxx properties with their provided values. For example,
-        *  $item['data'] = [
-        *       'foo' => 1,
-        *       'bar' => 'baz',
-        *  ];
+        *     $item['data'] = [
+        *       'foo' => 1,
+        *       'bar' => 'baz',
+        *     ];
         * will render as element properties:
-        *  data-foo='1' data-bar='baz'
+        *     data-foo='1' data-bar='baz'
         *
         * @param array $options Can be used to affect the output of a link.
         * Possible options are:
index 96812ea..85bd09a 100644 (file)
@@ -381,7 +381,7 @@ abstract class Skin extends ContextSource {
 
                if ( $title->isSpecialPage() ) {
                        $type = 'ns-special';
-                       // bug 23315: provide a class based on the canonical special page name without subpages
+                       // T25315: provide a class based on the canonical special page name without subpages
                        list( $canonicalName ) = SpecialPageFactory::resolveAlias( $title->getDBkey() );
                        if ( $canonicalName ) {
                                $type .= ' ' . Sanitizer::escapeClass( "mw-special-$canonicalName" );
@@ -1283,7 +1283,7 @@ abstract class Skin extends ContextSource {
                                        $line = array_map( 'trim', explode( '|', $line, 2 ) );
                                        if ( count( $line ) !== 2 ) {
                                                // Second sanity check, could be hit by people doing
-                                               // funky stuff with parserfuncs... (bug 33321)
+                                               // funky stuff with parserfuncs... (T35321)
                                                continue;
                                        }
 
@@ -1538,7 +1538,7 @@ abstract class Skin extends ContextSource {
 
                $attribs = [];
                if ( !is_null( $tooltip ) ) {
-                       # Bug 25462: undo double-escaping.
+                       # T27462: undo double-escaping.
                        $tooltip = Sanitizer::decodeCharReferences( $tooltip );
                        $attribs['title'] = wfMessage( 'editsectionhint' )->rawParams( $tooltip )
                                ->inLanguage( $lang )->text();
index bc6dfca..780fac4 100644 (file)
@@ -582,7 +582,7 @@ class SkinTemplate extends Skin {
                /* set up the default links for the personal toolbar */
                $personal_urls = [];
 
-               # Due to bug 32276, if a user does not have read permissions,
+               # Due to T34276, if a user does not have read permissions,
                # $this->getTitle() will just give Special:Badtitle, which is
                # not especially useful as a returnto parameter. Use the title
                # from the request instead, if there was one.
@@ -663,7 +663,7 @@ class SkinTemplate extends Skin {
                                        'text' => $this->msg( 'pt-userlogout' )->text(),
                                        'href' => self::makeSpecialUrl( 'Userlogout',
                                                // userlogout link must always contain an & character, otherwise we might not be able
-                                               // to detect a buggy precaching proxy (bug 17790)
+                                               // to detect a buggy precaching proxy (T19790)
                                                $title->isSpecial( 'Preferences' ) ? 'noreturnto' : $returnto ),
                                        'active' => false
                                ];
@@ -1120,7 +1120,7 @@ class SkinTemplate extends Skin {
                        $content_navigation['namespaces']['special'] = [
                                'class' => 'selected',
                                'text' => $this->msg( 'nstab-special' )->text(),
-                               'href' => $request->getRequestURL(), // @see: bug 2457, bug 2510
+                               'href' => $request->getRequestURL(), // @see: T4457, T4510
                                'context' => 'subject'
                        ];
 
index 00439a1..9cce266 100644 (file)
@@ -311,7 +311,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                        $operator = $opts['invert'] ? '!=' : '=';
                        $boolean = $opts['invert'] ? 'AND' : 'OR';
 
-                       // Namespace association (bug 2429)
+                       // Namespace association (T4429)
                        if ( !$opts['associated'] ) {
                                $condition = "rc_namespace $operator $selectedNS";
                        } else {
index c3ee321..5c048a2 100644 (file)
@@ -177,7 +177,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
 
                # 1. When switching accounts, it sucks to get automatically logged out
                # 2. Do not return to PasswordReset after a successful password change
-               #    but goto Wiki start page (Main_Page) instead ( bug 33997 )
+               #    but goto Wiki start page (Main_Page) instead ( T35997 )
                $returnToTitle = Title::newFromText( $this->mReturnTo );
                if ( is_object( $returnToTitle )
                        && ( $returnToTitle->isSpecial( 'Userlogout' )
@@ -702,7 +702,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
         */
        protected function getFakeTemplate( $msg, $msgType ) {
                global $wgAuth, $wgEnableEmail, $wgHiddenPrefs, $wgEmailConfirmToEdit, $wgEnableUserEmail,
-                          $wgSecureLogin, $wgPasswordResetRoutes;
+                       $wgSecureLogin, $wgPasswordResetRoutes;
 
                // make a best effort to get the value of fields which used to be fixed in the old login
                // template but now might or might not exist depending on what providers are used
@@ -727,7 +727,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                $user = $this->getUser();
                $template = new FakeAuthTemplate();
 
-               // Pre-fill username (if not creating an account, bug 44775).
+               // Pre-fill username (if not creating an account, T46775).
                if ( $data->mUsername == '' && $this->isSignup() ) {
                        if ( $user->isLoggedIn() ) {
                                $data->mUsername = $user->getName();
@@ -772,7 +772,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                $resetLink = $this->isSignup()
                        ? null
                        : is_array( $wgPasswordResetRoutes )
-                         && in_array( true, array_values( $wgPasswordResetRoutes ), true );
+                               && in_array( true, array_values( $wgPasswordResetRoutes ), true );
 
                $template->set( 'header', '' );
                $template->set( 'formheader', '' );
index 3592500..53f8930 100644 (file)
@@ -322,7 +322,7 @@ abstract class QueryPage extends SpecialPage {
                                                        $value = wfTimestamp( TS_UNIX,
                                                                $row->value );
                                                } else {
-                                                       $value = intval( $row->value ); // @bug 14414
+                                                       $value = intval( $row->value ); // T16414
                                                }
                                        } else {
                                                $value = 0;
index daabded..33e1cc3 100644 (file)
@@ -346,7 +346,7 @@ class SpecialPageFactory {
                        return [ null, null ];
                }
 
-               if ( !isset( $bits[1] ) ) { // bug 2087
+               if ( !isset( $bits[1] ) ) { // T4087
                        $par = null;
                } else {
                        $par = $bits[1];
@@ -512,7 +512,7 @@ class SpecialPageFactory {
                // @todo FIXME: Redirects broken due to this call
                $bits = explode( '/', $title->getDBkey(), 2 );
                $name = $bits[0];
-               if ( !isset( $bits[1] ) ) { // bug 2087
+               if ( !isset( $bits[1] ) ) { // T4087
                        $par = null;
                } else {
                        $par = $bits[1];
index c18ae0e..04c04b2 100644 (file)
@@ -64,7 +64,7 @@ class SpecialBlock extends FormSpecialPage {
        protected function checkExecutePermissions( User $user ) {
                parent::checkExecutePermissions( $user );
 
-               # bug 15810: blocked admins should have limited access here
+               # T17810: blocked admins should have limited access here
                $status = self::checkUnblockSelf( $this->target, $user );
                if ( $status !== true ) {
                        throw new ErrorPageError( 'badaccess', $status );
@@ -275,7 +275,7 @@ class SpecialBlock extends FormSpecialPage {
                        }
 
                        // If the username was hidden (ipb_deleted == 1), don't show the reason
-                       // unless this user also has rights to hideuser: Bug 35839
+                       // unless this user also has rights to hideuser: T37839
                        if ( !$block->mHideName || $this->getUser()->isAllowed( 'hideuser' ) ) {
                                $fields['Reason']['default'] = $block->mReason;
                        } else {
@@ -744,7 +744,7 @@ class SpecialBlock extends FormSpecialPage {
                        $blockNotConfirmed = !$data['Confirm'] || ( array_key_exists( 'PreviousTarget', $data )
                                && $data['PreviousTarget'] !== $target );
 
-                       # Special case for API - bug 32434
+                       # Special case for API - T34434
                        $reblockNotAllowed = ( array_key_exists( 'Reblock', $data ) && !$data['Reblock'] );
 
                        # Show form unless the user is already aware of this...
@@ -824,7 +824,7 @@ class SpecialBlock extends FormSpecialPage {
                $logEntry->setComment( $data['Reason'][0] );
                $logEntry->setPerformer( $performer );
                $logEntry->setParameters( $logParams );
-               # Relate log ID to block IDs (bug 25763)
+               # Relate log ID to block IDs (T27763)
                $blockIds = array_merge( [ $status['id'] ], $status['autoIds'] );
                $logEntry->setRelations( [ 'ipb_id' => $blockIds ] );
                $logId = $logEntry->insert();
@@ -902,7 +902,7 @@ class SpecialBlock extends FormSpecialPage {
        }
 
        /**
-        * bug 15810: blocked admins should not be able to block/unblock
+        * T17810: blocked admins should not be able to block/unblock
         * others, and probably shouldn't be able to unblock themselves
         * either.
         * @param User|int|string $user
index 766de1b..1028002 100644 (file)
@@ -359,7 +359,7 @@ class SpecialContributions extends IncludableSpecialPage {
                                [ 'page' => $userpage->getPrefixedText() ]
                        );
 
-                       # Suppression log link (bug 59120)
+                       # Suppression log link (T61120)
                        if ( $sp->getUser()->isAllowed( 'suppressionlog' ) ) {
                                $tools['log-suppression'] = $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Log', 'suppress' ),
index 9140bf1..90efef7 100644 (file)
@@ -75,7 +75,7 @@ class DoubleRedirectsPage extends QueryPage {
                        'conds' => [
                                'ra.rd_from = pa.page_id',
 
-                               // Filter out redirects where the target goes interwiki (bug 40353).
+                               // Filter out redirects where the target goes interwiki (T42353).
                                // This isn't an optimization, it is required for correct results,
                                // otherwise a non-double redirect like Bar -> w:Foo will show up
                                // like "Bar -> Foo -> w:Foo".
index b447271..e1ecfe8 100644 (file)
@@ -793,7 +793,7 @@ class EditWatchlistCheckboxSeriesField extends HTMLMultiSelectField {
         * HTMLMultiSelectField throws validation errors if we get input data
         * that doesn't match the data set in the form setup. This causes
         * problems if something gets removed from the watchlist while the
-        * form is open (bug 32126), but we know that invalid items will
+        * form is open (T34126), but we know that invalid items will
         * be harmless so we can override it here.
         *
         * @param string $value The value the field was submitted with
index ca0d139..560d75a 100644 (file)
@@ -263,7 +263,7 @@ class SpecialExpandTemplates extends SpecialPage {
                        $user = $this->getUser();
 
                        // To prevent cross-site scripting attacks, don't show the preview if raw HTML is
-                       // allowed and a valid edit token is not provided (bug 71111). However, MediaWiki
+                       // allowed and a valid edit token is not provided (T73111). However, MediaWiki
                        // does not currently provide logged-out users with CSRF protection; in that case,
                        // do not show the preview unless anonymous editing is allowed.
                        if ( $user->isAnon() && !$user->isAllowed( 'edit' ) ) {
index 2d6ba4a..f5e9e49 100644 (file)
@@ -361,7 +361,7 @@ class SpecialExport extends SpecialPage {
 
                        $pages = array_keys( $pageSet );
 
-                       // Normalize titles to the same format and remove dupes, see bug 17374
+                       // Normalize titles to the same format and remove dupes, see T19374
                        foreach ( $pages as $k => $v ) {
                                $pages[$k] = str_replace( " ", "_", $v );
                        }
@@ -394,7 +394,7 @@ class SpecialExport extends SpecialPage {
                        $exporter->allPages();
                } else {
                        foreach ( $pages as $page ) {
-                               # Bug 8824: Only export pages the user can read
+                               # T10824: Only export pages the user can read
                                $title = Title::newFromText( $page );
                                if ( is_null( $title ) ) {
                                        // @todo Perhaps output an <error> tag or something.
index 533a331..195d08b 100644 (file)
@@ -96,7 +96,7 @@ class SpecialLog extends SpecialPage {
 
                # Some log types are only for a 'User:' title but we might have been given
                # only the username instead of the full title 'User:username'. This part try
-               # to lookup for a user by that name and eventually fix user input. See bug 1697.
+               # to lookup for a user by that name and eventually fix user input. See T3697.
                if ( in_array( $opts->getValue( 'type' ), self::getLogTypesOnUser() ) ) {
                        # ok we have a type of log which expect a user title.
                        $target = Title::newFromText( $opts->getValue( 'page' ) );
index 0281b15..7d8a493 100644 (file)
@@ -77,7 +77,7 @@ class MovePageForm extends UnlistedSpecialPage {
                $request = $this->getRequest();
                $target = !is_null( $par ) ? $par : $request->getVal( 'target' );
 
-               // Yes, the use of getVal() and getText() is wanted, see bug 20365
+               // Yes, the use of getVal() and getText() is wanted, see T22365
 
                $oldTitleText = $request->getVal( 'wpOldTitle', $target );
                $this->oldTitle = Title::newFromText( $oldTitleText );
@@ -620,7 +620,7 @@ class MovePageForm extends UnlistedSpecialPage {
                        // a redirect to the new title. This is not safe, but what we did before was
                        // even worse: we just determined whether a redirect should have been created,
                        // and reported that it was created if it should have, without any checks.
-                       // Also note that isRedirect() is unreliable because of bug 37209.
+                       // Also note that isRedirect() is unreliable because of T39209.
                        $msgName = 'movepage-moved-redirect';
                } else {
                        $msgName = 'movepage-moved-noredirect';
@@ -708,7 +708,7 @@ class MovePageForm extends UnlistedSpecialPage {
 
                        $newPageName = preg_replace(
                                '#^' . preg_quote( $ot->getDBkey(), '#' ) . '#',
-                               StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # bug 21234
+                               StringUtils::escapeRegexReplacement( $nt->getDBkey() ), # T23234
                                $oldSubpage->getDBkey()
                        );
 
@@ -721,7 +721,7 @@ class MovePageForm extends UnlistedSpecialPage {
                                $newNs = $nt->getSubjectPage()->getNamespace();
                        }
 
-                       # Bug 14385: we need makeTitleSafe because the new page names may
+                       # T16385: we need makeTitleSafe because the new page names may
                        # be longer than 255 characters.
                        $newSubpage = Title::makeTitleSafe( $newNs, $newPageName );
                        if ( !$newSubpage ) {
index 4671591..34ffa07 100644 (file)
@@ -83,7 +83,7 @@ class SpecialPrefixindex extends SpecialAllPages {
                        $showme = $from;
                }
 
-               // Bug 27864: if transcluded, show all pages instead of the form.
+               // T29864: if transcluded, show all pages instead of the form.
                if ( $this->including() || $showme != '' || $ns !== null ) {
                        $this->showPrefixChunk( $namespace, $showme, $from );
                } else {
index 975e210..eb6d939 100644 (file)
@@ -668,7 +668,7 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
        function makeOptionsLink( $title, $override, $options, $active = false ) {
                $params = $override + $options;
 
-               // Bug 36524: false values have be converted to "0" otherwise
+               // T38524: false values have be converted to "0" otherwise
                // wfArrayToCgi() will omit it them.
                foreach ( $params as &$value ) {
                        if ( $value === false ) {
@@ -817,9 +817,9 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
 
        function filterOnUserExperienceLevel( &$tables, &$conds, &$join_conds, $opts ) {
                global $wgLearnerEdits,
-                          $wgExperiencedUserEdits,
-                          $wgLearnerMemberSince,
-                          $wgExperiencedUserMemberSince;
+                       $wgExperiencedUserEdits,
+                       $wgLearnerMemberSince,
+                       $wgExperiencedUserMemberSince;
 
                $selectedExpLevels = explode( ',', strtolower( $opts['userExpLevel'] ) );
                // remove values that are not recognized
index a7a1c58..19850e6 100644 (file)
@@ -95,9 +95,11 @@ class SpecialStatistics extends SpecialPage {
                        if ( !$msg->isDisabled() ) {
                                $descriptionHtml = $this->msg( 'parentheses' )->rawParams( $msg->parse() )
                                        ->escaped();
-                               $text .= "<br />" .
-                                         Html::rawElement( 'small', [ 'class' => 'mw-statistic-desc' ],
-                                                                               " $descriptionHtml" );
+                               $text .= "<br />" . Html::rawElement(
+                                       'small',
+                                       [ 'class' => 'mw-statistic-desc' ],
+                                       " $descriptionHtml"
+                               );
                        }
                }
 
index 0d42e3f..01125fc 100644 (file)
@@ -186,7 +186,7 @@ class SpecialUnblock extends SpecialPage {
                        return [ [ 'ipb_cant_unblock', $target ] ];
                }
 
-               # bug 15810: blocked admins should have limited access here.  This
+               # T17810: blocked admins should have limited access here.  This
                # won't allow sysops to remove autoblocks on themselves, but they
                # should have ipblock-exempt anyway
                $status = SpecialBlock::checkUnblockSelf( $target, $performer );
index 4c6a593..d5c24c2 100644 (file)
@@ -465,7 +465,7 @@ class PageArchive {
 
                # Does this page already exist? We'll have to update it...
                $article = WikiPage::factory( $this->title );
-               # Load latest data for the current page (bug 31179)
+               # Load latest data for the current page (T33179)
                $article->loadPageData( 'fromdbmaster' );
                $oldcountable = $article->isCountable();
 
index ec39ccf..1469742 100644 (file)
@@ -55,7 +55,7 @@ class UnusedCategoriesPage extends QueryPage {
        }
 
        /**
-        * A should come before Z (bug 30907)
+        * A should come before Z (T32907)
         * @return bool
         */
        function sortDescending() {
index 8478e94..b0bb595 100644 (file)
@@ -327,7 +327,7 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                header( "Content-Type: $contentType", true );
                header( 'Content-Transfer-Encoding: binary', true );
                header( 'Expires: Sun, 17-Jan-2038 19:14:07 GMT', true );
-               // Bug 53032 - It shouldn't be a problem here, but let's be safe and not cache
+               // T55032 - It shouldn't be a problem here, but let's be safe and not cache
                header( 'Cache-Control: private' );
                header( "Content-Length: $size", true );
        }
index c067f44..a9b732e 100644 (file)
@@ -38,7 +38,7 @@ class SpecialUserLogout extends UnlistedSpecialPage {
        function execute( $par ) {
                /**
                 * Some satellite ISPs use broken precaching schemes that log people out straight after
-                * they're logged in (bug 17790). Luckily, there's a way to detect such requests.
+                * they're logged in (T19790). Luckily, there's a way to detect such requests.
                 */
                if ( isset( $_SERVER['REQUEST_URI'] ) && strpos( $_SERVER['REQUEST_URI'], '&amp;' ) !== false ) {
                        wfDebug( "Special:UserLogout request {$_SERVER['REQUEST_URI']} looks suspicious, denying.\n" );
index 454d1e3..b33aa7d 100644 (file)
@@ -170,8 +170,8 @@ class UserrightsPage extends SpecialPage {
                        }
 
                        $targetUser = $this->mFetchedUser;
-                       if ( $targetUser instanceof User ) { // UserRightsProxy doesn't have this method (bug 61252)
-                               $targetUser->clearInstanceCache(); // bug 38989
+                       if ( $targetUser instanceof User ) { // UserRightsProxy doesn't have this method (T63252)
+                               $targetUser->clearInstanceCache(); // T40989
                        }
 
                        if ( $request->getVal( 'conflictcheck-originalgroups' )
index 74d5e5d..6d481f8 100644 (file)
@@ -83,7 +83,7 @@ class WantedFilesPage extends WantedQueryPage {
         * KLUGE: The results may contain false positives for files
         * that exist e.g. in a shared repo.  Setting this at least
         * keeps them from showing up as redlinks in the output, even
-        * if it doesn't fix the real problem (bug 6220).
+        * if it doesn't fix the real problem (T8220).
         *
         * @note could also have existing links here from broken file
         * redirects.
index 47a2aed..fb8d8f6 100644 (file)
@@ -160,7 +160,7 @@ class ContribsPager extends ReverseChronologicalPager {
                $user = $this->getUser();
                $conds = array_merge( $userCond, $this->getNamespaceCond() );
 
-               // Paranoia: avoid brute force searches (bug 17342)
+               // Paranoia: avoid brute force searches (T19342)
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0';
                } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
@@ -420,7 +420,7 @@ class ContribsPager extends ReverseChronologicalPager {
 
                        if ( $row->rev_parent_id === null ) {
                                // For some reason rev_parent_id isn't populated for this row.
-                               // Its rumoured this is true on wikipedia for some revisions (bug 34922).
+                               // Its rumoured this is true on wikipedia for some revisions (T36922).
                                // Next best thing is to have the total number of bytes.
                                $chardiff = ' <span class="mw-changeslist-separator">. .</span> ';
                                $chardiff .= Linker::formatRevisionSize( $row->rev_len );
index 9ffcce9..2425dd5 100644 (file)
@@ -59,7 +59,7 @@ class DeletedContribsPager extends IndexPager {
                list( $index, $userCond ) = $this->getUserCond();
                $conds = array_merge( $userCond, $this->getNamespaceCond() );
                $user = $this->getUser();
-               // Paranoia: avoid brute force searches (bug 17792)
+               // Paranoia: avoid brute force searches (T19792)
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::DELETED_USER ) . ' = 0';
                } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
index 59dea02..4c1e8ee 100644 (file)
@@ -449,7 +449,7 @@ class ImageListPager extends TablePager {
                                        $imgfile = $this->msg( 'imgfile' )->text();
                                }
 
-                               // Weird files can maybe exist? Bug 22227
+                               // Weird files can maybe exist? T24227
                                $filePage = Title::makeTitleSafe( NS_FILE, $value );
                                if ( $filePage ) {
                                        $link = $linkRenderer->makeKnownLink(
index 12039aa..d599599 100644 (file)
@@ -164,7 +164,7 @@ class UsersPager extends AlphabeticPager {
         * @return string
         */
        function formatRow( $row ) {
-               if ( $row->user_id == 0 ) { # Bug 16487
+               if ( $row->user_id == 0 ) { # T18487
                        return '';
                }
 
index 8da1553..3467b49 100644 (file)
@@ -1824,7 +1824,7 @@ class Balancer {
         * Regex borrowed from Tim Starling's "remex-html" project.
         */
        const VALID_COMMENT_REGEX = "~ !--
-               (                             # 1. Comment match detector
+               (                           # 1. Comment match detector
                        > | -> | # Invalid short close
                        (                         # 2. Comment contents
                                (?:
@@ -1839,15 +1839,15 @@ class Balancer {
                        (                         # 3. Comment close
                                --> |   # Normal close
                                --!> |  # Comment end bang
-                               (                     # 4. Indicate matches requiring EOF
-                                       --! |   # EOF in comment end bang state
-                                       -- |    # EOF in comment end state
-                                       -  |    # EOF in comment end dash state
-                                               # EOF in comment state
+                               (                       # 4. Indicate matches requiring EOF
+                                       --! |                   # EOF in comment end bang state
+                                       -- |                    # EOF in comment end state
+                                       -  |                    # EOF in comment end dash state
+                                       (?#nothing)             # EOF in comment state
                                )
                        )
                )
-               ([^<]*) \z                    # 5. Non-tag text after the comment
+               ([^<]*) \z                  # 5. Non-tag text after the comment
                ~xs";
 
        /**
index 79166ef..bac7129 100644 (file)
@@ -297,7 +297,7 @@ abstract class UploadBase {
         * @param string $srcPath The source path
         * @return string|bool The real path if it was a virtual URL Returns false on failure
         */
-       function getRealPath( $srcPath ) {
+       public function getRealPath( $srcPath ) {
                $repo = RepoGroup::singleton()->getLocalRepo();
                if ( $repo->isVirtualUrl( $srcPath ) ) {
                        /** @todo Just make uploads work with storage paths UploadFromStash
@@ -560,7 +560,7 @@ abstract class UploadBase {
         *
         * @param array $entry
         */
-       function zipEntryCallback( $entry ) {
+       public function zipEntryCallback( $entry ) {
                $names = [ $entry['name'] ];
 
                // If there is a null character, cut off the name at it, because JDK's
@@ -895,7 +895,7 @@ abstract class UploadBase {
                        return $this->mTitle;
                }
 
-               // Windows may be broken with special characters, see bug 1780
+               // Windows may be broken with special characters, see T3780
                if ( !preg_match( '/^[\x0-\x7f]*$/', $nt->getText() )
                        && !RepoGroup::singleton()->getLocalRepo()->backendSupportsUnicodePaths()
                ) {
@@ -1209,7 +1209,7 @@ abstract class UploadBase {
                }
 
                // Some browsers will interpret obscure xml encodings as UTF-8, while
-               // PHP/expat will interpret the given encoding in the xml declaration (bug 47304)
+               // PHP/expat will interpret the given encoding in the xml declaration (T49304)
                if ( $extension == 'svg' || strpos( $mime, 'image/svg' ) === 0 ) {
                        if ( self::checkXMLEncodingMissmatch( $file ) ) {
                                return true;
@@ -1361,8 +1361,8 @@ abstract class UploadBase {
                        [ 'processing_instruction_handler' => 'UploadBase::checkSvgPICallback' ]
                );
                if ( $check->wellFormed !== true ) {
-                       // Invalid xml (bug 58553)
-                       // But only when non-partial (bug 65724)
+                       // Invalid xml (T60553)
+                       // But only when non-partial (T67724)
                        return $partial ? false : [ 'uploadinvalidxml' ];
                } elseif ( $check->filterMatch ) {
                        if ( $this->mSVGNSError ) {
@@ -1382,7 +1382,7 @@ abstract class UploadBase {
         * @return bool (true if the filter identified something bad)
         */
        public static function checkSvgPICallback( $target, $data ) {
-               // Don't allow external stylesheets (bug 57550)
+               // Don't allow external stylesheets (T59550)
                if ( preg_match( '/xml-stylesheet/i', $target ) ) {
                        return [ 'upload-scripted-pi-callback' ];
                }
@@ -1401,7 +1401,7 @@ abstract class UploadBase {
                list( $namespace, $strippedElement ) = $this->splitXmlNamespace( $element );
 
                // We specifically don't include:
-               // http://www.w3.org/1999/xhtml (bug 60771)
+               // http://www.w3.org/1999/xhtml (T62771)
                static $validNamespaces = [
                        '',
                        'adobe:ns:meta/',
index c1aef22..4ee256c 100644 (file)
@@ -176,7 +176,7 @@ class PasswordReset implements LoggerAwareInterface {
                $firstUser = $users[0];
 
                if ( !$firstUser instanceof User || !$firstUser->getId() ) {
-                       // Don't parse username as wikitext (bug 65501)
+                       // Don't parse username as wikitext (T67501)
                        return StatusValue::newFatal( wfMessage( 'nosuchuser', wfEscapeWikiText( $username ) ) );
                }
 
@@ -192,7 +192,7 @@ class PasswordReset implements LoggerAwareInterface {
                                wfEscapeWikiText( $firstUser->getName() ) ) );
                }
 
-               // We need to have a valid IP address for the hook, but per bug 18347, we should
+               // We need to have a valid IP address for the hook, but per T20347, we should
                // send the user's name if they're logged in.
                $ip = $performingUser->getRequest()->getIP();
                if ( !$ip ) {
index d9c2a58..0acdb55 100644 (file)
@@ -949,7 +949,7 @@ class User implements IDBAccessObject {
 
                // Ensure that the username isn't longer than 235 bytes, so that
                // (at least for the builtin skins) user javascript and css files
-               // will work. (bug 23080)
+               // will work. (T25080)
                if ( strlen( $name ) > 235 ) {
                        wfDebugLog( 'username', __METHOD__ .
                                ": '$name' invalid due to length" );
@@ -1074,7 +1074,7 @@ class User implements IDBAccessObject {
                }
 
                // Clean up name according to title rules,
-               // but only when validation is requested (bug 12654)
+               // but only when validation is requested (T14654)
                $t = ( $validate !== false ) ?
                        Title::newFromText( $name, NS_USER ) : Title::makeTitle( NS_USER, $name );
                // Check for invalid titles
@@ -1664,7 +1664,7 @@ class User implements IDBAccessObject {
                        }
                }
 
-               // (bug 23343) Apply IP blocks to the contents of XFF headers, if enabled
+               // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
                if ( !$block instanceof Block
                        && $wgApplyIpBlocksToXff
                        && $ip !== null
@@ -1787,7 +1787,7 @@ class User implements IDBAccessObject {
                $found = false;
                // @todo FIXME: IPv6 ???  (https://bugs.php.net/bug.php?id=33170)
                if ( IP::isIPv4( $ip ) ) {
-                       // Reverse IP, bug 21255
+                       // Reverse IP, T23255
                        $ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
 
                        foreach ( (array)$bases as $base ) {
@@ -3777,9 +3777,9 @@ class User implements IDBAccessObject {
         */
        public function getExperienceLevel() {
                global $wgLearnerEdits,
-                          $wgExperiencedUserEdits,
-                          $wgLearnerMemberSince,
-                          $wgExperiencedUserMemberSince;
+                       $wgExperiencedUserEdits,
+                       $wgLearnerMemberSince,
+                       $wgExperiencedUserMemberSince;
 
                if ( $this->isAnon() ) {
                        return false;
@@ -4125,7 +4125,7 @@ class User implements IDBAccessObject {
         *   }
         *   // do something with $user...
         *
-        * However, this was vulnerable to a race condition (bug 16020). By
+        * However, this was vulnerable to a race condition (T18020). By
         * initialising the user object if the user exists, we aim to support this
         * calling sequence as far as possible.
         *
@@ -4238,7 +4238,7 @@ class User implements IDBAccessObject {
                        return $this->mBlock;
                }
 
-               # bug 13611: if the IP address the user is trying to create an account from is
+               # T15611: if the IP address the user is trying to create an account from is
                # blocked with createaccount disabled, prevent new account creation there even
                # when the user is logged in
                if ( $this->mBlockedFromCreateAccount === false && !$this->isAllowed( 'ipblock-exempt' ) ) {
@@ -4531,7 +4531,7 @@ class User implements IDBAccessObject {
         * @note Since these URLs get dropped directly into emails, using the
         * short English names avoids insanely long URL-encoded links, which
         * also sometimes can get corrupted in some browsers/mailers
-        * (bug 6957 with Gmail and Internet Explorer).
+        * (T8957 with Gmail and Internet Explorer).
         *
         * @param string $page Special page
         * @param string $token Token
@@ -5391,7 +5391,7 @@ class User implements IDBAccessObject {
                # Note that the pattern requirement will always be satisfied if the
                # input is empty, so we need required in all cases.
 
-               # @todo FIXME: Bug 23769: This needs to not claim the password is required
+               # @todo FIXME: T25769: This needs to not claim the password is required
                # if e-mail confirmation is being used.  Since HTML5 input validation
                # is b0rked anyway in some browsers, just return nothing.  When it's
                # re-enabled, fix this code to not output required for e-mail
index ef2c14a..43bccba 100644 (file)
@@ -230,7 +230,7 @@ class BatchRowIterator implements RecursiveIterator {
         * `=` conditions while the final key uses a `>` condition
         *
         * Example output:
-        *        [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
+        *     [ '( foo = 42 AND bar > 7 ) OR ( foo > 42 )' ]
         *
         * @return array The SQL conditions necessary to select the next set
         *  of rows in the batched query
index 3bddd77..1c8d486 100644 (file)
@@ -47,11 +47,11 @@ class MWCryptHKDF {
         * From http://eprint.iacr.org/2010/264.pdf:
         *
         * The scheme HKDF is specifed as:
-        *      HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
+        *   HKDF(XTS, SKM, CTXinfo, L) = K(1) || K(2) || ... || K(t)
         * where the values K(i) are defined as follows:
-        *      PRK = HMAC(XTS, SKM)
-        *      K(1) = HMAC(PRK, CTXinfo || 0);
-        *      K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
+        *   PRK = HMAC(XTS, SKM)
+        *   K(1) = HMAC(PRK, CTXinfo || 0);
+        *   K(i+1) = HMAC(PRK, K(i) || CTXinfo || i), 1 <= i < t;
         * where t = [L/k] and the value K(t) is truncated to its first d = L mod k bits;
         * the counter i is non-wrapping and of a given fixed size, e.g., a single byte.
         * Note that the length of the HMAC output is the same as its key length and therefore
index a1cc4bc..2ec2d54 100644 (file)
@@ -2158,12 +2158,10 @@ class Language {
         * the date preference they're supposed to use, it should be used in
         * all children.
         *
-        *<code>
-        * function timeanddate([...], $format = true) {
-        *      $datePreference = $this->dateFormat($format);
-        * [...]
-        * }
-        *</code>
+        *     function timeanddate([...], $format = true) {
+        *       $datePreference = $this->dateFormat($format);
+        *       [...]
+        *     }
         *
         * @param int|string|bool $usePrefs If true, the user's preference is used
         *   if false, the site/language default is used
@@ -3286,14 +3284,14 @@ class Language {
        public function parseFormattedNumber( $number ) {
                $s = $this->digitTransformTable();
                if ( $s ) {
-                       // eliminate empty array values such as ''. (bug 64347)
+                       // eliminate empty array values such as ''. (T66347)
                        $s = array_filter( $s );
                        $number = strtr( $number, array_flip( $s ) );
                }
 
                $s = $this->separatorTransformTable();
                if ( $s ) {
-                       // eliminate empty array values such as ''. (bug 64347)
+                       // eliminate empty array values such as ''. (T66347)
                        $s = array_filter( $s );
                        $number = strtr( $number, array_flip( $s ) );
                }
@@ -3497,7 +3495,7 @@ class Language {
                                $string = $ellipsis . $string;
                        }
                }
-               # Do not truncate if the ellipsis makes the string longer/equal (bug 22181).
+               # Do not truncate if the ellipsis makes the string longer/equal (T24181).
                # This check is *not* redundant if $adjustLength, due to the single case where
                # LEN($ellipsis) > ABS($limit arg); $stringOriginal could be shorter than $string.
                if ( strlen( $string ) < strlen( $stringOriginal ) ) {
index 06fec44..361a9a7 100644 (file)
@@ -99,13 +99,13 @@ class LanguageConverter {
                        // '+' add rules for alltext
                        // 'E' the gave flags is error
                        // these flags above are reserved for program
-                       'A' => 'A',       // add rule for convert code (all text convert)
-                       'T' => 'T',       // title convert
-                       'R' => 'R',       // raw content
-                       'D' => 'D',       // convert description (subclass implement)
-                       '-' => '-',       // remove convert (not implement)
-                       'H' => 'H',       // add rule for convert code (but no display in placed code)
-                       'N' => 'N'        // current variant name
+                       'A' => 'A',   // add rule for convert code (all text convert)
+                       'T' => 'T',   // title convert
+                       'R' => 'R',   // raw content
+                       'D' => 'D',   // convert description (subclass implement)
+                       '-' => '-',   // remove convert (not implement)
+                       'H' => 'H',   // add rule for convert code (but no display in placed code)
+                       'N' => 'N',   // current variant name
                ];
                $this->mFlags = array_merge( $defaultflags, $flags );
                foreach ( $this->mVariants as $v ) {
@@ -357,10 +357,10 @@ class LanguageConverter {
                }
 
                /* we convert everything except:
-                  1. HTML markups (anything between < and >)
-                  2. HTML entities
-                  3. placeholders created by the parser
-               */
+                * 1. HTML markups (anything between < and >)
+                * 2. HTML entities
+                * 3. placeholders created by the parser
+                */
                $marker = '|' . Parser::MARKER_PREFIX . '[\-a-zA-Z0-9]+';
 
                // this one is needed when the text is inside an HTML markup
@@ -489,7 +489,7 @@ class LanguageConverter {
        protected function applyManualConv( $convRule ) {
                // Use syntax -{T|zh-cn:TitleCN; zh-tw:TitleTw}- to custom
                // title conversion.
-               // Bug 24072: $mConvRuleTitle was overwritten by other manual
+               // T26072: $mConvRuleTitle was overwritten by other manual
                // rule(s) not for title, this breaks the title conversion.
                $newConvRuleTitle = $convRule->getTitle();
                if ( $newConvRuleTitle ) {
@@ -1085,12 +1085,12 @@ class LanguageConverter {
                        // text should be splited by ";" only if a valid variant
                        // name exist after the markup, for example:
                        //  -{zh-hans:<span style="font-size:120%;">xxx</span>;zh-hant:\
-                       //      <span style="font-size:120%;">yyy</span>;}-
+                       //  <span style="font-size:120%;">yyy</span>;}-
                        // we should split it as:
                        //  [
-                       //        [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
-                       //        [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
-                       //        [2] => ''
+                       //    [0] => 'zh-hans:<span style="font-size:120%;">xxx</span>'
+                       //    [1] => 'zh-hant:<span style="font-size:120%;">yyy</span>'
+                       //    [2] => ''
                        //  ]
                        $pat = '/;\s*(?=';
                        foreach ( $this->mVariants as $variant ) {
index 858a7be..90e3751 100644 (file)
@@ -30,7 +30,7 @@
 class LanguageAr extends Language {
 
        /**
-        * Temporary hack for bug 9413: replace Arabic presentation forms with their
+        * Temporary hack for T11413: replace Arabic presentation forms with their
         * standard equivalents.
         *
         * @todo FIXME: This is language-specific for now only to avoid the negative
index 76568c2..9ef53e5 100644 (file)
@@ -63,13 +63,11 @@ class LanguageKsh extends Language {
         *
         * Possible values for the type of genitive are:
         *      Sing, Iehr            prepositioned genitive = possessive dative
-        *      Vun, Fon, -omitted-   postpositioned genitive
-        *                                     = preposition "vun" with dative
+        *      Vun, Fon, -omitted-   postpositioned genitive = preposition "vun" with dative
         *
         * Values of case overrides & prepositions, in the order of preceedence:
         *      Sing, Iehr            possessive dative = prepositioned genitive
-        *      Vun, Fon              preposition "vun" with dative
-        *                                           = postpositioned genitive
+        *      Vun, Fon              preposition "vun" with dative = postpositioned genitive
         *      En, em                preposition "en" with dative
         *
         * Values for object gender specifiers of the possessive dative, or
index d1963e1..f4082af 100644 (file)
@@ -50,12 +50,12 @@ class LanguageLa extends Language {
                case 'genitive':
                        // only a few declensions, and even for those mostly the singular only
                        $in = [
-                               '/u[ms]$/',                     # 2nd declension singular
-                               '/ommunia$/',                   # 3rd declension neuter plural (partly)
-                               '/a$/',                         # 1st declension singular
+                               '/u[ms]$/',                          # 2nd declension singular
+                               '/ommunia$/',                        # 3rd declension neuter plural (partly)
+                               '/a$/',                              # 1st declension singular
                                '/libri$/', '/nuntii$/', '/datae$/', # 2nd declension plural (partly)
-                               '/tio$/', '/ns$/', '/as$/',     # 3rd declension singular (partly)
-                               '/es$/'                         # 5th declension singular
+                               '/tio$/', '/ns$/', '/as$/',          # 3rd declension singular (partly)
+                               '/es$/'                              # 5th declension singular
                        ];
                        $out = [
                                'i',
@@ -69,12 +69,12 @@ class LanguageLa extends Language {
                case 'accusative':
                        // only a few declensions, and even for those mostly the singular only
                        $in = [
-                               '/u[ms]$/',                     # 2nd declension singular
-                               '/a$/',                         # 1st declension singular
-                               '/ommuniam$/',              # 3rd declension neuter plural (partly)
+                               '/u[ms]$/',                          # 2nd declension singular
+                               '/a$/',                              # 1st declension singular
+                               '/ommuniam$/',                       # 3rd declension neuter plural (partly)
                                '/libri$/', '/nuntii$/', '/datam$/', # 2nd declension plural (partly)
-                               '/tio$/', '/ns$/', '/as$/',     # 3rd declension singular (partly)
-                               '/es$/'                         # 5th declension singular
+                               '/tio$/', '/ns$/', '/as$/',          # 3rd declension singular (partly)
+                               '/es$/'                              # 5th declension singular
                        ];
                        $out = [
                                'um',
@@ -88,12 +88,12 @@ class LanguageLa extends Language {
                case 'ablative':
                        // only a few declensions, and even for those mostly the singular only
                        $in = [
-                               '/u[ms]$/',                     # 2nd declension singular
-                               '/ommunia$/',                   # 3rd declension neuter plural (partly)
-                               '/a$/',                         # 1st declension singular
-                               '/libri$/', '/nuntii$/', '/data$/', # 2nd declension plural (partly)
-                               '/tio$/', '/ns$/', '/as$/',     # 3rd declension singular (partly)
-                               '/es$/'                         # 5th declension singular
+                               '/u[ms]$/',                          # 2nd declension singular
+                               '/ommunia$/',                        # 3rd declension neuter plural (partly)
+                               '/a$/',                              # 1st declension singular
+                               '/libri$/', '/nuntii$/', '/data$/',  # 2nd declension plural (partly)
+                               '/tio$/', '/ns$/', '/as$/',          # 3rd declension singular (partly)
+                               '/es$/'                              # 5th declension singular
                        ];
                        $out = [
                                'o',
index cd39378..df894a1 100644 (file)
@@ -31,8 +31,8 @@ class LanguageMl extends Language {
         * Temporary hack for the issue described at
         * http://permalink.gmane.org/gmane.science.linguistics.wikipedia.technical/46396
         * Convert Unicode 5.0 style Malayalam input to Unicode 5.1. Similar to
-        * bug 9413. Also fixes miscellaneous problems due to mishandling of ZWJ,
-        * e.g. bug 11162.
+        * T11413. Also fixes miscellaneous problems due to mishandling of ZWJ,
+        * e.g. T13162.
         *
         * @todo FIXME: This is language-specific for now only to avoid the negative
         * performance impact of enabling it for all languages.
index 42ee44d..49ee88a 100644 (file)
@@ -27,8 +27,7 @@
  * Turkish has two different i, one with a dot and another without a dot. They
  * are totally different letters in this language, so we have to override the
  * ucfirst and lcfirst methods.
- * See https://en.wikipedia.org/wiki/Dotted_and_dotless_I
- * and @bug 28040
+ * See https://en.wikipedia.org/wiki/Dotted_and_dotless_I and T30040
  * @ingroup Language
  */
 class LanguageTr extends Language {
index 0557455..1c350d0 100644 (file)
@@ -60,7 +60,7 @@ class Names {
                'als' => 'Alemannisch', # Alemannic -- not a valid code, for compatibility. See gsw.
                'am' => 'አማርኛ', # Amharic
                'an' => 'aragonés', # Aragonese
-               'ang' => 'Ænglisc', # Old English, bug 23283
+               'ang' => 'Ænglisc', # Old English, T25283
                'anp' => 'अङ्गिका', # Angika
                'ar' => 'العربية', # Arabic
                'arc' => 'ܐܪܡܝܐ', # Aramaic
@@ -274,7 +274,7 @@ class Names {
                'lus' => 'Mizo ţawng', # Mizo/Lushai
                'luz' => 'لئری دوٙمینی', # Southern Luri
                'lv' => 'latviešu', # Latvian
-               'lzh' => '文言', # Literary Chinese, bug 8217
+               'lzh' => '文言', # Literary Chinese, T10217
                'lzz' => 'Lazuri', # Laz
                'mai' => 'मैथिली', # Maithili
                'map-bms' => 'Basa Banyumasan', # Banyumasan
@@ -299,8 +299,8 @@ class Names {
                'mzn' => 'مازِرونی', # Mazanderani
                'na' => 'Dorerin Naoero', # Nauruan
                'nah' => 'Nāhuatl', # Nahuatl (not in ISO 639-3)
-               'nan' => 'Bân-lâm-gú', # Min-nan, bug 8217
-               'nap' => 'Napulitano', # Neapolitan, bug 43793
+               'nan' => 'Bân-lâm-gú', # Min-nan, T10217
+               'nap' => 'Napulitano', # Neapolitan, T45793
                'nb' => 'norsk bokmål', # Norwegian (Bokmal)
                'nds' => 'Plattdüütsch', # Low German ''or'' Low Saxon
                'nds-nl' => 'Nedersaksies', # aka Nedersaksisch: Dutch Low Saxon
@@ -321,7 +321,7 @@ class Names {
                'olo' => 'Livvinkarjala', # Livvi-Karelian
                'om' => 'Oromoo', # Oromo
                'or' => 'ଓଡ଼ିଆ', # Oriya
-               'os' => 'Ирон', # Ossetic, bug 29091
+               'os' => 'Ирон', # Ossetic, T31091
                'pa' => 'ਪੰਜਾਬੀ', # Eastern Punjabi (Gurmukhi script) (pan)
                'pag' => 'Pangasinan', # Pangasinan
                'pam' => 'Kapampangan', # Pampanga
@@ -456,17 +456,17 @@ class Names {
                'za' => 'Vahcuengh', # Zhuang
                'zea' => 'Zeêuws', # Zeeuws/Zeaws
                'zh' => '中文', # (Zhōng Wén) - Chinese
-               'zh-classical' => '文言', # Classical Chinese/Literary Chinese -- (see bug 8217)
+               'zh-classical' => '文言', # Classical Chinese/Literary Chinese -- (see T10217)
                'zh-cn' => "中文(中国大陆)\xE2\x80\x8E", # Chinese (PRC)
                'zh-hans' => "中文(简体)\xE2\x80\x8E", # Mandarin Chinese (Simplified Chinese script) (cmn-hans)
                'zh-hant' => "中文(繁體)\xE2\x80\x8E", # Mandarin Chinese (Traditional Chinese script) (cmn-hant)
                'zh-hk' => "中文(香港)\xE2\x80\x8E", # Chinese (Hong Kong)
-               'zh-min-nan' => 'Bân-lâm-gú', # Min-nan -- (see bug 8217)
+               'zh-min-nan' => 'Bân-lâm-gú', # Min-nan -- (see T10217)
                'zh-mo' => "中文(澳門)\xE2\x80\x8E", # Chinese (Macau)
                'zh-my' => "中文(马来西亚)\xE2\x80\x8E", # Chinese (Malaysia)
                'zh-sg' => "中文(新加坡)\xE2\x80\x8E", # Chinese (Singapore)
                'zh-tw' => "中文(台灣)\xE2\x80\x8E", # Chinese (Taiwan)
-               'zh-yue' => '粵語', # Cantonese -- (see bug 8217)
+               'zh-yue' => '粵語', # Cantonese -- (see T10217)
                'zu' => 'isiZulu' # Zulu
        ];
 }
index d99a721..8a43998 100644 (file)
@@ -317,7 +317,7 @@ $magicWords = [
        'pagesincategory_files'     => [ '0', 'فايلات', 'ملفات', 'files' ],
 ];
 
-// (bug 16469) Override Eastern Arabic numberals, use Western
+// (T18469) Override Eastern Arabic numberals, use Western
 $digitTransformTable = [
        '0' => '0',
        '1' => '1',
index 689586b..b9280ea 100644 (file)
@@ -105,7 +105,7 @@ $namespaceAliases = [];
  * Example:
  * @code
  * $namespaceGenderAliases = [
- *     NS_USER => [ 'male' => 'Male_user', 'female' => 'Female_user' ],
+ *   NS_USER => [ 'male' => 'Male_user', 'female' => 'Female_user' ],
  * ];
  * @endcode
  */
index bf65812..c74d37b 100644 (file)
@@ -105,4 +105,4 @@ $magicWords = [
        'img_center'                => [ '1', 'erdian', 'center', 'centre' ],
 ];
 
-$separatorTransformTable = [ ',' => '.', '.' => ',' ]; /* Bug 15717 */
+$separatorTransformTable = [ ',' => '.', '.' => ',' ]; /* T17717 */
index 6281208..e034035 100644 (file)
@@ -28,5 +28,5 @@ $namespaceNames = [
        NS_CATEGORY_TALK    => 'Ñemohenda_myangekõi',
 ];
 
-// Remove Spanish gender aliases (bug 37090)
+// Remove Spanish gender aliases (T39090)
 $namespaceGenderAliases = [];
index 256abd7..d5f8f75 100644 (file)
@@ -8,7 +8,7 @@
  *
  */
 
-# $fallback = 'ru'; // bug 27785
+# $fallback = 'ru'; // T29785
 
 $namespaceNames = [
        NS_MEDIA            => 'Медиа',
index bb18959..f12be20 100644 (file)
@@ -70,7 +70,7 @@ $namespaceAliases = [
        'Diskusyón_de_Katēggoría'  => NS_CATEGORY_TALK,
 ];
 
-// Remove Spanish gender aliases (bug 37090)
+// Remove Spanish gender aliases (T39090)
 $namespaceGenderAliases = [];
 
 $specialPageAliases = [
index a44e0ac..6a71ca7 100644 (file)
@@ -18,5 +18,5 @@ $namespaceGenderAliases = [];
 
 $linkPrefixExtension = true;
 
-# Same as the French (bug 8485)
+# Same as the French (T10485)
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
index 767a305..2aa25ad 100644 (file)
@@ -36,7 +36,7 @@ $namespaceNames = [
        NS_CATEGORY_TALK    => 'Neneuhcāyōtl_tēixnāmiquiliztli',
 ];
 
-// Remove Spanish gender aliases (bug 37090)
+// Remove Spanish gender aliases (T39090)
 $namespaceGenderAliases = [];
 
 $namespaceAliases = [
index d7b5bea..01a9d1a 100644 (file)
@@ -120,7 +120,7 @@ $dateFormats = [
 
 $fallback8bitEncoding = 'iso-8859-2';
 $separatorTransformTable = [
-       ',' => "\xc2\xa0", // @bug 2749
+       ',' => "\xc2\xa0", // T4749
        '.' => ','
 ];
 
index f020303..78503cc 100644 (file)
@@ -111,7 +111,7 @@ $dateFormats = [
 ];
 
 $separatorTransformTable = [ ',' => "\xc2\xa0", '.' => ',' ];
-$linkTrail = '/^([áâãàéêẽçíòóôõq̃úüűũa-z]+)(.*)$/sDu'; # Bug 21168, 27633
+$linkTrail = '/^([áâãàéêẽçíòóôõq̃úüűũa-z]+)(.*)$/sDu'; # T23168, T29633
 
 $specialPageAliases = [
        'Activeusers'               => [ 'Utilizadores_activos' ],
index d8282dc..8488159 100644 (file)
@@ -36,7 +36,7 @@ $namespaceNames = [
        NS_CATEGORY_TALK    => 'Katiguriya_rimanakuy',
 ];
 
-// Remove Spanish gender aliases (bug 37090)
+// Remove Spanish gender aliases (T39090)
 $namespaceGenderAliases = [];
 
 $specialPageAliases = [
index 523783e..e960abd 100644 (file)
@@ -32,5 +32,5 @@ $namespaceNames = [
        NS_CATEGORY_TALK    => 'Samiyachiy_rimanakuy',
 ];
 
-// Remove Spanish gender aliases (bug 37090)
+// Remove Spanish gender aliases (T39090)
 $namespaceGenderAliases = [];
index 01c33ee..d2ce357 100644 (file)
@@ -321,7 +321,7 @@ $magicWords = [
 
 $linkTrail = '/^([a-zåäöéÅÄÖÉ]+)(.*)$/sDu';
 $separatorTransformTable = [
-       ',' => "\xc2\xa0", // @bug 2749
+       ',' => "\xc2\xa0", // T4749
        '.' => ','
 ];
 
index 797e443..c30e963 100644 (file)
@@ -44,7 +44,7 @@ $namespaceNames = [
 ];
 
 $namespaceAliases = [
-       // Aliases for Polish namespaces (bug 34988).
+       // Aliases for Polish namespaces (T36988).
        'Specjalna'            => NS_SPECIAL,
        'Dyskusja'             => NS_TALK,
        'Użytkownik'           => NS_USER,
index 8e1020b..4f385cf 100644 (file)
@@ -50,7 +50,7 @@ $namespaceNames = [
 $namespaceAliases = [
        'సభ్యులు' => NS_USER,
        'సభ్యులపై_చర్చ' => NS_USER_TALK,
-       'సభ్యుడు' => NS_USER, # set for bug 11615
+       'సభ్యుడు' => NS_USER, # set for T13615
        'సభ్యునిపై_చర్చ' => NS_USER_TALK,
        'బొమ్మ' => NS_FILE,
        'బొమ్మపై_చర్చ' => NS_FILE_TALK,
index a7978be..f62614b 100644 (file)
@@ -20,7 +20,7 @@ $fallback = 'nl';
 
 /**
  * Namespace names
- * (bug 8708)
+ * (T10708)
  */
 $namespaceNames = [
        NS_MEDIA            => 'Media',
index ddd1d7b..08287cd 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- patch-archive-ar_id.sql
 --
--- Bug 39675. Add archive.ar_id.
+-- T41675. Add archive.ar_id.
 
 ALTER TABLE /*$wgDBprefix*/archive
     ADD COLUMN ar_id int unsigned NOT NULL AUTO_INCREMENT FIRST,
index f5ff1f1..f8b6340 100644 (file)
@@ -1,11 +1,11 @@
 --
 -- patch-categorylinks-better-collation.sql
 --
--- Bugs 164, 1211, 23682.  This is the second version of this patch; the
+-- T2164, T3211, T25682.  This is the second version of this patch; the
 -- changes are also incorporated into patch-categorylinks-better-collation2.sql,
 -- for the benefit of trunk users who applied the original.
 --
--- Due to bug 25254, the length limit of 255 bytes for cl_sortkey_prefix
+-- Due to T27254, the length limit of 255 bytes for cl_sortkey_prefix
 -- is also enforced in php. If you change the length of that field, make
 -- sure to also change the check in LinksUpdate.php.
 ALTER TABLE /*$wgDBprefix*/categorylinks
index d4b51b5..ded8454 100644 (file)
@@ -1,7 +1,7 @@
 --
 -- patch-extenallinks-el_id.sql
 --
--- Bug 15441. Add externallinks.el_id.
+-- T17441. Add externallinks.el_id.
 
 ALTER TABLE /*$wgDBprefix*/externallinks
     ADD COLUMN el_id int unsigned NOT NULL AUTO_INCREMENT FIRST,
index 742841e..c516aaf 100644 (file)
@@ -1,4 +1,4 @@
--- Increase the length of up_property from 32 -> 255 bytes. Bug 19408
+-- Increase the length of up_property from 32 -> 255 bytes. T21408
 
 ALTER TABLE /*_*/user_properties
        MODIFY up_property varbinary(255);
index c92a720..b2f7e96 100644 (file)
@@ -41,7 +41,7 @@ class BenchUtf8TitleCheck extends Benchmarker {
                        "United States of America", // 7bit ASCII
                        "S%C3%A9rie%20t%C3%A9l%C3%A9vis%C3%A9e",
                        "Acteur%7CAlbert%20Robbins%7CAnglais%7CAnn%20Donahue%7CAnthony%20E.%20Zuiker%7CCarol%20Mendelsohn",
-                       // This comes from bug 36839
+                       // This comes from T38839
                        "Acteur%7CAlbert%20Robbins%7CAnglais%7CAnn%20Donahue%7CAnthony%20E.%20Zuiker%7CCarol%20Mendelsohn%7C"
                        . "Catherine%20Willows%7CDavid%20Hodges%7CDavid%20Phillips%7CGil%20Grissom%7CGreg%20Sanders%7CHodges%7C"
                        . "Internet%20Movie%20Database%7CJim%20Brass%7CLady%20Heather%7C"
index c8f393d..e0da027 100644 (file)
@@ -146,7 +146,7 @@ class ImageCleanup extends TableCleanup {
                 * if the target title exists in the image table, or if both the
                 * original and target titles exist in the page table, append
                 * increasing version numbers until the target title exists in
-                * neither.  (See also bug 16916.)
+                * neither.  (See also T18916.)
                 */
                $version = 0;
                $final = $new;
index 650fae0..ccc6406 100644 (file)
@@ -138,14 +138,14 @@ class TitleCleanup extends TableCleanup {
                                $prior = $title->getDBkey();
                        }
 
-                       # Old cleanupTitles could move articles there. See bug 23147.
+                       # Old cleanupTitles could move articles there. See T25147.
                        $ns = $row->page_namespace;
                        if ( $ns < 0 ) {
                                $ns = 0;
                        }
 
                        # Namespace which no longer exists. Put the page in the main namespace
-                       # since we don't have any idea of the old namespace name. See bug 68501.
+                       # since we don't have any idea of the old namespace name. See T70501.
                        if ( !MWNamespace::exists( $ns ) ) {
                                $ns = 0;
                        }
index 1d6f31d..79f75ef 100644 (file)
@@ -72,7 +72,7 @@ class FixDoubleRedirects extends Maintenance {
                        'rd_from = pa.page_id',
                        'rd_namespace = pb.page_namespace',
                        'rd_title = pb.page_title',
-                       'rd_interwiki IS NULL OR rd_interwiki = ' . $dbr->addQuotes( '' ), // bug 40352
+                       'rd_interwiki IS NULL OR rd_interwiki = ' . $dbr->addQuotes( '' ), // T42352
                        'pb.page_is_redirect' => 1,
                ];
 
index 87af5b8..fb00bed 100644 (file)
@@ -523,7 +523,7 @@ class GenerateSitemap extends Maintenance {
        function fileEntry( $url, $date, $priority ) {
                return
                        "\t<url>\n" .
-                       // bug 34666: $url may contain bad characters such as ampersands.
+                       // T36666: $url may contain bad characters such as ampersands.
                        "\t\t<loc>" . htmlspecialchars( $url ) . "</loc>\n" .
                        "\t\t<lastmod>$date</lastmod>\n" .
                        "\t\t<priority>$priority</priority>\n" .
@@ -545,7 +545,7 @@ class GenerateSitemap extends Maintenance {
         * @param int $namespace
         */
        function generateLimit( $namespace ) {
-               // bug 17961: make a title with the longest possible URL in this namespace
+               // T19961: make a title with the longest possible URL in this namespace
                $title = Title::makeTitle( $namespace, str_repeat( "\xf0\xa8\xae\x81", 63 ) . "\xe5\x96\x83" );
 
                $this->limit = [
index a0fe381..2a102b2 100644 (file)
@@ -106,7 +106,7 @@ class HHVMMakeRepo extends Maintenance {
                $cmd = wfEscapeShellArg(
                        $hhvm,
                        '--hphp',
-                   '--target', 'hhbc',
+                       '--target', 'hhbc',
                        '--format', 'binary',
                        '--force', '1',
                        '--keep-tempdir', '1',
index 4a3d2d6..23bdb3f 100644 (file)
@@ -497,7 +497,7 @@ class ImportImages extends Maintenance {
        # (preferably batching files too).
        private function getFileCommentFromSourceWiki( $wiki_host, $file ) {
                $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
-                          . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
+                       . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=comment';
                $body = Http::get( $url, [], __METHOD__ );
                if ( preg_match( '#<ii comment="([^"]*)" />#', $body, $matches ) == 0 ) {
                        return false;
@@ -508,7 +508,7 @@ class ImportImages extends Maintenance {
 
        private function getFileUserFromSourceWiki( $wiki_host, $file ) {
                $url = $wiki_host . '/api.php?action=query&format=xml&titles=File:'
-                          . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
+                       . rawurlencode( $file ) . '&prop=imageinfo&&iiprop=user';
                $body = Http::get( $url, [], __METHOD__ );
                if ( preg_match( '#<ii user="([^"]*)" />#', $body, $matches ) == 0 ) {
                        return false;
index 396be1d..597a876 100644 (file)
@@ -79,7 +79,7 @@ class MigrateUserGroup extends Maintenance {
                        $affected += $dbw->affectedRows();
                        $this->commitTransaction( $dbw, __METHOD__ );
 
-                       // Clear cache for the affected users (bug 40340)
+                       // Clear cache for the affected users (T42340)
                        if ( $affected > 0 ) {
                                // XXX: This also invalidates cache of unaffected users that
                                // were in the new group and not in the group.
index 1c633be..78f0671 100644 (file)
@@ -301,7 +301,7 @@ CREATE TABLE /*_*/categorylinks (
   -- conversion algorithm is run.  We store this so that we can update
   -- collations without reparsing all pages.
   -- Note: If you change the length of this field, you also need to change
-  -- code in LinksUpdate.php. See bug 25254.
+  -- code in LinksUpdate.php. See T27254.
   cl_sortkey_prefix varbinary(255) NOT NULL default 0x,
 
   -- This isn't really used at present. Provided for an optional
@@ -528,7 +528,7 @@ CREATE TABLE /*_*/ipblocks (
   -- Size chosen to allow IPv6
   -- FIXME: these fields were originally blank for single-IP blocks,
   -- but now they are populated. No migration was ever done. They
-  -- should be fixed to be blank again for such blocks (bug 49504).
+  -- should be fixed to be blank again for such blocks (T51504).
   ipb_range_start varchar(255) NOT NULL,
   ipb_range_end varchar(255) NOT NULL,
 
index 5e44faf..a9457c2 100644 (file)
@@ -136,7 +136,7 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance {
 
                $content = $rev->getContent();
                if ( !$content ) {
-                       # This should not happen, but sometimes does (bug 20757)
+                       # This should not happen, but sometimes does (T22757)
                        $id = $row->$idCol;
                        $this->output( "Content of $table $id unavailable!\n" );
 
index 095c266..fb97e91 100644 (file)
@@ -156,10 +156,10 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
                } catch ( Exception $e ) {
                        $this->output( "Data of revision with {$idCol}={$row->$idCol} unavailable!\n" );
 
-                       return false; // bug 22624?
+                       return false; // T24624?
                }
                if ( !is_string( $text ) ) {
-                       # This should not happen, but sometimes does (bug 20757)
+                       # This should not happen, but sometimes does (T22757)
                        $this->output( "Data of revision with {$idCol}={$row->$idCol} unavailable!\n" );
 
                        return false;
@@ -185,11 +185,11 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
                } catch ( Exception $e ) {
                        $this->output( "Text of revision with timestamp {$row->ar_timestamp} unavailable!\n" );
 
-                       return false; // bug 22624?
+                       return false; // T24624?
                }
                $text = $rev->getSerializedData();
                if ( !is_string( $text ) ) {
-                       # This should not happen, but sometimes does (bug 20757)
+                       # This should not happen, but sometimes does (T22757)
                        $this->output( "Data of revision with timestamp {$row->ar_timestamp} unavailable!\n" );
 
                        return false;
index d073282..3520279 100644 (file)
@@ -140,7 +140,7 @@ class RebuildFileCache extends Maintenance {
 
                                        MediaWiki\suppressWarnings(); // header notices
                                        // Cache ?action=view
-                                       $wgRequestTime = microtime( true ); # bug 22852
+                                       $wgRequestTime = microtime( true ); # T24852
                                        ob_start();
                                        $article->view();
                                        $context->getOutput()->output();
@@ -148,7 +148,7 @@ class RebuildFileCache extends Maintenance {
                                        $viewHtml = ob_get_clean();
                                        $viewCache->saveToFileCache( $viewHtml );
                                        // Cache ?action=history
-                                       $wgRequestTime = microtime( true ); # bug 22852
+                                       $wgRequestTime = microtime( true ); # T24852
                                        ob_start();
                                        Action::factory( 'history', $article, $context )->show();
                                        $context->getOutput()->output();
index cc976ed..e42a8ef 100644 (file)
@@ -137,7 +137,7 @@ class MwSql extends Maintenance {
                        }
                        if ( $historyFile ) {
                                # Delimiter is eated by streamStatementEnd, we add it
-                               # up in the history (bug 37020)
+                               # up in the history (T39020)
                                readline_add_history( $wholeLine . ';' );
                                readline_write_history( $historyFile );
                        }
index f322a03..2d0c9ee 100644 (file)
@@ -3,7 +3,7 @@
 -- Unique indexes need to be handled with INSERT SELECT since just running
 -- the CREATE INDEX statement will fail if there are duplicate values.
 --
--- Ignore duplicates, several tables will have them (e.g. bug 16966) but in
+-- Ignore duplicates, several tables will have them (e.g. T18966) but in
 -- most cases it's harmless to discard them.
 
 --------------------------------------------------------------------------------
diff --git a/maintenance/storage/fixBug20757.php b/maintenance/storage/fixBug20757.php
deleted file mode 100644 (file)
index b444f31..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-<?php
-/**
- * Script to fix bug 20757.
- *
- * 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 Maintenance ExternalStorage
- */
-
-require_once __DIR__ . '/../Maintenance.php';
-
-/**
- * Maintenance script to fix bug 20757.
- *
- * @ingroup Maintenance ExternalStorage
- */
-class FixBug20757 extends Maintenance {
-       public $batchSize = 10000;
-       public $mapCache = [];
-       public $mapCacheSize = 0;
-       public $maxMapCacheSize = 1000000;
-
-       function __construct() {
-               parent::__construct();
-               $this->addDescription( 'Script to fix bug 20757 assuming that blob_tracking is intact' );
-               $this->addOption( 'dry-run', 'Report only' );
-               $this->addOption( 'start', 'old_id to start at', false, true );
-       }
-
-       function execute() {
-               $dbr = $this->getDB( DB_REPLICA );
-               $dbw = $this->getDB( DB_MASTER );
-
-               $dryRun = $this->getOption( 'dry-run' );
-               if ( $dryRun ) {
-                       print "Dry run only.\n";
-               }
-
-               $startId = $this->getOption( 'start', 0 );
-               $numGood = 0;
-               $numFixed = 0;
-               $numBad = 0;
-
-               $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ );
-
-               // In MySQL 4.1+, the binary field old_text has a non-working LOWER() function
-               $lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING latin1))';
-
-               while ( true ) {
-                       print "ID: $startId / $totalRevs\r";
-
-                       $res = $dbr->select(
-                               'text',
-                               [ 'old_id', 'old_flags', 'old_text' ],
-                               [
-                                       'old_id > ' . intval( $startId ),
-                                       'old_flags LIKE \'%object%\' AND old_flags NOT LIKE \'%external%\'',
-                                       "$lowerLeft = 'o:15:\"historyblobstub\"'",
-                               ],
-                               __METHOD__,
-                               [
-                                       'ORDER BY' => 'old_id',
-                                       'LIMIT' => $this->batchSize,
-                               ]
-                       );
-
-                       if ( !$res->numRows() ) {
-                               break;
-                       }
-
-                       $secondaryIds = [];
-                       $stubs = [];
-
-                       foreach ( $res as $row ) {
-                               $startId = $row->old_id;
-
-                               // Basic sanity checks
-                               $obj = unserialize( $row->old_text );
-                               if ( $obj === false ) {
-                                       print "{$row->old_id}: unrecoverable: cannot unserialize\n";
-                                       ++$numBad;
-                                       continue;
-                               }
-
-                               if ( !is_object( $obj ) ) {
-                                       print "{$row->old_id}: unrecoverable: unserialized to type " .
-                                               gettype( $obj ) . ", possible double-serialization\n";
-                                       ++$numBad;
-                                       continue;
-                               }
-
-                               if ( strtolower( get_class( $obj ) ) !== 'historyblobstub' ) {
-                                       print "{$row->old_id}: unrecoverable: unexpected object class " .
-                                               get_class( $obj ) . "\n";
-                                       ++$numBad;
-                                       continue;
-                               }
-
-                               // Process flags
-                               $flags = explode( ',', $row->old_flags );
-                               if ( in_array( 'utf-8', $flags ) || in_array( 'utf8', $flags ) ) {
-                                       $legacyEncoding = false;
-                               } else {
-                                       $legacyEncoding = true;
-                               }
-
-                               // Queue the stub for future batch processing
-                               $id = intval( $obj->mOldId );
-                               $secondaryIds[] = $id;
-                               $stubs[$row->old_id] = [
-                                       'legacyEncoding' => $legacyEncoding,
-                                       'secondaryId' => $id,
-                                       'hash' => $obj->mHash,
-                               ];
-                       }
-
-                       $secondaryIds = array_unique( $secondaryIds );
-
-                       if ( !count( $secondaryIds ) ) {
-                               continue;
-                       }
-
-                       // Run the batch query on blob_tracking
-                       $res = $dbr->select(
-                               'blob_tracking',
-                               '*',
-                               [
-                                       'bt_text_id' => $secondaryIds,
-                               ],
-                               __METHOD__
-                       );
-                       $trackedBlobs = [];
-                       foreach ( $res as $row ) {
-                               $trackedBlobs[$row->bt_text_id] = $row;
-                       }
-
-                       // Process the stubs
-                       foreach ( $stubs as $primaryId => $stub ) {
-                               $secondaryId = $stub['secondaryId'];
-                               if ( !isset( $trackedBlobs[$secondaryId] ) ) {
-                                       // No tracked blob. Work out what went wrong
-                                       $secondaryRow = $dbr->selectRow(
-                                               'text',
-                                               [ 'old_flags', 'old_text' ],
-                                               [ 'old_id' => $secondaryId ],
-                                               __METHOD__
-                                       );
-                                       if ( !$secondaryRow ) {
-                                               print "$primaryId: unrecoverable: secondary row is missing\n";
-                                               ++$numBad;
-                                       } elseif ( $this->isUnbrokenStub( $stub, $secondaryRow ) ) {
-                                               // Not broken yet, and not in the tracked clusters so it won't get
-                                               // broken by the current RCT run.
-                                               ++$numGood;
-                                       } elseif ( strpos( $secondaryRow->old_flags, 'external' ) !== false ) {
-                                               print "$primaryId: unrecoverable: secondary gone to {$secondaryRow->old_text}\n";
-                                               ++$numBad;
-                                       } else {
-                                               print "$primaryId: unrecoverable: miscellaneous corruption of secondary row\n";
-                                               ++$numBad;
-                                       }
-                                       unset( $stubs[$primaryId] );
-                                       continue;
-                               }
-                               $trackRow = $trackedBlobs[$secondaryId];
-
-                               // Check that the specified text really is available in the tracked source row
-                               $url = "DB://{$trackRow->bt_cluster}/{$trackRow->bt_blob_id}/{$stub['hash']}";
-                               $text = ExternalStore::fetchFromURL( $url );
-                               if ( $text === false ) {
-                                       print "$primaryId: unrecoverable: source text missing\n";
-                                       ++$numBad;
-                                       unset( $stubs[$primaryId] );
-                                       continue;
-                               }
-                               if ( md5( $text ) !== $stub['hash'] ) {
-                                       print "$primaryId: unrecoverable: content hashes do not match\n";
-                                       ++$numBad;
-                                       unset( $stubs[$primaryId] );
-                                       continue;
-                               }
-
-                               // Find the page_id and rev_id
-                               // The page is probably the same as the page of the secondary row
-                               $pageId = intval( $trackRow->bt_page );
-                               if ( !$pageId ) {
-                                       $revId = $pageId = 0;
-                               } else {
-                                       $revId = $this->findTextIdInPage( $pageId, $primaryId );
-                                       if ( !$revId ) {
-                                               // Actually an orphan
-                                               $pageId = $revId = 0;
-                                       }
-                               }
-
-                               $newFlags = $stub['legacyEncoding'] ? 'external' : 'external,utf-8';
-
-                               if ( !$dryRun ) {
-                                       // Reset the text row to point to the original copy
-                                       $this->beginTransaction( $dbw, __METHOD__ );
-                                       $dbw->update(
-                                               'text',
-                                               // SET
-                                               [
-                                                       'old_flags' => $newFlags,
-                                                       'old_text' => $url
-                                               ],
-                                               // WHERE
-                                               [ 'old_id' => $primaryId ],
-                                               __METHOD__
-                                       );
-
-                                       // Add a blob_tracking row so that the new reference can be recompressed
-                                       // without needing to run trackBlobs.php again
-                                       $dbw->insert( 'blob_tracking',
-                                               [
-                                                       'bt_page' => $pageId,
-                                                       'bt_rev_id' => $revId,
-                                                       'bt_text_id' => $primaryId,
-                                                       'bt_cluster' => $trackRow->bt_cluster,
-                                                       'bt_blob_id' => $trackRow->bt_blob_id,
-                                                       'bt_cgz_hash' => $stub['hash'],
-                                                       'bt_new_url' => null,
-                                                       'bt_moved' => 0,
-                                               ],
-                                               __METHOD__
-                                       );
-                                       $this->commitTransaction( $dbw, __METHOD__ );
-                                       $this->waitForSlaves();
-                               }
-
-                               print "$primaryId: resolved to $url\n";
-                               ++$numFixed;
-                       }
-               }
-
-               print "\n";
-               print "Fixed: $numFixed\n";
-               print "Unrecoverable: $numBad\n";
-               print "Good stubs: $numGood\n";
-       }
-
-       function waitForSlaves() {
-               static $iteration = 0;
-               ++$iteration;
-               if ( ++$iteration > 50 == 0 ) {
-                       wfWaitForSlaves();
-                       $iteration = 0;
-               }
-       }
-
-       function findTextIdInPage( $pageId, $textId ) {
-               $ids = $this->getRevTextMap( $pageId );
-               if ( !isset( $ids[$textId] ) ) {
-                       return null;
-               } else {
-                       return $ids[$textId];
-               }
-       }
-
-       function getRevTextMap( $pageId ) {
-               if ( !isset( $this->mapCache[$pageId] ) ) {
-                       // Limit cache size
-                       while ( $this->mapCacheSize > $this->maxMapCacheSize ) {
-                               $key = key( $this->mapCache );
-                               $this->mapCacheSize -= count( $this->mapCache[$key] );
-                               unset( $this->mapCache[$key] );
-                       }
-
-                       $dbr = $this->getDB( DB_REPLICA );
-                       $map = [];
-                       $res = $dbr->select( 'revision',
-                               [ 'rev_id', 'rev_text_id' ],
-                               [ 'rev_page' => $pageId ],
-                               __METHOD__
-                       );
-                       foreach ( $res as $row ) {
-                               $map[$row->rev_text_id] = $row->rev_id;
-                       }
-                       $this->mapCache[$pageId] = $map;
-                       $this->mapCacheSize += count( $map );
-               }
-
-               return $this->mapCache[$pageId];
-       }
-
-       /**
-        * This is based on part of HistoryBlobStub::getText().
-        * Determine if the text can be retrieved from the row in the normal way.
-        * @param array $stub
-        * @param stdClass $secondaryRow
-        * @return bool
-        */
-       function isUnbrokenStub( $stub, $secondaryRow ) {
-               $flags = explode( ',', $secondaryRow->old_flags );
-               $text = $secondaryRow->old_text;
-               if ( in_array( 'external', $flags ) ) {
-                       $url = $text;
-                       MediaWiki\suppressWarnings();
-                       list( /* $proto */, $path ) = explode( '://', $url, 2 );
-                       MediaWiki\restoreWarnings();
-
-                       if ( $path == "" ) {
-                               return false;
-                       }
-                       $text = ExternalStore::fetchFromURL( $url );
-               }
-               if ( !in_array( 'object', $flags ) ) {
-                       return false;
-               }
-
-               if ( in_array( 'gzip', $flags ) ) {
-                       $obj = unserialize( gzinflate( $text ) );
-               } else {
-                       $obj = unserialize( $text );
-               }
-
-               if ( !is_object( $obj ) ) {
-                       // Correct for old double-serialization bug.
-                       $obj = unserialize( $obj );
-               }
-
-               if ( !is_object( $obj ) ) {
-                       return false;
-               }
-
-               $obj->uncompress();
-               $text = $obj->getItem( $stub['hash'] );
-
-               return $text !== false;
-       }
-}
-
-$maintClass = 'FixBug20757';
-require_once RUN_MAINTENANCE_IF_MAIN;
diff --git a/maintenance/storage/fixT22757.php b/maintenance/storage/fixT22757.php
new file mode 100644 (file)
index 0000000..e8bd23d
--- /dev/null
@@ -0,0 +1,349 @@
+<?php
+/**
+ * Script to fix T22757.
+ *
+ * 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 Maintenance ExternalStorage
+ */
+
+require_once __DIR__ . '/../Maintenance.php';
+
+/**
+ * Maintenance script to fix T22757.
+ *
+ * @ingroup Maintenance ExternalStorage
+ */
+class FixT22757 extends Maintenance {
+       public $batchSize = 10000;
+       public $mapCache = [];
+       public $mapCacheSize = 0;
+       public $maxMapCacheSize = 1000000;
+
+       function __construct() {
+               parent::__construct();
+               $this->addDescription( 'Script to fix T22757 assuming that blob_tracking is intact' );
+               $this->addOption( 'dry-run', 'Report only' );
+               $this->addOption( 'start', 'old_id to start at', false, true );
+       }
+
+       function execute() {
+               $dbr = $this->getDB( DB_REPLICA );
+               $dbw = $this->getDB( DB_MASTER );
+
+               $dryRun = $this->getOption( 'dry-run' );
+               if ( $dryRun ) {
+                       print "Dry run only.\n";
+               }
+
+               $startId = $this->getOption( 'start', 0 );
+               $numGood = 0;
+               $numFixed = 0;
+               $numBad = 0;
+
+               $totalRevs = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ );
+
+               // In MySQL 4.1+, the binary field old_text has a non-working LOWER() function
+               $lowerLeft = 'LOWER(CONVERT(LEFT(old_text,22) USING latin1))';
+
+               while ( true ) {
+                       print "ID: $startId / $totalRevs\r";
+
+                       $res = $dbr->select(
+                               'text',
+                               [ 'old_id', 'old_flags', 'old_text' ],
+                               [
+                                       'old_id > ' . intval( $startId ),
+                                       'old_flags LIKE \'%object%\' AND old_flags NOT LIKE \'%external%\'',
+                                       "$lowerLeft = 'o:15:\"historyblobstub\"'",
+                               ],
+                               __METHOD__,
+                               [
+                                       'ORDER BY' => 'old_id',
+                                       'LIMIT' => $this->batchSize,
+                               ]
+                       );
+
+                       if ( !$res->numRows() ) {
+                               break;
+                       }
+
+                       $secondaryIds = [];
+                       $stubs = [];
+
+                       foreach ( $res as $row ) {
+                               $startId = $row->old_id;
+
+                               // Basic sanity checks
+                               $obj = unserialize( $row->old_text );
+                               if ( $obj === false ) {
+                                       print "{$row->old_id}: unrecoverable: cannot unserialize\n";
+                                       ++$numBad;
+                                       continue;
+                               }
+
+                               if ( !is_object( $obj ) ) {
+                                       print "{$row->old_id}: unrecoverable: unserialized to type " .
+                                               gettype( $obj ) . ", possible double-serialization\n";
+                                       ++$numBad;
+                                       continue;
+                               }
+
+                               if ( strtolower( get_class( $obj ) ) !== 'historyblobstub' ) {
+                                       print "{$row->old_id}: unrecoverable: unexpected object class " .
+                                               get_class( $obj ) . "\n";
+                                       ++$numBad;
+                                       continue;
+                               }
+
+                               // Process flags
+                               $flags = explode( ',', $row->old_flags );
+                               if ( in_array( 'utf-8', $flags ) || in_array( 'utf8', $flags ) ) {
+                                       $legacyEncoding = false;
+                               } else {
+                                       $legacyEncoding = true;
+                               }
+
+                               // Queue the stub for future batch processing
+                               $id = intval( $obj->mOldId );
+                               $secondaryIds[] = $id;
+                               $stubs[$row->old_id] = [
+                                       'legacyEncoding' => $legacyEncoding,
+                                       'secondaryId' => $id,
+                                       'hash' => $obj->mHash,
+                               ];
+                       }
+
+                       $secondaryIds = array_unique( $secondaryIds );
+
+                       if ( !count( $secondaryIds ) ) {
+                               continue;
+                       }
+
+                       // Run the batch query on blob_tracking
+                       $res = $dbr->select(
+                               'blob_tracking',
+                               '*',
+                               [
+                                       'bt_text_id' => $secondaryIds,
+                               ],
+                               __METHOD__
+                       );
+                       $trackedBlobs = [];
+                       foreach ( $res as $row ) {
+                               $trackedBlobs[$row->bt_text_id] = $row;
+                       }
+
+                       // Process the stubs
+                       foreach ( $stubs as $primaryId => $stub ) {
+                               $secondaryId = $stub['secondaryId'];
+                               if ( !isset( $trackedBlobs[$secondaryId] ) ) {
+                                       // No tracked blob. Work out what went wrong
+                                       $secondaryRow = $dbr->selectRow(
+                                               'text',
+                                               [ 'old_flags', 'old_text' ],
+                                               [ 'old_id' => $secondaryId ],
+                                               __METHOD__
+                                       );
+                                       if ( !$secondaryRow ) {
+                                               print "$primaryId: unrecoverable: secondary row is missing\n";
+                                               ++$numBad;
+                                       } elseif ( $this->isUnbrokenStub( $stub, $secondaryRow ) ) {
+                                               // Not broken yet, and not in the tracked clusters so it won't get
+                                               // broken by the current RCT run.
+                                               ++$numGood;
+                                       } elseif ( strpos( $secondaryRow->old_flags, 'external' ) !== false ) {
+                                               print "$primaryId: unrecoverable: secondary gone to {$secondaryRow->old_text}\n";
+                                               ++$numBad;
+                                       } else {
+                                               print "$primaryId: unrecoverable: miscellaneous corruption of secondary row\n";
+                                               ++$numBad;
+                                       }
+                                       unset( $stubs[$primaryId] );
+                                       continue;
+                               }
+                               $trackRow = $trackedBlobs[$secondaryId];
+
+                               // Check that the specified text really is available in the tracked source row
+                               $url = "DB://{$trackRow->bt_cluster}/{$trackRow->bt_blob_id}/{$stub['hash']}";
+                               $text = ExternalStore::fetchFromURL( $url );
+                               if ( $text === false ) {
+                                       print "$primaryId: unrecoverable: source text missing\n";
+                                       ++$numBad;
+                                       unset( $stubs[$primaryId] );
+                                       continue;
+                               }
+                               if ( md5( $text ) !== $stub['hash'] ) {
+                                       print "$primaryId: unrecoverable: content hashes do not match\n";
+                                       ++$numBad;
+                                       unset( $stubs[$primaryId] );
+                                       continue;
+                               }
+
+                               // Find the page_id and rev_id
+                               // The page is probably the same as the page of the secondary row
+                               $pageId = intval( $trackRow->bt_page );
+                               if ( !$pageId ) {
+                                       $revId = $pageId = 0;
+                               } else {
+                                       $revId = $this->findTextIdInPage( $pageId, $primaryId );
+                                       if ( !$revId ) {
+                                               // Actually an orphan
+                                               $pageId = $revId = 0;
+                                       }
+                               }
+
+                               $newFlags = $stub['legacyEncoding'] ? 'external' : 'external,utf-8';
+
+                               if ( !$dryRun ) {
+                                       // Reset the text row to point to the original copy
+                                       $this->beginTransaction( $dbw, __METHOD__ );
+                                       $dbw->update(
+                                               'text',
+                                               // SET
+                                               [
+                                                       'old_flags' => $newFlags,
+                                                       'old_text' => $url
+                                               ],
+                                               // WHERE
+                                               [ 'old_id' => $primaryId ],
+                                               __METHOD__
+                                       );
+
+                                       // Add a blob_tracking row so that the new reference can be recompressed
+                                       // without needing to run trackBlobs.php again
+                                       $dbw->insert( 'blob_tracking',
+                                               [
+                                                       'bt_page' => $pageId,
+                                                       'bt_rev_id' => $revId,
+                                                       'bt_text_id' => $primaryId,
+                                                       'bt_cluster' => $trackRow->bt_cluster,
+                                                       'bt_blob_id' => $trackRow->bt_blob_id,
+                                                       'bt_cgz_hash' => $stub['hash'],
+                                                       'bt_new_url' => null,
+                                                       'bt_moved' => 0,
+                                               ],
+                                               __METHOD__
+                                       );
+                                       $this->commitTransaction( $dbw, __METHOD__ );
+                                       $this->waitForSlaves();
+                               }
+
+                               print "$primaryId: resolved to $url\n";
+                               ++$numFixed;
+                       }
+               }
+
+               print "\n";
+               print "Fixed: $numFixed\n";
+               print "Unrecoverable: $numBad\n";
+               print "Good stubs: $numGood\n";
+       }
+
+       function waitForSlaves() {
+               static $iteration = 0;
+               ++$iteration;
+               if ( ++$iteration > 50 == 0 ) {
+                       wfWaitForSlaves();
+                       $iteration = 0;
+               }
+       }
+
+       function findTextIdInPage( $pageId, $textId ) {
+               $ids = $this->getRevTextMap( $pageId );
+               if ( !isset( $ids[$textId] ) ) {
+                       return null;
+               } else {
+                       return $ids[$textId];
+               }
+       }
+
+       function getRevTextMap( $pageId ) {
+               if ( !isset( $this->mapCache[$pageId] ) ) {
+                       // Limit cache size
+                       while ( $this->mapCacheSize > $this->maxMapCacheSize ) {
+                               $key = key( $this->mapCache );
+                               $this->mapCacheSize -= count( $this->mapCache[$key] );
+                               unset( $this->mapCache[$key] );
+                       }
+
+                       $dbr = $this->getDB( DB_REPLICA );
+                       $map = [];
+                       $res = $dbr->select( 'revision',
+                               [ 'rev_id', 'rev_text_id' ],
+                               [ 'rev_page' => $pageId ],
+                               __METHOD__
+                       );
+                       foreach ( $res as $row ) {
+                               $map[$row->rev_text_id] = $row->rev_id;
+                       }
+                       $this->mapCache[$pageId] = $map;
+                       $this->mapCacheSize += count( $map );
+               }
+
+               return $this->mapCache[$pageId];
+       }
+
+       /**
+        * This is based on part of HistoryBlobStub::getText().
+        * Determine if the text can be retrieved from the row in the normal way.
+        * @param array $stub
+        * @param stdClass $secondaryRow
+        * @return bool
+        */
+       function isUnbrokenStub( $stub, $secondaryRow ) {
+               $flags = explode( ',', $secondaryRow->old_flags );
+               $text = $secondaryRow->old_text;
+               if ( in_array( 'external', $flags ) ) {
+                       $url = $text;
+                       MediaWiki\suppressWarnings();
+                       list( /* $proto */, $path ) = explode( '://', $url, 2 );
+                       MediaWiki\restoreWarnings();
+
+                       if ( $path == "" ) {
+                               return false;
+                       }
+                       $text = ExternalStore::fetchFromURL( $url );
+               }
+               if ( !in_array( 'object', $flags ) ) {
+                       return false;
+               }
+
+               if ( in_array( 'gzip', $flags ) ) {
+                       $obj = unserialize( gzinflate( $text ) );
+               } else {
+                       $obj = unserialize( $text );
+               }
+
+               if ( !is_object( $obj ) ) {
+                       // Correct for old double-serialization bug.
+                       $obj = unserialize( $obj );
+               }
+
+               if ( !is_object( $obj ) ) {
+                       return false;
+               }
+
+               $obj->uncompress();
+               $text = $obj->getItem( $stub['hash'] );
+
+               return $text !== false;
+       }
+}
+
+$maintClass = 'FixT22757';
+require_once RUN_MAINTENANCE_IF_MAIN;
index a2dc376..4f22843 100644 (file)
@@ -69,7 +69,7 @@ class TrackBlobs {
                echo "Doing integrity check...\n";
                $dbr = wfGetDB( DB_REPLICA );
 
-               // Scan for HistoryBlobStub objects in the text table (bug 20757)
+               // Scan for HistoryBlobStub objects in the text table (T22757)
 
                $exists = $dbr->selectField( 'text', 1,
                        'old_flags LIKE \'%object%\' AND old_flags NOT LIKE \'%external%\' ' .
@@ -84,7 +84,7 @@ class TrackBlobs {
                        exit( 1 );
                }
 
-               // Scan the archive table for HistoryBlobStub objects or external flags (bug 22624)
+               // Scan the archive table for HistoryBlobStub objects or external flags (T24624)
                $flags = $dbr->selectField( 'archive', 'ar_flags',
                        'ar_flags LIKE \'%external%\' OR (' .
                        'ar_flags LIKE \'%object%\' ' .
index 892f799..44922a4 100644 (file)
@@ -594,7 +594,7 @@ CREATE TABLE /*_*/categorylinks (
   -- conversion algorithm is run.  We store this so that we can update
   -- collations without reparsing all pages.
   -- Note: If you change the length of this field, you also need to change
-  -- code in LinksUpdate.php. See bug 25254.
+  -- code in LinksUpdate.php. See T27254.
   cl_sortkey_prefix varchar(255) binary NOT NULL default '',
 
   -- This isn't really used at present. Provided for an optional
@@ -816,7 +816,7 @@ CREATE TABLE /*_*/ipblocks (
   -- Size chosen to allow IPv6
   -- FIXME: these fields were originally blank for single-IP blocks,
   -- but now they are populated. No migration was ever done. They
-  -- should be fixed to be blank again for such blocks (bug 49504).
+  -- should be fixed to be blank again for such blocks (T51504).
   ipb_range_start tinyblob NOT NULL,
   ipb_range_end tinyblob NOT NULL,
 
index a672e29..d96cecd 100755 (executable)
@@ -112,7 +112,7 @@ class UpdateMediaWiki extends Maintenance {
                }
 
                $lang = Language::factory( 'en' );
-               // Set global language to ensure localised errors are in English (bug 20633)
+               // Set global language to ensure localised errors are in English (T22633)
                RequestContext::getMain()->setLanguage( $lang );
                $wgLang = $lang; // BackCompat
 
@@ -203,7 +203,7 @@ class UpdateMediaWiki extends Maintenance {
 
                # Don't try to access the database
                # This needs to be disabled early since extensions will try to use the l10n
-               # cache from $wgExtensionFunctions (bug 20471)
+               # cache from $wgExtensionFunctions (T22471)
                $wgLocalisationCacheConf = [
                        'class' => 'LocalisationCache',
                        'storeClass' => 'LCStoreNull',
index 9893342..69c9265 100644 (file)
@@ -195,7 +195,7 @@ class UserDupes {
                        "SELECT user_name,COUNT(*) AS n
                                FROM $user
                        GROUP BY user_name
-                         HAVING n > 1", __METHOD__ );
+                               HAVING n > 1", __METHOD__ );
 
                $list = [];
                foreach ( $result as $row ) {
index b791db8..a6cd650 100644 (file)
@@ -13,7 +13,7 @@
        list-style: none none;
        display: inline;
        /* shared.css has some very weird directionality-specific rules for 'ul' we need to override,
-          search for "Correct directionality when page dir is different from site/user dir" */
+        * search for "Correct directionality when page dir is different from site/user dir" */
        margin: 0 !important;
        padding: 0 !important;
 }
index 675f4b5..18f1299 100644 (file)
 
        /* Methods */
 
+       /**
+        * Return the representation of the state of this item.
+        *
+        * @return {Object} State of the object
+        */
+       mw.rcfilters.dm.FilterItem.prototype.getState = function () {
+               return {
+                       selected: this.isSelected(),
+                       included: this.isIncluded(),
+                       conflicted: this.isConflicted(),
+                       fullyCovered: this.isFullyCovered()
+               };
+       };
+
        /**
         * Get the name of this filter
         *
index d58eb2e..2afe286 100644 (file)
                                        // For example, see two groups with conflicts:
                                        // userExpLevel: [
                                        //   {
-                                       //      name: 'experienced',
-                                       //      conflicts: [ 'unregistered' ]
+                                       //     name: 'experienced',
+                                       //     conflicts: [ 'unregistered' ]
                                        //   }
                                        // ],
                                        // registration: [
                                        //   {
-                                       //      name: 'registered',
+                                       //     name: 'registered',
                                        //   },
                                        //   {
-                                       //      name: 'unregistered',
+                                       //     name: 'unregistered',
                                        //   }
                                        // ]
                                        // If we select 'experienced', then 'unregistered' is in conflict (and vice versa),
index 94da3ac..21953da 100644 (file)
                }
        }
 
+       &-selected {
+               background-color: #eaf3ff; // Accent90 AAA
+       }
+
        &-label {
                &-title {
                        font-weight: bold;
index cf03932..fc05649 100644 (file)
                e.stopPropagation();
        };
 
+       /**
+        * Emit a click event when the capsule is clicked so we can aggregate this
+        * in the parent (the capsule)
+        */
+       mw.rcfilters.ui.CapsuleItemWidget.prototype.onClick = function () {
+               this.emit( 'click' );
+       };
+
        /**
         * Override the event listening to the item close button click
         */
index 2bd2f0e..8e0b259 100644 (file)
@@ -11,8 +11,6 @@
         * @param {OO.ui.InputWidget} filterInput A filter input that focuses the capsule widget
         * @param {Object} config Configuration object
         * @cfg {jQuery} [$overlay] A jQuery object serving as overlay for popups
-        * @cfg {number} [topScrollOffset=10] When scrolling the entire widget to the top, leave this
-        *  much space (in pixels) above the widget.
         */
        mw.rcfilters.ui.FilterCapsuleMultiselectWidget = function MwRcfiltersUiFilterCapsuleMultiselectWidget( controller, model, filterInput, config ) {
                var title = new OO.ui.LabelWidget( {
@@ -32,8 +30,7 @@
                this.controller = controller;
                this.model = model;
                this.filterInput = filterInput;
-
-               this.topScrollOffset = config.topScrollOffset || 10;
+               this.isSelecting = false;
 
                this.resetButton = new OO.ui.ButtonWidget( {
                        icon: 'trash',
@@ -54,7 +51,7 @@
                        itemUpdate: 'onModelItemUpdate',
                        highlightChange: 'onModelHighlightChange'
                } );
-               this.popup.connect( this, { toggle: 'onPopupToggle' } );
+               this.aggregate( { click: 'capsuleItemClick' } );
 
                // Add the filterInput as trigger
                this.filterInput.$input
                }
        };
 
-       /**
-        * Respond to popup toggle event
-        *
-        * @param {boolean} isVisible Popup is visible
-        */
-       mw.rcfilters.ui.FilterCapsuleMultiselectWidget.prototype.onPopupToggle = function ( isVisible ) {
-               if ( isVisible ) {
-                       this.scrollToTop();
-               }
-       };
-
-       /**
-        * Scroll the capsule to the top of the screen
-        */
-       mw.rcfilters.ui.FilterCapsuleMultiselectWidget.prototype.scrollToTop = function () {
-               var container = OO.ui.Element.static.getClosestScrollableContainer( this.$element[ 0 ], 'y' );
-
-               $( container ).animate( {
-                       scrollTop: this.$element.offset().top - this.topScrollOffset
-               } );
-       };
-
        /**
         * Reevaluate the restore state for the widget between setting to defaults and clearing all filters
         */
index f858ab0..a750c44 100644 (file)
@@ -19,6 +19,7 @@
 
                this.controller = controller;
                this.model = model;
+               this.filters = {};
 
                // Mixin constructors
                OO.ui.mixin.GroupWidget.call( this, config );
@@ -36,6 +37,7 @@
 
                this.$element
                        .addClass( 'mw-rcfilters-ui-filterGroupWidget' )
+                       .addClass( 'mw-rcfilters-ui-filterGroupWidget-name-' + this.model.getName() )
                        .append(
                                this.$label,
                                this.$group
                );
        };
 
+       /**
+        * Get an item widget from its filter name
+        *
+        * @param {string} filterName Filter name
+        * @return {mw.rcfilters.ui.FilterItemWidget} Item widget
+        */
+       mw.rcfilters.ui.FilterGroupWidget.prototype.getItemWidget = function ( filterName ) {
+               return this.filters[ filterName ];
+       };
+
+       /**
+        * Populate data from the model
+        */
        mw.rcfilters.ui.FilterGroupWidget.prototype.populateFromModel = function () {
                var widget = this;
 
+               this.clearItems();
+               this.filters = {};
+
                this.addItems(
                        this.model.getItems().map( function ( filterItem ) {
-                               return new mw.rcfilters.ui.FilterItemWidget(
+                               var groupWidget = new mw.rcfilters.ui.FilterItemWidget(
                                        widget.controller,
                                        filterItem,
                                        {
                                                $overlay: widget.$overlay
                                        }
                                );
+
+                               widget.filters[ filterItem.getName() ] = groupWidget;
+
+                               return groupWidget;
                        } )
                );
        };
index 63db2b0..eda4fe7 100644 (file)
@@ -21,6 +21,7 @@
 
                this.controller = controller;
                this.model = model;
+               this.selected = false;
 
                this.checkboxWidget = new mw.rcfilters.ui.CheckboxInputWidget( {
                        value: this.model.getName(),
                this.setCurrentMuteState();
        };
 
+       /**
+        * Set selected state on this widget
+        *
+        * @param {boolean} [isSelected] Widget is selected
+        */
+       mw.rcfilters.ui.FilterItemWidget.prototype.toggleSelected = function ( isSelected ) {
+               isSelected = isSelected !== undefined ? isSelected : !this.selected;
+
+               if ( this.selected !== isSelected ) {
+                       this.selected = isSelected;
+
+                       this.$element.toggleClass( 'mw-rcfilters-ui-filterItemWidget-selected', this.selected );
+               }
+       };
+
        /**
         * Set the current mute state for this item
         */
index 9fa58f3..bb213fd 100644 (file)
 
                // Events
                this.model.connect( this, {
-                       initialize: 'onModelInitialize'
+                       initialize: 'onModelInitialize',
+                       itemUpdate: 'onModelItemUpdate'
                } );
                this.textInput.connect( this, {
                        change: 'onTextInputChange'
                } );
+               this.capsule.connect( this, { capsuleItemClick: 'onCapsuleItemClick' } );
+               this.capsule.popup.connect( this, { toggle: 'onCapsulePopupToggle' } );
+
+               // Initialize
                this.$element
                        .addClass( 'mw-rcfilters-ui-filterWrapperWidget' )
                        .append( this.capsule.$element, this.textInput.$element );
        OO.inheritClass( mw.rcfilters.ui.FilterWrapperWidget, OO.ui.Widget );
        OO.mixinClass( mw.rcfilters.ui.FilterWrapperWidget, OO.ui.mixin.PendingElement );
 
+       /**
+        * Respond to capsule item click and make the popup scroll down to the requested item
+        *
+        * @param {mw.rcfilters.ui.CapsuleItemWidget} item Clicked item
+        */
+       mw.rcfilters.ui.FilterWrapperWidget.prototype.onCapsuleItemClick = function ( item ) {
+               var filterName = item.getData(),
+                       // Find the item in the popup
+                       filterWidget = this.filterPopup.getItemWidget( filterName );
+
+               // Highlight item
+               this.filterPopup.select( filterName );
+
+               this.scrollToTop( filterWidget.$element );
+       };
+
+       /**
+        * Respond to popup toggle event. Reset selection in the list when the popup is closed.
+        *
+        * @param {boolean} isVisible Popup is visible
+        */
+       mw.rcfilters.ui.FilterWrapperWidget.prototype.onCapsulePopupToggle = function ( isVisible ) {
+               if ( !isVisible ) {
+                       this.filterPopup.resetSelection();
+               } else {
+                       this.scrollToTop( this.capsule.$element, 10 );
+               }
+       };
+
        /**
         * Respond to text input change
         *
         * @param {string} newValue Current value
         */
        mw.rcfilters.ui.FilterWrapperWidget.prototype.onTextInputChange = function ( newValue ) {
+               this.filterPopup.resetSelection();
+
                // Filter the results
                this.filterPopup.filter( this.model.findMatches( newValue ) );
                this.capsule.popup.clip();
                        }
                } );
        };
+
+       /**
+        * Respond to item update and reset the selection. This will make it so that
+        * any actual interaction with the system resets the selection state of any item.
+        */
+       mw.rcfilters.ui.FilterWrapperWidget.prototype.onModelItemUpdate = function () {
+               this.filterPopup.resetSelection();
+       };
+
+       /**
+        * Scroll the element to top within its container
+        *
+        * @private
+        * @param {jQuery} $element Element to position
+        * @param {number} [marginFromTop] When scrolling the entire widget to the top, leave this
+        *  much space (in pixels) above the widget.
+        */
+       mw.rcfilters.ui.FilterWrapperWidget.prototype.scrollToTop = function ( $element, marginFromTop ) {
+               var container = OO.ui.Element.static.getClosestScrollableContainer( $element[ 0 ], 'y' ),
+                       pos = OO.ui.Element.static.getRelativePosition( $element, $( container ) );
+
+               // Scroll to item
+               $( container ).animate( {
+                       scrollTop: $( container ).scrollTop() + pos.top + ( marginFromTop || 0 )
+               } );
+       };
 }( mediaWiki ) );
index ae9ee71..38679d7 100644 (file)
@@ -26,6 +26,8 @@
                this.controller = controller;
                this.model = model;
                this.$overlay = config.$overlay || this.$element;
+               this.groups = {};
+               this.selected = null;
 
                this.highlightButton = new OO.ui.ButtonWidget( {
                        label: mw.message( 'rcfilters-highlightbutton-title' ).text(),
 
                // Reset
                this.clearItems();
+               this.groups = {};
 
                this.addItems(
                        Object.keys( this.model.getFilterGroups() ).map( function ( groupName ) {
-                               return new mw.rcfilters.ui.FilterGroupWidget(
+                               var groupWidget = new mw.rcfilters.ui.FilterGroupWidget(
                                        widget.controller,
                                        widget.model.getGroup( groupName ),
                                        {
                                                $overlay: widget.$overlay
                                        }
                                );
+
+                               widget.groups[ groupName ] = groupWidget;
+                               return groupWidget;
                        } )
                );
        };
                this.controller.toggleHighlight();
        };
 
+       /**
+        * Find the filter item widget that corresponds to the item name
+        *
+        * @param {string} itemName Filter name
+        * @return {mw.rcfilters.ui.FilterItemWidget} Filter widget
+        */
+       mw.rcfilters.ui.FiltersListWidget.prototype.getItemWidget = function ( itemName ) {
+               var filterItem = this.model.getItemByName( itemName ),
+                       // Find the group
+                       groupWidget = this.groups[ filterItem.getGroupName() ];
+
+               // Find the item inside the group
+               return groupWidget.getItemWidget( itemName );
+       };
+
+       /**
+        * Mark an item widget as selected
+        *
+        * @param {string} itemName Filter name
+        */
+       mw.rcfilters.ui.FiltersListWidget.prototype.select = function ( itemName ) {
+               var filterWidget;
+
+               if ( this.selected !== itemName ) {
+                       // Unselect previous
+                       if ( this.selected ) {
+                               filterWidget = this.getItemWidget( this.selected );
+                               filterWidget.toggleSelected( false );
+                       }
+
+                       // Select new one
+                       this.selected = itemName;
+                       if ( this.selected ) {
+                               filterWidget = this.getItemWidget( this.selected );
+                               filterWidget.toggleSelected( true );
+                       }
+               }
+       };
+
+       /**
+        * Reset selection and remove selected states from all items
+        */
+       mw.rcfilters.ui.FiltersListWidget.prototype.resetSelection = function () {
+               if ( this.selected !== null ) {
+                       this.selected = null;
+                       this.getItems().forEach( function ( groupWidget ) {
+                               groupWidget.getItems().forEach( function ( filterItemWidget ) {
+                                       filterItemWidget.toggleSelected( false );
+                               } );
+                       } );
+               }
+       };
+
        /**
         * Switch between showing the 'no results' message for filtering results or the result list.
         *
index b4fe934..0f8ae45 100644 (file)
@@ -88,8 +88,8 @@ figure[typeof*='mw:Image'] {
                display: table-caption;
                caption-side: bottom;
                /* In mw-core the font-size is duplicated, 94% in thumbiner
-                  and again 94% in thumbcaption. 88% for font size of the
-                  caption results in the same behavior. */
+                * and again 94% in thumbcaption. 88% for font size of the
+                * caption results in the same behavior. */
                font-size: 88%;
                line-height: 1.4em;
                text-align: left;
index c989c83..0a2684e 100644 (file)
 
                Util.fetchModuleInfo( this.apiModule )
                        .done( function ( pi ) {
-                               var prefix, i, j, dl, widget, $widgetLabel, widgetField, helpField, tmp, flag, count,
+                               var prefix, i, j, descriptionContainer, widget, $widgetLabel, widgetField, helpField, tmp, flag, count,
                                        items = [],
                                        deprecatedItems = [],
                                        buttons = [],
                                                        that.tokenWidget = widget;
                                                }
 
-                                               dl = $( '<dl>' );
-                                               dl.append( $( '<dd>', {
+                                               descriptionContainer = $( '<div>' );
+                                               descriptionContainer.append( $( '<div>', {
                                                        addClass: 'description',
                                                        append: Util.parseHTML( pi.parameters[ i ].description )
                                                } ) );
                                                if ( pi.parameters[ i ].info && pi.parameters[ i ].info.length ) {
                                                        for ( j = 0; j < pi.parameters[ i ].info.length; j++ ) {
-                                                               dl.append( $( '<dd>', {
+                                                               descriptionContainer.append( $( '<div>', {
                                                                        addClass: 'info',
                                                                        append: Util.parseHTML( pi.parameters[ i ].info[ j ] )
                                                                } ) );
 
                                                        case 'limit':
                                                                if ( pi.parameters[ i ].highmax !== undefined ) {
-                                                                       dl.append( $( '<dd>', {
+                                                                       descriptionContainer.append( $( '<div>', {
                                                                                addClass: 'info',
                                                                                append: [
                                                                                        Util.parseMsg(
                                                                                ]
                                                                        } ) );
                                                                } else {
-                                                                       dl.append( $( '<dd>', {
+                                                                       descriptionContainer.append( $( '<div>', {
                                                                                addClass: 'info',
                                                                                append: [
                                                                                        Util.parseMsg( 'api-help-param-limit', pi.parameters[ i ].max ),
                                                                        tmp += 'max';
                                                                }
                                                                if ( tmp !== '' ) {
-                                                                       dl.append( $( '<dd>', {
+                                                                       descriptionContainer.append( $( '<div>', {
                                                                                addClass: 'info',
                                                                                append: Util.parseMsg(
                                                                                        'api-help-param-integer-' + tmp,
                                                                );
                                                        }
                                                        if ( tmp.length ) {
-                                                               dl.append( $( '<dd>', {
+                                                               descriptionContainer.append( $( '<div>', {
                                                                        addClass: 'info',
                                                                        append: Util.parseHTML( tmp.join( ' ' ) )
                                                                } ) );
                                                        } ), {
                                                                align: 'inline',
                                                                classes: [ 'mw-apisandbox-help-field' ],
-                                                               label: dl
+                                                               label: descriptionContainer
                                                        }
                                                );
 
index 163e85d..0fa6610 100644 (file)
@@ -3,7 +3,7 @@
  */
 ( function ( mw, $ ) {
        $( function () {
-               var $preftoc, $preferences, $fieldsets, labelFunc,
+               var $preftoc, $preferences, $fieldsets, labelFunc, previousTab,
                        $tzSelect, $tzTextbox, $localtimeHolder, servertime, allowCloseWindow,
                        convertmessagebox = require( 'mediawiki.notification.convertmessagebox' );
 
                        updateTimezoneSelection();
                }
 
-               // Preserve the tab after saving the preferences
-               // Not using cookies, because their deletion results are inconsistent.
-               // Not using jStorage due to its enormous size (for this feature)
-               if ( window.sessionStorage ) {
-                       if ( sessionStorage.getItem( 'mediawikiPreferencesTab' ) !== null ) {
-                               switchPrefTab( sessionStorage.getItem( 'mediawikiPreferencesTab' ), 'noHash' );
-                       }
+               // Restore the active tab after saving the preferences
+               previousTab = mw.storage.session.get( 'mwpreferences-prevTab' );
+               if ( previousTab ) {
+                       switchPrefTab( previousTab, 'noHash' );
                        // Deleting the key, the tab states should be reset until we press Save
-                       sessionStorage.removeItem( 'mediawikiPreferencesTab' );
-
-                       $( '#mw-prefs-form' ).submit( function () {
-                               var storageData = $( $preftoc ).find( 'li.selected a' ).attr( 'id' ).replace( 'preftab-', '' );
-                               sessionStorage.setItem( 'mediawikiPreferencesTab', storageData );
-                       } );
+                       mw.storage.session.remove( previousTab );
                }
 
+               $( '#mw-prefs-form' ).on( 'submit', function () {
+                       var value = $( $preftoc ).find( 'li.selected a' ).attr( 'id' ).replace( 'preftab-', '' );
+                       mw.storage.session.set( 'mwpreferences-prevTab', value );
+               } );
+
                // Check if all of the form values are unchanged
                function isPrefsChanged() {
                        var inputs = $( '#mw-prefs-form :input[name]' ),
index d414232..6a6aa15 100644 (file)
         *  immediate execution after this amount of time (in milliseconds) if it didn't run
         *  by that time.
         */
-       mw.requestIdleCallback = mw.requestIdleCallbackInternal;
-       /*
-       // XXX: Polyfill disabled due to https://bugs.chromium.org/p/chromium/issues/detail?id=647870
-       mw.requestIdleCallback = window.requestIdleCallback
+       mw.requestIdleCallback = window.requestIdleCallback ?
                // Bind because it throws TypeError if context is not window
-               ? window.requestIdleCallback.bind( window )
-               : mw.requestIdleCallbackInternal;
-       */
+               window.requestIdleCallback.bind( window ) :
+               mw.requestIdleCallbackInternal;
+       // Note: Polyfill was previously disabled due to
+       // https://bugs.chromium.org/p/chromium/issues/detail?id=647870
+       // See also <http://codepen.io/Krinkle/full/XNGEvv>
 }( mediaWiki ) );
index 2e09392..95c77f8 100644 (file)
        };
 
        /**
-         * Set a value in device storage.
-         *
-         * @param {string} key Key name to store under
-         * @param {string} value Value to be stored
-         * @return {boolean} Whether the save succeeded or not
-         */
+        * Set a value in device storage.
+        *
+        * @param {string} key Key name to store under
+        * @param {string} value Value to be stored
+        * @return {boolean} Whether the save succeeded or not
+        */
        SafeStorage.prototype.set = function ( key, value ) {
                try {
                        this.store.setItem( key, value );
        };
 
        /**
-         * Remove a value from device storage.
-         *
-         * @param {string} key Key of item to remove
-         * @return {boolean} Whether the save succeeded or not
-         */
+        * Remove a value from device storage.
+        *
+        * @param {string} key Key of item to remove
+        * @return {boolean} Whether the save succeeded or not
+        */
        SafeStorage.prototype.remove = function ( key ) {
                try {
                        this.store.removeItem( key );
index 3cb8e9d..6e9ff0e 100644 (file)
@@ -89,7 +89,7 @@
 
        /**
         * @property {jQuery} $container If the gallery contained in an element that is
-        *      not the main content element, then it stores that element.
+        *   not the main content element, then it stores that element.
         */
 
        /**
 
        /**
         * @property {number} imageHeight Height of the image based on viewport size
-        *      the URLs in the required size.
+        *   the URLs in the required size.
         */
 
        /* Setup */
index 14a2d76..c13279e 100644 (file)
@@ -40,7 +40,7 @@ end
 
 Then(/^feedback should be (.+)$/) do |feedback|
   on(LoginPage) do |page|
-    page.feedback_element.when_present.click
+    page.feedback_element.click
     expect(page.feedback).to match Regexp.escape(feedback)
   end
 end
@@ -58,7 +58,7 @@ Then(/^Password element should be there$/) do
 end
 
 Then(/^there should be a link to (.+)$/) do |text|
-  expect(on(LoginPage).username_displayed_element.when_present.text).to eq text
+  expect(on(LoginPage).username_displayed_element.text).to eq text
 end
 
 Then(/^Username element should be there$/) do
index 8ffdaf1..b58f7a4 100644 (file)
@@ -1,5 +1,5 @@
 When(/^I click Appearance$/) do
-  visit(PreferencesPage).appearance_link_element.when_present.click
+  visit(PreferencesPage).appearance_link_element.click
 end
 
 When(/^I navigate to Preferences$/) do
index f691ffd..96dc491 100644 (file)
@@ -1,43 +1,43 @@
 When(/^I click Editing$/) do
-  visit(PreferencesPage).editing_link_element.when_present.click
+  visit(PreferencesPage).editing_link_element.click
 end
 
 Then(/^I can select edit area font style$/) do
-  expect(on(PreferencesEditingPage).edit_area_font_style_select_element.when_present).to exist
+  expect(on(PreferencesEditingPage).edit_area_font_style_select_element).to exist
 end
 
 Then(/^I can select live preview$/) do
-  expect(on(PreferencesEditingPage).live_preview_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).live_preview_check_element).to exist
 end
 
 Then(/^I can select section editing by double clicking$/) do
-  expect(on(PreferencesEditingPage).edit_section_double_click_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).edit_section_double_click_check_element).to exist
 end
 
 Then(/^I can select section editing by right clicking$/) do
-  expect(on(PreferencesEditingPage).edit_section_right_click_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).edit_section_right_click_check_element).to exist
 end
 
 Then(/^I can select section editing via edit links$/) do
-  expect(on(PreferencesEditingPage).edit_section_edit_link_element.when_present).to exist
+  expect(on(PreferencesEditingPage).edit_section_edit_link_element).to exist
 end
 
 Then(/^I can select show edit toolbar$/) do
-  expect(on(PreferencesEditingPage).show_edit_toolbar_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).show_edit_toolbar_check_element).to exist
 end
 
 Then(/^I can select show preview before edit box$/) do
-  expect(on(PreferencesEditingPage).preview_on_top_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).preview_on_top_check_element).to exist
 end
 
 Then(/^I can select show preview on first edit$/) do
-  expect(on(PreferencesEditingPage).preview_on_first_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).preview_on_first_check_element).to exist
 end
 
 Then(/^I can select to prompt me when entering a blank edit summary$/) do
-  expect(on(PreferencesEditingPage).forced_edit_summary_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).forced_edit_summary_check_element).to exist
 end
 
 Then(/^I can select to warn me when I leave an edit page with unsaved changes$/) do
-  expect(on(PreferencesEditingPage).unsaved_changes_check_element.when_present).to exist
+  expect(on(PreferencesEditingPage).unsaved_changes_check_element).to exist
 end
index 5660d49..6d28ce5 100644 (file)
@@ -1,5 +1,5 @@
 When(/^I click User profile$/) do
-  visit(PreferencesPage).user_profile_link_element.when_present.click
+  visit(PreferencesPage).user_profile_link_element.click
 end
 
 Then(/^I can change my gender$/) do
index c119b38..32fc2bb 100644 (file)
@@ -3,28 +3,7 @@ require 'page-object'
 class LoginPage
   include PageObject
 
-  page_url 'Special:UserLogin'
-
   element(:error_message, css: 'div#userloginForm div.error')
-  div(:feedback, class: 'errorbox')
-  button(:login, id: 'wpLoginAttempt')
-  li(:logout, id: 'pt-logout')
-  text_field(:password, id: 'wpPassword1')
   element(:password_error, css: 'input#wpPassword1:required:invalid')
-  a(:password_strength, text: 'password strength')
-  a(:phishing, text: 'phishing')
-  text_field(:username, id: 'wpName1')
-  a(:username_displayed, title: /Your user page/)
   element(:username_error, css: 'input#wpName1:required:invalid')
-
-  def logged_in_as_element
-    @browser.div(id: 'mw-content-text').p.b
-  end
-
-  def login_with(username, password, wait_for_logout_element = true)
-    username_element.when_present.send_keys(username)
-    password_element.when_present.send_keys(password)
-    login_element.when_present.click
-    logout_element.when_present(10) if wait_for_logout_element
-  end
 end
index 074fab0..106ab68 100644 (file)
@@ -86,9 +86,12 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
 }
 
 if ( $maintenance->getDbType() === Maintenance::DB_NONE ) {
-       if ( $wgLocalisationCacheConf['storeClass'] === false
-                && ( $wgLocalisationCacheConf['store'] == 'db'
-                         || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory ) )
+       if (
+               $wgLocalisationCacheConf['storeClass'] === false
+               && (
+                       $wgLocalisationCacheConf['store'] == 'db'
+                       || ( $wgLocalisationCacheConf['store'] == 'detect' && !$wgCacheDirectory )
+               )
        ) {
                $wgLocalisationCacheConf['storeClass'] = 'LCStoreNull';
        }
index 092d57b..5977652 100644 (file)
@@ -161,7 +161,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        public function testExists() {
                // Remove the following lines when you implement this test.
                $this->markTestIncomplete(
-                 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
                );
        }
        */
@@ -223,7 +223,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        public function testGetCanonicalNamespaces() {
                // Remove the following lines when you implement this test.
                $this->markTestIncomplete(
-                 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
                );
        }
        */
@@ -234,7 +234,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
                public function testGetCanonicalName() {
                        // Remove the following lines when you implement this test.
                        $this->markTestIncomplete(
-                         'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+                               'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
                        );
                }
        */
@@ -245,7 +245,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        public function testGetCanonicalIndex() {
                // Remove the following lines when you implement this test.
                $this->markTestIncomplete(
-                 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
                );
        }
        */
@@ -257,7 +257,7 @@ class MWNamespaceTest extends MediaWikiTestCase {
        public function testGetValidNamespaces() {
                // Remove the following lines when you implement this test.
                $this->markTestIncomplete(
-                 'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
+                       'This test has not been implemented yet. Rely on $wgCanonicalNamespaces.'
                );
        }
        */
index 2694b85..424218e 100644 (file)
@@ -315,14 +315,14 @@ class MessageTest extends MediaWikiLangTestCase {
                return [
                        [ '<span>foo</span>', 'parse', '<span>foo</span>', '<span>foo</span>' ],
                        [ '<span>foo</span>', 'escaped', '&lt;span&gt;foo&lt;/span&gt;',
-                         '<span>foo</span>' ],
+                               '<span>foo</span>' ],
                        [ '<span>foo</span>', 'plain', '<span>foo</span>', '<span>foo</span>' ],
                        [ '<script>alert(1)</script>', 'parse', '&lt;script&gt;alert(1)&lt;/script&gt;',
                                '&lt;script&gt;alert(1)&lt;/script&gt;' ],
                        [ '<script>alert(1)</script>', 'escaped', '&lt;script&gt;alert(1)&lt;/script&gt;',
                                '&lt;script&gt;alert(1)&lt;/script&gt;' ],
                        [ '<script>alert(1)</script>', 'plain', '<script>alert(1)</script>',
-                         '&lt;script&gt;alert(1)&lt;/script&gt;' ],
+                               '&lt;script&gt;alert(1)&lt;/script&gt;' ],
                ];
        }
 
index ae66253..a3d1dda 100644 (file)
@@ -434,8 +434,13 @@ class ContentHandlerTest extends MediaWikiTestCase {
                $page = new WikiPage( $title );
 
                $this->setTemporaryHook( 'SearchDataForIndex',
-                       function ( &$fields, ContentHandler $handler, WikiPage $page, ParserOutput $output,
-                                          SearchEngine $engine ) {
+                       function (
+                               &$fields,
+                               ContentHandler $handler,
+                               WikiPage $page,
+                               ParserOutput $output,
+                               SearchEngine $engine
+                       ) {
                                $fields['testDataField'] = 'test content';
                        } );
 
index 4b857ce..8b285cb 100644 (file)
@@ -157,12 +157,12 @@ class LBFactoryTest extends MediaWikiTestCase {
                                ],
                        ],
                        'serverTemplate' => [
-                               'dbname'          => $wgDBname,
-                               'user'            => $wgDBuser,
-                               'password'        => $wgDBpassword,
-                               'type'            => $wgDBtype,
+                               'dbname'      => $wgDBname,
+                               'user'        => $wgDBuser,
+                               'password'    => $wgDBpassword,
+                               'type'        => $wgDBtype,
                                'dbDirectory' => $wgSQLiteDataDir,
-                               'flags'           => DBO_DEFAULT
+                               'flags'       => DBO_DEFAULT
                        ],
                        'hostsByName' => [
                                'test-db1'  => $wgDBserver,
index a598d13..036baa8 100644 (file)
@@ -483,7 +483,7 @@ class HttpTest extends MediaWikiTestCase {
         * Added this test based on an issue experienced with HHVM 3.3.0-dev
         * where it did not define a cURL constant.
         *
-        * @T72570
+        * T72570
         * @dataProvider provideCurlConstants
         */
        public function testCurlConstants( $value ) {
index ebeb109..f722fe1 100644 (file)
@@ -27,7 +27,7 @@ class RESTBagOStuffTest extends MediaWikiTestCase {
                $this->client->expects( $this->once() )->method( 'run' )->with( [
                        'method' => 'GET',
                        'url' => 'http://test/rest/42xyz42'
-                   // list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
+                       // list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
                ] )->willReturn( [ 200, 'OK', [], 's:8:"somedata";', 0 ] );
                $result = $this->bag->get( '42xyz42' );
                $this->assertEquals( 'somedata', $result );
@@ -69,7 +69,7 @@ class RESTBagOStuffTest extends MediaWikiTestCase {
                $this->client->expects( $this->once() )->method( 'run' )->with( [
                        'method' => 'PUT',
                        'url' => 'http://test/rest/42xyz42',
-                   'body' => 's:8:"postdata";'
+                       'body' => 's:8:"postdata";'
                        // list( $rcode, $rdesc, $rhdrs, $rbody, $rerr )
                ] )->willReturn( [ 200, 'OK', [], 'Done', 0 ] );
                $result = $this->bag->set( '42xyz42', 'postdata' );
index 5e00384..ae58d1c 100644 (file)
@@ -2,8 +2,8 @@
 
 /**
  * @group Database
+ * @covers Parser
  */
-
 class ParserMethodsTest extends MediaWikiLangTestCase {
 
        public static function providePreSaveTransform() {
@@ -19,7 +19,6 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider providePreSaveTransform
-        * @covers Parser::preSaveTransform
         */
        public function testPreSaveTransform( $text, $expected ) {
                global $wgParser;
@@ -63,7 +62,6 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider provideStripOuterParagraph
-        * @covers Parser::stripOuterParagraph
         */
        public function testStripOuterParagraph( $text, $expected ) {
                $this->assertEquals( $expected, Parser::stripOuterParagraph( $text ) );
@@ -73,7 +71,6 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
         * @expectedException MWException
         * @expectedExceptionMessage Parser state cleared while parsing.
         *  Did you call Parser::parse recursively?
-        * @covers Parser::lock
         */
        public function testRecursiveParse() {
                global $wgParser;
@@ -90,9 +87,6 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
                return 'bar';
        }
 
-       /**
-        * @covers Parser::callParserFunction
-        */
        public function testCallParserFunction() {
                global $wgParser;
 
@@ -111,7 +105,7 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
        }
 
        /**
-        * @covers Parser::parse
+        * @covers Parser
         * @covers ParserOutput::getSections
         */
        public function testGetSections() {
@@ -155,8 +149,6 @@ class ParserMethodsTest extends MediaWikiLangTestCase {
 
        /**
         * @dataProvider provideNormalizeLinkUrl
-        * @covers Parser::normalizeLinkUrl
-        * @covers Parser::normalizeUrlComponent
         */
        public function testNormalizeLinkUrl( $explanation, $url, $expected ) {
                $this->assertEquals( $expected, Parser::normalizeLinkUrl( $url ), $explanation );
index 414ab8f..7707395 100644 (file)
@@ -2,6 +2,30 @@
 /**
  * Basic tests for Parser::getPreloadText
  * @author Antoine Musso
+ *
+ * @covers Parser
+ * @covers StripState
+ *
+ * @covers Preprocessor_DOM
+ * @covers PPDStack
+ * @covers PPDStackElement
+ * @covers PPDPart
+ * @covers PPFrame_DOM
+ * @covers PPTemplateFrame_DOM
+ * @covers PPCustomFrame_DOM
+ * @covers PPNode_DOM
+ *
+ * @covers Preprocessor_Hash
+ * @covers PPDStack_Hash
+ * @covers PPDStackElement_Hash
+ * @covers PPDPart_Hash
+ * @covers PPFrame_Hash
+ * @covers PPTemplateFrame_Hash
+ * @covers PPCustomFrame_Hash
+ * @covers PPNode_Hash_Tree
+ * @covers PPNode_Hash_Text
+ * @covers PPNode_Hash_Array
+ * @covers PPNode_Hash_Attr
  */
 class ParserPreloadTest extends MediaWikiTestCase {
        /**
@@ -37,16 +61,10 @@ class ParserPreloadTest extends MediaWikiTestCase {
                unset( $this->title );
        }
 
-       /**
-        * @covers Parser::getPreloadText
-        */
        public function testPreloadSimpleText() {
                $this->assertPreloaded( 'simple', 'simple' );
        }
 
-       /**
-        * @covers Parser::getPreloadText
-        */
        public function testPreloadedPreIsUnstripped() {
                $this->assertPreloaded(
                        '<pre>monospaced</pre>',
@@ -55,9 +73,6 @@ class ParserPreloadTest extends MediaWikiTestCase {
                );
        }
 
-       /**
-        * @covers Parser::getPreloadText
-        */
        public function testPreloadedNowikiIsUnstripped() {
                $this->assertPreloaded(
                        '<nowiki>[[Dummy title]]</nowiki>',
index 2a4a4ec..12936ee 100644 (file)
@@ -3,6 +3,30 @@
 /**
  * @group Database
  * @group Parser
+ *
+ * @covers Parser
+ * @covers StripState
+ *
+ * @covers Preprocessor_DOM
+ * @covers PPDStack
+ * @covers PPDStackElement
+ * @covers PPDPart
+ * @covers PPFrame_DOM
+ * @covers PPTemplateFrame_DOM
+ * @covers PPCustomFrame_DOM
+ * @covers PPNode_DOM
+ *
+ * @covers Preprocessor_Hash
+ * @covers PPDStack_Hash
+ * @covers PPDStackElement_Hash
+ * @covers PPDPart_Hash
+ * @covers PPFrame_Hash
+ * @covers PPTemplateFrame_Hash
+ * @covers PPCustomFrame_Hash
+ * @covers PPNode_Hash_Tree
+ * @covers PPNode_Hash_Text
+ * @covers PPNode_Hash_Array
+ * @covers PPNode_Hash_Attr
  */
 class TagHookTest extends MediaWikiTestCase {
        public static function provideValidNames() {
@@ -21,7 +45,6 @@ class TagHookTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideValidNames
-        * @covers Parser::setHook
         */
        public function testTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
@@ -41,7 +64,6 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBadNames
         * @expectedException MWException
-        * @covers Parser::setHook
         */
        public function testBadTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
@@ -58,7 +80,6 @@ class TagHookTest extends MediaWikiTestCase {
 
        /**
         * @dataProvider provideValidNames
-        * @covers Parser::setFunctionTagHook
         */
        public function testFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
@@ -78,7 +99,6 @@ class TagHookTest extends MediaWikiTestCase {
        /**
         * @dataProvider provideBadNames
         * @expectedException MWException
-        * @covers Parser::setFunctionTagHook
         */
        public function testBadFunctionTagHooks( $tag ) {
                global $wgParserConf, $wgContLang;
index ec046a7..9c10e49 100644 (file)
@@ -10,7 +10,7 @@ class SearchIndexFieldTest extends MediaWikiTestCase {
                return [
                        [ 0, 'test', 0, 'test', true ],
                        [ SearchIndexField::INDEX_TYPE_NESTED, 'test',
-                         SearchIndexField::INDEX_TYPE_NESTED, 'test', false ],
+                               SearchIndexField::INDEX_TYPE_NESTED, 'test', false ],
                        [ 0, 'test', 0, 'test2', true ],
                        [ 0, 'test', 1, 'test', false ],
                ];
index d93181c..8a4f662 100644 (file)
@@ -13,7 +13,12 @@ class BalancerTest extends MediaWikiTestCase {
        }
 
        /**
-        * @covers MediaWiki\Tidy\Balancer::balance
+        * @covers MediaWiki\Tidy\Balancer
+        * @covers MediaWiki\Tidy\BalanceSets
+        * @covers MediaWiki\Tidy\BalanceElement
+        * @covers MediaWiki\Tidy\BalanceStack
+        * @covers MediaWiki\Tidy\BalanceMarker
+        * @covers MediaWiki\Tidy\BalanceActiveFormattingElements
         * @dataProvider provideBalancerTests
         */
        public function testBalancer( $description, $input, $expected, $useTidy ) {
index 60d4e99..8b54b72 100644 (file)
@@ -45,7 +45,7 @@ class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
                                $last_timestamp_bin,
                                $timestamp_bin,
                                "timestamp ($timestamp_bin) of current ID ($id_bin) >= timestamp ($last_timestamp_bin) " .
-                                 "of prior one ($lastId_bin)" );
+                                       "of prior one ($lastId_bin)" );
 
                        $hostbits_bin = substr( $id_bin, -$hostbits );
                        $last_hostbits_bin = substr( $lastId_bin, -$hostbits );
@@ -55,7 +55,7 @@ class UIDGeneratorTest extends PHPUnit_Framework_TestCase {
                                        $hostbits_bin,
                                        $last_hostbits_bin,
                                        "Host ID ($hostbits_bin) of current ID ($id_bin) is same as host ID ($last_hostbits_bin) " .
-                                         "of prior one ($lastId_bin)." );
+                                               "of prior one ($lastId_bin)." );
                        }
 
                        $lastId = $id;
index 11a25c4..7babcac 100644 (file)
@@ -35,8 +35,7 @@
                        <directory>structure</directory>
                        <file>suites/LessTestSuite.php</file>
                </testsuite>
-               <!-- As there is a class Maintenance, we cannot use the
-                    name "maintenance" directly -->
+               <!-- As there is a class Maintenance, we cannot use the name "maintenance" directly -->
                <testsuite name="maintenance_suite">
                        <directory>maintenance</directory>
                </testsuite>
index 1278ecb..94d25ee 100644 (file)
@@ -94,6 +94,7 @@ return [
                        'tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js',
                        'tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js',
                        'tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js',
+                       'tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js',
                        'tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js',
                        'tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js',
                        'tests/qunit/suites/resources/mediawiki/mediawiki.cookie.test.js',
diff --git a/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js b/tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js
new file mode 100644 (file)
index 0000000..25ea988
--- /dev/null
@@ -0,0 +1,179 @@
+( function ( mw ) {
+       QUnit.module( 'mediawiki.rcfilters - FilterItem' );
+
+       QUnit.test( 'Initializing filter item', function ( assert ) {
+               var item,
+                       group1 = new mw.rcfilters.dm.FilterGroup( 'group1' );
+
+               item = new mw.rcfilters.dm.FilterItem( 'filter1', group1 );
+               assert.equal(
+                       item.getName(),
+                       'filter1',
+                       'Filter name is retained.'
+               );
+               assert.equal(
+                       item.getGroupName(),
+                       'group1',
+                       'Group name is retained.'
+               );
+
+               item = new mw.rcfilters.dm.FilterItem(
+                       'filter1',
+                       group1,
+                       {
+                               label: 'test label',
+                               description: 'test description'
+                       }
+               );
+               assert.equal(
+                       item.getLabel(),
+                       'test label',
+                       'Label information is retained.'
+               );
+               assert.equal(
+                       item.getLabel(),
+                       'test label',
+                       'Description information is retained.'
+               );
+
+               item = new mw.rcfilters.dm.FilterItem(
+                       'filter1',
+                       group1,
+                       {
+                               selected: true
+                       }
+               );
+               assert.equal(
+                       item.isSelected(),
+                       true,
+                       'Item can be selected in the config.'
+               );
+               item.toggleSelected( true );
+               assert.equal(
+                       item.isSelected(),
+                       true,
+                       'Item can toggle its selected state.'
+               );
+
+               // Subsets
+               item = new mw.rcfilters.dm.FilterItem(
+                       'filter1',
+                       group1,
+                       {
+                               subset: [ 'sub1', 'sub2', 'sub3' ]
+                       }
+               );
+               assert.deepEqual(
+                       item.getSubset(),
+                       [ 'sub1', 'sub2', 'sub3' ],
+                       'Subset information is retained.'
+               );
+               assert.equal(
+                       item.existsInSubset( 'sub1' ),
+                       true,
+                       'Specific item exists in subset.'
+               );
+               assert.equal(
+                       item.existsInSubset( 'sub10' ),
+                       false,
+                       'Specific item does not exists in subset.'
+               );
+               assert.equal(
+                       item.isIncluded(),
+                       false,
+                       'Initial state of "included" is false.'
+               );
+
+               item.toggleIncluded( true );
+               assert.equal(
+                       item.isIncluded(),
+                       true,
+                       'Item toggles its included state.'
+               );
+
+               // Conflicts
+               item = new mw.rcfilters.dm.FilterItem(
+                       'filter1',
+                       group1,
+                       {
+                               conflicts: [ 'conflict1', 'conflict2', 'conflict3' ]
+                       }
+               );
+               assert.deepEqual(
+                       item.getConflicts(),
+                       [ 'conflict1', 'conflict2', 'conflict3' ],
+                       'Conflict information is retained.'
+               );
+               assert.equal(
+                       // TODO: Consider allowing for either a FilterItem or a filter name
+                       // in this method, so it is consistent with the subset one
+                       item.existsInConflicts( new mw.rcfilters.dm.FilterItem( 'conflict1', group1 ) ),
+                       true,
+                       'Specific item exists in conflicts.'
+               );
+               assert.equal(
+                       item.existsInConflicts( new mw.rcfilters.dm.FilterItem( 'conflict10', group1 ) ),
+                       false,
+                       'Specific item does not exists in conflicts.'
+               );
+               assert.equal(
+                       item.isConflicted(),
+                       false,
+                       'Initial state of "conflicted" is false.'
+               );
+
+               item.toggleConflicted( true );
+               assert.equal(
+                       item.isConflicted(),
+                       true,
+                       'Item toggles its conflicted state.'
+               );
+
+               // Fully covered
+               item = new mw.rcfilters.dm.FilterItem( 'filter1', group1 );
+               assert.equal(
+                       item.isFullyCovered(),
+                       false,
+                       'Initial state of "full coverage" is false.'
+               );
+               item.toggleFullyCovered( true );
+               assert.equal(
+                       item.isFullyCovered(),
+                       true,
+                       'Item toggles its fully coverage state.'
+               );
+
+       } );
+
+       QUnit.test( 'Emitting events', function ( assert ) {
+               var group1 = new mw.rcfilters.dm.FilterGroup( 'group1' ),
+                       item = new mw.rcfilters.dm.FilterItem( 'filter1', group1 ),
+                       events = [];
+
+               // Listen to update events
+               item.on( 'update', function () {
+                       events.push( item.getState() );
+               } );
+
+               // Do stuff
+               item.toggleSelected( true ); // { selected: true, included: false, conflicted: false, fullyCovered: false }
+               item.toggleSelected( true ); // No event (duplicate state)
+               item.toggleIncluded( true ); // { selected: true, included: true, conflicted: false, fullyCovered: false }
+               item.toggleConflicted( true ); // { selected: true, included: true, conflicted: true, fullyCovered: false }
+               item.toggleFullyCovered( true ); // { selected: true, included: true, conflicted: true, fullyCovered: true }
+               item.toggleSelected(); // { selected: false, included: true, conflicted: true, fullyCovered: true }
+
+               // Check emitted events
+               assert.deepEqual(
+                       events,
+                       [
+                               { selected: true, included: false, conflicted: false, fullyCovered: false },
+                               { selected: true, included: true, conflicted: false, fullyCovered: false },
+                               { selected: true, included: true, conflicted: true, fullyCovered: false },
+                               { selected: true, included: true, conflicted: true, fullyCovered: true },
+                               { selected: false, included: true, conflicted: true, fullyCovered: true }
+                       ],
+                       'Events emitted successfully.'
+               );
+       } );
+}( mediaWiki ) );
index c38b89c..de201b9 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -272,7 +272,7 @@ function wfStreamThumb( array $params ) {
        // For 404 handled thumbnails, we only use the base name of the URI
        // for the thumb params and the parent directory for the source file name.
        // Check that the zone relative path matches up so squid caches won't pick
-       // up thumbs that would not be purged on source file deletion (bug 34231).
+       // up thumbs that would not be purged on source file deletion (T36231).
        if ( $rel404 !== null ) { // thumbnail was handled via 404
                if ( rawurldecode( $rel404 ) === $img->getThumbRel( $thumbName ) ) {
                        // Request for the canonical thumbnail name