Merge "resourceloader: Add minified version of mw.loader.implement() wrapper"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 31 Jan 2018 13:40:37 +0000 (13:40 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 31 Jan 2018 13:40:37 +0000 (13:40 +0000)
136 files changed:
.mailmap
CREDITS
includes/DefaultSettings.php
includes/EditPage.php
includes/HistoryBlob.php
includes/Preferences.php
includes/Setup.php
includes/WebRequest.php
includes/api/ApiMain.php
includes/api/ApiModuleManager.php
includes/api/ApiPageSet.php
includes/api/ApiQuery.php
includes/api/ApiQueryInfo.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySiteinfo.php
includes/api/ApiQueryUsers.php
includes/api/ApiTokens.php
includes/api/ApiUpload.php
includes/api/i18n/de.json
includes/api/i18n/en.json
includes/api/i18n/fr.json
includes/api/i18n/it.json
includes/api/i18n/pt.json
includes/cache/MessageCache.php
includes/cache/localisation/LocalisationCache.php
includes/changes/CategoryMembershipChange.php
includes/changetags/ChangeTags.php
includes/changetags/ChangeTagsList.php
includes/db/DatabaseOracle.php
includes/db/MWLBFactory.php
includes/debug/logger/LegacySpi.php
includes/debug/logger/MonologSpi.php
includes/debug/logger/NullSpi.php
includes/exception/MWException.php
includes/exception/MWExceptionHandler.php
includes/exception/MWExceptionRenderer.php
includes/filebackend/FileBackendGroup.php
includes/filebackend/lockmanager/LockManagerGroup.php
includes/filerepo/FileRepo.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/ForeignDBRepo.php
includes/filerepo/ForeignDBViaLBRepo.php
includes/filerepo/LocalRepo.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/LocalFile.php
includes/gallery/ImageGalleryBase.php
includes/htmlform/HTMLForm.php
includes/htmlform/fields/HTMLMultiSelectField.php
includes/htmlform/fields/HTMLRadioField.php
includes/import/WikiImporter.php
includes/installer/DatabaseUpdater.php
includes/installer/Installer.php
includes/installer/InstallerOverrides.php
includes/installer/MysqlUpdater.php
includes/installer/SqliteInstaller.php
includes/installer/i18n/pt.json
includes/libs/filebackend/FileBackend.php
includes/libs/filebackend/FileBackendStore.php
includes/libs/lockmanager/MemcLockManager.php
includes/libs/objectcache/WANObjectCache.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/DatabaseMysqlBase.php
includes/libs/rdbms/database/DatabaseMysqli.php
includes/libs/rdbms/database/DatabasePostgres.php
includes/libs/rdbms/database/DatabaseSqlite.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/resultwrapper/MssqlResultWrapper.php
includes/libs/rdbms/loadbalancer/LoadBalancerSingle.php
includes/page/CategoryPage.php
includes/parser/Parser.php
includes/parser/ParserOptions.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Sanitizer.php
includes/password/PasswordFactory.php
includes/preferences/DefaultPreferencesFactory.php
includes/preferences/PreferencesFactory.php
includes/profiler/Profiler.php
includes/profiler/ProfilerSectionOnly.php
includes/profiler/ProfilerXhprof.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderUserOptionsModule.php
includes/resourceloader/ResourceLoaderUserTokensModule.php
includes/revisiondelete/RevisionDeleter.php
includes/search/SearchEngineFactory.php
includes/site/SiteList.php
includes/skins/SkinApi.php
includes/skins/SkinFallback.php
includes/skins/SkinTemplate.php
includes/specialpage/AuthManagerSpecialPage.php
includes/specialpage/QueryPage.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialBotPasswords.php
includes/specials/SpecialDiff.php
includes/specials/SpecialEditWatchlist.php
includes/specials/SpecialExpandTemplates.php
includes/specials/SpecialExport.php
includes/specials/SpecialProtectedpages.php
includes/specials/SpecialTags.php
includes/specials/SpecialUserrights.php
includes/specials/forms/UploadForm.php
includes/specials/pagers/UsersPager.php
includes/user/User.php
includes/watcheditem/WatchedItemStore.php
languages/i18n/ast.json
languages/i18n/be-tarask.json
languages/i18n/bg.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/en.json
languages/i18n/es.json
languages/i18n/eu.json
languages/i18n/he.json
languages/i18n/hu.json
languages/i18n/ja.json
languages/i18n/jv.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/sd.json
languages/i18n/sl.json
maintenance/cleanupTitles.php
resources/Resources.php
resources/src/jquery/jquery.textSelection.js
resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
resources/src/mediawiki.special/mediawiki.special.apisandbox.css
resources/src/mediawiki/mediawiki.feedback.js
tests/phpunit/includes/db/DatabaseTestHelper.php
tests/phpunit/includes/libs/rdbms/database/DatabaseMysqlBaseTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseSQLTest.php
tests/phpunit/includes/libs/rdbms/database/DatabaseTest.php
tests/phpunit/includes/session/SessionBackendTest.php
tests/phpunit/includes/session/SessionManagerTest.php
tests/phpunit/includes/session/TestBagOStuff.php

index c2337c8..08e1aaa 100644 (file)
--- a/.mailmap
+++ b/.mailmap
@@ -197,7 +197,7 @@ Jack Phoenix <jack@countervandalism.net> <ashley@users.mediawiki.org>
 Jackmcbarn <jackmcbarn@gmail.com>
 Jackmcbarn <jackmcbarn@gmail.com> <jackmcbarn@users.noreply.github.com>
 jagori <jagori79@gmail.com>
-James Forrester <jforrester@wikimedia.org>
+James D. Forrester <jforrester@wikimedia.org>
 Jaime Crespo <jcrespo@wikimedia.org>
 Jan Gerber <j@thing.net> <j@users.mediawiki.org>
 Jan Luca Naumann <jan@jans-seite.de>
diff --git a/CREDITS b/CREDITS
index a8ca294..95d6a6c 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -281,7 +281,7 @@ The following list can be found parsed under Special:Version/Credits -->
 * Jaime Crespo
 * Jakub Vrana
 * James Earl Douglas
-* James Forrester
+* James D. Forrester
 * Jan Berkel
 * Jan Drewniak
 * Jan Gerber
index 2b2695c..27177cb 100644 (file)
@@ -1004,15 +1004,15 @@ $wgParserTestMediaHandlers = [
  */
 $wgContentHandlers = [
        // the usual case
-       CONTENT_MODEL_WIKITEXT => 'WikitextContentHandler',
+       CONTENT_MODEL_WIKITEXT => WikitextContentHandler::class,
        // dumb version, no syntax highlighting
-       CONTENT_MODEL_JAVASCRIPT => 'JavaScriptContentHandler',
+       CONTENT_MODEL_JAVASCRIPT => JavaScriptContentHandler::class,
        // simple implementation, for use by extensions, etc.
-       CONTENT_MODEL_JSON => 'JsonContentHandler',
+       CONTENT_MODEL_JSON => JsonContentHandler::class,
        // dumb version, no syntax highlighting
-       CONTENT_MODEL_CSS => 'CssContentHandler',
+       CONTENT_MODEL_CSS => CssContentHandler::class,
        // plain text, for use by extensions, etc.
-       CONTENT_MODEL_TEXT => 'TextContentHandler',
+       CONTENT_MODEL_TEXT => TextContentHandler::class,
 ];
 
 /**
@@ -1817,7 +1817,7 @@ $wgDBtype = 'mysql';
  * Whether to use SSL in DB connection.
  *
  * This setting is only used if $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_SSL flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -1827,7 +1827,7 @@ $wgDBssl = false;
  * Whether to use compression in DB connection.
  *
  * This setting is only used $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_COMPRESS flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -1998,7 +1998,7 @@ $wgDBservers = false;
  * The LBFactoryMulti class is provided for this purpose, please see
  * includes/db/LBFactoryMulti.php for configuration information.
  */
-$wgLBFactoryConf = [ 'class' => 'LBFactorySimple' ];
+$wgLBFactoryConf = [ 'class' => \Wikimedia\Rdbms\LBFactorySimple::class ];
 
 /**
  * After a state-changing request is done by a client, this determines
@@ -2142,7 +2142,7 @@ $wgExternalStores = [];
  * ];
  * @endcode
  *
- * Used by LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
+ * Used by \Wikimedia\Rdbms\LBFactorySimple, may be ignored if $wgLBFactoryConf is set to
  * another class.
  */
 $wgExternalServers = [];
@@ -2310,34 +2310,34 @@ $wgLanguageConverterCacheType = CACHE_ANYTHING;
  * given, giving a callable function which will generate a suitable cache object.
  */
 $wgObjectCaches = [
-       CACHE_NONE => [ 'class' => 'EmptyBagOStuff', 'reportDupes' => false ],
-       CACHE_DB => [ 'class' => 'SqlBagOStuff', 'loggroup' => 'SQLBagOStuff' ],
+       CACHE_NONE => [ 'class' => EmptyBagOStuff::class, 'reportDupes' => false ],
+       CACHE_DB => [ 'class' => SqlBagOStuff::class, 'loggroup' => 'SQLBagOStuff' ],
 
        CACHE_ANYTHING => [ 'factory' => 'ObjectCache::newAnything' ],
        CACHE_ACCEL => [ 'factory' => 'ObjectCache::getLocalServerInstance' ],
-       CACHE_MEMCACHED => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
+       CACHE_MEMCACHED => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
 
        'db-replicated' => [
-               'class'       => 'ReplicatedBagOStuff',
+               'class'       => ReplicatedBagOStuff::class,
                'readFactory' => [
-                       'class' => 'SqlBagOStuff',
+                       'class' => SqlBagOStuff::class,
                        'args'  => [ [ 'slaveOnly' => true ] ]
                ],
                'writeFactory' => [
-                       'class' => 'SqlBagOStuff',
+                       'class' => SqlBagOStuff::class,
                        'args'  => [ [ 'slaveOnly' => false ] ]
                ],
                'loggroup'  => 'SQLBagOStuff',
                'reportDupes' => false
        ],
 
-       'apc' => [ 'class' => 'APCBagOStuff', 'reportDupes' => false ],
-       'apcu' => [ 'class' => 'APCUBagOStuff', 'reportDupes' => false ],
-       'xcache' => [ 'class' => 'XCacheBagOStuff', 'reportDupes' => false ],
-       'wincache' => [ 'class' => 'WinCacheBagOStuff', 'reportDupes' => false ],
-       'memcached-php' => [ 'class' => 'MemcachedPhpBagOStuff', 'loggroup' => 'memcached' ],
-       'memcached-pecl' => [ 'class' => 'MemcachedPeclBagOStuff', 'loggroup' => 'memcached' ],
-       'hash' => [ 'class' => 'HashBagOStuff', 'reportDupes' => false ],
+       'apc' => [ 'class' => APCBagOStuff::class, 'reportDupes' => false ],
+       'apcu' => [ 'class' => APCUBagOStuff::class, 'reportDupes' => false ],
+       'xcache' => [ 'class' => XCacheBagOStuff::class, 'reportDupes' => false ],
+       'wincache' => [ 'class' => WinCacheBagOStuff::class, 'reportDupes' => false ],
+       'memcached-php' => [ 'class' => MemcachedPhpBagOStuff::class, 'loggroup' => 'memcached' ],
+       'memcached-pecl' => [ 'class' => MemcachedPeclBagOStuff::class, 'loggroup' => 'memcached' ],
+       'hash' => [ 'class' => HashBagOStuff::class, 'reportDupes' => false ],
 ];
 
 /**
@@ -2374,13 +2374,13 @@ $wgMainWANCache = false;
  */
 $wgWANObjectCaches = [
        CACHE_NONE => [
-               'class'    => 'WANObjectCache',
+               'class'    => WANObjectCache::class,
                'cacheId'  => CACHE_NONE,
                'channels' => []
        ]
        /* Example of a simple single data-center cache:
        'memcached-php' => [
-               'class'    => 'WANObjectCache',
+               'class'    => WANObjectCache::class,
                'cacheId'  => 'memcached-php',
                'channels' => [ 'purge' => 'wancache-main-memcached-purge' ]
        ]
@@ -2527,7 +2527,7 @@ $wgAdaptiveMessageCache = false;
  *                  Use maintenance/rebuildLocalisationCache.php instead.
  */
 $wgLocalisationCacheConf = [
-       'class' => 'LocalisationCache',
+       'class' => LocalisationCache::class,
        'store' => 'detect',
        'storeClass' => false,
        'storeDirectory' => false,
@@ -4166,8 +4166,8 @@ $wgInvalidRedirectTargets = [ 'Filepath', 'Mypage', 'Mytalk', 'Redirect' ];
  * an extension setup function.
  */
 $wgParserConf = [
-       'class' => 'Parser',
-       # 'preprocessorClass' => 'Preprocessor_Hash',
+       'class' => Parser::class,
+       # 'preprocessorClass' => Preprocessor_Hash::class,
 ];
 
 /**
@@ -4471,7 +4471,7 @@ $wgActiveUserDays = 30;
  * @since 1.27
  */
 $wgCentralIdLookupProviders = [
-       'local' => [ 'class' => 'LocalIdLookup' ],
+       'local' => [ 'class' => LocalIdLookup::class ],
 ];
 
 /**
@@ -4759,7 +4759,7 @@ $wgPasswordDefault = 'pbkdf2';
  * An advanced example:
  * @code
  * $wgPasswordConfig['bcrypt-peppered'] = [
- *     'class' => 'EncryptedPassword',
+ *     'class' => EncryptedPassword::class,
  *     'underlying' => 'bcrypt',
  *     'secrets' => [],
  *     'cipher' => MCRYPT_RIJNDAEL_256,
@@ -4772,31 +4772,31 @@ $wgPasswordDefault = 'pbkdf2';
  */
 $wgPasswordConfig = [
        'A' => [
-               'class' => 'MWOldPassword',
+               'class' => MWOldPassword::class,
        ],
        'B' => [
-               'class' => 'MWSaltedPassword',
+               'class' => MWSaltedPassword::class,
        ],
        'pbkdf2-legacyA' => [
-               'class' => 'LayeredParameterizedPassword',
+               'class' => LayeredParameterizedPassword::class,
                'types' => [
                        'A',
                        'pbkdf2',
                ],
        ],
        'pbkdf2-legacyB' => [
-               'class' => 'LayeredParameterizedPassword',
+               'class' => LayeredParameterizedPassword::class,
                'types' => [
                        'B',
                        'pbkdf2',
                ],
        ],
        'bcrypt' => [
-               'class' => 'BcryptPassword',
+               'class' => BcryptPassword::class,
                'cost' => 9,
        ],
        'pbkdf2' => [
-               'class' => 'Pbkdf2Password',
+               'class' => Pbkdf2Password::class,
                'algo' => 'sha512',
                'cost' => '30000',
                'length' => '64',
@@ -6106,7 +6106,7 @@ $wgDebugComments = false;
  * Write SQL queries to the debug log.
  *
  * This setting is only used $wgLBFactoryConf['class'] is set to
- * 'LBFactorySimple' and $wgDBservers is an empty array; otherwise
+ * '\Wikimedia\Rdbms\LBFactorySimple' and $wgDBservers is an empty array; otherwise
  * the DBO_DEBUG flag must be set in the 'flags' option of the database
  * connection to achieve the same functionality.
  */
@@ -6211,7 +6211,7 @@ $wgDebugLogGroups = [];
  *
  * @par To completely disable logging:
  * @code
- * $wgMWLoggerDefaultSpi = [ 'class' => '\\MediaWiki\\Logger\\NullSpi' ];
+ * $wgMWLoggerDefaultSpi = [ 'class' => \MediaWiki\Logger\NullSpi::class ];
  * @endcode
  *
  * @since 1.25
@@ -6219,7 +6219,7 @@ $wgDebugLogGroups = [];
  * @see MwLogger
  */
 $wgMWLoggerDefaultSpi = [
-       'class' => '\\MediaWiki\\Logger\\LegacySpi',
+       'class' => \MediaWiki\Logger\LegacySpi::class,
 ];
 
 /**
@@ -6771,7 +6771,7 @@ $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
  *             'omit_bots' => true,
  *     ];
  * @example $wgRCFeeds['example'] = [
- *             'class' => 'ExampleRCFeed',
+ *             'class' => ExampleRCFeed::class,
  *     ];
  * @since 1.22
  */
@@ -6783,8 +6783,8 @@ $wgRCFeeds = [];
  * @since 1.22
  */
 $wgRCEngines = [
-       'redis' => 'RedisPubSubFeedEngine',
-       'udp' => 'UDPRCFeedEngine',
+       'redis' => RedisPubSubFeedEngine::class,
+       'udp' => UDPRCFeedEngine::class,
 ];
 
 /**
@@ -6908,8 +6908,8 @@ $wgOverrideSiteFeed = [];
  * $wgOut->isSyndicated() is true.
  */
 $wgFeedClasses = [
-       'rss' => 'RSSFeed',
-       'atom' => 'AtomFeed',
+       'rss' => RSSFeed::class,
+       'atom' => AtomFeed::class,
 ];
 
 /**
@@ -7436,24 +7436,24 @@ $wgServiceWiringFiles = [
  * or (since 1.30) a callback to use for creating the job object.
  */
 $wgJobClasses = [
-       'refreshLinks' => 'RefreshLinksJob',
-       'deleteLinks' => 'DeleteLinksJob',
-       'htmlCacheUpdate' => 'HTMLCacheUpdateJob',
-       'sendMail' => 'EmaillingJob',
-       'enotifNotify' => 'EnotifNotifyJob',
-       'fixDoubleRedirect' => 'DoubleRedirectJob',
-       'AssembleUploadChunks' => 'AssembleUploadChunksJob',
-       'PublishStashedFile' => 'PublishStashedFileJob',
-       'ThumbnailRender' => 'ThumbnailRenderJob',
-       'recentChangesUpdate' => 'RecentChangesUpdateJob',
-       'refreshLinksPrioritized' => 'RefreshLinksJob',
-       'refreshLinksDynamic' => 'RefreshLinksJob',
-       'activityUpdateJob' => 'ActivityUpdateJob',
-       'categoryMembershipChange' => 'CategoryMembershipChangeJob',
-       'clearUserWatchlist' => 'ClearUserWatchlistJob',
-       'cdnPurge' => 'CdnPurgeJob',
-       'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
-       'null' => 'NullJob'
+       'refreshLinks' => RefreshLinksJob::class,
+       'deleteLinks' => DeleteLinksJob::class,
+       'htmlCacheUpdate' => HTMLCacheUpdateJob::class,
+       'sendMail' => EmaillingJob::class,
+       'enotifNotify' => EnotifNotifyJob::class,
+       'fixDoubleRedirect' => DoubleRedirectJob::class,
+       'AssembleUploadChunks' => AssembleUploadChunksJob::class,
+       'PublishStashedFile' => PublishStashedFileJob::class,
+       'ThumbnailRender' => ThumbnailRenderJob::class,
+       'recentChangesUpdate' => RecentChangesUpdateJob::class,
+       'refreshLinksPrioritized' => RefreshLinksJob::class,
+       'refreshLinksDynamic' => RefreshLinksJob::class,
+       'activityUpdateJob' => ActivityUpdateJob::class,
+       'categoryMembershipChange' => CategoryMembershipChangeJob::class,
+       'clearUserWatchlist' => ClearUserWatchlistJob::class,
+       'cdnPurge' => CdnPurgeJob::class,
+       'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
+       'null' => NullJob::class,
 ];
 
 /**
@@ -7502,7 +7502,7 @@ $wgJobSerialCommitThreshold = false;
  * These settings should be global to all wikis.
  */
 $wgJobTypeConf = [
-       'default' => [ 'class' => 'JobQueueDB', 'order' => 'random', 'claimTTL' => 3600 ],
+       'default' => [ 'class' => JobQueueDB::class, 'order' => 'random', 'claimTTL' => 3600 ],
 ];
 
 /**
@@ -7510,7 +7510,7 @@ $wgJobTypeConf = [
  * These settings should be global to all wikis.
  */
 $wgJobQueueAggregator = [
-       'class' => 'JobQueueAggregatorNull'
+       'class' => JobQueueAggregatorNull::class
 ];
 
 /**
@@ -7531,7 +7531,7 @@ $wgJobQueueIncludeInMaxLagFactor = false;
  * Expensive Querypages are already updated.
  */
 $wgSpecialPageCacheUpdates = [
-       'Statistics' => [ 'SiteStatsUpdate', 'cacheUpdate' ]
+       'Statistics' => [ SiteStatsUpdate::class, 'cacheUpdate' ]
 ];
 
 /**
@@ -7721,42 +7721,42 @@ $wgLogActions = [];
  * @see LogFormatter
  */
 $wgLogActionsHandlers = [
-       'block/block' => 'BlockLogFormatter',
-       'block/reblock' => 'BlockLogFormatter',
-       'block/unblock' => 'BlockLogFormatter',
-       'contentmodel/change' => 'ContentModelLogFormatter',
-       'contentmodel/new' => 'ContentModelLogFormatter',
-       'delete/delete' => 'DeleteLogFormatter',
-       'delete/delete_redir' => 'DeleteLogFormatter',
-       'delete/event' => 'DeleteLogFormatter',
-       'delete/restore' => 'DeleteLogFormatter',
-       'delete/revision' => 'DeleteLogFormatter',
-       'import/interwiki' => 'ImportLogFormatter',
-       'import/upload' => 'ImportLogFormatter',
-       'managetags/activate' => 'LogFormatter',
-       'managetags/create' => 'LogFormatter',
-       'managetags/deactivate' => 'LogFormatter',
-       'managetags/delete' => 'LogFormatter',
-       'merge/merge' => 'MergeLogFormatter',
-       'move/move' => 'MoveLogFormatter',
-       'move/move_redir' => 'MoveLogFormatter',
-       'patrol/patrol' => 'PatrolLogFormatter',
-       'patrol/autopatrol' => 'PatrolLogFormatter',
-       'protect/modify' => 'ProtectLogFormatter',
-       'protect/move_prot' => 'ProtectLogFormatter',
-       'protect/protect' => 'ProtectLogFormatter',
-       'protect/unprotect' => 'ProtectLogFormatter',
-       'rights/autopromote' => 'RightsLogFormatter',
-       'rights/rights' => 'RightsLogFormatter',
-       'suppress/block' => 'BlockLogFormatter',
-       'suppress/delete' => 'DeleteLogFormatter',
-       'suppress/event' => 'DeleteLogFormatter',
-       'suppress/reblock' => 'BlockLogFormatter',
-       'suppress/revision' => 'DeleteLogFormatter',
-       'tag/update' => 'TagLogFormatter',
-       'upload/overwrite' => 'UploadLogFormatter',
-       'upload/revert' => 'UploadLogFormatter',
-       'upload/upload' => 'UploadLogFormatter',
+       'block/block' => BlockLogFormatter::class,
+       'block/reblock' => BlockLogFormatter::class,
+       'block/unblock' => BlockLogFormatter::class,
+       'contentmodel/change' => ContentModelLogFormatter::class,
+       'contentmodel/new' => ContentModelLogFormatter::class,
+       'delete/delete' => DeleteLogFormatter::class,
+       'delete/delete_redir' => DeleteLogFormatter::class,
+       'delete/event' => DeleteLogFormatter::class,
+       'delete/restore' => DeleteLogFormatter::class,
+       'delete/revision' => DeleteLogFormatter::class,
+       'import/interwiki' => ImportLogFormatter::class,
+       'import/upload' => ImportLogFormatter::class,
+       'managetags/activate' => LogFormatter::class,
+       'managetags/create' => LogFormatter::class,
+       'managetags/deactivate' => LogFormatter::class,
+       'managetags/delete' => LogFormatter::class,
+       'merge/merge' => MergeLogFormatter::class,
+       'move/move' => MoveLogFormatter::class,
+       'move/move_redir' => MoveLogFormatter::class,
+       'patrol/patrol' => PatrolLogFormatter::class,
+       'patrol/autopatrol' => PatrolLogFormatter::class,
+       'protect/modify' => ProtectLogFormatter::class,
+       'protect/move_prot' => ProtectLogFormatter::class,
+       'protect/protect' => ProtectLogFormatter::class,
+       'protect/unprotect' => ProtectLogFormatter::class,
+       'rights/autopromote' => RightsLogFormatter::class,
+       'rights/rights' => RightsLogFormatter::class,
+       'suppress/block' => BlockLogFormatter::class,
+       'suppress/delete' => DeleteLogFormatter::class,
+       'suppress/event' => DeleteLogFormatter::class,
+       'suppress/reblock' => BlockLogFormatter::class,
+       'suppress/revision' => DeleteLogFormatter::class,
+       'tag/update' => TagLogFormatter::class,
+       'upload/overwrite' => UploadLogFormatter::class,
+       'upload/revert' => UploadLogFormatter::class,
+       'upload/upload' => UploadLogFormatter::class,
 ];
 
 /**
@@ -7887,7 +7887,7 @@ $wgActions = [
        'credits' => true,
        'delete' => true,
        'edit' => true,
-       'editchangetags' => 'SpecialPageAction',
+       'editchangetags' => SpecialPageAction::class,
        'history' => true,
        'info' => true,
        'markpatrolled' => true,
@@ -7896,7 +7896,7 @@ $wgActions = [
        'raw' => true,
        'render' => true,
        'revert' => true,
-       'revisiondelete' => 'SpecialPageAction',
+       'revisiondelete' => SpecialPageAction::class,
        'rollback' => true,
        'submit' => true,
        'unprotect' => true,
@@ -8045,12 +8045,12 @@ $wgDebugAPI = false;
  * @code
  *  $wgAPIModules['foo'] = 'ApiFoo';
  *  $wgAPIModules['bar'] = [
- *    'class' => 'ApiBar',
+ *    'class' => ApiBar::class,
  *    'factory' => function( $main, $name ) { ... }
  *  ];
  *  $wgAPIModules['xyzzy'] = [
- *    'class' => 'ApiXyzzy',
- *    'factory' => [ 'XyzzyFactory', 'newApiModule' ]
+ *    'class' => ApiXyzzy::class,
+ *    'factory' => [ XyzzyFactory::class, 'newApiModule' ]
  *  ];
  * @endcode
  *
@@ -8473,7 +8473,7 @@ $wgRedirectOnLogin = null;
  * @par Example using local redis instance:
  * @code
  *   $wgPoolCounterConf = [ 'ArticleView' => [
- *     'class' => 'PoolCounterRedis',
+ *     'class' => PoolCounterRedis::class,
  *     'timeout' => 15, // wait timeout in seconds
  *     'workers' => 1, // maximum number of active threads in each pool
  *     'maxqueue' => 5, // maximum number of total threads in each pool
@@ -8485,7 +8485,7 @@ $wgRedirectOnLogin = null;
  * @par Example using C daemon from https://www.mediawiki.org/wiki/Extension:PoolCounter:
  * @code
  *   $wgPoolCounterConf = [ 'ArticleView' => [
- *     'class' => 'PoolCounter_Client',
+ *     'class' => PoolCounter_Client::class,
  *     'timeout' => 15, // wait timeout in seconds
  *     'workers' => 5, // maximum number of active threads in each pool
  *     'maxqueue' => 50, // maximum number of total threads in each pool
@@ -8559,7 +8559,7 @@ $wgTextModelsToParse = [
  * @since 1.20
  */
 $wgSiteTypes = [
-       'mediawiki' => 'MediaWikiSite',
+       'mediawiki' => MediaWikiSite::class,
 ];
 
 /**
@@ -8633,7 +8633,7 @@ $wgPageLanguageUseDB = false;
  * Auto-mounting example for Parsoid:
  *
  * $wgVirtualRestConfig['paths']['/parsoid/'] = [
- *     'class' => 'ParsoidVirtualRESTService',
+ *     'class' => ParsoidVirtualRESTService::class,
  *     'options' => [
  *         'url' => 'http://localhost:8000',
  *         'prefix' => 'enwiki',
@@ -8730,7 +8730,7 @@ $wgMaxJobDBWriteDuration = false;
  */
 $wgEventRelayerConfig = [
        'default' => [
-               'class' => 'EventRelayerNull',
+               'class' => EventRelayerNull::class,
        ]
 ];
 
index d49f205..6bf3c89 100644 (file)
@@ -2472,12 +2472,22 @@ ERROR;
                        $displayTitle = $contextTitle->getPrefixedText();
                }
                $out->setPageTitle( $this->context->msg( $msg, $displayTitle ) );
+
+               $config = $this->context->getConfig();
+
                # Transmit the name of the message to JavaScript for live preview
                # Keep Resources.php/mediawiki.action.edit.preview in sync with the possible keys
                $out->addJsConfigVars( [
                        'wgEditMessage' => $msg,
-                       'wgAjaxEditStash' => $this->context->getConfig()->get( 'AjaxEditStash' ),
+                       'wgAjaxEditStash' => $config->get( 'AjaxEditStash' ),
                ] );
+
+               // Add whether to use 'save' or 'publish' messages to JavaScript for post-edit, other
+               // editors, etc.
+               $out->addJsConfigVars(
+                       'wgEditSubmitButtonLabelPublish',
+                       $config->get( 'EditSubmitButtonLabelPublish' )
+               );
        }
 
        /**
index 075b48d..26a6d45 100644 (file)
@@ -707,7 +707,7 @@ if ( false ) {
        // autoload entries for the lowercase variants of these classes (T166759).
        // The code below is never executed, but it is picked up by the AutoloadGenerator
        // parser, which scans for class_alias() calls.
-       class_alias( 'ConcatenatedGzipHistoryBlob', 'concatenatedgziphistoryblob' );
-       class_alias( 'HistoryBlobCurStub', 'historyblobcurstub' );
-       class_alias( 'HistoryBlobStub', 'historyblobstub' );
+       class_alias( ConcatenatedGzipHistoryBlob::class, 'concatenatedgziphistoryblob' );
+       class_alias( HistoryBlobCurStub::class, 'historyblobcurstub' );
+       class_alias( HistoryBlobStub::class, 'historyblobstub' );
 }
index f65b2ce..26e28ba 100644 (file)
@@ -267,7 +267,7 @@ class Preferences {
        public static function getFormObject(
                $user,
                IContextSource $context,
-               $formClass = 'PreferencesForm',
+               $formClass = PreferencesForm::class,
                array $remove = []
        ) {
                $preferencesFactory = self::getDefaultPreferencesFactory();
index 3e37c9c..01f67c8 100644 (file)
@@ -249,12 +249,12 @@ $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
  */
 $wgLockManagers[] = [
        'name' => 'fsLockManager',
-       'class' => 'FSLockManager',
+       'class' => FSLockManager::class,
        'lockDirectory' => "{$wgUploadDirectory}/lockdir",
 ];
 $wgLockManagers[] = [
        'name' => 'nullLockManager',
-       'class' => 'NullLockManager',
+       'class' => NullLockManager::class,
 ];
 
 /**
@@ -276,7 +276,7 @@ $wgGalleryOptions += [
  */
 if ( !$wgLocalFileRepo ) {
        $wgLocalFileRepo = [
-               'class' => 'LocalRepo',
+               'class' => LocalRepo::class,
                'name' => 'local',
                'directory' => $wgUploadDirectory,
                'scriptDirUrl' => $wgScriptPath,
@@ -295,7 +295,7 @@ if ( !$wgLocalFileRepo ) {
 if ( $wgUseSharedUploads ) {
        if ( $wgSharedUploadDBname ) {
                $wgForeignFileRepos[] = [
-                       'class' => 'ForeignDBRepo',
+                       'class' => ForeignDBRepo::class,
                        'name' => 'shared',
                        'directory' => $wgSharedUploadDirectory,
                        'url' => $wgSharedUploadPath,
@@ -315,7 +315,7 @@ if ( $wgUseSharedUploads ) {
                ];
        } else {
                $wgForeignFileRepos[] = [
-                       'class' => 'FileRepo',
+                       'class' => FileRepo::class,
                        'name' => 'shared',
                        'directory' => $wgSharedUploadDirectory,
                        'url' => $wgSharedUploadPath,
@@ -329,7 +329,7 @@ if ( $wgUseSharedUploads ) {
 }
 if ( $wgUseInstantCommons ) {
        $wgForeignFileRepos[] = [
-               'class' => 'ForeignAPIRepo',
+               'class' => ForeignAPIRepo::class,
                'name' => 'wikimediacommons',
                'apibase' => 'https://commons.wikimedia.org/w/api.php',
                'url' => 'https://upload.wikimedia.org/wikipedia/commons',
@@ -349,7 +349,7 @@ if ( !isset( $wgLocalFileRepo['backend'] ) ) {
        $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
 }
 foreach ( $wgForeignFileRepos as &$repo ) {
-       if ( !isset( $repo['directory'] ) && $repo['class'] === 'ForeignAPIRepo' ) {
+       if ( !isset( $repo['directory'] ) && $repo['class'] === ForeignAPIRepo::class ) {
                $repo['directory'] = $wgUploadDirectory; // b/c
        }
        if ( !isset( $repo['backend'] ) ) {
@@ -538,16 +538,16 @@ if ( $wgNewUserLog ) {
        $wgLogTypes[] = 'newusers';
        $wgLogNames['newusers'] = 'newuserlogpage';
        $wgLogHeaders['newusers'] = 'newuserlogpagetext';
-       $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter';
-       $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter';
-       $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter';
-       $wgLogActionsHandlers['newusers/byemail'] = 'NewUsersLogFormatter';
-       $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter';
+       $wgLogActionsHandlers['newusers/newusers'] = NewUsersLogFormatter::class;
+       $wgLogActionsHandlers['newusers/create'] = NewUsersLogFormatter::class;
+       $wgLogActionsHandlers['newusers/create2'] = NewUsersLogFormatter::class;
+       $wgLogActionsHandlers['newusers/byemail'] = NewUsersLogFormatter::class;
+       $wgLogActionsHandlers['newusers/autocreate'] = NewUsersLogFormatter::class;
 }
 
 if ( $wgPageLanguageUseDB ) {
        $wgLogTypes[] = 'pagelang';
-       $wgLogActionsHandlers['pagelang/pagelang'] = 'PageLangLogFormatter';
+       $wgLogActionsHandlers['pagelang/pagelang'] = PageLangLogFormatter::class;
 }
 
 if ( $wgCookieSecure === 'detect' ) {
@@ -698,7 +698,7 @@ if ( $wgMainWANCache === false ) {
        // Sites using multiple datacenters can configure a relayer.
        $wgMainWANCache = 'mediawiki-main-default';
        $wgWANObjectCaches[$wgMainWANCache] = [
-               'class'    => 'WANObjectCache',
+               'class'    => WANObjectCache::class,
                'cacheId'  => $wgMainCacheType,
                'channels' => [ 'purge' => 'wancache-main-default-purge' ]
        ];
index cd62737..7bfb5a4 100644 (file)
@@ -956,7 +956,7 @@ class WebRequest {
        public function response() {
                /* Lazy initialization of response object for this request */
                if ( !is_object( $this->response ) ) {
-                       $class = ( $this instanceof FauxRequest ) ? 'FauxResponse' : 'WebResponse';
+                       $class = ( $this instanceof FauxRequest ) ? FauxResponse::class : WebResponse::class;
                        $this->response = new $class();
                }
                return $this->response;
index 5056b6d..2c2dd9a 100644 (file)
@@ -55,72 +55,72 @@ class ApiMain extends ApiBase {
         * List of available modules: action name => module class
         */
        private static $Modules = [
-               'login' => 'ApiLogin',
-               'clientlogin' => 'ApiClientLogin',
-               'logout' => 'ApiLogout',
-               'createaccount' => 'ApiAMCreateAccount',
-               'linkaccount' => 'ApiLinkAccount',
-               'unlinkaccount' => 'ApiRemoveAuthenticationData',
-               'changeauthenticationdata' => 'ApiChangeAuthenticationData',
-               'removeauthenticationdata' => 'ApiRemoveAuthenticationData',
-               'resetpassword' => 'ApiResetPassword',
-               'query' => 'ApiQuery',
-               'expandtemplates' => 'ApiExpandTemplates',
-               'parse' => 'ApiParse',
-               'stashedit' => 'ApiStashEdit',
-               'opensearch' => 'ApiOpenSearch',
-               'feedcontributions' => 'ApiFeedContributions',
-               'feedrecentchanges' => 'ApiFeedRecentChanges',
-               'feedwatchlist' => 'ApiFeedWatchlist',
-               'help' => 'ApiHelp',
-               'paraminfo' => 'ApiParamInfo',
-               'rsd' => 'ApiRsd',
-               'compare' => 'ApiComparePages',
-               'tokens' => 'ApiTokens',
-               'checktoken' => 'ApiCheckToken',
-               'cspreport' => 'ApiCSPReport',
-               'validatepassword' => 'ApiValidatePassword',
+               'login' => ApiLogin::class,
+               'clientlogin' => ApiClientLogin::class,
+               'logout' => ApiLogout::class,
+               'createaccount' => ApiAMCreateAccount::class,
+               'linkaccount' => ApiLinkAccount::class,
+               'unlinkaccount' => ApiRemoveAuthenticationData::class,
+               'changeauthenticationdata' => ApiChangeAuthenticationData::class,
+               'removeauthenticationdata' => ApiRemoveAuthenticationData::class,
+               'resetpassword' => ApiResetPassword::class,
+               'query' => ApiQuery::class,
+               'expandtemplates' => ApiExpandTemplates::class,
+               'parse' => ApiParse::class,
+               'stashedit' => ApiStashEdit::class,
+               'opensearch' => ApiOpenSearch::class,
+               'feedcontributions' => ApiFeedContributions::class,
+               'feedrecentchanges' => ApiFeedRecentChanges::class,
+               'feedwatchlist' => ApiFeedWatchlist::class,
+               'help' => ApiHelp::class,
+               'paraminfo' => ApiParamInfo::class,
+               'rsd' => ApiRsd::class,
+               'compare' => ApiComparePages::class,
+               'tokens' => ApiTokens::class,
+               'checktoken' => ApiCheckToken::class,
+               'cspreport' => ApiCSPReport::class,
+               'validatepassword' => ApiValidatePassword::class,
 
                // Write modules
-               'purge' => 'ApiPurge',
-               'setnotificationtimestamp' => 'ApiSetNotificationTimestamp',
-               'rollback' => 'ApiRollback',
-               'delete' => 'ApiDelete',
-               'undelete' => 'ApiUndelete',
-               'protect' => 'ApiProtect',
-               'block' => 'ApiBlock',
-               'unblock' => 'ApiUnblock',
-               'move' => 'ApiMove',
-               'edit' => 'ApiEditPage',
-               'upload' => 'ApiUpload',
-               'filerevert' => 'ApiFileRevert',
-               'emailuser' => 'ApiEmailUser',
-               'watch' => 'ApiWatch',
-               'patrol' => 'ApiPatrol',
-               'import' => 'ApiImport',
-               'clearhasmsg' => 'ApiClearHasMsg',
-               'userrights' => 'ApiUserrights',
-               'options' => 'ApiOptions',
-               'imagerotate' => 'ApiImageRotate',
-               'revisiondelete' => 'ApiRevisionDelete',
-               'managetags' => 'ApiManageTags',
-               'tag' => 'ApiTag',
-               'mergehistory' => 'ApiMergeHistory',
-               'setpagelanguage' => 'ApiSetPageLanguage',
+               'purge' => ApiPurge::class,
+               'setnotificationtimestamp' => ApiSetNotificationTimestamp::class,
+               'rollback' => ApiRollback::class,
+               'delete' => ApiDelete::class,
+               'undelete' => ApiUndelete::class,
+               'protect' => ApiProtect::class,
+               'block' => ApiBlock::class,
+               'unblock' => ApiUnblock::class,
+               'move' => ApiMove::class,
+               'edit' => ApiEditPage::class,
+               'upload' => ApiUpload::class,
+               'filerevert' => ApiFileRevert::class,
+               'emailuser' => ApiEmailUser::class,
+               'watch' => ApiWatch::class,
+               'patrol' => ApiPatrol::class,
+               'import' => ApiImport::class,
+               'clearhasmsg' => ApiClearHasMsg::class,
+               'userrights' => ApiUserrights::class,
+               'options' => ApiOptions::class,
+               'imagerotate' => ApiImageRotate::class,
+               'revisiondelete' => ApiRevisionDelete::class,
+               'managetags' => ApiManageTags::class,
+               'tag' => ApiTag::class,
+               'mergehistory' => ApiMergeHistory::class,
+               'setpagelanguage' => ApiSetPageLanguage::class,
        ];
 
        /**
         * List of available formats: format name => format class
         */
        private static $Formats = [
-               'json' => 'ApiFormatJson',
-               'jsonfm' => 'ApiFormatJson',
-               'php' => 'ApiFormatPhp',
-               'phpfm' => 'ApiFormatPhp',
-               'xml' => 'ApiFormatXml',
-               'xmlfm' => 'ApiFormatXml',
-               'rawfm' => 'ApiFormatJson',
-               'none' => 'ApiFormatNone',
+               'json' => ApiFormatJson::class,
+               'jsonfm' => ApiFormatJson::class,
+               'php' => ApiFormatPhp::class,
+               'phpfm' => ApiFormatPhp::class,
+               'xml' => ApiFormatXml::class,
+               'xmlfm' => ApiFormatXml::class,
+               'rawfm' => ApiFormatJson::class,
+               'none' => ApiFormatNone::class,
        ];
 
        /**
index 2619a7c..e02c862 100644 (file)
@@ -78,12 +78,12 @@ class ApiModuleManager extends ContextSource {
         * @code
         *  $modules['foo'] = 'ApiFoo';
         *  $modules['bar'] = [
-        *      'class' => 'ApiBar',
+        *      'class' => ApiBar::class,
         *      'factory' => function( $main, $name ) { ... }
         *  ];
         *  $modules['xyzzy'] = [
-        *      'class' => 'ApiXyzzy',
-        *      'factory' => [ 'XyzzyFactory', 'newApiModule' ]
+        *      'class' => ApiXyzzy::class,
+        *      'factory' => [ XyzzyFactory::class, 'newApiModule' ]
         *  ];
         * @endcode
         *
index 30611b6..48303a5 100644 (file)
@@ -1528,7 +1528,7 @@ class ApiPageSet extends ApiBase {
                        $prefix = $query->getModulePath() . '+';
                        $mgr = $query->getModuleManager();
                        foreach ( $mgr->getNamesWithClasses() as $name => $class ) {
-                               if ( is_subclass_of( $class, 'ApiQueryGeneratorBase' ) ) {
+                               if ( is_subclass_of( $class, ApiQueryGeneratorBase::class ) ) {
                                        $gens[$name] = $prefix . $name;
                                }
                        }
index 5bbd211..e49024d 100644 (file)
@@ -40,26 +40,26 @@ class ApiQuery extends ApiBase {
         * @var array
         */
        private static $QueryPropModules = [
-               'categories' => 'ApiQueryCategories',
-               'categoryinfo' => 'ApiQueryCategoryInfo',
-               'contributors' => 'ApiQueryContributors',
-               'deletedrevisions' => 'ApiQueryDeletedRevisions',
-               'duplicatefiles' => 'ApiQueryDuplicateFiles',
-               'extlinks' => 'ApiQueryExternalLinks',
-               'fileusage' => 'ApiQueryBacklinksprop',
-               'images' => 'ApiQueryImages',
-               'imageinfo' => 'ApiQueryImageInfo',
-               'info' => 'ApiQueryInfo',
-               'links' => 'ApiQueryLinks',
-               'linkshere' => 'ApiQueryBacklinksprop',
-               'iwlinks' => 'ApiQueryIWLinks',
-               'langlinks' => 'ApiQueryLangLinks',
-               'pageprops' => 'ApiQueryPageProps',
-               'redirects' => 'ApiQueryBacklinksprop',
-               'revisions' => 'ApiQueryRevisions',
-               'stashimageinfo' => 'ApiQueryStashImageInfo',
-               'templates' => 'ApiQueryLinks',
-               'transcludedin' => 'ApiQueryBacklinksprop',
+               'categories' => ApiQueryCategories::class,
+               'categoryinfo' => ApiQueryCategoryInfo::class,
+               'contributors' => ApiQueryContributors::class,
+               'deletedrevisions' => ApiQueryDeletedRevisions::class,
+               'duplicatefiles' => ApiQueryDuplicateFiles::class,
+               'extlinks' => ApiQueryExternalLinks::class,
+               'fileusage' => ApiQueryBacklinksprop::class,
+               'images' => ApiQueryImages::class,
+               'imageinfo' => ApiQueryImageInfo::class,
+               'info' => ApiQueryInfo::class,
+               'links' => ApiQueryLinks::class,
+               'linkshere' => ApiQueryBacklinksprop::class,
+               'iwlinks' => ApiQueryIWLinks::class,
+               'langlinks' => ApiQueryLangLinks::class,
+               'pageprops' => ApiQueryPageProps::class,
+               'redirects' => ApiQueryBacklinksprop::class,
+               'revisions' => ApiQueryRevisions::class,
+               'stashimageinfo' => ApiQueryStashImageInfo::class,
+               'templates' => ApiQueryLinks::class,
+               'transcludedin' => ApiQueryBacklinksprop::class,
        ];
 
        /**
@@ -67,41 +67,41 @@ class ApiQuery extends ApiBase {
         * @var array
         */
        private static $QueryListModules = [
-               'allcategories' => 'ApiQueryAllCategories',
-               'alldeletedrevisions' => 'ApiQueryAllDeletedRevisions',
-               'allfileusages' => 'ApiQueryAllLinks',
-               'allimages' => 'ApiQueryAllImages',
-               'alllinks' => 'ApiQueryAllLinks',
-               'allpages' => 'ApiQueryAllPages',
-               'allredirects' => 'ApiQueryAllLinks',
-               'allrevisions' => 'ApiQueryAllRevisions',
-               'mystashedfiles' => 'ApiQueryMyStashedFiles',
-               'alltransclusions' => 'ApiQueryAllLinks',
-               'allusers' => 'ApiQueryAllUsers',
-               'backlinks' => 'ApiQueryBacklinks',
-               'blocks' => 'ApiQueryBlocks',
-               'categorymembers' => 'ApiQueryCategoryMembers',
-               'deletedrevs' => 'ApiQueryDeletedrevs',
-               'embeddedin' => 'ApiQueryBacklinks',
-               'exturlusage' => 'ApiQueryExtLinksUsage',
-               'filearchive' => 'ApiQueryFilearchive',
-               'imageusage' => 'ApiQueryBacklinks',
-               'iwbacklinks' => 'ApiQueryIWBacklinks',
-               'langbacklinks' => 'ApiQueryLangBacklinks',
-               'logevents' => 'ApiQueryLogEvents',
-               'pageswithprop' => 'ApiQueryPagesWithProp',
-               'pagepropnames' => 'ApiQueryPagePropNames',
-               'prefixsearch' => 'ApiQueryPrefixSearch',
-               'protectedtitles' => 'ApiQueryProtectedTitles',
-               'querypage' => 'ApiQueryQueryPage',
-               'random' => 'ApiQueryRandom',
-               'recentchanges' => 'ApiQueryRecentChanges',
-               'search' => 'ApiQuerySearch',
-               'tags' => 'ApiQueryTags',
-               'usercontribs' => 'ApiQueryContributions',
-               'users' => 'ApiQueryUsers',
-               'watchlist' => 'ApiQueryWatchlist',
-               'watchlistraw' => 'ApiQueryWatchlistRaw',
+               'allcategories' => ApiQueryAllCategories::class,
+               'alldeletedrevisions' => ApiQueryAllDeletedRevisions::class,
+               'allfileusages' => ApiQueryAllLinks::class,
+               'allimages' => ApiQueryAllImages::class,
+               'alllinks' => ApiQueryAllLinks::class,
+               'allpages' => ApiQueryAllPages::class,
+               'allredirects' => ApiQueryAllLinks::class,
+               'allrevisions' => ApiQueryAllRevisions::class,
+               'mystashedfiles' => ApiQueryMyStashedFiles::class,
+               'alltransclusions' => ApiQueryAllLinks::class,
+               'allusers' => ApiQueryAllUsers::class,
+               'backlinks' => ApiQueryBacklinks::class,
+               'blocks' => ApiQueryBlocks::class,
+               'categorymembers' => ApiQueryCategoryMembers::class,
+               'deletedrevs' => ApiQueryDeletedrevs::class,
+               'embeddedin' => ApiQueryBacklinks::class,
+               'exturlusage' => ApiQueryExtLinksUsage::class,
+               'filearchive' => ApiQueryFilearchive::class,
+               'imageusage' => ApiQueryBacklinks::class,
+               'iwbacklinks' => ApiQueryIWBacklinks::class,
+               'langbacklinks' => ApiQueryLangBacklinks::class,
+               'logevents' => ApiQueryLogEvents::class,
+               'pageswithprop' => ApiQueryPagesWithProp::class,
+               'pagepropnames' => ApiQueryPagePropNames::class,
+               'prefixsearch' => ApiQueryPrefixSearch::class,
+               'protectedtitles' => ApiQueryProtectedTitles::class,
+               'querypage' => ApiQueryQueryPage::class,
+               'random' => ApiQueryRandom::class,
+               'recentchanges' => ApiQueryRecentChanges::class,
+               'search' => ApiQuerySearch::class,
+               'tags' => ApiQueryTags::class,
+               'usercontribs' => ApiQueryContributions::class,
+               'users' => ApiQueryUsers::class,
+               'watchlist' => ApiQueryWatchlist::class,
+               'watchlistraw' => ApiQueryWatchlistRaw::class,
        ];
 
        /**
@@ -109,12 +109,12 @@ class ApiQuery extends ApiBase {
         * @var array
         */
        private static $QueryMetaModules = [
-               'allmessages' => 'ApiQueryAllMessages',
-               'authmanagerinfo' => 'ApiQueryAuthManagerInfo',
-               'siteinfo' => 'ApiQuerySiteinfo',
-               'userinfo' => 'ApiQueryUserInfo',
-               'filerepoinfo' => 'ApiQueryFileRepoInfo',
-               'tokens' => 'ApiQueryTokens',
+               'allmessages' => ApiQueryAllMessages::class,
+               'authmanagerinfo' => ApiQueryAuthManagerInfo::class,
+               'siteinfo' => ApiQuerySiteinfo::class,
+               'userinfo' => ApiQueryUserInfo::class,
+               'filerepoinfo' => ApiQueryFileRepoInfo::class,
+               'tokens' => ApiQueryTokens::class,
        ];
 
        /**
index 23a327b..5294b1d 100644 (file)
@@ -103,15 +103,15 @@ class ApiQueryInfo extends ApiQueryBase {
                }
 
                $this->tokenFunctions = [
-                       'edit' => [ 'ApiQueryInfo', 'getEditToken' ],
-                       'delete' => [ 'ApiQueryInfo', 'getDeleteToken' ],
-                       'protect' => [ 'ApiQueryInfo', 'getProtectToken' ],
-                       'move' => [ 'ApiQueryInfo', 'getMoveToken' ],
-                       'block' => [ 'ApiQueryInfo', 'getBlockToken' ],
-                       'unblock' => [ 'ApiQueryInfo', 'getUnblockToken' ],
-                       'email' => [ 'ApiQueryInfo', 'getEmailToken' ],
-                       'import' => [ 'ApiQueryInfo', 'getImportToken' ],
-                       'watch' => [ 'ApiQueryInfo', 'getWatchToken' ],
+                       'edit' => [ self::class, 'getEditToken' ],
+                       'delete' => [ self::class, 'getDeleteToken' ],
+                       'protect' => [ self::class, 'getProtectToken' ],
+                       'move' => [ self::class, 'getMoveToken' ],
+                       'block' => [ self::class, 'getBlockToken' ],
+                       'unblock' => [ self::class, 'getUnblockToken' ],
+                       'email' => [ self::class, 'getEmailToken' ],
+                       'import' => [ self::class, 'getImportToken' ],
+                       'watch' => [ self::class, 'getWatchToken' ],
                ];
                Hooks::run( 'APIQueryInfoTokens', [ &$this->tokenFunctions ] );
 
@@ -314,7 +314,7 @@ class ApiQueryInfo extends ApiQueryBase {
                $this->everything = $this->titles + $this->missing;
                $result = $this->getResult();
 
-               uasort( $this->everything, [ 'Title', 'compare' ] );
+               uasort( $this->everything, [ Title::class, 'compare' ] );
                if ( !is_null( $this->params['continue'] ) ) {
                        // Throw away any titles we're gonna skip so they don't
                        // clutter queries
index 4549987..517cf1f 100644 (file)
@@ -61,7 +61,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                }
 
                $this->tokenFunctions = [
-                       'patrol' => [ 'ApiQueryRecentChanges', 'getPatrolToken' ]
+                       'patrol' => [ self::class, 'getPatrolToken' ]
                ];
                Hooks::run( 'APIQueryRecentChangesTokens', [ &$this->tokenFunctions ] );
 
index aa9a39c..ef0223a 100644 (file)
@@ -56,7 +56,7 @@ class ApiQueryRevisions extends ApiQueryRevisionsBase {
                }
 
                $this->tokenFunctions = [
-                       'rollback' => [ 'ApiQueryRevisions', 'getRollbackToken' ]
+                       'rollback' => [ self::class, 'getRollbackToken' ]
                ];
                Hooks::run( 'APIQueryRevisionsTokens', [ &$this->tokenFunctions ] );
 
index acae889..f924736 100644 (file)
@@ -848,7 +848,7 @@ class ApiQuerySiteinfo extends ApiQueryBase {
                foreach ( $myWgHooks as $name => $subscribers ) {
                        $arr = [
                                'name' => $name,
-                               'subscribers' => array_map( [ 'SpecialVersion', 'arrayToString' ], $subscribers ),
+                               'subscribers' => array_map( [ SpecialVersion::class, 'arrayToString' ], $subscribers ),
                        ];
 
                        ApiResult::setArrayType( $arr['subscribers'], 'array' );
index 9261003..6de512b 100644 (file)
@@ -73,7 +73,7 @@ class ApiQueryUsers extends ApiQueryBase {
                }
 
                $this->tokenFunctions = [
-                       'userrights' => [ 'ApiQueryUsers', 'getUserrightsToken' ],
+                       'userrights' => [ self::class, 'getUserrightsToken' ],
                ];
                Hooks::run( 'APIQueryUsersTokens', [ &$this->tokenFunctions ] );
 
index 606967d..ff1914c 100644 (file)
@@ -62,11 +62,11 @@ class ApiTokens extends ApiBase {
                if ( $types ) {
                        return $types;
                }
-               $types = [ 'patrol' => [ 'ApiQueryRecentChanges', 'getPatrolToken' ] ];
+               $types = [ 'patrol' => [ ApiQueryRecentChanges::class, 'getPatrolToken' ] ];
                $names = [ 'edit', 'delete', 'protect', 'move', 'block', 'unblock',
                        'email', 'import', 'watch', 'options' ];
                foreach ( $names as $name ) {
-                       $types[$name] = [ 'ApiQueryInfo', 'get' . ucfirst( $name ) . 'Token' ];
+                       $types[$name] = [ ApiQueryInfo::class, 'get' . ucfirst( $name ) . 'Token' ];
                }
                Hooks::run( 'ApiTokensGetTokenTypes', [ &$types ] );
 
index e8a2061..93e432b 100644 (file)
@@ -724,26 +724,26 @@ class ApiUpload extends ApiBase {
         */
        protected function handleStashException( $e ) {
                switch ( get_class( $e ) ) {
-                       case 'UploadStashFileNotFoundException':
+                       case UploadStashFileNotFoundException::class:
                                $wrap = 'apierror-stashedfilenotfound';
                                break;
-                       case 'UploadStashBadPathException':
+                       case UploadStashBadPathException::class:
                                $wrap = 'apierror-stashpathinvalid';
                                break;
-                       case 'UploadStashFileException':
+                       case UploadStashFileException::class:
                                $wrap = 'apierror-stashfilestorage';
                                break;
-                       case 'UploadStashZeroLengthFileException':
+                       case UploadStashZeroLengthFileException::class:
                                $wrap = 'apierror-stashzerolength';
                                break;
-                       case 'UploadStashNotLoggedInException':
+                       case UploadStashNotLoggedInException::class:
                                return StatusValue::newFatal( ApiMessage::create(
                                        [ 'apierror-mustbeloggedin', $this->msg( 'action-upload' ) ], 'stashnotloggedin'
                                ) );
-                       case 'UploadStashWrongOwnerException':
+                       case UploadStashWrongOwnerException::class:
                                $wrap = 'apierror-stashwrongowner';
                                break;
-                       case 'UploadStashNoSuchKeyException':
+                       case UploadStashNoSuchKeyException::class:
                                $wrap = 'apierror-stashnosuchfilekey';
                                break;
                        default:
index 218454d..4da9509 100644 (file)
@@ -22,7 +22,7 @@
                        "Tacsipacsi"
                ]
        },
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Dokumentation]]\n* [[mw:Special:MyLanguage/API:FAQ|Häufig gestellte Fragen]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailingliste]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API-Ankündigungen]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Fehlerberichte und Anfragen]\n</div>\n<strong>Status:</strong> Alle auf dieser Seite gezeigten Funktionen sollten funktionieren, allerdings ist die API in aktiver Entwicklung und kann sich zu jeder Zeit ändern. Abonniere die [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ MediaWiki-API-Ankündigungs-Mailingliste], um über Aktualisierungen informiert zu werden.\n\n<strong>Fehlerhafte Anfragen:</strong> Wenn fehlerhafte Anfragen an die API gesendet werden, wird ein HTTP-Header mit dem Schlüssel „MediaWiki-API-Error“ gesendet. Der Wert des Headers und der Fehlercode werden auf den gleichen Wert gesetzt. Für weitere Informationen siehe [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Fehler und Warnungen]].\n\n<strong>Testen:</strong> Zum einfachen Testen von API-Anfragen, siehe [[Special:ApiSandbox]].",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Dokumentation]]\n* [[mw:Special:MyLanguage/API:FAQ|Häufig gestellte Fragen]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailingliste]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API-Ankündigungen]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Fehlerberichte und Anfragen]\n</div>\n<strong>Status:</strong> Alle auf dieser Seite gezeigten Funktionen sollten funktionieren, allerdings ist die API in aktiver Entwicklung und kann sich zu jeder Zeit ändern. Abonniere die [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ MediaWiki-API-Ankündigungs-Mailingliste], um über Aktualisierungen informiert zu werden.\n\n<strong>Fehlerhafte Anfragen:</strong> Wenn fehlerhafte Anfragen an die API gesendet werden, wird ein HTTP-Header mit dem Schlüssel „MediaWiki-API-Error“ gesendet. Der Wert des Headers und der Fehlercode werden auf den gleichen Wert gesetzt. Für weitere Informationen siehe [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Fehler und Warnungen]].\n\n<p class=\"mw-apisandbox-link\"><strong>Testen:</strong> Zum einfachen Testen von API-Anfragen, siehe [[Special:ApiSandbox]].</p>",
        "apihelp-main-param-action": "Auszuführende Aktion.",
        "apihelp-main-param-format": "Format der Ausgabe.",
        "apihelp-main-param-maxlag": "maxlag kann verwendet werden, wenn MediaWiki auf einem datenbankreplizierten Cluster installiert ist. Um weitere Replikationsrückstände zu verhindern, lässt dieser Parameter den Client warten, bis der Replikationsrückstand kleiner als der angegebene Wert (in Sekunden) ist. Bei einem größerem Rückstand wird der Fehlercode <samp>maxlag</samp> zurückgegeben mit einer Nachricht wie <samp>Waiting for $host: $lag seconds lagged</samp>.<br />Siehe [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Handbuch: Maxlag parameter]] für weitere Informationen.",
index a897f06..729c4c7 100644 (file)
@@ -7,7 +7,7 @@
        },
 
        "apihelp-main-summary": "",
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentation]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailing list]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API Announcements]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bugs & requests]\n</div>\n<strong>Status:</strong> All features shown on this page should be working, but the API is still in active development, and may change at any time. Subscribe to [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ the mediawiki-api-announce mailing list] for notice of updates.\n\n<strong>Erroneous requests:</strong> When erroneous requests are sent to the API, an HTTP header will be sent with the key \"MediaWiki-API-Error\" and then both the value of the header and the error code sent back will be set to the same value. For more information see [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Errors and warnings]].\n\n<strong>Testing:</strong> For ease of testing API requests, see [[Special:ApiSandbox]].",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentation]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailing list]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API Announcements]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bugs & requests]\n</div>\n<strong>Status:</strong> All features shown on this page should be working, but the API is still in active development, and may change at any time. Subscribe to [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ the mediawiki-api-announce mailing list] for notice of updates.\n\n<strong>Erroneous requests:</strong> When erroneous requests are sent to the API, an HTTP header will be sent with the key \"MediaWiki-API-Error\" and then both the value of the header and the error code sent back will be set to the same value. For more information see [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Errors and warnings]].\n\n<p class=\"mw-apisandbox-link\"><strong>Testing:</strong> For ease of testing API requests, see [[Special:ApiSandbox]].</p>",
        "apihelp-main-param-action": "Which action to perform.",
        "apihelp-main-param-format": "The format of the output.",
        "apihelp-main-param-maxlag": "Maximum lag can be used when MediaWiki is installed on a database replicated cluster. To save actions causing any more site replication lag, this parameter can make the client wait until the replication lag is less than the specified value. In case of excessive lag, error code <samp>maxlag</samp> is returned with a message like <samp>Waiting for $host: $lag seconds lagged</samp>.<br />See [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Manual: Maxlag parameter]] for more information.",
index 2f27b58..d72b218 100644 (file)
@@ -33,7 +33,7 @@
                        "Kenjiraw"
                ]
        },
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentation]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Liste de diffusion]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Annonces de l’API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bogues et demandes]\n</div>\n<strong>État :</strong> Toutes les fonctionnalités affichées sur cette page devraient fonctionner, mais l’API est encore en cours de développement et peut changer à tout moment. Inscrivez-vous à [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la liste de diffusion mediawiki-api-announce] pour être informé des mises à jour.\n\n<strong>Requêtes erronées :</strong> Si des requêtes erronées sont envoyées à l’API, un entête HTTP sera renvoyé avec la clé « MediaWiki-API-Error ». La valeur de cet entête et le code d’erreur renvoyé prendront la même valeur. Pour plus d’information, voyez [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Errors and warnings]].\n\n<strong>Test :</strong> Pour faciliter le test des requêtes de l’API, voyez [[Special:ApiSandbox]].",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentation]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Liste de diffusion]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Annonces de l’API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bogues et demandes]\n</div>\n<strong>État :</strong> Toutes les fonctionnalités affichées sur cette page devraient fonctionner, mais l’API est encore en cours de développement et peut changer à tout moment. Inscrivez-vous à [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la liste de diffusion mediawiki-api-announce] pour être informé des mises à jour.\n\n<strong>Requêtes erronées :</strong> Si des requêtes erronées sont envoyées à l’API, un entête HTTP sera renvoyé avec la clé « MediaWiki-API-Error ». La valeur de cet entête et le code d’erreur renvoyé prendront la même valeur. Pour plus d’information, voyez [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Errors and warnings]].\n\n<p class=\"mw-apisandbox-link\"><strong>Test :</strong> Pour faciliter le test des requêtes de l’API, voyez [[Special:ApiSandbox]].</p>",
        "apihelp-main-param-action": "Quelle action effectuer.",
        "apihelp-main-param-format": "Le format de sortie.",
        "apihelp-main-param-maxlag": "La latence maximale peut être utilisée quand MédiaWiki est installé sur un cluster de base de données répliqué. Pour éviter des actions provoquant un supplément de latence de réplication de site, ce paramètre peut faire attendre le client jusqu’à ce que la latence de réplication soit inférieure à une valeur spécifiée. En cas de latence excessive, le code d’erreur <samp>maxlag</samp> est renvoyé avec un message tel que <samp>Attente de $host : $lag secondes de délai</samp>.<br />Voyez [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Manuel: Maxlag parameter]] pour plus d’information.",
index 5682036..25da0e6 100644 (file)
@@ -19,7 +19,7 @@
                        "Margherita.mignanelli"
                ]
        },
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentazione]] (in inglese)\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]] (in inglese)\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailing list]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Annunci sull'API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bug & richieste]\n</div>\n<strong>Stato:</strong> tutte le funzioni e caratteristiche mostrate su questa pagina dovrebbero funzionare, ma le API sono ancora in fase attiva di sviluppo, e potrebbero cambiare in qualsiasi momento. Iscriviti alla [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la mailing list sugli annunci delle API MediaWiki] per essere informato sugli aggiornamenti.\n\n<strong>Istruzioni sbagliate:</strong> quando vengono impartite alle API delle istruzioni sbagliate, un'intestazione HTTP verrà inviata col messaggio \"MediaWiki-API-Error\" e, sia il valore dell'intestazione, sia il codice d'errore, verranno impostati con lo stesso valore. Per maggiori informazioni leggi [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Errori ed avvertimenti]] (in inglese).\n\n<strong>Test:</strong> per testare facilmente le richieste API, vedi [[Special:ApiSandbox]].",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentazione]] (in inglese)\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]] (in inglese)\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Mailing list]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Annunci sull'API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bug & richieste]\n</div>\n<strong>Stato:</strong> tutte le funzioni e caratteristiche mostrate su questa pagina dovrebbero funzionare, ma le API sono ancora in fase attiva di sviluppo, e potrebbero cambiare in qualsiasi momento. Iscriviti alla [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la mailing list sugli annunci delle API MediaWiki] per essere informato sugli aggiornamenti.\n\n<strong>Istruzioni sbagliate:</strong> quando vengono impartite alle API delle istruzioni sbagliate, un'intestazione HTTP verrà inviata col messaggio \"MediaWiki-API-Error\" e, sia il valore dell'intestazione, sia il codice d'errore, verranno impostati con lo stesso valore. Per maggiori informazioni leggi [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Errori ed avvertimenti]] (in inglese).\n\n<p class=\"mw-apisandbox-link\"><strong>Test:</strong> per testare facilmente le richieste API, vedi [[Special:ApiSandbox]].</p>",
        "apihelp-main-param-action": "Azione da compiere.",
        "apihelp-main-param-format": "Formato dell'output.",
        "apihelp-main-param-assert": "Verifica che l'utente abbia effettuato l'accesso se si è impostato <kbd>user</kbd>, o che abbia i permessi di bot se si è impostato <kbd>bot</kbd>.",
index f4a4662..aa697fb 100644 (file)
@@ -8,13 +8,14 @@
                        "Hamilton Abreu",
                        "Mansil",
                        "Felipe L. Ewald",
-                       "Athena in Wonderland"
+                       "Athena in Wonderland",
+                       "Waldir"
                ]
        },
-       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentação]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de discussão]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anúncios da API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Erros e pedidos]\n</div>\n<strong>Estado:</strong> Todas as funcionalidades mostradas nesta página devem ter o comportamento documentado, mas a API ainda está em desenvolvimento ativo e pode ser alterada a qualquer momento. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de discussão mediawiki-api-announce] para ser informado acerca das atualizações.\n\n<strong>Pedidos incorretos:</strong> Quando são enviados pedidos incorretos à API, será devolvido um cabeçalho HTTP com a chave \"MediaWiki-API-Error\" e depois tanto o valor desse cabeçalho como o código de erro devolvido serão definidos com o mesmo valor. Para mais informação, consulte [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Erros e avisos]].\n\n<strong>Testes:</strong> Para testar facilmente pedidos à API, visite [[Special:ApiSandbox|Testes da API]].",
+       "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentação]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de discussão]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anúncios da API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Erros e pedidos]\n</div>\n<strong>Estado:</strong> Todas as funcionalidades mostradas nesta página devem ter o comportamento documentado, mas a API ainda está em desenvolvimento ativo e pode ser alterada a qualquer momento. Inscreva-se na [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ lista de discussão mediawiki-api-announce] para ser informado acerca das atualizações.\n\n<strong>Pedidos incorretos:</strong> Quando são enviados pedidos incorretos à API, será devolvido um cabeçalho HTTP com a chave \"MediaWiki-API-Error\" e depois tanto o valor desse cabeçalho como o código de erro devolvido serão definidos com o mesmo valor. Para mais informação, consulte [[mw:Special:MyLanguage/API:Errors_and_warnings|API:Erros e avisos]].\n\n<p class=\"mw-apisandbox-link\">\n<strong>Testes:</strong> Para testar facilmente pedidos à API, visite [[Special:ApiSandbox|Testes da API]].\n</p>",
        "apihelp-main-param-action": "A operação a ser realizada.",
        "apihelp-main-param-format": "O formato do resultado.",
-       "apihelp-main-param-maxlag": "O atraso máximo pode ser usado quando o MediaWiki é instalado num ''cluster'' de bases de dados replicadas. Para impedir que as operações causem ainda mais atrasos de replicação do ''site'', este parâmetro pode fazer o cliente aguardar até que o atraso de replicação seja inferior ao valor especificado. Caso o atraso atual exceda esse valor, o código de erro <samp>maxlag</samp> é devolvido com uma mensagem como <samp>À espera do servidor $host: $lag segundos de atraso</samp>.<br />Consulte [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Manual: Parâmetro maxlag]] para mais informações.",
+       "apihelp-main-param-maxlag": "O atraso máximo pode ser usado quando o MediaWiki é instalado num ''cluster'' de bases de dados replicadas. Para impedir que as operações causem ainda mais atrasos de replicação do sítio, este parâmetro pode fazer o cliente aguardar até que o atraso de replicação seja inferior ao valor especificado. Caso o atraso atual exceda esse valor, o código de erro <samp>maxlag</samp> é devolvido com uma mensagem como <samp>À espera do servidor $host: $lag segundos de atraso</samp>.<br />Consulte [[mw:Special:MyLanguage/Manual:Maxlag_parameter|Manual: Parâmetro maxlag]] para mais informações.",
        "apihelp-main-param-smaxage": "Definir no cabeçalho HTTP <code>s-maxage</code> de controlo da cache este número de segundos. Os erros nunca são armazenados na cache.",
        "apihelp-main-param-maxage": "Definir no cabeçalho HTTP <code>max-age</code> de controlo da cache este número de segundos. Os erros nunca são armazenados na cache.",
        "apihelp-main-param-assert": "Se definido com o valor <kbd>user</kbd>, verificar que o utilizador está autenticado. Se definido com o valor <kbd>bot</kbd>, verificar que o utilizador tem o privilégio de conta robô.",
        "apihelp-opensearch-example-te": "Encontrar as páginas que começam por <kbd>Te</kbd>.",
        "apihelp-options-summary": "Alterar as preferências do utilizador atual.",
        "apihelp-options-extended-description": "Só podem ser definidas as opções que estão registadas no núcleo do MediaWiki ou numa das extensões instaladas, ou opções cuja chave tem o prefixo <code>userjs-</code> (que são supostas ser usadas por ''scripts'' de utilizador).",
-       "apihelp-options-param-reset": "Reiniciar preferências para os valores por omissão do ''site''.",
+       "apihelp-options-param-reset": "Reiniciar preferências para os valores por omissão do sítio.",
        "apihelp-options-param-resetkinds": "Lista dos tipos de opções a reiniciar quando a opção <var>$1reset</var> está definida.",
        "apihelp-options-param-change": "Listas das alterações, na forma nome=valor (isto é, skin=vector). Se não for fornecido nenhum valor (nem sequer um sinal de igualdade), por exemplo, nomedaopção|outraopção|..., a opção será reiniciada para o seu valor por omissão. Se qualquer dos valores passados contém uma barra vertical (<kbd>|</kbd>), use um [[Special:ApiHelp/main#main/datatypes|separador alternativo para valores múltiplos]] de forma a obter o comportamento correto.",
        "apihelp-options-param-optionname": "O nome da opção que deve ser configurada com o valor dado por <var>$1optionvalue</var>.",
        "apihelp-purge-example-simple": "Purgar as páginas <kbd>Main Page</kbd> e <kbd>API</kbd>.",
        "apihelp-purge-example-generator": "Purgar as primeiras 10 páginas no espaço nominal principal.",
        "apihelp-query-summary": "Obter dados de, e sobre, o MediaWiki.",
-       "apihelp-query-extended-description": "Todas as modificações de dados terão primeiro que usar uma consulta para adquirir uma chave, o que visa impedir abusos de sites maliciosos.",
+       "apihelp-query-extended-description": "Todas as modificações de dados terão primeiro que usar uma consulta para adquirir uma chave, o que visa impedir abusos de sítios maliciosos.",
        "apihelp-query-param-prop": "As propriedades a serem obtidas para as páginas consultadas.",
        "apihelp-query-param-list": "As listas a serem obtidas.",
        "apihelp-query-param-meta": "Os metadados a serem obtidos.",
        "apihelp-query-param-exportnowrap": "Devolver o XML de exportação sem envolvê-lo num resultado XML (o mesmo formato que [[Special:Export]]). Só pode ser usado com $1export.",
        "apihelp-query-param-iwurl": "Indica se deve ser obtido o URL completo quando o título é uma hiperligação interwikis.",
        "apihelp-query-param-rawcontinue": "Devolver os dados em bruto de <samp>query-continue</samp> para continuar.",
-       "apihelp-query-example-revisions": "Obter [[Special:ApiHelp/query+siteinfo|informação do ''site'']] e as [[Special:ApiHelp/query+revisions|revisões]] da página <kbd>Main Page</kbd>.",
+       "apihelp-query-example-revisions": "Obter [[Special:ApiHelp/query+siteinfo|informação do sítio]] e as [[Special:ApiHelp/query+revisions|revisões]] da página <kbd>Main Page</kbd>.",
        "apihelp-query-example-allpages": "Obter as revisões das páginas que começam por <kbd>API/</kbd>.",
        "apihelp-query+allcategories-summary": "Enumerar todas as categorias.",
        "apihelp-query+allcategories-param-from": "A categoria a partir da qual será começada a enumeração.",
        "apihelp-query+alllinks-example-unique": "Listar os títulos únicos para os quais existem hiperligações.",
        "apihelp-query+alllinks-example-unique-generator": "Obtém todos os títulos para os quais existem hiperligações, marcando aqueles em falta.",
        "apihelp-query+alllinks-example-generator": "Obtém as páginas que contêm as ligações.",
-       "apihelp-query+allmessages-summary": "Devolver as mensagens deste ''site''.",
+       "apihelp-query+allmessages-summary": "Devolver as mensagens deste sítio.",
        "apihelp-query+allmessages-param-messages": "Mensagens a serem produzidas no resultado. <kbd>*</kbd> (o valor por omissão) significa todas as mensagens.",
        "apihelp-query+allmessages-param-prop": "As propriedades a serem obtidas:",
        "apihelp-query+allmessages-param-enableparser": "Definir para ativar o analisador sintático; irá pré-processar o texto wiki da mensagem (substituir palavras mágicas, processar predefinições, etc.).",
        "apihelp-query+embeddedin-example-simple": "Mostrar as páginas que transcluem <kbd>Template:Stub</kbd>.",
        "apihelp-query+embeddedin-example-generator": "Obter informação sobre as páginas que transcluem <kbd>Template:Stub</kbd>.",
        "apihelp-query+extlinks-summary": "Devolve todos os URL externos (que não sejam interwikis) das páginas especificadas.",
-       "apihelp-query+extlinks-param-limit": "O número de ''links'' a serem devolvidos.",
+       "apihelp-query+extlinks-param-limit": "O número de hiperligações a serem devolvidas.",
        "apihelp-query+extlinks-param-protocol": "Protocolo do URL. Se vazio e <var>$1query</var> está definido, o protocolo é <kbd>http</kbd>. Deixe este parâmetro e <var>$1query</var> vazios para listar todas as hiperligações externas.",
        "apihelp-query+extlinks-param-query": "Texto de pesquisa sem protocolo. Útil para verificar se uma determinada página contém um determinado URL externo.",
        "apihelp-query+extlinks-param-expandurl": "Expandir os URL relativos a protocolo com o protocolo canónico.",
        "apihelp-query+info-param-token": "Em substituição, usar [[Special:ApiHelp/query+tokens|action=query&meta=tokens]].",
        "apihelp-query+info-example-simple": "Obter informações sobre a página <kbd>Main Page</kbd>.",
        "apihelp-query+info-example-protection": "Obter informação geral e de proteção sobre a página <kbd>Main Page</kbd>.",
-       "apihelp-query+iwbacklinks-summary": "Encontrar todas as páginas que contêm ''links'' para as páginas indicadas.",
+       "apihelp-query+iwbacklinks-summary": "Encontrar todas as páginas que contêm hiperligações para as páginas indicadas.",
        "apihelp-query+iwbacklinks-extended-description": "Pode ser usado para encontrar todas as hiperligações com um prefixo, ou todas as hiperligações para um título (com um prefixo especificado). Se nenhum dos parâmetros for usado, isso efetivamente significa \"todas as hiperligações interwikis\".",
        "apihelp-query+iwbacklinks-param-prefix": "O prefixo interwikis.",
        "apihelp-query+iwbacklinks-param-title": "A hiperligação interwikis a ser procurada. Tem de ser usado em conjunto com <var>$1blprefix</var>.",
        "apihelp-query+langlinks-example-simple": "Obter as hiperligações interlínguas da página <kbd>Main Page</kbd>.",
        "apihelp-query+links-summary": "Devolve todas as hiperligações das páginas indicadas.",
        "apihelp-query+links-param-namespace": "Mostrar apenas as hiperligações destes espaços nominais.",
-       "apihelp-query+links-param-limit": "O número de ''links'' a serem devolvidos.",
+       "apihelp-query+links-param-limit": "O número de hiperligações a serem devolvidas.",
        "apihelp-query+links-param-titles": "Listar só as hiperligações para estes títulos. Útil para verificar se uma determinada página contém hiperligações para um determinado título.",
        "apihelp-query+links-param-dir": "A direção de listagem.",
-       "apihelp-query+links-example-simple": "Obter os ''links'' da página <kbd>Main Page</kbd>.",
+       "apihelp-query+links-example-simple": "Obter as hiperligações da página <kbd>Main Page</kbd>.",
        "apihelp-query+links-example-generator": "Obter informação sobre as páginas ligadas na página <kbd>Main Page</kbd>.",
        "apihelp-query+links-example-namespaces": "Obter as hiperligações da página <kbd>Main Page</kbd> nos espaços nominais {{ns:user}} e {{ns:template}}.",
        "apihelp-query+linkshere-summary": "Encontrar todas as páginas que contêm hiperligações para as páginas indicadas.",
        "apihelp-query+search-example-simple": "Pesquisar <kbd>meaning</kbd>.",
        "apihelp-query+search-example-text": "Pesquisar <kbd>meaning</kbd> nos textos.",
        "apihelp-query+search-example-generator": "Obter informação sobre as páginas devolvidas por uma pesquisa do termo <kbd>meaning</kbd>.",
-       "apihelp-query+siteinfo-summary": "Devolver informação geral sobre o ''site''.",
+       "apihelp-query+siteinfo-summary": "Devolver informação geral sobre o sítio.",
        "apihelp-query+siteinfo-param-prop": "A informação a ser obtida:",
        "apihelp-query+siteinfo-paramvalue-prop-general": "Informação global do sistema.",
        "apihelp-query+siteinfo-paramvalue-prop-namespaces": "Uma lista dos espaços nominais registados e dos seus nomes canónicos.",
        "apihelp-query+siteinfo-paramvalue-prop-namespacealiases": "Uma lista dos nomes alternativos dos espaços nominais registados.",
        "apihelp-query+siteinfo-paramvalue-prop-specialpagealiases": "Uma lista dos nomes alternativos das páginas especiais.",
        "apihelp-query+siteinfo-paramvalue-prop-magicwords": "Uma lista das palavras mágicas e dos seus nomes alternativos.",
-       "apihelp-query+siteinfo-paramvalue-prop-statistics": "Devolve as estatísticas do ''site''.",
+       "apihelp-query+siteinfo-paramvalue-prop-statistics": "Devolve as estatísticas do sítio.",
        "apihelp-query+siteinfo-paramvalue-prop-interwikimap": "Devolve o mapa de interwikis (opcionalmente filtrado, opcionalmente localizado usando <var>$1inlanguagecode</var>).",
        "apihelp-query+siteinfo-paramvalue-prop-dbrepllag": "Devolve o servidor da base de dados com o maior atraso de replicação.",
        "apihelp-query+siteinfo-paramvalue-prop-usergroups": "Devolve os grupos de utilizadores e as permissões associadas.",
        "apihelp-query+siteinfo-paramvalue-prop-functionhooks": "Devolve uma lista dos ''hooks'' de funções do analisador sintático.",
        "apihelp-query+siteinfo-paramvalue-prop-showhooks": "Devolve uma lista de todos os ''hooks'' subscritos (conteúdo de <var>[[mw:Special:MyLanguage/Manual:$wgHooks|$wgHooks]]</var>).",
        "apihelp-query+siteinfo-paramvalue-prop-variables": "Devolve uma lista de identificadores de variáveis.",
-       "apihelp-query+siteinfo-paramvalue-prop-protocols": "Devolve uma lista dos protocolos permitidos nos ''links'' externos.",
+       "apihelp-query+siteinfo-paramvalue-prop-protocols": "Devolve uma lista dos protocolos permitidos nas hiperligações externas.",
        "apihelp-query+siteinfo-paramvalue-prop-defaultoptions": "Devolve os valores padrão para as preferências dos utilizadores.",
        "apihelp-query+siteinfo-paramvalue-prop-uploaddialog": "Devolve a configuração do diálogo de carregamento.",
        "apihelp-query+siteinfo-param-filteriw": "Devolver só as entradas locais, ou só as não locais, do mapa de interwikis.",
        "apihelp-query+siteinfo-param-showalldb": "Listar todos os servidores da base de dados, não só aquele que tem maior atraso.",
        "apihelp-query+siteinfo-param-numberingroup": "Lista o número de utilizadores nos grupos de utilizadores.",
        "apihelp-query+siteinfo-param-inlanguagecode": "O código de língua dos nomes localizados (o melhor possível) das línguas e dos temas.",
-       "apihelp-query+siteinfo-example-simple": "Obter as informações do ''site''.",
+       "apihelp-query+siteinfo-example-simple": "Obter as informações do sítio.",
        "apihelp-query+siteinfo-example-interwiki": "Obter uma lista dos prefixos interwikis locais.",
        "apihelp-query+siteinfo-example-replag": "Verificar o atraso de replicação atual.",
        "apihelp-query+stashimageinfo-summary": "Devolve informações dos ficheiros escondidos.",
index 4872186..c9615b1 100644 (file)
@@ -1126,7 +1126,7 @@ class MessageCache {
                        $wgParser->firstCallInit();
                        # Clone it and store it
                        $class = $wgParserConf['class'];
-                       if ( $class == 'ParserDiffTest' ) {
+                       if ( $class == ParserDiffTest::class ) {
                                # Uncloneable
                                $this->mParser = new $class( $wgParserConf );
                        } else {
index 5e0a688..26382aa 100644 (file)
@@ -199,22 +199,22 @@ class LocalisationCache {
                        switch ( $conf['store'] ) {
                                case 'files':
                                case 'file':
-                                       $storeClass = 'LCStoreCDB';
+                                       $storeClass = LCStoreCDB::class;
                                        break;
                                case 'db':
-                                       $storeClass = 'LCStoreDB';
+                                       $storeClass = LCStoreDB::class;
                                        break;
                                case 'array':
-                                       $storeClass = 'LCStoreStaticArray';
+                                       $storeClass = LCStoreStaticArray::class;
                                        break;
                                case 'detect':
                                        if ( !empty( $conf['storeDirectory'] ) ) {
-                                               $storeClass = 'LCStoreCDB';
+                                               $storeClass = LCStoreCDB::class;
                                        } elseif ( $wgCacheDirectory ) {
                                                $storeConf['directory'] = $wgCacheDirectory;
-                                               $storeClass = 'LCStoreCDB';
+                                               $storeClass = LCStoreCDB::class;
                                        } else {
-                                               $storeClass = 'LCStoreDB';
+                                               $storeClass = LCStoreDB::class;
                                        }
                                        break;
                                default:
index 6fa6907..f095b64 100644 (file)
@@ -71,7 +71,7 @@ class CategoryMembershipChange {
                        $this->timestamp = $revision->getTimestamp();
                }
                $this->revision = $revision;
-               $this->newForCategorizationCallback = [ 'RecentChange', 'newForCategorization' ];
+               $this->newForCategorizationCallback = [ RecentChange::class, 'newForCategorization' ];
        }
 
        /**
index 95848ea..7e4dd00 100644 (file)
@@ -408,19 +408,24 @@ class ChangeTags {
                sort( $prevTags );
                sort( $newTags );
                if ( $prevTags == $newTags ) {
-                       // No change.
                        return false;
                }
 
                if ( !$newTags ) {
-                       // no tags left, so delete the row altogether
+                       // No tags left, so delete the row altogether
                        $dbw->delete( 'tag_summary', $tsConds, __METHOD__ );
                } else {
-                       $dbw->replace( 'tag_summary',
-                               [ 'ts_rev_id', 'ts_rc_id', 'ts_log_id' ],
-                               array_filter( array_merge( $tsConds, [ 'ts_tags' => implode( ',', $newTags ) ] ) ),
-                               __METHOD__
-                       );
+                       // Specify the non-DEFAULT value columns in the INSERT/REPLACE clause
+                       $row = array_filter( [ 'ts_tags' => implode( ',', $newTags ) ] + $tsConds );
+                       // Check the unique keys for conflicts, ignoring any NULL *_id values
+                       $uniqueKeys = [];
+                       foreach ( [ 'ts_rev_id', 'ts_rc_id', 'ts_log_id' ] as $uniqueColumn ) {
+                               if ( isset( $row[$uniqueColumn] ) ) {
+                                       $uniqueKeys[] = [ $uniqueColumn ];
+                               }
+                       }
+
+                       $dbw->replace( 'tag_summary', $uniqueKeys, $row, __METHOD__ );
                }
 
                return true;
index afbbb2b..1559e1d 100644 (file)
@@ -43,10 +43,10 @@ abstract class ChangeTagsList extends RevisionListBase {
        ) {
                switch ( $typeName ) {
                        case 'revision':
-                               $className = 'ChangeTagsRevisionList';
+                               $className = ChangeTagsRevisionList::class;
                                break;
                        case 'logentry':
-                               $className = 'ChangeTagsLogList';
+                               $className = ChangeTagsLogList::class;
                                break;
                        default:
                                throw new Exception( "Class $typeName requested, but does not exist" );
index e2feb1f..90fabaf 100644 (file)
@@ -354,7 +354,7 @@ class DatabaseOracle extends Database {
                return $e['code'];
        }
 
-       function affectedRows() {
+       protected function fetchAffectedRowCount() {
                return $this->mAffectedRows;
        }
 
index aa1918d..8d1f476 100644 (file)
@@ -64,7 +64,7 @@ abstract class MWLBFactory {
                // When making changes here, remember to also specify MediaWiki-specific options
                // for Database classes in the relevant Installer subclass.
                // Such as MysqlInstaller::openConnection and PostgresInstaller::openConnectionWithParams.
-               if ( $lbConf['class'] === 'LBFactorySimple' ) {
+               if ( $lbConf['class'] === Wikimedia\Rdbms\LBFactorySimple::class ) {
                        if ( isset( $lbConf['servers'] ) ) {
                                // Server array is already explicitly configured; leave alone
                        } elseif ( is_array( $mainConfig->get( 'DBservers' ) ) ) {
@@ -132,7 +132,7 @@ abstract class MWLBFactory {
                        if ( !isset( $lbConf['externalClusters'] ) ) {
                                $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' );
                        }
-               } elseif ( $lbConf['class'] === 'LBFactoryMulti' ) {
+               } elseif ( $lbConf['class'] === Wikimedia\Rdbms\LBFactoryMulti::class ) {
                        if ( isset( $lbConf['serverTemplate'] ) ) {
                                if ( in_array( $lbConf['serverTemplate']['type'], $typesWithSchema, true ) ) {
                                        $lbConf['serverTemplate']['schema'] = $mainConfig->get( 'DBmwschema' );
index 8e750ca..cb0e066 100644 (file)
@@ -26,7 +26,7 @@ namespace MediaWiki\Logger;
  * Usage:
  * @code
  * $wgMWLoggerDefaultSpi = [
- *   'class' => '\\MediaWiki\\Logger\\LegacySpi',
+ *   'class' => \MediaWiki\Logger\LegacySpi::class,
  * ];
  * @endcode
  *
index 197b269..645eca9 100644 (file)
@@ -40,7 +40,7 @@ use ObjectFactory;
  * default SPI provider:
  * @code
  * $wgMWLoggerDefaultSpi = [
- *   'class' => '\\MediaWiki\\Logger\\MonologSpi',
+ *   'class' => \MediaWiki\Logger\MonologSpi::class,
  *   'args' => [ [
  *       'loggers' => [
  *           '@default' => [
@@ -54,29 +54,29 @@ use ObjectFactory;
  *       ],
  *       'processors' => [
  *           'wiki' => [
- *               'class' => '\\MediaWiki\\Logger\\Monolog\\WikiProcessor',
+ *               'class' => \MediaWiki\Logger\Monolog\WikiProcessor::class,
  *           ],
  *           'psr' => [
- *               'class' => '\\Monolog\\Processor\\PsrLogMessageProcessor',
+ *               'class' => \Monolog\Processor\PsrLogMessageProcessor::class,
  *           ],
  *           'pid' => [
- *               'class' => '\\Monolog\\Processor\\ProcessIdProcessor',
+ *               'class' => \Monolog\Processor\ProcessIdProcessor::class,
  *           ],
  *           'uid' => [
- *               'class' => '\\Monolog\\Processor\\UidProcessor',
+ *               'class' => \Monolog\Processor\UidProcessor::class,
  *           ],
  *           'web' => [
- *               'class' => '\\Monolog\\Processor\\WebProcessor',
+ *               'class' => \Monolog\Processor\WebProcessor::class,
  *           ],
  *       ],
  *       'handlers' => [
  *           'stream' => [
- *               'class'     => '\\Monolog\\Handler\\StreamHandler',
+ *               'class'     => \Monolog\Handler\StreamHandler::class,
  *               'args'      => [ 'path/to/your.log' ],
  *               'formatter' => 'line',
  *           ],
  *           'redis' => [
- *               'class'     => '\\Monolog\\Handler\\RedisHandler',
+ *               'class'     => \Monolog\Handler\RedisHandler::class,
  *               'args'      => [ function() {
  *                       $redis = new Redis();
  *                       $redis->connect( '127.0.0.1', 6379 );
@@ -88,7 +88,7 @@ use ObjectFactory;
  *               'buffer' => true,
  *           ],
  *           'udp2log' => [
- *               'class' => '\\MediaWiki\\Logger\\Monolog\\LegacyHandler',
+ *               'class' => \MediaWiki\Logger\Monolog\LegacyHandler::class,
  *               'args' => [
  *                   'udp://127.0.0.1:8420/mediawiki
  *               ],
@@ -97,10 +97,10 @@ use ObjectFactory;
  *       ],
  *       'formatters' => [
  *           'line' => [
- *               'class' => '\\Monolog\\Formatter\\LineFormatter',
+ *               'class' => \Monolog\Formatter\LineFormatter::class,
  *            ],
  *            'logstash' => [
- *                'class' => '\\Monolog\\Formatter\\LogstashFormatter',
+ *                'class' => \Monolog\Formatter\LogstashFormatter::class,
  *                'args'  => [ 'mediawiki', php_uname( 'n' ), null, '', 1 ],
  *            ],
  *       ],
index 4862157..d65c185 100644 (file)
@@ -29,7 +29,7 @@ use Psr\Log\NullLogger;
  * Usage:
  *
  *     $wgMWLoggerDefaultSpi = [
- *         'class' => '\\MediaWiki\\Logger\\NullSpi',
+ *         'class' => \MediaWiki\Logger\NullSpi::class,
  *     ];
  *
  * @see \MediaWiki\Logger\LoggerFactory
index 6d95919..16f226c 100644 (file)
@@ -55,7 +55,7 @@ class MWException extends Exception {
                global $wgLang;
 
                foreach ( $this->getTrace() as $frame ) {
-                       if ( isset( $frame['class'] ) && $frame['class'] === 'LocalisationCache' ) {
+                       if ( isset( $frame['class'] ) && $frame['class'] === LocalisationCache::class ) {
                                return false;
                        }
                }
index d863a2b..205ec77 100644 (file)
@@ -300,7 +300,7 @@ TXT;
                $logger = LoggerFactory::getInstance( 'fatal' );
                $logger->error( $msg, [
                        'fatal_exception' => [
-                               'class' => 'ErrorException',
+                               'class' => ErrorException::class,
                                'message' => "PHP Fatal Error: {$message}",
                                'code' => $level,
                                'file' => $file,
index b22e87b..dc8dfd0 100644 (file)
@@ -90,7 +90,7 @@ class MWExceptionRenderer {
        private static function useOutputPage( $e ) {
                // Can the extension use the Message class/wfMessage to get i18n-ed messages?
                foreach ( $e->getTrace() as $frame ) {
-                       if ( isset( $frame['class'] ) && $frame['class'] === 'LocalisationCache' ) {
+                       if ( isset( $frame['class'] ) && $frame['class'] === LocalisationCache::class ) {
                                return false;
                        }
                }
index 8182d62..9239c6c 100644 (file)
@@ -91,7 +91,7 @@ class FileBackendGroup {
                        // Get the FS backend configuration
                        $autoBackends[] = [
                                'name' => $backendName,
-                               'class' => 'FSFileBackend',
+                               'class' => FSFileBackend::class,
                                'lockManager' => 'fsLockManager',
                                'containerPaths' => [
                                        "{$repoName}-public" => "{$directory}",
@@ -155,7 +155,7 @@ class FileBackendGroup {
                        $config = $this->config( $name );
 
                        $class = $config['class'];
-                       if ( $class === 'FileBackendMultiWrite' ) {
+                       if ( $class === FileBackendMultiWrite::class ) {
                                foreach ( $config['backends'] as $index => $beConfig ) {
                                        if ( isset( $beConfig['template'] ) ) {
                                                // Config is just a modified version of a registered backend's.
@@ -190,9 +190,9 @@ class FileBackendGroup {
                        'wikiId' => wfWikiID(), // e.g. "my_wiki-en_"
                        'mimeCallback' => [ $this, 'guessMimeInternal' ],
                        'obResetFunc' => 'wfResetOutputBuffers',
-                       'streamMimeFunc' => [ 'StreamFile', 'contentTypeFromPath' ],
+                       'streamMimeFunc' => [ StreamFile::class, 'contentTypeFromPath' ],
                        'tmpDirectory' => wfTempDir(),
-                       'statusWrapper' => [ 'Status', 'wrap' ],
+                       'statusWrapper' => [ Status::class, 'wrap' ],
                        'wanCache' => MediaWikiServices::getInstance()->getMainWANObjectCache(),
                        'srvCache' => ObjectCache::getLocalServerInstance( 'hash' ),
                        'logger' => LoggerFactory::getInstance( 'FileOperation' ),
@@ -202,7 +202,7 @@ class FileBackendGroup {
                        LockManagerGroup::singleton( $config['wikiId'] )->get( $config['lockManager'] );
                $config['fileJournal'] = isset( $config['fileJournal'] )
                        ? FileJournal::factory( $config['fileJournal'], $name )
-                       : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $name );
+                       : FileJournal::factory( [ 'class' => NullFileJournal::class ], $name );
 
                return $config;
        }
index e6f992c..5d79dac 100644 (file)
@@ -116,7 +116,7 @@ class LockManagerGroup {
                if ( !isset( $this->managers[$name]['instance'] ) ) {
                        $class = $this->managers[$name]['class'];
                        $config = $this->managers[$name]['config'];
-                       if ( $class === 'DBLockManager' ) {
+                       if ( $class === DBLockManager::class ) {
                                $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                                $lb = $lbFactory->newMainLB( $config['domain'] );
                                $dbw = $lb->getLazyConnectionRef( DB_MASTER, [], $config['domain'] );
index 5d22b8d..b4df68a 100644 (file)
@@ -124,7 +124,7 @@ class FileRepo {
        protected $isPrivate;
 
        /** @var array callable Override these in the base class */
-       protected $fileFactory = [ 'UnregisteredLocalFile', 'newFromTitle' ];
+       protected $fileFactory = [ UnregisteredLocalFile::class, 'newFromTitle' ];
        /** @var array callable|bool Override these in the base class */
        protected $oldFileFactory = false;
        /** @var array callable|bool Override these in the base class */
@@ -1722,7 +1722,7 @@ class FileRepo {
         * @return Status
         */
        public function newFatal( $message /*, parameters...*/ ) {
-               $status = call_user_func_array( [ 'Status', 'newFatal' ], func_get_args() );
+               $status = call_user_func_array( [ Status::class, 'newFatal' ], func_get_args() );
                $status->cleanCallback = $this->getErrorCleanupFunction();
 
                return $status;
index 45a5c82..5a37701 100644 (file)
@@ -29,7 +29,7 @@ use MediaWiki\Logger\LoggerFactory;
  * Example config:
  *
  * $wgForeignFileRepos[] = [
- *   'class'                  => 'ForeignAPIRepo',
+ *   'class'                  => ForeignAPIRepo::class,
  *   'name'                   => 'shared',
  *   'apibase'                => 'https://en.wikipedia.org/w/api.php',
  *   'fetchDescription'       => true, // Optional
@@ -53,7 +53,7 @@ class ForeignAPIRepo extends FileRepo {
                'timestamp',
        ];
 
-       protected $fileFactory = [ 'ForeignAPIFile', 'newFromTitle' ];
+       protected $fileFactory = [ ForeignAPIFile::class, 'newFromTitle' ];
        /** @var int Check back with Commons after this expiry */
        protected $apiThumbCacheExpiry = 86400; // 1 day (24*3600)
 
index bce3005..7879448 100644 (file)
@@ -58,9 +58,9 @@ class ForeignDBRepo extends LocalRepo {
        protected $dbConn;
 
        /** @var callable */
-       protected $fileFactory = [ 'ForeignDBFile', 'newFromTitle' ];
+       protected $fileFactory = [ ForeignDBFile::class, 'newFromTitle' ];
        /** @var callable */
-       protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
+       protected $fileFromRowFactory = [ ForeignDBFile::class, 'newFromRow' ];
 
        /**
         * @param array|null $info
index bcd253f..249cd27 100644 (file)
@@ -37,10 +37,10 @@ class ForeignDBViaLBRepo extends LocalRepo {
        protected $tablePrefix;
 
        /** @var array */
-       protected $fileFactory = [ 'ForeignDBFile', 'newFromTitle' ];
+       protected $fileFactory = [ ForeignDBFile::class, 'newFromTitle' ];
 
        /** @var array */
-       protected $fileFromRowFactory = [ 'ForeignDBFile', 'newFromRow' ];
+       protected $fileFromRowFactory = [ ForeignDBFile::class, 'newFromRow' ];
 
        /** @var bool */
        protected $hasSharedCache;
index f5b83ae..1bf5346 100644 (file)
@@ -34,17 +34,17 @@ use Wikimedia\Rdbms\IDatabase;
  */
 class LocalRepo extends FileRepo {
        /** @var callable */
-       protected $fileFactory = [ 'LocalFile', 'newFromTitle' ];
+       protected $fileFactory = [ LocalFile::class, 'newFromTitle' ];
        /** @var callable */
-       protected $fileFactoryKey = [ 'LocalFile', 'newFromKey' ];
+       protected $fileFactoryKey = [ LocalFile::class, 'newFromKey' ];
        /** @var callable */
-       protected $fileFromRowFactory = [ 'LocalFile', 'newFromRow' ];
+       protected $fileFromRowFactory = [ LocalFile::class, 'newFromRow' ];
        /** @var callable */
-       protected $oldFileFromRowFactory = [ 'OldLocalFile', 'newFromRow' ];
+       protected $oldFileFromRowFactory = [ OldLocalFile::class, 'newFromRow' ];
        /** @var callable */
-       protected $oldFileFactory = [ 'OldLocalFile', 'newFromTitle' ];
+       protected $oldFileFactory = [ OldLocalFile::class, 'newFromTitle' ];
        /** @var callable */
-       protected $oldFileFactoryKey = [ 'OldLocalFile', 'newFromKey' ];
+       protected $oldFileFactoryKey = [ OldLocalFile::class, 'newFromKey' ];
 
        function __construct( array $info = null ) {
                parent::__construct( $info );
index 4e79de2..cfbd062 100644 (file)
@@ -148,7 +148,7 @@ abstract class File implements IDBAccessObject {
        protected $isSafeFile;
 
        /** @var string Required Repository class type */
-       protected $repoClass = 'FileRepo';
+       protected $repoClass = FileRepo::class;
 
        /** @var array Cache of tmp filepaths pointing to generated bucket thumbnails, keyed by width */
        protected $tmpBucketedThumbCache = [];
index 16c154f..8dcb289 100644 (file)
@@ -33,7 +33,7 @@ class ForeignAPIFile extends File {
        /** @var array */
        private $mInfo = [];
 
-       protected $repoClass = 'ForeignApiRepo';
+       protected $repoClass = ForeignApiRepo::class;
 
        /**
         * @param Title|string|bool $title
index 4248f95..7be8f06 100644 (file)
@@ -84,7 +84,7 @@ class LocalFile extends File {
        protected $deleted;
 
        /** @var string */
-       protected $repoClass = 'LocalRepo';
+       protected $repoClass = LocalRepo::class;
 
        /** @var int Number of line to return by nextHistoryLine() (constructor) */
        private $historyLine;
index 700c8ee..3183297 100644 (file)
@@ -113,12 +113,12 @@ abstract class ImageGalleryBase extends ContextSource {
        private static function loadModes() {
                if ( self::$modeMapping === false ) {
                        self::$modeMapping = [
-                               'traditional' => 'TraditionalImageGallery',
-                               'nolines' => 'NolinesImageGallery',
-                               'packed' => 'PackedImageGallery',
-                               'packed-hover' => 'PackedHoverImageGallery',
-                               'packed-overlay' => 'PackedOverlayImageGallery',
-                               'slideshow' => 'SlideshowImageGallery',
+                               'traditional' => TraditionalImageGallery::class,
+                               'nolines' => NolinesImageGallery::class,
+                               'packed' => PackedImageGallery::class,
+                               'packed-hover' => PackedHoverImageGallery::class,
+                               'packed-overlay' => PackedOverlayImageGallery::class,
+                               'slideshow' => SlideshowImageGallery::class,
                        ];
                        // Allow extensions to make a new gallery format.
                        Hooks::run( 'GalleryGetModes', [ &self::$modeMapping ] );
index 296c4b3..afb815f 100644 (file)
 class HTMLForm extends ContextSource {
        // A mapping of 'type' inputs onto standard HTMLFormField subclasses
        public static $typeMappings = [
-               'api' => 'HTMLApiField',
-               'text' => 'HTMLTextField',
-               'textwithbutton' => 'HTMLTextFieldWithButton',
-               'textarea' => 'HTMLTextAreaField',
-               'select' => 'HTMLSelectField',
-               'combobox' => 'HTMLComboboxField',
-               'radio' => 'HTMLRadioField',
-               'multiselect' => 'HTMLMultiSelectField',
-               'limitselect' => 'HTMLSelectLimitField',
-               'check' => 'HTMLCheckField',
-               'toggle' => 'HTMLCheckField',
-               'int' => 'HTMLIntField',
-               'float' => 'HTMLFloatField',
-               'info' => 'HTMLInfoField',
-               'selectorother' => 'HTMLSelectOrOtherField',
-               'selectandother' => 'HTMLSelectAndOtherField',
-               'namespaceselect' => 'HTMLSelectNamespace',
-               'namespaceselectwithbutton' => 'HTMLSelectNamespaceWithButton',
-               'tagfilter' => 'HTMLTagFilter',
-               'sizefilter' => 'HTMLSizeFilterField',
-               'submit' => 'HTMLSubmitField',
-               'hidden' => 'HTMLHiddenField',
-               'edittools' => 'HTMLEditTools',
-               'checkmatrix' => 'HTMLCheckMatrix',
-               'cloner' => 'HTMLFormFieldCloner',
-               'autocompleteselect' => 'HTMLAutoCompleteSelectField',
-               'date' => 'HTMLDateTimeField',
-               'time' => 'HTMLDateTimeField',
-               'datetime' => 'HTMLDateTimeField',
+               'api' => HTMLApiField::class,
+               'text' => HTMLTextField::class,
+               'textwithbutton' => HTMLTextFieldWithButton::class,
+               'textarea' => HTMLTextAreaField::class,
+               'select' => HTMLSelectField::class,
+               'combobox' => HTMLComboboxField::class,
+               'radio' => HTMLRadioField::class,
+               'multiselect' => HTMLMultiSelectField::class,
+               'limitselect' => HTMLSelectLimitField::class,
+               'check' => HTMLCheckField::class,
+               'toggle' => HTMLCheckField::class,
+               'int' => HTMLIntField::class,
+               'float' => HTMLFloatField::class,
+               'info' => HTMLInfoField::class,
+               'selectorother' => HTMLSelectOrOtherField::class,
+               'selectandother' => HTMLSelectAndOtherField::class,
+               'namespaceselect' => HTMLSelectNamespace::class,
+               'namespaceselectwithbutton' => HTMLSelectNamespaceWithButton::class,
+               'tagfilter' => HTMLTagFilter::class,
+               'sizefilter' => HTMLSizeFilterField::class,
+               'submit' => HTMLSubmitField::class,
+               'hidden' => HTMLHiddenField::class,
+               'edittools' => HTMLEditTools::class,
+               'checkmatrix' => HTMLCheckMatrix::class,
+               'cloner' => HTMLFormFieldCloner::class,
+               'autocompleteselect' => HTMLAutoCompleteSelectField::class,
+               'date' => HTMLDateTimeField::class,
+               'time' => HTMLDateTimeField::class,
+               'datetime' => HTMLDateTimeField::class,
                // HTMLTextField will output the correct type="" attribute automagically.
                // There are about four zillion other HTML5 input types, like range, but
                // we don't use those at the moment, so no point in adding all of them.
-               'email' => 'HTMLTextField',
-               'password' => 'HTMLTextField',
-               'url' => 'HTMLTextField',
-               'title' => 'HTMLTitleTextField',
-               'user' => 'HTMLUserTextField',
-               'usersmultiselect' => 'HTMLUsersMultiselectField',
+               'email' => HTMLTextField::class,
+               'password' => HTMLTextField::class,
+               'url' => HTMLTextField::class,
+               'title' => HTMLTitleTextField::class,
+               'user' => HTMLUserTextField::class,
+               'usersmultiselect' => HTMLUsersMultiselectField::class,
        ];
 
        public $mFieldData;
index 09bacad..e8a7e99 100644 (file)
@@ -102,7 +102,7 @@ class HTMLMultiSelectField extends HTMLFormField implements HTMLNestedFilterable
                if ( $this->mParent instanceof OOUIHTMLForm ) {
                        throw new MWException( 'HTMLMultiSelectField#getOneCheckbox() is not supported' );
                } else {
-                       $elementFunc = [ 'Html', $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ];
+                       $elementFunc = [ Html::class, $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ];
                        $checkbox =
                                Xml::check( "{$this->mName}[]", $checked, $attribs ) .
                                '&#160;' .
index c98e1ec..f3bcc0e 100644 (file)
@@ -78,7 +78,7 @@ class HTMLRadioField extends HTMLFormField {
                $html = '';
 
                $attribs = $this->getAttributes( [ 'disabled', 'tabindex' ] );
-               $elementFunc = [ 'Html', $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ];
+               $elementFunc = [ Html::class, $this->mOptionsLabelsNotFromMessage ? 'rawElement' : 'element' ];
 
                # @todo Should this produce an unordered list perhaps?
                foreach ( $options as $label => $info ) {
index 5978550..8991f5e 100644 (file)
@@ -65,7 +65,7 @@ class WikiImporter {
                $this->config = $config;
 
                if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) {
-                       stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
+                       stream_wrapper_register( 'uploadsource', UploadSourceAdapter::class );
                }
                $id = UploadSourceAdapter::registerSource( $source );
 
index 176d0af..2083500 100644 (file)
@@ -1072,7 +1072,7 @@ abstract class DatabaseUpdater {
                                "maintenance/populateLogUsertext.php.\n"
                        );
 
-                       $task = $this->maintenance->runChild( 'PopulateLogUsertext' );
+                       $task = $this->maintenance->runChild( PopulateLogUsertext::class );
                        $task->execute();
                        $this->output( "done.\n" );
                }
@@ -1088,7 +1088,7 @@ abstract class DatabaseUpdater {
                                "databases, you may want to hit Ctrl-C and do this manually with\n" .
                                "maintenance/populateLogSearch.php.\n" );
 
-                       $task = $this->maintenance->runChild( 'PopulateLogSearch' );
+                       $task = $this->maintenance->runChild( PopulateLogSearch::class );
                        $task->execute();
                        $this->output( "done.\n" );
                }
@@ -1128,7 +1128,7 @@ abstract class DatabaseUpdater {
                        }
 
                        $this->output( "Updating category collations..." );
-                       $task = $this->maintenance->runChild( 'UpdateCollation' );
+                       $task = $this->maintenance->runChild( UpdateCollation::class );
                        $task->execute();
                        $this->output( "...done.\n" );
                }
@@ -1139,7 +1139,7 @@ abstract class DatabaseUpdater {
         */
        protected function doMigrateUserOptions() {
                if ( $this->db->tableExists( 'user_properties' ) ) {
-                       $cl = $this->maintenance->runChild( 'ConvertUserOptions', 'convertUserOptions.php' );
+                       $cl = $this->maintenance->runChild( ConvertUserOptions::class, 'convertUserOptions.php' );
                        $cl->execute();
                        $this->output( "done.\n" );
                }
@@ -1177,7 +1177,9 @@ abstract class DatabaseUpdater {
                /**
                 * @var $cl RebuildLocalisationCache
                 */
-               $cl = $this->maintenance->runChild( 'RebuildLocalisationCache', 'rebuildLocalisationCache.php' );
+               $cl = $this->maintenance->runChild(
+                       RebuildLocalisationCache::class, 'rebuildLocalisationCache.php'
+               );
                $this->output( "Rebuilding localisation cache...\n" );
                $cl->setForce();
                $cl->execute();
@@ -1224,7 +1226,7 @@ abstract class DatabaseUpdater {
                                "databases, you may want to hit Ctrl-C and do this manually with\n" .
                                "maintenance/migrateComments.php.\n"
                        );
-                       $task = $this->maintenance->runChild( 'MigrateComments', 'migrateComments.php' );
+                       $task = $this->maintenance->runChild( MigrateComments::class, 'migrateComments.php' );
                        $task->execute();
                        $this->output( "done.\n" );
                }
@@ -1236,7 +1238,7 @@ abstract class DatabaseUpdater {
         */
        protected function migrateArchiveText() {
                $this->output( "Migrating archive ar_text to modern storage.\n" );
-               $task = $this->maintenance->runChild( 'MigrateArchiveText', 'migrateArchiveText.php' );
+               $task = $this->maintenance->runChild( MigrateArchiveText::class, 'migrateArchiveText.php' );
                $task->execute();
                $this->output( "done.\n" );
        }
index 5ea9bfe..5e018e0 100644 (file)
@@ -364,7 +364,7 @@ abstract class Installer {
 
                // disable (problematic) object cache types explicitly, preserving all other (working) ones
                // bug T113843
-               $emptyCache = [ 'class' => 'EmptyBagOStuff' ];
+               $emptyCache = [ 'class' => EmptyBagOStuff::class ];
 
                $objectCaches = [
                                CACHE_NONE => $emptyCache,
@@ -1677,7 +1677,7 @@ abstract class Installer {
                // implementation that won't stomp on PHP's cookies.
                $GLOBALS['wgSessionProviders'] = [
                        [
-                               'class' => 'InstallerSessionProvider',
+                               'class' => InstallerSessionProvider::class,
                                'args' => [ [
                                        'priority' => 1,
                                ] ]
index eba3a20..c9154b9 100644 (file)
@@ -30,9 +30,9 @@ class InstallerOverrides {
 
                if ( !$overrides ) {
                        $overrides = [
-                               'LocalSettingsGenerator' => 'LocalSettingsGenerator',
-                               'WebInstaller' => 'WebInstaller',
-                               'CliInstaller' => 'CliInstaller',
+                               'LocalSettingsGenerator' => LocalSettingsGenerator::class,
+                               'WebInstaller' => WebInstaller::class,
+                               'CliInstaller' => CliInstaller::class,
                        ];
                        foreach ( glob( "$IP/mw-config/overrides/*.php" ) as $file ) {
                                require $file;
index 44086a1..bce5405 100644 (file)
@@ -432,7 +432,7 @@ class MysqlUpdater extends DatabaseUpdater {
        }
 
        protected function doOldLinksUpdate() {
-               $cl = $this->maintenance->runChild( 'ConvertLinks' );
+               $cl = $this->maintenance->runChild( ConvertLinks::class );
                $cl->execute();
        }
 
@@ -942,7 +942,7 @@ class MysqlUpdater extends DatabaseUpdater {
                $this->output( "done.\n" );
 
                $this->output( "Migrating old restrictions to new table...\n" );
-               $task = $this->maintenance->runChild( 'UpdateRestrictions' );
+               $task = $this->maintenance->runChild( UpdateRestrictions::class );
                $task->execute();
        }
 
@@ -965,7 +965,7 @@ class MysqlUpdater extends DatabaseUpdater {
                        "may want to hit Ctrl-C and do this manually with maintenance/\n" .
                        "populateCategory.php.\n"
                );
-               $task = $this->maintenance->runChild( 'PopulateCategory' );
+               $task = $this->maintenance->runChild( PopulateCategory::class );
                $task->execute();
                $this->output( "Done populating category table.\n" );
        }
@@ -977,7 +977,7 @@ class MysqlUpdater extends DatabaseUpdater {
                                "databases, you may want to hit Ctrl-C and do this manually with\n" .
                                "maintenance/populateParentId.php.\n" );
 
-                       $task = $this->maintenance->runChild( 'PopulateParentId' );
+                       $task = $this->maintenance->runChild( PopulateParentId::class );
                        $task->execute();
                }
        }
index d5909f4..31718fe 100644 (file)
@@ -321,7 +321,7 @@ EOT;
                return "# SQLite-specific settings
 \$wgSQLiteDataDir = \"{$dir}\";
 \$wgObjectCaches[CACHE_DB] = [
-       'class' => 'SqlBagOStuff',
+       'class' => SqlBagOStuff::class,
        'loggroup' => 'SQLBagOStuff',
        'server' => [
                'type' => 'sqlite',
index 760986d..2280644 100644 (file)
@@ -67,7 +67,7 @@
        "config-env-php": "O PHP $1 está instalado.",
        "config-env-hhvm": "HHVM $1 está instalado.",
        "config-unicode-using-intl": "A usar a [http://pecl.php.net/intl extensão intl PECL] para a normalização Unicode.",
-       "config-unicode-pure-php-warning": "<strong>Aviso:</strong> A [http://pecl.php.net/intl extensão intl PECL] não está disponível para efetuar a normalização Unicode. Irá recorrer-se à implementação em PHP puro, que é mais lenta.\nSe o seu site tem alto volume de tráfego, devia informar-se um pouco sobre a [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations/pt normalização Unicode].",
+       "config-unicode-pure-php-warning": "<strong>Aviso:</strong> A [http://pecl.php.net/intl extensão intl PECL] não está disponível para efetuar a normalização Unicode. Irá recorrer-se à implementação em PHP puro, que é mais lenta.\nSe o seu sítio tem alto volume de tráfego, devia informar-se um pouco sobre a [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations/pt normalização Unicode].",
        "config-unicode-update-warning": "<strong>Aviso:</strong> A versão instalada do wrapper de normalização Unicode usa uma versão mais antiga da biblioteca do [http://site.icu-project.org/ projeto ICU].\nDevia [https://www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations atualizá-la] se tem quaisquer preocupações sobre o uso do Unicode.",
        "config-no-db": "Não foi possível encontrar um controlador apropriado da base de dados! Precisa de instalar um controlador da base de dados para o PHP. {{PLURAL:$2|É aceite o seguinte tipo|São aceites os seguintes tipos}} de base de dados: $1.\n\nSe fez a compilação do PHP, reconfigure-o com um cliente de base de dados ativado; por exemplo, usando <code>./configure --with-mysqli</code>.\nSe instalou o PHP a partir de um pacote Debian ou Ubuntu, então precisa de instalar também, por exemplo, o pacote <code>php5-mysql</code>.",
        "config-outdated-sqlite": "<strong>Aviso:</strong> Tem a versão $1 do SQLite, que é anterior à versão mínima necessária, a $2. O SQLite não estará disponível.",
        "config-mssql-windowsauth": "Autenticação do Windows",
        "config-site-name": "Nome da wiki:",
        "config-site-name-help": "Este nome aparecerá no título da janela do seu navegador e em vários outros sítios.",
-       "config-site-name-blank": "Introduza o nome do site.",
+       "config-site-name-blank": "Introduza o nome do sítio.",
        "config-project-namespace": "Espaço nominal do projeto:",
        "config-ns-generic": "Projeto",
        "config-ns-site-name": "O mesmo que o nome da wiki: $1",
        "config-logo": "URL do logótipo:",
        "config-logo-help": "O tema padrão do MediaWiki inclui espaço para um logótipo de 135x160 píxeis acima do menu da barra lateral.\nColoque na wiki uma imagem com estas dimensões e introduza aqui o URL dessa imagem.\n\nSe não pretende usar um logótipo, deixe este campo em branco.",
        "config-instantcommons": "Ativar Instant Commons",
-       "config-instantcommons-help": "O [https://www.mediawiki.org/wiki/InstantCommons Instant Commons] é uma funcionalidade que permite que as wikis usem imagens, áudio e outros ficheiros multimédia disponíveis no site [https://commons.wikimedia.org/ Wikimedia Commons].\nPara poder usá-los, o MediaWiki necessita de acesso à Internet.\n\nPara mais informações sobre esta funcionalidade, incluindo instruções sobre como configurá-la para usar outras wikis em vez da Wikimedia Commons, consulte o [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos Manual Técnico].",
+       "config-instantcommons-help": "O [https://www.mediawiki.org/wiki/InstantCommons Instant Commons] é uma funcionalidade que permite que as wikis usem imagens, áudio e outros ficheiros multimédia disponíveis no sítio [https://commons.wikimedia.org/ Wikimedia Commons].\nPara poder usá-los, o MediaWiki necessita de acesso à Internet.\n\nPara mais informações sobre esta funcionalidade, incluindo instruções sobre como configurá-la para usar outras wikis em vez da Wikimedia Commons, consulte o [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgForeignFileRepos Manual Técnico].",
        "config-cc-error": "O auxiliar de escolha de licenças da Creative Commons não produziu resultados.\nIntroduza o nome da licença manualmente.",
        "config-cc-again": "Escolha outra vez...",
        "config-cc-not-chosen": "Escolha a licença da Creative Commons que pretende e clique \"proceed\".",
        "config-advanced-settings": "Configuração avançada",
        "config-cache-options": "Configuração da cache de objetos:",
-       "config-cache-help": "A cache de objetos é usada para melhorar o desempenho do MediaWiki. Armazena dados usados com frequência.\nSites de tamanho médio ou grande são altamente encorajados a ativar esta funcionalidade e os sites pequenos também terão alguns benefícios em fazê-lo.",
+       "config-cache-help": "A cache de objetos é usada para melhorar o desempenho do MediaWiki. Armazena dados usados com frequência.\nSítios de tamanho médio ou grande são altamente encorajados a ativar esta funcionalidade e os sítios pequenos também terão alguns benefícios em fazê-lo.",
        "config-cache-none": "Sem cache (não é removida nenhuma funcionalidade, mas a velocidade de operação pode ser afectada nas wikis grandes)",
        "config-cache-accel": "Cache de objetos do PHP (APC, APCu, XCache ou WinCache)",
        "config-cache-memcached": "Usar Memcached (requer instalação e configurações adicionais)",
index 51308c1..08f960a 100644 (file)
@@ -175,7 +175,7 @@ abstract class FileBackend implements LoggerAwareInterface {
                        : new NullLockManager( [] );
                $this->fileJournal = isset( $config['fileJournal'] )
                        ? $config['fileJournal']
-                       : FileJournal::factory( [ 'class' => 'NullFileJournal' ], $this->name );
+                       : FileJournal::factory( [ 'class' => NullFileJournal::class ], $this->name );
                $this->readOnly = isset( $config['readOnly'] )
                        ? (string)$config['readOnly']
                        : '';
@@ -1597,7 +1597,7 @@ abstract class FileBackend implements LoggerAwareInterface {
        final protected function newStatus() {
                $args = func_get_args();
                if ( count( $args ) ) {
-                       $sv = call_user_func_array( [ 'StatusValue', 'newFatal' ], $args );
+                       $sv = call_user_func_array( [ StatusValue::class, 'newFatal' ], $args );
                } else {
                        $sv = StatusValue::newGood();
                }
index b8eec3f..da8b4ce 100644 (file)
@@ -1008,13 +1008,13 @@ abstract class FileBackendStore extends FileBackend {
         */
        final public function getOperationsInternal( array $ops ) {
                $supportedOps = [
-                       'store' => 'StoreFileOp',
-                       'copy' => 'CopyFileOp',
-                       'move' => 'MoveFileOp',
-                       'delete' => 'DeleteFileOp',
-                       'create' => 'CreateFileOp',
-                       'describe' => 'DescribeFileOp',
-                       'null' => 'NullFileOp'
+                       'store' => StoreFileOp::class,
+                       'copy' => CopyFileOp::class,
+                       'move' => MoveFileOp::class,
+                       'delete' => DeleteFileOp::class,
+                       'create' => CreateFileOp::class,
+                       'describe' => DescribeFileOp::class,
+                       'null' => NullFileOp::class
                ];
 
                $performOps = []; // array of FileOp objects
index aecdf60..6274d60 100644 (file)
@@ -69,10 +69,10 @@ class MemcLockManager extends QuorumLockManager {
                $this->srvsByBucket = array_values( $this->srvsByBucket ); // consecutive
 
                $memcConfig = isset( $config['memcConfig'] ) ? $config['memcConfig'] : [];
-               $memcConfig += [ 'class' => 'MemcachedPhpBagOStuff' ]; // default
+               $memcConfig += [ 'class' => MemcachedPhpBagOStuff::class ]; // default
 
                $class = $memcConfig['class'];
-               if ( !is_subclass_of( $class, 'MemcachedBagOStuff' ) ) {
+               if ( !is_subclass_of( $class, MemcachedBagOStuff::class ) ) {
                        throw new InvalidArgumentException( "$class is not of type MemcachedBagOStuff." );
                }
 
index 409f507..08424c9 100644 (file)
@@ -419,6 +419,12 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         *
         * Setting 'lag' and 'since' help avoids keys getting stuck in stale states.
         *
+        * Be aware that this does not update the process cache for getWithSetCallback()
+        * callers. Keys accessed via that method are not generally meant to also be set
+        * using this primitive method.
+        *
+        * Do not use this method on versioned keys accessed via getWithSetCallback().
+        *
         * Example usage:
         * @code
         *     $dbr = wfGetDB( DB_REPLICA );
@@ -535,6 +541,10 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         *
         * Note that set() can also be lag-aware and lower the TTL if it's high.
         *
+        * Be aware that this does not clear the process cache. Even if it did, callbacks
+        * used by getWithSetCallback() might still return stale data in the case of either
+        * uncommitted or not-yet-replicated changes (callback generally use replica DBs).
+        *
         * When using potentially long-running ACID transactions, a good pattern is
         * to use a pre-commit hook to issue the delete. This means that immediately
         * after commit, callers will see the tombstone in cache upon purge relay.
index 1efa9a1..f3877fb 100644 (file)
@@ -126,6 +126,8 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        protected $delimiter = ';';
        /** @var DatabaseDomain */
        protected $currentDomain;
+       /** @var integer|null Rows affected by the last query to query() or its CRUD wrappers */
+       protected $affectedRowCount;
 
        /**
         * Either 1 if a transaction is active or 0 otherwise.
@@ -1002,8 +1004,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        }
 
        /**
-        * Helper method for query() that handles profiling and logging and sends
-        * the query to doQuery()
+        * Wrapper for query() that also handles profiling, logging, and affected row count updates
         *
         * @param string $sql Original SQL query
         * @param string $commentedSql SQL query with debugging/trace comment
@@ -1029,7 +1030,9 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                if ( $this->profiler ) {
                        call_user_func( [ $this->profiler, 'profileIn' ], $queryProf );
                }
+               $this->affectedRowCount = null;
                $ret = $this->doQuery( $commentedSql );
+               $this->affectedRowCount = $this->affectedRows();
                if ( $this->profiler ) {
                        call_user_func( [ $this->profiler, 'profileOut' ], $queryProf );
                }
@@ -2238,51 +2241,49 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        }
 
        public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
-               $quotedTable = $this->tableName( $table );
-
                if ( count( $rows ) == 0 ) {
                        return;
                }
 
-               # Single row case
+               // Single row case
                if ( !is_array( reset( $rows ) ) ) {
                        $rows = [ $rows ];
                }
 
-               // @FXIME: this is not atomic, but a trx would break affectedRows()
+               $affectedRowCount = 0;
                foreach ( $rows as $row ) {
-                       # Delete rows which collide
-                       if ( $uniqueIndexes ) {
-                               $sql = "DELETE FROM $quotedTable WHERE ";
-                               $first = true;
-                               foreach ( $uniqueIndexes as $index ) {
-                                       if ( $first ) {
-                                               $first = false;
-                                               $sql .= '( ';
-                                       } else {
-                                               $sql .= ' ) OR ( ';
-                                       }
-                                       if ( is_array( $index ) ) {
-                                               $first2 = true;
-                                               foreach ( $index as $col ) {
-                                                       if ( $first2 ) {
-                                                               $first2 = false;
-                                                       } else {
-                                                               $sql .= ' AND ';
-                                                       }
-                                                       $sql .= $col . '=' . $this->addQuotes( $row[$col] );
-                                               }
-                                       } else {
-                                               $sql .= $index . '=' . $this->addQuotes( $row[$index] );
-                                       }
+                       // Delete rows which collide with this one
+                       $indexWhereClauses = [];
+                       foreach ( $uniqueIndexes as $index ) {
+                               $indexColumns = (array)$index;
+                               $indexRowValues = array_intersect_key( $row, array_flip( $indexColumns ) );
+                               if ( count( $indexRowValues ) != count( $indexColumns ) ) {
+                                       throw new DBUnexpectedError(
+                                               $this,
+                                               'New record does not provide all values for unique key (' .
+                                                       implode( ', ', $indexColumns ) . ')'
+                                       );
+                               } elseif ( in_array( null, $indexRowValues, true ) ) {
+                                       throw new DBUnexpectedError(
+                                               $this,
+                                               'New record has a null value for unique key (' .
+                                                       implode( ', ', $indexColumns ) . ')'
+                                       );
                                }
-                               $sql .= ' )';
-                               $this->query( $sql, $fname );
+                               $indexWhereClauses[] = $this->makeList( $indexRowValues, LIST_AND );
+                       }
+
+                       if ( $indexWhereClauses ) {
+                               $this->delete( $table, $this->makeList( $indexWhereClauses, LIST_OR ), $fname );
+                               $affectedRowCount += $this->affectedRows();
                        }
 
-                       # Now insert the row
+                       // Now insert the row
                        $this->insert( $table, $row, $fname );
+                       $affectedRowCount += $this->affectedRows();
                }
+
+               $this->affectedRowCount = $affectedRowCount;
        }
 
        /**
@@ -2347,6 +2348,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                        $where = false;
                }
 
+               $affectedRowCount = 0;
                $useTrx = !$this->mTrxLevel;
                if ( $useTrx ) {
                        $this->begin( $fname, self::TRANSACTION_INTERNAL );
@@ -2355,11 +2357,13 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                        # Update any existing conflicting row(s)
                        if ( $where !== false ) {
                                $ok = $this->update( $table, $set, $where, $fname );
+                               $affectedRowCount += $this->affectedRows();
                        } else {
                                $ok = true;
                        }
                        # Now insert any non-conflicting row(s)
                        $ok = $this->insert( $table, $rows, $fname, [ 'IGNORE' ] ) && $ok;
+                       $affectedRowCount += $this->affectedRows();
                } catch ( Exception $e ) {
                        if ( $useTrx ) {
                                $this->rollback( $fname, self::FLUSHING_INTERNAL );
@@ -2369,6 +2373,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                if ( $useTrx ) {
                        $this->commit( $fname, self::FLUSHING_INTERNAL );
                }
+               $this->affectedRowCount = $affectedRowCount;
 
                return $ok;
        }
@@ -3187,6 +3192,17 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                }
        }
 
+       public function affectedRows() {
+               return ( $this->affectedRowCount === null )
+                       ? $this->fetchAffectedRowCount() // default to driver value
+                       : $this->affectedRowCount;
+       }
+
+       /**
+        * @return int Number of retrieved rows according to the driver
+        */
+       abstract protected function fetchAffectedRowCount();
+
        /**
         * Take the result from a query, and wrap it in a ResultWrapper if
         * necessary. Boolean values are passed through as is, to indicate success
index 53beb65..832ed9e 100644 (file)
@@ -353,7 +353,7 @@ class DatabaseMssql extends Database {
        /**
         * @return int
         */
-       public function affectedRows() {
+       protected function fetchAffectedRowCount() {
                return $this->mAffectedRows;
        }
 
index 305a056..6a545ce 100644 (file)
@@ -63,6 +63,8 @@ abstract class DatabaseMysqlBase extends Database {
 
        /** @var string|null */
        private $serverVersion = null;
+       /** @var bool|null */
+       private $insertSelectIsSafe = null;
 
        /**
         * Additional $params include:
@@ -75,6 +77,7 @@ abstract class DatabaseMysqlBase extends Database {
         *       ID of this server's master will be used. Set the "conds" field to
         *       override the query conditions, e.g. ['shard' => 's1'].
         *   - useGTIDs : use GTID methods like MASTER_GTID_WAIT() when possible.
+        *   - insertSelectIsSafe : force that native INSERT SELECT is or is not safe [default: null]
         *   - sslKeyPath : path to key file [default: null]
         *   - sslCertPath : path to certificate file [default: null]
         *   - sslCAFile: path to a single certificate authority PEM file [default: null]
@@ -98,6 +101,8 @@ abstract class DatabaseMysqlBase extends Database {
                }
                $this->sqlMode = isset( $params['sqlMode'] ) ? $params['sqlMode'] : '';
                $this->utf8Mode = !empty( $params['utf8Mode'] );
+               $this->insertSelectIsSafe = isset( $params['insertSelectIsSafe'] )
+                       ? (bool)$params['insertSelectIsSafe'] : null;
 
                parent::__construct( $params );
        }
@@ -501,6 +506,56 @@ abstract class DatabaseMysqlBase extends Database {
                return $this->nativeReplace( $table, $rows, $fname );
        }
 
+       protected function nativeInsertSelect(
+               $destTable, $srcTable, $varMap, $conds,
+               $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
+       ) {
+               if ( $this->insertSelectIsSafe === null ) {
+                       // In MySQL, an INSERT SELECT is only replication safe with row-based
+                       // replication or if innodb_autoinc_lock_mode is 0. When those
+                       // conditions aren't met, use non-native mode.
+                       // While we could try to determine if the insert is safe anyway by
+                       // checking if the target table has an auto-increment column that
+                       // isn't set in $varMap, that seems unlikely to be worth the extra
+                       // complexity.
+                       $row = $this->selectRow(
+                               false,
+                               [
+                                       'innodb_autoinc_lock_mode' => '@@innodb_autoinc_lock_mode',
+                                       'binlog_format' => '@@binlog_format',
+                               ],
+                               [],
+                               __METHOD__
+                       );
+                       $this->insertSelectIsSafe = $row->binlog_format === 'ROW' ||
+                               (int)$row->innodb_autoinc_lock_mode === 0;
+               }
+
+               if ( !$this->insertSelectIsSafe ) {
+                       return $this->nonNativeInsertSelect(
+                               $destTable,
+                               $srcTable,
+                               $varMap,
+                               $conds,
+                               $fname,
+                               $insertOptions,
+                               $selectOptions,
+                               $selectJoinConds
+                       );
+               } else {
+                       return parent::nativeInsertSelect(
+                               $destTable,
+                               $srcTable,
+                               $varMap,
+                               $conds,
+                               $fname,
+                               $insertOptions,
+                               $selectOptions,
+                               $selectJoinConds
+                       );
+               }
+       }
+
        /**
         * Estimate rows in dataset
         * Returns estimated count, based on EXPLAIN output
@@ -834,8 +889,10 @@ abstract class DatabaseMysqlBase extends Database {
                        return 0; // already reached this point for sure
                }
 
+               $useGTID = ( $this->useGTIDs && $pos->gtids );
+
                // Call doQuery() directly, to avoid opening a transaction if DBO_TRX is set
-               if ( $this->useGTIDs && $pos->gtids ) {
+               if ( $useGTID ) {
                        // Wait on the GTID set (MariaDB only)
                        $gtidArg = $this->addQuotes( implode( ',', $pos->gtids ) );
                        $res = $this->doQuery( "SELECT MASTER_GTID_WAIT($gtidArg, $timeout)" );
@@ -855,14 +912,17 @@ abstract class DatabaseMysqlBase extends Database {
                // Result can be NULL (error), -1 (timeout), or 0+ per the MySQL manual
                $status = ( $row[0] !== null ) ? intval( $row[0] ) : null;
                if ( $status === null ) {
-                       // T126436: jobs programmed to wait on master positions might be referencing binlogs
-                       // with an old master hostname. Such calls make MASTER_POS_WAIT() return null. Try
-                       // to detect this and treat the replica DB as having reached the position; a proper master
-                       // switchover already requires that the new master be caught up before the switch.
-                       $replicationPos = $this->getReplicaPos();
-                       if ( $replicationPos && !$replicationPos->channelsMatch( $pos ) ) {
-                               $this->lastKnownReplicaPos = $replicationPos;
-                               $status = 0;
+                       if ( !$useGTID ) {
+                               // T126436: jobs programmed to wait on master positions might be referencing
+                               // binlogs with an old master hostname; this makes MASTER_POS_WAIT() return null.
+                               // Try to detect this case and treat the replica DB as having reached the given
+                               // position (any master switchover already requires that the new master be caught
+                               // up before the switch).
+                               $replicationPos = $this->getReplicaPos();
+                               if ( $replicationPos && !$replicationPos->channelsMatch( $pos ) ) {
+                                       $this->lastKnownReplicaPos = $replicationPos;
+                                       $status = 0;
+                               }
                        }
                } elseif ( $status >= 0 ) {
                        // Remember that this position was reached to save queries next time
index c1a5698..09ea66c 100644 (file)
@@ -172,7 +172,7 @@ class DatabaseMysqli extends DatabaseMysqlBase {
        /**
         * @return int
         */
-       function affectedRows() {
+       protected function fetchAffectedRowCount() {
                $conn = $this->getBindingHandle();
 
                return $conn->affected_rows;
index 8c21d72..5bf845b 100644 (file)
@@ -384,7 +384,7 @@ class DatabasePostgres extends Database {
                }
        }
 
-       public function affectedRows() {
+       protected function fetchAffectedRowCount() {
                if ( !is_null( $this->mAffectedRows ) ) {
                        // Forced result for simulated queries
                        return $this->mAffectedRows;
index 2b06607..01772cf 100644 (file)
@@ -56,6 +56,9 @@ class DatabaseSqlite extends Database {
        /** @var FSLockManager (hopefully on the same server as the DB) */
        protected $lockMgr;
 
+       /** @var array List of shared database already attached to this connection */
+       private $alreadyAttached = [];
+
        /**
         * Additional params include:
         *   - dbDirectory : directory containing the DB and the lock file directory
@@ -82,16 +85,7 @@ class DatabaseSqlite extends Database {
                        parent::__construct( $p );
                        // Super doesn't open when $user is false, but we can work with $dbName
                        if ( $p['dbname'] && !$this->isOpen() ) {
-                               if ( $this->open( $p['host'], $p['user'], $p['password'], $p['dbname'] ) ) {
-                                       $done = [];
-                                       foreach ( $this->tableAliases as $params ) {
-                                               if ( isset( $done[$params['dbname']] ) ) {
-                                                       continue;
-                                               }
-                                               $this->attachDatabase( $params['dbname'] );
-                                               $done[$params['dbname']] = 1;
-                                       }
-                               }
+                               $this->open( $p['host'], $p['user'], $p['password'], $p['dbname'] );
                        }
                }
 
@@ -302,6 +296,14 @@ class DatabaseSqlite extends Database {
                return parent::isWriteQuery( $sql ) && !preg_match( '/^(ATTACH|PRAGMA)\b/i', $sql );
        }
 
+       protected function isTransactableQuery( $sql ) {
+               return parent::isTransactableQuery( $sql ) && !in_array(
+                       $this->getQueryVerb( $sql ),
+                       [ 'ATTACH', 'PRAGMA' ],
+                       true
+               );
+       }
+
        /**
         * SQLite doesn't allow buffered results or data seeking etc, so we'll use fetchAll as the result
         *
@@ -494,7 +496,7 @@ class DatabaseSqlite extends Database {
        /**
         * @return int
         */
-       function affectedRows() {
+       protected function fetchAffectedRowCount() {
                return $this->mAffectedRows;
        }
 
@@ -1033,6 +1035,17 @@ class DatabaseSqlite extends Database {
                return $this->query( $sql, $fName );
        }
 
+       public function setTableAliases( array $aliases ) {
+               parent::setTableAliases( $aliases );
+               foreach ( $this->tableAliases as $params ) {
+                       if ( isset( $this->alreadyAttached[$params['dbname']] ) ) {
+                               continue;
+                       }
+                       $this->attachDatabase( $params['dbname'] );
+                       $this->alreadyAttached[$params['dbname']] = true;
+               }
+       }
+
        protected function requiresDatabaseUser() {
                return false; // just a file
        }
index 85b3481..0964dd5 100644 (file)
@@ -1255,6 +1255,11 @@ interface IDatabase {
         * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
         * into another table.
         *
+        * @warning If the insert will use an auto-increment or sequence to
+        *  determine the value of a column, this may break replication on
+        *  databases using statement-based replication if the SELECT is not
+        *  deterministically ordered.
+        *
         * @param string $destTable The table name to insert into
         * @param string|array $srcTable May be either a table name, or an array of table names
         *    to include in a join.
index 298ec61..4b79044 100644 (file)
@@ -15,7 +15,7 @@ class MssqlResultWrapper extends ResultWrapper {
                $res = $this->result;
 
                if ( $this->mSeekTo !== null ) {
-                       $result = sqlsrv_fetch_object( $res, 'stdClass', [],
+                       $result = sqlsrv_fetch_object( $res, stdClass::class, [],
                                SQLSRV_SCROLL_ABSOLUTE, $this->mSeekTo );
                        $this->mSeekTo = null;
                } else {
index c737563..b5e1a80 100644 (file)
@@ -77,4 +77,4 @@ class LoadBalancerSingle extends LoadBalancer {
        }
 }
 
-class_alias( 'Wikimedia\Rdbms\LoadBalancerSingle', 'LoadBalancerSingle' );
+class_alias( LoadBalancerSingle::class, 'LoadBalancerSingle' );
index 2d7e8f2..491726b 100644 (file)
@@ -27,7 +27,7 @@
  */
 class CategoryPage extends Article {
        # Subclasses can change this to override the viewer class.
-       protected $mCategoryViewerClass = 'CategoryViewer';
+       protected $mCategoryViewerClass = CategoryViewer::class;
 
        /**
         * @var WikiCategoryPage
index 831c1ff..b2d8511 100644 (file)
@@ -270,15 +270,15 @@ class Parser {
                        $this->mPreprocessorClass = $conf['preprocessorClass'];
                } elseif ( defined( 'HPHP_VERSION' ) ) {
                        # Preprocessor_Hash is much faster than Preprocessor_DOM under HipHop
-                       $this->mPreprocessorClass = 'Preprocessor_Hash';
+                       $this->mPreprocessorClass = Preprocessor_Hash::class;
                } elseif ( extension_loaded( 'domxml' ) ) {
                        # PECL extension that conflicts with the core DOM extension (T15770)
                        wfDebug( "Warning: you have the obsolete domxml extension for PHP. Please remove it!\n" );
-                       $this->mPreprocessorClass = 'Preprocessor_Hash';
+                       $this->mPreprocessorClass = Preprocessor_Hash::class;
                } elseif ( extension_loaded( 'dom' ) ) {
-                       $this->mPreprocessorClass = 'Preprocessor_DOM';
+                       $this->mPreprocessorClass = Preprocessor_DOM::class;
                } else {
-                       $this->mPreprocessorClass = 'Preprocessor_Hash';
+                       $this->mPreprocessorClass = Preprocessor_Hash::class;
                }
                wfDebug( __CLASS__ . ": using preprocessor: {$this->mPreprocessorClass}\n" );
        }
index f99089b..2f284af 100644 (file)
@@ -1059,8 +1059,8 @@ class ParserOptions {
                                'printable' => false,
                                'allowUnsafeRawHtml' => true,
                                'wrapclass' => 'mw-parser-output',
-                               'currentRevisionCallback' => [ 'Parser', 'statelessFetchRevision' ],
-                               'templateCallback' => [ 'Parser', 'statelessFetchTemplate' ],
+                               'currentRevisionCallback' => [ Parser::class, 'statelessFetchRevision' ],
+                               'templateCallback' => [ Parser::class, 'statelessFetchTemplate' ],
                                'speculativeRevIdCallback' => null,
                        ];
 
index 79021dd..4db2855 100644 (file)
@@ -823,7 +823,7 @@ class PPDStack {
         */
        public $top;
        public $out;
-       public $elementClass = 'PPDStackElement';
+       public $elementClass = PPDStackElement::class;
 
        public static $false = false;
 
@@ -931,7 +931,7 @@ class PPDStackElement {
         */
        public $lineStart;
 
-       public $partClass = 'PPDPart';
+       public $partClass = PPDPart::class;
 
        public function __construct( $data = [] ) {
                $class = $this->partClass;
index 468b009..c4c0c5a 100644 (file)
@@ -792,7 +792,7 @@ class Preprocessor_Hash extends Preprocessor {
 class PPDStack_Hash extends PPDStack {
 
        public function __construct() {
-               $this->elementClass = 'PPDStackElement_Hash';
+               $this->elementClass = PPDStackElement_Hash::class;
                parent::__construct();
                $this->rootAccum = [];
        }
@@ -805,7 +805,7 @@ class PPDStack_Hash extends PPDStack {
 class PPDStackElement_Hash extends PPDStackElement {
 
        public function __construct( $data = [] ) {
-               $this->partClass = 'PPDPart_Hash';
+               $this->partClass = PPDPart_Hash::class;
                parent::__construct( $data );
        }
 
@@ -1766,12 +1766,12 @@ class PPNode_Hash_Tree implements PPNode {
 
                $descriptor = $store[$index];
                if ( is_string( $descriptor ) ) {
-                       $class = 'PPNode_Hash_Text';
+                       $class = PPNode_Hash_Text::class;
                } elseif ( is_array( $descriptor ) ) {
                        if ( $descriptor[self::NAME][0] === '@' ) {
-                               $class = 'PPNode_Hash_Attr';
+                               $class = PPNode_Hash_Attr::class;
                        } else {
-                               $class = 'PPNode_Hash_Tree';
+                               $class = self::class;
                        }
                } else {
                        throw new MWException( __METHOD__.': invalid node descriptor' );
index b570a43..de7a6fa 100644 (file)
@@ -1171,7 +1171,9 @@ class Sanitizer {
                # Stupid hack
                $encValue = preg_replace_callback(
                        '/((?i)' . wfUrlProtocols() . ')/',
-                       [ 'Sanitizer', 'armorLinksCallback' ],
+                       function ( $matches ) {
+                               return str_replace( ':', '&#58;', $matches[1] );
+                       },
                        $encValue );
                return $encValue;
        }
@@ -1416,15 +1418,6 @@ class Sanitizer {
                return $html;
        }
 
-       /**
-        * Regex replace callback for armoring links against further processing.
-        * @param array $matches
-        * @return string
-        */
-       private static function armorLinksCallback( $matches ) {
-               return str_replace( ':', '&#58;', $matches[1] );
-       }
-
        /**
         * Return an associative array of attribute names and values from
         * a partial tag string. Attribute names are forced to lowercase,
@@ -1549,7 +1542,7 @@ class Sanitizer {
        static function normalizeCharReferences( $text ) {
                return preg_replace_callback(
                        self::CHAR_REFS_REGEX,
-                       [ 'Sanitizer', 'normalizeCharReferencesCallback' ],
+                       [ self::class, 'normalizeCharReferencesCallback' ],
                        $text );
        }
 
@@ -1649,7 +1642,7 @@ class Sanitizer {
        public static function decodeCharReferences( $text ) {
                return preg_replace_callback(
                        self::CHAR_REFS_REGEX,
-                       [ 'Sanitizer', 'decodeCharReferencesCallback' ],
+                       [ self::class, 'decodeCharReferencesCallback' ],
                        $text );
        }
 
@@ -1667,7 +1660,7 @@ class Sanitizer {
                global $wgContLang;
                $text = preg_replace_callback(
                        self::CHAR_REFS_REGEX,
-                       [ 'Sanitizer', 'decodeCharReferencesCallback' ],
+                       [ self::class, 'decodeCharReferencesCallback' ],
                        $text,
                        -1, //limit
                        $count
index 3383fe3..bc37b48 100644 (file)
@@ -41,7 +41,7 @@ final class PasswordFactory {
         * @see Setup.php
         */
        private $types = [
-               '' => [ 'type' => '', 'class' => 'InvalidPassword' ],
+               '' => [ 'type' => '', 'class' => InvalidPassword::class ],
        ];
 
        /**
index a23d644..c1e9a59 100644 (file)
@@ -205,7 +205,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
 
                // Handling for multiselect preferences
                if ( ( isset( $info['type'] ) && $info['type'] == 'multiselect' ) ||
-                               ( isset( $info['class'] ) && $info['class'] == 'HTMLMultiSelectField' ) ) {
+                               ( isset( $info['class'] ) && $info['class'] == \HTMLMultiSelectField::class ) ) {
                        $options = HTMLFormField::flattenOptions( $info['options'] );
                        $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
                        $val = [];
@@ -219,7 +219,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
 
                // Handling for checkmatrix preferences
                if ( ( isset( $info['type'] ) && $info['type'] == 'checkmatrix' ) ||
-                               ( isset( $info['class'] ) && $info['class'] == 'HTMLCheckMatrix' ) ) {
+                               ( isset( $info['class'] ) && $info['class'] == \HTMLCheckMatrix::class ) ) {
                        $columns = HTMLFormField::flattenOptions( $info['columns'] );
                        $rows = HTMLFormField::flattenOptions( $info['rows'] );
                        $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
@@ -799,7 +799,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                }
 
                $defaultPreferences['timecorrection'] = [
-                       'class' => 'HTMLSelectOrOtherField',
+                       'class' => \HTMLSelectOrOtherField::class,
                        'label-message' => 'timezonelegend',
                        'options' => $tzOptions,
                        'default' => $tzSetting,
@@ -1401,7 +1401,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
        public function getForm(
                User $user,
                IContextSource $context,
-               $formClass = 'PreferencesForm',
+               $formClass = PreferencesForm::class,
                array $remove = []
        ) {
                $formDescriptor = $this->getFormDescriptor( $user, $context );
index 35237be..685f78c 100644 (file)
@@ -62,7 +62,7 @@ interface PreferencesFactory {
        public function getForm(
                User $user,
                IContextSource $contextSource,
-               $formClass = 'PreferencesForm',
+               $formClass = \PreferencesForm::class,
                array $remove = []
        );
 
index 81449be..9021652 100644 (file)
@@ -64,7 +64,7 @@ abstract class Profiler {
                        global $wgProfiler, $wgProfileLimit;
 
                        $params = [
-                               'class'     => 'ProfilerStub',
+                               'class'     => ProfilerStub::class,
                                'sampling'  => 1,
                                'threshold' => $wgProfileLimit,
                                'output'    => [],
@@ -76,7 +76,7 @@ abstract class Profiler {
                        $inSample = mt_rand( 0, $params['sampling'] - 1 ) === 0;
                        // wfIsCLI() is not available yet
                        if ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' || !$inSample ) {
-                               $params['class'] = 'ProfilerStub';
+                               $params['class'] = ProfilerStub::class;
                        }
 
                        if ( !is_array( $params['output'] ) ) {
index 41260a8..a7bc137 100644 (file)
@@ -22,7 +22,7 @@
  * Profiler that only tracks explicit profiling sections
  *
  * @code
- * $wgProfiler['class'] = 'ProfilerSectionOnly';
+ * $wgProfiler['class'] = ProfilerSectionOnly::class;
  * $wgProfiler['output'] = 'text';
  * $wgProfiler['visible'] = true;
  * @endcode
index 09191ee..ffa441e 100644 (file)
  * Profiler wrapper for XHProf extension.
  *
  * @code
- * $wgProfiler['class'] = 'ProfilerXhprof';
+ * $wgProfiler['class'] = ProfilerXhprof::class;
  * $wgProfiler['flags'] = XHPROF_FLAGS_NO_BUILTINS;
  * $wgProfiler['output'] = 'text';
  * $wgProfiler['visible'] = true;
  * @endcode
  *
  * @code
- * $wgProfiler['class'] = 'ProfilerXhprof';
+ * $wgProfiler['class'] = ProfilerXhprof::class;
  * $wgProfiler['flags'] = XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | XHPROF_FLAGS_NO_BUILTINS;
  * $wgProfiler['output'] = 'udp';
  * @endcode
index ef26d1e..830dbb4 100644 (file)
@@ -553,7 +553,7 @@ class ResourceLoader implements LoggerAwareInterface {
                                $object->setLogger( $this->logger );
                        } else {
                                if ( !isset( $info['class'] ) ) {
-                                       $class = 'ResourceLoaderFileModule';
+                                       $class = ResourceLoaderFileModule::class;
                                } else {
                                        $class = $info['class'];
                                }
@@ -586,8 +586,8 @@ class ResourceLoader implements LoggerAwareInterface {
                }
                if (
                        isset( $info['class'] ) &&
-                       $info['class'] !== 'ResourceLoaderFileModule' &&
-                       !is_subclass_of( $info['class'], 'ResourceLoaderFileModule' )
+                       $info['class'] !== ResourceLoaderFileModule::class &&
+                       !is_subclass_of( $info['class'], ResourceLoaderFileModule::class )
                ) {
                        return false;
                }
index 458c44d..ffa55c0 100644 (file)
@@ -51,10 +51,12 @@ class ResourceLoaderUserOptionsModule extends ResourceLoaderModule {
         * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
-               return Xml::encodeJsCall( 'mw.user.options.set',
+               // Use FILTER_NOMIN annotation to prevent needless minification and caching (T84960).
+               return ResourceLoader::FILTER_NOMIN . Xml::encodeJsCall(
+                       'mw.user.options.set',
                        [ $context->getUserObj()->getOptions( User::GETOPTIONS_EXCLUDE_DEFAULTS ) ],
                        ResourceLoader::inDebugMode()
-               ) . ResourceLoader::FILTER_NOMIN;
+               );
        }
 
        /**
index e933f1f..ae4fb67 100644 (file)
@@ -48,19 +48,16 @@ class ResourceLoaderUserTokensModule extends ResourceLoaderModule {
        }
 
        /**
-        * Generate the JavaScript content of this module.
-        *
-        * Add FILTER_NOMIN annotation to prevent needless minification and caching (T84960).
-        *
         * @param ResourceLoaderContext $context
         * @return string JavaScript code
         */
        public function getScript( ResourceLoaderContext $context ) {
-               return Xml::encodeJsCall(
+               // Use FILTER_NOMIN annotation to prevent needless minification and caching (T84960).
+               return ResourceLoader::FILTER_NOMIN . Xml::encodeJsCall(
                        'mw.user.tokens.set',
                        [ $this->contextUserTokens( $context ) ],
                        ResourceLoader::inDebugMode()
-               ) . ResourceLoader::FILTER_NOMIN;
+               );
        }
 
        /**
index 76fa590..7b2147a 100644 (file)
 class RevisionDeleter {
        /** List of known revdel types, with their corresponding list classes */
        private static $allowedTypes = [
-               'revision' => 'RevDelRevisionList',
-               'archive' => 'RevDelArchiveList',
-               'oldimage' => 'RevDelFileList',
-               'filearchive' => 'RevDelArchivedFileList',
-               'logging' => 'RevDelLogList',
+               'revision' => RevDelRevisionList::class,
+               'archive' => RevDelArchiveList::class,
+               'oldimage' => RevDelFileList::class,
+               'filearchive' => RevDelArchivedFileList::class,
+               'logging' => RevDelLogList::class,
        ];
 
        /** Type map to support old log entries */
index 613d33c..8cdca57 100644 (file)
@@ -49,17 +49,17 @@ class SearchEngineFactory {
        public static function getSearchEngineClass( IDatabase $db ) {
                switch ( $db->getType() ) {
                        case 'sqlite':
-                               return 'SearchSqlite';
+                               return SearchSqlite::class;
                        case 'mysql':
-                               return 'SearchMySQL';
+                               return SearchMySQL::class;
                        case 'postgres':
-                               return 'SearchPostgres';
+                               return SearchPostgres::class;
                        case 'mssql':
-                               return 'SearchMssql';
+                               return SearchMssql::class;
                        case 'oracle':
-                               return 'SearchOracle';
+                               return SearchOracle::class;
                        default:
-                               return 'SearchEngineDummy';
+                               return SearchEngineDummy::class;
                }
        }
 }
index a94aa0b..b942d6e 100644 (file)
@@ -63,7 +63,7 @@ class SiteList extends GenericArrayObject {
         * @return string
         */
        public function getObjectType() {
-               return 'Site';
+               return Site::class;
        }
 
        /**
index a14afe0..6966ff7 100644 (file)
@@ -30,7 +30,7 @@
  */
 class SkinApi extends SkinTemplate {
        public $skinname = 'apioutput';
-       public $template = 'SkinApiTemplate';
+       public $template = SkinApiTemplate::class;
 
        public function setupSkinUserCss( OutputPage $out ) {
                parent::setupSkinUserCss( $out );
index 96ff228..d5f764c 100644 (file)
@@ -14,7 +14,7 @@
 class SkinFallback extends SkinTemplate {
 
        public $skinname = 'fallback';
-       public $template = 'SkinFallbackTemplate';
+       public $template = SkinFallbackTemplate::class;
 
        /**
         * Add CSS via ResourceLoader
index 8b698e8..4587533 100644 (file)
@@ -46,7 +46,7 @@ class SkinTemplate extends Skin {
         * @var string For QuickTemplate, the name of the subclass which will
         *   actually fill the template.  Child classes should override the default.
         */
-       public $template = 'QuickTemplate';
+       public $template = QuickTemplate::class;
 
        public $thispage;
        public $titletxt;
index 95729f3..b9745de 100644 (file)
@@ -609,7 +609,7 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
                        } elseif ( array_key_exists( 'type', $definition ) ) {
                                $class = HTMLForm::$typeMappings[$definition['type']];
                        }
-                       if ( $class !== 'HTMLInfoField' ) {
+                       if ( $class !== HTMLInfoField::class ) {
                                $definition['tabindex'] = $i;
                                $i++;
                        }
index 33b9ccb..b20f222 100644 (file)
@@ -69,40 +69,40 @@ abstract class QueryPage extends SpecialPage {
                if ( $qp === null ) {
                        // QueryPage subclass, Special page name
                        $qp = [
-                               [ 'AncientPagesPage', 'Ancientpages' ],
-                               [ 'BrokenRedirectsPage', 'BrokenRedirects' ],
-                               [ 'DeadendPagesPage', 'Deadendpages' ],
-                               [ 'DoubleRedirectsPage', 'DoubleRedirects' ],
-                               [ 'FileDuplicateSearchPage', 'FileDuplicateSearch' ],
-                               [ 'ListDuplicatedFilesPage', 'ListDuplicatedFiles' ],
-                               [ 'LinkSearchPage', 'LinkSearch' ],
-                               [ 'ListredirectsPage', 'Listredirects' ],
-                               [ 'LonelyPagesPage', 'Lonelypages' ],
-                               [ 'LongPagesPage', 'Longpages' ],
-                               [ 'MediaStatisticsPage', 'MediaStatistics' ],
-                               [ 'MIMEsearchPage', 'MIMEsearch' ],
-                               [ 'MostcategoriesPage', 'Mostcategories' ],
-                               [ 'MostimagesPage', 'Mostimages' ],
-                               [ 'MostinterwikisPage', 'Mostinterwikis' ],
-                               [ 'MostlinkedCategoriesPage', 'Mostlinkedcategories' ],
-                               [ 'MostlinkedTemplatesPage', 'Mostlinkedtemplates' ],
-                               [ 'MostlinkedPage', 'Mostlinked' ],
-                               [ 'MostrevisionsPage', 'Mostrevisions' ],
-                               [ 'FewestrevisionsPage', 'Fewestrevisions' ],
-                               [ 'ShortPagesPage', 'Shortpages' ],
-                               [ 'UncategorizedCategoriesPage', 'Uncategorizedcategories' ],
-                               [ 'UncategorizedPagesPage', 'Uncategorizedpages' ],
-                               [ 'UncategorizedImagesPage', 'Uncategorizedimages' ],
-                               [ 'UncategorizedTemplatesPage', 'Uncategorizedtemplates' ],
-                               [ 'UnusedCategoriesPage', 'Unusedcategories' ],
-                               [ 'UnusedimagesPage', 'Unusedimages' ],
-                               [ 'WantedCategoriesPage', 'Wantedcategories' ],
-                               [ 'WantedFilesPage', 'Wantedfiles' ],
-                               [ 'WantedPagesPage', 'Wantedpages' ],
-                               [ 'WantedTemplatesPage', 'Wantedtemplates' ],
-                               [ 'UnwatchedpagesPage', 'Unwatchedpages' ],
-                               [ 'UnusedtemplatesPage', 'Unusedtemplates' ],
-                               [ 'WithoutInterwikiPage', 'Withoutinterwiki' ],
+                               [ AncientPagesPage::class, 'Ancientpages' ],
+                               [ BrokenRedirectsPage::class, 'BrokenRedirects' ],
+                               [ DeadendPagesPage::class, 'Deadendpages' ],
+                               [ DoubleRedirectsPage::class, 'DoubleRedirects' ],
+                               [ FileDuplicateSearchPage::class, 'FileDuplicateSearch' ],
+                               [ ListDuplicatedFilesPage::class, 'ListDuplicatedFiles' ],
+                               [ LinkSearchPage::class, 'LinkSearch' ],
+                               [ ListredirectsPage::class, 'Listredirects' ],
+                               [ LonelyPagesPage::class, 'Lonelypages' ],
+                               [ LongPagesPage::class, 'Longpages' ],
+                               [ MediaStatisticsPage::class, 'MediaStatistics' ],
+                               [ MIMEsearchPage::class, 'MIMEsearch' ],
+                               [ MostcategoriesPage::class, 'Mostcategories' ],
+                               [ MostimagesPage::class, 'Mostimages' ],
+                               [ MostinterwikisPage::class, 'Mostinterwikis' ],
+                               [ MostlinkedCategoriesPage::class, 'Mostlinkedcategories' ],
+                               [ MostlinkedTemplatesPage::class, 'Mostlinkedtemplates' ],
+                               [ MostlinkedPage::class, 'Mostlinked' ],
+                               [ MostrevisionsPage::class, 'Mostrevisions' ],
+                               [ FewestrevisionsPage::class, 'Fewestrevisions' ],
+                               [ ShortPagesPage::class, 'Shortpages' ],
+                               [ UncategorizedCategoriesPage::class, 'Uncategorizedcategories' ],
+                               [ UncategorizedPagesPage::class, 'Uncategorizedpages' ],
+                               [ UncategorizedImagesPage::class, 'Uncategorizedimages' ],
+                               [ UncategorizedTemplatesPage::class, 'Uncategorizedtemplates' ],
+                               [ UnusedCategoriesPage::class, 'Unusedcategories' ],
+                               [ UnusedimagesPage::class, 'Unusedimages' ],
+                               [ WantedCategoriesPage::class, 'Wantedcategories' ],
+                               [ WantedFilesPage::class, 'Wantedfiles' ],
+                               [ WantedPagesPage::class, 'Wantedpages' ],
+                               [ WantedTemplatesPage::class, 'Wantedtemplates' ],
+                               [ UnwatchedpagesPage::class, 'Unwatchedpages' ],
+                               [ UnusedtemplatesPage::class, 'Unusedtemplates' ],
+                               [ WithoutInterwikiPage::class, 'Withoutinterwiki' ],
                        ];
                        Hooks::run( 'wgQueryPages', [ &$qp ] );
                }
index 4433ddb..af688e2 100644 (file)
@@ -50,143 +50,143 @@ class SpecialPageFactory {
         */
        private static $coreList = [
                // Maintenance Reports
-               'BrokenRedirects' => 'BrokenRedirectsPage',
-               'Deadendpages' => 'DeadendPagesPage',
-               'DoubleRedirects' => 'DoubleRedirectsPage',
-               'Longpages' => 'LongPagesPage',
-               'Ancientpages' => 'AncientPagesPage',
-               'Lonelypages' => 'LonelyPagesPage',
-               'Fewestrevisions' => 'FewestrevisionsPage',
-               'Withoutinterwiki' => 'WithoutInterwikiPage',
-               'Protectedpages' => 'SpecialProtectedpages',
-               'Protectedtitles' => 'SpecialProtectedtitles',
-               'Shortpages' => 'ShortPagesPage',
-               'Uncategorizedcategories' => 'UncategorizedCategoriesPage',
-               'Uncategorizedimages' => 'UncategorizedImagesPage',
-               'Uncategorizedpages' => 'UncategorizedPagesPage',
-               'Uncategorizedtemplates' => 'UncategorizedTemplatesPage',
-               'Unusedcategories' => 'UnusedCategoriesPage',
-               'Unusedimages' => 'UnusedimagesPage',
-               'Unusedtemplates' => 'UnusedtemplatesPage',
-               'Unwatchedpages' => 'UnwatchedpagesPage',
-               'Wantedcategories' => 'WantedCategoriesPage',
-               'Wantedfiles' => 'WantedFilesPage',
-               'Wantedpages' => 'WantedPagesPage',
-               'Wantedtemplates' => 'WantedTemplatesPage',
+               'BrokenRedirects' => BrokenRedirectsPage::class,
+               'Deadendpages' => DeadendPagesPage::class,
+               'DoubleRedirects' => DoubleRedirectsPage::class,
+               'Longpages' => LongPagesPage::class,
+               'Ancientpages' => AncientPagesPage::class,
+               'Lonelypages' => LonelyPagesPage::class,
+               'Fewestrevisions' => FewestrevisionsPage::class,
+               'Withoutinterwiki' => WithoutInterwikiPage::class,
+               'Protectedpages' => SpecialProtectedpages::class,
+               'Protectedtitles' => SpecialProtectedtitles::class,
+               'Shortpages' => ShortPagesPage::class,
+               'Uncategorizedcategories' => UncategorizedCategoriesPage::class,
+               'Uncategorizedimages' => UncategorizedImagesPage::class,
+               'Uncategorizedpages' => UncategorizedPagesPage::class,
+               'Uncategorizedtemplates' => UncategorizedTemplatesPage::class,
+               'Unusedcategories' => UnusedCategoriesPage::class,
+               'Unusedimages' => UnusedimagesPage::class,
+               'Unusedtemplates' => UnusedtemplatesPage::class,
+               'Unwatchedpages' => UnwatchedpagesPage::class,
+               'Wantedcategories' => WantedCategoriesPage::class,
+               'Wantedfiles' => WantedFilesPage::class,
+               'Wantedpages' => WantedPagesPage::class,
+               'Wantedtemplates' => WantedTemplatesPage::class,
 
                // List of pages
-               'Allpages' => 'SpecialAllPages',
-               'Prefixindex' => 'SpecialPrefixindex',
-               'Categories' => 'SpecialCategories',
-               'Listredirects' => 'ListredirectsPage',
-               'PagesWithProp' => 'SpecialPagesWithProp',
-               'TrackingCategories' => 'SpecialTrackingCategories',
+               'Allpages' => SpecialAllPages::class,
+               'Prefixindex' => SpecialPrefixindex::class,
+               'Categories' => SpecialCategories::class,
+               'Listredirects' => ListredirectsPage::class,
+               'PagesWithProp' => SpecialPagesWithProp::class,
+               'TrackingCategories' => SpecialTrackingCategories::class,
 
                // Authentication
-               'Userlogin' => 'SpecialUserLogin',
-               'Userlogout' => 'SpecialUserLogout',
-               'CreateAccount' => 'SpecialCreateAccount',
-               'LinkAccounts' => 'SpecialLinkAccounts',
-               'UnlinkAccounts' => 'SpecialUnlinkAccounts',
-               'ChangeCredentials' => 'SpecialChangeCredentials',
-               'RemoveCredentials' => 'SpecialRemoveCredentials',
+               'Userlogin' => SpecialUserLogin::class,
+               'Userlogout' => SpecialUserLogout::class,
+               'CreateAccount' => SpecialCreateAccount::class,
+               'LinkAccounts' => SpecialLinkAccounts::class,
+               'UnlinkAccounts' => SpecialUnlinkAccounts::class,
+               'ChangeCredentials' => SpecialChangeCredentials::class,
+               'RemoveCredentials' => SpecialRemoveCredentials::class,
 
                // Users and rights
-               'Activeusers' => 'SpecialActiveUsers',
-               'Block' => 'SpecialBlock',
-               'Unblock' => 'SpecialUnblock',
-               'BlockList' => 'SpecialBlockList',
-               'AutoblockList' => 'SpecialAutoblockList',
-               'ChangePassword' => 'SpecialChangePassword',
-               'BotPasswords' => 'SpecialBotPasswords',
-               'PasswordReset' => 'SpecialPasswordReset',
-               'DeletedContributions' => 'DeletedContributionsPage',
-               'Preferences' => 'SpecialPreferences',
-               'ResetTokens' => 'SpecialResetTokens',
-               'Contributions' => 'SpecialContributions',
-               'Listgrouprights' => 'SpecialListGroupRights',
-               'Listgrants' => 'SpecialListGrants',
-               'Listusers' => 'SpecialListUsers',
-               'Listadmins' => 'SpecialListAdmins',
-               'Listbots' => 'SpecialListBots',
-               'Userrights' => 'UserrightsPage',
-               'EditWatchlist' => 'SpecialEditWatchlist',
+               'Activeusers' => SpecialActiveUsers::class,
+               'Block' => SpecialBlock::class,
+               'Unblock' => SpecialUnblock::class,
+               'BlockList' => SpecialBlockList::class,
+               'AutoblockList' => SpecialAutoblockList::class,
+               'ChangePassword' => SpecialChangePassword::class,
+               'BotPasswords' => SpecialBotPasswords::class,
+               'PasswordReset' => SpecialPasswordReset::class,
+               'DeletedContributions' => DeletedContributionsPage::class,
+               'Preferences' => SpecialPreferences::class,
+               'ResetTokens' => SpecialResetTokens::class,
+               'Contributions' => SpecialContributions::class,
+               'Listgrouprights' => SpecialListGroupRights::class,
+               'Listgrants' => SpecialListGrants::class,
+               'Listusers' => SpecialListUsers::class,
+               'Listadmins' => SpecialListAdmins::class,
+               'Listbots' => SpecialListBots::class,
+               'Userrights' => UserrightsPage::class,
+               'EditWatchlist' => SpecialEditWatchlist::class,
 
                // Recent changes and logs
-               'Newimages' => 'SpecialNewFiles',
-               'Log' => 'SpecialLog',
-               'Watchlist' => 'SpecialWatchlist',
-               'Newpages' => 'SpecialNewpages',
-               'Recentchanges' => 'SpecialRecentChanges',
-               'Recentchangeslinked' => 'SpecialRecentChangesLinked',
-               'Tags' => 'SpecialTags',
+               'Newimages' => SpecialNewFiles::class,
+               'Log' => SpecialLog::class,
+               'Watchlist' => SpecialWatchlist::class,
+               'Newpages' => SpecialNewpages::class,
+               'Recentchanges' => SpecialRecentChanges::class,
+               'Recentchangeslinked' => SpecialRecentChangesLinked::class,
+               'Tags' => SpecialTags::class,
 
                // Media reports and uploads
-               'Listfiles' => 'SpecialListFiles',
-               'Filepath' => 'SpecialFilepath',
-               'MediaStatistics' => 'MediaStatisticsPage',
-               'MIMEsearch' => 'MIMEsearchPage',
-               'FileDuplicateSearch' => 'FileDuplicateSearchPage',
-               'Upload' => 'SpecialUpload',
-               'UploadStash' => 'SpecialUploadStash',
-               'ListDuplicatedFiles' => 'ListDuplicatedFilesPage',
+               'Listfiles' => SpecialListFiles::class,
+               'Filepath' => SpecialFilepath::class,
+               'MediaStatistics' => MediaStatisticsPage::class,
+               'MIMEsearch' => MIMEsearchPage::class,
+               'FileDuplicateSearch' => FileDuplicateSearchPage::class,
+               'Upload' => SpecialUpload::class,
+               'UploadStash' => SpecialUploadStash::class,
+               'ListDuplicatedFiles' => ListDuplicatedFilesPage::class,
 
                // Data and tools
-               'ApiSandbox' => 'SpecialApiSandbox',
-               'Statistics' => 'SpecialStatistics',
-               'Allmessages' => 'SpecialAllMessages',
-               'Version' => 'SpecialVersion',
-               'Lockdb' => 'SpecialLockdb',
-               'Unlockdb' => 'SpecialUnlockdb',
+               'ApiSandbox' => SpecialApiSandbox::class,
+               'Statistics' => SpecialStatistics::class,
+               'Allmessages' => SpecialAllMessages::class,
+               'Version' => SpecialVersion::class,
+               'Lockdb' => SpecialLockdb::class,
+               'Unlockdb' => SpecialUnlockdb::class,
 
                // Redirecting special pages
-               'LinkSearch' => 'LinkSearchPage',
-               'Randompage' => 'RandomPage',
-               'RandomInCategory' => 'SpecialRandomInCategory',
-               'Randomredirect' => 'SpecialRandomredirect',
-               'Randomrootpage' => 'SpecialRandomrootpage',
-               'GoToInterwiki' => 'SpecialGoToInterwiki',
+               'LinkSearch' => LinkSearchPage::class,
+               'Randompage' => RandomPage::class,
+               'RandomInCategory' => SpecialRandomInCategory::class,
+               'Randomredirect' => SpecialRandomredirect::class,
+               'Randomrootpage' => SpecialRandomrootpage::class,
+               'GoToInterwiki' => SpecialGoToInterwiki::class,
 
                // High use pages
-               'Mostlinkedcategories' => 'MostlinkedCategoriesPage',
-               'Mostimages' => 'MostimagesPage',
-               'Mostinterwikis' => 'MostinterwikisPage',
-               'Mostlinked' => 'MostlinkedPage',
-               'Mostlinkedtemplates' => 'MostlinkedTemplatesPage',
-               'Mostcategories' => 'MostcategoriesPage',
-               'Mostrevisions' => 'MostrevisionsPage',
+               'Mostlinkedcategories' => MostlinkedCategoriesPage::class,
+               'Mostimages' => MostimagesPage::class,
+               'Mostinterwikis' => MostinterwikisPage::class,
+               'Mostlinked' => MostlinkedPage::class,
+               'Mostlinkedtemplates' => MostlinkedTemplatesPage::class,
+               'Mostcategories' => MostcategoriesPage::class,
+               'Mostrevisions' => MostrevisionsPage::class,
 
                // Page tools
-               'ComparePages' => 'SpecialComparePages',
-               'Export' => 'SpecialExport',
-               'Import' => 'SpecialImport',
-               'Undelete' => 'SpecialUndelete',
-               'Whatlinkshere' => 'SpecialWhatLinksHere',
-               'MergeHistory' => 'SpecialMergeHistory',
-               'ExpandTemplates' => 'SpecialExpandTemplates',
+               'ComparePages' => SpecialComparePages::class,
+               'Export' => SpecialExport::class,
+               'Import' => SpecialImport::class,
+               'Undelete' => SpecialUndelete::class,
+               'Whatlinkshere' => SpecialWhatLinksHere::class,
+               'MergeHistory' => SpecialMergeHistory::class,
+               'ExpandTemplates' => SpecialExpandTemplates::class,
 
                // Other
-               'Booksources' => 'SpecialBookSources',
+               'Booksources' => SpecialBookSources::class,
 
                // Unlisted / redirects
-               'ApiHelp' => 'SpecialApiHelp',
-               'Blankpage' => 'SpecialBlankpage',
-               'Diff' => 'SpecialDiff',
-               'EditTags' => 'SpecialEditTags',
-               'Emailuser' => 'SpecialEmailUser',
-               'Movepage' => 'MovePageForm',
-               'Mycontributions' => 'SpecialMycontributions',
-               'MyLanguage' => 'SpecialMyLanguage',
-               'Mypage' => 'SpecialMypage',
-               'Mytalk' => 'SpecialMytalk',
-               'Myuploads' => 'SpecialMyuploads',
-               'AllMyUploads' => 'SpecialAllMyUploads',
-               'PermanentLink' => 'SpecialPermanentLink',
-               'Redirect' => 'SpecialRedirect',
-               'Revisiondelete' => 'SpecialRevisionDelete',
-               'RunJobs' => 'SpecialRunJobs',
-               'Specialpages' => 'SpecialSpecialpages',
-               'PageData' => 'SpecialPageData'
+               'ApiHelp' => SpecialApiHelp::class,
+               'Blankpage' => SpecialBlankpage::class,
+               'Diff' => SpecialDiff::class,
+               'EditTags' => SpecialEditTags::class,
+               'Emailuser' => SpecialEmailUser::class,
+               'Movepage' => MovePageForm::class,
+               'Mycontributions' => SpecialMycontributions::class,
+               'MyLanguage' => SpecialMyLanguage::class,
+               'Mypage' => SpecialMypage::class,
+               'Mytalk' => SpecialMytalk::class,
+               'Myuploads' => SpecialMyuploads::class,
+               'AllMyUploads' => SpecialAllMyUploads::class,
+               'PermanentLink' => SpecialPermanentLink::class,
+               'Redirect' => SpecialRedirect::class,
+               'Revisiondelete' => SpecialRevisionDelete::class,
+               'RunJobs' => SpecialRunJobs::class,
+               'Specialpages' => SpecialSpecialpages::class,
+               'PageData' => SpecialPageData::class,
        ];
 
        private static $list;
@@ -237,27 +237,27 @@ class SpecialPageFactory {
                        self::$list = self::$coreList;
 
                        if ( !$wgDisableInternalSearch ) {
-                               self::$list['Search'] = 'SpecialSearch';
+                               self::$list['Search'] = SpecialSearch::class;
                        }
 
                        if ( $wgEmailAuthentication ) {
-                               self::$list['Confirmemail'] = 'EmailConfirmation';
-                               self::$list['Invalidateemail'] = 'EmailInvalidation';
+                               self::$list['Confirmemail'] = EmailConfirmation::class;
+                               self::$list['Invalidateemail'] = EmailInvalidation::class;
                        }
 
                        if ( $wgEnableEmail ) {
-                               self::$list['ChangeEmail'] = 'SpecialChangeEmail';
+                               self::$list['ChangeEmail'] = SpecialChangeEmail::class;
                        }
 
                        if ( $wgEnableJavaScriptTest ) {
-                               self::$list['JavaScriptTest'] = 'SpecialJavaScriptTest';
+                               self::$list['JavaScriptTest'] = SpecialJavaScriptTest::class;
                        }
 
                        if ( $wgPageLanguageUseDB ) {
-                               self::$list['PageLanguage'] = 'SpecialPageLanguage';
+                               self::$list['PageLanguage'] = SpecialPageLanguage::class;
                        }
                        if ( $wgContentHandlerUseDB ) {
-                               self::$list['ChangeContentModel'] = 'SpecialChangeContentModel';
+                               self::$list['ChangeContentModel'] = SpecialChangeContentModel::class;
                        }
 
                        // Add extension special pages
index dfdbb06..f76c318 100644 (file)
@@ -146,7 +146,7 @@ class SpecialBotPasswords extends FormSpecialPage {
                        ];
 
                        $fields['restrictions'] = [
-                               'class' => 'HTMLRestrictionsField',
+                               'class' => HTMLRestrictionsField::class,
                                'required' => true,
                                'default' => $this->botPassword->getRestrictions(),
                        ];
index 28cd0d1..b27a8b4 100644 (file)
@@ -78,7 +78,7 @@ class SpecialDiff extends RedirectSpecialPage {
                        ],
                        'diff' => [
                                'name' => 'diff',
-                               'class' => 'HTMLTextField',
+                               'class' => HTMLTextField::class,
                                'label-message' => 'diff-form-revid',
                        ],
                ], $this->getContext(), 'diff-form' );
index 09ea9ea..e3c5d8c 100644 (file)
@@ -573,7 +573,7 @@ class SpecialEditWatchlist extends UnlistedSpecialPage {
                        // checkTitle can filter some options out, avoid empty sections
                        if ( count( $options ) > 0 ) {
                                $fields['TitlesNs' . $namespace] = [
-                                       'class' => 'EditWatchlistCheckboxSeriesField',
+                                       'class' => EditWatchlistCheckboxSeriesField::class,
                                        'options' => $options,
                                        'section' => "ns$namespace",
                                ];
index 0c18a48..73ca76b 100644 (file)
@@ -164,7 +164,6 @@ class SpecialExpandTemplates extends SpecialPage {
                                'size' => 60,
                                'default' => $title,
                                'autofocus' => true,
-                               'cssclass' => 'mw-ui-input-inline',
                        ],
                        'input' => [
                                'type' => 'textarea',
index 78f9253..4b5dedf 100644 (file)
@@ -238,7 +238,7 @@ class SpecialExport extends SpecialPage {
 
                $formDescriptor += [
                        'textarea' => [
-                               'class' => 'HTMLTextAreaField',
+                               'class' => HTMLTextAreaField::class,
                                'name' => 'pages',
                                'label-message' => 'export-manual',
                                'nodata' => true,
index ac34996..d693b99 100644 (file)
@@ -97,7 +97,7 @@ class SpecialProtectedpages extends SpecialPage {
        ) {
                $formDescriptor = [
                        'namespace' => [
-                               'class' => 'HTMLSelectNamespace',
+                               'class' => HTMLSelectNamespace::class,
                                'name' => 'namespace',
                                'id' => 'namespace',
                                'cssclass' => 'namespaceselector',
@@ -125,7 +125,7 @@ class SpecialProtectedpages extends SpecialPage {
                                'id' => 'noredirect',
                        ],
                        'sizelimit' => [
-                               'class' => 'HTMLSizeFilterField',
+                               'class' => HTMLSizeFilterField::class,
                                'name' => 'size',
                        ]
                ];
index 605ee00..6b0598c 100644 (file)
@@ -441,7 +441,7 @@ class SpecialTags extends SpecialPage {
                $out = $context->getOutput();
 
                $tag = $data['HiddenTag'];
-               $status = call_user_func( [ 'ChangeTags', "{$form->tagAction}TagWithChecks" ],
+               $status = call_user_func( [ ChangeTags::class, "{$form->tagAction}TagWithChecks" ],
                        $tag, $data['Reason'], $context->getUser(), true );
 
                if ( $status->isGood() ) {
index fd066ac..e62731f 100644 (file)
@@ -873,6 +873,10 @@ class UserrightsPage extends SpecialPage {
                                                } else {
                                                        $expiryHtml = $this->msg( 'userrights-expiry-none' )->text();
                                                }
+                                               // T171345: Add a hidden form element so that other groups can still be manipulated,
+                                               // otherwise saving errors out with an invalid expiry time for this group.
+                                               $expiryHtml .= Html::Hidden( "wpExpiry-$group",
+                                                       $currentExpiry ? 'existing' : 'infinite' );
                                                $expiryHtml .= "<br />\n";
                                        } else {
                                                $expiryHtml = Xml::element( 'span', null,
index 44d91a8..eacdace 100644 (file)
@@ -159,7 +159,7 @@ class UploadForm extends HTMLForm {
                }
 
                $descriptor['UploadFile'] = [
-                       'class' => 'UploadSourceField',
+                       'class' => UploadSourceField::class,
                        'section' => 'source',
                        'type' => 'file',
                        'id' => 'wpUploadFile',
@@ -174,7 +174,7 @@ class UploadForm extends HTMLForm {
                if ( $canUploadByUrl ) {
                        $this->mMaxUploadSize['url'] = UploadBase::getMaxUploadSize( 'url' );
                        $descriptor['UploadFileURL'] = [
-                               'class' => 'UploadSourceField',
+                               'class' => UploadSourceField::class,
                                'section' => 'source',
                                'id' => 'wpUploadFileURL',
                                'radio-id' => 'wpSourceTypeurl',
@@ -322,7 +322,7 @@ class UploadForm extends HTMLForm {
                } else {
                        $descriptor['License'] = [
                                'type' => 'select',
-                               'class' => 'Licenses',
+                               'class' => Licenses::class,
                                'section' => 'description',
                                'id' => 'wpLicense',
                                'label-message' => 'license',
index 4efe92d..09d4b5e 100644 (file)
@@ -277,7 +277,7 @@ class UsersPager extends AlphabeticPager {
 
                $formDescriptor = [
                        'user' => [
-                               'class' => 'HTMLUserTextField',
+                               'class' => HTMLUserTextField::class,
                                'label' => $this->msg( 'listusersfrom' )->text(),
                                'name' => 'username',
                                'default' => $this->requestedUser,
@@ -286,7 +286,7 @@ class UsersPager extends AlphabeticPager {
                                'label' => $this->msg( 'group' )->text(),
                                'name' => 'group',
                                'default' => $this->requestedGroup,
-                               'class' => 'HTMLSelectField',
+                               'class' => HTMLSelectField::class,
                                'options' => $groupOptions,
                        ],
                        'editsOnly' => [
@@ -311,7 +311,7 @@ class UsersPager extends AlphabeticPager {
                                'default' => $this->mDefaultDirection
                        ],
                        'limithiddenfield' => [
-                               'class' => 'HTMLHiddenField',
+                               'class' => HTMLHiddenField::class,
                                'name' => 'limit',
                                'default' => $this->mLimit
                        ]
@@ -322,14 +322,14 @@ class UsersPager extends AlphabeticPager {
 
                if ( $beforeSubmitButtonHookOut !== '' ) {
                        $formDescriptior[ 'beforeSubmitButtonHookOut' ] = [
-                               'class' => 'HTMLInfoField',
+                               'class' => HTMLInfoField::class,
                                'raw' => true,
                                'default' => $beforeSubmitButtonHookOut
                        ];
                }
 
                $formDescriptor[ 'submit' ] = [
-                       'class' => 'HTMLSubmitField',
+                       'class' => HTMLSubmitField::class,
                        'buttonlabel-message' => 'listusers-submit',
                ];
 
@@ -338,7 +338,7 @@ class UsersPager extends AlphabeticPager {
 
                if ( $beforeClosingFieldsetHookOut !== '' ) {
                        $formDescriptior[ 'beforeClosingFieldsetHookOut' ] = [
-                               'class' => 'HTMLInfoField',
+                               'class' => HTMLInfoField::class,
                                'raw' => true,
                                'default' => $beforeClosingFieldsetHookOut
                        ];
index 5bab876..97035c2 100644 (file)
@@ -3100,7 +3100,7 @@ class User implements IDBAccessObject, UserIdentity {
                $multiselectOptions = [];
                foreach ( $prefs as $name => $info ) {
                        if ( ( isset( $info['type'] ) && $info['type'] == 'multiselect' ) ||
-                                       ( isset( $info['class'] ) && $info['class'] == 'HTMLMultiSelectField' ) ) {
+                                       ( isset( $info['class'] ) && $info['class'] == HTMLMultiSelectField::class ) ) {
                                $opts = HTMLFormField::flattenOptions( $info['options'] );
                                $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
 
@@ -3114,7 +3114,7 @@ class User implements IDBAccessObject, UserIdentity {
                $checkmatrixOptions = [];
                foreach ( $prefs as $name => $info ) {
                        if ( ( isset( $info['type'] ) && $info['type'] == 'checkmatrix' ) ||
-                                       ( isset( $info['class'] ) && $info['class'] == 'HTMLCheckMatrix' ) ) {
+                                       ( isset( $info['class'] ) && $info['class'] == HTMLCheckMatrix::class ) ) {
                                $columns = HTMLFormField::flattenOptions( $info['columns'] );
                                $rows = HTMLFormField::flattenOptions( $info['rows'] );
                                $prefix = isset( $info['prefix'] ) ? $info['prefix'] : $name;
index c68d6d7..d6d9ff0 100644 (file)
@@ -74,8 +74,8 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                $this->cache = $cache;
                $this->readOnlyMode = $readOnlyMode;
                $this->stats = new NullStatsdDataFactory();
-               $this->deferredUpdatesAddCallableUpdateCallback = [ 'DeferredUpdates', 'addCallableUpdate' ];
-               $this->revisionGetTimestampFromIdCallback = [ 'Revision', 'getTimestampFromId' ];
+               $this->deferredUpdatesAddCallableUpdateCallback = [ DeferredUpdates::class, 'addCallableUpdate' ];
+               $this->revisionGetTimestampFromIdCallback = [ Revision::class, 'getTimestampFromId' ];
        }
 
        /**
index de3b6af..e96d46a 100644 (file)
        "rcfilters-activefilters": "Filtros activos",
        "rcfilters-advancedfilters": "Filtros avanzaos",
        "rcfilters-limit-title": "Resultancies qu'amosar",
-       "rcfilters-limit-and-date-label": "{{PLURAL:$1|cambiu|$1 cambios}}, $2",
+       "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|cambiu|$1 cambios}}, $2",
        "rcfilters-date-popup-title": "Periodu de tiempu a buscar",
        "rcfilters-days-title": "Últimos díes",
        "rcfilters-hours-title": "Últimes hores",
        "lockmanager-fail-closelock": "Nun se pudo zarrar el ficheru de bloquéu pa \"$1\".",
        "lockmanager-fail-deletelock": "Non se pudo desaniciar el ficheru de bloquéu pa \"$1\".",
        "lockmanager-fail-acquirelock": "Nun se pudo adquirir el bloquéu pa \"$1\".",
-       "lockmanager-fail-openlock": "Nun se pudo abrir el ficheru de bloquéu pa \"$1\".",
+       "lockmanager-fail-openlock": "Nun se pudo abrir el ficheru de bloquéu pa \"$1\". Por favor comprueba que'l direutoriu de xubíes ta configuráu correutamente y que'l to sirvidor web tien permisos d'escritura nesi direutoriu. Ver https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory pa más información.",
        "lockmanager-fail-releaselock": "Nun se pudo lliberar el bloquéu pa \"$1\".",
        "lockmanager-fail-db-bucket": "Nun se pudo contautar con bloqueos de bases de datos bastantes nel conxuntu $1.",
        "lockmanager-fail-db-release": "Nun se pudieron lliberar los bloqueos na base de datos $1.",
        "doubleredirects": "Redireiciones dobles",
        "doubleredirectstext": "Esta páxina llista páxines que redireicionen a otres páxines de redireición.\nCada filera contien enllaces a la primera y segunda redireición, asina como al oxetivu de la segunda redireición, que de vezu ye la páxina oxetivu \"real\", onde tendría d'empobinar la primera redireición.\nLes entraes <del>tachaes</del> tan resueltes.",
        "double-redirect-fixed-move": "[[$1]] treslladóse.\nAnovóse automáticamente y agora redirixe haza [[$2]].",
-       "double-redirect-fixed-maintenance": "Iguando automáticamente la doble redireición de [[$1]] a [[$2]] nuna xera de mantenimientu.",
+       "double-redirect-fixed-maintenance": "Iguando automáticamente la doble redireición de [[$1]] a [[$2]] nuna xera de mantenimientu",
        "double-redirect-fixer": "Iguador de redireiciones",
        "brokenredirects": "Redireiciones frañaes",
        "brokenredirectstext": "Les redireiciones siguientes enllacien a páxines que nun esisten:",
index a03318a..607d11b 100644 (file)
        "right-createtalk": "Стварэньне старонак абмеркаваньня",
        "right-createaccount": "Стварэньне новых рахункаў удзельнікаў",
        "right-autocreateaccount": "Аўтаматычны ўваход з вонкавага рахунку ўдзельніка",
-       "right-minoredit": "пазнаÑ\87Ñ\8dнÑ\8cне Ñ\80Ñ\8dдагаванÑ\8cнÑ\8fÑ\9e Ñ\8fк Ð´Ñ\80обнÑ\8bÑ\8f",
+       "right-minoredit": "Ð\9fазнаÑ\87Ñ\8dнÑ\8cне Ñ\80Ñ\8dдагаванÑ\8cнÑ\8fÑ\9e Ñ\8fк Ð´Ñ\80обнÑ\8bÑ\85",
        "right-move": "перанос старонак",
        "right-move-subpages": "перанос старонак разам зь іх падстаронкамі",
        "right-move-rootuserpages": "перанос карэнных старонак удзельнікаў",
index a569fc9..3f3f3e9 100644 (file)
        "zip-file-open-error": "Възникна грешка при отваряне на файла за проверка на ZIP.",
        "zip-wrong-format": "Указаният файл не е ZIP файл.",
        "zip-bad": "Файлът е повреден или е нечетим ZIP файл.\nСигурността му не може да бъде проверена.",
-       "zip-unsupported": "Файлът е ZIP файл, който използва ZIP компоненти, които не се поддържат от МедияУики.\nСигурността му не може да бъде коректно проверена.",
+       "zip-unsupported": "Файлът е ZIP файл, който използва функционалност, която не се поддържа от МедияУики.\nСигурността му не може да бъде коректно проверена.",
        "uploadstash": "Скрити качвания",
        "uploadstash-summary": "Тази страница предоставя достъп до файловете, които са качени (или са в процес на качване), но все още не са публикувани в уикито. Тези файлове не са достъпни само за потребителя, който ги е качил.",
        "uploadstash-clear": "Изчистване на скритите качвания",
index 828804d..3a018c8 100644 (file)
        "postedit-confirmation-created": "Die Seite wurde erstellt.",
        "postedit-confirmation-restored": "Die Seite wurde wiederhergestellt.",
        "postedit-confirmation-saved": "Deine Bearbeitung wurde gespeichert.",
+       "postedit-confirmation-published": "Deine Bearbeitung wurde veröffentlicht.",
        "edit-already-exists": "Die neue Seite konnte nicht erstellt werden, da sie bereits vorhanden ist.",
        "defaultmessagetext": "Standardtext",
        "content-failed-to-parse": "Parsen des Inhalts $2 für Modell $1 fehlgeschlagen: $3",
index 745a432..ca5672d 100644 (file)
        "seconds-ago": "Verê $1 {{PLURAL:$1|saniya|saniyeyan}}",
        "monday-at": "Dışeme $1 de",
        "tuesday-at": "Sêşeme $1 de",
-       "wednesday-at": "Çarşeme $1 de",
+       "wednesday-at": "Çeharşeme $1 de",
        "thursday-at": "Pancşeme $1 de",
        "friday-at": "Êne $1 de",
        "saturday-at": "Şeme $1 de",
index 3726ae9..a638833 100644 (file)
        "postedit-confirmation-created": "The page has been created.",
        "postedit-confirmation-restored": "The page has been restored.",
        "postedit-confirmation-saved": "Your edit was saved.",
+       "postedit-confirmation-published": "Your edit was published.",
        "edit-already-exists": "Could not create a new page.\nIt already exists.",
        "addsection-preload": "",
        "addsection-editintro": "",
index 3bf879f..e112dce 100644 (file)
        "lockmanager-fail-closelock": "No se pudo cerrar la referencia para el archivo de bloqueo de \"$1\".",
        "lockmanager-fail-deletelock": "No se pudo eliminar el archivo de bloqueo para \"$1\".",
        "lockmanager-fail-acquirelock": "No pudo adquirir el bloqueo para \"$1\".",
-       "lockmanager-fail-openlock": "No se pudo abrir el archivo de bloqueo para \"$1\". Por favor verifica que el directorio de subidas está configurado correctamente y que tu servidor web tiene permisos de escritura en ese directorio. Ver https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory para más información.",
+       "lockmanager-fail-openlock": "No se pudo abrir el archivo de bloqueo de «$1». Revisa que el directorio de cargas esté configurado correctamente y que tu servidor web tenga permisos de escritura en ese directorio. Consulta https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory para obtener más información.",
        "lockmanager-fail-releaselock": "No se pudo liberar el bloqueo de \"$1\".",
        "lockmanager-fail-db-bucket": "No se pudo contactar con las suficientes bases de datos del conjunto $1.",
        "lockmanager-fail-db-release": "No se pudieron liberar los bloqueos registrados en la base de datos $1.",
        "protect-otherreason": "Otra razón:",
        "protect-otherreason-op": "Otro motivo",
        "protect-dropdown": "*Razones de protección habituales\n**Vandalismo excesivo\n**Spam excesivo\n**Guerra de ediciones\n**Página muy visitada",
-       "protect-edit-reasonlist": "Editar las razones de protección",
+       "protect-edit-reasonlist": "Editar motivos de protección",
        "protect-expiry-options": "1 hora:1 hour,1 día:1 day,1 semana:1 week,2 semanas:2 weeks,1 mes:1 month,3 meses:3 months,6 meses:6 months,1 año:1 year,para siempre:infinite",
        "restriction-type": "Permiso:",
        "restriction-level": "Nivel de restricción:",
index a92336b..de21953 100644 (file)
        "lockmanager-fail-closelock": "Ezin izan da \"$1\" fitxategiaren giltza itxi.",
        "lockmanager-fail-deletelock": "Ezin izan da \"$1\" fitxategia desblokeatu.",
        "lockmanager-fail-acquirelock": "Ezin izan da \"$1\" blokeoa eskuratu.",
-       "lockmanager-fail-openlock": "Ezin izan da \"$1\" blokeo fitxategia ireki.",
+       "lockmanager-fail-openlock": "Ezin izan da \"$1\"-rentzako blokeo fitxategia ireki. Ziurtatu igoera direktorioa behar bezala konfiguratuta dagoela eta zure web zerbitzariak baimena duela idazteko. Ikusi informazio gehiagorako https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory.",
        "lockmanager-fail-releaselock": "Ezin izan da \"$1\" blokeoa askatu.",
        "lockmanager-fail-db-bucket": "Ezin izan dut $1 buketean datubase nahikoa ziurtatu.",
        "lockmanager-fail-db-release": "Ezin izan da $1 datubasean giltzaraporik askatu.",
        "restrictionsfield-badip": "Baliogabeko IP helbide edo eremua: $1",
        "restrictionsfield-label": "Onartutako IP eremuak:",
        "restrictionsfield-help": "Linea bakoitzeko IP helbide edo CIDR eremu bakarra. Guztia gaitzeko, erabili: \n<pre>0.0.0.0/0\n::/0</pre>",
+       "edit-error-short": "Akatsa: $1",
+       "edit-error-long": "Akatsak:\n\n$1",
        "revid": "$1 berrikusi",
        "pageid": "$1 orri IDa",
        "rawhtml-notallowed": "&lt;html&gt; etiketak ezin dira orri arruntetatik kanpo erabili.",
index e79ee5f..7bbbed5 100644 (file)
        "lockmanager-fail-closelock": "לא הייתה אפשרות לסגור את קובץ הנעילה עבור \"$1\".",
        "lockmanager-fail-deletelock": "לא הייתה אפשרות למחוק את קובץ הנעילה עבור \"$1\".",
        "lockmanager-fail-acquirelock": "לא הייתה אפשרות לקבל נעילה עבור \"$1\".",
-       "lockmanager-fail-openlock": "לא הייתה אפשרות לפתוח את קובץ הנעילה עבור \"$1\".",
+       "lockmanager-fail-openlock": "לא הייתה אפשרות לפתוח את קובץ הנעילה עבור \"$1\". יש לוודא שתיקיית ההעלאות מוגדרת בצורה תקינה ושלשרת האינטרנט יש הרשאות לכתוב לתיקייה זו. [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory למידע נוסף].",
        "lockmanager-fail-releaselock": "לא הייתה אפשרות לשחרר את הנעילה עבור \"$1\".",
        "lockmanager-fail-db-bucket": "לא הייתה אפשרות לקבל מספיק מסדי נתונים של נעילות בדלי $1.",
        "lockmanager-fail-db-release": "לא הייתה אפשרות לשחרר נעילות על מסד הנתונים $1.",
index 1a1353d..58d3d17 100644 (file)
        "search-external": "Külső kereső",
        "searchdisabled": "Elnézésed kérjük, de a teljes szöveges keresés terhelési okok miatt átmenetileg nem használható. Ezidő alatt használhatod a lenti Google keresést, mely viszont lehetséges, hogy nem teljesen friss adatokkal dolgozik.",
        "search-error": "A keresés közben hiba történt: $1",
-       "search-warning": "$1 keresése közben hiba történt",
+       "search-warning": "Hiba történt a keresés közben: $1",
        "preferences": "Beállítások",
        "mypreferences": "Beállítások",
        "prefs-edits": "Szerkesztéseid száma:",
index a50f7bc..367115c 100644 (file)
        "recentchangeslinked-feed": "関連ページの更新状況",
        "recentchangeslinked-toolbox": "関連ページの更新状況",
        "recentchangeslinked-title": "「$1」と関連する変更",
-       "recentchangeslinked-summary": "ã\81\93ã\82\8cã\81¯æ\8c\87å®\9aã\81\97ã\81\9fã\83\9aã\83¼ã\82¸ã\81\8bã\82\89ã\83ªã\83³ã\82¯ã\81\95ã\82\8cã\81¦ã\81\84ã\82\8b (ã\81¾ã\81\9fã\81¯æ\8c\87å®\9aã\81\97ã\81\9fã\82«ã\83\86ã\82´ã\83ªã\81«å\90«ã\81¾ã\82\8cã\81¦ã\81\84ã\82\8b) ã\83\9aã\83¼ã\82¸ã\81®æ\9c\80è¿\91ã\81®å¤\89æ\9b´ã\81®ä¸\80覧ã\81§ã\81\99ã\80\82\n[[Special:Watchlist|è\87ªå\88\86ã\81®ã\82¦ã\82©ã\83\83ã\83\81ã\83ªã\82¹ã\83\88]]ã\81«ã\81\82ã\82\8bã\83\9aã\83¼ã\82¸は<strong>太字</strong>で表示されます。",
+       "recentchangeslinked-summary": "ã\83\9aã\83¼ã\82¸å\90\8dã\82\92å\85¥å\8a\9bã\81\99ã\82\8bã\81¨ã\80\81ã\83ªã\83³ã\82¯é\96¢ä¿\82 (ã\81\9dã\81®ã\83\9aã\83¼ã\82¸ã\81®ã\83ªã\83³ã\82¯å\85\88ã\82\82ã\81\97ã\81\8fã\81¯ä»\96ã\81®ã\83\9aã\83¼ã\82¸ã\81\8bã\82\89ã\81®ã\83ªã\83³ã\82¯) ã\81®æ\9c\80è¿\91ã\81®å¤\89æ\9b´ã\82\92調ã\81¹ã\82\8bã\81\93ã\81¨ã\81\8cã\81§ã\81\8dã\81¾ã\81\99ã\80\82 (ä¸\8bä½\8dã\82«ã\83\86ã\82´ã\83ªã\82\92å\8f\82ç\85§ã\81\99ã\82\8bã\81«ã\81¯ã\80\81ã\82«ã\83\86ã\82´ã\83ª:ã\82«ã\83\86ã\82´ã\83ªå\90\8d (Category:Name of category) ã\82\92å\85¥å\8a\9b\80\82[[Special:Watchlist|è\87ªå\88\86ã\81®ã\82¦ã\82©ã\83\83ã\83\81ã\83ªã\82¹ã\83\88]]ã\81«ã\81\82ã\82\8bã\83\9aã\83¼ã\82¸ã\81®å¤\89æ\9b´は<strong>太字</strong>で表示されます。",
        "recentchangeslinked-page": "ページ名:",
        "recentchangeslinked-to": "このページへのリンク元での変更の表示に切り替え",
        "recentchanges-page-added-to-category": "[[:$1]]をカテゴリに追加",
index 500e25e..9bb875a 100644 (file)
        "site-rss-feed": "$1 ''RSS Feed''",
        "site-atom-feed": "Lebon atom $1",
        "page-rss-feed": "\"$1\" ''RSS Feed''",
-       "page-atom-feed": "\"$1\" ''Atom Feed''",
+       "page-atom-feed": "Pakan atom \"$1\"",
        "red-link-title": "$1 (kaca ora ana)",
        "sort-descending": "Urutaké medhun",
        "sort-ascending": "Urutaké munggah",
        "nosuchaction": "Ora ana tumindak mangkono",
        "nosuchactiontext": "Tumindak sing dikarepaké déning URL ora trep.\nPanjenengan bokmanawa salah ngetik URL-é, utawa salah nurut pranala.\nIki bokmanawa uga nuduhaké yèn ana ama ing piranti alus sing dianggo déning {{SITENAME}}.",
        "nosuchspecialpage": "Ora ana kaca mirunggan mangkono",
-       "nospecialpagetext": "Panjenengan nyuwun kaca astaméwa sing ora sah. Daftar kaca astaméwa sing sah bisa dipirsani ing [[Special:SpecialPages|daftar kaca astaméwa]].",
+       "nospecialpagetext": "<strong>Panjenengan nyuwun kaca mirunggan sing ora sah.</strong>\n\nPratélan kaca mirunggan sing sah bisa tinemu ing [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Masalah",
        "databaseerror": "Masalah sasana dhata",
        "databaseerror-text": "Ana kerusakan ing basis data (query error).\n\nMungkin ana masalah ing software-e.",
        "showingresults": "Ing ngisor iki dituduhaké {{PLURAL:$1|'''1''' kasil|'''$1''' kasil}}, wiwitané saking #<strong>$2</strong>.",
        "showingresultsinrange": "Nuduhaké nganti {{PLURAL:$1|<strong>1</strong> kasil|<strong>$1</strong> kasil}} sajeroning penthangan #<strong>$2</strong> tekan #<strong>$3</strong>.",
        "search-showingresults": "{{PLURAL:$4|Asil <strong>$1</strong> saka <strong>$3</strong>|Asil <strong>$1 – $2</strong> saka <strong>$3</strong>}}",
-       "search-nonefound": "Ora ana kasil sing cocog karo pitakonan (''query'').",
+       "search-nonefound": "Ora ana kasil sing mathuk karo pitakoné.",
        "search-nonefound-thiswiki": "Ora ana kasil sing jumbuh karo panjalukan ing situs iki.",
        "powersearch-legend": "Panggolèkan sabanjuré (''advance search'')",
        "powersearch-ns": "Golèk ing mandala aran:",
        "recentchanges": "Owahan-owahan anyar",
        "recentchanges-legend": "Opsi owah-owahan anyar",
        "recentchanges-summary": "Lacak owah-owahan anyar wiki iki ing kaca iki.",
-       "recentchanges-noresult": "Ora ana pangowahan ing periode sing diwiwiti kriteria iki.",
+       "recentchanges-noresult": "Ora ana owahan ing kalamangsa sing mathuk karo pranatan iki.",
        "recentchanges-feed-description": "Urutna owah-owahan anyar ing wiki ing ''feed'' iki.",
        "recentchanges-label-newpage": "Besutan iki nggawé kaca anyar",
        "recentchanges-label-minor": "Iki besutan cilik",
        "recentchangeslinked-title": "Owah-owahan sing magepokan \"$1\"",
        "recentchangeslinked-summary": "Iki pratélaning owah-owahan sing mentas digawé tumrap ing kaca-kaca sing nggayut sawijining kaca (utawa kaca-kaca anggotaning sawijining kategori).\nKaca ing [[Special:Watchlist|pawawangané panjenegan]] <strong>dikandeli</strong>.",
        "recentchangeslinked-page": "Jeneng kaca:",
-       "recentchangeslinked-to": "Nuduhaké owah-owahan menyang kaca sing disambung menyang kaca-kaca iki",
+       "recentchangeslinked-to": "Nuduhaké owah-owahan kaca-kaca sing nggayut kaca iki",
        "recentchanges-page-added-to-category": "[[:$1]] ditambahaké ing kategori",
        "recentchanges-page-added-to-category-bundled": "[[:$1]] ditambahaké ing kategori, [[Special:WhatLinksHere/$1|kaca iki kalebu ing njeroné kaca liyané]]",
        "recentchanges-page-removed-from-category": "[[:$1]] dibusak saka kategori",
        "mywatchlist": "Pawawangan",
        "watchlistfor2": "Kanggo $1 $2",
        "nowatchlist": "Ora ana apa-apa ing pawawanganing sampéyan.",
-       "watchlistanontext": "Mangga $1 kanggo mirsani utawa nyunting daftar pangawasan panjenengan.",
+       "watchlistanontext": "Sumangga mlebu log saperlu ndeleng utawa mbesut barang ing pawawangané panjenengan.",
        "watchnologin": "Durung mlebu log",
        "addwatch": "Tambah nèng daptar pangawasan",
        "addedwatchtext": "Kaca \"[[:$1]]\" wis ditambahaké menyang [[Special:Watchlist|daftar pangawasan]].\nOwah-owahan sing dumadi ing tembé ing kaca iku lan kaca dhiskusi sing kagandhèng, bakal dipacak ing kéné.",
        "import-upload": "Ngunggahaké data XML",
        "import-token-mismatch": "Kélangan data sèsi. Mangga dijajal manèh.",
        "import-invalid-interwiki": "Ora bisa ngimport saka wiki sing kapilih.",
-       "import-error-edit": "Kaca \"$1\" ora diimpor amarga Sampéyan ora dililakaké nyunting kuwi.",
+       "import-error-edit": "Kaca \"$1\" ora kaimpor amarga panjenengan ora kawogan mbesut iku.",
        "import-error-create": "Kaca \"$1\" ora diimpor amarga Sampéyan ora dililakaké nggawé kuwi.",
        "import-error-interwiki": "Kaca \"$1\" ora diimpor amarga jenengé dicadhangaké kango pranala njaba (interwiki).",
        "import-error-special": "Kaca \"$1\" ora diimpor amarga darbèké mandala aran mirunggan sing ora nglilakaké anané kaca.",
        "tooltip-t-whatlinkshere": "Pratélané kabèh kaca wiki sing nggayut mréné",
        "tooltip-t-recentchangeslinked": "Owah-owahan anyar saka kaca-kaca sing nggayut kaca iki",
        "tooltip-feed-rss": "''RSS feed'' kanggo kaca iki",
-       "tooltip-feed-atom": "''Atom feed'' kanggo kaca iki",
+       "tooltip-feed-atom": "Pakan atom tumrap kaca iki",
        "tooltip-t-contributions": "Pratélaning pisumbanging {{GENDER:$1|panganggo iki}}",
        "tooltip-t-emailuser": "Kirimi layang-èl nyang {{GENDER:$1|panganggo iki}}",
        "tooltip-t-info": "Katerangan liyané ngenani kaca iki",
        "exif-referenceblackwhite": "Wiji réferènsi pasangan ireng putih",
        "exif-datetime": "Tanggal lan wektu owahé barkas",
        "exif-imagedescription": "Sesirah gambar",
-       "exif-make": "Produsèn kamera",
+       "exif-make": "Prodhusèn kodhak",
        "exif-model": "Modhèl kaméra",
        "exif-software": "Piranti alus sing dianggo",
        "exif-artist": "Prodhusèn",
        "scarytranscludetoolong": "[URL-é kedawan]",
        "deletedwhileediting": "<strong>Pélik:</strong> Kaca iki wis dibusak kawit pisanan panjenengan mbesut!",
        "confirmrecreate": "Panganggo [[User:$1|$1]] ([[User talk:$1|Wicara]]) wis mbusak kaca iki nalika panjenengan miwiti panyuntingan mawa alesan:\n: ''$2''\nMangga didhedhes (dikonfirmasi) menawa panjenengan kersa nggawé ulang kaca iki.",
-       "confirmrecreate-noreason": "Panganggo [[User:$1|$1]] ([[User talk:$1|wicara]]) mbusak kaca iki sakbaré Sampéyan lekas nyunting. Mangga pesthèkaké yèn Sampéyan pancen pingin tenan nggawé manèh kaca iki.",
+       "confirmrecreate-noreason": "Panganggo [[User:$1|$1]] ([[User talk:$1|rembug]]) {{GENDER:$1|mbusak}} kaca iki sawisé panjenengan wiwit mbesut. Sumangga konfirmasi yèn panjenengan temen arep nggawé manèh kaca iki.",
        "recreate": "Gawé ulang",
        "confirm-purge-title": "Buwang kaca iki",
        "confirm_purge_button": "OK",
        "redirect": "Lih-lihan miturut barkas, panganggo, kaca, owahan, utawa cathetan",
        "redirect-summary": "Kaca mirunggan iki ngener ing sawijining barkas (jeneng gambar diwenehi), kaca (ID revisi utama ID kaca diwenehi), utawa kaca panganggo (ID panganggo diwenehi). Cara nganggo: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], or [[{{#Special:Redirect}}/user/101]].",
        "redirect-submit": "Menyang",
-       "redirect-lookup": "Golek:",
+       "redirect-lookup": "Luru:",
        "redirect-value": "Aji:",
        "redirect-user": "ID panganggo",
        "redirect-page": "ID kaca",
        "logentry-patrol-patrol": "$1 {{GENDER:$2|nengeri}} révisi $4 saka kaca $3 sing diawasi",
        "logentry-patrol-patrol-auto": "$1 otomatis {{GENDER:$2|nandhani}} benahan $4 saka kaca $3 kaawasake",
        "logentry-newusers-newusers": "Akun panganggo $1 {{GENDER:$2|digawé}}",
-       "logentry-newusers-create": "Akun panganggo $1 {{GENDER:$2|digawé}}",
+       "logentry-newusers-create": "Akun panganggo $1 wis {{GENDER:$2|kagawé}}",
        "logentry-newusers-create2": "Akun panganggo $3 {{GENDER:$2|digawé}} déning $1",
        "logentry-newusers-byemail": "Akun panganggo $3 {{GENDER:$2|digawé}} déning $1 lan tembung wadi dikirim lumantar layang-èl",
        "logentry-newusers-autocreate": "Akun panganggo $1 otomatis {{GENDER:$2|digawé}}",
index a4e13c6..c6021f0 100644 (file)
        "emailconfirmlink": "Confirme o seu endereço de correio eletrónico",
        "invalidemailaddress": "O endereço de correio eletrónico não pode ser aceite porque parece ter um formato inválido.\nIntroduza um endereço formatado corretamente ou deixe o campo vazio.",
        "cannotchangeemail": "Os endereços de correio eletrónico das contas não podem ser alterados nesta wiki.",
-       "emaildisabled": "Este site não consegue enviar mensagens de correio eletrónico.",
+       "emaildisabled": "Este sítio não consegue enviar mensagens de correio eletrónico.",
        "accountcreated": "Conta criada",
        "accountcreatedtext": "A conta de utilizador para [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|talk]]) foi criada.",
        "createaccount-title": "Criação de conta na wiki {{SITENAME}}",
        "previewnote": "<strong>Lembre-se de que esta é apenas uma antevisão do resultado.</strong>\nAs modificações ainda não foram gravadas!",
        "continue-editing": "Ir para a área de edição",
        "previewconflict": "Esta antevisão do resultado apresenta o texto da caixa de edição acima tal como este aparecerá se escolher gravá-lo.",
-       "session_fail_preview": "Desculpe! Não foi possível processar a edição devido à perda dos dados da sua sessão.\n\nA sua sessão poderá ter sido encerrada. <strong>Verifique se ainda está autenticado e tente novamente, por favor</strong>. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite cookies deste site.",
-       "session_fail_preview_html": "Desculpe! Não foi possível processar a edição devido à perda de dados da sua sessão.\n\n<em>Como a wiki {{SITENAME}} possibilita o uso de HTML puro, a antevisão está oculta por precaução contra ataques com JavaScript.</em>\n\n<strong>Se esta é uma tentativa legítima de edição tente novamente, por favor</strong>. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite <em>cookies</em> deste <em>site</em>.",
+       "session_fail_preview": "Desculpe! Não foi possível processar a edição devido à perda dos dados da sua sessão.\n\nA sua sessão poderá ter sido encerrada. <strong>Verifique se ainda está autenticado e tente novamente, por favor</strong>. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite cookies deste sítio.",
+       "session_fail_preview_html": "Desculpe! Não foi possível processar a edição devido à perda de dados da sua sessão.\n\n<em>Como a wiki {{SITENAME}} possibilita o uso de HTML puro, a antevisão está oculta por precaução contra ataques com JavaScript.</em>\n\n<strong>Se esta é uma tentativa legítima de edição tente novamente, por favor</strong>. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite <em>cookies</em> deste sítio.",
        "token_suffix_mismatch": "<strong>A edição foi rejeitada porque o seu navegador alterou os sinais de pontuação no editor.</strong>\nA edição foi rejeitada para evitar perdas no texto da página.\nIsto acontece ocasionalmente quando se usa um serviço de proxy anonimizador mal configurado.",
        "edit_form_incomplete": "<strong>Algumas partes do formulário de edição não chegaram ao servidor; verifique que a sua edição continua intacta e tente novamente, por favor.</strong>",
        "editing": "A editar $1",
        "showingresultsinrange": "Apresenta-se abaixo {{PLURAL:$1|<strong>1</strong> resultado|até <strong>$1</strong> resultados}} no intervalo #<strong>$2</strong> a #<strong>$3</strong>.",
        "search-showingresults": "{{PLURAL:$4|Resultado <strong>$1</strong> de <strong>$3</strong>|Resultados <strong>$1 - $2</strong> de <strong>$3</strong>}}",
        "search-nonefound": "A pesquisa não produziu resultados.",
-       "search-nonefound-thiswiki": "Não existem resultados que correspondam à consulta neste site.",
+       "search-nonefound-thiswiki": "Não existem resultados que correspondam à consulta neste sítio.",
        "powersearch-legend": "Pesquisa avançada",
        "powersearch-ns": "Pesquisar nos domínios:",
        "powersearch-togglelabel": "Marcar:",
        "prefs-custom-css": "CSS personalizado",
        "prefs-custom-js": "JS personalizado",
        "prefs-common-css-js": "CSS/JS partilhado por todos os temas:",
-       "prefs-reset-intro": "Pode usar esta página para repor as configurações padrão das preferências.\nAs suas preferências serão modificadas para os valores predefinidos do site.\nEsta operação não pode ser desfeita.",
+       "prefs-reset-intro": "Pode usar esta página para repor as configurações padrão das preferências.\nAs suas preferências serão modificadas para os valores predefinidos do sítio.\nEsta operação não pode ser desfeita.",
        "prefs-emailconfirm-label": "Confirmação do correio eletrónico:",
        "youremail": "Correio eletrónico:",
        "username": "Nome de {{GENDER:$1|utilizador|utilizadora|utilizador(a)}}:",
        "http-curl-error": "Ocorreu um erro ao aceder ao URL: $1",
        "http-bad-status": "Ocorreu um problema durante o pedido HTTP: $1 $2",
        "upload-curl-error6": "Não foi possível aceder ao URL",
-       "upload-curl-error6-text": "Não foi possível aceder ao URL.\nVerifique se o endereço está correto e o site disponível, por favor.",
+       "upload-curl-error6-text": "Não foi possível aceder ao URL.\nVerifique se o endereço está correto e o sítio disponível, por favor.",
        "upload-curl-error28": "Tempo limite para o envio do ficheiro excedido",
-       "upload-curl-error28-text": "O site demorou demasiado tempo a responder. Verifique que o site está disponível, aguarde alguns momentos e tente novamente, por favor. Talvez queira voltar a tentar numa altura menos congestionada.",
+       "upload-curl-error28-text": "O sítio demorou demasiado tempo a responder. Verifique que o sítio está disponível, aguarde alguns momentos e tente novamente, por favor. Talvez queira voltar a tentar numa altura menos congestionada.",
        "license": "Licença:",
        "license-header": "Licenciamento",
        "nolicense": "Nenhuma selecionada",
        "apihelp-no-such-module": "Módulo \"$1\" não encontrado.",
        "apisandbox": "Testes da API",
        "apisandbox-jsonly": "Para usar a área de testes da API é necessário o JavaScript.",
-       "apisandbox-api-disabled": "A API está desativada neste site.",
+       "apisandbox-api-disabled": "A API está desativada neste sítio.",
        "apisandbox-intro": "Use esta página para fazer experiências com a <strong>API operacional do MediaWiki</strong>.\nConsulte a [[mw:API:Main page|documentação da API]] para informações sobre o seu uso. Exemplo: [https://www.mediawiki.org/wiki/API#A_simple_example obter o conteúdo da Página Principal]. Selecione uma operação para ver mais exemplos.\n\nNote que, embora esta seja uma área de testes, as operações que executar nesta página podem modificar a wiki.",
        "apisandbox-fullscreen": "Expandir painel",
        "apisandbox-fullscreen-tooltip": "Expandir o painel da página de testes para preencher a janela do navegador.",
        "booksources-invalid-isbn": "O número ISBN fornecido não parece ser válido; verifique a existência de erros ao copiar da fonte original.",
        "magiclink-tracking-rfc": "Páginas que usam hiperligações mágicas RFC",
        "magiclink-tracking-rfc-desc": "Esta página usa hiperligações mágicas RFC. Consulte a [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] para saber como migrar.",
-       "magiclink-tracking-pmid": "Páginas que usam links mágicos PMID",
+       "magiclink-tracking-pmid": "Páginas que usam hiperligações mágicas PMID",
        "magiclink-tracking-pmid-desc": "Esta página usa hiperligações mágicas PMID. Consulte a [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] para saber como migrar.",
-       "magiclink-tracking-isbn": "Páginas que usam links mágicos ISBN",
+       "magiclink-tracking-isbn": "Páginas que usam hiperligações mágicas ISBN",
        "magiclink-tracking-isbn-desc": "Esta página usa hiperligações mágicas ISBN. Consulte a [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] para saber como migrar.",
        "specialloguserlabel": "Executante:",
        "speciallogtitlelabel": "Alvo (título ou página ou {{ns:user}}:nome de utilizador):",
        "import-nonewrevisions": "Não foi importada nenhuma revisão (já estavam todas presentes ou foram ignoradas devido a erros).",
        "xml-error-string": "$1 na linha $2, coluna $3 (byte $4): $5",
        "import-upload": "Enviar dados em XML",
-       "import-token-mismatch": "Perda de dados da sessão.\n\nA sua sessão pode ter sido encerrada. '''Verifique se ainda está autenticado e tente novamente, por favor'''. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite cookies deste site.",
+       "import-token-mismatch": "Perda de dados da sessão.\n\nA sua sessão pode ter sido encerrada. '''Verifique se ainda está autenticado e tente novamente, por favor'''. \nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite cookies deste sítio.",
        "import-invalid-interwiki": "Não é possível importar da wiki especificada.",
        "import-error-edit": "A página \"$1\" não foi importada porque não tem permissão para editá-la.",
        "import-error-create": "A página \"$1\" não foi importada porque não tem permissão para criá-la.",
        "creditspage": "Créditos da página",
        "nocredits": "Não há informação disponível sobre os créditos desta página.",
        "spamprotectiontitle": "Filtro de proteção contra spam",
-       "spamprotectiontext": "O texto que pretendia gravar foi bloqueado pelo filtro de spam.\nEste bloqueio foi provavelmente causado por uma hiperligação para um ''site'' externo que está na lista negra.",
+       "spamprotectiontext": "O texto que pretendia gravar foi bloqueado pelo filtro de spam.\nEste bloqueio foi provavelmente causado por uma hiperligação para um sítio externo que está na lista negra.",
        "spamprotectionmatch": "O seguinte texto ativou o filtro de <i>spam</i>: $1",
        "spambot_username": "MediaWiki limpeza de spam",
        "spam_reverting": "A reverter para a última revisão que não contém ligação para $1",
        "invalidateemail": "Cancelar confirmação do correio eletrónico",
        "notificationemail_subject_changed": "O endereço de correio eletrónico registado na wiki {{SITENAME}} foi alterado",
        "notificationemail_subject_removed": "O endereço de correio eletrónico registado na wiki {{SITENAME}} foi removido",
-       "notificationemail_body_changed": "Alguém, provavelmente você, a partir do endereço IP $1, alterou o endereço de correio eletrónico da conta \"$2\" para \"$3\" na wiki {{SITENAME}}.\n\nCaso não o tenha alterado, contacte imediatamente um administrador do site.",
-       "notificationemail_body_removed": "Alguém, provavelmente você, a partir do endereço IP $1, eliminou o endereço de correio eletrónico da conta \"$2\" na wiki {{SITENAME}}.\n\nCaso não o tenha eliminado, contacte imediatamente um administrador do site.",
+       "notificationemail_body_changed": "Alguém, provavelmente você, a partir do endereço IP $1, alterou o endereço de correio eletrónico da conta \"$2\" para \"$3\" na wiki {{SITENAME}}.\n\nCaso não o tenha alterado, contacte imediatamente um administrador do sítio.",
+       "notificationemail_body_removed": "Alguém, provavelmente você, a partir do endereço IP $1, eliminou o endereço de correio eletrónico da conta \"$2\" na wiki {{SITENAME}}.\n\nCaso não o tenha eliminado, contacte imediatamente um administrador do sítio.",
        "scarytranscludedisabled": "[Transclusão interwikis foi impossibilitada]",
        "scarytranscludefailed": "[Não foi possível obter a predefinição a partir de $1]",
        "scarytranscludefailed-httpstatus": "[Não foi possível obter a predefinição a partir de $1: HTTP $2]",
        "permanentlink": "Hiperligação permanente",
        "permanentlink-revid": "Identificador de revisão",
        "permanentlink-submit": "Ir para a revisão",
-       "dberr-problems": "Desculpe! Este site está com dificuldades técnicas.",
+       "dberr-problems": "Desculpe! Este sítio está com dificuldades técnicas.",
        "dberr-again": "Experimente esperar alguns minutos e atualizar.",
        "dberr-info": "(Não foi possível aceder ao servidor da base de dados: $1)",
        "dberr-info-hidden": "(Não foi possível aceder ao servidor da base de dados)",
        "expand_templates_generate_xml": "Mostrar a árvore de análise sintáctica do XML",
        "expand_templates_generate_rawhtml": "Mostrar o HTML puro",
        "expand_templates_preview": "Antevisão do resultado",
-       "expand_templates_preview_fail_html": "<em>Porque a wiki {{SITENAME}} permite código HTML puro e ocorreu uma perda de dados da sessão, a antevisão ficará ocultada como precaução contra ataques por JavaScript.</em>\n\n<strong>Se esta é uma tentativa legítima de visionamento, por favor tente novamente.</strong>\nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite que este site crie ''cookies''.",
+       "expand_templates_preview_fail_html": "<em>Porque a wiki {{SITENAME}} permite código HTML puro e ocorreu uma perda de dados da sessão, a antevisão ficará ocultada como precaução contra ataques por JavaScript.</em>\n\n<strong>Se esta é uma tentativa legítima de visionamento, por favor tente novamente.</strong>\nCaso continue a não funcionar, tente [[Special:UserLogout|sair]] e voltar a entrar na sua conta, e verifique se o seu navegador permite que este sítio crie ''cookies''.",
        "expand_templates_preview_fail_html_anon": "<em>Porque a wiki {{SITENAME}} permite código HTML puro e não iniciou uma sessão, a antevisão ficará ocultada como precaução contra ataques por JavaScript.</em>\n\n<strong>Se esta é uma tentativa legítima de visionamento, por favor [[Special:UserLogin|inicie uma sessão]] e tente novamente.</strong>",
        "expand_templates_input_missing": "Necessita de fornecer pelo menos algum texto wiki de entrada.",
        "pagelanguage": "Alterar a língua da página",
        "rawhtml-notallowed": "As etiquetas &lt;html&gt; não podem ser utilizadas fora de páginas normais.",
        "gotointerwiki": "A sair da wiki {{SITENAME}}",
        "gotointerwiki-invalid": "O título especificado é inválido.",
-       "gotointerwiki-external": "Está prestes a sair da wiki {{SITENAME}} para visitar [[$2]], que é um site externo.\n\n'''[$1 Continuar para $1]'''",
+       "gotointerwiki-external": "Está prestes a sair da wiki {{SITENAME}} para visitar [[$2]], que é um sítio externo.\n\n'''[$1 Continuar para $1]'''",
        "undelete-cantedit": "Não pode restaurar esta página porque não tem privilégios para a editar.",
        "undelete-cantcreate": "Não pode restaurar esta página porque não existe nenhuma página com este nome e não tem privilégios para criar esta página.",
        "pagedata-title": "Dados de página",
index e29bcad..a4f1d64 100644 (file)
        "postedit-confirmation-created": "{{gender}}\nShown after a user creates a new page. Parameters:\n* $1 - the current user, for GENDER support",
        "postedit-confirmation-restored": "{{gender}}\nShown after a user restores a page to a previous revision. Parameters:\n* $1 - the current user, for GENDER support",
        "postedit-confirmation-saved": "{{gender}}\nShown after a user saves a page. Parameters:\n* $1 - the current user, for GENDER support",
+       "postedit-confirmation-published": "{{gender}}\nShown after a user publishes a page. Parameters:\n* $1 - the current user, for GENDER support",
        "edit-already-exists": "Used as error message.\n\nSee also:\n* {{msg-mw|edit-hook-aborted}}\n* {{msg-mw|edit-gone-missing}}\n* {{msg-mw|edit-conflict}}\n* {{msg-mw|edit-no-change}}",
        "addsection-preload": "{{notranslate}}",
        "addsection-editintro": "{{notranslate}}",
index 31abcc0..7bd0919 100644 (file)
        "search-showingresults": "{{PLURAL:$4|نتيجو <strong>$1</strong> of <strong>$3</strong>|نتيجا <strong>$1 - $2</strong> of <strong>$3</strong>}}",
        "search-nonefound": "توھان جي ڳولا جي نتيجي ۾ ڪجھہ بہ نہ لڌو.",
        "powersearch-legend": "اعليٰ ڳولا",
+       "powersearch-ns": "نالن لاءِ ڇڏين وڇوٽين ۾ ڳولھيو (سرچ اِن نيم اسپيسز)",
        "powersearch-togglelabel": "چڪاسيو:",
        "powersearch-toggleall": "سڀ",
        "powersearch-togglenone": "ڪو بہ نہ",
        "nrevisions": "$1 {{PLURAL:$1|مسودو|مسودا}}",
        "nimagelinks": "$1 {{PLURAL:$1|صفحي|صفحن}} ۾ استعمال ٿيل",
        "ntransclusions": "$1 {{PLURAL:$1|صفحي|صفحن}} ۾ استعمال ٿيل",
-       "specialpage-empty": "ھن رپورٽ لاءِ ڪي-بہ نتيجا ناھن.",
+       "specialpage-empty": "ھن رپورٽ لاءِ ڪي بہ نتيجا ناھن.",
        "lonelypages": "يتيم صفحا",
        "uncategorizedpages": "اڻ زمريل صفحا",
        "uncategorizedcategories": "اڻزمرايل زمرا",
        "restriction-level-sysop": "مڪمل طور تحفظيل",
        "restriction-level-autoconfirmed": "نيم تحفظيل",
        "viewdeletedpage": "ڊاٺل صفحا ڏسو",
-       "undelete-nodiff": "ڪوبہ پويون مسودو نہ لڌو",
+       "undelete-nodiff": "ڪوبہ اڳيون مسودو نہ لڌو",
        "undeletebtn": "بحاليو",
        "undeleteviewlink": "ڏسو",
        "undeletecomment": "سبب:",
        "version-libraries-description": "تشريح",
        "version-libraries-authors": "ليکڪ",
        "redirect-submit": "ھلو",
+       "redirect-lookup": "ڏسو:",
        "redirect-value": "قدر:",
        "redirect-user": "واپرائيندڙ آءِڊي",
        "redirect-page": "صفحي جي آءِڊي",
index 05a1229..6d07338 100644 (file)
        "lockmanager-fail-closelock": "Ne morem zapreti zaklenitvene datoteke »$1«.",
        "lockmanager-fail-deletelock": "Ne morem izbrisati zaklenitvene datoteke »$1«.",
        "lockmanager-fail-acquirelock": "Ne morem pridobiti zaklenitvene datoteke »$1«.",
-       "lockmanager-fail-openlock": "Ne morem odpreti zaklenitvene datoteke »$1«.",
+       "lockmanager-fail-openlock": "Ne morem odpreti zaklenitvene datoteke »$1«. Prepričajte se, da je mapa za nalaganje nastavljena pravilno in da ima vaš spletni strežnik pravice za pisanje v tej mapi. Oglejte si https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgUploadDirectory za več informacij.",
        "lockmanager-fail-releaselock": "Ne morem sprostiti zaklepa »$1«.",
        "lockmanager-fail-db-bucket": "Ne morem kontaktirati zadostnega števila zaklenitvenih zbirk podatkov v vedru $1.",
        "lockmanager-fail-db-release": "Ne morem sprostiti zaklepov zbirke podatkov $1.",
index 8c782d9..5b441f9 100644 (file)
@@ -137,7 +137,8 @@ class TitleCleanup extends TableCleanup {
                        || $title->getInterwiki()
                        || !$title->canExist()
                ) {
-                       if ( $title->getInterwiki() || !$title->canExist() ) {
+                       $titleImpossible = $title->getInterwiki() || !$title->canExist();
+                       if ( $titleImpossible ) {
                                $prior = $title->getPrefixedDBkey();
                        } else {
                                $prior = $title->getDBkey();
@@ -155,7 +156,12 @@ class TitleCleanup extends TableCleanup {
                                $ns = 0;
                        }
 
-                       $clean = 'Broken/' . $prior;
+                       if ( !$titleImpossible && !$title->exists() ) {
+                               // Looks like the current title, after cleaning it up, is valid and available
+                               $clean = $prior;
+                       } else {
+                               $clean = 'Broken/' . $prior;
+                       }
                        $verified = Title::makeTitleSafe( $ns, $clean );
                        if ( !$verified || $verified->exists() ) {
                                $blah = "Broken/id:" . $row->page_id;
index e55e0fe..2142f1f 100644 (file)
@@ -29,18 +29,18 @@ return [
        /**
         * Special modules who have their own classes
         */
-       'startup' => [ 'class' => 'ResourceLoaderStartUpModule' ],
+       'startup' => [ 'class' => ResourceLoaderStartUpModule::class ],
 
        // Scripts managed by the local wiki (stored in the MediaWiki namespace)
-       'site' => [ 'class' => 'ResourceLoaderSiteModule' ],
-       'site.styles' => [ 'class' => 'ResourceLoaderSiteStylesModule' ],
+       'site' => [ 'class' => ResourceLoaderSiteModule::class ],
+       'site.styles' => [ 'class' => ResourceLoaderSiteStylesModule::class ],
        'noscript' => [
-               'class' => 'ResourceLoaderWikiModule',
+               'class' => ResourceLoaderWikiModule::class,
                'styles' => [ 'MediaWiki:Noscript.css' ],
                'group' => 'noscript',
        ],
        'filepage' => [
-               'class' => 'ResourceLoaderWikiModule',
+               'class' => ResourceLoaderWikiModule::class,
                'styles' => [ 'MediaWiki:Filepage.css' ],
        ],
        'user.groups' => [
@@ -50,16 +50,16 @@ return [
        ],
 
        // Scripts managed by the current user (stored in their user space)
-       'user' => [ 'class' => 'ResourceLoaderUserModule' ],
-       'user.styles' => [ 'class' => 'ResourceLoaderUserStylesModule' ],
+       'user' => [ 'class' => ResourceLoaderUserModule::class ],
+       'user.styles' => [ 'class' => ResourceLoaderUserStylesModule::class ],
 
        // Populate mediawiki.user placeholders with information about the current user
-       'user.defaults' => [ 'class' => 'ResourceLoaderUserDefaultsModule' ],
-       'user.options' => [ 'class' => 'ResourceLoaderUserOptionsModule' ],
-       'user.tokens' => [ 'class' => 'ResourceLoaderUserTokensModule' ],
+       'user.defaults' => [ 'class' => ResourceLoaderUserDefaultsModule::class ],
+       'user.options' => [ 'class' => ResourceLoaderUserOptionsModule::class ],
+       'user.tokens' => [ 'class' => ResourceLoaderUserTokensModule::class ],
 
        // Scripts for the dynamic language specific data, like grammar forms.
-       'mediawiki.language.data' => [ 'class' => 'ResourceLoaderLanguageDataModule' ],
+       'mediawiki.language.data' => [ 'class' => ResourceLoaderLanguageDataModule::class ],
 
        /* MediaWiki base skinning modules */
 
@@ -105,7 +105,7 @@ return [
        ],
        // Used in the web installer. Test it after modifying this definition!
        'mediawiki.skinning.interface' => [
-               'class' => 'ResourceLoaderSkinModule',
+               'class' => ResourceLoaderSkinModule::class,
                'styles' => [
                        'resources/src/mediawiki.skinning/elements.css' => [ 'media' => 'screen' ],
                        'resources/src/mediawiki.skinning/content.css' => [ 'media' => 'screen' ],
@@ -832,7 +832,7 @@ return [
        /* MediaWiki */
 
        'mediawiki' => [
-               'class' => 'ResourceLoaderRawFileModule',
+               'class' => ResourceLoaderRawFileModule::class,
                // Keep in sync with maintenance/jsduck/eg-iframe.html
                'scripts' => [
                        'resources/src/mediawiki/mediawiki.js',
@@ -1017,7 +1017,7 @@ return [
        ],
        'mediawiki.ForeignApi' => [
                'targets' => [ 'desktop', 'mobile' ],
-               'class' => 'ResourceLoaderForeignApiModule',
+               'class' => ResourceLoaderForeignApiModule::class,
                // Additional dependencies generated dynamically
                'dependencies' => 'mediawiki.ForeignApi.core',
        ],
@@ -1227,7 +1227,7 @@ return [
                ]
        ],
        'mediawiki.ForeignStructuredUpload.config' => [
-               'class' => 'ResourceLoaderUploadDialogModule',
+               'class' => ResourceLoaderUploadDialogModule::class,
        ],
        'mediawiki.ForeignStructuredUpload' => [
                'scripts' => 'resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js',
@@ -1366,7 +1366,7 @@ return [
                ]
        ],
        'mediawiki.util' => [
-               'class' => 'ResourceLoaderMediaWikiUtilModule',
+               'class' => ResourceLoaderMediaWikiUtilModule::class,
                'scripts' => 'resources/src/mediawiki/mediawiki.util.js',
                'dependencies' => [
                        'jquery.accessKeyLabel',
@@ -1391,7 +1391,7 @@ return [
                'targets' => [ 'desktop', 'mobile' ],
        ],
        'mediawiki.toolbar' => [
-               'class' => 'ResourceLoaderEditToolbarModule',
+               'class' => ResourceLoaderEditToolbarModule::class,
                'scripts' => 'resources/src/mediawiki.toolbar/toolbar.js',
                'styles' => 'resources/src/mediawiki.toolbar/toolbar.less',
                'dependencies' => 'jquery.textSelection',
@@ -1508,6 +1508,7 @@ return [
                        'postedit-confirmation-created',
                        'postedit-confirmation-restored',
                        'postedit-confirmation-saved',
+                       'postedit-confirmation-published',
                ],
        ],
        'mediawiki.action.view.redirect' => [
@@ -1596,7 +1597,7 @@ return [
 
        'mediawiki.jqueryMsg' => [
                // Add data for mediawiki.jqueryMsg, such as allowed tags
-               'class' => 'ResourceLoaderJqueryMsgModule',
+               'class' => ResourceLoaderJqueryMsgModule::class,
                'scripts' => 'resources/src/mediawiki/mediawiki.jqueryMsg.js',
                'dependencies' => [
                        'mediawiki.util',
@@ -1616,10 +1617,10 @@ return [
                )
        ],
 
-       'mediawiki.language.names' => [ 'class' => 'ResourceLoaderLanguageNamesModule' ],
+       'mediawiki.language.names' => [ 'class' => ResourceLoaderLanguageNamesModule::class ],
 
        'mediawiki.language.specialCharacters' => [
-               'class' => 'ResourceLoaderSpecialCharacterDataModule'
+               'class' => ResourceLoaderSpecialCharacterDataModule::class
        ],
 
        /* MediaWiki Libs */
@@ -2724,7 +2725,7 @@ return [
 
        // The core JavaScript library.
        'oojs-ui-core' => [
-               'class' => 'ResourceLoaderOOUIFileModule',
+               'class' => ResourceLoaderOOUIFileModule::class,
                'scripts' => [
                        'resources/lib/oojs-ui/oojs-ui-core.js',
                        'resources/src/oojs-ui-local.js',
@@ -2744,7 +2745,7 @@ return [
        ],
        // This contains only the styles required by core widgets.
        'oojs-ui-core.styles' => [
-               'class' => 'ResourceLoaderOOUIFileModule',
+               'class' => ResourceLoaderOOUIFileModule::class,
                'styles' => [
                        'resources/lib/oojs-ui/wikimedia-ui-base.less', // Providing Wikimedia UI LESS variables to all
                        'resources/src/oojs-ui-local.css', // HACK, see inside the file
@@ -2754,7 +2755,7 @@ return [
        ],
        // Additional widgets and layouts module.
        'oojs-ui-widgets' => [
-               'class' => 'ResourceLoaderOOUIFileModule',
+               'class' => ResourceLoaderOOUIFileModule::class,
                'scripts' => 'resources/lib/oojs-ui/oojs-ui-widgets.js',
                'themeStyles' => 'widgets',
                'dependencies' => [
@@ -2779,7 +2780,7 @@ return [
        ],
        // Toolbar and tools module.
        'oojs-ui-toolbars' => [
-               'class' => 'ResourceLoaderOOUIFileModule',
+               'class' => ResourceLoaderOOUIFileModule::class,
                'scripts' => 'resources/lib/oojs-ui/oojs-ui-toolbars.js',
                'themeStyles' => 'toolbars',
                'dependencies' => [
@@ -2795,7 +2796,7 @@ return [
        ],
        // Windows and dialogs module.
        'oojs-ui-windows' => [
-               'class' => 'ResourceLoaderOOUIFileModule',
+               'class' => ResourceLoaderOOUIFileModule::class,
                'scripts' => 'resources/lib/oojs-ui/oojs-ui-windows.js',
                'themeStyles' => 'windows',
                'dependencies' => [
@@ -2814,71 +2815,71 @@ return [
        ],
 
        'oojs-ui.styles.indicators' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'indicators',
        ],
        'oojs-ui.styles.textures' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'textures',
        ],
        'oojs-ui.styles.icons-accessibility' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-accessibility',
        ],
        'oojs-ui.styles.icons-alerts' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-alerts',
        ],
        'oojs-ui.styles.icons-content' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-content',
        ],
        'oojs-ui.styles.icons-editing-advanced' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-editing-advanced',
        ],
        'oojs-ui.styles.icons-editing-core' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-editing-core',
        ],
        'oojs-ui.styles.icons-editing-list' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-editing-list',
        ],
        'oojs-ui.styles.icons-editing-styling' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-editing-styling',
        ],
        'oojs-ui.styles.icons-interactions' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-interactions',
        ],
        'oojs-ui.styles.icons-layout' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-layout',
        ],
        'oojs-ui.styles.icons-location' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-location',
        ],
        'oojs-ui.styles.icons-media' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-media',
        ],
        'oojs-ui.styles.icons-moderation' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-moderation',
        ],
        'oojs-ui.styles.icons-movement' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-movement',
        ],
        'oojs-ui.styles.icons-user' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-user',
        ],
        'oojs-ui.styles.icons-wikimedia' => [
-               'class' => 'ResourceLoaderOOUIImageModule',
+               'class' => ResourceLoaderOOUIImageModule::class,
                'themeImages' => 'icons-wikimedia',
        ],
 ];
index 522e95b..e7ae467 100644 (file)
                                        // Return [start, end] instead of just start
                                        startAndEnd: false
                                }, options );
-                               // FIXME: We may not need character position-based functions if we insert markers in the right places
                                break;
                        case 'setSelection':
                                options = $.extend( {
                                if ( options.end === undefined ) {
                                        options.end = options.start;
                                }
-                               // FIXME: We may not need character position-based functions if we insert markers in the right places
                                break;
                        case 'scrollToCaretPosition':
                                options = $.extend( {
index e0ab45a..5e859ac 100644 (file)
                data = data || {};
 
                if ( data.message === undefined ) {
-                       data.message = $.parseHTML( mw.message( 'postedit-confirmation-saved', data.user || mw.user ).escaped() );
+                       data.message = $.parseHTML( mw.message(
+                               mw.config.get( 'wgEditSubmitButtonLabelPublish' ) ?
+                                       'postedit-confirmation-published' :
+                                       'postedit-confirmation-saved',
+                               data.user || mw.user
+                       ).escaped() );
                }
 
                $content = $( '<div>' ).addClass( 'postedit-icon postedit-icon-checkmark postedit-content' );
index acb3998..7ef0263 100644 (file)
@@ -7,6 +7,10 @@
        padding: 0.5em;
 }
 
+#mw-apisandbox-ui .mw-apisandbox-link {
+       display: none;
+}
+
 .mw-apisandbox-popup .oo-ui-popupWidget-body > .oo-ui-widget {
        vertical-align: middle;
 }
index bfd5c06..ca4d239 100644 (file)
@@ -57,6 +57,7 @@
                this.feedbackPageTitle = config.title || new mw.Title( 'Feedback' );
 
                this.messagePosterPromise = mw.messagePoster.factory.create( this.feedbackPageTitle, config.apiUrl );
+               this.foreignApi = config.apiUrl ? new mw.ForeignApi( config.apiUrl ) : null;
 
                // Links
                this.bugsTaskSubmissionLink = config.bugsLink || '//phabricator.wikimedia.org/maniphest/task/edit/form/1/';
         * Respond to dialog submit event. If the information was
         * submitted successfully, open a MessageDialog to thank the user.
         *
-        * @param {string} [status] A status of the end of operation
+        * @param {string} status A status of the end of operation
         *  of the main feedback dialog. Empty if the dialog was
         *  dismissed with no action or the user followed the button
         *  to the external task reporting site.
+        * @param {string} feedbackPageName
+        * @param {string} feedbackPageUrl
         */
-       mw.Feedback.prototype.onDialogSubmit = function ( status ) {
+       mw.Feedback.prototype.onDialogSubmit = function ( status, feedbackPageName, feedbackPageUrl ) {
                var dialogConfig;
 
                if ( status !== 'submitted' ) {
                        title: mw.msg( 'feedback-thanks-title' ),
                        message: $( '<span>' ).msg(
                                'feedback-thanks',
-                               this.feedbackPageTitle.getNameText(),
+                               feedbackPageName,
                                $( '<a>' ).attr( {
                                        target: '_blank',
-                                       href: this.feedbackPageTitle.getUrl()
+                                       href: feedbackPageUrl
                                } )
                        ),
                        actions: [
                        this.constructor.static.dialog,
                        {
                                title: mw.msg( this.dialogTitleMessageKey ),
+                               foreignApi: this.foreignApi,
                                settings: {
                                        messagePosterPromise: this.messagePosterPromise,
                                        title: this.feedbackPageTitle,
         */
        mw.Feedback.Dialog.prototype.getSetupProcess = function ( data ) {
                return mw.Feedback.Dialog.parent.prototype.getSetupProcess.call( this, data )
+                       .next( function () {
+                               // Get the URL of the target page, we want to use that in links in the intro
+                               // and in the success dialog
+                               var dialog = this;
+                               if ( data.foreignApi ) {
+                                       return data.foreignApi.get( {
+                                               action: 'query',
+                                               prop: 'info',
+                                               inprop: 'url',
+                                               formatversion: 2,
+                                               titles: data.settings.title.getPrefixedText()
+                                       } ).then( function ( data ) {
+                                               dialog.feedbackPageUrl = OO.getProp( data, 'query', 'pages', 0, 'canonicalurl' );
+                                       } );
+                               } else {
+                                       this.feedbackPageUrl = data.settings.title.getUrl();
+                               }
+                       }, this )
                        .next( function () {
                                var plainMsg, parsedMsg,
                                        settings = data.settings;
                                this.setBugReportLink( settings.bugsTaskSubmissionLink );
                                this.feedbackPageTitle = settings.title;
                                this.feedbackPageName = settings.title.getNameText();
-                               this.feedbackPageUrl = settings.title.getUrl();
 
                                // Useragent checkbox
                                if ( settings.useragentCheckbox.show ) {
index d19d998..fa9898d 100644 (file)
@@ -174,7 +174,7 @@ class DatabaseTestHelper extends Database {
                return false;
        }
 
-       function affectedRows() {
+       function fetchAffectedRowCount() {
                return -1;
        }
 
index a23a2a0..caf1281 100644 (file)
@@ -53,6 +53,9 @@ class FakeDatabaseMysqlBase extends DatabaseMysqlBase {
        protected function doQuery( $sql ) {
        }
 
+       protected function fetchAffectedRowCount() {
+       }
+
        // From DatabaseMysqli
        protected function mysqlConnect( $realServer ) {
        }
index 23f7865..d8ebeff 100644 (file)
@@ -560,7 +560,7 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
                                        'rows' => [ 'field' => 'text', 'field2' => 'text2' ],
                                ],
                                "DELETE FROM replace_table " .
-                                       "WHERE ( field='text' ); " .
+                                       "WHERE (field = 'text'); " .
                                        "INSERT INTO replace_table " .
                                        "(field,field2) " .
                                        "VALUES ('text','text2')"
@@ -576,7 +576,7 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
                                        ],
                                ],
                                "DELETE FROM module_deps " .
-                                       "WHERE ( md_module='module' AND md_skin='skin' ); " .
+                                       "WHERE (md_module = 'module' AND md_skin = 'skin'); " .
                                        "INSERT INTO module_deps " .
                                        "(md_module,md_skin,md_deps) " .
                                        "VALUES ('module','skin','deps')"
@@ -598,12 +598,12 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
                                        ],
                                ],
                                "DELETE FROM module_deps " .
-                                       "WHERE ( md_module='module' AND md_skin='skin' ); " .
+                                       "WHERE (md_module = 'module' AND md_skin = 'skin'); " .
                                        "INSERT INTO module_deps " .
                                        "(md_module,md_skin,md_deps) " .
                                        "VALUES ('module','skin','deps'); " .
                                        "DELETE FROM module_deps " .
-                                       "WHERE ( md_module='module2' AND md_skin='skin2' ); " .
+                                       "WHERE (md_module = 'module2' AND md_skin = 'skin2'); " .
                                        "INSERT INTO module_deps " .
                                        "(md_module,md_skin,md_deps) " .
                                        "VALUES ('module2','skin2','deps2')"
@@ -625,12 +625,12 @@ class DatabaseSQLTest extends PHPUnit_Framework_TestCase {
                                        ],
                                ],
                                "DELETE FROM module_deps " .
-                                       "WHERE ( md_module='module' ) OR ( md_skin='skin' ); " .
+                                       "WHERE (md_module = 'module') OR (md_skin = 'skin'); " .
                                        "INSERT INTO module_deps " .
                                        "(md_module,md_skin,md_deps) " .
                                        "VALUES ('module','skin','deps'); " .
                                        "DELETE FROM module_deps " .
-                                       "WHERE ( md_module='module2' ) OR ( md_skin='skin2' ); " .
+                                       "WHERE (md_module = 'module2') OR (md_skin = 'skin2'); " .
                                        "INSERT INTO module_deps " .
                                        "(md_module,md_skin,md_deps) " .
                                        "VALUES ('module2','skin2','deps2')"
index 4a0a7e7..e131506 100644 (file)
@@ -322,7 +322,7 @@ class DatabaseTest extends PHPUnit_Framework_TestCase {
         */
        private function getMockDB( $methods = [] ) {
                static $abstractMethods = [
-                       'affectedRows',
+                       'fetchAffectedRowCount',
                        'closeConnection',
                        'dataSeek',
                        'doQuery',
index 88f58cf..e460960 100644 (file)
@@ -2,6 +2,7 @@
 
 namespace MediaWiki\Session;
 
+use Config;
 use MediaWikiTestCase;
 use User;
 use Wikimedia\TestingAccessWrapper;
@@ -14,9 +15,16 @@ use Wikimedia\TestingAccessWrapper;
 class SessionBackendTest extends MediaWikiTestCase {
        const SESSIONID = 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
 
+       /** @var SessionManager */
        protected $manager;
+
+       /** @var Config */
        protected $config;
+
+       /** @var SessionProvider */
        protected $provider;
+
+       /** @var TestBagOStuff */
        protected $store;
 
        protected $onSessionMetadataCalled = false;
@@ -25,6 +33,7 @@ class SessionBackendTest extends MediaWikiTestCase {
         * Returns a non-persistent backend that thinks it has at least one session active
         * @param User|null $user
         * @param string $id
+        * @return SessionBackend
         */
        protected function getBackend( User $user = null, $id = null ) {
                if ( !$this->config ) {
@@ -149,7 +158,7 @@ class SessionBackendTest extends MediaWikiTestCase {
                $this->assertSame( $info->forceHTTPS(), $backend->shouldForceHTTPS() );
 
                $expire = time() + 100;
-               $this->store->setSessionMeta( self::SESSIONID, [ 'expires' => $expire ], 2 );
+               $this->store->setSessionMeta( self::SESSIONID, [ 'expires' => $expire ] );
 
                $info = new SessionInfo( SessionInfo::MIN_PRIORITY, [
                        'provider' => $this->provider,
index 6c989f3..e042f76 100644 (file)
@@ -14,7 +14,14 @@ use Wikimedia\TestingAccessWrapper;
  */
 class SessionManagerTest extends MediaWikiTestCase {
 
-       protected $config, $logger, $store;
+       /** @var \HashConfig */
+       private $config;
+
+       /** @var \TestLogger */
+       private $logger;
+
+       /** @var TestBagOStuff */
+       private $store;
 
        protected function getManager() {
                \ObjectCache::$instances['testSessionStore'] = new TestBagOStuff();
index bac2088..f9e30f0 100644 (file)
@@ -14,53 +14,44 @@ class TestBagOStuff extends \CachedBagOStuff {
        /**
         * @param string $id Session ID
         * @param array $data Session data
-        * @param int $expiry
-        * @param User $user User for metadata
         */
-       public function setSessionData( $id, array $data, $expiry = 0, User $user = null ) {
-               $this->setSession( $id, [ 'data' => $data ], $expiry, $user );
+       public function setSessionData( $id, array $data ) {
+               $this->setSession( $id, [ 'data' => $data ] );
        }
 
        /**
         * @param string $id Session ID
         * @param array $metadata Session metadata
-        * @param int $expiry
         */
-       public function setSessionMeta( $id, array $metadata, $expiry = 0 ) {
-               $this->setSession( $id, [ 'metadata' => $metadata ], $expiry );
+       public function setSessionMeta( $id, array $metadata ) {
+               $this->setSession( $id, [ 'metadata' => $metadata ] );
        }
 
        /**
         * @param string $id Session ID
         * @param array $blob Session metadata and data
-        * @param int $expiry
-        * @param User $user User for metadata
         */
-       public function setSession( $id, array $blob, $expiry = 0, User $user = null ) {
+       public function setSession( $id, array $blob ) {
                $blob += [
                        'data' => [],
                        'metadata' => [],
                ];
                $blob['metadata'] += [
-                       'userId' => $user ? $user->getId() : 0,
-                       'userName' => $user ? $user->getName() : null,
-                       'userToken' => $user ? $user->getToken( true ) : null,
+                       'userId' => 0,
+                       'userName' => null,
+                       'userToken' => null,
                        'provider' => 'DummySessionProvider',
                ];
 
-               $this->setRawSession( $id, $blob, $expiry, $user );
+               $this->setRawSession( $id, $blob );
        }
 
        /**
         * @param string $id Session ID
         * @param array|mixed $blob Session metadata and data
-        * @param int $expiry
         */
-       public function setRawSession( $id, $blob, $expiry = 0 ) {
-               if ( $expiry <= 0 ) {
-                       $expiry = \RequestContext::getMain()->getConfig()->get( 'ObjectCacheSessionExpiry' );
-               }
-
+       public function setRawSession( $id, $blob ) {
+               $expiry = \RequestContext::getMain()->getConfig()->get( 'ObjectCacheSessionExpiry' );
                $this->set( $this->makeKey( 'MWSession', $id ), $blob, $expiry );
        }