Merge "Let User::idFromName always return int or null"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 7 May 2019 11:58:31 +0000 (11:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 7 May 2019 11:58:31 +0000 (11:58 +0000)
307 files changed:
.phpcs.xml
Gruntfile.js
RELEASE-NOTES-1.34
autoload.php
docs/kss/package.json
includes/Autopromote.php
includes/Block.php
includes/ConfiguredReadOnlyMode.php
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/MediaWikiServices.php
includes/MovePage.php
includes/Permissions/PermissionManager.php
includes/Pingback.php
includes/Revision.php
includes/Revision/RevisionLookup.php
includes/Revision/RevisionStore.php
includes/ServiceWiring.php
includes/Storage/BlobStoreFactory.php
includes/Title.php
includes/actions/HistoryAction.php
includes/api/ApiBase.php
includes/api/ApiBlock.php
includes/api/ApiBlockInfoTrait.php [new file with mode: 0644]
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryUserContribs.php
includes/api/ApiQueryUserInfo.php
includes/api/ApiRevisionDelete.php
includes/api/ApiSetNotificationTimestamp.php
includes/api/ApiTag.php
includes/api/ApiUnblock.php
includes/api/ApiUserrights.php
includes/api/i18n/ar.json
includes/api/i18n/cs.json
includes/api/i18n/de.json
includes/api/i18n/en.json
includes/api/i18n/fr.json
includes/api/i18n/it.json
includes/api/i18n/ko.json
includes/api/i18n/lb.json
includes/api/i18n/nl.json
includes/api/i18n/pl.json
includes/api/i18n/pt-br.json
includes/api/i18n/ru.json
includes/api/i18n/sv.json
includes/api/i18n/zh-hant.json
includes/auth/AuthManager.php
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
includes/block/BlockManager.php [new file with mode: 0644]
includes/block/BlockRestriction.php [deleted file]
includes/block/BlockRestrictionStore.php [new file with mode: 0644]
includes/cache/CacheHelper.php
includes/cache/GenderCache.php
includes/cache/LinkCache.php
includes/changetags/ChangeTags.php
includes/config/ServiceOptions.php [new file with mode: 0644]
includes/db/MWLBFactory.php
includes/debug/DeprecationHelper.php
includes/editpage/TextConflictHelper.php
includes/externalstore/ExternalStoreHttp.php
includes/filerepo/ForeignAPIRepo.php
includes/filerepo/RepoGroup.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignDBFile.php
includes/htmlform/HTMLForm.php
includes/htmlform/OOUIHTMLForm.php
includes/htmlform/fields/HTMLFormFieldWithButton.php
includes/http/CurlHttpRequest.php
includes/http/GuzzleHttpRequest.php
includes/http/Http.php
includes/http/HttpRequestFactory.php
includes/http/MWHttpRequest.php
includes/http/PhpHttpRequest.php
includes/import/ImportStreamSource.php
includes/import/ImportableUploadRevisionImporter.php
includes/installer/Installer.php
includes/installer/i18n/el.json
includes/installer/i18n/ia.json
includes/installer/i18n/ru.json
includes/installer/i18n/sr-ec.json
includes/jobqueue/Job.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueRedis.php
includes/jobqueue/jobs/ActivityUpdateJob.php
includes/jobqueue/jobs/ClearUserWatchlistJob.php
includes/jobqueue/jobs/UserOptionsUpdateJob.php [new file with mode: 0644]
includes/libs/filebackend/fsfile/TempFSFile.php
includes/libs/objectcache/MemcachedBagOStuff.php
includes/libs/objectcache/MemcachedPeclBagOStuff.php
includes/libs/objectcache/WANObjectCache.php
includes/logging/LogPager.php
includes/mail/EmailNotification.php
includes/page/WikiPage.php
includes/parser/PPCustomFrame_DOM.php [new file with mode: 0644]
includes/parser/PPCustomFrame_Hash.php [new file with mode: 0644]
includes/parser/PPDPart.php [new file with mode: 0644]
includes/parser/PPDPart_Hash.php [new file with mode: 0644]
includes/parser/PPDStack.php [new file with mode: 0644]
includes/parser/PPDStackElement.php [new file with mode: 0644]
includes/parser/PPDStackElement_Hash.php [new file with mode: 0644]
includes/parser/PPDStack_Hash.php [new file with mode: 0644]
includes/parser/PPFrame.php [new file with mode: 0644]
includes/parser/PPFrame_DOM.php [new file with mode: 0644]
includes/parser/PPFrame_Hash.php [new file with mode: 0644]
includes/parser/PPNode.php [new file with mode: 0644]
includes/parser/PPNode_DOM.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Array.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Attr.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Text.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Tree.php [new file with mode: 0644]
includes/parser/PPTemplateFrame_DOM.php [new file with mode: 0644]
includes/parser/PPTemplateFrame_Hash.php [new file with mode: 0644]
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/parser/Sanitizer.php
includes/poolcounter/PoolWorkArticleView.php
includes/preferences/DefaultPreferencesFactory.php
includes/rcfeed/UDPRCFeedEngine.php
includes/search/PrefixSearch.php
includes/shell/Command.php
includes/shell/CommandFactory.php
includes/shell/FirejailCommand.php
includes/shell/Shell.php
includes/specialpage/ChangesListSpecialPage.php
includes/specialpage/SpecialPageFactory.php
includes/specials/SpecialBlock.php
includes/specials/SpecialContributions.php
includes/specials/SpecialEditTags.php
includes/specials/SpecialMovepage.php
includes/specials/SpecialRevisionDelete.php
includes/specials/SpecialUserrights.php
includes/specials/SpecialWatchlist.php
includes/specials/pagers/BlockListPager.php
includes/specials/pagers/ContribsPager.php
includes/title/NamespaceInfo.php
includes/user/User.php
includes/user/UserIdentity.php
includes/user/UserIdentityValue.php
includes/watcheditem/NoWriteWatchedItemStore.php
includes/watcheditem/WatchedItem.php
includes/watcheditem/WatchedItemQueryService.php
includes/watcheditem/WatchedItemQueryServiceExtension.php
includes/watcheditem/WatchedItemStore.php
includes/watcheditem/WatchedItemStoreInterface.php
includes/widget/SearchInputWidget.php
languages/data/Names.php
languages/data/ZhConversion.php
languages/i18n/ang.json
languages/i18n/ar.json
languages/i18n/ban.json
languages/i18n/be-tarask.json
languages/i18n/bg.json
languages/i18n/bjn.json
languages/i18n/bn.json
languages/i18n/ce.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/ee.json
languages/i18n/el.json
languages/i18n/eo.json
languages/i18n/et.json
languages/i18n/exif/hr.json
languages/i18n/exif/ko.json
languages/i18n/fa.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/fy.json
languages/i18n/he.json
languages/i18n/hr.json
languages/i18n/hu.json
languages/i18n/hyw.json
languages/i18n/ia.json
languages/i18n/io.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/jv.json
languages/i18n/ko.json
languages/i18n/li.json
languages/i18n/lv.json
languages/i18n/lzh.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/my.json
languages/i18n/nb.json
languages/i18n/nds-nl.json
languages/i18n/nds.json
languages/i18n/nl.json
languages/i18n/nn.json
languages/i18n/nqo.json [new file with mode: 0644]
languages/i18n/pl.json
languages/i18n/ps.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/roa-tara.json
languages/i18n/ru.json
languages/i18n/sah.json
languages/i18n/sat.json
languages/i18n/sh.json
languages/i18n/skr-arab.json
languages/i18n/sl.json
languages/i18n/sli.json
languages/i18n/sr-ec.json
languages/i18n/stq.json
languages/i18n/sv.json
languages/i18n/sw.json
languages/i18n/th.json
languages/i18n/tr.json
languages/i18n/tyv.json
languages/i18n/uk.json
languages/i18n/yue.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
maintenance/benchmarks/bench_HTTP_HTTPS.php
maintenance/findHooks.php
maintenance/importImages.php
maintenance/importSiteScripts.php
maintenance/language/zhtable/simp2trad.manual
maintenance/language/zhtable/toCN.manual
maintenance/language/zhtable/toHK.manual
maintenance/language/zhtable/toSimp.manual
maintenance/language/zhtable/toTW.manual
maintenance/language/zhtable/toTrad.manual
maintenance/language/zhtable/trad2simp.manual
maintenance/language/zhtable/tradphrases.manual
maintenance/language/zhtable/tradphrases_exclude.manual
maintenance/mediawiki.Title/generateJsToUpperCaseList.js
maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php
maintenance/populateArchiveRevId.php
maintenance/populateInterwiki.php
package.json
resources/Resources.php
resources/src/mediawiki.api/parse.js
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.widgets/images/page-disambiguation-ltr.svg
resources/src/mediawiki.widgets/images/page-disambiguation-rtl.svg
resources/src/mediawiki.widgets/images/page-existing-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-existing-rtl.svg [deleted file]
resources/src/mediawiki.widgets/images/page-not-found-he-yi.svg
resources/src/mediawiki.widgets/images/page-not-found-ltr.svg
resources/src/mediawiki.widgets/images/page-not-found-rtl.svg
resources/src/mediawiki.widgets/images/page-redirect-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-redirect-rtl.svg [deleted file]
resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less
tests/integration/includes/http/MWHttpRequestTestCase.php
tests/parser/ParserTestPrinter.php
tests/parser/ParserTestRunner.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/ActorMigrationTest.php
tests/phpunit/includes/BlockTest.php
tests/phpunit/includes/ContentSecurityPolicyTest.php
tests/phpunit/includes/GlobalFunctions/GlobalTest.php
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php [deleted file]
tests/phpunit/includes/ReadOnlyModeTest.php
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/TestUserRegistry.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/api/ApiBaseTest.php
tests/phpunit/includes/api/ApiBlockInfoTraitTest.php [new file with mode: 0644]
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiQueryUserInfoTest.php [deleted file]
tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/block/BlockManagerTest.php [new file with mode: 0644]
tests/phpunit/includes/block/BlockRestrictionStoreTest.php [new file with mode: 0644]
tests/phpunit/includes/block/BlockRestrictionTest.php [deleted file]
tests/phpunit/includes/config/GlobalVarConfigTest.php
tests/phpunit/includes/config/ServiceOptionsTest.php [new file with mode: 0644]
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/debug/DeprecationHelperTest.php
tests/phpunit/includes/debug/TestDeprecatedSubclass.php
tests/phpunit/includes/filebackend/FileBackendTest.php
tests/phpunit/includes/filerepo/FileBackendDBRepoWrapperTest.php
tests/phpunit/includes/filerepo/MigrateFileRepoLayoutTest.php
tests/phpunit/includes/filerepo/RepoGroupTest.php
tests/phpunit/includes/http/HttpTest.php
tests/phpunit/includes/jobqueue/JobQueueTest.php
tests/phpunit/includes/jobqueue/JobTest.php
tests/phpunit/includes/libs/CSSMinTest.php
tests/phpunit/includes/libs/objectcache/MultiWriteBagOStuffTest.php
tests/phpunit/includes/libs/objectcache/ReplicatedBagOStuffTest.php
tests/phpunit/includes/linker/LinkRendererTest.php
tests/phpunit/includes/page/PageArchiveMcrTest.php
tests/phpunit/includes/page/PageArchivePreMcrTest.php
tests/phpunit/includes/page/PageArchiveTestBase.php
tests/phpunit/includes/preferences/DefaultPreferencesFactoryTest.php
tests/phpunit/includes/site/CachingSiteStoreTest.php
tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
tests/phpunit/includes/specials/ContribsPagerTest.php
tests/phpunit/includes/specials/SpecialBlockTest.php
tests/phpunit/includes/title/NamespaceInfoTest.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/includes/watcheditem/NoWriteWatchedItemStoreUnitTest.php
tests/phpunit/includes/watcheditem/WatchedItemQueryServiceUnitTest.php
tests/phpunit/includes/watcheditem/WatchedItemStoreUnitTest.php
tests/phpunit/mocks/filebackend/MockFileBackend.php
tests/phpunit/mocks/filerepo/MockLocalRepo.php
tests/phpunit/suites/UploadFromUrlTestSuite.php
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js
tests/selenium/pageobjects/history.page.js
tests/selenium/specs/rollback.js
tests/selenium/wdio-mediawiki/Util.js

index b60a3af..a9c658a 100644 (file)
                        Whitelist existing violations, but enable the sniff to prevent
                        any new occurrences.
                -->
-               <exclude-pattern>*/includes/parser/Preprocessor_DOM\.php</exclude-pattern>
-               <exclude-pattern>*/includes/parser/Preprocessor_Hash\.php</exclude-pattern>
-               <exclude-pattern>*/includes/parser/Preprocessor\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/dumpIterator\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/Maintenance\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/findDeprecated\.php</exclude-pattern>
index fbb93bf..f3950f6 100644 (file)
@@ -9,7 +9,6 @@ module.exports = function ( grunt ) {
        grunt.loadNpmTasks( 'grunt-banana-checker' );
        grunt.loadNpmTasks( 'grunt-contrib-copy' );
        grunt.loadNpmTasks( 'grunt-eslint' );
-       grunt.loadNpmTasks( 'grunt-jsonlint' );
        grunt.loadNpmTasks( 'grunt-karma' );
        grunt.loadNpmTasks( 'grunt-stylelint' );
        grunt.loadNpmTasks( 'grunt-svgmin' );
@@ -23,10 +22,11 @@ module.exports = function ( grunt ) {
                eslint: {
                        options: {
                                reportUnusedDisableDirectives: true,
+                               extensions: [ '.js', '.json' ],
                                cache: true
                        },
                        all: [
-                               '**/*.js',
+                               '**/*.js{,on}',
                                '!docs/**',
                                '!node_modules/**',
                                '!resources/lib/**',
@@ -36,18 +36,13 @@ module.exports = function ( grunt ) {
                                '!tests/coverage/**',
                                '!vendor/**',
                                // Explicitly say "**/*.js" here in case of symlinks
-                               '!extensions/**/*.js',
-                               '!skins/**/*.js'
-                       ]
-               },
-               jsonlint: {
-                       all: [
-                               '**/*.json',
-                               '!{docs/js,extensions,node_modules,skins,vendor}/**'
+                               '!extensions/**/*.js{,on}',
+                               '!skins/**/*.js{,on}'
                        ]
                },
                banana: {
                        options: {
+                               requireLowerCase: false,
                                disallowBlankTranslations: false
                        },
                        core: 'languages/i18n/',
index 1775645..b58c269 100644 (file)
@@ -25,6 +25,7 @@ Some specific notes for MediaWiki 1.34 upgrades are below:
 For notes on 1.33.x and older releases, see HISTORY.
 
 === Configuration changes for system administrators in 1.34 ===
+
 ==== New configuration ====
 * …
 
@@ -41,6 +42,7 @@ For notes on 1.33.x and older releases, see HISTORY.
 * …
 
 === External library changes in 1.34 ===
+
 ==== New external libraries ====
 * …
 
@@ -67,7 +69,7 @@ MediaWiki supports over 350 languages. Many localisations are updated regularly.
 Below only new and removed languages are listed, as well as changes to languages
 because of Phabricator reports.
 
-* 
+* (T152908) Added language support for N'Ko (nqo).
 
 === Breaking changes in 1.34 ===
 * Preferences class, deprecated in 1.31, has been removed.
@@ -104,13 +106,47 @@ because of Phabricator reports.
 * User::randomPassword() method, deprecated in 1.27, have been removed.
 * MWNamespace::canTalk(), deprecated in 1.30, have been removed.
 * Parser class property $mUniqPrefix, deprecated in 1.26, has been removed.
+* wfArrayFilter() and wfArrayFilterByKey(), deprecated in 1.32, have been
+  removed.
+* wfMakeUrlIndexes() function, deprecated in 1.33, have been removed.
+* User::getGroupPage() and ::makeGroupLinkHTML(), deprecated in 1.29, have been
+  removed. Use UserGroupMembership::getGroupPage and ::getLink instead.
+* User::makeGroupLinkWiki(), deprecated in 1.29, has been removed. Use
+  UserGroupMembership::getLink() instead.
 * …
 
 === Deprecations in 1.34 ===
-* The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
+* The MWNamespace class is deprecated. Use NamespaceInfo.
 * ExtensionRegistry->load() is deprecated, as it breaks dependency checking.
   Instead, use ->queue().
-* …
+* User::isBlocked() is deprecated since it does not tell you if the user is
+  blocked from editing a particular page. Use User::getBlock() or
+  PermissionManager::isBlockedFrom() or PermissionManager::userCan() instead.
+* User::isLocallyBlockedProxy and User::inDnsBlacklist are deprecated and moved
+  to the BlockManager as private helper methods.
+* User::isDnsBlacklisted is deprecated. Use BlockManager::isDnsBlacklisted
+  instead.
+* The Config argument to ChangesListSpecialPage::checkStructuredFilterUiEnabled
+  is deprecated. Pass only the User argument.
+* WatchedItem::getUser is deprecated. Use getUserIdentity.
+* Passing a Title as the first parameter to the getTimestampById method of
+  RevisionStore is deprecated. Omit it, passing only the remaining parameters.
+* Title::getPreviousRevisionId and Title::getNextRevisionId are deprecated. Use
+  RevisionLookup::getPreviousRevision and RevisionLookup::getNextRevision.
+* The Title parameter to RevisionLookup::getPreviousRevision and
+  RevisionLookup::getNextRevision is deprecated and should be omitted.
+* MWHttpRequest::factory is deprecated. Use HttpRequestFactory.
+* The Http class is deprecated. For the request, get, and post methods, use
+  HttpRequestFactory. For isValidURI, use MWHttpRequest::isValidURI.  For
+  getProxy, use (string)$wgHTTPProxy. For createMultiClient, construct a
+  MultiHttpClient directly.
+* Http::$httpEngine is deprecated and has no replacement. The default 'guzzle'
+  engine will eventually be made the only engine for HTTP requests.
+* RepoGroup::singleton(), RepoGroup::destroySingleton(),
+  RepoGroup::setSingleton(), wfFindFile(), and wfLocalFile() are all
+  deprecated. Use MediaWikiServices instead.
+* The getSubjectPage, getTalkPage, and getOtherPage of Title are deprecated.
+  Use NamespaceInfo's getSubjectPage, getTalkPage, and getAssociatedPage.
 
 === Other changes in 1.34 ===
 * …
index 35137ab..5d3e578 100644 (file)
@@ -27,6 +27,7 @@ $wgAutoloadLocalClasses = [
        'ApiAuthManagerHelper' => __DIR__ . '/includes/api/ApiAuthManagerHelper.php',
        'ApiBase' => __DIR__ . '/includes/api/ApiBase.php',
        'ApiBlock' => __DIR__ . '/includes/api/ApiBlock.php',
+       'ApiBlockInfoTrait' => __DIR__ . '/includes/api/ApiBlockInfoTrait.php',
        'ApiCSPReport' => __DIR__ . '/includes/api/ApiCSPReport.php',
        'ApiChangeAuthenticationData' => __DIR__ . '/includes/api/ApiChangeAuthenticationData.php',
        'ApiCheckToken' => __DIR__ . '/includes/api/ApiCheckToken.php',
@@ -563,6 +564,7 @@ $wgAutoloadLocalClasses = [
        'GenerateJsonI18n' => __DIR__ . '/maintenance/generateJsonI18n.php',
        'GenerateNormalizerDataAr' => __DIR__ . '/maintenance/language/generateNormalizerDataAr.php',
        'GenerateNormalizerDataMl' => __DIR__ . '/maintenance/language/generateNormalizerDataMl.php',
+       'GeneratePhpCharToUpperMappings' => __DIR__ . '/maintenance/mediawiki.Title/generatePhpCharToUpperMappings.php',
        'GenerateSitemap' => __DIR__ . '/maintenance/generateSitemap.php',
        'GenerateUcfirstOverrides' => __DIR__ . '/maintenance/language/generateUcfirstOverrides.php',
        'GenerateUpperCharTable' => __DIR__ . '/maintenance/language/generateUpperCharTable.php',
@@ -872,6 +874,7 @@ $wgAutoloadLocalClasses = [
        'MediaWikiVersionFetcher' => __DIR__ . '/includes/MediaWikiVersionFetcher.php',
        'MediaWiki\\ChangeTags\\Taggable' => __DIR__ . '/includes/changetags/Taggable.php',
        'MediaWiki\\Config\\ConfigRepository' => __DIR__ . '/includes/config/ConfigRepository.php',
+       'MediaWiki\\Config\\ServiceOptions' => __DIR__ . '/includes/config/ServiceOptions.php',
        'MediaWiki\\DB\\PatchFileLocation' => __DIR__ . '/includes/db/PatchFileLocation.php',
        'MediaWiki\\Diff\\ComplexityException' => __DIR__ . '/includes/diff/ComplexityException.php',
        'MediaWiki\\Diff\\WordAccumulator' => __DIR__ . '/includes/diff/WordAccumulator.php',
@@ -1050,28 +1053,28 @@ $wgAutoloadLocalClasses = [
        'PHPVersionCheck' => __DIR__ . '/includes/PHPVersionCheck.php',
        'PNGHandler' => __DIR__ . '/includes/media/PNGHandler.php',
        'PNGMetadataExtractor' => __DIR__ . '/includes/media/PNGMetadataExtractor.php',
-       'PPCustomFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPCustomFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDPart' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDPart_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDStack' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDStackElement' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDStackElement_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDStack_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPFrame' => __DIR__ . '/includes/parser/Preprocessor.php',
-       'PPFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
+       'PPCustomFrame_DOM' => __DIR__ . '/includes/parser/PPCustomFrame_DOM.php',
+       'PPCustomFrame_Hash' => __DIR__ . '/includes/parser/PPCustomFrame_Hash.php',
+       'PPDPart' => __DIR__ . '/includes/parser/PPDPart.php',
+       'PPDPart_Hash' => __DIR__ . '/includes/parser/PPDPart_Hash.php',
+       'PPDStack' => __DIR__ . '/includes/parser/PPDStack.php',
+       'PPDStackElement' => __DIR__ . '/includes/parser/PPDStackElement.php',
+       'PPDStackElement_Hash' => __DIR__ . '/includes/parser/PPDStackElement_Hash.php',
+       'PPDStack_Hash' => __DIR__ . '/includes/parser/PPDStack_Hash.php',
+       'PPFrame' => __DIR__ . '/includes/parser/PPFrame.php',
+       'PPFrame_DOM' => __DIR__ . '/includes/parser/PPFrame_DOM.php',
+       'PPFrame_Hash' => __DIR__ . '/includes/parser/PPFrame_Hash.php',
        'PPFuzzTest' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
        'PPFuzzTester' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
        'PPFuzzUser' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
-       'PPNode' => __DIR__ . '/includes/parser/Preprocessor.php',
-       'PPNode_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPNode_Hash_Array' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Attr' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Text' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Tree' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPTemplateFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPTemplateFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
+       'PPNode' => __DIR__ . '/includes/parser/PPNode.php',
+       'PPNode_DOM' => __DIR__ . '/includes/parser/PPNode_DOM.php',
+       'PPNode_Hash_Array' => __DIR__ . '/includes/parser/PPNode_Hash_Array.php',
+       'PPNode_Hash_Attr' => __DIR__ . '/includes/parser/PPNode_Hash_Attr.php',
+       'PPNode_Hash_Text' => __DIR__ . '/includes/parser/PPNode_Hash_Text.php',
+       'PPNode_Hash_Tree' => __DIR__ . '/includes/parser/PPNode_Hash_Tree.php',
+       'PPTemplateFrame_DOM' => __DIR__ . '/includes/parser/PPTemplateFrame_DOM.php',
+       'PPTemplateFrame_Hash' => __DIR__ . '/includes/parser/PPTemplateFrame_Hash.php',
        'PackedHoverImageGallery' => __DIR__ . '/includes/gallery/PackedHoverImageGallery.php',
        'PackedImageGallery' => __DIR__ . '/includes/gallery/PackedImageGallery.php',
        'PackedOverlayImageGallery' => __DIR__ . '/includes/gallery/PackedOverlayImageGallery.php',
@@ -1562,6 +1565,7 @@ $wgAutoloadLocalClasses = [
        'UserNamePrefixSearch' => __DIR__ . '/includes/user/UserNamePrefixSearch.php',
        'UserNotLoggedIn' => __DIR__ . '/includes/exception/UserNotLoggedIn.php',
        'UserOptionsMaintenance' => __DIR__ . '/maintenance/userOptions.php',
+       'UserOptionsUpdateJob' => __DIR__ . '/includes/jobqueue/jobs/UserOptionsUpdateJob.php',
        'UserPasswordPolicy' => __DIR__ . '/includes/password/UserPasswordPolicy.php',
        'UserRightsProxy' => __DIR__ . '/includes/user/UserRightsProxy.php',
        'UserrightsPage' => __DIR__ . '/includes/specials/SpecialUserrights.php',
index 7106d2e..a703e1f 100644 (file)
@@ -7,7 +7,7 @@
        },
        "repository" : {
                "type" : "git",
-               "url" : "https://gerrit.wikimedia.org/r/p/mediawiki/core.git"
+               "url" : "https://gerrit.wikimedia.org/r/mediawiki/core.git"
        }
 
 }
index a01465e..02c9d01 100644 (file)
@@ -198,7 +198,8 @@ class Autopromote {
                        case APCOND_IPINRANGE:
                                return IP::isInRange( $user->getRequest()->getIP(), $cond[1] );
                        case APCOND_BLOCKED:
-                               return $user->isBlocked();
+                               // @TODO Should partial blocks prevent auto promote?
+                               return (bool)$user->getBlock();
                        case APCOND_ISBOT:
                                return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) );
                        default:
index c6b9482..0d13f7d 100644 (file)
@@ -22,7 +22,7 @@
 
 use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
-use MediaWiki\Block\BlockRestriction;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Block\Restriction\Restriction;
 use MediaWiki\Block\Restriction\NamespaceRestriction;
 use MediaWiki\Block\Restriction\PageRestriction;
@@ -100,7 +100,7 @@ class Block {
        const TYPE_ID = 5;
 
        /**
-        * Create a new block with specified parameters on a user, IP or IP range.
+        * Create a new block with specified option parameters on a user, IP or IP range.
         *
         * @param array $options Parameters of the block:
         *     address string|User  Target user name, User object, IP address or IP range
@@ -125,10 +125,9 @@ class Block {
         *                          actions, except those specifically allowed by
         *                          other block flags
         *
-        * @since 1.26 accepts $options array instead of individual parameters; order
-        * of parameters above reflects the original order
+        * @since 1.26 $options array
         */
-       function __construct( $options = [] ) {
+       public function __construct( array $options = [] ) {
                $defaults = [
                        'address'         => '',
                        'user'            => null,
@@ -305,7 +304,9 @@ class Block {
                        && $this->isSitewide() == $block->isSitewide()
                        // Block::getRestrictions() may perform a database query, so keep it at
                        // the end.
-                       && BlockRestriction::equals( $this->getRestrictions(), $block->getRestrictions() )
+                       && $this->getBlockRestrictionStore()->equals(
+                               $this->getRestrictions(), $block->getRestrictions()
+                       )
                );
        }
 
@@ -390,8 +391,7 @@ class Block {
                                $start = Wikimedia\base_convert( $block->getRangeStart(), 16, 10 );
                                $size = log( $end - $start + 1, 2 );
 
-                               # This has the nice property that a /32 block is ranked equally with a
-                               # single-IP block, which is exactly what it is...
+                               # Rank a range block covering a single IP equally with a single-IP block
                                $score = self::TYPE_RANGE - 1 + ( $size / 128 );
 
                        } else {
@@ -523,10 +523,10 @@ class Block {
 
                $dbw = wfGetDB( DB_MASTER );
 
-               BlockRestriction::deleteByParentBlockId( $this->getId() );
+               $this->getBlockRestrictionStore()->deleteByParentBlockId( $this->getId() );
                $dbw->delete( 'ipblocks', [ 'ipb_parent_block_id' => $this->getId() ], __METHOD__ );
 
-               BlockRestriction::deleteByBlockId( $this->getId() );
+               $this->getBlockRestrictionStore()->deleteByBlockId( $this->getId() );
                $dbw->delete( 'ipblocks', [ 'ipb_id' => $this->getId() ], __METHOD__ );
 
                return $dbw->affectedRows() > 0;
@@ -565,7 +565,7 @@ class Block {
                if ( $affected ) {
                        $this->setId( $dbw->insertId() );
                        if ( $this->restrictions ) {
-                               BlockRestriction::insert( $this->restrictions );
+                               $this->getBlockRestrictionStore()->insert( $this->restrictions );
                        }
                }
 
@@ -585,12 +585,12 @@ class Block {
                        );
                        if ( $ids ) {
                                $dbw->delete( 'ipblocks', [ 'ipb_id' => $ids ], __METHOD__ );
-                               BlockRestriction::deleteByBlockId( $ids );
+                               $this->getBlockRestrictionStore()->deleteByBlockId( $ids );
                                $dbw->insert( 'ipblocks', $row, __METHOD__, [ 'IGNORE' ] );
                                $affected = $dbw->affectedRows();
                                $this->setId( $dbw->insertId() );
                                if ( $this->restrictions ) {
-                                       BlockRestriction::insert( $this->restrictions );
+                                       $this->getBlockRestrictionStore()->insert( $this->restrictions );
                                }
                        }
                }
@@ -634,9 +634,9 @@ class Block {
                if ( $this->restrictions !== null ) {
                        // An empty array should remove all of the restrictions.
                        if ( empty( $this->restrictions ) ) {
-                               $success = BlockRestriction::deleteByBlockId( $this->getId() );
+                               $success = $this->getBlockRestrictionStore()->deleteByBlockId( $this->getId() );
                        } else {
-                               $success = BlockRestriction::update( $this->restrictions );
+                               $success = $this->getBlockRestrictionStore()->update( $this->restrictions );
                        }
                        // Update the result. The first false is the result, otherwise, true.
                        $result = $result && $success;
@@ -653,11 +653,11 @@ class Block {
 
                        // Only update the restrictions if they have been modified.
                        if ( $this->restrictions !== null ) {
-                               BlockRestriction::updateByParentBlockId( $this->getId(), $this->restrictions );
+                               $this->getBlockRestrictionStore()->updateByParentBlockId( $this->getId(), $this->restrictions );
                        }
                } else {
                        // autoblock no longer required, delete corresponding autoblock(s)
-                       BlockRestriction::deleteByParentBlockId( $this->getId() );
+                       $this->getBlockRestrictionStore()->deleteByParentBlockId( $this->getId() );
                        $dbw->delete(
                                'ipblocks',
                                [ 'ipb_parent_block_id' => $this->getId() ],
@@ -1069,7 +1069,9 @@ class Block {
                $this->mId = (int)$blockId;
 
                if ( is_array( $this->restrictions ) ) {
-                       $this->restrictions = BlockRestriction::setBlockId( $blockId, $this->restrictions );
+                       $this->restrictions = $this->getBlockRestrictionStore()->setBlockId(
+                               $blockId, $this->restrictions
+                       );
                }
 
                return $this;
@@ -1367,7 +1369,9 @@ class Block {
                                        $fname
                                );
                                if ( $ids ) {
-                                       BlockRestriction::deleteByBlockId( $ids );
+                                       $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
+                                       $blockRestrictionStore->deleteByBlockId( $ids );
+
                                        $dbw->delete( 'ipblocks', [ 'ipb_id' => $ids ], $fname );
                                }
                        }
@@ -1941,7 +1945,7 @@ class Block {
                        if ( !$this->mId ) {
                                return [];
                        }
-                       $this->restrictions = BlockRestriction::loadByBlockId( $this->mId );
+                       $this->restrictions = $this->getBlockRestrictionStore()->loadByBlockId( $this->mId );
                }
 
                return $this->restrictions;
@@ -2126,17 +2130,17 @@ class Block {
         * Check if the block should be tracked with a cookie.
         *
         * @since 1.33
-        * @param bool $isIpUser The user is logged out
+        * @param bool $isAnon The user is logged out
         * @return bool The block should be tracked with a cookie
         */
-       public function shouldTrackWithCookie( $isIpUser ) {
+       public function shouldTrackWithCookie( $isAnon ) {
                $config = RequestContext::getMain()->getConfig();
                switch ( $this->getType() ) {
                        case self::TYPE_IP:
                        case self::TYPE_RANGE:
-                               return $isIpUser && $config->get( 'CookieSetOnIpBlock' );
+                               return $isAnon && $config->get( 'CookieSetOnIpBlock' );
                        case self::TYPE_USER:
-                               return !$isIpUser && $config->get( 'CookieSetOnAutoblock' ) && $this->isAutoblocking();
+                               return !$isAnon && $config->get( 'CookieSetOnAutoblock' ) && $this->isAutoblocking();
                        default:
                                return false;
                }
@@ -2163,4 +2167,12 @@ class Block {
                }
        }
 
+       /**
+        * Get a BlockRestrictionStore instance
+        *
+        * @return BlockRestrictionStore
+        */
+       private function getBlockRestrictionStore() : BlockRestrictionStore {
+               return MediaWikiServices::getInstance()->getBlockRestrictionStore();
+       }
 }
index 7df2aed..f8ba5b1 100644 (file)
@@ -7,17 +7,28 @@
  * @since 1.29
  */
 class ConfiguredReadOnlyMode {
-       /** @var Config */
-       private $config;
-
-       /** @var string|bool|null */
-       private $fileReason;
+       /** @var string|boolean|null */
+       private $reason;
 
        /** @var string|null */
-       private $overrideReason;
+       private $reasonFile;
 
-       public function __construct( Config $config ) {
-               $this->config = $config;
+       /**
+        * @param string|bool|null $reason Current reason for read-only mode, if known. null means look
+        *   in $reasonFile instead.
+        * @param string|null $reasonFile A file to look in for a reason, if $reason is null. If it
+        *   exists and is non-empty, its contents are treated as the reason for read-only mode.
+        *   Otherwise, the wiki is not read-only.
+        */
+       public function __construct( $reason, $reasonFile = null ) {
+               if ( $reason instanceof Config ) {
+                       // Before 1.34 we passed a whole Config object, which was overkill
+                       wfDeprecated( __METHOD__ . ' with Config passed to constructor', '1.34' );
+                       $reason = $reason->get( 'ReadOnly' );
+                       $reasonFile = $reason->get( 'ReadOnlyFile' );
+               }
+               $this->reason = $reason;
+               $this->reasonFile = $reasonFile;
        }
 
        /**
@@ -35,23 +46,19 @@ class ConfiguredReadOnlyMode {
         * @return string|bool String when in read-only mode; false otherwise
         */
        public function getReason() {
-               if ( $this->overrideReason !== null ) {
-                       return $this->overrideReason;
+               if ( $this->reason !== null ) {
+                       return $this->reason;
                }
-               $confReason = $this->config->get( 'ReadOnly' );
-               if ( $confReason !== null ) {
-                       return $confReason;
+               if ( $this->reasonFile === null ) {
+                       return false;
                }
-               if ( $this->fileReason === null ) {
-                       // Cache for faster access next time
-                       $readOnlyFile = $this->config->get( 'ReadOnlyFile' );
-                       if ( is_file( $readOnlyFile ) && filesize( $readOnlyFile ) > 0 ) {
-                               $this->fileReason = file_get_contents( $readOnlyFile );
-                       } else {
-                               $this->fileReason = false;
-                       }
+               // Try the reason file
+               if ( is_file( $this->reasonFile ) && filesize( $this->reasonFile ) > 0 ) {
+                       $this->reason = file_get_contents( $this->reasonFile );
                }
-               return $this->fileReason;
+               // No need to try the reason file again
+               $this->reasonFile = null;
+               return $this->reason ?? false;
        }
 
        /**
@@ -61,6 +68,6 @@ class ConfiguredReadOnlyMode {
         * @param string|null $msg
         */
        public function setReason( $msg ) {
-               $this->overrideReason = $msg;
+               $this->reason = $msg;
        }
 }
index 1c76121..4ba1836 100644 (file)
@@ -6852,7 +6852,7 @@ $wgRCLinkDays = [ 1, 3, 7, 14, 30 ];
  * FormattedRCFeed-specific options:
  * - 'uri' -- [required] The address to which the messages are sent.
  *   The uri scheme of this string will be looked up in $wgRCEngines
- *   to determine which RCFeedEngine class to use.
+ *   to determine which FormattedRCFeed class to use.
  * - 'formatter' -- [required] The class (implementing RCFeedFormatter) which will
  *   produce the text to send. This can also be an object of the class.
  *   Formatters available by default: JSONRCFeedFormatter, XMLRCFeedFormatter,
@@ -7506,6 +7506,7 @@ $wgServiceWiringFiles = [
  * can add to this to provide custom jobs.
  * A job handler should either be a class name to be instantiated,
  * or (since 1.30) a callback to use for creating the job object.
+ * The callback takes (Title, array map of parameters) as arguments.
  */
 $wgJobClasses = [
        'deletePage' => DeletePageJob::class,
@@ -7530,6 +7531,7 @@ $wgJobClasses = [
        'cdnPurge' => CdnPurgeJob::class,
        'userGroupExpiry' => UserGroupExpiryJob::class,
        'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class,
+       'userOptionsUpdate' => UserOptionsUpdateJob::class,
        'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
        'null' => NullJob::class,
 ];
@@ -8397,7 +8399,7 @@ $wgAsyncHTTPTimeout = 25;
 /**
  * Proxy to use for CURL requests.
  */
-$wgHTTPProxy = false;
+$wgHTTPProxy = '';
 
 /**
  * Local virtual hosts.
@@ -8984,7 +8986,7 @@ $wgXmlDumpSchemaVersion = XML_DUMP_SCHEMA_VERSION_10;
  * @since 1.32 changed allowed flags
  * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
  */
-$wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
+$wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_NEW;
 
 /**
  * Flag to enable Partial Blocks. This allows an admin to prevent a user from editing specific pages
index 2497b0f..66a4d9a 100644 (file)
@@ -140,32 +140,6 @@ function wfArrayDiff2_cmp( $a, $b ) {
        }
 }
 
-/**
- * @deprecated since 1.32, use array_filter() with ARRAY_FILTER_USE_BOTH directly
- *
- * @param array $arr
- * @param callable $callback Will be called with the array value and key (in that order) and
- *   should return a bool which will determine whether the array element is kept.
- * @return array
- */
-function wfArrayFilter( array $arr, callable $callback ) {
-       wfDeprecated( __FUNCTION__, '1.32' );
-       return array_filter( $arr, $callback, ARRAY_FILTER_USE_BOTH );
-}
-
-/**
- * @deprecated since 1.32, use array_filter() with ARRAY_FILTER_USE_KEY directly
- *
- * @param array $arr
- * @param callable $callback Will be called with the array key and should return a bool which
- *   will determine whether the array element is kept.
- * @return array
- */
-function wfArrayFilterByKey( array $arr, callable $callback ) {
-       wfDeprecated( __FUNCTION__, '1.32' );
-       return array_filter( $arr, $callback, ARRAY_FILTER_USE_KEY );
-}
-
 /**
  * Appends to second array if $value differs from that in $default
  *
@@ -895,18 +869,6 @@ function wfExpandIRI( $url ) {
        );
 }
 
-/**
- * Make URL indexes, appropriate for the el_index field of externallinks.
- *
- * @deprecated since 1.33, use LinkFilter::makeIndexes() instead
- * @param string $url
- * @return array
- */
-function wfMakeUrlIndexes( $url ) {
-       wfDeprecated( __FUNCTION__, '1.33' );
-       return LinkFilter::makeIndexes( $url );
-}
-
 /**
  * Check whether a given URL has a domain that occurs in a given set of domains
  * @param string $url
@@ -2671,25 +2633,25 @@ function wfGetLBFactory() {
 
 /**
  * Find a file.
- * Shortcut for RepoGroup::singleton()->findFile()
- *
+ * @deprecated since 1.34, use MediaWikiServices
  * @param string|LinkTarget $title String or LinkTarget object
  * @param array $options Associative array of options (see RepoGroup::findFile)
  * @return File|bool File, or false if the file does not exist
  */
 function wfFindFile( $title, $options = [] ) {
-       return RepoGroup::singleton()->findFile( $title, $options );
+       return MediaWikiServices::getInstance()->getRepoGroup()->findFile( $title, $options );
 }
 
 /**
  * Get an object referring to a locally registered file.
  * Returns a valid placeholder object if the file does not exist.
  *
+ * @deprecated since 1.34, use MediaWikiServices
  * @param Title|string $title
  * @return LocalFile|null A File, or null if passed an invalid Title
  */
 function wfLocalFile( $title ) {
-       return RepoGroup::singleton()->getLocalRepo()->newFile( $title );
+       return MediaWikiServices::getInstance()->getRepoGroup()->getLocalRepo()->newFile( $title );
 }
 
 /**
index c13d33f..d6f50bf 100644 (file)
@@ -13,6 +13,8 @@ use GlobalVarConfig;
 use Hooks;
 use IBufferingStatsdDataFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
+use MediaWiki\Block\BlockManager;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Http\HttpRequestFactory;
 use MediaWiki\Permissions\PermissionManager;
 use MediaWiki\Preferences\PreferencesFactory;
@@ -46,6 +48,7 @@ use ParserCache;
 use ParserFactory;
 use PasswordFactory;
 use ProxyLookup;
+use RepoGroup;
 use ResourceLoader;
 use SearchEngine;
 use SearchEngineConfig;
@@ -436,6 +439,22 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'BlobStoreFactory' );
        }
 
+       /**
+        * @since 1.34
+        * @return BlockManager
+        */
+       public function getBlockManager() : BlockManager {
+               return $this->getService( 'BlockManager' );
+       }
+
+       /**
+        * @since 1.33
+        * @return BlockRestrictionStore
+        */
+       public function getBlockRestrictionStore() : BlockRestrictionStore {
+               return $this->getService( 'BlockRestrictionStore' );
+       }
+
        /**
         * Returns the Config object containing the bootstrap configuration.
         * Bootstrap configuration would typically include database credentials
@@ -771,6 +790,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'ReadOnlyMode' );
        }
 
+       /**
+        * @since 1.34
+        * @return RepoGroup
+        */
+       public function getRepoGroup() : RepoGroup {
+               return $this->getService( 'RepoGroup' );
+       }
+
        /**
         * @since 1.33
         * @return ResourceLoader
index 24178ac..e49398a 100644 (file)
@@ -233,14 +233,69 @@ class MovePage {
        }
 
        /**
+        * Move a page without taking user permissions into account. Only checks if the move is itself
+        * invalid, e.g., trying to move a special page or trying to move a page onto one that already
+        * exists.
+        *
+        * @param User $user
+        * @param string|null $reason
+        * @param bool|null $createRedirect
+        * @param string[] $changeTags Change tags to apply to the entry in the move log
+        * @return Status
+        */
+       public function move(
+               User $user, $reason = null, $createRedirect = true, array $changeTags = []
+       ) {
+               $status = $this->isValidMove();
+               if ( !$status->isOK() ) {
+                       return $status;
+               }
+
+               return $this->moveUnsafe( $user, $reason, $createRedirect, $changeTags );
+       }
+
+       /**
+        * Same as move(), but with permissions checks.
+        *
+        * @param User $user
+        * @param string|null $reason
+        * @param bool|null $createRedirect Ignored if user doesn't have suppressredirect permission
+        * @param string[] $changeTags Change tags to apply to the entry in the move log
+        * @return Status
+        */
+       public function moveIfAllowed(
+               User $user, $reason = null, $createRedirect = true, array $changeTags = []
+       ) {
+               $status = $this->isValidMove();
+               $status->merge( $this->checkPermissions( $user, $reason ) );
+               if ( $changeTags ) {
+                       $status->merge( ChangeTags::canAddTagsAccompanyingChange( $changeTags, $user ) );
+               }
+
+               if ( !$status->isOK() ) {
+                       // Auto-block user's IP if the account was "hard" blocked
+                       $user->spreadAnyEditBlock();
+                       return $status;
+               }
+
+               // Check suppressredirect permission
+               if ( !$user->isAllowed( 'suppressredirect' ) ) {
+                       $createRedirect = true;
+               }
+
+               return $this->moveUnsafe( $user, $reason, $createRedirect, $changeTags );
+       }
+
+       /**
+        * Moves *without* any sort of safety or sanity checks. Hooks can still fail the move, however.
+        *
         * @param User $user
         * @param string $reason
         * @param bool $createRedirect
-        * @param string[] $changeTags Change tags to apply to the entry in the move log. Caller
-        *  should perform permission checks with ChangeTags::canAddTagsAccompanyingChange
+        * @param string[] $changeTags Change tags to apply to the entry in the move log
         * @return Status
         */
-       public function move( User $user, $reason, $createRedirect, array $changeTags = [] ) {
+       private function moveUnsafe( User $user, $reason, $createRedirect, array $changeTags ) {
                global $wgCategoryCollation;
 
                $status = Status::newGood();
index 549b7ba..e443803 100644 (file)
@@ -66,12 +66,16 @@ class PermissionManager {
        /** @var bool If set to true, blocked users will no longer be allowed to log in */
        private $blockDisablesLogin;
 
+       /** @var NamespaceInfo */
+       private $nsInfo;
+
        /**
         * @param SpecialPageFactory $specialPageFactory
         * @param string[] $whitelistRead
         * @param string[] $whitelistReadRegexp
         * @param bool $emailConfirmToEdit
         * @param bool $blockDisablesLogin
+        * @param NamespaceInfo $nsInfo
         */
        public function __construct(
                SpecialPageFactory $specialPageFactory,
index 8d7c3b6..f4e85ad 100644 (file)
@@ -22,6 +22,7 @@
 
 use Psr\Log\LoggerInterface;
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Send information about this MediaWiki instance to MediaWiki.org.
@@ -229,7 +230,7 @@ class Pingback {
                $json = FormatJson::encode( $data );
                $queryString = rawurlencode( str_replace( ' ', '\u0020', $json ) ) . ';';
                $url = 'https://www.mediawiki.org/beacon/event?' . $queryString;
-               return Http::post( $url ) !== false;
+               return MediaWikiServices::getInstance()->getHttpRequestFactory()->post( $url ) !== null;
        }
 
        /**
index cbaff90..de3c299 100644 (file)
@@ -1008,9 +1008,8 @@ class Revision implements IDBAccessObject {
         * @return Revision|null
         */
        public function getPrevious() {
-               $title = $this->getTitle();
-               $rec = self::getRevisionLookup()->getPreviousRevision( $this->mRecord, $title );
-               return $rec ? new Revision( $rec, self::READ_NORMAL, $title ) : null;
+               $rec = self::getRevisionLookup()->getPreviousRevision( $this->mRecord );
+               return $rec ? new Revision( $rec, self::READ_NORMAL, $this->getTitle() ) : null;
        }
 
        /**
@@ -1019,9 +1018,8 @@ class Revision implements IDBAccessObject {
         * @return Revision|null
         */
        public function getNext() {
-               $title = $this->getTitle();
-               $rec = self::getRevisionLookup()->getNextRevision( $this->mRecord, $title );
-               return $rec ? new Revision( $rec, self::READ_NORMAL, $title ) : null;
+               $rec = self::getRevisionLookup()->getNextRevision( $this->mRecord );
+               return $rec ? new Revision( $rec, self::READ_NORMAL, $this->getTitle() ) : null;
        }
 
        /**
@@ -1256,13 +1254,13 @@ class Revision implements IDBAccessObject {
        /**
         * Get rev_timestamp from rev_id, without loading the rest of the row
         *
-        * @param Title $title
+        * @param Title $title (ignored since 1.34)
         * @param int $id
         * @param int $flags
         * @return string|bool False if not found
         */
        static function getTimestampFromId( $title, $id, $flags = 0 ) {
-               return self::getRevisionStore()->getTimestampFromId( $title, $id, $flags );
+               return self::getRevisionStore()->getTimestampFromId( $id, $flags );
        }
 
        /**
index db6c7c3..17cafc6 100644 (file)
@@ -85,11 +85,12 @@ interface RevisionLookup extends IDBAccessObject {
         * MCR migration note: this replaces Revision::getPrevious
         *
         * @param RevisionRecord $rev
-        * @param Title|null $title if known (optional)
+        * @param int $flags (optional) $flags include:
+        *      IDBAccessObject::READ_LATEST: Select the data from the master
         *
         * @return RevisionRecord|null
         */
-       public function getPreviousRevision( RevisionRecord $rev, Title $title = null );
+       public function getPreviousRevision( RevisionRecord $rev, $flags = 0 );
 
        /**
         * Get next revision for this title
@@ -97,11 +98,24 @@ interface RevisionLookup extends IDBAccessObject {
         * MCR migration note: this replaces Revision::getNext
         *
         * @param RevisionRecord $rev
-        * @param Title|null $title if known (optional)
+        * @param int $flags (optional) $flags include:
+        *      IDBAccessObject::READ_LATEST: Select the data from the master
         *
         * @return RevisionRecord|null
         */
-       public function getNextRevision( RevisionRecord $rev, Title $title = null );
+       public function getNextRevision( RevisionRecord $rev, $flags = 0 );
+
+       /**
+        * Get rev_timestamp from rev_id, without loading the rest of the row.
+        *
+        * MCR migration note: this replaces Revision::getTimestampFromId
+        *
+        * @param int $id
+        * @param int $flags
+        * @return string|bool False if not found
+        * @since 1.34 (present earlier in RevisionStore)
+        */
+       public function getTimestampFromId( $id, $flags = 0 );
 
        /**
         * Load a revision based on a known page ID and current revision ID from the DB
index 0329bd1..ea4cf88 100644 (file)
@@ -278,12 +278,13 @@ class RevisionStore
 
        /**
         * @param int $mode DB_MASTER or DB_REPLICA
+        * @param array $groups
         *
         * @return IDatabase
         */
-       private function getDBConnection( $mode ) {
+       private function getDBConnection( $mode, $groups = [] ) {
                $lb = $this->getDBLoadBalancer();
-               return $lb->getConnection( $mode, [], $this->wikiId );
+               return $lb->getConnection( $mode, $groups, $this->wikiId );
        }
 
        /**
@@ -1739,7 +1740,8 @@ class RevisionStore
                        $user = User::newFromAnyId(
                                $row->ar_user ?? null,
                                $row->ar_user_text ?? null,
-                               $row->ar_actor ?? null
+                               $row->ar_actor ?? null,
+                               $this->wikiId
                        );
                } catch ( InvalidArgumentException $ex ) {
                        wfWarn( __METHOD__ . ': ' . $title->getPrefixedDBkey() . ': ' . $ex->getMessage() );
@@ -1793,7 +1795,8 @@ class RevisionStore
                        $user = User::newFromAnyId(
                                $row->rev_user ?? null,
                                $row->rev_user_text ?? null,
-                               $row->rev_actor ?? null
+                               $row->rev_actor ?? null,
+                               $this->wikiId
                        );
                } catch ( InvalidArgumentException $ex ) {
                        wfWarn( __METHOD__ . ': ' . $title->getPrefixedDBkey() . ': ' . $ex->getMessage() );
@@ -1931,14 +1934,21 @@ class RevisionStore
                /** @var UserIdentity $user */
                $user = null;
 
-               if ( isset( $fields['user'] ) && ( $fields['user'] instanceof UserIdentity ) ) {
+               // If a user is passed in, use it if possible. We cannot use a user from a
+               // remote wiki with unsuppressed ids, due to issues described in T222212.
+               if ( isset( $fields['user'] ) &&
+                       ( $fields['user'] instanceof UserIdentity ) &&
+                       ( $this->wikiId === false ||
+                               ( !$fields['user']->getId() && !$fields['user']->getActorId() ) )
+               ) {
                        $user = $fields['user'];
                } else {
                        try {
                                $user = User::newFromAnyId(
                                        $fields['user'] ?? null,
                                        $fields['user_text'] ?? null,
-                                       $fields['actor'] ?? null
+                                       $fields['actor'] ?? null,
+                                       $this->wikiId
                                );
                        } catch ( InvalidArgumentException $ex ) {
                                $user = null;
@@ -2548,20 +2558,17 @@ class RevisionStore
        }
 
        /**
-        * Get the revision before $rev in the page's history, if any.
-        * Will return null for the first revision but also for deleted or unsaved revisions.
-        *
-        * MCR migration note: this replaces Revision::getPrevious
-        *
-        * @see Title::getPreviousRevisionID
-        * @see PageArchive::getPreviousRevision
+        * Implementation of getPreviousRevision and getNextRevision.
         *
         * @param RevisionRecord $rev
-        * @param Title|null $title if known (optional)
-        *
+        * @param int $flags
+        * @param string $dir 'next' or 'prev'
         * @return RevisionRecord|null
         */
-       public function getPreviousRevision( RevisionRecord $rev, Title $title = null ) {
+       private function getRelativeRevision( RevisionRecord $rev, $flags, $dir ) {
+               $op = $dir === 'next' ? '>' : '<';
+               $sort = $dir === 'next' ? 'ASC' : 'DESC';
+
                if ( !$rev->getId() || !$rev->getPageId() ) {
                        // revision is unsaved or otherwise incomplete
                        return null;
@@ -2572,54 +2579,86 @@ class RevisionStore
                        return null;
                }
 
-               if ( $title === null ) {
-                       // this would fail for deleted revisions
-                       $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
+               list( $dbType, ) = DBAccessObjectUtils::getDBOptions( $flags );
+               $db = $this->getDBConnection( $dbType, [ 'contributions' ] );
+
+               $ts = $this->getTimestampFromId( $rev->getId(), $flags );
+               if ( $ts === false ) {
+                       // XXX Should this be moved into getTimestampFromId?
+                       $ts = $db->selectField( 'archive', 'ar_timestamp',
+                               [ 'ar_rev_id' => $rev->getId() ], __METHOD__ );
+                       if ( $ts === false ) {
+                               // XXX Is this reachable? How can we have a page id but no timestamp?
+                               return null;
+                       }
                }
+               $ts = $db->addQuotes( $db->timestamp( $ts ) );
 
-               $prev = $title->getPreviousRevisionID( $rev->getId() );
-               if ( !$prev ) {
+               $revId = $db->selectField( 'revision', 'rev_id',
+                       [
+                               'rev_page' => $rev->getPageId(),
+                               "rev_timestamp $op $ts OR (rev_timestamp = $ts AND rev_id $op {$rev->getId()})"
+                       ],
+                       __METHOD__,
+                       [
+                               'ORDER BY' => "rev_timestamp $sort, rev_id $sort",
+                               'IGNORE INDEX' => 'rev_timestamp', // Probably needed for T159319
+                       ]
+               );
+
+               if ( $revId === false ) {
                        return null;
                }
 
-               return $this->getRevisionByTitle( $title, $prev );
+               return $this->getRevisionById( intval( $revId ) );
        }
 
        /**
-        * Get the revision after $rev in the page's history, if any.
-        * Will return null for the latest revision but also for deleted or unsaved revisions.
+        * Get the revision before $rev in the page's history, if any.
+        * Will return null for the first revision but also for deleted or unsaved revisions.
         *
-        * MCR migration note: this replaces Revision::getNext
+        * MCR migration note: this replaces Revision::getPrevious
         *
-        * @see Title::getNextRevisionID
+        * @see Title::getPreviousRevisionID
+        * @see PageArchive::getPreviousRevision
         *
         * @param RevisionRecord $rev
-        * @param Title|null $title if known (optional)
+        * @param int $flags (optional) $flags include:
+        *      IDBAccessObject::READ_LATEST: Select the data from the master
         *
         * @return RevisionRecord|null
         */
-       public function getNextRevision( RevisionRecord $rev, Title $title = null ) {
-               if ( !$rev->getId() || !$rev->getPageId() ) {
-                       // revision is unsaved or otherwise incomplete
-                       return null;
-               }
-
-               if ( $rev instanceof RevisionArchiveRecord ) {
-                       // revision is deleted, so it's not part of the page history
-                       return null;
+       public function getPreviousRevision( RevisionRecord $rev, $flags = 0 ) {
+               if ( $flags instanceof Title ) {
+                       // Old calling convention, we don't use Title here anymore
+                       wfDeprecated( __METHOD__ . ' with Title', '1.34' );
+                       $flags = 0;
                }
 
-               if ( $title === null ) {
-                       // this would fail for deleted revisions
-                       $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
-               }
+               return $this->getRelativeRevision( $rev, $flags, 'prev' );
+       }
 
-               $next = $title->getNextRevisionID( $rev->getId() );
-               if ( !$next ) {
-                       return null;
+       /**
+        * Get the revision after $rev in the page's history, if any.
+        * Will return null for the latest revision but also for deleted or unsaved revisions.
+        *
+        * MCR migration note: this replaces Revision::getNext
+        *
+        * @see Title::getNextRevisionID
+        *
+        * @param RevisionRecord $rev
+        * @param int $flags (optional) $flags include:
+        *      IDBAccessObject::READ_LATEST: Select the data from the master
+        * @return RevisionRecord|null
+        */
+       public function getNextRevision( RevisionRecord $rev, $flags = 0 ) {
+               if ( $flags instanceof Title ) {
+                       // Old calling convention, we don't use Title here anymore
+                       wfDeprecated( __METHOD__ . ' with Title', '1.34' );
+                       $flags = 0;
                }
 
-               return $this->getRevisionByTitle( $title, $next );
+               return $this->getRelativeRevision( $rev, $flags, 'next' );
        }
 
        /**
@@ -2658,21 +2697,27 @@ class RevisionStore
        }
 
        /**
-        * Get rev_timestamp from rev_id, without loading the rest of the row
+        * Get rev_timestamp from rev_id, without loading the rest of the row.
+        *
+        * Historically, there was an extra Title parameter that was passed before $id. This is no
+        * longer needed and is deprecated in 1.34.
         *
         * MCR migration note: this replaces Revision::getTimestampFromId
         *
-        * @param Title $title
         * @param int $id
         * @param int $flags
         * @return string|bool False if not found
         */
-       public function getTimestampFromId( $title, $id, $flags = 0 ) {
+       public function getTimestampFromId( $id, $flags = 0 ) {
+               if ( $id instanceof Title ) {
+                       // Old deprecated calling convention supported for backwards compatibility
+                       $id = $flags;
+                       $flags = func_num_args() > 2 ? func_get_arg( 2 ) : 0;
+               }
                $db = $this->getDBConnectionRefForQueryFlags( $flags );
 
-               $conds = [ 'rev_id' => $id ];
-               $conds['rev_page'] = $title->getArticleID();
-               $timestamp = $db->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ );
+               $timestamp =
+                       $db->selectField( 'revision', 'rev_timestamp', [ 'rev_id' => $id ], __METHOD__ );
 
                return ( $timestamp !== false ) ? wfTimestamp( TS_MW, $timestamp ) : false;
        }
index 40e9f87..f74ba79 100644 (file)
 
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
 use MediaWiki\Auth\AuthManager;
+use MediaWiki\Block\BlockManager;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Config\ConfigRepository;
+use MediaWiki\Config\ServiceOptions;
 use MediaWiki\Interwiki\ClassicInterwikiLookup;
 use MediaWiki\Interwiki\InterwikiLookup;
 use MediaWiki\Linker\LinkRenderer;
@@ -79,11 +82,35 @@ return [
                return new BlobStoreFactory(
                        $services->getDBLoadBalancerFactory(),
                        $services->getMainWANObjectCache(),
-                       $services->getMainConfig(),
+                       new ServiceOptions( BlobStoreFactory::$constructorOptions,
+                               $services->getMainConfig() ),
                        $services->getContentLanguage()
                );
        },
 
+       'BlockManager' => function ( MediaWikiServices $services ) : BlockManager {
+               $config = $services->getMainConfig();
+               $context = RequestContext::getMain();
+               return new BlockManager(
+                       $context->getUser(),
+                       $context->getRequest(),
+                       $config->get( 'ApplyIpBlocksToXff' ),
+                       $config->get( 'CookieSetOnAutoblock' ),
+                       $config->get( 'CookieSetOnIpBlock' ),
+                       $config->get( 'DnsBlacklistUrls' ),
+                       $config->get( 'EnableDnsBlacklist' ),
+                       $config->get( 'ProxyList' ),
+                       $config->get( 'ProxyWhitelist' ),
+                       $config->get( 'SoftBlockRanges' )
+               );
+       },
+
+       'BlockRestrictionStore' => function ( MediaWikiServices $services ) : BlockRestrictionStore {
+               return new BlockRestrictionStore(
+                       $services->getDBLoadBalancer()
+               );
+       },
+
        'CommentStore' => function ( MediaWikiServices $services ) : CommentStore {
                return new CommentStore(
                        $services->getContentLanguage(),
@@ -107,7 +134,11 @@ return [
        },
 
        'ConfiguredReadOnlyMode' => function ( MediaWikiServices $services ) : ConfiguredReadOnlyMode {
-               return new ConfiguredReadOnlyMode( $services->getMainConfig() );
+               $config = $services->getMainConfig();
+               return new ConfiguredReadOnlyMode(
+                       $config->get( 'ReadOnly' ),
+                       $config->get( 'ReadOnlyFile' )
+               );
        },
 
        'ContentLanguage' => function ( MediaWikiServices $services ) : Language {
@@ -150,7 +181,7 @@ return [
 
                $lbConf = MWLBFactory::applyDefaultConfig(
                        $mainConfig->get( 'LBFactoryConf' ),
-                       $mainConfig,
+                       new ServiceOptions( MWLBFactory::$applyDefaultConfigOptions, $mainConfig ),
                        $services->getConfiguredReadOnlyMode(),
                        $services->getLocalServerObjectCache(),
                        $services->getMainObjectStash(),
@@ -159,7 +190,7 @@ return [
                $class = MWLBFactory::getLBFactoryClass( $lbConf );
 
                $instance = new $class( $lbConf );
-               MWLBFactory::setSchemaAliases( $instance, $mainConfig );
+               MWLBFactory::setSchemaAliases( $instance, $mainConfig->get( 'DBtype' ) );
 
                return $instance;
        },
@@ -177,7 +208,7 @@ return [
        },
 
        'GenderCache' => function ( MediaWikiServices $services ) : GenderCache {
-               return new GenderCache();
+               return new GenderCache( $services->getNamespaceInfo() );
        },
 
        'HttpRequestFactory' =>
@@ -200,7 +231,8 @@ return [
        'LinkCache' => function ( MediaWikiServices $services ) : LinkCache {
                return new LinkCache(
                        $services->getTitleFormatter(),
-                       $services->getMainWANObjectCache()
+                       $services->getMainWANObjectCache(),
+                       $services->getNamespaceInfo()
                );
        },
 
@@ -332,7 +364,8 @@ return [
        },
 
        'NamespaceInfo' => function ( MediaWikiServices $services ) : NamespaceInfo {
-               return new NamespaceInfo( $services->getMainConfig() );
+               return new NamespaceInfo( new ServiceOptions( NamespaceInfo::$constructorOptions,
+                       $services->getMainConfig() ) );
        },
 
        'NameTableStoreFactory' => function ( MediaWikiServices $services ) : NameTableStoreFactory {
@@ -425,10 +458,12 @@ return [
 
        'PreferencesFactory' => function ( MediaWikiServices $services ) : PreferencesFactory {
                $factory = new DefaultPreferencesFactory(
-                       $services->getMainConfig(),
+                       new ServiceOptions(
+                               DefaultPreferencesFactory::$constructorOptions, $services->getMainConfig() ),
                        $services->getContentLanguage(),
                        AuthManager::singleton(),
-                       $services->getLinkRendererFactory()->create()
+                       $services->getLinkRendererFactory()->create(),
+                       $services->getNamespaceInfo()
                );
                $factory->setLogger( LoggerFactory::getInstance( 'preferences' ) );
 
@@ -450,7 +485,18 @@ return [
                );
        },
 
+       'RepoGroup' => function ( MediaWikiServices $services ) : RepoGroup {
+               $config = $services->getMainConfig();
+               return new RepoGroup(
+                       $config->get( 'LocalFileRepo' ),
+                       $config->get( 'ForeignFileRepos' ),
+                       $services->getMainWANObjectCache()
+               );
+       },
+
        'ResourceLoader' => function ( MediaWikiServices $services ) : ResourceLoader {
+               // @todo This should not take a Config object, but it's not so easy to remove because it
+               // exposes it in a getter, which is actually used.
                global $IP;
                $config = $services->getMainConfig();
 
@@ -514,6 +560,8 @@ return [
        },
 
        'SearchEngineConfig' => function ( MediaWikiServices $services ) : SearchEngineConfig {
+               // @todo This should not take a Config object, but it's not so easy to remove because it
+               // exposes it in a getter, which is actually used.
                return new SearchEngineConfig( $services->getMainConfig(),
                        $services->getContentLanguage() );
        },
@@ -598,13 +646,9 @@ return [
        },
 
        'SpecialPageFactory' => function ( MediaWikiServices $services ) : SpecialPageFactory {
-               $config = $services->getMainConfig();
-               $options = [];
-               foreach ( SpecialPageFactory::$constructorOptions as $key ) {
-                       $options[$key] = $config->get( $key );
-               }
                return new SpecialPageFactory(
-                       $options,
+                       new ServiceOptions(
+                               SpecialPageFactory::$constructorOptions, $services->getMainConfig() ),
                        $services->getContentLanguage()
                );
        },
@@ -664,7 +708,9 @@ return [
                        $services->getMainObjectStash(),
                        new HashBagOStuff( [ 'maxKeys' => 100 ] ),
                        $services->getReadOnlyMode(),
-                       $services->getMainConfig()->get( 'UpdateRowsPerQuery' )
+                       $services->getMainConfig()->get( 'UpdateRowsPerQuery' ),
+                       $services->getNamespaceInfo(),
+                       $services->getRevisionLookup()
                );
                $store->setStatsdDataFactory( $services->getStatsdDataFactory() );
 
index 4e1f97f..5e99454 100644 (file)
@@ -20,8 +20,8 @@
 
 namespace MediaWiki\Storage;
 
-use Config;
 use Language;
+use MediaWiki\Config\ServiceOptions;
 use WANObjectCache;
 use Wikimedia\Rdbms\LBFactory;
 
@@ -45,24 +45,39 @@ class BlobStoreFactory {
        private $cache;
 
        /**
-        * @var Config
+        * @var ServiceOptions
         */
-       private $config;
+       private $options;
 
        /**
         * @var Language
         */
        private $contLang;
 
+       /**
+        * TODO Make this a const when HHVM support is dropped (T192166)
+        *
+        * @var array
+        * @since 1.34
+        */
+       public static $constructorOptions = [
+               'CompressRevisions',
+               'DefaultExternalStore',
+               'LegacyEncoding',
+               'RevisionCacheExpiry',
+       ];
+
        public function __construct(
                LBFactory $lbFactory,
                WANObjectCache $cache,
-               Config $mainConfig,
+               ServiceOptions $options,
                Language $contLang
        ) {
+               $options->assertRequiredOptions( self::$constructorOptions );
+
                $this->lbFactory = $lbFactory;
                $this->cache = $cache;
-               $this->config = $mainConfig;
+               $this->options = $options;
                $this->contLang = $contLang;
        }
 
@@ -92,12 +107,12 @@ class BlobStoreFactory {
                        $wikiId
                );
 
-               $store->setCompressBlobs( $this->config->get( 'CompressRevisions' ) );
-               $store->setCacheExpiry( $this->config->get( 'RevisionCacheExpiry' ) );
-               $store->setUseExternalStore( $this->config->get( 'DefaultExternalStore' ) !== false );
+               $store->setCompressBlobs( $this->options->get( 'CompressRevisions' ) );
+               $store->setCacheExpiry( $this->options->get( 'RevisionCacheExpiry' ) );
+               $store->setUseExternalStore( $this->options->get( 'DefaultExternalStore' ) !== false );
 
-               if ( $this->config->get( 'LegacyEncoding' ) ) {
-                       $store->setLegacyEncoding( $this->config->get( 'LegacyEncoding' ), $this->contLang );
+               if ( $this->options->get( 'LegacyEncoding' ) ) {
+                       $store->setLegacyEncoding( $this->options->get( 'LegacyEncoding' ), $this->contLang );
                }
 
                return $store;
index 27baeb2..ad6c167 100644 (file)
@@ -1501,10 +1501,12 @@ class Title implements LinkTarget, IDBAccessObject {
        /**
         * Get a Title object associated with the talk page of this article
         *
+        * @deprecated since 1.34, use NamespaceInfo::getTalkPage
         * @return Title The object for the talk page
         */
        public function getTalkPage() {
-               return self::makeTitle( MWNamespace::getTalk( $this->mNamespace ), $this->mDbkeyform );
+               return self::castFromLinkTarget(
+                       MediaWikiServices::getInstance()->getNamespaceInfo()->getTalkPage( $this ) );
        }
 
        /**
@@ -1528,37 +1530,26 @@ class Title implements LinkTarget, IDBAccessObject {
         * Get a title object associated with the subject page of this
         * talk page
         *
+        * @deprecated since 1.34, use NamespaceInfo::getSubjectPage
         * @return Title The object for the subject page
         */
        public function getSubjectPage() {
-               // Is this the same title?
-               $subjectNS = MWNamespace::getSubject( $this->mNamespace );
-               if ( $this->mNamespace == $subjectNS ) {
-                       return $this;
-               }
-               return self::makeTitle( $subjectNS, $this->mDbkeyform );
+               return self::castFromLinkTarget(
+                       MediaWikiServices::getInstance()->getNamespaceInfo()->getSubjectPage( $this ) );
        }
 
        /**
         * Get the other title for this page, if this is a subject page
         * get the talk page, if it is a subject page get the talk page
         *
+        * @deprecated since 1.34, use NamespaceInfo::getAssociatedPage
         * @since 1.25
         * @throws MWException If the page doesn't have an other page
         * @return Title
         */
        public function getOtherPage() {
-               if ( $this->isSpecialPage() ) {
-                       throw new MWException( 'Special pages cannot have other pages' );
-               }
-               if ( $this->isTalkPage() ) {
-                       return $this->getSubjectPage();
-               } else {
-                       if ( !$this->canHaveTalkPage() ) {
-                               throw new MWException( "{$this->getPrefixedText()} does not have an other page" );
-                       }
-                       return $this->getTalkPage();
-               }
+               return self::castFromLinkTarget(
+                       MediaWikiServices::getInstance()->getNamespaceInfo()->getAssociatedPage( $this ) );
        }
 
        /**
@@ -3445,19 +3436,10 @@ class Title implements LinkTarget, IDBAccessObject {
                array $changeTags = []
        ) {
                global $wgUser;
-               $err = $this->isValidMoveOperation( $nt, $auth, $reason );
-               if ( is_array( $err ) ) {
-                       // Auto-block user's IP if the account was "hard" blocked
-                       $wgUser->spreadAnyEditBlock();
-                       return $err;
-               }
-               // Check suppressredirect permission
-               if ( $auth && !$wgUser->isAllowed( 'suppressredirect' ) ) {
-                       $createRedirect = true;
-               }
 
                $mp = new MovePage( $this, $nt );
-               $status = $mp->move( $wgUser, $reason, $createRedirect, $changeTags );
+               $method = $auth ? 'moveIfAllowed' : 'move';
+               $status = $mp->$method( $wgUser, $reason, $createRedirect, $changeTags );
                if ( $status->isOK() ) {
                        return true;
                } else {
@@ -3730,57 +3712,25 @@ class Title implements LinkTarget, IDBAccessObject {
         * @return int|bool New revision ID, or false if none exists
         */
        private function getRelativeRevisionID( $revId, $flags, $dir ) {
-               $revId = (int)$revId;
-               if ( $dir === 'next' ) {
-                       $op = '>';
-                       $sort = 'ASC';
-               } elseif ( $dir === 'prev' ) {
-                       $op = '<';
-                       $sort = 'DESC';
-               } else {
-                       throw new InvalidArgumentException( '$dir must be "next" or "prev"' );
-               }
-
-               if ( $flags & self::GAID_FOR_UPDATE ) {
-                       $db = wfGetDB( DB_MASTER );
-               } else {
-                       $db = wfGetDB( DB_REPLICA, 'contributions' );
-               }
-
-               // Intentionally not caring if the specified revision belongs to this
-               // page. We only care about the timestamp.
-               $ts = $db->selectField( 'revision', 'rev_timestamp', [ 'rev_id' => $revId ], __METHOD__ );
-               if ( $ts === false ) {
-                       $ts = $db->selectField( 'archive', 'ar_timestamp', [ 'ar_rev_id' => $revId ], __METHOD__ );
-                       if ( $ts === false ) {
-                               // Or should this throw an InvalidArgumentException or something?
-                               return false;
-                       }
+               $rl = MediaWikiServices::getInstance()->getRevisionLookup();
+               $rlFlags = $flags === self::GAID_FOR_UPDATE ? IDBAccessObject::READ_LATEST : 0;
+               $rev = $rl->getRevisionById( $revId, $rlFlags );
+               if ( !$rev ) {
+                       return false;
                }
-               $ts = $db->addQuotes( $ts );
-
-               $revId = $db->selectField( 'revision', 'rev_id',
-                       [
-                               'rev_page' => $this->getArticleID( $flags ),
-                               "rev_timestamp $op $ts OR (rev_timestamp = $ts AND rev_id $op $revId)"
-                       ],
-                       __METHOD__,
-                       [
-                               'ORDER BY' => "rev_timestamp $sort, rev_id $sort",
-                               'IGNORE INDEX' => 'rev_timestamp', // Probably needed for T159319
-                       ]
-               );
-
-               if ( $revId === false ) {
+               $oldRev = $dir === 'next'
+                       ? $rl->getNextRevision( $rev, $rlFlags )
+                       : $rl->getPreviousRevision( $rev, $rlFlags );
+               if ( !$oldRev ) {
                        return false;
-               } else {
-                       return intval( $revId );
                }
+               return $oldRev->getId();
        }
 
        /**
         * Get the revision ID of the previous revision
         *
+        * @deprecated since 1.34, use RevisionLookup::getPreviousRevision
         * @param int $revId Revision ID. Get the revision that was before this one.
         * @param int $flags Title::GAID_FOR_UPDATE
         * @return int|bool Old revision ID, or false if none exists
@@ -3792,6 +3742,7 @@ class Title implements LinkTarget, IDBAccessObject {
        /**
         * Get the revision ID of the next revision
         *
+        * @deprecated since 1.34, use RevisionLookup::getNextRevision
         * @param int $revId Revision ID. Get the revision that was after this one.
         * @param int $flags Title::GAID_FOR_UPDATE
         * @return int|bool Next revision ID, or false if none exists
@@ -4031,14 +3982,14 @@ class Title implements LinkTarget, IDBAccessObject {
        /**
         * Compare with another title.
         *
-        * @param Title $title
+        * @param LinkTarget $title
         * @return bool
         */
-       public function equals( Title $title ) {
+       public function equals( LinkTarget $title ) {
                // Note: === is necessary for proper matching of number-like titles.
-               return $this->mInterwiki === $title->mInterwiki
-                       && $this->mNamespace == $title->mNamespace
-                       && $this->mDbkeyform === $title->mDbkeyform;
+               return $this->mInterwiki === $title->getInterwiki()
+                       && $this->mNamespace == $title->getNamespace()
+                       && $this->mDbkeyform === $title->getDBkey();
        }
 
        /**
index fc42be4..658ee48 100644 (file)
@@ -267,7 +267,7 @@ class HistoryAction extends FormlessAction {
                $htmlForm
                        ->setMethod( 'get' )
                        ->setAction( wfScript() )
-                       ->setCollapsible( true )
+                       ->setCollapsibleOptions( true )
                        ->setId( 'mw-history-searchform' )
                        ->setSubmitText( $this->msg( 'historyaction-submit' )->text() )
                        ->setWrapperAttributes( [ 'id' => 'mw-history-search' ] )
index 8ab92af..19d84f7 100644 (file)
@@ -36,6 +36,8 @@ use Wikimedia\Rdbms\IDatabase;
  */
 abstract class ApiBase extends ContextSource {
 
+       use ApiBlockInfoTrait;
+
        /**
         * @name Constants for ::getAllowedParams() arrays
         * These constants are keys in the arrays returned by ::getAllowedParams()
@@ -1811,7 +1813,7 @@ abstract class ApiBase extends ContextSource {
                        if ( is_string( $error[0] ) && isset( self::$blockMsgMap[$error[0]] ) && $user->getBlock() ) {
                                list( $msg, $code ) = self::$blockMsgMap[$error[0]];
                                $status->fatal( ApiMessage::create( $msg, $code,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => $this->getBlockInfo( $user->getBlock() ) ]
                                ) );
                        } else {
                                $status->fatal( ...$error );
@@ -1834,7 +1836,7 @@ abstract class ApiBase extends ContextSource {
                foreach ( self::$blockMsgMap as $msg => list( $apiMsg, $code ) ) {
                        if ( $status->hasMessage( $msg ) && $user->getBlock() ) {
                                $status->replaceMessage( $msg, ApiMessage::create( $apiMsg, $code,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => $this->getBlockInfo( $user->getBlock() ) ]
                                ) );
                        }
                }
@@ -2033,19 +2035,19 @@ abstract class ApiBase extends ContextSource {
                        $this->dieWithError(
                                'apierror-autoblocked',
                                'autoblocked',
-                               [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ]
+                               [ 'blockinfo' => $this->getBlockInfo( $block ) ]
                        );
                } elseif ( !$block->isSitewide() ) {
                        $this->dieWithError(
                                'apierror-blocked-partial',
                                'blocked',
-                               [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ]
+                               [ 'blockinfo' => $this->getBlockInfo( $block ) ]
                        );
                } else {
                        $this->dieWithError(
                                'apierror-blocked',
                                'blocked',
-                               [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ]
+                               [ 'blockinfo' => $this->getBlockInfo( $block ) ]
                        );
                }
        }
index 673fc6b..336943d 100644 (file)
@@ -28,6 +28,8 @@
  */
 class ApiBlock extends ApiBase {
 
+       use ApiBlockInfoTrait;
+
        /**
         * Blocks the user specified in the parameters for the given expiry, with the
         * given reason, and with all other settings provided in the params. If the block
@@ -43,13 +45,14 @@ class ApiBlock extends ApiBase {
                $this->requireOnlyOneParameter( $params, 'user', 'userid' );
 
                # T17810: blocked admins should have limited access here
-               if ( $user->isBlocked() ) {
+               $block = $user->getBlock();
+               if ( $block ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
                                $this->dieWithError(
                                        $status,
                                        null,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => $this->getBlockInfo( $block ) ]
                                );
                        }
                }
diff --git a/includes/api/ApiBlockInfoTrait.php b/includes/api/ApiBlockInfoTrait.php
new file mode 100644 (file)
index 0000000..2663485
--- /dev/null
@@ -0,0 +1,53 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+/**
+ * @ingroup API
+ */
+trait ApiBlockInfoTrait {
+
+       /**
+        * Get basic info about a given block
+        * @param Block $block
+        * @return array Array containing several keys:
+        *  - blockid - ID of the block
+        *  - blockedby - username of the blocker
+        *  - blockedbyid - user ID of the blocker
+        *  - blockreason - reason provided for the block
+        *  - blockedtimestamp - timestamp for when the block was placed/modified
+        *  - blockexpiry - expiry time of the block
+        *  - systemblocktype - system block type, if any
+        */
+       private function getBlockInfo( Block $block ) {
+               $vals = [];
+               $vals['blockid'] = $block->getId();
+               $vals['blockedby'] = $block->getByName();
+               $vals['blockedbyid'] = $block->getBy();
+               $vals['blockreason'] = $block->getReason();
+               $vals['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $block->getTimestamp() );
+               $vals['blockexpiry'] = ApiResult::formatExpiry( $block->getExpiry(), 'infinite' );
+               $vals['blockpartial'] = !$block->isSitewide();
+               if ( $block->getSystemBlockType() !== null ) {
+                       $vals['systemblocktype'] = $block->getSystemBlockType();
+               }
+               return $vals;
+       }
+
+}
index 8aff2aa..5615f46 100644 (file)
@@ -21,7 +21,7 @@
  */
 
 use Wikimedia\Rdbms\IResultWrapper;
-use MediaWiki\Block\BlockRestriction;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Query module to enumerate all user blocks
@@ -292,7 +292,8 @@ class ApiQueryBlocks extends ApiQueryBase {
                        }
                }
 
-               $restrictions = BlockRestriction::loadByBlockId( $partialIds );
+               $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
+               $restrictions = $blockRestrictionStore->loadByBlockId( $partialIds );
 
                $data = [];
                $keys = [
index 5b178b7..379f1af 100644 (file)
@@ -331,9 +331,6 @@ class ApiQueryUserContribs extends ApiQueryBase {
                $db = $this->getDB();
 
                $revQuery = MediaWikiServices::getInstance()->getRevisionStore()->getQueryInfo( [ 'page' ] );
-               $this->addTables( $revQuery['tables'] );
-               $this->addJoinConds( $revQuery['joins'] );
-               $this->addFields( $revQuery['fields'] );
 
                if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) {
                        $revWhere = ActorMigration::newMigration()->getWhere( $db, 'rev_user', $users );
@@ -341,6 +338,24 @@ class ApiQueryUserContribs extends ApiQueryBase {
                        $userField = $this->orderBy === 'actor' ? 'revactor_actor' : 'actor_name';
                        $tsField = 'revactor_timestamp';
                        $idField = 'revactor_rev';
+
+                       // T221511: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor`
+                       // before `revision_actor_temp` and filesorting is somehow better than querying $limit+1 rows
+                       // from `revision_actor_temp`. Tell it not to reorder the query (and also reorder it ourselves
+                       // because as generated by RevisionStore it'll have `revision` first rather than
+                       // `revision_actor_temp`). But not when uctag is used, as it seems as likely to be harmed as
+                       // helped in that case, and not when there's only one User because in that case it fetches
+                       // the one `actor` row as a constant and doesn't filesort.
+                       if ( count( $users ) > 1 && !isset( $this->params['tag'] ) ) {
+                               $revQuery['joins']['revision'] = $revQuery['joins']['temp_rev_user'];
+                               unset( $revQuery['joins']['temp_rev_user'] );
+                               $this->addOption( 'STRAIGHT_JOIN' );
+                               // It isn't actually necesssary to reorder $revQuery['tables'] as Database does the right thing
+                               // when join conditions are given for all joins, but Gergő is wary of relying on that so pull
+                               // `revision_actor_temp` to the start.
+                               $revQuery['tables'] =
+                                       [ 'temp_rev_user' => $revQuery['tables']['temp_rev_user'] ] + $revQuery['tables'];
+                       }
                } else {
                        // If we're dealing with user names (rather than IDs) in read-old mode,
                        // pass false for ActorMigration::getWhere()'s $useId parameter so
@@ -353,6 +368,9 @@ class ApiQueryUserContribs extends ApiQueryBase {
                        $idField = 'rev_id';
                }
 
+               $this->addTables( $revQuery['tables'] );
+               $this->addJoinConds( $revQuery['joins'] );
+               $this->addFields( $revQuery['fields'] );
                $this->addWhere( $revWhere['conds'] );
 
                // Handle continue parameter
index 59e0524..c495c6d 100644 (file)
@@ -29,6 +29,8 @@ use MediaWiki\MediaWikiServices;
  */
 class ApiQueryUserInfo extends ApiQueryBase {
 
+       use ApiBlockInfoTrait;
+
        const WL_UNREAD_LIMIT = 1000;
 
        private $params = [];
@@ -50,33 +52,6 @@ class ApiQueryUserInfo extends ApiQueryBase {
                $result->addValue( 'query', $this->getModuleName(), $r );
        }
 
-       /**
-        * Get basic info about a given block
-        * @param Block $block
-        * @return array Array containing several keys:
-        *  - blockid - ID of the block
-        *  - blockedby - username of the blocker
-        *  - blockedbyid - user ID of the blocker
-        *  - blockreason - reason provided for the block
-        *  - blockedtimestamp - timestamp for when the block was placed/modified
-        *  - blockexpiry - expiry time of the block
-        *  - systemblocktype - system block type, if any
-        */
-       public static function getBlockInfo( Block $block ) {
-               $vals = [];
-               $vals['blockid'] = $block->getId();
-               $vals['blockedby'] = $block->getByName();
-               $vals['blockedbyid'] = $block->getBy();
-               $vals['blockreason'] = $block->getReason();
-               $vals['blockedtimestamp'] = wfTimestamp( TS_ISO_8601, $block->getTimestamp() );
-               $vals['blockexpiry'] = ApiResult::formatExpiry( $block->getExpiry(), 'infinite' );
-               $vals['blockpartial'] = !$block->isSitewide();
-               if ( $block->getSystemBlockType() !== null ) {
-                       $vals['systemblocktype'] = $block->getSystemBlockType();
-               }
-               return $vals;
-       }
-
        /**
         * Get central user info
         * @param Config $config
@@ -126,8 +101,11 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        $vals['anon'] = true;
                }
 
-               if ( isset( $this->prop['blockinfo'] ) && $user->isBlocked() ) {
-                       $vals = array_merge( $vals, self::getBlockInfo( $user->getBlock() ) );
+               if ( isset( $this->prop['blockinfo'] ) ) {
+                       $block = $user->getBlock();
+                       if ( $block ) {
+                               $vals = array_merge( $vals, $this->getBlockInfo( $block ) );
+                       }
                }
 
                if ( isset( $this->prop['hasmsg'] ) ) {
index 6e37774..1ee91c2 100644 (file)
@@ -38,8 +38,10 @@ class ApiRevisionDelete extends ApiBase {
                $user = $this->getUser();
                $this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
 
-               if ( $user->isBlocked() ) {
-                       $this->dieBlocked( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       $this->dieBlocked( $block );
                }
 
                if ( !$params['ids'] ) {
index ba4c6e8..d2bbe7b 100644 (file)
@@ -77,8 +77,9 @@ class ApiSetNotificationTimestamp extends ApiBase {
                        $titles = $pageSet->getGoodTitles();
                        $title = reset( $titles );
                        if ( $title ) {
+                               // XXX $title isn't actually used, can we just get rid of the previous six lines?
                                $timestamp = MediaWikiServices::getInstance()->getRevisionStore()
-                                       ->getTimestampFromId( $title, $params['torevid'], IDBAccessObject::READ_LATEST );
+                                       ->getTimestampFromId( $params['torevid'], IDBAccessObject::READ_LATEST );
                                if ( $timestamp ) {
                                        $timestamp = $dbw->timestamp( $timestamp );
                                } else {
index 82cf986..aff0183 100644 (file)
@@ -40,8 +40,10 @@ class ApiTag extends ApiBase {
                // make sure the user is allowed
                $this->checkUserRightsAny( 'changetags' );
 
-               if ( $user->isBlocked() ) {
-                       $this->dieBlocked( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       $this->dieBlocked( $block );
                }
 
                // Check if user can add tags
index b748cb3..f038b96 100644 (file)
@@ -28,6 +28,8 @@
  */
 class ApiUnblock extends ApiBase {
 
+       use ApiBlockInfoTrait;
+
        /**
         * Unblocks the specified user or provides the reason the unblock failed.
         */
@@ -41,13 +43,14 @@ class ApiUnblock extends ApiBase {
                        $this->dieWithError( 'apierror-permissiondenied-unblock', 'permissiondenied' );
                }
                # T17810: blocked admins should have limited access here
-               if ( $user->isBlocked() ) {
+               $block = $user->getBlock();
+               if ( $block ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
                                $this->dieWithError(
                                        $status,
                                        null,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => $this->getBlockInfo( $block ) ]
                                );
                        }
                }
index e251fe6..acb3da8 100644 (file)
@@ -51,8 +51,13 @@ class ApiUserrights extends ApiBase {
 
                // Deny if the user is blocked and doesn't have the full 'userrights' permission.
                // This matches what Special:UserRights does for the web UI.
-               if ( $pUser->isBlocked() && !$pUser->isAllowed( 'userrights' ) ) {
-                       $this->dieBlocked( $pUser->getBlock() );
+               if ( !$pUser->isAllowed( 'userrights' ) ) {
+                       // @TODO Should the user be blocked from changing user rights if they
+                       //       are partially blocked?
+                       $block = $pUser->getBlock();
+                       if ( $block ) {
+                               $this->dieBlocked( $block );
+                       }
                }
 
                $params = $this->extractRequestParams();
index cf9785e..45573e6 100644 (file)
        "apihelp-edit-param-text": "محتوى الصفحة",
        "apihelp-edit-param-summary": "ملخص التعديل. أيضا عنوان القسم عند عدم تعيين $1section=new and $1sectiontitle.",
        "apihelp-edit-param-tags": "عدل الوسوم لتطبيق المراجعة.",
-       "apihelp-edit-param-minor": "تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81",
-       "apihelp-edit-param-notminor": "تعدÙ\8aÙ\84 ØºÙ\8aر Ø·Ù\81Ù\8aÙ\81.",
+       "apihelp-edit-param-minor": "اÙ\84تعÙ\84Ù\8aÙ\85 Ø¹Ù\84Ù\89 Ù\87ذا Ø§Ù\84تعدÙ\8aÙ\84 Ù\83تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81.",
+       "apihelp-edit-param-notminor": "عدÙ\85 Ø§Ù\84تعÙ\84Ù\8aÙ\85 Ø¹Ù\84Ù\89 Ù\87ذا Ø§Ù\84تعدÙ\8aÙ\84 Ù\83تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81 Ø­ØªÙ\89 Ø¥Ø°Ø§ ØªÙ\85 ØªØ¹Ù\8aÙ\8aÙ\86 ØªÙ\81ضÙ\8aÙ\84 Ø§Ù\84Ù\85ستخدÙ\85 \"{{int:tog-minordefault}}\".",
        "apihelp-edit-param-bot": "علم على هذا التعديل كتعديل بوت.",
        "apihelp-edit-param-basetimestamp": "الطابع الزمني للمراجعة الأساسية، ويُستخدَم للكشف عن الحروب التحريرية، ويمكن الحصول عليها من خلال [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "الطابع الزمني عند بدء عملية التحرير، ويُستخدَم للكشف عن الحروب التحريرية، ويمكن الحصول عليها من خلال <var>[[Special:ApiHelp/main|curtimestamp]]</var> when beginning the edit process (e.g. when loading the page content to edit).",
index 75fa8e3..a58bb1b 100644 (file)
@@ -13,7 +13,8 @@
                        "Dvorapa",
                        "Matěj Suchánek",
                        "Ilimanaq29",
-                       "Patriccck"
+                       "Patriccck",
+                       "Ján Kepler"
                ]
        },
        "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Dokumentace]]\n* [[mw:Special:MyLanguage/API:FAQ|Otázky a odpovědi]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api E-mailová konference]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Oznámení k API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Chyby a požadavky]\n</div>\n<strong>Stav:</strong> Všechny funkce uvedené na této stránce by měly fungovat, ale API se stále aktivně vyvíjí a může se kdykoli změnit. Upozornění na změny získáte přihlášením se k [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ e-mailové konferenci mediawiki-api-announce].\n\n<strong>Chybné požadavky:</strong> Pokud jsou do API zaslány chybné požadavky, bude vrácena HTTP hlavička s klíčem „MediaWiki-API-Error“ a hodnota této hlavičky a chybový kód budou nastaveny na stejnou hodnotu. Více informací najdete [[mw:Special:MyLanguage/API:Errors_and_warnings|v dokumentaci]].\n\n<p class=\"mw-apisandbox-link\"><strong>Testování:</strong> Pro jednoduché testování požadavků na API zkuste [[Special:ApiSandbox]].</p>",
@@ -67,7 +68,7 @@
        "apihelp-edit-param-pageid": "ID stránky, která se má editovat. Není možné použít společně s <var>$1title</var>.",
        "apihelp-edit-param-sectiontitle": "Název nové sekce.",
        "apihelp-edit-param-text": "Obsah stránky.",
-       "apihelp-edit-param-minor": "Malá editace.",
+       "apihelp-edit-param-minor": "Označit toto jako malou editaci",
        "apihelp-edit-param-notminor": "Nemalá editace.",
        "apihelp-edit-param-bot": "Označit tuto editaci jako editaci robota.",
        "apihelp-edit-param-createonly": "Needitovat stránku, pokud již existuje.",
index 992b777..c594cb3 100644 (file)
        "apihelp-edit-param-text": "Seiteninhalt.",
        "apihelp-edit-param-summary": "Bearbeitungszusammenfassung. Auch Abschnittsüberschrift, wenn $1section=new und $1sectiontitle nicht festgelegt ist.",
        "apihelp-edit-param-tags": "Auf die Version anzuwendende Änderungsmarkierungen.",
-       "apihelp-edit-param-minor": "Kleine Bearbeitung.",
-       "apihelp-edit-param-notminor": "Nicht-kleine Bearbeitung.",
+       "apihelp-edit-param-minor": "Markiert diese Bearbeitung als geringfügig.",
+       "apihelp-edit-param-notminor": "Diese Bearbeitung nicht als geringfügig markieren, auch wenn die Benutzereinstellung „{{int:tog-minordefault}}“ festgelegt ist.",
        "apihelp-edit-param-bot": "Diese Bearbeitung als Bot-Bearbeitung markieren.",
        "apihelp-edit-param-basetimestamp": "Zeitstempel der Basisversion, wird verwendet zum Aufspüren von Bearbeitungskonflikten. Kann abgerufen werden durch [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Zeitstempel, an dem der Bearbeitungsprozess begonnen wurde. Er wird zum Aufspüren von Bearbeitungskonflikten verwendet. Ein geeigneter Wert kann mithilfe von <var>[[Special:ApiHelp/main|curtimestamp]]</var> beim Beginn des Bearbeitungsprozesses (z.&nbsp;B. beim Laden des Seiteninhalts zum Bearbeiten) abgerufen werden.",
index 0d4874c..164d5e9 100644 (file)
        "apihelp-edit-param-text": "Page content.",
        "apihelp-edit-param-summary": "Edit summary. Also section title when $1section=new and $1sectiontitle is not set.",
        "apihelp-edit-param-tags": "Change tags to apply to the revision.",
-       "apihelp-edit-param-minor": "Minor edit.",
-       "apihelp-edit-param-notminor": "Non-minor edit.",
+       "apihelp-edit-param-minor": "Mark this edit as a minor edit.",
+       "apihelp-edit-param-notminor": "Do not mark this edit as a minor edit even if the \"{{int:tog-minordefault}}\" user preference is set.",
        "apihelp-edit-param-bot": "Mark this edit as a bot edit.",
        "apihelp-edit-param-basetimestamp": "Timestamp of the base revision, used to detect edit conflicts. May be obtained through [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Timestamp when the editing process began, used to detect edit conflicts. An appropriate value may be obtained using <var>[[Special:ApiHelp/main|curtimestamp]]</var> when beginning the edit process (e.g. when loading the page content to edit).",
index 9ae584b..f0c6eec 100644 (file)
        "apihelp-edit-param-text": "Contenu de la page.",
        "apihelp-edit-param-summary": "Modifier le résumé. Également le titre de la section quand $1section=new et $1sectiontitle n’est pas défini.",
        "apihelp-edit-param-tags": "Modifier les balises à appliquer à la version.",
-       "apihelp-edit-param-minor": "Modification mineure.",
-       "apihelp-edit-param-notminor": "Modification non mineure.",
+       "apihelp-edit-param-minor": "Marquer cette modification comme étant mineure.",
+       "apihelp-edit-param-notminor": "Ne pas marquer cette modification comme mineure, même si la préférence utilisateur « {{int:tog-minordefault}} » est positionnée.",
        "apihelp-edit-param-bot": "Marquer cette modification comme effectuée par un robot.",
        "apihelp-edit-param-basetimestamp": "Horodatage de la révision de base, utilisé pour détecter les conflits de modification. Peut être obtenu via [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "L'horodatage, lorsque le processus d'édition est démarré, est utilisé pour détecter les conflits de modification. Une valeur appropriée peut être obtenue en utilisant <var>[[Special:ApiHelp/main|curtimestamp]]</var> lors du démarrage du processus d'édition (par ex. en chargeant le contenu de la page à modifier).",
index 721cd0b..c960aee 100644 (file)
@@ -82,8 +82,8 @@
        "apihelp-edit-param-text": "Contenuto della pagina.",
        "apihelp-edit-param-summary": "Oggetto della modifica. Anche titolo della sezione se $1sezione=new e $1sectiontitle non è impostato.",
        "apihelp-edit-param-tags": "Cambia i tag da applicare alla revisione.",
-       "apihelp-edit-param-minor": "Modifica minore.",
-       "apihelp-edit-param-notminor": "Modifica non minore.",
+       "apihelp-edit-param-minor": "Contrassegna questa modifica come minore.",
+       "apihelp-edit-param-notminor": "Non contrassegnare questa modifica come minore anche se la preferenza \"{{int:tog-minordefault}}\" è impostata.",
        "apihelp-edit-param-bot": "Contrassegna questa modifica come eseguita da un bot.",
        "apihelp-edit-param-createonly": "Non modificare la pagina se già esiste.",
        "apihelp-edit-param-nocreate": "Genera un errore se la pagina non esiste.",
index 9497d8d..ea76a45 100644 (file)
        "apihelp-edit-param-text": "문서 내용.",
        "apihelp-edit-param-summary": "편집 요약. 또한 $1section=new 및 $1sectiontitle이 설정되어 있지 않을 때 문단 제목.",
        "apihelp-edit-param-tags": "이 판에 적용할 태그를 변경합니다.",
-       "apihelp-edit-param-minor": "ì\82¬ì\86\8cí\95\9c í\8e¸ì§\91.",
+       "apihelp-edit-param-minor": "ì\9d´ í\8e¸ì§\91ì\9d\84 ì\82¬ì\86\8cí\95\9c í\8e¸ì§\91ì\9c¼ë¡\9c í\91\9cì\8b\9cí\95©ë\8b\88ë\8b¤.",
        "apihelp-edit-param-notminor": "사소하지 않은 편집.",
        "apihelp-edit-param-bot": "이 편집을 봇 편집으로 표시.",
        "apihelp-edit-param-basetimestamp": "기본 판의 타임스탬프이며, 편집 충돌을 발견하기 위해 사용됩니다. [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]]를 통해 가져올 수 있습니다.",
index 615f71e..cfca2ee 100644 (file)
@@ -28,8 +28,8 @@
        "apihelp-edit-summary": "Säiten uleeën an änneren.",
        "apihelp-edit-param-sectiontitle": "Den Titel fir en neien Abschnitt.",
        "apihelp-edit-param-text": "Säiteninhalt.",
-       "apihelp-edit-param-minor": "Kleng Ännerung.",
-       "apihelp-edit-param-notminor": "Keng kleng Ännerung",
+       "apihelp-edit-param-minor": "Dës Ännerung als kleng Ännerung markéieren.",
+       "apihelp-edit-param-notminor": "Dës Ännerung net als keng kleng Ännerung markéieren esouguer wann d'Benotzerastellung \"{{int:tog-minordefault}}\" agestallt ass.",
        "apihelp-edit-param-bot": "Dës Ännerung als eng Bot-Ännerung markéieren.",
        "apihelp-edit-param-createonly": "D'Säit net ännere wann et se scho gëtt.",
        "apihelp-edit-param-watch": "D'Säit op dem aktuelle Benotzer seng Iwwerwaachungslëscht dobäisetzen.",
index 84eef72..15bc802 100644 (file)
@@ -17,7 +17,8 @@
                        "Hex",
                        "Mainframe98",
                        "Southparkfan",
-                       "Elroy"
+                       "Elroy",
+                       "Rots61"
                ]
        },
        "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Documentatie]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api E-maillijst]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API-aankondigingen]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Bugs & verzoeken]\n</div>\n<strong>Status:</strong> De MediaWiki API is een stabiele interface die actief ondersteund en verbeterd wordt. Hoewel we het proberen te voorkomen, is het mogelijk dat er soms wijzigingen worden aangebracht die bepaalde API-verzoek kunnen verhinderen; abonneer u op de [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ e-maillijst mediawiki-api-announce] voor meldingen over wijzigingen.\n\n<strong>Foutieve verzoeken:</strong> als de API foutieve verzoeken ontvangt, wordt er geantwoord met een HTTP-header met de sleutel \"MediaWiki-API-Error\" en daarna worden de waarde van de header en de foutcode op dezelfde waarde ingesteld. Zie [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Foutmeldingen en waarschuwingen]] voor meer informatie.\n\n<p class=\"mw-apisandbox-link\"><strong>Testen:</strong> u kunt [[Special:ApiSandbox|eenvoudig API-verzoeken testen]].</p>",
@@ -87,7 +88,7 @@
        "apihelp-edit-param-sectiontitle": "De naam van een nieuwe sectie.",
        "apihelp-edit-param-text": "Pagina-inhoud.",
        "apihelp-edit-param-tags": "De labels voor de revisie wijzigen.",
-       "apihelp-edit-param-minor": "Kleine bewerking.",
+       "apihelp-edit-param-minor": "Mankeer deze bewerking als een kleine bewerking.",
        "apihelp-edit-param-notminor": "Niet-kleine bewerking.",
        "apihelp-edit-param-bot": "Deze bewerking markeren als een botbewerking.",
        "apihelp-edit-param-createonly": "De pagina niet bewerken als die al bestaat.",
index 2d4fc69..d36e4ea 100644 (file)
@@ -16,7 +16,8 @@
                        "Woytecr",
                        "InternerowyGołąb",
                        "CiaPan",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "Railfail536"
                ]
        },
        "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Dokumentacja]]\n* [[mw:Special:MyLanguage/API:FAQ|FAQ]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista dyskusyjna]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Ogłoszenia dotyczące API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Błędy i propozycje]\n</div>\n<strong>Stan:</strong> Wszystkie funkcje opisane na tej stronie powinny działać, ale API nadal jest aktywnie rozwijane i mogą się zmienić w dowolnym czasie. Subskrybuj [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ listę dyskusyjną mediawiki-api-announce], aby móc na bieżąco dowiadywać się o aktualizacjach.\n\n<strong>Błędne żądania:</strong> Gdy zostanie wysłane błędne żądanie do API, zostanie wysłany w odpowiedzi nagłówek HTTP z kluczem \"MediaWiki-API-Error\" i zarówno jego wartość jak i wartość kodu błędu wysłanego w odpowiedzi będą miały taką samą wartość. Aby uzyskać więcej informacji, zobacz [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Błędy i ostrzeżenia]].\n\n<strong>Testowanie:</strong> Aby łatwo testować żądania API, zobacz [[Special:ApiSandbox]].",
@@ -81,7 +82,7 @@
        "apihelp-edit-param-text": "Zawartość strony.",
        "apihelp-edit-param-summary": "Opis edycji. Także tytuł sekcji gdy użyto $1section=new, a nie ustawiono $1sectiontitle.",
        "apihelp-edit-param-tags": "Znaczniki zmian do zastosowania w tej edycji.",
-       "apihelp-edit-param-minor": "Drobna zmiana.",
+       "apihelp-edit-param-minor": "Oznacz tą zmianę jako drobną zmianę.",
        "apihelp-edit-param-notminor": "Nie oznaczaj tej zmiany jako drobną.",
        "apihelp-edit-param-bot": "Oznacz tę edycję jako edycję bota.",
        "apihelp-edit-param-basetimestamp": "Czas wersji, która jest edytowana. Służy do wykrywania konfliktów edycji. Można pobrać poprzez [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
index 27b4d79..c4d24c4 100644 (file)
        "apihelp-edit-param-text": "Conteúdo da página.",
        "apihelp-edit-param-summary": "Edit o resumo. Também o título da seção quando $1section=new e $1sectiontitle não está definido.",
        "apihelp-edit-param-tags": "Alterar as tags para aplicar à revisão.",
-       "apihelp-edit-param-minor": "Edição menor.",
-       "apihelp-edit-param-notminor": "Edição não-menor.",
+       "apihelp-edit-param-minor": "Marque esta edição como uma edição menor.",
+       "apihelp-edit-param-notminor": "Não marque esta edição como uma edição menor, mesmo se a preferência do usuário \"{{int:tog-minordefault}}\" é definida.",
        "apihelp-edit-param-bot": "Marcar esta edição como uma edição de bot.",
        "apihelp-edit-param-basetimestamp": "Timestamp da revisão base, usada para detectar conflitos de edição. Pode ser obtido através de [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Timestamp quando o processo de edição começou, usado para detectar conflitos de edição. Um valor apropriado pode ser obtido usando <var>[[Special:ApiHelp/main|curtimestamp]]</var> ao iniciar o processo de edição (por exemplo, ao carregar o conteúdo da página a editar).",
index 892cba8..9741c40 100644 (file)
@@ -36,7 +36,8 @@
                        "Stjn",
                        "Edward Chernenko",
                        "Vlad5250",
-                       "Diralik"
+                       "Diralik",
+                       "DmitTrix"
                ]
        },
        "apihelp-main-extended-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:Special:MyLanguage/API:Main_page|Документация]]\n* [[mw:Special:MyLanguage/API:FAQ|ЧаВО]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Почтовая рассылка]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Новости API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Ошибки и запросы]\n</div>\n<strong>Статус:</strong> MediaWiki API — зрелый и стабильный интерфейс, активно поддерживаемый и улучшаемый. Мы стараемся избегать ломающих изменений, однако изредка они могут быть необходимы. Подпишитесь на [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ почтовую рассылку mediawiki-api-announce], чтобы быть в курсе обновлений.\n\n<strong>Ошибочные запросы:</strong> Если API получает запрос с ошибкой, вернётся заголовок HTTP с ключом «MediaWiki-API-Error», после чего значение заголовка и код ошибки будут отправлены обратно и установлены в то же значение. Более подробную информацию см. [[mw:Special:MyLanguage/API:Errors_and_warnings|API: Ошибки и предупреждения]].\n\n<p class=\"mw-apisandbox-link\"><strong>Тестирование:</strong> для удобства тестирования API-запросов, см. [[Special:ApiSandbox]].</p>",
@@ -70,6 +71,9 @@
        "apihelp-block-param-reblock": "Если участник уже заблокирован, перезаписать существующую блокировку.",
        "apihelp-block-param-watchuser": "Следить за страницей участника и соответствующей страницей обсуждения, принадлежащей участнику или IP-адресу.",
        "apihelp-block-param-tags": "Изменить метки записи в журнале блокировок.",
+       "apihelp-block-param-partial": "Блокировать пользователю доступ только к определённым страницам или пространствам имён, а не ко всему сайту.",
+       "apihelp-block-param-pagerestrictions": "Список заголовков страниц, редактирование которых заблокировано для этого участника. Действителен, только если <var>partial</var> установлен в true.",
+       "apihelp-block-param-namespacerestrictions": "Список пространств имён, редактирование в которых заблокировано для этого участника. Действителен, только если <var>partial</var> установлен в true.",
        "apihelp-block-example-ip-simple": "Заблокировать IP-адрес <kbd>192.0.2.5</kbd> на три дня по причине <kbd>First strike</kbd>.",
        "apihelp-block-example-user-complex": "Бессрочно заблокировать участника <kbd>Vandal</kbd> по причине <kbd>Vandalism</kbd> и предотвратить создание новых аккаунтов и отправку электронной почты.",
        "apihelp-changeauthenticationdata-summary": "Смена параметров аутентификации для текущего участника.",
@@ -89,7 +93,7 @@
        "apihelp-compare-param-fromtitle": "Заголовок первой сравниваемой страницы.",
        "apihelp-compare-param-fromid": "Идентификатор первой сравниваемой страницы.",
        "apihelp-compare-param-fromrev": "Первая сравниваемая версия.",
-       "apihelp-compare-param-frompst": "Выполнить преобразование перед записью правки (PST) над <var>fromtext</var>.",
+       "apihelp-compare-param-frompst": "Выполнить преобразование перед записью правки (PST) над <var>fromtext-&#x7B;slot}</var>.",
        "apihelp-compare-param-fromtext": "Используйте этот текст вместо содержимого версии, заданной <var>fromtitle</var>, <var>fromid</var> или <var>fromrev</var>.",
        "apihelp-compare-param-fromcontentmodel": "Модель содержимого <var>fromtext</var>. Если не задана, будет угадана по другим параметрам.",
        "apihelp-compare-param-fromcontentformat": "Формат сериализации содержимого <var>fromtext</var>.",
index 710133e..e49e76a 100644 (file)
@@ -94,8 +94,8 @@
        "apihelp-edit-param-text": "Sidans innehåll.",
        "apihelp-edit-param-summary": "Redigeringssammanfattning. Även avsnittets rubrik när $1section=new och $1sectiontitle inte anges.",
        "apihelp-edit-param-tags": "Ändra taggar till att gälla för revideringen.",
-       "apihelp-edit-param-minor": "Mindre redigering.",
-       "apihelp-edit-param-notminor": "Icke-mindre redigering.",
+       "apihelp-edit-param-minor": "Markera denna redigering som en mindre redigering.",
+       "apihelp-edit-param-notminor": "Markera inte denna redigering som en mindre redigering även om användarinställningen \"{{int:tog-minordefault}}\" är inställd.",
        "apihelp-edit-param-bot": "Markera denna redigering som en robotredigering.",
        "apihelp-edit-param-basetimestamp": "Tidsstämpel för grundversionen, används för att upptäcka redigeringskonflikter. Kan erhållas genom [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Tidsstämpel för när redigeringsprocessen började, används för att upptäcka redigeringskonflikter. Ett lämpligt värde kan erhållas via  <var>[[Special:ApiHelp/main|curtimestamp]]</var> när redigeringsprocessen startas (t.ex. när sidans innehåll laddas för redigering).",
index 76ee238..e565b71 100644 (file)
        "apihelp-edit-param-text": "頁面內容。",
        "apihelp-edit-param-summary": "編輯摘要。 當未設定 $1section=new 與 $1sectiontitle 時也會當做章節標題。",
        "apihelp-edit-param-tags": "更改套用到修訂的標籤。",
-       "apihelp-edit-param-minor": "小編輯。",
-       "apihelp-edit-param-notminor": "非小編輯。",
+       "apihelp-edit-param-minor": "標記此編輯為小編輯。",
+       "apihelp-edit-param-notminor": "不要標記此編輯為小編輯,即使有設定到「{{int:tog-minordefault}}」使用者偏好設定。",
        "apihelp-edit-param-bot": "標記此編輯為機器人編輯。",
        "apihelp-edit-param-basetimestamp": "基於修訂的時間戳記,用來檢測編輯衝突。也许可以取得[[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]]認可。",
        "apihelp-edit-param-starttimestamp": "當編輯程序開始的時間戳記,用於偵測編輯衝突。當編輯程序開始時(例如:當載入要編輯的頁面內容),使用 <var>[[Special:ApiHelp/main|curtimestamp]]</var> 可以取得一個適當值。",
        "apihelp-patrol-example-rcid": "巡查一次近期變更。",
        "apihelp-patrol-example-revid": "巡查一個修訂。",
        "apihelp-protect-summary": "變更頁面的保護層級。",
-       "apihelp-protect-param-title": "要(解除)保護頁面的標題。 不能與 $1pageid 一起使用。",
-       "apihelp-protect-param-pageid": "要(解除)保護頁面的 ID。 不能與 $1title 一起使用。",
-       "apihelp-protect-param-protections": "保護層級清單,格式為 <kbd>action=level</kbd> (例如 <kbd>edit=sysop</kbd>)。<kbd>all</kbd> 層級代表所有人都可以進行行動,亦即無限制。\n\n<strong>注意:</strong>未列入清單項目的限制皆會移除。",
+       "apihelp-protect-param-title": "要(解除)保護頁面的標題。 不能與 $1pageid 一起使用。",
+       "apihelp-protect-param-pageid": "要(解除)保護頁面的 ID。 不能與 $1title 一起使用。",
+       "apihelp-protect-param-protections": "保護層級清單,格式為 <kbd>action=level</kbd>(例如 <kbd>edit=sysop</kbd>)。<kbd>all</kbd> 層級代表所有人都可以進行行動,亦即無限制。\n\n<strong>注意:</strong>未列入清單項目的限制皆會移除。",
        "apihelp-protect-param-expiry": "期限時間戳記,若只設定一個時間戳記,該時間戳記將會套用至所有的保護層級。 使用 <kbd>infinite</kbd>、<kbd>indefinite</kbd>、<kbd>infinity</kbd> 或 <kbd>never</kbd> 來設定保護層級期限為永遠。",
-       "apihelp-protect-param-reason": "(解除)保護的原因。",
+       "apihelp-protect-param-reason": "(解除)保護的原因。",
        "apihelp-protect-param-tags": "修改標籤以套用於保護日誌裡的項目。",
        "apihelp-protect-param-cascade": "啟用連鎖保護(也就是保護包含於此頁面的頁面)。如果所有提供的保護等級不支援連鎖,就將其忽略。",
        "apihelp-protect-param-watch": "如果被設定,就將被(解除)保護的頁面加至目前使用者的監視列表。",
        "api-help-param-integer-minmax": "{{PLURAL:$1|1=數值|2=數值}}必須在 $2 與 $3 之間。",
        "api-help-param-upload": "必須使用 multipart/form-data 以檔案上傳的方式傳送。",
        "api-help-param-multi-separate": "將幾個值以 <kbd>|</kbd> 或 [[Special:ApiHelp/main#main/datatypes|alternative]] 分隔。",
-       "api-help-param-multi-max": "上限值為 {{PLURAL:$1|$1}} (機器人為 {{PLURAL:$2|$2}})。",
+       "api-help-param-multi-max": "上限值為 {{PLURAL:$1|$1}}(機器人為 {{PLURAL:$2|$2}})。",
        "api-help-param-multi-max-simple": "值的最大數量為 {{PLURAL:$1|$1}}。",
        "api-help-param-multi-all": "要指定所有值,請使用<kbd>$1</kbd>。",
        "api-help-param-default": "預設值:$1",
        "api-help-param-default-empty": "預設值:<span class=\"apihelp-empty\">(空)</span>",
-       "api-help-param-token": "自 [[Special:ApiHelp/query+tokens|action=query&meta=tokens]] 接收的 \"$1\" 權杖。",
+       "api-help-param-token": "自 [[Special:ApiHelp/query+tokens|action=query&meta=tokens]] 接收的「$1」權杖。",
        "api-help-param-token-webui": "為顧及相容性,web UI 中使用的權杖(Token)也是可接受的。",
        "api-help-param-disabled-in-miser-mode": "因[[mw:Special:MyLanguage/Manual:$wgMiserMode|miser模式]]而被停用。",
        "api-help-param-limited-in-miser-mode": "<strong>注意:</strong>出於 [[mw:Special:MyLanguage/Manual:$wgMiserMode|miser 模式]]緣故,使用這個可能會導致在繼續之前,傳回少於 <var>$1limit</var> 筆的結果,極端情況下則可能不會傳回任何结果。",
index 3515a70..5915d35 100644 (file)
@@ -1021,7 +1021,10 @@ class AuthManager implements LoggerAwareInterface {
                }
 
                $ip = $this->getRequest()->getIP();
-               if ( $creator->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ ) ) {
+               if (
+                       MediaWikiServices::getInstance()->getBlockManager()
+                               ->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ )
+               ) {
                        return Status::newFatal( 'sorbs_create_account_reason' );
                }
 
index 10925b5..3e26097 100644 (file)
@@ -59,9 +59,11 @@ class CheckBlocksSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
        }
 
        public function beginSecondaryAuthentication( $user, array $reqs ) {
+               // @TODO Partial blocks should not prevent the user from logging in.
+               //       see: https://phabricator.wikimedia.org/T208895
                if ( !$this->blockDisablesLogin ) {
                        return AuthenticationResponse::newAbstain();
-               } elseif ( $user->isBlocked() ) {
+               } elseif ( $user->getBlock() ) {
                        return AuthenticationResponse::newFail(
                                new \Message( 'login-userblocked', [ $user->getName() ] )
                        );
diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php
new file mode 100644 (file)
index 0000000..3ef35d7
--- /dev/null
@@ -0,0 +1,370 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Block;
+
+use Block;
+use IP;
+use User;
+use WebRequest;
+use Wikimedia\IPSet;
+use MediaWiki\User\UserIdentity;
+
+/**
+ * A service class for checking blocks.
+ * To obtain an instance, use MediaWikiServices::getInstance()->getBlockManager().
+ *
+ * @since 1.34 Refactored from User and Block.
+ */
+class BlockManager {
+       // TODO: This should be UserIdentity instead of User
+       /** @var User */
+       private $currentUser;
+
+       /** @var WebRequest */
+       private $currentRequest;
+
+       /** @var bool */
+       private $applyIpBlocksToXff;
+
+       /** @var bool */
+       private $cookieSetOnAutoblock;
+
+       /** @var bool */
+       private $cookieSetOnIpBlock;
+
+       /** @var array */
+       private $dnsBlacklistUrls;
+
+       /** @var bool */
+       private $enableDnsBlacklist;
+
+       /** @var array */
+       private $proxyList;
+
+       /** @var array */
+       private $proxyWhitelist;
+
+       /** @var array */
+       private $softBlockRanges;
+
+       /**
+        * @param User $currentUser
+        * @param WebRequest $currentRequest
+        * @param bool $applyIpBlocksToXff
+        * @param bool $cookieSetOnAutoblock
+        * @param bool $cookieSetOnIpBlock
+        * @param array $dnsBlacklistUrls
+        * @param bool $enableDnsBlacklist
+        * @param array $proxyList
+        * @param array $proxyWhitelist
+        * @param array $softBlockRanges
+        */
+       public function __construct(
+               $currentUser,
+               $currentRequest,
+               $applyIpBlocksToXff,
+               $cookieSetOnAutoblock,
+               $cookieSetOnIpBlock,
+               $dnsBlacklistUrls,
+               $enableDnsBlacklist,
+               $proxyList,
+               $proxyWhitelist,
+               $softBlockRanges
+       ) {
+               $this->currentUser = $currentUser;
+               $this->currentRequest = $currentRequest;
+               $this->applyIpBlocksToXff = $applyIpBlocksToXff;
+               $this->cookieSetOnAutoblock = $cookieSetOnAutoblock;
+               $this->cookieSetOnIpBlock = $cookieSetOnIpBlock;
+               $this->dnsBlacklistUrls = $dnsBlacklistUrls;
+               $this->enableDnsBlacklist = $enableDnsBlacklist;
+               $this->proxyList = $proxyList;
+               $this->proxyWhitelist = $proxyWhitelist;
+               $this->softBlockRanges = $softBlockRanges;
+       }
+
+       /**
+        * Get the blocks that apply to a user and return the most relevant one.
+        *
+        * TODO: $user should be UserIdentity instead of User
+        *
+        * @internal This should only be called by User::getBlockedStatus
+        * @param User $user
+        * @param bool $fromReplica Whether to check the replica DB first.
+        *  To improve performance, non-critical checks are done against replica DBs.
+        *  Check when actually saving should be done against master.
+        * @return Block|null The most relevant block, or null if there is no block.
+        */
+       public function getUserBlock( User $user, $fromReplica ) {
+               $isAnon = $user->getId() === 0;
+
+               // TODO: If $user is the current user, we should use the current request. Otherwise,
+               // we should not look for XFF or cookie blocks.
+               $request = $user->getRequest();
+
+               # We only need to worry about passing the IP address to the Block generator if the
+               # user is not immune to autoblocks/hardblocks, and they are the current user so we
+               # know which IP address they're actually coming from
+               $ip = null;
+               $sessionUser = $this->currentUser;
+               // the session user is set up towards the end of Setup.php. Until then,
+               // assume it's a logged-out user.
+               $globalUserName = $sessionUser->isSafeToLoad()
+                       ? $sessionUser->getName()
+                       : IP::sanitizeIP( $this->currentRequest->getIP() );
+               if ( $user->getName() === $globalUserName && !$user->isAllowed( 'ipblock-exempt' ) ) {
+                       $ip = $this->currentRequest->getIP();
+               }
+
+               // User/IP blocking
+               // TODO: remove dependency on Block
+               $block = Block::newFromTarget( $user, $ip, !$fromReplica );
+
+               // Cookie blocking
+               if ( !$block instanceof Block ) {
+                       $block = $this->getBlockFromCookieValue( $user, $request );
+               }
+
+               // Proxy blocking
+               if ( !$block instanceof Block && $ip !== null && !in_array( $ip, $this->proxyWhitelist ) ) {
+                       // Local list
+                       if ( $this->isLocallyBlockedProxy( $ip ) ) {
+                               $block = new Block( [
+                                       'byText' => wfMessage( 'proxyblocker' )->text(),
+                                       'reason' => wfMessage( 'proxyblockreason' )->plain(),
+                                       'address' => $ip,
+                                       'systemBlock' => 'proxy',
+                               ] );
+                       } elseif ( $isAnon && $this->isDnsBlacklisted( $ip ) ) {
+                               $block = new Block( [
+                                       'byText' => wfMessage( 'sorbs' )->text(),
+                                       'reason' => wfMessage( 'sorbsreason' )->plain(),
+                                       'address' => $ip,
+                                       'systemBlock' => 'dnsbl',
+                               ] );
+                       }
+               }
+
+               // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
+               if ( !$block instanceof Block
+                       && $this->applyIpBlocksToXff
+                       && $ip !== null
+                       && !in_array( $ip, $this->proxyWhitelist )
+               ) {
+                       $xff = $request->getHeader( 'X-Forwarded-For' );
+                       $xff = array_map( 'trim', explode( ',', $xff ) );
+                       $xff = array_diff( $xff, [ $ip ] );
+                       // TODO: remove dependency on Block
+                       $xffblocks = Block::getBlocksForIPList( $xff, $isAnon, !$fromReplica );
+                       // TODO: remove dependency on Block
+                       $block = Block::chooseBlock( $xffblocks, $xff );
+                       if ( $block instanceof Block ) {
+                               # Mangle the reason to alert the user that the block
+                               # originated from matching the X-Forwarded-For header.
+                               $block->setReason( wfMessage( 'xffblockreason', $block->getReason() )->plain() );
+                       }
+               }
+
+               if ( !$block instanceof Block
+                       && $ip !== null
+                       && $isAnon
+                       && IP::isInRanges( $ip, $this->softBlockRanges )
+               ) {
+                       $block = new Block( [
+                               'address' => $ip,
+                               'byText' => 'MediaWiki default',
+                               'reason' => wfMessage( 'softblockrangesreason', $ip )->plain(),
+                               'anonOnly' => true,
+                               'systemBlock' => 'wgSoftBlockRanges',
+                       ] );
+               }
+
+               return $block;
+       }
+
+       /**
+        * Try to load a Block from an ID given in a cookie value.
+        *
+        * @param UserIdentity $user
+        * @param WebRequest $request
+        * @return Block|bool The Block object, or false if none could be loaded.
+        */
+       private function getBlockFromCookieValue(
+               UserIdentity $user,
+               WebRequest $request
+       ) {
+               $blockCookieVal = $request->getCookie( 'BlockID' );
+               $response = $request->response();
+
+               // Make sure there's something to check. The cookie value must start with a number.
+               if ( strlen( $blockCookieVal ) < 1 || !is_numeric( substr( $blockCookieVal, 0, 1 ) ) ) {
+                       return false;
+               }
+               // Load the Block from the ID in the cookie.
+               // TODO: remove dependency on Block
+               $blockCookieId = Block::getIdFromCookieValue( $blockCookieVal );
+               if ( $blockCookieId !== null ) {
+                       // An ID was found in the cookie.
+                       // TODO: remove dependency on Block
+                       $tmpBlock = Block::newFromID( $blockCookieId );
+                       if ( $tmpBlock instanceof Block ) {
+                               switch ( $tmpBlock->getType() ) {
+                                       case Block::TYPE_USER:
+                                               $blockIsValid = !$tmpBlock->isExpired() && $tmpBlock->isAutoblocking();
+                                               $useBlockCookie = ( $this->cookieSetOnAutoblock === true );
+                                               break;
+                                       case Block::TYPE_IP:
+                                       case Block::TYPE_RANGE:
+                                               // If block is type IP or IP range, load only if user is not logged in (T152462)
+                                               $blockIsValid = !$tmpBlock->isExpired() && $user->getId() === 0;
+                                               $useBlockCookie = ( $this->cookieSetOnIpBlock === true );
+                                               break;
+                                       default:
+                                               $blockIsValid = false;
+                                               $useBlockCookie = false;
+                               }
+
+                               if ( $blockIsValid && $useBlockCookie ) {
+                                       // Use the block.
+                                       return $tmpBlock;
+                               }
+
+                               // If the block is not valid, remove the cookie.
+                               // TODO: remove dependency on Block
+                               Block::clearCookie( $response );
+                       } else {
+                               // If the block doesn't exist, remove the cookie.
+                               // TODO: remove dependency on Block
+                               Block::clearCookie( $response );
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Check if an IP address is in the local proxy list
+        *
+        * @param string $ip
+        * @return bool
+        */
+       private function isLocallyBlockedProxy( $ip ) {
+               if ( !$this->proxyList ) {
+                       return false;
+               }
+
+               if ( !is_array( $this->proxyList ) ) {
+                       // Load values from the specified file
+                       $this->proxyList = array_map( 'trim', file( $this->proxyList ) );
+               }
+
+               $resultProxyList = [];
+               $deprecatedIPEntries = [];
+
+               // backward compatibility: move all ip addresses in keys to values
+               foreach ( $this->proxyList as $key => $value ) {
+                       $keyIsIP = IP::isIPAddress( $key );
+                       $valueIsIP = IP::isIPAddress( $value );
+                       if ( $keyIsIP && !$valueIsIP ) {
+                               $deprecatedIPEntries[] = $key;
+                               $resultProxyList[] = $key;
+                       } elseif ( $keyIsIP && $valueIsIP ) {
+                               $deprecatedIPEntries[] = $key;
+                               $resultProxyList[] = $key;
+                               $resultProxyList[] = $value;
+                       } else {
+                               $resultProxyList[] = $value;
+                       }
+               }
+
+               if ( $deprecatedIPEntries ) {
+                       wfDeprecated(
+                               'IP addresses in the keys of $wgProxyList (found the following IP addresses in keys: ' .
+                               implode( ', ', $deprecatedIPEntries ) . ', please move them to values)', '1.30' );
+               }
+
+               $proxyListIPSet = new IPSet( $resultProxyList );
+               return $proxyListIPSet->match( $ip );
+       }
+
+       /**
+        * Whether the given IP is in a DNS blacklist.
+        *
+        * @param string $ip IP to check
+        * @param bool $checkWhitelist Whether to check the whitelist first
+        * @return bool True if blacklisted.
+        */
+       public function isDnsBlacklisted( $ip, $checkWhitelist = false ) {
+               if ( !$this->enableDnsBlacklist ||
+                       ( $checkWhitelist && in_array( $ip, $this->proxyWhitelist ) )
+               ) {
+                       return false;
+               }
+
+               return $this->inDnsBlacklist( $ip, $this->dnsBlacklistUrls );
+       }
+
+       /**
+        * Whether the given IP is in a given DNS blacklist.
+        *
+        * @param string $ip IP to check
+        * @param array $bases Array of Strings: URL of the DNS blacklist
+        * @return bool True if blacklisted.
+        */
+       private function inDnsBlacklist( $ip, array $bases ) {
+               $found = false;
+               // @todo FIXME: IPv6 ???  (https://bugs.php.net/bug.php?id=33170)
+               if ( IP::isIPv4( $ip ) ) {
+                       // Reverse IP, T23255
+                       $ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
+
+                       foreach ( $bases as $base ) {
+                               // Make hostname
+                               // If we have an access key, use that too (ProjectHoneypot, etc.)
+                               $basename = $base;
+                               if ( is_array( $base ) ) {
+                                       if ( count( $base ) >= 2 ) {
+                                               // Access key is 1, base URL is 0
+                                               $host = "{$base[1]}.$ipReversed.{$base[0]}";
+                                       } else {
+                                               $host = "$ipReversed.{$base[0]}";
+                                       }
+                                       $basename = $base[0];
+                               } else {
+                                       $host = "$ipReversed.$base";
+                               }
+
+                               // Send query
+                               $ipList = gethostbynamel( $host );
+
+                               if ( $ipList ) {
+                                       wfDebugLog( 'dnsblacklist', "Hostname $host is {$ipList[0]}, it's a proxy says $basename!" );
+                                       $found = true;
+                                       break;
+                               }
+
+                               wfDebugLog( 'dnsblacklist', "Requested $host, not found in $basename." );
+                       }
+               }
+
+               return $found;
+       }
+
+}
diff --git a/includes/block/BlockRestriction.php b/includes/block/BlockRestriction.php
deleted file mode 100644 (file)
index 2e8752e..0000000
+++ /dev/null
@@ -1,436 +0,0 @@
-<?php
-/**
- * Block restriction interface.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-namespace MediaWiki\Block;
-
-use MediaWiki\Block\Restriction\NamespaceRestriction;
-use MediaWiki\Block\Restriction\PageRestriction;
-use MediaWiki\Block\Restriction\Restriction;
-use MWException;
-use Wikimedia\Rdbms\IResultWrapper;
-use Wikimedia\Rdbms\IDatabase;
-
-class BlockRestriction {
-
-       /**
-        * Map of all of the restriction types.
-        */
-       private static $types = [
-               PageRestriction::TYPE_ID => PageRestriction::class,
-               NamespaceRestriction::TYPE_ID => NamespaceRestriction::class,
-       ];
-
-       /**
-        * Retrieves the restrictions from the database by block id.
-        *
-        * @since 1.33
-        * @param int|array $blockId
-        * @param IDatabase|null $db
-        * @return Restriction[]
-        */
-       public static function loadByBlockId( $blockId, IDatabase $db = null ) {
-               if ( $blockId === null || $blockId === [] ) {
-                       return [];
-               }
-
-               $db = $db ?: wfGetDB( DB_REPLICA );
-
-               $result = $db->select(
-                       [ 'ipblocks_restrictions', 'page' ],
-                       [ 'ir_ipb_id', 'ir_type', 'ir_value', 'page_namespace', 'page_title' ],
-                       [ 'ir_ipb_id' => $blockId ],
-                       __METHOD__,
-                       [],
-                       [ 'page' => [ 'LEFT JOIN', [ 'ir_type' => PageRestriction::TYPE_ID, 'ir_value=page_id' ] ] ]
-               );
-
-               return self::resultToRestrictions( $result );
-       }
-
-       /**
-        * Inserts the restrictions into the database.
-        *
-        * @since 1.33
-        * @param Restriction[] $restrictions
-        * @return bool
-        */
-       public static function insert( array $restrictions ) {
-               if ( !$restrictions ) {
-                       return false;
-               }
-
-               $rows = [];
-               foreach ( $restrictions as $restriction ) {
-                       if ( !$restriction instanceof Restriction ) {
-                               continue;
-                       }
-                       $rows[] = $restriction->toRow();
-               }
-
-               if ( !$rows ) {
-                       return false;
-               }
-
-               $dbw = wfGetDB( DB_MASTER );
-
-               $dbw->insert(
-                       'ipblocks_restrictions',
-                       $rows,
-                       __METHOD__,
-                       [ 'IGNORE' ]
-               );
-
-               return true;
-       }
-
-       /**
-        * Updates the list of restrictions. This method does not allow removing all
-        * of the restrictions. To do that, use ::deleteByBlockId().
-        *
-        * @since 1.33
-        * @param Restriction[] $restrictions
-        * @return bool
-        */
-       public static function update( array $restrictions ) {
-               $dbw = wfGetDB( DB_MASTER );
-
-               $dbw->startAtomic( __METHOD__ );
-
-               // Organize the restrictions by blockid.
-               $restrictionList = self::restrictionsByBlockId( $restrictions );
-
-               // Load the existing restrictions and organize by block id. Any block ids
-               // that were passed into this function will be used to load all of the
-               // existing restrictions. This list might be the same, or may be completely
-               // different.
-               $existingList = [];
-               $blockIds = array_keys( $restrictionList );
-               if ( !empty( $blockIds ) ) {
-                       $result = $dbw->select(
-                               [ 'ipblocks_restrictions' ],
-                               [ 'ir_ipb_id', 'ir_type', 'ir_value' ],
-                               [ 'ir_ipb_id' => $blockIds ],
-                               __METHOD__,
-                               [ 'FOR UPDATE' ]
-                       );
-
-                       $existingList = self::restrictionsByBlockId(
-                               self::resultToRestrictions( $result )
-                       );
-               }
-
-               $result = true;
-               // Perform the actions on a per block-id basis.
-               foreach ( $restrictionList as $blockId => $blockRestrictions ) {
-                       // Insert all of the restrictions first, ignoring ones that already exist.
-                       $success = self::insert( $blockRestrictions );
-
-                       // Update the result. The first false is the result, otherwise, true.
-                       $result = $success && $result;
-
-                       $restrictionsToRemove = self::restrictionsToRemove(
-                               $existingList[$blockId] ?? [],
-                               $restrictions
-                       );
-
-                       if ( empty( $restrictionsToRemove ) ) {
-                               continue;
-                       }
-
-                       $success = self::delete( $restrictionsToRemove );
-
-                       // Update the result. The first false is the result, otherwise, true.
-                       $result = $success && $result;
-               }
-
-               $dbw->endAtomic( __METHOD__ );
-
-               return $result;
-       }
-
-       /**
-        * Updates the list of restrictions by parent id.
-        *
-        * @since 1.33
-        * @param int $parentBlockId
-        * @param Restriction[] $restrictions
-        * @return bool
-        */
-       public static function updateByParentBlockId( $parentBlockId, array $restrictions ) {
-               // If removing all of the restrictions, then just delete them all.
-               if ( empty( $restrictions ) ) {
-                       return self::deleteByParentBlockId( $parentBlockId );
-               }
-
-               $parentBlockId = (int)$parentBlockId;
-
-               $db = wfGetDB( DB_MASTER );
-
-               $db->startAtomic( __METHOD__ );
-
-               $blockIds = $db->selectFieldValues(
-                       'ipblocks',
-                       'ipb_id',
-                       [ 'ipb_parent_block_id' => $parentBlockId ],
-                       __METHOD__,
-                       [ 'FOR UPDATE' ]
-               );
-
-               $result = true;
-               foreach ( $blockIds as $id ) {
-                       $success = self::update( self::setBlockId( $id, $restrictions ) );
-                       // Update the result. The first false is the result, otherwise, true.
-                       $result = $success && $result;
-               }
-
-               $db->endAtomic( __METHOD__ );
-
-               return $result;
-       }
-
-       /**
-        * Delete the restrictions.
-        *
-        * @since 1.33
-        * @param Restriction[]|null $restrictions
-        * @throws MWException
-        * @return bool
-        */
-       public static function delete( array $restrictions ) {
-               $dbw = wfGetDB( DB_MASTER );
-               $result = true;
-               foreach ( $restrictions as $restriction ) {
-                       if ( !$restriction instanceof Restriction ) {
-                               continue;
-                       }
-
-                       $success = $dbw->delete(
-                               'ipblocks_restrictions',
-                               // The restriction row is made up of a compound primary key. Therefore,
-                               // the row and the delete conditions are the same.
-                               $restriction->toRow(),
-                               __METHOD__
-                       );
-                       // Update the result. The first false is the result, otherwise, true.
-                       $result = $success && $result;
-               }
-
-               return $result;
-       }
-
-       /**
-        * Delete the restrictions by Block ID.
-        *
-        * @since 1.33
-        * @param int|array $blockId
-        * @throws MWException
-        * @return bool
-        */
-       public static function deleteByBlockId( $blockId ) {
-               $dbw = wfGetDB( DB_MASTER );
-               return $dbw->delete(
-                       'ipblocks_restrictions',
-                       [ 'ir_ipb_id' => $blockId ],
-                       __METHOD__
-               );
-       }
-
-       /**
-        * Delete the restrictions by Parent Block ID.
-        *
-        * @since 1.33
-        * @param int|array $parentBlockId
-        * @throws MWException
-        * @return bool
-        */
-       public static function deleteByParentBlockId( $parentBlockId ) {
-               $dbw = wfGetDB( DB_MASTER );
-               return $dbw->deleteJoin(
-                       'ipblocks_restrictions',
-                       'ipblocks',
-                       'ir_ipb_id',
-                       'ipb_id',
-                       [ 'ipb_parent_block_id' => $parentBlockId ],
-                       __METHOD__
-               );
-       }
-
-       /**
-        * Checks if two arrays of Restrictions are effectively equal. This is a loose
-        * equality check as the restrictions do not have to contain the same block
-        * ids.
-        *
-        * @since 1.33
-        * @param Restriction[] $a
-        * @param Restriction[] $b
-        * @return bool
-        */
-       public static function equals( array $a, array $b ) {
-               $filter = function ( $restriction ) {
-                       return $restriction instanceof Restriction;
-               };
-
-               // Ensure that every item in the array is a Restriction. This prevents a
-               // fatal error from calling Restriction::getHash if something in the array
-               // is not a restriction.
-               $a = array_filter( $a, $filter );
-               $b = array_filter( $b, $filter );
-
-               $aCount = count( $a );
-               $bCount = count( $b );
-
-               // If the count is different, then they are obviously a different set.
-               if ( $aCount !== $bCount ) {
-                       return false;
-               }
-
-               // If both sets contain no items, then they are the same set.
-               if ( $aCount === 0 && $bCount === 0 ) {
-                       return true;
-               }
-
-               $hasher = function ( $r ) {
-                       return $r->getHash();
-               };
-
-               $aHashes = array_map( $hasher, $a );
-               $bHashes = array_map( $hasher, $b );
-
-               sort( $aHashes );
-               sort( $bHashes );
-
-               return $aHashes === $bHashes;
-       }
-
-       /**
-        * Set the blockId on a set of restrictions and return a new set.
-        *
-        * @since 1.33
-        * @param int $blockId
-        * @param Restriction[] $restrictions
-        * @return Restriction[]
-        */
-       public static function setBlockId( $blockId, array $restrictions ) {
-               $blockRestrictions = [];
-
-               foreach ( $restrictions as $restriction ) {
-                       if ( !$restriction instanceof Restriction ) {
-                               continue;
-                       }
-
-                       // Clone the restriction so any references to the current restriction are
-                       // not suddenly changed to a different blockId.
-                       $restriction = clone $restriction;
-                       $restriction->setBlockId( $blockId );
-
-                       $blockRestrictions[] = $restriction;
-               }
-
-               return $blockRestrictions;
-       }
-
-       /**
-        * Get the restrictions that should be removed, which are existing
-        * restrictions that are not in the new list of restrictions.
-        *
-        * @param Restriction[] $existing
-        * @param Restriction[] $new
-        * @return array
-        */
-       private static function restrictionsToRemove( array $existing, array $new ) {
-               return array_filter( $existing, function ( $e ) use ( $new ) {
-                       foreach ( $new as $restriction ) {
-                               if ( !$restriction instanceof Restriction ) {
-                                       continue;
-                               }
-
-                               if ( $restriction->equals( $e ) ) {
-                                       return false;
-                               }
-                       }
-
-                       return true;
-               } );
-       }
-
-       /**
-        * Converts an array of restrictions to an associative array of restrictions
-        * where the keys are the block ids.
-        *
-        * @param Restriction[] $restrictions
-        * @return array
-        */
-       private static function restrictionsByBlockId( array $restrictions ) {
-               $blockRestrictions = [];
-
-               foreach ( $restrictions as $restriction ) {
-                       // Ensure that all of the items in the array are restrictions.
-                       if ( !$restriction instanceof Restriction ) {
-                               continue;
-                       }
-
-                       if ( !isset( $blockRestrictions[$restriction->getBlockId()] ) ) {
-                               $blockRestrictions[$restriction->getBlockId()] = [];
-                       }
-
-                       $blockRestrictions[$restriction->getBlockId()][] = $restriction;
-               }
-
-               return $blockRestrictions;
-       }
-
-       /**
-        * Convert an Result Wrapper to an array of restrictions.
-        *
-        * @param IResultWrapper $result
-        * @return Restriction[]
-        */
-       private static function resultToRestrictions( IResultWrapper $result ) {
-               $restrictions = [];
-               foreach ( $result as $row ) {
-                       $restriction = self::rowToRestriction( $row );
-
-                       if ( !$restriction ) {
-                               continue;
-                       }
-
-                       $restrictions[] = $restriction;
-               }
-
-               return $restrictions;
-       }
-
-       /**
-        * Convert a result row from the database into a restriction object.
-        *
-        * @param \stdClass $row
-        * @return Restriction|null
-        */
-       private static function rowToRestriction( \stdClass $row ) {
-               if ( array_key_exists( (int)$row->ir_type, self::$types ) ) {
-                       $class = self::$types[ (int)$row->ir_type ];
-                       return call_user_func( [ $class, 'newFromRow' ], $row );
-               }
-
-               return null;
-       }
-}
diff --git a/includes/block/BlockRestrictionStore.php b/includes/block/BlockRestrictionStore.php
new file mode 100644 (file)
index 0000000..d242c87
--- /dev/null
@@ -0,0 +1,449 @@
+<?php
+/**
+ * Block restriction interface.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Block;
+
+use MediaWiki\Block\Restriction\NamespaceRestriction;
+use MediaWiki\Block\Restriction\PageRestriction;
+use MediaWiki\Block\Restriction\Restriction;
+use MWException;
+use Wikimedia\Rdbms\IResultWrapper;
+use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\ILoadBalancer;
+
+class BlockRestrictionStore {
+
+       /**
+        * Map of all of the restriction types.
+        */
+       private $types = [
+               PageRestriction::TYPE_ID => PageRestriction::class,
+               NamespaceRestriction::TYPE_ID => NamespaceRestriction::class,
+       ];
+
+       /**
+        * @var ILoadBalancer
+        */
+       private $loadBalancer;
+
+       /*
+        * @param LoadBalancer $loadBalancer load balancer for acquiring database connections
+        */
+       public function __construct( ILoadBalancer $loadBalancer ) {
+               $this->loadBalancer = $loadBalancer;
+       }
+
+       /**
+        * Retrieves the restrictions from the database by block id.
+        *
+        * @since 1.33
+        * @param int|array $blockId
+        * @param IDatabase|null $db
+        * @return Restriction[]
+        */
+       public function loadByBlockId( $blockId, IDatabase $db = null ) {
+               if ( $blockId === null || $blockId === [] ) {
+                       return [];
+               }
+
+               $db = $db ?: $this->loadBalancer->getConnection( DB_REPLICA );
+
+               $result = $db->select(
+                       [ 'ipblocks_restrictions', 'page' ],
+                       [ 'ir_ipb_id', 'ir_type', 'ir_value', 'page_namespace', 'page_title' ],
+                       [ 'ir_ipb_id' => $blockId ],
+                       __METHOD__,
+                       [],
+                       [ 'page' => [ 'LEFT JOIN', [ 'ir_type' => PageRestriction::TYPE_ID, 'ir_value=page_id' ] ] ]
+               );
+
+               return $this->resultToRestrictions( $result );
+       }
+
+       /**
+        * Inserts the restrictions into the database.
+        *
+        * @since 1.33
+        * @param Restriction[] $restrictions
+        * @return bool
+        */
+       public function insert( array $restrictions ) {
+               if ( !$restrictions ) {
+                       return false;
+               }
+
+               $rows = [];
+               foreach ( $restrictions as $restriction ) {
+                       if ( !$restriction instanceof Restriction ) {
+                               continue;
+                       }
+                       $rows[] = $restriction->toRow();
+               }
+
+               if ( !$rows ) {
+                       return false;
+               }
+
+               $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+
+               $dbw->insert(
+                       'ipblocks_restrictions',
+                       $rows,
+                       __METHOD__,
+                       [ 'IGNORE' ]
+               );
+
+               return true;
+       }
+
+       /**
+        * Updates the list of restrictions. This method does not allow removing all
+        * of the restrictions. To do that, use ::deleteByBlockId().
+        *
+        * @since 1.33
+        * @param Restriction[] $restrictions
+        * @return bool
+        */
+       public function update( array $restrictions ) {
+               $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+
+               $dbw->startAtomic( __METHOD__ );
+
+               // Organize the restrictions by blockid.
+               $restrictionList = $this->restrictionsByBlockId( $restrictions );
+
+               // Load the existing restrictions and organize by block id. Any block ids
+               // that were passed into this function will be used to load all of the
+               // existing restrictions. This list might be the same, or may be completely
+               // different.
+               $existingList = [];
+               $blockIds = array_keys( $restrictionList );
+               if ( !empty( $blockIds ) ) {
+                       $result = $dbw->select(
+                               [ 'ipblocks_restrictions' ],
+                               [ 'ir_ipb_id', 'ir_type', 'ir_value' ],
+                               [ 'ir_ipb_id' => $blockIds ],
+                               __METHOD__,
+                               [ 'FOR UPDATE' ]
+                       );
+
+                       $existingList = $this->restrictionsByBlockId(
+                               $this->resultToRestrictions( $result )
+                       );
+               }
+
+               $result = true;
+               // Perform the actions on a per block-id basis.
+               foreach ( $restrictionList as $blockId => $blockRestrictions ) {
+                       // Insert all of the restrictions first, ignoring ones that already exist.
+                       $success = $this->insert( $blockRestrictions );
+
+                       // Update the result. The first false is the result, otherwise, true.
+                       $result = $success && $result;
+
+                       $restrictionsToRemove = $this->restrictionsToRemove(
+                               $existingList[$blockId] ?? [],
+                               $restrictions
+                       );
+
+                       if ( empty( $restrictionsToRemove ) ) {
+                               continue;
+                       }
+
+                       $success = $this->delete( $restrictionsToRemove );
+
+                       // Update the result. The first false is the result, otherwise, true.
+                       $result = $success && $result;
+               }
+
+               $dbw->endAtomic( __METHOD__ );
+
+               return $result;
+       }
+
+       /**
+        * Updates the list of restrictions by parent id.
+        *
+        * @since 1.33
+        * @param int $parentBlockId
+        * @param Restriction[] $restrictions
+        * @return bool
+        */
+       public function updateByParentBlockId( $parentBlockId, array $restrictions ) {
+               // If removing all of the restrictions, then just delete them all.
+               if ( empty( $restrictions ) ) {
+                       return $this->deleteByParentBlockId( $parentBlockId );
+               }
+
+               $parentBlockId = (int)$parentBlockId;
+
+               $db = $this->loadBalancer->getConnection( DB_MASTER );
+
+               $db->startAtomic( __METHOD__ );
+
+               $blockIds = $db->selectFieldValues(
+                       'ipblocks',
+                       'ipb_id',
+                       [ 'ipb_parent_block_id' => $parentBlockId ],
+                       __METHOD__,
+                       [ 'FOR UPDATE' ]
+               );
+
+               $result = true;
+               foreach ( $blockIds as $id ) {
+                       $success = $this->update( $this->setBlockId( $id, $restrictions ) );
+                       // Update the result. The first false is the result, otherwise, true.
+                       $result = $success && $result;
+               }
+
+               $db->endAtomic( __METHOD__ );
+
+               return $result;
+       }
+
+       /**
+        * Delete the restrictions.
+        *
+        * @since 1.33
+        * @param Restriction[]|null $restrictions
+        * @throws MWException
+        * @return bool
+        */
+       public function delete( array $restrictions ) {
+               $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+               $result = true;
+               foreach ( $restrictions as $restriction ) {
+                       if ( !$restriction instanceof Restriction ) {
+                               continue;
+                       }
+
+                       $success = $dbw->delete(
+                               'ipblocks_restrictions',
+                               // The restriction row is made up of a compound primary key. Therefore,
+                               // the row and the delete conditions are the same.
+                               $restriction->toRow(),
+                               __METHOD__
+                       );
+                       // Update the result. The first false is the result, otherwise, true.
+                       $result = $success && $result;
+               }
+
+               return $result;
+       }
+
+       /**
+        * Delete the restrictions by Block ID.
+        *
+        * @since 1.33
+        * @param int|array $blockId
+        * @throws MWException
+        * @return bool
+        */
+       public function deleteByBlockId( $blockId ) {
+               $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+               return $dbw->delete(
+                       'ipblocks_restrictions',
+                       [ 'ir_ipb_id' => $blockId ],
+                       __METHOD__
+               );
+       }
+
+       /**
+        * Delete the restrictions by Parent Block ID.
+        *
+        * @since 1.33
+        * @param int|array $parentBlockId
+        * @throws MWException
+        * @return bool
+        */
+       public function deleteByParentBlockId( $parentBlockId ) {
+               $dbw = $this->loadBalancer->getConnection( DB_MASTER );
+               return $dbw->deleteJoin(
+                       'ipblocks_restrictions',
+                       'ipblocks',
+                       'ir_ipb_id',
+                       'ipb_id',
+                       [ 'ipb_parent_block_id' => $parentBlockId ],
+                       __METHOD__
+               );
+       }
+
+       /**
+        * Checks if two arrays of Restrictions are effectively equal. This is a loose
+        * equality check as the restrictions do not have to contain the same block
+        * ids.
+        *
+        * @since 1.33
+        * @param Restriction[] $a
+        * @param Restriction[] $b
+        * @return bool
+        */
+       public function equals( array $a, array $b ) {
+               $filter = function ( $restriction ) {
+                       return $restriction instanceof Restriction;
+               };
+
+               // Ensure that every item in the array is a Restriction. This prevents a
+               // fatal error from calling Restriction::getHash if something in the array
+               // is not a restriction.
+               $a = array_filter( $a, $filter );
+               $b = array_filter( $b, $filter );
+
+               $aCount = count( $a );
+               $bCount = count( $b );
+
+               // If the count is different, then they are obviously a different set.
+               if ( $aCount !== $bCount ) {
+                       return false;
+               }
+
+               // If both sets contain no items, then they are the same set.
+               if ( $aCount === 0 && $bCount === 0 ) {
+                       return true;
+               }
+
+               $hasher = function ( $r ) {
+                       return $r->getHash();
+               };
+
+               $aHashes = array_map( $hasher, $a );
+               $bHashes = array_map( $hasher, $b );
+
+               sort( $aHashes );
+               sort( $bHashes );
+
+               return $aHashes === $bHashes;
+       }
+
+       /**
+        * Set the blockId on a set of restrictions and return a new set.
+        *
+        * @since 1.33
+        * @param int $blockId
+        * @param Restriction[] $restrictions
+        * @return Restriction[]
+        */
+       public function setBlockId( $blockId, array $restrictions ) {
+               $blockRestrictions = [];
+
+               foreach ( $restrictions as $restriction ) {
+                       if ( !$restriction instanceof Restriction ) {
+                               continue;
+                       }
+
+                       // Clone the restriction so any references to the current restriction are
+                       // not suddenly changed to a different blockId.
+                       $restriction = clone $restriction;
+                       $restriction->setBlockId( $blockId );
+
+                       $blockRestrictions[] = $restriction;
+               }
+
+               return $blockRestrictions;
+       }
+
+       /**
+        * Get the restrictions that should be removed, which are existing
+        * restrictions that are not in the new list of restrictions.
+        *
+        * @param Restriction[] $existing
+        * @param Restriction[] $new
+        * @return array
+        */
+       private function restrictionsToRemove( array $existing, array $new ) {
+               return array_filter( $existing, function ( $e ) use ( $new ) {
+                       foreach ( $new as $restriction ) {
+                               if ( !$restriction instanceof Restriction ) {
+                                       continue;
+                               }
+
+                               if ( $restriction->equals( $e ) ) {
+                                       return false;
+                               }
+                       }
+
+                       return true;
+               } );
+       }
+
+       /**
+        * Converts an array of restrictions to an associative array of restrictions
+        * where the keys are the block ids.
+        *
+        * @param Restriction[] $restrictions
+        * @return array
+        */
+       private function restrictionsByBlockId( array $restrictions ) {
+               $blockRestrictions = [];
+
+               foreach ( $restrictions as $restriction ) {
+                       // Ensure that all of the items in the array are restrictions.
+                       if ( !$restriction instanceof Restriction ) {
+                               continue;
+                       }
+
+                       if ( !isset( $blockRestrictions[$restriction->getBlockId()] ) ) {
+                               $blockRestrictions[$restriction->getBlockId()] = [];
+                       }
+
+                       $blockRestrictions[$restriction->getBlockId()][] = $restriction;
+               }
+
+               return $blockRestrictions;
+       }
+
+       /**
+        * Convert an Result Wrapper to an array of restrictions.
+        *
+        * @param IResultWrapper $result
+        * @return Restriction[]
+        */
+       private function resultToRestrictions( IResultWrapper $result ) {
+               $restrictions = [];
+               foreach ( $result as $row ) {
+                       $restriction = $this->rowToRestriction( $row );
+
+                       if ( !$restriction ) {
+                               continue;
+                       }
+
+                       $restrictions[] = $restriction;
+               }
+
+               return $restrictions;
+       }
+
+       /**
+        * Convert a result row from the database into a restriction object.
+        *
+        * @param \stdClass $row
+        * @return Restriction|null
+        */
+       private function rowToRestriction( \stdClass $row ) {
+               if ( array_key_exists( (int)$row->ir_type, $this->types ) ) {
+                       $class = $this->types[ (int)$row->ir_type ];
+                       return call_user_func( [ $class, 'newFromRow' ], $row );
+               }
+
+               return null;
+       }
+}
index ec6ce04..d798ddb 100644 (file)
@@ -288,7 +288,9 @@ class CacheHelper implements ICacheHelper {
                        throw new MWException( 'No cache key set, so cannot obtain or save the CacheHelper values.' );
                }
 
-               return wfMemcKey( ...array_values( $this->cacheKey ) );
+               return ObjectCache::getLocalClusterInstance()->makeKey(
+                       ...array_values( $this->cacheKey )
+               );
        }
 
        /**
index 7228814..eedc3c6 100644 (file)
@@ -34,6 +34,13 @@ class GenderCache {
        protected $misses = 0;
        protected $missLimit = 1000;
 
+       /** @var NamespaceInfo */
+       private $nsInfo;
+
+       public function __construct( NamespaceInfo $nsInfo = null ) {
+               $this->nsInfo = $nsInfo ?? MediaWikiServices::getInstance()->getNamespaceInfo();
+       }
+
        /**
         * @deprecated in 1.28 see MediaWikiServices::getInstance()->getGenderCache()
         * @return GenderCache
@@ -97,7 +104,7 @@ class GenderCache {
        public function doLinkBatch( $data, $caller = '' ) {
                $users = [];
                foreach ( $data as $ns => $pagenames ) {
-                       if ( !MWNamespace::hasGenderDistinction( $ns ) ) {
+                       if ( !$this->nsInfo->hasGenderDistinction( $ns ) ) {
                                continue;
                        }
                        foreach ( array_keys( $pagenames ) as $username ) {
@@ -122,7 +129,7 @@ class GenderCache {
                        if ( !$titleObj ) {
                                continue;
                        }
-                       if ( !MWNamespace::hasGenderDistinction( $titleObj->getNamespace() ) ) {
+                       if ( !$this->nsInfo->hasGenderDistinction( $titleObj->getNamespace() ) ) {
                                continue;
                        }
                        $users[] = $titleObj->getText();
index c13f95e..1bcf948 100644 (file)
@@ -45,17 +45,29 @@ class LinkCache {
        /** @var TitleFormatter */
        private $titleFormatter;
 
+       /** @var NamespaceInfo */
+       private $nsInfo;
+
        /**
         * How many Titles to store. There are two caches, so the amount actually
         * stored in memory can be up to twice this.
         */
        const MAX_SIZE = 10000;
 
-       public function __construct( TitleFormatter $titleFormatter, WANObjectCache $cache ) {
+       public function __construct(
+               TitleFormatter $titleFormatter,
+               WANObjectCache $cache,
+               NamespaceInfo $nsInfo = null
+       ) {
+               if ( !$nsInfo ) {
+                       wfDeprecated( __METHOD__ . ' with no NamespaceInfo argument', '1.34' );
+                       $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+               }
                $this->goodLinks = new MapCacheLRU( self::MAX_SIZE );
                $this->badLinks = new MapCacheLRU( self::MAX_SIZE );
                $this->wanCache = $cache;
                $this->titleFormatter = $titleFormatter;
+               $this->nsInfo = $nsInfo;
        }
 
        /**
@@ -231,9 +243,7 @@ class LinkCache {
         */
        public function addLinkObj( LinkTarget $nt ) {
                $key = $this->titleFormatter->getPrefixedDBkey( $nt );
-               if ( $this->isBadLink( $key ) || $nt->isExternal()
-                       || $nt->inNamespace( NS_SPECIAL )
-               ) {
+               if ( $this->isBadLink( $key ) || $nt->isExternal() || $nt->getNamespace() < 0 ) {
                        return 0;
                }
                $id = $this->getGoodLinkID( $key );
@@ -300,11 +310,11 @@ class LinkCache {
                        return true;
                }
                // Focus on transcluded pages more than the main content
-               if ( MWNamespace::isContent( $ns ) ) {
+               if ( $this->nsInfo->isContent( $ns ) ) {
                        return false;
                }
                // Non-talk extension namespaces (e.g. NS_MODULE)
-               return ( $ns >= 100 && MWNamespace::isSubject( $ns ) );
+               return ( $ns >= 100 && $this->nsInfo->isSubject( $ns ) );
        }
 
        private function fetchPageRow( IDatabase $db, LinkTarget $nt ) {
index 2169a4d..0601397 100644 (file)
@@ -482,7 +482,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'applychangetags' ) ) {
                                return Status::newFatal( 'tags-apply-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `applychangetags`
+                               //       right.
                                return Status::newFatal( 'tags-apply-blocked', $user->getName() );
                        }
                }
@@ -555,7 +557,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'changetags' ) ) {
                                return Status::newFatal( 'tags-update-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `changetags`
+                               //       right.
                                return Status::newFatal( 'tags-update-blocked', $user->getName() );
                        }
                }
@@ -973,7 +977,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1045,7 +1051,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1142,7 +1150,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1258,7 +1268,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'deletechangetags' ) ) {
                                return Status::newFatal( 'tags-delete-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `deletechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
diff --git a/includes/config/ServiceOptions.php b/includes/config/ServiceOptions.php
new file mode 100644 (file)
index 0000000..0f3743f
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+
+namespace MediaWiki\Config;
+
+use Config;
+use InvalidArgumentException;
+use Wikimedia\Assert\Assert;
+
+/**
+ * A class for passing options to services. It can be constructed from a Config, and in practice
+ * most options will be taken from site configuration, but they don't have to be. The options passed
+ * are copied and will not reflect subsequent updates to site configuration (assuming they're not
+ * objects).
+ *
+ * Services that take this type as a parameter to their constructor should specify a list of the
+ * keys they expect to receive in an array. The convention is to make it a public static variable
+ * called $constructorOptions. (When we drop HHVM support -- see T192166 -- it should become a
+ * const.) In the constructor, they should call assertRequiredOptions() to make sure that they
+ * weren't passed too few or too many options. This way it's clear what each class depends on, and
+ * that it's getting passed the correct set of options. (This means there are no optional options.
+ * This makes sense for services, since they shouldn't be constructed by outside code.)
+ *
+ * @since 1.34
+ */
+class ServiceOptions {
+       private $options = [];
+
+       /**
+        * @param string[] $keys Which keys to extract from $sources
+        * @param Config|array ...$sources Each source is either a Config object or an array. If the
+        *  same key is present in two sources, the first one takes precedence. Keys that are not in
+        *  $keys are ignored.
+        * @throws InvalidArgumentException if one of $keys is not found in any of $sources
+        */
+       public function __construct( array $keys, ...$sources ) {
+               foreach ( $keys as $key ) {
+                       foreach ( $sources as $source ) {
+                               if ( $source instanceof Config ) {
+                                       if ( $source->has( $key ) ) {
+                                               $this->options[$key] = $source->get( $key );
+                                               continue 2;
+                                       }
+                               } else {
+                                       if ( array_key_exists( $key, $source ) ) {
+                                               $this->options[$key] = $source[$key];
+                                               continue 2;
+                                       }
+                               }
+                       }
+                       throw new InvalidArgumentException( "Key \"$key\" not found in input sources" );
+               }
+       }
+
+       /**
+        * Assert that the list of options provided in this instance exactly match $expectedKeys,
+        * without regard for order.
+        *
+        * @param string[] $expectedKeys
+        */
+       public function assertRequiredOptions( array $expectedKeys ) {
+               $actualKeys = array_keys( $this->options );
+               $extraKeys = array_diff( $actualKeys, $expectedKeys );
+               $missingKeys = array_diff( $expectedKeys, $actualKeys );
+               Assert::precondition( !$extraKeys && !$missingKeys,
+                       (
+                       $extraKeys
+                               ? 'Unsupported options passed: ' . implode( ', ', $extraKeys ) . '!'
+                               : ''
+                       ) . ( $extraKeys && $missingKeys ? ' ' : '' ) . (
+                       $missingKeys
+                               ? 'Required options missing: ' . implode( ', ', $missingKeys ) . '!'
+                               : ''
+                       )
+               );
+       }
+
+       /**
+        * @param string $key
+        * @return mixed
+        */
+       public function get( $key ) {
+               if ( !array_key_exists( $key, $this->options ) ) {
+                       throw new InvalidArgumentException( "Unrecognized option \"$key\"" );
+               }
+               return $this->options[$key];
+       }
+}
index 6633fba..be4f6ba 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Database
  */
 
+use MediaWiki\Config\ServiceOptions;
 use MediaWiki\Logger\LoggerFactory;
 use Wikimedia\Rdbms\LBFactory;
 use Wikimedia\Rdbms\DatabaseDomain;
@@ -34,9 +35,35 @@ abstract class MWLBFactory {
        /** @var array Cache of already-logged deprecation messages */
        private static $loggedDeprecations = [];
 
+       /**
+        * TODO Make this a const when HHVM support is dropped (T192166)
+        *
+        * @var array
+        * @since 1.34
+        */
+       public static $applyDefaultConfigOptions = [
+               'DBcompress',
+               'DBDefaultGroup',
+               'DBmwschema',
+               'DBname',
+               'DBpassword',
+               'DBport',
+               'DBprefix',
+               'DBserver',
+               'DBservers',
+               'DBssl',
+               'DBtype',
+               'DBuser',
+               'DBWindowsAuthentication',
+               'DebugDumpSql',
+               'ExternalServers',
+               'SQLiteDataDir',
+               'SQLMode',
+       ];
+
        /**
         * @param array $lbConf Config for LBFactory::__construct()
-        * @param Config $mainConfig Main config object from MediaWikiServices
+        * @param ServiceOptions $options
         * @param ConfiguredReadOnlyMode $readOnlyMode
         * @param BagOStuff $srvCace
         * @param BagOStuff $mainStash
@@ -45,21 +72,23 @@ abstract class MWLBFactory {
         */
        public static function applyDefaultConfig(
                array $lbConf,
-               Config $mainConfig,
+               ServiceOptions $options,
                ConfiguredReadOnlyMode $readOnlyMode,
                BagOStuff $srvCace,
                BagOStuff $mainStash,
                WANObjectCache $wanCache
        ) {
+               $options->assertRequiredOptions( self::$applyDefaultConfigOptions );
+
                global $wgCommandLineMode;
 
                $typesWithSchema = self::getDbTypesWithSchemas();
 
                $lbConf += [
                        'localDomain' => new DatabaseDomain(
-                               $mainConfig->get( 'DBname' ),
-                               $mainConfig->get( 'DBmwschema' ),
-                               $mainConfig->get( 'DBprefix' )
+                               $options->get( 'DBname' ),
+                               $options->get( 'DBmwschema' ),
+                               $options->get( 'DBprefix' )
                        ),
                        'profiler' => function ( $section ) {
                                return Profiler::instance()->scopedProfileIn( $section );
@@ -74,7 +103,7 @@ abstract class MWLBFactory {
                        'cliMode' => $wgCommandLineMode,
                        'hostname' => wfHostname(),
                        'readOnlyReason' => $readOnlyMode->getReason(),
-                       'defaultGroup' => $mainConfig->get( 'DBDefaultGroup' ),
+                       'defaultGroup' => $options->get( 'DBDefaultGroup' ),
                ];
 
                $serversCheck = [];
@@ -84,45 +113,46 @@ abstract class MWLBFactory {
                if ( $lbConf['class'] === Wikimedia\Rdbms\LBFactorySimple::class ) {
                        if ( isset( $lbConf['servers'] ) ) {
                                // Server array is already explicitly configured
-                       } elseif ( is_array( $mainConfig->get( 'DBservers' ) ) ) {
+                       } elseif ( is_array( $options->get( 'DBservers' ) ) ) {
                                $lbConf['servers'] = [];
-                               foreach ( $mainConfig->get( 'DBservers' ) as $i => $server ) {
-                                       $lbConf['servers'][$i] = self::initServerInfo( $server, $mainConfig );
+                               foreach ( $options->get( 'DBservers' ) as $i => $server ) {
+                                       $lbConf['servers'][$i] = self::initServerInfo( $server, $options );
                                }
                        } else {
                                $server = self::initServerInfo(
                                        [
-                                               'host' => $mainConfig->get( 'DBserver' ),
-                                               'user' => $mainConfig->get( 'DBuser' ),
-                                               'password' => $mainConfig->get( 'DBpassword' ),
-                                               'dbname' => $mainConfig->get( 'DBname' ),
-                                               'type' => $mainConfig->get( 'DBtype' ),
+                                               'host' => $options->get( 'DBserver' ),
+                                               'user' => $options->get( 'DBuser' ),
+                                               'password' => $options->get( 'DBpassword' ),
+                                               'dbname' => $options->get( 'DBname' ),
+                                               'type' => $options->get( 'DBtype' ),
                                                'load' => 1
                                        ],
-                                       $mainConfig
+                                       $options
                                );
 
-                               $server['flags'] |= $mainConfig->get( 'DBssl' ) ? DBO_SSL : 0;
-                               $server['flags'] |= $mainConfig->get( 'DBcompress' ) ? DBO_COMPRESS : 0;
+                               $server['flags'] |= $options->get( 'DBssl' ) ? DBO_SSL : 0;
+                               $server['flags'] |= $options->get( 'DBcompress' ) ? DBO_COMPRESS : 0;
 
                                $lbConf['servers'] = [ $server ];
                        }
                        if ( !isset( $lbConf['externalClusters'] ) ) {
-                               $lbConf['externalClusters'] = $mainConfig->get( 'ExternalServers' );
+                               $lbConf['externalClusters'] = $options->get( 'ExternalServers' );
                        }
 
                        $serversCheck = $lbConf['servers'];
                } 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' );
+                                       $lbConf['serverTemplate']['schema'] = $options->get( 'DBmwschema' );
                                }
-                               $lbConf['serverTemplate']['sqlMode'] = $mainConfig->get( 'SQLMode' );
+                               $lbConf['serverTemplate']['sqlMode'] = $options->get( 'SQLMode' );
                        }
                        $serversCheck = [ $lbConf['serverTemplate'] ] ?? [];
                }
 
-               self::assertValidServerConfigs( $serversCheck, $mainConfig );
+               self::assertValidServerConfigs( $serversCheck, $options->get( 'DBname' ),
+                       $options->get( 'DBprefix' ) );
 
                $lbConf = self::injectObjectCaches( $lbConf, $srvCace, $mainStash, $wanCache );
 
@@ -138,10 +168,10 @@ abstract class MWLBFactory {
 
        /**
         * @param array $server
-        * @param Config $mainConfig
+        * @param ServiceOptions $options
         * @return array
         */
-       private static function initServerInfo( array $server, Config $mainConfig ) {
+       private static function initServerInfo( array $server, ServiceOptions $options ) {
                if ( $server['type'] === 'sqlite' ) {
                        $httpMethod = $_SERVER['REQUEST_METHOD'] ?? null;
                        // T93097: hint for how file-based databases (e.g. sqlite) should go about locking.
@@ -149,12 +179,12 @@ abstract class MWLBFactory {
                        // See https://www.sqlite.org/lockingv3.html#shared_lock
                        $isHttpRead = in_array( $httpMethod, [ 'GET', 'HEAD', 'OPTIONS', 'TRACE' ] );
                        $server += [
-                               'dbDirectory' => $mainConfig->get( 'SQLiteDataDir' ),
+                               'dbDirectory' => $options->get( 'SQLiteDataDir' ),
                                'trxMode' => $isHttpRead ? 'DEFERRED' : 'IMMEDIATE'
                        ];
                } elseif ( $server['type'] === 'postgres' ) {
                        $server += [
-                               'port' => $mainConfig->get( 'DBport' ),
+                               'port' => $options->get( 'DBport' ),
                                // Work around the reserved word usage in MediaWiki schema
                                'keywordTableMap' => [ 'user' => 'mwuser', 'text' => 'pagecontent' ]
                        ];
@@ -165,25 +195,25 @@ abstract class MWLBFactory {
                        ];
                } elseif ( $server['type'] === 'mssql' ) {
                        $server += [
-                               'port' => $mainConfig->get( 'DBport' ),
-                               'useWindowsAuth' => $mainConfig->get( 'DBWindowsAuthentication' )
+                               'port' => $options->get( 'DBport' ),
+                               'useWindowsAuth' => $options->get( 'DBWindowsAuthentication' )
                        ];
                }
 
                if ( in_array( $server['type'], self::getDbTypesWithSchemas(), true ) ) {
-                       $server += [ 'schema' => $mainConfig->get( 'DBmwschema' ) ];
+                       $server += [ 'schema' => $options->get( 'DBmwschema' ) ];
                }
 
                $flags = DBO_DEFAULT;
-               $flags |= $mainConfig->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0;
+               $flags |= $options->get( 'DebugDumpSql' ) ? DBO_DEBUG : 0;
                if ( $server['type'] === 'oracle' ) {
-                       $flags |= $mainConfig->get( 'DBOracleDRCP' ) ? DBO_PERSISTENT : 0;
+                       $flags |= $options->get( 'DBOracleDRCP' ) ? DBO_PERSISTENT : 0;
                }
 
                $server += [
-                       'tablePrefix' => $mainConfig->get( 'DBprefix' ),
+                       'tablePrefix' => $options->get( 'DBprefix' ),
                        'flags' => $flags,
-                       'sqlMode' => $mainConfig->get( 'SQLMode' ),
+                       'sqlMode' => $options->get( 'SQLMode' ),
                ];
 
                return $server;
@@ -215,12 +245,10 @@ abstract class MWLBFactory {
 
        /**
         * @param array $servers
-        * @param Config $mainConfig
+        * @param string $lbDB Local domain database name
+        * @param string $lbTP Local domain prefix
         */
-       private static function assertValidServerConfigs( array $servers, Config $mainConfig ) {
-               $ldDB = $mainConfig->get( 'DBname' ); // local domain DB
-               $ldTP = $mainConfig->get( 'DBprefix' ); // local domain prefix
-
+       private static function assertValidServerConfigs( array $servers, $ldDB, $ldTP ) {
                foreach ( $servers as $server ) {
                        $type = $server['type'] ?? null;
                        $srvDB = $server['dbname'] ?? null; // server DB
@@ -332,8 +360,17 @@ abstract class MWLBFactory {
                return $class;
        }
 
-       public static function setSchemaAliases( LBFactory $lbFactory, Config $config ) {
-               if ( $config->get( 'DBtype' ) === 'mysql' ) {
+       /**
+        * @param LBFactory $lbFactory
+        * @param string $dbType 'mysql', 'sqlite', etc.
+        */
+       public static function setSchemaAliases( LBFactory $lbFactory, $dbType ) {
+               if ( $dbType instanceof Config ) {
+                       // Before 1.34 this took a whole Config just to get $dbType
+                       wfDeprecated( __METHOD__ . ' with Config argument', '1.34' );
+                       $dbType = $dbType->get( 'DBtype' );
+               }
+               if ( $dbType === 'mysql' ) {
                        /**
                         * When SQLite indexes were introduced in r45764, it was noted that
                         * SQLite requires index names to be unique within the whole database,
index dc73ac9..0e1ee6b 100644 (file)
@@ -79,8 +79,9 @@ trait DeprecationHelper {
                        return $this->$name;
                }
 
-               $qualifiedName = __CLASS__ . '::$' . $name;
-               if ( $this->deprecationHelperGetPropertyOwner( $name ) ) {
+               $ownerClass = $this->deprecationHelperGetPropertyOwner( $name );
+               $qualifiedName = ( $ownerClass ?: get_class( $this ) ) . '::$' . $name;
+               if ( $ownerClass ) {
                        // Someone tried to access a normal non-public property. Try to behave like PHP would.
                        trigger_error( "Cannot access non-public property $qualifiedName", E_USER_ERROR );
                } else {
@@ -99,8 +100,9 @@ trait DeprecationHelper {
                        return;
                }
 
-               $qualifiedName = __CLASS__ . '::$' . $name;
-               if ( $this->deprecationHelperGetPropertyOwner( $name ) ) {
+               $ownerClass = $this->deprecationHelperGetPropertyOwner( $name );
+               $qualifiedName = ( $ownerClass ?: get_class( $this ) ) . '::$' . $name;
+               if ( $ownerClass ) {
                        // Someone tried to access a normal non-public property. Try to behave like PHP would.
                        trigger_error( "Cannot access non-public property $qualifiedName", E_USER_ERROR );
                } else {
@@ -113,22 +115,12 @@ trait DeprecationHelper {
         * Like property_exists but also check for non-visible private properties and returns which
         * class in the inheritance chain declared the property.
         * @param string $property
-        * @return string|bool Best guess for the class in which the property is defined.
+        * @return string|bool Best guess for the class in which the property is defined. False if
+        *   the object does not have such a property.
         */
        private function deprecationHelperGetPropertyOwner( $property ) {
-               // Easy branch: check for protected property / private property of the current class.
-               if ( property_exists( $this, $property ) ) {
-                       // The class name is not necessarily correct here but getting the correct class
-                       // name would be expensive, this will work most of the time and getting it
-                       // wrong is not a big deal.
-                       return __CLASS__;
-               }
-               // property_exists() returns false when the property does exist but is private (and not
-               // defined by the current class, for some value of "current" that differs slightly
-               // between engines).
-               // Since PHP triggers an error on public access of non-public properties but happily
-               // allows public access to undefined properties, we need to detect this case as well.
-               // Reflection is slow so use array cast hack to check for that:
+               // Returning false is a non-error path and should avoid slow checks like reflection.
+               // Use array cast hack instead.
                $obfuscatedProps = array_keys( (array)$this );
                $obfuscatedPropTail = "\0$property";
                foreach ( $obfuscatedProps as $obfuscatedProp ) {
@@ -136,8 +128,9 @@ trait DeprecationHelper {
                        if ( strpos( $obfuscatedProp, $obfuscatedPropTail, 1 ) !== false ) {
                                $classname = substr( $obfuscatedProp, 1, -strlen( $obfuscatedPropTail ) );
                                if ( $classname === '*' ) {
-                                       // sanity; this shouldn't be possible as protected properties were handled earlier
-                                       $classname = __CLASS__;
+                                       // protected property; we didn't get the name, but we are on an error path
+                                       // now so it's fine to use reflection
+                                       return ( new ReflectionProperty( $this, $property ) )->getDeclaringClass()->getName();
                                }
                                return $classname;
                        }
index 2471b52..b5b74fb 100644 (file)
@@ -245,7 +245,7 @@ class TextConflictHelper {
         * @param string $text
         * @return Content
         */
-       public function toEditContent( $text ) {
+       private function toEditContent( $text ) {
                return ContentHandler::makeContent(
                        $text,
                        $this->title,
index 879686f..a723557 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Example class for HTTP accessible external objects.
  * Only supports reading, not storing.
@@ -28,7 +30,8 @@
  */
 class ExternalStoreHttp extends ExternalStoreMedium {
        public function fetchFromURL( $url ) {
-               return Http::get( $url, [], __METHOD__ );
+               return MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                       get( $url, [], __METHOD__ );
        }
 
        public function store( $location, $data ) {
index 346ec8e..2c6f296 100644 (file)
@@ -502,8 +502,9 @@ class ForeignAPIRepo extends FileRepo {
        }
 
        /**
-        * Like a Http:get request, but with custom User-Agent.
-        * @see Http::get
+        * Like a HttpRequestFactory::get request, but with custom User-Agent.
+        * @see HttpRequestFactory::get
+        * @todo Can this use HttpRequestFactory::get() but just pass the 'userAgent' option?
         * @param string $url
         * @param string $timeout
         * @param array $options
index b6c70ab..8047835 100644 (file)
@@ -35,6 +35,9 @@ class RepoGroup {
        /** @var FileRepo[] */
        protected $foreignRepos;
 
+       /** @var WANObjectCache */
+       protected $wanCache;
+
        /** @var bool */
        protected $reposInitialised = false;
 
@@ -47,66 +50,60 @@ class RepoGroup {
        /** @var ProcessCacheLRU */
        protected $cache;
 
-       /** @var RepoGroup */
-       protected static $instance;
-
        /** Maximum number of cache items */
        const MAX_CACHE_SIZE = 500;
 
        /**
-        * Get a RepoGroup instance. At present only one instance of RepoGroup is
-        * needed in a MediaWiki invocation, this may change in the future.
+        * @deprecated since 1.34, use MediaWikiServices::getRepoGroup
         * @return RepoGroup
         */
        static function singleton() {
-               if ( self::$instance ) {
-                       return self::$instance;
-               }
-               global $wgLocalFileRepo, $wgForeignFileRepos;
-               /** @var array $wgLocalFileRepo */
-               self::$instance = new RepoGroup( $wgLocalFileRepo, $wgForeignFileRepos );
-
-               return self::$instance;
+               return MediaWikiServices::getInstance()->getRepoGroup();
        }
 
        /**
-        * Destroy the singleton instance, so that a new one will be created next
-        * time singleton() is called.
+        * @deprecated since 1.34, use MediaWikiTestCase::overrideMwServices() or similar. This will
+        * cause bugs if you don't reset all other services that depend on this one at the same time.
         */
        static function destroySingleton() {
-               self::$instance = null;
+               MediaWikiServices::getInstance()->resetServiceForTesting( 'RepoGroup' );
        }
 
        /**
-        * Set the singleton instance to a given object
-        * Used by extensions which hook into the Repo chain.
-        * It's not enough to just create a superclass ... you have
-        * to get people to call into it even though all they know is RepoGroup::singleton()
-        *
+        * @deprecated since 1.34, use MediaWikiTestCase::setService, this can mess up state of other
+        *   tests
         * @param RepoGroup $instance
         */
        static function setSingleton( $instance ) {
-               self::$instance = $instance;
+               $services = MediaWikiServices::getInstance();
+               $services->disableService( 'RepoGroup' );
+               $services->redefineService( 'RepoGroup',
+                       function () use ( $instance ) {
+                               return $instance;
+                       }
+               );
        }
 
        /**
-        * Construct a group of file repositories.
+        * Construct a group of file repositories. Do not call this -- use
+        * MediaWikiServices::getRepoGroup.
         *
         * @param array $localInfo Associative array for local repo's info
         * @param array $foreignInfo Array of repository info arrays.
         *   Each info array is an associative array with the 'class' member
         *   giving the class name. The entire array is passed to the repository
         *   constructor as the first parameter.
+        * @param WANObjectCache $wanCache
         */
-       function __construct( $localInfo, $foreignInfo ) {
+       function __construct( $localInfo, $foreignInfo, $wanCache ) {
                $this->localInfo = $localInfo;
                $this->foreignInfo = $foreignInfo;
                $this->cache = new MapCacheLRU( self::MAX_CACHE_SIZE );
+               $this->wanCache = $wanCache;
        }
 
        /**
         * Search repositories for an image.
-        * You can also use wfFindFile() to do this.
         *
         * @param Title|string $title Title object or string
         * @param array $options Associative array of options:
@@ -419,8 +416,7 @@ class RepoGroup {
        protected function newRepo( $info ) {
                $class = $info['class'];
 
-               $cache = MediaWikiServices::getInstance()->getMainWANObjectCache();
-               $info['wanCache'] = $cache;
+               $info['wanCache'] = $this->wanCache;
 
                return new $class( $info );
        }
index 7d4f4df..92be7d4 100644 (file)
@@ -2070,7 +2070,8 @@ abstract class File implements IDBAccessObject {
                                $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
                                function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
                                        wfDebug( "Fetching shared description from $renderUrl\n" );
-                                       $res = Http::get( $renderUrl, [], $fname );
+                                       $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                                               get( $renderUrl, [], $fname );
                                        if ( !$res ) {
                                                $ttl = WANObjectCache::TTL_UNCACHEABLE;
                                        }
index 3438a63..e083a4e 100644 (file)
@@ -165,7 +165,8 @@ class ForeignDBFile extends LocalFile {
                        $this->repo->descriptionCacheExpiry ?: $cache::TTL_UNCACHEABLE,
                        function ( $oldValue, &$ttl, array &$setOpts ) use ( $renderUrl, $fname ) {
                                wfDebug( "Fetching shared description from $renderUrl\n" );
-                               $res = Http::get( $renderUrl, [], $fname );
+                               $res = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                                       get( $renderUrl, [], $fname );
                                if ( !$res ) {
                                        $ttl = WANObjectCache::TTL_UNCACHEABLE;
                                }
index aeeb934..99671c0 100644 (file)
@@ -222,15 +222,15 @@ class HTMLForm extends ContextSource {
        protected $mAction = false;
 
        /**
-        * Whether the HTML form can be collapsed
-        * @since 1.33
+        * Whether the form can be collapsed
+        * @since 1.34
         * @var bool
         */
        protected $mCollapsible = false;
 
        /**
-        * Whether the HTML form IS collapsed by default
-        * @since 1.33
+        * Whether the form is collapsed by default
+        * @since 1.34
         * @var bool
         */
        protected $mCollapsed = false;
@@ -1062,14 +1062,15 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Make the form collapsible
-        * @since 1.33
-        * @param bool $collapsed whether it should be by default
-        * @return HTMLForm $this for chaining calls (since 1.20)
+        * Set whether the HTML form can be collapsed.
+        *
+        * @since 1.34
+        * @param bool $collapsedByDefault (optional) whether the form is collapsed by default
+        * @return HTMLForm $this for chaining calls
         */
-       public function setCollapsible( $collapsed = false ) {
+       public function setCollapsibleOptions( $collapsedByDefault = false ) {
                $this->mCollapsible = true;
-               $this->mCollapsed = $collapsed;
+               $this->mCollapsed = $collapsedByDefault;
                return $this;
        }
 
index 22ece4c..baafa5e 100644 (file)
@@ -290,13 +290,13 @@ class OOUIHTMLForm extends HTMLForm {
                                'classes' => $classes,
                                'group' => new OOUI\StackLayout( [
                                        'expanded' => false,
-                                       'classes' => [ 'oo-ui-fieldsetLayout-group mw-collapsible-content' ],
-                                       'items' => [
-                                               new OOUI\Widget( [
-                                                       'content' => new OOUI\HtmlSnippet( $html )
-                                               ] ),
-                                       ],
+                                       'classes' => [ 'mw-collapsible-content' ],
                                ] ),
+                               'items' => [
+                                       new OOUI\Widget( [
+                                               'content' => new OOUI\HtmlSnippet( $html )
+                                       ] ),
+                               ],
                        ] + OOUI\Element::configFromHtmlAttributes( $this->mWrapperAttributes ) );
                } else {
                        $content = new OOUI\HtmlSnippet( $html );
index 93f5363..be8f7d8 100644 (file)
@@ -59,7 +59,7 @@ class HTMLFormFieldWithButton extends HTMLFormField {
                        'type' => $this->mButtonType,
                        'label' => $this->mButtonValue,
                        'flags' => $this->mButtonFlags,
-                       'id' => $this->mButtonId,
+                       'id' => $this->mButtonId ?: null,
                ] + OOUI\Element::configFromHtmlAttributes(
                        $this->getAttributes( [ 'disabled', 'tabindex' ] )
                ) );
index 8ef9cc2..5130e36 100644 (file)
@@ -27,6 +27,18 @@ class CurlHttpRequest extends MWHttpRequest {
        protected $curlOptions = [];
        protected $headerText = "";
 
+       /**
+        * @throws RuntimeException
+        */
+       public function __construct() {
+               if ( !function_exists( 'curl_init' ) ) {
+                       throw new RuntimeException(
+                               __METHOD__ . ': curl (https://www.php.net/curl) is not installed' );
+               }
+
+               parent::__construct( ...func_get_args() );
+       }
+
        /**
         * @param resource $fh
         * @param string $content
index e6b2892..3af7f56 100644 (file)
@@ -45,7 +45,7 @@ class GuzzleHttpRequest extends MWHttpRequest {
 
        /**
         * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
-        * @param array $options (optional) extra params to pass (see Http::request())
+        * @param array $options (optional) extra params to pass (see HttpRequestFactory::create())
         * @param string $caller The method making this request, for profiling
         * @param Profiler|null $profiler An instance of the profiler for profiling, or null
         * @throws Exception
index f0972dc..9596169 100644 (file)
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * Various HTTP related functions
+ * @deprecated since 1.34
  * @ingroup HTTP
  */
 class Http {
-       public static $httpEngine = false;
+       /** @deprecated since 1.34, just use the default engine */
+       public static $httpEngine = null;
 
        /**
         * Perform an HTTP request
         *
+        * @deprecated since 1.34, use HttpRequestFactory::request()
+        *
         * @param string $method HTTP method. Usually GET/POST
         * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http:// URL
-        * @param array $options Options to pass to MWHttpRequest object.
-        *      Possible keys for the array:
-        *    - timeout             Timeout length in seconds
-        *    - connectTimeout      Timeout for connection, in seconds (curl only)
-        *    - postData            An array of key-value pairs or a url-encoded form data
-        *    - proxy               The proxy to use.
-        *                          Otherwise it will use $wgHTTPProxy (if set)
-        *                          Otherwise it will use the environment variable "http_proxy" (if set)
-        *    - noProxy             Don't use any proxy at all. Takes precedence over proxy value(s).
-        *    - sslVerifyHost       Verify hostname against certificate
-        *    - sslVerifyCert       Verify SSL certificate
-        *    - caInfo              Provide CA information
-        *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
-        *    - followRedirects     Whether to follow redirects (defaults to false).
-        *                          Note: this should only be used when the target URL is trusted,
-        *                          to avoid attacks on intranet services accessible by HTTP.
-        *    - userAgent           A user agent, if you want to override the default
-        *                          MediaWiki/$wgVersion
-        *    - logger              A \Psr\Logger\LoggerInterface instance for debug logging
-        *    - username            Username for HTTP Basic Authentication
-        *    - password            Password for HTTP Basic Authentication
-        *    - originalRequest     Information about the original request (as a WebRequest object or
-        *                          an associative array with 'ip' and 'userAgent').
+        * @param array $options Options to pass to MWHttpRequest object. See HttpRequestFactory::create
+        *  docs
         * @param string $caller The method making this request, for profiling
         * @return string|bool (bool)false on failure or a string on success
         */
        public static function request( $method, $url, array $options = [], $caller = __METHOD__ ) {
-               $logger = LoggerFactory::getInstance( 'http' );
-               $logger->debug( "$method: $url" );
-
-               $options['method'] = strtoupper( $method );
-
-               if ( !isset( $options['timeout'] ) ) {
-                       $options['timeout'] = 'default';
-               }
-               if ( !isset( $options['connectTimeout'] ) ) {
-                       $options['connectTimeout'] = 'default';
-               }
-
-               $req = MWHttpRequest::factory( $url, $options, $caller );
-               $status = $req->execute();
-
-               if ( $status->isOK() ) {
-                       return $req->getContent();
-               } else {
-                       $errors = $status->getErrorsByType( 'error' );
-                       $logger->warning( Status::wrap( $status )->getWikiText( false, false, 'en' ),
-                               [ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
-                       return false;
-               }
+               $ret = MediaWikiServices::getInstance()->getHttpRequestFactory()->request(
+                       $method, $url, $options, $caller );
+               return is_string( $ret ) ? $ret : false;
        }
 
        /**
         * Simple wrapper for Http::request( 'GET' )
-        * @see Http::request()
+        *
+        * @deprecated since 1.34, use HttpRequestFactory::get()
+        *
         * @since 1.25 Second parameter $timeout removed. Second parameter
         * is now $options which can be given a 'timeout'
         *
@@ -111,7 +77,8 @@ class Http {
 
        /**
         * Simple wrapper for Http::request( 'POST' )
-        * @see Http::request()
+        *
+        * @deprecated since 1.34, use HttpRequestFactory::post()
         *
         * @param string $url
         * @param array $options
@@ -124,11 +91,12 @@ class Http {
 
        /**
         * A standard user-agent we can use for external requests.
+        *
+        * @deprecated since 1.34, use HttpRequestFactory::getUserAgent()
         * @return string
         */
        public static function userAgent() {
-               global $wgVersion;
-               return "MediaWiki/$wgVersion";
+               return MediaWikiServices::getInstance()->getHttpRequestFactory()->getUserAgent();
        }
 
        /**
@@ -143,37 +111,37 @@ class Http {
         *
         * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
         *
+        * @deprecated since 1.34, use MWHttpRequest::isValidURI
         * @param string $uri URI to check for validity
         * @return bool
         */
        public static function isValidURI( $uri ) {
-               return (bool)preg_match(
-                       '/^https?:\/\/[^\/\s]\S*$/D',
-                       $uri
-               );
+               return MWHttpRequest::isValidURI( $uri );
        }
 
        /**
         * Gets the relevant proxy from $wgHTTPProxy
         *
-        * @return mixed The proxy address or an empty string if not set.
+        * @deprecated since 1.34, use $wgHTTPProxy directly
+        * @return string The proxy address or an empty string if not set.
         */
        public static function getProxy() {
-               global $wgHTTPProxy;
+               wfDeprecated( __METHOD__, '1.34' );
 
-               if ( $wgHTTPProxy ) {
-                       return $wgHTTPProxy;
-               }
-
-               return "";
+               global $wgHTTPProxy;
+               return (string)$wgHTTPProxy;
        }
 
        /**
         * Get a configured MultiHttpClient
+        *
+        * @deprecated since 1.34, construct it directly
         * @param array $options
         * @return MultiHttpClient
         */
        public static function createMultiClient( array $options = [] ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
                global $wgHTTPConnectTimeout, $wgHTTPTimeout, $wgHTTPProxy;
 
                return new MultiHttpClient( $options + [
index f155348..08520b7 100644 (file)
 namespace MediaWiki\Http;
 
 use CurlHttpRequest;
-use DomainException;
+use GuzzleHttpRequest;
 use Http;
 use MediaWiki\Logger\LoggerFactory;
 use MWHttpRequest;
 use PhpHttpRequest;
 use Profiler;
-use GuzzleHttpRequest;
+use RuntimeException;
+use Status;
 
 /**
  * Factory creating MWHttpRequest objects.
  */
 class HttpRequestFactory {
-
        /**
         * Generate a new MWHttpRequest object
         * @param string $url Url to use
-        * @param array $options (optional) extra params to pass (see Http::request())
+        * @param array $options Possible keys for the array:
+        *    - timeout             Timeout length in seconds
+        *    - connectTimeout      Timeout for connection, in seconds (curl only)
+        *    - postData            An array of key-value pairs or a url-encoded form data
+        *    - proxy               The proxy to use.
+        *                          Otherwise it will use $wgHTTPProxy (if set)
+        *                          Otherwise it will use the environment variable "http_proxy" (if set)
+        *    - noProxy             Don't use any proxy at all. Takes precedence over proxy value(s).
+        *    - sslVerifyHost       Verify hostname against certificate
+        *    - sslVerifyCert       Verify SSL certificate
+        *    - caInfo              Provide CA information
+        *    - maxRedirects        Maximum number of redirects to follow (defaults to 5)
+        *    - followRedirects     Whether to follow redirects (defaults to false).
+        *                          Note: this should only be used when the target URL is trusted,
+        *                          to avoid attacks on intranet services accessible by HTTP.
+        *    - userAgent           A user agent, if you want to override the default
+        *                          MediaWiki/$wgVersion
+        *    - logger              A \Psr\Logger\LoggerInterface instance for debug logging
+        *    - username            Username for HTTP Basic Authentication
+        *    - password            Password for HTTP Basic Authentication
+        *    - originalRequest     Information about the original request (as a WebRequest object or
+        *                          an associative array with 'ip' and 'userAgent').
         * @param string $caller The method making this request, for profiling
-        * @throws DomainException
+        * @throws RuntimeException
         * @return MWHttpRequest
         * @see MWHttpRequest::__construct
         */
        public function create( $url, array $options = [], $caller = __METHOD__ ) {
                if ( !Http::$httpEngine ) {
                        Http::$httpEngine = 'guzzle';
-               } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
-                       throw new DomainException( __METHOD__ . ': curl (https://www.php.net/curl) is not ' .
-                          'installed, but Http::$httpEngine is set to "curl"' );
                }
 
                if ( !isset( $options['logger'] ) ) {
@@ -60,16 +78,9 @@ class HttpRequestFactory {
                        case 'curl':
                                return new CurlHttpRequest( $url, $options, $caller, Profiler::instance() );
                        case 'php':
-                               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
-                                       throw new DomainException( __METHOD__ . ': allow_url_fopen ' .
-                                          'needs to be enabled for pure PHP http requests to ' .
-                                          'work. If possible, curl should be used instead. See ' .
-                                          'https://www.php.net/curl.'
-                                       );
-                               }
                                return new PhpHttpRequest( $url, $options, $caller, Profiler::instance() );
                        default:
-                               throw new DomainException( __METHOD__ . ': The setting of Http::$httpEngine is not valid.' );
+                               throw new RuntimeException( __METHOD__ . ': The requested engine is not valid.' );
                }
        }
 
@@ -82,4 +93,75 @@ class HttpRequestFactory {
                return function_exists( 'curl_init' ) || wfIniGetBool( 'allow_url_fopen' );
        }
 
+       /**
+        * Perform an HTTP request
+        *
+        * @since 1.34
+        * @param string $method HTTP method. Usually GET/POST
+        * @param string $url Full URL to act on. If protocol-relative, will be expanded to an http://
+        *  URL
+        * @param array $options See HttpRequestFactory::create
+        * @param string $caller The method making this request, for profiling
+        * @return string|null null on failure or a string on success
+        */
+       public function request( $method, $url, array $options = [], $caller = __METHOD__ ) {
+               $logger = LoggerFactory::getInstance( 'http' );
+               $logger->debug( "$method: $url" );
+
+               $options['method'] = strtoupper( $method );
+
+               if ( !isset( $options['timeout'] ) ) {
+                       $options['timeout'] = 'default';
+               }
+               if ( !isset( $options['connectTimeout'] ) ) {
+                       $options['connectTimeout'] = 'default';
+               }
+
+               $req = $this->create( $url, $options, $caller );
+               $status = $req->execute();
+
+               if ( $status->isOK() ) {
+                       return $req->getContent();
+               } else {
+                       $errors = $status->getErrorsByType( 'error' );
+                       $logger->warning( Status::wrap( $status )->getWikiText( false, false, 'en' ),
+                               [ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
+                       return null;
+               }
+       }
+
+       /**
+        * Simple wrapper for request( 'GET' ), parameters have same meaning as for request()
+        *
+        * @since 1.34
+        * @param string $url
+        * @param array $options
+        * @param string $caller
+        * @return string|null
+        */
+       public function get( $url, array $options = [], $caller = __METHOD__ ) {
+               $this->request( 'GET', $url, $options, $caller );
+       }
+
+       /**
+        * Simple wrapper for request( 'POST' ), parameters have same meaning as for request()
+        *
+        * @since 1.34
+        * @param string $url
+        * @param array $options
+        * @param string $caller
+        * @return string|null
+        */
+       public function post( $url, array $options = [], $caller = __METHOD__ ) {
+               $this->request( 'POST', $url, $options, $caller );
+       }
+
+       /**
+        * @return string
+        */
+       public function getUserAgent() {
+               global $wgVersion;
+
+               return "MediaWiki/$wgVersion";
+       }
 }
index b4ac9a7..41ea1dc 100644 (file)
@@ -85,7 +85,7 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
 
        /**
         * @param string $url Url to use. If protocol-relative, will be expanded to an http:// URL
-        * @param array $options (optional) extra params to pass (see Http::request())
+        * @param array $options (optional) extra params to pass (see HttpRequestFactory::create())
         * @param string $caller The method making this request, for profiling
         * @param Profiler|null $profiler An instance of the profiler for profiling, or null
         * @throws Exception
@@ -172,9 +172,9 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
 
        /**
         * Generate a new request object
-        * Deprecated: @see HttpRequestFactory::create
+        * @deprecated since 1.34, use HttpRequestFactory instead
         * @param string $url Url to use
-        * @param array|null $options (optional) extra params to pass (see Http::request())
+        * @param array|null $options (optional) extra params to pass (see HttpRequestFactory::create())
         * @param string $caller The method making this request, for profiling
         * @throws DomainException
         * @return MWHttpRequest
@@ -224,7 +224,8 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
                if ( self::isLocalURL( $this->url ) || $this->noProxy ) {
                        $this->proxy = '';
                } else {
-                       $this->proxy = Http::getProxy();
+                       global $wgHTTPProxy;
+                       $this->proxy = (string)$wgHTTPProxy;
                }
        }
 
@@ -662,4 +663,27 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
                $this->reqHeaders['X-Forwarded-For'] = $originalRequest['ip'];
                $this->reqHeaders['X-Original-User-Agent'] = $originalRequest['userAgent'];
        }
+
+       /**
+        * Check that the given URI is a valid one.
+        *
+        * This hardcodes a small set of protocols only, because we want to
+        * deterministically reject protocols not supported by all HTTP-transport
+        * methods.
+        *
+        * "file://" specifically must not be allowed, for security reasons
+        * (see <https://www.mediawiki.org/wiki/Special:Code/MediaWiki/r67684>).
+        *
+        * @todo FIXME this is wildly inaccurate and fails to actually check most stuff
+        *
+        * @since 1.34
+        * @param string $uri URI to check for validity
+        * @return bool
+        */
+       public static function isValidURI( $uri ) {
+               return (bool)preg_match(
+                       '/^https?:\/\/[^\/\s]\S*$/D',
+                       $uri
+               );
+       }
 }
index d2af8c8..c987c62 100644 (file)
@@ -22,6 +22,17 @@ class PhpHttpRequest extends MWHttpRequest {
 
        private $fopenErrors = [];
 
+       public function __construct() {
+               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
+                       throw new RuntimeException( __METHOD__ . ': allow_url_fopen needs to be enabled for ' .
+                               'pure PHP http requests to work. If possible, curl should be used instead. See ' .
+                               'https://www.php.net/curl.'
+                       );
+               }
+
+               parent::__construct( ...func_get_args() );
+       }
+
        /**
         * @param string $url
         * @return string
index ebac200..e6936cb 100644 (file)
@@ -112,7 +112,7 @@ class ImportStreamSource implements ImportSource {
                # quicker and sorts out user-agent problems which might
                # otherwise prevent importing from large sites, such
                # as the Wikimedia cluster, etc.
-               $data = Http::request(
+               $data = MediaWikiServices::getInstance()->getHttpRequestFactory()->request(
                        $method,
                        $url,
                        [
index 4b378c1..f1ac42c 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use Psr\Log\LoggerInterface;
 
 /**
@@ -159,7 +160,8 @@ class ImportableUploadRevisionImporter implements UploadRevisionImporter {
 
                // @todo FIXME!
                $src = $wikiRevision->getSrc();
-               $data = Http::get( $src, [], __METHOD__ );
+               $data = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                       get( $src, [], __METHOD__ );
                if ( !$data ) {
                        $this->logger->debug( "IMPORT: couldn't fetch source $src\n" );
                        fclose( $f );
index 9053f8d..c231288 100644 (file)
@@ -1203,9 +1203,11 @@ abstract class Installer {
                                }
 
                                try {
-                                       $text = Http::get( $url . $file, [ 'timeout' => 3 ], __METHOD__ );
+                                       $text = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                                               get( $url . $file, [ 'timeout' => 3 ], __METHOD__ );
                                } catch ( Exception $e ) {
-                                       // Http::get throws with allow_url_fopen = false and no curl extension.
+                                       // HttpRequestFactory::get can throw with allow_url_fopen = false and no curl
+                                       // extension.
                                        $text = null;
                                }
                                unlink( $dir . $file );
index c3b3181..b7a4e06 100644 (file)
@@ -25,9 +25,9 @@
        "config-upgrade-key-missing": "Έχει εντοπιστεί μια υπάρχουσα εγκατάσταση του MediaWiki.\nΓια να αναβαθμίσετε αυτήν την εγκατάσταση, παρακαλούμε να βάλετε την ακόλουθη γραμμή στο κάτω μέρος του <code>LocalSettings.php</code> σας:\n\n$1",
        "config-localsettings-incomplete": "Το υπάρχον <code>LocalSettings.php</code> φαίνεται να είναι ελλιπές.\nΤο $1 μεταβλητή δεν έχει οριστεί.\nΠαρακαλούμε να αλλάξετε  το <code>LocalSettings.php</code> έτσι ώστε αυτή η μεταβλητή έχει οριστεί, και κάντε κλικ στο \"{{int:Config-continue}}\".",
        "config-localsettings-connection-error": "Ένα σφάλμα παρουσιάστηκε κατά τη σύνδεση με τη βάση δεδομένων και με τη χρήση των ρυθμίσεων που ορίστηκαν στο <code>LocalSettings.php</code>. Παρακαλούμε διορθώστε αυτές τις ρυθμίσεις και δοκιμάστε ξανά.\n\n$1",
-       "config-session-error": "ΣÏ\86άλμα ÎºÎ±Ï\84ά Ï\84ην ÎµÎºÎºÎ¯Î½Î·Ï\83η Ï\83Ï\85νεδÏ\81ίας: $1",
-       "config-session-expired": "Τα Î´ÎµÎ´Î¿Î¼Î­Î½Î± Ï\83Ï\85νÏ\8cδοÏ\85 Ï\86αίνεÏ\84αι Î½Î± Î­Ï\87οÏ\85ν Î»Î®Î¾ÎµÎ¹.\nΣÏ\85νεδÏ\81ίεÏ\82 Î­Ï\87οÏ\85ν Ï\81Ï\85θμιÏ\83Ï\84εί Î³Î¹Î± Î¼Î¹Î± Î´Î¹Î¬Ï\81κεια Î¶Ï\89ήÏ\82 $1.\nÎ\9cÏ\80οÏ\81είÏ\84ε Î½Î± Î±Ï\85ξήÏ\83εÏ\84ε Î±Ï\85Ï\84Ï\8c Î²Î¬Î¶Î¿Î½Ï\84αÏ\82  <code>session.gc_maxlifetime</code> στο php.ini.\nΚάντε επανεκκίνηση της διαδικασίας εγκατάστασης.",
-       "config-no-session": "Î\97 Ï\83Ï\85νεδÏ\81ία Î´ÎµÎ´Î¿Î¼Î­Î½Ï\89ν Ï\83αÏ\82 Î­Ï\87ει Ï\87αθεί!Î\95λέγξÏ\84ε Ï\84ο Î±Ï\81Ï\87είο php.ini ÎºÎ±Î¹ Î²ÎµÎ²Î±Î¹Ï\89θείÏ\84ε Ï\8cÏ\84ι Ï\84ο <code>session.save_path</code> Î­Ï\87ει Î¼Ï\80ει στον κατάλληλο κατάλογο.",
+       "config-session-error": "ΣÏ\86άλμα ÎºÎ±Ï\84ά Ï\84ην ÎµÎºÎºÎ¯Î½Î·Ï\83η Ï\84ηÏ\82 Ï\80εÏ\81ιÏ\8cδοÏ\85 Ï\83Ï\8dνδεÏ\83ης: $1",
+       "config-session-expired": "Τα Î´ÎµÎ´Î¿Î¼Î­Î½Î± Ï\84ηÏ\82 Ï\80εÏ\81ιÏ\8cδοÏ\85 Ï\83Ï\8dνδεÏ\83ηÏ\82 Ï\86αίνεÏ\84αι Î½Î± Î­Ï\87οÏ\85ν Î»Î®Î¾ÎµÎ¹.\nÎ\9fι Ï\80εÏ\81ίοδοι Ï\83Ï\8dνδεÏ\83ηÏ\82 ÎµÎ¯Î½Î±Î¹ Ï\81Ï\85θμιÏ\83μένεÏ\82 Î³Î¹Î± Î´Î¹Î¬Ï\81κεια Î¶Ï\89ήÏ\82 $1.\nÎ\9cÏ\80οÏ\81είÏ\84ε Î½Î± Ï\84ην Î±Ï\85ξήÏ\83εÏ\84ε Î¸Î­Ï\84ονÏ\84αÏ\82 Ï\84ο <code>session.gc_maxlifetime</code> στο php.ini.\nΚάντε επανεκκίνηση της διαδικασίας εγκατάστασης.",
+       "config-no-session": "Τα Î´ÎµÎ´Î¿Î¼Î­Î½Î± Ï\84ηÏ\82 Ï\80εÏ\81ιÏ\8cδοÏ\85 Ï\83Ï\8dνδεÏ\83ήÏ\82 Ï\83αÏ\82 Î­Ï\87οÏ\85ν Ï\87αθεί!\nÎ\95λέγξÏ\84ε Ï\84ο php.ini Ï\83αÏ\82 ÎºÎ±Î¹ Î²ÎµÎ²Î±Î¹Ï\89θείÏ\84ε Ï\8cÏ\84ι Ï\84ο <code>session.save_path</code> Î­Ï\87ει Î¿Ï\81ιÏ\83Ï\84εί στον κατάλληλο κατάλογο.",
        "config-your-language": "Η γλώσσα σας:",
        "config-your-language-help": "Επιλέξτε μία γλώσσα για τη διαδικασία της εγκατάστασης.",
        "config-wiki-language": "Γλώσσα του wiki:",
index e6936f6..8bf48d8 100644 (file)
        "config-license-help": "Multe wikis public pone tote le contributiones sub un [https://freedomdefined.org/Definition/Ia?uselang=ia licentia libere].\nIsto adjuta a crear un senso de proprietate communitari e incoragia le contribution in longe termino.\nIsto non es generalmente necessari pro un wiki private o de interprisa.\n\nSi tu vole poter usar texto de Wikipedia, e si tu vole que Wikipedia pote acceptar texto copiate de tu wiki, tu debe seliger <strong>{{int:config-license-cc-by-sa}}</strong>.\n\nWikipedia usava anteriormente le Licentia GNU pro Documentation Libere (GFDL).\nIste es un licentia valide, ma es difficile a comprender.\nIl es anque difficile reusar le contento licentiate sub GFDL.",
        "config-email-settings": "Configuration de e-mail",
        "config-enable-email": "Activar le e-mail sortiente",
-       "config-enable-email-help": "Si tu vole que e-mail functiona, [Config-dbsupport-oracle/manual/en/mail.configuration.php le optiones de e-mail de PHP] debe esser configurate correctemente.\nSi tu non vole functiones de e-mail, tu pote disactivar los hic.",
+       "config-enable-email-help": "Si tu vole que e-mail functiona, [https://www.php.net/manual/en/mail.configuration.php le optiones de e-mail de PHP] debe esser configurate correctemente.\nSi tu non vole functiones de e-mail, tu pote disactivar los hic.",
        "config-email-user": "Activar le e-mail de usator a usator",
        "config-email-user-help": "Permitter a tote le usatores de inviar e-mail inter se, si illes lo ha activate in lor preferentias.",
        "config-email-usertalk": "Activar notification de cambios in paginas de discussion de usatores",
index 58cfe86..8297dd8 100644 (file)
        "config-install-done": "<strong>Поздравляем!</strong>\nВы установили MediaWiki.\n\nВо время установки был создан файл <code>LocalSettings.php</code>.\nОн содержит все ваши настройки.\n\nВам необходимо скачать его и положить в корневую директорию вашей вики (ту же директорию, где находится файл index.php). Его загрузка должна начаться автоматически.\n\nЕсли автоматическая загрузка не началась или вы её отменили, вы можете скачать по ссылке ниже:\n\n$3\n\n<strong>Примечание</strong>: Если вы не сделаете этого сейчас, то сгенерированный файл конфигурации не будет доступен вам в дальнейшем, если вы выйдете из установки, не скачивая его.\n\nПо окончании действий, описанных выше, вы сможете <strong>[$2 войти в вашу вики]</strong>.",
        "config-install-done-path": "<strong>Поздравляем!</strong>\nВы установили MediaWiki.\n\nВо время установки был создан файл <code>LocalSettings.php</code>.\nОн содержит все ваши настройки.\n\nВам необходимо скачать его и положить в <code>$4</code>. Его загрузка должна начаться автоматически.\n\nЕсли автоматическая загрузка не началась или вы её отменили, вы можете скачать по ссылке ниже:\n\n$3\n\n<strong>Примечание</strong>: Если вы не сделаете этого сейчас, то сгенерированный файл конфигурации не будет доступен вам в дальнейшем, если вы выйдете из установки, не скачивая его.\n\nПо окончании действий, описанных выше, вы сможете <strong>[$2 войти в вашу вики]</strong>.",
        "config-install-success": "MediaWiki успешно установлена. Сейчас вы можете перейти на <$1 $2>, чтобы просмотреть свою вики.\nЕсли у вас есть вопросы, ознакомьтесь с нашим часто задаваемыми вопросами:\n<https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ> или используйте один из форумов поддержки, указанный на этой странице.",
+       "config-install-db-success": "База данных была успешно настроена",
        "config-download-localsettings": "Загрузить <code>LocalSettings.php</code>",
        "config-help": "справка",
        "config-help-tooltip": "нажмите, чтобы развернуть",
index 89c4780..3ba7928 100644 (file)
        "config-type-oracle": "Oracle",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki подржава следеће системе база података:\n\n$1\n\nАко не видите систем који покушавате да користите на листи испод, онда пратите повезана упутства изнад како бисте омогућили подршку.",
-       "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] је примарна мета за MediaWiki и најбоље је подржана. MediaWiki такође ради са [{{int:version-db-mysql-url}} MySQL-ом] и [{{int:version-db-percona-url}} Percona Server-ом], који су компатибилни са MariaDB-ом. ([https://www.php.net/manual/en/mysqli.installation.php Како компајлирати PHP са подршком MySQL-а])",
+       "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] је примарна мета за Медијавики и најбоље је подржана. Медијавики ради и са [{{int:version-db-mysql-url}} MySQL-ом] и [{{int:version-db-percona-url}} Percona Server-ом], који су компатибилни са MariaDB-ом. ([https://www.php.net/manual/en/mysqli.installation.php Како компајлирати PHP са подршком MySQL-а])",
        "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] је популаран систем база података отвореног кода кaо алтернатива MySQL-у. ([https://www.php.net/manual/en/pgsql.installation.php Како компајлирати PHP са подршком PostgreSQL-а])",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] је лаган систем базе података који је веома добро подржан. ([https://www.php.net/manual/en/pdo.installation.php Како компајлирати PHP са подршком SQLite-а], користи PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] је база података комерцијалних предузећа. ([https://www.php.net/manual/en/oci8.installation.php Како компајлирати PHP са подршком OCI8-а])",
index 6054e35..d2f1dbc 100644 (file)
@@ -70,14 +70,19 @@ abstract class Job implements RunnableJob {
                        // Backwards compatibility for old signature ($command, $title, $params)
                        $title = $params;
                        $params = func_num_args() >= 3 ? func_get_arg( 2 ) : [];
+               } elseif ( isset( $params['namespace'] ) && isset( $params['title'] ) ) {
+                       // Handle job classes that take title as constructor parameter.
+                       // If a newer classes like GenericParameterJob uses these parameters,
+                       // then this happens in Job::__construct instead.
+                       $title = Title::makeTitle( $params['namespace'], $params['title'] );
                } else {
-                       $title = ( isset( $params['namespace'] ) && isset( $params['title'] ) )
-                               ? Title::makeTitle( $params['namespace'], $params['title'] )
-                               : Title::makeTitle( NS_SPECIAL, '' );
+                       // Default title for job classes not implementing GenericParameterJob.
+                       // This must be a valid title because it not directly passed to
+                       // our Job constructor, but rather it's subclasses which may expect
+                       // to be able to use it.
+                       $title = Title::makeTitle( NS_SPECIAL, 'Blankpage' );
                }
 
-               $params = is_array( $params ) ? $params : []; // sanity
-
                if ( isset( $wgJobClasses[$command] ) ) {
                        $handler = $wgJobClasses[$command];
 
@@ -114,25 +119,35 @@ abstract class Job implements RunnableJob {
                        // Backwards compatibility for old signature ($command, $title, $params)
                        $title = $params;
                        $params = func_num_args() >= 3 ? func_get_arg( 2 ) : [];
-                       $params = is_array( $params ) ? $params : []; // sanity
-                       // Set namespace/title params if both are missing and this is not a dummy title
-                       if (
-                               $title->getDBkey() !== '' &&
-                               !isset( $params['namespace'] ) &&
-                               !isset( $params['title'] )
-                       ) {
-                               $params['namespace'] = $title->getNamespace();
-                               $params['title'] = $title->getDBKey();
-                               // Note that JobQueue classes will prefer the parameters over getTitle()
-                               $this->title = $title;
-                       }
+               } else {
+                       // Newer jobs may choose to not have a top-level title (e.g. GenericParameterJob)
+                       $title = null;
+               }
+
+               if ( !is_array( $params ) ) {
+                       throw new InvalidArgumentException( '$params must be an array' );
+               }
+
+               if (
+                       $title &&
+                       !isset( $params['namespace'] ) &&
+                       !isset( $params['title'] )
+               ) {
+                       // When constructing this class for submitting to the queue,
+                       // normalise the $title arg of old job classes as part of $params.
+                       $params['namespace'] = $title->getNamespace();
+                       $params['title'] = $title->getDBKey();
                }
 
                $this->command = $command;
                $this->params = $params + [ 'requestId' => WebRequest::getRequestId() ];
+
                if ( $this->title === null ) {
+                       // Set this field for access via getTitle().
                        $this->title = ( isset( $params['namespace'] ) && isset( $params['title'] ) )
                                ? Title::makeTitle( $params['namespace'], $params['title'] )
+                               // GenericParameterJob classes without namespace/title params
+                               // should not use getTitle(). Set an invalid title as placeholder.
                                : Title::makeTitle( NS_SPECIAL, '' );
                }
        }
index 47ee588..7c78f40 100644 (file)
@@ -91,7 +91,7 @@ class JobQueueDB extends JobQueue {
                                'job', '1', [ 'job_cmd' => $this->type, 'job_token' => '' ], __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return !$found;
@@ -118,7 +118,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                $this->cache->set( $key, $size, self::CACHE_TTL_SHORT );
 
@@ -150,7 +150,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                $this->cache->set( $key, $count, self::CACHE_TTL_SHORT );
 
@@ -187,7 +187,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                $this->cache->set( $key, $count, self::CACHE_TTL_SHORT );
@@ -281,7 +281,7 @@ class JobQueueDB extends JobQueue {
                                count( $rowSet ) + count( $rowList ) - count( $rows )
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                if ( $flags & self::QOS_ATOMIC ) {
                        $dbw->endAtomic( $method );
@@ -316,12 +316,7 @@ class JobQueueDB extends JobQueue {
                                $this->incrStats( 'pops', $this->type );
 
                                // Get the job object from the row...
-                               $params = self::extractBlob( $row->job_params );
-                               $params = is_array( $params ) ? $params : []; // sanity
-                               $params += [ 'namespace' => $row->job_namespace, 'title' => $row->job_title ];
-                               $job = $this->factoryJob( $row->job_cmd, $params );
-                               $job->setMetadata( 'id', $row->job_id );
-                               $job->setMetadata( 'timestamp', $row->job_timestamp );
+                               $job = $this->jobFromRow( $row );
                                break; // done
                        } while ( true );
 
@@ -331,7 +326,7 @@ class JobQueueDB extends JobQueue {
                                $this->recycleAndDeleteStaleJobs();
                        }
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return $job;
@@ -352,7 +347,6 @@ class JobQueueDB extends JobQueue {
                // Check cache to see if the queue has <= OFFSET items
                $tinyQueue = $this->cache->get( $this->getCacheKey( 'small' ) );
 
-               $row = false; // the row acquired
                $invertedDirection = false; // whether one job_random direction was already scanned
                // This uses a replication safe method for acquiring jobs. One could use UPDATE+LIMIT
                // instead, but that either uses ORDER BY (in which case it deadlocks in MySQL) or is
@@ -505,7 +499,7 @@ class JobQueueDB extends JobQueue {
 
                        $this->incrStats( 'acks', $this->type );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
        }
 
@@ -560,7 +554,7 @@ class JobQueueDB extends JobQueue {
                try {
                        $dbw->delete( 'job', [ 'job_cmd' => $this->type ] );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return true;
@@ -619,22 +613,11 @@ class JobQueueDB extends JobQueue {
                        return new MappedIterator(
                                $dbr->select( 'job', self::selectFields(), $conds ),
                                function ( $row ) {
-                                       $params = strlen( $row->job_params ) ? unserialize( $row->job_params ) : [];
-                                       $params = is_array( $params ) ? $params : []; // sanity
-                                       $params += [
-                                               'namespace' => $row->job_namespace,
-                                               'title' => $row->job_title
-                                       ];
-
-                                       $job = $this->factoryJob( $row->job_cmd, $params );
-                                       $job->setMetadata( 'id', $row->job_id );
-                                       $job->setMetadata( 'timestamp', $row->job_timestamp );
-
-                                       return $job;
+                                       return $this->jobFromRow( $row );
                                }
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
        }
 
@@ -764,7 +747,7 @@ class JobQueueDB extends JobQueue {
 
                        $dbw->unlock( "jobqueue-recycle-{$this->type}", __METHOD__ );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return $count;
@@ -895,23 +878,30 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param string $blob
-        * @return bool|mixed
+        * @param stdClass $row
+        * @return RunnableJob|null
         */
-       protected static function extractBlob( $blob ) {
-               if ( (string)$blob !== '' ) {
-                       return unserialize( $blob );
-               } else {
-                       return false;
+       protected function jobFromRow( $row ) {
+               $params = ( (string)$row->job_params !== '' ) ? unserialize( $row->job_params ) : [];
+               if ( !is_array( $params ) ) { // this shouldn't happen
+                       throw new UnexpectedValueException(
+                               "Could not unserialize job with ID '{$row->job_id}'." );
                }
+
+               $params += [ 'namespace' => $row->job_namespace, 'title' => $row->job_title ];
+               $job = $this->factoryJob( $row->job_cmd, $params );
+               $job->setMetadata( 'id', $row->job_id );
+               $job->setMetadata( 'timestamp', $row->job_timestamp );
+
+               return $job;
        }
 
        /**
         * @param DBError $e
-        * @throws JobQueueError
+        * @return JobQueueError
         */
-       protected function throwDBException( DBError $e ) {
-               throw new JobQueueError( get_class( $e ) . ": " . $e->getMessage() );
+       protected function getDBException( DBError $e ) {
+               return new JobQueueError( get_class( $e ) . ": " . $e->getMessage() );
        }
 
        /**
index 8864688..2140043 100644 (file)
@@ -639,7 +639,7 @@ LUA;
                        }
                        $item = $this->unserialize( $data );
                        if ( !is_array( $item ) ) { // this shouldn't happen
-                               throw new UnexpectedValueException( "Could not find job with ID '$uid'." );
+                               throw new UnexpectedValueException( "Could not unserialize job with ID '$uid'." );
                        }
 
                        $params = $item['params'];
index 8cc14e5..9b08510 100644 (file)
@@ -19,6 +19,8 @@
  * @ingroup JobQueue
  */
 
+use MediaWiki\Linker\LinkTarget;
+
 /**
  * Job for updating user activity like "last viewed" timestamps
  *
@@ -32,7 +34,9 @@
  * @since 1.26
  */
 class ActivityUpdateJob extends Job {
-       function __construct( Title $title, array $params ) {
+       function __construct( LinkTarget $title, array $params ) {
+               $title = Title::newFromLinkTarget( $title );
+
                parent::__construct( 'activityUpdateJob', $title, $params );
 
                static $required = [ 'type', 'userid', 'notifTime', 'curTime' ];
index 01fa46c..0cb1a52 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use MediaWiki\MediaWikiServices;
+use MediaWiki\User\UserIdentity;
 
 /**
  * Job to clear a users watchlist in batches.
@@ -23,12 +24,12 @@ class ClearUserWatchlistJob extends Job implements GenericParameterJob {
        }
 
        /**
-        * @param User $user User to clear the watchlist for.
+        * @param UserIdentity $user User to clear the watchlist for.
         * @param int $maxWatchlistId The maximum wl_id at the time the job was first created.
         *
         * @return ClearUserWatchlistJob
         */
-       public static function newForUser( User $user, $maxWatchlistId ) {
+       public static function newForUser( UserIdentity $user, $maxWatchlistId ) {
                return new self( [ 'userId' => $user->getId(), 'maxWatchlistId' => $maxWatchlistId ] );
        }
 
diff --git a/includes/jobqueue/jobs/UserOptionsUpdateJob.php b/includes/jobqueue/jobs/UserOptionsUpdateJob.php
new file mode 100644 (file)
index 0000000..0e8b19f
--- /dev/null
@@ -0,0 +1,58 @@
+<?php
+/**
+ * Job that updates a user's preferences.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup JobQueue
+ */
+
+/**
+ * Job that updates a user's preferences
+ *
+ * The following job parameters are required:
+ *   - userId: the user ID
+ *   - options: a map of (option => value)
+ *
+ * @since 1.33
+ */
+class UserOptionsUpdateJob extends Job implements GenericParameterJob {
+       public function __construct( array $params ) {
+               parent::__construct( 'userOptionsUpdate', $params );
+               $this->removeDuplicates = true;
+       }
+
+       public function run() {
+               if ( !$this->params['options'] ) {
+                       return true; // nothing to do
+               }
+
+               $user = User::newFromId( $this->params['userId'] );
+               $user->load( $user::READ_EXCLUSIVE );
+               if ( !$user->getId() ) {
+                       return true;
+               }
+
+               foreach ( $this->params['options'] as $name => $value ) {
+                       $user->setOption( $name, $value );
+               }
+
+               $user->saveSettings();
+
+               return true;
+       }
+}
index 321424f..b993626 100644 (file)
@@ -178,7 +178,7 @@ class TempFSFile extends FSFile {
         * This method should only be called internally
         */
        public static function purgeAllOnShutdown() {
-               foreach ( self::$pathsCollect as $path ) {
+               foreach ( self::$pathsCollect as $path => $unused ) {
                        Wikimedia\suppressWarnings();
                        unlink( $path );
                        Wikimedia\restoreWarnings();
index 71e3331..3d6bd16 100644 (file)
@@ -175,12 +175,4 @@ class MemcachedBagOStuff extends BagOStuff {
                }
                return (int)$expiry;
        }
-
-       /**
-        * Send a debug message to the log
-        * @param string $text
-        */
-       protected function debugLog( $text ) {
-               $this->logger->debug( $text );
-       }
 }
index 692771d..db94503 100644 (file)
@@ -142,7 +142,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @suppress PhanTypeNonVarPassByRef
         */
        protected function doGet( $key, $flags = 0, &$casToken = null ) {
-               $this->debugLog( "get($key)" );
+               $this->debug( "get($key)" );
                if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
                        $flags = Memcached::GET_EXTENDED;
                        $res = $this->client->get( $this->validateKeyEncoding( $key ), null, $flags );
@@ -161,7 +161,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function set( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "set($key)" );
+               $this->debug( "set($key)" );
                $result = parent::set( $key, $value, $exptime, $flags = 0 );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTSTORED ) {
                        // "Not stored" is always used as the mcrouter response with AllAsyncRoute
@@ -171,12 +171,12 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "cas($key)" );
+               $this->debug( "cas($key)" );
                return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime, $flags ) );
        }
 
        public function delete( $key, $flags = 0 ) {
-               $this->debugLog( "delete($key)" );
+               $this->debug( "delete($key)" );
                $result = parent::delete( $key );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
                        // "Not found" is counted as success in our interface
@@ -186,18 +186,18 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function add( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "add($key)" );
+               $this->debug( "add($key)" );
                return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
        }
 
        public function incr( $key, $value = 1 ) {
-               $this->debugLog( "incr($key)" );
+               $this->debug( "incr($key)" );
                $result = $this->client->increment( $key, $value );
                return $this->checkResult( $key, $result );
        }
 
        public function decr( $key, $value = 1 ) {
-               $this->debugLog( "decr($key)" );
+               $this->debug( "decr($key)" );
                $result = $this->client->decrement( $key, $value );
                return $this->checkResult( $key, $result );
        }
@@ -223,7 +223,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                        case Memcached::RES_DATA_EXISTS:
                        case Memcached::RES_NOTSTORED:
                        case Memcached::RES_NOTFOUND:
-                               $this->debugLog( "result: " . $this->client->getResultMessage() );
+                               $this->debug( "result: " . $this->client->getResultMessage() );
                                break;
                        default:
                                $msg = $this->client->getResultMessage();
@@ -243,7 +243,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function getMulti( array $keys, $flags = 0 ) {
-               $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
+               $this->debug( 'getMulti(' . implode( ', ', $keys ) . ')' );
                foreach ( $keys as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -252,7 +252,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function setMulti( array $data, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
+               $this->debug( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
                foreach ( array_keys( $data ) as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -261,7 +261,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function changeTTL( $key, $expiry = 0, $flags = 0 ) {
-               $this->debugLog( "touch($key)" );
+               $this->debug( "touch($key)" );
                $result = $this->client->touch( $key, $expiry );
                return $this->checkResult( $key, $result );
        }
index 8f0b539..dac3421 100644 (file)
@@ -2325,7 +2325,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @return string A collection name to describe this class of key
         */
        protected function determineKeyClassForStats( $key ) {
-               $parts = explode( ':', $key );
+               $parts = explode( ':', $key, 3 );
 
                return $parts[1] ?? $parts[0]; // sanity
        }
index 0eeb544..4ecc368 100644 (file)
@@ -337,9 +337,9 @@ class LogPager extends ReverseChronologicalPager {
 
                // T221458: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor` before
                // `logging` and filesorting is somehow better than querying $limit+1 rows from `logging`.
-               // Tell it not to reorder the query. But not when tag filtering was used, as it seems as likely
-               // to be harmed as helped in that case.
-               if ( !$this->mTagFilter ) {
+               // Tell it not to reorder the query. But not when tag filtering or log_search was used, as it
+               // seems as likely to be harmed as helped in that case.
+               if ( !$this->mTagFilter && !array_key_exists( 'ls_field', $this->mConds ) ) {
                        $options[] = 'STRAIGHT_JOIN';
                }
 
index acf2c2e..0b77651 100644 (file)
@@ -224,7 +224,9 @@ class EmailNotification {
                                                && $watchingUser->isEmailConfirmed()
                                                && $watchingUser->getId() != $userTalkId
                                                && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges )
-                                               && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() )
+                                               // @TODO Partial blocks should not prevent the user from logging in.
+                                               //       see: https://phabricator.wikimedia.org/T208895
+                                               && !( $wgBlockDisablesLogin && $watchingUser->getBlock() )
                                                && Hooks::run( 'SendWatchlistEmailNotification', [ $watchingUser, $title, $this ] )
                                        ) {
                                                $this->compose( $watchingUser, self::WATCHLIST );
@@ -262,7 +264,9 @@ class EmailNotification {
                                wfDebug( __METHOD__ . ": user talk page edited, but user does not exist\n" );
                        } elseif ( $targetUser->getId() == $editor->getId() ) {
                                wfDebug( __METHOD__ . ": user edited their own talk page, no notification sent\n" );
-                       } elseif ( $wgBlockDisablesLogin && $targetUser->isBlocked() ) {
+                       } elseif ( $wgBlockDisablesLogin && $targetUser->getBlock() ) {
+                               // @TODO Partial blocks should not prevent the user from logging in.
+                               //       see: https://phabricator.wikimedia.org/T208895
                                wfDebug( __METHOD__ . ": talk page owner is blocked and cannot login, no notification sent\n" );
                        } elseif ( $targetUser->getOption( 'enotifusertalkpages' )
                                && ( !$minorEdit || $targetUser->getOption( 'enotifminoredits' ) )
index 931740c..8f39650 100644 (file)
@@ -3327,7 +3327,7 @@ class WikiPage implements Page, IDBAccessObject {
                        return [ [ 'alreadyrolled',
                                        htmlspecialchars( $this->mTitle->getPrefixedText() ),
                                        htmlspecialchars( $fromP ),
-                                       htmlspecialchars( $targetEditorForPublic ? $targetEditorForPublic->getName() : '' )
+                                       htmlspecialchars( $currentEditorForPublic ? $currentEditorForPublic->getName() : '' )
                        ] ];
                }
 
diff --git a/includes/parser/PPCustomFrame_DOM.php b/includes/parser/PPCustomFrame_DOM.php
new file mode 100644 (file)
index 0000000..70663a0
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with custom arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPCustomFrame_DOM extends PPFrame_DOM {
+
+       public $args;
+
+       public function __construct( $preprocessor, $args ) {
+               parent::__construct( $preprocessor );
+               $this->args = $args;
+       }
+
+       public function __toString() {
+               $s = 'cstmframe{';
+               $first = true;
+               foreach ( $this->args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->args );
+       }
+
+       /**
+        * @param int|string $index
+        * @return string|bool
+        */
+       public function getArgument( $index ) {
+               return $this->args[$index] ?? false;
+       }
+
+       public function getArguments() {
+               return $this->args;
+       }
+}
diff --git a/includes/parser/PPCustomFrame_Hash.php b/includes/parser/PPCustomFrame_Hash.php
new file mode 100644 (file)
index 0000000..a92b104
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with custom arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPCustomFrame_Hash extends PPFrame_Hash {
+
+       public $args;
+
+       public function __construct( $preprocessor, $args ) {
+               parent::__construct( $preprocessor );
+               $this->args = $args;
+       }
+
+       public function __toString() {
+               $s = 'cstmframe{';
+               $first = true;
+               foreach ( $this->args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->args );
+       }
+
+       /**
+        * @param int|string $index
+        * @return string|bool
+        */
+       public function getArgument( $index ) {
+               return $this->args[$index] ?? false;
+       }
+
+       public function getArguments() {
+               return $this->args;
+       }
+}
diff --git a/includes/parser/PPDPart.php b/includes/parser/PPDPart.php
new file mode 100644 (file)
index 0000000..1873730
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+class PPDPart {
+       /**
+        * @var string Output accumulator string
+        */
+       public $out;
+
+       // Optional member variables:
+       //   eqpos        Position of equals sign in output accumulator
+       //   commentEnd   Past-the-end input pointer for the last comment encountered
+       //   visualEnd    Past-the-end input pointer for the end of the accumulator minus comments
+
+       public function __construct( $out = '' ) {
+               $this->out = $out;
+       }
+}
diff --git a/includes/parser/PPDPart_Hash.php b/includes/parser/PPDPart_Hash.php
new file mode 100644 (file)
index 0000000..7507f06
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDPart_Hash extends PPDPart {
+
+       public function __construct( $out = '' ) {
+               if ( $out !== '' ) {
+                       $accum = [ $out ];
+               } else {
+                       $accum = [];
+               }
+               parent::__construct( $accum );
+       }
+}
diff --git a/includes/parser/PPDStack.php b/includes/parser/PPDStack.php
new file mode 100644 (file)
index 0000000..4108bd7
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Stack class to help Preprocessor::preprocessToObj()
+ * @ingroup Parser
+ */
+class PPDStack {
+       public $stack, $rootAccum;
+
+       /**
+        * @var PPDStack
+        */
+       public $top;
+       public $out;
+       public $elementClass = PPDStackElement::class;
+
+       public static $false = false;
+
+       public function __construct() {
+               $this->stack = [];
+               $this->top = false;
+               $this->rootAccum = '';
+               $this->accum =& $this->rootAccum;
+       }
+
+       /**
+        * @return int
+        */
+       public function count() {
+               return count( $this->stack );
+       }
+
+       public function &getAccum() {
+               return $this->accum;
+       }
+
+       /**
+        * @return bool|PPDPart
+        */
+       public function getCurrentPart() {
+               if ( $this->top === false ) {
+                       return false;
+               } else {
+                       return $this->top->getCurrentPart();
+               }
+       }
+
+       public function push( $data ) {
+               if ( $data instanceof $this->elementClass ) {
+                       $this->stack[] = $data;
+               } else {
+                       $class = $this->elementClass;
+                       $this->stack[] = new $class( $data );
+               }
+               $this->top = $this->stack[count( $this->stack ) - 1];
+               $this->accum =& $this->top->getAccum();
+       }
+
+       public function pop() {
+               if ( $this->stack === [] ) {
+                       throw new MWException( __METHOD__ . ': no elements remaining' );
+               }
+               $temp = array_pop( $this->stack );
+
+               if ( count( $this->stack ) ) {
+                       $this->top = $this->stack[count( $this->stack ) - 1];
+                       $this->accum =& $this->top->getAccum();
+               } else {
+                       $this->top = self::$false;
+                       $this->accum =& $this->rootAccum;
+               }
+               return $temp;
+       }
+
+       public function addPart( $s = '' ) {
+               $this->top->addPart( $s );
+               $this->accum =& $this->top->getAccum();
+       }
+
+       /**
+        * @return array
+        */
+       public function getFlags() {
+               if ( $this->stack === [] ) {
+                       return [
+                               'findEquals' => false,
+                               'findPipe' => false,
+                               'inHeading' => false,
+                       ];
+               } else {
+                       return $this->top->getFlags();
+               }
+       }
+}
diff --git a/includes/parser/PPDStackElement.php b/includes/parser/PPDStackElement.php
new file mode 100644 (file)
index 0000000..116244d
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+class PPDStackElement {
+       /**
+        * @var string Opening character (\n for heading)
+        */
+       public $open;
+
+       /**
+        * @var string Matching closing character
+        */
+       public $close;
+
+       /**
+        * @var string Saved prefix that may affect later processing,
+        *  e.g. to differentiate `-{{{{` and `{{{{` after later seeing `}}}`.
+        */
+       public $savedPrefix = '';
+
+       /**
+        * @var int Number of opening characters found (number of "=" for heading)
+        */
+       public $count;
+
+       /**
+        * @var PPDPart[] Array of PPDPart objects describing pipe-separated parts.
+        */
+       public $parts;
+
+       /**
+        * @var bool True if the open char appeared at the start of the input line.
+        *  Not set for headings.
+        */
+       public $lineStart;
+
+       public $partClass = PPDPart::class;
+
+       public function __construct( $data = [] ) {
+               $class = $this->partClass;
+               $this->parts = [ new $class ];
+
+               foreach ( $data as $name => $value ) {
+                       $this->$name = $value;
+               }
+       }
+
+       public function &getAccum() {
+               return $this->parts[count( $this->parts ) - 1]->out;
+       }
+
+       public function addPart( $s = '' ) {
+               $class = $this->partClass;
+               $this->parts[] = new $class( $s );
+       }
+
+       /**
+        * @return PPDPart
+        */
+       public function getCurrentPart() {
+               return $this->parts[count( $this->parts ) - 1];
+       }
+
+       /**
+        * @return array
+        */
+       public function getFlags() {
+               $partCount = count( $this->parts );
+               $findPipe = $this->open != "\n" && $this->open != '[';
+               return [
+                       'findPipe' => $findPipe,
+                       'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
+                       'inHeading' => $this->open == "\n",
+               ];
+       }
+
+       /**
+        * Get the output string that would result if the close is not found.
+        *
+        * @param bool|int $openingCount
+        * @return string
+        */
+       public function breakSyntax( $openingCount = false ) {
+               if ( $this->open == "\n" ) {
+                       $s = $this->savedPrefix . $this->parts[0]->out;
+               } else {
+                       if ( $openingCount === false ) {
+                               $openingCount = $this->count;
+                       }
+                       $s = substr( $this->open, 0, -1 );
+                       $s .= str_repeat(
+                               substr( $this->open, -1 ),
+                               $openingCount - strlen( $s )
+                       );
+                       $s = $this->savedPrefix . $s;
+                       $first = true;
+                       foreach ( $this->parts as $part ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= '|';
+                               }
+                               $s .= $part->out;
+                       }
+               }
+               return $s;
+       }
+}
diff --git a/includes/parser/PPDStackElement_Hash.php b/includes/parser/PPDStackElement_Hash.php
new file mode 100644 (file)
index 0000000..26351b2
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDStackElement_Hash extends PPDStackElement {
+
+       public function __construct( $data = [] ) {
+               $this->partClass = PPDPart_Hash::class;
+               parent::__construct( $data );
+       }
+
+       /**
+        * Get the accumulator that would result if the close is not found.
+        *
+        * @param int|bool $openingCount
+        * @return array
+        */
+       public function breakSyntax( $openingCount = false ) {
+               if ( $this->open == "\n" ) {
+                       $accum = array_merge( [ $this->savedPrefix ], $this->parts[0]->out );
+               } else {
+                       if ( $openingCount === false ) {
+                               $openingCount = $this->count;
+                       }
+                       $s = substr( $this->open, 0, -1 );
+                       $s .= str_repeat(
+                               substr( $this->open, -1 ),
+                               $openingCount - strlen( $s )
+                       );
+                       $accum = [ $this->savedPrefix . $s ];
+                       $lastIndex = 0;
+                       $first = true;
+                       foreach ( $this->parts as $part ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } elseif ( is_string( $accum[$lastIndex] ) ) {
+                                       $accum[$lastIndex] .= '|';
+                               } else {
+                                       $accum[++$lastIndex] = '|';
+                               }
+                               foreach ( $part->out as $node ) {
+                                       if ( is_string( $node ) && is_string( $accum[$lastIndex] ) ) {
+                                               $accum[$lastIndex] .= $node;
+                                       } else {
+                                               $accum[++$lastIndex] = $node;
+                                       }
+                               }
+                       }
+               }
+               return $accum;
+       }
+}
diff --git a/includes/parser/PPDStack_Hash.php b/includes/parser/PPDStack_Hash.php
new file mode 100644 (file)
index 0000000..1e50b1c
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Stack class to help Preprocessor::preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDStack_Hash extends PPDStack {
+
+       public function __construct() {
+               $this->elementClass = PPDStackElement_Hash::class;
+               parent::__construct();
+               $this->rootAccum = [];
+       }
+}
diff --git a/includes/parser/PPFrame.php b/includes/parser/PPFrame.php
new file mode 100644 (file)
index 0000000..79c7c3b
--- /dev/null
@@ -0,0 +1,204 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+interface PPFrame {
+       const NO_ARGS = 1;
+       const NO_TEMPLATES = 2;
+       const STRIP_COMMENTS = 4;
+       const NO_IGNORE = 8;
+       const RECOVER_COMMENTS = 16;
+       const NO_TAGS = 32;
+
+       const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
+               self::RECOVER_COMMENTS | self::NO_TAGS;
+
+       /** This constant exists when $indexOffset is supported in newChild() */
+       const SUPPORTS_INDEX_OFFSET = 1;
+
+       /**
+        * Create a child frame
+        *
+        * @param array|bool $args
+        * @param bool|Title $title
+        * @param int $indexOffset A number subtracted from the index attributes of the arguments
+        *
+        * @return PPFrame
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 );
+
+       /**
+        * Expand a document tree node, caching the result on its parent with the given key
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 );
+
+       /**
+        * Expand a document tree node
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 );
+
+       /**
+        * Implode with flags for expand()
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode $args,...
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags /*, ... */ );
+
+       /**
+        * Implode with no flags specified
+        * @param string $sep
+        * @param string|PPNode $args,...
+        * @return string
+        */
+       public function implode( $sep /*, ... */ );
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        * @param string $sep
+        * @param string|PPNode $args,...
+        * @return PPNode
+        */
+       public function virtualImplode( $sep /*, ... */ );
+
+       /**
+        * Virtual implode with brackets
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode $args,...
+        * @return PPNode
+        */
+       public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty();
+
+       /**
+        * Returns all arguments of this frame
+        * @return array
+        */
+       public function getArguments();
+
+       /**
+        * Returns all numbered arguments of this frame
+        * @return array
+        */
+       public function getNumberedArguments();
+
+       /**
+        * Returns all named arguments of this frame
+        * @return array
+        */
+       public function getNamedArguments();
+
+       /**
+        * Get an argument to this frame by name
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name );
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        * @return bool
+        */
+       public function loopCheck( $title );
+
+       /**
+        * Return true if the frame is a template frame
+        * @return bool
+        */
+       public function isTemplate();
+
+       /**
+        * Set the "volatile" flag.
+        *
+        * Note that this is somewhat of a "hack" in order to make extensions
+        * with side effects (such as Cite) work with the PHP parser. New
+        * extensions should be written in a way that they do not need this
+        * function, because other parsers (such as Parsoid) are not guaranteed
+        * to respect it, and it may be removed in the future.
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true );
+
+       /**
+        * Get the "volatile" flag.
+        *
+        * Callers should avoid caching the result of an expansion if it has the
+        * volatile flag set.
+        *
+        * @see self::setVolatile()
+        * @return bool
+        */
+       public function isVolatile();
+
+       /**
+        * Get the TTL of the frame's output.
+        *
+        * This is the maximum amount of time, in seconds, that this frame's
+        * output should be cached for. A value of null indicates that no
+        * maximum has been specified.
+        *
+        * Note that this TTL only applies to caching frames as parts of pages.
+        * It is not relevant to caching the entire rendered output of a page.
+        *
+        * @return int|null
+        */
+       public function getTTL();
+
+       /**
+        * Set the TTL of the output of this frame and all of its ancestors.
+        * Has no effect if the new TTL is greater than the one already set.
+        * Note that it is the caller's responsibility to change the cache
+        * expiry of the page as a whole, if such behavior is desired.
+        *
+        * @see self::getTTL()
+        * @param int $ttl
+        */
+       public function setTTL( $ttl );
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle();
+}
diff --git a/includes/parser/PPFrame_DOM.php b/includes/parser/PPFrame_DOM.php
new file mode 100644 (file)
index 0000000..a7fea00
--- /dev/null
@@ -0,0 +1,631 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * An expansion frame, used as a context to expand the result of preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPFrame_DOM implements PPFrame {
+
+       /**
+        * @var Preprocessor
+        */
+       public $preprocessor;
+
+       /**
+        * @var Parser
+        */
+       public $parser;
+
+       /**
+        * @var Title
+        */
+       public $title;
+       public $titleCache;
+
+       /**
+        * Hashtable listing templates which are disallowed for expansion in this frame,
+        * having been encountered previously in parent frames.
+        */
+       public $loopCheckHash;
+
+       /**
+        * Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
+        */
+       public $depth;
+
+       private $volatile = false;
+       private $ttl = null;
+
+       /**
+        * @var array
+        */
+       protected $childExpansionCache;
+
+       /**
+        * Construct a new preprocessor frame.
+        * @param Preprocessor $preprocessor The parent preprocessor
+        */
+       public function __construct( $preprocessor ) {
+               $this->preprocessor = $preprocessor;
+               $this->parser = $preprocessor->parser;
+               $this->title = $this->parser->mTitle;
+               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
+               $this->loopCheckHash = [];
+               $this->depth = 0;
+               $this->childExpansionCache = [];
+       }
+
+       /**
+        * Create a new child frame
+        * $args is optionally a multi-root PPNode or array containing the template arguments
+        *
+        * @param bool|array $args
+        * @param Title|bool $title
+        * @param int $indexOffset
+        * @return PPTemplateFrame_DOM
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
+               $namedArgs = [];
+               $numberedArgs = [];
+               if ( $title === false ) {
+                       $title = $this->title;
+               }
+               if ( $args !== false ) {
+                       $xpath = false;
+                       if ( $args instanceof PPNode ) {
+                               $args = $args->node;
+                       }
+                       foreach ( $args as $arg ) {
+                               if ( $arg instanceof PPNode ) {
+                                       $arg = $arg->node;
+                               }
+                               if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
+                                       $xpath = new DOMXPath( $arg->ownerDocument );
+                               }
+
+                               $nameNodes = $xpath->query( 'name', $arg );
+                               $value = $xpath->query( 'value', $arg );
+                               if ( $nameNodes->item( 0 )->hasAttributes() ) {
+                                       // Numbered parameter
+                                       $index = $nameNodes->item( 0 )->attributes->getNamedItem( 'index' )->textContent;
+                                       $index = $index - $indexOffset;
+                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $index ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $numberedArgs[$index] = $value->item( 0 );
+                                       unset( $namedArgs[$index] );
+                               } else {
+                                       // Named parameter
+                                       $name = trim( $this->expand( $nameNodes->item( 0 ), PPFrame::STRIP_COMMENTS ) );
+                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $name ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $namedArgs[$name] = $value->item( 0 );
+                                       unset( $numberedArgs[$name] );
+                               }
+                       }
+               }
+               return new PPTemplateFrame_DOM( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               // we don't have a parent, so we don't have a cache
+               return $this->expand( $root, $flags );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 ) {
+               static $expansionDepth = 0;
+               if ( is_string( $root ) ) {
+                       return $root;
+               }
+
+               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
+                       $this->parser->limitationWarn( 'node-count-exceeded',
+                               $this->parser->mPPNodeCount,
+                               $this->parser->mOptions->getMaxPPNodeCount()
+                       );
+                       return '<span class="error">Node-count limit exceeded</span>';
+               }
+
+               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
+                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
+                               $expansionDepth,
+                               $this->parser->mOptions->getMaxPPExpandDepth()
+                       );
+                       return '<span class="error">Expansion depth limit exceeded</span>';
+               }
+               ++$expansionDepth;
+               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+                       $this->parser->mHighestExpansionDepth = $expansionDepth;
+               }
+
+               if ( $root instanceof PPNode_DOM ) {
+                       $root = $root->node;
+               }
+               if ( $root instanceof DOMDocument ) {
+                       $root = $root->documentElement;
+               }
+
+               $outStack = [ '', '' ];
+               $iteratorStack = [ false, $root ];
+               $indexStack = [ 0, 0 ];
+
+               while ( count( $iteratorStack ) > 1 ) {
+                       $level = count( $outStack ) - 1;
+                       $iteratorNode =& $iteratorStack[$level];
+                       $out =& $outStack[$level];
+                       $index =& $indexStack[$level];
+
+                       if ( $iteratorNode instanceof PPNode_DOM ) {
+                               $iteratorNode = $iteratorNode->node;
+                       }
+
+                       if ( is_array( $iteratorNode ) ) {
+                               if ( $index >= count( $iteratorNode ) ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode[$index];
+                                       $index++;
+                               }
+                       } elseif ( $iteratorNode instanceof DOMNodeList ) {
+                               if ( $index >= $iteratorNode->length ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode->item( $index );
+                                       $index++;
+                               }
+                       } else {
+                               // Copy to $contextNode and then delete from iterator stack,
+                               // because this is not an iterator but we do have to execute it once
+                               $contextNode = $iteratorStack[$level];
+                               $iteratorStack[$level] = false;
+                       }
+
+                       if ( $contextNode instanceof PPNode_DOM ) {
+                               $contextNode = $contextNode->node;
+                       }
+
+                       $newIterator = false;
+
+                       if ( $contextNode === false ) {
+                               // nothing to do
+                       } elseif ( is_string( $contextNode ) ) {
+                               $out .= $contextNode;
+                       } elseif ( is_array( $contextNode ) || $contextNode instanceof DOMNodeList ) {
+                               $newIterator = $contextNode;
+                       } elseif ( $contextNode instanceof DOMNode ) {
+                               if ( $contextNode->nodeType == XML_TEXT_NODE ) {
+                                       $out .= $contextNode->nodeValue;
+                               } elseif ( $contextNode->nodeName == 'template' ) {
+                                       # Double-brace expansion
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $titles = $xpath->query( 'title', $contextNode );
+                                       $title = $titles->item( 0 );
+                                       $parts = $xpath->query( 'part', $contextNode );
+                                       if ( $flags & PPFrame::NO_TEMPLATES ) {
+                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $title, $parts );
+                                       } else {
+                                               $lineStart = $contextNode->getAttribute( 'lineStart' );
+                                               $params = [
+                                                       'title' => new PPNode_DOM( $title ),
+                                                       'parts' => new PPNode_DOM( $parts ),
+                                                       'lineStart' => $lineStart ];
+                                               $ret = $this->parser->braceSubstitution( $params, $this );
+                                               if ( isset( $ret['object'] ) ) {
+                                                       $newIterator = $ret['object'];
+                                               } else {
+                                                       $out .= $ret['text'];
+                                               }
+                                       }
+                               } elseif ( $contextNode->nodeName == 'tplarg' ) {
+                                       # Triple-brace expansion
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $titles = $xpath->query( 'title', $contextNode );
+                                       $title = $titles->item( 0 );
+                                       $parts = $xpath->query( 'part', $contextNode );
+                                       if ( $flags & PPFrame::NO_ARGS ) {
+                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $title, $parts );
+                                       } else {
+                                               $params = [
+                                                       'title' => new PPNode_DOM( $title ),
+                                                       'parts' => new PPNode_DOM( $parts ) ];
+                                               $ret = $this->parser->argSubstitution( $params, $this );
+                                               if ( isset( $ret['object'] ) ) {
+                                                       $newIterator = $ret['object'];
+                                               } else {
+                                                       $out .= $ret['text'];
+                                               }
+                                       }
+                               } elseif ( $contextNode->nodeName == 'comment' ) {
+                                       # HTML-style comment
+                                       # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
+                                       # Not in RECOVER_COMMENTS mode (msgnw) though.
+                                       if ( ( $this->parser->ot['html']
+                                               || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
+                                               || ( $flags & PPFrame::STRIP_COMMENTS )
+                                               ) && !( $flags & PPFrame::RECOVER_COMMENTS )
+                                       ) {
+                                               $out .= '';
+                                       } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                               # Add a strip marker in PST mode so that pstPass2() can
+                                               # run some old-fashioned regexes on the result.
+                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
+                                               $out .= $this->parser->insertStripItem( $contextNode->textContent );
+                                       } else {
+                                               # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
+                                               $out .= $contextNode->textContent;
+                                       }
+                               } elseif ( $contextNode->nodeName == 'ignore' ) {
+                                       # Output suppression used by <includeonly> etc.
+                                       # OT_WIKI will only respect <ignore> in substed templates.
+                                       # The other output types respect it unless NO_IGNORE is set.
+                                       # extractSections() sets NO_IGNORE and so never respects it.
+                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                               || ( $flags & PPFrame::NO_IGNORE )
+                                       ) {
+                                               $out .= $contextNode->textContent;
+                                       } else {
+                                               $out .= '';
+                                       }
+                               } elseif ( $contextNode->nodeName == 'ext' ) {
+                                       # Extension tag
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $names = $xpath->query( 'name', $contextNode );
+                                       $attrs = $xpath->query( 'attr', $contextNode );
+                                       $inners = $xpath->query( 'inner', $contextNode );
+                                       $closes = $xpath->query( 'close', $contextNode );
+                                       if ( $flags & PPFrame::NO_TAGS ) {
+                                               $s = '<' . $this->expand( $names->item( 0 ), $flags );
+                                               if ( $attrs->length > 0 ) {
+                                                       $s .= $this->expand( $attrs->item( 0 ), $flags );
+                                               }
+                                               if ( $inners->length > 0 ) {
+                                                       $s .= '>' . $this->expand( $inners->item( 0 ), $flags );
+                                                       if ( $closes->length > 0 ) {
+                                                               $s .= $this->expand( $closes->item( 0 ), $flags );
+                                                       }
+                                               } else {
+                                                       $s .= '/>';
+                                               }
+                                               $out .= $s;
+                                       } else {
+                                               $params = [
+                                                       'name' => new PPNode_DOM( $names->item( 0 ) ),
+                                                       'attr' => $attrs->length > 0 ? new PPNode_DOM( $attrs->item( 0 ) ) : null,
+                                                       'inner' => $inners->length > 0 ? new PPNode_DOM( $inners->item( 0 ) ) : null,
+                                                       'close' => $closes->length > 0 ? new PPNode_DOM( $closes->item( 0 ) ) : null,
+                                               ];
+                                               $out .= $this->parser->extensionSubstitution( $params, $this );
+                                       }
+                               } elseif ( $contextNode->nodeName == 'h' ) {
+                                       # Heading
+                                       $s = $this->expand( $contextNode->childNodes, $flags );
+
+                                       # Insert a heading marker only for <h> children of <root>
+                                       # This is to stop extractSections from going over multiple tree levels
+                                       if ( $contextNode->parentNode->nodeName == 'root' && $this->parser->ot['html'] ) {
+                                               # Insert heading index marker
+                                               $headingIndex = $contextNode->getAttribute( 'i' );
+                                               $titleText = $this->title->getPrefixedDBkey();
+                                               $this->parser->mHeadings[] = [ $titleText, $headingIndex ];
+                                               $serial = count( $this->parser->mHeadings ) - 1;
+                                               $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
+                                               $count = $contextNode->getAttribute( 'level' );
+                                               $s = substr( $s, 0, $count ) . $marker . substr( $s, $count );
+                                               $this->parser->mStripState->addGeneral( $marker, '' );
+                                       }
+                                       $out .= $s;
+                               } else {
+                                       # Generic recursive expansion
+                                       $newIterator = $contextNode->childNodes;
+                               }
+                       } else {
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
+                       }
+
+                       if ( $newIterator !== false ) {
+                               if ( $newIterator instanceof PPNode_DOM ) {
+                                       $newIterator = $newIterator->node;
+                               }
+                               $outStack[] = '';
+                               $iteratorStack[] = $newIterator;
+                               $indexStack[] = 0;
+                       } elseif ( $iteratorStack[$level] === false ) {
+                               // Return accumulated value to parent
+                               // With tail recursion
+                               while ( $iteratorStack[$level] === false && $level > 0 ) {
+                                       $outStack[$level - 1] .= $out;
+                                       array_pop( $outStack );
+                                       array_pop( $iteratorStack );
+                                       array_pop( $indexStack );
+                                       $level--;
+                               }
+                       }
+               }
+               --$expansionDepth;
+               return $outStack[0];
+       }
+
+       /**
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node, $flags );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Implode with no flags specified
+        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        *
+        * @param string $sep
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return string
+        */
+       public function implode( $sep, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        *
+        * @param string $sep
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return array
+        */
+       public function virtualImplode( $sep, ...$args ) {
+               $out = [];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               return $out;
+       }
+
+       /**
+        * Virtual implode with brackets
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return array
+        */
+       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
+               $out = [ $start ];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               $out[] = $end;
+               return $out;
+       }
+
+       public function __toString() {
+               return 'frame{}';
+       }
+
+       public function getPDBK( $level = false ) {
+               if ( $level === false ) {
+                       return $this->title->getPrefixedDBkey();
+               } else {
+                       return $this->titleCache[$level] ?? false;
+               }
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               return [];
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return true;
+       }
+
+       /**
+        * @param int|string $name
+        * @return bool Always false in this implementation.
+        */
+       public function getArgument( $name ) {
+               return false;
+       }
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        * @return bool
+        */
+       public function loopCheck( $title ) {
+               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return false;
+       }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Set the volatile flag
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true ) {
+               $this->volatile = $flag;
+       }
+
+       /**
+        * Get the volatile flag
+        *
+        * @return bool
+        */
+       public function isVolatile() {
+               return $this->volatile;
+       }
+
+       /**
+        * Set the TTL
+        *
+        * @param int $ttl
+        */
+       public function setTTL( $ttl ) {
+               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
+                       $this->ttl = $ttl;
+               }
+       }
+
+       /**
+        * Get the TTL
+        *
+        * @return int|null
+        */
+       public function getTTL() {
+               return $this->ttl;
+       }
+}
diff --git a/includes/parser/PPFrame_Hash.php b/includes/parser/PPFrame_Hash.php
new file mode 100644 (file)
index 0000000..845ec73
--- /dev/null
@@ -0,0 +1,613 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * An expansion frame, used as a context to expand the result of preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPFrame_Hash implements PPFrame {
+
+       /**
+        * @var Parser
+        */
+       public $parser;
+
+       /**
+        * @var Preprocessor
+        */
+       public $preprocessor;
+
+       /**
+        * @var Title
+        */
+       public $title;
+       public $titleCache;
+
+       /**
+        * Hashtable listing templates which are disallowed for expansion in this frame,
+        * having been encountered previously in parent frames.
+        */
+       public $loopCheckHash;
+
+       /**
+        * Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
+        */
+       public $depth;
+
+       private $volatile = false;
+       private $ttl = null;
+
+       /**
+        * @var array
+        */
+       protected $childExpansionCache;
+
+       /**
+        * Construct a new preprocessor frame.
+        * @param Preprocessor $preprocessor The parent preprocessor
+        */
+       public function __construct( $preprocessor ) {
+               $this->preprocessor = $preprocessor;
+               $this->parser = $preprocessor->parser;
+               $this->title = $this->parser->mTitle;
+               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
+               $this->loopCheckHash = [];
+               $this->depth = 0;
+               $this->childExpansionCache = [];
+       }
+
+       /**
+        * Create a new child frame
+        * $args is optionally a multi-root PPNode or array containing the template arguments
+        *
+        * @param array|bool|PPNode_Hash_Array $args
+        * @param Title|bool $title
+        * @param int $indexOffset
+        * @throws MWException
+        * @return PPTemplateFrame_Hash
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
+               $namedArgs = [];
+               $numberedArgs = [];
+               if ( $title === false ) {
+                       $title = $this->title;
+               }
+               if ( $args !== false ) {
+                       if ( $args instanceof PPNode_Hash_Array ) {
+                               $args = $args->value;
+                       } elseif ( !is_array( $args ) ) {
+                               throw new MWException( __METHOD__ . ': $args must be array or PPNode_Hash_Array' );
+                       }
+                       foreach ( $args as $arg ) {
+                               $bits = $arg->splitArg();
+                               if ( $bits['index'] !== '' ) {
+                                       // Numbered parameter
+                                       $index = $bits['index'] - $indexOffset;
+                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $index ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $numberedArgs[$index] = $bits['value'];
+                                       unset( $namedArgs[$index] );
+                               } else {
+                                       // Named parameter
+                                       $name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
+                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $name ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $namedArgs[$name] = $bits['value'];
+                                       unset( $numberedArgs[$name] );
+                               }
+                       }
+               }
+               return new PPTemplateFrame_Hash( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               // we don't have a parent, so we don't have a cache
+               return $this->expand( $root, $flags );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 ) {
+               static $expansionDepth = 0;
+               if ( is_string( $root ) ) {
+                       return $root;
+               }
+
+               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
+                       $this->parser->limitationWarn( 'node-count-exceeded',
+                                       $this->parser->mPPNodeCount,
+                                       $this->parser->mOptions->getMaxPPNodeCount()
+                       );
+                       return '<span class="error">Node-count limit exceeded</span>';
+               }
+               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
+                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
+                                       $expansionDepth,
+                                       $this->parser->mOptions->getMaxPPExpandDepth()
+                       );
+                       return '<span class="error">Expansion depth limit exceeded</span>';
+               }
+               ++$expansionDepth;
+               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+                       $this->parser->mHighestExpansionDepth = $expansionDepth;
+               }
+
+               $outStack = [ '', '' ];
+               $iteratorStack = [ false, $root ];
+               $indexStack = [ 0, 0 ];
+
+               while ( count( $iteratorStack ) > 1 ) {
+                       $level = count( $outStack ) - 1;
+                       $iteratorNode =& $iteratorStack[$level];
+                       $out =& $outStack[$level];
+                       $index =& $indexStack[$level];
+
+                       if ( is_array( $iteratorNode ) ) {
+                               if ( $index >= count( $iteratorNode ) ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode[$index];
+                                       $index++;
+                               }
+                       } elseif ( $iteratorNode instanceof PPNode_Hash_Array ) {
+                               if ( $index >= $iteratorNode->getLength() ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode->item( $index );
+                                       $index++;
+                               }
+                       } else {
+                               // Copy to $contextNode and then delete from iterator stack,
+                               // because this is not an iterator but we do have to execute it once
+                               $contextNode = $iteratorStack[$level];
+                               $iteratorStack[$level] = false;
+                       }
+
+                       $newIterator = false;
+                       $contextName = false;
+                       $contextChildren = false;
+
+                       if ( $contextNode === false ) {
+                               // nothing to do
+                       } elseif ( is_string( $contextNode ) ) {
+                               $out .= $contextNode;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Array ) {
+                               $newIterator = $contextNode;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Attr ) {
+                               // No output
+                       } elseif ( $contextNode instanceof PPNode_Hash_Text ) {
+                               $out .= $contextNode->value;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Tree ) {
+                               $contextName = $contextNode->name;
+                               $contextChildren = $contextNode->getRawChildren();
+                       } elseif ( is_array( $contextNode ) ) {
+                               // Node descriptor array
+                               if ( count( $contextNode ) !== 2 ) {
+                                       throw new MWException( __METHOD__ .
+                                               ': found an array where a node descriptor should be' );
+                               }
+                               list( $contextName, $contextChildren ) = $contextNode;
+                       } else {
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
+                       }
+
+                       // Handle node descriptor array or tree object
+                       if ( $contextName === false ) {
+                               // Not a node, already handled above
+                       } elseif ( $contextName[0] === '@' ) {
+                               // Attribute: no output
+                       } elseif ( $contextName === 'template' ) {
+                               # Double-brace expansion
+                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
+                               if ( $flags & PPFrame::NO_TEMPLATES ) {
+                                       $newIterator = $this->virtualBracketedImplode(
+                                               '{{', '|', '}}',
+                                               $bits['title'],
+                                               $bits['parts']
+                                       );
+                               } else {
+                                       $ret = $this->parser->braceSubstitution( $bits, $this );
+                                       if ( isset( $ret['object'] ) ) {
+                                               $newIterator = $ret['object'];
+                                       } else {
+                                               $out .= $ret['text'];
+                                       }
+                               }
+                       } elseif ( $contextName === 'tplarg' ) {
+                               # Triple-brace expansion
+                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
+                               if ( $flags & PPFrame::NO_ARGS ) {
+                                       $newIterator = $this->virtualBracketedImplode(
+                                               '{{{', '|', '}}}',
+                                               $bits['title'],
+                                               $bits['parts']
+                                       );
+                               } else {
+                                       $ret = $this->parser->argSubstitution( $bits, $this );
+                                       if ( isset( $ret['object'] ) ) {
+                                               $newIterator = $ret['object'];
+                                       } else {
+                                               $out .= $ret['text'];
+                                       }
+                               }
+                       } elseif ( $contextName === 'comment' ) {
+                               # HTML-style comment
+                               # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
+                               # Not in RECOVER_COMMENTS mode (msgnw) though.
+                               if ( ( $this->parser->ot['html']
+                                       || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
+                                       || ( $flags & PPFrame::STRIP_COMMENTS )
+                                       ) && !( $flags & PPFrame::RECOVER_COMMENTS )
+                               ) {
+                                       $out .= '';
+                               } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       # Add a strip marker in PST mode so that pstPass2() can
+                                       # run some old-fashioned regexes on the result.
+                                       # Not in RECOVER_COMMENTS mode (extractSections) though.
+                                       $out .= $this->parser->insertStripItem( $contextChildren[0] );
+                               } else {
+                                       # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
+                                       $out .= $contextChildren[0];
+                               }
+                       } elseif ( $contextName === 'ignore' ) {
+                               # Output suppression used by <includeonly> etc.
+                               # OT_WIKI will only respect <ignore> in substed templates.
+                               # The other output types respect it unless NO_IGNORE is set.
+                               # extractSections() sets NO_IGNORE and so never respects it.
+                               if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                       || ( $flags & PPFrame::NO_IGNORE )
+                               ) {
+                                       $out .= $contextChildren[0];
+                               } else {
+                                       // $out .= '';
+                               }
+                       } elseif ( $contextName === 'ext' ) {
+                               # Extension tag
+                               $bits = PPNode_Hash_Tree::splitRawExt( $contextChildren ) +
+                                       [ 'attr' => null, 'inner' => null, 'close' => null ];
+                               if ( $flags & PPFrame::NO_TAGS ) {
+                                       $s = '<' . $bits['name']->getFirstChild()->value;
+                                       if ( $bits['attr'] ) {
+                                               $s .= $bits['attr']->getFirstChild()->value;
+                                       }
+                                       if ( $bits['inner'] ) {
+                                               $s .= '>' . $bits['inner']->getFirstChild()->value;
+                                               if ( $bits['close'] ) {
+                                                       $s .= $bits['close']->getFirstChild()->value;
+                                               }
+                                       } else {
+                                               $s .= '/>';
+                                       }
+                                       $out .= $s;
+                               } else {
+                                       $out .= $this->parser->extensionSubstitution( $bits, $this );
+                               }
+                       } elseif ( $contextName === 'h' ) {
+                               # Heading
+                               if ( $this->parser->ot['html'] ) {
+                                       # Expand immediately and insert heading index marker
+                                       $s = $this->expand( $contextChildren, $flags );
+                                       $bits = PPNode_Hash_Tree::splitRawHeading( $contextChildren );
+                                       $titleText = $this->title->getPrefixedDBkey();
+                                       $this->parser->mHeadings[] = [ $titleText, $bits['i'] ];
+                                       $serial = count( $this->parser->mHeadings ) - 1;
+                                       $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
+                                       $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
+                                       $this->parser->mStripState->addGeneral( $marker, '' );
+                                       $out .= $s;
+                               } else {
+                                       # Expand in virtual stack
+                                       $newIterator = $contextChildren;
+                               }
+                       } else {
+                               # Generic recursive expansion
+                               $newIterator = $contextChildren;
+                       }
+
+                       if ( $newIterator !== false ) {
+                               $outStack[] = '';
+                               $iteratorStack[] = $newIterator;
+                               $indexStack[] = 0;
+                       } elseif ( $iteratorStack[$level] === false ) {
+                               // Return accumulated value to parent
+                               // With tail recursion
+                               while ( $iteratorStack[$level] === false && $level > 0 ) {
+                                       $outStack[$level - 1] .= $out;
+                                       array_pop( $outStack );
+                                       array_pop( $iteratorStack );
+                                       array_pop( $indexStack );
+                                       $level--;
+                               }
+                       }
+               }
+               --$expansionDepth;
+               return $outStack[0];
+       }
+
+       /**
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode ...$args
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node, $flags );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Implode with no flags specified
+        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        * @param string $sep
+        * @param string|PPNode ...$args
+        * @return string
+        */
+       public function implode( $sep, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        *
+        * @param string $sep
+        * @param string|PPNode ...$args
+        * @return PPNode_Hash_Array
+        */
+       public function virtualImplode( $sep, ...$args ) {
+               $out = [];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               return new PPNode_Hash_Array( $out );
+       }
+
+       /**
+        * Virtual implode with brackets
+        *
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode ...$args
+        * @return PPNode_Hash_Array
+        */
+       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
+               $out = [ $start ];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               $out[] = $end;
+               return new PPNode_Hash_Array( $out );
+       }
+
+       public function __toString() {
+               return 'frame{}';
+       }
+
+       /**
+        * @param bool $level
+        * @return array|bool|string
+        */
+       public function getPDBK( $level = false ) {
+               if ( $level === false ) {
+                       return $this->title->getPrefixedDBkey();
+               } else {
+                       return $this->titleCache[$level] ?? false;
+               }
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               return [];
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return true;
+       }
+
+       /**
+        * @param int|string $name
+        * @return bool Always false in this implementation.
+        */
+       public function getArgument( $name ) {
+               return false;
+       }
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        *
+        * @return bool
+        */
+       public function loopCheck( $title ) {
+               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return false;
+       }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Set the volatile flag
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true ) {
+               $this->volatile = $flag;
+       }
+
+       /**
+        * Get the volatile flag
+        *
+        * @return bool
+        */
+       public function isVolatile() {
+               return $this->volatile;
+       }
+
+       /**
+        * Set the TTL
+        *
+        * @param int $ttl
+        */
+       public function setTTL( $ttl ) {
+               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
+                       $this->ttl = $ttl;
+               }
+       }
+
+       /**
+        * Get the TTL
+        *
+        * @return int|null
+        */
+       public function getTTL() {
+               return $this->ttl;
+       }
+}
diff --git a/includes/parser/PPNode.php b/includes/parser/PPNode.php
new file mode 100644 (file)
index 0000000..2b6cf7c
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * There are three types of nodes:
+ *     * Tree nodes, which have a name and contain other nodes as children
+ *     * Array nodes, which also contain other nodes but aren't considered part of a tree
+ *     * Leaf nodes, which contain the actual data
+ *
+ * This interface provides access to the tree structure and to the contents of array nodes,
+ * but it does not provide access to the internal structure of leaf nodes. Access to leaf
+ * data is provided via two means:
+ *     * PPFrame::expand(), which provides expanded text
+ *     * The PPNode::split*() functions, which provide metadata about certain types of tree node
+ * @ingroup Parser
+ */
+interface PPNode {
+       /**
+        * Get an array-type node containing the children of this node.
+        * Returns false if this is not a tree node.
+        * @return PPNode
+        */
+       public function getChildren();
+
+       /**
+        * Get the first child of a tree node. False if there isn't one.
+        *
+        * @return PPNode
+        */
+       public function getFirstChild();
+
+       /**
+        * Get the next sibling of any node. False if there isn't one
+        * @return PPNode
+        */
+       public function getNextSibling();
+
+       /**
+        * Get all children of this tree node which have a given name.
+        * Returns an array-type node, or false if this is not a tree node.
+        * @param string $type
+        * @return bool|PPNode
+        */
+       public function getChildrenOfType( $type );
+
+       /**
+        * Returns the length of the array, or false if this is not an array-type node
+        */
+       public function getLength();
+
+       /**
+        * Returns an item of an array-type node
+        * @param int $i
+        * @return bool|PPNode
+        */
+       public function item( $i );
+
+       /**
+        * Get the name of this node. The following names are defined here:
+        *
+        *    h             A heading node.
+        *    template      A double-brace node.
+        *    tplarg        A triple-brace node.
+        *    title         The first argument to a template or tplarg node.
+        *    part          Subsequent arguments to a template or tplarg node.
+        *    #nodelist     An array-type node
+        *
+        * The subclass may define various other names for tree and leaf nodes.
+        * @return string
+        */
+       public function getName();
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *    name          PPNode name
+        *    index         String index
+        *    value         PPNode value
+        * @return array
+        */
+       public function splitArg();
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        * @return array
+        */
+       public function splitExt();
+
+       /**
+        * Split an "<h>" node
+        * @return array
+        */
+       public function splitHeading();
+}
diff --git a/includes/parser/PPNode_DOM.php b/includes/parser/PPNode_DOM.php
new file mode 100644 (file)
index 0000000..8a435ba
--- /dev/null
@@ -0,0 +1,188 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_DOM implements PPNode {
+
+       /**
+        * @var DOMElement
+        */
+       public $node;
+       public $xpath;
+
+       public function __construct( $node, $xpath = false ) {
+               $this->node = $node;
+       }
+
+       /**
+        * @return DOMXPath
+        */
+       public function getXPath() {
+               if ( $this->xpath === null ) {
+                       $this->xpath = new DOMXPath( $this->node->ownerDocument );
+               }
+               return $this->xpath;
+       }
+
+       public function __toString() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       $s = '';
+                       foreach ( $this->node as $node ) {
+                               $s .= $node->ownerDocument->saveXML( $node );
+                       }
+               } else {
+                       $s = $this->node->ownerDocument->saveXML( $this->node );
+               }
+               return $s;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getChildren() {
+               return $this->node->childNodes ? new self( $this->node->childNodes ) : false;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getFirstChild() {
+               return $this->node->firstChild ? new self( $this->node->firstChild ) : false;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getNextSibling() {
+               return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false;
+       }
+
+       /**
+        * @param string $type
+        *
+        * @return bool|PPNode_DOM
+        */
+       public function getChildrenOfType( $type ) {
+               return new self( $this->getXPath()->query( $type, $this->node ) );
+       }
+
+       /**
+        * @return int
+        */
+       public function getLength() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       return $this->node->length;
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * @param int $i
+        * @return bool|PPNode_DOM
+        */
+       public function item( $i ) {
+               $item = $this->node->item( $i );
+               return $item ? new self( $item ) : false;
+       }
+
+       /**
+        * @return string
+        */
+       public function getName() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       return '#nodelist';
+               } else {
+                       return $this->node->nodeName;
+               }
+       }
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *  - name          PPNode name
+        *  - index         String index
+        *  - value         PPNode value
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitArg() {
+               $xpath = $this->getXPath();
+               $names = $xpath->query( 'name', $this->node );
+               $values = $xpath->query( 'value', $this->node );
+               if ( !$names->length || !$values->length ) {
+                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
+               }
+               $name = $names->item( 0 );
+               $index = $name->getAttribute( 'index' );
+               return [
+                       'name' => new self( $name ),
+                       'index' => $index,
+                       'value' => new self( $values->item( 0 ) ) ];
+       }
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitExt() {
+               $xpath = $this->getXPath();
+               $names = $xpath->query( 'name', $this->node );
+               $attrs = $xpath->query( 'attr', $this->node );
+               $inners = $xpath->query( 'inner', $this->node );
+               $closes = $xpath->query( 'close', $this->node );
+               if ( !$names->length || !$attrs->length ) {
+                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
+               }
+               $parts = [
+                       'name' => new self( $names->item( 0 ) ),
+                       'attr' => new self( $attrs->item( 0 ) ) ];
+               if ( $inners->length ) {
+                       $parts['inner'] = new self( $inners->item( 0 ) );
+               }
+               if ( $closes->length ) {
+                       $parts['close'] = new self( $closes->item( 0 ) );
+               }
+               return $parts;
+       }
+
+       /**
+        * Split a "<h>" node
+        * @throws MWException
+        * @return array
+        */
+       public function splitHeading() {
+               if ( $this->getName() !== 'h' ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return [
+                       'i' => $this->node->getAttribute( 'i' ),
+                       'level' => $this->node->getAttribute( 'level' ),
+                       'contents' => $this->getChildren()
+               ];
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Array.php b/includes/parser/PPNode_Hash_Array.php
new file mode 100644 (file)
index 0000000..3892616
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Array implements PPNode {
+
+       public $value;
+
+       public function __construct( $value ) {
+               $this->value = $value;
+       }
+
+       public function __toString() {
+               return var_export( $this, true );
+       }
+
+       public function getLength() {
+               return count( $this->value );
+       }
+
+       public function item( $i ) {
+               return $this->value[$i];
+       }
+
+       public function getName() {
+               return '#nodelist';
+       }
+
+       public function getNextSibling() {
+               return false;
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Attr.php b/includes/parser/PPNode_Hash_Attr.php
new file mode 100644 (file)
index 0000000..91ba69d
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Attr implements PPNode {
+
+       public $name, $value;
+       private $store, $index;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $descriptor = $store[$index];
+               if ( $descriptor[PPNode_Hash_Tree::NAME][0] !== '@' ) {
+                       throw new MWException( __METHOD__ . ': invalid name in attribute descriptor' );
+               }
+               $this->name = substr( $descriptor[PPNode_Hash_Tree::NAME], 1 );
+               $this->value = $descriptor[PPNode_Hash_Tree::CHILDREN][0];
+               $this->store = $store;
+               $this->index = $index;
+       }
+
+       public function __toString() {
+               return "<@{$this->name}>" . htmlspecialchars( $this->value ) . "</@{$this->name}>";
+       }
+
+       public function getName() {
+               return $this->name;
+       }
+
+       public function getNextSibling() {
+               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function getLength() {
+               return false;
+       }
+
+       public function item( $i ) {
+               return false;
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Text.php b/includes/parser/PPNode_Hash_Text.php
new file mode 100644 (file)
index 0000000..182982f
--- /dev/null
@@ -0,0 +1,90 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Text implements PPNode {
+
+       public $value;
+       private $store, $index;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $this->value = $store[$index];
+               if ( !is_scalar( $this->value ) ) {
+                       throw new MWException( __CLASS__ . ' given object instead of string' );
+               }
+               $this->store = $store;
+               $this->index = $index;
+       }
+
+       public function __toString() {
+               return htmlspecialchars( $this->value );
+       }
+
+       public function getNextSibling() {
+               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function getLength() {
+               return false;
+       }
+
+       public function item( $i ) {
+               return false;
+       }
+
+       public function getName() {
+               return '#text';
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Tree.php b/includes/parser/PPNode_Hash_Tree.php
new file mode 100644 (file)
index 0000000..e6cabf8
--- /dev/null
@@ -0,0 +1,369 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Tree implements PPNode {
+
+       public $name;
+
+       /**
+        * The store array for children of this node. It is "raw" in the sense that
+        * nodes are two-element arrays ("descriptors") rather than PPNode_Hash_*
+        * objects.
+        */
+       private $rawChildren;
+
+       /**
+        * The store array for the siblings of this node, including this node itself.
+        */
+       private $store;
+
+       /**
+        * The index into $this->store which contains the descriptor of this node.
+        */
+       private $index;
+
+       /**
+        * The offset of the name within descriptors, used in some places for
+        * readability.
+        */
+       const NAME = 0;
+
+       /**
+        * The offset of the child list within descriptors, used in some places for
+        * readability.
+        */
+       const CHILDREN = 1;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $this->store = $store;
+               $this->index = $index;
+               list( $this->name, $this->rawChildren ) = $this->store[$index];
+       }
+
+       /**
+        * Construct an appropriate PPNode_Hash_* object with a class that depends
+        * on what is at the relevant store index.
+        *
+        * @param array $store
+        * @param int $index
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|false
+        * @throws MWException
+        */
+       public static function factory( array $store, $index ) {
+               if ( !isset( $store[$index] ) ) {
+                       return false;
+               }
+
+               $descriptor = $store[$index];
+               if ( is_string( $descriptor ) ) {
+                       $class = PPNode_Hash_Text::class;
+               } elseif ( is_array( $descriptor ) ) {
+                       if ( $descriptor[self::NAME][0] === '@' ) {
+                               $class = PPNode_Hash_Attr::class;
+                       } else {
+                               $class = self::class;
+                       }
+               } else {
+                       throw new MWException( __METHOD__ . ': invalid node descriptor' );
+               }
+               return new $class( $store, $index );
+       }
+
+       /**
+        * Convert a node to XML, for debugging
+        * @return string
+        */
+       public function __toString() {
+               $inner = '';
+               $attribs = '';
+               for ( $node = $this->getFirstChild(); $node; $node = $node->getNextSibling() ) {
+                       if ( $node instanceof PPNode_Hash_Attr ) {
+                               $attribs .= ' ' . $node->name . '="' . htmlspecialchars( $node->value ) . '"';
+                       } else {
+                               $inner .= $node->__toString();
+                       }
+               }
+               if ( $inner === '' ) {
+                       return "<{$this->name}$attribs/>";
+               } else {
+                       return "<{$this->name}$attribs>$inner</{$this->name}>";
+               }
+       }
+
+       /**
+        * @return PPNode_Hash_Array
+        */
+       public function getChildren() {
+               $children = [];
+               foreach ( $this->rawChildren as $i => $child ) {
+                       $children[] = self::factory( $this->rawChildren, $i );
+               }
+               return new PPNode_Hash_Array( $children );
+       }
+
+       /**
+        * Get the first child, or false if there is none. Note that this will
+        * return a temporary proxy object: different instances will be returned
+        * if this is called more than once on the same node.
+        *
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
+        */
+       public function getFirstChild() {
+               if ( !isset( $this->rawChildren[0] ) ) {
+                       return false;
+               } else {
+                       return self::factory( $this->rawChildren, 0 );
+               }
+       }
+
+       /**
+        * Get the next sibling, or false if there is none. Note that this will
+        * return a temporary proxy object: different instances will be returned
+        * if this is called more than once on the same node.
+        *
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
+        */
+       public function getNextSibling() {
+               return self::factory( $this->store, $this->index + 1 );
+       }
+
+       /**
+        * Get an array of the children with a given node name
+        *
+        * @param string $name
+        * @return PPNode_Hash_Array
+        */
+       public function getChildrenOfType( $name ) {
+               $children = [];
+               foreach ( $this->rawChildren as $i => $child ) {
+                       if ( is_array( $child ) && $child[self::NAME] === $name ) {
+                               $children[] = self::factory( $this->rawChildren, $i );
+                       }
+               }
+               return new PPNode_Hash_Array( $children );
+       }
+
+       /**
+        * Get the raw child array. For internal use.
+        * @return array
+        */
+       public function getRawChildren() {
+               return $this->rawChildren;
+       }
+
+       /**
+        * @return bool
+        */
+       public function getLength() {
+               return false;
+       }
+
+       /**
+        * @param int $i
+        * @return bool
+        */
+       public function item( $i ) {
+               return false;
+       }
+
+       /**
+        * @return string
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *  - name          PPNode name
+        *  - index         String index
+        *  - value         PPNode value
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitArg() {
+               return self::splitRawArg( $this->rawChildren );
+       }
+
+       /**
+        * Like splitArg() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawArg( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       if ( $child[self::NAME] === 'name' ) {
+                               $bits['name'] = new self( $children, $i );
+                               if ( isset( $child[self::CHILDREN][0][self::NAME] )
+                                       && $child[self::CHILDREN][0][self::NAME] === '@index'
+                               ) {
+                                       $bits['index'] = $child[self::CHILDREN][0][self::CHILDREN][0];
+                               }
+                       } elseif ( $child[self::NAME] === 'value' ) {
+                               $bits['value'] = new self( $children, $i );
+                       }
+               }
+
+               if ( !isset( $bits['name'] ) ) {
+                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
+               }
+               if ( !isset( $bits['index'] ) ) {
+                       $bits['index'] = '';
+               }
+               return $bits;
+       }
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitExt() {
+               return self::splitRawExt( $this->rawChildren );
+       }
+
+       /**
+        * Like splitExt() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawExt( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       switch ( $child[self::NAME] ) {
+                               case 'name':
+                                       $bits['name'] = new self( $children, $i );
+                                       break;
+                               case 'attr':
+                                       $bits['attr'] = new self( $children, $i );
+                                       break;
+                               case 'inner':
+                                       $bits['inner'] = new self( $children, $i );
+                                       break;
+                               case 'close':
+                                       $bits['close'] = new self( $children, $i );
+                                       break;
+                       }
+               }
+               if ( !isset( $bits['name'] ) ) {
+                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
+               }
+               return $bits;
+       }
+
+       /**
+        * Split an "<h>" node
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitHeading() {
+               if ( $this->name !== 'h' ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return self::splitRawHeading( $this->rawChildren );
+       }
+
+       /**
+        * Like splitHeading() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawHeading( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       if ( $child[self::NAME] === '@i' ) {
+                               $bits['i'] = $child[self::CHILDREN][0];
+                       } elseif ( $child[self::NAME] === '@level' ) {
+                               $bits['level'] = $child[self::CHILDREN][0];
+                       }
+               }
+               if ( !isset( $bits['i'] ) ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return $bits;
+       }
+
+       /**
+        * Split a "<template>" or "<tplarg>" node
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitTemplate() {
+               return self::splitRawTemplate( $this->rawChildren );
+       }
+
+       /**
+        * Like splitTemplate() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawTemplate( array $children ) {
+               $parts = [];
+               $bits = [ 'lineStart' => '' ];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       switch ( $child[self::NAME] ) {
+                               case 'title':
+                                       $bits['title'] = new self( $children, $i );
+                                       break;
+                               case 'part':
+                                       $parts[] = new self( $children, $i );
+                                       break;
+                               case '@lineStart':
+                                       $bits['lineStart'] = '1';
+                                       break;
+                       }
+               }
+               if ( !isset( $bits['title'] ) ) {
+                       throw new MWException( 'Invalid node passed to ' . __METHOD__ );
+               }
+               $bits['parts'] = new PPNode_Hash_Array( $parts );
+               return $bits;
+       }
+}
diff --git a/includes/parser/PPTemplateFrame_DOM.php b/includes/parser/PPTemplateFrame_DOM.php
new file mode 100644 (file)
index 0000000..52cb9cb
--- /dev/null
@@ -0,0 +1,198 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with template arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPTemplateFrame_DOM extends PPFrame_DOM {
+
+       public $numberedArgs, $namedArgs;
+
+       /**
+        * @var PPFrame_DOM
+        */
+       public $parent;
+       public $numberedExpansionCache, $namedExpansionCache;
+
+       /**
+        * @param Preprocessor $preprocessor
+        * @param bool|PPFrame_DOM $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param bool|Title $title
+        */
+       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
+               $namedArgs = [], $title = false
+       ) {
+               parent::__construct( $preprocessor );
+
+               $this->parent = $parent;
+               $this->numberedArgs = $numberedArgs;
+               $this->namedArgs = $namedArgs;
+               $this->title = $title;
+               $pdbk = $title ? $title->getPrefixedDBkey() : false;
+               $this->titleCache = $parent->titleCache;
+               $this->titleCache[] = $pdbk;
+               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
+               if ( $pdbk !== false ) {
+                       $this->loopCheckHash[$pdbk] = true;
+               }
+               $this->depth = $parent->depth + 1;
+               $this->numberedExpansionCache = $this->namedExpansionCache = [];
+       }
+
+       public function __toString() {
+               $s = 'tplframe{';
+               $first = true;
+               $args = $this->numberedArgs + $this->namedArgs;
+               foreach ( $args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->ownerDocument->saveXML( $value ) ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
+                       return $this->parent->childExpansionCache[$key];
+               }
+               $retval = $this->expand( $root, $flags );
+               if ( !$this->isVolatile() ) {
+                       $this->parent->childExpansionCache[$key] = $retval;
+               }
+               return $retval;
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
+       }
+
+       public function getArguments() {
+               $arguments = [];
+               foreach ( array_merge(
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       public function getNumberedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       public function getNamedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @param int $index
+        * @return string|bool
+        */
+       public function getNumberedArgument( $index ) {
+               if ( !isset( $this->numberedArgs[$index] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
+                       # No trimming for unnamed arguments
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
+               }
+               return $this->numberedExpansionCache[$index];
+       }
+
+       /**
+        * @param string $name
+        * @return string|bool
+        */
+       public function getNamedArgument( $name ) {
+               if ( !isset( $this->namedArgs[$name] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->namedExpansionCache[$name] ) ) {
+                       # Trim named arguments post-expand, for backwards compatibility
+                       $this->namedExpansionCache[$name] = trim(
+                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
+               }
+               return $this->namedExpansionCache[$name];
+       }
+
+       /**
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name ) {
+               $text = $this->getNumberedArgument( $name );
+               if ( $text === false ) {
+                       $text = $this->getNamedArgument( $name );
+               }
+               return $text;
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return true;
+       }
+
+       public function setVolatile( $flag = true ) {
+               parent::setVolatile( $flag );
+               $this->parent->setVolatile( $flag );
+       }
+
+       public function setTTL( $ttl ) {
+               parent::setTTL( $ttl );
+               $this->parent->setTTL( $ttl );
+       }
+}
diff --git a/includes/parser/PPTemplateFrame_Hash.php b/includes/parser/PPTemplateFrame_Hash.php
new file mode 100644 (file)
index 0000000..df740cf
--- /dev/null
@@ -0,0 +1,202 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with template arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPTemplateFrame_Hash extends PPFrame_Hash {
+
+       public $numberedArgs, $namedArgs, $parent;
+       public $numberedExpansionCache, $namedExpansionCache;
+
+       /**
+        * @param Preprocessor $preprocessor
+        * @param bool|PPFrame $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param bool|Title $title
+        */
+       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
+               $namedArgs = [], $title = false
+       ) {
+               parent::__construct( $preprocessor );
+
+               $this->parent = $parent;
+               $this->numberedArgs = $numberedArgs;
+               $this->namedArgs = $namedArgs;
+               $this->title = $title;
+               $pdbk = $title ? $title->getPrefixedDBkey() : false;
+               $this->titleCache = $parent->titleCache;
+               $this->titleCache[] = $pdbk;
+               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
+               if ( $pdbk !== false ) {
+                       $this->loopCheckHash[$pdbk] = true;
+               }
+               $this->depth = $parent->depth + 1;
+               $this->numberedExpansionCache = $this->namedExpansionCache = [];
+       }
+
+       public function __toString() {
+               $s = 'tplframe{';
+               $first = true;
+               $args = $this->numberedArgs + $this->namedArgs;
+               foreach ( $args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
+                       return $this->parent->childExpansionCache[$key];
+               }
+               $retval = $this->expand( $root, $flags );
+               if ( !$this->isVolatile() ) {
+                       $this->parent->childExpansionCache[$key] = $retval;
+               }
+               return $retval;
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               $arguments = [];
+               foreach ( array_merge(
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @param int $index
+        * @return string|bool
+        */
+       public function getNumberedArgument( $index ) {
+               if ( !isset( $this->numberedArgs[$index] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
+                       # No trimming for unnamed arguments
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
+               }
+               return $this->numberedExpansionCache[$index];
+       }
+
+       /**
+        * @param string $name
+        * @return string|bool
+        */
+       public function getNamedArgument( $name ) {
+               if ( !isset( $this->namedArgs[$name] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->namedExpansionCache[$name] ) ) {
+                       # Trim named arguments post-expand, for backwards compatibility
+                       $this->namedExpansionCache[$name] = trim(
+                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
+               }
+               return $this->namedExpansionCache[$name];
+       }
+
+       /**
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name ) {
+               $text = $this->getNumberedArgument( $name );
+               if ( $text === false ) {
+                       $text = $this->getNamedArgument( $name );
+               }
+               return $text;
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return true;
+       }
+
+       public function setVolatile( $flag = true ) {
+               parent::setVolatile( $flag );
+               $this->parent->setVolatile( $flag );
+       }
+
+       public function setTTL( $ttl ) {
+               parent::setTTL( $ttl );
+               $this->parent->setTTL( $ttl );
+       }
+}
index bdfedd6..b321078 100644 (file)
@@ -164,279 +164,3 @@ abstract class Preprocessor {
         */
        abstract public function preprocessToObj( $text, $flags = 0 );
 }
-
-/**
- * @ingroup Parser
- */
-interface PPFrame {
-       const NO_ARGS = 1;
-       const NO_TEMPLATES = 2;
-       const STRIP_COMMENTS = 4;
-       const NO_IGNORE = 8;
-       const RECOVER_COMMENTS = 16;
-       const NO_TAGS = 32;
-
-       const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
-               self::RECOVER_COMMENTS | self::NO_TAGS;
-
-       /** This constant exists when $indexOffset is supported in newChild() */
-       const SUPPORTS_INDEX_OFFSET = 1;
-
-       /**
-        * Create a child frame
-        *
-        * @param array|bool $args
-        * @param bool|Title $title
-        * @param int $indexOffset A number subtracted from the index attributes of the arguments
-        *
-        * @return PPFrame
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 );
-
-       /**
-        * Expand a document tree node, caching the result on its parent with the given key
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 );
-
-       /**
-        * Expand a document tree node
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 );
-
-       /**
-        * Implode with flags for expand()
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode $args,...
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags /*, ... */ );
-
-       /**
-        * Implode with no flags specified
-        * @param string $sep
-        * @param string|PPNode $args,...
-        * @return string
-        */
-       public function implode( $sep /*, ... */ );
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        * @param string $sep
-        * @param string|PPNode $args,...
-        * @return PPNode
-        */
-       public function virtualImplode( $sep /*, ... */ );
-
-       /**
-        * Virtual implode with brackets
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode $args,...
-        * @return PPNode
-        */
-       public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty();
-
-       /**
-        * Returns all arguments of this frame
-        * @return array
-        */
-       public function getArguments();
-
-       /**
-        * Returns all numbered arguments of this frame
-        * @return array
-        */
-       public function getNumberedArguments();
-
-       /**
-        * Returns all named arguments of this frame
-        * @return array
-        */
-       public function getNamedArguments();
-
-       /**
-        * Get an argument to this frame by name
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name );
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        * @return bool
-        */
-       public function loopCheck( $title );
-
-       /**
-        * Return true if the frame is a template frame
-        * @return bool
-        */
-       public function isTemplate();
-
-       /**
-        * Set the "volatile" flag.
-        *
-        * Note that this is somewhat of a "hack" in order to make extensions
-        * with side effects (such as Cite) work with the PHP parser. New
-        * extensions should be written in a way that they do not need this
-        * function, because other parsers (such as Parsoid) are not guaranteed
-        * to respect it, and it may be removed in the future.
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true );
-
-       /**
-        * Get the "volatile" flag.
-        *
-        * Callers should avoid caching the result of an expansion if it has the
-        * volatile flag set.
-        *
-        * @see self::setVolatile()
-        * @return bool
-        */
-       public function isVolatile();
-
-       /**
-        * Get the TTL of the frame's output.
-        *
-        * This is the maximum amount of time, in seconds, that this frame's
-        * output should be cached for. A value of null indicates that no
-        * maximum has been specified.
-        *
-        * Note that this TTL only applies to caching frames as parts of pages.
-        * It is not relevant to caching the entire rendered output of a page.
-        *
-        * @return int|null
-        */
-       public function getTTL();
-
-       /**
-        * Set the TTL of the output of this frame and all of its ancestors.
-        * Has no effect if the new TTL is greater than the one already set.
-        * Note that it is the caller's responsibility to change the cache
-        * expiry of the page as a whole, if such behavior is desired.
-        *
-        * @see self::getTTL()
-        * @param int $ttl
-        */
-       public function setTTL( $ttl );
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle();
-}
-
-/**
- * There are three types of nodes:
- *     * Tree nodes, which have a name and contain other nodes as children
- *     * Array nodes, which also contain other nodes but aren't considered part of a tree
- *     * Leaf nodes, which contain the actual data
- *
- * This interface provides access to the tree structure and to the contents of array nodes,
- * but it does not provide access to the internal structure of leaf nodes. Access to leaf
- * data is provided via two means:
- *     * PPFrame::expand(), which provides expanded text
- *     * The PPNode::split*() functions, which provide metadata about certain types of tree node
- * @ingroup Parser
- */
-interface PPNode {
-       /**
-        * Get an array-type node containing the children of this node.
-        * Returns false if this is not a tree node.
-        * @return PPNode
-        */
-       public function getChildren();
-
-       /**
-        * Get the first child of a tree node. False if there isn't one.
-        *
-        * @return PPNode
-        */
-       public function getFirstChild();
-
-       /**
-        * Get the next sibling of any node. False if there isn't one
-        * @return PPNode
-        */
-       public function getNextSibling();
-
-       /**
-        * Get all children of this tree node which have a given name.
-        * Returns an array-type node, or false if this is not a tree node.
-        * @param string $type
-        * @return bool|PPNode
-        */
-       public function getChildrenOfType( $type );
-
-       /**
-        * Returns the length of the array, or false if this is not an array-type node
-        */
-       public function getLength();
-
-       /**
-        * Returns an item of an array-type node
-        * @param int $i
-        * @return bool|PPNode
-        */
-       public function item( $i );
-
-       /**
-        * Get the name of this node. The following names are defined here:
-        *
-        *    h             A heading node.
-        *    template      A double-brace node.
-        *    tplarg        A triple-brace node.
-        *    title         The first argument to a template or tplarg node.
-        *    part          Subsequent arguments to a template or tplarg node.
-        *    #nodelist     An array-type node
-        *
-        * The subclass may define various other names for tree and leaf nodes.
-        * @return string
-        */
-       public function getName();
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *    name          PPNode name
-        *    index         String index
-        *    value         PPNode value
-        * @return array
-        */
-       public function splitArg();
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        * @return array
-        */
-       public function splitExt();
-
-       /**
-        * Split an "<h>" node
-        * @return array
-        */
-       public function splitHeading();
-}
index c27a635..0f0496b 100644 (file)
@@ -823,1231 +823,3 @@ class Preprocessor_DOM extends Preprocessor {
                return $xml;
        }
 }
-
-/**
- * Stack class to help Preprocessor::preprocessToObj()
- * @ingroup Parser
- */
-class PPDStack {
-       public $stack, $rootAccum;
-
-       /**
-        * @var PPDStack
-        */
-       public $top;
-       public $out;
-       public $elementClass = PPDStackElement::class;
-
-       public static $false = false;
-
-       public function __construct() {
-               $this->stack = [];
-               $this->top = false;
-               $this->rootAccum = '';
-               $this->accum =& $this->rootAccum;
-       }
-
-       /**
-        * @return int
-        */
-       public function count() {
-               return count( $this->stack );
-       }
-
-       public function &getAccum() {
-               return $this->accum;
-       }
-
-       /**
-        * @return bool|PPDPart
-        */
-       public function getCurrentPart() {
-               if ( $this->top === false ) {
-                       return false;
-               } else {
-                       return $this->top->getCurrentPart();
-               }
-       }
-
-       public function push( $data ) {
-               if ( $data instanceof $this->elementClass ) {
-                       $this->stack[] = $data;
-               } else {
-                       $class = $this->elementClass;
-                       $this->stack[] = new $class( $data );
-               }
-               $this->top = $this->stack[count( $this->stack ) - 1];
-               $this->accum =& $this->top->getAccum();
-       }
-
-       public function pop() {
-               if ( $this->stack === [] ) {
-                       throw new MWException( __METHOD__ . ': no elements remaining' );
-               }
-               $temp = array_pop( $this->stack );
-
-               if ( count( $this->stack ) ) {
-                       $this->top = $this->stack[count( $this->stack ) - 1];
-                       $this->accum =& $this->top->getAccum();
-               } else {
-                       $this->top = self::$false;
-                       $this->accum =& $this->rootAccum;
-               }
-               return $temp;
-       }
-
-       public function addPart( $s = '' ) {
-               $this->top->addPart( $s );
-               $this->accum =& $this->top->getAccum();
-       }
-
-       /**
-        * @return array
-        */
-       public function getFlags() {
-               if ( $this->stack === [] ) {
-                       return [
-                               'findEquals' => false,
-                               'findPipe' => false,
-                               'inHeading' => false,
-                       ];
-               } else {
-                       return $this->top->getFlags();
-               }
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDStackElement {
-       /**
-        * @var string Opening character (\n for heading)
-        */
-       public $open;
-
-       /**
-        * @var string Matching closing character
-        */
-       public $close;
-
-       /**
-        * @var string Saved prefix that may affect later processing,
-        *  e.g. to differentiate `-{{{{` and `{{{{` after later seeing `}}}`.
-        */
-       public $savedPrefix = '';
-
-       /**
-        * @var int Number of opening characters found (number of "=" for heading)
-        */
-       public $count;
-
-       /**
-        * @var PPDPart[] Array of PPDPart objects describing pipe-separated parts.
-        */
-       public $parts;
-
-       /**
-        * @var bool True if the open char appeared at the start of the input line.
-        *  Not set for headings.
-        */
-       public $lineStart;
-
-       public $partClass = PPDPart::class;
-
-       public function __construct( $data = [] ) {
-               $class = $this->partClass;
-               $this->parts = [ new $class ];
-
-               foreach ( $data as $name => $value ) {
-                       $this->$name = $value;
-               }
-       }
-
-       public function &getAccum() {
-               return $this->parts[count( $this->parts ) - 1]->out;
-       }
-
-       public function addPart( $s = '' ) {
-               $class = $this->partClass;
-               $this->parts[] = new $class( $s );
-       }
-
-       /**
-        * @return PPDPart
-        */
-       public function getCurrentPart() {
-               return $this->parts[count( $this->parts ) - 1];
-       }
-
-       /**
-        * @return array
-        */
-       public function getFlags() {
-               $partCount = count( $this->parts );
-               $findPipe = $this->open != "\n" && $this->open != '[';
-               return [
-                       'findPipe' => $findPipe,
-                       'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
-                       'inHeading' => $this->open == "\n",
-               ];
-       }
-
-       /**
-        * Get the output string that would result if the close is not found.
-        *
-        * @param bool|int $openingCount
-        * @return string
-        */
-       public function breakSyntax( $openingCount = false ) {
-               if ( $this->open == "\n" ) {
-                       $s = $this->savedPrefix . $this->parts[0]->out;
-               } else {
-                       if ( $openingCount === false ) {
-                               $openingCount = $this->count;
-                       }
-                       $s = substr( $this->open, 0, -1 );
-                       $s .= str_repeat(
-                               substr( $this->open, -1 ),
-                               $openingCount - strlen( $s )
-                       );
-                       $s = $this->savedPrefix . $s;
-                       $first = true;
-                       foreach ( $this->parts as $part ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= '|';
-                               }
-                               $s .= $part->out;
-                       }
-               }
-               return $s;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDPart {
-       /**
-        * @var string Output accumulator string
-        */
-       public $out;
-
-       // Optional member variables:
-       //   eqpos        Position of equals sign in output accumulator
-       //   commentEnd   Past-the-end input pointer for the last comment encountered
-       //   visualEnd    Past-the-end input pointer for the end of the accumulator minus comments
-
-       public function __construct( $out = '' ) {
-               $this->out = $out;
-       }
-}
-
-/**
- * An expansion frame, used as a context to expand the result of preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPFrame_DOM implements PPFrame {
-
-       /**
-        * @var Preprocessor
-        */
-       public $preprocessor;
-
-       /**
-        * @var Parser
-        */
-       public $parser;
-
-       /**
-        * @var Title
-        */
-       public $title;
-       public $titleCache;
-
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       public $loopCheckHash;
-
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       public $depth;
-
-       private $volatile = false;
-       private $ttl = null;
-
-       /**
-        * @var array
-        */
-       protected $childExpansionCache;
-
-       /**
-        * Construct a new preprocessor frame.
-        * @param Preprocessor $preprocessor The parent preprocessor
-        */
-       public function __construct( $preprocessor ) {
-               $this->preprocessor = $preprocessor;
-               $this->parser = $preprocessor->parser;
-               $this->title = $this->parser->mTitle;
-               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
-               $this->loopCheckHash = [];
-               $this->depth = 0;
-               $this->childExpansionCache = [];
-       }
-
-       /**
-        * Create a new child frame
-        * $args is optionally a multi-root PPNode or array containing the template arguments
-        *
-        * @param bool|array $args
-        * @param Title|bool $title
-        * @param int $indexOffset
-        * @return PPTemplateFrame_DOM
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
-               $namedArgs = [];
-               $numberedArgs = [];
-               if ( $title === false ) {
-                       $title = $this->title;
-               }
-               if ( $args !== false ) {
-                       $xpath = false;
-                       if ( $args instanceof PPNode ) {
-                               $args = $args->node;
-                       }
-                       foreach ( $args as $arg ) {
-                               if ( $arg instanceof PPNode ) {
-                                       $arg = $arg->node;
-                               }
-                               if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
-                                       $xpath = new DOMXPath( $arg->ownerDocument );
-                               }
-
-                               $nameNodes = $xpath->query( 'name', $arg );
-                               $value = $xpath->query( 'value', $arg );
-                               if ( $nameNodes->item( 0 )->hasAttributes() ) {
-                                       // Numbered parameter
-                                       $index = $nameNodes->item( 0 )->attributes->getNamedItem( 'index' )->textContent;
-                                       $index = $index - $indexOffset;
-                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $index ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $numberedArgs[$index] = $value->item( 0 );
-                                       unset( $namedArgs[$index] );
-                               } else {
-                                       // Named parameter
-                                       $name = trim( $this->expand( $nameNodes->item( 0 ), PPFrame::STRIP_COMMENTS ) );
-                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $name ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $namedArgs[$name] = $value->item( 0 );
-                                       unset( $numberedArgs[$name] );
-                               }
-                       }
-               }
-               return new PPTemplateFrame_DOM( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               // we don't have a parent, so we don't have a cache
-               return $this->expand( $root, $flags );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 ) {
-               static $expansionDepth = 0;
-               if ( is_string( $root ) ) {
-                       return $root;
-               }
-
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
-                       $this->parser->limitationWarn( 'node-count-exceeded',
-                               $this->parser->mPPNodeCount,
-                               $this->parser->mOptions->getMaxPPNodeCount()
-                       );
-                       return '<span class="error">Node-count limit exceeded</span>';
-               }
-
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
-                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
-                               $expansionDepth,
-                               $this->parser->mOptions->getMaxPPExpandDepth()
-                       );
-                       return '<span class="error">Expansion depth limit exceeded</span>';
-               }
-               ++$expansionDepth;
-               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
-                       $this->parser->mHighestExpansionDepth = $expansionDepth;
-               }
-
-               if ( $root instanceof PPNode_DOM ) {
-                       $root = $root->node;
-               }
-               if ( $root instanceof DOMDocument ) {
-                       $root = $root->documentElement;
-               }
-
-               $outStack = [ '', '' ];
-               $iteratorStack = [ false, $root ];
-               $indexStack = [ 0, 0 ];
-
-               while ( count( $iteratorStack ) > 1 ) {
-                       $level = count( $outStack ) - 1;
-                       $iteratorNode =& $iteratorStack[$level];
-                       $out =& $outStack[$level];
-                       $index =& $indexStack[$level];
-
-                       if ( $iteratorNode instanceof PPNode_DOM ) {
-                               $iteratorNode = $iteratorNode->node;
-                       }
-
-                       if ( is_array( $iteratorNode ) ) {
-                               if ( $index >= count( $iteratorNode ) ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode[$index];
-                                       $index++;
-                               }
-                       } elseif ( $iteratorNode instanceof DOMNodeList ) {
-                               if ( $index >= $iteratorNode->length ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode->item( $index );
-                                       $index++;
-                               }
-                       } else {
-                               // Copy to $contextNode and then delete from iterator stack,
-                               // because this is not an iterator but we do have to execute it once
-                               $contextNode = $iteratorStack[$level];
-                               $iteratorStack[$level] = false;
-                       }
-
-                       if ( $contextNode instanceof PPNode_DOM ) {
-                               $contextNode = $contextNode->node;
-                       }
-
-                       $newIterator = false;
-
-                       if ( $contextNode === false ) {
-                               // nothing to do
-                       } elseif ( is_string( $contextNode ) ) {
-                               $out .= $contextNode;
-                       } elseif ( is_array( $contextNode ) || $contextNode instanceof DOMNodeList ) {
-                               $newIterator = $contextNode;
-                       } elseif ( $contextNode instanceof DOMNode ) {
-                               if ( $contextNode->nodeType == XML_TEXT_NODE ) {
-                                       $out .= $contextNode->nodeValue;
-                               } elseif ( $contextNode->nodeName == 'template' ) {
-                                       # Double-brace expansion
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $titles = $xpath->query( 'title', $contextNode );
-                                       $title = $titles->item( 0 );
-                                       $parts = $xpath->query( 'part', $contextNode );
-                                       if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $title, $parts );
-                                       } else {
-                                               $lineStart = $contextNode->getAttribute( 'lineStart' );
-                                               $params = [
-                                                       'title' => new PPNode_DOM( $title ),
-                                                       'parts' => new PPNode_DOM( $parts ),
-                                                       'lineStart' => $lineStart ];
-                                               $ret = $this->parser->braceSubstitution( $params, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->nodeName == 'tplarg' ) {
-                                       # Triple-brace expansion
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $titles = $xpath->query( 'title', $contextNode );
-                                       $title = $titles->item( 0 );
-                                       $parts = $xpath->query( 'part', $contextNode );
-                                       if ( $flags & PPFrame::NO_ARGS ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $title, $parts );
-                                       } else {
-                                               $params = [
-                                                       'title' => new PPNode_DOM( $title ),
-                                                       'parts' => new PPNode_DOM( $parts ) ];
-                                               $ret = $this->parser->argSubstitution( $params, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->nodeName == 'comment' ) {
-                                       # HTML-style comment
-                                       # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
-                                       # Not in RECOVER_COMMENTS mode (msgnw) though.
-                                       if ( ( $this->parser->ot['html']
-                                               || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
-                                               || ( $flags & PPFrame::STRIP_COMMENTS )
-                                               ) && !( $flags & PPFrame::RECOVER_COMMENTS )
-                                       ) {
-                                               $out .= '';
-                                       } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                               # Add a strip marker in PST mode so that pstPass2() can
-                                               # run some old-fashioned regexes on the result.
-                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
-                                               $out .= $this->parser->insertStripItem( $contextNode->textContent );
-                                       } else {
-                                               # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
-                                               $out .= $contextNode->textContent;
-                                       }
-                               } elseif ( $contextNode->nodeName == 'ignore' ) {
-                                       # Output suppression used by <includeonly> etc.
-                                       # OT_WIKI will only respect <ignore> in substed templates.
-                                       # The other output types respect it unless NO_IGNORE is set.
-                                       # extractSections() sets NO_IGNORE and so never respects it.
-                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
-                                               || ( $flags & PPFrame::NO_IGNORE )
-                                       ) {
-                                               $out .= $contextNode->textContent;
-                                       } else {
-                                               $out .= '';
-                                       }
-                               } elseif ( $contextNode->nodeName == 'ext' ) {
-                                       # Extension tag
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $names = $xpath->query( 'name', $contextNode );
-                                       $attrs = $xpath->query( 'attr', $contextNode );
-                                       $inners = $xpath->query( 'inner', $contextNode );
-                                       $closes = $xpath->query( 'close', $contextNode );
-                                       if ( $flags & PPFrame::NO_TAGS ) {
-                                               $s = '<' . $this->expand( $names->item( 0 ), $flags );
-                                               if ( $attrs->length > 0 ) {
-                                                       $s .= $this->expand( $attrs->item( 0 ), $flags );
-                                               }
-                                               if ( $inners->length > 0 ) {
-                                                       $s .= '>' . $this->expand( $inners->item( 0 ), $flags );
-                                                       if ( $closes->length > 0 ) {
-                                                               $s .= $this->expand( $closes->item( 0 ), $flags );
-                                                       }
-                                               } else {
-                                                       $s .= '/>';
-                                               }
-                                               $out .= $s;
-                                       } else {
-                                               $params = [
-                                                       'name' => new PPNode_DOM( $names->item( 0 ) ),
-                                                       'attr' => $attrs->length > 0 ? new PPNode_DOM( $attrs->item( 0 ) ) : null,
-                                                       'inner' => $inners->length > 0 ? new PPNode_DOM( $inners->item( 0 ) ) : null,
-                                                       'close' => $closes->length > 0 ? new PPNode_DOM( $closes->item( 0 ) ) : null,
-                                               ];
-                                               $out .= $this->parser->extensionSubstitution( $params, $this );
-                                       }
-                               } elseif ( $contextNode->nodeName == 'h' ) {
-                                       # Heading
-                                       $s = $this->expand( $contextNode->childNodes, $flags );
-
-                                       # Insert a heading marker only for <h> children of <root>
-                                       # This is to stop extractSections from going over multiple tree levels
-                                       if ( $contextNode->parentNode->nodeName == 'root' && $this->parser->ot['html'] ) {
-                                               # Insert heading index marker
-                                               $headingIndex = $contextNode->getAttribute( 'i' );
-                                               $titleText = $this->title->getPrefixedDBkey();
-                                               $this->parser->mHeadings[] = [ $titleText, $headingIndex ];
-                                               $serial = count( $this->parser->mHeadings ) - 1;
-                                               $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
-                                               $count = $contextNode->getAttribute( 'level' );
-                                               $s = substr( $s, 0, $count ) . $marker . substr( $s, $count );
-                                               $this->parser->mStripState->addGeneral( $marker, '' );
-                                       }
-                                       $out .= $s;
-                               } else {
-                                       # Generic recursive expansion
-                                       $newIterator = $contextNode->childNodes;
-                               }
-                       } else {
-                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
-                       }
-
-                       if ( $newIterator !== false ) {
-                               if ( $newIterator instanceof PPNode_DOM ) {
-                                       $newIterator = $newIterator->node;
-                               }
-                               $outStack[] = '';
-                               $iteratorStack[] = $newIterator;
-                               $indexStack[] = 0;
-                       } elseif ( $iteratorStack[$level] === false ) {
-                               // Return accumulated value to parent
-                               // With tail recursion
-                               while ( $iteratorStack[$level] === false && $level > 0 ) {
-                                       $outStack[$level - 1] .= $out;
-                                       array_pop( $outStack );
-                                       array_pop( $iteratorStack );
-                                       array_pop( $indexStack );
-                                       $level--;
-                               }
-                       }
-               }
-               --$expansionDepth;
-               return $outStack[0];
-       }
-
-       /**
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node, $flags );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Implode with no flags specified
-        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
-        *
-        * @param string $sep
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return string
-        */
-       public function implode( $sep, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        *
-        * @param string $sep
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return array
-        */
-       public function virtualImplode( $sep, ...$args ) {
-               $out = [];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               return $out;
-       }
-
-       /**
-        * Virtual implode with brackets
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return array
-        */
-       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
-               $out = [ $start ];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               $out[] = $end;
-               return $out;
-       }
-
-       public function __toString() {
-               return 'frame{}';
-       }
-
-       public function getPDBK( $level = false ) {
-               if ( $level === false ) {
-                       return $this->title->getPrefixedDBkey();
-               } else {
-                       return $this->titleCache[$level] ?? false;
-               }
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               return [];
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return true;
-       }
-
-       /**
-        * @param int|string $name
-        * @return bool Always false in this implementation.
-        */
-       public function getArgument( $name ) {
-               return false;
-       }
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        * @return bool
-        */
-       public function loopCheck( $title ) {
-               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return false;
-       }
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle() {
-               return $this->title;
-       }
-
-       /**
-        * Set the volatile flag
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true ) {
-               $this->volatile = $flag;
-       }
-
-       /**
-        * Get the volatile flag
-        *
-        * @return bool
-        */
-       public function isVolatile() {
-               return $this->volatile;
-       }
-
-       /**
-        * Set the TTL
-        *
-        * @param int $ttl
-        */
-       public function setTTL( $ttl ) {
-               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
-                       $this->ttl = $ttl;
-               }
-       }
-
-       /**
-        * Get the TTL
-        *
-        * @return int|null
-        */
-       public function getTTL() {
-               return $this->ttl;
-       }
-}
-
-/**
- * Expansion frame with template arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPTemplateFrame_DOM extends PPFrame_DOM {
-
-       public $numberedArgs, $namedArgs;
-
-       /**
-        * @var PPFrame_DOM
-        */
-       public $parent;
-       public $numberedExpansionCache, $namedExpansionCache;
-
-       /**
-        * @param Preprocessor $preprocessor
-        * @param bool|PPFrame_DOM $parent
-        * @param array $numberedArgs
-        * @param array $namedArgs
-        * @param bool|Title $title
-        */
-       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
-               $namedArgs = [], $title = false
-       ) {
-               parent::__construct( $preprocessor );
-
-               $this->parent = $parent;
-               $this->numberedArgs = $numberedArgs;
-               $this->namedArgs = $namedArgs;
-               $this->title = $title;
-               $pdbk = $title ? $title->getPrefixedDBkey() : false;
-               $this->titleCache = $parent->titleCache;
-               $this->titleCache[] = $pdbk;
-               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
-               if ( $pdbk !== false ) {
-                       $this->loopCheckHash[$pdbk] = true;
-               }
-               $this->depth = $parent->depth + 1;
-               $this->numberedExpansionCache = $this->namedExpansionCache = [];
-       }
-
-       public function __toString() {
-               $s = 'tplframe{';
-               $first = true;
-               $args = $this->numberedArgs + $this->namedArgs;
-               foreach ( $args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->ownerDocument->saveXML( $value ) ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
-                       return $this->parent->childExpansionCache[$key];
-               }
-               $retval = $this->expand( $root, $flags );
-               if ( !$this->isVolatile() ) {
-                       $this->parent->childExpansionCache[$key] = $retval;
-               }
-               return $retval;
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
-       }
-
-       public function getArguments() {
-               $arguments = [];
-               foreach ( array_merge(
-                               array_keys( $this->numberedArgs ),
-                               array_keys( $this->namedArgs ) ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       public function getNumberedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->numberedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       public function getNamedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->namedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @param int $index
-        * @return string|bool
-        */
-       public function getNumberedArgument( $index ) {
-               if ( !isset( $this->numberedArgs[$index] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
-                       # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand(
-                               $this->numberedArgs[$index],
-                               PPFrame::STRIP_COMMENTS
-                       );
-               }
-               return $this->numberedExpansionCache[$index];
-       }
-
-       /**
-        * @param string $name
-        * @return string|bool
-        */
-       public function getNamedArgument( $name ) {
-               if ( !isset( $this->namedArgs[$name] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->namedExpansionCache[$name] ) ) {
-                       # Trim named arguments post-expand, for backwards compatibility
-                       $this->namedExpansionCache[$name] = trim(
-                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
-               }
-               return $this->namedExpansionCache[$name];
-       }
-
-       /**
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name ) {
-               $text = $this->getNumberedArgument( $name );
-               if ( $text === false ) {
-                       $text = $this->getNamedArgument( $name );
-               }
-               return $text;
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return true;
-       }
-
-       public function setVolatile( $flag = true ) {
-               parent::setVolatile( $flag );
-               $this->parent->setVolatile( $flag );
-       }
-
-       public function setTTL( $ttl ) {
-               parent::setTTL( $ttl );
-               $this->parent->setTTL( $ttl );
-       }
-}
-
-/**
- * Expansion frame with custom arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPCustomFrame_DOM extends PPFrame_DOM {
-
-       public $args;
-
-       public function __construct( $preprocessor, $args ) {
-               parent::__construct( $preprocessor );
-               $this->args = $args;
-       }
-
-       public function __toString() {
-               $s = 'cstmframe{';
-               $first = true;
-               foreach ( $this->args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->args );
-       }
-
-       /**
-        * @param int|string $index
-        * @return string|bool
-        */
-       public function getArgument( $index ) {
-               return $this->args[$index] ?? false;
-       }
-
-       public function getArguments() {
-               return $this->args;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_DOM implements PPNode {
-
-       /**
-        * @var DOMElement
-        */
-       public $node;
-       public $xpath;
-
-       public function __construct( $node, $xpath = false ) {
-               $this->node = $node;
-       }
-
-       /**
-        * @return DOMXPath
-        */
-       public function getXPath() {
-               if ( $this->xpath === null ) {
-                       $this->xpath = new DOMXPath( $this->node->ownerDocument );
-               }
-               return $this->xpath;
-       }
-
-       public function __toString() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       $s = '';
-                       foreach ( $this->node as $node ) {
-                               $s .= $node->ownerDocument->saveXML( $node );
-                       }
-               } else {
-                       $s = $this->node->ownerDocument->saveXML( $this->node );
-               }
-               return $s;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getChildren() {
-               return $this->node->childNodes ? new self( $this->node->childNodes ) : false;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getFirstChild() {
-               return $this->node->firstChild ? new self( $this->node->firstChild ) : false;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getNextSibling() {
-               return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false;
-       }
-
-       /**
-        * @param string $type
-        *
-        * @return bool|PPNode_DOM
-        */
-       public function getChildrenOfType( $type ) {
-               return new self( $this->getXPath()->query( $type, $this->node ) );
-       }
-
-       /**
-        * @return int
-        */
-       public function getLength() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       return $this->node->length;
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * @param int $i
-        * @return bool|PPNode_DOM
-        */
-       public function item( $i ) {
-               $item = $this->node->item( $i );
-               return $item ? new self( $item ) : false;
-       }
-
-       /**
-        * @return string
-        */
-       public function getName() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       return '#nodelist';
-               } else {
-                       return $this->node->nodeName;
-               }
-       }
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *  - name          PPNode name
-        *  - index         String index
-        *  - value         PPNode value
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitArg() {
-               $xpath = $this->getXPath();
-               $names = $xpath->query( 'name', $this->node );
-               $values = $xpath->query( 'value', $this->node );
-               if ( !$names->length || !$values->length ) {
-                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
-               }
-               $name = $names->item( 0 );
-               $index = $name->getAttribute( 'index' );
-               return [
-                       'name' => new self( $name ),
-                       'index' => $index,
-                       'value' => new self( $values->item( 0 ) ) ];
-       }
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitExt() {
-               $xpath = $this->getXPath();
-               $names = $xpath->query( 'name', $this->node );
-               $attrs = $xpath->query( 'attr', $this->node );
-               $inners = $xpath->query( 'inner', $this->node );
-               $closes = $xpath->query( 'close', $this->node );
-               if ( !$names->length || !$attrs->length ) {
-                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
-               }
-               $parts = [
-                       'name' => new self( $names->item( 0 ) ),
-                       'attr' => new self( $attrs->item( 0 ) ) ];
-               if ( $inners->length ) {
-                       $parts['inner'] = new self( $inners->item( 0 ) );
-               }
-               if ( $closes->length ) {
-                       $parts['close'] = new self( $closes->item( 0 ) );
-               }
-               return $parts;
-       }
-
-       /**
-        * Split a "<h>" node
-        * @throws MWException
-        * @return array
-        */
-       public function splitHeading() {
-               if ( $this->getName() !== 'h' ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return [
-                       'i' => $this->node->getAttribute( 'i' ),
-                       'level' => $this->node->getAttribute( 'level' ),
-                       'contents' => $this->getChildren()
-               ];
-       }
-}
index a845047..66f081f 100644 (file)
@@ -795,1459 +795,3 @@ class Preprocessor_Hash extends Preprocessor {
                }
        }
 }
-
-/**
- * Stack class to help Preprocessor::preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDStack_Hash extends PPDStack {
-
-       public function __construct() {
-               $this->elementClass = PPDStackElement_Hash::class;
-               parent::__construct();
-               $this->rootAccum = [];
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDStackElement_Hash extends PPDStackElement {
-
-       public function __construct( $data = [] ) {
-               $this->partClass = PPDPart_Hash::class;
-               parent::__construct( $data );
-       }
-
-       /**
-        * Get the accumulator that would result if the close is not found.
-        *
-        * @param int|bool $openingCount
-        * @return array
-        */
-       public function breakSyntax( $openingCount = false ) {
-               if ( $this->open == "\n" ) {
-                       $accum = array_merge( [ $this->savedPrefix ], $this->parts[0]->out );
-               } else {
-                       if ( $openingCount === false ) {
-                               $openingCount = $this->count;
-                       }
-                       $s = substr( $this->open, 0, -1 );
-                       $s .= str_repeat(
-                               substr( $this->open, -1 ),
-                               $openingCount - strlen( $s )
-                       );
-                       $accum = [ $this->savedPrefix . $s ];
-                       $lastIndex = 0;
-                       $first = true;
-                       foreach ( $this->parts as $part ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } elseif ( is_string( $accum[$lastIndex] ) ) {
-                                       $accum[$lastIndex] .= '|';
-                               } else {
-                                       $accum[++$lastIndex] = '|';
-                               }
-                               foreach ( $part->out as $node ) {
-                                       if ( is_string( $node ) && is_string( $accum[$lastIndex] ) ) {
-                                               $accum[$lastIndex] .= $node;
-                                       } else {
-                                               $accum[++$lastIndex] = $node;
-                                       }
-                               }
-                       }
-               }
-               return $accum;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDPart_Hash extends PPDPart {
-
-       public function __construct( $out = '' ) {
-               if ( $out !== '' ) {
-                       $accum = [ $out ];
-               } else {
-                       $accum = [];
-               }
-               parent::__construct( $accum );
-       }
-}
-
-/**
- * An expansion frame, used as a context to expand the result of preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPFrame_Hash implements PPFrame {
-
-       /**
-        * @var Parser
-        */
-       public $parser;
-
-       /**
-        * @var Preprocessor
-        */
-       public $preprocessor;
-
-       /**
-        * @var Title
-        */
-       public $title;
-       public $titleCache;
-
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       public $loopCheckHash;
-
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       public $depth;
-
-       private $volatile = false;
-       private $ttl = null;
-
-       /**
-        * @var array
-        */
-       protected $childExpansionCache;
-
-       /**
-        * Construct a new preprocessor frame.
-        * @param Preprocessor $preprocessor The parent preprocessor
-        */
-       public function __construct( $preprocessor ) {
-               $this->preprocessor = $preprocessor;
-               $this->parser = $preprocessor->parser;
-               $this->title = $this->parser->mTitle;
-               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
-               $this->loopCheckHash = [];
-               $this->depth = 0;
-               $this->childExpansionCache = [];
-       }
-
-       /**
-        * Create a new child frame
-        * $args is optionally a multi-root PPNode or array containing the template arguments
-        *
-        * @param array|bool|PPNode_Hash_Array $args
-        * @param Title|bool $title
-        * @param int $indexOffset
-        * @throws MWException
-        * @return PPTemplateFrame_Hash
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
-               $namedArgs = [];
-               $numberedArgs = [];
-               if ( $title === false ) {
-                       $title = $this->title;
-               }
-               if ( $args !== false ) {
-                       if ( $args instanceof PPNode_Hash_Array ) {
-                               $args = $args->value;
-                       } elseif ( !is_array( $args ) ) {
-                               throw new MWException( __METHOD__ . ': $args must be array or PPNode_Hash_Array' );
-                       }
-                       foreach ( $args as $arg ) {
-                               $bits = $arg->splitArg();
-                               if ( $bits['index'] !== '' ) {
-                                       // Numbered parameter
-                                       $index = $bits['index'] - $indexOffset;
-                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $index ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $numberedArgs[$index] = $bits['value'];
-                                       unset( $namedArgs[$index] );
-                               } else {
-                                       // Named parameter
-                                       $name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
-                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $name ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $namedArgs[$name] = $bits['value'];
-                                       unset( $numberedArgs[$name] );
-                               }
-                       }
-               }
-               return new PPTemplateFrame_Hash( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               // we don't have a parent, so we don't have a cache
-               return $this->expand( $root, $flags );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 ) {
-               static $expansionDepth = 0;
-               if ( is_string( $root ) ) {
-                       return $root;
-               }
-
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
-                       $this->parser->limitationWarn( 'node-count-exceeded',
-                                       $this->parser->mPPNodeCount,
-                                       $this->parser->mOptions->getMaxPPNodeCount()
-                       );
-                       return '<span class="error">Node-count limit exceeded</span>';
-               }
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
-                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
-                                       $expansionDepth,
-                                       $this->parser->mOptions->getMaxPPExpandDepth()
-                       );
-                       return '<span class="error">Expansion depth limit exceeded</span>';
-               }
-               ++$expansionDepth;
-               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
-                       $this->parser->mHighestExpansionDepth = $expansionDepth;
-               }
-
-               $outStack = [ '', '' ];
-               $iteratorStack = [ false, $root ];
-               $indexStack = [ 0, 0 ];
-
-               while ( count( $iteratorStack ) > 1 ) {
-                       $level = count( $outStack ) - 1;
-                       $iteratorNode =& $iteratorStack[$level];
-                       $out =& $outStack[$level];
-                       $index =& $indexStack[$level];
-
-                       if ( is_array( $iteratorNode ) ) {
-                               if ( $index >= count( $iteratorNode ) ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode[$index];
-                                       $index++;
-                               }
-                       } elseif ( $iteratorNode instanceof PPNode_Hash_Array ) {
-                               if ( $index >= $iteratorNode->getLength() ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode->item( $index );
-                                       $index++;
-                               }
-                       } else {
-                               // Copy to $contextNode and then delete from iterator stack,
-                               // because this is not an iterator but we do have to execute it once
-                               $contextNode = $iteratorStack[$level];
-                               $iteratorStack[$level] = false;
-                       }
-
-                       $newIterator = false;
-                       $contextName = false;
-                       $contextChildren = false;
-
-                       if ( $contextNode === false ) {
-                               // nothing to do
-                       } elseif ( is_string( $contextNode ) ) {
-                               $out .= $contextNode;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Array ) {
-                               $newIterator = $contextNode;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Attr ) {
-                               // No output
-                       } elseif ( $contextNode instanceof PPNode_Hash_Text ) {
-                               $out .= $contextNode->value;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Tree ) {
-                               $contextName = $contextNode->name;
-                               $contextChildren = $contextNode->getRawChildren();
-                       } elseif ( is_array( $contextNode ) ) {
-                               // Node descriptor array
-                               if ( count( $contextNode ) !== 2 ) {
-                                       throw new MWException( __METHOD__ .
-                                               ': found an array where a node descriptor should be' );
-                               }
-                               list( $contextName, $contextChildren ) = $contextNode;
-                       } else {
-                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
-                       }
-
-                       // Handle node descriptor array or tree object
-                       if ( $contextName === false ) {
-                               // Not a node, already handled above
-                       } elseif ( $contextName[0] === '@' ) {
-                               // Attribute: no output
-                       } elseif ( $contextName === 'template' ) {
-                               # Double-brace expansion
-                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
-                               if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                       $newIterator = $this->virtualBracketedImplode(
-                                               '{{', '|', '}}',
-                                               $bits['title'],
-                                               $bits['parts']
-                                       );
-                               } else {
-                                       $ret = $this->parser->braceSubstitution( $bits, $this );
-                                       if ( isset( $ret['object'] ) ) {
-                                               $newIterator = $ret['object'];
-                                       } else {
-                                               $out .= $ret['text'];
-                                       }
-                               }
-                       } elseif ( $contextName === 'tplarg' ) {
-                               # Triple-brace expansion
-                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
-                               if ( $flags & PPFrame::NO_ARGS ) {
-                                       $newIterator = $this->virtualBracketedImplode(
-                                               '{{{', '|', '}}}',
-                                               $bits['title'],
-                                               $bits['parts']
-                                       );
-                               } else {
-                                       $ret = $this->parser->argSubstitution( $bits, $this );
-                                       if ( isset( $ret['object'] ) ) {
-                                               $newIterator = $ret['object'];
-                                       } else {
-                                               $out .= $ret['text'];
-                                       }
-                               }
-                       } elseif ( $contextName === 'comment' ) {
-                               # HTML-style comment
-                               # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
-                               # Not in RECOVER_COMMENTS mode (msgnw) though.
-                               if ( ( $this->parser->ot['html']
-                                       || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
-                                       || ( $flags & PPFrame::STRIP_COMMENTS )
-                                       ) && !( $flags & PPFrame::RECOVER_COMMENTS )
-                               ) {
-                                       $out .= '';
-                               } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                       # Add a strip marker in PST mode so that pstPass2() can
-                                       # run some old-fashioned regexes on the result.
-                                       # Not in RECOVER_COMMENTS mode (extractSections) though.
-                                       $out .= $this->parser->insertStripItem( $contextChildren[0] );
-                               } else {
-                                       # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
-                                       $out .= $contextChildren[0];
-                               }
-                       } elseif ( $contextName === 'ignore' ) {
-                               # Output suppression used by <includeonly> etc.
-                               # OT_WIKI will only respect <ignore> in substed templates.
-                               # The other output types respect it unless NO_IGNORE is set.
-                               # extractSections() sets NO_IGNORE and so never respects it.
-                               if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
-                                       || ( $flags & PPFrame::NO_IGNORE )
-                               ) {
-                                       $out .= $contextChildren[0];
-                               } else {
-                                       // $out .= '';
-                               }
-                       } elseif ( $contextName === 'ext' ) {
-                               # Extension tag
-                               $bits = PPNode_Hash_Tree::splitRawExt( $contextChildren ) +
-                                       [ 'attr' => null, 'inner' => null, 'close' => null ];
-                               if ( $flags & PPFrame::NO_TAGS ) {
-                                       $s = '<' . $bits['name']->getFirstChild()->value;
-                                       if ( $bits['attr'] ) {
-                                               $s .= $bits['attr']->getFirstChild()->value;
-                                       }
-                                       if ( $bits['inner'] ) {
-                                               $s .= '>' . $bits['inner']->getFirstChild()->value;
-                                               if ( $bits['close'] ) {
-                                                       $s .= $bits['close']->getFirstChild()->value;
-                                               }
-                                       } else {
-                                               $s .= '/>';
-                                       }
-                                       $out .= $s;
-                               } else {
-                                       $out .= $this->parser->extensionSubstitution( $bits, $this );
-                               }
-                       } elseif ( $contextName === 'h' ) {
-                               # Heading
-                               if ( $this->parser->ot['html'] ) {
-                                       # Expand immediately and insert heading index marker
-                                       $s = $this->expand( $contextChildren, $flags );
-                                       $bits = PPNode_Hash_Tree::splitRawHeading( $contextChildren );
-                                       $titleText = $this->title->getPrefixedDBkey();
-                                       $this->parser->mHeadings[] = [ $titleText, $bits['i'] ];
-                                       $serial = count( $this->parser->mHeadings ) - 1;
-                                       $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
-                                       $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
-                                       $this->parser->mStripState->addGeneral( $marker, '' );
-                                       $out .= $s;
-                               } else {
-                                       # Expand in virtual stack
-                                       $newIterator = $contextChildren;
-                               }
-                       } else {
-                               # Generic recursive expansion
-                               $newIterator = $contextChildren;
-                       }
-
-                       if ( $newIterator !== false ) {
-                               $outStack[] = '';
-                               $iteratorStack[] = $newIterator;
-                               $indexStack[] = 0;
-                       } elseif ( $iteratorStack[$level] === false ) {
-                               // Return accumulated value to parent
-                               // With tail recursion
-                               while ( $iteratorStack[$level] === false && $level > 0 ) {
-                                       $outStack[$level - 1] .= $out;
-                                       array_pop( $outStack );
-                                       array_pop( $iteratorStack );
-                                       array_pop( $indexStack );
-                                       $level--;
-                               }
-                       }
-               }
-               --$expansionDepth;
-               return $outStack[0];
-       }
-
-       /**
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode ...$args
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node, $flags );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Implode with no flags specified
-        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
-        * @param string $sep
-        * @param string|PPNode ...$args
-        * @return string
-        */
-       public function implode( $sep, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        *
-        * @param string $sep
-        * @param string|PPNode ...$args
-        * @return PPNode_Hash_Array
-        */
-       public function virtualImplode( $sep, ...$args ) {
-               $out = [];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               return new PPNode_Hash_Array( $out );
-       }
-
-       /**
-        * Virtual implode with brackets
-        *
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode ...$args
-        * @return PPNode_Hash_Array
-        */
-       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
-               $out = [ $start ];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               $out[] = $end;
-               return new PPNode_Hash_Array( $out );
-       }
-
-       public function __toString() {
-               return 'frame{}';
-       }
-
-       /**
-        * @param bool $level
-        * @return array|bool|string
-        */
-       public function getPDBK( $level = false ) {
-               if ( $level === false ) {
-                       return $this->title->getPrefixedDBkey();
-               } else {
-                       return $this->titleCache[$level] ?? false;
-               }
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               return [];
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return true;
-       }
-
-       /**
-        * @param int|string $name
-        * @return bool Always false in this implementation.
-        */
-       public function getArgument( $name ) {
-               return false;
-       }
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        *
-        * @return bool
-        */
-       public function loopCheck( $title ) {
-               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return false;
-       }
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle() {
-               return $this->title;
-       }
-
-       /**
-        * Set the volatile flag
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true ) {
-               $this->volatile = $flag;
-       }
-
-       /**
-        * Get the volatile flag
-        *
-        * @return bool
-        */
-       public function isVolatile() {
-               return $this->volatile;
-       }
-
-       /**
-        * Set the TTL
-        *
-        * @param int $ttl
-        */
-       public function setTTL( $ttl ) {
-               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
-                       $this->ttl = $ttl;
-               }
-       }
-
-       /**
-        * Get the TTL
-        *
-        * @return int|null
-        */
-       public function getTTL() {
-               return $this->ttl;
-       }
-}
-
-/**
- * Expansion frame with template arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPTemplateFrame_Hash extends PPFrame_Hash {
-
-       public $numberedArgs, $namedArgs, $parent;
-       public $numberedExpansionCache, $namedExpansionCache;
-
-       /**
-        * @param Preprocessor $preprocessor
-        * @param bool|PPFrame $parent
-        * @param array $numberedArgs
-        * @param array $namedArgs
-        * @param bool|Title $title
-        */
-       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
-               $namedArgs = [], $title = false
-       ) {
-               parent::__construct( $preprocessor );
-
-               $this->parent = $parent;
-               $this->numberedArgs = $numberedArgs;
-               $this->namedArgs = $namedArgs;
-               $this->title = $title;
-               $pdbk = $title ? $title->getPrefixedDBkey() : false;
-               $this->titleCache = $parent->titleCache;
-               $this->titleCache[] = $pdbk;
-               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
-               if ( $pdbk !== false ) {
-                       $this->loopCheckHash[$pdbk] = true;
-               }
-               $this->depth = $parent->depth + 1;
-               $this->numberedExpansionCache = $this->namedExpansionCache = [];
-       }
-
-       public function __toString() {
-               $s = 'tplframe{';
-               $first = true;
-               $args = $this->numberedArgs + $this->namedArgs;
-               foreach ( $args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
-                       return $this->parent->childExpansionCache[$key];
-               }
-               $retval = $this->expand( $root, $flags );
-               if ( !$this->isVolatile() ) {
-                       $this->parent->childExpansionCache[$key] = $retval;
-               }
-               return $retval;
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               $arguments = [];
-               foreach ( array_merge(
-                               array_keys( $this->numberedArgs ),
-                               array_keys( $this->namedArgs ) ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->numberedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->namedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @param int $index
-        * @return string|bool
-        */
-       public function getNumberedArgument( $index ) {
-               if ( !isset( $this->numberedArgs[$index] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
-                       # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand(
-                               $this->numberedArgs[$index],
-                               PPFrame::STRIP_COMMENTS
-                       );
-               }
-               return $this->numberedExpansionCache[$index];
-       }
-
-       /**
-        * @param string $name
-        * @return string|bool
-        */
-       public function getNamedArgument( $name ) {
-               if ( !isset( $this->namedArgs[$name] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->namedExpansionCache[$name] ) ) {
-                       # Trim named arguments post-expand, for backwards compatibility
-                       $this->namedExpansionCache[$name] = trim(
-                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
-               }
-               return $this->namedExpansionCache[$name];
-       }
-
-       /**
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name ) {
-               $text = $this->getNumberedArgument( $name );
-               if ( $text === false ) {
-                       $text = $this->getNamedArgument( $name );
-               }
-               return $text;
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return true;
-       }
-
-       public function setVolatile( $flag = true ) {
-               parent::setVolatile( $flag );
-               $this->parent->setVolatile( $flag );
-       }
-
-       public function setTTL( $ttl ) {
-               parent::setTTL( $ttl );
-               $this->parent->setTTL( $ttl );
-       }
-}
-
-/**
- * Expansion frame with custom arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPCustomFrame_Hash extends PPFrame_Hash {
-
-       public $args;
-
-       public function __construct( $preprocessor, $args ) {
-               parent::__construct( $preprocessor );
-               $this->args = $args;
-       }
-
-       public function __toString() {
-               $s = 'cstmframe{';
-               $first = true;
-               foreach ( $this->args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->args );
-       }
-
-       /**
-        * @param int|string $index
-        * @return string|bool
-        */
-       public function getArgument( $index ) {
-               return $this->args[$index] ?? false;
-       }
-
-       public function getArguments() {
-               return $this->args;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Tree implements PPNode {
-
-       public $name;
-
-       /**
-        * The store array for children of this node. It is "raw" in the sense that
-        * nodes are two-element arrays ("descriptors") rather than PPNode_Hash_*
-        * objects.
-        */
-       private $rawChildren;
-
-       /**
-        * The store array for the siblings of this node, including this node itself.
-        */
-       private $store;
-
-       /**
-        * The index into $this->store which contains the descriptor of this node.
-        */
-       private $index;
-
-       /**
-        * The offset of the name within descriptors, used in some places for
-        * readability.
-        */
-       const NAME = 0;
-
-       /**
-        * The offset of the child list within descriptors, used in some places for
-        * readability.
-        */
-       const CHILDREN = 1;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $this->store = $store;
-               $this->index = $index;
-               list( $this->name, $this->rawChildren ) = $this->store[$index];
-       }
-
-       /**
-        * Construct an appropriate PPNode_Hash_* object with a class that depends
-        * on what is at the relevant store index.
-        *
-        * @param array $store
-        * @param int $index
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|false
-        * @throws MWException
-        */
-       public static function factory( array $store, $index ) {
-               if ( !isset( $store[$index] ) ) {
-                       return false;
-               }
-
-               $descriptor = $store[$index];
-               if ( is_string( $descriptor ) ) {
-                       $class = PPNode_Hash_Text::class;
-               } elseif ( is_array( $descriptor ) ) {
-                       if ( $descriptor[self::NAME][0] === '@' ) {
-                               $class = PPNode_Hash_Attr::class;
-                       } else {
-                               $class = self::class;
-                       }
-               } else {
-                       throw new MWException( __METHOD__ . ': invalid node descriptor' );
-               }
-               return new $class( $store, $index );
-       }
-
-       /**
-        * Convert a node to XML, for debugging
-        * @return string
-        */
-       public function __toString() {
-               $inner = '';
-               $attribs = '';
-               for ( $node = $this->getFirstChild(); $node; $node = $node->getNextSibling() ) {
-                       if ( $node instanceof PPNode_Hash_Attr ) {
-                               $attribs .= ' ' . $node->name . '="' . htmlspecialchars( $node->value ) . '"';
-                       } else {
-                               $inner .= $node->__toString();
-                       }
-               }
-               if ( $inner === '' ) {
-                       return "<{$this->name}$attribs/>";
-               } else {
-                       return "<{$this->name}$attribs>$inner</{$this->name}>";
-               }
-       }
-
-       /**
-        * @return PPNode_Hash_Array
-        */
-       public function getChildren() {
-               $children = [];
-               foreach ( $this->rawChildren as $i => $child ) {
-                       $children[] = self::factory( $this->rawChildren, $i );
-               }
-               return new PPNode_Hash_Array( $children );
-       }
-
-       /**
-        * Get the first child, or false if there is none. Note that this will
-        * return a temporary proxy object: different instances will be returned
-        * if this is called more than once on the same node.
-        *
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
-        */
-       public function getFirstChild() {
-               if ( !isset( $this->rawChildren[0] ) ) {
-                       return false;
-               } else {
-                       return self::factory( $this->rawChildren, 0 );
-               }
-       }
-
-       /**
-        * Get the next sibling, or false if there is none. Note that this will
-        * return a temporary proxy object: different instances will be returned
-        * if this is called more than once on the same node.
-        *
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
-        */
-       public function getNextSibling() {
-               return self::factory( $this->store, $this->index + 1 );
-       }
-
-       /**
-        * Get an array of the children with a given node name
-        *
-        * @param string $name
-        * @return PPNode_Hash_Array
-        */
-       public function getChildrenOfType( $name ) {
-               $children = [];
-               foreach ( $this->rawChildren as $i => $child ) {
-                       if ( is_array( $child ) && $child[self::NAME] === $name ) {
-                               $children[] = self::factory( $this->rawChildren, $i );
-                       }
-               }
-               return new PPNode_Hash_Array( $children );
-       }
-
-       /**
-        * Get the raw child array. For internal use.
-        * @return array
-        */
-       public function getRawChildren() {
-               return $this->rawChildren;
-       }
-
-       /**
-        * @return bool
-        */
-       public function getLength() {
-               return false;
-       }
-
-       /**
-        * @param int $i
-        * @return bool
-        */
-       public function item( $i ) {
-               return false;
-       }
-
-       /**
-        * @return string
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *  - name          PPNode name
-        *  - index         String index
-        *  - value         PPNode value
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitArg() {
-               return self::splitRawArg( $this->rawChildren );
-       }
-
-       /**
-        * Like splitArg() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawArg( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       if ( $child[self::NAME] === 'name' ) {
-                               $bits['name'] = new self( $children, $i );
-                               if ( isset( $child[self::CHILDREN][0][self::NAME] )
-                                       && $child[self::CHILDREN][0][self::NAME] === '@index'
-                               ) {
-                                       $bits['index'] = $child[self::CHILDREN][0][self::CHILDREN][0];
-                               }
-                       } elseif ( $child[self::NAME] === 'value' ) {
-                               $bits['value'] = new self( $children, $i );
-                       }
-               }
-
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
-               }
-               if ( !isset( $bits['index'] ) ) {
-                       $bits['index'] = '';
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitExt() {
-               return self::splitRawExt( $this->rawChildren );
-       }
-
-       /**
-        * Like splitExt() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawExt( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       switch ( $child[self::NAME] ) {
-                               case 'name':
-                                       $bits['name'] = new self( $children, $i );
-                                       break;
-                               case 'attr':
-                                       $bits['attr'] = new self( $children, $i );
-                                       break;
-                               case 'inner':
-                                       $bits['inner'] = new self( $children, $i );
-                                       break;
-                               case 'close':
-                                       $bits['close'] = new self( $children, $i );
-                                       break;
-                       }
-               }
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an "<h>" node
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitHeading() {
-               if ( $this->name !== 'h' ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return self::splitRawHeading( $this->rawChildren );
-       }
-
-       /**
-        * Like splitHeading() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawHeading( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       if ( $child[self::NAME] === '@i' ) {
-                               $bits['i'] = $child[self::CHILDREN][0];
-                       } elseif ( $child[self::NAME] === '@level' ) {
-                               $bits['level'] = $child[self::CHILDREN][0];
-                       }
-               }
-               if ( !isset( $bits['i'] ) ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split a "<template>" or "<tplarg>" node
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitTemplate() {
-               return self::splitRawTemplate( $this->rawChildren );
-       }
-
-       /**
-        * Like splitTemplate() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawTemplate( array $children ) {
-               $parts = [];
-               $bits = [ 'lineStart' => '' ];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       switch ( $child[self::NAME] ) {
-                               case 'title':
-                                       $bits['title'] = new self( $children, $i );
-                                       break;
-                               case 'part':
-                                       $parts[] = new self( $children, $i );
-                                       break;
-                               case '@lineStart':
-                                       $bits['lineStart'] = '1';
-                                       break;
-                       }
-               }
-               if ( !isset( $bits['title'] ) ) {
-                       throw new MWException( 'Invalid node passed to ' . __METHOD__ );
-               }
-               $bits['parts'] = new PPNode_Hash_Array( $parts );
-               return $bits;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Text implements PPNode {
-
-       public $value;
-       private $store, $index;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $this->value = $store[$index];
-               if ( !is_scalar( $this->value ) ) {
-                       throw new MWException( __CLASS__ . ' given object instead of string' );
-               }
-               $this->store = $store;
-               $this->index = $index;
-       }
-
-       public function __toString() {
-               return htmlspecialchars( $this->value );
-       }
-
-       public function getNextSibling() {
-               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function getLength() {
-               return false;
-       }
-
-       public function item( $i ) {
-               return false;
-       }
-
-       public function getName() {
-               return '#text';
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Array implements PPNode {
-
-       public $value;
-
-       public function __construct( $value ) {
-               $this->value = $value;
-       }
-
-       public function __toString() {
-               return var_export( $this, true );
-       }
-
-       public function getLength() {
-               return count( $this->value );
-       }
-
-       public function item( $i ) {
-               return $this->value[$i];
-       }
-
-       public function getName() {
-               return '#nodelist';
-       }
-
-       public function getNextSibling() {
-               return false;
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Attr implements PPNode {
-
-       public $name, $value;
-       private $store, $index;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $descriptor = $store[$index];
-               if ( $descriptor[PPNode_Hash_Tree::NAME][0] !== '@' ) {
-                       throw new MWException( __METHOD__ . ': invalid name in attribute descriptor' );
-               }
-               $this->name = substr( $descriptor[PPNode_Hash_Tree::NAME], 1 );
-               $this->value = $descriptor[PPNode_Hash_Tree::CHILDREN][0];
-               $this->store = $store;
-               $this->index = $index;
-       }
-
-       public function __toString() {
-               return "<@{$this->name}>" . htmlspecialchars( $this->value ) . "</@{$this->name}>";
-       }
-
-       public function getName() {
-               return $this->name;
-       }
-
-       public function getNextSibling() {
-               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function getLength() {
-               return false;
-       }
-
-       public function item( $i ) {
-               return false;
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
index 518846c..abf0714 100644 (file)
@@ -1918,7 +1918,8 @@ class Sanitizer {
                        # such as <math> when it is rasterized, or if $wgAllowImageTag is
                        # true
                        'img'        => array_merge( $common, [ 'alt', 'src', 'width', 'height', 'srcset' ] ),
-
+                       # Attributes for A/V tags added in T163583 / T133673
+                       'audio'      => array_merge( $common, [ 'controls', 'preload', 'width', 'height' ] ),
                        'video'      => array_merge( $common, [ 'poster', 'controls', 'preload', 'width', 'height' ] ),
                        'source'     => array_merge( $common, [ 'type', 'src' ] ),
                        'track'      => array_merge( $common, [ 'type', 'src', 'srclang', 'kind', 'label' ] ),
@@ -1956,6 +1957,7 @@ class Sanitizer {
 
                        // HTML 5 section 4.5
                        'figure'     => $common,
+                       'figure-inline' => $common, # T118520
                        'figcaption' => $common,
 
                        # HTML 5 section 4.6
index 2c9fbc8..0abe1a5 100644 (file)
@@ -114,7 +114,9 @@ class PoolWorkArticleView extends PoolCounterWork {
                $this->revision = $revision;
                $this->audience = $audience;
                $this->cacheKey = $this->parserCache->getKey( $page, $parserOptions );
-               $keyPrefix = $this->cacheKey ?: wfMemcKey( 'articleview', 'missingcachekey' );
+               $keyPrefix = $this->cacheKey ?: ObjectCache::getLocalClusterInstance()->makeKey(
+                       'articleview', 'missingcachekey'
+               );
 
                parent::__construct( 'ArticleView', $keyPrefix . ':revid:' . $revid );
        }
index e354d55..1f21c1b 100644 (file)
@@ -34,12 +34,13 @@ use LanguageCode;
 use LanguageConverter;
 use MediaWiki\Auth\AuthManager;
 use MediaWiki\Auth\PasswordAuthenticationRequest;
+use MediaWiki\Config\ServiceOptions;
 use MediaWiki\Linker\LinkRenderer;
 use MediaWiki\MediaWikiServices;
 use MessageLocalizer;
 use MWException;
-use MWNamespace;
 use MWTimestamp;
+use NamespaceInfo;
 use OutputPage;
 use Parser;
 use ParserOptions;
@@ -61,8 +62,8 @@ use Xml;
 class DefaultPreferencesFactory implements PreferencesFactory {
        use LoggerAwareTrait;
 
-       /** @var Config */
-       protected $config;
+       /** @var ServiceOptions */
+       protected $options;
 
        /** @var Language The wiki's content language. */
        protected $contLang;
@@ -73,22 +74,74 @@ class DefaultPreferencesFactory implements PreferencesFactory {
        /** @var LinkRenderer */
        protected $linkRenderer;
 
+       /** @var NamespaceInfo */
+       protected $nsInfo;
+
+       /**
+        * TODO Make this a const when we drop HHVM support (T192166)
+        *
+        * @var array
+        * @since 1.34
+        */
+       public static $constructorOptions = [
+               'AllowUserCss',
+               'AllowUserCssPrefs',
+               'AllowUserJs',
+               'DefaultSkin',
+               'DisableLangConversion',
+               'EmailAuthentication',
+               'EmailConfirmToEdit',
+               'EnableEmail',
+               'EnableUserEmail',
+               'EnableUserEmailBlacklist',
+               'EnotifMinorEdits',
+               'EnotifRevealEditorAddress',
+               'EnotifUserTalk',
+               'EnotifWatchlist',
+               'HiddenPrefs',
+               'ImageLimits',
+               'LanguageCode',
+               'LocalTZoffset',
+               'MaxSigChars',
+               'RCMaxAge',
+               'RCShowWatchingUsers',
+               'RCWatchCategoryMembership',
+               'SecureLogin',
+               'ThumbLimits',
+       ];
+
        /**
-        * @param Config $config
+        * Do not call this directly.  Get it from MediaWikiServices.
+        *
+        * @param array|Config $options Config accepted for backwards compatibility
         * @param Language $contLang
         * @param AuthManager $authManager
         * @param LinkRenderer $linkRenderer
+        * @param NamespaceInfo|null $nsInfo
         */
        public function __construct(
-               Config $config,
+               $options,
                Language $contLang,
                AuthManager $authManager,
-               LinkRenderer $linkRenderer
+               LinkRenderer $linkRenderer,
+               NamespaceInfo $nsInfo = null
        ) {
-               $this->config = $config;
+               if ( $options instanceof Config ) {
+                       wfDeprecated( __METHOD__ . ' with Config parameter', '1.34' );
+                       $options = new ServiceOptions( self::$constructorOptions, $options );
+               }
+
+               $options->assertRequiredOptions( self::$constructorOptions );
+
+               if ( !$nsInfo ) {
+                       wfDeprecated( __METHOD__ . ' with no NamespaceInfo argument', '1.34' );
+                       $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+               }
+               $this->options = $options;
                $this->contLang = $contLang;
                $this->authManager = $authManager;
                $this->linkRenderer = $linkRenderer;
+               $this->nsInfo = $nsInfo;
                $this->logger = new NullLogger();
        }
 
@@ -146,7 +199,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                User $user, IContextSource $context, &$defaultPreferences
        ) {
                # # Remove preferences that wikis don't want to use
-               foreach ( $this->config->get( 'HiddenPrefs' ) as $pref ) {
+               foreach ( $this->options->get( 'HiddenPrefs' ) as $pref ) {
                        if ( isset( $defaultPreferences[$pref] ) ) {
                                unset( $defaultPreferences[$pref] );
                        }
@@ -364,7 +417,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        ];
                }
                // Only show prefershttps if secure login is turned on
-               if ( $this->config->get( 'SecureLogin' ) && $canIPUseHTTPS ) {
+               if ( $this->options->get( 'SecureLogin' ) && $canIPUseHTTPS ) {
                        $defaultPreferences['prefershttps'] = [
                                'type' => 'toggle',
                                'label-message' => 'tog-prefershttps',
@@ -374,7 +427,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                }
 
                $languages = Language::fetchLanguageNames( null, 'mwfile' );
-               $languageCode = $this->config->get( 'LanguageCode' );
+               $languageCode = $this->options->get( 'LanguageCode' );
                if ( !array_key_exists( $languageCode, $languages ) ) {
                        $languages[$languageCode] = $languageCode;
                        // Sort the array again
@@ -408,7 +461,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                ];
 
                // see if there are multiple language variants to choose from
-               if ( !$this->config->get( 'DisableLangConversion' ) ) {
+               if ( !$this->options->get( 'DisableLangConversion' ) ) {
                        foreach ( LanguageConverter::$languagesWithVariants as $langCode ) {
                                if ( $langCode == $this->contLang->getCode() ) {
                                        if ( !$this->contLang->hasVariants() ) {
@@ -474,7 +527,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                ];
                $defaultPreferences['nickname'] = [
                        'type' => $this->authManager->allowsPropertyChange( 'nickname' ) ? 'text' : 'info',
-                       'maxlength' => $this->config->get( 'MaxSigChars' ),
+                       'maxlength' => $this->options->get( 'MaxSigChars' ),
                        'label-message' => 'yournick',
                        'validation-callback' => function ( $signature, $alldata, HTMLForm $form ) {
                                return $this->validateSignature( $signature, $alldata, $form );
@@ -494,13 +547,13 @@ class DefaultPreferencesFactory implements PreferencesFactory {
 
                # # Email stuff
 
-               if ( $this->config->get( 'EnableEmail' ) ) {
+               if ( $this->options->get( 'EnableEmail' ) ) {
                        if ( $canViewPrivateInfo ) {
-                               $helpMessages[] = $this->config->get( 'EmailConfirmToEdit' )
+                               $helpMessages[] = $this->options->get( 'EmailConfirmToEdit' )
                                                ? 'prefs-help-email-required'
                                                : 'prefs-help-email';
 
-                               if ( $this->config->get( 'EnableUserEmail' ) ) {
+                               if ( $this->options->get( 'EnableUserEmail' ) ) {
                                        // additional messages when users can send email to each other
                                        $helpMessages[] = 'prefs-help-email-others';
                                }
@@ -531,7 +584,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
 
                        $disableEmailPrefs = false;
 
-                       if ( $this->config->get( 'EmailAuthentication' ) ) {
+                       if ( $this->options->get( 'EmailAuthentication' ) ) {
                                $emailauthenticationclass = 'mw-email-not-authenticated';
                                if ( $user->getEmail() ) {
                                        if ( $user->getEmailAuthenticationTimestamp() ) {
@@ -575,7 +628,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                }
                        }
 
-                       if ( $this->config->get( 'EnableUserEmail' ) && $user->isAllowed( 'sendemail' ) ) {
+                       if ( $this->options->get( 'EnableUserEmail' ) && $user->isAllowed( 'sendemail' ) ) {
                                $defaultPreferences['disablemail'] = [
                                        'id' => 'wpAllowEmail',
                                        'type' => 'toggle',
@@ -600,7 +653,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                        'disabled' => $disableEmailPrefs,
                                ];
 
-                               if ( $this->config->get( 'EnableUserEmailBlacklist' ) ) {
+                               if ( $this->options->get( 'EnableUserEmailBlacklist' ) ) {
                                        $defaultPreferences['email-blacklist'] = [
                                                'type' => 'usersmultiselect',
                                                'label-message' => 'email-blacklist-label',
@@ -611,7 +664,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                }
                        }
 
-                       if ( $this->config->get( 'EnotifWatchlist' ) ) {
+                       if ( $this->options->get( 'EnotifWatchlist' ) ) {
                                $defaultPreferences['enotifwatchlistpages'] = [
                                        'type' => 'toggle',
                                        'section' => 'personal/email',
@@ -619,7 +672,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                        'disabled' => $disableEmailPrefs,
                                ];
                        }
-                       if ( $this->config->get( 'EnotifUserTalk' ) ) {
+                       if ( $this->options->get( 'EnotifUserTalk' ) ) {
                                $defaultPreferences['enotifusertalkpages'] = [
                                        'type' => 'toggle',
                                        'section' => 'personal/email',
@@ -627,8 +680,9 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                        'disabled' => $disableEmailPrefs,
                                ];
                        }
-                       if ( $this->config->get( 'EnotifUserTalk' ) || $this->config->get( 'EnotifWatchlist' ) ) {
-                               if ( $this->config->get( 'EnotifMinorEdits' ) ) {
+                       if ( $this->options->get( 'EnotifUserTalk' ) ||
+                       $this->options->get( 'EnotifWatchlist' ) ) {
+                               if ( $this->options->get( 'EnotifMinorEdits' ) ) {
                                        $defaultPreferences['enotifminoredits'] = [
                                                'type' => 'toggle',
                                                'section' => 'personal/email',
@@ -637,7 +691,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                                        ];
                                }
 
-                               if ( $this->config->get( 'EnotifRevealEditorAddress' ) ) {
+                               if ( $this->options->get( 'EnotifRevealEditorAddress' ) ) {
                                        $defaultPreferences['enotifrevealaddr'] = [
                                                'type' => 'toggle',
                                                'section' => 'personal/email',
@@ -668,8 +722,8 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        ];
                }
 
-               $allowUserCss = $this->config->get( 'AllowUserCss' );
-               $allowUserJs = $this->config->get( 'AllowUserJs' );
+               $allowUserCss = $this->options->get( 'AllowUserCss' );
+               $allowUserJs = $this->options->get( 'AllowUserJs' );
                # Create links to user CSS/JS pages for all skins
                # This code is basically copied from generateSkinOptions().  It'd
                # be nice to somehow merge this back in there to avoid redundancy.
@@ -822,7 +876,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                ];
 
                # # Page Rendering ##############################
-               if ( $this->config->get( 'AllowUserCssPrefs' ) ) {
+               if ( $this->options->get( 'AllowUserCssPrefs' ) ) {
                        $defaultPreferences['underline'] = [
                                'type' => 'select',
                                'options' => [
@@ -891,7 +945,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        'label-message' => 'tog-editondblclick',
                ];
 
-               if ( $this->config->get( 'AllowUserCssPrefs' ) ) {
+               if ( $this->options->get( 'AllowUserCssPrefs' ) ) {
                        $defaultPreferences['editfont'] = [
                                'type' => 'select',
                                'section' => 'editing/editor',
@@ -946,7 +1000,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
         * @param array &$defaultPreferences
         */
        protected function rcPreferences( User $user, MessageLocalizer $l10n, &$defaultPreferences ) {
-               $rcMaxAge = $this->config->get( 'RCMaxAge' );
+               $rcMaxAge = $this->options->get( 'RCMaxAge' );
                # # RecentChanges #####################################
                $defaultPreferences['rcdays'] = [
                        'type' => 'float',
@@ -999,7 +1053,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        'type' => 'api',
                ];
 
-               if ( $this->config->get( 'RCWatchCategoryMembership' ) ) {
+               if ( $this->options->get( 'RCWatchCategoryMembership' ) ) {
                        $defaultPreferences['hidecategorization'] = [
                                'type' => 'toggle',
                                'label-message' => 'tog-hidecategorization',
@@ -1023,7 +1077,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        ];
                }
 
-               if ( $this->config->get( 'RCShowWatchingUsers' ) ) {
+               if ( $this->options->get( 'RCShowWatchingUsers' ) ) {
                        $defaultPreferences['shownumberswatching'] = [
                                'type' => 'toggle',
                                'section' => 'rc/advancedrc',
@@ -1047,7 +1101,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
        protected function watchlistPreferences(
                User $user, IContextSource $context, &$defaultPreferences
        ) {
-               $watchlistdaysMax = ceil( $this->config->get( 'RCMaxAge' ) / ( 3600 * 24 ) );
+               $watchlistdaysMax = ceil( $this->options->get( 'RCMaxAge' ) / ( 3600 * 24 ) );
 
                # # Watchlist #####################################
                if ( $user->isAllowed( 'editmywatchlist' ) ) {
@@ -1127,10 +1181,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        'label-message' => 'tog-watchlisthideliu',
                ];
 
-               if ( !\SpecialWatchlist::checkStructuredFilterUiEnabled(
-                       $this->config,
-                       $user
-               ) ) {
+               if ( !\SpecialWatchlist::checkStructuredFilterUiEnabled( $user ) ) {
                        $defaultPreferences['watchlistreloadautomatically'] = [
                                'type' => 'toggle',
                                'section' => 'watchlist/advancedwatchlist',
@@ -1144,7 +1195,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        'label-message' => 'tog-watchlistunwatchlinks',
                ];
 
-               if ( $this->config->get( 'RCWatchCategoryMembership' ) ) {
+               if ( $this->options->get( 'RCWatchCategoryMembership' ) ) {
                        $defaultPreferences['watchlisthidecategorization'] = [
                                'type' => 'toggle',
                                'section' => 'watchlist/changeswatchlist',
@@ -1223,7 +1274,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
         * @param array &$defaultPreferences
         */
        protected function searchPreferences( &$defaultPreferences ) {
-               foreach ( MWNamespace::getValidNamespaces() as $n ) {
+               foreach ( $this->nsInfo->getValidNamespaces() as $n ) {
                        $defaultPreferences['searchNs' . $n] = [
                                'type' => 'api',
                        ];
@@ -1251,9 +1302,9 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        }
                }
 
-               $defaultSkin = $this->config->get( 'DefaultSkin' );
-               $allowUserCss = $this->config->get( 'AllowUserCss' );
-               $allowUserJs = $this->config->get( 'AllowUserJs' );
+               $defaultSkin = $this->options->get( 'DefaultSkin' );
+               $allowUserCss = $this->options->get( 'AllowUserCss' );
+               $allowUserJs = $this->options->get( 'AllowUserJs' );
 
                # Sort by the internal name, so that the ordering is the same for each display language,
                # especially if some skin names are translated to use a different alphabet and some are not.
@@ -1352,7 +1403,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                $ret = [];
                $pixels = $l10n->msg( 'unit-pixel' )->text();
 
-               foreach ( $this->config->get( 'ImageLimits' ) as $index => $limits ) {
+               foreach ( $this->options->get( 'ImageLimits' ) as $index => $limits ) {
                        // Note: A left-to-right marker (U+200E) is inserted, see T144386
                        $display = "{$limits[0]}\u{200E}×{$limits[1]}$pixels";
                        $ret[$display] = $index;
@@ -1369,7 +1420,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                $ret = [];
                $pixels = $l10n->msg( 'unit-pixel' )->text();
 
-               foreach ( $this->config->get( 'ThumbLimits' ) as $index => $size ) {
+               foreach ( $this->options->get( 'ThumbLimits' ) as $index => $size ) {
                        $display = $size . $pixels;
                        $ret[$display] = $index;
                }
@@ -1384,7 +1435,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
         * @return bool|string
         */
        protected function validateSignature( $signature, $alldata, HTMLForm $form ) {
-               $maxSigChars = $this->config->get( 'MaxSigChars' );
+               $maxSigChars = $this->options->get( 'MaxSigChars' );
                if ( mb_strlen( $signature ) > $maxSigChars ) {
                        return Xml::element( 'span', [ 'class' => 'error' ],
                                $form->msg( 'badsiglength' )->numParams( $maxSigChars )->text() );
@@ -1477,7 +1528,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
        protected function getTimezoneOptions( IContextSource $context ) {
                $opt = [];
 
-               $localTZoffset = $this->config->get( 'LocalTZoffset' );
+               $localTZoffset = $this->options->get( 'LocalTZoffset' );
                $timeZoneList = $this->getTimeZoneList( $context->getLanguage() );
 
                $timestamp = MWTimestamp::getLocalInstance();
@@ -1525,7 +1576,7 @@ class DefaultPreferencesFactory implements PreferencesFactory {
        protected function saveFormData( $formData, HTMLForm $form, array $formDescriptor ) {
                /** @var \User $user */
                $user = $form->getModifiedUser();
-               $hiddenPrefs = $this->config->get( 'HiddenPrefs' );
+               $hiddenPrefs = $this->options->get( 'HiddenPrefs' );
                $result = true;
 
                if ( !$user->isAllowedAny( 'editmyprivateinfo', 'editmyoptions' ) ) {
index 7e69a02..d142c48 100644 (file)
@@ -24,7 +24,7 @@
  */
 class UDPRCFeedEngine extends RCFeedEngine {
        /**
-        * @see RCFeedEngine::send
+        * @see FormattedRCFeed::send
         * @param array $feed
         * @param string $line
         * @return bool
index aa429b2..a7d475e 100644 (file)
@@ -41,6 +41,7 @@ abstract class PrefixSearch {
         * @return array Array of strings
         */
        public static function titleSearch( $search, $limit, $namespaces = [], $offset = 0 ) {
+               wfDeprecated( __METHOD__, '1.34' );
                $prefixSearch = new StringPrefixSearch;
                return $prefixSearch->search( $search, $limit, $namespaces, $offset );
        }
index ba8133f..109097a 100644 (file)
@@ -114,7 +114,7 @@ class Command {
         * @param string|string[] ...$args
         * @return $this
         */
-       public function params( ...$args ) {
+       public function params( ...$args ): Command {
                if ( count( $args ) === 1 && is_array( reset( $args ) ) ) {
                        // If only one argument has been passed, and that argument is an array,
                        // treat it as a list of arguments
@@ -132,7 +132,7 @@ class Command {
         * @param string|string[] ...$args
         * @return $this
         */
-       public function unsafeParams( ...$args ) {
+       public function unsafeParams( ...$args ): Command {
                if ( count( $args ) === 1 && is_array( reset( $args ) ) ) {
                        // If only one argument has been passed, and that argument is an array,
                        // treat it as a list of arguments
@@ -155,7 +155,7 @@ class Command {
         *   filesize (for ulimit -f), memory, time, walltime.
         * @return $this
         */
-       public function limits( array $limits ) {
+       public function limits( array $limits ): Command {
                if ( !isset( $limits['walltime'] ) && isset( $limits['time'] ) ) {
                        // Emulate the behavior of old wfShellExec() where walltime fell back on time
                        // if the latter was overridden and the former wasn't
@@ -172,7 +172,7 @@ class Command {
         * @param string[] $env array of variable name => value
         * @return $this
         */
-       public function environment( array $env ) {
+       public function environment( array $env ): Command {
                $this->env = $env;
 
                return $this;
@@ -184,7 +184,7 @@ class Command {
         * @param string $method
         * @return $this
         */
-       public function profileMethod( $method ) {
+       public function profileMethod( $method ): Command {
                $this->method = $method;
 
                return $this;
@@ -196,7 +196,7 @@ class Command {
         * @param string|null $inputString
         * @return $this
         */
-       public function input( $inputString ) {
+       public function input( $inputString ): Command {
                $this->inputString = is_null( $inputString ) ? null : (string)$inputString;
 
                return $this;
@@ -209,7 +209,7 @@ class Command {
         * @param bool $yesno
         * @return $this
         */
-       public function includeStderr( $yesno = true ) {
+       public function includeStderr( $yesno = true ): Command {
                $this->doIncludeStderr = $yesno;
 
                return $this;
@@ -221,7 +221,7 @@ class Command {
         * @param bool $yesno
         * @return $this
         */
-       public function logStderr( $yesno = true ) {
+       public function logStderr( $yesno = true ): Command {
                $this->doLogStderr = $yesno;
 
                return $this;
@@ -233,7 +233,7 @@ class Command {
         * @param string|false $cgroup Absolute file path to the cgroup, or false to not use a cgroup
         * @return $this
         */
-       public function cgroup( $cgroup ) {
+       public function cgroup( $cgroup ): Command {
                $this->cgroup = $cgroup;
 
                return $this;
@@ -246,7 +246,7 @@ class Command {
         * @param int $restrictions
         * @return $this
         */
-       public function restrict( $restrictions ) {
+       public function restrict( $restrictions ): Command {
                $this->restrictions |= $restrictions;
 
                return $this;
@@ -273,7 +273,7 @@ class Command {
         *
         * @return $this
         */
-       public function whitelistPaths( array $paths ) {
+       public function whitelistPaths( array $paths ): Command {
                // Default implementation is a no-op
                return $this;
        }
index b4b9b92..d3e00b1 100644 (file)
@@ -97,7 +97,7 @@ class CommandFactory {
         *
         * @return Command
         */
-       public function create() {
+       public function create(): Command {
                if ( $this->restrictionMethod === 'firejail' ) {
                        $command = new FirejailCommand( $this->findFirejail() );
                        $command->restrict( Shell::RESTRICT_DEFAULT );
index 7aed05f..6bf94cd 100644 (file)
@@ -51,7 +51,7 @@ class FirejailCommand extends Command {
        /**
         * @inheritDoc
         */
-       public function whitelistPaths( array $paths ) {
+       public function whitelistPaths( array $paths ): Command {
                $this->whitelistedPaths = array_merge( $this->whitelistedPaths, $paths );
                return $this;
        }
index 467e4ef..19fa1da 100644 (file)
@@ -116,7 +116,7 @@ class Shell {
         *   Example:   [ 'convert', '-font', 'font name' ] would produce "'convert' '-font' 'font name'"
         * @return Command
         */
-       public static function command( ...$commands ) {
+       public static function command( ...$commands ): Command {
                if ( count( $commands ) === 1 && is_array( reset( $commands ) ) ) {
                        // If only one argument has been passed, and that argument is an array,
                        // treat it as a list of arguments
@@ -232,7 +232,7 @@ class Shell {
         *     'wrapper': Path to a PHP wrapper to handle the maintenance script
         * @return Command
         */
-       public static function makeScriptCommand( $script, $parameters, $options = [] ) {
+       public static function makeScriptCommand( $script, $parameters, $options = [] ): Command {
                global $wgPhpCli;
                // Give site config file a chance to run the script in a wrapper.
                // The caller may likely want to call wfBasename() on $script.
index 1b43a42..dee31b2 100644 (file)
@@ -1847,21 +1847,21 @@ abstract class ChangesListSpecialPage extends SpecialPage {
                        return true;
                }
 
-               return static::checkStructuredFilterUiEnabled(
-                       $this->getConfig(),
-                       $this->getUser()
-               );
+               return static::checkStructuredFilterUiEnabled( $this->getUser() );
        }
 
        /**
         * Static method to check whether StructuredFilter UI is enabled for the given user
         *
         * @since 1.31
-        * @param Config $config
         * @param User $user
         * @return bool
         */
-       public static function checkStructuredFilterUiEnabled( Config $config, User $user ) {
+       public static function checkStructuredFilterUiEnabled( $user ) {
+               if ( $user instanceof Config ) {
+                       wfDeprecated( __METHOD__ . ' with Config argument', '1.34' );
+                       $user = func_get_arg( 1 );
+               }
                return !$user->getOption( 'rcenhancedfilters-disable' );
        }
 
index a3b7296..1053bda 100644 (file)
 
 namespace MediaWiki\Special;
 
-use Config;
 use Hooks;
 use IContextSource;
 use Language;
+use MediaWiki\Config\ServiceOptions;
 use MediaWiki\Linker\LinkRenderer;
 use Profiler;
 use RequestContext;
 use SpecialPage;
 use Title;
 use User;
-use Wikimedia\Assert\Assert;
 
 /**
  * Factory for handling the special page list and generating SpecialPage objects.
@@ -215,7 +214,7 @@ class SpecialPageFactory {
        /** @var array */
        private $aliases;
 
-       /** @var Config */
+       /** @var ServiceOptions */
        private $options;
 
        /** @var Language */
@@ -238,13 +237,11 @@ class SpecialPageFactory {
        ];
 
        /**
-        * @param array $options
+        * @param ServiceOptions $options
         * @param Language $contLang
         */
-       public function __construct( array $options, Language $contLang ) {
-               Assert::parameter( count( $options ) === count( self::$constructorOptions ) &&
-                       !array_diff( self::$constructorOptions, array_keys( $options ) ),
-                       '$options', 'Wrong set of options present' );
+       public function __construct( ServiceOptions $options, Language $contLang ) {
+               $options->assertRequiredOptions( self::$constructorOptions );
                $this->options = $options;
                $this->contLang = $contLang;
        }
@@ -268,32 +265,32 @@ class SpecialPageFactory {
                if ( !is_array( $this->list ) ) {
                        $this->list = self::$coreList;
 
-                       if ( !$this->options['DisableInternalSearch'] ) {
+                       if ( !$this->options->get( 'DisableInternalSearch' ) ) {
                                $this->list['Search'] = \SpecialSearch::class;
                        }
 
-                       if ( $this->options['EmailAuthentication'] ) {
+                       if ( $this->options->get( 'EmailAuthentication' ) ) {
                                $this->list['Confirmemail'] = \EmailConfirmation::class;
                                $this->list['Invalidateemail'] = \EmailInvalidation::class;
                        }
 
-                       if ( $this->options['EnableEmail'] ) {
+                       if ( $this->options->get( 'EnableEmail' ) ) {
                                $this->list['ChangeEmail'] = \SpecialChangeEmail::class;
                        }
 
-                       if ( $this->options['EnableJavaScriptTest'] ) {
+                       if ( $this->options->get( 'EnableJavaScriptTest' ) ) {
                                $this->list['JavaScriptTest'] = \SpecialJavaScriptTest::class;
                        }
 
-                       if ( $this->options['PageLanguageUseDB'] ) {
+                       if ( $this->options->get( 'PageLanguageUseDB' ) ) {
                                $this->list['PageLanguage'] = \SpecialPageLanguage::class;
                        }
-                       if ( $this->options['ContentHandlerUseDB'] ) {
+                       if ( $this->options->get( 'ContentHandlerUseDB' ) ) {
                                $this->list['ChangeContentModel'] = \SpecialChangeContentModel::class;
                        }
 
                        // Add extension special pages
-                       $this->list = array_merge( $this->list, $this->options['SpecialPages'] );
+                       $this->list = array_merge( $this->list, $this->options->get( 'SpecialPages' ) );
 
                        // This hook can be used to disable unwanted core special pages
                        // or conditionally register special pages.
index 7d86663..b79a482 100644 (file)
@@ -21,9 +21,9 @@
  * @ingroup SpecialPage
  */
 
-use MediaWiki\Block\BlockRestriction;
 use MediaWiki\Block\Restriction\PageRestriction;
 use MediaWiki\Block\Restriction\NamespaceRestriction;
+use MediaWiki\MediaWikiServices;
 
 /**
  * A special page that allows users with 'block' right to block users from
@@ -949,8 +949,9 @@ class SpecialBlock extends FormSpecialPage {
                                        $currentBlock->isSitewide( $block->isSitewide() );
 
                                        // Set the block id of the restrictions.
+                                       $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
                                        $currentBlock->setRestrictions(
-                                               BlockRestriction::setBlockId( $currentBlock->getId(), $restrictions )
+                                               $blockRestrictionStore->setBlockId( $currentBlock->getId(), $restrictions )
                                        );
                                }
 
@@ -1125,9 +1126,11 @@ class SpecialBlock extends FormSpecialPage {
                } elseif ( is_string( $target ) ) {
                        $target = User::newFromName( $target );
                }
-               if ( $performer->isBlocked() ) {
+               if ( $performer->getBlock() ) {
                        if ( $target instanceof User && $target->getId() == $performer->getId() ) {
                                # User is trying to unblock themselves
+                               // @TODO Ensure that the block does not apply to the `unblockself`
+                               //       right.
                                if ( $performer->isAllowed( 'unblockself' ) ) {
                                        return true;
                                        # User blocked themselves and is now trying to reverse it
index 08a7fde..dc4d1bd 100644 (file)
@@ -372,70 +372,74 @@ class SpecialContributions extends IncludableSpecialPage {
                $username = $target->getName();
                $userpage = $target->getUserPage();
                $talkpage = $target->getTalkPage();
+               $isIP = IP::isValid( $username );
+               $isRange = IP::isValidRange( $username );
 
                $linkRenderer = $sp->getLinkRenderer();
 
                # No talk pages for IP ranges.
-               if ( !IP::isValidRange( $username ) ) {
+               if ( !$isRange ) {
                        $tools['user-talk'] = $linkRenderer->makeLink(
                                $talkpage,
                                $sp->msg( 'sp-contributions-talk' )->text()
                        );
                }
 
-               if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) {
-                       if ( $sp->getUser()->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
-                               if ( $target->isBlocked() && $target->getBlock()->getType() != Block::TYPE_AUTO ) {
-                                       $tools['block'] = $linkRenderer->makeKnownLink( # Change block link
-                                               SpecialPage::getTitleFor( 'Block', $username ),
-                                               $sp->msg( 'change-blocklink' )->text()
-                                       );
-                                       $tools['unblock'] = $linkRenderer->makeKnownLink( # Unblock link
-                                               SpecialPage::getTitleFor( 'Unblock', $username ),
-                                               $sp->msg( 'unblocklink' )->text()
-                                       );
-                               } else { # User is not blocked
-                                       $tools['block'] = $linkRenderer->makeKnownLink( # Block link
-                                               SpecialPage::getTitleFor( 'Block', $username ),
-                                               $sp->msg( 'blocklink' )->text()
-                                       );
-                               }
+               if ( $sp->getUser()->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
+                       if ( $target->getBlock() && $target->getBlock()->getType() != Block::TYPE_AUTO ) {
+                               $tools['block'] = $linkRenderer->makeKnownLink( # Change block link
+                                       SpecialPage::getTitleFor( 'Block', $username ),
+                                       $sp->msg( 'change-blocklink' )->text()
+                               );
+                               $tools['unblock'] = $linkRenderer->makeKnownLink( # Unblock link
+                                       SpecialPage::getTitleFor( 'Unblock', $username ),
+                                       $sp->msg( 'unblocklink' )->text()
+                               );
+                       } else { # User is not blocked
+                               $tools['block'] = $linkRenderer->makeKnownLink( # Block link
+                                       SpecialPage::getTitleFor( 'Block', $username ),
+                                       $sp->msg( 'blocklink' )->text()
+                               );
                        }
+               }
 
-                       # Block log link
-                       $tools['log-block'] = $linkRenderer->makeKnownLink(
-                               SpecialPage::getTitleFor( 'Log', 'block' ),
-                               $sp->msg( 'sp-contributions-blocklog' )->text(),
+               # Block log link
+               $tools['log-block'] = $linkRenderer->makeKnownLink(
+                       SpecialPage::getTitleFor( 'Log', 'block' ),
+                       $sp->msg( 'sp-contributions-blocklog' )->text(),
+                       [],
+                       [ 'page' => $userpage->getPrefixedText() ]
+               );
+
+               # Suppression log link (T61120)
+               if ( $sp->getUser()->isAllowed( 'suppressionlog' ) ) {
+                       $tools['log-suppression'] = $linkRenderer->makeKnownLink(
+                               SpecialPage::getTitleFor( 'Log', 'suppress' ),
+                               $sp->msg( 'sp-contributions-suppresslog', $username )->text(),
                                [],
-                               [ 'page' => $userpage->getPrefixedText() ]
+                               [ 'offender' => $username ]
                        );
-
-                       # Suppression log link (T61120)
-                       if ( $sp->getUser()->isAllowed( 'suppressionlog' ) ) {
-                               $tools['log-suppression'] = $linkRenderer->makeKnownLink(
-                                       SpecialPage::getTitleFor( 'Log', 'suppress' ),
-                                       $sp->msg( 'sp-contributions-suppresslog', $username )->text(),
-                                       [],
-                                       [ 'offender' => $username ]
-                               );
-                       }
                }
 
                # Don't show some links for IP ranges
-               if ( !IP::isValidRange( $username ) ) {
-                       # Uploads
-                       $tools['uploads'] = $linkRenderer->makeKnownLink(
-                               SpecialPage::getTitleFor( 'Listfiles', $username ),
-                               $sp->msg( 'sp-contributions-uploads' )->text()
-                       );
+               if ( !$isRange ) {
+                       # Uploads: hide if IPs cannot upload (T220674)
+                       if ( !$isIP || $target->isAllowed( 'upload' ) ) {
+                               $tools['uploads'] = $linkRenderer->makeKnownLink(
+                                       SpecialPage::getTitleFor( 'Listfiles', $username ),
+                                       $sp->msg( 'sp-contributions-uploads' )->text()
+                               );
+                       }
 
                        # Other logs link
+                       # Todo: T146628
                        $tools['logs'] = $linkRenderer->makeKnownLink(
                                SpecialPage::getTitleFor( 'Log', $username ),
                                $sp->msg( 'sp-contributions-logs' )->text()
                        );
 
                        # Add link to deleted user contributions for priviledged users
+                       # Todo: T183457
                        if ( $sp->getUser()->isAllowed( 'deletedhistory' ) ) {
                                $tools['deletedcontribs'] = $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'DeletedContributions', $username ),
index 5203807..ed398de 100644 (file)
@@ -68,8 +68,10 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $request = $this->getRequest();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
index 8b5562f..39976c0 100644 (file)
@@ -591,21 +591,12 @@ class MovePageForm extends UnlistedSpecialPage {
 
                # Do the actual move.
                $mp = new MovePage( $ot, $nt );
-               $valid = $mp->isValidMove();
-               if ( !$valid->isOK() ) {
-                       $this->showForm( $valid->getErrorsArray() );
-                       return;
-               }
 
-               $permStatus = $mp->checkPermissions( $user, $this->reason );
-               if ( !$permStatus->isOK() ) {
-                       $this->showForm( $permStatus->getErrorsArray(), true );
-                       return;
-               }
+               $userPermitted = $mp->checkPermissions( $user, $this->reason )->isOK();
 
-               $status = $mp->move( $user, $this->reason, $createRedirect );
+               $status = $mp->moveIfAllowed( $user, $this->reason, $createRedirect );
                if ( !$status->isOK() ) {
-                       $this->showForm( $status->getErrorsArray() );
+                       $this->showForm( $status->getErrorsArray(), !$userPermitted );
                        return;
                }
 
index dd6fea7..682bceb 100644 (file)
@@ -123,8 +123,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $user = $this->getUser();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
index 540754f..8655b1c 100644 (file)
@@ -61,15 +61,23 @@ class UserrightsPage extends SpecialPage {
                $isself = $this->getUser()->equals( $targetUser );
 
                $available = $this->changeableGroups();
-               if ( $targetUser->getId() == 0 ) {
+               if ( $targetUser->getId() === 0 ) {
                        return false;
                }
 
-               return !empty( $available['add'] )
-                       || !empty( $available['remove'] )
-                       || ( ( $isself || !$checkIfSelf ) &&
-                               ( !empty( $available['add-self'] )
-                                       || !empty( $available['remove-self'] ) ) );
+               if ( $available['add'] || $available['remove'] ) {
+                       // can change some rights for any user
+                       return true;
+               }
+
+               if ( ( $available['add-self'] || $available['remove-self'] )
+                       && ( $isself || !$checkIfSelf )
+               ) {
+                       // can change some rights for self
+                       return true;
+               }
+
+               return false;
        }
 
        /**
@@ -152,8 +160,13 @@ class UserrightsPage extends SpecialPage {
                        * (e.g. they don't have the userrights permission), then don't
                        * allow them to change any user rights.
                        */
-                       if ( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) {
-                               throw new UserBlockedError( $user->getBlock() );
+                       if ( !$user->isAllowed( 'userrights' ) ) {
+                               // @TODO Should the user be blocked from changing user rights if they
+                               //       are partially blocked?
+                               $block = $user->getBlock();
+                               if ( $block ) {
+                                       throw new UserBlockedError( $user->getBlock() );
+                               }
                        }
 
                        $this->checkReadOnly();
index c326257..812f1b0 100644 (file)
@@ -110,7 +110,14 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                }
        }
 
-       public static function checkStructuredFilterUiEnabled( Config $config, User $user ) {
+       /**
+        * @see ChangesListSpecialPage::checkStructuredFilterUiEnabled
+        */
+       public static function checkStructuredFilterUiEnabled( $user ) {
+               if ( $user instanceof Config ) {
+                       wfDeprecated( __METHOD__ . ' with Config argument', '1.34' );
+                       $user = func_get_arg( 1 );
+               }
                return !$user->getOption( 'wlenhancedfilters-disable' );
        }
 
@@ -192,10 +199,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                        'description' => 'rcfilters-filter-watchlistactivity-unseen-description',
                                        'cssClassSuffix' => 'watchedunseen',
                                        'isRowApplicableCallable' => function ( $ctx, RecentChange $rc ) {
-                                               $changeTs = $rc->getAttribute( 'rc_timestamp' );
-                                               $lastVisitTs = $this->getLatestSeenTimestamp( $rc );
-
-                                               return $lastVisitTs !== null && $changeTs >= $lastVisitTs;
+                                               return !$this->isChangeEffectivelySeen( $rc );
                                        },
                                ],
                                [
@@ -204,10 +208,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                        'description' => 'rcfilters-filter-watchlistactivity-seen-description',
                                        'cssClassSuffix' => 'watchedseen',
                                        'isRowApplicableCallable' => function ( $ctx, RecentChange $rc ) {
-                                               $changeTs = $rc->getAttribute( 'rc_timestamp' );
-                                               $lastVisitTs = $this->getLatestSeenTimestamp( $rc );
-
-                                               return $lastVisitTs === null || $changeTs < $lastVisitTs;
+                                               return $this->isChangeEffectivelySeen( $rc );
                                        }
                                ],
                        ],
@@ -541,10 +542,9 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                        $rc->counter = $counter++;
 
                        if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) {
-                               $lastVisitTs = $this->getLatestSeenTimestamp( $rc );
-                               $updated = ( $lastVisitTs > $rc->getAttribute( 'timestamp' ) );
+                               $unseen = !$this->isChangeEffectivelySeen( $rc );
                        } else {
-                               $updated = false;
+                               $unseen = false;
                        }
 
                        if ( isset( $watchedItemStore ) ) {
@@ -554,7 +554,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                                $rc->numberofWatchingusers = 0;
                        }
 
-                       $changeLine = $list->recentChangesLine( $rc, $updated, $counter );
+                       $changeLine = $list->recentChangesLine( $rc, $unseen, $counter );
                        if ( $changeLine !== false ) {
                                $s .= $changeLine;
                        }
@@ -862,9 +862,19 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
        /**
         * @param RecentChange $rc
-        * @return string TS_MW timestamp
+        * @return bool User viewed the revision or a newer one
+        */
+       protected function isChangeEffectivelySeen( RecentChange $rc ) {
+               $lastVisitTs = $this->getLatestSeenTimestampIfHasUnseen( $rc );
+
+               return $lastVisitTs === null || $lastVisitTs > $rc->getAttribute( 'rc_timestamp' );
+       }
+
+       /**
+        * @param RecentChange $rc
+        * @return string|null TS_MW timestamp or null if all revision were seen
         */
-       protected function getLatestSeenTimestamp( RecentChange $rc ) {
+       private function getLatestSeenTimestampIfHasUnseen( RecentChange $rc ) {
                return $this->watchStore->getLatestNotificationTimestamp(
                        $rc->getAttribute( 'wl_notificationtimestamp' ),
                        $rc->getPerformer(),
index 71cf787..d09b345 100644 (file)
@@ -22,7 +22,6 @@
 /**
  * @ingroup Pager
  */
-use MediaWiki\Block\BlockRestriction;
 use MediaWiki\Block\Restriction\Restriction;
 use MediaWiki\Block\Restriction\PageRestriction;
 use MediaWiki\Block\Restriction\NamespaceRestriction;
@@ -419,7 +418,8 @@ class BlockListPager extends TablePager {
                if ( $partialBlocks ) {
                        // Mutations to the $row object are not persisted. The restrictions will
                        // need be stored in a separate store.
-                       $this->restrictions = BlockRestriction::loadByBlockId( $partialBlocks );
+                       $blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
+                       $this->restrictions = $blockRestrictionStore->loadByBlockId( $partialBlocks );
                }
 
                $lb->execute();
index 44ecb6f..a187a44 100644 (file)
@@ -103,6 +103,21 @@ class ContribsPager extends RangeChronologicalPager {
        private $templateParser;
 
        public function __construct( IContextSource $context, array $options ) {
+               // Set ->target and ->contribs before calling parent::__construct() so
+               // parent can call $this->getIndexField() and get the right result. Set
+               // the rest too just to keep things simple.
+               $this->target = $options['target'] ?? '';
+               $this->contribs = $options['contribs'] ?? 'users';
+               $this->namespace = $options['namespace'] ?? '';
+               $this->tagFilter = $options['tagfilter'] ?? false;
+               $this->nsInvert = $options['nsInvert'] ?? false;
+               $this->associated = $options['associated'] ?? false;
+
+               $this->deletedOnly = !empty( $options['deletedOnly'] );
+               $this->topOnly = !empty( $options['topOnly'] );
+               $this->newOnly = !empty( $options['newOnly'] );
+               $this->hideMinor = !empty( $options['hideMinor'] );
+
                parent::__construct( $context );
 
                $msgs = [
@@ -116,18 +131,6 @@ class ContribsPager extends RangeChronologicalPager {
                        $this->messages[$msg] = $this->msg( $msg )->escaped();
                }
 
-               $this->target = $options['target'] ?? '';
-               $this->contribs = $options['contribs'] ?? 'users';
-               $this->namespace = $options['namespace'] ?? '';
-               $this->tagFilter = $options['tagfilter'] ?? false;
-               $this->nsInvert = $options['nsInvert'] ?? false;
-               $this->associated = $options['associated'] ?? false;
-
-               $this->deletedOnly = !empty( $options['deletedOnly'] );
-               $this->topOnly = !empty( $options['topOnly'] );
-               $this->newOnly = !empty( $options['newOnly'] );
-               $this->hideMinor = !empty( $options['hideMinor'] );
-
                // Date filtering: use timestamp if available
                $startTimestamp = '';
                $endTimestamp = '';
@@ -235,6 +238,35 @@ class ContribsPager extends RangeChronologicalPager {
                return new FakeResultWrapper( $result );
        }
 
+       /**
+        * Return the table targeted for ordering and continuation
+        *
+        * See T200259 and T221380.
+        *
+        * @warning Keep this in sync with self::getQueryInfo()!
+        *
+        * @return string
+        */
+       private function getTargetTable() {
+               if ( $this->contribs == 'newbie' ) {
+                       return 'revision';
+               }
+
+               $user = User::newFromName( $this->target, false );
+               $ipRangeConds = $user->isAnon() ? $this->getIpRangeConds( $this->mDb, $this->target ) : null;
+               if ( $ipRangeConds ) {
+                       return 'ip_changes';
+               } else {
+                       $conds = ActorMigration::newMigration()->getWhere( $this->mDb, 'rev_user', $user );
+                       if ( isset( $conds['orconds']['actor'] ) ) {
+                               // @todo: This will need changing when revision_actor_temp goes away
+                               return 'revision_actor_temp';
+                       }
+               }
+
+               return 'revision';
+       }
+
        function getQueryInfo() {
                $revQuery = Revision::getQueryInfo( [ 'page', 'user' ] );
                $queryInfo = [
@@ -245,6 +277,8 @@ class ContribsPager extends RangeChronologicalPager {
                        'join_conds' => $revQuery['joins'],
                ];
 
+               // WARNING: Keep this in sync with getTargetTable()!
+
                if ( $this->contribs == 'newbie' ) {
                        $max = $this->mDb->selectField( 'user', 'max(user_id)', '', __METHOD__ );
                        $queryInfo['conds'][] = $revQuery['fields']['rev_user'] . ' >' . (int)( $max - $max / 100 );
@@ -273,22 +307,6 @@ class ContribsPager extends RangeChronologicalPager {
                        $ipRangeConds = $user->isAnon() ? $this->getIpRangeConds( $this->mDb, $this->target ) : null;
                        if ( $ipRangeConds ) {
                                $queryInfo['tables'][] = 'ip_changes';
-                               /**
-                                * These aliases make `ORDER BY rev_timestamp, rev_id` from {@see getIndexField} and
-                                * {@see getExtraSortFields} use the replicated `ipc_rev_timestamp` and `ipc_rev_id`
-                                * columns from the `ip_changes` table, for more efficient queries.
-                                * @see https://phabricator.wikimedia.org/T200259#4832318
-                                */
-                               $queryInfo['fields'] = array_merge(
-                                       [
-                                               'rev_timestamp' => 'ipc_rev_timestamp',
-                                               'rev_id' => 'ipc_rev_id',
-                                       ],
-                                       array_diff( $queryInfo['fields'], [
-                                               'rev_timestamp',
-                                               'rev_id',
-                                       ] )
-                               );
                                $queryInfo['join_conds']['ip_changes'] = [
                                        'LEFT JOIN', [ 'ipc_rev_id = rev_id' ]
                                ];
@@ -299,15 +317,8 @@ class ContribsPager extends RangeChronologicalPager {
                                $queryInfo['conds'][] = $conds['conds'];
                                // Force the appropriate index to avoid bad query plans (T189026)
                                if ( isset( $conds['orconds']['actor'] ) ) {
-                                       // @todo: This will need changing when revision_comment_temp goes away
+                                       // @todo: This will need changing when revision_actor_temp goes away
                                        $queryInfo['options']['USE INDEX']['temp_rev_user'] = 'actor_timestamp';
-                                       // Alias 'rev_timestamp' => 'revactor_timestamp' and 'rev_id' => 'revactor_rev' so
-                                       // "ORDER BY rev_timestamp, rev_id" is interpreted to use denormalized revision_actor_temp
-                                       // fields instead.
-                                       $queryInfo['fields'] = array_merge(
-                                               array_diff( $queryInfo['fields'], [ 'rev_timestamp', 'rev_id' ] ),
-                                               [ 'rev_timestamp' => 'revactor_timestamp', 'rev_id' => 'revactor_rev' ]
-                                       );
                                } else {
                                        $queryInfo['options']['USE INDEX']['revision'] =
                                                isset( $conds['orconds']['userid'] ) ? 'user_timestamp' : 'usertext_timestamp';
@@ -342,10 +353,10 @@ class ContribsPager extends RangeChronologicalPager {
                                ' != ' . Revision::SUPPRESSED_USER;
                }
 
-               // For IPv6, we use ipc_rev_timestamp on ip_changes as the index field,
-               // which will be referenced when parsing the results of a query.
-               if ( self::isQueryableRange( $this->target ) ) {
-                       $queryInfo['fields'][] = 'ipc_rev_timestamp';
+               // $this->getIndexField() must be in the result rows, as reallyDoQuery() tries to access it.
+               $indexField = $this->getIndexField();
+               if ( $indexField !== 'rev_timestamp' ) {
+                       $queryInfo['fields'][] = $indexField;
                }
 
                ChangeTags::modifyDisplayQuery(
@@ -431,8 +442,24 @@ class ContribsPager extends RangeChronologicalPager {
         * @return string
         */
        public function getIndexField() {
-               // Note this is run via parent::__construct() *before* $this->target is set!
-               return 'rev_timestamp';
+               // The returned column is used for sorting and continuation, so we need to
+               // make sure to use the right denormalized column depending on which table is
+               // being targeted by the query to avoid bad query plans.
+               // See T200259, T204669, T220991, and T221380.
+               $target = $this->getTargetTable();
+               switch ( $target ) {
+                       case 'revision':
+                               return 'rev_timestamp';
+                       case 'ip_changes':
+                               return 'ipc_rev_timestamp';
+                       case 'revision_actor_temp':
+                               return 'revactor_timestamp';
+                       default:
+                               wfWarn(
+                                       __METHOD__ . ": Unknown value '$target' from " . static::class . '::getTargetTable()', 0
+                               );
+                               return 'rev_timestamp';
+               }
        }
 
        /**
@@ -474,8 +501,24 @@ class ContribsPager extends RangeChronologicalPager {
         * @return string[]
         */
        protected function getExtraSortFields() {
-               // Note this is run via parent::__construct() *before* $this->target is set!
-               return [ 'rev_id' ];
+               // The returned columns are used for sorting, so we need to make sure
+               // to use the right denormalized column depending on which table is
+               // being targeted by the query to avoid bad query plans.
+               // See T200259, T204669, T220991, and T221380.
+               $target = $this->getTargetTable();
+               switch ( $target ) {
+                       case 'revision':
+                               return [ 'rev_id' ];
+                       case 'ip_changes':
+                               return [ 'ipc_rev_id' ];
+                       case 'revision_actor_temp':
+                               return [ 'revactor_rev' ];
+                       default:
+                               wfWarn(
+                                       __METHOD__ . ": Unknown value '$target' from " . static::class . '::getTargetTable()', 0
+                               );
+                               return [ 'rev_id' ];
+               }
        }
 
        protected function doBatchLookups() {
index f9cab24..7cfadc0 100644 (file)
@@ -20,6 +20,9 @@
  * @file
  */
 
+use MediaWiki\Config\ServiceOptions;
+use MediaWiki\Linker\LinkTarget;
+
 /**
  * This is a utility class for dealing with namespaces that encodes all the "magic" behaviors of
  * them based on index.  The textual names of the namespaces are handled by Language.php.
@@ -44,14 +47,36 @@ class NamespaceInfo {
        /** @var int[]|null Valid namespaces cache */
        private $validNamespaces = null;
 
-       /** @var Config */
-       private $config;
+       /** @var ServiceOptions */
+       private $options;
+
+       /**
+        * TODO Make this const when HHVM support is dropped (T192166)
+        *
+        * @since 1.34
+        * @var array
+        */
+       public static $constructorOptions = [
+               'AllowImageMoving',
+               'CanonicalNamespaceNames',
+               'CapitalLinkOverrides',
+               'CapitalLinks',
+               'ContentNamespaces',
+               'ExtraNamespaces',
+               'ExtraSignatureNamespaces',
+               'NamespaceContentModels',
+               'NamespaceProtection',
+               'NamespacesWithSubpages',
+               'NonincludableNamespaces',
+               'RestrictionLevels',
+       ];
 
        /**
-        * @param Config $config
+        * @param ServiceOptions $options
         */
-       public function __construct( Config $config ) {
-               $this->config = $config;
+       public function __construct( ServiceOptions $options ) {
+               $options->assertRequiredOptions( self::$constructorOptions );
+               $this->options = $options;
        }
 
        /**
@@ -80,8 +105,8 @@ class NamespaceInfo {
         * @return bool
         */
        public function isMovable( $index ) {
-               $result = !( $index < NS_MAIN ||
-                       ( $index == NS_FILE && !$this->config->get( 'AllowImageMoving' ) ) );
+               $result = $index >= NS_MAIN &&
+                       ( $index != NS_FILE || $this->options->get( 'AllowImageMoving' ) );
 
                /**
                 * @since 1.20
@@ -125,6 +150,18 @@ class NamespaceInfo {
                        : $index + 1;
        }
 
+       /**
+        * @param LinkTarget $target
+        * @return LinkTarget Talk page for $target
+        * @throws MWException if $target's namespace doesn't have talk pages (e.g., NS_SPECIAL)
+        */
+       public function getTalkPage( LinkTarget $target ) : LinkTarget {
+               if ( $this->isTalk( $target->getNamespace() ) ) {
+                       return $target;
+               }
+               return new TitleValue( $this->getTalk( $target->getNamespace() ), $target->getDbKey() );
+       }
+
        /**
         * Get the subject namespace index for a given namespace
         * Special namespaces (NS_MEDIA, NS_SPECIAL) are always the subject.
@@ -143,24 +180,44 @@ class NamespaceInfo {
                        : $index;
        }
 
+       /**
+        * @param LinkTarget $target
+        * @return LinkTarget Subject page for $target
+        */
+       public function getSubjectPage( LinkTarget $target ) : LinkTarget {
+               if ( $this->isSubject( $target->getNamespace() ) ) {
+                       return $target;
+               }
+               return new TitleValue( $this->getSubject( $target->getNamespace() ), $target->getDbKey() );
+       }
+
        /**
         * Get the associated namespace.
         * For talk namespaces, returns the subject (non-talk) namespace
         * For subject (non-talk) namespaces, returns the talk namespace
         *
         * @param int $index Namespace index
-        * @return int|null If no associated namespace could be found
+        * @return int
+        * @throws MWException if called on a namespace that has no talk pages (e.g., NS_SPECIAL)
         */
        public function getAssociated( $index ) {
                $this->isMethodValidFor( $index, __METHOD__ );
 
                if ( $this->isSubject( $index ) ) {
                        return $this->getTalk( $index );
-               } elseif ( $this->isTalk( $index ) ) {
-                       return $this->getSubject( $index );
-               } else {
-                       return null;
                }
+               return $this->getSubject( $index );
+       }
+
+       /**
+        * @param LinkTarget $target
+        * @return LinkTarget Talk page for $target if it's a subject page, subject page if it's a talk
+        *   page
+        * @throws MWException if $target's namespace doesn't have talk pages (e.g., NS_SPECIAL)
+        */
+       public function getAssociatedPage( LinkTarget $target ) : LinkTarget {
+               return new TitleValue(
+                       $this->getAssociated( $target->getNamespace() ), $target->getDbKey() );
        }
 
        /**
@@ -215,11 +272,11 @@ class NamespaceInfo {
        public function getCanonicalNamespaces() {
                if ( $this->canonicalNamespaces === null ) {
                        $this->canonicalNamespaces =
-                               [ NS_MAIN => '' ] + $this->config->get( 'CanonicalNamespaceNames' );
+                               [ NS_MAIN => '' ] + $this->options->get( 'CanonicalNamespaceNames' );
                        $this->canonicalNamespaces +=
                                ExtensionRegistry::getInstance()->getAttribute( 'ExtensionNamespaces' );
-                       if ( is_array( $this->config->get( 'ExtraNamespaces' ) ) ) {
-                               $this->canonicalNamespaces += $this->config->get( 'ExtraNamespaces' );
+                       if ( is_array( $this->options->get( 'ExtraNamespaces' ) ) ) {
+                               $this->canonicalNamespaces += $this->options->get( 'ExtraNamespaces' );
                        }
                        Hooks::run( 'CanonicalNamespaces', [ &$this->canonicalNamespaces ] );
                }
@@ -242,7 +299,7 @@ class NamespaceInfo {
         * The input *must* be converted to lower case first
         *
         * @param string $name Namespace name
-        * @return int
+        * @return int|null
         */
        public function getCanonicalIndex( $name ) {
                if ( $this->namespaceIndexes === false ) {
@@ -259,8 +316,8 @@ class NamespaceInfo {
        }
 
        /**
-        * Returns an array of the namespaces (by integer id) that exist on the
-        * wiki. Used primarily by the api in help documentation.
+        * Returns an array of the namespaces (by integer id) that exist on the wiki. Used primarily by
+        * the API in help documentation. The array is sorted numerically and omits negative namespaces.
         * @return array
         */
        public function getValidNamespaces() {
@@ -297,7 +354,7 @@ class NamespaceInfo {
         * @return bool
         */
        public function isContent( $index ) {
-               return $index == NS_MAIN || in_array( $index, $this->config->get( 'ContentNamespaces' ) );
+               return $index == NS_MAIN || in_array( $index, $this->options->get( 'ContentNamespaces' ) );
        }
 
        /**
@@ -309,7 +366,7 @@ class NamespaceInfo {
         */
        public function wantSignatures( $index ) {
                return $this->isTalk( $index ) ||
-                       in_array( $index, $this->config->get( 'ExtraSignatureNamespaces' ) );
+                       in_array( $index, $this->options->get( 'ExtraSignatureNamespaces' ) );
        }
 
        /**
@@ -329,7 +386,7 @@ class NamespaceInfo {
         * @return bool
         */
        public function hasSubpages( $index ) {
-               return !empty( $this->config->get( 'NamespacesWithSubpages' )[$index] );
+               return !empty( $this->options->get( 'NamespacesWithSubpages' )[$index] );
        }
 
        /**
@@ -337,7 +394,7 @@ class NamespaceInfo {
         * @return array Array of namespace indices
         */
        public function getContentNamespaces() {
-               $contentNamespaces = $this->config->get( 'ContentNamespaces' );
+               $contentNamespaces = $this->options->get( 'ContentNamespaces' );
                if ( !is_array( $contentNamespaces ) || $contentNamespaces === [] ) {
                        return [ NS_MAIN ];
                } elseif ( !in_array( NS_MAIN, $contentNamespaces ) ) {
@@ -391,13 +448,13 @@ class NamespaceInfo {
                if ( in_array( $index, $this->alwaysCapitalizedNamespaces ) ) {
                        return true;
                }
-               $overrides = $this->config->get( 'CapitalLinkOverrides' );
+               $overrides = $this->options->get( 'CapitalLinkOverrides' );
                if ( isset( $overrides[$index] ) ) {
                        // CapitalLinkOverrides is explicitly set
                        return $overrides[$index];
                }
                // Default to the global setting
-               return $this->config->get( 'CapitalLinks' );
+               return $this->options->get( 'CapitalLinks' );
        }
 
        /**
@@ -418,7 +475,7 @@ class NamespaceInfo {
         * @return bool
         */
        public function isNonincludable( $index ) {
-               $namespaces = $this->config->get( 'NonincludableNamespaces' );
+               $namespaces = $this->options->get( 'NonincludableNamespaces' );
                return $namespaces && in_array( $index, $namespaces );
        }
 
@@ -433,22 +490,25 @@ class NamespaceInfo {
         * @return null|string Default model name for the given namespace, if set
         */
        public function getNamespaceContentModel( $index ) {
-               return $this->config->get( 'NamespaceContentModels' )[$index] ?? null;
+               return $this->options->get( 'NamespaceContentModels' )[$index] ?? null;
        }
 
        /**
         * Determine which restriction levels it makes sense to use in a namespace,
         * optionally filtered by a user's rights.
         *
+        * @todo Move this to PermissionManager and remove the dependency here on permissions-related
+        * config settings.
+        *
         * @param int $index Index to check
         * @param User|null $user User to check
         * @return array
         */
        public function getRestrictionLevels( $index, User $user = null ) {
-               if ( !isset( $this->config->get( 'NamespaceProtection' )[$index] ) ) {
+               if ( !isset( $this->options->get( 'NamespaceProtection' )[$index] ) ) {
                        // All levels are valid if there's no namespace restriction.
                        // But still filter by user, if necessary
-                       $levels = $this->config->get( 'RestrictionLevels' );
+                       $levels = $this->options->get( 'RestrictionLevels' );
                        if ( $user ) {
                                $levels = array_values( array_filter( $levels, function ( $level ) use ( $user ) {
                                        $right = $level;
@@ -467,7 +527,7 @@ class NamespaceInfo {
                // First, get the list of groups that can edit this namespace.
                $namespaceGroups = [];
                $combine = 'array_merge';
-               foreach ( (array)$this->config->get( 'NamespaceProtection' )[$index] as $right ) {
+               foreach ( (array)$this->options->get( 'NamespaceProtection' )[$index] as $right ) {
                        if ( $right == 'sysop' ) {
                                $right = 'editprotected'; // BC
                        }
@@ -485,7 +545,7 @@ class NamespaceInfo {
                // group that can edit the namespace but would be blocked by the
                // restriction.
                $usableLevels = [ '' ];
-               foreach ( $this->config->get( 'RestrictionLevels' ) as $level ) {
+               foreach ( $this->options->get( 'RestrictionLevels' ) as $level ) {
                        $right = $level;
                        if ( $right == 'sysop' ) {
                                $right = 'editprotected'; // BC
index bcd444e..2cea712 100644 (file)
@@ -673,11 +673,20 @@ class User implements IDBAccessObject, UserIdentity {
         * @param int|null $userId User ID, if known
         * @param string|null $userName User name, if known
         * @param int|null $actorId Actor ID, if known
+        * @param bool|string $wikiId remote wiki to which the User/Actor ID applies, or false if none
         * @return User
         */
-       public static function newFromAnyId( $userId, $userName, $actorId ) {
+       public static function newFromAnyId( $userId, $userName, $actorId, $wikiId = false ) {
                global $wgActorTableSchemaMigrationStage;
 
+               // Stop-gap solution for the problem described in T222212.
+               // Force the User ID and Actor ID to zero for users loaded from the database
+               // of another wiki, to prevent subtle data corruption and confusing failure modes.
+               if ( $wikiId !== false ) {
+                       $userId = 0;
+                       $actorId = 0;
+               }
+
                $user = new User;
                $user->mFrom = 'defaults';
 
@@ -1372,7 +1381,7 @@ class User implements IDBAccessObject, UserIdentity {
                $user = $session->getUser();
                if ( $user->isLoggedIn() ) {
                        $this->loadFromUserObject( $user );
-                       if ( $user->isBlocked() ) {
+                       if ( $user->getBlock() ) {
                                // If this user is autoblocked, set a cookie to track the Block. This has to be done on
                                // every session load, because an autoblocked editor might not edit again from the same
                                // IP address after being blocked.
@@ -1813,13 +1822,14 @@ class User implements IDBAccessObject, UserIdentity {
 
        /**
         * Get blocking information
+        *
+        * TODO: Move this into the BlockManager, along with block-related properties.
+        *
         * @param bool $fromReplica Whether to check the replica DB first.
         *   To improve performance, non-critical checks are done against replica DBs.
         *   Check when actually saving should be done against master.
         */
        private function getBlockedStatus( $fromReplica = true ) {
-               global $wgProxyWhitelist, $wgApplyIpBlocksToXff, $wgSoftBlockRanges;
-
                if ( $this->mBlockedby != -1 ) {
                        return;
                }
@@ -1833,79 +1843,10 @@ class User implements IDBAccessObject, UserIdentity {
                // overwriting mBlockedby, surely?
                $this->load();
 
-               # We only need to worry about passing the IP address to the Block generator if the
-               # user is not immune to autoblocks/hardblocks, and they are the current user so we
-               # know which IP address they're actually coming from
-               $ip = null;
-               $sessionUser = RequestContext::getMain()->getUser();
-               // the session user is set up towards the end of Setup.php. Until then,
-               // assume it's a logged-out user.
-               $globalUserName = $sessionUser->isSafeToLoad()
-                       ? $sessionUser->getName()
-                       : IP::sanitizeIP( $sessionUser->getRequest()->getIP() );
-               if ( $this->getName() === $globalUserName && !$this->isAllowed( 'ipblock-exempt' ) ) {
-                       $ip = $this->getRequest()->getIP();
-               }
-
-               // User/IP blocking
-               $block = Block::newFromTarget( $this, $ip, !$fromReplica );
-
-               // Cookie blocking
-               if ( !$block instanceof Block ) {
-                       $block = $this->getBlockFromCookieValue( $this->getRequest()->getCookie( 'BlockID' ) );
-               }
-
-               // Proxy blocking
-               if ( !$block instanceof Block && $ip !== null && !in_array( $ip, $wgProxyWhitelist ) ) {
-                       // Local list
-                       if ( self::isLocallyBlockedProxy( $ip ) ) {
-                               $block = new Block( [
-                                       'byText' => wfMessage( 'proxyblocker' )->text(),
-                                       'reason' => wfMessage( 'proxyblockreason' )->plain(),
-                                       'address' => $ip,
-                                       'systemBlock' => 'proxy',
-                               ] );
-                       } elseif ( $this->isAnon() && $this->isDnsBlacklisted( $ip ) ) {
-                               $block = new Block( [
-                                       'byText' => wfMessage( 'sorbs' )->text(),
-                                       'reason' => wfMessage( 'sorbsreason' )->plain(),
-                                       'address' => $ip,
-                                       'systemBlock' => 'dnsbl',
-                               ] );
-                       }
-               }
-
-               // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
-               if ( !$block instanceof Block
-                       && $wgApplyIpBlocksToXff
-                       && $ip !== null
-                       && !in_array( $ip, $wgProxyWhitelist )
-               ) {
-                       $xff = $this->getRequest()->getHeader( 'X-Forwarded-For' );
-                       $xff = array_map( 'trim', explode( ',', $xff ) );
-                       $xff = array_diff( $xff, [ $ip ] );
-                       $xffblocks = Block::getBlocksForIPList( $xff, $this->isAnon(), !$fromReplica );
-                       $block = Block::chooseBlock( $xffblocks, $xff );
-                       if ( $block instanceof Block ) {
-                               # Mangle the reason to alert the user that the block
-                               # originated from matching the X-Forwarded-For header.
-                               $block->setReason( wfMessage( 'xffblockreason', $block->getReason() )->plain() );
-                       }
-               }
-
-               if ( !$block instanceof Block
-                       && $ip !== null
-                       && $this->isAnon()
-                       && IP::isInRanges( $ip, $wgSoftBlockRanges )
-               ) {
-                       $block = new Block( [
-                               'address' => $ip,
-                               'byText' => 'MediaWiki default',
-                               'reason' => wfMessage( 'softblockrangesreason', $ip )->plain(),
-                               'anonOnly' => true,
-                               'systemBlock' => 'wgSoftBlockRanges',
-                       ] );
-               }
+               $block = MediaWikiServices::getInstance()->getBlockManager()->getUserBlock(
+                       $this,
+                       $fromReplica
+               );
 
                if ( $block instanceof Block ) {
                        wfDebug( __METHOD__ . ": Found block.\n" );
@@ -1928,82 +1869,30 @@ class User implements IDBAccessObject, UserIdentity {
                Hooks::run( 'GetBlockedStatus', [ &$thisUser ] );
        }
 
-       /**
-        * Try to load a Block from an ID given in a cookie value.
-        * @param string|null $blockCookieVal The cookie value to check.
-        * @return Block|bool The Block object, or false if none could be loaded.
-        */
-       protected function getBlockFromCookieValue( $blockCookieVal ) {
-               // Make sure there's something to check. The cookie value must start with a number.
-               if ( strlen( $blockCookieVal ) < 1 || !is_numeric( substr( $blockCookieVal, 0, 1 ) ) ) {
-                       return false;
-               }
-               // Load the Block from the ID in the cookie.
-               $blockCookieId = Block::getIdFromCookieValue( $blockCookieVal );
-               if ( $blockCookieId !== null ) {
-                       // An ID was found in the cookie.
-                       $tmpBlock = Block::newFromID( $blockCookieId );
-                       if ( $tmpBlock instanceof Block ) {
-                               $config = RequestContext::getMain()->getConfig();
-
-                               switch ( $tmpBlock->getType() ) {
-                                       case Block::TYPE_USER:
-                                               $blockIsValid = !$tmpBlock->isExpired() && $tmpBlock->isAutoblocking();
-                                               $useBlockCookie = ( $config->get( 'CookieSetOnAutoblock' ) === true );
-                                               break;
-                                       case Block::TYPE_IP:
-                                       case Block::TYPE_RANGE:
-                                               // If block is type IP or IP range, load only if user is not logged in (T152462)
-                                               $blockIsValid = !$tmpBlock->isExpired() && !$this->isLoggedIn();
-                                               $useBlockCookie = ( $config->get( 'CookieSetOnIpBlock' ) === true );
-                                               break;
-                                       default:
-                                               $blockIsValid = false;
-                                               $useBlockCookie = false;
-                               }
-
-                               if ( $blockIsValid && $useBlockCookie ) {
-                                       // Use the block.
-                                       return $tmpBlock;
-                               }
-
-                               // If the block is not valid, remove the cookie.
-                               Block::clearCookie( $this->getRequest()->response() );
-                       } else {
-                               // If the block doesn't exist, remove the cookie.
-                               Block::clearCookie( $this->getRequest()->response() );
-                       }
-               }
-               return false;
-       }
-
        /**
         * Whether the given IP is in a DNS blacklist.
         *
+        * @deprecated since 1.34 Use BlockManager::isDnsBlacklisted.
         * @param string $ip IP to check
         * @param bool $checkWhitelist Whether to check the whitelist first
         * @return bool True if blacklisted.
         */
        public function isDnsBlacklisted( $ip, $checkWhitelist = false ) {
-               global $wgEnableDnsBlacklist, $wgDnsBlacklistUrls, $wgProxyWhitelist;
-
-               if ( !$wgEnableDnsBlacklist ||
-                       ( $checkWhitelist && in_array( $ip, $wgProxyWhitelist ) )
-               ) {
-                       return false;
-               }
-
-               return $this->inDnsBlacklist( $ip, $wgDnsBlacklistUrls );
+               return MediaWikiServices::getInstance()->getBlockManager()
+                       ->isDnsBlacklisted( $ip, $checkWhitelist );
        }
 
        /**
         * Whether the given IP is in a given DNS blacklist.
         *
+        * @deprecated since 1.34 Check via BlockManager::isDnsBlacklisted instead.
         * @param string $ip IP to check
         * @param string|array $bases Array of Strings: URL of the DNS blacklist
         * @return bool True if blacklisted.
         */
        public function inDnsBlacklist( $ip, $bases ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
                $found = false;
                // @todo FIXME: IPv6 ???  (https://bugs.php.net/bug.php?id=33170)
                if ( IP::isIPv4( $ip ) ) {
@@ -2045,11 +1934,13 @@ class User implements IDBAccessObject, UserIdentity {
        /**
         * Check if an IP address is in the local proxy list
         *
+        * @deprecated since 1.34 Use BlockManager::getUserBlock instead.
         * @param string $ip
-        *
         * @return bool
         */
        public static function isLocallyBlockedProxy( $ip ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
                global $wgProxyList;
 
                if ( !$wgProxyList ) {
@@ -2262,6 +2153,10 @@ class User implements IDBAccessObject, UserIdentity {
        /**
         * Check if user is blocked
         *
+        * @deprecated since 1.34, use User::getBlock() or
+        *             PermissionManager::isBlockedFrom() or
+        *             PermissionManager::userCan() instead.
+        *
         * @param bool $fromReplica Whether to check the replica DB instead of
         *   the master. Hacked from false due to horrible probs on site.
         * @return bool True if blocked, false otherwise
@@ -3560,10 +3455,12 @@ class User implements IDBAccessObject, UserIdentity {
                        // $user->isAllowed(). It is also checked in Title::checkUserBlock()
                        // to give a better error message in the common case.
                        $config = RequestContext::getMain()->getConfig();
+                       // @TODO Partial blocks should not prevent the user from logging in.
+                       //       see: https://phabricator.wikimedia.org/T208895
                        if (
                                $this->isLoggedIn() &&
                                $config->get( 'BlockDisablesLogin' ) &&
-                               $this->isBlocked()
+                               $this->getBlock()
                        ) {
                                $anon = new User;
                                $this->mRights = array_intersect( $this->mRights, $anon->getRights() );
@@ -3777,12 +3674,25 @@ class User implements IDBAccessObject, UserIdentity {
                return true;
        }
 
+       /**
+        * Alias of isLoggedIn() with a name that describes its actual functionality. UserIdentity has
+        * only this new name and not the old isLoggedIn() variant.
+        *
+        * @return bool True if user is registered on this wiki, i.e., has a user ID. False if user is
+        *   anonymous or has no local account (which can happen when importing). This is equivalent to
+        *   getId() != 0 and is provided for code readability.
+        * @since 1.34
+        */
+       public function isRegistered() {
+               return $this->getId() != 0;
+       }
+
        /**
         * Get whether the user is logged in
         * @return bool
         */
        public function isLoggedIn() {
-               return $this->getId() != 0;
+               return $this->isRegistered();
        }
 
        /**
@@ -3790,7 +3700,7 @@ class User implements IDBAccessObject, UserIdentity {
         * @return bool
         */
        public function isAnon() {
-               return !$this->isLoggedIn();
+               return !$this->isRegistered();
        }
 
        /**
@@ -4197,7 +4107,7 @@ class User implements IDBAccessObject, UserIdentity {
                $newTouched = $this->newTouchedTimestamp();
 
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $newTouched ) {
+               $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $newTouched ) {
                        global $wgActorTableSchemaMigrationStage;
 
                        $dbw->update( 'user',
@@ -4323,7 +4233,7 @@ class User implements IDBAccessObject, UserIdentity {
                        $fields["user_$name"] = $value;
                }
 
-               return $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $fields ) {
+               return $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $fields ) {
                        $dbw->insert( 'user', $fields, $fname, [ 'IGNORE' ] );
                        if ( $dbw->affectedRows() ) {
                                $newUser = self::newFromId( $dbw->insertId() );
@@ -4377,7 +4287,7 @@ class User implements IDBAccessObject, UserIdentity {
                $this->mTouched = $this->newTouchedTimestamp();
 
                $dbw = wfGetDB( DB_MASTER );
-               $status = $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) {
+               $status = $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) {
                        $noPass = PasswordFactory::newInvalidPassword()->toString();
                        $dbw->insert( 'user',
                                [
@@ -4453,7 +4363,7 @@ class User implements IDBAccessObject, UserIdentity {
         * @return bool A block was spread
         */
        public function spreadAnyEditBlock() {
-               if ( $this->isLoggedIn() && $this->isBlocked() ) {
+               if ( $this->isLoggedIn() && $this->getBlock() ) {
                        return $this->spreadBlock();
                }
 
@@ -5155,68 +5065,6 @@ class User implements IDBAccessObject, UserIdentity {
                return $wgImplicitGroups;
        }
 
-       /**
-        * Get the title of a page describing a particular group
-        * @deprecated since 1.29 Use UserGroupMembership::getGroupPage instead
-        *
-        * @param string $group Internal group name
-        * @return Title|bool Title of the page if it exists, false otherwise
-        */
-       public static function getGroupPage( $group ) {
-               wfDeprecated( __METHOD__, '1.29' );
-               return UserGroupMembership::getGroupPage( $group );
-       }
-
-       /**
-        * Create a link to the group in HTML, if available;
-        * else return the group name.
-        * @deprecated since 1.29 Use UserGroupMembership::getLink instead, or
-        * make the link yourself if you need custom text
-        *
-        * @param string $group Internal name of the group
-        * @param string $text The text of the link
-        * @return string HTML link to the group
-        */
-       public static function makeGroupLinkHTML( $group, $text = '' ) {
-               wfDeprecated( __METHOD__, '1.29' );
-
-               if ( $text == '' ) {
-                       $text = UserGroupMembership::getGroupName( $group );
-               }
-               $title = UserGroupMembership::getGroupPage( $group );
-               if ( $title ) {
-                       return MediaWikiServices::getInstance()
-                               ->getLinkRenderer()->makeLink( $title, $text );
-               }
-
-               return htmlspecialchars( $text );
-       }
-
-       /**
-        * Create a link to the group in Wikitext, if available;
-        * else return the group name.
-        * @deprecated since 1.29 Use UserGroupMembership::getLink instead, or
-        * make the link yourself if you need custom text
-        *
-        * @param string $group Internal name of the group
-        * @param string $text The text of the link
-        * @return string Wikilink to the group
-        */
-       public static function makeGroupLinkWiki( $group, $text = '' ) {
-               wfDeprecated( __METHOD__, '1.29' );
-
-               if ( $text == '' ) {
-                       $text = UserGroupMembership::getGroupName( $group );
-               }
-               $title = UserGroupMembership::getGroupPage( $group );
-               if ( $title ) {
-                       $page = $title->getFullText();
-                       return "[[$page|$text]]";
-               }
-
-               return $text;
-       }
-
        /**
         * Returns an array of the groups that a particular group can add/remove.
         *
index ac9bbec..64c61fe 100644 (file)
@@ -62,4 +62,12 @@ interface UserIdentity {
         */
        public function equals( UserIdentity $user );
 
+       /**
+        * @since 1.34
+        *
+        * @return bool True if user is registered on this wiki, i.e., has a user ID. False if user is
+        *   anonymous or has no local account (which can happen when importing). This must be
+        *   equivalent to getId() != 0 and is provided for code readability.
+        */
+       public function isRegistered();
 }
index d1fd19d..800ac76 100644 (file)
@@ -93,4 +93,14 @@ class UserIdentityValue implements UserIdentity {
                return $this->getName() === $user->getName();
        }
 
+       /**
+        * @since 1.34
+        *
+        * @return bool True if user is registered on this wiki, i.e., has a user ID. False if user is
+        *   anonymous or has no local account (which can happen when importing). This is equivalent to
+        *   getId() != 0 and is provided for code readability.
+        */
+       public function isRegistered() {
+               return $this->getId() != 0;
+       }
 }
index fc95ebc..72f6086 100644 (file)
@@ -18,7 +18,9 @@
  * @file
  * @ingroup Watchlist
  */
+
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\User\UserIdentity;
 use Wikimedia\Rdbms\DBReadOnlyError;
 
 /**
@@ -42,7 +44,7 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
                $this->actualStore = $actualStore;
        }
 
-       public function countWatchedItems( User $user ) {
+       public function countWatchedItems( UserIdentity $user ) {
                return $this->actualStore->countWatchedItems( $user );
        }
 
@@ -68,27 +70,27 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
                );
        }
 
-       public function getWatchedItem( User $user, LinkTarget $target ) {
+       public function getWatchedItem( UserIdentity $user, LinkTarget $target ) {
                return $this->actualStore->getWatchedItem( $user, $target );
        }
 
-       public function loadWatchedItem( User $user, LinkTarget $target ) {
+       public function loadWatchedItem( UserIdentity $user, LinkTarget $target ) {
                return $this->actualStore->loadWatchedItem( $user, $target );
        }
 
-       public function getWatchedItemsForUser( User $user, array $options = [] ) {
+       public function getWatchedItemsForUser( UserIdentity $user, array $options = [] ) {
                return $this->actualStore->getWatchedItemsForUser( $user, $options );
        }
 
-       public function isWatched( User $user, LinkTarget $target ) {
+       public function isWatched( UserIdentity $user, LinkTarget $target ) {
                return $this->actualStore->isWatched( $user, $target );
        }
 
-       public function getNotificationTimestampsBatch( User $user, array $targets ) {
+       public function getNotificationTimestampsBatch( UserIdentity $user, array $targets ) {
                return $this->actualStore->getNotificationTimestampsBatch( $user, $targets );
        }
 
-       public function countUnreadNotifications( User $user, $unreadLimit = null ) {
+       public function countUnreadNotifications( UserIdentity $user, $unreadLimit = null ) {
                return $this->actualStore->countUnreadNotifications( $user, $unreadLimit );
        }
 
@@ -100,56 +102,60 @@ class NoWriteWatchedItemStore implements WatchedItemStoreInterface {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function addWatch( User $user, LinkTarget $target ) {
+       public function addWatch( UserIdentity $user, LinkTarget $target ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function addWatchBatchForUser( User $user, array $targets ) {
+       public function addWatchBatchForUser( UserIdentity $user, array $targets ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function removeWatch( User $user, LinkTarget $target ) {
+       public function removeWatch( UserIdentity $user, LinkTarget $target ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
        public function setNotificationTimestampsForUser(
-               User $user,
+               UserIdentity $user,
                $timestamp,
                array $targets = []
        ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
+       public function updateNotificationTimestamp(
+               UserIdentity $editor, LinkTarget $target, $timestamp
+       ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function resetAllNotificationTimestampsForUser( User $user ) {
+       public function resetAllNotificationTimestampsForUser( UserIdentity $user ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
        public function resetNotificationTimestamp(
-               User $user,
-               Title $title,
+               UserIdentity $user,
+               LinkTarget $title,
                $force = '',
                $oldid = 0
        ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function clearUserWatchedItems( User $user ) {
+       public function clearUserWatchedItems( UserIdentity $user ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function clearUserWatchedItemsUsingJobQueue( User $user ) {
+       public function clearUserWatchedItemsUsingJobQueue( UserIdentity $user ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function removeWatchBatchForUser( User $user, array $titles ) {
+       public function removeWatchBatchForUser( UserIdentity $user, array $titles ) {
                throw new DBReadOnlyError( null, self::DB_READONLY_ERROR );
        }
 
-       public function getLatestNotificationTimestamp( $timestamp, User $user, LinkTarget $target ) {
+       public function getLatestNotificationTimestamp(
+               $timestamp, UserIdentity $user, LinkTarget $target
+       ) {
                return wfTimestampOrNull( TS_MW, $timestamp );
        }
 }
index 43a9c4e..4bf7f0c 100644 (file)
@@ -20,6 +20,7 @@
  */
 
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\User\UserIdentity;
 
 /**
  * Representation of a pair of user and title for watchlist entries.
@@ -36,7 +37,7 @@ class WatchedItem {
        private $linkTarget;
 
        /**
-        * @var User
+        * @var UserIdentity
         */
        private $user;
 
@@ -46,12 +47,12 @@ class WatchedItem {
        private $notificationTimestamp;
 
        /**
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $linkTarget
         * @param null|string $notificationTimestamp the value of the wl_notificationtimestamp field
         */
        public function __construct(
-               User $user,
+               UserIdentity $user,
                LinkTarget $linkTarget,
                $notificationTimestamp
        ) {
@@ -61,9 +62,17 @@ class WatchedItem {
        }
 
        /**
+        * @deprecated since 1.34, use getUserIdentity()
         * @return User
         */
        public function getUser() {
+               return User::newFromIdentity( $this->user );
+       }
+
+       /**
+        * @return UserIdentity
+        */
+       public function getUserIdentity() {
                return $this->user;
        }
 
index 6094f41..30e3cbe 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
-use Wikimedia\Rdbms\IDatabase;
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\User\UserIdentity;
 use Wikimedia\Assert\Assert;
+use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\LoadBalancer;
 
 /**
@@ -121,8 +122,8 @@ class WatchedItemQueryService {
         *        'end'                 => string (format accepted by wfTimestamp) requires 'dir' option,
         *                                 timestamp to end enumerating
         *        'watchlistOwner'      => User user whose watchlist items should be listed if different
-        *                                 than the one specified with $user param,
-        *                                 requires 'watchlistOwnerToken' option
+        *                                 than the one specified with $user param, requires
+        *                                 'watchlistOwnerToken' option
         *        'watchlistOwnerToken' => string a watchlist token used to access another user's
         *                                 watchlist, used with 'watchlistOwnerToken' option
         *        'limit'               => int maximum numbers of items to return
@@ -256,7 +257,7 @@ class WatchedItemQueryService {
        /**
         * For simple listing of user's watchlist items, see WatchedItemStore::getWatchedItemsForUser
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param array $options Allowed keys:
         *        'sort'         => string optional sorting by namespace ID and title
         *                          one of the self::SORT_* constants
@@ -272,8 +273,8 @@ class WatchedItemQueryService {
         *                          specified using the form option
         * @return WatchedItem[]
         */
-       public function getWatchedItemsForUser( User $user, array $options = [] ) {
-               if ( $user->isAnon() ) {
+       public function getWatchedItemsForUser( UserIdentity $user, array $options = [] ) {
+               if ( !$user->isRegistered() ) {
                        // TODO: should this just return an empty array or rather complain loud at this point
                        // as e.g. ApiBase::getWatchlistUser does?
                        return [];
@@ -460,11 +461,12 @@ class WatchedItemQueryService {
                return $conds;
        }
 
-       private function getWatchlistOwnerId( User $user, array $options ) {
+       private function getWatchlistOwnerId( UserIdentity $user, array $options ) {
                if ( array_key_exists( 'watchlistOwner', $options ) ) {
                        /** @var User $watchlistOwner */
                        $watchlistOwner = $options['watchlistOwner'];
-                       $ownersToken = $watchlistOwner->getOption( 'watchlisttoken' );
+                       $ownersToken =
+                               $watchlistOwner->getOption( 'watchlisttoken' );
                        $token = $options['watchlistOwnerToken'];
                        if ( $ownersToken == '' || !hash_equals( $ownersToken, $token ) ) {
                                throw ApiUsageException::newWithMessage( null, 'apierror-bad-watchlist-token', 'bad_wltoken' );
@@ -613,7 +615,9 @@ class WatchedItemQueryService {
                );
        }
 
-       private function getWatchedItemsForUserQueryConds( IDatabase $db, User $user, array $options ) {
+       private function getWatchedItemsForUserQueryConds(
+               IDatabase $db, UserIdentity $user, array $options
+       ) {
                $conds = [ 'wl_user' => $user->getId() ];
                if ( $options['namespaceIds'] ) {
                        $conds['wl_namespace'] = array_map( 'intval', $options['namespaceIds'] );
index a0e64c5..00770ea 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\User\UserIdentity;
 use Wikimedia\Rdbms\IResultWrapper;
 use Wikimedia\Rdbms\IDatabase;
 
@@ -21,7 +22,7 @@ interface WatchedItemQueryServiceExtension {
         *
         * @warning Any joins added *must* join on a unique key of the target table
         *  unless you really know what you're doing.
-        * @param User $user
+        * @param UserIdentity $user
         * @param array $options Options from
         *  WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
         * @param IDatabase $db Database connection being used for the query
@@ -31,15 +32,16 @@ interface WatchedItemQueryServiceExtension {
         * @param array &$dbOptions Options for Database::select()
         * @param array &$joinConds Join conditions for Database::select()
         */
-       public function modifyWatchedItemsWithRCInfoQuery( User $user, array $options, IDatabase $db,
-               array &$tables, array &$fields, array &$conds, array &$dbOptions, array &$joinConds
+       public function modifyWatchedItemsWithRCInfoQuery( UserIdentity $user, array $options,
+               IDatabase $db, array &$tables, array &$fields, array &$conds, array &$dbOptions,
+               array &$joinConds
        );
 
        /**
         * Modify the results from WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
         * before they're returned.
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param array $options Options from
         *  WatchedItemQueryService::getWatchedItemsWithRecentChangeInfo()
         * @param IDatabase $db Database connection being used for the query
@@ -50,7 +52,7 @@ interface WatchedItemQueryServiceExtension {
         *  [ $recentChangeInfo['rc_timestamp'], $recentChangeInfo['rc_id'] ] from the first item
         *  removed.
         */
-       public function modifyWatchedItemsWithRCInfo( User $user, array $options, IDatabase $db,
+       public function modifyWatchedItemsWithRCInfo( UserIdentity $user, array $options, IDatabase $db,
                array &$items, $res, &$startFrom
        );
 
index e287a35..bd4360e 100644 (file)
@@ -1,12 +1,14 @@
 <?php
 
-use Wikimedia\Rdbms\IDatabase;
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\Revision\RevisionLookup;
+use MediaWiki\User\UserIdentity;
 use Wikimedia\Assert\Assert;
-use Wikimedia\ScopedCallback;
+use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\ILBFactory;
 use Wikimedia\Rdbms\LoadBalancer;
+use Wikimedia\ScopedCallback;
 
 /**
  * Storage layer class for WatchedItems.
@@ -67,14 +69,19 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        private $deferredUpdatesAddCallableUpdateCallback;
 
        /**
-        * @var callable|null
+        * @var int
         */
-       private $revisionGetTimestampFromIdCallback;
+       private $updateRowsPerQuery;
 
        /**
-        * @var int
+        * @var NamespaceInfo
         */
-       private $updateRowsPerQuery;
+       private $nsInfo;
+
+       /**
+        * @var RevisionLookup
+        */
+       private $revisionLookup;
 
        /**
         * @var StatsdDataFactoryInterface
@@ -88,6 +95,8 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         * @param HashBagOStuff $cache
         * @param ReadOnlyMode $readOnlyMode
         * @param int $updateRowsPerQuery
+        * @param NamespaceInfo $nsInfo
+        * @param RevisionLookup $revisionLookup
         */
        public function __construct(
                ILBFactory $lbFactory,
@@ -95,7 +104,9 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                BagOStuff $stash,
                HashBagOStuff $cache,
                ReadOnlyMode $readOnlyMode,
-               $updateRowsPerQuery
+               $updateRowsPerQuery,
+               NamespaceInfo $nsInfo,
+               RevisionLookup $revisionLookup
        ) {
                $this->lbFactory = $lbFactory;
                $this->loadBalancer = $lbFactory->getMainLB();
@@ -106,9 +117,9 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                $this->stats = new NullStatsdDataFactory();
                $this->deferredUpdatesAddCallableUpdateCallback =
                        [ DeferredUpdates::class, 'addCallableUpdate' ];
-               $this->revisionGetTimestampFromIdCallback =
-                       [ Revision::class, 'getTimestampFromId' ];
                $this->updateRowsPerQuery = $updateRowsPerQuery;
+               $this->nsInfo = $nsInfo;
+               $this->revisionLookup = $revisionLookup;
 
                $this->latestUpdateCache = new HashBagOStuff( [ 'maxKeys' => 3 ] );
        }
@@ -144,30 +155,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                } );
        }
 
-       /**
-        * Overrides the Revision::getTimestampFromId callback
-        * This is intended for use while testing and will fail if MW_PHPUNIT_TEST is not defined.
-        *
-        * @param callable $callback
-        * @see Revision::getTimestampFromId for callback signiture
-        *
-        * @return ScopedCallback to reset the overridden value
-        * @throws MWException
-        */
-       public function overrideRevisionGetTimestampFromIdCallback( callable $callback ) {
-               if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
-                       throw new MWException(
-                               'Cannot override Revision::getTimestampFromId callback in operation.'
-                       );
-               }
-               $previousValue = $this->revisionGetTimestampFromIdCallback;
-               $this->revisionGetTimestampFromIdCallback = $callback;
-               return new ScopedCallback( function () use ( $previousValue ) {
-                       $this->revisionGetTimestampFromIdCallback = $previousValue;
-               } );
-       }
-
-       private function getCacheKey( User $user, LinkTarget $target ) {
+       private function getCacheKey( UserIdentity $user, LinkTarget $target ) {
                return $this->cache->makeKey(
                        (string)$target->getNamespace(),
                        $target->getDBkey(),
@@ -176,7 +164,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        private function cache( WatchedItem $item ) {
-               $user = $item->getUser();
+               $user = $item->getUserIdentity();
                $target = $item->getLinkTarget();
                $key = $this->getCacheKey( $user, $target );
                $this->cache->set( $key, $item );
@@ -184,7 +172,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                $this->stats->increment( 'WatchedItemStore.cache' );
        }
 
-       private function uncache( User $user, LinkTarget $target ) {
+       private function uncache( UserIdentity $user, LinkTarget $target ) {
                $this->cache->delete( $this->getCacheKey( $user, $target ) );
                unset( $this->cacheIndex[$target->getNamespace()][$target->getDBkey()][$user->getId()] );
                $this->stats->increment( 'WatchedItemStore.uncache' );
@@ -201,7 +189,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                }
        }
 
-       private function uncacheUser( User $user ) {
+       private function uncacheUser( UserIdentity $user ) {
                $this->stats->increment( 'WatchedItemStore.uncacheUser' );
                foreach ( $this->cacheIndex as $ns => $dbKeyArray ) {
                        foreach ( $dbKeyArray as $dbKey => $userArray ) {
@@ -218,12 +206,12 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        /**
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return WatchedItem|false
         */
-       private function getCached( User $user, LinkTarget $target ) {
+       private function getCached( UserIdentity $user, LinkTarget $target ) {
                return $this->cache->get( $this->getCacheKey( $user, $target ) );
        }
 
@@ -231,12 +219,12 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         * Return an array of conditions to select or update the appropriate database
         * row.
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return array
         */
-       private function dbCond( User $user, LinkTarget $target ) {
+       private function dbCond( UserIdentity $user, LinkTarget $target ) {
                return [
                        'wl_user' => $user->getId(),
                        'wl_namespace' => $target->getNamespace(),
@@ -260,11 +248,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         *
         * @since 1.30
         *
-        * @param User $user
+        * @param UserIdentity $user
         *
         * @return bool true on success, false when too many items are watched
         */
-       public function clearUserWatchedItems( User $user ) {
+       public function clearUserWatchedItems( UserIdentity $user ) {
                if ( $this->countWatchedItems( $user ) > $this->updateRowsPerQuery ) {
                        return false;
                }
@@ -280,7 +268,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                return true;
        }
 
-       private function uncacheAllItemsForUser( User $user ) {
+       private function uncacheAllItemsForUser( UserIdentity $user ) {
                $userId = $user->getId();
                foreach ( $this->cacheIndex as $ns => $dbKeyIndex ) {
                        foreach ( $dbKeyIndex as $dbKey => $userIndex ) {
@@ -309,9 +297,9 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         */
-       public function clearUserWatchedItemsUsingJobQueue( User $user ) {
+       public function clearUserWatchedItemsUsingJobQueue( UserIdentity $user ) {
                $job = ClearUserWatchlistJob::newForUser( $user, $this->getMaxId() );
                $this->queueGroup->push( $job );
        }
@@ -332,10 +320,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.31
-        * @param User $user
+        * @param UserIdentity $user
         * @return int
         */
-       public function countWatchedItems( User $user ) {
+       public function countWatchedItems( UserIdentity $user ) {
                $dbr = $this->getConnectionRef( DB_REPLICA );
                $return = (int)$dbr->selectField(
                        'watchlist',
@@ -394,16 +382,16 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        /**
-        * @param User $user
+        * @param UserIdentity $user
         * @param TitleValue[] $titles
         * @return bool
         * @throws MWException
         */
-       public function removeWatchBatchForUser( User $user, array $titles ) {
+       public function removeWatchBatchForUser( UserIdentity $user, array $titles ) {
                if ( $this->readOnlyMode->isReadOnly() ) {
                        return false;
                }
-               if ( $user->isAnon() ) {
+               if ( !$user->isRegistered() ) {
                        return false;
                }
                if ( !$titles ) {
@@ -563,12 +551,12 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         * @return bool
         */
-       public function getWatchedItem( User $user, LinkTarget $target ) {
-               if ( $user->isAnon() ) {
+       public function getWatchedItem( UserIdentity $user, LinkTarget $target ) {
+               if ( !$user->isRegistered() ) {
                        return false;
                }
 
@@ -583,13 +571,13 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         * @return WatchedItem|bool
         */
-       public function loadWatchedItem( User $user, LinkTarget $target ) {
-               // Only loggedin user can have a watchlist
-               if ( $user->isAnon() ) {
+       public function loadWatchedItem( UserIdentity $user, LinkTarget $target ) {
+               // Only registered user can have a watchlist
+               if ( !$user->isRegistered() ) {
                        return false;
                }
 
@@ -618,11 +606,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param array $options
         * @return WatchedItem[]
         */
-       public function getWatchedItemsForUser( User $user, array $options = [] ) {
+       public function getWatchedItemsForUser( UserIdentity $user, array $options = [] ) {
                $options += [ 'forWrite' => false ];
 
                $dbOptions = [];
@@ -664,27 +652,27 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         * @return bool
         */
-       public function isWatched( User $user, LinkTarget $target ) {
+       public function isWatched( UserIdentity $user, LinkTarget $target ) {
                return (bool)$this->getWatchedItem( $user, $target );
        }
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget[] $targets
         * @return array
         */
-       public function getNotificationTimestampsBatch( User $user, array $targets ) {
+       public function getNotificationTimestampsBatch( UserIdentity $user, array $targets ) {
                $timestamps = [];
                foreach ( $targets as $target ) {
                        $timestamps[$target->getNamespace()][$target->getDBkey()] = false;
                }
 
-               if ( $user->isAnon() ) {
+               if ( !$user->isRegistered() ) {
                        return $timestamps;
                }
 
@@ -728,27 +716,27 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         * @throws MWException
         */
-       public function addWatch( User $user, LinkTarget $target ) {
+       public function addWatch( UserIdentity $user, LinkTarget $target ) {
                $this->addWatchBatchForUser( $user, [ $target ] );
        }
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget[] $targets
         * @return bool
         * @throws MWException
         */
-       public function addWatchBatchForUser( User $user, array $targets ) {
+       public function addWatchBatchForUser( UserIdentity $user, array $targets ) {
                if ( $this->readOnlyMode->isReadOnly() ) {
                        return false;
                }
-               // Only logged-in user can have a watchlist
-               if ( $user->isAnon() ) {
+               // Only registered user can have a watchlist
+               if ( !$user->isRegistered() ) {
                        return false;
                }
 
@@ -799,12 +787,12 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         * @return bool
         * @throws MWException
         */
-       public function removeWatch( User $user, LinkTarget $target ) {
+       public function removeWatch( UserIdentity $user, LinkTarget $target ) {
                return $this->removeWatchBatchForUser( $user, [ $target ] );
        }
 
@@ -820,14 +808,16 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         * only the specified titles will be updated, and this will be done immediately (not deferred).
         *
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param string|int $timestamp Value to set the "last viewed" timestamp to (null to clear)
         * @param LinkTarget[] $targets Titles to set the timestamp for; [] means the entire watchlist
         * @return bool
         */
-       public function setNotificationTimestampsForUser( User $user, $timestamp, array $targets = [] ) {
-               // Only loggedin user can have a watchlist
-               if ( $user->isAnon() || $this->readOnlyMode->isReadOnly() ) {
+       public function setNotificationTimestampsForUser(
+               UserIdentity $user, $timestamp, array $targets = []
+       ) {
+               // Only registered user can have a watchlist
+               if ( !$user->isRegistered() || $this->readOnlyMode->isReadOnly() ) {
                        return false;
                }
 
@@ -873,7 +863,9 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                return true;
        }
 
-       public function getLatestNotificationTimestamp( $timestamp, User $user, LinkTarget $target ) {
+       public function getLatestNotificationTimestamp(
+               $timestamp, UserIdentity $user, LinkTarget $target
+       ) {
                $timestamp = wfTimestampOrNull( TS_MW, $timestamp );
                if ( $timestamp === null ) {
                        return null; // no notification
@@ -894,12 +886,12 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        /**
         * Schedule a DeferredUpdate that sets all of the "last viewed" timestamps for a given user
         * to the same value.
-        * @param User $user
+        * @param UserIdentity $user
         * @param string|int|null $timestamp Value to set all timestamps to, null to clear them
         */
-       public function resetAllNotificationTimestampsForUser( User $user, $timestamp = null ) {
-               // Only loggedin user can have a watchlist
-               if ( $user->isAnon() ) {
+       public function resetAllNotificationTimestampsForUser( UserIdentity $user, $timestamp = null ) {
+               // Only registered user can have a watchlist
+               if ( !$user->isRegistered() ) {
                        return;
                }
 
@@ -920,12 +912,14 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $editor
+        * @param UserIdentity $editor
         * @param LinkTarget $target
         * @param string|int $timestamp
         * @return int[]
         */
-       public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp ) {
+       public function updateNotificationTimestamp(
+               UserIdentity $editor, LinkTarget $target, $timestamp
+       ) {
                $dbw = $this->getConnectionRef( DB_MASTER );
                $uids = $dbw->selectFieldValues(
                        'watchlist',
@@ -977,23 +971,36 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
-        * @param Title $title
+        * @param UserIdentity $user
+        * @param LinkTarget $title
         * @param string $force
         * @param int $oldid
         * @return bool
         */
-       public function resetNotificationTimestamp( User $user, Title $title, $force = '', $oldid = 0 ) {
+       public function resetNotificationTimestamp(
+               UserIdentity $user, LinkTarget $title, $force = '', $oldid = 0
+       ) {
                $time = time();
 
-               // Only loggedin user can have a watchlist
-               if ( $this->readOnlyMode->isReadOnly() || $user->isAnon() ) {
+               // Only registered user can have a watchlist
+               if ( $this->readOnlyMode->isReadOnly() || !$user->isRegistered() ) {
                        return false;
                }
 
-               if ( !Hooks::run( 'BeforeResetNotificationTimestamp', [ &$user, &$title, $force, &$oldid ] ) ) {
+               // Hook expects User and Title, not UserIdentity and LinkTarget
+               $userObj = User::newFromId( $user->getId() );
+               $titleObj = Title::castFromLinkTarget( $title );
+               if ( !Hooks::run( 'BeforeResetNotificationTimestamp',
+                       [ &$userObj, &$titleObj, $force, &$oldid ] )
+               ) {
                        return false;
                }
+               if ( !$userObj->equals( $user ) ) {
+                       $user = $userObj;
+               }
+               if ( !$titleObj->equals( $title ) ) {
+                       $title = $titleObj;
+               }
 
                $item = null;
                if ( $force != 'force' ) {
@@ -1004,11 +1011,19 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                }
 
                // Get the timestamp (TS_MW) of this revision to track the latest one seen
-               $seenTime = call_user_func(
-                       $this->revisionGetTimestampFromIdCallback,
-                       $title,
-                       $oldid ?: $title->getLatestRevID()
-               );
+               $id = $oldid;
+               $seenTime = null;
+               if ( !$id ) {
+                       $latestRev = $this->revisionLookup->getRevisionByTitle( $title );
+                       if ( $latestRev ) {
+                               $id = $latestRev->getId();
+                               // Save a DB query
+                               $seenTime = $latestRev->getTimestamp();
+                       }
+               }
+               if ( $seenTime === null ) {
+                       $seenTime = $this->revisionLookup->getTimestampFromId( $id );
+               }
 
                // Mark the item as read immediately in lightweight storage
                $this->stash->merge(
@@ -1053,10 +1068,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        /**
-        * @param User $user
+        * @param UserIdentity $user
         * @return MapCacheLRU|null The map contains prefixed title keys and TS_MW values
         */
-       private function getPageSeenTimestamps( User $user ) {
+       private function getPageSeenTimestamps( UserIdentity $user ) {
                $key = $this->getPageSeenTimestampsKey( $user );
 
                return $this->latestUpdateCache->getWithSetCallback(
@@ -1069,10 +1084,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        /**
-        * @param User $user
+        * @param UserIdentity $user
         * @return string
         */
-       private function getPageSeenTimestampsKey( User $user ) {
+       private function getPageSeenTimestampsKey( UserIdentity $user ) {
                return $this->stash->makeGlobalKey(
                        'watchlist-recent-updates',
                        $this->lbFactory->getLocalDomainID(),
@@ -1088,13 +1103,16 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                return "{$target->getNamespace()}:{$target->getDBkey()}";
        }
 
-       private function getNotificationTimestamp( User $user, Title $title, $item, $force, $oldid ) {
+       private function getNotificationTimestamp(
+               UserIdentity $user, LinkTarget $title, $item, $force, $oldid
+       ) {
                if ( !$oldid ) {
                        // No oldid given, assuming latest revision; clear the timestamp.
                        return null;
                }
 
-               if ( !$title->getNextRevisionID( $oldid ) ) {
+               $oldRev = $this->revisionLookup->getRevisionById( $oldid );
+               if ( !$this->revisionLookup->getNextRevision( $oldRev, $title ) ) {
                        // Oldid given and is the latest revision for this title; clear the timestamp.
                        return null;
                }
@@ -1110,12 +1128,7 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
                // Oldid given and isn't the latest; update the timestamp.
                // This will result in no further notification emails being sent!
-               // Calls Revision::getTimestampFromId in normal operation
-               $notificationTimestamp = call_user_func(
-                       $this->revisionGetTimestampFromIdCallback,
-                       $title,
-                       $oldid
-               );
+               $notificationTimestamp = $this->revisionLookup->getTimestampFromId( $oldid );
 
                // We need to go one second to the future because of various strict comparisons
                // throughout the codebase
@@ -1137,11 +1150,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
 
        /**
         * @since 1.27
-        * @param User $user
+        * @param UserIdentity $user
         * @param int|null $unreadLimit
         * @return int|bool
         */
-       public function countUnreadNotifications( User $user, $unreadLimit = null ) {
+       public function countUnreadNotifications( UserIdentity $user, $unreadLimit = null ) {
                $dbr = $this->getConnectionRef( DB_REPLICA );
 
                $queryOptions = [];
@@ -1174,11 +1187,15 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
         * @param LinkTarget $newTarget
         */
        public function duplicateAllAssociatedEntries( LinkTarget $oldTarget, LinkTarget $newTarget ) {
-               $oldTarget = Title::newFromLinkTarget( $oldTarget );
-               $newTarget = Title::newFromLinkTarget( $newTarget );
-
-               $this->duplicateEntry( $oldTarget->getSubjectPage(), $newTarget->getSubjectPage() );
-               $this->duplicateEntry( $oldTarget->getTalkPage(), $newTarget->getTalkPage() );
+               // Duplicate first the subject page, then the talk page
+               $this->duplicateEntry(
+                       $this->nsInfo->getSubjectPage( $oldTarget ),
+                       $this->nsInfo->getSubjectPage( $newTarget )
+               );
+               $this->duplicateEntry(
+                       $this->nsInfo->getTalkPage( $oldTarget ),
+                       $this->nsInfo->getTalkPage( $newTarget )
+               );
        }
 
        /**
@@ -1241,10 +1258,10 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
        }
 
        /**
-        * @param User $user
-        * @param Title[] $titles
+        * @param UserIdentity $user
+        * @param LinkTarget[] $titles
         */
-       private function uncacheTitlesForUser( User $user, array $titles ) {
+       private function uncacheTitlesForUser( UserIdentity $user, array $titles ) {
                foreach ( $titles as $title ) {
                        $this->uncache( $user, $title );
                }
index 349d98a..5ff29d0 100644 (file)
@@ -18,7 +18,9 @@
  * @file
  * @ingroup Watchlist
  */
+
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\User\UserIdentity;
 use Wikimedia\Rdbms\DBUnexpectedError;
 
 /**
@@ -43,11 +45,11 @@ interface WatchedItemStoreInterface {
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         *
         * @return int
         */
-       public function countWatchedItems( User $user );
+       public function countWatchedItems( UserIdentity $user );
 
        /**
         * @since 1.31
@@ -115,29 +117,29 @@ interface WatchedItemStoreInterface {
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return WatchedItem|false
         */
-       public function getWatchedItem( User $user, LinkTarget $target );
+       public function getWatchedItem( UserIdentity $user, LinkTarget $target );
 
        /**
         * Loads an item from the db
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return WatchedItem|false
         */
-       public function loadWatchedItem( User $user, LinkTarget $target );
+       public function loadWatchedItem( UserIdentity $user, LinkTarget $target );
 
        /**
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param array $options Allowed keys:
         *        'forWrite' => bool defaults to false
         *        'sort' => string optional sorting by namespace ID and title
@@ -145,24 +147,24 @@ interface WatchedItemStoreInterface {
         *
         * @return WatchedItem[]
         */
-       public function getWatchedItemsForUser( User $user, array $options = [] );
+       public function getWatchedItemsForUser( UserIdentity $user, array $options = [] );
 
        /**
         * Must be called separately for Subject & Talk namespaces
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return bool
         */
-       public function isWatched( User $user, LinkTarget $target );
+       public function isWatched( UserIdentity $user, LinkTarget $target );
 
        /**
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget[] $targets
         *
         * @return array multi-dimensional like $return[$namespaceId][$titleString] = $timestamp,
@@ -170,54 +172,54 @@ interface WatchedItemStoreInterface {
         *         - string|null value of wl_notificationtimestamp,
         *         - false if $target is not watched by $user.
         */
-       public function getNotificationTimestampsBatch( User $user, array $targets );
+       public function getNotificationTimestampsBatch( UserIdentity $user, array $targets );
 
        /**
         * Must be called separately for Subject & Talk namespaces
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         */
-       public function addWatch( User $user, LinkTarget $target );
+       public function addWatch( UserIdentity $user, LinkTarget $target );
 
        /**
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget[] $targets
         *
         * @return bool success
         */
-       public function addWatchBatchForUser( User $user, array $targets );
+       public function addWatchBatchForUser( UserIdentity $user, array $targets );
 
        /**
-        * Removes an entry for the User watching the LinkTarget
+        * Removes an entry for the UserIdentity watching the LinkTarget
         * Must be called separately for Subject & Talk namespaces
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
         *
         * @return bool success
         * @throws DBUnexpectedError
         * @throws MWException
         */
-       public function removeWatch( User $user, LinkTarget $target );
+       public function removeWatch( UserIdentity $user, LinkTarget $target );
 
        /**
         * @since 1.31
         *
-        * @param User $user The user to set the timestamps for
+        * @param UserIdentity $user The user to set the timestamps for
         * @param string|null $timestamp Set the update timestamp to this value
         * @param LinkTarget[] $targets List of targets to update. Default to all targets
         *
         * @return bool success
         */
        public function setNotificationTimestampsForUser(
-               User $user,
+               UserIdentity $user,
                $timestamp,
                array $targets = []
        );
@@ -227,29 +229,30 @@ interface WatchedItemStoreInterface {
         *
         * @since 1.31
         *
-        * @param User $user The user to reset the timestamps for
+        * @param UserIdentity $user The user to reset the timestamps for
         */
-       public function resetAllNotificationTimestampsForUser( User $user );
+       public function resetAllNotificationTimestampsForUser( UserIdentity $user );
 
        /**
         * @since 1.31
         *
-        * @param User $editor The editor that triggered the update. Their notification
+        * @param UserIdentity $editor The editor that triggered the update. Their notification
         *  timestamp will not be updated(they have already seen it)
         * @param LinkTarget $target The target to update timestamps for
         * @param string $timestamp Set the update timestamp to this value
         *
         * @return int[] Array of user IDs the timestamp has been updated for
         */
-       public function updateNotificationTimestamp( User $editor, LinkTarget $target, $timestamp );
+       public function updateNotificationTimestamp(
+               UserIdentity $editor, LinkTarget $target, $timestamp );
 
        /**
         * Reset the notification timestamp of this entry
         *
         * @since 1.31
         *
-        * @param User $user
-        * @param Title $title
+        * @param UserIdentity $user
+        * @param LinkTarget $title
         * @param string $force Whether to force the write query to be executed even if the
         *    page is not watched or the notification timestamp is already NULL.
         *    'force' in order to force
@@ -258,18 +261,19 @@ interface WatchedItemStoreInterface {
         *
         * @return bool success Whether a job was enqueued
         */
-       public function resetNotificationTimestamp( User $user, Title $title, $force = '', $oldid = 0 );
+       public function resetNotificationTimestamp(
+               UserIdentity $user, LinkTarget $title, $force = '', $oldid = 0 );
 
        /**
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param int|null $unreadLimit
         *
         * @return int|bool The number of unread notifications
         *                  true if greater than or equal to $unreadLimit
         */
-       public function countUnreadNotifications( User $user, $unreadLimit = null );
+       public function countUnreadNotifications( UserIdentity $user, $unreadLimit = null );
 
        /**
         * Check if the given title already is watched by the user, and if so
@@ -303,28 +307,28 @@ interface WatchedItemStoreInterface {
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         */
-       public function clearUserWatchedItems( User $user );
+       public function clearUserWatchedItems( UserIdentity $user );
 
        /**
         * Queues a job that will clear the users watchlist using the Job Queue.
         *
         * @since 1.31
         *
-        * @param User $user
+        * @param UserIdentity $user
         */
-       public function clearUserWatchedItemsUsingJobQueue( User $user );
+       public function clearUserWatchedItemsUsingJobQueue( UserIdentity $user );
 
        /**
         * @since 1.32
         *
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget[] $targets
         *
         * @return bool success
         */
-       public function removeWatchBatchForUser( User $user, array $targets );
+       public function removeWatchBatchForUser( UserIdentity $user, array $targets );
 
        /**
         * Convert $timestamp to TS_MW or return null if the page was visited since then by $user
@@ -335,9 +339,10 @@ interface WatchedItemStoreInterface {
         * Usage of this method should be limited to WatchedItem* classes
         *
         * @param string|null $timestamp Value of wl_notificationtimestamp from the DB
-        * @param User $user
+        * @param UserIdentity $user
         * @param LinkTarget $target
-        * @return string TS_MW timestamp or null
+        * @return string|null TS_MW timestamp or null if all revision were seen
         */
-       public function getLatestNotificationTimestamp( $timestamp, User $user, LinkTarget $target );
+       public function getLatestNotificationTimestamp(
+               $timestamp, UserIdentity $user, LinkTarget $target );
 }
index 6fed794..d4ffed2 100644 (file)
@@ -10,7 +10,6 @@ namespace MediaWiki\Widget;
  */
 class SearchInputWidget extends TitleInputWidget {
 
-       protected $pushPending = false;
        protected $performSearchOnClick = true;
        protected $validateTitle = false;
        protected $highlightFirst = false;
@@ -18,8 +17,6 @@ class SearchInputWidget extends TitleInputWidget {
 
        /**
         * @param array $config Configuration options
-        *   - int|null $config['pushPending'] Whether the input should be visually marked as
-        *     "pending", while requesting suggestions (default: false)
         *   - bool|null $config['performSearchOnClick'] If true, the script will start a search
         *     whenever a user hits a suggestion. If false, the text of the suggestion is inserted into
         *     the text field only (default: true)
@@ -35,10 +32,6 @@ class SearchInputWidget extends TitleInputWidget {
                parent::__construct( $config );
 
                // Properties, which are ignored in PHP and just shipped back to JS
-               if ( isset( $config['pushPending'] ) ) {
-                       $this->pushPending = $config['pushPending'];
-               }
-
                if ( isset( $config['performSearchOnClick'] ) ) {
                        $this->performSearchOnClick = $config['performSearchOnClick'];
                }
@@ -61,7 +54,6 @@ class SearchInputWidget extends TitleInputWidget {
        }
 
        public function getConfig( &$config ) {
-               $config['pushPending'] = $this->pushPending;
                $config['performSearchOnClick'] = $this->performSearchOnClick;
                if ( $this->dataLocation ) {
                        $config['dataLocation'] = $this->dataLocation;
index c0da2d1..e44d766 100644 (file)
@@ -327,6 +327,7 @@ class Names {
                'nn' => 'norsk nynorsk', # Norwegian (Nynorsk)
                'no' => 'norsk', # Norwegian macro language (falls back to nb).
                'nov' => 'Novial', # Novial
+               'nqo' => 'ߒߞߏ', # N'Ko
                'nrm' => 'Nouormand', # Norman (invalid code; 'nrf' in ISO 639 since 2014)
                'nso' => 'Sesotho sa Leboa', # Northern Sotho
                'nv' => 'Diné bizaad', # Navajo
index 0240f85..e05b7a7 100644 (file)
@@ -2681,6 +2681,7 @@ public static $zh2Hant = [
 '𡭜' => '𡮉',
 '𡭬' => '𡮣',
 '𡶴' => '嵼',
+'𢀖' => '巠',
 '𢋈' => '㢝',
 '𢘝' => '𢣚',
 '𢘞' => '𢣭',
@@ -3703,7 +3704,6 @@ public static $zh2Hant = [
 '于小彤' => '于小彤',
 '于小惠' => '于小惠',
 '于少保' => '于少保',
-'于山' => '于山',
 '于山国' => '于山國',
 '于山國' => '于山國',
 '于帅' => '于帥',
@@ -3769,7 +3769,6 @@ public static $zh2Hant = [
 '于洪区' => '于洪區',
 '于洪區' => '于洪區',
 '于浩威' => '于浩威',
-'于海' => '于海',
 '于湘兰' => '于湘蘭',
 '于湘蘭' => '于湘蘭',
 '于汉超' => '于漢超',
@@ -3833,8 +3832,6 @@ public static $zh2Hant = [
 '于韦斯屈莱' => '于韋斯屈萊',
 '于風政' => '于風政',
 '于风政' => '于風政',
-'于飛' => '于飛',
-'于飞' => '于飛',
 '于余曲折' => '于餘曲折',
 '于鬯' => '于鬯',
 '于魁智' => '于魁智',
@@ -4267,7 +4264,6 @@ public static $zh2Hant = [
 '刮胡' => '刮鬍',
 '到山里' => '到山裡',
 '制冷机' => '制冷機',
-'制签' => '制籤',
 '制钟' => '制鐘',
 '刻半钟' => '刻半鐘',
 '刻多钟' => '刻多鐘',
@@ -4322,7 +4318,6 @@ public static $zh2Hant = [
 '勾心斗角' => '勾心鬥角',
 '勾魂荡魄' => '勾魂蕩魄',
 '包干' => '包幹',
-'包括' => '包括',
 '包准' => '包準',
 '包谷' => '包穀',
 '包扎' => '包紮',
@@ -4880,7 +4875,6 @@ public static $zh2Hant = [
 '好斗膽' => '好斗膽',
 '好斗蓬' => '好斗蓬',
 '好困' => '好睏',
-'好签' => '好籤',
 '好丑' => '好醜',
 '好斗' => '好鬥',
 '如果干' => '如果幹',
@@ -5656,7 +5650,7 @@ public static $zh2Hant = [
 '抑制' => '抑制',
 '抑郁' => '抑鬱',
 '抓奸' => '抓姦',
-'抓斗' => '抓',
+'抓斗' => '抓',
 '抗御' => '抗禦',
 '折子戏' => '折子戲',
 '折子戲' => '折子戲',
@@ -5828,9 +5822,9 @@ public static $zh2Hant = [
 '采种' => '採種',
 '采空区' => '採空區',
 '采空采穗' => '採空採穗',
-'采納' => '採納',
 '采纳' => '採納',
 '采给' => '採給',
+'采编' => '採編',
 '采花' => '採花',
 '采芹人' => '採芹人',
 '采茶' => '採茶',
@@ -5867,7 +5861,6 @@ public static $zh2Hant = [
 '提心吊胆' => '提心弔膽',
 '提摩太后书' => '提摩太後書',
 '提高后' => '提高後',
-'换签' => '換籤',
 '换只' => '換隻',
 '握发' => '握髮',
 '揩干' => '揩乾',
@@ -5996,13 +5989,6 @@ public static $zh2Hant = [
 '方便面' => '方便麵',
 '方向' => '方向',
 '方法里' => '方法裡',
-'于山东' => '於山東',
-'于山西' => '於山西',
-'于海上' => '於海上',
-'于海平面' => '於海平面',
-'于海拔' => '於海拔',
-'于海洋' => '於海洋',
-'于海边' => '於海邊',
 '于震中' => '於震中',
 '于震前' => '於震前',
 '于震后' => '於震後',
@@ -6071,7 +6057,9 @@ public static $zh2Hant = [
 '晒谷' => '曬穀',
 '曰云' => '曰云',
 '更仆难数' => '更僕難數',
-'更签' => '更籤',
+'更钟情' => '更鍾情',
+'更钟意' => '更鍾意',
+'更钟爱' => '更鍾愛',
 '更钟' => '更鐘',
 '书签' => '書籤',
 '书面' => '書面',
@@ -6135,6 +6123,7 @@ public static $zh2Hant = [
 '本庄' => '本庄',
 '本征' => '本徵',
 '本出戏' => '本齣戲',
+'术忽' => '朮忽',
 '术虎高' => '朮虎高',
 '术赤' => '朮赤',
 '朱庆余' => '朱慶餘',
@@ -6786,7 +6775,6 @@ public static $zh2Hant = [
 '田里' => '田裡',
 '田里穗' => '田里穗',
 '由余' => '由余',
-'由于' => '由於',
 '甲胄' => '甲冑',
 '甲后路' => '甲后路',
 '男仆' => '男僕',
@@ -6903,8 +6891,6 @@ public static $zh2Hant = [
 '盼复' => '盼覆',
 '看法里' => '看法裡',
 '看准' => '看準',
-'看表面' => '看表面',
-'看表' => '看錶',
 '看钟' => '看鐘',
 '真凶' => '真兇',
 '真个' => '真箇',
@@ -7164,7 +7150,6 @@ public static $zh2Hant = [
 '米团' => '米糰',
 '米余' => '米餘',
 '米面' => '米麵',
-'粉签子' => '粉籤子',
 '粗制' => '粗製',
 '精制伏' => '精制伏',
 '精制住' => '精制住',
@@ -8391,6 +8376,7 @@ public static $zh2Hant = [
 '鄉愿' => '鄉愿',
 '郑凯云' => '鄭凱云',
 '鄭凱云' => '鄭凱云',
+'郑苹如' => '鄭蘋如',
 '配制饲料' => '配制飼料',
 '配图里' => '配圖裡',
 '配制' => '配製',
@@ -8875,8 +8861,6 @@ public static $zh2Hant = [
 '风范' => '風範',
 '风里' => '風裡',
 '风起云涌' => '風起雲湧',
-'風采' => '風采',
-'风采' => '風采',
 '风刮' => '風颳',
 '台风' => '颱風',
 '台风后' => '颱風後',
@@ -9306,6 +9290,8 @@ public static $zh2Hant = [
 '鳥栖' => '鳥栖',
 '鳥栖市' => '鳥栖市',
 '鸟栖市' => '鳥栖市',
+'凤凰于飞' => '鳳凰于飛',
+'鳳凰于飛' => '鳳凰于飛',
 '凤梨干' => '鳳梨乾',
 '鸣钟' => '鳴鐘',
 '鸿范' => '鴻範',
@@ -10083,6 +10069,7 @@ public static $zh2Hans = [
 '巖' => '岩',
 '巗' => '岩',
 '巘' => '𪩘',
+'巠' => '𢀖',
 '巰' => '巯',
 '巵' => '卮',
 '帀' => '匝',
@@ -13981,6 +13968,7 @@ public static $zh2Hans = [
 '近角聪信' => '近角聪信',
 '造麴' => '造曲',
 '遺著' => '遗著',
+'鄭蘋如' => '郑苹如',
 '郭子乾' => '郭子乾',
 '酒麴' => '酒曲',
 '醉瀋' => '醉渖',
@@ -14299,7 +14287,6 @@ public static $zh2TW = [
 '机床' => '工具機',
 '機床' => '工具機',
 '珍寶客機' => '巨無霸客機',
-'发达国家' => '已開發國家',
 '巴塞罗那' => '巴塞隆納',
 '巴塞隆拿' => '巴塞隆納',
 '巴士拉' => '巴斯拉',
@@ -14402,6 +14389,7 @@ public static $zh2TW = [
 '旱烟' => '旱菸',
 '旱煙' => '旱菸',
 '普利策' => '普利茲',
+'普利策奖' => '普立茲獎',
 '芯片' => '晶片',
 '智能卡' => '智慧卡',
 '智能手机' => '智慧型手機',
@@ -14456,7 +14444,7 @@ public static $zh2TW = [
 '毛里裘斯' => '模里西斯',
 '樸茨茅夫' => '樸茨茅斯',
 '機械人' => '機器人',
-'率' => '機率',
+'率' => '機率',
 '電單車' => '機車',
 '枱' => '檯',
 '字段' => '欄位',
@@ -14498,7 +14486,8 @@ public static $zh2TW = [
 '熏肉' => '燻肉',
 '熏黑' => '燻黑',
 '版权信息' => '版權資訊',
-'疯牛症' => '狂牛症',
+'疯牛病' => '狂牛症',
+'瘋牛症' => '狂牛症',
 '鐵托' => '狄托',
 '铁托' => '狄托',
 '塞拉利昂' => '獅子山',
@@ -14550,6 +14539,7 @@ public static $zh2TW = [
 '私煙' => '私菸',
 '程序员' => '程式設計師',
 '编程语言' => '程式語言',
+'空中客车' => '空中巴士',
 '空气质量' => '空氣品質',
 '空氣質素' => '空氣品質',
 '突尼斯' => '突尼西亞',
@@ -14938,6 +14928,7 @@ public static $zh2HK = [
 '網際網路' => '互聯網',
 '井里' => '井裏',
 '亮著' => '亮着',
+'亮著《' => '亮著《',
 '亮著作' => '亮著作',
 '亮著名' => '亮著名',
 '亮著書' => '亮著書',
@@ -15235,6 +15226,7 @@ public static $zh2HK = [
 '保障著述' => '保障著述',
 '保障著錄' => '保障著錄',
 '信著' => '信着',
+'信著《' => '信著《',
 '信著作' => '信著作',
 '信著名' => '信著名',
 '信著書' => '信著書',
@@ -15305,6 +15297,7 @@ public static $zh2HK = [
 '凶殺' => '兇殺',
 '先占' => '先佔',
 '光著' => '光着',
+'光著《' => '光著《',
 '光著作' => '光著作',
 '光著名' => '光著名',
 '光著書' => '光著書',
@@ -15406,6 +15399,7 @@ public static $zh2HK = [
 '喀拉蚩' => '卡拉奇',
 '卡斯楚' => '卡斯特羅',
 '印著' => '印着',
+'印著《' => '印著《',
 '印著作' => '印著作',
 '印著名' => '印著名',
 '印著書' => '印著書',
@@ -15629,6 +15623,7 @@ public static $zh2HK = [
 '夢有五不占' => '夢有五不占',
 '梦有五不占' => '夢有五不占',
 '夢著' => '夢着',
+'夢著《' => '夢著《',
 '夢著作' => '夢著作',
 '夢著名' => '夢著名',
 '夢著書' => '夢著書',
@@ -15684,6 +15679,7 @@ public static $zh2HK = [
 '安地卡' => '安提瓜',
 '安地卡及巴布達' => '安提瓜和巴布達',
 '定著' => '定着',
+'定著《' => '定著《',
 '定著作' => '定著作',
 '定著名' => '定著名',
 '定著書' => '定著書',
@@ -15739,6 +15735,7 @@ public static $zh2HK = [
 '局里' => '局裏',
 '屋里' => '屋裏',
 '展著' => '展着',
+'展著《' => '展著《',
 '展著作' => '展著作',
 '展著名' => '展著名',
 '展著書' => '展著書',
@@ -15850,6 +15847,7 @@ public static $zh2HK = [
 '德勒斯登' => '德累斯頓',
 '澈底' => '徹底',
 '心著' => '心着',
+'心著《' => '心著《',
 '心著作' => '心著作',
 '心著名' => '心著名',
 '心著書' => '心著書',
@@ -15942,6 +15940,7 @@ public static $zh2HK = [
 '應著述' => '應著述',
 '應著錄' => '應著錄',
 '懷著' => '懷着',
+'懷著《' => '懷著《',
 '懷著作' => '懷著作',
 '懷著名' => '懷著名',
 '懷著書' => '懷著書',
@@ -16281,6 +16280,7 @@ public static $zh2HK = [
 '晃著者' => '晃著者',
 '晃著述' => '晃著述',
 '晃著錄' => '晃著錄',
+'普利策奖' => '普立茲獎',
 '晶元' => '晶片',
 '芯片' => '晶片',
 '智慧型' => '智能',
@@ -16395,6 +16395,7 @@ public static $zh2HK = [
 '榴莲' => '榴槤',
 '榴蓮' => '榴槤',
 '樂著' => '樂着',
+'樂著《' => '樂著《',
 '樂著作' => '樂著作',
 '樂著名' => '樂著名',
 '樂著書' => '樂著書',
@@ -16736,6 +16737,7 @@ public static $zh2HK = [
 '疑著述' => '疑著述',
 '疑著錄' => '疑著錄',
 '狂牛症' => '瘋牛症',
+'疯牛病' => '瘋牛症',
 '丹帕沙' => '登巴薩',
 '发布' => '發佈',
 '發布' => '發佈',
@@ -16747,6 +16749,7 @@ public static $zh2HK = [
 '發著者' => '發著者',
 '白里透红' => '白裏透紅',
 '戈登·布朗' => '白高敦',
+'百慕大' => '百慕達',
 '百科里' => '百科裏',
 '的图里' => '的圖裏',
 '的山里' => '的山裏',
@@ -16893,6 +16896,7 @@ public static $zh2HK = [
 '穩占' => '穩佔',
 '穫著' => '穫着',
 '空中布雷' => '空中佈雷',
+'空中客车' => '空中巴士',
 '空投布雷' => '空投佈雷',
 '空气质量' => '空氣質素',
 '空氣品質' => '空氣質素',
@@ -17902,14 +17906,6 @@ public static $zh2HK = [
 '牛轧' => '鳥結',
 '鳩占' => '鳩佔',
 '鸠占' => '鳩佔',
-'麗著' => '麗着',
-'麗著作' => '麗著作',
-'麗著名' => '麗著名',
-'麗著書' => '麗著書',
-'麗著稱' => '麗著稱',
-'麗著者' => '麗著者',
-'麗著述' => '麗著述',
-'麗著錄' => '麗著錄',
 '麼著' => '麼着',
 '芮氏0' => '黎克特制0',
 '里氏0' => '黎克特制0',
@@ -17962,7 +17958,10 @@ public static $zh2CN = [
 '16進位制' => '16进位制',
 '16進位' => '16进制',
 'IP位址' => 'IP地址',
+'乙個' => '一个',
+'乙份' => '一份',
 '一份子' => '一分子',
+'乙隻' => '一只',
 '全球資訊網' => '万维网',
 '三十六著' => '三十六着',
 '三極體' => '三极管',
@@ -18026,17 +18025,10 @@ public static $zh2CN = [
 '為著者' => '为著者',
 '為著述' => '为著述',
 '主機板' => '主板',
-'麗著' => '丽着',
-'麗著書' => '丽著书',
-'麗著作' => '丽著作',
-'麗著名' => '丽著名',
-'麗著錄' => '丽著录',
-'麗著稱' => '丽著称',
-'麗著者' => '丽著者',
-'麗著述' => '丽著述',
 '麼著' => '么着',
 '烏龍麵' => '乌冬面',
 '樂著' => '乐着',
+'樂著《' => '乐著《',
 '樂著書' => '乐著书',
 '樂著作' => '乐著作',
 '樂著名' => '乐著名',
@@ -18078,6 +18070,7 @@ public static $zh2CN = [
 '雅穆索戈' => '亚穆苏克罗',
 '交帳' => '交账',
 '亮著' => '亮着',
+'亮著《' => '亮著《',
 '亮著書' => '亮著书',
 '亮著作' => '亮著作',
 '亮著名' => '亮著名',
@@ -18108,6 +18101,8 @@ public static $zh2CN = [
 '代表著者' => '代表著者',
 '代表著述' => '代表著述',
 '乙太網' => '以太网',
+'份外卖' => '份外卖',
+'份外,' => '份外,',
 '伊莉莎白' => '伊丽莎白',
 '伊利諾' => '伊利诺伊',
 '伊利諾伊' => '伊利诺伊',
@@ -18181,6 +18176,7 @@ public static $zh2CN = [
 '資訊時代' => '信息时代',
 '資訊理論' => '信息论',
 '信著' => '信着',
+'信著《' => '信著《',
 '信著書' => '信著书',
 '信著作' => '信著作',
 '信著名' => '信著名',
@@ -18228,6 +18224,7 @@ public static $zh2CN = [
 '偷著述' => '偷著述',
 '傅利葉' => '傅里叶',
 '光著' => '光着',
+'光著《' => '光著《',
 '光著書' => '光著书',
 '光著作' => '光著作',
 '光著名' => '光著名',
@@ -18303,6 +18300,7 @@ public static $zh2CN = [
 '涼著述' => '凉著述',
 '湊合著' => '凑合着',
 '幾內亞比索' => '几内亚比绍',
+'機率' => '几率',
 '憑著' => '凭着',
 '憑著作' => '凭著作',
 '憑著名' => '凭著名',
@@ -18395,6 +18393,7 @@ public static $zh2CN = [
 '羅浮宮' => '卢浮宫',
 '羅亞爾' => '卢瓦尔',
 '印著' => '印着',
+'印著《' => '印著《',
 '印著書' => '印著书',
 '印著作' => '印著作',
 '印著名' => '印著名',
@@ -18423,7 +18422,6 @@ public static $zh2CN = [
 '發著名' => '发著名',
 '發著稱' => '发著称',
 '發著者' => '发著者',
-'已開發國家' => '发达国家',
 '受著' => '受着',
 '受著書' => '受著书',
 '受著作' => '受著作',
@@ -18697,6 +18695,7 @@ public static $zh2CN = [
 '安地卡及巴布達' => '安提瓜和巴布达',
 '巨集' => '宏',
 '定著' => '定着',
+'定著《' => '定著《',
 '定著書' => '定著书',
 '定著作' => '定著作',
 '定著名' => '定著名',
@@ -18732,6 +18731,7 @@ public static $zh2CN = [
 '區域網' => '局域网',
 '區域網路' => '局域网络',
 '展著' => '展着',
+'展著《' => '展著《',
 '展著書' => '展著书',
 '展著作' => '展著作',
 '展著名' => '展著名',
@@ -18855,6 +18855,7 @@ public static $zh2CN = [
 '德勒斯登' => '德累斯顿',
 '德希達' => '德里达',
 '心著' => '心着',
+'心著《' => '心著《',
 '心著書' => '心著书',
 '心著作' => '心著作',
 '心著名' => '心著名',
@@ -18881,6 +18882,7 @@ public static $zh2CN = [
 '忙著述' => '忙著述',
 '忠貞著' => '忠贞着',
 '懷著' => '怀着',
+'懷著《' => '怀著《',
 '懷著書' => '怀著书',
 '懷著作' => '怀著作',
 '懷著名' => '怀著名',
@@ -19271,6 +19273,7 @@ public static $zh2CN = [
 '晃著者' => '晃著者',
 '晃著述' => '晃著述',
 '普利茲' => '普利策',
+'普立茲獎' => '普利策奖',
 '蒲美蓬' => '普密蓬',
 '蒲朗克' => '普朗克',
 '電晶體' => '晶体管',
@@ -19372,6 +19375,7 @@ public static $zh2CN = [
 '森巴舞' => '桑巴舞',
 '梅赫西迪' => '梅赛德斯',
 '夢著' => '梦着',
+'夢著《' => '梦著《',
 '夢著書' => '梦著书',
 '夢著作' => '梦著作',
 '夢著名' => '梦著名',
@@ -19631,6 +19635,7 @@ public static $zh2CN = [
 '疑著者' => '疑著者',
 '疑著述' => '疑著述',
 '狂牛症' => '疯牛病',
+'瘋牛症' => '疯牛病',
 '徵狀' => '症状',
 '丹帕沙' => '登巴萨',
 '百慕達' => '百慕大',
@@ -19825,6 +19830,7 @@ public static $zh2CN = [
 '磁碟' => '磁盘',
 '磁軌' => '磁道',
 '福馬林' => '福尔马林',
+'富比士' => '福布斯',
 '福著' => '福着',
 '福著書' => '福著书',
 '福著作' => '福著作',
index 91191b7..b3df9ec 100644 (file)
        "error": "Wōh",
        "databaseerror": "Cȳþþuhordes wōh",
        "databaseerror-textcl": "Gecyþneshordfræge misgedwild belamp",
+       "databaseerror-query": "Æsce: $1",
+       "databaseerror-function": "Wice: $1",
        "databaseerror-error": "Wōg: $1",
        "laggedslavemode": "'''Warnung:''' Wēnunga næbbe se tramet nīwlīca nīwunga.",
        "readonly": "Ġifhord locen",
index 2ff7090..137e7ea 100644 (file)
        "botpasswords-editexisting": "تعديل كلمة سر موجودة للبوت",
        "botpasswords-label-needsreset": "(تحتاج كلمة المرور إلى إعادة الضبط)",
        "botpasswords-label-appid": "اسم البوت:",
-       "botpasswords-label-create": "Ø£Ù\86شأ",
+       "botpasswords-label-create": "Ø¥Ù\86شاء",
        "botpasswords-label-update": "تحديث",
        "botpasswords-label-cancel": "ألغ",
        "botpasswords-label-delete": "احذف",
        "confirmemail_pending": "تم إرسال كود التأكيد إلى بريدك الإلكتروني مؤخراً؛\nإذا كنت قد أنشأت حسابك للتو، من الأفضل أن تنتظر بضع دقائق قبل أن تطلب كوداً آخر.",
        "confirmemail_send": "أرسل كود تأكيد",
        "confirmemail_sent": "تم إرسال رسالة التأكيد، شكرا لك.",
-       "confirmemail_oncreate": "تم إرسال كود تأكيد إلى عنوان بريدك الإلكتروني.\nالكود غير مطلوب للدخول إلى الموسوعة باسمك، ولكن يجب إدخاله قبل استخدامك أياً من خواص البريد الإلكتروني المستخدمة هنا في الويكي.",
+       "confirmemail_oncreate": "تم إرسال كود تأكيد إلى عنوان بريدك الإلكتروني.\nالكود غير مطلوب للدخول، ولكن يجب إدخاله قبل استخدامك أيًّا من خواص البريد الإلكتروني المستخدمة هنا في الويكي.",
        "confirmemail_sendfailed": "لم يتمكن {{SITENAME}} من إرسال رسالة التأكيد إليك.\nمن فضلك تأكد من عنوان بريدك الإلكتروني بحثاً عن حروف غير صحيحة.\n\nأرجع خادم البريد: $1",
        "confirmemail_invalid": "كود تأكيد غير صحيح.\nربما انتهت فترة صلاحيته.",
        "confirmemail_needlogin": "يجب عليك $1 لتأكيد بريدك الإلكتروني.",
        "passwordpolicies-policyflag-forcechange": "يجب أن تتغير عند تسجيل الدخول",
        "passwordpolicies-policyflag-suggestchangeonlogin": "اقتراح التغيير عند تسجيل الدخول",
        "easydeflate-invaliddeflate": "المحتوى المقدم لا يتم تفريغه بشكل صحيح",
-       "unprotected-js": "لأسباب تتعلق بالأمان; لا يمكن تحميل جافا سكريبت من الصفحات غير المحمية; الرجاء إنشاء جافا سكريبت فقط في نطاق ميدياويكي: أو كصفحة فرعية للمستخدم"
+       "unprotected-js": "لأسباب تتعلق بالأمان; لا يمكن تحميل جافا سكريبت من الصفحات غير المحمية; الرجاء إنشاء جافا سكريبت فقط في نطاق ميدياويكي: أو كصفحة فرعية للمستخدم",
+       "userlogout-continue": "إذا كنت ترغب في تسجيل الخروج، تُرجَى [$1 المتابعة إلى صفحة تسجيل الخروج].",
+       "userlogout-sessionerror": "فشل تسجيل الخروج بسبب خطأ في الجلسة، تُرجَى [$1 المحاولة مرة أخرى]."
 }
index 50165f4..522ac69 100644 (file)
@@ -18,6 +18,7 @@
        "tog-hideminor": "engkebang suntingan ring gentosan sane pinih anyar",
        "tog-hidepatrolled": "engkebang suntingan mapatrol ring gentosan sane pinih anyar",
        "tog-newpageshidepatrolled": "engkebang lembar mapatrol saking saking kepahan lembar anyar",
+       "tog-hidecategorization": "Engkebang kacané",
        "tog-extendwatchlist": "kembangang kepahan pangiwasan antuk nampilang samian panguwahan, nenten sane anyar kewanten",
        "tog-usenewrc": "aniang suntingan ring tampilan pagentosan sane pinih anyar lan kepahan pangiwasan manutin lembar",
        "tog-numberheadings": "isinin nomor murda anggen cara otomatis",
@@ -35,9 +36,9 @@
        "tog-enotifminoredits": "taler kirimang titiang email ring panguwahan alit",
        "tog-enotifrevealaddr": "kirimang titiang alamat email ring catetan email",
        "tog-shownumberswatching": "tampilang akehnyane sane ngiwasin",
-       "tog-oldsig": "tanda tangan mangkin",
+       "tog-oldsig": "Tanda tangan mangkin",
        "tog-fancysig": "dadosang tanda tangan dados teks wiki (nenten pranala otomatis)",
-       "tog-uselivepreview": "anggen pratayang langsung(experimental)",
+       "tog-uselivepreview": "Anggen pratayang langsung ten anggen kaca sane malunan",
        "tog-forceeditsummary": "elingang titiang yening kotak ringkesan suntingan kari kosong",
        "tog-watchlisthideown": "engkebang panguwahan titiang saking kepahan pangiwasan",
        "tog-watchlisthidebots": "engkebang panguwahan bot ring kepahan pangiwasan",
@@ -48,9 +49,9 @@
        "tog-ccmeonemails": "kirimang titiang salinan email sane kirimang titiang ring anak lianan",
        "tog-diffonly": "sampunang katampilang daging lembar ring ungkur binanne suntingan",
        "tog-showhiddencats": "tampilang golongan sane kaengkebang",
-       "tog-norollbackdiff": "sampunang tampilang binanne sesampun ngewaliang",
+       "tog-norollbackdiff": "Sampunang tampilang binanne sesampun ngewaliang",
        "tog-useeditwarning": "elingang titiang yening ngalahin lembar panyuntingan sadurung nyimpen pagentosan",
-       "tog-prefershttps": "setata nganggen sambungan sane aman rikala malebu log",
+       "tog-prefershttps": "Setata nganggen sambungan sane aman rikala malebu log",
        "underline-always": "Setata",
        "underline-never": "Nénten naénin",
        "underline-default": "kulit utawi penjelajah paaban",
        "category-media-header": "lembar ring golongan \"$1\"",
        "category-empty": "\"mangkin, nenten madaging lembar utawi pekakas ring golongan puniki\"",
        "hidden-categories": "{{plural:$1|punduhan sane kaengkebang| punduhan sane kaengkebang}}",
+       "hidden-category-category": "Kategori mengkeb",
        "category-subcat-count": "{{PLURAL:$2| golongan puniki madue {{PLURAL:$1|$1 subkategori}} puniki, saking genepan $2.}}",
        "category-article-count": "{{PLURAL:$2|golongan puniki madue{{PLURAL:$1|$1 lembar}}, saking total $2.}}",
        "category-file-count": "{{PLURAL:$2|golongan puniki madue{{PLURAL:$1|$1 lembar}}, saking total $2.}}",
        "listingcontinuesabbrev": "samb.",
-       "noindex-category": "lembar sane nenten maindeks",
+       "noindex-category": "Lembar sane nenten maindeks",
+       "broken-file-category": "Suratan sane ngelah pranala usak",
        "about": "Indik",
        "newwindow": "(bukak ring jendela anyar)",
        "cancel": "Buwung",
+       "mypage": "Kaca",
        "mytalk": "Wicara",
        "anontalk": "Wicara",
        "navigation": "Pengarah",
        "actions": "Parilaksana",
        "namespaces": "Genah pesengan",
        "variants": "kawentenan sane lianan",
-       "navigation-heading": "menu navigasi",
+       "navigation-heading": "Menu navigasi",
        "errorpagetitle": "kaluputan",
        "returnto": "mabalik ring $1",
        "tagline": "Saka {{SITENAME}}",
        "help": "Tulung",
+       "help-mediawiki": "Pitulung MediaWiki",
        "search": "Rereh",
        "searchbutton": "Rereh",
        "searcharticle": "lanturang",
        "history": "sejarah pupulan",
        "history_short": "kawentenan sane lawas",
+       "history_small": "babad",
        "printableversion": "kawentenan lian sane macetak",
        "permalink": "Pranala ajeg",
        "view": "cingakin",
        "protect_change": "gentos",
        "newpage": "Lembar Anyar",
        "talkpagelinktext": "Wicara",
+       "specialpage": "Lembar sane kautamayang",
        "personaltools": "pekakas pribadi",
-       "talk": "rembug\n\nngarembug (kata kerja)",
+       "talk": "Rembug",
        "views": "Pekantenan",
        "toolbox": "Pekakas",
        "viewhelppage": "cingak lembar pamitutlung",
        "disclaimers": "nungkas",
        "disclaimerpage": "Project:Pengelidan lumrah",
        "edithelp": "pamitulung panguwahan",
+       "helppage-top-gethelp": "Tulung",
        "mainpage": "Kaca Utama",
        "mainpage-description": "Lembar Utama",
        "portal": "Pintu nuju sekha",
        "portal-url": "Project:pamedal sekha",
        "privacy": "kawicaksanaan padewekan",
        "privacypage": "Project:kawicaksanan tanpaiket",
+       "ok": "OK",
        "retrievedfrom": "kapolihang saking \"$1\"",
        "youhavenewmessages": "{{PLURAL:$3|ida dane maduwe}} $1 ($2)",
+       "youhavenewmessagesfromusers": "{{PLURAL:$4|You have}} $1 ring {{PLURAL:$3|another user|$3 users}} ($2).",
+       "youhavenewmessagesmanyusers": "Ida dane ngelah $1 saking liyane ($2).",
        "editsection": "gentos",
        "editold": "mecikang",
        "viewsourceold": "cingak witnyane",
        "viewsourcelink": "cingak witnyane",
        "editsectionhint": "ubah kepahan$1",
        "toc": "kepahan dagingnyane",
+       "showtoc": "edengang",
+       "hidetoc": "engkebang",
+       "collapsible-expand": "buka",
+       "confirmable-confirm": "{{GENDER:$1|Ida}} dane yakin?",
+       "confirmable-yes": "Inggih",
+       "confirmable-no": "Nénten",
        "site-atom-feed": "$1 \"atom feed\"",
        "page-atom-feed": "$1 \"atom feed\"",
        "red-link-title": "$1 (kaca tan wénten)",
        "nstab-help": "lembar pamitutlung",
        "nstab-category": "golongan",
        "mainpage-nstab": "Kaca Utama",
+       "nosuchspecialpage": "Ten wenten lembar spesial",
+       "error": "kaluputan",
+       "databaseerror": "Database kaluputan",
        "missing-article": "data utama nenten prasida nemu tulisan saking lembar sane sepatutne wenten, inggih punika  $1, $2\n\nindike puniki biasane keranayang olih pranala kaon nuju pabenahan sane dumun lembar sane sampun kaicalang\n\nyening nenten puniki sane ngranayang, ida dane minab sampun manggihin kaiwangang ring sajeroning piranti lunak.\nDurus sadokang indik puniki rin silih sinunggil anak \n\n[[Special:ListUsers/sysop|Pengurus]], antuk ngetik alamat URL sane katuju",
        "missingarticle-rev": "(pabenahan#:$1)",
        "badtitle": "murda sane nenten manut",
        "badtitletext": "Judul halaman sane katagih nenten patut, kosong, atau judul antarbahasa atau antarwiki yang salah sambung.\n\nmurda lembar sane kaarsa nenten sida kaedengang, kosong, utawi murda murda antarbasa utawi antarwiki sane iwang",
        "viewsource": "cingak witnyane",
+       "viewsourcetext": "Ida dane dados ningalin lan kopi sumber saking suratan puniki",
        "yourname": "pesengan penganggen",
+       "userlogin-yourname": "Penganggen",
+       "userlogin-yourname-ph": "Isi Kruna sandi ida dane",
        "yourpassword": "kruna sandi",
+       "userlogin-yourpassword": "Kruna sandi",
        "yourpasswordagain": "jumunin kruna sandi",
        "login": "Ngranjing log",
        "nav-login-createaccount": "malebu log / ngawe pepalihan",
+       "logout": "Medal Log",
        "userlogout": "medal saking Log",
+       "notloggedin": "Konden masuk log",
+       "userlogin-noaccount": "Durung madue akun?",
+       "userlogin-joinproject": "Indik {{SITENAME}}",
        "createaccount": "ngajuang akun anyar",
        "mailmypassword": "nyumu ngaryanin kruna sandi",
        "loginlanguagelabel": "Basa: $1",
+       "pt-login": "Ngranjing log",
+       "pt-login-button": "Ngranjing log",
+       "pt-createaccount": "Ngajuang akun anyar",
+       "pt-userlogout": "Medal Log",
+       "botpasswords-label-create": "Ngae",
+       "botpasswords-label-cancel": "Buungan",
+       "botpasswords-label-delete": "Apus",
+       "botpasswords-label-resetpassword": "Nyumu kruna sandi",
+       "passwordreset": "Nyumu kruna sandi",
        "bold_sample": "teks puniki mesurat tebel",
        "bold_tip": "teks puniki mesurat tebel",
        "italic_sample": "teks puniki masurat sendeh",
        "savearticle": "simpen lembar",
        "preview": "tayangan sadurungnyane",
        "showpreview": "cingak sane lintang",
-       "showdiff": "cingak pagentosan",
-       "anoneditwarning": "\"Pingetan\" ida dané nénten kacatet ngranjing. Alamat IP ida dané jagi kacatet ring sejarah (indik sané dumunan) ring lembar puniki.",
+       "showdiff": "Cingak pagentosan",
+       "anoneditwarning": "<strong>Pingetan:</strong> Ida dané nénten kacatet ngranjing. Alamat IP ida dané jagi kacatet ring sejarah (indik sané dumunan) ring lembar puniki. Yening ida dane <strong>[$1 log in]</strong> utawi <strong>[$2 create an account]</strong>, your edits will be attributed to your username, along with other benefits.",
        "newarticle": "(Anyar)",
        "newarticletext": "ida dane ngiring pranala nuju lembar sane durung wenten. yening jagi ngaryanang lembar punika, ketik daging lembar ring kotak sane wenten ring beten puniki. (cingak [$1 lembar wantuan] anggen wacana salanturnyane). yening ida dane nenten nyelapang neked ring lembar puniki, klik tombol \"back\" ring \"penjelajah web\" ida dane.",
        "noarticletext": "mangkin nenten wenten teks ring lembar puniki. ida dane prasida [[Special:Search/{{PAGENAME}}|ngrereh murda nganggen lembar puniki]] ring lembar-lembar sane lianan, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ngrereh log sane mapaiketan], utawi [{{fullurl:{{FULLPAGENAME}}|action=edit}} nguwah lembar puniki]</span>.",
        "hiddencategories": "lembar niki inggih punika krama saking {{PLURAL:$1|1 golongan sane mengkeb|$1 golongan sane mengkeb}}",
        "permissionserrorstext-withaction": "ida dané nénten madué kuasa ngranjing anggén $2, riantukan {{PLURAL:$1|alasan}} ring sor puniki:",
        "recreate-moveddeleted-warn": "\"pingetan\" ida dane ngawe malih lembar sane naenin maapus.'''\n\nmangda kayunin malih napike pantes lanturang suntingan ida dane. puniki log pengapusan lan pangisidan saking lembar puniki:",
-       "moveddeleted-notice": "lembar puniki sampun kaapus. anggen pewarah, puniki log pangapus lan pengisidan lembar puniki",
+       "moveddeleted-notice": "Lembar puniki sampun kaapus.\nAnggen pewarah, proteksi, lan pengisidan log saking lembar puniki cingakin pustaka beten.",
+       "content-model-wikitext": "tulisan wiki",
        "post-expand-template-inclusion-warning": "pinget: ukuran templat sane keanggen kalangkung ageng. wenten templat sane kacampahang",
        "post-expand-template-inclusion-category": "lembar sane maukuran templat sane nglangkungin wates",
        "post-expand-template-argument-warning": "\"peminget\" lembar puniki madaging kiranglangkungnyane siki argumen templat anggen ukuran ekspansi sane kaliwat ageng. argumen-argumen punika sampun kacampahang.",
        "viewpagelogs": "cingak log ring lembar puniki",
        "currentrev-asof": "pabecikan sane anyar ring pinanggal$1",
        "revisionasof": "ngabecikang per $1",
-       "revision-info": "panguwahan per $1;$2",
+       "revision-info": "Panguwahan per $1 olih {{GENDER:$6|$2}}$7",
        "previousrevision": "← pabenahan sane dumun",
        "nextrevision": "panguwahan salanturnyane→",
        "currentrevisionlink": "panguwahan mangkin",
        "cur": "mangkin",
        "last": "sadurung",
        "histlegend": "pilih kalih tombol radio lantur pecik tombol \"bandingang\" anggen ngebandingang indik lianan. klik siki tanggal anggen nyingak indik lianan lembar ring pinanggal punika.<br />(skr)= binanne saking indik lianan sane mangkin, (untat) = binanne saking indik lianan sane dumunan, '''k''' = panguwahan alit, '''b''' = panguwahan bot, → = panguwahan kepahan, ← = reringkesan otomatis",
-       "history-fieldset-title": "napakin versi sane dumunan",
+       "history-fieldset-title": "Nyaringin révisi",
        "history-show-deleted": "wantah sane kaapus",
        "histfirst": "pinih suwe",
        "histlast": "pinih anyar",
        "newuserlogpage": "log penganggo anyar",
        "action-edit": "benahang lembar puniki",
        "nchanges": "$1{{PLURAL:$1|panguwahan|uwah-uwahan}}",
-       "recentchanges": "pagentosan sane anyar",
+       "enhancedrc-history": "babad",
+       "recentchanges": "Pagentosan anyar",
        "recentchanges-legend": "pilihan panguwahan sane anyar",
        "recentchanges-feed-description": "molihang pagentosan anyar ring wiki ring \"umpan\" puniki",
        "recentchanges-label-newpage": "panguwahan puniki ngaryanin lembar anyar",
        "recentchanges-label-minor": "niki panguwahan kidik",
        "recentchanges-label-bot": "penguwahan puniki kalaksanayang antuk bot",
        "recentchanges-label-unpatrolled": "panguwahan puniki durung kapatroli",
-       "rcnotefrom": "ring beten puniki inggih punika panguwahan saking <strong>$2</strong> (kaedengang ngantos <strong>$1</strong> panguwahan).",
+       "rcnotefrom": "Ring beten puniki inggih punika {{PLURAL:$5|panguwahan}} saking <strong>$3, $4</strong> (kaedengang ngantos <strong>$1</strong> panguwahan).",
        "rclistfrom": "edengang  penguwahan sane anyar wit saking $3 $2",
        "rcshowhideminor": "$1 uwahan kidik",
+       "rcshowhideminor-show": "Edengang",
+       "rcshowhideminor-hide": "Engkebang",
        "rcshowhidebots": "$1 bot",
+       "rcshowhidebots-show": "Edengang",
+       "rcshowhidebots-hide": "Engkebang",
        "rcshowhideliu": "$1 penganggo - penganggo terdaftar",
+       "rcshowhideliu-show": "Edengang",
+       "rcshowhideliu-hide": "engkebang",
        "rcshowhideanons": "$1 penganggo tan meadan",
+       "rcshowhideanons-show": "Edengang",
+       "rcshowhideanons-hide": "Engkebang",
        "rcshowhidepatr": "$1 suntingan sane kapatroli",
        "rcshowhidemine": "$1 uwahan titiang",
-       "rclinks": "edengang sane untat $1 gentosan anyar $2 dina kaping untat",
+       "rcshowhidemine-show": "Edengang",
+       "rcshowhidemine-hide": "Engkebang",
+       "rclinks": "Edengang untat $1 gentosan anyar $2 dina kaping untat",
        "diff": "bina",
        "hist": "kawentenan sane lian",
        "hide": "engkebang",
        "filedesc": "pacutetan",
        "license": "kepahan lugra",
        "license-header": "kepahan lugra",
+       "imgfile": "pupulan",
        "file-anchor-link": "pupulan",
        "filehist": "sejarah pupulan",
        "filehist-help": "klik ring pinanggal/galah anggen nyingakin pupulan niki rikala punika",
        "filehist-comment": "tureksa",
        "imagelinks": "penganggen berkas",
        "linkstoimage": "nyarengin {{PLURAL:$1|pranala|$1pranala}} ring pupulan puniki",
-       "nolinkstoimage": "nenten wenten lembar sane medue pranala ring pupulan puniki",
+       "nolinkstoimage": "Nenten wenten lembar sane medue pranala ring pupulan puniki",
        "sharedupload-desc-here": "pupulan puniki mawit saking $1 lan minab kaanggen olih proyek-proyek sane lianan. Deskripsi saking [$2 lebar deskripsinyane] kaarahin ring ungkur puniki",
        "randompage": "lembar acak",
        "statistics": "Statistik",
        "pager-older-n": "{{PLURAL:$1|1 lewih suwe|$1 lewih anyar}}",
        "booksources": "pawiwitan buku",
        "booksources-search-legend": "rereh ring sumber buku",
+       "booksources-search": "Rereh",
        "log": "log",
        "allpages": "samian lembar",
        "allarticles": "samian lembar",
        "rollbacklink": "mabalik",
        "protectlogpage": "log penyaga",
        "protectedarticle": "nyaga \"[[$1]]\"",
+       "protect-default": "Izinkan mekejang",
+       "restriction-edit": "Becikang",
        "undeletelink": "cingak/uliang",
        "undeleteviewlink": "cingak",
        "namespace": "Genah pesengan",
        "invert": "uliang pilihan",
        "tooltip-invert": "Centang kotak puniki mangdané ngengkebang lembar sané kauwah ring genah wastan sané kapilih (miwah genah wastan sané mapaiketan yéning kacentang)",
-       "blanknamespace": "utama",
+       "blanknamespace": "(Utama)",
        "contributions": "kawigunan {{GENDER:$1|penganggo}}",
        "contributions-title": "Kontribusi pangangge anggen $1",
        "mycontris": "kawigunan",
+       "anoncontribs": "Kawigunan",
        "contribsub2": "antuk {{GENDER:$3|$1}} ($2)",
        "uctop": "sane mangkin",
        "month": "mawit saking sasih (lan sadurungnyane)",
        "sp-contributions-search": "rereh anggen kawigunanne",
        "sp-contributions-username": "Alamat IP utawi pesengan panganggo:",
        "sp-contributions-toponly": "tampilang wantah panguwahan sane anyar",
+       "sp-contributions-newonly": "Tampilang wantah panguwahan sane anyar",
        "sp-contributions-submit": "rereh",
        "whatlinkshere": "Pranala balik",
        "whatlinkshere-title": "lembar-lembar sane maduwe pranala kaping \"$1\"",
        "whatlinkshere-links": "← pranala",
        "whatlinkshere-hideredirs": "$1 pangalihan",
        "whatlinkshere-hidetrans": "$1 transklusi",
-       "whatlinkshere-hidelinks": "$1 Pranala",
+       "whatlinkshere-hidelinks": "$1 pranala",
        "whatlinkshere-hideimages": "$1 pranala pupulan",
        "whatlinkshere-filters": "Panyaring",
        "ipboptions": "2 jam:2 hours,1 dina:1 day,3 dina:3 days,1 minggu:1 week,2 minggu:2 weeks,1 sasih:1 month,3 sasih:3 months,6 sasih:6 months,1 taun:1 year,tanpa wates:infinite",
        "allmessagesdefault": "teks lingga",
        "thumbnail-more": "ngedenang",
        "thumbnail_error": "luput ngaryanin bentuk cenik $1",
-       "tooltip-pt-userpage": "lembar sane kaanggen ida dane",
-       "tooltip-pt-mytalk": "lembar wicara ida dane",
-       "tooltip-pt-preferences": "Preferensi titiang",
+       "tooltip-pt-userpage": "Lembar sane {{GENDER:|kaanggen ida dane}}",
+       "tooltip-pt-mytalk": "lembar wicara {{GENDER:|Ida dane}}",
+       "tooltip-pt-preferences": "Preferensi {{GENDER:|Ida dane}}",
        "tooltip-pt-watchlist": "kepahan-kepahan lembar sane katinjo titiang",
-       "tooltip-pt-mycontris": "kepahan-kepahan kawigunan ida dane",
+       "tooltip-pt-mycontris": "Kepahan-kepahan kawigunan {{GENDER:|Ida dane}}",
        "tooltip-pt-login": "ida dané kaaturang ngranjing log, nanging nénten kaswadarmayang",
        "tooltip-pt-logout": "medal saking Log",
        "tooltip-pt-createaccount": "ragané mangda makarya akun miwah ngranjing log: yadiastun nénten kawajibang",
        "tooltip-n-randompage": "edengang polah-palih lembar",
        "tooltip-n-help": "genah anggen ngarereh",
        "tooltip-t-whatlinkshere": "kepahan sami lembar wiki sane maduwe pranala nuju lembar puniki",
-       "tooltip-t-recentchangeslinked": "pagentosan sane anyar lembar-lembar sane maduwe pranala nuju lembar puniki",
+       "tooltip-t-recentchangeslinked": "Pagentosan anyar lembar sane maduwe pranala nuju lembar puniki",
        "tooltip-feed-atom": "\"atom feed\" anggen lembar puniki",
-       "tooltip-t-contributions": "cingak kepahan kawigunan penganggo niki",
-       "tooltip-t-emailuser": "kirim email majeng ring penganggo puniki",
+       "tooltip-t-contributions": "Daptar kepahan kawigunan {{GENDER:$1|penganggo niki}}",
+       "tooltip-t-emailuser": "Ngirim surel majeng ring {{GENDER:$1|penganggo puniki}}",
        "tooltip-t-upload": "ngunggahang file",
-       "tooltip-t-specialpages": "kepahan sami lembar istimewa",
+       "tooltip-t-specialpages": "Kepahan sami lembar istimewa",
        "tooltip-t-print": "kawentenan lian sane macetak ring lembar puniki",
        "tooltip-t-permalink": "Pranala ajeg kaanggen ngubah lembar puniki",
        "tooltip-ca-nstab-main": "cingak dagingnyane lembar puniki",
        "tooltip-ca-nstab-help": "cingak lembar pamitutlung",
        "tooltip-ca-nstab-category": "cingak lembar kategori",
        "tooltip-minoredit": "pingetin puniki dados panguwahan kidik",
-       "tooltip-save": "simpen pagentosan ida dane",
-       "tooltip-preview": "pagentosan sane dumun duwen ida dane, mangda anggen niki sadurung jagi nyimpen!",
-       "tooltip-diff": "cingak pagentosan sane sampun ida dane laksanayang",
+       "tooltip-save": "Nyimpen pagentosan ida dane",
+       "tooltip-preview": "Pagentosan sane dumun duwen ida dane, mangda anggen niki sadurung jagi nyimpen!",
+       "tooltip-diff": "Cingak pagentosan sane sampun ida dane laksanayang",
        "tooltip-compareselectedversions": "cingak binane makekalih kepahan lembar sane kasudi",
        "tooltip-watch": "imbuhin lembar niki ring daftar paninjoan ida dane",
        "tooltip-rollback": "\"nguliang\" muwungan jagi ngabecikang ring lembar puniki nuju haturan sane untat ngangge apisan klik",
        "tooltip-undo": "\"nguliang\" ngabuwungin jagi ngabecikang niki lan ngagah kotak mecikang ngangge mode pratayang. dasar ipun prasida kaimbuhin ring kotak pamicutet",
        "tooltip-summary": "ngalebuang silih sinunggil ringkesan",
+       "simpleantispam-label": "Pamariksa anti-spam.\nPuniki <strong>wenten</strong> kaisi!",
+       "pageinfo-header-edits": "Babad becikang",
+       "pageinfo-display-title": "Edengang judul",
+       "pageinfo-article-id": "ID Halaman",
+       "pageinfo-toolboxlink": "Katérangan lembar",
        "previousdiff": "← Benahin sadurungnyane",
        "nextdiff": "panguwahan sane pinih anyar →",
        "file-info-size": "$1x$2 piksel, ukuran pupulan: $3, tipe MIME:$4",
        "watchlisttools-view": "edengang panguwahan sane mapaiket",
        "watchlisttools-edit": "edengang lan uwahin kepangan paninjo",
        "watchlisttools-raw": "uwah kepahan paninjo mentah",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|wicara]])",
        "duplicate-defaultsort": "pingetan: sereg pangurutan lingga \"$2\" nyampahang sereg pangurutan lingga sadurunge \"$1\"",
        "specialpages": "lembar melulu",
        "external_image_whitelist": "#banggiang baris niki sapunapi kawentenanne<pre>\n#anggen fragmen akspresi reguler (wantah kepahan ring kekelaih//) ring sor puniki\n#fragmen-fragmen puniki jagi kaadungang sareng URL saking gambar-gambar eksternal (sane kasambungang langsung)\n#fragmen sane adung jagi katampilang dados gambar, sisanne wantah dados pranala kewanten\n#baris sane kakawitin antuk # jagi kadadosang baris komentar\n#niki nenten ngabinayang aksara ageng lan alit\n#genahang samian fragmen ekspresi reguler ring sor baris puniki. banggiang baris niki sapunapi kawentennane</pre>",
        "tag-filter": "filter [[Special:Tags|tag]]:",
        "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag}}]]: $2",
-       "logentry-newusers-create": "$1 {{GENDER:$2|makarya}} akun sané nuénang"
+       "tags-active-yes": "Inggih",
+       "logentry-newusers-create": "$1 {{GENDER:$2|makarya}} akun sané nuénang",
+       "searchsuggest-search": "Rereh ring {{SITENAME}}"
 }
index b894422..63a4659 100644 (file)
        "action-edituserjson": "рэдагаваньне JSON-файлаў іншых удзельнікаў",
        "action-edituserjs": "рэдагаваньне JavaScript-файлаў іншых удзельнікаў",
        "action-editsitecss": "рэдагаваньне агульнасайтавага CSS",
+       "action-editsitejson": "рэдагаваньне агульнасайтавага JSON",
+       "action-editsitejs": "рэдагаваньне агульнасайтавага JavaScript",
+       "action-editmyusercss": "рэдагаваньне вашых уласных CSS-файлаў",
+       "action-editmyuserjson": "рэдагаваньне вашых уласных JSON-файлаў",
+       "action-editmyuserjs": "рэдагаваньне вашых уласных JavaScript-файлаў",
+       "action-viewsuppressed": "прагляд вэрсіяў, схаваных ад усіх удзельнікаў",
+       "action-hideuser": "блякаваньне імя ўдзельніка і яго хаваньне",
+       "action-ipblock-exempt": "абыход блякаваньняў IP-адрасоў, аўтаблякаваньняў і блякаваньняў дыяпазонаў",
+       "action-unblockself": "разблякаваньне самога сябе",
+       "action-noratelimit": "адсутнасьць абмежаваньня хуткасьці",
+       "action-reupload-own": "перазапіс уласных існых файлаў",
        "nchanges": "$1 {{PLURAL:$1|зьмена|зьмены|зьменаў}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|з апошняга візыту}}",
        "enhancedrc-history": "гісторыя",
        "linksearch-pat": "Узор для пошуку:",
        "linksearch-ns": "Прастора назваў:",
        "linksearch-ok": "Шукаць",
-       "linksearch-text": "Ð\9cожна Ñ\9eжÑ\8bваÑ\86Ñ\8c Ñ\81Ñ\8bмбалÑ\96 Ð¿Ð°Ð´Ñ\81Ñ\82аноÑ\9eкÑ\96, Ð½Ð°Ð¿Ñ\80Ñ\8bклад, Â«*.wikipedia.org».\nÐ\9dеабÑ\85однÑ\8b Ð´Ð°Ð¼Ñ\8dн Ð¿ÐµÑ\80Ñ\88ага Ñ\9eзÑ\80оÑ\9eнÑ\8e, Ð½Ð°Ð¿Ñ\80Ñ\8bклад, Â«*.org».<br />\n{{PLURAL:$2|1=Ð\9fÑ\80аÑ\82акол, Ñ\8fкÑ\96 Ð¿Ð°Ð´Ñ\82Ñ\80Ñ\8bмлÑ\96ваеÑ\86Ñ\86а|Ð\9fÑ\80аÑ\82аколÑ\8b, Ñ\8fкÑ\96Ñ\8f Ð¿Ð°Ð´Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\8eÑ\86Ñ\86а}}: $1 (дапомна http://, калі пратакол не пазначаны).",
+       "linksearch-text": "Ð\9cожна Ñ\9eжÑ\8bваÑ\86Ñ\8c Ñ\81Ñ\8bмбалÑ\96 Ð¿Ð°Ð´Ñ\81Ñ\82аноÑ\9eкÑ\96, Ð½Ð°Ð¿Ñ\80Ñ\8bклад, Â«*.wikipedia.org».\nÐ\9dеабÑ\85однÑ\8b Ð´Ð°Ð¼Ñ\8dн Ð¿ÐµÑ\80Ñ\88ага Ñ\9eзÑ\80оÑ\9eнÑ\8e, Ð½Ð°Ð¿Ñ\80Ñ\8bклад, Â«*.org».<br />\n{{PLURAL:$2|1=Ð\9fÑ\80аÑ\82акол, Ñ\8fкÑ\96 Ð¿Ð°Ð´Ñ\82Ñ\80Ñ\8bмлÑ\96ваеÑ\86Ñ\86а|Ð\9fÑ\80аÑ\82аколÑ\8b, Ñ\8fкÑ\96Ñ\8f Ð¿Ð°Ð´Ñ\82Ñ\80Ñ\8bмлÑ\96ваÑ\8eÑ\86Ñ\86а}}: $1 (па Ð·Ð¼Ð¾Ñ\9eÑ\87анÑ\8cнÑ\96 http://, калі пратакол не пазначаны).",
        "linksearch-line": "Спасылка на $1 з $2",
        "linksearch-error": "Сымбалі падстаноўкі могуць ужывацца толькі ў пачатку адрасоў.",
        "listusersfrom": "Паказаць удзельнікаў ад:",
        "activeusers": "Сьпіс актыўных удзельнікаў",
        "activeusers-intro": "Гэта сьпіс удзельнікаў, якія былі актыўнымі на працягу $1 {{PLURAL:$1|апошняга дня|апошніх дзён|апошніх дзён}}.",
        "activeusers-count": "$1 {{PLURAL:$1|дзеяньне|дзеяньні|дзеяньняў}} за $3 {{PLURAL:$3|апошні дзень|апошнія дні|апошніх дзён}}",
-       "activeusers-from": "Ð\9fаказваÑ\86Ñ\8c Ñ\9eдзелÑ\8cнÑ\96каÑ\9e, Ð¿Ð°Ñ\87Ñ\8bнаÑ\8eÑ\87Ñ\8b Ð·:",
+       "activeusers-from": "Ð\9fаказваÑ\86Ñ\8c Ñ\83дзелÑ\8cнÑ\96каÑ\9e Ð°Ð´:",
        "activeusers-groups": "Паказаць удзельнікаў, якія належаць да групаў:",
        "activeusers-excludegroups": "Выключыць удзельнікаў, якія належаць да групаў:",
        "activeusers-noresult": "Удзельнікі ня знойдзеныя.",
index eed8e68..880db61 100644 (file)
@@ -90,6 +90,7 @@
        "tog-norollbackdiff": "Да не се показва разликата между редакциите след отмяна на редакции",
        "tog-useeditwarning": "Предупреждаване при опит за напускане на страница, отворена в режим на редактиране, без да са запазени промените",
        "tog-prefershttps": "Да се използва винаги защитена връзка при влизане",
+       "tog-showrollbackconfirmation": "Показване на диалогов прозорец за потвърждение при кликване върху препратката „Отмяна“",
        "underline-always": "Винаги",
        "underline-never": "Никога",
        "underline-default": "Според настройките на облика или браузъра",
        "histfirst": "най-стари",
        "histlast": "най-нови",
        "historysize": "({{PLURAL:$1|1 байт|$1 байта}})",
-       "historyempty": "(празна)",
+       "historyempty": "празнo",
        "history-feed-title": "Редакционна история",
        "history-feed-description": "Редакционна история на страницата в уикито",
        "history-feed-item-nocomment": "$1 в $2",
        "right-reupload-own": "Препокриване на съществуващ файл, качен от същия потребител",
        "right-reupload-shared": "Препокриване на едноименните файлове от общото мултимедийно хранилище с локални",
        "right-upload_by_url": "Качване на файл от URL адрес",
-       "right-purge": "Ð\98зÑ\87иÑ\81Ñ\82ване Ð½Ð° Ñ\81кладиÑ\80аноÑ\82о Ñ\81Ñ\8aдÑ\8aÑ\80жание Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86иÑ\82е Ð±ÐµÐ· Ð¿Ð¾ÐºÐ°Ð·Ð²Ð°Ð½Ðµ Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86а Ð·Ð° Ð¿Ð¾Ñ\82вÑ\8aÑ\80ждение",
+       "right-purge": "Ð\98зÑ\87иÑ\81Ñ\82ване Ð½Ð° Ñ\81кладиÑ\80аноÑ\82о Ñ\81Ñ\8aдÑ\8aÑ\80жание Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86аÑ\82а",
        "right-autoconfirmed": "Редактиране на полузащитени страници",
        "right-bot": "Третиране като автоматизиран процес",
        "right-nominornewtalk": "Малките промени по дискусионните страници не предизвикват известието за ново съобщение",
        "rcfilters-savedqueries-already-saved": "Тези филтри вече са съхранени. Променете настройките си, за да създадете нов Запазен филтър.",
        "rcfilters-restore-default-filters": "Възстановяване на филтрите по подразбиране",
        "rcfilters-clear-all-filters": "Изчистване на всички филтри",
-       "rcfilters-show-new-changes": "Преглед на най-новите промени",
+       "rcfilters-show-new-changes": "Преглед на най-новите промени от $1",
        "rcfilters-search-placeholder": "Филтриране на промените (използвайте менюто или търсете по име на филтър)",
        "rcfilters-invalid-filter": "Невалиден филтър",
        "rcfilters-empty-filter": "Няма активни филтри. Показани са всички редакции.",
        "delete-confirm": "Изтриване на „$1“",
        "delete-legend": "Изтриване",
        "historywarning": "<strong>Внимание:</strong> Страницата, която възнамерявате да изтриете, има история с приблизително $1 {{PLURAL:$1|редакция|редакции}}:",
-       "historyaction-submit": "Показване",
+       "historyaction-submit": "Показване на версии",
        "confirmdeletetext": "На път сте да изтриете страница заедно с цялата ѝ редакционна история.\nПотвърдете, че искате това, разбирате последствията и правите това в съответствие с [[{{MediaWiki:Policy-url}}|политиката]].",
        "actioncomplete": "Действието беше изпълнено",
        "actionfailed": "Действието не сполучи",
        "blocklist-editing-page": "страници",
        "blocklist-editing-ns": "именни пространства",
        "ipblocklist-empty": "Списъкът на блокиранията е празен.",
-       "ipblocklist-no-results": "УказаниÑ\8fÑ\82 IP-адÑ\80еÑ\81 Ð¸Ð»Ð¸ Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82ел Ð½Ðµ Ðµ Ð±Ð»Ð¾ÐºÐ¸Ñ\80ан.",
+       "ipblocklist-no-results": "Ð\9dе Ñ\81а Ð¾Ñ\82кÑ\80иÑ\82и Ñ\81Ñ\8aвпадаÑ\89и Ð±Ð»Ð¾ÐºÐ¸Ñ\80аниÑ\8f Ð·Ð° Ð¸Ð·Ð±Ñ\80аниÑ\8f IP-адÑ\80еÑ\81 Ð¸Ð»Ð¸ Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82ел.",
        "blocklink": "блокиране",
        "unblocklink": "отблокиране",
        "change-blocklink": "промяна на параметрите на блокирането",
index df13d46..478ecef 100644 (file)
        "category-subcat-count-limited": "Tumbung ini baisi {{PLURAL:$1|sub-tumbung|$1 sub-tutumbung}} barikut.",
        "category-article-count": "{{PLURAL:$2|Tumbung ni baisi asa tungkaran barikut haja.|Tutumbung ngini baisi {{PLURAL:$1|tungkaran|$1 tutungkaran}}, matan $2 sabarataan.}}",
        "category-article-count-limited": "Tumbung ini baisi {{PLURAL:$1|asa tungkaran|$1 tutungkaran}} barikut.",
-       "category-file-count": "{{PLURAL:$2|Tumbung ngini wastu baisi satu barakas barikut.|Tumbung ngini baisi {{PLURAL:$1|barakas|$1 babarakas}} barikut, matan $2 sabarataan.}}",
+       "category-file-count": "{{PLURAL:$2|Tumbung ngini baisi {{PLURAL:$1|$1 barakas}}, matan jumlah $2.}}",
        "category-file-count-limited": "Tumbung ngini baisi {{PLURAL:$1|barakas|$1 barakas}} barikut.",
        "listingcontinuesabbrev": "samb.",
        "index-category": "Tungkaran tasusun bapadalakan kata",
        "moredotdotdot": "Lainnya...",
        "morenotlisted": "Salanjutnya...",
        "mypage": "Tungkaran ulun",
-       "mytalk": "Pamandiran ulun",
+       "mytalk": "Pamandiran",
        "anontalk": "Pamandiran hagan alamat IP ini",
        "navigation": "Napigasi",
        "and": "&#32;wan",
        "permalink": "Tautan tatap",
        "print": "Citak",
        "view": "Tiringi",
+       "view-foreign": "Lihat di $1",
        "edit": "Babak",
        "create": "Ulah",
+       "create-local": "Tambah pamaparan lukal",
        "delete": "Hapus",
        "undelete_short": "Walang mahapus {{PLURAL:$1|asa babakan|$1 bababakan}}",
        "viewdeleted_short": "Tiringi {{PLURAL:$1|asa babakan tahapus|$1 bababakan tahapus}}",
        "personaltools": "Pakakas surang",
        "talk": "Pamandiran",
        "views": "Titiringan",
-       "toolbox": "Wadah pakakas",
+       "toolbox": "Pakakas",
        "imagepage": "Tiringi tungkaran barakas",
        "mediawikipage": "Tiringi tungkaran pasan sistim",
        "templatepage": "Tiringi tungkaran citakan",
        "otherlanguages": "Dalam basa lain",
        "redirectedfrom": "(Diugahakan matan $1)",
        "redirectpagesub": "Tungkaran paugahan",
-       "lastmodifiedat": "Tungkaran ngini pauncitnya diubah pada $1, $2.",
+       "redirectto": "Maugahakan ka:",
+       "lastmodifiedat": "Tungkaran ngini pahabisnya diubah wayah $1, pukul $2.",
        "viewcount": "Tungkaran ini sudah diungkai {{PLURAL:$1|kali|$1 kali}}.",
        "protectedpage": "Tungkaran nang dilindungi",
        "jumpto": "Malacung ka",
        "nstab-template": "Citakan",
        "nstab-help": "Patulung",
        "nstab-category": "Tumbung",
+       "mainpage-nstab": "Tungkaran Tatambaian",
        "nosuchaction": "Kadada palakuan nangkaitu",
        "nosuchactiontext": "Tindakan nang diminta URL kada sah.\nPian tagasnya salah katik URL, atawa maumpati sabuting tautan nang kada bujur.\nNgini jua bisa ai ada bug di parangkat lunak nang dipuruk {{SITENAME}}.",
        "nosuchspecialpage": "Kadada tungkaran istimiwa nangitu",
        "actionthrottled": "Kalakuan dikiripi",
        "actionthrottledtext": "Sawagai sabuting takaran anti-spam, Pian dibabatasi hagan balalaku kababanyakan dalam parhatan handap, wan Pian sudah limpuari batasan ngini.\nMuhun cubai pulang dalam babarapa minit.",
        "protectedpagetext": "Tungkaran ngini sudah dilindungi hagan mancagah babakan.",
-       "viewsourcetext": "Pian kawa maniringi wan manyalin asal mula tungkaran ngini:",
+       "viewsourcetext": "Pian kawa maniringi wan manyalin asal-mula tungkaran ngini.",
        "viewyourtext": "Pian kawa maniringi wan salain asalmula matan '''babakan pian''' ka tungkaran ngini:",
        "protectedinterface": "Tungkaran ini manyadiakan naskah antarmuha gasan parangkat lunak, wan dilindungi hagan mancagah tasalah puruk.",
        "editinginterface": "'''Paringatan:''' Pian mambabak sabuting tungkaran nang dipuruk hagan manyadiakan naskah antarmuha gasan parangkat lunak.\nPaubahan ka tungkaran ngini akan bapangaruh matan tampaian antarmuha gasan pamakai lain.\nGasan tarjamahan, muhun pakai [https://translatewiki.net/wiki/Main_Page?setlang=bjn translatewiki.net], rangka gawian palokalan MediaWiki.",
        "welcomeuser": "Salamat datang,  $1 !",
        "welcomecreation-msg": "==Salamat datang, $1!==\nAkun Pian sudah diulah.\nJangan kada ingat hagan maubah [[Special:Preferences|kakatujuan {{SITENAME}}]] Pian.",
        "yourname": "Ngaran pamakai:",
+       "userlogin-yourname": "Ngaran pamakai",
+       "userlogin-yourname-ph": "Masukakan ngaran pamakai Pian",
        "yourpassword": "Katasunduk:",
+       "userlogin-yourpassword": "Kata sandi",
+       "userlogin-yourpassword-ph": "Masukakan kata sandi",
+       "createacct-yourpassword-ph": "Masukakan kata sandi",
        "yourpasswordagain": "Katik pulang katasunduk:",
+       "createacct-yourpasswordagain": "Konfirmasi kata sandi",
+       "createacct-yourpasswordagain-ph": "Masukakan pulang kata sandi",
+       "userlogin-remembermypassword": "Biarakan ulun tatap babuat",
        "yourdomainname": "Domain Pian:",
        "password-change-forbidden": "Pian kada kawa ma-ubah kata sunduk pada wiki ngini.",
        "externaldberror": "Ada kasalahan apakah kacucukan basis data atawa Pian kada bulih mamutakhirakan akun luar.",
        "logout": "Kaluar",
        "userlogout": "Kaluar",
        "notloggedin": "Balum babuat log",
+       "userlogin-noaccount": "Balum baisi akun?",
+       "userlogin-joinproject": "Gabung {{SITENAME}}",
        "createaccount": "Ulah akun",
+       "userlogin-resetpassword-link": "Lupa kata sandi?",
+       "userlogin-helplink2": "Patulung babuat log",
+       "createacct-emailoptional": "Alamat surél/email (bagusnya diisi)",
+       "createacct-email-ph": "Masukakan alamat email Pian",
        "createaccountmail": "Malalui suril",
+       "createacct-submit": "Ulah akun Pian",
+       "createacct-benefit-heading": "{{SITENAME}} diulah ulih urang-urang nangkaya Pian.",
+       "createacct-benefit-body1": "{{PLURAL:$1|babakan}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|tungkaran}}",
+       "createacct-benefit-body3": "{{PLURAL:$1|sumbangan}} pahabisnya",
        "badretype": "Katasunduk nang Pian buati kada pas.",
        "userexists": "Ngaran pamakai nang dibuati hudah dipuruk urang lain.\nMuhun pilih sabuting ngaran lain.",
        "loginerror": "Kasalahan babuat log",
        "login-abort-generic": "Pian kada ruhui babuat  log - Diwalangi",
        "loginlanguagelabel": "Basa: $1",
        "suspicious-userlogout": "Pamintaan Pian hagan kaluar log kada ditarima marga nangkaya dikirim matan panjalajah web rakai atawa tatangkap proxy.",
+       "pt-login": "Babuat log",
+       "pt-login-button": "Babuat log",
+       "pt-createaccount": "Ulah akun",
+       "pt-userlogout": "Kaluar",
        "php-mail-error-unknown": "Kasalahan kada dipinandui dalam pungsi surat () PHP",
        "user-mail-no-addy": "Mancuba mangirim suril kada baalamat suril.",
        "user-mail-no-body": "Manarai hagan mangirim suril puang atawa talalu handap.",
        "preview": "Tilik",
        "showpreview": "Tampaiakan titilikan",
        "showdiff": "Tampaiakan paubahan",
-       "anoneditwarning": "'''Paringatan:''' Pian baluman babuat log.\nAlamat IP Pian akan dirakam dalam tungkaran babakan halam",
+       "anoneditwarning": "<strong>Paringatan:</strong> Pian kada masuk log. Alamat IP Pian akan talihat wan urang lain amun Pian handak maubah sasuatu. Amun Pian <strong>[$1 babuat log]</strong> atawa <strong>[$2 maulah akun]</strong>, babakan Pian akan diatribusiakan ka ngaran pamakai Pian, taumpat lawan babagai kauntungan lainnya.",
        "anonpreviewwarning": "''Pian baluman babuat log. Manyimpan akan tarakam alamat IP Pian pada sajarah bahari tungkaran ngini.''",
        "missingsummary": "'''Pangingat:''' Pian kada manyadiakan sabuting kasimpulan babakan.\nAmun Pian klik \"$1\" pulang, babakan Pian tasimpan kada bakasimpulan.",
        "missingcommenttext": "Muhun buati sabuting kumintar di bawah ngini.",
        "newarticle": "(Hanyar)",
        "newarticletext": "Pian maumpati sabuah tautan ka tungkaran nang baluman ada lagi. Gasan maulah tungkaran, mulai ja mangatik pada kutak di bawah (lihati [$1 tungkaran patulung] gasan panjalasan labih). Amun Pian ka sia cagaran tasalah, klik picikan '''back''' di panjalajah web Pian.",
        "anontalkpagetext": "----''Ngini adalah tungkaran pamandiran gasan pamakai kada bangaran nang baluman ma-ulah akun pulang, atawa  kada mamakainya. Kami tapaksa mamakai numurik alamat IP hagan maminanduinya.\nAlamat IP nangkaini kawaai dipuruk ulih babarapa pamakai.\nAmun Pian adalah pamuruk kada bangaran wan marasa kumin nang kada pas ta ka Pian, muhun [[Special:CreateAccount|ulah sabuah akun]] or [[Special:UserLogin|babuat log]] hagan mahindari kabingungan awan pamuruk kada bangaran lain kaina.",
-       "noarticletext": "Parhatan ni kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul ngini]] pintang tungkaran lain,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log barait].</span>,\natawa [{{fullurl:{{FULLPAGENAME}}|action=edit}} mambabak tungkaran ngini]</span>.",
-       "noarticletext-nopermission": "Parhatan ni kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul ngini]] pintang tungkaran lain,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log barait].</span>.",
+       "noarticletext": "Damini kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul tungkaran ngini]] di tutungkaran lain, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mancari log tarait], atawa [{{fullurl:{{FULLPAGENAME}}|action=edit}} maulah tungkaran ngini]</span>.",
+       "noarticletext-nopermission": "!Damini kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul tungkaran ngini]] di tutungkaran lain, atawa <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log tarait]</span>, tagal Pian kada baisi ijin gasan maulah tungkaran ngini",
        "userpage-userdoesnotexist": "Akun pamakai \"<nowiki>$1</nowiki>\" kada tadaptar.\nMuhun pariksa/ditukui amun Pian handak maulah/mambabak tungkaran ngini.",
        "userpage-userdoesnotexist-view": "Akun pamakai \"$1\" kada tadaptar.",
        "blocked-notice-logextract": "Pamakai nangini parhatan diblukir.\nLog blukir pahabisannya tasadia di bawah ngini gasan rujukan:",
        "semiprotectedpagewarning": "'''Catatan:''' Tungkaran ngini sudah dilindungi nang akibatnya pamakai tadaptar haja nang kawa mambabak.\nLog masuk pauncitnya disadiakan di bawah gasan rujukan:",
        "cascadeprotectedwarning": "'''Paringatan:''' Tungkaran ngini sudah dilindungi nang akibatnya pamakai awan hak istimiwa pambakal haja nang kawa mambabak, sualnya ngini tamasuk dalam baumpat parlindungan barénténg {{PLURAL:$1|tungkaran|tutungkaran}}:",
        "titleprotectedwarning": "'''Paringatan: Tungkaran ngini sudah dilindungi nang akibatnya [[Special:ListGroupRights|hak khas]] diparluakan hagan maulah ngini.'''\nLog masuk pauncitnya disadiakan di bawah gasan rujukan:",
-       "templatesused": "{{PLURAL:$1|Citakan|Citakan}} nang digunakan di tungkaran ngini:",
+       "templatesused": "{{PLURAL:$1|Citakan|Citakan}} nang dipakai di tungkaran ngini:",
        "templatesusedpreview": "{{PLURAL:$1|Citakan|Citakan}} nang digunakan di titilikan ngini:",
        "templatesusedsection": "{{PLURAL:$1|Citakan|Cicitakan}} nang diguna'akan di hagian ini:",
        "template-protected": "(dilindungi)",
        "permissionserrorstext": "Pian kada baisi ijin gasan malakuakan itu, karana {{PLURAL:$1|alasan|alasan}} ini:",
        "permissionserrorstext-withaction": "Pian kada baisi ijin gasan $2, karana {{PLURAL:$1|alasan|alasan}} ini:",
        "recreate-moveddeleted-warn": "'''Paringatan: Pian maulah pulang sabuah tungkaran nang sabalumnya dihapus.'''\n\nPian partimbangakan dahulu sasuaikah hagan manarusakan pambabakan tungkaran ini.\nLog pahapusan wan paugahan gasan tungkaran ini disadiakan di sia:",
-       "moveddeleted-notice": "Tungkaran ini sudah dihapus.\nLog pahapusan wan paugahan gasan tungkaran ini disadiakan di bawah ini gasan rujukan.",
+       "moveddeleted-notice": "Tungkaran ini sudah dihapus.\nLog pahapusan, palindungan, wan pamindahan matan tungkaran itu tasadia di bawah ini sabagai rujukan.",
        "log-fulllog": "Tiringi samunyaan log",
        "edit-hook-aborted": "Babakan ditinggalakan ulih kakait parser.\nIni kadada panjalasan.",
        "edit-gone-missing": "Kada kawa mamutakhirakan tungkaran ini.\nIni cungul pinanya sudah tahapus.",
        "currentrev": "Ralatan pahabisannya",
        "currentrev-asof": "Ralatan pahanyarnya pada $1",
        "revisionasof": "Ralatan matan $1",
-       "revision-info": "Ralatan pada $1 ulih $2",
+       "revision-info": "Ralatan par $1 ulih {{GENDER:$6|$2}}$7",
        "previousrevision": "←Ralatan talawas",
        "nextrevision": "Ralatan salanjutnya→",
        "currentrevisionlink": "Ralatan wayahini",
        "page_first": "Panambaian",
        "page_last": "Pauncitan",
        "histlegend": "Pilihan mananding: tandai kutak-kutak radiu ralatan-ralatan nang handak ditanding wan picik enter atawa picikan di bawah.<br />Legend: '''({{int:cur}})''' =lainnya awan ralatan pahanyarnya, '''({{int:last}})''' = lainnya awan ralatan sabalumnya, '''{{int:minoreditletter}}''' = babakan sapalih.",
-       "history-fieldset-title": "Tangadahi halam",
+       "history-fieldset-title": "Ralatan nang disaring",
        "history-show-deleted": "Nang dihapus haja",
-       "histfirst": "Palawasnya",
-       "histlast": "Pahanyarnya",
+       "histfirst": "palawasnya",
+       "histlast": "pahanyarnya",
        "historysize": "($1 {{PLURAL:$1|bita|bibita}})",
        "historyempty": "(kusung)",
        "history-feed-title": "Ralatan halam",
        "mergelog": "Log panggabungan",
        "revertmerge": "Walang panggabungan",
        "mergelogpagetext": "Di bawah adalah daptar nang paling hanyar panggabungan matan sabuah tungkaran halam ka dalam nang lain.",
-       "history-title": "Ralatan halam matan ''$1''",
+       "history-title": "Sajarah ralatan matan \"$1\"",
+       "difference-title": "$1: Pabidaan ralatan",
        "difference-multipage": "(Nang balain antar tungkaran-tungkaran)",
        "lineno": "Baris $1:",
        "compareselectedversions": "Tandingakan ralatan nang dipilih",
        "showhideselectedversions": "Tampaiakan/sungkupakan ralatan-ralatan",
        "editundo": "walangi",
+       "diff-empty": "(Kadada bida)",
+       "diff-multi-sameuser": "({{PLURAL:$1|$1 ralatan antara}} ulih pamakai nang sama kada ditampaiakan)",
        "diff-multi-manyusers": "({{PLURAL:$1|Asa ralatan tangah|$1 raralatan tangah}} ulih labih pada $2 {{PLURAL:$2|pamuruk|papamuruk}} kada ditampaiakan)",
        "searchresults": "Kulihan panggagaian",
        "searchresults-title": "Kulihan gagai gasan \"$1\"",
        "shown-title": "Tampaiakan $1 {{PLURAL:$1|kulihan|kukulihan}} par tungkatan",
        "viewprevnext": "Tiringi ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "'''Ada tungkaran bangaran \"[[:$1]]\" dalam wiki ini.'''",
-       "searchmenu-new": "'''Maulah tungkaran \"[[:$1]]\" dalam wiki ngini!'''",
+       "searchmenu-new": "<strong>Ulah tungkaran \"[[:$1]]\" di wiki ini!</strong> {{PLURAL:$2|0=|Tiringi jua tungkaran nang didapatakan matan panggagaian Pian.|Tiringi jua hasil panggagaian nang didapatakan.}}",
        "searchprofile-articles": "Tungkaran isi",
        "searchprofile-images": "Multimadia",
        "searchprofile-everything": "Samunyaan",
        "searchprofile-advanced-tooltip": "Panggagaian pada ragam ngaran kakamar",
        "search-result-size": "$1 ({{PLURAL:$2|1 ujar|$2 uujar}})",
        "search-result-category-size": "{{PLURAL:$1|1 angguta|$1 aangguta}} ({{PLURAL:$2|1 subtumbung|$2 subtutumbung}}, {{PLURAL:$3|1 barakas|$3 babarakas}})",
-       "search-redirect": "(Paugahan $1)",
+       "search-redirect": "(Diugahakan matan $1)",
        "search-section": "(hagian $1)",
+       "search-file-match": "(rasuk lawan isi barakas)",
        "search-suggest": "Nginikah maksud Pian: $1",
        "search-interwiki-caption": "Dingsanak rangka gawian",
        "search-interwiki-default": "Kulihan $1",
        "searchrelated": "bakulaan",
        "searchall": "samunyaan",
        "showingresults": "Di bawah ngini ditampaiakan hingga {{PLURAL:$1|'''1''' kulihan|'''$1''' kukulihan}}, dimulai matan #'''$2'''.",
+       "search-showingresults": "{{PLURAL:$4|Hasil <strong>$1</strong> matan <strong>$3</strong>|Hasil <strong>$1 - $2</strong> matan <strong>$3</strong>}}",
        "search-nonefound": "Kadada kulihan nang pas awan parmintaan.",
        "powersearch-legend": "Panggagaian mahir",
        "powersearch-ns": "Manggagai di ngaran kamar:",
        "search-external": "Panggagaian luar",
        "searchdisabled": "{{SITENAME}} panggagaian kada kawa\nPian kawa manggagai lung Google parhatan ini.\nCatatan nang dihaharnya matan isi {{SITENAME}} kawa-ai sudah kadaluarsa.",
        "preferences": "Kakatujuan",
-       "mypreferences": "Nang ulun katuju",
+       "mypreferences": "Kakatujuan",
        "prefs-edits": "Rikinan babakan-babakan:",
        "prefs-skin": "Kulimbit",
        "skin-preview": "Titilikan",
        "action-siteadmin": "sunduk atawa bukasunduk basisdata",
        "action-sendemail": "Kirim suril",
        "nchanges": "$1 {{PLURAL:$1|paubahan|paubahan}}",
+       "enhancedrc-history": "sajarah",
        "recentchanges": "Paubahan pahanyarnya",
        "recentchanges-legend": "Pilihan paubahan pahanyarnya",
        "recentchanges-summary": "Jajak paubahan wiki pahanyarnya pada tungkaran ngini",
+       "recentchanges-noresult": "Kadada paubahan dalam rantang waktu ngini nang rasuk lawan syarat.",
        "recentchanges-feed-description": "Susuri paubahan pahanyarnya dalam wiki di kitihan ini",
        "recentchanges-label-newpage": "Babakan ngini maulah sabuting tungkaran hanyar",
        "recentchanges-label-minor": "Ngini sabuting babakan sapalih",
        "recentchanges-label-bot": "Babakan ngini digawi ulih saikung bot",
        "recentchanges-label-unpatrolled": "Babakan ngini baluman ta'awasi",
-       "recentchanges-legend-newpage": "$1 - tungkaran puga",
-       "rcnotefrom": "Di bawah ngini paubahan tumatan '''$2''' (ditampaiakan sampai '''$1''' paubahan)",
+       "recentchanges-label-plusminus": "Paubahan ukuran tungkaran dalam bita",
+       "recentchanges-legend-heading": "<strong>Katarangan:</strong>",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (tiringi jua [[Special:NewPages|daptar tungkaran hanyar]])",
+       "rcnotefrom": "Di bawah ngini adalah {{PLURAL:$5|paubahan}} tumatan <strong>$3, $4</strong> (ditampaiakan sampai <strong>$1</strong> paubahan).",
        "rclistfrom": "Tampaiakan paubahan pahanyarnya matan $3 $2",
        "rcshowhideminor": "$1 pambabakan sapalih",
+       "rcshowhideminor-show": "Tampaiakan",
+       "rcshowhideminor-hide": "Sungkupakan",
        "rcshowhidebots": "$1 bot",
-       "rcshowhideliu": "$1 pamakai nang babuat di log",
+       "rcshowhidebots-show": "Tampaiakan",
+       "rcshowhidebots-hide": "Sungkupakan",
+       "rcshowhideliu": "$1 pamakai tadaptar",
+       "rcshowhideliu-show": "Tampaiakan",
+       "rcshowhideliu-hide": "Sungkupakan",
        "rcshowhideanons": "$1 pamakai kada bangaran",
+       "rcshowhideanons-show": "Tampaiakan",
+       "rcshowhideanons-hide": "Sungkupakan",
        "rcshowhidepatr": "$1 babakan ta'awasi",
        "rcshowhidemine": "$1 babakan ulun",
+       "rcshowhidemine-show": "Tampaiakan",
+       "rcshowhidemine-hide": "Sungkupakan",
        "rclinks": "Tampaiakan $1 paubahan pahanyarnya dalam $2 hari tauncit",
        "diff": "bida",
        "hist": "halam",
        "recentchangeslinked-feed": "Paubahan tarait",
        "recentchangeslinked-toolbox": "Paubahan tarait",
        "recentchangeslinked-title": "Paubahan nang tarait lawan \"$1\"",
-       "recentchangeslinked-summary": "Ngini sabuting daptar paubahan nang diulah hahanyar ngini pada tungkaran batautan matan sabuting tungkaran tartantu (atawa ka angguta matan sabuah tumbung tartantu).\nTutungkaran dalam [[Special:Watchlist|daptar itihan Pian]] ditandai '''kandal'''.",
+       "recentchangeslinked-summary": "Masukakan ngaran tungkaran gasan malihat paubahan pada halaman tapaut matan atawa ka tungkaran itu (amun handak malihat angguta sabuting tumbung, masukakan Tumbung:Ngaran tumbung). Paubahan pada [[Special:Watchlist|daptar itihan Pian]] talihat <strong>dicitak kandal</strong>.",
        "recentchangeslinked-page": "Ngaran tungkaran:",
        "recentchangeslinked-to": "Tampaiakan paubahan matan tutungkaran nang bataut lawan tungkaran nang disurungakan",
        "upload": "Hunggahakan barakas",
        "filehist-filesize": "Ukuran barakas",
        "filehist-comment": "Ulasan",
        "imagelinks": "Tautan barakas",
-       "linkstoimage": "{{PLURAL:$1|tautan tungkaran|$1 tautan tungkaran}} dudi ka barakas ngini:",
+       "linkstoimage": "{{PLURAL:$1|Tungkaran|$1 tungkaran}} nangini mamakai barakas ngini:",
        "linkstoimage-more": "Labihan pada $1 {{PLURAL:$1|tatautan tungkaran|tautan tutungkaran}} ka barakas ngini.\nDaptar barikut manampaiakan {{PLURAL:$1|tautan panambaian tungkaran|$1 panambaian tatautan tungkaran}} ka barakas ngini haja.\nSabuah [[Special:WhatLinksHere/$2|daptar hibak]] tasadia.",
-       "nolinkstoimage": "Kadada tutungkaran nang bataut ka barakas ngini.",
+       "nolinkstoimage": "Kadada tutungkaran nang mamakai barakas ngini.",
        "morelinkstoimage": "Tiringi [[Special:WhatLinksHere/$1|tautan lagi]] ka barakas ngini.",
        "linkstoimage-redirect": "$1 (barakas paugahan) $2",
        "duplicatesoffile": "Barikut {{PLURAL:$1|barakas panggandaan|$1 babarakas panggandaan}} matan barakas ngini ([[Special:FileDuplicateSearch/$2|rarincian labih]]):",
        "uploadnewversion-linktext": "Buatakan bantuk nang labih hanyar matan barakas ini",
        "shared-repo-from": "matan $1",
        "shared-repo": "suatu repositori basama",
+       "upload-disallowed-here": "Pian kada kawa manimpa barakas ngini.",
        "filerevert": "Bulikakan $1",
        "filerevert-legend": "Bulikakan barakas",
        "filerevert-intro": "Pian mambulikakan '''[[Media:$1|$1]]''' ka macam [$4 pada $3, $2].",
        "querypage-disabled": "Tungkaran istimiwa ngini dikada-kawakan gasan alasan ginawi.",
        "booksources": "Buku bamula",
        "booksources-search-legend": "Gagai gasan buku asal mula",
+       "booksources-search": "Gagai",
        "booksources-text": "Di bawah adalah sabuah daptar tautan ka situs lain nang manjual bubuku hanyar wan bakas, wan jua baisi panjalasan labih pasal bubuku nang Pian ugai:",
        "booksources-invalid-isbn": "ISBN nang dibari mancungul kada sah; pariksa kalua-ai tasalah marekap matan asal-mula aslinya.",
        "specialloguserlabel": "Pamakai:",
        "usermessage-summary": "Tinggalakan sistim pasan.",
        "usermessage-editor": " Sistim panyampai pasan",
        "watchlist": "Daptar itihan ulun",
-       "mywatchlist": "Daptar itihan ulun",
+       "mywatchlist": "Daptar itihan",
        "watchlistfor2": "Gasan $1 $2",
        "nowatchlist": "Pian kada baisi apa pun pada daptar itihan Pian.",
        "watchlistanontext": "Muhun $1 hagan maniringi atawa mambabak nang dalam daptar itihan Pian.",
        "delete-warning-toobig": "Tungkaran ngini baisi halam babakan ganal, labih pada $1 {{PLURAL:$1|ralatan|raralatan}}.\nMahapus ngini kawa mangaruhi databasis oparasi {{SITENAME}};\njalanakan awan ba-a-awas.",
        "rollback": "Gulung bulik babakan",
        "rollbacklink": "bulikakan",
+       "rollbacklinkcount": "bulikakan $1 {{PLURAL:$1|babakan}}",
        "rollbackfailed": "Guling-bulik luput",
        "cantrollback": "Kada kawa mambalikakan babakan;\npanyumbang tauncit adalah asa-asanya panulis tungkaran ngini.",
        "alreadyrolled": "Kada kawa malakukan pambulikan ka ralatan tauncit [[:$1]] ulih [[User:$2|$2]] ([[User talk:$2|pandir]]{{int:pipe-separator}}[[Special:Contributions/$2|{{int:contribslink}}]]);\npamuruk lain sudah mambabak atawa malakukan pambulikan lawan tungkaran ini.\n\nBabakan tauncit dilakukan ulih [[User:$3|$3]] ([[User talk:$3|pandir]]{{int:pipe-separator}}[[Special:Contributions/$3|{{int:contribslink}}]]).",
        "namespace_association": "Ruang-ngaran tarait",
        "tooltip-namespace_association": "Pariksa kutak ngini hagan maumpatakan jua ruang-ngaran pamandiran atawa judul tarait awan ruang-ngaran tapilih",
        "blanknamespace": "(Tatambaian)",
-       "contributions": "Sumbangan pamakai",
+       "contributions": "Sumbangan {{GENDER:$1|pamakai}}",
        "contributions-title": "Sumbangan pamakai gasan $1",
-       "mycontris": "Sumbangan ulun",
-       "contribsub2": "Gasan $1 ($2)",
+       "mycontris": "Sumbangan",
+       "anoncontribs": "Sumbangan",
+       "contribsub2": "Gasan {{GENDER:$3|$1}} ($2)",
        "nocontribs": "Kadada paubahan nang rasuk lawan syarat itu.",
-       "uctop": " atas",
+       "uctop": "wayah ini",
        "month": "Matan bulan (wan sabalumnya):",
        "year": "Matan tahun (wan sabalumnya):",
        "sp-contributions-newbies": "Tampaiakan sumbangan papamakai hanyar haja",
        "sp-contributions-search": "Gagai gasan sumbangan",
        "sp-contributions-username": "Alamat IP atawa ngaran-pamakai:",
        "sp-contributions-toponly": "Tampaiakan wastu ralatan nang paling atas (pauncitnya)",
+       "sp-contributions-newonly": "Hanya tampaiakan babakan nang barupa paulahan tungkaran",
        "sp-contributions-submit": "Gagai",
        "whatlinkshere": "Tautan apa di sia",
        "whatlinkshere-title": "Tungkaran-tungkaran nang batautan ka ''$1''",
        "import-logentry-upload-detail": "$1 {{PLURAL:$1|ralatan|raralatan}}",
        "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|ralatan|raralatan}} matan $2",
        "javascripttest": "Mantis JavaScript",
-       "tooltip-pt-userpage": "Tungkaran pamakai Pian",
+       "tooltip-pt-userpage": "Tungkaran {{GENDER:|pamakai Pian}}",
        "tooltip-pt-anonuserpage": "Tungkaran pamuruk matan alamat IP Pian mambabak sawagai",
-       "tooltip-pt-mytalk": "Tungkaran pamandiran Pian",
+       "tooltip-pt-mytalk": "Tungkaran {{GENDER:|pamandiran Pian}}",
        "tooltip-pt-anontalk": "Pamandiran pasal bababakan matan alamat IP ngini",
-       "tooltip-pt-preferences": "Nang Pian katuju",
+       "tooltip-pt-preferences": "Kakatujuan {{GENDER:|Pian}}",
        "tooltip-pt-watchlist": "Daptar tungkaran-tungkaran nang Pian itihi paubahannya",
-       "tooltip-pt-mycontris": "Daptar sumbangan Pian",
+       "tooltip-pt-mycontris": "Daptar sumbangan {{GENDER:|Pian}}",
        "tooltip-pt-login": "Pian sabaiknya babuat ka dalam log; tagal ngini kada kawajiban pang",
        "tooltip-pt-logout": "Kaluar",
+       "tooltip-pt-createaccount": "Pian dianjurakan gasan maulah akun wan babuat log; walau, hal itu kada wajib",
        "tooltip-ca-talk": "Pamandiran pasal isi tungkaran",
-       "tooltip-ca-edit": "Pian kawa mambabak tungkaran ngini. Tabéngkéng amun mamakai picikan titilikan sabalum manyimpan",
+       "tooltip-ca-edit": "Babak tungkaran ini",
        "tooltip-ca-addsection": "Mulai hagian hanyar",
        "tooltip-ca-viewsource": "Tungkaran ngini dilindungi. Pian kawa maniring asal mulanya.",
        "tooltip-ca-history": "Raralatan bahari tungkaran ngini",
        "tooltip-t-recentchangeslinked": "Paubahan pahanyarnya dalam tutungkaran tataut matan tungkaran ngini",
        "tooltip-feed-rss": "Kitihan RSS gasan tungkaran ini",
        "tooltip-feed-atom": "Kitihan Atum gasan tungkaran ngini",
-       "tooltip-t-contributions": "Sabuah daptar sumbangan pamakai ngini",
+       "tooltip-t-contributions": "Daptar sumbangan {{GENDER:$1|pamakai ngini}}",
        "tooltip-t-emailuser": "Kirimi surel ka pamakai ini",
        "tooltip-t-upload": "Hunggahakan babarakas",
        "tooltip-t-specialpages": "Daptar samunyaan tungkaran istimiwa",
        "tooltip-ca-nstab-main": "Tiringi tungkaran isi",
        "tooltip-ca-nstab-user": "Tiring tungkaran pamakai",
        "tooltip-ca-nstab-media": "Tiringi tungkaran media",
-       "tooltip-ca-nstab-special": "Nangini sabuah tungkaran istimiwa nang kada kawa dibabak.",
+       "tooltip-ca-nstab-special": "Ngini tungkaran istimiwa, kada kawa dibabak.",
        "tooltip-ca-nstab-project": "Tiringi tungkaran rangka gawian",
        "tooltip-ca-nstab-image": "Tiringi barakas tungkaran",
        "tooltip-ca-nstab-mediawiki": "Tiring sistim pasan",
        "spam_reverting": "Mambulikakan ka ralatan tauncit nang kada mangandung tatautan ka $1",
        "spam_blanking": "Samunyaan raralatan mangandung tatautan ka $1, dikusungakan",
        "spam_deleting": "Samunyaan raralatan nang isinya tatautan ka $1, dipuangakan",
+       "simpleantispam-label": "Pamariksaan anti-spam.\n<strong>Jangan</strong> diisi!",
        "pageinfo-title": "Panjalasan gasan ''$1''",
        "pageinfo-not-current": "Maaf, kada mungkin mambariakan maklumat ngini ka ralatan lawas.",
        "pageinfo-header-basic": "Maklumat pandal",
        "file-info-size-pages": "$1 × $2 piksal, takaran barakas: $3, macam MIME: $4, $5 {{PLURAL:$5|tungkaran|tutungkaran}}",
        "file-nohires": "Kadada tasadia resolusi tapancau.",
        "svg-long-desc": "Barakas SVG, nominal $1 × $2 piksel, basar barakas: $3",
-       "show-big-image": "Ukuran hibak",
+       "show-big-image": "Ukuran asli",
        "show-big-image-preview": "Takaran tilikan ngini: $1.",
        "show-big-image-other": "{{PLURAL:$2|Risulusi|Risulusi}} lain: $1.",
        "show-big-image-size": "$1 × $2 piksal",
        "version-software-product": "Produk",
        "version-software-version": "Virsi",
        "version-entrypoints-header-url": "URL",
+       "redirect-submit": "Lanjut",
+       "redirect-lookup": "Panggagaian:",
+       "redirect-value": "Nilai:",
+       "redirect-user": "ID pamakai",
+       "redirect-page": "ID Tungkaran",
+       "redirect-revision": "Ralatan tungkaran",
+       "redirect-file": "Ngaran barakas",
        "fileduplicatesearch": "Gagai gasan babarakas baganda",
        "fileduplicatesearch-summary": "Gagai gasan babarakas baganda bapandal nilai hash.",
        "fileduplicatesearch-filename": "Ngaran barakas:",
        "tags": "Tag paubahan sah",
        "tag-filter": "Saringan [[Special:Tags|Tag]]:",
        "tag-filter-submit": "Saringan",
+       "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag}}]]: $2",
        "tags-title": "Gantungan",
        "tags-intro": "Tungkaran ngini mandaptar gantungan nang diciri-i parangkat lunak sabuah babakan, wan artinya.",
        "tags-tag": "Gantungan ngaran",
        "htmlform-submit": "Kirim",
        "htmlform-reset": "Walangi paubahan",
        "htmlform-selectorother-other": "Lain-lain",
-       "logentry-delete-delete": "$1 mahapus tungkaran $3",
+       "logentry-delete-delete": "$1 {{GENDER:$2|mahapus}} tungkaran $3",
        "logentry-delete-restore": "$1 dibulikakan tungkaran $3",
        "logentry-delete-event": "$1 mangganti kakawaan dijanaki {{PLURAL:$5|sabuah log kajadian|$5 log kajadian}} pintangan $3: $4",
        "logentry-delete-revision": "$1 mangganti kakawaan dijanaki {{PLURAL:$5|sabuah ralatan|$5 ralatan}} pintangan tungkaran $3: $4",
        "revdelete-uname-unhid": "ngaran-pamuruk kada tasungkup",
        "revdelete-restricted": "Talamar pambatasan hagan pambakal-pambakal",
        "revdelete-unrestricted": "Buang pambatasan gasan pambakal-pambakal",
-       "logentry-move-move": "$1 mamindahakan tungkaran $3 ka $4",
-       "logentry-move-move-noredirect": "$1 diugah tungkaran $3 ka $4 awan-kada maninggalakan sabuah paugahan",
+       "logentry-move-move": "$1 {{GENDER:$2|mamindahakan}} tungkaran $3 ka $4",
+       "logentry-move-move-noredirect": "$1 {{GENDER:$2|mamindahakan}} tungkaran $3 ka $4 kada pakai maulah paugahan",
        "logentry-move-move_redir": "$1 diugah tungkaran $3 ka $4 lung paugahan",
        "logentry-move-move_redir-noredirect": "$1 diugah tungkaran $3 ka $4 lung sabuah paugahan awan-kada maninggalakan sabuah paugahan",
        "logentry-patrol-patrol": "$1 diciri'i ralatan $4 matan tungkaran $3 taawasi",
        "logentry-patrol-patrol-auto": "$1 utumatis diciri'i ralatan $4 matan tungkaran $3 taawasi",
        "logentry-newusers-newusers": "$1 ma-ulah sabuting akun pamakai",
-       "logentry-newusers-create": "$1 ma-ulah sabuting akun pamakai",
+       "logentry-newusers-create": "$1 {{GENDER:$2|maulah}} akun pamakai",
        "logentry-newusers-create2": "$1 ma-ulah sabuting akun pamakai $3",
        "logentry-newusers-autocreate": "Akun $1 utumatis diulah",
+       "logentry-upload-upload": "$1 {{GENDER:$2|ma-unggah}} $3",
        "rightsnone": "(kadada)",
        "feedback-adding": "Manambahi kitihanbalik ka tungkaran...",
        "feedback-bugcheck": "Harat! hanyar dipariksa bahwasa ngini lainan salah asa [$1 bug nang dipinandui].",
        "feedback-subject": "Parihal:",
        "feedback-submit": "Kirim",
        "feedback-thanks": "Tarimakasih! jitihanbalik Pian sudah dipusakan ka si tungkaran \"[$2 $1]\".",
-       "searchsuggest-search": "Gagai",
+       "searchsuggest-search": "Gagai {{SITENAME}}",
        "searchsuggest-containing": "isian ...",
        "api-error-stashfailed": "Kasalahan intarnal: server gagal manyimban barakas samantara.",
        "api-error-unknown-warning": "Paringatan kada dipinandui: \"$1\".",
index 46e79de..725b8e9 100644 (file)
@@ -82,7 +82,7 @@
        "tog-watchlisthidecategorization": "পাতার শ্রেণীবদ্ধকরণ লুকিয়ে রাখা হোক",
        "tog-ccmeonemails": "অন্য ব্যবহারকারীর কাছে আমার পাঠানো ইমেইলের একটি প্রতিলিপি আমাকে পাঠানো হোক",
        "tog-diffonly": "পার্থক্যের নিচে পাতার বিষয়বস্তু না দেখানো হোক",
-       "tog-showhiddencats": "লà§\81à¦\95ায়িত à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80সমà§\82হ à¦¦à§\87à¦\96ানà§\8b à¦¹à§\8bà¦\95",
+       "tog-showhiddencats": "লà§\81à¦\95ানà§\8b à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80সমà§\82হ à¦¦à§\87à¦\96ান",
        "tog-norollbackdiff": "রোলব্যাকের পরে সংস্করণগুলির পার্থক্য না দেখানো হোক",
        "tog-useeditwarning": "কোনো সম্পাদনা পাতা ত্যাগের সময় পরিবর্তনগুলি সংরক্ষিত না হয়ে থাকলে আমাকে সাবধান করা হোক",
        "tog-prefershttps": "অ্যাকাউন্টে প্রবেশ করার সময় সবসময় নিরাপদ সংযোগ ব্যবহার করুন",
        "subcategories": "উপবিষয়শ্রেণীসমূহ",
        "category-media-header": "\"$1\" বিষয়শ্রেণীতে অন্তর্ভুক্ত মিডিয়া ফাইলগুলি",
        "category-empty": "<em>এই বিষয়শ্রণীতে বর্তমানে কোন পাতা বা মিডিয়া ফাইল নেই।</em>",
-       "hidden-categories": "{{PLURAL:$1|লà§\81à¦\95ায়িত বিষয়শ্রেণী}}",
-       "hidden-category-category": "লà§\81à¦\95ায়িত বিষয়শ্রেণীসমূহ",
+       "hidden-categories": "{{PLURAL:$1|লà§\81à¦\95ানà§\8b বিষয়শ্রেণী}}",
+       "hidden-category-category": "লà§\81à¦\95ানà§\8b বিষয়শ্রেণীসমূহ",
        "category-subcat-count": "{{PLURAL:$2|এই বিষয়শ্রেণীতে কেবলমাত্র নিচের উপবিষয়শ্রেণীটি আছে।|এই বিষয়শ্রেণীতে অন্তর্ভুক্ত মোট $2টি উপবিষয়শ্রেণীর মধ্যে {{PLURAL:$1|$1টি উপবিষয়শ্রেণী}} নিচে দেখানো হয়েছে।}}",
        "category-subcat-count-limited": "এই বিষয়শ্রেণীতে নিচের {{PLURAL:$1|উপবিষয়শ্রেণী|$1টি উপবিষয়শ্রেণী}} আছে।",
        "category-article-count": "{{PLURAL:$2|এই বিষয়শ্রেণীতে কেবল নিচের পাতাটি আছে।|এই বিষয়শ্রেণীতে অন্তর্ভুক্ত মোট $2টি পাতার মধ্যে {{PLURAL:$1|$1টি পাতা}} নিচে দেখানো হল।}}",
        "templatesusedsection": "এই অনুচ্ছেদে ব্যবহৃত {{PLURAL:$1|টেমপ্লেট|টেমপ্লেটসমূহ}}:",
        "template-protected": "(সুরক্ষিত)",
        "template-semiprotected": "(অর্ধ-সুরক্ষিত)",
-       "hiddencategories": "à¦\8fà¦\87 à¦ªà¦¾à¦¤à¦¾à¦\9fি {{PLURAL:$1|১à¦\9fি à¦²à§\81à¦\95ায়িত à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80র|$1à¦\9fি à¦²à§\81à¦\95ায়িত বিষয়শ্রেণীর}} সদস্য:",
+       "hiddencategories": "à¦\8fà¦\87 à¦ªà¦¾à¦¤à¦¾à¦\9fি {{PLURAL:$1|১à¦\9fি à¦²à§\81à¦\95ানà§\8b à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80র|$1à¦\9fি à¦²à§\81à¦\95ানà§\8b বিষয়শ্রেণীর}} সদস্য:",
        "edittools": "<!-- সম্পাদনা এবং আপলোড ফরমের নীচে এখানের লেখা দেখানো হবে। -->",
        "edittools-upload": "-",
        "nocreatetext": "{{SITENAME}}-এ নতুন পাতা সৃষ্টি করার ক্ষমতা সীমাবদ্ধ করা হয়েছে।\nআপনি ফিরে গিয়ে ইতিমধ্যে বিদ্যমান কোন পাতা সম্পাদনা করতে পারেন, অথবা [[Special:UserLogin|অ্যাকাউন্টে প্রবেশ কিংবা অ্যাকাউন্ট সৃষ্টি করতে পারেন]]।",
        "edit-gone-missing": "পাতাটি হালনাগাদ হয়নি।\nসম্ভবতঃ পাতাটি মুছে ফেলা হয়েছে।",
        "edit-conflict": "সম্পাদনা সংঘাত।",
        "edit-no-change": "আপনার সম্পাদনাটি উপেক্ষা করা হয়েছে, কারণ লেখাতে কোনো পরিবর্তন করা হয়নি।",
+       "edit-slots-cannot-add": "নিচের {{PLURAL:$1|স্লটটি|স্লটসমূহ}} এখানে সমর্থিত নয়: $2।",
+       "edit-slots-cannot-remove": "নিচের {{PLURAL:$1|স্লট|স্লটসমূহ}} প্রয়োজন এবং বাদ দেওয়া যাবে না: $2।",
+       "edit-slots-missing": "নিচের {{PLURAL:$1|স্লট|স্লটসমূহ}} পাওয়া যায়নি: $2।",
        "postedit-confirmation-created": "পাতাটি তৈরি করা হয়েছে।",
        "postedit-confirmation-restored": "পাতাটি পুনরুদ্ধার করা হয়েছে।",
        "postedit-confirmation-saved": "আপনার সম্পাদনা সংরক্ষিত হয়েছে।",
        "converter-manual-rule-error": "ম্যানুয়াল ভাষা রূপান্তর নিয়মে ত্রুটি পাওয়া গিয়েছে",
        "undo-success": "সম্পাদনাটি বাতিল করা যাবে। অনুগ্রহ করে নিচের তুলনাটি পরীক্ষা করে দেখুন ও নিশ্চিত করুন যে এটাই আপনি করতে চান, এবং তারপর নিচের সম্পাদনাগুলি সংরক্ষণ করে সম্পাদনাটির বাতিল প্রক্রিয়া সমাপ্ত করুন।",
        "undo-failure": "এ সম্পাদনা মধ্যবর্তী সম্পাদনাসমূহের কারণে পূর্বাবস্থায় ফিরিয়ে নেওয়া যাবে না।",
+       "undo-main-slot-only": "এই সম্পাদনাটি পূর্বাবস্থায় নেওয়া যাবে না কারণ এখানকার বিষয়বস্তু প্রধান স্লটের বাইরে।",
        "undo-norev": "সম্পাদনাটি বাতিল করা যাচ্ছেনা কারণ এটি আর নেই বা মুছে ফেলা হয়েছে।",
        "undo-nochange": "সম্পাদনাটি পূর্বেই বাতিল করা হয়েছে।",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|আলাপ]])-এর সম্পাদিত $1 নম্বর সংশোধনটি বাতিল করা হয়েছে",
-       "undo-summary-username-hidden": "à¦\8fà¦\95à¦\9cন à¦²à§\81à¦\95ায়িত ব্যবহারকারীর করা $1 নং সংশোধনটি বাতিল করা হয়েছে",
+       "undo-summary-username-hidden": "à¦\8fà¦\95à¦\9cন à¦²à§\81à¦\95ানà§\8b ব্যবহারকারীর করা $1 নং সংশোধনটি বাতিল করা হয়েছে",
        "cantcreateaccount-text": "[[User:$3|$3]] এই আইপি ঠিকানা('''$1''') থেকে অ্যাকাউন্ট সৃষ্টিতে বাধা দিয়েছেন।\n\n$3-এর দেয়া কারণ হল ''$2''",
        "cantcreateaccount-range-text": "[[User:$3|$3]] কর্তৃক আইপি ঠিকানার ব্যাপ্তি <strong>$1</strong>-এর মধ্যে অ্যাকাউন্ট তৈরি করা অবরুদ্ধ করা হয়েছে। যাতে আপনার আইপি ঠিকানাও (<strong>$4</strong>) রয়েছে। \n\n$3 কর্তৃক <em>$2</em> কারণ দেখানো হয়েছে।",
        "viewpagelogs": "এই পাতার জন্য লগগুলো দেখুন",
        "revdelete-hide-user": "সম্পাদকের ব্যবহারকারী নাম/আইপি ঠিকানা",
        "revdelete-hide-restricted": "প্রশাসকবৃন্দ এবং অন্যদের ক্ষেত্রে এই ডাটা রোধ করো",
        "revdelete-radio-same": "(পরিবর্তন করবেন না)",
-       "revdelete-radio-set": "লà§\81à¦\95ায়িত",
+       "revdelete-radio-set": "লà§\81à¦\95ানà§\8b",
        "revdelete-radio-unset": "দৃশ্যমান",
        "revdelete-suppress": "সব প্রশাসক ও অন্যান্যদের কাছ থেকে উপাত্ত লুকিয়ে রাখা হোক।",
        "revdelete-unsuppress": "সংশোধন পুনঃস্থাপনের উপর সীমাবদ্ধতা দূর করো",
        "right-browsearchive": "অপসারিত পাতা অনুসন্ধান করো",
        "right-undelete": "পাতাটি পুনরুদ্ধার করুন",
        "right-suppressrevision": "যেকোন ব্যবহারকারী থেকে পাতার নির্দিষ্ট সংশোধন দেখুন, লুকিয়ে  রাখুন এবং প্রকাশ্যে আনুন",
-       "right-viewsuppressed": "যà§\87à¦\95à§\8bন à¦¬à§\8dযবহারà¦\95ারà§\80র à¦\95াà¦\9b à¦¥à§\87à¦\95à§\87 à¦²à§\81à¦\95ায়িত সংস্করণগুলি দেখুন",
+       "right-viewsuppressed": "যà§\87à¦\95à§\8bন à¦¬à§\8dযবহারà¦\95ারà§\80র à¦\95াà¦\9b à¦¥à§\87à¦\95à§\87 à¦²à§\81à¦\95ানà§\8b সংস্করণগুলি দেখুন",
        "right-suppressionlog": "ব্যক্তিগত লগ দেখাও",
        "right-block": "সম্পাদনা করতে কোনো ব্যবহারকারীকে বাঁধা দাও",
        "right-blockemail": "ই-মেইল পাঠাতে কোনো ব্যবহারকারীকে বাঁধা দাও",
        "action-changetags": "নির্দিষ্ট সংস্করণ এবং লগ ভুক্তিগুলিতে যথেচ্ছভাবে ট্যাগ সংযোজন ও অপসারণ করা",
        "action-deletechangetags": "ডাটাবেজ থেকে ট্যাগ অপসরণ করার",
        "action-purge": "এই পাতাটি শোধন করুন",
+       "action-apihighlimits": "API কোয়েরিতে আরো উচ্চতর সীমা ব্যবহার করার",
+       "action-autoconfirmed": "আইপি-ভিত্তিক রেট সীমার দ্বারা প্রভাবিত না হবার",
+       "action-bigdelete": "বিশাল ইতিহাস সম্বলিত পাতা অপসারণ করার",
+       "action-blockemail": "কোনো ব্যবহারকারীকে ই-মেইল পাঠানো থেকে বাধা দেয়ার",
+       "action-bot": "স্বয়ংক্রিয় পদ্ধতি হিসাবে চিহ্নিতকরণ করার",
+       "action-editprotected": "\"{{int:protect-level-sysop}}\" হিসেবে সুরক্ষিত পাতা সম্পাদনা করার",
+       "action-editsemiprotected": "\"{{int:protect-level-autoconfirmed}}\" হিসেবে সুরক্ষিত পাতা সম্পাদনা করার",
+       "action-editinterface": "ব্যবহারকারী ইন্টারফেস সম্পাদনা করার",
+       "action-editusercss": "অন্য ব্যবহারকারীগণের CSS ফাইল সম্পাদনা করার",
+       "action-edituserjson": "অন্য ব্যবহারকারীগণের JSON ফাইল সম্পাদনা করার",
+       "action-edituserjs": "অন্য ব্যবহারকারীগণের জাভাস্ক্রিপ্ট ফাইল সম্পাদনা করার",
+       "action-editsitecss": "সাইটব্যাপী CSS সম্পাদনা করার",
+       "action-editsitejson": "সাইটব্যাপী JSON সম্পাদনা করার",
+       "action-editsitejs": "সাইটব্যাপী জাভাস্ক্রিপ্ট সম্পাদনা করার",
+       "action-editmyusercss": "স্ব ব্যবহারকারীর CSS ফাইল সম্পাদনা করার",
+       "action-editmyuserjson": "স্ব ব্যবহারকারী JSON ফাইল সম্পাদনা করার",
+       "action-editmyuserjs": "স্ব ব্যবহারকারী জাভাস্ক্রিপ্ট ফাইল সম্পাদনা করার",
+       "action-viewsuppressed": "যেকোন ব্যবহারকারীর কাছ থেকে লুকানো সংস্করণগুলি দেখার",
+       "action-hideuser": "ব্যবহারকারীকে বাধা দেয়ার, এবং তা সর্বসাধারণের দৃষ্টিসীমা থেকে লুকানোর",
+       "action-ipblock-exempt": "আইপি বাধা, স্বয়ংক্রিয় বাধা ও পরিসীমার বাধা এড়ানোর",
+       "action-unblockself": "নিজেকে বাধামুক্ত করার",
+       "action-noratelimit": "রেট সীমার দ্বারা প্রভাবিত না হবার",
+       "action-reupload-own": "নিজের দ্বারা আপলোডকৃত ফাইল পুনর্লিখনের",
+       "action-nominornewtalk": "আলোচনার পৃষ্ঠাগুলিতে অনুল্লেখ্য সম্পাদনা নেই নতুন বার্তা প্রম্পট ট্রিগার করার",
+       "action-markbotedits": "ফেরত আনা সম্পাদনাসমূহকে বট সম্পাদনা হিসেবে চিহ্নিত করার",
+       "action-patrolmarks": "সাম্প্রতিক পরিবর্তনের পরীক্ষণের চিহ্ন দেখার",
+       "action-override-export-depth": "৫-এর গভীরতা পর্যন্ত সংযোগকৃত পাতাসহ পাতাগুলি রপ্তানি করার",
+       "action-suppressredirect": "পাতা স্থানান্তর করার সময় উৎস পাতা থেকে পুনর্নির্দেশ তৈরী করার",
        "nchanges": "$1টি {{PLURAL:$1|পরিবর্তন}}",
        "enhancedrc-since-last-visit": "{{PLURAL:$1|সর্বশেষ প্রদর্শনের পর}} $1টি",
        "enhancedrc-history": "ইতিহাস",
        "rcfilters-filter-watchlist-notwatched-description": "আপনার নজরতালিকায় থাকা পাতাগুলি ব্যতীয় সবকিছু।",
        "rcfilters-filtergroup-watchlistactivity": "নজরতালিকার কার্যক্রম",
        "rcfilters-filter-watchlistactivity-unseen-label": "অদেখা পরিবর্তন",
+       "rcfilters-filter-watchlistactivity-unseen-description": "পাতাসমূহের পরিবর্তন ঘটার পর থেকে আপনি যেসব পাতা পরিদর্শন করেননি।",
        "rcfilters-filter-watchlistactivity-seen-label": "দেখা পরিবর্তন",
+       "rcfilters-filter-watchlistactivity-seen-description": "পাতাসমূহের পরিবর্তন ঘটার পর থেকে আপনি যেসব পাতা পরিদর্শন করেছেন।",
        "rcfilters-filtergroup-changetype": "পরিবর্তনের ধরন",
        "rcfilters-filter-pageedits-label": "পাতার সম্পাদনা",
        "rcfilters-filter-pageedits-description": "উইকি বিষয়বস্তু, আলোচনা, বিষয়শ্রেণীর বিবরণ... ইত্যাদিতে সম্পাদনা",
        "rcfilters-preference-help": "ছাঁকনিগুলি অনুসন্ধান বা আলোকপাতকরণ কার্যকারিতা ছাড়া সাম্প্রতিক পরিবর্তন লোড করে",
        "rcfilters-watchlist-preference-label": "জাভাস্ক্রিপ্টহীন ইন্টারফেস ব্যবহার করুন",
        "rcfilters-watchlist-preference-help": "ছাঁকনি অনুসন্ধান বা আলোকপাতকরণ বৈশিষ্ট্য ছাড়া নজরতালিকা লোড করে।",
+       "rcfilters-filter-showlinkedfrom-label": "এটি থেকে সংযোগকারী পাতাসমূহের পরিবর্তন দেখান",
+       "rcfilters-filter-showlinkedfrom-option-label": "নির্বাচিত পাতাটি থেকে <strong>সংযোগকারী পাতাসমূহ</strong>",
+       "rcfilters-filter-showlinkedto-label": "এটিতে সংযোগকারী পাতাসমূহের পরিবর্তন দেখান",
+       "rcfilters-filter-showlinkedto-option-label": "নির্বাচিত পাতাটিতে <strong>সংযোগকারী পাতাসমূহ</strong>",
        "rcfilters-target-page-placeholder": "একটি পাতার নাম (বা বিষয়শ্রেণী) লিখুন",
        "rcnotefrom": "<strong>$2</strong>টা থেকে সংঘটিত পরিবর্তনগুলি (সর্বোচ্চ <strong>$1টি</strong> দেখানো হয়েছে)।",
        "rclistfromreset": "তারিখ নির্বাচন পুনঃস্থাপন করুন",
        "uploaded-script-svg": "আপলোডকৃত SVG ফাইলে স্ক্রিপ্টযোগ্য উপাদান \"$1\" পাওয়া গেছে।",
        "uploaded-hostile-svg": "আপলোড করা SVG ফাইলের শৈলী উপাদানে অনিরাপদ সিএসএস পাওয়া গেছে।",
        "uploaded-event-handler-on-svg": "এসভিজি ফাইলের জন্য <code>$1=\"$2\"</code> ইভেন্ট-হ্যান্ডলার বৈশিষ্ট্যটি নির্ধারণ করা অনুমোদিত নয়।",
-       "uploaded-href-attribute-svg": "এসভিজি ফাইলের href বৈশিষ্ট্যগুলির জন্য কেবলমাত্র http:// বা https:// লক্ষ্যগুলি অনুমোদিত; কিন্তু <code>&lt;$1 $2=\"$3\"&gt;</code> পাওয়া গেছে।",
+       "uploaded-href-attribute-svg": "<a> উপাদান শুধুমাত্র উপাত্তে সংযোগ (href) করা যাবে: (এম্বেড করা ফাইল), http:// বা https://, বা খণ্ডিত (#, একই-নথি) লক্ষ্যগুলি। অন্যান্য উপাদানের জন্য, যেমন <image>, কেবলমাত্র উপাত্ত: ও খণ্ড অনুমোদিত। আপনার এসভিজি রপ্তানি করার সময় ছবি এম্বেড করার চেষ্টা করুন। <code>&lt;$1 $2=\"$3\"&gt;</code> পাওয়া গেছে।",
        "uploaded-href-unsafe-target-svg": "অনিরাপদ উপাত্তে href পাওয়া গেছে: আপলোডকৃত SVG ফাইলে URI লক্ষ্য ছিল <code>&lt;$1 $2=\"$3\"&gt;</code>।",
        "uploaded-animate-svg": "\"animate\" ট্যাগটি পাওয়া গেছে যা আপলোডকৃত এসভিজি ফাইলের <code>&lt;$1 $2=\"$3\"&gt;</code> - এই \"from\" অ্যাট্রিবিউটটি ব্যবহার করে href পরিবর্তন করতে পারে।",
        "uploaded-setting-event-handler-svg": "ইভেন্ট-হ্যান্ডলার অ্যাট্রিবিউট নির্ধারণ করতে বাধা দেওয়া হয়েছে। আপলোডকৃত এসভিজি ফাইলে <code>&lt;$1 $2=\"$3\"&gt;</code> খুঁজে পাওয়া গেছে।",
        "blocklogpage": "বাধা দানের লগ",
        "blocklog-showlog": "এই ব্যবহারকারীকে পূর্বেও বাধা প্রদান করা হয়েছিলো।\nতথ্যসূত্র হিসেবে তাই পূর্বের বাধাদানের লগটি নিচে প্রদর্শন করা হচ্ছে:",
        "blocklog-showsuppresslog": "এই ব্যবহারকারীকে পূর্বেও বাধা প্রদান ও লুকানো হয়েছিলো।\nতথ্যসূত্র হিসেবে তাই পূর্বের অপসারণ লগটি নিচে প্রদর্শন করা হচ্ছে:",
-       "blocklogentry": "[[$1]] à¦\95à§\87 $2 à¦®à§\87য়াদের জন্য বাধাদান করেছেন $3",
-       "reblock-logentry": "[[$1]] এর ব্লক সেটিং পরিবর্তন করা হয়েছে যেটি শেষ হবে $2 $3 সময়ে",
+       "blocklogentry": "[[$1]] à¦\95à§\87 $2 à¦¸à¦®à¦¯à¦¼ের জন্য বাধাদান করেছেন $3",
+       "reblock-logentry": "[[$1]]-এর বাধাদান সেটিং পরিবর্তন করেছেন যেটি শেষ হবার মেয়াদ $2 $3",
        "blocklogtext": "এটি ব্যবহারকারীদেরকে বাধা দানের বা বাধা তুলে নেওয়ার লগ।\nস্বয়ংক্রিয়ভাবে বাধাদানকৃত আইপি ঠিকানাগুলি এখানে তালিকাবদ্ধ করা হয়নি।\nবর্তমানে সক্রিয় নিষিদ্ধকরণ ও বাধাদানের তালিকার জন্য [[Special:BlockList| বাধাদান তালিকা]] দেখুন।",
        "unblocklogentry": "$1-এর উপর বাধা তুলে নেয়া হয়েছে",
        "block-log-flags-anononly": "কেবল বেনামী ব্যবহারকারীরা",
        "block-log-flags-noemail": "ই-মেইলে বাধা আছে",
        "block-log-flags-nousertalk": "নিজের আলাপের পাতা সম্পাদনা করতে পারবে না",
        "block-log-flags-angry-autoblock": "উন্নত অটোব্লক সক্রিয়",
-       "block-log-flags-hiddenname": "ব্যবহারকারীনাম লুকায়িত",
+       "block-log-flags-hiddenname": "ব্যবহারকারী নাম লুক্কায়িত",
        "range_block_disabled": "প্রশাসকের পক্ষে আইপি ঠিকানার শ্রেণী বাধাদানের ক্ষমতা নিষ্ক্রিয় আছে।",
        "ipb_expiry_invalid": "মেয়াদোত্তীর্ণকাল অবৈধ।",
        "ipb_expiry_old": "মেয়াদোত্তীর্ণের সময় অতীত হয়েছে।",
        "ipb_expiry_temp": "লুকানো ব্যবহারকারীনাম বাধা চিরস্থায়ী হতে হবে।",
        "ipb_hide_invalid": "এই অ্যাকাউন্ট বাধা দেয়া সম্ভব নয়; এটি {{PLURAL:$1|একের অধিক|$1টি}} সম্পাদনা করেছে।",
+       "ipb_hide_partial": "লুকানো ব্যবহারকারী নামের বাধাদান অবশ্যই সাইটব্যপী হতে হবে।",
        "ipb_already_blocked": "\"$1\" ইতিমধ্যে বাধাপ্রাপ্ত।",
        "ipb-needreblock": "$1 ইতিমধ্যেই বাধাপ্রাপ্ত আছেন। আপনি কি সেটিংস পরিবর্তন করতে চান?",
        "ipb-otherblocks-header": "অন্যান্য {{PLURAL:$1|বাধা|বাধাসমূহ}}",
        "metadata-help": "এই ফাইলে অতিরিক্ত কিছু তথ্য আছে। সম্ভবত যে ডিজিটাল ক্যামেরা বা স্ক্যানারের মাধ্যমে এটি তৈরি বা ডিজিটায়িত করা হয়েছিল, সেটি কর্তৃক তথ্যগুলি যুক্ত হয়েছে। যদি ফাইলটি তার আদি অবস্থা থেকে পরিবর্তিত হয়ে থাকে, কিছু কিছু বিবরণ পরিবর্তিত ফাইলটির জন্য প্রযোজ্য না-ও হতে পারে।",
        "metadata-expand": "সম্প্রসারিত সবিস্তারে দেখাও",
        "metadata-collapse": "সম্প্রসারিত বিবরণ দেখান",
-       "metadata-fields": "à¦\8fà¦\87 à¦¬à¦¾à¦°à§\8dতায় à¦¤à¦¾à¦²à¦¿à¦\95াভà§\81à¦\95à§\8dত à¦\9aিতà§\8dর à¦®à§\87à¦\9fাডাà¦\9fা à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦\9bবির à¦ªà¦¾à¦¤à¦¾à¦¯à¦¼ à¦ªà§\8dরদরà§\8dশন à¦\95রা à¦¹à¦¬à§\87, à¦¯à¦\96ন à¦®à§\87à¦\9fাডাà¦\9fা à¦¸à¦¾à¦°à¦£à¦¿à¦\9fি à¦¸à¦\82à¦\95à§\81à¦\9aিত à¦\95রা à¦¹à¦¬à§\87। à¦\85নà§\8dয à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦¸à§\8dবাভাবিà¦\95 à¦\85বসà§\8dথায় à¦²à§\81à¦\95ায়িত থাকবে।\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
+       "metadata-fields": "à¦\8fà¦\87 à¦¬à¦¾à¦°à§\8dতায় à¦¤à¦¾à¦²à¦¿à¦\95াভà§\81à¦\95à§\8dত à¦\9aিতà§\8dর à¦®à§\87à¦\9fাডাà¦\9fা à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦\9bবির à¦ªà¦¾à¦¤à¦¾à¦¯à¦¼ à¦ªà§\8dরদরà§\8dশন à¦\95রা à¦¹à¦¬à§\87, à¦¯à¦\96ন à¦®à§\87à¦\9fাডাà¦\9fা à¦¸à¦¾à¦°à¦£à¦¿à¦\9fি à¦¸à¦\82à¦\95à§\81à¦\9aিত à¦\95রা à¦¹à¦¬à§\87। à¦\85নà§\8dয à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦¸à§\8dবাভাবিà¦\95 à¦\85বসà§\8dথায় à¦²à§\81à¦\95ানà§\8b থাকবে।\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "namespacesall": "সমস্ত",
        "monthsall": "সমস্ত",
        "confirmemail": "ই-মেইলের ঠিকানা নিশ্চিত করুন",
        "logentry-suppress-revision": "$1 গোপনে {{PLURAL:$5|একটি সংস্করণের|$5টি সংস্করণের}} দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন $3: $4",
        "logentry-suppress-event-legacy": "$1 গোপনে $3টায় লগ ইভেন্টসমূহের দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন",
        "logentry-suppress-revision-legacy": "$1 গোপনে $3টায় সংস্করণসমূহের দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন",
-       "revdelete-content-hid": "বিষয়বস্তু লুকায়িত",
-       "revdelete-summary-hid": "সম্পাদনা সারাংশ লুকায়িত",
-       "revdelete-uname-hid": "ব্যবহারকারী নাম লুকায়িত",
+       "revdelete-content-hid": "বিষয়বসà§\8dতà§\81 à¦²à§\81à¦\95à§\8dà¦\95ায়িত",
+       "revdelete-summary-hid": "সম্পাদনার সারাংশ লুকানো",
+       "revdelete-uname-hid": "বà§\8dযবহারà¦\95ারà§\80 à¦¨à¦¾à¦® à¦²à§\81à¦\95à§\8dà¦\95ায়িত",
        "revdelete-content-unhid": "বিষয়বস্তু প্রদর্শিত",
        "revdelete-summary-unhid": "সম্পাদনা সারাংশ প্রদর্শিত",
        "revdelete-uname-unhid": "ব্যবহারকারী নাম প্রদর্শিত",
        "revdelete-unrestricted": "এই সীমাবদ্ধতা প্রশাসকের ক্ষেত্রে তুলে নাও",
        "logentry-block-block": "$1 {{GENDER:$4|$3}} কে $5 মেয়াদের জন্য {{GENDER:$2|বাধাদান}} করেছেন $6",
        "logentry-block-unblock": "$1 {{GENDER:$4|$3}}-এর উপর থেকে বাধা তুলে {{GENDER:$2|নিয়েছেন}}",
-       "logentry-block-reblock": "$1 {{GENDER:$4|$3}}-এর জন্য বাধাদান সেটিং $5 সময়ের জন্য {{GENDER:$2|পরিবর্তন}} করেছেন $6",
+       "logentry-block-reblock": "$1 {{GENDER:$4|$3}}-এর বাধাদান সেটিং {{GENDER:$2|পরিবর্তন করেছেন}} যেটি শেষ হবার মেয়াদ $5 $6",
+       "logentry-partialblock-block-page": "$2 {{PLURAL:$1|পাতাটি|পাতাগুলি}}",
+       "logentry-partialblock-block-ns": "$2 {{PLURAL:$1|নামস্থানটি|নামস্থানগুলি}}",
+       "logentry-partialblock-block": "$1 {{GENDER:$4|$3}} কে $7 সম্পাদনা করা থেকে $5 সময়ের জন্য {{GENDER:$2|বাধাদান করেছেন}} $6",
+       "logentry-partialblock-reblock": "$1 $7তে সম্পাদনা করা প্রতিরোধ করে {{GENDER:$4|$3}}-এর বাধাদান সেটিং {{GENDER:$2|পরিবর্তন করেছেন}} যেটি শেষ হবার মেয়াদ $5 $6",
+       "logentry-non-editing-block-block": "$1 {{GENDER:$4|$3}} কে সম্পাদনা-ছাড়া নির্দিষ্ট কর্ম করা থেকে $5 সময়ের জন্য {{GENDER:$2|বাধাদান করেছেন}} $6",
+       "logentry-non-editing-block-reblock": "$1 সম্পাদনা-ছাড়া নির্দিষ্ট কর্মের জন্য {{GENDER:$4|$3}}-এর বাধাদান সেটিং {{GENDER:$2|পরিবর্তন করেছেন}} যেটি শেষ হবার মেয়াদ $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$4|$3}} কে $5 মেয়াদের জন্য {{GENDER:$2|বাধাদান}} করেছেন $6",
-       "logentry-suppress-reblock": "$1 {{GENDER:$4|$3}}-à¦\8fর à¦\9cনà§\8dয à¦¬à¦¾à¦§à¦¾à¦¦à¦¾à¦¨ à¦¸à§\87à¦\9fিà¦\82 $5 à¦¸à¦®à¦¯à¦¼à§\87র à¦\9cনà§\8dয {{GENDER:$2|পরিবরà§\8dতন}} à¦\95রà§\87à¦\9bà§\87ন $6",
+       "logentry-suppress-reblock": "$1 {{GENDER:$4|$3}}-à¦\8fর à¦¬à¦¾à¦§à¦¾à¦¦à¦¾à¦¨ à¦¸à§\87à¦\9fিà¦\82 {{GENDER:$2|পরিবরà§\8dতন à¦\95রà§\87à¦\9bà§\87ন}} à¦¯à§\87à¦\9fি à¦¶à§\87ষ à¦¹à¦¬à¦¾à¦° à¦®à§\87য়াদ $5 $6",
        "logentry-import-upload": "$1 ফাইল আপলোড দ্বারা $3 {{GENDER:$2|আমদানি করেছেন}}",
        "logentry-import-upload-details": "$1 ফাইল আপলোড দ্বারা $3 {{GENDER:$2|আমদানি করেছেন}} ($4টি {{PLURAL:$4|সংশোধন}})",
        "logentry-import-interwiki": "$1 অন্য একটি উইকিতে থেকে $3 {{GENDER:$2|আমদানি করেছে}}",
        "expand_templates_generate_xml": "XML পার্স বৃক্ষ দেখাও",
        "expand_templates_generate_rawhtml": "এইচটিএমএল দেখাও",
        "expand_templates_preview": "প্রাকদর্শন",
-       "expand_templates_preview_fail_html": "<em>{{SITENAME}}-এ raw HTML সক্রিয় আছে ও সেশন উপাত্ত হারিয়ে গিয়েছে, জাভাস্ক্রিপ্ট ভিত্তিক আক্রমণ থেকে প্রতিরক্ষার জন্য প্রাকদর্শনটি লুকায়িত আছে।</em>\n\n<strong>যদি এটি সম্পাদনার একটি বৈধ প্রচেষ্টা হয়, তবে অনুগ্রহ করে আবার চেষ্টা করুন।</strong>\nযদি তারপরেও কাজ না হয়, তবে অ্যাকাউন্ট থেকে [[Special:UserLogout|বেরিয়ে গিয়ে]] আবার প্রবেশ করুন, এবং পরীক্ষা করে দেখুন যে আপনার ব্রাউজারে এই সাইট থেকে কুকি অনুমতি দেয়।",
-       "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}}-à¦\8f raw HTML à¦¸à¦\95à§\8dরিয় à¦\86à¦\9bà§\87 à¦\93 à¦\86পনি à¦ªà§\8dরবà§\87শ à¦\95রà§\87ন à¦¨à¦¿, à¦\9cাভাসà§\8dà¦\95à§\8dরিপà§\8dà¦\9f à¦­à¦¿à¦¤à§\8dতিà¦\95 à¦\86à¦\95à§\8dরমণ à¦¥à§\87à¦\95à§\87 à¦ªà§\8dরতিরà¦\95à§\8dষার à¦\9cনà§\8dয à¦ªà§\8dরাà¦\95দরà§\8dশনà¦\9fি à¦²à§\81à¦\95ায়িত à¦\86à¦\9bà§\87।</em>\n\n<strong>যদি à¦\8fà¦\9fি à¦¸à¦®à§\8dপাদনার à¦\8fà¦\95à¦\9fি à¦¬à§\88ধ à¦ªà§\8dরà¦\9aà§\87ষà§\8dà¦\9fা à¦¹à¦¯à¦¼, à¦¤à¦¬à§\87 à¦\85নà§\81à¦\97à§\8dরহ à¦\95রà§\87  [[Special:UserLogin|প্রবেশ করুন]] ও আবার চেষ্টা করুন।</strong>",
+       "expand_templates_preview_fail_html": "<em>যেহেতু {{SITENAME}}-এ raw HTML সক্রিয় আছে ও সেশন উপাত্ত হারিয়ে গিয়েছে, জাভাস্ক্রিপ্ট ভিত্তিক আক্রমণ থেকে প্রতিরক্ষার জন্য প্রাকদর্শনটি লুকানো আছে।</em>\n\n<strong>যদি এটি সম্পাদনার একটি বৈধ প্রচেষ্টা হয়, তবে অনুগ্রহ করে আবার চেষ্টা করুন।</strong>\nযদি তারপরেও কাজ না হয়, তবে অ্যাকাউন্ট থেকে [[Special:UserLogout|বেরিয়ে গিয়ে]] আবার প্রবেশ করুন, এবং পরীক্ষা করে দেখুন যে আপনার ব্রাউজারে এই সাইট থেকে কুকি অনুমতি দেয়।",
+       "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}}-à¦\8f raw HTML à¦¸à¦\95à§\8dরিয় à¦\86à¦\9bà§\87 à¦\93 à¦\86পনি à¦ªà§\8dরবà§\87শ à¦\95রà§\87ন à¦¨à¦¿, à¦¤à¦¾à¦\87 à¦\9cাভাসà§\8dà¦\95à§\8dরিপà§\8dà¦\9f à¦­à¦¿à¦¤à§\8dতিà¦\95 à¦\86à¦\95à§\8dরমণ à¦¥à§\87à¦\95à§\87 à¦ªà§\8dরতিরà¦\95à§\8dষার à¦\9cনà§\8dয à¦ªà§\8dরাà¦\95দরà§\8dশনà¦\9fি à¦²à§\81à¦\95ানà§\8b à¦\86à¦\9bà§\87।</em>\n\n<strong>যদি à¦\8fà¦\9fি à¦¸à¦®à§\8dপাদনার à¦\8fà¦\95à¦\9fি à¦¬à§\88ধ à¦ªà§\8dরà¦\9aà§\87ষà§\8dà¦\9fা à¦¹à¦¯à¦¼, à¦¤à¦¬à§\87 à¦\85নà§\81à¦\97à§\8dরহ à¦\95রà§\87 [[Special:UserLogin|প্রবেশ করুন]] ও আবার চেষ্টা করুন।</strong>",
        "expand_templates_input_missing": "আপনাকে অন্তত কিছু ইনপুট লেখা প্রদান করতে হবে।",
        "pagelanguage": "পাতার ভাষা পরিবর্তন করুন",
        "pagelang-name": "পাতা",
        "passwordpolicies-policy-passwordcannotmatchblacklist": "পাসওয়ার্ড বিশেষত কালো তালিকাভুক্ত পাসওয়ার্ডের সাথে মিলতে পারবে না",
        "passwordpolicies-policy-maximalpasswordlength": "পাসওয়ার্ড $1 {{PLURAL:$1|অক্ষরের}} চেয়ে কম দীর্ঘ হতে হবে",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "পাসওয়ার্ড ১,০০,০০০ সর্বাধিক ব্যবহৃত পাসওয়ার্ডের তালিকায় থাকতে পারবে না।",
-       "unprotected-js": "নিরাপত্তার কারণে জাভাস্ক্রিপ্ট অনিরাপদ পৃষ্ঠা থেকে লোড করা যাবে না। শুধুমাত্র মিডিয়াউইকি: নামস্থান বা ব্যবহারকারী উপপাতায় জাভাস্ক্রিপ্ট তৈরি করুন"
+       "unprotected-js": "নিরাপত্তার কারণে জাভাস্ক্রিপ্ট অনিরাপদ পৃষ্ঠা থেকে লোড করা যাবে না। শুধুমাত্র মিডিয়াউইকি: নামস্থান বা ব্যবহারকারী উপপাতায় জাভাস্ক্রিপ্ট তৈরি করুন",
+       "userlogout-continue": "আপনি যদি প্রস্থান করতে চান দয়া করে [$1 প্রস্থান পাতায় যান]।"
 }
index 55910ac..388e583 100644 (file)
        "tag-mw-removed-redirect": "дӀаяьккхина дӀасхьажорг",
        "tag-mw-changed-redirect-target": "хийцаран бахьна ду дӀасахьажорг",
        "tag-mw-blank": "цӀанъяр",
+       "tag-mw-replace": "хийцар",
        "tag-mw-rollback": "Юхаяккха",
        "tag-mw-undo": "юхаяккхар",
        "tags-title": "Билгалонаш",
index d3b3b52..53b0054 100644 (file)
                        "Fnielsen",
                        "Weblars",
                        "Kranix",
-                       "Psl85"
+                       "Psl85",
+                       "Dipsacus fullonum"
                ]
        },
        "tog-underline": "Understreg link:",
        "tog-hideminor": "Skjul mindre ændringer i listen over seneste ændringer",
-       "tog-hidepatrolled": "Skjul overvågede redigeringer i seneste ændringer",
-       "tog-newpageshidepatrolled": "Skjul overvågede sider på listen over nye sider",
+       "tog-hidepatrolled": "Skjul patruljerede redigeringer i seneste ændringer",
+       "tog-newpageshidepatrolled": "Skjul patruljerede sider på listen over nye sider",
        "tog-hidecategorization": "Skjul kategorisering af sider",
        "tog-extendwatchlist": "Udvid overvågningslisten til at vise alle ændringer og ikke kun den nyeste",
        "tog-usenewrc": "Gruppér ændringer efter side i listen over seneste ændringer og i overvågningslisten",
        "badretype": "De indtastede adgangskoder er ikke ens.",
        "usernameinprogress": "En oprettelse af konto for dette brugernavn er allerede i gang.\nVent venligst.",
        "userexists": "Det brugernavn, du har valgt, er allerede i brug.\nVælg venligst et andet brugernavn.",
-       "createacct-normalization": "Dit brugernavn vil blive ændret til «$2» på grund af tekniske begrænsninger.",
+       "createacct-normalization": "Dit brugernavn vil blive ændret til \"$2\" på grund af tekniske begrænsninger.",
        "loginerror": "Logon mislykket",
        "createacct-error": "Fejl ved kontooprettelse",
        "createaccounterror": "Kunne ikke oprette brugerkonto: $1",
        "content-json-empty-array": "Tomt matrix",
        "deprecated-self-close-category": "Sider, der bruger ugyldige, selvlukkende HTML-tags",
        "deprecated-self-close-category-desc": "Siden bruger ugyldige selvlukkende HTML tags, som <code>&lt;b/></code> eller <code>&lt;span/></code>. De vil snart blive ændret i overensstemmelse med HTML5-specifikationen, så de ikke kan bruges i wikitext.",
-       "duplicate-args-warning": "<strong>Advarsel</strong>: [[:$1]] kaldes [[:$2]] med flere end en værdi for \"$3\"-parameteren. Bare den sidst angitte værdien vil bruges.",
+       "duplicate-args-warning": "<strong>Advarsel</strong>: [[:$1]] kalder [[:$2]] med mere end en værdi for \"$3\"-parameteren. Kun den sidst angivne værdi vil blive brugt.",
        "duplicate-args-category": "Sider der bruger samme argument mere end en gang i en skabelon",
        "duplicate-args-category-desc": "Siden indeholder en skabelon hvor et argument er brugt mere end en gang, som <code><nowiki>{{foo|bar=1|bar=2}}</nowiki></code> eller <code><nowiki>{{foo|bar|1=baz}}</nowiki></code>.",
        "expensive-parserfunction-warning": "Advarsel: Der er for mange beregningstunge oversætter-funktionskald på denne side.\n\nDer bør være færre end {{PLURAL:$2|$2 kald}}, lige nu er der {{PLURAL:$1|$1 kald}}.",
        "post-expand-template-argument-category": "Sider med udeladte skabelonparametre",
        "parser-template-loop-warning": "Skabelonløkke fundet: [[$1]]",
        "template-loop-category": "Sider med skabelonløkker",
-       "template-loop-category-desc": "Siden indeholder en malløkke, altså en skabelon som kalder sig selv rekursivt.",
+       "template-loop-category-desc": "Siden indeholder en skabelonløkke, det vil sige en skabelon som kalder sig selv rekursivt.",
        "parser-template-recursion-depth-warning": "En skabelon er rekursivt inkluderet for mange gange ($1)",
        "language-converter-depth-warning": "Dybdegrænse for sprogkonvertering overskredet ($1)",
        "node-count-exceeded-category": "Sider hvor antal noder er overskredet",
        "page_first": "Starten",
        "page_last": "Enden",
        "histlegend": "Forklaring: (nuværende) = forskel til den nuværende\nversion, (forrige) = forskel til den forrige version, M = mindre ændring",
-       "history-fieldset-title": "Søg efter versioner",
+       "history-fieldset-title": "Filtrer versioner",
        "history-show-deleted": "Kun slettede revisioner",
        "histfirst": "ældste",
        "histlast": "nyeste",
        "action-changetags": "tilføje og fjerne vilkårlige tags for enkelte versioner og logposter",
        "action-deletechangetags": "slette tags fra databasen",
        "action-purge": "rense denne side",
+       "action-bigdelete": "slet sider med store historikker",
+       "action-blockemail": "bloker en bruger fra at sende e-mails",
        "action-bot": "blive behandlet som en automatiseret proces",
        "nchanges": "$1 {{PLURAL:$1|ændring|ændringer}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|siden sidste besøg}}",
        "rcfilters-savedqueries-add-new-title": "Gem nuværende filterindstillinger",
        "rcfilters-restore-default-filters": "Gendan standardfiltre",
        "rcfilters-clear-all-filters": "Ryd alle filtre",
-       "rcfilters-show-new-changes": "Vis seneste ændringer",
+       "rcfilters-show-new-changes": "Vis seneste ændringer siden $1",
        "rcfilters-search-placeholder": "Filtrer ændringer (brug menuen eller søg på filternavn)",
        "rcfilters-invalid-filter": "Ugyldigt filter",
        "rcfilters-empty-filter": "Ingen aktive filtre. All bidrag vises.",
        "delete-confirm": "Slet \"$1\"",
        "delete-legend": "Slet",
        "historywarning": "<strong>Advarsel:</strong> Siden du er ved at slette har en historie med $1 {{PLURAL:$1|version|versioner}}:",
-       "historyaction-submit": "Vis",
+       "historyaction-submit": "Vis revisioner",
        "confirmdeletetext": "Du er ved at slette en side sammen med hele dens tilhørende historik.\nBekræft venligst at du virkelig vil gøre dette, at du forstår konsekvenserne, og at du gør det i overensstemmelse med [[{{MediaWiki:Policy-url}}|retningslinjerne]].",
        "actioncomplete": "Gennemført",
        "actionfailed": "Handlingen mislykkedes",
        "blocklist-userblocks": "Skjul blokeringer af kontoer",
        "blocklist-tempblocks": "Skjul midlertidige blokeringer",
        "blocklist-addressblocks": "Skjul enkel IP blokeringer",
+       "blocklist-type": "Type:",
        "blocklist-type-opt-partial": "Delvis",
        "blocklist-rangeblocks": "Skjul blokeringsklasser",
        "blocklist-timestamp": "Tidsstempel",
        "autosumm-replace": "Erstatter sidens indhold med \"$1\"",
        "autoredircomment": "Omdirigering til [[$1]] oprettet",
        "autosumm-removed-redirect": "Fjernede omdirigering til [[$1]]",
+       "autosumm-changed-redirect-target": "Ændrede omdirigeringsmål fra [[$1]] til [[$2]]",
        "autosumm-new": "Oprettede siden med \"$1\"",
        "autosumm-newblank": "Oprettede tom side",
        "lag-warn-normal": "Ændringer som er nyere end {{PLURAL:$1|et sekund|$1 sekunder}}, vises muligvis ikke i denne liste.",
index 8740c73..047c448 100644 (file)
@@ -96,7 +96,8 @@
                        "PerfektesChaos",
                        "Kurt Jansson",
                        "McDutchie",
-                       "Johanna Strodt (WMDE)"
+                       "Johanna Strodt (WMDE)",
+                       "Andi-3"
                ]
        },
        "tog-underline": "Links unterstreichen:",
        "tog-hidepatrolled": "Kontrollierte Änderungen in den „Letzten Änderungen“ ausblenden",
        "tog-newpageshidepatrolled": "Kontrollierte Seiten bei den „Neuen Seiten“ ausblenden",
        "tog-hidecategorization": "Kategorisierungen von Seiten ausblenden",
-       "tog-extendwatchlist": "Alle Änderungen in der Beobachtungsliste anzeigen, nicht nur die aktuellsten",
+       "tog-extendwatchlist": "Alle Änderungen in der Beobachtungsliste anzeigen, nicht nur die letzten",
        "tog-usenewrc": "Änderungen auf „Letzte Änderungen“ und der Beobachtungsliste nach Seite gruppieren",
        "tog-numberheadings": "Überschriften automatisch nummerieren",
        "tog-editondblclick": "Seiten mit Doppelklick bearbeiten",
        "previewnote": "'''Dies ist nur eine Vorschau.'''\nDie Seite wurde noch nicht gespeichert!",
        "continue-editing": "Zum Bearbeitungsfeld gehen",
        "previewconflict": "Diese Vorschau gibt den Inhalt des oberen Textfeldes wieder. So wird die Seite aussehen, wenn du jetzt speicherst.",
-       "session_fail_preview": "Entschuldigung! Wir konnten deine Bearbeitung nicht verarbeiten, da Sitzungsdaten verloren gegangen sind.\n\nDu wurdest eventuell abgemeldet. <strong>Bitte verifiziere, dass du noch angemeldet bist und versuche es erneut</strong>.\nFalls dies nicht funktioniert, versuche dich [[Special:UserLogout|abzumelden]] und anschließend wieder anzumelden und überprüfe, ob dein Browser Cookies von dieser Website akzeptiert.",
+       "session_fail_preview": "Entschuldigung! Wir konnten deine Bearbeitung nicht verarbeiten, da Sitzungsdaten verloren gegangen sind.\n\nDu wurdest eventuell abgemeldet. <strong>Bitte stelle sicher, dass du noch angemeldet bist, und versuche es erneut</strong>.\nFalls dies nicht funktioniert, versuche dich [[Special:UserLogout|abzumelden]] und anschließend wieder anzumelden und überprüfe, ob dein Browser Cookies von dieser Website akzeptiert.",
        "session_fail_preview_html": "Deine Bearbeitung konnte nicht gespeichert werden, da Sitzungsdaten verloren gegangen sind.\n\n<em>Da in {{SITENAME}} das Speichern von reinem HTML aktiviert ist, wurde die Vorschau ausgeblendet, um JavaScript-Attacken vorzubeugen.</em>\n\n<strong>Bitte versuche es erneut, indem du unter der folgenden Textvorschau nochmals auf „Seite speichern“ klickst.</strong>\nSollte das Problem bestehen bleiben, [[Special:UserLogout|melde dich ab]] und danach wieder an. Überprüfe, ob dein Browser Cookies von dieser Website akzeptiert.",
        "token_suffix_mismatch": "'''Deine Bearbeitung wurde zurückgewiesen, da dein Browser Zeichen im Bearbeiten-Token verstümmelt hat.\nEine Speicherung kann den Seiteninhalt zerstören. Dies geschieht bisweilen durch die Benutzung eines anonymen Proxy-Dienstes, der fehlerhaft arbeitet.'''",
        "edit_form_incomplete": "'''Der Inhalt des Bearbeitungsformulars hat den Server nicht vollständig erreicht. Bitte prüfe deine Bearbeitungen auf Vollständigkeit und versuche es erneut.'''",
        "templatesusedsection": "{{PLURAL:$1|Die folgende Vorlage wird|Folgende Vorlagen werden}} in diesem Abschnitt verwendet:",
        "template-protected": "(schreibgeschützt)",
        "template-semiprotected": "(schreibgeschützt für unangemeldete und neue Benutzer)",
-       "hiddencategories": "Diese Seite ist in {{PLURAL:$1|1 versteckter Kategorie|$1 versteckten Kategorien}} enthalten:",
+       "hiddencategories": "Diese Seite ist in {{PLURAL:$1|einer versteckten Kategorie|$1 versteckten Kategorien}} enthalten:",
        "edittools": "<!-- Dieser Text wird unter dem „Bearbeiten“-Formular sowie dem „Hochladen“-Formular angezeigt. -->",
        "nocreatetext": "Auf {{SITENAME}} wurde das Erstellen neuer Seiten eingeschränkt. Du kannst bestehende Seiten ändern oder dich [[Special:UserLogin|anmelden]].",
        "nocreate-loggedin": "Du hast nicht die erforderliche Berechtigung, um neue Seiten erstellen zu können.",
        "tooltip-watchlistedit-raw-submit": "Beobachtungsliste aktualisieren",
        "tooltip-recreate": "Seite neu erstellen, obwohl sie gelöscht wurde",
        "tooltip-upload": "Hochladen starten",
-       "tooltip-rollback": "Macht alle letzten Änderungen der Seite, die vom gleichen Benutzer vorgenommen worden sind, durch nur einen Klick rückgängig.",
+       "tooltip-rollback": "Macht alle letzten Änderungen der Seite, die vom selben Benutzer vorgenommen worden sind, durch nur einen Klick rückgängig.",
        "tooltip-undo": "Macht lediglich diese eine Änderung rückgängig und zeigt das Resultat in der Vorschau an, damit in der Zusammenfassungszeile eine Begründung angegeben werden kann.",
        "tooltip-preferences-save": "Einstellungen speichern",
        "tooltip-summary": "Gib eine kurze Zusammenfassung ein.",
        "passwordpolicies-policyflag-forcechange": "muss bei der Anmeldung geändert werden",
        "passwordpolicies-policyflag-suggestchangeonlogin": "Änderung bei der Anmeldung vorschlagen",
        "easydeflate-invaliddeflate": "Der angegebene Inhalt ist nicht ordnungsgemäß komprimiert",
-       "unprotected-js": "Aus Sicherheitsgründen kann JavaScript-Code nicht mehr von ungeschützten Seiten geladen werden. Erstelle die JavaScript-Seite bitte ausschließlich im Namensraum „MediaWiki“ oder als Benutzerunterseite."
+       "unprotected-js": "Aus Sicherheitsgründen kann JavaScript-Code nicht mehr von ungeschützten Seiten geladen werden. Erstelle die JavaScript-Seite bitte ausschließlich im Namensraum „MediaWiki“ oder als Benutzerunterseite.",
+       "userlogout-continue": "Falls du dich abmelden möchtest, [$1 fahre bitte auf der Abmeldeseite fort].",
+       "userlogout-sessionerror": "Abmeldung aufgrund eines Sitzungsfehlers fehlgeschlagen. Bitte [$1 erneut versuchen]."
 }
index 4653983..542c697 100644 (file)
        "viewpagelogs": "Qeydanê na pele bımocne",
        "nohistory": "Verorê vurnayışanê na perer çıni yo.",
        "currentrev": "Çımraviyarnayışo rocane",
-       "currentrev-asof": "$1 ra tepeya çım ra viyarnayışê cı'yo peyên",
+       "currentrev-asof": "Çımraviyarnayışê $1iyo peyên",
        "revisionasof": "Çımraviyarnayışê $1",
        "revision-info": "Vurnayışo ke $1 de terefê {{GENDER:$6|$2}}$7 ra biyo",
        "previousrevision": "← Çımraviyarnayışo kıhanêr",
        "rcfilters-savedqueries-add-new-title": "Eyarê parzûnê newcudi qeyd kerê",
        "rcfilters-restore-default-filters": "Parzûnê ke estê peyser biya",
        "rcfilters-clear-all-filters": "Parzûnan pêro pak kerê",
-       "rcfilters-show-new-changes": "Vurnayışanê neweyan bımocne",
+       "rcfilters-show-new-changes": "$1 ra nat vurnayışanê neweyan bımocne",
        "rcfilters-search-placeholder": "Vurnayışanê peyênan parzûn kerê (menuyi bıgurenê ya zi nameyê parzûni cıgeyrê)",
        "rcfilters-invalid-filter": "Parzûno nêravêrde",
        "rcfilters-empty-filter": "Parzûnê aktifi çıniyê. İştırakê cı pêro mocniyenê.",
        "listfiles-userdoesnotexist": "Hesabê karberi \"$1\" qeyd nêbiyo.",
        "imgfile": "dosya",
        "listfiles": "Lista Dosya",
-       "listfiles_thumb": "Resmo qıckek",
+       "listfiles_thumb": "Resımo qıckek",
        "listfiles_date": "Deme",
        "listfiles_name": "Name",
        "listfiles_user": "Karber",
        "filehist-revert": "Peyd bıgi",
        "filehist-current": "nıkayên",
        "filehist-datetime": "Tarix/Zeman",
-       "filehist-thumb": "Resmo qıckek",
+       "filehist-thumb": "Resımo qıckek",
        "filehist-thumbtext": "Thumbnail qe versiyonê $1",
        "filehist-nothumb": "Thumbnail çin o.",
        "filehist-user": "Karber",
        "ncategories": "$1 {{PLURAL:$1|Kategori|Kategoriy}}",
        "ninterwikis": "$1 {{PLURAL:$1|interwiki|interwikiy}}",
        "nlinks": "$1 {{PLURAL:$1|link|linkî}}",
-       "nmembers": "$1 {{PLURAL:$1|eza|ezayan}}",
+       "nmembers": "$1 {{PLURAL:$1|eza|ezayi}}",
        "nmemberschanged": "$1 → $2 {{PLURAL:$1|eza|ezayan}}",
        "nrevisions": "$1 {{PLURAL:$1|vurnayış|vurnayışi}}",
        "nimagelinks": "$1 {{PLURAL:$1|pele de|pelan de}} gureyeno",
        "pageinfo-hidden-categories": "{{PLURAL:$1|Kategoriya nımıtiye|Kategoriyê nımıtey}} ($1)",
        "pageinfo-templates": "{{PLURAL:$1|Şablono|Şablonê}} ke mocniyenê ($1)",
        "pageinfo-transclusions": "{{PLURAL:$1|1 Pele|$1 Pelan}} de bestiya pıra",
-       "pageinfo-toolboxlink": "Melumatê perre",
+       "pageinfo-toolboxlink": "Melumatê pele",
        "pageinfo-redirectsto": "Beno hetê",
        "pageinfo-redirectsto-info": "melumat",
        "pageinfo-contentpage": "Zey jû pela zerreki hesebiyena",
index 7e18af6..99de6b9 100644 (file)
        "tog-hidepatrolled": "Ɣla asitɔtrɔ siwo wowɔ la le tɔtrɔ yeyewo me",
        "tog-newpageshidepatrolled": "Ɣla axa siwo wowɔ tɔtrɔwo la le axa yeyewo me",
        "tog-hidecategorization": "Ɣla axawo mama ɖe hatsotsowo me",
-       "tog-extendwatchlist": "Keke tɔtrɔkpɔƒea ne nàkpɔ tɔtrɔwo katã, ke menye yeyetɔwo ko o",
+       "tog-extendwatchlist": "Keke Tɔtrɔkpɔƒe la ne nàkpɔ tɔtrɔwo katã, ke menye yeyetɔwo ko o",
        "tog-usenewrc": "Ƒo tɔtrɔwo nu ƒu le woƒe axawo nu le tɔtrɔ yeyewo kple tɔtrɔkpɔƒea",
        "tog-numberheadings": "Xexlẽdzesinana tanyawo",
        "tog-editondblclick": "Netrɔ asi le axawo ŋu ne wozi edzi zi eve",
        "tog-editsectiononrightclick": "Tiae be woate ŋu atrɔ akpa ne wozi eƒe tanyawo dzi",
-       "tog-watchcreations": "Tsɔ axa siwo gɔme medze kpakple axa siwo meda ɖe afisia la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
+       "tog-watchcreations": "Tsɔ axa siwo mewɔ kple nyatagba siwo meda ɖe nye tɔtrɔkpɔƒe",
        "tog-watchdefault": "Tsɔ axawo kpakple nutatawo siwo ŋu metrɔ asi le la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
        "tog-watchmoves": "Tsɔ  axawo kpakple nutatawo siwo ƒe nɔƒe meɖɔli la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
        "tog-watchdeletion": "Tsɔ  axawo kpakple nutatawo siwo metutu la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
-       "tog-watchuploads": "Da nyatakagba yeye siwo medana ɖi ɖe nye nukpɔƒe",
-       "tog-watchrollback": "Tsɔ axawo ɖɔlii tɔtrɔ siwo me mete fli ɖo le nye nukpɔƒea.",
+       "tog-watchuploads": "Da nyatakagba yeye siwo medana ɖi ɖe nye tɔtrɔkpɔƒe",
+       "tog-watchrollback": "Tsɔ axawo ɖɔlii tɔtrɔ siwo me mete fli ɖo le nye tɔtrɔkpɔƒea.",
        "tog-minordefault": "Nede dzesi tɔtrɔwo katã be wonye tɔtrɔ suewo ɣesiaɣi.",
        "tog-previewontop": "Aɖaka ƒe nɔnɔme nedze gbã hafi woatrɔ emenuwo",
        "tog-previewonfirst": "Eƒe nɔnɔme nedze ne wowɔ tɔtrɔ gbãtɔ",
-       "tog-enotifwatchlistpages": "Ɖo du nam ne axa aɖe alo nutata aɖe si ŋu nyeƒe ŋku le la trɔ",
+       "tog-enotifwatchlistpages": "Ɖo email ɖem ne axa alo nyatakagba siwo le tɔtrɔkpɔƒe la trɔ",
        "tog-enotifusertalkpages": "Ɖo Email ɖem ne nane trɔ le nye dzeɖoƒea",
        "tog-enotifminoredits": "Ɖo Email ɖem ne nu sue aɖe trɔ le nye axawo alo nyatagbawo hã ŋu",
        "tog-enotifrevealaddr": "Nye email adrɛs la nedze le nyanyanana ƒe emailwo me.",
        "tog-fancysig": "Bu asidenude abe wikinuŋɔŋlɔ ene (menye kadodo leɖokuisi o)",
        "tog-uselivepreview": "Vayiawo nedze evɔ megagbugbɔ axaawo ʋu o",
        "tog-forceeditsummary": "Na manya ne mele nuŋɔŋlɔʋuƒo gbɔlo ɖom ɖa",
-       "tog-watchlisthideown": "Nye tɔtrɔwo megadze le nukpɔƒea o",
+       "tog-watchlisthideown": "Nye tɔtrɔwo megadze le tɔtrɔkpɔƒe la o",
        "tog-watchlisthidebots": " Robot-tɔtrɔwo megadze le nukpɔƒea o",
-       "tog-watchlisthideminor": "Tɔtrɔ suewo megadze le nukpɔƒea o",
-       "tog-watchlisthideliu": "Ezãla siwo ge ɖe eme ƒe tɔtrɔwo megadze le nukpɔƒea o",
+       "tog-watchlisthideminor": "Tɔtrɔ suewo megadze le tɔtrɔkpɔƒe o",
+       "tog-watchlisthideliu": "Ezãla siwo ge ɖe eme ƒe tɔtrɔwo megadze le tɔtrɔkpɔƒe la o",
        "tog-watchlistreloadautomatically": "Nukpɔƒea neʋu le eɖokui si ne wotrɔ sranui aɖe (JavaSkript hã)",
        "tog-useeditwarning": "Na nyanyam ne mele asiɖem le axa si ŋu wome dzra tɔtrɔwo ɖo vɔ la o.",
        "underline-always": "Ɣesiaɣi",
        "underline-never": "Gbeɖe",
+       "editfont-style": "Trɔ akpa la ƒe nuŋlɔtsyã",
+       "editfont-sansserif": "Sans-serif nuŋlɔtsyã",
+       "editfont-serif": "Serif Nuŋlɔtsyã",
        "sunday": "Kwasiɖa",
        "monday": "Dzoɖa",
        "tuesday": "Braɖa",
        "about": "Eŋunya",
        "newwindow": "(eʋua fesre yeye)",
        "cancel": "Tasii",
+       "moredotdotdot": "Bubuwo",
+       "morenotlisted": "Anɔ eme be menye wo katãe nye esia o.",
        "mypage": "Axa",
        "mytalk": "Dzeɖoƒe",
        "anontalk": "Dzeɖoƒe",
        "returnto": "Trɔ yi $1.",
        "tagline": "Tso {{SITENAME}}",
        "help": "Kpekpeɖeŋu",
+       "help-mediawiki": "Kpekpeɖeŋu tso MediaWiki ŋu",
        "search": "Dii",
        "searchbutton": "Dii",
        "go": "Yi",
        "ok": "YOO",
        "retrievedfrom": "Woɖee tso \"$1\"",
        "youhavenewmessages": "$1 va ɖo ($2).",
+       "newmessageslinkplural": "{{PLURAL:$1|gbedeasiɖoɖa yeye|999=gbedeasiɖoɖa yeyewo}}",
        "youhavenewmessagesmulti": "Du yeyewo vaɖo na wò $1",
        "editsection": "trɔ asi le eŋu",
        "editold": "trɔ asi le eŋu",
        "thisisdeleted": "Kpɔ $1 alo woa gbugbɔ ɖe tsa͂tɔa ɖe go?",
        "viewdeleted": "Kpɔ $1?",
        "restorelink": "{{PLURAL:$1|ekpɔ tɔtrɔ ɖeka |ekpɔ tɔtrɔ $1}}",
+       "feedlinks": "Nukakala:",
+       "feed-invalid": "Nukakala ƒomevi sia mede o.",
+       "site-rss-feed": "RSS Nukakala $1",
        "site-atom-feed": "Atom nubiabia $1",
+       "page-atom-feed": "\"$1\" Atom Nukakala",
        "red-link-title": "$1 (womeŋlɔ axa sia haɖeke o)",
        "nstab-main": "Axa",
        "nstab-user": "Ezãla ƒe axa",
        "nosuchspecialpage": "Axa tɔxɛ sia meli o",
        "nospecialpagetext": "<strong>Èbia be neʋu axa tɔxɛ aɖe si meli o.</strong>\n\nÀte ŋu akpɔ axa tɔxɛ siwo li la le [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Kuxi",
+       "databaseerror-query": "Gbeɖeɖe: $1",
+       "databaseerror-function": "Dɔwɔɖoɖo: $1",
+       "databaseerror-error": "Kuxi: $1",
        "internalerror": "Ememekuxi",
        "internalerror_info": "Ememekuxi: $1",
        "internalerror-fatal-exception": "Kuxi sesẽ ƒomevi si nye \"$1\"",
        "createacct-email-ph": "Ŋlɔ wò email adrɛs",
        "createacct-submit": "Kpe wò ezazãŋkɔŋɔŋlɔ ɖo",
        "createacct-benefit-heading": "Ame siwo le abe wò ene koe trɔ asi le {{SITENAME}} la ŋu.",
-       "createacct-benefit-body1": "{{AGBƆSƆSƆTƆ:$1|edit|edits}}",
-       "createacct-benefit-body2": "{{AGBƆSƆSƆTƆ:$1|page|pages}}",
+       "createacct-benefit-body1": "{{PLURAL:$1|nugbugbɔŋlɔ|nugbugbɔŋlɔwo}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|axa|axawo}}",
        "createacct-benefit-body3": "yeyetɔ {{PLURAL:$1|contributor|contributors}}",
-       "loginsuccesstitle": "Ege ɖe eme azɔ̃.",
+       "loginsuccesstitle": "Ège ɖe eme.",
        "loginsuccess": "'''Ele {{SITENAME}} me fifia abe \"$1\" ene.'''",
        "nouserspecified": "Elebe na ŋlɔ wò dzesideŋkɔ",
-       "passwordtoolong": "Mɔʋunyawo mate ŋu adidi wu {{AGBƆSƆSƆ:$1|nuŋlɔdzesi 1|$1 nuŋlɔdzesiwo}}.",
-       "acct_creation_throttle_hit": "Wiki sia zãla aɖe tso wò ''IP address'' ŋlɔ {{PLURAL:$1|1 ŋkɔ|$1 ŋkɔwo}} le ŋkeke si vayi me xoxo. Mɔɖeɖe le na ŋkɔ  ɖeka ko ŋɔŋlɔ le ŋkeke ɖeka me.<br />\nLe esiata la, ''IP address'' sia zãlawo mekpɔ mɔ aŋlɔ ŋkɔ bubuwo fifia o.",
+       "passwordtoolong": "Mɔʋunyawo mate ŋu adidi wu {{PLURAL:nuŋlɔdzesi $1|nuŋlɔdzesi 1|nuŋlɔdzesi $1}}.",
+       "acct_creation_throttle_hit": "Wiki sia zãla siwo zã wò IP adrɛs la wɔ {{PLURAL:ŋkɔŋlɔɖi $1|ŋkɔŋlɔɖi 1|ŋkɔŋlɔɖi $1}} xoxo le ŋkeke $2 va yi me, esiae nye gbogbotɔ si woɖe mɔ be woawɔ le ɣeyiɣi ƒe didime ma me. Eya ta ame aɖeke magate ŋu azã IP adrɛs sia fifia aŋlɔ ŋkɔ ɖi o.",
+       "emailauthenticated": "Woɖo kpe wò email adrɛs la dzi le $2 le ga $3.",
        "loginlanguagelabel": "Gbe: $1",
        "pt-login": "Ge ɖe eme",
        "pt-login-button": "Ge Ɖe Eme",
        "pt-createaccount": "Kpe ezazãŋkɔŋɔŋlɔ ɖo",
        "pt-userlogout": "Do Le Eme",
+       "oldpassword": "Mɔʋunya xoxo:",
+       "newpassword": "Mɔʋunya yeye:",
+       "retypenew": "Gbugbɔ ŋlɔ mɔʋunyaa:",
+       "resetpass_submit": "Tia mɔʋunya eye nàge ɖe eme",
+       "changepassword-success": "Wò mɔʋunya la trɔ!",
+       "changepassword-throttled": "Ètee kpɔ be yeage ɖe eme hedo kpoe zi geɖe akpa le ɣeyiɣi kpui siawo me. Taflatsɛ lala $1 hafi nàgatee kpɔ.",
+       "botpasswords": "Mɔʋunya mɔ̀kpakpatɔwo",
+       "botpasswords-label-appid": "Ŋkɔ mɔ̀kpakpatɔ",
+       "botpasswords-label-create": "Wɔe",
+       "botpasswords-label-update": "Yeyetɔ Neɖɔlii",
+       "botpasswords-label-cancel": "Tasii",
+       "botpasswords-label-delete": "Tutui",
+       "botpasswords-label-resetpassword": "Trɔ mɔʋunyaa",
+       "resetpass-submit-loggedin": "Trɔ mɔʋunya",
+       "resetpass-submit-cancel": "Tasii",
+       "resetpass-wrong-oldpass": "Mɔʋunya si wona wò gbɔ alo wò mɔʋunya mede o.\n\nƉewohĩ ètrɔ wò mɔʋunya alo nèbia be woana bubu ye.",
+       "resetpass-recycled": "Taflatsɛ trɔ wò mɔʋunya wòato vovo na esi zãm nèle fifia.",
+       "resetpass-temp-emailed": "Èzã mɔʋunya si wona gbɔ la tsɔ le gegem ɖe eme.\nHafi nàte ŋu age ɖe eme keŋkeŋ la, ŋlɔ mɔʋunya yeye ɖe afi sia:",
        "passwordreset": "Trɔ mɔʋunyaa",
+       "passwordreset-username": "Ezazãŋkɔ:",
+       "passwordreset-domain": "Nuwɔƒe:",
+       "passwordreset-email": "Email adrɛs:",
+       "passwordreset-emailtitle": "Ŋkɔŋlɔɖi ŋuti nyatakaka le {{ƉƆTEƑEŊKƆ}}",
+       "passwordreset-invalidemail": "Email adrɛs la mede o",
+       "passwordreset-nodata": "Mèŋlɔ ezazãŋkɔ alo email adrɛs aɖeke o",
+       "changeemail": "Trɔ email adrɛs alo ɖee ɖa",
+       "changeemail-header": "Kpe nyatakaka sia ɖo ne èdi be yeatrɔ wò email adrɛs la. Ke ne èdi be yeaɖe email ɖe sia ɖe si le wò ŋkɔŋlɔɖia me ɖa la, ke gblẽ afi si woɖo be woaŋlɔ email yeye ɖo la ɖi ƒuƒlu ne èle nyatakaka sia ɖom ɖa.",
+       "changeemail-no-info": "Ele be nàge ɖe eme hafi ate ŋu aʋu axa sia tẽe.",
+       "changeemail-oldemail": "Email adrɛs fifitɔ:",
+       "changeemail-newemail": "Email adrɛs yeye:",
+       "changeemail-none": "(ɖeke o)",
+       "changeemail-password": "Wò {{SITENAME}} ƒe mɔʋunya:",
+       "changeemail-submit": "Trɔ email la",
+       "changeemail-throttled": "Ètee kpɔ be yeage ɖe eme hedo kpoe zi geɖe akpa le ɣeyiɣi kpui siawo me. Taflatsɛ lala $1 hafi nàgatee kpɔ.",
+       "changeemail-nochange": "Taflatsɛ ŋlɔ email adrɛs yeye.",
+       "resettokens-watchlist-token": "Ɖɔɖeɖɔdzi nukakala (Atom/RSS) ƒe mɔfiadzesi nyaŋui ƒe [[Special:Tɔtrɔkpɔƒe|tɔtrɔ siwo wowɔ le axa siwo le wò tɔtrɔkpɔƒe ŋu]]",
+       "bold_sample": "Nuŋɔŋlɔ toto",
+       "bold_tip": "Nuŋɔŋlɔ toto",
+       "italic_sample": "Nuŋɔŋlɔ biɖeŋgɔ",
+       "italic_tip": "Nuŋɔŋlɔ biɖeŋgɔ",
        "sig_tip": "Wò asidenute kple gaƒoƒoa",
        "subject": "Tanya:",
        "minoredit": "Esia nye tɔtrɔ sue aɖe ko",
        "preview": "Kpɔe do ŋgɔ",
        "showpreview": "Fiae do ŋgɔ",
        "showdiff": "Fia tɔtrɔawo",
+       "loginreqlink": "ge ɖe eme",
+       "loginreqpagetext": "Taflatsɛ $1 ne nàkpɔ axa bubuwo.",
        "newarticle": "(Yeye)",
        "newarticletext": "Eva ɖo axa si gɔme womedze haɖeke o. Ne Nedi be yeadze egɔme la, dze nuŋɔŋlɔ͂ ɖe go sia me le afii (kpɔ [$1 kpekpeɖeŋu nyawo] na kpekpeɖeŋu bubuwo). Ne meɖoe be yeava afisia hafi o la, ekema tia '''megbe''' eye nagbugbɔ ayi afisi netso va.",
-       "previewnote": "'''Ɖo ŋku edzi be wole afii fiam do ŋgɔ, wome dzrae ɖo haɖeke o!'''",
+       "previewnote": "<strong>Ɖo ŋkui be nua ƒe dzedzeme koe nye esia.</strong>\nWomekpɔ dzra tɔtrɔ siwo nèwɔ la ɖo haɖe o!",
        "editing": "$1 na etɔtrɔ",
        "editingsection": "Nele $1 (ƒe akpa aɖe) trɔm",
        "yourtext": "Wò nuŋɔŋlɔ",
        "templatesused": "wozã {{PLURAL:$1|Template|Templates}} le axa sia:",
        "permissionserrorstext-withaction": "Se meɖe mɔ bena na $2 o, le {{PLURAL:$1|ta|ta}}:",
        "edit-already-exists": "Mateŋu adze axa sia gɔme o.<br />\nWoli xoxo.",
+       "currentrev": "Asitɔtrɔ yeyetɔ",
        "currentrev-asof": "Asitɔtrɔ mamlea le $1 dzi",
        "revisionasof": "Tataa le $1",
-       "revision-info": "Tataa le $1 si $2 wɔ",
+       "revision-info": "Asitɔtrɔ si wowɔ le $1 eye ame si wɔe nye {{GENDER:$6|$2}}$7",
        "previousrevision": "← Tata xoxoa",
        "nextrevision": "Tata yeyea →",
        "currentrevisionlink": "Tata yeyetɔ",
        "page_first": "gbãtɔ",
        "page_last": "mamlɛ",
        "histlegend": "Titia vovo: de dzesi tata siwo ƒe vovototowo nedi be yea kpɔ ɖa, eye na tia 'enter' alo kpe si le eɖome.<br />\nGɔmeɖeɖe: '''({{int:cur}})''' = vovototo tso tata mamlea gbɔ, '''({{int:last}})''' = vovototo tso tata si do ŋgɔ gbɔ, '''{{int:minoreditletter}}''' = tɔtrɔ suɛ.",
-       "history-show-deleted": "Esiwo wotutu ɖa ko",
-       "histfirst": "Xoxoɔwu",
-       "histlast": "Yeyeɛwu",
+       "history-fieldset-title": "Sra asitɔtrɔawo me",
+       "history-show-deleted": "Asitɔtrɔ siwo wotutu ko",
+       "histfirst": "Xoxotɔ",
+       "histlast": "Yeyetɔ",
+       "historysize": "({{PLURAL:$1|bite 1|bite $1}})",
+       "historyempty": "ƒuƒlu",
+       "history-feed-title": "Asitɔtrɔ vayiawo",
+       "history-feed-description": "Wiki ƒe axa sia ƒe asitɔtrɔ vayiawo",
        "history-feed-item-nocomment": "$1 le $2",
        "history-feed-empty": "Axa si dim nele meli o.\nDewomahĩ, wotutui ɖa le wiki sia dzi alo wotrɔ eƒe ŋkɔ.\nZã [[Special:Search|nuwo didi le wiki sia dzi]] kpɔ na axa yeyeawo.",
        "rev-delundel": "fia/ɣla",
        "rev-showdeleted": "fia",
        "revdelete-radio-same": "(megatrɔe o)",
-       "revdelete-radio-set": "Yo",
-       "revdelete-radio-unset": "Kpao",
-       "history-title": "\"$1\" ƒe tata xoxoawo",
+       "revdelete-radio-set": "Ɣaɣla",
+       "revdelete-radio-unset": "Dzedze",
+       "history-title": "Asitɔtrɔ vayi si wowɔ le \"$1\"",
        "difference-title": "Vovototo siwo le numetoto \"$1\" me",
        "lineno": "Fli $1:",
        "compareselectedversions": "Tsɔ esiwo netia la tsɔ kpli wonɔewo",
        "searchall": "wo katã",
        "powersearch-toggleall": "Wo katã",
        "preferences": "Didiwo",
-       "mypreferences": "Nyeƒe didiwo",
+       "mypreferences": "Tiatiawɔƒe",
        "skin-preview": "Kpɔe do ŋgɔ",
-       "prefs-watchlist-days-max": "Maximum $1 {{PLURAL:$1|day|days}}",
+       "prefs-watchlist-days-max": "{{PLURAL:$1|Ŋkeke|Ŋkeke}} agbɔsɔsɔ gbogbotɔe nye $1",
+       "prefs-misc": "Nu Kpotokpotoewo",
+       "prefs-resetpass": "Trɔ mɔʋunyaa",
        "timezoneregion-africa": "Afrika",
+       "timezoneregion-america": "Amerika",
+       "timezoneregion-antarctica": "Antarktika",
+       "timezoneregion-arctic": "Arctik",
+       "timezoneregion-asia": "Asia",
+       "timezoneregion-atlantic": "Atlantik-ƒu",
+       "timezoneregion-australia": "Australia",
+       "timezoneregion-europe": "Europa",
+       "timezoneregion-indian": "India-ƒu",
+       "timezoneregion-pacific": "Pasifik-ƒu",
        "yourlanguage": "Gbe:",
        "yournick": "Dzesi",
        "gender-male": "Ŋutsu",
index f8acd19..83f1d72 100644 (file)
        "accmailtext": "Ένας τυχαία παρηγμένος κωδικός για {{GENDER:$1|τον|την}} [[User talk:$1|$1]] έχει σταλεί στο $2.\n\nΜπορεί να αλλαχθεί από την σελίδα ''[[Special:ChangePassword|αλλαγή κωδικού]]'' μετά τη σύνδεση.",
        "newarticle": "(Νέο)",
        "newarticletext": "Ακολουθήσατε ένα σύνδεσμο προς μια σελίδα που δεν υπάρχει ακόμα. \nΓια να δημιουργήσετε τη σελίδα, αρχίστε να πληκτρολογείτε στο παρακάτω πλαίσιο (δείτε τη [$1 σελίδα βοήθειας] για περισσότερες πληροφορίες).\nΑν έχετε βρεθεί εδώ κατά λάθος, πατήστε το κουμπί '''πίσω''' στον περιηγητή σας.",
-       "anontalkpagetext": "----''Αυτή η σελίδα συζήτησης προορίζεται για ανώνυμο χρήστη που δεν έχει δημιουργήσει ακόμα λογαριασμό ή που δεν τον χρησιμοποιεί. Έτσι για την ταυτοποίηση ενός ανώνυμου χρήστη χρησιμοποιείται η διεύθυνση IP του. Είναι όμως πιθανόν η διεύθυνση αυτή να είναι κοινή για πολλούς διαφορετικούς χρήστες.  Αν είστε ανώνυμος χρήστης και νομίζετε ότι άσχετα σχόλια απευθύνθηκαν σε σας, παρακαλούμε να [[Special:CreateAccount|δημιουργήσετε ένα λογαριασμό]] ή να  [[Special:UserLogin|συνδεθείτε]] για να αποφεύγεται η μελλοντική σύγχυση με άλλους ανώνυμους χρήστες.''",
+       "anontalkpagetext": "----''Αυτή η σελίδα συζήτησης προορίζεται για ανώνυμο χρήστη που δεν έχει δημιουργήσει ακόμα λογαριασμό ή που δεν τον χρησιμοποιεί. Έτσι για την ταυτοποίηση ενός ανώνυμου χρήστη χρησιμοποιείται η διεύθυνση IP τους. Είναι όμως πιθανόν η διεύθυνση αυτή να είναι κοινή για πολλούς διαφορετικούς χρήστες.  Αν είστε ανώνυμος χρήστης και νομίζετε ότι άσχετα σχόλια απευθύνθηκαν σε σας, παρακαλούμε να [[Special:CreateAccount|δημιουργήσετε ένα λογαριασμό]] ή να  [[Special:UserLogin|συνδεθείτε]] για να αποφεύγεται η μελλοντική σύγχυση με άλλους ανώνυμους χρήστες.''",
        "noarticletext": "Δεν υπάρχει προς το παρόν κείμενο σε αυτή τη σελίδα. \nΜπορείτε να [[Special:Search/{{PAGENAME}}|αναζητήσετε αυτόν τον τίτλο σελίδας]] σε άλλες σελίδες,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} να αναζητήσετε τις σχετικές καταγραφές],\nή να [{{fullurl:{{FULLPAGENAME}}|action=edit}} δημιουργήσετε αυτή τη σελίδα]</span>.",
        "noarticletext-nopermission": "Δεν υπάρχει προς το παρόν κείμενο σε αυτή τη σελίδα.\nΜπορείτε να [[Special:Search/{{PAGENAME}}|αναζητήσετε αυτόν τον τίτλο σελίδας]] σε άλλες σελίδες, ή <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} να ψάξετε στις σχετικές καταγραφές]</span>, αλλά δεν έχετε την άδεια να δημιουργήσετε αυτή τη σελίδα.",
        "missing-revision": "Δεν υπάρχει αναθεώρηση με αριθμό $1 για τη σελίδα με όνομα «{{FULLPAGENAME}}».\n\nΑυτό συνήθως προκαλείται από παλιό σύνδεσμο ιστορικού προς σελίδα που έχει διαγραφεί.\nΛεπτομέρειες θα βρείτε στο [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} ημερολόγιο καταγραφής διαγραφών].",
        "page_first": "πρώτη",
        "page_last": "τελευταία",
        "histlegend": "Επιλογή διαφορών: Μαρκάρετε τα κουτάκια επιλογής των εκδόσεων που θέλετε να συγκρίνετε και πατήστε το enter ή το κουμπί στο κάτω μέρος.<br />\nΥπόμνημα: '''({{int:cur}})''' = διαφορά από την τελευταία έκδοση, '''({{int:last}})''' = διαφορά από την προηγούμενη έκδοση, '''{{int:minoreditletter}}''' = μικροαλλαγή.",
-       "history-fieldset-title": "ΠεÏ\81ιήγηÏ\83η Ï\83Ï\84ο Î¹Ï\83Ï\84οÏ\81ικÏ\8c αλλαγών",
+       "history-fieldset-title": "ΦιλÏ\84Ï\81άÏ\81ιÏ\83μα αλλαγών",
        "history-show-deleted": "Διαγεγραμμένες μόνο",
        "histfirst": "η πιο παλιά",
        "histlast": "η πιο πρόσφατη",
        "revertpage": "Ανάκληση των αλλαγών [[Special:Contributions/$2|$2]] ([[User talk:$2|συζήτηση]]) επιστροφή στην προηγούμενη αναθεώρηση [[User:$1|$1]]",
        "revertpage-nouser": "Αναστράφηκαν οι επεξεργασίες από τον (όνομα χρήστη αφαιρέθηκε) στη τελευταία έκδοση από τον/την {{GENDER:$1|[[User:$1|$1]]}}φ",
        "rollback-success": "Αναστροφή επεξεργασιών από {{GENDER:$3|τον|την}} $1, επιστροφή στην προηγούμενη έκδοση από {{GENDER:$4|τον|την}} $2.",
-       "sessionfailure-title": "Î\97 Ï\83Ï\85νεδÏ\81ία Î±Ï\80έÏ\84Ï\85Ï\87ε",
-       "sessionfailure": "Î¥Ï\80άÏ\81Ï\87ει Ï\80Ï\81Ï\8cβλημα Î¼Îµ Ï\84η Ï\83Ï\8dνδεÏ\83ή Ï\83αÏ\82 -η ÎµÎ½Î­Ï\81γεια Î±Ï\85Ï\84ή Î±ÎºÏ\85Ï\81Ï\8eθηκε Ï\80Ï\81οληÏ\80Ï\84ικά Î³Î¹Î± Ï\84ην Î±Î½Ï\84ιμεÏ\84Ï\8eÏ\80ιÏ\83η Ï\84Ï\85Ï\87Ï\8cν Ï\80ειÏ\81αÏ\84είαÏ\82 Ï\83Ï\85νÏ\8cδοÏ\85 (session hijacking). Î Î±Ï\81ακαλoÏ\8dμε Ï\80αÏ\84ήÏ\83Ï\84ε \"Î\95Ï\80ιÏ\83Ï\84Ï\81οÏ\86ή\", Î¾Î±Î½Î±Ï\86οÏ\81Ï\84Ï\8eÏ\83Ï\84ε Ï\84η Ï\83ελίδα Î±Ï\80Ï\8c Ï\84ην Î¿Ï\80οία Ï\86θάÏ\83αÏ\84ε ÎµÎ´Ï\8e ÎºÎ±Î¹ Ï\80Ï\81οÏ\83Ï\80αθήÏ\83Ï\84ε Î¾Î±Î½Î¬.",
+       "sessionfailure-title": "Î\91Ï\80οÏ\84Ï\85Ï\87ία Ï\80εÏ\81ιÏ\8cδοÏ\85 Ï\83Ï\8dνδεÏ\83ηÏ\82",
+       "sessionfailure": "ΦαίνεÏ\84αι Ï\8cÏ\84ι Ï\85Ï\80άÏ\81Ï\87ει ÎºÎ¬Ï\80οιο Ï\80Ï\81Ï\8cβλημα Î¼Îµ Ï\84ην Ï\80εÏ\81ίοδο Ï\83Ï\8dνδεÏ\83ήÏ\82 Ï\83αÏ\82.\nÎ\91Ï\85Ï\84ή Î· ÎµÎ½Î­Ï\81γεια Î±ÎºÏ\85Ï\81Ï\8eθηκε Ï\89Ï\82 Ï\80Ï\81οÏ\86Ï\8dλαξη Î³Î¹Î± Ï\84ην Î±Î½Ï\84ιμεÏ\84Ï\8eÏ\80ιÏ\83η Ï\84Ï\85Ï\87Ï\8cν Ï\83Ï\86εÏ\84εÏ\81ιÏ\83μοÏ\8d Ï\84ηÏ\82 Ï\80εÏ\81ιÏ\8cδοÏ\85 Ï\83Ï\8dνδεÏ\83ηÏ\82 Î±Ï\80Ï\8c ÎºÎ¬Ï\80οιον Ï\84Ï\81ίÏ\84ο (session hijacking).\nΠαÏ\81ακαλοÏ\8dμε Ï\85Ï\80οβάλεÏ\84ε Î¾Î±Î½Î¬ Ï\84η Ï\86Ï\8cÏ\81μα.",
        "changecontentmodel": "Αλλαγή μοντέλου περιεχομένου της σελίδας",
        "changecontentmodel-legend": "Μοντέλο περιεχομένου σελίδας",
        "changecontentmodel-title-label": "Τίτλος σελίδας",
        "expand_templates_generate_xml": "Εμφάνιση δέντρου συντακτικής ανάλυσης XML",
        "expand_templates_generate_rawhtml": "Εμφάνιση ανεπεξέργαστης HTML",
        "expand_templates_preview": "Προεπισκόπηση",
-       "expand_templates_preview_fail_html": "<em>Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML και υπήρξε μια απώλεια των δεδομένων συνόδου, η προεπισκόπηση είναι κρυμμένη ως ένα προληπτικό μέτρο κατά επιθέσεων JavaScript.</em>\n\n<strong>Αν αυτή είναι μια θεμιτή προσπάθεια προεπισκόπησης, παρακαλούμε δοκιμάστε ξανά.</strong>\nΑν εξακολουθεί να μην λειτουργεί, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε ξανά και βεβαιωθείτε ότι το πρόγραμμα περιήγησής σας επιτρέπει cookies από αυτόν τον ιστότοπο.",
+       "expand_templates_preview_fail_html": "<em>Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML και υπήρξε μια απώλεια δεδομένων της περιόδου σύνδεσης, η προεπισκόπηση είναι κρυμμένη ως προληπτικό μέτρο κατά επιθέσεων JavaScript.</em>\n\n<strong>Αν αυτή είναι μια θεμιτή απόπειρα προεπισκόπησης, παρακαλούμε δοκιμάστε ξανά.</strong>\nΑν εξακολουθεί να μην λειτουργεί, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε ξανά και βεβαιωθείτε ότι το πρόγραμμα περιήγησής σας επιτρέπει cookies από αυτόν τον ιστότοπο.",
        "expand_templates_preview_fail_html_anon": "<em>Επειδή το {{SITENAME}} έχει ενεργοποιημένη raw HTML και δεν είστε συνδεδεμένοι, η προεπισκόπηση είναι κρυμμένη ως ένα προληπτικό μέτρο ενάντια σε επιθέσεις JavaScript.</em>\n\n<strong>Αν αυτό είναι δικαιολογημένη απόπειρα προεπισκόπησης, παρακαλούμε να [[Special:UserLogin|συνδεθείτε]] και δοκιμάστε πάλι.</strong>",
        "pagelanguage": "Αλλαγή γλώσσας σελίδας",
        "pagelang-name": "Σελίδα",
        "mw-widgets-titlesmultiselect-placeholder": "Προσθήκη περισσότερων...",
        "date-range-from": "Από ημερομηνία:",
        "date-range-to": "Έως ημερομηνία:",
-       "sessionprovider-generic": "$1 συνεδρίες",
-       "sessionprovider-mediawiki-session-cookiesessionprovider": "Ï\83Ï\85νεδÏ\81ίεÏ\82 Î¼Îµ Î²Î¬Ï\83η Ï\84α cookies",
+       "sessionprovider-generic": "Περίοδοι σύνδεσης $1",
+       "sessionprovider-mediawiki-session-cookiesessionprovider": "Ï\80εÏ\81ίοδοι Ï\83Ï\8dνδεÏ\83ηÏ\82 Î²Î±Ï\83ιÏ\83μένεÏ\82 Ï\83ε cookies",
        "sessionprovider-nocookies": "Τα Cookies μπορούν να απενεργοποιηθούν. Βεβαιωθείτε ότι έχετε ενεργοποιημένα τα cookies και ξεκινήστε πάλι.",
        "randomrootpage": "Τυχαία κύρια σελίδα",
        "log-action-filter-block": "Τύπος φραγής:",
index 21a3ef0..1a6b65b 100644 (file)
@@ -55,7 +55,8 @@
                        "Joao Xavier",
                        "Surfo",
                        "YvesNevelsteen",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "Mirin"
                ]
        },
        "tog-underline": "Substrekado de ligiloj:",
        "histfirst": "plej malnova",
        "histlast": "plej nova",
        "historysize": "({{PLURAL:$1|1 bajto|$1 bajtoj}})",
-       "historyempty": "(malplena)",
+       "historyempty": "malplena",
        "history-feed-title": "Historio de redaktoj",
        "history-feed-description": "Revizia historio por ĉi tiu paĝo en la vikio",
        "history-feed-item-nocomment": "$1 ĉe $2",
        "rcfilters-watchlist-markseen-button": "Marku ĉiujn ŝanĝojn viditaj",
        "rcfilters-watchlist-edit-watchlist-button": "Redakti vian atentaron",
        "rcfilters-watchlist-showupdated": "Ŝanĝoj en paĝoj, kiujn vi ne vizitis post la ŝanĝo, aperas <strong>grase</strong>, kun plenigitaj buletoj.",
+       "rcfilters-watchlist-preference-label": "Uzi fasadon ne uzantan JavaScript",
        "rcfilters-target-page-placeholder": "Enigu nomon de paĝo (aŭ kategorio)",
        "rcnotefrom": "Malsupre estas la {{PLURAL:$5|ŝanĝo|ŝanĝoj}} ekde <strong>$3, $4</strong> (montrante ĝis <strong>$1</strong>).",
        "rclistfrom": "Montri novajn ŝanĝojn ekde \"$3 $2\"",
        "uploadstash-thumbnail": "Vidi bildeton",
        "uploadstash-exception": "Ne eblas alŝuti en kaŝkonservejon ($1): \"$2\".",
        "uploadstash-bad-path-unrecognized-thumb-name": "Nerekonita miniatura nomo.",
+       "uploadstash-zero-length": "Longo de dosiero estas nul.",
        "invalid-chunk-offset": "Malvalida deŝovo de dosierpeco",
        "img-auth-accessdenied": "Atingo malpermisita",
        "img-auth-nopathinfo": "Mankas informo pri vojo.\nVia servilo estu agordita por sendi la variablojn REQUEST_URI kaj/aŭ PATH_INFO.\nSe ĝi jam estas, provu aktivigon de $wgUsePathInfo.\nVidu https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "speciallogtitlelabel": "Celo (titolo aŭ  {{ns:user}}:salutnomo por uzanto):",
        "log": "Protokoloj",
        "logeventslist-submit": "Montri",
+       "logeventslist-tag-log": "Protokolo de etikedoj",
        "all-logs-page": "Ĉiuj publikaj protokoloj",
        "alllogstext": "Suma kompilaĵo de ĉiuj protokoloj de {{SITENAME}}.\nVi povas plistrikti la mendon per selektado de protokola speco, la salutnomo (inkluzivante uskladon) aŭ la efika paĝo (ankaŭ inkluzivas uskladon).",
        "logempty": "Neniaj artikoloj en la protokolo.",
        "deleteprotected": "Vi ne povas forigi ĉi tiun paĝon ĉar ĝi estis protektita.",
        "deleting-backlinks-warning": "<strong>Atentigo:</strong>\n[[Special:WhatLinksHere/{{FULLPAGENAME}}|Aliaj paĝoj]] ligas al aŭ transkludas tiun ĉi forigotan paĝon.",
        "rollback": "Restarigi antaŭan redakton",
+       "rollback-confirmation-confirm": "Bonvolu konfirmi:",
+       "rollback-confirmation-yes": "Amasmalfari",
+       "rollback-confirmation-no": "Nuligi",
        "rollbacklink": "malfari",
        "rollbacklinkcount": "nuligi $1 {{PLURAL:$1|redakton|redaktojn}}",
        "rollbacklinkcount-morethan": "nuligi pli ol $1 {{PLURAL:$1|redakton|redaktojn}}",
        "ipb-sitewide": "Tutreteja",
        "ipb-partial": "Parta",
        "ipb-pages-label": "Paĝoj",
+       "ipb-namespaces-label": "Nomspacoj",
        "badipaddress": "Neniu uzanto, aŭ la IP-adreso estas misformita.",
        "blockipsuccesssub": "Forbaro sukcesis.",
        "blockipsuccesstext": "[[Special:Contributions/$1|$1]] estas forbarita. <br />\nVidu la [[Special:BlockList|liston de forbaroj]] por kontroli.",
        "ipb-blocklist-contribs": "Kontribuoj de {{GENDER:$1|$1}}",
        "ipb-blocklist-duration-left": "$1 restas",
        "block-expiry": "Blokdaŭro",
+       "block-prevent-edit": "Redaktado",
+       "block-reason": "Kialo:",
        "unblockip": "Malforbari IP-adreson/nomon",
        "unblockiptext": "Per la jena formulo vi povas repovigi al iu\nforbarita IP-adreso/nomo la povon enskribi en la vikio.",
        "ipusubmit": "Forigi ĉi tiun forbaron",
        "blocklist-userblocks": "Kaŝi konto-forbarojn",
        "blocklist-tempblocks": "Kaŝi provizorajn forbarojn",
        "blocklist-addressblocks": "Kaŝi unuopajn IP-adresajn forbarojn",
+       "blocklist-type": "Tipo:",
        "blocklist-rangeblocks": "Kaŝi blokojn de intervalo",
        "blocklist-timestamp": "Tempindiko",
        "blocklist-target": "Celo",
        "pageinfo-display-title": "Montrita titolo",
        "pageinfo-default-sort": "Pravaloro de ordiga ŝlosilo",
        "pageinfo-length": "Paĝgrandeco (en bajtoj)",
+       "pageinfo-namespace": "Nomspaco",
        "pageinfo-article-id": "Paĝa identigo",
        "pageinfo-language": "Lingvo de paĝa enhavo",
        "pageinfo-language-change": "ŝanĝi",
        "confirm-unwatch-top": "Ĉu forigi tiun ĉi paĝon el via atentaro?",
        "confirm-rollback-button": "Bone",
        "confirm-rollback-top": "Malfaru redaktojn al ĉi tiu paĝo?",
+       "confirm-mcrundo-title": "Malfari ŝanĝon",
+       "mcrundofailed": "Malfaro malsukcesis",
        "quotation-marks": "„$1“",
        "imgmultipageprev": "← antaŭa paĝo",
        "imgmultipagenext": "sekva paĝo →",
        "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Etikedo|Etikedoj}}]]: $2",
        "tag-mw-contentmodelchange": "ŝanĝo de enhavomodelo",
        "tag-mw-contentmodelchange-description": "Redaktoj kiuj [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel ŝanĝas la enhavmodelon] de paĝo",
+       "tag-mw-undo": "Malfari",
        "tags-title": "Etikedoj",
        "tags-intro": "Ĉi tiu paĝo montras la etikedojn kun kiuj la programaro markus redakton, kaj iliaj signifoj.",
        "tags-tag": "Etikeda nomo",
        "compare-title-not-exists": "La titolo kiun vi specifis ne ekzistas.",
        "compare-revision-not-exists": "La revizio kiun vi specifis ne ekzistas.",
        "diff-form": "Malsamoj",
+       "diff-form-submit": "Montri diferencojn",
        "permanentlink": "Konstanta ligilo",
+       "permanentlink-revid": "Identigilo de revizio",
+       "permanentlink-submit": "Iri al revizio",
        "dberr-problems": "Bedaŭrinde, ĉi tiu retejo suferas pro teknikaj problemoj.",
        "dberr-again": "Bonvolu atendi kelkajn minutojn kaj reŝargi.",
        "dberr-info": "(Ne eblas konekti la datumbazon: $1)",
        "special-characters-group-thai": "Taja",
        "special-characters-group-lao": "laŭa",
        "special-characters-group-khmer": "kmera",
+       "special-characters-group-canadianaboriginal": "Kanada Indiĝena",
        "special-characters-title-endash": "mallonga streketo",
        "special-characters-title-emdash": "longa streketo",
        "special-characters-title-minus": "minus-signo",
        "mw-widgets-categoryselector-add-category-placeholder": "Aldoni kategorion",
        "mw-widgets-usersmultiselect-placeholder": "Aldoni pliajn...",
        "mw-widgets-titlesmultiselect-placeholder": "Aldoni pliajn...",
+       "date-range-from": "De dato:",
+       "date-range-to": "Ĝis dato:",
        "sessionmanager-tie": "Kombini diversajn tipojn de ensaluta peto ne estas permisita: $1.",
        "sessionprovider-generic": "$1 seancoj",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "kuketaj seancoj",
        "log-action-filter-suppress-reblock": "Forigi uzanton per reforbari",
        "log-action-filter-upload-upload": "Novalŝuta",
        "log-action-filter-upload-overwrite": "Realŝuta",
+       "log-action-filter-upload-revert": "Restarigi",
        "authmanager-authn-not-in-progress": "Aŭtentigado ne estas progresanta aŭ la seancaj datumoj perdiĝis. Bonvolu provi denove ekde la komenco.",
        "authmanager-authn-no-primary": "La provizita legitimaĵo ne povus esti aŭtentikigita.",
        "authmanager-authn-no-local-user": "La provizitaj legitimaĵoj ne estas asociitaj kun ajna uzanto de ĉi tiu vikio.",
        "revid": "revizio $1",
        "pageid": "Identigilo de paĝo $1",
        "pagedata-title": "Paĝaj datumoj",
+       "pagedata-bad-title": "Nevalida titolo: \"$1\".",
+       "passwordpolicies": "Reguloj pri pasvortoj",
        "passwordpolicies-group": "Grupo",
        "passwordpolicies-policies": "Politiko",
        "passwordpolicies-policy-minimalpasswordlength": "Pasvortoj devas esti longaj almenaŭ  $1 {{PLURAL:$1|1 signon|$1 signojn}}.",
index a8515a9..249af1c 100644 (file)
        "category_header": "Leheküljed kategoorias \"$1\"",
        "subcategories": "Alamkategooriad",
        "category-media-header": "Failid kategoorias \"$1\"",
-       "category-empty": "<em>Selles kategoorias pole praegu ühtegi lehekülge ega meediafaili.</em>",
+       "category-empty": "<em>Selles kategoorias pole praegu ühtegi lehekülge ega faili.</em>",
        "hidden-categories": "{{PLURAL:$1|Peidetud kategooria|Peidetud kategooriad}}",
        "hidden-category-category": "Peidetud kategooriad",
        "category-subcat-count": "{{PLURAL:$2|Selles kategoorias on ainult järgmine alamkategooria.|{{PLURAL:$1|Järgmine alamkategooria|Järgmised $1 alamkategooriat}} on selles kategoorias (kokku $2).}}",
        "sort-ascending": "Järjesta tõusvalt",
        "nstab-main": "Artikkel",
        "nstab-user": "Kasutaja leht",
-       "nstab-media": "Meedialeht",
+       "nstab-media": "Meediumileht",
        "nstab-special": "Eri",
        "nstab-project": "Projektileht",
        "nstab-image": "Fail",
        "page_first": "esimene",
        "page_last": "viimane",
        "histlegend": "Märgi versioonid, mida tahad võrrelda ja vajuta võrdlemisnupule.\nLegend: (viim) = erinevused võrreldes viimase redaktsiooniga,\n(eel) = erinevused võrreldes eelmise redaktsiooniga, P = pisimuudatus",
-       "history-fieldset-title": "Redaktsioonide otsimine",
+       "history-fieldset-title": "Redaktsioonide filtreerimine",
        "history-show-deleted": "Üksnes kustutatud redaktsioonid",
        "histfirst": "vanimad",
        "histlast": "uusimad",
        "historysize": "({{PLURAL:$1|1 bait|$1 baiti}})",
-       "historyempty": "(tühi)",
+       "historyempty": "tühi",
        "history-feed-title": "Redigeerimiste ajalugu",
        "history-feed-description": "Selle lehekülje redigeerimiste ajalugu",
        "history-feed-item-nocomment": "$1 – $2",
        "right-reupload-own": "Üle kirjutada enda üles laaditud faile",
        "right-reupload-shared": "Asendada kohalikus vikis jagatud failivaramu faile",
        "right-upload_by_url": "Faile internetiaadressilt üles laadida",
-       "right-purge": "Tühjendada lehekülje vahemälu kinnituseta",
+       "right-purge": "Tühjendada lehekülje vahemälu",
        "right-autoconfirmed": "Hoiduda IP-aadressi põhistest piirangumääradest",
-       "right-bot": "Olla koheldud kui automaadistatud toimimisviis",
-       "right-nominornewtalk": "Teha arutelulehekülgedel pisimuudatusi, ilma et lehekülg märgitaks uuena",
+       "right-bot": "Olla käsitatud automaatse protsessina",
+       "right-nominornewtalk": "Teha arutelulehekülgedel pisimuudatusi ilma uue sõnumi teadet esile kutsumata",
        "right-apihighlimits": "Kasutada API-päringutes kõrgemaid limiite",
        "right-writeapi": "Kasutada kirjutamise rakendusliidest",
        "right-delete": "Lehekülgi kustutada",
-       "right-bigdelete": "Pikkade ajalugudega lehekülgi kustutada",
+       "right-bigdelete": "Kustutada suure ajalooga lehekülgi",
        "right-deletelogentry": "Kustutada ja taastada logisissekandeid",
        "right-deleterevision": "Kustutada ja taastada lehekülgede teatud redaktsioone",
        "right-deletedhistory": "Vaadata kustutatud ajalookirjeid ilma seotud tekstita",
        "right-editsitecss": "Redigeerida saidiülest CSS-i",
        "right-editsitejson": "Redigeerida saidiülest JSON-i",
        "right-editsitejs": "Redigeerida saidiülest JavaScripti",
-       "right-editmyusercss": "Redigeerida oma CSS-kasutajafaile",
-       "right-editmyuserjson": "Redigeerida oma JSON-kasutajafaile",
-       "right-editmyuserjs": "Redigeerida oma JavaScript-kasutajafaile",
+       "right-editmyusercss": "Redigeerida enda CSS-faile",
+       "right-editmyuserjson": "Redigeerida enda JSON-faile",
+       "right-editmyuserjs": "Redigeerida enda JS-faile",
        "right-viewmywatchlist": "Vaadata oma jälgimisloendit",
        "right-editmywatchlist": "Redigeerida oma jälgimisloendit. Pane tähele, et mõne toiminguga lisatakse lehekülgi siiski ka ilma selle õiguseta.",
        "right-viewmyprivateinfo": "Vaadata oma eraandmeid (nt e-posti aadress, pärisnimi)",
        "action-changetags": "käsitsi rakendatavaid märgiseid üksikute redaktsioonide ega logisissekannete juures lisada ega eemaldada",
        "action-deletechangetags": "märgiseid andmebaasist kustutada",
        "action-purge": "lehekülje vahemälu tühjendada",
+       "action-apihighlimits": "API-päringutes kõrgemaid limiite kasutada",
+       "action-autoconfirmed": "IP-aadressi põhistest piirangumääradest hoiduda",
+       "action-bigdelete": "suurte ajalugudega lehekülgi kustutada",
+       "action-blockemail": "kasutajal e-kirjade saatmist keelata",
+       "action-bot": "olla käsitatud automaatse protsessina",
+       "action-editprotected": "redigeerida lehekülgi kaitsetasemega \"{{int:protect-level-sysop}}\"",
+       "action-editsemiprotected": "redigeerida lehekülgi kaitsetasemega \"{{int:protect-level-autoconfirmed}}\"",
+       "action-editinterface": "kasutajaliidest redigeerida",
+       "action-editusercss": "redigeerida teiste kasutajate CSS-faile",
+       "action-edituserjson": "redigeerida teiste kasutajate JSON-faile",
+       "action-edituserjs": "redigeerida teiste kasutajate JS-faile",
+       "action-editsitecss": "redigeerida saidiülest CSS-i",
+       "action-editsitejson": "redigeerida saidiülest JSON-i",
+       "action-editsitejs": "redigeerida saidiülest JavaScripti",
+       "action-editmyusercss": "redigeerida enda CSS-faile",
+       "action-editmyuserjson": "redigeerida enda JSON-faile",
+       "action-editmyuserjs": "redigeerida enda JS-faile",
+       "action-viewsuppressed": "vaadata kõigi kasutajate eest varjatud redaktsioone",
+       "action-hideuser": "blokeerida kasutajanime, peites selle avalikkuse eest",
+       "action-ipblock-exempt": "mööduda automaatsetest blokeeringutest ning aadressivahemiku- ja IP-blokeeringutest",
+       "action-unblockself": "eemaldada enda blokeeringut",
+       "action-noratelimit": "hoiduda piirangumääradest",
+       "action-reupload-own": "enda üles laaditud faile üle kirjutada",
+       "action-nominornewtalk": "teha arutelulehekülgedel pisimuudatusi ilma uue sõnumi teadet esile kutsumata",
+       "action-markbotedits": "märkida muudatuse tühistamist robotimuudatuseks",
+       "action-patrolmarks": "vaadata viimaste muudatuste kontrollimise märkeid",
+       "action-override-export-depth": "eksportida lehekülgi, kaasates viidatud leheküljed kuni viienda tasemeni",
+       "action-suppressredirect": "ümbersuunamist loomata lehekülgi teisaldada",
        "nchanges": "$1 {{PLURAL:$1|muudatus|muudatust}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|viimase vaatamise järel}}",
        "enhancedrc-history": "ajalugu",
        "rcfilters-savedqueries-already-saved": "Need filtrid on juba salvestatud. Muuda sätteid, et koostada uus salvestatud filter.",
        "rcfilters-restore-default-filters": "Taasta vaikefiltrid",
        "rcfilters-clear-all-filters": "Eemalda kõik filtrid",
-       "rcfilters-show-new-changes": "Vaata uusimaid muudatusi",
+       "rcfilters-show-new-changes": "Vaata uusi muudatusi alates: $1",
        "rcfilters-search-placeholder": "Filtreeri muudatusi (kasuta menüüd või tipi filtri nimi)",
        "rcfilters-invalid-filter": "Vigane filter",
        "rcfilters-empty-filter": "Aktiivsed filtrid puuduvad. Näidatakse kogu kaastööd.",
        "delete-confirm": "Lehekülje \"$1\" kustutamine",
        "delete-legend": "Kustutamine",
        "historywarning": "<strong>Hoiatus:</strong> Kustutataval leheküljel on {{PLURAL:$1|ühe redaktsiooniga|$1 redaktsiooniga}} ajalugu:",
-       "historyaction-submit": "Näita",
+       "historyaction-submit": "Näita redaktsioone",
        "confirmdeletetext": "Sa oled andmebaasist kustutamas lehekülge koos kogu tema ajalooga.\nPalun kinnita, et tahad seda tõepoolest teha, et sa mõistad tagajärgi ja et sinu tegevus on kooskõlas siinse [[{{MediaWiki:Policy-url}}|sisekorraga]].",
        "actioncomplete": "Toiming sooritatud",
        "actionfailed": "Toiming ebaõnnestus",
        "deleting-subpages-warning": "<strong>Hoiatus:</strong> Oled kustutamas lehekülge, millel on [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|alamlehekülg|$1 alamlehekülge|51=üle 50 alamlehekülje}}]].",
        "rollback": "Tühista muudatused",
        "rollback-confirmation-confirm": "Palun kinnita:",
-       "rollback-confirmation-yes": "Tühista",
-       "rollback-confirmation-no": "Loobu",
+       "rollback-confirmation-yes": "tühista",
+       "rollback-confirmation-no": "loobu",
        "rollbacklink": "tühista",
        "rollbacklinkcount": "tühista {{PLURAL:$1|üks muudatus|$1 muudatust}}",
        "rollbacklinkcount-morethan": "tühista üle {{PLURAL:$1|ühe muudatuse|10 muudatuse}}",
        "mycontris": "Kaastöö",
        "anoncontribs": "Kaastöö",
        "contribsub2": "Kasutaja {{GENDER:$3|$1}} ($2) kaastöö",
+       "contributions-subtitle": "{{GENDER:$3|$1}}",
        "contributions-userdoesnotexist": "Kasutajakonto \"$1\" pole registreeritud.",
        "negative-namespace-not-supported": "Negatiivse väärtusega nimeruumide tugi puudub.",
        "nocontribs": "Antud kriteeriumitele vastavaid muudatusi ei leitud.",
        "blocklist-userblocks": "Peida kontod",
        "blocklist-tempblocks": "Peida ajutised",
        "blocklist-addressblocks": "Peida üksikud IP-aadressid",
+       "blocklist-type": "Tüüp:",
+       "blocklist-type-opt-all": "Kõik",
+       "blocklist-type-opt-sitewide": "Saidiülene",
+       "blocklist-type-opt-partial": "Osaline",
        "blocklist-rangeblocks": "Peida vahemikublokeeringud",
        "blocklist-timestamp": "Ajatempel",
        "blocklist-target": "Blokeeritav",
        "blocklist-editing-page": "leheküljed",
        "blocklist-editing-ns": "nimeruumid",
        "ipblocklist-empty": "Blokeerimiste loend on tühi.",
-       "ipblocklist-no-results": "Nõutud IP-aadress või kasutajatunnus ei ole blokeeritud.",
+       "ipblocklist-no-results": "Päritud IP-aadressile või kasutajanimele vastavaid blokeeringuid ei leitud.",
        "blocklink": "blokeeri",
        "unblocklink": "lõpeta blokeerimine",
        "change-blocklink": "muuda blokeeringut",
        "tooltip-t-permalink": "Püsilink lehekülje sellele redaktsioonile",
        "tooltip-ca-nstab-main": "Vaata sisulehekülge",
        "tooltip-ca-nstab-user": "Näita kasutaja lehte",
-       "tooltip-ca-nstab-media": "Vaata meedialehte",
+       "tooltip-ca-nstab-media": "Vaata meediumilehte",
        "tooltip-ca-nstab-special": "See on erilehekülg ja seda ei saa redigeerida.",
        "tooltip-ca-nstab-project": "Näita projekti lehte",
        "tooltip-ca-nstab-image": "Vaata faili lehekülge",
        "default-skin-not-found-no-skins": "Oih! Sinu viki vaikekujundus, milleks muutuja <code dir=\"ltr\">$wgDefaultSkin</code> järgi on <code>$1</code>, pole saadaval.\n\nÜhtegi kujundust pole paigaldatud.\n\n; Kui oled MediaWiki just paigaldanud või täiendasid seda:\n: Paigaldasid tarkvara ilmselt Giti kaudu või otse lähtekoodist või mõnel muul viisil. See on ootuspärane. MediaWiki 1.24 ja uuemad versioonid ei sisalda peahoidlas ühtegi kujundust. Proovi [https://www.mediawiki.org/wiki/Category:All_skins mediawiki.org-i kujunduste kataloogist] mõni kujundus paigaldada. Selleks saad:\n:* laadida alla [https://www.mediawiki.org/wiki/Download lintarhiivi paigaldaja], mis sisaldab mitut kujundust ja tarkvaralisa. Saad sealt kleepimiseks kopeerida kausta <code dir=\"ltr\">skins/</code>;\n:* [https://www.mediawiki.org/wiki/Special:SkinDistributor mediawiki.org-ist] kindla kujunduse lintarhiivi alla laadida;\n:* [https://www.mediawiki.org/wiki/Download_from_Git#Using_Git_to_download_MediaWiki_skins kasutada Giti, et kujundusi alla laadida].\n: Selle tegemine ei tohiks häirida Giti hoidlat, kui oled MediaWiki arendaja. Vaata [https://www.mediawiki.org/wiki/Manual:Skin_configuration kujunduste häälestusjuhendist], kuidas kujundusi lubada ja kuidas valida vaikekujundus.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (lubatud)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>keelatud</strong>)",
-       "mediastatistics": "Meediastatistika",
+       "mediastatistics": "Failide arvandmestik",
        "mediastatistics-summary": "Arvandmed üles laaditud failitüüpide kohta. See käib ainult failide viimaste versioonide kohta. Vanu ja kustutatud versioone pole arvesse võetud.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 bait|$1 baiti}} ($2; $3%)",
        "mediastatistics-bytespertype": "Failide kogusuurus selles alaosas: $1 {{PLURAL:$1|bait|baiti}} ($2; $3%).",
        "passwordpolicies-policyflag-forcechange": "peab muutma sisselogimisel",
        "passwordpolicies-policyflag-suggestchangeonlogin": "soovita muutmist sisselogimisel",
        "easydeflate-invaliddeflate": "Ette antud sisu ei ole õigesti vähendatud",
-       "unprotected-js": "Turvalisuse huvides ei saa JavaScripti laadida kaitsmata lehekülgedelt. Palun koosta JavaScripti ainult nimeruumis MediaWiki või kasutajate nimeruumi alamleheküljel."
+       "unprotected-js": "Turvalisuse huvides ei saa JavaScripti laadida kaitsmata lehekülgedelt. Palun koosta JavaScripti ainult nimeruumis MediaWiki või kasutajate nimeruumi alamleheküljel.",
+       "userlogout-continue": "Kui soovid välja logida, siis palun [$1 mine väljalogimise leheküljele].",
+       "userlogout-sessionerror": "Väljalogimine ebaõnnestus seansitõrke tõttu. Palun [$1 proovi uuesti]."
 }
index 67bb561..f7c9141 100644 (file)
        "exif-compression-4": "CCITT Grupa 4 faks kodiranje",
        "exif-copyrighted-true": "Zaštićeno autorskim pravom",
        "exif-copyrighted-false": "Status autorskih prava nije postavljen",
+       "exif-photometricinterpretation-0": "Crno-bijelo (bijela je 0)",
        "exif-photometricinterpretation-1": "Crno-bijelo (crna je 0)",
+       "exif-photometricinterpretation-3": "Paleta",
+       "exif-photometricinterpretation-4": "Maska prozirnosti",
+       "exif-photometricinterpretation-5": "Separirano (vjerojatno CMYK)",
+       "exif-photometricinterpretation-8": "CIE L*a*b*",
+       "exif-photometricinterpretation-9": "CIE L*a*b* (ICC kodiranje)",
+       "exif-photometricinterpretation-10": "CIE L*a*b* (ITU kodiranje)",
        "exif-unknowndate": "nepoznat datum",
        "exif-orientation-1": "Normalno",
        "exif-orientation-2": "Zrcaljeno po horizontali",
index 8b02c4a..f124df2 100644 (file)
@@ -7,7 +7,8 @@
                        "Klutzy",
                        "Kwj2772",
                        "Mooozi",
-                       "아라"
+                       "아라",
+                       "Revi"
                ]
        },
        "exif-imagewidth": "너비",
        "exif-photometricinterpretation-3": "팔레트",
        "exif-photometricinterpretation-4": "투명 마스크",
        "exif-photometricinterpretation-5": "분리 (아마도 CMYK)",
+       "exif-photometricinterpretation-8": "CIE L*a*b*",
        "exif-photometricinterpretation-9": "CIE L*a*b* (ICC 인코딩)",
        "exif-photometricinterpretation-10": "CIE L*a*b* (ITU 인코딩)",
        "exif-photometricinterpretation-32803": "컬러 필터 어레이",
index 65b19c0..983ae2d 100644 (file)
@@ -73,7 +73,8 @@
                        "Nbi",
                        "Amjad Khan",
                        "Ahmad252",
-                       "FarsiNevis"
+                       "FarsiNevis",
+                       "Moyogo"
                ]
        },
        "tog-underline": "خط کشیدن زیر پیوندها:",
        "rcshowhidebots": "$1 ربات‌ها",
        "rcshowhidebots-show": "نمایش",
        "rcshowhidebots-hide": "نهفتن",
-       "rcshowhideliu": "$1 کاربران ثبت‌نام‌کردە",
+       "rcshowhideliu": "$1 کاربران ثبت‌نام‌کرده",
        "rcshowhideliu-show": "نمایش",
        "rcshowhideliu-hide": "نهفتن",
        "rcshowhideanons": "$1 کاربران ناشناس",
index dd215af..9dfb19b 100644 (file)
        "delete-confirm": "Poista ”$1”",
        "delete-legend": "Sivun poisto",
        "historywarning": "<strong>Varoitus:</strong> Sivulla, jota olet poistamassa, on muokkaushistoriaa ja sitä on muokattu $1 {{PLURAL:$1|kerran|kertaa}}:",
-       "historyaction-submit": "Näytä muokkaushistoria",
+       "historyaction-submit": "Näytä versiot",
        "confirmdeletetext": "Olet poistamassa sivun ja kaiken sen historian.\nVahvista, että olet aikeissa tehdä tämän ja että ymmärrät teon seuraukset ja teet poiston [[{{MediaWiki:Policy-url}}|käytäntöjen]] mukaisesti.",
        "actioncomplete": "Toiminto suoritettu",
        "actionfailed": "Toiminto epäonnistui",
index b0724b3..521819b 100644 (file)
        "prefs-emailconfirm-label": "Confirmation du courriel :",
        "youremail": "Courriel :",
        "username": "{{GENDER:$1|Nom d'utilisateur|Nom d'utilisatrice}} :",
-       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}} :",
+       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}}:",
        "prefs-memberingroups-type": "$1",
        "group-membership-link-with-expiry": "$1 (jusqu'à $2)",
        "prefs-registration": "Date d'inscription :",
        "passwordpolicies-policyflag-forcechange": "doit changer à la reconnexion",
        "passwordpolicies-policyflag-suggestchangeonlogin": "suggérer une modification à la connexion",
        "easydeflate-invaliddeflate": "Le contenu fourni n'est pas correctement développé",
-       "unprotected-js": "Pour des raisons de sécurité, JavaScript ne peut pas être chargé depuis des pages non protégées. Veuillez ne créer du javascript que dans l’espace de noms MediaWiki: ou comme sous-page utilisateur"
+       "unprotected-js": "Pour des raisons de sécurité, JavaScript ne peut pas être chargé depuis des pages non protégées. Veuillez ne créer du javascript que dans l’espace de noms MediaWiki: ou comme sous-page utilisateur",
+       "userlogout-continue": "Si vous voulez vous déconnecter, veuillez [$1 continuer vers la page de déconnexion].",
+       "userlogout-sessionerror": "Déconnexion échouée à cause d’une erreur de session. Veuillez [$1 réessayer]."
 }
index 531fb1b..62b946a 100644 (file)
        "talk": "Oerlis",
        "views": "Werjeften",
        "toolbox": "Ark",
+       "tool-link-userrights": "{{GENDER:$1|Meidochgroepen}} feroarje",
+       "tool-link-userrights-readonly": "{{GENDER:$1|Meidochgroepen}} besjen",
        "imagepage": "Besjoch bestânsside",
        "mediawikipage": "Berjochtside sjen litte",
        "templatepage": "Berjochtside lêze",
        "yourname": "Meidochnamme:",
        "userlogin-yourname": "Meidochnamme",
        "userlogin-yourname-ph": "Jou jo meidochnamme",
-       "createacct-another-username-ph": "Jou jo meidochnamme",
+       "createacct-another-username-ph": "Jou de meidochnamme",
        "yourpassword": "Wachtwurd:",
        "userlogin-yourpassword": "Wachtwurd",
        "userlogin-yourpassword-ph": "Jou jo wachtwurd",
        "undo-norev": "De feroaring kin werom set wurde, omdat it net bestiet of is wiske.",
        "undo-summary": "Werom sette fan ferzje $1 fan [[Special:Contributions/$2|$2]] ([[User talk:$2|Oerlis]])",
        "cantcreateaccount-text": "Registraasje fan in meidogger fia dit IP-adres ('''$1''') is blokkearre troch [[User:$3|$3]].\n\nDe fan $3 opjûne reden is ''$2''",
-       "viewpagelogs": "Lochboek foar dizze side sjen litte",
+       "viewpagelogs": "Lochboek foar dizze side besjen",
        "nohistory": "Dit is de earste ferzje fan de side.",
        "currentrev": "Aktuele ferzje",
        "currentrev-asof": "Hjoeddeiske ferzje sûnt $1",
        "last": "foarige",
        "page_first": "earste",
        "page_last": "lêste",
-       "histlegend": "Ferskil oanjaan: Markearje de rûntsjes fan 'e te ferlykjen ferzjes, en druk op Enter of de knop ûnderoan.<br />\nLeginda: <strong>({{int:cur}})</strong> = ferskil mei de lêste ferzje, <strong>({{int:last}})</strong> = ferskil mei de eardere ferzje, <strong>{{int:minoreditletter}}</strong> = lytse feroaring.",
-       "history-fieldset-title": "Troch skiednis blêdzje",
+       "histlegend": "Ferskil oanjaan: Markearje de rûntsjes fan 'e te ferlykjen ferzjes, en druk op Enter of de knop ûnderoan.<br />\nLeginda: <strong>({{int:cur}})</strong> = ferskil mei de lêste ferzje, <strong>({{int:last}})</strong> = ferskil mei de eardere ferzje, <strong>{{int:minoreditletter}}</strong> = fan lytse betsjutting.",
+       "history-fieldset-title": "Ferzjes filterje",
        "histfirst": "âldste",
        "histlast": "nijste",
        "historysize": "({{PLURAL:$1|1 byte|$1 bytes}})",
        "history-feed-description": "Sideskiednis foar dizze side op de wiki",
        "history-feed-item-nocomment": "$1 op $2",
        "history-feed-empty": "De frege side bestiet net.\nFaaks is dy fuorthelle of omneamd.\n[[Special:Search|Sykje de wiki troch]] foar relevante nije siden.",
+       "history-edit-tags": "Lebels fan selektearre ferzjes bewurkje",
        "rev-deleted-comment": "(opmerking wiske)",
        "rev-deleted-user": "(meidochnamme fuorthelle)",
        "rev-deleted-event": "(lochrigel fuorthelle)",
        "history-title": "$1: ferzjeskiednis",
        "difference-title": "Ferskil tusken ferzjes fan \"$1\"",
        "lineno": "Rigel $1:",
-       "compareselectedversions": "Ferlykje selektearre ferzjes",
+       "compareselectedversions": "Selektearre ferzjes ferlykje",
        "showhideselectedversions": "Oantikke ferzjes wol/net sjen litte",
        "editundo": "weromsette",
        "diff-empty": "(Gjin ferskil)",
        "prefs-emailconfirm-label": "E-mailbefêstiging:",
        "youremail": "E-mail:",
        "username": "{{GENDER:$1|Meidochnamme}}:",
-       "prefs-memberingroups": "Lid fan {{PLURAL:$1|groep|groepen}}:",
+       "prefs-memberingroups": "{{GENDER:$2|Lid}} fan {{PLURAL:$1|groep|groepen}}:",
        "prefs-memberingroups-type": "$1",
        "prefs-registration-date-time": "$1",
        "yourrealname": "Jo wiere namme:",
        "userrights-user-editname": "Jou in meidochnamme:",
        "editusergroup": "Wizigje meidoggerrjochten",
        "editinguser": "Bewurkje meidoggerrjochten fan <strong>[[User:$1|$1]]</strong> $2",
-       "userrights-editusergroup": "Wizigje meidoggerrjochten",
+       "userrights-editusergroup": "{{GENDER:$1|Meidochgroepen}} bewurkje",
+       "userrights-viewusergroup": "{{GENDER:$1|Meidochgroepen}} besjen",
        "saveusergroups": "Meidoggerrjochten bewarje",
        "userrights-groupsmember": "Sit yn group:",
        "userrights-groupsmember-type": "$1",
        "recentchanges-legend": "Opsjes foar resinte feroarings",
        "recentchanges-summary": "Folgje de lêste feroarings oan 'e wiki op dizze side.",
        "recentchanges-noresult": "Gjin feroaring yn 'e opjûne perioade foldocht oan dizze kritearia.",
+       "recentchanges-notargetpage": "Jou hjirboppe in sidenamme, en besjoch feroarings foar dy side.",
        "recentchanges-feed-description": "Mei dizze feed kinne jo de nijste feroarings yn dizze wiki besjen.",
        "recentchanges-label-newpage": "Mei dizze wiziging is in nije side makke",
        "recentchanges-label-minor": "Dizze feroaring is fan lytse betsjutting",
        "rcfilters-savedqueries-already-saved": "Dizze filters wurde al bewarre. Feroarje jo ynstellings om in nij filter bewarje te kinnen.",
        "rcfilters-restore-default-filters": "Standertfilters werombringe",
        "rcfilters-clear-all-filters": "Alle filters wiskje",
+       "rcfilters-show-new-changes": "Nijste feroarings besjen",
        "rcfilters-search-placeholder": "Feroarings filterje (brûk it menu of sykje op filternamme)",
        "rcfilters-empty-filter": "Gjin aktive filters. Alle bydragen wurde werjûn.",
        "rcfilters-filterlist-feedbacklink": "Lit ús hearre wat jo fan dit filterark fine",
        "rcfilters-filter-user-experience-level-unregistered-label": "Net-ynskreaun",
        "rcfilters-filter-user-experience-level-unregistered-description": "Bewurkers dy't net oanmeld binne.",
        "rcfilters-filter-user-experience-level-newcomer-label": "Nijkommers",
-       "rcfilters-filter-user-experience-level-newcomer-description": "Ynskreaune bewurkers dy't minder hawwe as 10 bewurkings of 4 dagen dwaande.",
+       "rcfilters-filter-user-experience-level-newcomer-description": "Ynskreaune bewurkers mei minder as 10 bewurkings of noch gjin 4 dagen dwaande.",
        "rcfilters-filter-user-experience-level-learner-label": "Learders",
        "rcfilters-filter-user-experience-level-learner-description": "Ynskreaune bewurkers waans ûnderfining falt tusken \"Nijkommers\" en \"Bedreaune meidoggers\".",
        "rcfilters-filter-user-experience-level-experienced-label": "Bedreaune meidoggers",
        "rcfilters-watchlist-markseen-button": "Alle wizigings as sjoen markearje",
        "rcfilters-watchlist-edit-watchlist-button": "Jo list mei folchsiden bewurkje",
        "rcfilters-watchlist-showupdated": "Wizigings oan siden dy't jo dêrnei noch net besocht hawwe, wurde <strong>fet</strong>, mei opfolle rûntsjes markearre.",
+       "rcfilters-filter-showlinkedfrom-label": "Feroarings werjaan op siden ferwiisd fan",
+       "rcfilters-filter-showlinkedfrom-option-label": "<strong>Siden ferwiisd fan</strong> de opjûne side",
+       "rcfilters-filter-showlinkedto-label": "Feroarings werjaan op siden ferwizend nei",
+       "rcfilters-filter-showlinkedto-option-label": "<strong>Siden ferwizend nei</strong> de opjûne side",
+       "rcfilters-target-page-placeholder": "Jou in sidenamme (of kategory)",
        "rcnotefrom": "Hjirûnder {{PLURAL:$5|stiet de feroaring|steane de feroarings}} sûnt <strong>$3, $4</strong> (maksimaal <strong>$1</strong> werjûn).",
        "rclistfromreset": "Datumseleksje werynstelle",
        "rclistfrom": "Jou nije feroarings, begjinnend op $3, $2",
        "recentchangeslinked-feed": "Folgje keppelings",
        "recentchangeslinked-toolbox": "Folgje keppelings",
        "recentchangeslinked-title": "Feroarings yn ferbân mei \"$1\"",
-       "recentchangeslinked-summary": "Dizze spesjale side lit de lêste bewurkings sjen op siden dy't keppele wurde fan in spesifisearre side ôf (of fan in spesifisearre Kategory ôf). Siden dy't op [[Special:Watchlist|jo folchlist]] steane, wurde '''tsjûk''' werjûn.",
+       "recentchangeslinked-summary": "Jou in sidenamme, en besjoch de feroarings op siden dy't keppele binne fan as nei dy side. (Jou {{ns:category}}:Kategorynamme om de leden fan in kategory te besjen). Wizigings oan siden op [[Special:Watchlist|jo Folchlist]] wurde <strong>fet</strong> werjûn.",
        "recentchangeslinked-page": "Sidenamme:",
        "recentchangeslinked-to": "Feroarings oan siden mei ferwizings nei dizze side besjen",
        "recentchanges-page-added-to-category": "[[:$1]] oan kategory taheakke",
        "specialloguserlabel": "Utfierder:",
        "speciallogtitlelabel": "Doel (sidetitel of {{ns:user}}:meidochnamme foar meidogger):",
        "log": "Lochs",
+       "logeventslist-submit": "Werjaan",
+       "logeventslist-more-filters": "Oanfoljende lochs werjaan:",
+       "logeventslist-patrol-log": "Neisjochloch",
+       "logeventslist-tag-log": "Lebelloch",
        "all-logs-page": "Alle iepenbiere lochboeken",
        "alllogstext": "Gearfoege werjefte fan alle beskikbere lochs op {{SITENAME}}.\nJo kinne it byld beheine troch it kiezen fan in lochtype, de meidochnamme (haadlettergefoelich) of de oanbelangjende side (ek haadlettergefoelich).",
        "logempty": "Gjin treffers yn it loch.",
        "log-title-wildcard": "Siden sykje dy't mei dizze namme begjinne",
+       "log-edit-tags": "Lebels fan selektearre lochrigels bewurkje",
+       "checkbox-select": "Seleksje: $1",
+       "checkbox-all": "Alles",
+       "checkbox-none": "Gjint",
+       "checkbox-invert": "Omkeard",
        "allpages": "Alle siden",
        "nextpage": "Folgjende side ($1)",
        "prevpage": "Foargeande side ($1)",
        "delete-confirm": "\"$1\" fuortsmite",
        "delete-legend": "Fuortsmite",
        "historywarning": "<strong>Warskôging:</strong> De side dy't jo wiskje wolle hat skiednis:",
+       "historyaction-submit": "Ferzjes werjaan",
        "confirmdeletetext": "Jo binne dwaande mei it foar altyd wiskjen fan in side\nof ôfbyld, tegearre mei alle skiednis, út de databank.\nBefêstigje dat jo dat wier dwaan wolle. Befêstigje dat dat is wat jo witte wat it gefolch\nis en dat jo dit dogge neffens de [[{{MediaWiki:Policy-url}}]].",
        "actioncomplete": "Dien",
        "deletedtext": "\"$1\" is wiske.\nSjoch \"$2\" foar in list fan wat resint wiske is.",
        "dellogpage": "Wiskloch",
        "dellogpagetext": "Dit is wat der resint wiske is.\n(Tiden oanjûn as UTC).",
        "deletionlog": "wiskloch",
+       "log-name-create": "Side-oanmeitsingsloch",
+       "logentry-create-create": "$1 {{GENDER:$2|hat}} de side $3 makke",
        "reverted": "Weromset nei eardere ferzje",
        "deletecomment": "Reden:",
        "deleteotherreason": "Oare/eventuele reden:",
        "editcomment": "De gearfetting wie: <em>$1</em>.",
        "revertpage": "Bewurkings fan [[Special:Contributions/$2|$2]] ([[User talk:$2|oerlis]]) weromset ta de lêste ferzje fan [[User:$1|$1]]",
        "rollback-success": "Wizigings fan {{GENDER:$3|$1}} weromdraaid;\nde lêste ferzje fan {{GENDER:$4|$2}} weromset.",
+       "log-name-contentmodel": "Ynhâldsmodelloch",
        "protectlogpage": "Skoattelloch",
        "protectlogtext": "Hjirûnder wurdt it skoateljen en frijjaan fan siden oanjûn.\nSjoch [[Special:ProtectedPages|Skoattele side]] foar mear ynformaasje.",
        "protectedarticle": "\"[[$1]]\" skoattele",
        "mycontris": "Bydragen",
        "anoncontribs": "Bydragen",
        "contribsub2": "Foar {{GENDER:$3|$1}} ($2)",
-       "nocontribs": "Der binne gjin feroarings fûn dyt't hjirmei oerienkomme.",
+       "contributions-subtitle": "Foar {{GENDER:$3|$1}}",
+       "nocontribs": "Der binne gjin feroarings fûn dy't oan dizze kritearia foldwaan.",
        "uctop": "lêste feroaring",
        "month": "Fan moanne (en earder):",
        "year": "Fan jier (en earder):",
+       "date": "Fan datum (en earder):",
        "sp-contributions-newbies": "Allinne bydragen fan nije akkounts besjen",
-       "sp-contributions-newbies-sub": "Foar nijlingen",
+       "sp-contributions-newbies-sub": "Foar nije akkounts",
        "sp-contributions-newbies-title": "Bydragen fan nije meidoggers",
        "sp-contributions-blocklog": "útslútloch",
        "sp-contributions-deleted": "wiske {{GENDER:$1|meidogger}}bydragen",
        "sp-contributions-userrights": "behear fan {{GENDER:$1|meidogger}}rjochten",
        "sp-contributions-search": "Sykje nei bydragen",
        "sp-contributions-username": "IP-adres of meidochnamme:",
+       "sp-contributions-toponly": "Allinne de lêste ferzjes werjaan",
+       "sp-contributions-newonly": "Allinne nij oanmakke siden werjaan",
+       "sp-contributions-hideminor": "Lytse feroarings ferbergje",
        "sp-contributions-submit": "Sykje",
        "whatlinkshere": "Wat is hjirmei keppele?",
        "whatlinkshere-title": "Siden dy't keppele binne mei \"$1\"",
        "tooltip-save": "Jo feroarings bewarje",
        "tooltip-preview": "Oerlêze foar't de side fêstlein is!",
        "tooltip-diff": "Sjen litte hokker feroarings jo yn'e tekst makke hawwe.",
-       "tooltip-compareselectedversions": "Sjoch de ferskillen tusken de twa keazen ferzjes fan dizze side.",
+       "tooltip-compareselectedversions": "Sjoch de ferskillen tusken de twa keazen ferzjes fan dizze side",
        "tooltip-watch": "Foegje dizze side ta oan jo folchlist [alt-w]",
        "tooltip-watchlistedit-normal-submit": "Titels wiskje",
        "tooltip-watchlistedit-raw-submit": "Folchlist bywurkje",
        "tooltip-rollback": "\"Weromdraaie\" set dizze side yn ien klik werom nei hoe't er wie foar't de lêste bydrager syn bewurkings trochfierde",
+       "tooltip-undo": "\"Weromsette\" makket dizze wiziging ûngedien, en iepenet it bewurkingsformulier. Hjirtroch kin yn 'e gearfetting in reden tafoege wurde.",
        "interlanguage-link-title": "$1 – $2",
        "interlanguage-link-title-nonlang": "$1 – $2",
        "common.js": "/* Alles wat hjir oan JavaScript delset wurdt, wurdt foar alle meidoggers laden foar eltse side! */",
        "markedaspatrollederror": "Kin net as kontrolearre markearre wurde",
        "markedaspatrollederrortext": "Jo moatte in ferzje oanjaan dy't jo as kontrolearre markearje.",
        "markedaspatrollederror-noautopatrol": "Jo meie jo eigen bewurkings net sels markearre.",
+       "patrol-log-page": "Neisjochloch",
        "previousdiff": "← Eardere ferskillen",
        "nextdiff": "Neikommende ferskillen →",
        "imagemaxsize": "Beheining fan 'e ôfbyldingsgrutte op bestânsbeskriuwingssiden:",
        "htmlform-yes": "Ja",
        "htmlform-cloner-create": "Mear tafoegje",
        "htmlform-cloner-delete": "Fuortsmite",
+       "htmlform-date-placeholder": "JJJJ-MM-DD",
        "logentry-delete-delete": "$1 {{GENDER:$2|hat}} de side $3 wiske",
        "logentry-delete-delete_redir": "$1 {{GENDER:$2|hat}} de trochferwizing $3 by it oerskriuwen wiske",
        "revdelete-restricted": "hat beheinings oplein oan behearders",
        "logentry-newusers-autocreate": "It meidochakkount $1 is automatysk {{GENDER:$2|oanmakke}}",
        "logentry-upload-upload": "$1 hat $3 {{GENDER:$2|opladen}}",
        "logentry-upload-overwrite": "$1 hat in nije ferzje fan $3 {{GENDER:$2|opladen}}",
+       "log-name-tag": "Lebelloch",
        "rightsnone": "(gjin)",
        "feedback-back": "Foarige",
        "feedback-cancel": "Annulearje",
        "special-characters-group-bangla": "Bengaalsk",
        "special-characters-group-tamil": "Tamyl",
        "special-characters-group-telugu": "Telugu",
-       "special-characters-group-thai": "Tai"
+       "special-characters-group-thai": "Tai",
+       "mw-widgets-dateinput-no-date": "Gjin datum keazen",
+       "mw-widgets-dateinput-placeholder-day": "JJJJ-MM-DD",
+       "date-range-from": "Fan datum:",
+       "date-range-to": "Oant datum:"
 }
index 3cb7cb9..1bcc936 100644 (file)
        "passwordpolicies-policyflag-forcechange": "לדרוש שינוי בעת כניסה לחשבון",
        "passwordpolicies-policyflag-suggestchangeonlogin": "להציע שינוי בעת כניסה לחשבון",
        "easydeflate-invaliddeflate": "התוכן שהועבר אינו דחוס כנדרש",
-       "unprotected-js": "מסיבות אבטחה, לא ניתן לטעון JavaScript מדפים שאינם מוגנים. ניתן ליצור סקריפטי JavaScript רק במרחב השם \"מדיה ויקי:\" או בדפי משנה של דף המשתמש."
+       "unprotected-js": "מסיבות אבטחה, לא ניתן לטעון JavaScript מדפים שאינם מוגנים. ניתן ליצור סקריפטי JavaScript רק במרחב השם \"מדיה ויקי:\" או בדפי משנה של דף המשתמש.",
+       "userlogout-continue": "יש [$1 להמשיך לדף היציאה מהחשבון] כדי לצאת מהחשבון.",
+       "userlogout-sessionerror": "היציאה מהחשבון נכשלה בשל שגיאת אימות. יש [$1 לנסות שוב]."
 }
index 4a110b0..028ebae 100644 (file)
        "createacct-reason": "Razlog",
        "createacct-reason-ph": "Zašto stvarate još jedan račun?",
        "createacct-reason-help": "Poruka koja se prikazuje u evidenciji stvaranja suradničkih računa",
-       "createacct-submit": "Stvorite svoj suradnički račun",
+       "createacct-submit": "Stvori svoj suradnički račun",
        "createacct-another-submit": "Otvori račun",
        "createacct-continue-submit": "Pritisni za stvaranje računa",
        "createacct-another-continue-submit": "Nastavi za stvaranje računa",
        "grant-editpage": "Uređivanje postojećih stranica",
        "grant-editprotected": "Uređivanje zaštićenih stranica",
        "grant-highvolume": "Uređivanja velikog opsega",
+       "grant-patrol": "Ophodnja izmjena stranica",
        "grant-rollback": "Brzo uklanjanje izmjena stranica",
        "grant-sendemail": "Slanje e-poruka drugim suradnicima",
        "grant-uploadeditmovefile": "Postavljanje, zamjena i premještanje datoteka",
        "nolicense": "Ništa nije odabrano",
        "licenses-edit": "Uredi izbor licencija",
        "license-nopreview": "(Prikaz nije moguć)",
-       "upload_source_url": " (izabrali ste datoteku s valjanog, javno dostupnog URL-a)",
-       "upload_source_file": "(izabrali ste datoteku s Vašeg računala)",
+       "upload_source_url": "(izabrana datoteka s valjanog, javno dostupnog URL-a)",
+       "upload_source_file": "(izabrana datoteka s Vašeg računala)",
        "listfiles-delete": "izbriši",
        "listfiles-summary": "Ova stranica pokazuje sve postavljene datoteke.\nKad je filtriran po suradniku, popis prikazuje samo one datoteke čije je posljednje inačice postavio taj suradnik.",
        "listfiles_search_for": "Traži ime slike:",
        "sp-contributions-newonly": "Pokaži samo stranice koje je suradnik započeo",
        "sp-contributions-hideminor": "Sakrij manje izmjene",
        "sp-contributions-submit": "Traži",
+       "sp-contributions-outofrange": "Nije moguće pokazati rezultate. Traženi raspon IP adresa veći je od CIDR limita /$1.",
        "whatlinkshere": "Što vodi ovamo",
        "whatlinkshere-title": "Stranice koje vode na »$1«",
        "whatlinkshere-page": "Stranica:",
index cf1c6fc..4200f17 100644 (file)
        "action-editmyusercss": "saját szerkesztői CSS-fájlok szerkesztése",
        "action-editmyuserjson": "saját szerkesztői JSON-fájlok szerkesztése",
        "action-editmyuserjs": "saját szerkesztői JavaScript-fájlok szerkesztése",
+       "action-viewsuppressed": "minden felhasználó elől elrejtett változtatások megtekintése",
+       "action-hideuser": "felhasználói név blokkolása és elrejtése a külvilág elől",
        "action-ipblock-exempt": "IP-, auto- és tartományblokkok megkerülése",
        "action-unblockself": "saját felhasználói fiók blokkjának feloldása",
        "action-noratelimit": "sebességkorlát figyelmen kívül hagyása",
        "action-reupload-own": "a saját maga által feltöltött fájlok felülírása",
+       "action-nominornewtalk": "vitalapok apró szerkesztése új üzenetről való értesítés kiküldése nélkül",
        "action-markbotedits": "visszaállított szerkesztések botként való jelölése",
        "action-patrolmarks": "járőrök jelzéseinek megtekintése a friss változásokban",
        "action-override-export-depth": "lapok exportálása a hivatkozott lapokkal együtt, legfeljebb 5-ös mélységig",
+       "action-suppressredirect": "átirányítások készítésének kihagyása a lapok régi nevén átnevezéskor",
        "nchanges": "$1 változtatás",
        "enhancedrc-since-last-visit": "$1 az utolsó látogatás óta",
        "enhancedrc-history": "történet",
        "rcfilters-savedqueries-already-saved": "Ezek a szűrők már el lettek mentve. Módosítsd a beállításokat egy új mentett szűrő készítéséhez.",
        "rcfilters-restore-default-filters": "Alapértelmezett szűrők visszaállítása",
        "rcfilters-clear-all-filters": "Összes szűrő kikapcsolása",
-       "rcfilters-show-new-changes": "Legfrissebb változtatások megtekintése",
+       "rcfilters-show-new-changes": "$1-óta történt friss változtatások megtekintése",
        "rcfilters-search-placeholder": "Változtatások szűrése (használd a menüt vagy keress szűrőkre)",
        "rcfilters-invalid-filter": "Érvénytelen szűrő",
        "rcfilters-empty-filter": "Nincs aktív szűrő. Minden közreműködés látható.",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "A jelszó nem szerepelhet a 100 000 leggyakrabban használt jelszó listáján .",
        "passwordpolicies-policyflag-forcechange": "lecserélés követelése bejelentkezéskor",
        "passwordpolicies-policyflag-suggestchangeonlogin": "lecserélés ajánlása bejelentkezéskor",
-       "unprotected-js": "Biztonsági okokból JavaScript nem tölthető be védtelen lapokról. Kérlek egyedül a MediaWiki névtérben készíts JavaScriptet, vagy szerkesztői allapként."
+       "unprotected-js": "Biztonsági okokból JavaScript nem tölthető be védtelen lapokról. Kérlek egyedül a MediaWiki névtérben készíts JavaScriptet, vagy szerkesztői allapként.",
+       "userlogout-continue": "Amennyiben ki szeretnél jelentkezni, [$1 használd a kijelentkezési oldalt].",
+       "userlogout-sessionerror": "Sikertelen kijelentkezés munkamenethiba miatt. Kérlek [$1 próbáld újra]."
 }
index 17a3470..06256b9 100644 (file)
        "badaccess-group0": "Արտունութիւն չունիք այս գործողութիւնը կատարել:",
        "badaccess-groups": "Տուեալ գործողութիւնը միայն $1 {{PLURAL:$2|խումբի|խումբերի}} մասնակիցները կ՛րնան կատարել։",
        "ok": "Լաւ",
-       "pagetitle": "Միացէ՛ք {{SITENAME}} նախագիծին",
+       "pagetitle": "",
        "retrievedfrom": "Վերցուած է «$1» էջէն",
        "youhavenewmessages": "{{PLURAL:$3|Դուք ունիք}} $1 ($2)։",
        "youhavenewmessagesfromusers": "{{PLURAL:$4|Դուք ունիք}} $1 {{PLURAL:$3|այլ մասնակից|$3 մասնակիցէն}} ($2):",
index 7378e8a..9e36b9f 100644 (file)
        "blocklist-editing-page": "paginas",
        "blocklist-editing-ns": "spatios de nomines",
        "ipblocklist-empty": "Le lista de blocadas es vacue.",
-       "ipblocklist-no-results": "Le adresse IP o nomine de usator que tu requestava non es blocate.",
+       "ipblocklist-no-results": "Nulle blocadas trovate que corresponde al adresse IP o nomine de usator requestate.",
        "blocklink": "blocar",
        "unblocklink": "disblocar",
        "change-blocklink": "cambiar blocada",
index 623c04a..5d5ebc7 100644 (file)
@@ -63,6 +63,7 @@
        "tog-norollbackdiff": "Omisar difero-komparo pos retrorulo",
        "tog-useeditwarning": "Avertez se me probos klozar ula pagino sen sparar mea modifiki ed edituri",
        "tog-prefershttps": "Sempre uzar sekura konekto kande facar log in",
+       "tog-showrollbackconfirmation": "Demandez konfirmo, se ligilo por retromodifikar kliktesos",
        "underline-always": "Sempre",
        "underline-never": "Nulatempe",
        "underline-default": "Pre-ajustaji pri sub-strekizar ligili",
        "title-invalid-interwiki": "La demandita pagino-titulo kontenas inter-wiki-ala ligilo, olqua ne povas uzesar en tituli.",
        "title-invalid-talk-namespace": "La demandita pagino-titulo referas a diskuto-pagino, qua ne existas.",
        "title-invalid-characters": "La demandita pagino-titulo kontenas ne-valida literi: \"$1\".",
+       "title-invalid-relative": "La titulo di la pagino havas la nomizita \"relativi\". Tituli di pagini kun \"relativi\" (./, ../) esas nevalida, pro freque la retonavigilo dil uzero ne povas trovar li.",
        "title-invalid-magic-tilde": "La pagino demandata kontenas nevalida 'magiala' intersequo di tildi =>(<nowiki>~~~</nowiki>).",
        "title-invalid-too-long": "La pagino demandata esas tre longa. Ol mustas esar min longa kam $1 {{PLURAL:$1|byte|bytes}} segun la kodexado UTF-8.",
        "title-invalid-leading-colon": "La pagino demandata kontenas nevalida bi-punto en lua komenco.",
        "badretype": "La pasovorti vu donis ne esas sama.",
        "usernameinprogress": "Kontokreado por ita uzero duras. Voluntez vartar.",
        "userexists": "La uzeronomo ja selektesis antee.\nVoluntez elektar diferanta uzeronomo.",
+       "createacct-normalization": "Vua uzero-nomo adaptesos a $2, pro teknikala motivi.",
        "loginerror": "Eroro enirante",
        "createacct-error": "Eroro pri kontokreado",
        "createaccounterror": "Ne povis krear konto: $1",
        "passwordtooshort": "Pasovorti mustas kontenar adminime {{PLURAL:$1|1 signo|$1 signi}}.",
        "passwordtoolong": "Pasovorti ne mustas esar plu longa kam {{PLURAL:$1|1 litero|$1 literi}}.",
        "passwordtoopopular": "Pasovorti tre facila ne povas uzesar. Voluntez selektar pasovorto nefacila por divinar.",
+       "passwordinlargeblacklist": "La pasovorto quon vu selektis esas tre ordinare uzata e/o facila por deskovrar. Voluntez selektar plu bona pasovorto.",
        "password-name-match": "Pasovorto mustas diferar de vua uzeronomo.",
        "password-login-forbidden": "La uzo di ita uzeronomo e pasovorto es interdiktita.",
        "mailmypassword": "Sendez nova pasovorto per e-posto",
        "botpasswords-updated-body": "La pasovorto por la 'bot' nomizita \"$1\" del {{GENDER:$2|uzero}} \"$2\" kreesis.",
        "botpasswords-deleted-title": "La pasovorto por la 'bot' efacesis",
        "botpasswords-deleted-body": "La pasovorto por la 'bot' nomizita \"$1\" del {{GENDER:$2|uzero}} \"$2\" kreesis.",
+       "botpasswords-newpassword": "La nova pasovorto por enirar <strong>$1</strong> esas <strong>$2</strong>.\n<em>Voluntez memorigar to por futura refero.</em> <br> (Por anciena ''bot-''i, qui bezonas la nomo di 'login' esar la sama kam l'eventuala nomo dil uzero, vu anke povas uzar <strong>$3</strong> kom uzero-nomo, e <strong>$4</strong> kom pasovorto.)",
+       "botpasswords-no-provider": "\"BotPasswordsSessionProvider\" ne esas disponebla.",
+       "botpasswords-restriction-failed": "Restrikti pri pasovorti koncerne ''bot''-i impedas vua 'log in'.",
        "botpasswords-not-exist": "L'uzero \"$1\" ne havas pasovorto nomizita \"$2\" por lua 'bot'.",
        "botpasswords-needs-reset": "La pasovorto por la 'bot' nomizita \"$1\" dal {{GENDER:$2|uzero}} \"$2\" mustas rikreesar.",
        "botpasswords-locked": "Vu ne povas facar 'login' per robotala pasovorto (bot password), pro ke vua konto blokusesis.",
        "resetpass-abort-generic": "La modifiko dil pasovorto interuptesis per ula 'extension'.",
        "resetpass-expired": "Vua pasovorto perdis la valideso. Voluntez krear nova pasovorto por facar 'log in'.",
        "resetpass-expired-soft": "Vua pasovorto perdis la valideso e mustas modifikesar. Voluntez selektar nova pasovorto, o kliktez \"{{int:authprovider-resetpass-skip-label}}\" por modifikar ol pose.",
+       "resetpass-validity": "Vua pasovorto \"$1\" esas nevalida. Voluntez krear nova pasovorto por facar 'log in'.",
        "resetpass-validity-soft": "Vua pasovorto esas nevalida: $1\n\nVoluntez selektar nova pasovorto, o kliktez \"{{int:authprovider-resetpass-skip-label}}\" por modifikar ol pose.",
        "passwordreset": "Sendez nova pasovorto per e-posto",
        "passwordreset-text-one": "Garnisez ica formulario por recevar provizora pasovorto per vua e-posto.",
        "subject-preview": "Previdado di la temo:",
        "previewerrortext": "Eventis eroro kande on probis krear previdado pri vua modifikuri.",
        "blockedtitle": "La uzero esas blokusita",
+       "blockedtext-partial": "<strong>Vua uzero-nomo od IP-adreso blokusesis koncerne modifikuri en ca pagino. Vu ankore povas redaktar altra pagini en ca Wiki.</strong> Vu povas vidar omna detali pri la blokuso en [[Special:MyContributions|account contributions]].\n\n$1 blokusis vu. La motivo esis <em>$2</em>.\n\n* Komenco dil blokuso: $8\n* Fino dil blokuso: $6\n* Motivo dil blokuso: $7\n* Blokuso #$5",
        "blockedtext": "<strong>Vua uzantonomo od IP-adreso blokusesis.</strong>\n\n$1 blokusis vu.\nLa motivo esis <em>$2</em>.\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Motivo dil blokuso: $7\n\nVu povas kontaktar $1 od altra [[{{MediaWiki:Grouppage-sysop}}|administrero]] por diskutar la blokuso.\nVu ne povas uzar \"email this user\" por sendar e-posto ecepte se valida email indikesis en tua [[Special:Preferences|preferaji dil uzanto]], e se vu ne blokusesis por uzar ol.\nVua nuna IP-adreso esas $3, e la ID dil blokuso esas #$5.\nVoluntez inkluzor omna detali adsupre en omna demandi quin vu facos.",
        "autoblockedtext": "<strong>Vua uzantonomo od IP-adreso blokusesis.</strong>\n\n$1 blokusis vu.\nLa motivo esis <em>$2</em>.\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Persono blokusata: $7\n\nVu povas kontaktar $1 od altra [[{{MediaWiki:Grouppage-sysop}}|administrero]] por diskutar pri la blokuso.\nVu ne povas uzar \"email this user\" por sendar e-posto, ecepte se valida email indikesis en tua [[Special:Preferences|preferaji dil uzero]], e se vu ne blokusesis por uzar ol.\nVua nuna IP-adreso esas $3, e la ID dil blokuso esas #$5.\nVoluntez inkluzor omna detali adsupre en omna demandi quin vu facos.",
        "systemblockedtext": "Vua uzero-nomo od IP-adreso blokusabis automatale da MediaWiki.\nLa motivo esas:\n\n:<em>$2</em>\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Persono blokuzata: $7\n\nVua nuna IP-adreso esas $3.\nVoluntez inkluzar omna detalii furnisita adsupre, en irga demandi quin vu facos.",
        "blockednoreason": "nula motivo donesis",
        "whitelistedittext": "Vu mustas $1 por redaktar pagini.",
+       "confirmedittext": "Vu mustas konfirmar vua adreso di e-posto ante ke vu povas redaktar pagini. Voluntez informar e validigar vua e-posto adreso tra vua [[Special:Preferences|preferaji di uzero]].",
        "nosuchsectiontitle": "On ne povis trovar la seciono",
        "nosuchsectiontext": "Vu probis redaktar seciono qua na existas.\nOl posible movesis od efacesis dum ke vu vidabis la pagino.",
        "loginreqtitle": "Eniro esas postulata",
        "anontalkpagetext": "----\n<em>Yen la diskuto-pagino por anonima uzero, qua ankore ne kreis konto, o se kreis, ne uzas ol.</em>\nDo, ni mustas uzar la IP-adreso por identifikar li.\nCa IP-adreso povas uzesar da multa uzeri.\nSe vu esas anonima uzero e kreas ke nerelevanta komenti sendesis a vu, voluntez [[Special:CreateAccount|krear konto]], o [[Special:UserLogin|facar 'log in']] por preventar futura konfundo kun altra anonima uzeri.",
        "noarticletext": "Til nun ne existas texto en ica pagino.\nVu povas [[Special:Search/{{PAGENAME}}|serchar ica titulo]] en altra pagini, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} serchar en la relata registri], o [{{fullurl:{{FULLPAGENAME}}|action=edit}} redaktar ica pagino]</span>.",
        "noarticletext-nopermission": "Til nun ne existas texto en ica pagino.\nVu povas [[Special:Search/{{PAGENAME}}|serchar ica titulo]] en altra pagini, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} serchar en la relata registri], o [{{fullurl:{{FULLPAGENAME}}|action=edit}} redaktar ica pagino]</span>, tamen vu ne havas permiso por krear ica pagino.",
+       "missing-revision": "La revizo $1 de la pagino \"{{FULLPAGENAME}}\" ne existas.\n\nLa frequa kauzo di ta mesajo esas existar ligilo por ula pagino qua efacesis antee.\nDetali pri to esas lektebla en la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
        "userpage-userdoesnotexist": "Uzeronomo \"$1\" ne registragesis.\nVoluntez konfirmar se vu volas krear/redaktar ica pagino.",
        "userpage-userdoesnotexist-view": "L'uzeronomo \"$1\" ne enrejistresis.",
        "blocked-notice-logextract": "Ica uzero nun esas blokusita.\nLa lasta protokolo pri blokuso esas videbla adinfre, por refero:",
        "note": "'''Noto:'''",
        "previewnote": "<strong>Atencez ke ico esas nur prevido.</strong> Ol ne registragesis ankore!",
        "continue-editing": "Irez a la redakto-areo",
-       "session_fail_preview": "'''Pardonez! Ni ne povis traktar vua redakto pro perdo di sesiono donaji.'''\nVoluntez probar itere.\nSe ol ankore nefuncionas, probez [[Special:UserLogout|ekirar]] e pose enirar.",
+       "session_fail_preview": "Pardonez! Ni ne povis traktar vua redakto pro perdo di informi de la sesiono.\n\nPosible vua sesiono finis. <strong>Voluntez verifikar se vu duras esar konektata, e probez itere.</strong>\n\nSe to ankore nefuncionar, probez [[Special:UserLogout|ekirar]] e seque rienirar.",
        "session_fail_preview_html": "Pardonez! Ni ne povis recevar vua redakto pro perdajo di dati.\n\n<em>Pro ke la wiki {{SITENAME}} permisas uzar bruta HTML, la previdado celesas por preventar ataki uzante JavaScript.</em>\n\n<strong>Se la probo di redakto esas legitima, voluntez itere sendar ol.</strong>\nSe duros ne funcionar, facez [[Special:UserLogout|logout]] ed itere facez login. Videz se vua retonavigilo (browser) permisas uzar 'cookies' de ica retosituo.",
+       "edit_form_incomplete": "<strong>Kelka parti de la redakto-formulario ne sendesis a la centrala komputero. Verifikez du foyi se vua redakti esas integra, e probez itere sendar li.</strong>",
        "editing": "Vu redaktas $1",
        "creating": "Vu kreas $1",
        "editingsection": "Vu redaktas $1 (seciono)",
        "unicode-support-fail": "Semblas ke vua retnavigilo ne suportas Unicode. To bezonesas por redaktar ica pagino e, pro to, vua redakto ne konservesis.",
        "yourdiff": "Diferi",
        "copyrightwarning": "Voluntez memorar ke omna kontributi a {{SITENAME}} esas sub la $2 (Videz $1 por detali).\nSe vu ne deziras ke altri modifikez vua artikli od oli distributesez libere, lore voluntez ne skribar oli hike.<br />\nPublikigante vua skribajo hike, vu asertas ke olu skribesis da vu ipsa o kopiesis de libera fonto.\n'''NE SENDEZ ARTIKLI KUN ''COPYRIGHT'' SEN PERMISO!'''",
+       "editpage-cannot-use-custom-model": "La modelo pri kontenajo di ca pagino ne povas modifikesar.",
+       "longpageerror": "<strong>Eroro: La texto quon vu sendis esas granda de {{PLURAL:$1|1 bicoko* (kbyte)|$1 bicoki* (kbytes)}}, e to esas plu granda kam {{PLURAL:$2|1 kbyte|$2 kbytes}}.</strong>\nLa texto ne povis prezervesar.",
        "protectedpagewarning": "<strong>Averto: Ica pagino esas protektita por ke nur uzeri kun administero-yuri povas redaktar ol.</strong>\nLa maxim recenta en-registrago provizesas:",
        "semiprotectedpagewarning": "<strong>Noto:</strong> Ica pagino protektesis, do nur enrejistrita uzeri povos modifikar ol.\nLa lasta modifiko en lua stando ('log') montresas adinfre, quale refero:",
        "cascadeprotectedwarning": "<strong>Noto:</strong> Ica pagino protektesis, do nur uzeri kun [[Special:ListGroupRights|specifika yuri]] povas redaktar ol, pro ol interpozesas en la sequanta {{PLURAL:$1|pagino|pagini}}, protektita en kaskado:",
        "template-protected": "(protektita)",
        "template-semiprotected": "(mi-protektita)",
        "hiddencategories": "Ca pagino esas membro di {{PLURAL:$1|1 celita kategorio|$1 celita kategorii}}:",
+       "nocreate-loggedin": "Vu ne povas krear nova pagini.",
        "permissionserrors": "Eroro permisal",
        "permissionserrorstext-withaction": "Vu ne darfas $2, pro la {{PLURAL:$1|kauzo|kauzi}} sequanta:",
        "recreate-moveddeleted-warn": "<strong>Atencez: Vu rikreos pagino qua antee efacesis.</strong>\n\nVu mustas konsiderar se esos konvenanta o ne riskribor ol.\nPor vua konoco, la motivo dil antea efaco montresas hike:",
        "moveddeleted-notice": "Ica pagino efacesis.\nL'efaco-registraro e la movo-registraro di la pagino povas videsar sequante, por konsulto.",
        "moveddeleted-notice-recent": "Pardonez, ica pagino efacesis recente (dum la lasta 24 hori).\nL'informo (log) pri l'efaco, la protektado e/o movo di la pagino povas videsar adinfre, por konsulto.",
        "log-fulllog": "Videz kompleta protokolo ('log')",
+       "edit-gone-missing": "Ne povis aktualigar la pagino.\nSemblas ke ol efacesis.",
        "edit-conflict": "Konflikto di editi.",
+       "edit-no-change": "Vua redakto ignoresis, pro nula modifikuro facesis en la texto.",
+       "edit-slots-cannot-add": "La sequanta {{{{PLURAL:$1|parto|parti}} ne suportesas hike: $2.",
        "postedit-confirmation-created": "La pagino kreesis.",
+       "postedit-confirmation-restored": "La pagino itere kreesis.",
        "postedit-confirmation-saved": "Vua redakto konservesis",
        "postedit-confirmation-published": "Vua redakturo publikigesis.",
        "edit-already-exists": "Ne povis krear nova pagino.\nOl ja existas.",
        "defaultmessagetext": "Ordinara mesajo-texto",
        "invalid-content-data": "Nevalida kontenajo",
+       "slot-name-main": "Precipua",
        "content-model-wikitext": "texto Wiki",
        "content-model-text": "simpla texto",
        "content-model-javascript": "JavaScript",
        "page_first": "unesma",
        "page_last": "finala",
        "histlegend": "Selektado por diferi: markizez la versioni por komparar e presez 'Enter' o la butono adinfre.<br />\nSurskriburo: '''({{int:cur}})''' = diferi kun la nuna versiono,\n'''({{int:last}})''' = diferi kun l'antea versiono,\n'''{{int:minoreditletter}}''' = mikra redakturo.",
-       "history-fieldset-title": "Serchar revizi",
+       "history-fieldset-title": "Serchar revizuri",
        "history-show-deleted": "Revizo nure efacita",
        "histfirst": "Maxim anciena",
        "histlast": "Maxim nova",
        "historysize": "({{PLURAL:$1|1 bicoko|$1 bicoki}})",
-       "historyempty": "(vakua)",
+       "historyempty": "vakua",
        "history-feed-title": "Historio di redakti",
        "history-feed-description": "Historio di redakti por ta pagino en la wikio",
        "history-feed-item-nocomment": "$1 ye $2",
+       "history-feed-empty": "La pagino demandata ne existas.\nPosible ol efacesis de la Wiki, o lua nomo modifikesis.\nVoluntez [[Special:Search|serchar en la Wiki]] pri nova pagini relevanta.",
        "history-edit-tags": "Redaktar etiketi de la versioni/revizi selektita",
        "rev-deleted-comment": "(rezumo di redakti forigesis)",
        "rev-deleted-user": "(uzantonomo forigita)",
        "rev-deleted-event": "(detali dil registro forigesis)",
        "rev-deleted-user-contribs": "[Uzero od IP-adreso eliminita - la redakto celesis de la kontributaji]",
+       "rev-deleted-text-permission": "La revizo de ca pagino <strong>efacesis</strong>.\nDetali pri to povas videsar en la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
        "rev-deleted-unhide-diff": "Un ek la revizuri de ica difero <strong>efacesis</strong>.\nVu povas lektar la detali che la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} protokolo pri efacado].\nVu ankore povas [$1 vidar la difero], se vu deziros kontinuar.",
        "rev-delundel": "montrar/celar",
        "rev-showdeleted": "montrar",
        "revisiondelete": "Efacar/Restaurar revizi",
+       "revdelete-no-file": "L'arkivo mencionata ne existas.",
        "revdelete-show-file-submit": "Yes",
        "revdelete-text-text": "Versioni efacata duros aparar en la pagino-historio, tamen parto ek lia kontenaji ne restos publike videbla.",
+       "revdelete-hide-text": "Revizata texto",
        "revdelete-hide-image": "Celar kontenajo dil arkivo",
+       "revdelete-hide-name": "Celez emo e parametri",
        "revdelete-hide-comment": "Rezumo di redakto",
        "revdelete-hide-user": "uzeronomo di redaktanto/IP-adreso",
        "revdelete-radio-same": "(ne modifikez)",
        "savedprefs": "Vua preferaji registragesis.",
        "timezonelegend": "Tempala zono:",
        "localtime": "Lokala tempo:",
-       "timezoneuseoffset": "Altra (definez precize)",
+       "timezoneuseoffset": "Altra (informez precize la tempo-difero)",
+       "timezone-useoffset-placeholder": "Exemple pri valori: \"-07:00\" o \"01:00\"",
        "servertime": "Kloko en la servanto:",
        "guesstimezone": "Obtenar la kloko dil \"browser\"",
        "timezoneregion-africa": "Afrika",
        "prefs-custom-json": "Ordinara JSON",
        "prefs-custom-js": "Ordinara JavaScript",
        "prefs-common-config": "CSS/JSON/JavaScript partigita da omna 'skins':",
+       "prefs-reset-intro": "Vu povas uzar ca pagino por riinformar vua preferaji kom 'default'.\nVu ne povas desfacar ta modifiko.",
        "prefs-emailconfirm-label": "Konfirmado dil e-posto (e-mail):",
        "youremail": "Vua e-adreso:",
        "username": "{{GENDER:$1|Uzeronomo}}:",
        "prefs-advancedwatchlist": "Progresiva selektaji (advanced options)",
        "prefs-displayrc": "Montrez selektebli",
        "prefs-displaywatchlist": "Montrez selektebli",
+       "prefs-changesrc": "Modifikuri montrata",
+       "prefs-changeswatchlist": "Modifikuri montrata",
+       "prefs-pageswatchlist": "Pagini surveyata",
        "prefs-tokenwatchlist": "Token",
        "prefs-diffs": "Diferi",
        "prefs-help-prefershttps": "Ica preferajo efektigesos dum vua sequanta 'login'.",
        "recentchanges": "Recenta chanji",
        "recentchanges-legend": "Recenta chanji preferaji",
        "recentchanges-summary": "Regardez la maxim recenta chanji en Wiki per ica pagino.",
-       "recentchanges-noresult": "Ne eventis modifiki segun ci kriterii, dum la periodo mencionita.",
+       "recentchanges-noresult": "Ne eventis modifikuri segun ca kriterii, dum la periodo mencionata.",
        "recentchanges-feed-description": "Regardez la maxim recenta chanji en la Wiki por ica pagino.",
        "recentchanges-label-newpage": "Ca redaktajo kreis nova pagino",
        "recentchanges-label-minor": "Ica es mikra redaktajo",
index 3263720..b8d3b69 100644 (file)
        "blocklog-showlog": "Questo utente è stato bloccato in precedenza. Il registro dei blocchi è riportato di seguito per informazione:",
        "blocklog-showsuppresslog": "Questo utente è stato bloccato e nascosto in precedenza. Il registro delle rimozioni è riportato di seguito per informazione:",
        "blocklogentry": "ha bloccato [[$1]] per un periodo di $2 $3",
-       "reblock-logentry": "ha cambiato le impostazioni del blocco per [[$1]] con una scadenza di $2 $3",
+       "reblock-logentry": "ha modificato le impostazioni del blocco per [[$1]] con una scadenza di $2 $3",
        "blocklogtext": "Di seguito sono elencate le azioni di blocco e sblocco utenti.\nGli indirizzi IP bloccati automaticamente non sono elencati.\nConsultare l'[[Special:BlockList|elenco dei blocchi]] per l'elenco dei bandi o blocchi attualmente operativi.",
        "unblocklogentry": "ha sbloccato $1",
        "block-log-flags-anononly": "solo utenti anonimi",
        "logentry-partialblock-block-page": "{{PLURAL:$1|della pagina|delle pagine}} $2",
        "logentry-partialblock-block-ns": "{{PLURAL:$1|del|dei}} namespace $2",
        "logentry-partialblock-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} alla modifica $7 con una scadenza di $5 $6",
-       "logentry-partialblock-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} bloccando la modifica $7 con una scadenza di $5 $6",
+       "logentry-partialblock-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} precludendo{{GENDER:$4|gli|le|gli}} la modifica $7 con una scadenza di $5 $6",
        "logentry-non-editing-block-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} in specifiche azioni non di modifica con una scadenza di $5 $6",
+       "logentry-non-editing-block-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} precludendo{{GENDER:$4|gli|le|gli}} specifiche azioni non di modifica con una scadenza di $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} con una scadenza di $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} con una scadenza di $5 $6",
        "logentry-import-upload": "$1 {{GENDER:$2|ha importato}} $3 tramite caricamento",
        "passwordpolicies-policy-passwordcannotbepopular": "La password non può essere {{PLURAL:$1|la password più popolare|nell'elenco delle $1 password più popolari}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "La password non può essere nell'elenco delle 100 000 password utilizzate più comunemente.",
        "easydeflate-invaliddeflate": "Il contenuto fornito non è compresso correttamente",
-       "unprotected-js": "Per motivi di sicurezza, non è possibile caricare JavaScript da pagine non protette. Crea javascript solo nel namespace MediaWiki o come sottopagina Utente"
+       "unprotected-js": "Per motivi di sicurezza, non è possibile caricare JavaScript da pagine non protette. Crea javascript solo nel namespace MediaWiki o come sottopagina Utente",
+       "userlogout-continue": "Se vuoi uscire [$1 vai alla pagina di logout].",
+       "userlogout-sessionerror": "Logout non riuscito per un errore nella sessione. [$1 Riprova]."
 }
index 7d58f19..adab874 100644 (file)
        "tog-norollbackdiff": "巻き戻し後の差分を表示しない",
        "tog-useeditwarning": "変更を保存せずに編集画面から離れようとしたら警告",
        "tog-prefershttps": "ログインする際、常に安全な接続を使用する",
+       "tog-showrollbackconfirmation": "巻き戻しリンクをクリックした際に確認画面を表示する",
        "underline-always": "常に付ける",
        "underline-never": "常に付けない",
        "underline-default": "外装またはブラウザーの既定値を使用",
        "badretype": "入力したパスワードが一致しません。",
        "usernameinprogress": "この利用者名のためのアカウント作成は、すでに進行中です。お待ちください。",
        "userexists": "入力した利用者名は既に使用されています。\n別の利用者名を指定してください。",
+       "createacct-normalization": "技術的制限により指定された利用者名は「$2」として登録されます。",
        "loginerror": "ログインのエラー",
        "createacct-error": "アカウント作成エラー",
        "createaccounterror": "アカウントを作成できませんでした: $1",
        "page_first": "先頭",
        "page_last": "末尾",
        "histlegend": "差分の選択: 比較したい版のラジオボタンを選択し、Enterキーを押すか、下部のボタンを押します。<br />\n凡例: <strong>({{int:cur}})</strong>=最新版との比較、<strong>({{int:last}})</strong>=直前の版との比較、<strong>{{int:minoreditletter}}</strong>=細部の編集",
-       "history-fieldset-title": "ç\89\88ã\81®æ¤\9cç´¢",
+       "history-fieldset-title": "ç\89\88ã\82\92ã\83\95ã\82£ã\83«ã\82¿ã\83¼",
        "history-show-deleted": "削除版のみ",
        "histfirst": "最古",
        "histlast": "最新",
        "rcfilters-savedqueries-already-saved": "これらのフィルタは既に保存されています。設定を変更して、新しい保存フィルタを作成します。",
        "rcfilters-restore-default-filters": "標準設定の絞り込み条件を適用",
        "rcfilters-clear-all-filters": "すべてのフィルターをクリア",
-       "rcfilters-show-new-changes": "最新の変更を表示",
+       "rcfilters-show-new-changes": "$1 から最新の変更を表示",
        "rcfilters-search-placeholder": "絞り込みを行う(メニューから選択、またはフィルター名で検索)",
        "rcfilters-invalid-filter": "無効なフィルター",
        "rcfilters-empty-filter": "絞り込みは行われていません。全ての項目が表示されます。",
        "mycontris": "投稿記録",
        "anoncontribs": "投稿記録",
        "contribsub2": "利用者: {{GENDER:$3|$1}} ($2)",
+       "contributions-subtitle": "{{GENDER:$3|$1}}",
        "contributions-userdoesnotexist": "利用者アカウント「$1」は登録されていません。",
        "negative-namespace-not-supported": "負の値で指定される名前空間はサポートされていません。",
        "nocontribs": "これらの条件に一致する変更は見つかりませんでした。",
        "ipb-confirm": "ブロックの確認",
        "ipb-sitewide": "サイト全体",
        "ipb-partial": "部分的",
+       "ipb-sitewide-help": "ウィキにおける各ページとその他の投稿操作。",
        "ipb-partial-help": "特定のページまたは名前空間。",
        "ipb-pages-label": "ページ",
        "ipb-namespaces-label": "名前空間",
        "blocklist-userblocks": "アカウントのブロックを非表示",
        "blocklist-tempblocks": "期限付きブロックを非表示",
        "blocklist-addressblocks": "単一 IP のブロックを非表示",
+       "blocklist-type": "種類:",
+       "blocklist-type-opt-all": "すべて",
+       "blocklist-type-opt-sitewide": "サイト全体",
+       "blocklist-type-opt-partial": "部分的",
        "blocklist-rangeblocks": "範囲ブロックを非表示",
        "blocklist-timestamp": "日時",
        "blocklist-target": "対象",
        "blocklist-editing-page": "ページ",
        "blocklist-editing-ns": "名前空間",
        "ipblocklist-empty": "ブロック一覧は空です。",
-       "ipblocklist-no-results": "æ\8c\87å®\9aã\81\95ã\82\8cã\81\9fIPã\82¢ã\83\89ã\83¬ã\82¹ã\81¾ã\81\9fã\81¯å\88©ç\94¨è\80\85å\90\8dã\81¯ã\83\96ã\83­ã\83\83ã\82¯ã\81\95ã\82\8cã\81¦ã\81\84ã\81¾ã\81\9bã\82\93。",
+       "ipblocklist-no-results": "æ\8c\87å®\9aã\81\95ã\82\8cã\81\9fIPã\82¢ã\83\89ã\83¬ã\82¹ã\81¾ã\81\9fã\81¯å\88©ç\94¨è\80\85å\90\8dã\81«ä¸\80è\87´ã\81\99ã\82\8bã\83\96ã\83­ã\83\83ã\82¯ã\81¯è¦\8bã\81¤ã\81\8bã\82\8aã\81¾ã\81\9bã\82\93ã\81§ã\81\97ã\81\9f。",
        "blocklink": "ブロック",
        "unblocklink": "ブロック解除",
        "change-blocklink": "設定を変更",
        "confirm-unwatch-top": "このページをウォッチリストから除去しますか?",
        "confirm-rollback-button": "OK",
        "confirm-rollback-top": "このページの編集を差し戻しますか?",
+       "confirm-rollback-bottom": "この操作はこのページに対する指定した変更即座に巻き戻します。",
        "confirm-mcrrestore-title": "版を復帰",
        "confirm-mcrundo-title": "直前の変更を取り消す",
        "mcrundofailed": "取り消しに失敗しました",
        "logentry-block-block": "$1 が {{GENDER:$4|$3}} を$5{{GENDER:$2|ブロックしました}} $6",
        "logentry-block-unblock": "$1 が {{GENDER:$4|$3}} の{{GENDER:$2|ブロックを解除しました}}",
        "logentry-block-reblock": "$1 が {{GENDER:$4|$3}} のブロックの期限を$5に{{GENDER:$2|変更しました}} $6",
+       "logentry-partialblock-block-page": "{{PLURAL:$1|ページ}} $2",
+       "logentry-partialblock-block-ns": "{{PLURAL:$1|名前空間}} $2",
+       "logentry-partialblock-block": "$1 が {{GENDER:$4|$3}} に対して $7 からの編集を $5 {{GENDER:$2||ブロックしました}} $6",
+       "logentry-partialblock-reblock": "$1 が {{GENDER:$4|$3}} に対する $7 のブロックの期限を $5 に{{GENDER:$2|変更しました}} $6",
        "logentry-suppress-block": "$1 が {{GENDER:$4|$3}} を$5で{{GENDER:$2|ブロックしました}} $6",
        "logentry-suppress-reblock": "$1 が {{GENDER:$4|$3}} のブロックの期限を$5に{{GENDER:$2|変更しました}} $6",
        "logentry-import-upload": "$1 がファイルをアップロードして $3 を{{GENDER:$2|インポートしました}}",
        "passwordpolicies-policy-passwordcannotmatchblacklist": "パスワードは、特にブラックリストに載っているものと一致するものは設定できません",
        "passwordpolicies-policy-maximalpasswordlength": "パスワードは$1{{PLURAL:$1|文字}}以下でなければなりません",
        "passwordpolicies-policy-passwordcannotbepopular": "パスワードは{{PLURAL:$1|一般的なものにすることはできません|一般的な$1個のパスワードのリストと一致するものにすることはできません}}",
+       "passwordpolicies-policy-passwordnotinlargeblacklist": "一般的に使われるパスワード10万項目のリストに含まれるパスワードは使用できません。",
+       "passwordpolicies-policyflag-forcechange": "ログイン時に変更を強制",
+       "passwordpolicies-policyflag-suggestchangeonlogin": "ログイン時に変更を提案",
        "easydeflate-invaliddeflate": "提供されたコンテンツが適切に圧縮されていません",
-       "unprotected-js": "セキュリティ上の理由から、JavaScriptは保護されていないページからは読み込みできません。MediaWiki: 名前空間内、利用者下位ページのいずれかでのみjavascriptを作成してください。"
+       "unprotected-js": "セキュリティ上の理由から、JavaScriptは保護されていないページからは読み込みできません。MediaWiki: 名前空間内、利用者下位ページのいずれかでのみjavascriptを作成してください。",
+       "userlogout-continue": "ログアウトを行いたい場合、[$1 ログアウトページから実施]してください。",
+       "userlogout-sessionerror": "セッションエラーによりログアウトに失敗しました。再度 [$1 試行して]ください。"
 }
index 643fb5f..a348240 100644 (file)
        "download": "undhuh",
        "unwatchedpages": "Kaca kang ora ingawasan",
        "listredirects": "Pratélan alihan",
-       "unusedtemplates": "Cithakan kang ora kanggo",
+       "unusedtemplates": "Cithakan kang ora kaanggo",
        "unusedtemplatestext": "Kaca iki isi kabèh kaca ing mandala aran {{ns:template}} kang ora kaanggo ing kaca liya.\nAja lali mesthèkaké ana-orané pranala liya kang ngener cithakané sadurungé panjenengan mbusek.",
        "unusedtemplateswlh": "pranala liya-liyané",
        "randompage": "Kaca sembarang",
        "withoutinterwiki-summary": "Kaca-kaca ing ngisor iki ora nggayut menyang vèrsi basa liyané.",
        "withoutinterwiki-legend": "Préfiks",
        "withoutinterwiki-submit": "Tuduhna",
-       "fewestrevisions": "Artikel kang owahé sithik dhéwé",
+       "fewestrevisions": "Artikel kang owahé sathithik dhéwé",
        "nbytes": "$1 {{PLURAL:$1|bét|bét}}",
        "ncategories": "$1 {{PLURAL:$1|kategori|kategori}}",
        "ninterwikis": "$1 {{PLURAL:$1|interwiki|interwiki}}",
        "uncategorizedcategories": "Kategori kang tanpa kategori",
        "uncategorizedimages": "Barkas kang tanpa kategori",
        "uncategorizedtemplates": "Cithakan kang durung kawènèhan kategori",
-       "unusedcategories": "Kategori kang ora kanggo",
-       "unusedimages": "Barkas kang ora kanggo",
+       "unusedcategories": "Kategori kang ora kaanggo",
+       "unusedimages": "Barkas kang ora kaanggo",
        "wantedcategories": "Kategori kang kapéngini",
        "wantedpages": "Kaca kang kapéngini",
        "wantedpages-badtitle": "Sesirah ora sah ing omboyakan kasil: $1",
index 953f3ec..a2697e0 100644 (file)
        "tog-norollbackdiff": "되돌리기 후 차이를 보지 않기",
        "tog-useeditwarning": "바꾼 내용을 저장하지 않고 편집 페이지를 벗어날 때 내게 알리기",
        "tog-prefershttps": "로그인하는 동안 항상 보안 연결 사용",
-       "tog-showrollbackconfirmation": "롤백 링크를 클릭할 때 확인창을 띄웁니다",
+       "tog-showrollbackconfirmation": "롤백 링크를 클릭할 때 확인창을 표시합니다",
        "underline-always": "항상",
        "underline-never": "항상 긋지 않기",
        "underline-default": "스킨 또는 브라우저 기본값",
index 8475cbd..4c3d295 100644 (file)
@@ -19,7 +19,8 @@
                        "Macofe",
                        "Matma Rex",
                        "Robin van der Vliet",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Links óngersjtriepe",
        "recentchanges-label-unpatrolled": "Dees bewirking is nog neet gekónterleerd",
        "recentchanges-label-plusminus": "Dees paginagruuedje is verangerdj mit dit aantaal aan bytes",
        "recentchanges-legend-heading": "<strong>Legenda:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (zuuch ouch [[Special:NewPages|de nuuj pagina's]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(zuuch ouch [[Special:NewPages|de nuuj pagina's]])",
        "recentchanges-submit": "Tuin",
        "rcfilters-tag-remove": "Sjaf '$1' weg",
        "rcfilters-legend-heading": "<strong>Lies mit aafkórtinge:</strong>",
index e92e1f0..c53fb2e 100644 (file)
        "protect-cascadeon": "Šī lapa pašlaik ir aizsargāta, jo tā ir iekļauta {{PLURAL:$1|šajās lapās|šajā lapā|šajās lapās}} (mainot šīs lapas aizsardzības līmeni aizsardzība netiks noņemta):",
        "protect-default": "Atļaut visiem lietotājiem",
        "protect-fallback": "Atļaut tikai lietotājiem ar \"$1\" atļauju",
-       "protect-level-autoconfirmed": "Atļaut tikai pašpārbaudītajiem",
+       "protect-level-autoconfirmed": "Atļaut tikai reģistrētiem dalībniekiem",
        "protect-level-sysop": "Atļaut tikai administratoriem",
        "protect-summary-cascade": "kaskāde",
        "protect-expiring": "līdz $1 (UTC)",
index 547af26..cf7491e 100644 (file)
        "blocked-notice-logextract": "該簿現鎖也。\n下列之記鎖,以察之:",
        "clearyourcache": "'''註:'''重取頁面,文方新焉。\n'''Mozilla / Firefox / Safari:'''押''Shift''並點''重新載入'',或合鍵''Ctrl-F5''或''Ctrl-R''(Mac為''Command-R'')。\n'''Konqueror:'''點''Reload'',或押''F5''。\n:''Opera:'''須至''Tools→Preferences''清謄本。\n'''Internet Explorer:'''押''Ctrl''並點''重新整理'',或合鍵''Ctrl-F5''。",
        "usercssyoucanpreview": "'''訣:'''CSS應先「{{int:showpreview}}」而後存。",
-       "userjsyoucanpreview": "'''訣:'''JavaScript應先「{{int:showpreview}}」而後存。",
+       "userjsyoucanpreview": "<strong>訣:</strong>JavaScript應先「{{int:showpreview}}」而後存。",
        "usercsspreview": "'''預覽簿CSS。'''\n'''尚未儲焉!'''",
        "userjspreview": "'''預覽簿JavaScript。'''\n'''尚未儲焉!'''",
        "sitecsspreview": "'''預覽此CSS。'''\n'''尚未儲焉!'''",
index 95eaf3a..de3a8ec 100644 (file)
        "diff-multi-manyusers": "({{PLURAL:$1|Не е прикажана една меѓувремена преработка направена|Не се прикажани $1 меѓувремени преработки направени}} од повеќе од $2 {{PLURAL:$2|корисник|корисници}})",
        "diff-paragraph-moved-tonew": "Пасусот е преместен. Стиснете за да прејдете на новото место.",
        "diff-paragraph-moved-toold": "Пасусот е преместен. Стиснете за да прејдете на старото место.",
-       "difference-missing-revision": "Не пронајдов {{PLURAL:$2|една преработка|$2 преработки}} од оваа разлика ($1).\n\nОва обично се должи на застарена врска за разлики што води кон избришана страница.\nПовеќе подробности ќе најдете во [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневникот на бришења].",
+       "difference-missing-revision": "{{PLURAL:$2|Не е пронајдена|Не се пронајдени}} {{PLURAL:$2|една преработка|$2 преработки}} од оваа разлика ($1).\n\nОва обично се должи на застарена врска за разлики што води кон избришана страница.\nПовеќе подробности ќе најдете во [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневникот на бришења].",
        "searchresults": "Исход од пребарувањето",
        "search-filter-title-prefix": "Пребарување по страници чиј наслов почнува со „$1“",
        "search-filter-title-prefix-reset": "Пребарај по сите страници",
        "apisandbox-dynamic-parameters": "Дополнителни параметри",
        "apisandbox-dynamic-parameters-add-label": "Додај параметар:",
        "apisandbox-dynamic-parameters-add-placeholder": "Назив на параметарот",
-       "apisandbox-dynamic-error-exists": "Праметарот по име „$1“ веќе постои.",
+       "apisandbox-dynamic-error-exists": "Параметар по име „$1“ веќе постои.",
        "apisandbox-templated-parameter-reason": "Овој [[Special:ApiHelp/main#main/templatedparams|шаблонизиран параметар]] се нуди според {{PLURAL:$1|вредноста|вредностите}} на $2.",
        "apisandbox-deprecated-parameters": "Застарени параметри",
        "apisandbox-fetch-token": "Самопополни ја шифрата",
        "authprovider-confirmlink-request-label": "Сметки кои треба да се поврзат",
        "authprovider-confirmlink-success-line": "$1: Успешно поврзано.",
        "authprovider-confirmlink-failed": "Поврзувањето на сметката не е целосно успешно: $1",
-       "authprovider-confirmlink-ok-help": "Ð\9fÑ\80одолжи Ð´Ð° Ð¿Ñ\80икажÑ\83ваÑ\88 пораки за неуспешно поврзување.",
+       "authprovider-confirmlink-ok-help": "Ð\9fÑ\80одолжи Ð¿Ð¾Ñ\81ле Ð¿Ñ\80икажÑ\83ваÑ\9aеÑ\82о пораки за неуспешно поврзување.",
        "authprovider-resetpass-skip-label": "Прескокни",
        "authprovider-resetpass-skip-help": "Прескокни го задавањето на нова лозинка.",
        "authform-nosession-login": "Заверката е успешна, но вашиот прелистувач не може да „запомни“ дека сте најавени.\n\n$1",
        "passwordpolicies-policyflag-forcechange": "мора да се промени при најава",
        "passwordpolicies-policyflag-suggestchangeonlogin": "предложи измена при најава",
        "easydeflate-invaliddeflate": "Содржината не е соодветно прочистена",
-       "unprotected-js": "JavaScript не може да се вчита од незаштитени страници од безбедносни причини. Создавајте JavaScript само во именскиот простор МедијаВики: или како корисничка потстраница"
+       "unprotected-js": "JavaScript не може да се вчита од незаштитени страници од безбедносни причини. Создавајте JavaScript само во именскиот простор МедијаВики: или како корисничка потстраница",
+       "userlogout-continue": "Ако сакате да се одјавите, [$1 продолжете на одјавната стрнаица].",
+       "userlogout-sessionerror": "Одјавата не успеа поради седничка грешка. [$1 Обидете се пак]."
 }
index f0f16cf..e6e991b 100644 (file)
        "prefs-files": "പ്രമാണങ്ങൾ",
        "prefs-custom-css": "സ്വന്തം സി.എസ്.എസ്.",
        "prefs-custom-json": "ഐച്ഛിക ജെസൺ",
-       "prefs-custom-js": "à´¸àµ\8dവനàµ\8dà´¤à´\82 à´\9càµ\86.à´\8eà´¸àµ\8d.",
+       "prefs-custom-js": "à´¸àµ\8dവനàµ\8dà´¤à´\82 à´\9cാവാസàµ\8dà´\95àµ\8dà´°à´¿à´ªàµ\8dà´±àµ\8dà´±àµ\8d",
        "prefs-common-config": "എല്ലാ ദൃശ്യരൂപങ്ങൾക്കുമായി പങ്ക് വെയ്ക്കപ്പെട്ട സി.എസ്.എസ്./ജെസൺ/ജാവാസ്ക്രിപ്റ്റ്:",
        "prefs-reset-intro": "സൈറ്റിൽ സ്വതേയുണ്ടാവേണ്ട ക്രമീകരണങ്ങൾ പുനഃക്രമീകരിക്കാൻ താങ്കൾക്ക് ഈ താൾ ഉപയോഗിക്കാവുന്നതാണ്.\nഇത് തിരിച്ചു ചെയ്യാൻ സാദ്ധ്യമല്ല.",
        "prefs-emailconfirm-label": "ഇമെയിൽ സ്ഥിരീകരണം:",
index a1a29db..f06eb44 100644 (file)
        "allpages-hide-redirects": "ပြန်ညွှန်းများအား ဝှက်ရန်",
        "cachedspecial-viewing-cached-ttl": "သင်သည် $1 အချိန်ကြာသွားနိုင်သော ဤစာမျက်နှာ၏ cached ဗားရှင်းကို ကြည့်ရှုနေခြင်း ဖြစ်ပါသည်။",
        "cachedspecial-viewing-cached-ts": "သင်သည် ဤစာမျက်နှာ၏ အမှန်တကယ်မဟုတ်နိုင်သော cached ဗားရှင်းကို ကြည့်ရှုနေခြင်းဖြစ်သည်။",
+       "cachedspecial-refresh-now": "နောက်ဆုံးကို ကြည့်ရှုရန်။",
        "categories": "ကဏ္ဍများ",
        "categories-submit": "ပြသရန်",
        "categoriespagetext": "အောက်ပါ {{PLURAL:$1|ကဏ္ဍ|ကဏ္ဍများ}}သည် ဤဝီကီတွင် အသုံးပြု သို့မဟုတ် အသုံးမပြုထားခြင်း ဖြစ်နိုင်သည်။ [[Special:WantedCategories|အလိုရှိသော ကဏ္ဍများ]]ကိုလည်း ကြည့်ပါ။",
        "mycontris": "ဆောင်ရွက်ချက်များ",
        "anoncontribs": "ဆောင်ရွက်ချက်များ",
        "contribsub2": "{{GENDER:$3|$1}}အတွက် ($2)",
+       "contributions-subtitle": "{{GENDER:$3|$1}} အတွက်",
        "contributions-userdoesnotexist": "အသုံးပြုသူအကောင့် \"$1\" သည် မှတ်ပုံမတင်ထားပါ။",
        "nocontribs": "ဤသတ်မှတ်ချက်များနှင့် ကိုက်ညီသည့် ပြောင်းလဲမှုများ မရှိပါ။",
        "uctop": "လက်ရှိ",
        "createaccountblock": "အကောင့်ဖန်တီးခြင်းကို ပိတ်ထားသည်",
        "emailblock": "အီးမေးကို ပိတ်ပင်ထားသည်",
        "blocklist-nousertalk": "မိမိ၏ဆွေးနွေးချက်စာမျက်နှာကို တည်းဖြတ်မရနိုင်ပါ",
+       "blocklist-editing": "တည်းဖြတ်ခြင်း",
+       "blocklist-editing-page": "စာမျက်နှာများ",
+       "blocklist-editing-ns": "အမည်ညွှန်းများ",
        "ipblocklist-empty": "ပိတ်ပင်ထားမှုစာရင်းသည် ဗလာဖြစ်နေသည်။",
        "ipblocklist-no-results": "တောင်းဆိုလိုက်သော အိုင်ပီလိပ်စာ သို့မဟုတ် အသုံးပြုသူအမည်ကို မပိတ်ပင်ထားပါ။",
        "blocklink": "ပိတ်ပင်",
        "pageinfo-display-title": "ပြသခေါင်းစဉ်",
        "pageinfo-default-sort": "ပုံမှန် စာလုံးစီကီး",
        "pageinfo-length": "စာမျက်နှာ အလျား (ဘိုက်ဖြင့်)",
+       "pageinfo-namespace": "အမည်ညွှန်း",
        "pageinfo-article-id": "စာမျက်နှာ အိုင်ဒီ",
        "pageinfo-language": "စာမျက်နှာ စာကိုယ် ဘာသာစကား",
        "pageinfo-language-change": "ပြောင်းလဲရန်",
        "log-action-filter-protect-protect": "ကာကွယ်မှု",
        "log-action-filter-rights-rights": "လူဖြင့် ပြောင်းလဲမှု",
        "log-action-filter-rights-autopromote": "အလိုအလျောက် ပြောင်းလဲမှု",
+       "log-action-filter-upload-revert": "ပြန်ပြောင်းရန်",
        "authmanager-create-disabled": "အကောင့်ဖန်တီးခြင်းကို ပိတ်ထားသည်။",
        "authmanager-autocreate-noperm": "အလိုအလျာက် အကောင့်ဖန်တီးခြင်းကို ခွင့်မပြုပါ။",
        "authmanager-autocreate-exception": "ရှေ့ကအမှားများကြောင့် အလိုအလျာက် အကောင့်ဖန်တီးခြင်းကို ယာယီပိတ်ထားသည်။",
        "authmanager-realname-help": "အသုံးပြုသူ၏ အမည်ရင်း",
        "authmanager-provider-temporarypassword": "ယာယီစကားဝှက်",
        "authprovider-resetpass-skip-label": "ကျော်ရန်",
+       "specialpage-securitylevel-not-allowed-title": "ခွင့်မပြုပါ",
        "cannotauth-not-allowed-title": "ခွင့်ပြုချက် ငြင်းပယ်လိုက်သည်",
        "cannotauth-not-allowed": "သင်သည် ဤစာမျက်နှာကို အသုံးပြုခွင့်မရှိပါ",
        "userjsispublic": "ကျေးဇူးပြု၍ မှတ်သားပါ- JavaScript စာမျက်နှာခွဲများတွင် အခြားအသုံးပြုသူများ ကြည့်ရှုနိုင်သော လျို့ဝှက်အပ်သည့်အချက်အလက် မပါဝင်သင့်ပါ။",
index 1786795..85bea6f 100644 (file)
        "rcfilters-savedqueries-already-saved": "Disse filtrene er allerede lagret. Endre innstillingene dine for å opprette et nytt lagret filter.",
        "rcfilters-restore-default-filters": "Gjenopprett standardfiltre",
        "rcfilters-clear-all-filters": "Nullstill alle filtre",
-       "rcfilters-show-new-changes": "Vis de nyeste endringene",
+       "rcfilters-show-new-changes": "Vis nye endringer etter $1",
        "rcfilters-search-placeholder": "Filtrer endringer (bruk menyen eller søk etter et filternavn)",
        "rcfilters-invalid-filter": "Ugyldig filter",
        "rcfilters-empty-filter": "Ingen aktive filtre. Alle bidrag vises.",
        "blocklist-userblocks": "Skjul kontoblokkeringer",
        "blocklist-tempblocks": "Skjul midlertidige blokkeringer",
        "blocklist-addressblocks": "Skjul individuelle IP-blokkeringer",
+       "blocklist-type": "Type:",
+       "blocklist-type-opt-all": "Alle",
+       "blocklist-type-opt-sitewide": "Hele nettstedet",
+       "blocklist-type-opt-partial": "Delvis",
        "blocklist-rangeblocks": "Skjul intervallblokker",
        "blocklist-timestamp": "Tidsstempel",
        "blocklist-target": "Mål",
        "blocklist-editing-page": "sider",
        "blocklist-editing-ns": "navnerom",
        "ipblocklist-empty": "Blokkeringslisten er tom.",
-       "ipblocklist-no-results": "Den angitte IP-adressen eller brukeren er ikke blokkert.",
+       "ipblocklist-no-results": "Ingen blokkeringer funnet for den IP-adressen eller brukernavnet.",
        "blocklink": "blokker",
        "unblocklink": "opphev blokkering",
        "change-blocklink": "endre blokkering",
        "passwordpolicies-policyflag-forcechange": "må endres ved innlogging",
        "passwordpolicies-policyflag-suggestchangeonlogin": "foreslå endring ved innlogging",
        "easydeflate-invaliddeflate": "Det gitte innholdet er ikke riktig komprimert",
-       "unprotected-js": "Av sikkerhetsårsaker kan ikke JavaScript lastes fra ubeskyttede sider. Bare skap JavaScript i MediaWiki-navnerommet eller som en brukerunderside"
+       "unprotected-js": "Av sikkerhetsårsaker kan ikke JavaScript lastes fra ubeskyttede sider. Bare skap JavaScript i MediaWiki-navnerommet eller som en brukerunderside",
+       "userlogout-continue": "Hvis du ønsker å logge ut, [$1 fortsett til utloggingssiden].",
+       "userlogout-sessionerror": "Utlogging mislyktes på grunn av en øktfeil. [$1 Prøv igjen]."
 }
index cb7179e..e985b67 100644 (file)
@@ -19,7 +19,8 @@
                        "Macofe",
                        "Matma Rex",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Verwiezingen onderstrepen",
        "recentchanges-summary": "Up disse syde kün jy de lätste wysigingen van disse wiki bekyken.",
        "recentchanges-noresult": "Der waren in disse periode gien wiezigingen die an de kriteria voldoon.",
        "recentchanges-feed-description": "Zeuk naor de alderleste wiezingen op disse wiki in disse voer.",
-       "recentchanges-label-newpage": "Mid disse bewarking is een nye syde an-emaked",
+       "recentchanges-label-newpage": "Mid disse bewarking is een nye syde anemaked",
        "recentchanges-label-minor": "Dit is een kleine wysiging",
        "recentchanges-label-bot": "Disse bewarking is uutevoord döär een bot",
        "recentchanges-label-unpatrolled": "Disse bewarking is noch neet nå-ekeaken",
        "recentchanges-label-plusminus": "Disse sydegroutte is mid dit antal bytes ewysigd",
        "recentchanges-legend-heading": "<strong>Legenda:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (see ouk de [[Special:NewPages|lyste mid nye syden]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(see ouk de [[Special:NewPages|lyste mid nye syden]])",
        "recentchanges-submit": "Bekiek",
        "rcfilters-legend-heading": "<strong>Lyste mid ofkortingen:</strong>",
        "rcfilters-group-results-by-page": "Resultaoten per zied groeperen",
        "mediastatistics-header-multimedia": "Interaktieve media",
        "special-characters-group-latin": "Latyn",
        "special-characters-group-latinextended": "Latyn üütgebreided",
-       "special-characters-group-ipa": "Internationål Fonetisk Alfabet",
+       "special-characters-group-ipa": "Internationaal Fonetisk Alfabet",
        "special-characters-group-symbols": "Symbolen",
        "special-characters-group-greek": "Gryksk",
        "special-characters-group-greekextended": "Gryksk üütgebreided",
        "special-characters-group-bangla": "Bengaalsk",
        "special-characters-group-tamil": "Tamil",
        "special-characters-group-telugu": "Telugu",
-       "special-characters-group-sinhala": "Singalääsk",
+       "special-characters-group-sinhala": "Singaleesk",
        "special-characters-group-gujarati": "Gujarati",
        "special-characters-group-devanagari": "Devanagari",
        "special-characters-group-thai": "Taisk",
        "special-characters-group-lao": "Laotiaansk",
        "special-characters-group-khmer": "Khmer",
-       "special-characters-group-canadianaboriginal": "Kanadääsk lettergreapenskrivt",
+       "special-characters-group-canadianaboriginal": "Kanadeesk lettergreapenskrivt",
        "special-characters-title-endash": "liggend streepjen",
        "special-characters-title-emdash": "gedachtenstreepjen",
        "special-characters-title-minus": "minteken",
index 76a4237..0d8b6e7 100644 (file)
@@ -15,7 +15,8 @@
                        "Servien",
                        "Macofe",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Verwies ünnerstrieken",
        "recentchanges-label-bot": "Düsse Ännern worr maakt vun en Bot",
        "recentchanges-label-unpatrolled": "Düsse Ännern is noch nich kontrolleert worrn",
        "recentchanges-label-plusminus": "Disse Siedengrött is mit dit Antall Bytes ännert",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (süh ok de [[Special:NewPages|List mit ne'e Sieden]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(süh ok de [[Special:NewPages|List mit ne'e Sieden]])",
        "rcnotefrom": "Dit sünd de Ännern siet <b>$2</b> (bet to <b>$1</b> wiest).",
        "rclistfrom": "Wies ne’e Ännern siet $3 $2",
        "rcshowhideminor": "lütte Ännern $1",
index 047716a..06941e6 100644 (file)
        "rcfilters-savedqueries-already-saved": "Deze filters zijn al opgeslagen. Wijzig uw instellingen om een nieuw Filter op te slaan.",
        "rcfilters-restore-default-filters": "Standaard filters terugzetten",
        "rcfilters-clear-all-filters": "Alle filters verwijderen",
-       "rcfilters-show-new-changes": "Toon nieuwste wijzigingen sinds $1",
+       "rcfilters-show-new-changes": "Toon nieuwste wijzigingen",
        "rcfilters-search-placeholder": "Filter wijzigingen (gebruik het menu of zoek op filternaam)",
        "rcfilters-invalid-filter": "Ongeldig filter",
        "rcfilters-empty-filter": "Geen actieve filters. Alle bijdragen worden weergegeven.",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Wachtwoorden mogen niet voorkomen in de lijst met 100.000 veelvoorkomende wachtwoorden.",
        "passwordpolicies-policyflag-forcechange": "moet gewijzigd worden bij het aanmelden",
        "passwordpolicies-policyflag-suggestchangeonlogin": "raad wijzigen aan bij het aanmelden",
-       "unprotected-js": "Vanwege veiligheidsredenen kan er geen JavaScript geladen worden vanaf onbeveiligde pagina's. Gelieve alleen JavaScript pagina's aan te maken in de MediaWiki: naamruimte of als een subpagina van een gebruikerspagina."
+       "unprotected-js": "Vanwege veiligheidsredenen kan er geen JavaScript geladen worden vanaf onbeveiligde pagina's. Gelieve alleen JavaScript pagina's aan te maken in de MediaWiki: naamruimte of als een subpagina van een gebruikerspagina.",
+       "userlogout-continue": "Als u zich wilt afmelden, [$1 gaat u naar de afmeldpagina].",
+       "userlogout-sessionerror": "Afmelden is mislukt vanwege een fout met de sessie. [$1 Probeer het opnieuw]."
 }
index 6e14ad1..d75881d 100644 (file)
        "speciallogtitlelabel": "Mål (tittel eller {{ns:user}}:brukarnamn for brukar):",
        "log": "Loggar",
        "logeventslist-submit": "Vis",
+       "logeventslist-more-filters": "Vis fleire loggar:",
        "all-logs-page": "Alle offentlege loggar",
        "alllogstext": "Kombinert vising av alle loggane på {{SITENAME}}. Du kan avgrense resultatet ved å velje loggtype, brukarnamn eller den sida som er påverka (hugs å skilje mellom store og små bokstavar)",
        "logempty": "Ingen element i loggen passar.",
        "logentry-rights-autopromote": "$1 vart automatisk {{GENDER:$2|forfremja}} frå $4 til $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|lasta opp}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|lasta opp}} ein ny versjon av $3",
+       "log-name-managetags": "Merkehandsamingslogg",
        "log-name-tag": "Merkelogg",
        "rightsnone": "(ingen)",
        "rightslogentry-temporary-group": "$1 (mellombels, fram til $2)",
        "revid": "versjon $1",
        "interfaceadmin-info": "$1\n\nLøyva for endring av CSS/JS/JSON-filer som gjeld heile nettstaden vart nyleg skilde ut frå <code>editinterface</code>-retten. Om du ikkje skjøner kvifor du får denne feilmeldinga, sjå [[mw:MediaWiki_1.32/interface-admin]].",
        "passwordpolicies-policy-passwordcannotmatchusername": "Passordet kan ikkje vera det same som brukarnamnet",
-       "passwordpolicies-policy-passwordcannotmatchblacklist": "Passordet kan ikkje passa med svartelista passord"
+       "passwordpolicies-policy-passwordcannotmatchblacklist": "Passordet kan ikkje passa med svartelista passord",
+       "userlogout-sessionerror": "Utlogging gjekk ikkje grunna ein øktfeil. [$1 Freist om att]."
 }
diff --git a/languages/i18n/nqo.json b/languages/i18n/nqo.json
new file mode 100644 (file)
index 0000000..063bae3
--- /dev/null
@@ -0,0 +1,555 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Babamamadidianee",
+                       "Lancine.kounfantoh.fofana",
+                       "Lanciné.kounfantoh.fofana",
+                       "Youssoufkadialy",
+                       "Amire80",
+                       "Nafadji Mory Diané"
+               ]
+       },
+       "sunday": "ߞߊ߯ߙߌߟߏ߲",
+       "monday": "ߞߐ߬ߓߊ߬ߟߏ߲",
+       "tuesday": "ߞߐ߬ߟߏ߲",
+       "wednesday": "ߞߎ߬ߣߎ߲߬ߟߏ߲",
+       "thursday": "ߞߎ߬ߣߎ߲߬ߟߏ߲",
+       "friday": "ߛߌ߬ߣߌ߲߬ߟߏ߲",
+       "saturday": "ߞߍ߲ߘߍߟߏ߲",
+       "sun": "ߞߊ߯ߙߌߟߏ߲",
+       "mon": "ߞߐ߬ߓߊ߬ߟߏ߲",
+       "tue": "ߞߐ߬ߟߏ߲",
+       "wed": "ߓߟߐߟߐ",
+       "thu": "ߞߎ߬ߣߎ߲߬ߟߏ߲",
+       "fri": "ߛߌ߬ߣߌ߲߬ߟߏ߲",
+       "sat": "ߞߍ߲ߘߍߟߏ߲",
+       "january": "ߓߌ߲ߠߊߥߎߟߋ߲",
+       "february": "ߞߏ߲ߞߏߜߍ",
+       "march": "ߕߙߊߓߊ",
+       "april": "ߞߏ߲ߞߏߘߌ߬ߓߌ",
+       "may_long": "ߘߓߊ߬ߕߊ",
+       "june": "ߥߊ߬ߛߌ߬ߥߙߊ",
+       "july": "ߞߊ߬ߙߌ߬ߝߐ",
+       "august": "ߘߓߊ߬ߓߌߟߊ",
+       "september": "ߕߎߟߊߝߌ߲",
+       "october": "ߞߏ߲ߓߌߕߌ߮",
+       "november": "ߣߍߣߍߓߊ",
+       "december": "ߞߏߟߌ߲ߞߏߟߌ߲",
+       "january-gen": "ߓߌ߲ߠߊߥߎߟߋ߲",
+       "february-gen": "ߞߏ߲ߞߏߜߍ",
+       "march-gen": "ߕߙߊߓߊ",
+       "april-gen": "ߞߏ߲ߞߏߘߌ߬ߓߌ",
+       "may-gen": "ߘߓߊ߬ߕߊ",
+       "june-gen": "ߥߊ߬ߛߌ߬ߥߙߊ",
+       "july-gen": "ߞߊ߬ߙߌ߬ߝߐ",
+       "august-gen": "ߘߓߊ߬ߕߊ",
+       "september-gen": "ߕߎߟߊߝߌ߲",
+       "october-gen": "ߞߏ߲ߓߌߕߌ߮",
+       "november-gen": "ߣߍߣߍߓߊ",
+       "december-gen": "ߞߏߟߌ߲ߞߏߟߌ߲",
+       "jan": "ߓߌ߲ߠߊߥߎߟߋ߲",
+       "feb": "ߞߏ߲ߞߏߜߍ",
+       "mar": "ߕߙߊߓߊ",
+       "apr": "ߞߏ߲ߞߏߘߓߌ",
+       "may": "ߘߓߊ߬ߕߊ",
+       "jun": "ߥߊ߬ߛߌ߬ߥߙߊ",
+       "jul": "ߞߊ߬ߙߌ߬ߝߐ",
+       "aug": "ߘߓߊ߬ߓߌߟߊ",
+       "sep": "ߕߎߟߊߝߌ߲",
+       "oct": "ߞߏ߲ߓߌߕߌ߱",
+       "nov": "ߣߍߣߍߓߊ",
+       "dec": "ߞߏߟߌ߲ߞߏߟߌ߲",
+       "january-date": "ߓߌ߲ߠߊߥߎߟߋ߲$1",
+       "february-date": "ߞߏ߲ߞߏߜߍ$1",
+       "march-date": "ߕߙߊߓߊ$1",
+       "april-date": "ߞߏ߲ߞߏߘߌ߬ߓߌ$1",
+       "may-date": "ߘߓߊ߬ߕߊ$1",
+       "june-date": "ߥߊ߬ߛߌ߬ߥߙߊ$1",
+       "july-date": "ߞߊ߬ߙߌ߬ߝߐ$1",
+       "august-date": "ߘߓߊ߬ߓߌ߬ߟߊ$1",
+       "september-date": "ߕߎߟߊߝߌ߲$1",
+       "october-date": "ߞߏ߲ߓߌߕߌ߮$1",
+       "november-date": "ߣߍߣߍߓߊ$1",
+       "december-date": "ߞߏߟߌ߲ߞߏߟߌ߲$1",
+       "pagecategories": "{{PLURAL:$1|ߦߌߟߡߊ |ߦߌߟߡߊ ߟߎ߬ }}",
+       "category_header": "ߦߌߟߡߊ ߞߐߜߍ ߟߎ߬$1",
+       "subcategories": "ߝߊ߬ߓߏ߲߬ ߘߋ߬ߣߍ߲ ߠߎ߬",
+       "hidden-categories": "{{PLURAL:$1|ߦߌߟߡߊ߫ ߘߏ߲߰ߣߍ߲ |ߦߌߟߡߊ߫ ߘߏ߲߰ߣߍ߲ ߠߎ߬}}",
+       "category-subcat-count": "{{PLURAL:$2|ߦߟߊߡߊߙߋ߲ ߣߌ߲߬ ߠߎ߫ ߜߊ߲߰ߛߊ߲ ߠߋ߫ ߦߋ߫ ߦߌߟߡߊ ߣߌ߲߬ ߘߐ߫.|ߦߌߟߡߊ ߣߊ߬ߕߐ ߟߎ߬ ߘߐ߫߸ {{PLURAL:$1|ߦߌߟߡߊߙߋ߲|$1 ߦߌߟߡߊߙߋ߲ ߠߎ߬}} ߟߋ߬ ߦߴߊ߬ ߘߐ߫߸ ߞߙߎߞߙߍ ߟߎ߬ ߞߐߞߊ߲߬ $2}}",
+       "category-article-count": "{{PLURAL:$2|ߞߐߜߍ ߣߌ߲߬ ߘߐߙߐ߲߫ ߠߋ߬ ߦߋ߫ ߦߌߟߡߊ ߣߌ߲߬ ߘߐ߫.|ߖߡߊ߬ߦߊ߫ ߕߐ߮ ߣߊ߬ߕߊ {{PLURAL:$1|ߞߐߜߍ ߦߋ߫|$1 ߞߐߜߍ ߦߋ߫}} ߟߋ߬ ߦߋ߫ ߦߌߟߡߊ߫ ߘߌ߫߸ ߞߙߎߞߙߍ $2 ߞߐߞߊ߲߬}}",
+       "category-file-count": "{{PLURAL:$2|ߞߐߕߐ߮ ߣߌ߲߬ ߜߊ߲߰ߛߊ߲ ߠߋ߫ ߦߋ߫ ߦߌߟߡߊ ߣߌ߲߬ ߘߐ߫.|ߡߍ߲ ߠߎ߬ ߦߋ߫ ߣߌ߲߬ {{PLURAL:$1|ߞߐߕߐ߮ ߦߋ߫|$1 ߞߐߕߐ߮ ߟߎ߬ ߦߋ߫}} ߦߌߟߡߊ ߣߌ߲߬ ߘߐ߫߸ ߞߙߎߞߙߍ ߣߌ߲߬ $2 ߕߴߊ߬ ߘߐ߫.}}",
+       "listingcontinuesabbrev": "ߖߊ߬ߕߋ߬ߘߊ",
+       "index-category": "ߞߐߜߍ߫ ߓߊߕߐ߲ߛߐ߲ ߠߎ߬",
+       "noindex-category": "ߞߐߜߍ߫ ߘߐߕߐ߲ߛߐ߲ߦߊߓߊߟߌ ߟߎ߬",
+       "about": "ߡߊ߬ߘߎ߮",
+       "newwindow": "(ߊ߬ ߟߊߞߊ߬ ߝߢߐߘߊ߫ ߞߎߘߊ߫ ߟߊ߫)",
+       "cancel": "ߊ߬ ߘߐߛߊ߬",
+       "moredotdotdot": "ߡߊߞߊ߬ߝߏ߬...",
+       "morenotlisted": "ߛߙߍߘߍ ߣߌ߲߬ ߘߝߊߓߊߟߌ߫ ߓߍ߫ ߞߍ߫.",
+       "mypage": "ߞߐߜߍ",
+       "mytalk": "ߞߎߡߊ",
+       "anontalk": "ߢߊߝߐߞߣߍ",
+       "navigation": "ߛߏ߲߯ߓߊߟߌ",
+       "and": "ߊ߬ ߣߌ߫",
+       "actions": "ߞߍߟߌ ߟߎ߬",
+       "namespaces": "ߕߐ߮ ߞߣߍ",
+       "variants": "ߞߊ߲ߓߏߟߏ߲ ߠߎ߬",
+       "navigation-heading": "ߛߏ߲߯ߓߊߟߌ߫ ߓߏߟߏ߲ߘߊ",
+       "errorpagetitle": "ߝߎ߬ߕߎ߲߬ߕߌ",
+       "returnto": "ߌ ߞߐߛߊ߬ߦߌ߲߬ ߦߊ߲߬ ߡߊ߬$1",
+       "tagline": "ߞߊ߬ ߝߘߊ߫{{SITENAMEP}}",
+       "help": "ߘߍ߬ߡߍ߲߬ߠߌ",
+       "help-mediawiki": "ߘߍ߬ߡߍ߲߬ߠߌ߲ ߞߊ߬ ߓߍ߲߬ ߥߞߌ-ߟߊߛߋߢߊߥߙߍ ߡߊ߬",
+       "search": "ߢߌߣߌ߲ߠߌ",
+       "searchbutton": "ߢߌߣߌ߲ߠߌ",
+       "go": "ߊ߬ ߢߌߣߌ߲߫",
+       "searcharticle": "ߊ߬ ߢߌߣߌ߲߫",
+       "history": "ߘߐߜߍ ߘߐ߬ߝߐ",
+       "history_short": "ߘߐ߬ߝߐ",
+       "history_small": "ߕߊ߬ߡߌ߲߬ߣߍ߲",
+       "printableversion": "ߛߌ߰ߘߊ߫ ߜߌ߬ߙߌ߲߬ߘߌ߬ߕߊ",
+       "permalink": "ߛߘߌ߬ߜߋ߲߬ ߓߟߏߕߍ߰ߓߊߟߌ",
+       "print": "ߜߌ߬ߙߌ߲߬ߘߌ߬ߟߌ",
+       "view": "ߊ߬ ߘߐߜߍ߫",
+       "view-foreign": "ߊ߬ ߦߋ߫ ߦߊ߲߬ $1",
+       "edit": "ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "create": "ߟߊ߬ߘߊ߲߬ߠߌ",
+       "create-local": "ߕߌ߲߬ߞߎߘߎ߲ ߞߊ߲߬ߛߓߍ߬ߟߌ ߟߊߘߏ߲߬",
+       "delete": "ߊ߬ ߖߐ߬ߛߌ߬",
+       "undelete_short": "ߟߊ߬ߛߊ߬ߦߌ߲߬ߠߌ  {{PLURAL:$1|ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߞߋߟߋ߲߫|$1 ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ ߠߎ߬}}",
+       "protect": "ߊ߬ ߟߊߞߊ߲ߘߊ߫",
+       "protect_change": "ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߫",
+       "unprotect": "ߟߊ߬ߞߊ߲߬ߘߊ߬ߟߌ ߡߊߝߊ߬ߟߋ߲߬ߠߌ",
+       "newpage": "ߘߐߜߍ߫ ߞߎߘߊ",
+       "talkpagelinktext": "ߓߊ߬ߘߏ߬ߟߌ",
+       "specialpage": "ߞߐߜߍ߫ ߞߙߍߞߙߍߣߍ߲",
+       "personaltools": "ߘߎ߲߬ߘߎ߬ߡߊ߬ ߖߐ߯ߙߊ ߠߎ߬",
+       "talk": "ߓߊ߬ߘߏ߬ߓߊ߬ߘߌߦߊ",
+       "views": "ߦߌ߬ߘߊ߬ߟߌ",
+       "toolbox": "ߖߐ߯ߙߊ߲ ߠߎ߬",
+       "tool-link-emailuser": "ߢߎߡߍߙߋ߲ߞߏ߲ߘߏ߫ ߟߊߕߊ߯ {{GENDER:$1|ߟߊߓߊ߯ߙߟߊ ߣߌ߲߬ ߡߊ߬ }}",
+       "imagepage": "ߞߐߕߐ߮ ߞߐߜߍ ߘߐߜߍ߫",
+       "mediawikipage": "ߗߋߛߓߍ ߞߐߜߍ ߘߐߜߍ߫",
+       "templatepage": "ߞߙߊߞߏ ߞߐߜߍ ߘߐߜߍ߫",
+       "viewhelppage": "ߡߊ߬ߘߍ߬ߡߍ߲߬ߠߌ߲ ߞߐߜߍ ߘߐߜߍ߫",
+       "categorypage": "ߦߌߟߡߊ ߞߐߜߍ ߘߐߜߍ߫",
+       "viewtalkpage": "ߢߊߝߐߞߣߍ ߞߐߜߍ ߘߐߜߍ߫",
+       "otherlanguages": "ߞߊ߲ ߜߘߍ߫ ߟߎ߫ ߘߐ߫",
+       "redirectedfrom": "(ߌ ߟߊߞߎ߲߬ߛߌ߲߬ߣߍ߲߫ ߞߊ߬ ߓߐ߫ $1)",
+       "redirectto": "ߌ ߓߘߊ߫ ߟߊߞߎ߲߬ߛߌ߲߫ ߦߊ߲߬ ߠߊ߫:",
+       "lastmodifiedat": "ߞߐߜߍ ߣߌ߲߬ ߡߊߦߟߍ߬ߡߊ߲߬ ߟߊߓߊ߲ ߞߍ߫ ߘߊ߫ $1߸ $2",
+       "protectedpage": "ߞߐߜߍ߫ ߡߊߞߊ߲ߞߊ߲ߣߍ߲",
+       "jumpto": "ߊ߬ ߕߌߙߌ߲߫:",
+       "jumptonavigation": "ߛߏ߲߯ߓߊߟߌ",
+       "jumptosearch": "ߊ߬ ߕߌߙߌ߲߫",
+       "pool-timeout": "ߘߊߕߎ߲߯ߠߌ߲ ߡߊ߬ߞߐ߬ߣߐ߲߬ߠߌ߲߬ ߕߎߡߊ ߓߘߊ߫ ߕߊ߬ߡߌ߲߬",
+       "pool-errorunknown": "ߝߌ߬ߟߌ߬ ߛߎ߲߫ ߟߐ߲ߓߊߟߌ",
+       "poolcounter-usage-error": "ߟߊߓߊ߯ߙߊߟߌ߫ ߝߟߌ $1",
+       "aboutsite": "ߞߊ߬ ߓߍ߲߬ {{SITENAME}}",
+       "aboutpage": "Project:About",
+       "copyrightpage": "{{ns:project}}: ߛߓߍߦߟߊ ߤߊߞߍ",
+       "currentevents": "ߞߍߞߎߘߊ ߡߍ߲ ߠߎ߫ ߛߋ߲߬ߠߊ߫",
+       "currentevents-url": "Project:ߞߍߞߎߘߊ ߡߍ߲ ߠߎ߫ ߛߋ߲߬ߠߊ߫",
+       "disclaimers": "ߖߊ߲߬ߘߐ߬ߓߌ߬ߟߊ߬ߟߌ ߟߎ߬",
+       "disclaimerpage": "Project: ߖߊ߲߬ߘߐ߬ߓߌ߬ߟߊ߬ߟߌ ߡߎ߰ߡߍ",
+       "edithelp": "ߡߊ߬ߦߟߍ߬ߢߊ߲߬ߠߌ߲ ߘߍ߬ߡߍ߲߬ߠߌ߲",
+       "helppage-top-gethelp": "ߘߍ߬ߡߍ߲߬ߠߌ",
+       "mainpage": "ߓߏ߬ߟߏ߲߬ߘߊ",
+       "mainpage-description": "ߓߏ߬ߟߏ߲߬ߘߊ",
+       "policy-url": "ߣߕߊ߬ߘߐ߬ߛߌ߮: ߕߐ߲ ߠߎ߬",
+       "portal": "ߟߊ߬ߛߣߍ߬ߟߌ ߓߏ߬ߟߏ߲߬ߘߊ",
+       "portal-url": "Project:ߟߊ߬ߛߣߍ߬ߟߌ ߓߏ߬ߟߏ߲߬ߘߊ",
+       "privacy": "ߘߎ߲߬ߘߎ߬ߡߊ߬ ߤߊߞߍ",
+       "privacypage": "Project:ߞߊ߬ ߓߍ߲߬ ߘߎ߲߬ߘߎ߬ߡߊ߬ ߤߊߞߍ ߡߊ߬",
+       "ok": "ߏ߬ߞߍ߫",
+       "retrievedfrom": "ߊ߬ ߡߊߝߍߣߍ߲߫ ߦߊ߲߬ ߓߊ߫$1",
+       "youhavenewmessages": "{{PLURAL:$3|ߌ ߓߘߊ߫ ߗߋߛߓߍ߫ ߞߎߘߊ ߛߐ߬ߘߐ߲߬$1  $2 }}",
+       "editsection": "ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߫",
+       "editold": "ߡߊߦߟߍ߬ߡߊ߲߬",
+       "viewsourceold": "ߊ߬ ߛߎ߲ ߘߐߜߍ߫",
+       "editlink": "ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "viewsourcelink": "ߊ߬ ߛߎ߲ ߠߊߓߊ߯ߙߊ߫",
+       "editsectionhint": "ߦߌߟߡߊ ߡߊߝߊ߬ߟߋ߲߬ߠߌ:$1",
+       "toc": "ߞߣߐߘߐ",
+       "showtoc": "ߦߌ߬ߘߊ߬ߟߌ",
+       "hidetoc": "ߢߡߊߘߏ߲߯ߠߌ",
+       "confirmable-confirm": "ߌ ߛߍ߬ߓߍ߫ ߓߊ߬ {{GENDER:$1|}}؟",
+       "confirmable-yes": "ߐ߲߬ߤߐ߲߫",
+       "confirmable-no": "ߍ߲߬ߍ߲߫",
+       "thisisdeleted": "ߦߊ߯ߟߊ߫ ߦߴߊ߬ ߝߍ߬ ߞߵߊ߬ ߦߌ߬ߘߊ߬ ߥߟߊ߫ ߞߵߊ߬ ߟߊߛߊߦߌ߲߬ ߞߎߘߊߞߍ߫ ߓߊ߬ $1؟",
+       "viewdeleted": "ߦߌ߬ߘߊ߬ߟߌ ߓߊ߬ $1؟",
+       "site-atom-feed": "$1 ߝߕߌ ߓߊߟߏ",
+       "page-atom-feed": "$1 ߝߕߌ ߓߊߟߏ",
+       "red-link-title": "ߞߐߜߍ߫ ߕߍ߫ ߦߋ߲߬ $1",
+       "nstab-main": "ߞߐߜߍ",
+       "nstab-user": "ߞߐߜߍ߫ ߟߊߓߊ߯ߙߕߊ",
+       "nstab-special": "ߘߐߜߍ߫ ߓߟߏߡߊߞߊ߬ߣߍ߲",
+       "nstab-project": "ߖߊ߬ߕߋ߬ߘߐ߬ߛߌ߰ ߞߐߜߍ",
+       "nstab-image": "ߞߐߕߐ߮",
+       "nstab-mediawiki": "ߗߋߛߓߍ",
+       "nstab-template": "ߞߙߊߞߏ",
+       "nstab-category": "ߦߌߟߡߊ",
+       "mainpage-nstab": "ߓߏ߬ߟߏ߲߬ߘߊ",
+       "nosuchspecialpage": "ߘߐߜߍ߫ ߓߟߏߡߊߞߊ߬ߣߍ߲߬ ߛߎ߮ ߏ߬ ߝߋ߲߫ ߕߍ߫ ߦߊ߲߬",
+       "nospecialpagetext": "<strong>ߊߟߎ߫ ߓߘߊ߫ ߞߐߜߍ߫ ߓߟߏߡߊߞߊ߬ߣߍ߲ ߘߏ߫ ߢߌߣߌ߲߫ ߡߍ߲ ߕߺߴߦߋ߲߬.</strong>\nߞߐߜߍ߫ ߓߟߏߡߊߞߊ߬ߣߍ߲߫ ߓߘߍ߬ߡߊ ߟߎ߬ ߛߙߍߘߍ ߦߋ߫ ߢߌ߲߬ ߠߋ߫ ߞߊ߲߬ [[Special:SpecialPages|{{int:specialpages}}]].",
+       "badtitle": "ߞߎ߲߬ߕߐ߰ ߖߎ߮",
+       "viewsource": "ߊ߬ ߛߎ߲ ߘߐߜߍ߫",
+       "viewsource-title": "ߣߌ߲߬ $1 ߛߎ߲ ߘߐߜߍ߫",
+       "viewsourcetext": "ߌ ߘߌ߫ ߛߋ߫ ߞߐߜߍ ߣߌ߲߬ ߛߎ߲ ߦߋ߫ ߟߊ߫߸ ߞߵߊ߬ ߓߊߓߌ߬ߟߊ߬",
+       "userlogin-yourname": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߌ߬ ߕߐ߮",
+       "userlogin-yourname-ph": "ߌ ߟߊ߫ ߟߊ߬ߓߊ߰ߙߊ߬ߟߌ߬ ߕߐ߮ ߟߊߘߏ߲߬",
+       "userlogin-yourpassword": "ߕߊ߬ߡߌ߲߬ߞߊ߲",
+       "userlogin-yourpassword-ph": "ߌ ߟߊ߫ ߕߊ߬ߡߌ߲߬ߞߊ߲ ߠߊߘߏ߲߬",
+       "createacct-yourpassword-ph": "ߌ ߟߊ߫ ߕߊ߬ߡߌ߲߬ߞߊ߲ ߠߊߘߏ߲߬",
+       "createacct-yourpasswordagain": "ߕߊ߬ߡߌ߲߬ߞߊ߲ ߡߊߛߊ߬ߦߌ߬",
+       "createacct-yourpasswordagain-ph": "ߌ ߟߊ߫ ߕߊ߬ߡߌ߲߬ߞߊ߲ ߠߊߘߏ߲߬ ߕߎ߲߯",
+       "userlogin-remembermypassword": "ߒ ߜߊ߲߬ߞߎ߲߬ߣߍ߲ ߕߏ߫ ߞߘߊߎ߫",
+       "login": "ߌ ߜߊ߲߬ߞߎ߲߬",
+       "userlogin-noaccount": "ߖߊ߬ߕߋ߬ߘߊ߬ ߕߴߌ ߓߟߏ߫ ߓߊ߬؟",
+       "userlogin-joinproject": "ߘߏ߫ ߟߊߞߊ߬",
+       "createaccount": "ߖߊ߬ߕߋ߬ߘߊ ߘߏ߫ ߟߊߞߊ߬",
+       "userlogin-resetpassword-link": "ߌ ߟߊ߫ ߕߊ߬ߡߌ߲߬ߞߊ߲ ߓߘߊ߫ ߓߐ߫ ߌ ߞߣߐ߫؟",
+       "userlogin-helplink2": "ߜߊ߲߬ߞߎ߲߬ߠߌ߲ ߘߍ߬ߡߍ߲߬ߠߌ߲",
+       "createacct-emailoptional": "ߢߎߡߍߙߋ߲߫ ߞߏ߲ߘߏ",
+       "createacct-email-ph": "ߌ ߟߊ߫ ߢߎߡߍߙߋ߲߫ ߞߏ߲ߘߏ ߟߊߘߏ߲߬",
+       "createacct-submit": "ߖߊ߬ߕߋ߬ߘߊ ߘߏ߫ ߘߊߦߟߍ߬",
+       "createacct-benefit-heading": "ߛߌ߲ߘߌߣߍ߲߫ ߦߴߌ ߢߐ߲߭ ߡߐ߱ ߟߎ߬ ߟߋ߬ ߓߟߏ߫",
+       "createacct-benefit-body1": "{{PLURAL:$1|ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߬|ߊ߬ߟߎ߬ ߡߊߦߟߍ߬ߡߊ߲߬}}",
+       "createacct-benefit-body2": "$1 {{PLURAL:$1|ߘߐߜߍ|ߞߐߜߍ ߟߎ߬}}",
+       "createacct-benefit-body3": "ߕߊ߬ߡߌ߲߬ߣߍ߲߬ ߞߎߘߊ {{PLURAL:$1|ߓߟߏߓߌߟߊߢߐ߲߮ߞߊ߲ߠߊ|ߓߟߏߓߌߟߊߢߐ߲߮ߞߊ߲ߠߊ ߟߎ߬}}",
+       "loginlanguagelabel": "ߞߊ߲ $1",
+       "pt-login": "ߌ ߜߊ߲߬ߞߎ߲߬",
+       "pt-login-button": "ߌ ߜߊ߲߬ߞߎ߲߬",
+       "pt-createaccount": "ߖߊ߬ߕߋ߬ߘߊ߬ ߛߌ߲ߘߌ߫",
+       "pt-userlogout": "ߌ ߜߊ߲߬ߞߎ߲߬ߣߍ߲ ߓߐ߫",
+       "passwordreset": "ߕߊ߬ߡߌ߲߬ߞߊ߲ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "bold_sample": "ߛߓߍߘߋ߲߫ ߞߎ߲ߓߊ",
+       "bold_tip": "ߛߓߍߘߋ߲߫ ߞߎ߲ߓߊ",
+       "italic_sample": "ߛߓߍߟߌ߫ ߡߊߖߍ߲߬ߞߍ߬ߣߍ߲",
+       "italic_tip": "ߛߓߍߟߌ߫ ߡߊߖߍ߲߬ߞߍ߬ߣߍ߲",
+       "link_sample": "ߛߘߌ߬ߜߋ߲ ߞߎ߲߬ߕߐ߮",
+       "link_tip": "ߞߣߐߘߐ߫ ߛߘߌߜߋ߲",
+       "extlink_sample": "ߡߊߘߌߦߊ߫ ߥߞߌ߫ ߞߐߞߊ߲߫ ߛߘߌߜߋ߲",
+       "extlink_tip": "ߞߣߐߟߊߘߐ߫ ߛߘߌߜߋ߲",
+       "headline_sample": "ߞߎ߲߬ߕߐ߮ ߛߓߍߟߌ",
+       "headline_tip": "ߞߊߓߋ ߂߲ ߞߎ߲߬ߕߐ߮",
+       "nowiki_sample": "ߛߓߍߟߌ߫ ߖߙߎߡߎ߲ߕߊ߲ ߠߊߘߏ߲߬ ߦߊ߲߬",
+       "nowiki_tip": "ߥߞߌ߫ ߛߏ߯ߙߏߟߌ ߡߊߓߌ߬ߟߊ߬",
+       "image_tip": "ߞߐߕߐ߮ ߘߐߘߏ߲߬ߣߍ߲",
+       "media_tip": "ߞߐߕߐ߮ ߛߘߌ߬ߜߋ߲",
+       "sig_tip": "ߌ ߟߊ߫ ߞߟߊ߬ߣߐ ߕߎ߬ߡߊ߬ߘߊ ߓߊ߬ߘߌ߬ߟߊ߲߬ߡߊ",
+       "summary": "ߟߊ߬ߘߛߏ߬ߟߌ:",
+       "minoredit": "ߣߌ߲߬ ߦߋ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߘߋ߬ߣߍ߲ ߘߏ߫ ߟߋ߬ ߘߌ߫",
+       "watchthis": "ߘߐߜߍ ߣߌ߲߬ ߘߐߜߍ߫",
+       "savearticle": "ߊ߬ ߟߊߞߎ߲߬ߘߎ߬",
+       "preview": "ߊ߬ ߘߐߜߍ߫ ߡߎߣߎ߲߬",
+       "showpreview": "ߢߍߦߋߟߌ ߘߐߜߍ߫",
+       "showdiff": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ ߠߎ߫ ߦߌ߬ߘߊ߬",
+       "anoneditwarning": "<strong>Warning:</strong> ߌ ߜߊ߲߬ߞߎ߲߬ߣߍ߲߬ ߕߍ߫.ߌ ߓߊ߯ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߛߎ߯-ߎ߯-ߛߎ߫ ߞߍ߫߸ ߌ ߟߊ߫ IP ߛߊ߲߬ߓߊ߬ߕߐ߮ ߘߌ߫ ߞߍ߫ ߦߋߕߊ ߘߌ߫.ߣߴߌ ߞߊ߬ ߜߊ߲߬ߞߎ߲߬ߠߌ߲߬ ߖߐ߲ߖߐ߲ ߞߍ߫ <strong>[$1 log in]</strong> or <strong>[$2 create an account]</strong> ߌ ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߠߎ߬ ߘߌ߫ ߓߌ߬ߟߊ߬ ߌ ߜߊ߲߬ߞߎ߲߬ ߕߐ߮ ߟߊ߫߸ ߊ߬ ߣߌ߫ ߣߝߊ߬ ߜߘߍ߫ ߟߎ߫.",
+       "loginreqlink": "ߌ ߜߊ߲߬ߞߎ߲߬",
+       "newarticletext": "ߌ ߓߘߊ߫ ߛߘߌ߬ߜߋ߲ ߘߏ߫ ߟߊߓߊ߬ߕߏ߬ ߞߐߜߍ ߘߏ߫ ߘߐ߫߸ ߡߍ߲ ߕߴߦߋ߲߬ ߡߎߣߎ߲߬.\nߣߵߌ ߦߴߊ߬ ߝߍ߫ ߞߊ߬ ߞߐߜߍ ߘߏ߫ ߟߊߘߊ߲߫߸ ߛߓߍߟߌ ߘߊߡߌ߬ߣߊ߬ ߘߎ߰ߟߊ ߘߐ߫ (ߞߊ߬ [$1 ߘߍ߬ߡߍ߲߬ߠߌ߲ ߞߐߜߍ] ߦߋ߫߸ ߖߐ߲߬ߛߊ߬ ߌ ߘߌ߫ ߞߌ߬ߓߊ߬ߙߏ߬ ߖߐ߲ߖߐ߲ ߛߐ߬ߘߐ߲߬). ߣߵߌ ߘߏ߲߬ ߞߍ߫ ߘߊ߫ ߦߊ߲߬ ߝߎ߬ߕߎ߲߬ߕߌ߬ ߓߟߏߡߊ߬߸ ߌ ߟߊ߫ ߛߏ߲߯ߓߊߟߊ߲ <strong>back</strong> ߛߐ߲߬ߞߌ߲߫.",
+       "noarticletext": "ߛߓߍߟߌ߫ ߛߌ߫ ߕߍ߫ ߞߐߜߍ ߣߌ߲߭ ߞߊ߲߬ ߕߋ߲߫. ߌ ߘߌ߫ ߛߋ߫ ߞߐߜߍ ߣߌ߲߬ [[Special:Search/{{PAGENAME}}|search for this page title]] ߕߐ߮ ߢߌߣߌ߲߫ ߠߊ߫ ߞߐߜߍ ߕߐ߭ ߟߎ߬ ߘߐ߫߸ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} search the related logs]߸ ߥߟߊ߫ [{{fullurl:{{FULLPAGENAME}}|action=edit}} create this page]</span>.",
+       "noarticletext-nopermission": "ߛߓߍߟߌ߫ ߛߌ߫ ߕߍ߫ ߞߐߜߍ ߣߌ߲߭ ߞߊ߲߬ ߕߋ߲߫.\nߌ ߘߌ߫ ߛߋ߫ [[Special:Search/{{PAGENAME}}|search for this page title]] ߢߌߣߌ߲߫ ߠߊ߫ ߞߐߜߍ ߕߐ߭ ߟߎ߬ ߘߐ߫߸ ߥߟߊ߫ <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} search the related logs]</span> ߞߏ߬ߣߌ߲߬ ߘߌ߬ߢߍ߬ ߞߍߣߍ߲߫ ߕߴߌ ߡߊ߬ ߞߐߜߍ߫ ߣߌ߲߬ ߠߊߞߊ߭ ߘߐ߫.",
+       "userpage-userdoesnotexist-view": "ߟߊ߬ߓߊ߰ߙߊ߬ ߕߐ߮ \"$1\" ߛߙߍߘߍߦߊߣߍ߲߫ ߕߍ߫.",
+       "previewnote": "<strong>ߌ ߖߊ߲߬ߓߌ߬ߟߊ߬ ߞߏ߫ ߣߌ߲߬ ߦߋ߫ ߢߍߝߟߍߟߌ ߘߐߙߐ߲߫ ߠߋ߬ ߘߌ߫. </strong> ߌ ߟߊ߫ ߡߝߊ߬ߟߋ߲߬ߠߌ ߟߎ߫ ߡߊ߫ ߟߊߞߎ߲߬ߘߎ߬ ߝߟߐ߫ ߘߋ߬ ߹",
+       "continue-editing": "ߥߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߬ ߞߣߍ ߞߊ߲߬",
+       "editing": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߦߋ߫ ߛߋ߲߬ߠߊ߫ $1",
+       "creating": "$1 ߛߌ߲ߘߟߌ ߦߋ߫ ߛߋ߲߬ߠߊ߫",
+       "editingsection": "(ߛߌ߰ߘߊ߬)$1 ߡߊߦߟߍ߬ߡߊ߲ ߦߋ߫ ߛߋ߲߬ߠߊ߫",
+       "templatesused": "{{PLURAL:$1|ߞߙߊߞߏ|ߞߙߊߞߏ ߟߎ߫}} ߟߎ߫ ߟߊߓߊ߯ߙߊ߫ ߘߊ߫ ߞߐߜߍ ߣߌ߲߬ ߘߐ߫",
+       "template-protected": "(ߊ߬ ߟߊߞߊ߲ߘߊߣߍ߲ ߠߋ߬)",
+       "template-semiprotected": "(ߟߊ߬ߞߊ߲߬ߘߊ߬ߟߌ-ߝߊ߲߬ߞߋ߬ߟߋ߲߬ߡߊ)",
+       "hiddencategories": "ߞߐߜߍ ߣߌ߲߬ ߦߋ߫ ߢߌ߲߬ ߠߎ߫ ߛߌ߲߬ߝߏ߲ ߠߋ߬ ߘߌ߫{{PLURAL:$1|}}",
+       "permissionserrors": "ߝߌ߬ߟߌ߫ ߘߌ߬ߢߍ߬ߒߧߋ",
+       "permissionserrorstext-withaction": "ߟߊ߬ߘߌ߬ߢߍ߬ߟߌ߬ ߛߌ߫ ߕߴߌ ߦߋ߫ ߞߊ߬ $2߸ {{PLURAL:$1|ߞߏߛߐ߲߬|ߟߎ߬ ߞߏߛߐ߲߬}}",
+       "content-model-wikitext": "ߥߞߌ߫ ߞߟߏߜߍ",
+       "viewpagelogs": "ߞߐߜߍ ߣߌ߲߬ ߜߊ߲߬ߞߎ߲߬ߠߌ߲ ߠߎ߬ ߦߋ߫",
+       "currentrev-asof": "$1 ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߕߊ߬ߡߌ߲߬ߣߍ߲",
+       "revisionasof": "ߊ߬ ߡߊߛߊ߬ߦߌ߲ ߦߊ߲߬ ߓߊ߫ 1$",
+       "revision-info": "{{GENDER:$6|$2}} ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ $2",
+       "previousrevision": "→ ߡߊ߬ߛߊ߬ߦߌ߲߬ߠߌ߲ ߞߘߐ߬ߡߊ߲",
+       "nextrevision": "ߡߊ߬ߛߋ߬ߦߌ߲߬ߣߍ߲߬ ߞߎߘߊ →",
+       "currentrevisionlink": "ߡߊ߬ߛߊ߬ߦߌ߲߬ߠߌ߲ ߕߊ߬ߡߌ߲߬ߣߍ߲",
+       "cur": "ߞߍߞߎߘߊ",
+       "last": "ߢߍߕߊ",
+       "history-fieldset-title": "ߣߐ߬ߡߊ߬ߛߊߦߌ߲ ߠߎ߬ ߛߍ߲ߛߍ߲߫",
+       "histfirst": "ߞߘߐ߬ߡߊ߲ ߠߎ߬",
+       "histlast": "ߞߎߘߊ ߟߎ߬",
+       "history-feed-title": "ߡߊ߬ߛߊ߬ߦߌ߲߬ߠߌ߲ ߘߐ߬ߝߐ",
+       "history-feed-description": "ߞߐߜߍ ߣߌ߲߬ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߘߐ߬ߝߐ߸ ߥߞߌ ߘߐ߫",
+       "rev-delundel": "ߊ߬ ߦߋߢߊ ߡߊߦߟߍ߬ߡߊ߲߫",
+       "history-title": "$1 ߡߛߊ߬ߦߌ߲߬ߠߌ߲ ߘߐ߬ߝߐ",
+       "lineno": "$1 ߛߌ߬ߕߊߙߌ",
+       "compareselectedversions": "ߘߟߊߡߌߘߊ߫ ߛߎߥߊ߲ߘߌߣߍ߲ ߠߎ߬ ߟߊߢߐ߲߯ߡߊ߫",
+       "editundo": "ߊ߬ ߘߐߛߊ߬߸ ߊ߬ ߓߟߏߞߊ߬߸ ߊ߬ ߓߙߐߕߐ߫",
+       "diff-empty": "ߝߊߙߊ߲ߝߊ߯ߛߌ߫ ߕߴߊ߬ߟߎ߬ ߕߍ߫",
+       "searchresults": "ߢߌߣߌ߲ߠߌ߲ ߞߐߝߟߌ ߟߎ߬",
+       "searchresults-title": "ߢߌߣߌ߲ߠߌ߲ ߞߐߝߟߌ$1",
+       "prevn": "ߕߊ߬ߡߌ߲߬ߣߍ߲ ߠߎ߬ {{PLURAL:$1|$1}}",
+       "nextn": "$1{{PLURAL:$1|ߟߊߕߎ߲߰ߠߊ}}",
+       "nextn-title": "ߢߍߕߊ$1{{PLURAL:$1|ߞߐߖߋߓߌ}}",
+       "shown-title": "ߦߌߘߊߞߊ߬ $1{{PLURAL:$1|ߞߐߝߟߌ |ߞߐߝߟߌ ߟߎ߬ }} ߞߐߜߍ߫ ߞߋ߬ߟߋ߲߬ߞߋ߬ߟߋ߲߬ߠߊ",
+       "viewprevnext": "($1 {{int:pipe-separator}} $2) ($3) ߦߋ߫",
+       "searchprofile-articles": "ߞߐߜߍ ߞߣߐߘߐ",
+       "searchprofile-images": "ߡߍ߲ߕߊߦߋߕߊ",
+       "searchprofile-everything": "ߊ߬ ߡߎ߰ߡߍ",
+       "searchprofile-advanced": "ߖߊ߲߬ߝߊ߬ߣߍ߲",
+       "searchprofile-articles-tooltip": "ߊ߬ ߢߌߣߌ߲߫ $1 ߘߐ߫",
+       "searchprofile-images-tooltip": "ߞߐߕߐ߮ ߟߎ߬ ߢߌߣߌ߲߫",
+       "searchprofile-everything-tooltip": "ߊ߬ ߞߣߐߘߐ ߓߍ߯ ߢߌߣߌ߲߫ (ߤߊߟߌ߬ ߞߎߡߊߢߐ߲߯ߦߊ߫ ߞߐߜߍ ߟߎ߬)",
+       "searchprofile-advanced-tooltip": "ߊ߬ ߢߌߣߌ߲߫ ߛߊ߲߬ߠߌ߲߬ߢߐ߲߮ ߠߎ߬ ߕߐ߮ ߞߣߍ ߘߐ߫",
+       "search-result-size": "$1 ({{PLURAL:$2|1 ߞߎߡߊߘߋ߲|$2 ߞߎߡߊߘߋ߲ ߠߎ߬}})",
+       "search-redirect": "(ߌ ߟߊߞߎ߲߬ߛߌ߲߬ߣߍ߲߫ ߞߊ߬ ߓߐ߫ ߦߊ߲߬ $1)",
+       "search-section": "(ߕߍߕߍ߮ $1)",
+       "search-suggest": "ߌ ߞߊ߲߫ ߦߋ߫ ߣߌ߲߬ ߠߋ߬ ߡߊ߬ $1",
+       "searchall": "ߊ߬ ߓߍ߯",
+       "search-nonefound": "ߖߋ߬ߓߟߌ߬ ߛߌ߫ ߕߍ߫ ߢߌ߬ߣߌ߲߬ߞߊ߬ߟߌ ߣߌ߲߫ ߞߊ߲߬.",
+       "mypreferences": "ߟߊ߬ߝߌ߬ߛߦߊ߬ߟߌ",
+       "group-sysop": "ߡߙߊ߬ߟߌ߬ߟߊ",
+       "right-writeapi": "ߛߓߍߟߌ API ߟߊߓߊ߯ߙߊ߫",
+       "newuserlogpage": "ߖߊ߬ߕߋ߬ߘߊ߬ ߓߘߊ߫ ߟߊߞߊ߬ ߌ ߜߊ߲߬ߞߎ߲߬",
+       "action-edit": "ߞߐߜߍ ߣߌ߲߬ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "action-createaccount": "ߖߊ߬ߕߋ߬ߘߊ߬ ߟߊߓߊ߯ߙߕߊ ߣߌ߲߬ ߠߊߘߊ߲߫",
+       "enhancedrc-history": "ߕߊ߬ߡߌ߲߬ߣߍ߲",
+       "recentchanges": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߫ ߞߎߘߊ",
+       "recentchanges-legend": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߞߎߘߊ ߟߎ߫ ߟߊ߬ߓߍ߲߬ߢߐ߰ߡߦߊ߬ߘߊ",
+       "recentchanges-summary": "ߥߞߌ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߞߎ߲ߓߊ ߡߍ߲ ߠߎ߬ ߞߍߣߍ߲߫ ߞߐߜߍ ߣߌ߲߬ ߞߊ߲߬߸ ߏ߬ ߟߎ߫ ߣߐ߬ߣߐ߬.",
+       "recentchanges-noresult": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߬ ߛߌ߫ ߓߍ߲߬ߢߐ߲߰ߦߊ߬ߣߍ߲߬ ߕߍ߫ ߛߎߡߊ߲ߡߕߊ ߢߌ߲߬ ߠߎ߫ ߡߊ߬ ߕߎ߬ߡߊ߬ ߟߊߕߍ߰ߣߍ߲ ߦߌ߬ߘߊ ߘߐ߫.",
+       "recentchanges-label-newpage": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߣߌ߲߬ ߓߘߊ߫ ߘߐߜߍ߫ ߞߎߘߊ ߟߊߘߊ߲߫",
+       "recentchanges-label-minor": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߘߋ߬ߣߍ߲ ߠߋ߫ ߦߋ߫",
+       "recentchanges-label-bot": "ߡߐ߰ߡߐ߮ ߟߋ߫ ߣߐ߬ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ ߣߌ߲߬ ߞߍ߫ ߟߊ߫",
+       "recentchanges-label-unpatrolled": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߣߌ߲߬ ߡߊ߫ ߓߍ߬ߙߍ߲߬ߓߍ߬ߙߍ߲߬ ߡߎߣߎ߲߬",
+       "recentchanges-label-plusminus": "ߞߐߜߍ ߢߊ߲ߞߊ߲ ߓߘߊ߫ ߡߊߦߟߍ߬ߡߊ߲߫ ߞߵߊ߬ ߝߌ߬ߘߊ߲ ߦߙߌߞߊ ߣߌ߲߬ ߘߌ߫",
+       "recentchanges-legend-heading": "<strong>ߡߊ߬ߛߙߋ:</strong>",
+       "rclistfrom": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߞߎߘߊ ߟߎ߫ ߦߌ߬ߘߊ ߘߊߡߌ߬ߣߊ߬ ߣߌ߲߭ ߡߊ߬",
+       "rcshowhideminor": "$1ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߘߋ߬ߣߍ߲",
+       "rcshowhideminor-show": "ߊ߬ ߦߌ߬ߘߊ߬",
+       "rcshowhideminor-hide": "ߊ߬ ߢߡߊߘߏ߲߰",
+       "rcshowhidebots": "$1 ߡߐ߰ߡߐ߮",
+       "rcshowhidebots-show": "ߊ߬ ߦߌ߬ߘߊ߬",
+       "rcshowhidebots-hide": "ߊ߬ ߢߡߊߘߏ߲߰",
+       "rcshowhideliu": "$1 ߟߊߓߊ߯ߙߊߓߊ߯ ߛߙߍߘߍߦߊߣߍ߲ ߠߎ߬",
+       "rcshowhideliu-show": "ߊ߬ ߦߌ߬ߘߊ߬",
+       "rcshowhideliu-hide": "ߊ߬ ߢߡߊߘߏ߲߰",
+       "rcshowhideanons": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߊ߫ ߕߐ߯ߒߕߊ߲ $1",
+       "rcshowhideanons-show": "ߦߌ߬ߘߊ߬ߟߌ",
+       "rcshowhideanons-hide": "ߊ߬ ߘߏ߲߰",
+       "rcshowhidemine": "ߒ ߠߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߠߎ߬ $1",
+       "rcshowhidemine-show": "ߊ߬ ߦߌ߬ߘߊ߬",
+       "rcshowhidemine-hide": "ߊ߬ ߦߡߊߘߏ߲߰",
+       "rclinks": "ߕߋ߬ߟߋ $2 ߕߊ߬ߡߌ߲߬ߣߍ߲ ߣߌ߲߬ ߡߝߊ߬ߟߋ߲߬ߠߌ߲߬ ߟߊ߬ߓߊ߲ $1 ߦߌ߬ߘߊ߬",
+       "diff": "ߘߊ߲߬ߝߘߊ߬ߓߐ",
+       "hist": "ߕߊ߬ߡߌ߲߬ߣߍ߲",
+       "hide": "ߊ߬ ߢߡߊߘߏ߲߰",
+       "show": "ߊ߬ ߦߌ߬ߘߊ߬",
+       "minoreditletter": "ߡ",
+       "newpageletter": "ߞ",
+       "boteditletter": "ߡ",
+       "rc-change-size-new": "$1 {{PLURAL:$1|byte|bytes}} ߘߐ߬ߝߊ߬ߟߋ߲߬ߠߌ ߞߐ߫",
+       "recentchangeslinked": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߜߋ߲߬ߞߘߎ߬ߢߐ߲߰ߡߊ ߟߎ߬",
+       "recentchangeslinked-toolbox": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߫ ߓߌ߬ߟߊ߬ߢߐ߲߰ߡߊ",
+       "recentchangeslinked-title": "ߊ߬ ߟߌ߬ߤߟߊ ߡߊߦߟߍ߬ߡߊ߲߫ ߦߊ߲߬$1",
+       "recentchangeslinked-summary": "ߞߐߜߍ ߕߐ߮ ߟߊߘߏ߲߬߸ ߦߟߍ߬ߡߊ߲ ߡߍ߲ ߠߎ߬ ߘߏ߲߬ߣߍ߲߬ ߦߋ߫ ߞߐߜߍ ߟߎ߬ ߘߐ߫߸ ߥߟߊ߫ ߞߐߜߍ ߣߌ߲߬ ߘߐ߫߸ ߞߵߏ߬ ߦߋ߫. (ߖߐ߲߬ߛߊ߬ ߌ ߘߌ߫ ߦߌߟߡߊ ߛߌ߲߬ߝߏ߲ ߠߎ߬ ߦߋ߫߸  {{ns:category}}: ߦߌߟߡߊ ߕߐ߮ ߟߊߘߏ߲߬).ߞߵߊ߬ ߦߟߍ߬ߡߊ߲߬ ߞߐߜߍ ߣߌ߲߬ [[Special:Watchlist|your Watchlist]] ߘߌ߫߸ ߏ߬ ߦߋ߫ <strong>ߛߓߍߘߋ߲߫ ߞߎ߲ߓߊ</strong>",
+       "recentchangeslinked-page": "ߘߐߜߍ ߕߐ߮:",
+       "upload": "ߞߐߕߐ߮ ߟߊߦߟߍ߬",
+       "filedesc": "ߟߊߘߛߏߣߍ߲",
+       "license-header": "ߟߊ߬ߘߌ߬ߢߍ߬ߟߌ ߦߴߌ ߘߐ߫",
+       "imgfile": "ߞߐߕߐ߮",
+       "listfiles": "ߞߐߕߐ߮ ߛߙߍߘߍ",
+       "file-anchor-link": "ߞߐߕߐ߮",
+       "filehist": "ߞߐߕߐ߮ ߟߊ߫ ߘߐ߬ߝߐ",
+       "filehist-help": "ߕߎ߬ߡߊ߬ߘߊ/ߕߎ߬ߡߊ ߛߐ߲߬ߞߌ߲߬ ߓߊ߫߸ ߞߊ߬ ߕߎ߬ߡߊ߬ߘߊ ߞߐߕߐ߮ ߟߎ߬ ߦߋ߫.",
+       "filehist-current": "ߞߍߛߊ߲ߞߏ",
+       "filehist-datetime": "ߕߎ߬ߡߊ߬ߘߊ/ߕߎ߬ߡߊ߬ߟߊ߲",
+       "filehist-thumb": "ߞߝߊ߬ߟߋ߲ߛߋ߲",
+       "filehist-user": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ",
+       "filehist-dimensions": "ߛߎߡߊ߲ߘߐ",
+       "filehist-comment": "ߞߊ߲߬ߝߐߟߌ",
+       "imagelinks": "ߞߐߕߐ߮ ߟߊߓߊ߯ߙߊ",
+       "linkstoimage": "ߞߐߕߐ߮ ߣߌ߲߬ {{PLURAL:$1|ߞߐߜߍ ߟߎ߬|$1 ߞߐߜߍ ߟߎ߬}}:",
+       "nolinkstoimage": " ߞߐߜߍ߫ ߛߌ߫ ߡߊ߫ ߞߐߕߐ߮ ߣߌ߲߬ ߠߊߓߊ߯ߙߊ߫ ߡߎߣߎ߲߬",
+       "sharedupload-desc-here": "ߘߐ߬ߛߙߋ ߣߌ߲߬ ߦߋ߫ ߦߊ߲߬ ߠߋ߫ $1 ߖߊ߬ߕߋ߬ߘߐ߬ߛߌ߮ ߕߐ߭ ߟߎ߬ ߞߏ߬ߣߌ߲ ߘߌ߫ ߛߴߊ߬ ߟߊߓߊ߯ߙߊ߫ ߟߊ߫. ߊ߬ ߕߐ߯ ߛߓߍߟߌ ߦߙߐ $2 ߟߋ߬ ߦߋ߫ ߘߎ߰ߟߊ ߘߐ߫ ߣߌ߲߬.",
+       "filepage-nofile": "ߕߐ߮ ߣߌ߲߬ ߞߐߕߐ߯ ߛߎ߯ ߕߍ߫ ߦߋ߲߬",
+       "upload-disallowed-here": "ߌ ߕߍߣߊ߬ ߞߐߜߍ ߣߌ߲߬ ߞߊ߲߬ߛߓߍ߫ ߟߊ߫.",
+       "randompage": "ߓߍ߲߬ߛߋ߲߬ߡߊ߬ ߞߐߜߍ",
+       "statistics": "ߖߊ߬ߕߋ߬ߛߎ߬ߓߐ ߟߎ߬",
+       "nbytes": "$1 {{PLURAL:$1|byte|bytes}}",
+       "nmembers": "$1 {{PLURAL:$1|ߛߌ߲߬ߝߏ߲ |members}}",
+       "prefixindex": "ߞߐߜߍ߫ ߡߍ߲ ߠߎ߬ ߓߍ߯ ߟߊߝߟߐߣߍ߲߫...",
+       "listusers": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ ߛߙߍߘߍ",
+       "newpages": "ߘߐߜߍ߫ ߞߎߘߊ",
+       "move": "ߊ߬ ߛߋ߲߬ߓߐ߫",
+       "pager-older-n": "{{PLURAL:$1|ߞߘߐ߬ߡߊ߲ ߁|ߞߘߐ߬ߡߊ߲ ߠߎ߬ $1}}",
+       "booksources": "ߞߊ߬ߝߊ ߛߎ߲",
+       "booksources-search-legend": "ߞߊ߬ߝߊ ߛߎ߲ ߕߌߙߌ߲߫",
+       "booksources-search": "ߢߌߣߌ߲ߠߌ߲",
+       "specialloguserlabel": "ߞߍߓߊ߮ :",
+       "log": "ߘߏ߲߬",
+       "logempty": "ߦߙߍߞߍߟߌ߫ ߛߌ߫ ߓߍ߲߬ߢߐ߲߰ߦߊ߬ߣߍ߲߬ ߕߍ߫ ߝߐ߰ߓߍ ߟߎ߬ ߘߐ߫",
+       "allpages": "ߞߐߜߍ ߟߎ߬ ߓߍ߯",
+       "allarticles": "ߞߐߜߍ ߟߎ߬ ߓߍ߯",
+       "allpagessubmit": "ߥߊ߫",
+       "categories": "ߦߌߟߡߊ ߟߎ߬",
+       "listgrouprights-members": "ߛߌ߲߬ߝߏ߲ ߠߎ߫ ߛߙߍߘߍ",
+       "emailuser": "ߗߋߛߓߍ ߗߋ߫ ߣߌ߲߬ ߕߌ߭ ߡߊ߬",
+       "usermessage-editor": "ߞߊ߲ߞߋ߫ ߗߋߛߓߍ ߡߊߦߟߍ߬ߡߊ߲߬ߓߊ߮",
+       "mywatchlist": "ߘߐߜߍ߫ ߘ߲ߜߍߕߊ",
+       "watch": "ߊ߬ ߘߐߜߍ߫",
+       "unwatch": "ߊ߬ ߞߍ߫ ߦߋߓߊߟߌ ߘߌ߫",
+       "wlshowlast": "ߕߎ߬ߡߊ߬ߙߋ߲ $1 ߞߐߟߕߊ $2 ߕߋ߬ߟߋ ߟߎ߬ ߦߌ߬ߘߊ߬",
+       "dellogpage": "ߜߊ߲߬ߞߎ߲߬ߠߌ߲ ߖߏ߬ߛߌ߬ߣߍ߲",
+       "rollbacklink": "ߘߐߛߵߊ߬ ߡߊ߬",
+       "protectlogpage": "ߜߊ߲߬ߞߎ߲߬ߠߌ߲߬ ߠߊߞߊ߲ߘߊߣߍ߲",
+       "protectedarticle": "ߟߊ߬ߞߊ߲߬ߘߊ߬ߣߍ߲ \"[[$1]]\"",
+       "protect-default": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ ߟߎ߬ ߓߍ߯ ߟߊߘߌ߬ߢߍ߬",
+       "restriction-edit": "ߊ߬ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "restriction-move": "ߕߐ߯ߦߊ߫",
+       "namespace": "ߕߐ߯ ߛߓߍ ߞߣߍ",
+       "tooltip-invert": "ߞߏ߲߬ߘߏ ߣߌ߲߬ ߘߐߜߍ߫߸ ߞߊ߬ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߠߎ߬ ߢߡߊߘߏ߲߰ ߞߐߜߍ ߟߎ߬ ߕߐ߯ ߞߣߍ߫ ߓߊߓߌ߬ߟߊ߬ߣߍ߲ ߘߐ߫ (ߊ߬ ߣߌ߫ ߕߐ߯ ߞߣߍ߫ ߓߟߏߘߏ߲߬ߣߍ߲ ߘߐߜߍߣߍ߲ ߠߎ߬)",
+       "namespace_association": "ߕߐ߯ ߓߟߏߘߏ߲߬ߣߍ߲߫ ߢߐ߲߰ߓߟߏ",
+       "blanknamespace": "ߓߊߖߎ",
+       "contributions": "{{GENDER:$1|ߞߊ߬ߘߌ߬ߛߊ߬}} ߓߟߏߡߊߜߍ߲",
+       "contributions-title": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ ߟߊ߫ ߓߟߏߓߌߟߊߢߐ߲߯ߞߊ߲ ߡߍ߲ ߦߋ߫$1",
+       "mycontris": "ߓߟߏߓߌߟߊߢߐ߲߯ߞߊ߲",
+       "anoncontribs": "ߓߟߏߓߌߟߊߢߐ߲߯ߞߊ߲ ߠߎ߬",
+       "contribsub2": "{{GENDER:$3|$1}} ߕߊ ($2)",
+       "month": "ߞߵߊ߬ ߕߊ߬ ߞߊߙߏ ߡߊ߬ (ߊ߬ ߣߌ߫ ߞߊߙߏ ߞߎ߲߬ߝߟߐ ߘߐ߫)",
+       "year": "ߞߵߊ߬ ߕߊ߬ ߞߊߙߏ ߡߊ߬ (ߊ߬ ߣߌ߫ ߞߊߙߏ ߞߎ߲߬ߝߟߐ ߡߊ߬)",
+       "sp-contributions-newbies": "ߖߊ߬ߕߋ߬ߘߊ߬ ߞߎߘߊ ߟߎ߫ ߘߐߙߐ߲߫ ߠߊ߫ ߓߟߏߓߌߟߊߢߐ߲߯ߞߊ߲ ߦߌ߬ߘߊ߫ ߕߋ߲߬",
+       "sp-contributions-uploads": "ߟߊ߬ߦߟߍ߬ߟߌ ߟߎ߬",
+       "sp-contributions-talk": "ߞߎߡߊߢߐ߲߯ߦߊ",
+       "sp-contributions-search": "ߓߟߏߓߌߟߊߢߐ߲߯ߞߊ߲ ߘߏ߫ ߢߌߣߌ߲߫",
+       "sp-contributions-username": "IP ߛߊ߲߬ߓߊ߬ߕߐ߮ ߥߟߊ߫ ߟߊ߬ߓߊ߰ߙߊ߬ߕߐ߮:",
+       "sp-contributions-newonly": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߡߍ߲ ߣߊ߬ ߞߐߜߍ߫ ߟߊߘߊ߲ ߘߌ߫߸ ߏ߬ ߟߎ߫ ߘߐߙߐ߲߫ ߦߌ߬ߘߊ߬",
+       "sp-contributions-submit": "ߢߌߣߌ߲ߠߌ߲",
+       "whatlinkshere": "ߛߘߌ߬ߜߋ߲ ߢߎ߬ߡߊ߲߬ ߦߋ߫ ߦߊ߲߬",
+       "whatlinkshere-title": "ߞߐߜߍ ߡߍ߲ ߠߎ߫ ߛߘߌ߬ߣߍ߲߫ ߝߊ߲߭ ߣߌ߲߬ $1 ߡߊ߬",
+       "whatlinkshere-page": "ߘߐߜߍ:",
+       "linkshere": "ߞߐߜߍ ߟߎ߬ ߛߘߌ߬ߜߋ߲ ߡߍ߲ ߠߎ߬ ߦߋ߫ ߦߊ߲߬ <strong>$2</strong>:",
+       "nolinkshere": "ߞߐߜߍ߫ ߛߌ߫ ߟߎ߫ ߛߘߌ߬ߜߋ߲߬ ߕߍ߫ ߦߋ߲߬ <strong>$2</strong>.",
+       "isredirect": "ߞߎ߲߬ߕߋ߬ߟߋ߲߬ ߞߎߘߊ ߞߐߜߍ",
+       "isimage": "ߞߐߕߐ߮ ߛߘߌ߬ߜߋ߲",
+       "whatlinkshere-prev": "{{PLURAL:$1|ߢߝߍߕߊ ߟߎ߬|ߢߝߍߕߊ ߟߎ߬ $1}}",
+       "whatlinkshere-next": "{{PLURAL:$1|ߢߍߕߊ|ߢߍߕߊ $1}}",
+       "whatlinkshere-links": "→ ߛߘߌ߬ߜߋ߲",
+       "whatlinkshere-hideredirs": "ߟߊ߬ߞߎ߲߬ߛߌ߲߬ߠߌ߲ ߠߎ߬ $1",
+       "whatlinkshere-hidetrans": "ߟߊ߬ߘߏ߲߬ߘߐ߬ߟߌ ߓߊ߲ߓߊ߲ߣߍ߲",
+       "whatlinkshere-hidelinks": "ߛߘߌ߬ߜߋ߲$1",
+       "whatlinkshere-hideimages": "ߞߐߕߐ߮ ߛߘߌ߬ߜߋ߲$1",
+       "whatlinkshere-filters": "ߢߡߊߘߏ߲߰ߣߍ߲",
+       "ipboptions": "ߕߎ߬ߡߊ߬ߙߋ߲ ߂:2 hours, ߕߟߋ߬ ߁:1 day, ߕߋ߬ߟߋ ߃:3 days,ߞߎ߲߬ߢߐ߰ ߁:1 week, ߞߎ߲߬ߢߐ߮ ߂:2 weeks, ߞߊߙߏ߫ ߁:1 month, ߞߊߙߏ߫ ߃:3 months, ߞߊߙߏ߫ ߆:6 months,ߛߊ߲߬ ߁:1 year,ߤߊ߲߯ ߤߌ߲߯:infinite",
+       "blocklink": "ߟߊ߬ߢߊ߬ߙߊ߲߬ߠߌ",
+       "contribslink": "ߡߊߛߐ߯ߟߌ",
+       "movelogpage": "ߜߊ߲߬ߞߎ߲ ߓߐ߫ ߊ߬ ߡߊ߬",
+       "export": "ߞߐߜߍ ߟߎ߬ ߟߊߝߏ߬ߦߌ߬",
+       "thumbnail-more": "ߊ߬ ߟߊߞߎ߲߬ߓߦߊ߬",
+       "tooltip-pt-userpage": "{{GENDER:|ߌ ߟߊ߫ ߟߊ߬ߓߊ߰ߙߊ߬ߟߌ߬}} ߞߐߜߍ",
+       "tooltip-pt-mytalk": "{{GENDER:|ߟߊ߫}} ߞߎߡߊ߫ ߞߐߜߍ",
+       "tooltip-pt-preferences": "{{GENDER:|ߌ}} ߤߣߍߕߊ ߟߎ߬",
+       "tooltip-pt-watchlist": "ߌ ߟߊ߫ ߞߐߜߍ߫ ߡߊߦߟߍ߬ߡߊ߲߬ߕߊ ߜߋ߬ߟߎ߲߬ߣߍ߲ ߠߎ߬ ߛߙߍߘߍ",
+       "tooltip-pt-mycontris": "{{GENDER:|ߟߊ߫}} ߓߟߏߡߊߜߍ߲ ߠߎ߬",
+       "tooltip-pt-login": "ߌ ߡߊߘߌߦߊߣߍ߲߫ ߦߴߌ ߜߊ߲߬ߞߎ߲߫ ߸ ߘߌߦߊߜߏߦߊ߫ ߞߏ߬ߣߌ߲߬ ߕߍ߫",
+       "tooltip-pt-logout": "ߌ ߜߊ߲߬ߞߎ߲߬ ߓߐ߫",
+       "tooltip-pt-createaccount": "ߌ ߡߊߘߌߦߊߣߍ߲߫ ߦߋ߫ ߖߊ߬ߕߋ߬ߘߊ߫ ߟߊߞߊ߬ ߞߵߌ ߜߊ߲߬ߞߎ߲߫ ߸ ߓߊ߬ߙߌ߬ ߌ ߘߌߦߊߜߏߦߊߣߍ߲߫ ߕߍ߫",
+       "tooltip-ca-talk": "ߘߐ߬ߞߕߌ߬ߟߌ ߞߊ߬ ߓߍ߲߬ ߞߐߜߍ ߞߣߐߘߐ ߡߊ߬",
+       "tooltip-ca-edit": "ߞߐߜߍ ߣߌ߲߬ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "tooltip-ca-addsection": "ߛߌ߰ߘߊ߬ ߞߎߘߊ߫ ߘߊߡߌ߬ߣߊ߬",
+       "tooltip-ca-viewsource": "ߞߐߜߍ ߣߌ߲߬ ߠߊߞߊ߲ߘߊߣߍ߲߫ ߠߋ߬.\nߌ ߘߌ߫ ߛߴߊ߬ ߛߎ߲ ߘߐߜߍ߫ ߟߊ߫",
+       "tooltip-ca-history": "ߞߐߜߍ ߣߌ߲߬ ߛߊߞߍߟߌ߫ ߕߊ߬ߡߌ߲߬ߣߍ߲ ߠߎ߫ ߘߐߜߍ߫",
+       "tooltip-ca-protect": "ߞߐߜߍ ߣߌ߲߬ ߠߊߞߊ߲ߘߊ߫",
+       "tooltip-ca-delete": "ߞߐߜߍ ߣߌ߲߬ ߖߏ߰ߛߌ߫",
+       "tooltip-ca-move": "ߘߐߜߍ ߣߌ߲߬ ߛߋ߲߬ߓߐ߫",
+       "tooltip-ca-watch": "ߞߐߜߍ ߣߌ߲߬ ߝߙߊ߬ ߌ ߟߊ߫ ߟߊߞߙߐ߬ߛߌ߬ߕߊ߬ ߛߙߍߘߍ ߟߎ߫ ߞߊ߲߬",
+       "tooltip-search": "ߊ߬ ߢߌߣߌ߲߫ {{SITENAME}} ߘߐ߫",
+       "tooltip-search-go": "ߕߐ߮ ߣߌ߲߬ ߢߌߣߌ߲߫ ߞߐߜߍ߫ ߞߣߐ߫ ߣߴߊ߬ ߞߍ߫ ߘߊ߫ ߦߋ߲߬",
+       "tooltip-search-fulltext": "ߞߎߡߊߘߋ߲߫  ߣߌ߲߬ ߞߐߜߍ߫ ߟߎ߫ ߢߌߣߌ߲߫",
+       "tooltip-p-logo": "ߞߐߜߍ߫ ߓߏߟߏ߲ߘߊ ߡߊߝߍߣߍ߲߫",
+       "tooltip-n-mainpage": "ߞߐߜߍ߫ ߓߏߟߏ߲ߘߊ ߡߊߝߍߣߍ߲߫",
+       "tooltip-n-mainpage-description": "ߞߐߜߍ߫ ߓߏߟߏ߲ߘߊ ߡߊߝߍߣߍ߲߫",
+       "tooltip-n-portal": "ߞߊ߬ ߓߍ߲߬ ߣߕߊ߬ߘߐ߬ߛߌ ߡߊ߬ ߸ ߌ ߘߴߛߋ߫ ߡߎ߲߬ ߞߍ߫ ߟߊ߫ ߸ ߝߋ߲ ߠߎ߫ ߦߋ߫ ߛߐ߬ߘߐ߲߬ ߠߊ߫ ߡߌ߲߫",
+       "tooltip-n-currentevents": "ߌ ߟߊ߫ ߞߎ߲߬ߠߊ߬ߝߎߟߋ߲ ߡߊߞߊ߬ߝߏ߬ ߞߊ߬ ߓߍ߲߬ ߞߍߕߊ ߡߍ߲ ߠߎ߫ ߦߋ߫ ߛߋ߲߬ߠߊ߫",
+       "tooltip-n-recentchanges": "ߘߐ߬ߝߊ߬ߟߋ߲߬ߠߌ߬ ߞߎߘߊ ߟߎ߬ ߛߙߍߘߍ ߥߞߌ߫ ߞߣߐ߫",
+       "tooltip-n-randompage": "ߓߍ߲߬ߛߋ߲߬ߡߊ߬ ߞߐߜߍ ߘߏ߫ ߦߌ߬ߘߊ߬",
+       "tooltip-n-help": "ߊ߬ ߢߌߣߌ߲߫ ߦߙߐ",
+       "tooltip-t-whatlinkshere": "ߥߞߌ߫ ߞߐߜߍ ߓߍ߯ ߛߘߌ߬ߜߋ߲ ߠߋ߬ ߦߋ߫ ߦߊ߲߬",
+       "tooltip-t-recentchangeslinked": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߬ ߞߎߘߊ ߟߎ߬ ߞߐߜߍ߫ ߘߐ߫ ߡߍ߲ ߣߌ߫ ߞߐߜߍ ߣߌ߲߬ ߕߎ߲߰ߣߍ߲߫",
+       "tooltip-feed-atom": "ߞߐߜߍ ߣߌ߲߬ ߝߕߌ߫ ߓߊߟߏ",
+       "tooltip-t-contributions": "{{GENDER:$1|ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ}} ߟߊ߫ ߓߟߏߓߌߟߊߢߐ߲߮ߞߊ߲ ߛߙߍߘߍ",
+       "tooltip-t-emailuser": " ߢߎߡߍߙߋ߲ߞߏ߲ߘߏ ߟߊߕߊ߯ ߟߊߓߊ߯ߙߟߊ ߣߌ߲߬ ߡߊ߬{{GENDER:$1|ߟߊߓߊ߯ߙߟߊ(ߡߏ߬ߛߏ) }}",
+       "tooltip-t-upload": "ߞߐߕߐ߮ ߟߎ߫ ߟߊߦߟߍ߬",
+       "tooltip-t-specialpages": "ߘߎ߲߬ߘߎ߬ߡߊ߬ ߞߐߜߍ߫ ߟߎ߫ ߛߙߍߘߍ",
+       "tooltip-t-print": " ߞߐߜߍ ߣߌ߲߬  ߜߌ߬ߙߌ߲߬ߘߌ߬ߕߊ߬ߡߊ ߛߎ߮",
+       "tooltip-t-permalink": "ߞߐߜߍ ߣߌ߲߬ ߡߛߊ߬ߦߌ߲߬ߠߌ߲߬ ߛߘߌ߬ߜߋ߲߬ ߓߟߏߕߍ߰ߓߊߟߌ",
+       "tooltip-ca-nstab-main": "ߞߐߜߍ ߞߣߐߘߐ ߘߐߜߍ߫",
+       "tooltip-ca-nstab-user": "ߞߐߜߍ߫ ߟߊߓߊ߯ߙߕߊ ߘߐߜߍ߫",
+       "tooltip-ca-nstab-special": "ߣߌ߲߬ ߦߋ߫ ߘߐߜߍ߫ ߓߟߏߡߊߞߊ߬ߣߍ߲ ߠߋ߬ ߘߌ߫߸ ߊ߬ ߕߍ߫ ߛߋ߫ ߡߊߦߟߍ߬ߡߊ߲߬ ߠߊ߫",
+       "tooltip-ca-nstab-project": "ߖߊ߬ߕߋ߬ߘߐ߬ߛߌ߰ ߞߐߜߍ ߘߐߜߍ߫",
+       "tooltip-ca-nstab-image": "ߞߐߕߐ߮ ߞߐߜߍ ߟߎ߫ ߘߐߜߍ߫",
+       "tooltip-ca-nstab-mediawiki": "ߞߊ߲ߞߋ ߗߋߛߓߍ ߘߐߜߍ߫",
+       "tooltip-ca-nstab-template": "ߞߙߊߞߏ ߦߋ߫",
+       "tooltip-ca-nstab-category": "ߦߌߟߡߊ߫ ߞߐߜߍ ߟߎ߬ ߦߌ߬ߘߊ߬",
+       "tooltip-minoredit": "ߣߌ߲߬ ߞߍ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߘߏ߫ ߘߌ߫",
+       "tooltip-save": "ߌ ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߠߊߞߎ߲߬ߘߎ߬",
+       "tooltip-preview": "ߌ ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߘߐߜߍ߫ ߡߎߣߎ߲߬. ߏ߬ ߞߴߊ߬ ߟߊߞߎ߲߬ߘߎ ߢߍ߫ ߖߊ߰ߣߌ߲߫.",
+       "tooltip-diff": "ߌ ߟߊ߫ ߛߓߍߟߌ߫ ߡߊߦߟߍ߬ߣߍ߲ ߦߌ߬ߘߊ߬",
+       "tooltip-watch": "ߞߐߜߍ ߣߌ߲߬ ߓߌ߬ߟߊ߬ ߌ ߟߊ߫ ߜߋ߬ߟߎ߬ߠߌ߲߬ ߛߙߍߘߍ ߘߐ߫",
+       "tooltip-summary": "ߟߊ߬ߘߛߏ߬ߣߍ߲߬ ߛߎ߬ߘߎ߲߬ߣߍ߲ ߘߏ߫ ߟߊߘߏ߲߬",
+       "simpleantispam-label": "ߊ߬ ߞߍ߫ <strong>not</strong> ߣߌ߲߬ ߠߝߊ߫߹",
+       "pageinfo-header-basic": "ߞߎ߲߬ߠߊ߬ߝߎ߬ߟߋ߲߬ ߓߊߖߎ ߟߎ߬",
+       "pageinfo-header-edits": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ ߘߐ߬ߝߐ",
+       "pageinfo-header-restrictions": "ߞߐߜߍ ߟߊ߬ߞߊ߲߬ߘߊ߬ߟߌ",
+       "pageinfo-display-title": "ߞߎ߲߬ߕߐ߰ ߦߋߕߊ",
+       "pageinfo-article-id": "ߞߐߜߍ ID",
+       "pageinfo-language": "ߞߐߜߍ ߣߌ߲߬ ߞߣߐߘߐ ߞߊ߲",
+       "pageinfo-robot-policy": "ߡߐ߰ߡߐ߮ ߕߐ߰ߡߊ߬ߛߙߋ߬ߟߌ߬ ߣߐ ߟߋ߬",
+       "pageinfo-robot-index": "ߟߊߘߌ߬ߢߍ߬ߣߍ߲",
+       "pageinfo-few-watchers": "ߘߐ߯ߡߊ߲߫ $1{{PLURAL:$1|ߜߋ߬ߟߎ߲߬ߓߊ߮ |ߜߋ߬ߟߎ߲߬ߓߊ߮ ߟߎ߬ }}",
+       "pageinfo-subpages-name": "ߞߐߜߍߙߋ߲ ߦߙߌߞߊ ߡߍ߲ ߠߎ߬ ߦߋ߫ ߞߐߜߍ ߣߌ߲߬ ߘߐ߫",
+       "pageinfo-firstuser": "ߞߐߜߍ ߟߊߘߊ߲ߓߊ߮",
+       "pageinfo-firsttime": "ߞߐߜߍ ߟߊߘߊ߲߫ ߕߎߡߘߊ",
+       "pageinfo-lastuser": "ߡߊߦߟߍ߬ߡߊ߲߬ߓߊ߯ ߞߐߟߕߊ",
+       "pageinfo-lasttime": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߬ ߞߐߟߕߊ ߕߎ߬ߡߊ߬ߘߊ",
+       "pageinfo-edits": "ߡߊߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߠߎ߫ ߖߊ߬ߕߋ ߡߎ߰ߡߍ",
+       "pageinfo-authors": "ߛߓߍߦߟߊ߫ ߦߙߌߞߊ߫ ߖߊ߬ߕߋ߫ ߡߎ߰ߡߍ",
+       "pageinfo-recent-edits": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲ ߕߊ߬ߡߌ߲߬ߣߍ߲ ߝߙߍߕߍ (within past $1)",
+       "pageinfo-toolboxlink": "ߞߐߜߍ ߞߌ߬ߓߊ߬ߙߏ߬ߦߊ",
+       "pageinfo-contentpage-yes": "ߐ߲߬ߤߐ߲߫",
+       "previousdiff": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߞߘߐ",
+       "nextdiff": "ߊ߬ ߡߊ߫ ߡߊߦߟߍ߬ߡߊ߲߬",
+       "file-info-size": "$1 × $2 ߖߌ߬ߦߊ߬ߘߊ߲ߕߊ߸ ߞߐߕߐ߮ ߢߊ߲ߞߊ߲: $3߸ MIME ߛߎ߮ߦߊ:$4",
+       "file-nohires": "ߢߊߓߐߣߍ߲ ߛߊ߲ߘߐߕߊ߫ ߜߘߍ߫ ߕߍ߫ ߦߋ߲߬",
+       "show-big-image": "ߞߐߕߐ߮ ߓߊߛߎ߲",
+       "show-big-image-preview": "ߊ߬ ߢߍߦߋߟߌ ߢߊ߲ߞߊ߲$1",
+       "show-big-image-other": "{{PLURAL:$2|ߢߊߓߐߟߌ|ߢߊߓߐߟߌ ߟߎ߬}} ߕߐ߬ߡߊ $1.",
+       "show-big-image-size": "$1 × $2 ߖߌ߬ߦߊ߬ߘߊ߲ߕߊ",
+       "metadata": "ߡߋߕߊߘߊ߯ߕߊ߫",
+       "metadata-fields": "Image metadata fields listed in this message will be included on image page display when the metadata table is collapsed.\nOthers will be hidden by default.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
+       "namespacesall": "ߊ߬ ߓߍ߯",
+       "monthsall": "ߡߎ߰ߡߍ",
+       "imgmultipagenext": "ߞߐߜߍ ߢߍߕߊ",
+       "imgmultigo": "ߥߊ߫",
+       "imgmultigoto": "ߥߊ߫ ߞߐߜߍ ߣߌ߲߬ ߞߊ߲߬$1",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|talk]])",
+       "redirect-submit": "ߕߊ߯",
+       "redirect-lookup": "ߊ߬ ߘߐߜߍ߫",
+       "redirect-value": "ߡߐ߬ߟߐ߲",
+       "redirect-user": "ߟߊߓߊ߯ߙߊߟߊ ߟߊ߫ ߡߊ߬ߟߐ߲߬ߝߙߍߕߍ",
+       "redirect-page": "ߞߐߜߍ߫ ߡߊߟߐ߲ߝߙߍߕߍ",
+       "redirect-revision": "ߞߐߜߍ ߣߐ߬ߡߊ߬ߛߊ߬ߦߌ߬ ߝߙߍߕߍ",
+       "redirect-file": "ߞߐߕߐ߯ ߕߐ߮",
+       "specialpages": "ߘߎ߲߬ߘߎ߬ߡߊ߬ ߘߐߜߍ",
+       "tag-filter": "[[Special:Tags|Tag]] ߢߡߊߘߏ߲߰ߣߍ߲:",
+       "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag|Tags}}]]: $2",
+       "tags-active-yes": "ߐ߲߬ߐ߲߬ߐ߲߫",
+       "tags-active-no": "ߍ߲߬ߍ߲ߍ߲߬",
+       "tags-hitcount": "$1 {{PLURAL:$1|ߦߟߍ߬ߡߊ߲߬ߠߌ|ߦߟߍ߬ߡߊ߲߬ߠߌ ߠߎ߬}}",
+       "logentry-delete-delete": "$1 {{GENDER:$2|ߖߏ߰ߛߌ߬ߣߍ߲}} ߞߐߜߍ$3",
+       "revdelete-content-hid": "ߞߣߐߘߐ ߘߐ߲߰ߣߍ߲߫ ߠߋ߬",
+       "logentry-move-move": "$1 {{GENDER:$2|ߓߘߊ߫ ߞߐߜߍ}} ߓߐ߫ ߦߊ߲߬ $3 ߞߴߊ߬ ߟߊߕߊ߯ $4",
+       "logentry-move-move-noredirect": "$1 {{GENDER:$1|ߓߘߴߊ߬ ߓߐ߫ ߦߋ߲߬}} ߞߐߜߍ ߣߌ߲߬ $3 ߞߊ߬ ߥߴߊ߬ ߘߌ߫ $4 ߞߵߊ߬ ߕߘߍ߬ ߊ߬ ߡߴߊ߬ ߟߊߞߎ߲߬ߛߌ߲߫",
+       "logentry-newusers-create": "ߖߊ߬ߕߋ߬ߘߊ߬ ߟߊߓߊ߯ߙߕߊ $1 ߕߘߍ߬ ߦߋ߫ {{GENDER:$2|ߕߊ ߟߋ߬ ߘߌ߫}}",
+       "logentry-newusers-autocreate": "ߟߊߓߊ߯ߙߊߟߊ ߟߊ߫ ߖߊ߬ߕߋ߬ߘߊ $1{{GENDER:$2|ߟߊߘߊ߲߫ ߘߊ߫ }} ߞߍߒߖߘߍߦߋ߫ ߓߟߏߡߊ߬",
+       "logentry-upload-upload": "$1 {{GENDER:$2|ߟߊ߬ߦߟߍ߬ߟߌ߬ߣߐ ߟߋ߬}} $3",
+       "searchsuggest-search": "{{SITENAME}} ߊ߬ ߢߌߣߌ߲߫",
+       "duration-days": "$1 {{PLURAL:$1|ߟߏ߲|ߟߏ߲ ߠߎ߬}}"
+}
index af00fa4..d59f154 100644 (file)
                        "DeRudySoulStorm",
                        "Railfail536",
                        "Vlad5250",
-                       "CiaPan"
+                       "CiaPan",
+                       "BadDog"
                ]
        },
        "tog-underline": "Podkreślenie linków:",
        "passwordpolicies-policyflag-forcechange": "musi zmienić po zalogowaniu",
        "passwordpolicies-policyflag-suggestchangeonlogin": "sugerowana zmiana po zalogowaniu",
        "easydeflate-invaliddeflate": "Dostarczona zawartość nie jest poprawnie skompresowana",
-       "unprotected-js": "Ze względów bezpieczeństwa kod JavaScript nie może zostać załadowany z niezabezpieczonych stron. Prosimy dodawać JavaScript w przestrzeni MediaWiki lub jako podstronę strony użytkownika."
+       "unprotected-js": "Ze względów bezpieczeństwa kod JavaScript nie może zostać załadowany z niezabezpieczonych stron. Prosimy dodawać JavaScript w przestrzeni MediaWiki lub jako podstronę strony użytkownika.",
+       "userlogout-continue": "Jeżeli chcesz się wylogować, [$1 przejdź so strony wylogowywania].",
+       "userlogout-sessionerror": "Wylogowywanie nie powiodło się ze względu na błąd związany z sesją. [$1 Spróbuj ponownie]."
 }
index 7148e91..712ce22 100644 (file)
        "revdelete-text-file": "ړنگې شوې بڼې به لا تر اوسه پورې د مخ پېښليک کې ښکاري، خو د هغو ځينو برخو ته به عام خلک لاسرسی و نه لري.",
        "logdelete-text": "ړنگې شوې بڼې به لا تر اوسه پورې د مخ پېښليک کې ښکاري، خو د هغو ځينو برخو ته به عام خلک لاسرسی و نه لري.",
        "revdelete-text-others": "نور پازوالان به لا هم د پټ راز محتوياتو ته لاسرسی ومومي او دا یې له منځه یوسي، مګر که نه بل ډول مشخص شوی.",
-       "revdelete-confirm": "Ù\84Ø·Ù\81ا Ø¯Ø§ ØªØ§Û\8cÛ\8cد Ú©Ú\93ئ Ú\86Û\90 ØªØ§Ø³Ù\88 Ø¯Ø§ Ú©Ø§Ø± Ú©Ù\88Ù\84 ØºÙ\88اÚ\93ئØ\8c Ø¯Ø§ Ú\86Û\90 ØªØ§Ø³Ù\88 Ù¾Ø§Û\8cÙ\84Û\90 Ù¾Ù\87 Ù¾Ø§Ù\85 Ú©Û\90 Ù\84رئ Ø§Ù\88 ØªØ§Ø³Ù\88 Û\8cÛ\90 Ø³Ø±Ù\87 Ù\85طابÙ\82ت Ú©Ù\88ئ[[{{MediaWiki:Policy-url}}|پاÙ\84Û\8cسÛ\8d]].",
+       "revdelete-confirm": "Ù\84Ø·Ù\81ا Ø¯Ø§ ØªØ§Û\8cÛ\8cد Ú©Ú\93ئ Ú\86Û\90 ØªØ§Ø³Ù\88 Ø¯Ø§ Ú©Ø§Ø± Ú©Ù\88Ù\84 ØºÙ\88اÚ\93ئØ\8c ØªØ§Ø³Ù\88 Ù¾Ø§Û\8cÙ\84Û\90 Ù¾Ù\87 Ù¾Ø§Ù\85 Ú©Û\90 Ù\84رئ Ø§Ù\88 [[{{MediaWiki:Policy-url}}|پاÙ\84Û\8cسÛ\8d]] ØªÙ\87 Ù\85Ù\88 Ù\87Ù\85 Ù\81کر Ø¯Û\8c.",
        "revdelete-legend": "د ښکارېدنې محدوديتونه ټاکل",
        "revdelete-hide-text": "د مخکتنې متن",
        "revdelete-hide-image": "د دوتنې مېنځپانگه پټول",
index af3ac42..1ac8c93 100644 (file)
        "passwordpolicies-policyflag-forcechange": "deve mudar no login",
        "passwordpolicies-policyflag-suggestchangeonlogin": "sugerir mudança na entrada",
        "easydeflate-invaliddeflate": "O conteúdo fornecido não está devidamente comprimido",
-       "unprotected-js": "Por razões de segurança o JavaScript não pode ser carregado de páginas desprotegidas. Por favor, crie apenas javascript no MediaWiki: namespace ou como uma subpágina do usuário"
+       "unprotected-js": "Por razões de segurança o JavaScript não pode ser carregado de páginas desprotegidas. Por favor, crie apenas javascript no MediaWiki: namespace ou como uma subpágina do usuário",
+       "userlogout-continue": "Se pretende terminar a sessão [$1 continue para a página de saída], por favor.",
+       "userlogout-sessionerror": "A sua saída falhou devido a um erro da sessão. [$1 Tente novamente], por favor."
 }
index 375cec6..cc2c7cb 100644 (file)
        "blocklist-addressblocks": "Ocultar bloqueios de um IP individual",
        "blocklist-type": "Tipo:",
        "blocklist-type-opt-all": "Todos",
-       "blocklist-type-opt-partial": "Parcial",
+       "blocklist-type-opt-sitewide": "Todo o ''site''",
+       "blocklist-type-opt-partial": "Parciais",
        "blocklist-rangeblocks": "Ocultar bloqueios de gamas",
        "blocklist-timestamp": "Data e hora",
        "blocklist-target": "Destinatário",
        "blocklist-editing-page": "páginas",
        "blocklist-editing-ns": "espaços nominais",
        "ipblocklist-empty": "A lista de bloqueios encontra-se vazia.",
-       "ipblocklist-no-results": "Nenhum bloqueio correspondente encontrado para o endereço de IP ou nome de utilizador(a) solicitado.",
+       "ipblocklist-no-results": "Não foi encontrado nenhum bloqueio correspondente para o endereço IP ou nome de utilizador pedido.",
        "blocklink": "bloquear",
        "unblocklink": "desbloquear",
        "change-blocklink": "alterar bloqueio",
        "passwordpolicies-policyflag-forcechange": "deve mudar ao iniciar sessão",
        "passwordpolicies-policyflag-suggestchangeonlogin": "sugerir alteração ao iniciar sessão",
        "easydeflate-invaliddeflate": "O conteúdo fornecido não está devidamente comprimido",
-       "unprotected-js": "Por motivos de segurança o JavaScript de páginas desprotegidas não pode ser carregado. Crie javascript só no espaço nominal/domínio MediaWiki: ou numa subpágina do utilizador"
+       "unprotected-js": "Por motivos de segurança o JavaScript de páginas desprotegidas não pode ser carregado. Crie javascript só no espaço nominal/domínio MediaWiki: ou numa subpágina do utilizador",
+       "userlogout-continue": "Se pretende terminar a sessão [$1 prossiga para a página de saída], por favor.",
+       "userlogout-sessionerror": "A sua saída falhou devido a um erro da sessão. [$1 Tente novamente], por favor."
 }
index 534d0a4..ce63056 100644 (file)
        "rcfilters-savedqueries-already-saved": "Ste filtre onne state ggià reggistrate. Cange le 'mbostaziune pe ccrejà 'nu filtre nuève reggistrate.",
        "rcfilters-restore-default-filters": "Repristine le filtre de base",
        "rcfilters-clear-all-filters": "Pulizze tutte le filtre",
-       "rcfilters-show-new-changes": "'Ndruche le urteme cangiaminde",
+       "rcfilters-show-new-changes": "'Ndruche le cangiaminde nuève da $1",
        "rcfilters-invalid-filter": "Filtre invalide",
        "rcfilters-empty-filter": "Nisciune filtre attive. Tutte le condrebbute avènene fatte 'ndrucà.",
        "rcfilters-filterlist-title": "Filtre",
        "blocklist-editing-page": "pàggene",
        "blocklist-editing-ns": "namespace",
        "ipblocklist-empty": "'A liste de le blocche jè vacande.",
-       "ipblocklist-no-results": "L'indirizze IP ca è cerchete o 'u nome utende non ge sonde blocchete.",
+       "ipblocklist-no-results": "Nisciune blocche acchiate pe l'indirizze IP o 'u nome utende ca è cercate.",
        "blocklink": "blocche",
        "unblocklink": "sblocche",
        "change-blocklink": "cange 'u blocche",
index 88302de..a6fa97c 100644 (file)
        "passwordpolicies-policyflag-forcechange": "необходимо изменить при входе",
        "passwordpolicies-policyflag-suggestchangeonlogin": "предложить изменение при входе",
        "easydeflate-invaliddeflate": "Предоставленное содержимое не спущено надлежащим образом",
-       "unprotected-js": "По соображениям безопасности JavaScript нельзя загружать с незащищённых страниц. Пожалуйста, создавайте скрипты только в пространстве имён MediaWiki: или как подстраницы участника."
+       "unprotected-js": "По соображениям безопасности JavaScript нельзя загружать с незащищённых страниц. Пожалуйста, создавайте скрипты только в пространстве имён MediaWiki: или как подстраницы участника.",
+       "userlogout-continue": "Если вы хотите выйти, [$1 перейдите на страницу выхода].",
+       "userlogout-sessionerror": "Выход из системы не удался из-за ошибки сеанса. Пожалуйста, [$1 попробуйте ещё раз]."
 }
index 0ad8cb8..2fc69e2 100644 (file)
@@ -64,6 +64,7 @@
        "tog-norollbackdiff": "Төннөрүү кэнниттэн барыллар уратыларын көрдөрүмэ",
        "tog-useeditwarning": "Уларытыыларбын бигэргэппэккэ сирэйтэн тахсаары гыннахпына сэрэтээр",
        "tog-prefershttps": "Манна киирэргэ куруук көмүскэллээх холбонууну туттарга",
+       "tog-showrollbackconfirmation": "Сигэни баттаатахха дьайыыга бигэргэтиини көрдөр",
        "underline-always": "Куруук",
        "underline-never": "Аннынан тардыма",
        "underline-default": "Браузер туруоруутунан",
        "badretype": "Аһарыктарыҥ сөп түбэспэтилэр.",
        "usernameinprogress": "Бу аатынан бэлиэтэнии бара турар.\nБука диэн кэтэһэ түс.",
        "userexists": "Суруйбут аатыҥ бэлиэр баар.\nБука диэн, атын аатта тал.",
+       "createacct-normalization": "Эн бэлиэтэммит аатыҥ техника хааччаҕын учуоттаан маннык буолуо «$2».",
        "loginerror": "Ааккын система билбэтэ",
        "createacct-error": "Бэлиэтэнии кэмигэр алҕас таҕыста",
        "createaccounterror": "Саҥа аат бэлиэтиир кыах суох: $1",
        "resetpass-abort-generic": "Аһарыгы уларытыыны кэҥэтии тохтотто.",
        "resetpass-expired": "Аһарыгыҥ болдьоҕо ааспыт эбит. Бука диэн, саҥа аһарыкта туруорун.",
        "resetpass-expired-soft": "Аһарыгыҥ болдьоҕо бүппүт, онон уларытыллыахтаах эбит. Бука диэн атын аһарыкта суруй эбэтэр маны баттаан кэлин киллэрээр \"{{int:authprovider-resetpass-skip-label}}\".",
-       "resetpass-validity-soft": "Аһарыгыҥ алҕастаах: $1\n\nБука диэн саҥа аһарыкта суруй эбэтэр кэлин киллэриэххин баҕарар буоллаххына маны баттаа \"{{int:authprovider-resetpass-skip-label}}\"",
+       "resetpass-validity": "Аһарыгыҥ алҕастаах: $1\n\nСаҥа аһарыкта туруорун дуу.",
+       "resetpass-validity-soft": "Аһарыгыҥ алҕастаах: $1\n\nБука диэн саҥа аһарыкта суруй эбэтэр кэлин суруйуоххун баҕарар буоллаххына маны баттаа \n\"{{int:authprovider-resetpass-skip-label}}\"",
        "passwordreset": "Аһарыгы саҥаттан",
        "passwordreset-text-one": "Урукку аһарыгы уларытарга бу форманы толор.",
        "passwordreset-text-many": "{{PLURAL:$1|Быстах аһарыгы электрон почтаҕар ыыттарарга түннүктэртэн биирдэстэригэр суруй.}}",
        "diff-paragraph-moved-toold": "Параграф көһөрүллүбүт. Баттаан урукку сиригэр көс.",
        "difference-missing-revision": "$2 барыл бу тэҥнээһиҥҥэ ($1) көстүбэтэ.\n\nБу үксүн хайыы-үйэ сотуллубут сирэйи кытта тэҥнээри эргэрбит сигэнэн кэллэххэ баар буолааччы.\nСиһилии баҕар [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} сотуу сурунаалыгар] баара буолуо.",
        "searchresults": "Булулунна",
+       "search-filter-title-prefix": "Мантан саҕаланар «$1» сирэйдэри эрэ көрдөө",
        "search-filter-title-prefix-reset": "Сирэйдэри барытын көрдөөһүн",
        "searchresults-title": "Көрдөөһүн түмүгэ \"$1\"",
        "titlematches": "Ыстатыйалар ааттара хоһулаһар",
        "stub-threshold-disabled": "Арахсыбыт",
        "recentchangesdays": "Хас хонук иһинэн уларытыылары көрдөрөргө:",
        "recentchangesdays-max": "(улааппыта $1 күн)",
-       "recentchangescount": "Саҥа Ñ\83лаÑ\80Ñ\8bÑ\82Ñ\8bÑ\8bлаÑ\80 ÐºÓ©Ñ\80дөÑ\80үллÑ\8dр ахсааннара:",
-       "prefs-help-recentchangescount": "Ð\91Ñ\83 Ñ\81аҥа ÐºÓ©Ð½Ð½Ó©Ñ\80үүлÑ\8dÑ\80и, Ñ\81иÑ\80Ñ\8dй Ñ\83Ñ\81Ñ\82Ñ\83оÑ\80Ñ\83йалаÑ\80Ñ\8bн Ñ\83онна Ñ\81Ñ\83Ñ\80Ñ\83нааллаÑ\80Ñ\8b ÐºÓ©Ñ\80дөÑ\80Ó©Ñ\80.",
+       "recentchangescount": "Саҥа Ñ\83лаÑ\80Ñ\8bÑ\82Ñ\8bÑ\8bлаÑ\80 Ð¸Ñ\81пииһÑ\8dкÑ\82Ñ\8dÑ\80игÑ\8dÑ\80, Ñ\81иÑ\80Ñ\8dй Ñ\83Ñ\81Ñ\82Ñ\83оÑ\80Ñ\83йаÑ\82Ñ\8bгаÑ\80 Ñ\83онна Ñ\81Ñ\83Ñ\80Ñ\83нааллаÑ\80га ÐºÓ©Ñ\80дөÑ\80үллÑ\8dÑ\80 Ñ\83лаÑ\80Ñ\8bÑ\82Ñ\8bÑ\8bлар ахсааннара:",
+       "prefs-help-recentchangescount": "УлааппÑ\8bÑ\82а: 1000",
        "prefs-help-watchlist-token2": "Бу кэтиир испииһэгиҥ ситим-ханаалын кистэлэҥ күлүүһэ.\nБу күлүүһүнэн ким баҕарар эн испииһэккин көрүөн сөп, онон кимиэхэ да биэримэ. Хаһан баҕарар [[Special:ResetTokens|маны баттаан уларытыаххын]] сөп.",
        "savedprefs": "Эн туруорууларыҥ олохтоннулар.",
        "savedrights": "{{GENDER:$1|$1}} кыттааччы бөлөҕө бигэргэннэ.",
        "default": "чопчу ыйыллыбатаҕына маннык",
        "prefs-files": "Билэлэр",
        "prefs-custom-css": "Бэйэ CSS",
+       "prefs-custom-json": "Тус бэйэ JSON-а",
        "prefs-custom-js": "Бэйэ JS",
        "prefs-common-config": "Бары тиэмэлэргэ биир CSS/JS",
        "prefs-reset-intro": "Бу сирэй көмөтүнэн туруорууларгын саҥаттан туруорар турукка төннөрүөххүн сөп.\nМаны бигэргэттэххинэ билигин баар туруоруулары дэбигис сөргүппэккин.",
        "prefs-displaywatchlist": "Көстүүтүн туруоруулара",
        "prefs-changesrc": "Көстүбүт уларытыылар",
        "prefs-changeswatchlist": "Көрдөр;ллэр уларытыылар",
+       "prefs-pageswatchlist": "Кэтэбилгэ сылдьар сирэйдэр",
        "prefs-tokenwatchlist": "Токен",
        "prefs-diffs": "Уратылара",
        "prefs-help-prefershttps": "Аныгыскы киириигэр үлэлиир буолуо.",
        "group-autoconfirmed": "Аптамаатынан бигэргэтиллибит кыттааччылар",
        "group-bot": "Роботтар",
        "group-sysop": "Дьаһабыллар",
+       "group-interface-admin": "Алтыһаан дьаһабыллара",
        "group-bureaucrat": "Бюрокрааттар",
        "group-suppress": "Ревизордар",
        "group-all": "(бары)",
        "group-autoconfirmed-member": "{{GENDER:$1|аптамаатынан бигэргэтиллибит кыттааччы}}",
        "group-bot-member": "{{GENDER:$1|робот}}",
        "group-sysop-member": "{{GENDER:$1|дьаһабыл}}",
+       "group-interface-admin-member": "{{GENDER:$1|алтыһаан дьаһабыла}}",
        "group-bureaucrat-member": "{{GENDER:$1|бүрэкирээт}}",
        "group-suppress-member": "{{GENDER:$1|ревизор}}",
        "grouppage-user": "{{ns:project}}:Кыттааччылар",
        "grouppage-autoconfirmed": "{{ns:project}}:Аптамаатынан бигэргэммит кыттааччылар",
        "grouppage-bot": "{{ns:project}}:Роботтар",
        "grouppage-sysop": "{{ns:project}}:Дьаһабыллар",
+       "grouppage-interface-admin": "{{ns:project}}:Алтыһаан дьаһабыллара",
        "grouppage-bureaucrat": "{{ns:project}}:Бюрокрааттар",
        "grouppage-suppress": "{{ns:project}}:Ревизордар",
        "right-read": "Сирэйдэри көрүү",
-       "right-edit": "СиÑ\80Ñ\8dйдÑ\8dÑ\80и Ñ\83ларытыы",
+       "right-edit": "Уларытыы",
        "right-createpage": "Сирэйдэри оҥоруу (ырытыы сирэйдэриттэн ураты)",
        "right-createtalk": "Ырытыы сирэйдэрин оҥоруу",
        "right-createaccount": "Саҥа кыттааччыны бэлиэтээһин",
        "right-reupload-own": "Билэлэри суруттарбыт киһи бэйэтэ иккистээн суруттарыыта",
        "right-reupload-shared": "Уопсай ыскылаат билэлэрин локальнай ыскылаат билэлэринэн уларытыы",
        "right-upload_by_url": "URL аадырыстан билэлэри киллэрии",
-       "right-purge": "Ð\9aÑ\8dÑ\8dһи Ð±Ð¸Ð³Ñ\8dÑ\80гÑ\8dÑ\82Ñ\8dÑ\80 Ñ\81иÑ\80Ñ\8dйÑ\8d Ñ\81Ñ\83оÑ\85 ыраастааһын",
+       "right-purge": "СиÑ\80Ñ\8dй ÐºÑ\8dÑ\8dһин ыраастааһын",
        "right-autoconfirmed": "IP түргэнигэр олоҕурбут хааччахтан тутулуктаныма",
        "right-bot": "аптамаат быһыытынан ааҕыллар",
        "right-nominornewtalk": "Ырытыы сирэйдэригэр кыра көннөрүүлэр суох буоллахтарына саҥа этии эрэсиимэ холбонор",
        "right-editusercss": "Атын кыттааччылар CSS-билэлэрин уларытыы",
        "right-edituserjson": "Атын кыттааччылар JSON-билэлэрин уларытыы",
        "right-edituserjs": "Атын кыттааччылар JS-билэлэрин уларытыы",
+       "right-editsitecss": "CSS-билэлэри уларытыы",
+       "right-editsitejson": "JSON-билэлэри уларытыы",
+       "right-editsitejs": "JavaScript-билэлэри уларытыы",
        "right-editmyusercss": "Кыттааччы CSS-билэтин уларытыы",
+       "right-editmyuserjson": "Тус  бэйэ JSON-билэлэрин уларытыы",
        "right-editmyuserjs": "Бэйэ JavaScript-билэлэрин уларытыы",
        "right-viewmywatchlist": "Бэйэ кэтиир тиһигин көрүү",
        "right-editmywatchlist": "Бэйэ кэтиир тиһигин уларытыы. Болҕой, сорох дьайыыларыҥ бу быраабы биэрбэтэҕиҥ да иһин сирэйдэри тиһиккэ эбиэхтэрин сөп.",
        "action-changetags": "ханнык баҕарар тиэктэри сурунаал биирдиилээн уларытыыларыгар уонна суруктарыгар эбэри уонна сотору көҥүллээ",
        "action-deletechangetags": "тиэктэри билии олоҕуттан сотуу",
        "action-purge": "сирэй кээһин ыраастааһын",
+       "action-bigdelete": "уһун устуоруйалаах сирэйдэри сотуу",
+       "action-blockemail": "эл. суругу ыытары бобуу",
+       "action-bot": "аптамаат быһыытынан ааҕыллар",
+       "action-editinterface": "кыттааччы алтыһаанын уларытыы",
+       "action-editusercss": "атын кыттааччылар CSS-билэлэрин уларытыы",
+       "action-edituserjson": "атын кыттааччылар JSON-билэлэрин уларытыы",
+       "action-edituserjs": "Атын кыттааччылар JavaScript-билэлэрин уларытыы",
+       "action-editsitecss": "ситим-сир CSS-билэлэрин уларытыы",
        "nchanges": "$1 {{PLURAL:$1|уларытыы|уларытыылар}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|тиһэх сылдьыыгыттан}}",
        "enhancedrc-history": "устуоруйата",
index f6a73cc..4a743c5 100644 (file)
        "page_first": "ᱯᱟᱹᱦᱤᱞ",
        "page_last": "ᱢᱩᱪᱟᱹᱫ",
        "histlegend": "ᱮᱴᱟᱜ ᱵᱟᱪᱷᱟᱣ: ᱱᱟᱣᱟ ᱵᱚᱫᱚᱞᱠᱚ ᱛᱩᱞᱟᱹᱣ ᱢᱮᱱᱠᱷᱟᱱ, ᱨᱮᱰᱤᱭᱳ ᱵᱟᱠᱥᱚᱨᱮ ᱪᱤᱱ ᱮᱢ ᱠᱟᱛᱮ ᱵᱚᱞᱚᱜ ᱥᱮ ᱞᱟᱛᱟᱨ ᱨᱮᱱᱟᱜ ᱵᱟᱴᱚᱱ ᱞᱤᱱᱢᱮ᱾<br />\nᱩᱱᱩᱫᱩᱜ: <strong>({{int:cur}})</strong> = ᱱᱮᱛᱟᱨ ᱥᱩᱫᱷᱨᱟᱹᱣ ᱥᱟᱶᱛᱮ ᱥᱚᱝ, <strong>({{int:last}})</strong> = ᱞᱟᱦᱟ ᱨᱮᱭᱟᱜ ᱱᱟᱣᱟ ᱥᱩᱫᱷᱨᱟᱹᱣ ᱥᱟᱶᱛᱮ ᱥᱚᱝ, <strong>{{int:minoreditletter}}</strong> = ᱦᱩᱰᱤᱧ ᱥᱟᱯᱲᱟᱣ ᱾",
-       "history-fieldset-title": "ᱧᱮá±\9e á±\9fᱹᱨᱩ á±\9eá±\9fá±¹á±\9cᱤᱫ á±¥á±®á±¸á±«á±½á±¨á±\9f",
+       "history-fieldset-title": "ᱧᱮá±\9e á±\9fᱹᱨᱩ á±ªá±·á±\9fᱹᱱᱤ",
        "history-show-deleted": "ᱠᱷᱟᱹᱞᱤ ᱜᱮᱫ ᱜᱤᱰᱤᱭᱟᱜ ᱠᱚᱜᱮ",
        "histfirst": "ᱢᱟᱨᱮᱱᱟᱜ",
        "histlast": "ᱱᱟᱣᱟᱱᱟᱜ",
index aaaa803..711f0f3 100644 (file)
        "querypage-disabled": "Ova posebna stranica je onemogućena jer smanjuje performanse.",
        "apihelp": "Pomoć s prilogom",
        "apihelp-no-such-module": "Modul \"$1\" nije pronađen.",
+       "apisandbox": "Izvršnički pješčanik",
+       "apisandbox-jsonly": "Upotreba ovoga izvršničkog pješčanika zahtijeva JavaScript.",
+       "apisandbox-api-disabled": "Izvršnik je onemogućen na ovom sajtu.",
        "apisandbox-intro": "Stranica služi za eksperimentiranje s <strong>API-jem MediaWiki</strong>.\n\nViše o korištenju ovog API-ja možete pronaći na [[mw:API:Main page|njegovoj dokumentaciji]]. Primjer: [https://www.mediawiki.org/wiki/API#A_simple_example preuzimanje sadržaja glavne stranice]. Odaberite radnju da biste vidjeli više primjera.\n\nImajte na umu da se ono što radite na ovoj stranici može odraziti na wikiju, iako je to pješčanik.",
        "apisandbox-submit": "Napravi zahtjev",
        "apisandbox-reset": "Očisti",
        "apisandbox-retry": "Pokušaj ponovo",
+       "apisandbox-loading": "Učitavam informacije o izvršničkom modulu \"$1\"...",
+       "apisandbox-load-error": "Došlo je do greške pri učitavanju informacija o izvršničkom modulu \"$1\": $2",
+       "apisandbox-no-parameters": "Izvršnički modul nema parametara.",
+       "apisandbox-helpurls": "Linkovi za pomoć",
+       "apisandbox-examples": "Primjeri",
+       "apisandbox-dynamic-parameters": "Dodatni parametri",
+       "apisandbox-dynamic-parameters-add-label": "Dodaj parametar:",
+       "apisandbox-dynamic-parameters-add-placeholder": "Naziv parametra",
+       "apisandbox-dynamic-error-exists": "Parametar pod nazivom \"$1\" već postoji.",
+       "apisandbox-templated-parameter-reason": "Ovaj [[Special:ApiHelp/main#main/templatedparams|šabloniziran parametar]] nudi se u {{PLURAL:$1|vrijednosti|vrijednostima}} $2.",
+       "apisandbox-deprecated-parameters": "Zastarjeli parametri",
+       "apisandbox-fetch-token": "Samoispuni žeton",
+       "apisandbox-add-multi": "Dodaj",
+       "apisandbox-submit-invalid-fields-title": "Neka polja nisu ispravna",
+       "apisandbox-submit-invalid-fields-message": "Ispravite naznačena polja i pokušajte ponovo.",
+       "apisandbox-results": "Ishod",
+       "apisandbox-sending-request": "Šaljem zahtjev izvršniku...",
+       "apisandbox-loading-results": "Prijem ishod izvršnika...",
+       "apisandbox-results-error": "Došlo je do greške prilikom učitavanja odgovora upita izvršniku: $1.",
+       "apisandbox-results-login-suppressed": "Zahtjev je obrađen kao prijavljeni korisnik jer se može koristiti za zaobilaženje istoizvorne mjere sigurnosti. Imajte na umu da automatski rad s izvršničkim tokenima ne radi ispravno s tim zahtjevima, pa ćete ga morati ispuniti ručno.",
+       "apisandbox-request-selectformat-label": "Prikaži zahtijevane podatke kao:",
+       "apisandbox-request-format-url-label": "URL nizka upita",
+       "apisandbox-request-url-label": "URL zahtjeva:",
+       "apisandbox-request-json-label": "Zatraži JSON:",
+       "apisandbox-request-time": "Vreme zahtjeva: {{PLURAL:$1|$1 milisekunda|$1 milisekunde|$1 milisekundi}}",
+       "apisandbox-results-fixtoken": "Ispravi žeton i pošalji ponovo",
+       "apisandbox-results-fixtoken-fail": "Nisam uspio dobiti žeton \"$1\".",
+       "apisandbox-alert-page": "Polja na ovoj stranici su nevažeća.",
+       "apisandbox-alert-field": "Vrijednost ovog polja je nevažeća.",
+       "apisandbox-continue": "Nastavi",
+       "apisandbox-continue-clear": "Očisti",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} će [https://www.mediawiki.org/wiki/API:Query#Continuing_queries nastaviti] s posljednjim zahtjevom; \"{{int:apisandbox-continue-clear}}\" će izbrisati parametre vezane uz nastavljenje.",
+       "apisandbox-param-limit": "Unesite <kbd>max</kbd> da bi ste koristili najgornju granicu.",
+       "apisandbox-multivalue-all-namespaces": "$1 (svi imenski prostori)",
+       "apisandbox-multivalue-all-values": "$1 (sve vrijednosti)",
        "booksources": "Književni izvori",
        "booksources-search-legend": "Traži književne izvore",
        "booksources-search": "Traži",
        "authmanager-autocreate-noperm": "Automatsko pravljenje računa nije dozvoljeno.",
        "authmanager-autocreate-exception": "Automatsko pravljenje računa privremeno je onemogućeno zbog prijašnjih greški.",
        "authmanager-userdoesnotexist": "Korisnički račun \"$1\" nije registrovan.",
+       "authmanager-userlogin-remembermypassword-help": "Je li zaporka pohranjena dulje od trajanja sesije.",
+       "authmanager-username-help": "Korisničko ime za verifikaciju.",
+       "authmanager-password-help": "Lozinka za verifikaciju.",
+       "authmanager-domain-help": "Domen za vanjsku verifikaciju.",
+       "authmanager-retype-help": "Ponovite lozinku (za potvrdu).",
+       "authmanager-email-label": "E-pošta",
+       "authmanager-email-help": "Adresa e-pošte",
+       "authmanager-realname-label": "Pravo ime",
+       "authmanager-realname-help": "Pravo ime korisnika",
+       "authmanager-provider-password": "Verifikacija lozinkom",
+       "authmanager-provider-password-domain": "Verifikacija lozinkom i domenom",
+       "authmanager-provider-temporarypassword": "Privremena lozinka",
+       "authprovider-confirmlink-request-label": "Računi koji se trebaju povezati",
+       "authprovider-confirmlink-success-line": "$1: Uspješno povezano.",
+       "authprovider-confirmlink-failed": "Povezivanje računa nije uspjelo u potpunosti: $1",
+       "authprovider-confirmlink-ok-help": "Nastavi nakon prikazivanja poruka za neuspješno povezivanje.",
+       "authprovider-resetpass-skip-label": "Preskoči",
+       "authprovider-resetpass-skip-help": "Preskoči zadavanje nove lozinke.",
+       "authform-nosession-login": "Verifikacija je uspješna, ali vaš preglednik ne može \"zapamtiti\" da ste prijavljeni.\n\n$1",
+       "authform-nosession-signup": "Račun je napravljen, ali vaš preglednik ne može \"zapamtiti\" da ste prijavljeni.\n\n$1",
+       "authform-newtoken": "Nedostaje token. $1",
+       "authform-notoken": "Nedostaje token",
+       "authform-wrongtoken": "Pogrešan token",
+       "specialpage-securitylevel-not-allowed-title": "Nije dozvoljeno",
+       "specialpage-securitylevel-not-allowed": "Žao nam je, nije Vam dozvoljeno korištenje ove stranice jer nije moguće potvrditi vaš identitet.",
+       "authpage-cannot-login": "Ne mogu započeti prijavu.",
+       "authpage-cannot-login-continue": "Ne mogu nastaviti s prijavom. Najvjerovatnije vaša sesija je istekla.",
+       "authpage-cannot-create": "Ne mogu započeti stvaranje računa.",
+       "authpage-cannot-create-continue": "Ne mogu nastaviti s stvaranjem računa. Najvjerovatnije vaša sesija je istekla.",
+       "authpage-cannot-link": "Ne mogu započeti spajanje računa.",
+       "authpage-cannot-link-continue": "Ne mogu nastaviti sa spajanjem računa. Najvjerovatnije vaša sesija je istekla.",
+       "cannotauth-not-allowed-title": "Pristup je odbijen",
+       "cannotauth-not-allowed": "Nije vam dozvoljeno da koristite ovu stranicu",
        "userjsispublic": "Napomena: podstranice s JavaScriptom ne bi trebale sadržavati povjerljive podatke budući da ih drugi korisnici mogu vidjeti.",
        "userjsonispublic": "Imajte na umu: Podstranice s JSONom ne bi trebale sadržavati povjerljive podatke budući da su vidljive drugim korisnicima.",
        "usercssispublic": "Napomena: podstranice s CSS-om ne bi trebale sadržavati povjerljive podatke budući da ih drugi korisnici mogu vidjeti.",
        "passwordpolicies-policyflag-forcechange": "mora se promjeniti pri prijavi",
        "passwordpolicies-policyflag-suggestchangeonlogin": "predloži izmjenu pri prijavi",
        "easydeflate-invaliddeflate": "Sadržaj nije ispravno pročišćen",
-       "unprotected-js": "JavaScript ne može da se učita sa nezaštićenih stranica iz bezbednosnih razloga. Samo napravite JavaScript u imenskom prostoru MediaWiki: ili kao korisničku podstranicu"
+       "unprotected-js": "JavaScript ne može da se učita sa nezaštićenih stranica iz bezbednosnih razloga. Samo napravite JavaScript u imenskom prostoru MediaWiki: ili kao korisničku podstranicu",
+       "userlogout-continue": "Ako se želite odjaviti, [$1 nastavite na odjavnoj strnaici].",
+       "userlogout-sessionerror": "Odjava nije uspjela zbog sesijske pogreške. [$1 Pokušajte ponovo]."
 }
index 1adcdf5..ff96bae 100644 (file)
        "ipb-pages-label": "ورقے",
        "block-reason": "سبب:",
        "autoblocklist-submit": "ڳولو",
+       "blocklist-type": "قسم:",
+       "blocklist-type-opt-all": "یکے",
        "blocklist-reason": "سبب:",
        "infiniteblock": "بے انت",
        "blocklist-editing": "زیر ترمیم",
index 41224ce..fce2988 100644 (file)
        "page_first": "prva",
        "page_last": "zadnja",
        "histlegend": "Izbira primerjave: označite okroglo polje ob redakciji za primerjavo in stisnite enter ali gumb na dnu strani.<br />\nLegenda: '''({{int:cur}})''' = primerjava s trenutno redakcijo, '''({{int:last}})''' = primerjava s prejšnjo redakcijo, '''{{int:minoreditletter}}''' = manjše urejanje.",
-       "history-fieldset-title": "Iskanje redakcij",
+       "history-fieldset-title": "Filtrirajte redakcije",
        "history-show-deleted": "Samo izbrisana redakcija",
        "histfirst": "najstarejše",
        "histlast": "najnovejše",
        "right-editsemiprotected": "Urejanje strani, zaščitenih kot »{{int:protect-level-autoconfirmed}}«",
        "right-editcontentmodel": "Urejanje vsebinskega modela strani",
        "right-editinterface": "Urejanje uporabniškega vmesnika",
-       "right-editusercss": "Urejanje CSS datotek drugih uporabnikov",
+       "right-editusercss": "Urejanje CSS-datotek drugih uporabnikov",
        "right-edituserjson": "Urejanje JSON-datotek drugih uporabnikov",
        "right-edituserjs": "Urejanje JavaScript datotek drugih uporabnikov",
        "right-editsitecss": "Urejanje CSS spletišča",
        "right-userrights": "Urejanje vseh uporabniških pravic",
        "right-userrights-interwiki": "Urejanje uporabniških pravic uporabnikov na drugih wikijih",
        "right-siteadmin": "Zaklepanje in odklepanje baze podatkov",
-       "right-override-export-depth": "Izvoz strani, vključno s povezaimi straneh do globine 5",
+       "right-override-export-depth": "Izvoz strani, vključno s povezanimi stranmi do globine 5",
        "right-sendemail": "Pošiljanje e-pošte drugim uporabnikom",
        "right-managechangetags": "Ustvarjanje in (dez)aktivacijo [[Special:Tags|oznak]]",
        "right-applychangetags": "Uveljavitev [[Special:Tags|oznak]] skupaj s spremembami",
        "action-changetags": "dodajanje in odstranjevanje poljubnih oznak na posameznih redakcijah in dnevniških vnosih",
        "action-deletechangetags": "izbris oznak iz zbirke podatkov",
        "action-purge": "počiščenje strani",
+       "action-apihighlimits": "uporabo višje omejitve poizvedb API",
+       "action-autoconfirmed": "neomejitev dejavnosti glede na IP",
+       "action-bigdelete": "brisanje strani z obsežno zgodovino",
+       "action-blockemail": "preprečite pošiljanja e-pošte drugemu uporabniku",
+       "action-bot": "obravnavo kot avtomatiziran postopek",
+       "action-editprotected": "urejanje strani, zaščitenih kot »{{int:protect-level-sysop}}«,",
+       "action-editsemiprotected": "urejanje strani, zaščitenih kot »{{int:protect-level-autoconfirmed}}«,",
+       "action-editinterface": "urejanje uporabniškega vmesnika",
+       "action-editusercss": "urejanje CSS-datotek drugih uporabnikov",
+       "action-edituserjson": "urejanje JSON-datotek drugih uporabnikov",
+       "action-edituserjs": "urejanje JavaScript datotek drugih uporabnikov",
+       "action-editsitecss": "urejanje CSS spletišča",
+       "action-editsitejson": "urejanje JSON spletišča",
+       "action-editsitejs": "urejanje JavaScripta spletišča",
+       "action-editmyusercss": "urejanje svojih uporabniških datotek CSS",
+       "action-editmyuserjson": "urejanje svojih uporabniških datotek JSON",
+       "action-editmyuserjs": "urejanje svojih uporabniških datotek JavaScript",
+       "action-viewsuppressed": "ogled redakcij skritih pred vsemi uporabniki",
+       "action-hideuser": "blokiranje uporabnika in skritje pred javnostjo",
+       "action-ipblock-exempt": "izogib blokadam IP-naslova, samodejnim blokadam in blokadam območij",
+       "action-unblockself": "odblokiranje samega sebe",
+       "action-noratelimit": "izogib omejitvam dejavnosti",
+       "action-reupload-own": "nadomeščanje obstoječih lastnih datotek",
+       "action-nominornewtalk": "to, da urejanja pogovornih strani, ki niso označena kot manjša, ne sprožijo obvestila o novem sporočilu,",
+       "action-markbotedits": "označitev vrnjenih urejanj kot urejanja botov",
+       "action-patrolmarks": "ogled oznak nadzorov v zadnjih spremembah",
+       "action-override-export-depth": "izvoz strani, vključno s povezanimi stranmi do globine 5,",
+       "action-suppressredirect": "možnost izpuščanja preusmeritve pri premikanju strani",
        "nchanges": "$1 {{PLURAL:$1|sprememba|spremembi|spremembe|sprememb|sprememb}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|od zadnjega obiska}}",
        "enhancedrc-history": "zgodovina",
        "rcfilters-savedqueries-already-saved": "Te filtre ste že shranili. Uporabite svoje nastavitve, da ustvarite nov Shranjen filter.",
        "rcfilters-restore-default-filters": "Obnovi privzete filtre",
        "rcfilters-clear-all-filters": "Počisti vse filtre",
-       "rcfilters-show-new-changes": "Ogled najnovejših sprememb",
+       "rcfilters-show-new-changes": "Ogled novih sprememb od $1",
        "rcfilters-search-placeholder": "Filtriraj zadnje spremembe (uporabi meni ali vnesi ime filtra)",
        "rcfilters-invalid-filter": "Neveljaven filter",
        "rcfilters-empty-filter": "Ni dejavnih filtrov. Prikazani so vsi prispevki.",
        "blocklist-userblocks": "skrij blokade računov",
        "blocklist-tempblocks": "skrij začasne blokade",
        "blocklist-addressblocks": "skrij blokade posameznih IP-naslovov",
+       "blocklist-type": "Vrsta:",
+       "blocklist-type-opt-all": "Vse",
+       "blocklist-type-opt-sitewide": "Po celotni strani",
+       "blocklist-type-opt-partial": "Delno",
        "blocklist-rangeblocks": "skrij blokade razponov",
        "blocklist-timestamp": "Časovni žig",
        "blocklist-target": "Cilj",
        "blocklist-editing-page": "strani",
        "blocklist-editing-ns": "imenski prostori",
        "ipblocklist-empty": "Seznam blokad je prazen.",
-       "ipblocklist-no-results": "Zahtevan IP-naslov ali uporabniško ime ni blokirano.",
+       "ipblocklist-no-results": "Ne najdemo ujemajočih blokov za zahtevan IP-naslov ali uporabniško ime.",
        "blocklink": "blokiraj",
        "unblocklink": "deblokiraj",
        "change-blocklink": "spremeni blokado",
        "passwordpolicies-policyflag-forcechange": "treba spremeniti ob prijavi",
        "passwordpolicies-policyflag-suggestchangeonlogin": "predlagaj zamenjavo ob prijavi",
        "easydeflate-invaliddeflate": "Dana vsebina ni pravilno stisnjena",
-       "unprotected-js": "Iz varnostnih razlogov JavaScripta ni možno naložiti z nezaščitenih strani. Prosimo, da JavaScript ustvarite samo v imenskem prostoru MediaWiki ali kot uporabniško podstran."
+       "unprotected-js": "Iz varnostnih razlogov JavaScripta ni možno naložiti z nezaščitenih strani. Prosimo, da JavaScript ustvarite samo v imenskem prostoru MediaWiki ali kot uporabniško podstran.",
+       "userlogout-continue": "Če se želite odjaviti, [$1 pojdite na stran za odjavo].",
+       "userlogout-sessionerror": "Odjava je spodletela zaradi napake seje. Prosimo, [$1 poskusite znova]."
 }
index d1e509f..615a609 100644 (file)
@@ -17,7 +17,8 @@
                        "아라",
                        "Macofe",
                        "Fitoschido",
-                       "Ghiutun"
+                       "Ghiutun",
+                       "ToBeFree"
                ]
        },
        "tog-underline": "Verknipfonga unterstreeicha:",
        "tooltip-watch": "Fiege diese Seite denner Beobachtungsliste hinzu",
        "tooltip-recreate": "Seite neu erstella, obwohl se geläscht wurde.",
        "tooltip-upload": "Huchloada starta",
-       "tooltip-rollback": "Moacht olle letzta Änderunga dar Seite, de vum gleichen Benutzer vurgenumma waan sein, dorch ocke eenen Klick rieckgängig.",
+       "tooltip-rollback": "Moacht olle letzta Änderunga dar Seite, de vum selben Benutzer vurgenumma waan sein, dorch ocke eenen Klick rieckgängig.",
        "tooltip-undo": "Moacht lediglich diese eene Änderung rieckgängig on zeigt doas Resultat ei dar Vorschau oa, damit ei dar Zusommafassungszeile eene Begründung angegeba waan koan.",
        "tooltip-summary": "Gib eine kurze Zusammenfassung ein",
        "anonymous": "{{PLURAL:$1|Anonymer Nutzer|Anonyme Nutzer}} uff {{SITENAME}}",
index 6e1cd3a..c262c70 100644 (file)
        "yourpasswordagain": "Поново унеси лозинку:",
        "createacct-yourpasswordagain": "Потврдите лозинку",
        "createacct-yourpasswordagain-ph": "Поново унесите лозинку",
-       "userlogin-remembermypassword": "Ð\9eÑ\81Ñ\82ави Ð¼Ðµ Ð¿Ñ\80иÑ\98авÑ\99еног/Ñ\83",
+       "userlogin-remembermypassword": "Ð\9dе Ð¾Ð´Ñ\98авÑ\99Ñ\83Ñ\98 Ð¼Ðµ",
        "userlogin-signwithsecure": "Користите безбедну везу",
        "cannotlogin-title": "Пријава није могућа",
        "cannotlogin-text": "Пријава није могућа",
        "blockedtext-partial": "<strong>Вашем корисничком имену или IP адреси је блокирано прављење промена на овој страници. Још увек можете да уређујете друге странице на овом викију.</strong> Можете да видите потпуне детаље блокаде на [[Special:MyContributions|доприносима налога]].\n\nБлокаду је извршио/ла $1.\n\nНаведен је следећи разлог: <em>$2</em>.\n\n* Почетак блокаде: $8\n* Истек блокаде: $6\n* Намењена кориснику/ци или IP адреси: $7\n* ID блокаде #$5",
        "blockedtext": "<strong>Ваше корисничко име или IP адреса је блокирана.</strong>\n\nБлокирање је {{GENDER:$4|извршио|извршила}} $1.\nРазлог је <em>$2</em>.\n\n* Почетак блокирања: $8\n* Истек блокирања: $6\n* Блокирани: $7\n\nМожете да се обратите {{GENDER:$4|кориснику|корисници}} $1 или [[{{MediaWiki:Grouppage-sysop}}|администратору]] ради дискусије о блокирању.\nНе можете да користите функцију „{{int:emailuser}}” осим ако сте унели важећу е-адресу у својим [[Special:Preferences|подешавањима]] налога и нисте блокирани од коришћења исте.\nВаша тренутна IP адреса је $3, а ID блокирања #$5.\nНаведите све информације одозго при стварању било каквих упита.",
        "autoblockedtext": "Ваша IP адреса је аутоматски блокирана јер ју је користио други корисник, кога је {{GENDER:$4|блокирао|блокирала|блокирао/ла}} $1.\nРазлог:\n\n:<em>$2</em>\n\n* Почетак блокаде: $8\n* Крај блокаде: $6\n* Име корисника: $7\n\nМожете да контактирате {{GENDER:$4|корисника|корисницу|корисника/цу}} $1 или другог [[{{MediaWiki:Grouppage-sysop}}|администратора]] да бисте расправљали о блокади.\n\nЗапамтите да не можете да користите функцију „{{int:emailuser}}“ осим ако сте навели важећу е-адресу у [[Special:Preferences|подешавањима]].\n\nВаша тренутна IP адреса је $3, а ID блокаде $5.\nУкључите све горње детаље при прављењу било каквих упита.",
+       "systemblockedtext": "Медијавики је аутоматски блокирао ваше корисничко име или IP адресу.\nНаведен је следећи разлог:\n\n:<em>$2</em>\n\n* Почетак блокирања: $8\n* Истек блокирања: $6\n* Блокирање је намењено за: $7\n\nВаша тренурна IP адреса $3.\nУкључите све горенаведене детаље при прављењу било којих упита.",
        "blockednoreason": "разлог није наведен",
        "whitelistedittext": "$1 да бисте уређивали странице.",
        "confirmedittext": "Морате да потврдите е-адресу пре уређивања страница.\nПоставите и проверите ваљаност адресе преко [[Special:Preferences|подешавања]].",
        "copyrightwarning": "Имајте на уму да се сви доприноси на овом викију сматрају као објављени под лиценцом $2 (више на $1).\nАко не желите да се ваши текстови мењају и размењују без ограничења, онда их не шаљите овде.<br />\nИсто тако обећавате да сте Ви аутор текста, или да сте га умножили са извора који је у јавном власништву.\n<strong>Не шаљите радове заштићене ауторским правима без дозволе!</strong>",
        "copyrightwarning2": "Имајте на уму да се сви доприноси на овом викију могу мењати, враћати или брисати од других корисника.\nАко не желите да се ваши текстови слободно мењају и расподељују, не шаљите их овде.<br />\nИсто тако обећавате да сте ви аутор текста, или да сте га умножили с извора који је у јавном власништву (више на $1).\n<strong>Не шаљите радове заштићене ауторским правима без дозволе!</strong>",
        "editpage-cannot-use-custom-model": "Модел садржаја ове странице се не може променити.",
-       "longpageerror": "<strong>Грешка: текст који сте унели је величине {{PLURAL:$1|један килобајт|$1 килобајта}}, што је веће од {{PLURAL:$2|дозвољеног једног килобајта|дозвољена $2 килобајта|дозвољених $2 килобајта}}.</strong>\nСтраница не може бити сачувана.",
+       "longpageerror": "<strong>Грешка: текст који сте проследили је величине {{PLURAL:$1|један килобајт|$1 килобајта}}, што је веће од {{PLURAL:$2|дозвољеног једног килобајта|дозвољена $2 килобајта|дозвољених $2 килобајта}}.</strong>\nСтраница не може бити сачувана.",
        "readonlywarning": "<strong>Упозорење: база података је закључана ради одржавања, тако да тренутно нећете моћи да сачувате измене.</strong>\nМожда бисте желели сачувати текст за касније у некој текстуалној датотеци.\n\nСистемски администратор је навео следеће објашњење: $1",
        "protectedpagewarning": "<strong>Упозорење: Ова страница је заштићена, тако да само корисници са администраторским овлашћењима могу да је уређују.</strong>\nНајновији унос у дневнику је наведен испод као референца:",
        "semiprotectedpagewarning": "<strong>Напомена:</strong> Ова страница је заштићена, тако да само аутоматски потврђени корисници могу да је уређују.\nНајновији унос у дневнику је наведен испод као референца:",
        "page_first": "прва",
        "page_last": "последња",
        "histlegend": "Избор разлика: означите кутијице измена за упоређивање и притисните enter или дугме на дну.<br />\nОбјашњење: <strong>({{int:cur}})</strong> = разлика са најновијом изменом, <strong>({{int:last}})</strong> = разлика са претходном изменом, <strong>{{int:minoreditletter}}</strong> = мања измена.",
-       "history-fieldset-title": "Ð\9fÑ\80еÑ\82Ñ\80ага измена",
+       "history-fieldset-title": "ФилÑ\82Ñ\80иÑ\80аÑ\9aе измена",
        "history-show-deleted": "Само избрисане измене",
        "histfirst": "најстарије",
        "histlast": "најновије",
        "diff-paragraph-moved-toold": "Пасус је премештен. Кликните да пређете на стару локацију.",
        "difference-missing-revision": "{{PLURAL:$2|Једна измена|$2 измене}} ове разлике ($1) не {{PLURAL:$2|постоји|постоје}}.\n\nОво се обично дешава када пратите застарелу везу до странице која је избрисана.\nДетаље можете да пронађете у [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневнику брисања].",
        "searchresults": "Резултати претраге",
+       "search-filter-title-prefix": "Само претражује на страницама чији наслов почиње са „$1”",
        "search-filter-title-prefix-reset": "Претражи све странице",
        "searchresults-title": "Резултати претраге за „$1“",
        "titlematches": "Наслов странице одговара",
        "right-reupload-own": "замењивање сопствених датотека",
        "right-reupload-shared": "локално замењивање датотека на дељеном спремишту медија",
        "right-upload_by_url": "отпремање датотека са УРЛ-а",
-       "right-purge": "чишћење кеш меморије странице без потврде",
+       "right-purge": "чишћење кеш меморије странице",
        "right-autoconfirmed": "без ограничавања ставки за IP адресе",
        "right-bot": "сматрање измена као аутоматски процес",
        "right-nominornewtalk": "непоседовање мањих измена на страницама за разговор отвара прозор за нове поруке",
        "right-editusercss": "уређивање туђих Це-Ес-Ес датотека",
        "right-edituserjson": "уређивање туђих ЈСОН датотека",
        "right-edituserjs": "уређивање туђих јаваскрипт датотека",
+       "right-editsitecss": "уређивање CSS-а на нивоу сајта",
+       "right-editsitejson": "уређивање JSON-а на нивоу сајта",
+       "right-editsitejs": "Уређивање JavaScript-а на нивоу сајта",
        "right-editmyusercss": "уређивање сопствених Це-Ес-Ес датотека",
        "right-editmyuserjson": "уређивање сопствених ЈСОН датотека",
        "right-editmyuserjs": "уређивање сопствених јаваскрипт датотека",
        "action-changetags": "додате и уклоните разне ознаке на појединачним изменама и уносима у дневницима",
        "action-deletechangetags": "бришете ознаке из базе података",
        "action-purge": "освежите ову страницу",
+       "action-blockemail": "блокирате кориснику слање е-порука",
+       "action-editsitecss": "уређујете CSS на новоу сајта",
+       "action-editsitejson": "уређујете JSON на нивоу сајта",
+       "action-editsitejs": "уређујете JavaScript на новоу сајта",
+       "action-hideuser": "блокирате корисничко име, сакривајући га од јавности",
        "nchanges": "$1 {{PLURAL:$1|промена|промене|промена}}",
        "ntimes": "$1×",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|измена од ваше последње посете}}",
        "recentchanges-network": "Због техничког проблема, није могуће учитати резултате. Покушајте да освежите страницу.",
        "recentchanges-notargetpage": "Унесите име странице изнад да бисте видели промене сродне с овом страницом",
        "recentchanges-feed-description": "Пратите недавне промене на викију у овом фиду.",
-       "recentchanges-label-newpage": "Ð\9dова страница",
-       "recentchanges-label-minor": "Ð\9cања измена",
-       "recentchanges-label-bot": "Ð\91оÑ\82овÑ\81ка Ð¸Ð·Ð¼ÐµÐ½Ð°",
-       "recentchanges-label-unpatrolled": "Ð\9dепаÑ\82Ñ\80олиÑ\80ана Ð¸Ð·Ð¼Ðµна",
+       "recentchanges-label-newpage": "Ð\9eвом Ð¸Ð·Ð¼ÐµÐ½Ð¾Ð¼ Ð½Ð°Ð¿Ñ\80авÑ\99ена Ñ\98е Ð½ова страница",
+       "recentchanges-label-minor": "Ð\9eво Ñ\98е Ð¼ања измена",
+       "recentchanges-label-bot": "Ð\9eвÑ\83 Ð¸Ð·Ð¼ÐµÐ½Ñ\83 Ñ\98е Ð½Ð°Ð¿Ñ\80авио Ð±Ð¾Ñ\82",
+       "recentchanges-label-unpatrolled": "Ð\9eва Ð¸Ð·Ð¼ÐµÐ½Ð° Ñ\98оÑ\88 Ð½Ð¸Ñ\98е Ð¿Ð°Ñ\82Ñ\80олиÑ\80ана",
        "recentchanges-label-plusminus": "Промена величине странице у бајтовима",
        "recentchanges-legend-heading": "<strong>Легенда:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|списак нових страница]])",
+       "recentchanges-legend-newpage": "Нова страница ([[Special:NewPages|списак]])",
        "recentchanges-legend-plusminus": "(<em>±123</em>)",
        "recentchanges-submit": "Прикажи",
        "rcfilters-tag-remove": "Уклоните филтер „$1“",
        "rcfilters-savedqueries-already-saved": "Ови филтери су већ сачувани. Промените своја подешавања да бисте направили нове сачуване филтере.",
        "rcfilters-restore-default-filters": "Врати подразумеване филтере",
        "rcfilters-clear-all-filters": "Обришите све филтере",
-       "rcfilters-show-new-changes": "Ð\9dаÑ\98новиÑ\98е Ð¿Ñ\80омене",
+       "rcfilters-show-new-changes": "Ð\9fÑ\80икажи Ð½Ð¾Ð²Ðµ Ð¿Ñ\80омене Ð¾Ð´ $1",
        "rcfilters-search-placeholder": "Филтрирајте промене (користите мени или претрагу за име филтера)",
        "rcfilters-invalid-filter": "Неважећи филтер",
        "rcfilters-empty-filter": "Нема активних филтера. Сви доприноси су приказани.",
        "upload": "Отпремање датотеке",
        "uploadbtn": "Отпреми датотеку",
        "reuploaddesc": "Назад на образац за отпремање",
-       "upload-tryagain": "Пошаљи измењени опис датотеке",
+       "upload-tryagain": "Проследи измењени опис датотеке",
        "upload-tryagain-nostash": "Пошаљите ре-отпремљену датотеку и измењен опис",
        "uploadnologin": "Нисте пријављени",
        "uploadnologintext": "$1 да бисте отпремали датотеке.",
        "filetype-unwanted-type": "<strong>„.$1“</strong> је непожељан тип датотеке.\n{{PLURAL:$3|Пожељан тип датотеке је|Пожељни типови датотека су}} $2.",
        "filetype-banned-type": "<strong>„.$1“</strong> {{PLURAL:$4|није допуштен тип датотеке|нису допуштени типови датотека}}.\n{{PLURAL:$3|Дозвољен тип датотеке је|Дозвољени типови датотека су}} $2.",
        "filetype-missing": "Ова датотека нема проширење (нпр. „.jpg“).",
-       "empty-file": "Ð\9fоÑ\81лаÑ\82а Ð´Ð°Ñ\82оÑ\82ека је празна.",
+       "empty-file": "Ð\94аÑ\82оÑ\82ека ÐºÐ¾Ñ\98Ñ\83 Ñ\81Ñ\82е Ð¿Ñ\80оÑ\81ледили је празна.",
        "file-too-large": "Послата датотека је превелика.",
        "filename-tooshort": "Назив датотеке је прекратак.",
        "filetype-banned": "Овај тип датотеке је забрањен.",
        "emailnotarget": "Непостојеће или наважеће корисничко име примаоца.",
        "emailtarget": "Унос корисничког имена примаоца",
        "emailusername": "Корисничко име:",
-       "emailusernamesubmit": "Пошаљи",
+       "emailusernamesubmit": "Проследи",
        "email-legend": "Слање е-поруке кориснику/ци пројекта {{SITENAME}}",
        "emailfrom": "Од:",
        "emailto": "За:",
        "delete-confirm": "Брисање странице „$1“",
        "delete-legend": "Брисање",
        "historywarning": "<strong>Упозорење:</strong> Страница коју желите да избришете има историју са $1 {{PLURAL:$1|ревизијом|измене|измена}}:",
-       "historyaction-submit": "Прикажи",
+       "historyaction-submit": "Прикажи измене",
        "confirmdeletetext": "Управо ћете избрисати страницу, укључујући и њену историју.\nПотврдите своју намеру, да разумете последице и да ово радите у складу са [[{{MediaWiki:Policy-url}}|правилима]].",
        "actioncomplete": "Радња је завршена",
        "actionfailed": "Радња није успела",
        "deleting-subpages-warning": "<strong>Упозорење:</strong> Страница коју желите избрисати има [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|подстраницу|$1 подстранице|$1 подстраница|51=преко 50 подстраница}}]].",
        "rollback": "Врати измене",
        "rollback-confirmation-confirm": "Потврдите:",
+       "rollback-confirmation-yes": "Врати",
+       "rollback-confirmation-no": "Откажи",
        "rollbacklink": "врати",
        "rollbacklinkcount": "врати $1 {{PLURAL:$1|измену|измене|измена}}",
        "rollbacklinkcount-morethan": "врати више од $1 {{PLURAL:$1|измене|измене|измена}}",
        "mycontris": "Доприноси",
        "anoncontribs": "Доприноси",
        "contribsub2": "За {{GENDER:$3|$1}} ($2)",
+       "contributions-subtitle": "За {{GENDER:$3|$1}}",
        "contributions-userdoesnotexist": "Кориснички налог „$1“ није отворен.",
+       "negative-namespace-not-supported": "Именски простори са негативним вредностима нису подржани.",
        "nocontribs": "Нису пронађене промене које одговарају овим критеријумима.",
        "uctop": "тренутна",
        "month": "од месеца (и раније):",
        "blocklist-userblocks": "Сакриј блокаде налога",
        "blocklist-tempblocks": "Сакриј привремене блокаде",
        "blocklist-addressblocks": "Сакриј појединачне блокаде IP-а",
+       "blocklist-type": "Тип:",
+       "blocklist-type-opt-all": "Све",
+       "blocklist-type-opt-sitewide": "На нивоу сајта",
+       "blocklist-type-opt-partial": "Делимично",
        "blocklist-rangeblocks": "Сакриј блокаде опсега",
        "blocklist-timestamp": "Временска ознака",
        "blocklist-target": "Корисник",
        "blocklist-editing-page": "странице",
        "blocklist-editing-ns": "именски простори",
        "ipblocklist-empty": "Списак блокирања је празан.",
-       "ipblocklist-no-results": "ТÑ\80ажена IP Ð°Ð´Ñ\80еÑ\81а Ð¸Ð»Ð¸ ÐºÐ¾Ñ\80иÑ\81ниÑ\87ко Ð¸Ð¼Ðµ Ð½Ð¸Ñ\98е Ð±Ð»Ð¾ÐºÐ¸Ñ\80ано.",
+       "ipblocklist-no-results": "Ð\9dиÑ\81Ñ\83 Ð¿Ñ\80онаÑ\92ена Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ\80аÑ\98Ñ\83Ñ\9bа Ð±Ð»Ð¾ÐºÐ¸Ñ\80аÑ\9aа Ñ\82Ñ\80ажене IP Ð°Ð´Ñ\80еÑ\81е Ð¸Ð»Ð¸ ÐºÐ¾Ñ\80иÑ\81ниÑ\87ког Ð¸Ð¼ÐµÐ½Ð°.",
        "blocklink": "блокирај",
        "unblocklink": "деблокирај",
        "change-blocklink": "промени блокаду",
        "ipb_expiry_old": "Време истека је у прошлости.",
        "ipb_expiry_temp": "Сакривене блокаде корисника морају бити трајне.",
        "ipb_hide_invalid": "Не могу да потиснем овај налог; има више од {{PLURAL:$1|једне измене|$1 измена}}.",
+       "ipb_hide_partial": "Блокирања сакривених корисничких имена морају бити на нивоу сајта.",
        "ipb_already_blocked": "„$1“ је већ блокиран.",
        "ipb-needreblock": "$1 је већ блокиран. Желите ли да промените подешавања?",
        "ipb-otherblocks-header": "{{PLURAL:$1|Друга блокада|Друге блокаде}}",
        "watchlistedit-normal-done": "{{PLURAL:$1|1=Једна страница је уклоњена|$1 странице су уклоњене|$1 страница је уклоњено}} с вашег списка надгледања:",
        "watchlistedit-raw-title": "Уређивање необрађеног списка надгледања",
        "watchlistedit-raw-legend": "Уређивање необрађеног списка надгледања",
-       "watchlistedit-raw-explain": "Ð\9dаÑ\81лови Ñ\81а Ñ\81пиÑ\81ка Ð½Ð°Ð´Ð³Ð»ÐµÐ´Ð°Ñ\9aа Ñ\81Ñ\83 Ð¿Ñ\80иказани Ð¸Ñ\81под Ð¸ Ð¼Ð¾Ð³Ñ\83 Ñ\81е Ñ\83Ñ\80еÑ\92иваÑ\82и Ð´Ð¾Ð´Ð°Ð²Ð°Ñ\9aем Ð¸Ð»Ð¸ Ñ\83клаÑ\9aаÑ\9aем Ñ\81Ñ\82авки Ñ\81а Ñ\81пиÑ\81ка;\nÑ\98едан Ð½Ð°Ñ\81лов Ð¿Ð¾ Ñ\80едÑ\83.\nÐ\9aада Ð·Ð°Ð²Ñ\80Ñ\88иÑ\82е, ÐºÐ»Ð¸ÐºÐ½Ð¸Ñ\82е Ð½Ð° â\80\9e{{int:Watchlistedit-raw-submit}}â\80\9c.\nÐ\9cожеÑ\82е Ð´Ð° [[Special:EditWatchlist|коÑ\80иÑ\81Ñ\82иÑ\82е Ð¸ Ð¾Ð±Ð¸Ñ\87ан уређивач]].",
+       "watchlistedit-raw-explain": "Ð\9dаÑ\81лови Ñ\81а Ñ\81пиÑ\81ка Ð½Ð°Ð´Ð³Ð»ÐµÐ´Ð°Ñ\9aа Ñ\81Ñ\83 Ð¿Ñ\80иказани Ð¸Ñ\81под Ð¸ Ð¼Ð¾Ð³Ñ\83 Ñ\81е Ñ\83Ñ\80еÑ\92иваÑ\82и Ð´Ð¾Ð´Ð°Ð²Ð°Ñ\9aем Ð¸Ð»Ð¸ Ñ\83клаÑ\9aаÑ\9aем Ñ\81Ñ\82авки Ñ\81а Ñ\81пиÑ\81ка;\nÑ\98едан Ð½Ð°Ñ\81лов Ð¿Ð¾ Ñ\80едÑ\83.\nÐ\9aада Ð·Ð°Ð²Ñ\80Ñ\88иÑ\82е, ÐºÐ»Ð¸ÐºÐ½Ð¸Ñ\82е Ð½Ð° â\80\9e{{int:Watchlistedit-raw-submit}}â\80\9d.\nÐ\9cожеÑ\82е Ð´Ð° [[Special:EditWatchlist|коÑ\80иÑ\81Ñ\82иÑ\82е Ð¸ Ñ\81Ñ\82андаÑ\80дни уређивач]].",
        "watchlistedit-raw-titles": "Наслови:",
        "watchlistedit-raw-submit": "Ажурирај списак",
        "watchlistedit-raw-done": "Ваш списак надгледања је ажуриран.",
        "htmlform-int-toolow": "Наведена вредност је испод минимума од $1",
        "htmlform-int-toohigh": "Наведена вредност је изнад максимума од $1",
        "htmlform-required": "Ова вредност је обавезна.",
-       "htmlform-submit": "Постави",
+       "htmlform-submit": "Проследи",
        "htmlform-reset": "Врати промене",
        "htmlform-selectorother-other": "Друго",
        "htmlform-no": "Не",
        "logentry-block-unblock": "$1 је {{GENDER:$2|деблокирао|деблокирала}} {{GENDER:$4|$3}}",
        "logentry-block-reblock": "$1 је {{GENDER:$2|променио|променила}} подешавања за блокирање {{GENDER:$4|корисника|кориснице}} {{GENDER:$4|$3}} у трајању од $5 $6",
        "logentry-partialblock-block-page": "{{PLURAL:$1|странице|страница}} $2",
-       "logentry-partialblock-block": "$1 је {{GENDER:$2|блокирао|блокирала}} уређивање $7 {{GENDER:$4|кориснику|корисници|кориснику/ци}} $3 са временом истека од $5 $6",
+       "logentry-partialblock-block-ns": "{{PLURAL:$1|именског простора|именских простора}} $2",
+       "logentry-partialblock-block": "$1 је {{GENDER:$2|блокирао|блокирала}} уређивање $7 {{GENDER:$4|кориснику|корисници}} $3 са временом истека од $5 $6",
+       "logentry-partialblock-reblock": "$1 је {{GENDER:$2|променио}} подешавања блокирања {{GENDER:$4|корисника|кориснице}} $3 спречавањем измена $7 са временом истека од $5 $6",
        "logentry-non-editing-block-block": "$1 је {{GENDER:$2|блокирао|блокирала}} одређене неуређивачке радње {{GENDER:$4|кориснику|корисници|кориснику/ци}} $3 са временом истека од $5 $6",
        "logentry-non-editing-block-reblock": "$1 је {{GENDER:$2|променио|променила}} подешавања блокаде одређених неуређивачких радњи {{GENDER:$4|кориснику|корисници|кориснику/ци}} $3 са временом истека од $5 $6",
        "logentry-suppress-block": "$1 је {{GENDER:$2|блокирао|блокирала}} {{GENDER:$4|$3}} у трајању од $5 $6",
index 5cf1a0f..4016fb8 100644 (file)
@@ -12,7 +12,8 @@
                        "아라",
                        "Macofe",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Ferwiese unnerstriekje:",
        "recentchanges-label-minor": "Litje Annerenge",
        "recentchanges-label-bot": "Annerenge truch n Bot",
        "recentchanges-label-unpatrolled": "Nit-kontrollierde Annerenge",
-       "recentchanges-legend-newpage": "$1 - näie Siede",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(Sjuch uk ju [[Special:NewPages|Lieste mäd näie Sieden]])",
        "rcnotefrom": "Anwiesd wäide do Annerengen siet '''$2''' (max. '''$1''' Iendraage).",
        "rclistfrom": "Bloot näie Annerengen siet $3 $2 wiese.",
        "rcshowhideminor": "Litje Annerengen $1",
index fc0dd42..4f5202d 100644 (file)
        "passwordpolicies-policyflag-forcechange": "måste ändras vid inloggning",
        "passwordpolicies-policyflag-suggestchangeonlogin": "föreslå ändring vid inloggning",
        "easydeflate-invaliddeflate": "Innehåll som tillhandahålls är inte helt komprimerat",
-       "unprotected-js": "Av säkerhetsskäl kan inte JavaScript läsas in från oskyddade sidor. Skapa endast JavaScript i namnrymden MediaWiki: eller som en användarundersida."
+       "unprotected-js": "Av säkerhetsskäl kan inte JavaScript läsas in från oskyddade sidor. Skapa endast JavaScript i namnrymden MediaWiki: eller som en användarundersida.",
+       "userlogout-continue": "Om du vill logga ut, var god [$1 fortsätt till utloggningssidan].",
+       "userlogout-sessionerror": "Utloggning misslyckades p.g.a. sessionsfel. Var god [$1 försök igen]."
 }
index 7857def..8f8dfd9 100644 (file)
@@ -21,7 +21,8 @@
                        "Muddyb",
                        "Fitoschido",
                        "Rance",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "Yasen igra"
                ]
        },
        "tog-underline": "Wekea mstari viungo:",
@@ -46,7 +47,7 @@
        "tog-enotifminoredits": "Pia nitumie barua pale mabadiliko ya ukurasa yanapokuwa madogo tu.",
        "tog-enotifrevealaddr": "Onyesha anwani ya barua pepe yangu katika barua pepe za taarifa",
        "tog-shownumberswatching": "Onyesha idadi ya watumiaji waangalizi",
-       "tog-oldsig": "Sahihi iliyopo:",
+       "tog-oldsig": "Sahihi iliyopo yenu:",
        "tog-fancysig": "Weka sahihi tu (bila kujiweka kiungo yenyewe)",
        "tog-uselivepreview": "Tumia kihakikio cha papohapo",
        "tog-forceeditsummary": "Nishtue pale ninapoingiza muhtasari mtupu wa kuhariri",
        "nstab-template": "Kigezo",
        "nstab-help": "Msaada",
        "nstab-category": "Jamii",
+       "mainpage-nstab": "Mwanzo",
        "nosuchaction": "Kitendo hiki hakipo",
        "nosuchactiontext": "Haiwezikani kutenda kitendo kilichoandikwa kwenye KISARA.\nLabda ulikosea kuandika KISARA, au kiungo ulichofuata ina kasoro.\nAu labda kuna hitilafu kwenye programu inayotumika na {{SITENAME}}.",
        "nosuchspecialpage": "Ukurasa maalum huu hakuna",
        "minoredit": "Haya ni mabadiliko madogo",
        "watchthis": "Fuatilia ukurasa huu",
        "savearticle": "Hifadhi ukurasa",
+       "savechanges": "Hifadhi mabadiliko",
        "preview": "Hakiki",
        "showpreview": "Onyesha hakikisho la mabadiliko",
        "showdiff": "Onyesha mabadiliko",
        "recentchanges-label-plusminus": "Ukubwa ukurasa kubadilishwa na hii idadi ya baiti",
        "recentchanges-legend-heading": "<strong>Simulizi:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (pia tazama [[Special:NewPages|orodha ya kurasa mpya]])",
+       "rcfilters-filter-editsbyself-description": "Michango yenu.",
        "rcnotefrom": "Hapo chini {{PLURAL:$5|is the change|yaonekana mabadiliko}} tangu <strong>$3,$4</strong> (hadi <strong>$1</strong>tunaonyesha).",
        "rclistfrom": "Onyesha mabadiliko mapya kuanzia $3 $2",
        "rcshowhideminor": "$1 mabadiliko madogo",
        "contributions": "Michango ya {{GENDER:$1|mtumiaji}}",
        "contributions-title": "Michango ya mtumiaji $1",
        "mycontris": "Michango",
+       "anoncontribs": "Michango",
        "contribsub2": "Kwa {{GENDER:$3|$1}} ($2)",
        "nocontribs": "Mabadiliko yanayolingana na vigezo vilivyoulizwa hayakupatikana.",
        "uctop": "ya kisasa",
        "whatlinkshere-hidelinks": "$1 viungo",
        "whatlinkshere-hideimages": "Viungo vya faili $1",
        "whatlinkshere-filters": "Machujio",
+       "whatlinkshere-submit": "Nenda",
        "block": "Kumzuia mtumiaji",
        "unblock": "Kuacha kumzuia mtumiaji",
        "blockip": "Zuia mtumiaji",
        "imgmultipagenext": "ukurasa ujao →",
        "imgmultigo": "Nenda!",
        "imgmultigoto": "Uende kwenye ukurasa wa $1",
+       "img-lang-go": "Enda",
        "ascending_abbrev": "pand",
        "descending_abbrev": "shuk",
        "table_pager_next": "Ukurasa ujao",
        "version-software-version": "Toleo",
        "version-entrypoints-header-url": "KISARA Kioneshi Sanifu Raslimali",
        "redirect-submit": "Nenda",
+       "redirect-file": "Jina la faili",
        "fileduplicatesearch": "Tafuta mafaili ya nakili",
        "fileduplicatesearch-summary": "Kutafuta mafaili ya nakili kwa kuzingatia thamani za reli.",
        "fileduplicatesearch-filename": "Jina la faili:",
        "tag-filter-submit": "Chuja",
        "tags-title": "Tagi",
        "tags-description-header": "Maelezo kamili ya maana",
+       "tags-active-yes": "Ndiyo",
+       "tags-active-no": "Siyo",
        "tags-edit": "hariri",
        "tags-hitcount": "{{PLURAL:$1|badiliko|mabadiliko}} $1",
        "comparepages": "Linganisha kurasa",
index b3f5dde..d7e5a59 100644 (file)
        "userrights-groupsmember": "สมาชิกของ:",
        "userrights-groupsmember-auto": "สมาชิกโดยปริยายของ:",
        "userrights-groupsmember-type": "$1",
-       "userrights-groups-help": "à¸\84ุà¸\93สามารà¸\96à¹\80à¸\9bลีà¹\88ยà¸\99à¹\81à¸\9bลà¸\87à¸\81ลุà¹\88มà¸\97ีà¹\88à¸\9cูà¹\89à¹\83à¸\8aà¹\89รายà¸\99ีà¹\89อยูà¹\88:\n* à¸\81ลà¹\88อà¸\87à¸\97ีà¹\88มีà¹\80à¸\84รืà¹\88อà¸\87หมายà¸\96ูà¸\81 à¸«à¸¡à¸²à¸¢à¸\84วามวà¹\88า à¸\9cูà¹\89à¹\83à¸\8aà¹\89อยูà¹\88à¹\83à¸\99à¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99\n* à¸\81ลà¹\88อà¸\87à¸\97ีà¹\88à¹\84มà¹\88มีà¹\80à¸\84รืà¹\88อà¸\87หมายà¸\96ูà¸\81 à¸«à¸¡à¸²à¸¢à¸\84วามวà¹\88า à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¹\84มà¹\88à¹\84à¸\94à¹\89อยูà¹\88à¹\83à¸\99à¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99\n* à¹\80à¸\84รืà¹\88อà¸\87หมาย * à¸\8aีà¹\89วà¹\88าà¸\84ุà¸\93à¹\84มà¹\88สามารà¸\96à¸\99ำà¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99ออà¸\81à¹\84à¸\94à¹\89à¹\80มืà¹\88อà¸\84ุà¸\93à¹\80à¸\9eิà¹\88มà¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99à¹\84à¸\9bà¹\81ลà¹\89ว à¸«à¸£à¸·à¸­à¸\81ลัà¸\9aà¸\81ัà¸\99\n* à¹\80à¸\84รืà¹\88อà¸\87หมาย # à¸\9aี้ว่าคุณสามารถแก้คืนเวลาหมดอายุของสมาชิกภาพกลุ่มนี้เท่านั้น คุณไม่สามารถร่นเวลาหมดอายุได้",
+       "userrights-groups-help": "à¸\84ุà¸\93สามารà¸\96à¹\80à¸\9bลีà¹\88ยà¸\99à¹\81à¸\9bลà¸\87à¸\81ลุà¹\88มà¸\97ีà¹\88à¸\9cูà¹\89à¹\83à¸\8aà¹\89รายà¸\99ีà¹\89อยูà¹\88:\n* à¸\81ลà¹\88อà¸\87à¸\97ีà¹\88มีà¹\80à¸\84รืà¹\88อà¸\87หมายà¸\96ูà¸\81 à¸«à¸¡à¸²à¸¢à¸\84วามวà¹\88า à¸\9cูà¹\89à¹\83à¸\8aà¹\89อยูà¹\88à¹\83à¸\99à¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99\n* à¸\81ลà¹\88อà¸\87à¸\97ีà¹\88à¹\84มà¹\88มีà¹\80à¸\84รืà¹\88อà¸\87หมายà¸\96ูà¸\81 à¸«à¸¡à¸²à¸¢à¸\84วามวà¹\88า à¸\9cูà¹\89à¹\83à¸\8aà¹\89à¹\84มà¹\88à¹\84à¸\94à¹\89อยูà¹\88à¹\83à¸\99à¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99\n* à¹\80à¸\84รืà¹\88อà¸\87หมาย * à¸\8aีà¹\89วà¹\88าà¸\84ุà¸\93à¹\84มà¹\88สามารà¸\96à¸\99ำà¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99ออà¸\81à¹\84à¸\94à¹\89à¹\80มืà¹\88อà¸\84ุà¸\93à¹\80à¸\9eิà¹\88มà¸\81ลุà¹\88มà¸\99ัà¹\89à¸\99à¹\84à¸\9bà¹\81ลà¹\89ว à¸«à¸£à¸·à¸­à¸\81ลัà¸\9aà¸\81ัà¸\99\n* à¹\80à¸\84รืà¹\88อà¸\87หมาย # à¸\8aี้ว่าคุณสามารถแก้คืนเวลาหมดอายุของสมาชิกภาพกลุ่มนี้เท่านั้น คุณไม่สามารถร่นเวลาหมดอายุได้",
        "userrights-reason": "เหตุผล:",
        "userrights-no-interwiki": "คุณไม่มีสิทธิแก้ไขสิทธิผู้ใช้บนวิกิอื่น",
        "userrights-nodatabase": "ไม่มีฐานข้อมูล $1 หรือฐานข้อมูลอยู่บนเครื่องอื่น",
        "rcfilters-savedqueries-already-saved": "ตัวกรองเหล่านี้บันทุกแล้ว เปลี่ยนการตั้งค่าของคุณเพื่อสร้างตัวกรองที่บันทึกแล้วใหม่",
        "rcfilters-restore-default-filters": "คืนค่าตัวกรองปริยาย",
        "rcfilters-clear-all-filters": "ล้างตัวกรองทั้งหมด",
-       "rcfilters-show-new-changes": "à¸\94ูà¸\81ารà¹\80à¸\9bลีà¹\88ยà¸\99à¹\81à¸\9bลà¸\87ลà¹\88าสุà¸\94",
+       "rcfilters-show-new-changes": "à¸\94ูà¸\81ารà¹\80à¸\9bลีà¹\88ยà¸\99à¹\81à¸\9bลà¸\87à¹\83หมà¹\88à¸\95ัà¹\89à¸\87à¹\81à¸\95à¹\88 $1",
        "rcfilters-search-placeholder": "กรองการเปลี่ยนแปลง (ใช้รายการเลือกหรือค้นหาชื่อตัวกรอง)",
        "rcfilters-invalid-filter": "ตัวกรองไม่ถูกต้อง",
        "rcfilters-empty-filter": "ไม่มีตัวกรองเปิดใช้งาน แสดงการแก้ไขทั้งหมด",
index 7373150..ff452ee 100644 (file)
        "page_first": "ilk",
        "page_last": "son",
        "histlegend": "Fark seçimi: Karşılaştırmayı istediğiniz 2 sürümün önündeki daireleri işaretleyip, \"{{int:Compareselectedversions}}\" düğmesine basın.<br />\nTanımlar: '''({{int:cur}})''' = son revizyon ile arasındaki fark, '''({{int:last}})''' = bir önceki revizyon ile arasındaki fark, '''{{int:minoreditletter}}''' = küçük değişiklik.",
-       "history-fieldset-title": "Geçmişe gözat",
+       "history-fieldset-title": "Revizyonları filtrele",
        "history-show-deleted": "Sadece silinen sürümler",
        "histfirst": "en eski",
        "histlast": "en yeni",
        "historysize": "({{PLURAL:$1|1 bayt|$1 bayt}})",
-       "historyempty": "(boş)",
+       "historyempty": "boş",
        "history-feed-title": "Değişiklik geçmişi",
        "history-feed-description": "Viki üzerindeki bu sayfanın değişiklik geçmişi.",
        "history-feed-item-nocomment": "$1, $2'de",
        "right-reupload-own": "Kendisinin yüklediği bir dosyanın üzerine yaz",
        "right-reupload-shared": "Paylaşılan ortam deposundaki dosyaları yerel olarak geçersiz kıl",
        "right-upload_by_url": "Bir URL adresinden dosya yükle",
-       "right-purge": "Doğrulama yapmadan bir sayfa için site belleğini temizle",
+       "right-purge": "Bir sayfa için site önbelleğini temizle",
        "right-autoconfirmed": "IP-tabanlı hız limitleri etkilenme",
        "right-bot": "Otomatik bir işlem gibi muamele gör",
        "right-nominornewtalk": "Kullanıcı tartışma sayfalarında yaptığı küçük değişiklikler kullanıcıya yeni mesaj bildirimiyle bildirilmez",
        "grant-delete": "Sayfaları, sürümleri ve günlük girdileri sil",
        "grant-editinterface": "MediaWiki alanadını, sitewide'ı ve kullanıcı JSON'unu düzenle",
        "grant-editmycssjs": "Kullanıcı CSS/JSON/JavaScript'ini düzenle",
-       "grant-editmyoptions": "Kullanıcı tercihlerini Düzenle",
+       "grant-editmyoptions": "Kullanıcı tercihlerinizi ve JSON yapılandırmanızı düzenleyin",
        "grant-editmywatchlist": "İzleme listeni düzenle",
        "grant-editsiteconfig": "Sitewide ve kullanıcı CSS/JS değiştir",
        "grant-editpage": "Mevcut sayfaları düzenle",
        "rcfilters-savedqueries-already-saved": "Bu filtreler zaten kaydedildi. Yeni bir Kayıtlı Filtre oluşturmak için ayarlarınızı değiştirin.",
        "rcfilters-restore-default-filters": "Varsayılan süzgeçleri geri getir",
        "rcfilters-clear-all-filters": "Tüm süzgeçleri temizle",
-       "rcfilters-show-new-changes": "Yeni değişiklikleri görüntüle",
+       "rcfilters-show-new-changes": "$1 tarihinden bu yana yapılan yeni değişiklikleri görüntüleyin",
        "rcfilters-search-placeholder": "Son değişiklikleri filtrele (menüyü kullanın veya süzgeç adını arayın)",
        "rcfilters-invalid-filter": "Geçersiz süzgeç",
        "rcfilters-empty-filter": "Etkin süzgeç bulunmuyor. Tüm katkıları gösteriliyor.",
        "rcfilters-watchlist-markseen-button": "Tüm değişiklikleri görüldü olarak işaretle",
        "rcfilters-watchlist-edit-watchlist-button": "İzlenen sayfaların listesini düzenle",
        "rcfilters-watchlist-showupdated": "Gerçekleştirilen değişikliklerden bu yana ziyaret etmediğiniz sayfalarda yapılan değişiklikler <strong>koyu</strong> renktedir.",
-       "rcfilters-preference-label": "Son değişikliklerin geliştirilmiş sürümünü gizle",
-       "rcfilters-preference-help": "2017 arayüz tasarımını ve bu andan sonra eklenen tüm araçları geri alır.",
-       "rcfilters-watchlist-preference-label": "İzleme listesinin geliştirilmiş sürümünü gizle",
-       "rcfilters-watchlist-preference-help": "2017 arayüz tasarımını ve bu andan sonra eklenen tüm araçları geri alır.",
+       "rcfilters-preference-label": "JavaScript olmayan bir arayüz kullanın",
+       "rcfilters-preference-help": "Filtre olmadan arama yapma veya işlevselliği vurgulamadan SonDeğişiklikler'i yükler.",
+       "rcfilters-watchlist-preference-label": "JavaScript olmayan bir arayüz kullanın",
+       "rcfilters-watchlist-preference-help": "Filtre Listesini arama olmadan veya işlevselliği vurgulayarak İzleme Listesi'ni yükler.",
        "rcfilters-target-page-placeholder": "Bir sayfa (ya da kategori) adı girin",
        "rcnotefrom": "<strong>$3, $4</strong> tarihinden itibaren yapılan {{PLURAL:$5|değişiklik|değişiklik}} aşağıdadır (<strong>$1</strong> tarhine kadar olanlar gösterilmektedir).",
        "rclistfromreset": "Tarih seçimini sıfırla",
        "apisandbox-loading-results": "API sonuçları alınıyor...",
        "apisandbox-results-error": "API sorgusu yanıtı yüklenirken bir hata oluştu: $1.",
        "apisandbox-request-url-label": "İstek URL:",
-       "apisandbox-request-time": "İstek zamanı: $1",
+       "apisandbox-request-time": "İstek zamanı: {{PLURAL:$1|$1 ms}}",
        "apisandbox-continue": "Devam et",
        "apisandbox-continue-clear": "Temizle",
        "apisandbox-multivalue-all-namespaces": "$1 (Tüm isim alanları)",
        "enotif_body_intro_moved": "{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|taşındı}}, mevcut revizyon için bakınız: $3.",
        "enotif_body_intro_restored": "{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|geri getirildi}}, mevcut revizyon için bakınız: $3.",
        "enotif_body_intro_changed": "{{SITENAME}} sayfası $1, $2 tarafından $PAGEEDITDATE tarihinde {{GENDER:$2|değiştirildi}}, mevcut revizyon için bakınız: $3.",
-       "enotif_lastvisited": "Son ziyaretinizden bu yana olan tüm değişiklikleri görmek için $1'e bakın.",
+       "enotif_lastvisited": "Son ziyaretinizden bu yana yapılan tüm değişiklikler için bakınız: $1",
        "enotif_lastdiff": "Bu değişikliği görmek için, $1 sayfasına bakınız.",
        "enotif_anon_editor": "anonim kullanıcı $1",
        "enotif_body": "Sayın $WATCHINGUSERNAME,\n\n$PAGEINTRO $NEWPAGE\n\nEditörün girdiği özet: $PAGESUMMARY $PAGEMINOREDIT\n\nEditörün iletişim bilgileri:\ne-posta: $PAGEEDITOR_EMAIL\nviki: $PAGEEDITOR_WIKI\n\nBahsi geçen sayfayı oturum açarak ziyaret edinceye kadar sayfayla ilgili başka bildirim gönderilmeyecektir. Ayrıca izleme listenizdeki tüm sayfaların bildirim durumlarını sıfırlayabilirsiniz.\n\n{{SITENAME}} bildirim sistemi\n\n--\nE-posta bildirim ayarlarınızı değiştirmek için aşağıdaki sayfayı ziyaret ediniz:\n{{canonicalurl:{{#special:Preferences}}}}\n\nİzleme listesi ayarlarınızı değiştirmek için aşağıdaki sayfayı ziyaret ediniz:\n{{canonicalurl:{{#special:EditWatchlist}}}}\n\nSayfayı izleme listenizden silmek için aşağıdaki sayfayı ziyaret ediniz:\n$UNWATCHURL\n\nGeri bildirim ve daha fazla yardım için:\n$HELPPAGE",
        "deletepage": "Sayfayı sil",
        "confirm": "Onayla",
        "excontent": "eski içerik: '$1'",
-       "excontentauthor": "eski içerik: '$1' ('[[Special:Contributions/$2|$2]]' katkıda bulunmuş olan tek kullanıcı)",
+       "excontentauthor": "eski içerik: '$1' ve katkıda bulunmuş olan tek kullanıcı \"[[Special:Contributions/$2|$2]]\" ([[User talk:$2|mesaj]])",
        "exbeforeblank": "Silinmeden önceki içerik: '$1'",
        "delete-confirm": "\"$1\" sayfasını sil",
        "delete-legend": "Sil",
        "historywarning": "<strong>Uyarı:</strong> Silmek üzere olduğunuz sayfanın yaklaşık olarak $1 sürüme sahip bir geçmişi var:",
-       "historyaction-submit": "Göster",
+       "historyaction-submit": "Revizyonları göster",
        "confirmdeletetext": "Bu sayfayı veya dosyayı tüm geçmişi ile birlikte veritabanından kalıcı olarak silmek üzeresiniz.\nBu işlemden kaynaklı doğabilecek sonuçların farkında iseniz ve işlemin [[{{MediaWiki:Policy-url}}|Silme kurallarına]] uygun olduğuna eminseniz, işlemi onaylayın.",
        "actioncomplete": "İşlem tamamlandı",
        "actionfailed": "İşlem başarısız oldu",
        "mycontris": "Katkılar",
        "anoncontribs": "Katkılar",
        "contribsub2": "{{GENDER:$3|$1}} ($2) tarafından",
+       "contributions-subtitle": "{{GENDER:$3|$1}} için",
        "contributions-userdoesnotexist": "\"$1\" kullanıcı hesabı kayıtlı değil.",
        "nocontribs": "Bu kriterlere uyan değişiklik bulunamadı",
        "uctop": "güncel",
        "sp-contributions-newbies-sub": "Yeni kullanıcılar için",
        "sp-contributions-newbies-title": "Yeni hesaplar için kullanıcı katkıları",
        "sp-contributions-blocklog": "engelleme günlüğü",
-       "sp-contributions-suppresslog": "kullanıcının silinen katkıları",
-       "sp-contributions-deleted": "kullanıcının silinen katkıları",
+       "sp-contributions-suppresslog": "{{GENDER:$1|kullanıcının}} baskılanmış katkıları",
+       "sp-contributions-deleted": "{{GENDER:$1|kullanıcının}} silinen katkıları",
        "sp-contributions-uploads": "yüklenenler",
        "sp-contributions-logs": "günlükler",
        "sp-contributions-talk": "mesaj",
index 5617165..a1aac61 100644 (file)
@@ -89,7 +89,7 @@
        "subcategories": "Адаккы бөлүктер",
        "category-media-header": "«$1» деп бөлүкте файлдар",
        "category-empty": "''Амгы бо бөлүкте медиа база арыннар чок.''",
-       "hidden-categories": "{{PLURAL:$1|1=Ð\9aөзүлбеÑ\81 Ð°Ò£Ð³Ñ\8bлал|Ð\9aөзүлбеÑ\81 аңгылалдар}}",
+       "hidden-categories": "{{PLURAL:$1|1=ЧажÑ\8bÑ\80ган Ð°Ò£Ð³Ñ\8bлал|ЧажÑ\8bÑ\80ган аңгылалдар}}",
        "hidden-category-category": "Чажыт бөлүктер",
        "category-subcat-count": "{{PLURAL:$2|1=Ук аңгылал чүгле дараазында иштики аңгылалдыг.|Ук аңгылалда бар-ла $2 иштики аңгылалдарның $1 иштики аңгылалы көстүп турар.}}",
        "category-subcat-count-limited": "Ук аңгылалда {{PLURAL:$1|1=бир|$1}} иштики аңгылал бар.",
        "categorypage": "Бөлүктүң арынын көөрү",
        "viewtalkpage": "Чугааны көөрү",
        "otherlanguages": "Өске дылдарга",
-       "redirectedfrom": "($1 ÐºÐ°Ñ\82ап Ñ\87оÑ\80Ñ\83Ñ\82кан)",
+       "redirectedfrom": "($1 Ð°Ñ\80Ñ\8bндан Ñ\88илÑ\87Ñ\8dÑ\8dн)",
        "redirectpagesub": "шигледир арын",
-       "lastmodifiedat": "Бо арын сөөлгү катап $1-ның хүнүнде, $2 турда өскерилген.",
+       "lastmodifiedat": "Бо арын сөөлгү катап $1 хүнде, $2 турда эдиттинген.",
        "protectedpage": "Камгалаган арын",
        "jumpto": "Шилчиир:",
        "jumptonavigation": "навигация",
        "badaccess": "Алдаг:Эргеңер чок.",
        "versionrequired": "МедиаВикиниң $1 үндүреризи херек",
        "ok": "Чөп",
-       "retrievedfrom": "Дөзү - «$1»",
+       "retrievedfrom": "Дөзү  «$1»",
        "youhavenewmessages": "Силерде $1 ($2) бар.",
        "youhavenewmessagesmulti": "«$1» деп арында силерге чаа чагаалар бар.",
        "editsection": "эдер",
        "editlink": "эдер",
        "viewsourcelink": "Үндезин кодту көөр",
        "editsectionhint": "«$1» салбырны эдер",
-       "toc": "Ð\94опÑ\87Ñ\83зÑ\83",
+       "toc": "Ð\94олÑ\83 Ñ\83Ñ\82казÑ\8b",
        "showtoc": "көргүзери",
        "hidetoc": "чажырары",
        "collapsible-collapse": "Кызырар",
        "userlogin-yourname-ph": "Бүрүткедир адыңар киириңер",
        "yourpassword": "Чажыт сөс",
        "userlogin-yourpassword": "Пароль",
+       "createacct-yourpassword-ph": "Уруңну (парольду) киириңер",
        "yourpasswordagain": "Чажыт сөзүңерни катап бижиңер:",
+       "createacct-yourpasswordagain": "Уруңну (парольду) бадыткаңар",
+       "createacct-yourpasswordagain-ph": "Уруңну (парольду) ам база киириңер",
        "login": "Кирери",
        "nav-login-createaccount": "Кирери / бүрүткел бижикти чогаадыры",
        "logout": "Үнери",
        "login-abort-generic": "Системаже таптыг эвес кирип тур силер",
        "loginlanguagelabel": "Дыл: $1",
        "pt-login": "Кирер",
-       "pt-createaccount": "Ð\91Ò¯Ñ\80Ò¯Ñ\82кел Ð±Ð¸Ð¶Ð¸Ðº ÐºÑ\8bлÑ\8bр",
+       "pt-createaccount": "Ð\91Ò¯Ñ\80Ò¯Ñ\82кенир",
        "pt-userlogout": "Үнер",
        "php-mail-error-unknown": "PHP-ниң mail() ажыл-чорудулгазында билбес алдаг бар.",
        "changepassword": "Чажыт сөстү өскертири",
        "nohistory": "Бо арынның өскерлиишкин төөгүзү чок.",
        "currentrev": "Амгы үе үндүрери",
        "currentrev-asof": "Амгы $1 үениң бижээни",
-       "revisionasof": "$1 версиязы",
+       "revisionasof": "$1 янзы-хевири",
        "revision-info": "$2 киржикчиниң $1 хүнүнде киирилдези",
-       "previousrevision": "←Амдыы арын",
-       "nextrevision": "Ð\90Ñ\80Ñ\82Ñ\8bк Ñ\87аа Ò¯Ð½Ð´Ò¯Ñ\80еÑ\80и→",
+       "previousrevision": "← Эрги арын",
+       "nextrevision": "Чаа Ð°Ñ\80Ñ\8bн →",
        "currentrevisionlink": "Амгы үе үндүрери",
        "cur": "амгы",
        "next": "дараазында",
        "unwatchedpages": "Хайгаарабас арыннар",
        "unusedtemplates": "Ажыглаан эвес майыктар",
        "unusedtemplateswlh": "өске холбаалар",
-       "randompage": "Душ бооп таваржып келген арын",
+       "randompage": "Дужар арын",
        "statistics": "Статистика",
        "statistics-pages": "Арыннар",
        "brokenredirects-edit": "өскертири",
        "newpages": "Чаа арыннар",
        "newpages-username": "Ажыглакчының ады:",
        "ancientpages": "Эң эрги арыннар",
-       "move": "Шимчээри",
+       "move": "Өскээр адаар",
        "movethispage": "Бо арынны шимчээри",
        "pager-newer-n": "{{PLURAL:$1|артык чаа}}",
        "pager-older-n": "{{PLURAL:$1|артык эрги}}",
        "newtitle": "Чаа ат:",
        "move-watch": "Бо арынны хайгаараары",
        "movepagebtn": "Арынны шимчээри",
-       "movelogpage": "ШимÑ\87Ñ\8dÑ\8dÑ\80инге Ð¶Ñ\83Ñ\80нал",
+       "movelogpage": "Ð\90Ñ\82 Ó©Ñ\81кеÑ\80илгелеÑ\80иниң Ð¶Ñ\83Ñ\80налÑ\8b",
        "movereason": "Чылдагаан:",
        "revertmove": "эгидип тургузары",
        "export": "Арынар үндүр дамчыдары",
        "tooltip-pt-logout": "Үнери",
        "tooltip-pt-createaccount": "Албан эвес-даа болза, бүрүткел бижикти кылгаш, системаже кирерин силерге саналдап тур бис.",
        "tooltip-ca-talk": "Кол арынны сайгарары",
-       "tooltip-ca-edit": "Ð\91о арынны эдер",
-       "tooltip-ca-addsection": "Чаа салбыр кылыр",
+       "tooltip-ca-edit": "Ук арынны эдер",
+       "tooltip-ca-addsection": "Чаа салбыр тургузуп кылыр",
        "tooltip-ca-viewsource": "Бо арынны өскертилгелерден камгалап каан, чогум ону көрүп, ооң үндезин кодун хоолгалап ап болур силер.",
        "tooltip-ca-history": "Арынның өскерлиишкиннериниң дептери",
        "tooltip-ca-protect": "Бо арынны камгалаары",
        "tooltip-ca-delete": "Бо арынны ырадыры",
-       "tooltip-ca-move": "Ð\91о Ð°Ñ\80Ñ\8bннÑ\8b Ñ\88имÑ\87Ñ\8dÑ\8dÑ\80и",
+       "tooltip-ca-move": "Ð\90Ñ\80Ñ\8bннÑ\8b Ó©Ñ\81кÑ\8dÑ\8dÑ\80 Ð°Ð´Ð°Ð°Ñ\80",
        "tooltip-ca-watch": "Бо арынны хайгааралыңар даңзызынче немээр",
        "tooltip-ca-unwatch": "Силерниң хайгаарал даңзызындан бо арынны ырадыры",
-       "tooltip-search": "{{grammar:locative|{{SITENAME}}}} дилээр",
+       "tooltip-search": "{{grammar:locative|{{SITENAME}}}} Ð¸Ñ\88Ñ\82инден Ð´Ð¸Ð»Ñ\8dÑ\8dÑ\80",
        "tooltip-search-go": "Шак ындыг аттыг арынче шилчиир",
-       "tooltip-search-fulltext": "Ð\90йÑ\8bÑ\82Ñ\82Ñ\8bнган сөзүглелдиг арыннарны дилээр",
+       "tooltip-search-fulltext": "Ук сөзүглелдиг арыннарны дилээр",
        "tooltip-p-logo": "Кол арынче кирер",
        "tooltip-n-mainpage": "Кол арынче шилчиир",
        "tooltip-n-mainpage-description": "Кол арынче кирер",
        "confirm-unwatch-button": "Чөп",
        "imgmultipageprev": "← эрткен арын",
        "imgmultipagenext": "дараазында арын →",
-       "imgmultigo": "Go!",
+       "imgmultigo": "Шилчиир!",
        "table_pager_next": "Дараазында арын",
        "table_pager_prev": "Эрткен арын",
        "table_pager_first": "Бирги арын",
index 39f7f80..fac3da1 100644 (file)
        "passwordpolicies-policyflag-forcechange": "має бути змінено при вході",
        "passwordpolicies-policyflag-suggestchangeonlogin": "запропонувати зміну при вході",
        "easydeflate-invaliddeflate": "Наданий вміст не стиснений належним чином",
-       "unprotected-js": "З міркувань безпеки JavaScript не можна запускати з незахищених сторінок. Будь ласка, створюйте javascript лише в просторі MediaWiki, або як особисту підсторінку користувача."
+       "unprotected-js": "З міркувань безпеки JavaScript не можна запускати з незахищених сторінок. Будь ласка, створюйте javascript лише в просторі MediaWiki, або як особисту підсторінку користувача.",
+       "userlogout-continue": "Якщо Ви хочете вийти із системи, [$1 перейдіть на сторінку виходу].",
+       "userlogout-sessionerror": "Вихід із системи не відбувся через помилку сесії. Будь ласка, [$1 спробуйте знову]."
 }
index 2ab144f..b7dc9c4 100644 (file)
@@ -35,7 +35,8 @@
                        "Hello903hello",
                        "Fitoschido",
                        "Kanashimi",
-                       "Roy17"
+                       "Roy17",
+                       "Tang891228"
                ]
        },
        "tog-underline": "連結加底線:",
        "title-invalid-talk-namespace": "所請求嘅版面標題指去未開嘅討論版。",
        "title-invalid-characters": "所請求嘅版面標題有「$1」呢個無效字符。",
        "title-invalid-relative": "標題有相對路徑。因為用戶嘅瀏覽器經常處理唔到相對路徑(./, ../),所以相對路徑無效。",
-       "title-invalid-magic-tilde": "所請求嘅版面標題有無效嘅波浪線魔字(<nowiki>~~~</nowiki>)。",
+       "title-invalid-magic-tilde": "所請求嘅版面標題有無效嘅波浪線魔字(<nowiki>~~~</nowiki>)。",
        "title-invalid-too-long": "所請求嘅版面標題太長。標題用UTF-8編碼嗰時嘅長度唔應該超過 $1 {{PLURAL:$1|字節}}",
        "title-invalid-leading-colon": "所請求嘅版面標題開頭有無效冒號。",
        "perfcached": "以下嘅資料係嚟自快取,可能唔係最新嘅。 最多有{{PLURAL:$1|一個結果|$1個結果}}響快取度。",
        "undo-failure": "呢個編輯唔能夠取消,由於同途中嘅編輯有衝突。",
        "undo-norev": "呢個編輯唔能夠取消,由於佢唔存在或者刪除咗。",
        "undo-nochange": "呢個編輯睇嚟經已一早取消咗。",
-       "undo-summary": "取消由[[Special:Contributions/$2|$2]] ([[User talk:$2|對話]])所做嘅修訂 $1",
+       "undo-summary": "取消由[[Special:Contributions/$2|$2]]([[User talk:$2|傾偈]])所做嘅修訂 $1",
        "undo-summary-username-hidden": "取消匿埋咗嘅用戶嘅修改版本 $1",
        "cantcreateaccount-text": "由呢個IP地址 ('''$1''') 開嘅新戶口已經被[[User:$3|$3]]封鎖。\n\n當中俾$3封鎖嘅原因係''$2''",
        "cantcreateaccount-range-text": "由呢個IP地址範圍<strong>$1</strong>(包括你個IP <strong>$4</strong>)開嘅新戶口已經畀[[User:$3|$3]]封鎖咗。\n\n$3畀嘅理由係<em>$2</em>",
index 829f802..2213192 100644 (file)
                        "Ff98sha",
                        "VulpesVulpes825",
                        "佛壁灯",
-                       "94rain"
+                       "94rain",
+                       "Viztor"
                ]
        },
        "tog-underline": "链接下划线:",
        "blocklist-tempblocks": "隐藏临时封禁",
        "blocklist-addressblocks": "隐藏单个IP封禁",
        "blocklist-type": "类型:",
+       "blocklist-type-opt-all": "全部",
+       "blocklist-type-opt-sitewide": "全站",
+       "blocklist-type-opt-partial": "部分的",
        "blocklist-rangeblocks": "隐藏IP段封禁",
        "blocklist-timestamp": "时间",
        "blocklist-target": "目标",
        "blocklist-editing-page": "页面",
        "blocklist-editing-ns": "名字空间",
        "ipblocklist-empty": "封禁列表为空。",
-       "ipblocklist-no-results": "请æ±\82ç\9a\84IPå\9c°å\9d\80æ\88\96ç\94¨æ\88·å\90\8d没æ\9c\89被封禁。",
+       "ipblocklist-no-results": "请æ±\82ç\9a\84IPå\9c°å\9d\80æ\88\96ç\94¨æ\88·å\90\8dæ\9cª被封禁。",
        "blocklink": "封禁",
        "unblocklink": "解封",
        "change-blocklink": "更改封禁",
        "passwordpolicies-policyflag-forcechange": "必须在登录时更改",
        "passwordpolicies-policyflag-suggestchangeonlogin": "建议在登录时更改",
        "easydeflate-invaliddeflate": "提供的内容未被适当缩小",
-       "unprotected-js": "基于安全原因,JavaScript不能在未保护页面中载入。请在 MediaWiki : 命名空间或者用户子页面中添加JavaScript。"
+       "unprotected-js": "基于安全原因,JavaScript不能在未保护页面中载入。请在 MediaWiki : 命名空间或者用户子页面中添加JavaScript。",
+       "userlogout-continue": "如果你希望登出请[$1 点这里]。",
+       "userlogout-sessionerror": "登出失败,会话错误。请[$1 重试]"
 }
index c3b1ab2..1542eda 100644 (file)
                        "Hello903hello",
                        "Luuva",
                        "Davidzdh",
-                       "WQL"
+                       "WQL",
+                       "Tang891228"
                ]
        },
        "tog-underline": "底線標示連結:",
        "clearyourcache": "<strong>注意:</strong>在您儲存之後您必須清除瀏覽器快取才可看到最新的變更。\n* <strong>Firefox / Safari:</strong>按住 <em>Shift</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em> 或 <em>Ctrl-R</em> (Mac 則為 <em>⌘-R</em>) \n* <strong>Google Chrome:</strong>按 <em>Ctrl-Shift-R</em> (Mac 則為 <em>⌘-Shift-R</em>) \n* <strong>Internet Explorer:</strong>按住 <em>Ctrl</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em>\n* <strong>Opera:</strong>前往 <em>選單 → 設定</em> (在 Mac 為 <em>Opera → 偏好設定</em>) 然後再到 <em>隱私 & 安全性 → 清除瀏覽資料 → 已快取的圖片與檔案</em>。",
        "usercssyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 CSS 。",
        "userjsonyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 JSON。",
-       "userjsyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 JavaScript 。",
+       "userjsyoucanpreview": "<strong>提示:</strong>在儲存之前使用「{{int:showpreview}}」按鈕來測試您的新 JavaScript。",
        "usercsspreview": "<strong>您目前正預覽您的使用者 CSS,CSS 還尚未儲存!</strong>",
        "userjsonpreview": "<strong>請注意您僅是在測試/預覽您的使用者 JSON 設定,內容還尚未儲存!</strong>",
        "userjspreview": "<strong>您目前正預覽您的使用者 JavaScript,JavaScript 還尚未儲存!</strong>",
        "booksources-search": "搜尋",
        "booksources-text": "下列清單包含其他銷售新書籍或二手書籍的網站連結,可會有你想尋找書籍的進一部資訊:",
        "booksources-invalid-isbn": "您提供的 ISBN 不正確,請檢查複製的來源是否有誤。",
-       "magiclink-tracking-rfc": "使用 RFC 魔連結的頁面",
-       "magiclink-tracking-rfc-desc": "此頁面使用 RFC 魔法連結的頁面,請參考 [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] 的如何遷移。",
-       "magiclink-tracking-pmid": "使用 PMID 魔連結的頁面",
-       "magiclink-tracking-pmid-desc": "此頁面使用 PMID 魔法連結的頁面,請參考 [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] 的如何遷移。",
-       "magiclink-tracking-isbn": "使用 ISBN 魔連結的頁面",
-       "magiclink-tracking-isbn-desc": "此頁面使用 ISBN 魔法連結的頁面,請參考 [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] 的如何遷移。",
+       "magiclink-tracking-rfc": "使用 RFC 魔連結的頁面",
+       "magiclink-tracking-rfc-desc": "此頁面使用RFC魔術連結,請參考[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org]以了解如何遷移。",
+       "magiclink-tracking-pmid": "使用 PMID 魔連結的頁面",
+       "magiclink-tracking-pmid-desc": "此頁面使用PMID魔術連結,請參考[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org]以了解如何遷移。",
+       "magiclink-tracking-isbn": "使用 ISBN 魔連結的頁面",
+       "magiclink-tracking-isbn-desc": "此頁面使用ISBN魔術連結,請參考[https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org]以了解如何遷移。",
        "specialloguserlabel": "執行者:",
        "speciallogtitlelabel": "目標(標題或以 {{ns:user}}:使用者名稱 表示使用者):",
        "log": "日誌",
        "version-libraries-description": "描述",
        "version-libraries-authors": "作者",
        "redirect": "依檔案、使用者、頁面、修訂或日誌 ID 來重新導向",
-       "redirect-summary": "此特殊頁面可用來重新導向至檔案 (指定檔案名稱)、頁面 (指定修訂 ID 或頁面 ID)、使用者頁面 (指定使用者 ID)、或者日誌項目 (指定日誌 ID)。用法:[[{{#Special:Redirect}}/file/Example.jpg]]、[[{{#Special:Redirect}}/page/64308]]、[[{{#Special:Redirect}}/revision/328429]]、[[{{#Special:Redirect}}/user/101]] 或 [[{{#Special:Redirect}}/logid/186]]。",
+       "redirect-summary": "此特殊頁面可用來重新導向至檔案(指定檔案名稱)、頁面(指定修訂 ID 或頁面 ID)、使用者頁面(指定使用者 ID)、或者日誌項目(指定日誌 ID)。用法:[[{{#Special:Redirect}}/file/Example.jpg]]、[[{{#Special:Redirect}}/page/64308]]、[[{{#Special:Redirect}}/revision/328429]]、[[{{#Special:Redirect}}/user/101]] 或 [[{{#Special:Redirect}}/logid/186]]。",
        "redirect-submit": "執行",
        "redirect-lookup": "查詢:",
        "redirect-value": "值:",
        "passwordpolicies-policyflag-forcechange": "必須在登入時更改",
        "passwordpolicies-policyflag-suggestchangeonlogin": "建議在登入時更改",
        "easydeflate-invaliddeflate": "提供的內容未被正常的壓縮",
-       "unprotected-js": "基於安全因素,JavaScript 不能從未保護的頁面來載入。請僅在 MediaWiki:命名空間或使用者子頁面中建立 JavaScript。"
+       "unprotected-js": "基於安全因素,JavaScript 不能從未保護的頁面來載入。請僅在 MediaWiki:命名空間或使用者子頁面中建立 JavaScript。",
+       "userlogout-continue": "若您想要登出請[$1 繼續前至登出頁面]。",
+       "userlogout-sessionerror": "出於 session 錯誤造成登出失敗。請[$1 重試]。"
 }
index 5e1feb7..b7d584a 100644 (file)
@@ -24,6 +24,8 @@
  * @author  Platonides
  */
 
+use MediaWiki\MediaWikiServices;
+
 require_once __DIR__ . '/Benchmarker.php';
 
 /**
@@ -45,7 +47,8 @@ class BenchHttpHttps extends Benchmarker {
        }
 
        private function doRequest( $proto ) {
-               Http::get( "$proto://localhost/", [], __METHOD__ );
+               MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                       get( "$proto://localhost/", [], __METHOD__ );
        }
 
        // bench function 1
index 900752f..b57db8f 100644 (file)
@@ -34,6 +34,8 @@
  * @author Antoine Musso <hashar at free dot fr>
  */
 
+use MediaWiki\MediaWikiServices;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -216,7 +218,7 @@ class FindHooks extends Maintenance {
 
                $retval = [];
                while ( true ) {
-                       $json = Http::get(
+                       $json = MediaWikiServices::getInstance()->getHttpRequestFactory()->get(
                                wfAppendQuery( 'https://www.mediawiki.org/w/api.php', $params ),
                                [],
                                __METHOD__
index 1728695..f27ea2f 100644 (file)
@@ -211,7 +211,8 @@ class ImportImages extends Maintenance {
 
                                if ( $checkUserBlock && ( ( $processed % $checkUserBlock ) == 0 ) ) {
                                        $user->clearInstanceCache( 'name' ); // reload from DB!
-                                       if ( $user->isBlocked() ) {
+                                       // @TODO Use PermissionManager::isBlockedFrom() instead.
+                                       if ( $user->getBlock() ) {
                                                $this->output( $user->getName() . " was blocked! Aborting.\n" );
                                                break;
                                        }
index e60e776..1d4b496 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\MediaWikiServices;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -64,7 +66,8 @@ class ImportSiteScripts extends Maintenance {
                        $url = wfAppendQuery( $baseUrl, [
                                'action' => 'raw',
                                'title' => "MediaWiki:{$page}" ] );
-                       $text = Http::get( $url, [], __METHOD__ );
+                       $text = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                               get( $url, [], __METHOD__ );
 
                        $wikiPage = WikiPage::factory( $title );
                        $content = ContentHandler::makeContent( $text, $wikiPage->getTitle() );
@@ -86,7 +89,8 @@ class ImportSiteScripts extends Maintenance {
 
                while ( true ) {
                        $url = wfAppendQuery( $baseUrl, $data );
-                       $strResult = Http::get( $url, [], __METHOD__ );
+                       $strResult = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                               get( $url, [], __METHOD__ );
                        $result = FormatJson::decode( $strResult, true );
 
                        $page = null;
index cb85a53..7a5e93e 100644 (file)
@@ -242,6 +242,7 @@ U+09FCE鿎|U+040EE䃮|
 U+09FCF鿏|U+04951䥑|
 U+09FD2鿒|U+09FD3鿓|
 U+09FD4鿔|U+093B6鎶|
+U+22016𢀖|U+05DE0巠|
 U+235CB𣗋|U+06B13欓|
 U+23C97𣲗|U+06E4B湋|
 U+23C98𣲘|U+06F55潕|
index 6c34e0b..1613b83 100644 (file)
@@ -26,6 +26,8 @@
 名份 名分
 職份 职分
 份外 分外
+份外,      份外,
+份外卖      份外卖
 份內 分内
 部份 部分
 知識份子   知识分子
 臨著稱      临著称
 臨著者      临著者
 臨著述      临著述
-麗著 丽着
-麗著書      丽著书
-麗著作      丽著作
-麗著名      丽著名
-麗著錄      丽著录
-麗著稱      丽著称
-麗著者      丽著者
-麗著述      丽著述
 樂著 乐着
 樂著書      乐著书
 樂著作      乐著作
 樂著稱      乐著称
 樂著者      乐著者
 樂著述      乐著述
+樂著《      乐著《
 乘著 乘着
 乘著書      乘著书
 乘著作      乘著作
 亮著称      亮著称
 亮著者      亮著者
 亮著述      亮著述
+亮著《      亮著《
 仗著 仗着
 仗著書      仗著书
 仗著作      仗著作
 信著称      信著称
 信著者      信著者
 信著述      信著述
+信著《      信著《
 候著 候着
 候著書      候著书
 候著作      候著作
 光著称      光著称
 光著者      光著者
 光著述      光著述
+光著《      光著《
 關著 关着
 關著書      关著书
 關著作      关著作
 印著稱      印著称
 印著者      印著者
 印著述      印著述
+印著《      印著《
 壓著 压着
 壓著書      压著书
 壓著作      压著作
 定著称      定著称
 定著者      定著者
 定著述      定著述
+定著《      定著《
 對著 对着
 對著書      对著书
 對著作      对著作
 展著稱      展著称
 展著者      展著者
 展著述      展著述
+展著《      展著《
 帶著 带着
 帶著書      带著书
 帶著作      带著作
 心著称      心著称
 心著者      心著者
 心著述      心著述
+心著《      心著《
 忍著 忍着
 忍著書      忍著书
 忍著作      忍著作
 懷著稱      怀著称
 懷著者      怀著者
 懷著述      怀著述
+懷著《      怀著《
 急著 急着
 急著書      急著书
 急著作      急著作
 夢著稱      梦著称
 夢著者      梦著者
 夢著述      梦著述
+夢著《      梦著《
 梳著 梳着
 梳著作      梳著作
 梳著名      梳著名
 憑著者      凭著者
 三十六著   三十六着
 走為上著   走为上着
+機率 几率
+乙個 一个
+乙隻 一只
+乙份 一份
 記憶體      内存
 乙太網      以太网
 點陣圖      位图
@@ -2551,11 +2559,11 @@ IP位址        IP地址
 空中巴士   空中客车
 電視劇集   电视剧
 狂牛症      疯牛病
+瘋牛症      疯牛病
 結他 吉他
 了結他      了结他
 連結他      连结他
 鏈結 链接
-已開發國家        发达国家
 太空飛行員        宇航员
 太空衣      宇航服
 外部連結   外部链接
@@ -2715,3 +2723,5 @@ A型肝炎        甲型肝炎
 道瓊 道琼斯
 聖佐治      圣乔治
 格瑞那丁   格林纳丁斯
+普立茲獎   普利策奖
+富比士      福布斯
index 93acb33..4bc445b 100644 (file)
 來著 來着
 樂著 樂着
 努力著      努力着
-麗著 麗着
 連著 連着
 戀著 戀着
 涼著 涼着
 定著称      定著稱
 定著錄      定著錄
 定著書      定著書
+定著《      定著《
 動著作      動著作
 動著者      動著者
 動著名      動著名
 光著称      光著稱
 光著錄      光著錄
 光著書      光著書
+光著《      光著《
 跪著作      跪著作
 跪著者      跪著者
 跪著名      跪著名
 懷著稱      懷著稱
 懷著錄      懷著錄
 懷著書      懷著書
+懷著《      懷著《
 晃著作      晃著作
 晃著者      晃著者
 晃著名      晃著名
 樂著稱      樂著稱
 樂著錄      樂著錄
 樂著書      樂著書
+樂著《      樂著《
 努力著作   努力著作
 努力著者   努力著者
 努力著名   努力著名
 努力著称   努力著稱
 努力著錄   努力著錄
 努力著書   努力著書
-麗著作      麗著作
-麗著者      麗著者
-麗著名      麗著名
-麗著述      麗著述
-麗著稱      麗著稱
-麗著錄      麗著錄
-麗著書      麗著書
 連著作      連著作
 連著者      連著者
 連著名      連著名
 亮著称      亮著稱
 亮著錄      亮著錄
 亮著書      亮著書
+亮著《      亮著《
 臨著作      臨著作
 臨著者      臨著者
 臨著名      臨著名
 夢著稱      夢著稱
 夢著錄      夢著錄
 夢著書      夢著書
+夢著《      夢著《
 蒙著作      蒙著作
 蒙著者      蒙著者
 蒙著名      蒙著名
 心著称      心著稱
 心著錄      心著錄
 心著書      心著書
+心著《      心著《
 信著作      信著作
 信著者      信著者
 信著名      信著名
 信著称      信著稱
 信著錄      信著錄
 信著書      信著書
+信著《      信著《
 行著作      行著作
 行著者      行著者
 行著名      行著名
 印著稱      印著稱
 印著錄      印著錄
 印著書      印著書
+印著《      印著《
 應著作      應著作
 應著者      應著者
 應著名      應著名
 展著稱      展著稱
 展著錄      展著錄
 展著書      展著書
+展著《      展著《
 站著作      站著作
 站著者      站著者
 站著名      站著名
 厄瓜多尔   厄瓜多爾
 厄瓜多爾   厄瓜多爾
 厄瓜多      厄瓜多爾
+百慕大      百慕達
 厄利垂亞   厄立特里亞
 吉布地      吉布堤
 哥斯大黎加        哥斯達黎加
@@ -3078,3 +3081,7 @@ IP地址  IP位址
 圣乔治      聖佐治
 聖喬治      聖佐治
 格瑞那丁   格林納丁斯
+空中客车   空中巴士
+疯牛病      瘋牛症
+狂牛症      瘋牛症
+普利策奖   普立茲獎
index aacec98..4adbbcf 100644 (file)
 情蒐 情搜
 蘋果 苹果
 蘋婆 苹婆
+鄭蘋如      郑苹如
 於之莹      於之莹
 陆徵祥      陆徵祥
 瞭臺 瞭台
index dd8e5d0..bf24176 100644 (file)
 着眼于      著眼於
 桃金娘      桃金孃
 粘膜 黏膜
+几率 機率
 缺省 預設
 以太网      乙太網
 光盘 光碟
 唐纳德·特朗普   唐納·川普
 當勞·特朗普      唐納·川普
 當奴·特朗普      唐納·川普
-æ¦\82ç\8e\87 æ©\9fç\8e\87
\96¯牛症      狂牛症
+ç\96¯ç\89\9bç\97\85      ç\8b\82ç\89\9bç\97\87
\98\8b牛症      狂牛症
 甲肝 A肝
 甲型肝炎   A型肝炎
 乙肝 B肝
@@ -661,7 +662,6 @@ IP地址    IP位址
 獨立國家聯合體  獨立國家國協
 东南亚国家联盟  東南亞國家協會
 東南亞國家聯盟  東南亞國家協會
-发达国家   已開發國家
 哥特式      哥德式
 落車 下車
 上落客      上下客
@@ -821,3 +821,5 @@ IP地址    IP位址
 聖佐治      聖喬治
 格林纳丁斯        格瑞那丁
 格林納丁斯        格瑞那丁
+空中客车   空中巴士
+普利策奖   普立茲獎
index a3565b8..871f1ef 100644 (file)
@@ -91,8 +91,6 @@
 古語云      古語云
 經有云      經有云
 語有云      語有云
-采納 採納
-風采 風采
 于樂 于樂
 于軍 于軍
 于堅 于堅
 于國治      于國治
 于楓 于楓
 黎吉雲      黎吉雲
-于飛 于飛
+鳳凰于飛   鳳凰于飛
 鄉愿 鄉愿
 愿樸 愿樸
 謹愿 謹愿
 苹果 蘋果
 苹果干      蘋果乾
 苹婆 蘋婆
+郑苹如      鄭蘋如
 昵称 暱稱
 單于 單于
 鮮于 鮮于
 單向 單向
 轉向 轉向 #分詞用
 十出頭      十出頭
+更钟情      更鍾情
+更钟爱      更鍾愛
+更钟意      更鍾意
index 8d09901..5ff1d63 100644 (file)
@@ -206,6 +206,7 @@ U+05DBD嶽|U+05CB3岳|
 U+05DD6巖|U+05CA9岩|
 U+05DD7巗|U+05CA9岩|
 U+05DD8巘|U+2AA58𪩘|
+U+05DE0巠|U+22016𢀖|
 U+05DF5巵|U+0536E卮|
 U+05E00帀|U+0531D匝|
 U+05E0B帋|U+07EB8纸|
index 24d8a42..4a480ab 100644 (file)
 採運
 採風
 採血
+採編
 花不要採
 官地為寀
 寮寀
 標籤
 書籤
 發籤
-粉籤子
 路籤
-更籤
-好籤
 火籤
 籤幐
 籤押
 照入籤
-制籤
 抽公籤
 瑤籤
 藥籤
 巴而朮
 朮虎高
 耶律朮烈
+朮忽
 髼鬆
 皮鬆
 濛鬆雨
 石英鐘錶
 鐘律
 看鐘
-看錶
-看表面
 鐵鐘
 鐘不敲不響
 對準鐘
 科斗
 斗牛星
 斗法會
+抓斗
 小几
 尸利
 尸祿
 裏白 #植物常用名
 烏蘇里 #分詞用
 夸脫
-風采
 代碼表
 編碼表
 字碼表
 葉叶琹
 胡子昂
 胡子嬰
-包括
 特别致
 分别致
 韶山沖
 于氏
 于娜
 于娟
-于山
 于帥
 于慧
 于振
 于靖
 于勒
 于格
-于飛
+鳳凰于飛
 于仁泰
 于會泳
 于偉國
 李志喜
 于欣
 于少保
-于海
-於海洋
-於海邊
-於海上
-於海拔
-於海平面
-於山東
-於山西
 于凌辰
 于魁智
 于鬯
 於震前
 於震後
 於震中
-由於 #分詞用
 固定制
 划船
 划不來
index fd742f6..0104ec2 100644 (file)
@@ -1,8 +1,9 @@
 /* eslint-env node, es6 */
 var i, chars = [];
 
-for ( i = 0; i < 65536; i++ ) {
-       chars.push( String.fromCharCode( i ).toUpperCase() );
+for ( i = 0; i <= 0x10ffff; i++ ) {
+       // eslint-disable-next-line no-restricted-properties
+       chars.push( String.fromCodePoint( i ).toUpperCase() );
 }
 // eslint-disable-next-line no-console
 console.log( JSON.stringify( chars ) );
index a04958c..5dd9432 100755 (executable)
@@ -1,34 +1,87 @@
-#!/usr/bin/env php
 <?php
+
 /**
- * Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
+ * Update list of upper case differences between JS and PHP
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
  *
- * Compares output of String.toUpperCase in JavaScript with
- * mb_strtoupper in PHP, and outputs a list of lower:upper
- * mappings where they differ. This is then used by Title.js
- * to provide the same normalization in the client as on
- * the server.
+ * @file
+ * @ingroup Maintenance
  */
 
-$data = [];
+use MediaWiki\Shell\Shell;
 
-// phpcs:disable MediaWiki.Usage.ForbiddenFunctions.exec
-$jsUpperChars = json_decode( exec( 'node generateJsToUpperCaseList.js' ) );
-// phpcs:enable MediaWiki.Usage.ForbiddenFunctions.exec
+require_once __DIR__ . '/../Maintenance.php';
+
+/**
+ * Update list of upper case differences between JS and PHP
+ *
+ * @ingroup Maintenance
+ * @since 1.33
+ */
+class GeneratePhpCharToUpperMappings extends Maintenance {
 
-for ( $i = 0; $i < 65536; $i++ ) {
-       if ( $i >= 0xd800 && $i <= 0xdfff ) {
-               // Skip surrogate pairs
-               continue;
+       public function __construct() {
+               parent::__construct();
+               $this->addDescription( 'Update list of upper case differences between JS and PHP.' );
        }
-       $char = mb_convert_encoding( '&#' . $i . ';', 'UTF-8', 'HTML-ENTITIES' );
-       $phpUpper = mb_strtoupper( $char );
-       $jsUpper = $jsUpperChars[$i];
-       if ( $jsUpper !== $phpUpper ) {
-               $data[$char] = $phpUpper;
+
+       public function execute() {
+               global $wgContLang, $IP;
+
+               $data = [];
+
+               $result = Shell::command(
+                               [ 'node', $IP . '/maintenance/mediawiki.Title/generateJsToUpperCaseList.js' ]
+                       )
+                       // Node allocates lots of memory
+                       ->limits( [ 'memory' => 1024 * 1024 ] )
+                       ->execute();
+
+               if ( $result->getExitcode() !== 0 ) {
+                       $this->output( $result->getStderr() );
+                       return;
+               }
+
+               $jsUpperChars = json_decode( $result->getStdout() );
+
+               for ( $i = 0; $i <= 0x10ffff; $i++ ) {
+                       if ( $i >= 0xd800 && $i <= 0xdfff ) {
+                               // Skip surrogate pairs
+                               continue;
+                       }
+                       $char = \UtfNormal\Utils::codepointToUtf8( $i );
+                       $phpUpper = $wgContLang->ucfirst( $char );
+                       $jsUpper = $jsUpperChars[$i];
+                       if ( $jsUpper !== $phpUpper ) {
+                               $data[$char] = $phpUpper;
+                       }
+               }
+
+               $mappingJson = str_replace( '    ', "\t",
+                       json_encode( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE )
+               ) . "\n";
+               $outputPath = '/resources/src/mediawiki.Title/phpCharToUpper.json';
+               $file = fopen( $IP . $outputPath, 'w' );
+               fwrite( $file, $mappingJson );
+
+               $this->output( count( $data ) . " differences found.\n" );
+               $this->output( "Written to $outputPath\n" );
        }
 }
 
-echo str_replace( '    ', "\t",
-       json_encode( $data, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE )
-) . "\n";
+$maintClass = GeneratePhpCharToUpperMappings::class;
+require_once RUN_MAINTENANCE_IF_MAIN;
index ec2eff4..96fcebf 100644 (file)
@@ -110,7 +110,7 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance {
                $ok = false;
                while ( !$ok ) {
                        try {
-                               $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) {
+                               $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) {
                                        $dbw->insert( 'revision', self::$dummyRev, $fname );
                                        $id = $dbw->insertId();
                                        $toDelete[] = $id;
@@ -147,7 +147,7 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance {
                        self::$dummyRev = self::makeDummyRevisionRow( $dbw );
                }
 
-               $updates = $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $arIds ) {
+               $updates = $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $arIds ) {
                        // Create new rev_ids by inserting dummy rows into revision and then deleting them.
                        $dbw->insert( 'revision', array_fill( 0, count( $arIds ), self::$dummyRev ), $fname );
                        $revIds = $dbw->selectFieldValues(
index acc66c5..a654a1f 100644 (file)
@@ -86,7 +86,7 @@ TEXT
                        $url = rtrim( $this->source, '?' ) . '?' . $url;
                }
 
-               $json = Http::get( $url );
+               $json = MediaWikiServices::getInstance()->getHttpRequestFactory()->get( $url );
                $data = json_decode( $json, true );
 
                if ( is_array( $data ) ) {
index 6bcc98a..b8ac75e 100644 (file)
     "selenium-test": "wdio ./tests/selenium/wdio.conf.js"
   },
   "devDependencies": {
-    "eslint-config-wikimedia": "0.11.0",
-    "grunt": "1.0.3",
-    "grunt-banana-checker": "0.6.0",
+    "eslint-config-wikimedia": "0.12.0",
+    "grunt": "1.0.4",
+    "grunt-banana-checker": "0.7.0",
     "grunt-contrib-copy": "1.0.0",
     "grunt-contrib-watch": "1.1.0",
     "grunt-eslint": "21.0.0",
-    "grunt-jsonlint": "1.1.0",
     "grunt-karma": "3.0.0",
     "grunt-stylelint": "0.10.1",
     "grunt-svgmin": "5.0.0",
index b923832..c28ac4a 100644 (file)
@@ -866,6 +866,7 @@ return [
        ],
        'mediawiki.content.json' => [
                'styles' => 'resources/src/mediawiki.content.json.less',
+               'targets' => [ 'desktop', 'mobile' ],
        ],
        'mediawiki.confirmCloseWindow' => [
                'scripts' => [
@@ -1438,6 +1439,7 @@ return [
                'dependencies' => [ 'jquery.makeCollapsible' ],
                'scripts' => 'resources/src/mediawiki.action/mediawiki.action.history.js',
                'styles' => 'resources/src/mediawiki.action/mediawiki.action.history.css',
+               'targets' => [ 'desktop', 'mobile' ]
        ],
        'mediawiki.action.history.styles' => [
                'skinStyles' => [
@@ -2514,6 +2516,7 @@ return [
                        'oojs-ui-widgets',
                        'mediawiki.widgets.styles',
                        // TitleInputWidget
+                       'oojs-ui.styles.icons-content',
                        'mediawiki.Title',
                        'mediawiki.api',
                        'mediawiki.String',
index 42b0771..447b936 100644 (file)
                        if ( mw.Title && content instanceof mw.Title ) {
                                // Parse existing page
                                config.page = content.getPrefixedDb();
+                               apiPromise = this.get( config );
                        } else {
                                // Parse wikitext from input
                                config.text = String( content );
+                               apiPromise = this.post( config );
                        }
 
-                       apiPromise = this.get( config );
-
                        return apiPromise
                                .then( function ( data ) {
                                        return data.parse.text;
index baf2c56..bebc172 100644 (file)
@@ -598,13 +598,11 @@ ol:lang( kk-arab ) li,
 ol:lang( lrc ) li,
 ol:lang( luz ) li,
 ol:lang( mzn ) li {
-       list-style-type: -moz-persian;
        list-style-type: persian;
 }
 
 ol:lang( ckb ) li,
 ol:lang( sdh ) li {
-       list-style-type: -moz-arabic-indic;
        list-style-type: arabic-indic;
 }
 
@@ -612,18 +610,15 @@ ol:lang( hi ) li,
 ol:lang( mai ) li,
 ol:lang( mr ) li,
 ol:lang( ne ) li {
-       list-style-type: -moz-devanagari;
        list-style-type: devanagari;
 }
 
 ol:lang( as ) li,
 ol:lang( bn ) li {
-       list-style-type: -moz-bengali;
        list-style-type: bengali;
 }
 
 ol:lang( or ) li {
-       list-style-type: -moz-oriya;
        list-style-type: oriya;
 }
 
index 0786048..005f66e 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14.25C5 19.208 6.582 21 8.502 21H19V3zm8.002 3h4v4l-1.281-1.281L12.44 12l3.281 3.281L17.002 14v4h-4l1.313-1.313L10.596 13H7.002v-2h3.594l3.688-3.719z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm6.002 3h4v4l-1.2812-1.2812-3.2812 3.2812 3.2812 3.2812 1.2812-1.2812v4h-4l1.3125-1.3125-3.7187-3.6875h-3.5938v-2h3.5938l3.6875-3.7188-1.2812-1.2812z"/>
 </svg>
index 753c9d5..7e56a70 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14.25c0 1.958-1.582 3.75-3.502 3.75H5V3zm-8.002 3h-4v4l1.281-1.281L11.56 12l-3.28 3.281L6.998 14v4h4l-1.313-1.313L13.404 13h3.594v-2h-3.594L9.716 7.281z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-6.002 3h-4v4l1.2812-1.2812 3.2812 3.2812-3.2812 3.2812-1.2812-1.2812v4h4l-1.3125-1.3125 3.7188-3.6875h3.5938v-2h-3.5938l-3.6875-3.7188z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-ltr.svg b/resources/src/mediawiki.widgets/images/page-existing-ltr.svg
deleted file mode 100644 (file)
index 011a171..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12h5V5h-5zm-5 3v1h10v-1m0-1v-1H7v1m0 4h10v-1H7zm4-11H7v1h4zm0 3V9H7v1m0 1v1h4v-1m0-6H7v1h4zM5 3h14v18H8.692C6.602 21 5 19.373 5 17.25z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-rtl.svg b/resources/src/mediawiki.widgets/images/page-existing-rtl.svg
deleted file mode 100644 (file)
index db4ad43..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12H7V5h5zm5 3v1H7v-1m0-1v-1h10v1m0 4H7v-1h10zM13 7h4v1h-4zm0 3V9h4v1m0 1v1h-4v-1m0-6h4v1h-4zm6-2H5v18h10.308C17.398 21 19 19.373 19 17.25z"/>
-</svg>
index d8c68a9..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v18h10c2 0 4-2 4-4V3zm7.644 13.572h-1.687v-1.6h1.687zm1.982-6a2.144 2.144 0 0 1-.25.563c-.104.16-.225.3-.36.423l-.402.364-.438.396c-.134.127-.25.273-.353.428-.103.16-.18.346-.233.555-.054.215-.08.474-.08.784h-1.36c0-.378.017-.696.057-.955.036-.26.098-.488.183-.688.085-.196.188-.37.31-.52.12-.15.267-.295.433-.44l.385-.332c.12-.105.233-.214.327-.34.098-.124.17-.265.228-.42a1.67 1.67 0 0 0 .08-.55c0-.256-.044-.48-.133-.66a1.397 1.397 0 0 0-.322-.442 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.52 0-.905.173-1.15.52-.247.345-.372.81-.372 1.39H8.962c0-.468.067-.895.206-1.282a2.641 2.641 0 0 1 1.561-1.619c.37-.15.79-.223 1.252-.223.385 0 .743.06 1.078.174.33.114.622.282.868.5.246.218.443.487.586.814.143.323.215.692.215 1.1-.01.306-.04.565-.104.784z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bea394a..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.125 1.911 4 4 4h10V3zm7.644 13.572h-1.687v-1.601h1.687zm1.982-6.001a2.106 2.106 0 0 1-.609.987l-.403.364-.438.396a2.422 2.422 0 0 0-.353.428 1.881 1.881 0 0 0-.233.555 3.236 3.236 0 0 0-.081.783h-1.36c0-.378.018-.696.058-.955a2.7 2.7 0 0 1 .183-.687c.085-.196.188-.369.309-.519a3.59 3.59 0 0 1 .434-.441l.385-.332a2.15 2.15 0 0 0 .327-.341c.098-.123.17-.264.228-.419.054-.155.081-.337.081-.551a1.5 1.5 0 0 0-.134-.66 1.388 1.388 0 0 0-.322-.441 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.519 0-.904.173-1.15.519-.246.346-.371.81-.371 1.392H8.962c0-.469.067-.896.206-1.283a2.641 2.641 0 0 1 1.561-1.619 3.33 3.33 0 0 1 1.253-.223c.385 0 .743.059 1.078.173.331.114.622.282.868.5.246.218.443.487.586.814a2.7 2.7 0 0 1 .215 1.101c-.009.305-.04.564-.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bb6f316..75b310c 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.125-1.911 4-4 4H5V3zm-7.644 13.572h1.687v-1.601h-1.687zm-1.982-6.001a2.106 2.106 0 0 0 .609.987l.403.364.438.396c.134.127.251.273.353.428.103.159.179.346.233.555.054.214.081.473.081.783h1.36c0-.378-.018-.696-.058-.955a2.7 2.7 0 0 0-.183-.687 2.242 2.242 0 0 0-.309-.519 3.59 3.59 0 0 0-.434-.441l-.385-.332a2.15 2.15 0 0 1-.327-.341 1.513 1.513 0 0 1-.228-.419 1.671 1.671 0 0 1-.081-.551 1.5 1.5 0 0 1 .134-.66c.089-.182.197-.332.322-.441a1.35 1.35 0 0 1 .403-.246 1.17 1.17 0 0 1 .376-.077c.519 0 .904.173 1.15.519.246.346.371.81.371 1.392h1.436a3.77 3.77 0 0 0-.206-1.283 2.641 2.641 0 0 0-1.561-1.619 3.33 3.33 0 0 0-1.253-.223c-.385 0-.743.059-1.078.173a2.548 2.548 0 0 0-.868.5 2.304 2.304 0 0 0-.586.814 2.7 2.7 0 0 0-.215 1.101c.009.305.04.564.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-4.9805 4.2012c-0.385 0-0.74312 0.059828-1.0781 0.17383-0.33 0.114-0.62314 0.282-0.86914 0.5s-0.44294 0.48745-0.58594 0.81445c-0.143 0.323-0.21484 0.69161-0.21484 1.0996 0.01 0.306 0.041469 0.5642 0.10547 0.7832h-0.00391a2.144 2.144 0 0 0 0.25 0.5625c0.104 0.16 0.22633 0.30083 0.36133 0.42383l0.40234 0.36328 0.4375 0.39648c0.134 0.127 0.25052 0.27274 0.35352 0.42774 0.103 0.16 0.17942 0.34569 0.23242 0.55469 0.054 0.215 0.080078 0.47516 0.080078 0.78516h1.3594c0-0.378-0.01664-0.69608-0.05664-0.95508-0.036-0.26-0.09859-0.48945-0.18359-0.68945-0.085-0.196-0.18659-0.36953-0.30859-0.51953-0.12-0.15-0.26759-0.29445-0.43359-0.43945l-0.38476-0.33203c-0.12-0.105-0.23412-0.21384-0.32812-0.33984-0.098-0.124-0.16856-0.26492-0.22656-0.41992a1.67 1.67 0 0 1-0.080078-0.55078c0-0.256 0.043813-0.48016 0.13281-0.66016a1.397 1.397 0 0 1 0.32226-0.44141 1.35 1.35 0 0 1 0.40234-0.24609 1.17 1.17 0 0 1 0.375-0.078125c0.52 0 0.90539 0.17448 1.1504 0.52148 0.247 0.345 0.37305 0.80867 0.37305 1.3887h1.4336c0-0.468-0.06608-0.89425-0.20508-1.2812a2.641 2.641 0 0 0-1.5605-1.6191c-0.37-0.15-0.78995-0.22266-1.252-0.22266zm1.0234 7.7715h-1.6875v1.5996h1.6875z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg b/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg
deleted file mode 100644 (file)
index f296ac5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.552 1.516 4 4 4h10V3H5zm9.375 3.781c1.384 0 2.655 1.208 2.781 2.625 0 .838-.373 1.546-.937 2.125l-1.657 1.688c-.438.517-1.12.812-1.874.812-1.133 0-1.903-.69-2.407-1.656l.813-.844c.312.709.776 1.281 1.656 1.281.378 0 .873-.178 1.125-.437l1.656-1.688a1.65 1.65 0 0 0 0-2.312c-.312-.258-.778-.469-1.156-.469-.755 0-1.247.577-1.75 1.094-.312-.13-.625-.156-.938-.156-.186 0-.374.031-.5.031.942-.905 1.869-2.094 3.188-2.094zm-3.281 2.782c1.132 0 1.903.72 2.406 1.687l-.813.813c-.312-.647-.744-1.282-1.624-1.282-.378 0-.874.21-1.126.469l-1.656 1.656c-.629.58-.629 1.666 0 2.313.312.258.748.469 1.125.469.378 0 .874-.21 1.125-.47l.563-.593c.251.13.5.156.812.156.187 0 .376 0 .563-.062l-1.156 1.219c-.942 1.096-2.712 1.033-3.72 0-1.067-1.034-1.067-2.775 0-3.876l1.626-1.656a2.454 2.454 0 0 1 1.875-.844z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg b/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg
deleted file mode 100644 (file)
index 6c753d6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.552-1.516 4-4 4H5V3h14zM9.625 6.781c-1.384 0-2.655 1.208-2.781 2.625 0 .838.373 1.546.937 2.125l1.657 1.688c.438.517 1.12.812 1.874.812 1.133 0 1.903-.69 2.407-1.656l-.813-.844c-.312.709-.776 1.281-1.656 1.281-.378 0-.873-.178-1.125-.437l-1.656-1.688a1.652 1.652 0 0 1 0-2.312c.312-.258.778-.469 1.156-.469.755 0 1.247.577 1.75 1.094.312-.13.625-.156.938-.156.186 0 .374.031.5.031-.942-.905-1.869-2.094-3.188-2.094zm3.281 2.782c-1.132 0-1.903.72-2.406 1.687l.813.813c.312-.647.744-1.282 1.624-1.282.378 0 .874.21 1.126.469l1.656 1.656c.629.58.629 1.666 0 2.313-.312.258-.748.469-1.125.469-.378 0-.874-.21-1.125-.47l-.563-.593c-.251.13-.5.156-.812.156-.187 0-.376 0-.563-.062l1.156 1.219c.942 1.096 2.712 1.033 3.72 0 1.067-1.034 1.067-2.775 0-3.876l-1.626-1.656a2.454 2.454 0 0 0-1.875-.844z"/>
-</svg>
index 818ad89..6a87583 100644 (file)
@@ -14,8 +14,6 @@
         *
         * @constructor
         * @param {Object} [config] Configuration options
-        * @cfg {boolean} [pushPending=false] Visually mark the input field as "pending", while
-        *  requesting suggestions.
         * @cfg {boolean} [performSearchOnClick=true] If true, the script will start a search when-
         *  ever a user hits a suggestion. If false, the text of the suggestion is inserted into the
         *  text field only.
@@ -32,6 +30,7 @@
                config = $.extend( {
                        icon: 'search',
                        maxLength: undefined,
+                       showPendingRequest: false,
                        performSearchOnClick: true,
                        dataLocation: 'header'
                }, config );
@@ -43,9 +42,6 @@
                this.$element.addClass( 'mw-widget-searchInputWidget' );
                this.lookupMenu.$element.addClass( 'mw-widget-searchWidget-menu' );
                this.lastLookupItems = [];
-               if ( !config.pushPending ) {
-                       this.pushPending = false;
-               }
                if ( config.dataLocation ) {
                        this.dataLocation = config.dataLocation;
                }
index 661f9ae..dc702c8 100644 (file)
                } else if ( config.missing ) {
                        icon = 'page-not-found';
                } else if ( config.redirect ) {
-                       icon = 'page-redirect';
+                       icon = 'articleRedirect';
                } else if ( config.disambiguation ) {
                        icon = 'page-disambiguation';
                } else {
-                       icon = 'page-existing';
+                       icon = 'article';
                }
 
                // Config initialization
index e52d0cd..9830c10 100644 (file)
@@ -39,6 +39,7 @@
                                        left: 0;
 
                                        &:not( .mw-widget-titleOptionWidget-hasImage ) {
+                                               background-size: 80%;
                                                background-color: #c8ccd1;
                                                opacity: 0.4;
                                        }
        background-image: url( images/page-disambiguation-ltr.svg );
 }
 
-.oo-ui-icon-page-existing {
-       /* @embed */
-       background-image: url( images/page-existing-ltr.svg );
-}
-
 .oo-ui-icon-page-not-found {
        /* @embed */
        background-image: url( images/page-not-found-ltr.svg );
 }
 
-.oo-ui-icon-page-not-found:lang( he ) {
+.oo-ui-icon-page-not-found:lang( he ),
+.oo-ui-icon-page-not-found:lang( yi ) {
        /* @embed */
        background-image: url( images/page-not-found-he-yi.svg );
 }
-
-.oo-ui-icon-page-redirect {
-       /* @embed */
-       background-image: url( images/page-redirect-ltr.svg );
-}
index 603f4c2..f7a4cc4 100644 (file)
@@ -1,19 +1,25 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\TestingAccessWrapper;
 
 abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        protected static $httpEngine;
        protected $oldHttpEngine;
 
+       /** @var HttpRequestFactory */
+       private $factory;
+
        public function setUp() {
                parent::setUp();
                $this->oldHttpEngine = Http::$httpEngine;
                Http::$httpEngine = static::$httpEngine;
 
+               $this->factory = MediaWikiServices::getInstance()->getHttpRequestFactory();
+
                try {
-                       $request = MWHttpRequest::factory( 'null:' );
-               } catch ( DomainException $e ) {
+                       $request = $factory->create( 'null:' );
+               } catch ( RuntimeException $e ) {
                        $this->markTestSkipped( static::$httpEngine . ' engine not supported' );
                }
 
@@ -32,19 +38,19 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        // --------------------
 
        public function testIsRedirect() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/get' );
+               $request = $this->factory->create( 'http://httpbin.org/get' );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
                $this->assertFalse( $request->isRedirect() );
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/1' );
+               $request = $this->factory->create( 'http://httpbin.org/redirect/1' );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
                $this->assertTrue( $request->isRedirect() );
        }
 
        public function testgetFinalUrl() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3' );
+               $request = $this->factory->create( 'http://httpbin.org/redirect/3' );
                if ( !$request->canFollowRedirects() ) {
                        $this->markTestSkipped( 'cannot follow redirects' );
                }
@@ -52,14 +58,14 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
                $this->assertTrue( $status->isGood() );
                $this->assertNotSame( 'http://httpbin.org/get', $request->getFinalUrl() );
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+               $request = $this->factory->create( 'http://httpbin.org/redirect/3', [ 'followRedirects'
                        => true ] );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
                $this->assertSame( 'http://httpbin.org/get', $request->getFinalUrl() );
                $this->assertResponseFieldValue( 'url', 'http://httpbin.org/get', $request );
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+               $request = $this->factory->create( 'http://httpbin.org/redirect/3', [ 'followRedirects'
                => true ] );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
@@ -71,7 +77,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
                        return;
                }
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+               $request = $this->factory->create( 'http://httpbin.org/redirect/3', [ 'followRedirects'
                => true, 'maxRedirects' => 1 ] );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
@@ -79,7 +85,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testSetCookie() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies' );
+               $request = $this->factory->create( 'http://httpbin.org/cookies' );
                $request->setCookie( 'foo', 'bar' );
                $request->setCookie( 'foo2', 'bar2', [ 'domain' => 'example.com' ] );
                $status = $request->execute();
@@ -88,7 +94,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testSetCookieJar() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies' );
+               $request = $this->factory->create( 'http://httpbin.org/cookies' );
                $cookieJar = new CookieJar();
                $cookieJar->setCookie( 'foo', 'bar', [ 'domain' => 'httpbin.org' ] );
                $cookieJar->setCookie( 'foo2', 'bar2', [ 'domain' => 'example.com' ] );
@@ -97,7 +103,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
                $this->assertTrue( $status->isGood() );
                $this->assertResponseFieldValue( 'cookies', [ 'foo' => 'bar' ], $request );
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies/set?foo=bar' );
+               $request = $this->factory->create( 'http://httpbin.org/cookies/set?foo=bar' );
                $cookieJar = new CookieJar();
                $request->setCookieJar( $cookieJar );
                $status = $request->execute();
@@ -106,7 +112,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
 
                $this->markTestIncomplete( 'CookieJar does not handle deletion' );
 
-               // $request = MWHttpRequest::factory( 'http://httpbin.org/cookies/delete?foo' );
+               // $request = $this->factory->create( 'http://httpbin.org/cookies/delete?foo' );
                // $cookieJar = new CookieJar();
                // $cookieJar->setCookie( 'foo', 'bar', [ 'domain' => 'httpbin.org' ] );
                // $cookieJar->setCookie( 'foo2', 'bar2', [ 'domain' => 'httpbin.org' ] );
@@ -118,7 +124,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testGetResponseHeaders() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/response-headers?Foo=bar' );
+               $request = $this->factory->create( 'http://httpbin.org/response-headers?Foo=bar' );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
                $headers = array_change_key_case( $request->getResponseHeaders(), CASE_LOWER );
@@ -127,7 +133,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testSetHeader() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/headers' );
+               $request = $this->factory->create( 'http://httpbin.org/headers' );
                $request->setHeader( 'Foo', 'bar' );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
@@ -135,14 +141,14 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testGetStatus() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/status/418' );
+               $request = $this->factory->create( 'http://httpbin.org/status/418' );
                $status = $request->execute();
                $this->assertFalse( $status->isOK() );
                $this->assertSame( $request->getStatus(), 418 );
        }
 
        public function testSetUserAgent() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/user-agent' );
+               $request = $this->factory->create( 'http://httpbin.org/user-agent' );
                $request->setUserAgent( 'foo' );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
@@ -150,7 +156,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testSetData() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/post', [ 'method' => 'POST' ] );
+               $request = $this->factory->create( 'http://httpbin.org/post', [ 'method' => 'POST' ] );
                $request->setData( [ 'foo' => 'bar', 'foo2' => 'bar2' ] );
                $status = $request->execute();
                $this->assertTrue( $status->isGood() );
@@ -163,7 +169,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
                        return;
                }
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/ip' );
+               $request = $this->factory->create( 'http://httpbin.org/ip' );
                $data = '';
                $request->setCallback( function ( $fh, $content ) use ( &$data ) {
                        $data .= $content;
@@ -177,7 +183,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testBasicAuthentication() {
-               $request = MWHttpRequest::factory( 'http://httpbin.org/basic-auth/user/pass', [
+               $request = $this->factory->create( 'http://httpbin.org/basic-auth/user/pass', [
                        'username' => 'user',
                        'password' => 'pass',
                ] );
@@ -185,7 +191,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
                $this->assertTrue( $status->isGood() );
                $this->assertResponseFieldValue( 'authenticated', true, $request );
 
-               $request = MWHttpRequest::factory( 'http://httpbin.org/basic-auth/user/pass', [
+               $request = $this->factory->create( 'http://httpbin.org/basic-auth/user/pass', [
                        'username' => 'user',
                        'password' => 'wrongpass',
                ] );
@@ -195,7 +201,7 @@ abstract class MWHttpRequestTestCase extends PHPUnit\Framework\TestCase {
        }
 
        public function testFactoryDefaults() {
-               $request = MWHttpRequest::factory( 'http://acme.test' );
+               $request = $this->factory->create( 'http://acme.test' );
                $this->assertInstanceOf( MWHttpRequest::class, $request );
        }
 
index fddee3d..34f8cd5 100644 (file)
@@ -168,14 +168,10 @@ class ParserTestPrinter extends TestRecorder {
                        $output = strtr( $output, $pairs );
                }
 
-               # Windows, or at least the fc utility, is retarded
-               $slash = wfIsWindows() ? '\\' : '/';
-               $prefix = wfTempDir() . "{$slash}mwParser-" . mt_rand();
-
-               $infile = "$prefix-$inFileTail";
+               $infile = tempnam( wfTempDir(), "mwParser-$inFileTail" );
                $this->dumpToFile( $input, $infile );
 
-               $outfile = "$prefix-$outFileTail";
+               $outfile = tempnam( wfTempDir(), "mwParser-$outFileTail" );
                $this->dumpToFile( $output, $outfile );
 
                global $wgDiff3;
index 3eb25a9..df897d9 100644 (file)
@@ -289,9 +289,14 @@ class ParserTestRunner {
 
                // All FileRepo changes should be done here by injecting services,
                // there should be no need to change global variables.
-               RepoGroup::setSingleton( $this->createRepoGroup() );
+               MediaWikiServices::getInstance()->disableService( 'RepoGroup' );
+               MediaWikiServices::getInstance()->redefineService( 'RepoGroup',
+                       function () {
+                               return $this->createRepoGroup();
+                       }
+               );
                $teardown[] = function () {
-                       RepoGroup::destroySingleton();
+                       MediaWikiServices::getInstance()->resetServiceForTesting( 'RepoGroup' );
                };
 
                // Set up null lock managers
@@ -449,7 +454,8 @@ class ParserTestRunner {
                                'transformVia404' => false,
                                'backend' => $backend
                        ],
-                       []
+                       [],
+                       MediaWikiServices::getInstance()->getMainWANObjectCache()
                );
        }
 
@@ -635,6 +641,8 @@ class ParserTestRunner {
        /**
         * Reset the Title-related services that need resetting
         * for each test
+        *
+        * @todo We need to reset all services on every test
         */
        private function resetTitleServices() {
                $services = MediaWikiServices::getInstance();
@@ -643,6 +651,7 @@ class ParserTestRunner {
                $services->resetServiceForTesting( '_MediaWikiTitleCodec' );
                $services->resetServiceForTesting( 'LinkRenderer' );
                $services->resetServiceForTesting( 'LinkRendererFactory' );
+               $services->resetServiceForTesting( 'NamespaceInfo' );
        }
 
        /**
index fd0cea1..ec61c23 100644 (file)
@@ -472,7 +472,17 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
         * @return string Absolute name of the temporary file
         */
        protected function getNewTempFile() {
-               $fileName = tempnam( wfTempDir(), 'MW_PHPUnit_' . static::class . '_' );
+               $fileName = tempnam(
+                       wfTempDir(),
+                       // Avoid backslashes here as they result in inconsistent results
+                       // between Windows and other OS, as well as between functions
+                       // that try to normalise these in one or both directions.
+                       // For example, tempnam rejects directory separators in the prefix which
+                       // means it rejects any namespaced class on Windows.
+                       // And then there is, wfMkdirParents which normalises paths always
+                       // whereas most other PHP and MW functions do not.
+                       'MW_PHPUnit_' . strtr( static::class, [ '\\' => '_' ] ) . '_'
+               );
                $this->tmpFiles[] = $fileName;
 
                return $fileName;
@@ -489,14 +499,15 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
         * @return string Absolute name of the temporary directory
         */
        protected function getNewTempDirectory() {
-               // Starting of with a temporary /file/.
+               // Starting of with a temporary *file*.
                $fileName = $this->getNewTempFile();
 
-               // Converting the temporary /file/ to a /directory/
+               // Converting the temporary file to a *directory*.
                // The following is not atomic, but at least we now have a single place,
-               // where temporary directory creation is bundled and can be improved
+               // where temporary directory creation is bundled and can be improved.
                unlink( $fileName );
-               $this->assertTrue( wfMkdirParents( $fileName ) );
+               // If this fails for some reason, PHP will warn and fail the test.
+               mkdir( $fileName, 0777, /* recursive = */ true );
 
                return $fileName;
        }
@@ -2369,7 +2380,7 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
         * @param string $text Content of the page
         * @param string $summary Optional summary string for the revision
         * @param int $defaultNs Optional namespace id
-        * @return array Array as returned by WikiPage::doEditContent()
+        * @return Status Object as returned by WikiPage::doEditContent()
         * @throws MWException If this test cases's needsDB() method doesn't return true.
         *         Test cases can use "@group Database" to enable database test support,
         *         or list the tables under testing in $this->tablesUsed, or override the
@@ -2408,4 +2419,18 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
                        'comment' => $comment,
                ] );
        }
+
+       /**
+        * Returns a PHPUnit constraint that matches anything other than a fixed set of values. This can
+        * be used to whitelist values, e.g.
+        *   $mock->expects( $this->never() )->method( $this->anythingBut( 'foo', 'bar' ) );
+        * which will throw if any unexpected method is called.
+        *
+        * @param mixed ...$values Values that are not matched
+        */
+       protected function anythingBut( ...$values ) {
+               return $this->logicalNot( $this->logicalOr(
+                       ...array_map( [ $this, 'matches' ], $values )
+               ) );
+       }
 }
index 1f2b13c..de70f26 100644 (file)
@@ -658,14 +658,18 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
                $callback( 1, [] );
        }
 
-       public function testInsertUserIdentity() {
+       /**
+        * @dataProvider provideStages
+        * @param int $stage
+        */
+       public function testInsertUserIdentity( $stage ) {
                $this->setMwGlobals( [
                        // for User::getActorId()
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
+                       'wgActorTableSchemaMigrationStage' => $stage
                ] );
                $this->overrideMwServices();
 
-               $user = $this->getTestUser()->getUser();
+               $user = $this->getMutableTestUser()->getUser();
                $userIdentity = $this->getMock( UserIdentity::class );
                $userIdentity->method( 'getId' )->willReturn( $user->getId() );
                $userIdentity->method( 'getName' )->willReturn( $user->getName() );
@@ -673,7 +677,7 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
 
                list( $cFields, $cCallback ) = MediaWikiServices::getInstance()->getCommentStore()
                        ->insertWithTempTable( $this->db, 'rev_comment', '' );
-               $m = $this->makeMigration( SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW );
+               $m = $this->makeMigration( $stage );
                list( $fields, $callback ) =
                        $m->getInsertValuesWithTempTable( $this->db, 'rev_user', $userIdentity );
                $extraFields = [
@@ -692,13 +696,25 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
                );
                $this->assertSame( $user->getId(), (int)$row->rev_user );
                $this->assertSame( $user->getName(), $row->rev_user_text );
-               $this->assertSame( $user->getActorId(), (int)$row->rev_actor );
+               $this->assertSame(
+                       ( $stage & SCHEMA_COMPAT_READ_NEW ) ? $user->getActorId() : 0,
+                       (int)$row->rev_actor
+               );
 
-               $m = $this->makeMigration( SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW );
+               $m = $this->makeMigration( $stage );
                $fields = $m->getInsertValues( $this->db, 'dummy_user', $userIdentity );
-               $this->assertSame( $user->getId(), $fields['dummy_user'] );
-               $this->assertSame( $user->getName(), $fields['dummy_user_text'] );
-               $this->assertSame( $user->getActorId(), $fields['dummy_actor'] );
+               if ( $stage & SCHEMA_COMPAT_WRITE_OLD ) {
+                       $this->assertSame( $user->getId(), $fields['dummy_user'] );
+                       $this->assertSame( $user->getName(), $fields['dummy_user_text'] );
+               } else {
+                       $this->assertArrayNotHasKey( 'dummy_user', $fields );
+                       $this->assertArrayNotHasKey( 'dummy_user_text', $fields );
+               }
+               if ( $stage & SCHEMA_COMPAT_WRITE_NEW ) {
+                       $this->assertSame( $user->getActorId(), $fields['dummy_actor'] );
+               } else {
+                       $this->assertArrayNotHasKey( 'dummy_actor', $fields );
+               }
        }
 
        public function testNewMigration() {
index 7874688..df3de4a 100644 (file)
@@ -1,8 +1,9 @@
 <?php
 
-use MediaWiki\Block\BlockRestriction;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Block\Restriction\PageRestriction;
 use MediaWiki\Block\Restriction\NamespaceRestriction;
+use MediaWiki\MediaWikiServices;
 
 /**
  * @group Database
@@ -612,7 +613,7 @@ class BlockTest extends MediaWikiLangTestCase {
 
                $pageRestriction = new PageRestriction( $block->getId(), $pageFoo->getId() );
                $namespaceRestriction = new NamespaceRestriction( $block->getId(), NS_USER );
-               BlockRestriction::insert( [ $pageRestriction, $namespaceRestriction ] );
+               $this->getBlockRestrictionStore()->insert( [ $pageRestriction, $namespaceRestriction ] );
 
                $this->assertTrue( $block->appliesToTitle( $pageFoo->getTitle() ) );
                $this->assertFalse( $block->appliesToTitle( $pageBar->getTitle() ) );
@@ -673,7 +674,7 @@ class BlockTest extends MediaWikiLangTestCase {
                        $block->getId(),
                        $title->getArticleID()
                );
-               BlockRestriction::insert( [ $pageRestriction ] );
+               $this->getBlockRestrictionStore()->insert( [ $pageRestriction ] );
 
                $this->assertTrue( $block->appliesToPage( $title->getArticleID() ) );
 
@@ -699,7 +700,7 @@ class BlockTest extends MediaWikiLangTestCase {
                $block->insert();
 
                $namespaceRestriction = new NamespaceRestriction( $block->getId(), NS_MAIN );
-               BlockRestriction::insert( [ $namespaceRestriction ] );
+               $this->getBlockRestrictionStore()->insert( [ $namespaceRestriction ] );
 
                $this->assertTrue( $block->appliesToNamespace( NS_MAIN ) );
                $this->assertFalse( $block->appliesToNamespace( NS_USER ) );
@@ -718,4 +719,12 @@ class BlockTest extends MediaWikiLangTestCase {
                $this->assertFalse( $block->appliesToRight( 'purge' ) );
        }
 
+       /**
+        * Get an instance of BlockRestrictionStore
+        *
+        * @return BlockRestrictionStore
+        */
+       protected function getBlockRestrictionStore() : BlockRestrictionStore {
+               return MediaWikiServices::getInstance()->getBlockRestrictionStore();
+       }
 }
index 5f0200d..a758f99 100644 (file)
@@ -37,7 +37,7 @@ class ContentSecurityPolicyTest extends MediaWikiTestCase {
                // Note, there are some obscure globals which
                // could affect the results which aren't included above.
 
-               RepoGroup::destroySingleton();
+               $this->overrideMwServices();
                $context = RequestContext::getMain();
                $resp = $context->getRequest()->response();
                $conf = $context->getConfig();
index 9443b19..1210a50 100644 (file)
@@ -74,12 +74,8 @@ class GlobalTest extends MediaWikiTestCase {
                $this->assertFalse(
                        wfRandomString() == wfRandomString()
                );
-               $this->assertEquals(
-                       strlen( wfRandomString( 10 ) ), 10
-               );
-               $this->assertTrue(
-                       preg_match( '/^[0-9a-f]+$/i', wfRandomString() ) === 1
-               );
+               $this->assertSame( 10, strlen( wfRandomString( 10 ) ), 'length' );
+               $this->assertSame( 1, preg_match( '/^[0-9a-f]+$/i', wfRandomString() ), 'pattern' );
        }
 
        /**
diff --git a/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php b/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
deleted file mode 100644 (file)
index bc930be..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/**
- * @group GlobalFunctions
- * @covers ::wfArrayFilter
- * @covers ::wfArrayFilterByKey
- */
-class WfArrayFilterTest extends MediaWikiTestCase {
-       public function testWfArrayFilter() {
-               $this->hideDeprecated( 'wfArrayFilter' );
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $key !== 'b';
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $val !== 2;
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $key !== 0;
-               } );
-               $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );
-       }
-
-       public function testWfArrayFilterByKey() {
-               $this->hideDeprecated( 'wfArrayFilterByKey' );
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
-                       return $key !== 'b';
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
-                       return $key !== 0;
-               } );
-               $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );
-       }
-}
index 2d91d4d..8a0bfad 100644 (file)
@@ -98,12 +98,7 @@ class ReadOnlyModeTest extends MediaWikiTestCase {
        }
 
        private function createMode( $params, $makeLB ) {
-               $config = new HashConfig( [
-                       'ReadOnly' => $params['confMessage'],
-                       'ReadOnlyFile' => $this->createFile( $params ),
-               ] );
-
-               $rom = new ConfiguredReadOnlyMode( $config );
+               $rom = new ConfiguredReadOnlyMode( $params['confMessage'], $this->createFile( $params ) );
 
                if ( $makeLB ) {
                        $lb = $this->createLB( $params );
index 51c483d..3467153 100644 (file)
@@ -81,7 +81,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
                        'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
 
                $this->overrideMwServices();
@@ -438,9 +438,19 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                $queryInfo = $store->getQueryInfo( [ 'user' ] );
 
                $row = get_object_vars( $row );
+
+               // Use aliased fields from $queryInfo, e.g. rev_user
+               $keys = array_keys( $row );
+               $keys = array_combine( $keys, $keys );
+               $fields = array_intersect_key( $queryInfo['fields'], $keys ) + $keys;
+
+               // assertSelect() fails unless the orders match.
+               ksort( $fields );
+               ksort( $row );
+
                $this->assertSelect(
                        $queryInfo['tables'],
-                       array_keys( $row ),
+                       $fields,
                        [ 'rev_id' => $rev->getId() ],
                        [ array_values( $row ) ],
                        [],
@@ -800,7 +810,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                        'rev_page' => (string)$rev->getPage(),
                        'rev_timestamp' => $this->db->timestamp( $rev->getTimestamp() ),
                        'rev_user_text' => (string)$rev->getUserText(),
-                       'rev_user' => (string)$rev->getUser(),
+                       'rev_user' => (string)$rev->getUser() ?: null,
                        'rev_minor_edit' => $rev->isMinor() ? '1' : '0',
                        'rev_deleted' => (string)$rev->getVisibility(),
                        'rev_len' => (string)$rev->getSize(),
@@ -1406,10 +1416,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                        ->value['revision'];
 
                $store = MediaWikiServices::getInstance()->getRevisionStore();
-               $result = $store->getTimestampFromId(
-                       $page->getTitle(),
-                       $rev->getId()
-               );
+               $result = $store->getTimestampFromId( $rev->getId() );
 
                $this->assertSame( $rev->getTimestamp(), $result );
        }
@@ -1424,10 +1431,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                        ->value['revision'];
 
                $store = MediaWikiServices::getInstance()->getRevisionStore();
-               $result = $store->getTimestampFromId(
-                       $page->getTitle(),
-                       $rev->getId() + 1
-               );
+               $result = $store->getTimestampFromId( $rev->getId() + 1 );
 
                $this->assertFalse( $result );
        }
@@ -1808,7 +1812,10 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                /** @var Revision $rev */
                $rev = $page->doEditContent(
                        new WikitextContent( $text ),
-                       __METHOD__
+                       __METHOD__,
+                       0,
+                       false,
+                       $this->getMutableTestUser()->getUser()
                )->value['revision'];
 
                $store = MediaWikiServices::getInstance()->getRevisionStore();
index 983b701..96e2766 100644 (file)
@@ -91,7 +91,7 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
                        'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
 
                $this->overrideMwServices();
@@ -625,6 +625,34 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
                $this->assertEquals( $latestRevision, $newRevision->getPrevious()->getId() );
        }
 
+       /**
+        * @covers Title::getPreviousRevisionID
+        * @covers Title::getRelativeRevisionID
+        * @covers MediaWiki\Revision\RevisionStore::getPreviousRevision
+        * @covers MediaWiki\Revision\RevisionStore::getRelativeRevision
+        */
+       public function testTitleGetPreviousRevisionID() {
+               $oldestId = $this->testPage->getOldestRevision()->getId();
+               $latestId = $this->testPage->getLatest();
+
+               $title = $this->testPage->getTitle();
+
+               $this->assertFalse( $title->getPreviousRevisionID( $oldestId ) );
+
+               $this->testPage->doEditContent( new WikitextContent( __METHOD__ ), __METHOD__ );
+               $newId = $this->testPage->getRevision()->getId();
+
+               $this->assertEquals( $latestId, $title->getPreviousRevisionID( $newId ) );
+       }
+
+       /**
+        * @covers Title::getPreviousRevisionID
+        * @covers Title::getRelativeRevisionID
+        */
+       public function testTitleGetPreviousRevisionID_invalid() {
+               $this->assertFalse( $this->testPage->getTitle()->getPreviousRevisionID( 123456789 ) );
+       }
+
        /**
         * @covers Revision::getNext
         */
@@ -640,6 +668,33 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
                $this->assertEquals( $rev2->getId(), $rev1->getNext()->getId() );
        }
 
+       /**
+        * @covers Title::getNextRevisionID
+        * @covers Title::getRelativeRevisionID
+        * @covers MediaWiki\Revision\RevisionStore::getNextRevision
+        * @covers MediaWiki\Revision\RevisionStore::getRelativeRevision
+        */
+       public function testTitleGetNextRevisionID() {
+               $title = $this->testPage->getTitle();
+
+               $origId = $this->testPage->getLatest();
+
+               $this->assertFalse( $title->getNextRevisionID( $origId ) );
+
+               $this->testPage->doEditContent( new WikitextContent( __METHOD__ ), __METHOD__ );
+               $newId = $this->testPage->getLatest();
+
+               $this->assertSame( $this->testPage->getLatest(), $title->getNextRevisionID( $origId ) );
+       }
+
+       /**
+        * @covers Title::getNextRevisionID
+        * @covers Title::getRelativeRevisionID
+        */
+       public function testTitleGetNextRevisionID_invalid() {
+               $this->assertFalse( $this->testPage->getTitle()->getNextRevisionID( 123456789 ) );
+       }
+
        /**
         * @covers Revision::newNullRevision
         */
index 02a6c19..98f2980 100644 (file)
@@ -601,7 +601,7 @@ class RevisionTest extends MediaWikiTestCase {
         * @covers Revision::loadFromTitle
         */
        public function testLoadFromTitle() {
-               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_OLD );
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
                $this->overrideMwServices();
                $title = $this->getMockTitle();
 
@@ -640,6 +640,7 @@ class RevisionTest extends MediaWikiTestCase {
                                $this->equalTo( [
                                        'revision', 'page', 'user',
                                        'temp_rev_comment' => 'revision_comment_temp', 'comment_rev_comment' => 'comment',
+                                       'temp_rev_user' => 'revision_actor_temp', 'actor_rev_user' => 'actor',
                                ] ),
                                // We don't really care about the fields are they come from the selectField methods
                                $this->isType( 'array' ),
index 3064a3d..40a5dc5 100644 (file)
@@ -33,7 +33,7 @@ class TestUserRegistry {
         */
        public static function getMutableTestUser( $testName, $groups = [] ) {
                $id = self::getNextId();
-               $password = wfRandomString( 20 );
+               $password = "password_for_test_user_id_{$id}";
                $testUser = new TestUser(
                        "TestUser $testName $id",  // username
                        "Name $id",                // real name
@@ -75,7 +75,7 @@ class TestUserRegistry {
                                $password = 'UTSysopPassword';
                        } else {
                                $username = "TestUser $id";
-                               $password = wfRandomString( 20 );
+                               $password = "password_for_test_user_id_{$id}";
                        }
                        self::$testUsers[$key] = $testUser = new TestUser(
                                $username,            // username
index c0de1bf..c46f69b 100644 (file)
@@ -157,6 +157,7 @@ class TitleTest extends MediaWikiTestCase {
                        ]
                ] );
 
+               // Reset services since we modified $wgLocalInterwikis
                $this->overrideMwServices();
        }
 
@@ -785,19 +786,6 @@ class TitleTest extends MediaWikiTestCase {
                ];
        }
 
-       /**
-        * @dataProvider provideGetTalkPage_good
-        * @covers Title::getTalkPage
-        */
-       public function testGetTalkPage_good( Title $title, Title $expected ) {
-               $talk = $title->getTalkPage();
-               $this->assertSame(
-                       $expected->getPrefixedDBKey(),
-                       $talk->getPrefixedDBKey(),
-                       $title->getPrefixedDBKey()
-               );
-       }
-
        /**
         * @dataProvider provideGetTalkPage_good
         * @covers Title::getTalkPageIfDefined
index 0dc64df..e02e8a4 100644 (file)
@@ -1332,7 +1332,10 @@ class ApiBaseTest extends ApiTestCase {
                        'expiry' => time() + 100500,
                ] );
                $block->insert();
-               $blockinfo = [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ];
+               $userInfoTrait = TestingAccessWrapper::newFromObject(
+                       $this->getMockForTrait( ApiBlockInfoTrait::class )
+               );
+               $blockinfo = [ 'blockinfo' => $userInfoTrait->getBlockInfo( $block ) ];
 
                $expect = Status::newGood();
                $expect->fatal( ApiMessage::create( 'apierror-blocked', 'blocked', $blockinfo ) );
@@ -1387,7 +1390,10 @@ class ApiBaseTest extends ApiTestCase {
                        'expiry' => time() + 100500,
                ] );
                $block->insert();
-               $blockinfo = [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ];
+               $userInfoTrait = TestingAccessWrapper::newFromObject(
+                       $this->getObjectForTrait( ApiBlockInfoTrait::class )
+               );
+               $blockinfo = [ 'blockinfo' => $userInfoTrait->getBlockInfo( $block ) ];
 
                $expect = Status::newGood();
                $expect->fatal( ApiMessage::create( 'apierror-blocked', 'blocked', $blockinfo ) );
diff --git a/tests/phpunit/includes/api/ApiBlockInfoTraitTest.php b/tests/phpunit/includes/api/ApiBlockInfoTraitTest.php
new file mode 100644 (file)
index 0000000..f05cfbc
--- /dev/null
@@ -0,0 +1,43 @@
+<?php
+
+use Wikimedia\TestingAccessWrapper;
+
+/**
+ * @covers ApiBlockInfoTrait
+ */
+class ApiBlockInfoTraitTest extends MediaWikiTestCase {
+
+       public function testGetBlockInfo() {
+               $block = new Block();
+               $mock = $this->getMockForTrait( ApiBlockInfoTrait::class );
+               $info = TestingAccessWrapper::newFromObject( $mock )->getBlockInfo( $block );
+               $subset = [
+                       'blockid' => null,
+                       'blockedby' => '',
+                       'blockedbyid' => 0,
+                       'blockreason' => '',
+                       'blockexpiry' => 'infinite',
+                       'blockpartial' => false,
+               ];
+               $this->assertArraySubset( $subset, $info );
+       }
+
+       public function testGetBlockInfoPartial() {
+               $mock = $this->getMockForTrait( ApiBlockInfoTrait::class );
+
+               $block = new Block( [
+                       'sitewide' => false,
+               ] );
+               $info = TestingAccessWrapper::newFromObject( $mock )->getBlockInfo( $block );
+               $subset = [
+                       'blockid' => null,
+                       'blockedby' => '',
+                       'blockedbyid' => 0,
+                       'blockreason' => '',
+                       'blockexpiry' => 'infinite',
+                       'blockpartial' => true,
+               ];
+               $this->assertArraySubset( $subset, $info );
+       }
+
+}
index f8399a3..0011d7a 100644 (file)
@@ -121,6 +121,7 @@ class ApiParseTest extends ApiTestCase {
 
                $this->setMwGlobals( 'wgExtraInterlanguageLinkPrefixes', [ 'madeuplanguage' ] );
                $this->tablesUsed[] = 'interwiki';
+               $this->overrideMwServices();
        }
 
        /**
@@ -581,8 +582,6 @@ class ApiParseTest extends ApiTestCase {
         * @param array $arr Extra params to add to API request
         */
        private function doTestLangLinks( array $arr = [] ) {
-               $this->setupInterwiki();
-
                $res = $this->doApiRequest( array_merge( [
                        'action' => 'parse',
                        'title' => 'Omelette',
@@ -600,10 +599,12 @@ class ApiParseTest extends ApiTestCase {
        }
 
        public function testLangLinks() {
+               $this->setupInterwiki();
                $this->doTestLangLinks();
        }
 
        public function testLangLinksWithSkin() {
+               $this->setupInterwiki();
                $this->setupSkin();
                $this->doTestLangLinks( [ 'useskin' => 'testing' ] );
        }
diff --git a/tests/phpunit/includes/api/ApiQueryUserInfoTest.php b/tests/phpunit/includes/api/ApiQueryUserInfoTest.php
deleted file mode 100644 (file)
index 7dcb75c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<?php
-
-/**
- * @group medium
- * @covers ApiQueryUserInfo
- */
-class ApiQueryUserInfoTest extends ApiTestCase {
-       public function testGetBlockInfo() {
-               $apiQueryUserInfo = new ApiQueryUserInfo(
-                       new ApiQuery( new ApiMain( $this->apiContext ), 'userinfo' ),
-                       'userinfo'
-               );
-
-               $block = new Block();
-               $info = $apiQueryUserInfo->getBlockInfo( $block );
-               $subset = [
-                       'blockid' => null,
-                       'blockedby' => '',
-                       'blockedbyid' => 0,
-                       'blockreason' => '',
-                       'blockexpiry' => 'infinite',
-                       'blockpartial' => false,
-               ];
-               $this->assertArraySubset( $subset, $info );
-       }
-
-       public function testGetBlockInfoPartial() {
-               $apiQueryUserInfo = new ApiQueryUserInfo(
-                       new ApiQuery( new ApiMain( $this->apiContext ), 'userinfo' ),
-                       'userinfo'
-               );
-
-               $block = new Block( [
-                       'sitewide' => false,
-               ] );
-               $info = $apiQueryUserInfo->getBlockInfo( $block );
-               $subset = [
-                       'blockid' => null,
-                       'blockedby' => '',
-                       'blockedbyid' => 0,
-                       'blockreason' => '',
-                       'blockexpiry' => 'infinite',
-                       'blockpartial' => true,
-               ];
-               $this->assertArraySubset( $subset, $info );
-       }
-}
index 924a1a5..92c71bd 100644 (file)
@@ -15,7 +15,8 @@ class ApiQueryUserContribsTest extends ApiTestCase {
                        $wgActorTableSchemaMigrationStage = $v;
                        $this->overrideMwServices();
                }, [ $wgActorTableSchemaMigrationStage ] );
-               $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD;
+               // Needs to WRITE_BOTH so READ_OLD tests below work. READ mode here doesn't really matter.
+               $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
                $this->overrideMwServices();
 
                $users = [
index d5e1879..5cf93c9 100644 (file)
@@ -1471,10 +1471,12 @@ class AuthManagerTest extends \MediaWikiTestCase {
                        ],
                        'wgProxyWhitelist' => [],
                ] );
+               $this->overrideMwServices();
                $status = $this->manager->checkAccountCreatePermissions( new \User );
                $this->assertFalse( $status->isOK() );
                $this->assertTrue( $status->hasMessage( 'sorbs_create_account_reason' ) );
                $this->setMwGlobals( 'wgProxyWhitelist', [ '127.0.0.1' ] );
+               $this->overrideMwServices();
                $status = $this->manager->checkAccountCreatePermissions( new \User );
                $this->assertTrue( $status->isGood() );
        }
@@ -2668,7 +2670,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
 
                // Test backoff
                $cache = \ObjectCache::getLocalClusterInstance();
-               $backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
+               $backoffKey = $cache->makeKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
                $cache->set( $backoffKey, true );
                $session->clear();
                $user = \User::newFromName( $username );
@@ -2707,7 +2709,7 @@ class AuthManagerTest extends \MediaWikiTestCase {
 
                // Test addToDatabase throws an exception
                $cache = \ObjectCache::getLocalClusterInstance();
-               $backoffKey = wfMemcKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
+               $backoffKey = $cache->makeKey( 'AuthManager', 'autocreate-failed', md5( $username ) );
                $this->assertFalse( $cache->get( $backoffKey ), 'sanity check' );
                $session->clear();
                $user = $this->getMockBuilder( \User::class )
diff --git a/tests/phpunit/includes/block/BlockManagerTest.php b/tests/phpunit/includes/block/BlockManagerTest.php
new file mode 100644 (file)
index 0000000..4145665
--- /dev/null
@@ -0,0 +1,226 @@
+<?php
+
+use MediaWiki\Block\BlockManager;
+
+/**
+ * @group Blocking
+ * @group Database
+ * @coversDefaultClass \MediaWiki\Block\BlockManager
+ */
+class BlockManagerTest extends MediaWikiTestCase {
+
+       /** @var User */
+       protected $user;
+
+       /** @var int */
+       protected $sysopId;
+
+       protected function setUp() {
+               parent::setUp();
+
+               $this->user = $this->getTestUser()->getUser();
+               $this->sysopId = $this->getTestSysop()->getUser()->getId();
+       }
+
+       private function getBlockManager( $overrideConfig ) {
+               $blockManagerConfig = array_merge( [
+                       'wgApplyIpBlocksToXff' => true,
+                       'wgCookieSetOnAutoblock' => true,
+                       'wgCookieSetOnIpBlock' => true,
+                       'wgDnsBlacklistUrls' => [],
+                       'wgEnableDnsBlacklist' => true,
+                       'wgProxyList' => [],
+                       'wgProxyWhitelist' => [],
+                       'wgSoftBlockRanges' => [],
+               ], $overrideConfig );
+               return new BlockManager(
+                       $this->user,
+                       $this->user->getRequest(),
+                       ...array_values( $blockManagerConfig )
+               );
+       }
+
+       /**
+        * @dataProvider provideGetBlockFromCookieValue
+        * @covers ::getBlockFromCookieValue
+        */
+       public function testGetBlockFromCookieValue( $options, $expected ) {
+               $blockManager = $this->getBlockManager( [
+                       'wgCookieSetOnAutoblock' => true,
+                       'wgCookieSetOnIpBlock' => true,
+               ] );
+
+               $block = new Block( array_merge( [
+                       'address' => $options[ 'target' ] ?: $this->user,
+                       'by' => $this->sysopId,
+               ], $options[ 'blockOptions' ] ) );
+               $block->insert();
+
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'getBlockFromCookieValue' );
+               $method->setAccessible( true );
+
+               $user = $options[ 'loggedIn' ] ? $this->user : new User();
+               $user->getRequest()->setCookie( 'BlockID', $block->getCookieValue() );
+
+               $this->assertSame( $expected, (bool)$method->invoke(
+                       $blockManager,
+                       $user,
+                       $user->getRequest()
+               ) );
+
+               $block->delete();
+       }
+
+       public static function provideGetBlockFromCookieValue() {
+               return [
+                       'Autoblocking user block' => [
+                               [
+                                       'target' => '',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [
+                                               'enableAutoblock' => true
+                                       ],
+                               ],
+                               true,
+                       ],
+                       'Non-autoblocking user block' => [
+                               [
+                                       'target' => '',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [],
+                               ],
+                               false,
+                       ],
+                       'IP block for anonymous user' => [
+                               [
+                                       'target' => '127.0.0.1',
+                                       'loggedIn' => false,
+                                       'blockOptions' => [],
+                               ],
+                               true,
+                       ],
+                       'IP block for logged in user' => [
+                               [
+                                       'target' => '127.0.0.1',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [],
+                               ],
+                               false,
+                       ],
+                       'IP range block for anonymous user' => [
+                               [
+                                       'target' => '127.0.0.0/8',
+                                       'loggedIn' => false,
+                                       'blockOptions' => [],
+                               ],
+                               true,
+                       ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideIsLocallyBlockedProxy
+        * @covers ::isLocallyBlockedProxy
+        */
+       public function testIsLocallyBlockedProxy( $proxyList, $expected ) {
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'isLocallyBlockedProxy' );
+               $method->setAccessible( true );
+
+               $blockManager = $this->getBlockManager( [
+                       'wgProxyList' => $proxyList
+               ] );
+
+               $ip = '1.2.3.4';
+               $this->assertSame( $expected, $method->invoke( $blockManager, $ip ) );
+       }
+
+       public static function provideIsLocallyBlockedProxy() {
+               return [
+                       'Proxy list is empty' => [ [], false ],
+                       'Proxy list contains IP' => [ [ '1.2.3.4' ], true ],
+                       'Proxy list contains IP as value' => [ [ 'test' => '1.2.3.4' ], true ],
+                       'Proxy list contains range that covers IP' => [ [ '1.2.3.0/16' ], true ],
+               ];
+       }
+
+       /**
+        * @covers ::isLocallyBlockedProxy
+        */
+       public function testIsLocallyBlockedProxyDeprecated() {
+               $proxy = '1.2.3.4';
+
+               $this->hideDeprecated(
+                       'IP addresses in the keys of $wgProxyList (found the following IP ' .
+                       'addresses in keys: ' . $proxy . ', please move them to values)'
+               );
+
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'isLocallyBlockedProxy' );
+               $method->setAccessible( true );
+
+               $blockManager = $this->getBlockManager( [
+                       'wgProxyList' => [ $proxy => 'test' ]
+               ] );
+
+               $ip = '1.2.3.4';
+               $this->assertSame( true, $method->invoke( $blockManager, $ip ) );
+       }
+
+       /**
+        * @dataProvider provideIsDnsBlacklisted
+        * @covers ::isDnsBlacklisted
+        * @covers ::inDnsBlacklist
+        */
+       public function testIsDnsBlacklisted( $options, $expected ) {
+               $blockManager = $this->getBlockManager( [
+                       'wgEnableDnsBlacklist' => true,
+                       'wgDnsBlacklistUrls' => $options[ 'inBlacklist' ] ? [ 'local.wmftest.net' ] : [],
+                       'wgProxyWhitelist' => $options[ 'inWhitelist' ] ? [ '127.0.0.1' ] : [],
+               ] );
+
+               $ip = '127.0.0.1';
+               $this->assertSame(
+                       $expected,
+                       $blockManager->isDnsBlacklisted( $ip, $options[ 'check' ] )
+               );
+       }
+
+       public static function provideIsDnsBlacklisted() {
+               return [
+                       'IP is blacklisted' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => false,
+                                       'check' => false,
+                               ],
+                               true,
+                       ],
+                       'IP is not blacklisted' => [
+                               [
+                                       'inBlacklist' => false,
+                                       'inWhitelist' => false,
+                                       'check' => false,
+                               ],
+                               false,
+                       ],
+                       'IP is blacklisted and whitelisted; whitelist is checked' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => true,
+                                       'check' => false,
+                               ],
+                               true,
+                       ],
+                       'IP is blacklisted and whitelisted; whitelist is not checked' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => true,
+                                       'check' => true,
+                               ],
+                               false,
+                       ],
+               ];
+       }
+}
diff --git a/tests/phpunit/includes/block/BlockRestrictionStoreTest.php b/tests/phpunit/includes/block/BlockRestrictionStoreTest.php
new file mode 100644 (file)
index 0000000..4eef457
--- /dev/null
@@ -0,0 +1,612 @@
+<?php
+
+namespace MediaWiki\Tests\Block;
+
+use MediaWiki\Block\BlockRestrictionStore;
+use MediaWiki\Block\Restriction\NamespaceRestriction;
+use MediaWiki\Block\Restriction\PageRestriction;
+use MediaWiki\Block\Restriction\Restriction;
+use MediaWiki\MediaWikiServices;
+
+/**
+ * @group Database
+ * @group Blocking
+ * @coversDefaultClass \MediaWiki\Block\BlockRestrictionStore
+ */
+class BlockRestrictionStoreTest extends \MediaWikiLangTestCase {
+
+       /** @var BlockRestrictionStore */
+       protected $blockRestrictionStore;
+
+       public function setUp() {
+               parent::setUp();
+
+               $this->blockRestrictionStore = MediaWikiServices::getInstance()->getBlockRestrictionStore();
+       }
+
+       public function tearDown() {
+               parent::tearDown();
+               $this->resetTables();
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testLoadMultipleRestrictions() {
+               $this->setMwGlobals( [
+                       'wgBlockDisablesLogin' => false,
+               ] );
+               $block = $this->insertBlock();
+
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
+                       new PageRestriction( $block->getId(), $pageBar->getId() ),
+                       new NamespaceRestriction( $block->getId(), NS_USER ),
+               ] );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+
+               $this->assertCount( 3, $restrictions );
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testWithNoRestrictions() {
+               $block = $this->insertBlock();
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertEmpty( $restrictions );
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testWithEmptyParam() {
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( [] );
+               $this->assertEmpty( $restrictions );
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testIgnoreNotSupportedTypes() {
+               $block = $this->insertBlock();
+
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+
+               // valid type
+               $this->insertRestriction( $block->getId(), PageRestriction::TYPE_ID, $pageFoo->getId() );
+               $this->insertRestriction( $block->getId(), NamespaceRestriction::TYPE_ID, NS_USER );
+
+               // invalid type
+               $this->insertRestriction( $block->getId(), 9, $pageBar->getId() );
+               $this->insertRestriction( $block->getId(), 10, NS_FILE );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 2, $restrictions );
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testMappingPageRestrictionObject() {
+               $block = $this->insertBlock();
+               $title = 'Lady Macbeth';
+               $page = $this->getExistingTestPage( $title );
+
+               // Test Page Restrictions.
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+
+               list( $pageRestriction ) = $restrictions;
+               $this->assertInstanceOf( PageRestriction::class, $pageRestriction );
+               $this->assertEquals( $block->getId(), $pageRestriction->getBlockId() );
+               $this->assertEquals( $page->getId(), $pageRestriction->getValue() );
+               $this->assertEquals( $pageRestriction->getType(), PageRestriction::TYPE );
+               $this->assertEquals( $pageRestriction->getTitle()->getText(), $title );
+       }
+
+       /**
+        * @covers ::loadByBlockId
+        * @covers ::resultToRestrictions
+        * @covers ::rowToRestriction
+        */
+       public function testMappingNamespaceRestrictionObject() {
+               $block = $this->insertBlock();
+
+               $this->blockRestrictionStore->insert( [
+                       new NamespaceRestriction( $block->getId(), NS_USER ),
+               ] );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+
+               list( $namespaceRestriction ) = $restrictions;
+               $this->assertInstanceOf( NamespaceRestriction::class, $namespaceRestriction );
+               $this->assertEquals( $block->getId(), $namespaceRestriction->getBlockId() );
+               $this->assertSame( NS_USER, $namespaceRestriction->getValue() );
+               $this->assertEquals( $namespaceRestriction->getType(), NamespaceRestriction::TYPE );
+       }
+
+       /**
+        * @covers ::insert
+        */
+       public function testInsert() {
+               $block = $this->insertBlock();
+
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+
+               $restrictions = [
+                       new \stdClass(),
+                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
+                       new PageRestriction( $block->getId(), $pageBar->getId() ),
+                       new NamespaceRestriction( $block->getId(), NS_USER )
+               ];
+
+               $result = $this->blockRestrictionStore->insert( $restrictions );
+               $this->assertTrue( $result );
+
+               $restrictions = [
+                       new \stdClass(),
+               ];
+
+               $result = $this->blockRestrictionStore->insert( $restrictions );
+               $this->assertFalse( $result );
+
+               $result = $this->blockRestrictionStore->insert( [] );
+               $this->assertFalse( $result );
+       }
+
+       /**
+        * @covers ::insert
+        */
+       public function testInsertTypes() {
+               $block = $this->insertBlock();
+
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+
+               $invalid = $this->createMock( Restriction::class );
+               $invalid->method( 'toRow' )
+                       ->willReturn( [
+                               'ir_ipb_id' => $block->getId(),
+                               'ir_type' => 9,
+                               'ir_value' => 42,
+                       ] );
+
+               $restrictions = [
+                       new \stdClass(),
+                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
+                       new PageRestriction( $block->getId(), $pageBar->getId() ),
+                       new NamespaceRestriction( $block->getId(), NS_USER ),
+                       $invalid,
+               ];
+
+               $result = $this->blockRestrictionStore->insert( $restrictions );
+               $this->assertTrue( $result );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 3, $restrictions );
+       }
+
+       /**
+        * @covers ::update
+        * @covers ::restrictionsByBlockId
+        * @covers ::restrictionsToRemove
+        */
+       public function testUpdateInsert() {
+               $block = $this->insertBlock();
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+               $this->blockRestrictionStore->insert( [
+                               new PageRestriction( $block->getId(), $pageFoo->getId() ),
+               ] );
+
+               $this->blockRestrictionStore->update( [
+                       new \stdClass(),
+                       new PageRestriction( $block->getId(), $pageBar->getId() ),
+                       new NamespaceRestriction( $block->getId(), NS_USER ),
+               ] );
+
+               $db = wfGetDb( DB_REPLICA );
+               $result = $db->select(
+                       [ 'ipblocks_restrictions' ],
+                       [ '*' ],
+                       [ 'ir_ipb_id' => $block->getId() ]
+               );
+
+               $this->assertEquals( 2, $result->numRows() );
+               $row = $result->fetchObject();
+               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
+               $this->assertEquals( $pageBar->getId(), $row->ir_value );
+       }
+
+       /**
+        * @covers ::update
+        * @covers ::restrictionsByBlockId
+        * @covers ::restrictionsToRemove
+        */
+       public function testUpdateChange() {
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+
+               $this->blockRestrictionStore->update( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $db = wfGetDb( DB_REPLICA );
+               $result = $db->select(
+                       [ 'ipblocks_restrictions' ],
+                       [ '*' ],
+                       [ 'ir_ipb_id' => $block->getId() ]
+               );
+
+               $this->assertEquals( 1, $result->numRows() );
+               $row = $result->fetchObject();
+               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
+               $this->assertEquals( $page->getId(), $row->ir_value );
+       }
+
+       /**
+        * @covers ::update
+        * @covers ::restrictionsByBlockId
+        * @covers ::restrictionsToRemove
+        */
+       public function testUpdateNoRestrictions() {
+               $block = $this->insertBlock();
+
+               $this->blockRestrictionStore->update( [] );
+
+               $db = wfGetDb( DB_REPLICA );
+               $result = $db->select(
+                       [ 'ipblocks_restrictions' ],
+                       [ '*' ],
+                       [ 'ir_ipb_id' => $block->getId() ]
+               );
+
+               $this->assertEquals( 0, $result->numRows() );
+       }
+
+       /**
+        * @covers ::update
+        * @covers ::restrictionsByBlockId
+        * @covers ::restrictionsToRemove
+        */
+       public function testUpdateSame() {
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $this->blockRestrictionStore->update( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $db = wfGetDb( DB_REPLICA );
+               $result = $db->select(
+                       [ 'ipblocks_restrictions' ],
+                       [ '*' ],
+                       [ 'ir_ipb_id' => $block->getId() ]
+               );
+
+               $this->assertEquals( 1, $result->numRows() );
+               $row = $result->fetchObject();
+               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
+               $this->assertEquals( $page->getId(), $row->ir_value );
+       }
+
+       /**
+        * @covers ::updateByParentBlockId
+        */
+       public function testDeleteAllUpdateByParentBlockId() {
+               // Create a block and an autoblock (a child block)
+               $block = $this->insertBlock();
+               $pageFoo = $this->getExistingTestPage( 'Foo' );
+               $pageBar = $this->getExistingTestPage( 'Bar' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
+               ] );
+               $autoblockId = $block->doAutoblock( '127.0.0.1' );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
+
+               // Ensure that the restrictions on the autoblock are the same as the block.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 1, $restrictions );
+               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
+
+               // Update the restrictions on the autoblock (but leave the block unchanged)
+               $this->blockRestrictionStore->updateByParentBlockId( $block->getId(), [
+                       new PageRestriction( $block->getId(), $pageBar->getId() ),
+               ] );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
+
+               // Ensure that the restrictions on the autoblock have been updated.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 1, $restrictions );
+               $this->assertEquals( $pageBar->getId(), $restrictions[0]->getValue() );
+       }
+
+       /**
+        * @covers ::updateByParentBlockId
+        */
+       public function testUpdateByParentBlockId() {
+               // Create a block and an autoblock (a child block)
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+               $autoblockId = $block->doAutoblock( '127.0.0.1' );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               // Ensure that the restrictions on the autoblock have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 1, $restrictions );
+
+               // Remove the restrictions on the autoblock (but leave the block unchanged)
+               $this->blockRestrictionStore->updateByParentBlockId( $block->getId(), [] );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               // Ensure that the restrictions on the autoblock have been updated.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 0, $restrictions );
+       }
+
+       /**
+        * @covers ::updateByParentBlockId
+        */
+       public function testNoAutoblocksUpdateByParentBlockId() {
+               // Create a block with no autoblock.
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               // Update the restrictions on any autoblocks (there are none).
+               $this->blockRestrictionStore->updateByParentBlockId( $block->getId(), $restrictions );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+       }
+
+       /**
+        * @covers ::delete
+        */
+       public function testDelete() {
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               $result = $this->blockRestrictionStore->delete(
+                       array_merge( $restrictions, [ new \stdClass() ] )
+               );
+               $this->assertTrue( $result );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 0, $restrictions );
+       }
+
+       /**
+        * @covers ::deleteByBlockId
+        */
+       public function testDeleteByBlockId() {
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               $result = $this->blockRestrictionStore->deleteByBlockId( $block->getId() );
+               $this->assertNotFalse( $result );
+
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 0, $restrictions );
+       }
+
+       /**
+        * @covers ::deleteByParentBlockId
+        */
+       public function testDeleteByParentBlockId() {
+               // Create a block with no autoblock.
+               $block = $this->insertBlock();
+               $page = $this->getExistingTestPage( 'Foo' );
+               $this->blockRestrictionStore->insert( [
+                       new PageRestriction( $block->getId(), $page->getId() ),
+               ] );
+               $autoblockId = $block->doAutoblock( '127.0.0.1' );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               // Ensure that the restrictions on the autoblock are the same as the block.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 1, $restrictions );
+
+               // Remove all of the restrictions on the autoblock (but leave the block unchanged).
+               $result = $this->blockRestrictionStore->deleteByParentBlockId( $block->getId() );
+               // NOTE: commented out until https://gerrit.wikimedia.org/r/c/mediawiki/core/+/469324 is merged
+               //$this->assertTrue( $result );
+
+               // Ensure that the restrictions on the block have not changed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $block->getId() );
+               $this->assertCount( 1, $restrictions );
+
+               // Ensure that the restrictions on the autoblock have been removed.
+               $restrictions = $this->blockRestrictionStore->loadByBlockId( $autoblockId );
+               $this->assertCount( 0, $restrictions );
+       }
+
+       /**
+        * @covers ::equals
+        * @dataProvider equalsDataProvider
+        *
+        * @param array $a
+        * @param array $b
+        * @param bool $expected
+        */
+       public function testEquals( array $a, array $b, $expected ) {
+               $this->assertSame( $expected, $this->blockRestrictionStore->equals( $a, $b ) );
+       }
+
+       public function equalsDataProvider() {
+               return [
+                       [
+                               [
+                                       new \stdClass(),
+                                       new PageRestriction( 1, 1 ),
+                               ],
+                               [
+                                       new \stdClass(),
+                                       new PageRestriction( 1, 2 )
+                               ],
+                               false,
+                       ],
+                       [
+                               [
+                                       new PageRestriction( 1, 1 ),
+                               ],
+                               [
+                                       new PageRestriction( 1, 1 ),
+                                       new PageRestriction( 1, 2 )
+                               ],
+                               false,
+                       ],
+                       [
+                               [],
+                               [],
+                               true,
+                       ],
+                       [
+                               [
+                                       new PageRestriction( 1, 1 ),
+                                       new PageRestriction( 1, 2 ),
+                                       new PageRestriction( 2, 3 ),
+                               ],
+                               [
+                                       new PageRestriction( 2, 3 ),
+                                       new PageRestriction( 1, 2 ),
+                                       new PageRestriction( 1, 1 ),
+                               ],
+                               true
+                       ],
+                       [
+                               [
+                                       new NamespaceRestriction( 1, NS_USER ),
+                               ],
+                               [
+                                       new NamespaceRestriction( 1, NS_USER ),
+                               ],
+                               true
+                       ],
+                       [
+                               [
+                                       new NamespaceRestriction( 1, NS_USER ),
+                               ],
+                               [
+                                       new NamespaceRestriction( 1, NS_TALK ),
+                               ],
+                               false
+                       ],
+               ];
+       }
+
+       /**
+        * @covers ::setBlockId
+        */
+       public function testSetBlockId() {
+               $restrictions = [
+                       new \stdClass(),
+                       new PageRestriction( 1, 1 ),
+                       new PageRestriction( 1, 2 ),
+                       new NamespaceRestriction( 1, NS_USER ),
+               ];
+
+               $this->assertSame( 1, $restrictions[1]->getBlockId() );
+               $this->assertSame( 1, $restrictions[2]->getBlockId() );
+               $this->assertSame( 1, $restrictions[3]->getBlockId() );
+
+               $result = $this->blockRestrictionStore->setBlockId( 2, $restrictions );
+
+               foreach ( $result as $restriction ) {
+                       $this->assertSame( 2, $restriction->getBlockId() );
+               }
+       }
+
+       protected function insertBlock() {
+               $badActor = $this->getTestUser()->getUser();
+               $sysop = $this->getTestSysop()->getUser();
+
+               $block = new \Block( [
+                       'address' => $badActor->getName(),
+                       'user' => $badActor->getId(),
+                       'by' => $sysop->getId(),
+                       'expiry' => 'infinity',
+                       'sitewide' => 0,
+                       'enableAutoblock' => true,
+               ] );
+
+               $block->insert();
+
+               return $block;
+       }
+
+       protected function insertRestriction( $blockId, $type, $value ) {
+               $this->db->insert( 'ipblocks_restrictions', [
+                       'ir_ipb_id' => $blockId,
+                       'ir_type' => $type,
+                       'ir_value' => $value,
+               ] );
+       }
+
+       protected function resetTables() {
+               $this->db->delete( 'ipblocks', '*', __METHOD__ );
+               $this->db->delete( 'ipblocks_restrictions', '*', __METHOD__ );
+       }
+}
diff --git a/tests/phpunit/includes/block/BlockRestrictionTest.php b/tests/phpunit/includes/block/BlockRestrictionTest.php
deleted file mode 100644 (file)
index 5bbd3d0..0000000
+++ /dev/null
@@ -1,601 +0,0 @@
-<?php
-
-namespace MediaWiki\Tests\Block;
-
-use MediaWiki\Block\BlockRestriction;
-use MediaWiki\Block\Restriction\NamespaceRestriction;
-use MediaWiki\Block\Restriction\PageRestriction;
-use MediaWiki\Block\Restriction\Restriction;
-
-/**
- * @group Database
- * @group Blocking
- * @coversDefaultClass \MediaWiki\Block\BlockRestriction
- */
-class BlockRestrictionTest extends \MediaWikiLangTestCase {
-
-       public function tearDown() {
-               parent::tearDown();
-               $this->resetTables();
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testLoadMultipleRestrictions() {
-               $this->setMwGlobals( [
-                       'wgBlockDisablesLogin' => false,
-               ] );
-               $block = $this->insertBlock();
-
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
-                       new PageRestriction( $block->getId(), $pageBar->getId() ),
-                       new NamespaceRestriction( $block->getId(), NS_USER ),
-               ] );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-
-               $this->assertCount( 3, $restrictions );
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testWithNoRestrictions() {
-               $block = $this->insertBlock();
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertEmpty( $restrictions );
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testWithEmptyParam() {
-               $restrictions = BlockRestriction::loadByBlockId( [] );
-
-               $this->assertEmpty( $restrictions );
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testIgnoreNotSupportedTypes() {
-               $block = $this->insertBlock();
-
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-
-               // valid type
-               $this->insertRestriction( $block->getId(), PageRestriction::TYPE_ID, $pageFoo->getId() );
-               $this->insertRestriction( $block->getId(), NamespaceRestriction::TYPE_ID, NS_USER );
-
-               // invalid type
-               $this->insertRestriction( $block->getId(), 9, $pageBar->getId() );
-               $this->insertRestriction( $block->getId(), 10, NS_FILE );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 2, $restrictions );
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testMappingPageRestrictionObject() {
-               $block = $this->insertBlock();
-               $title = 'Lady Macbeth';
-               $page = $this->getExistingTestPage( $title );
-
-               // Test Page Restrictions.
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-
-               list( $pageRestriction ) = $restrictions;
-               $this->assertInstanceOf( PageRestriction::class, $pageRestriction );
-               $this->assertEquals( $block->getId(), $pageRestriction->getBlockId() );
-               $this->assertEquals( $page->getId(), $pageRestriction->getValue() );
-               $this->assertEquals( $pageRestriction->getType(), PageRestriction::TYPE );
-               $this->assertEquals( $pageRestriction->getTitle()->getText(), $title );
-       }
-
-       /**
-        * @covers ::loadByBlockId
-        * @covers ::resultToRestrictions
-        * @covers ::rowToRestriction
-        */
-       public function testMappingNamespaceRestrictionObject() {
-               $block = $this->insertBlock();
-
-               BlockRestriction::insert( [
-                       new NamespaceRestriction( $block->getId(), NS_USER ),
-               ] );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-
-               list( $namespaceRestriction ) = $restrictions;
-               $this->assertInstanceOf( NamespaceRestriction::class, $namespaceRestriction );
-               $this->assertEquals( $block->getId(), $namespaceRestriction->getBlockId() );
-               $this->assertSame( NS_USER, $namespaceRestriction->getValue() );
-               $this->assertEquals( $namespaceRestriction->getType(), NamespaceRestriction::TYPE );
-       }
-
-       /**
-        * @covers ::insert
-        */
-       public function testInsert() {
-               $block = $this->insertBlock();
-
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-
-               $restrictions = [
-                       new \stdClass(),
-                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
-                       new PageRestriction( $block->getId(), $pageBar->getId() ),
-                       new NamespaceRestriction( $block->getId(), NS_USER )
-               ];
-
-               $result = BlockRestriction::insert( $restrictions );
-               $this->assertTrue( $result );
-
-               $restrictions = [
-                       new \stdClass(),
-               ];
-
-               $result = BlockRestriction::insert( $restrictions );
-               $this->assertFalse( $result );
-
-               $result = BlockRestriction::insert( [] );
-               $this->assertFalse( $result );
-       }
-
-       /**
-        * @covers ::insert
-        */
-       public function testInsertTypes() {
-               $block = $this->insertBlock();
-
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-
-               $invalid = $this->createMock( Restriction::class );
-               $invalid->method( 'toRow' )
-                       ->willReturn( [
-                               'ir_ipb_id' => $block->getId(),
-                               'ir_type' => 9,
-                               'ir_value' => 42,
-                       ] );
-
-               $restrictions = [
-                       new \stdClass(),
-                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
-                       new PageRestriction( $block->getId(), $pageBar->getId() ),
-                       new NamespaceRestriction( $block->getId(), NS_USER ),
-                       $invalid,
-               ];
-
-               $result = BlockRestriction::insert( $restrictions );
-               $this->assertTrue( $result );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 3, $restrictions );
-       }
-
-       /**
-        * @covers ::update
-        * @covers ::restrictionsByBlockId
-        * @covers ::restrictionsToRemove
-        */
-       public function testUpdateInsert() {
-               $block = $this->insertBlock();
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-               BlockRestriction::insert( [
-                               new PageRestriction( $block->getId(), $pageFoo->getId() ),
-               ] );
-
-               BlockRestriction::update( [
-                       new \stdClass(),
-                       new PageRestriction( $block->getId(), $pageBar->getId() ),
-                       new NamespaceRestriction( $block->getId(), NS_USER ),
-               ] );
-
-               $db = wfGetDb( DB_REPLICA );
-               $result = $db->select(
-                       [ 'ipblocks_restrictions' ],
-                       [ '*' ],
-                       [ 'ir_ipb_id' => $block->getId() ]
-               );
-
-               $this->assertEquals( 2, $result->numRows() );
-               $row = $result->fetchObject();
-               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
-               $this->assertEquals( $pageBar->getId(), $row->ir_value );
-       }
-
-       /**
-        * @covers ::update
-        * @covers ::restrictionsByBlockId
-        * @covers ::restrictionsToRemove
-        */
-       public function testUpdateChange() {
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-
-               BlockRestriction::update( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               $db = wfGetDb( DB_REPLICA );
-               $result = $db->select(
-                       [ 'ipblocks_restrictions' ],
-                       [ '*' ],
-                       [ 'ir_ipb_id' => $block->getId() ]
-               );
-
-               $this->assertEquals( 1, $result->numRows() );
-               $row = $result->fetchObject();
-               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
-               $this->assertEquals( $page->getId(), $row->ir_value );
-       }
-
-       /**
-        * @covers ::update
-        * @covers ::restrictionsByBlockId
-        * @covers ::restrictionsToRemove
-        */
-       public function testUpdateNoRestrictions() {
-               $block = $this->insertBlock();
-
-               BlockRestriction::update( [] );
-
-               $db = wfGetDb( DB_REPLICA );
-               $result = $db->select(
-                       [ 'ipblocks_restrictions' ],
-                       [ '*' ],
-                       [ 'ir_ipb_id' => $block->getId() ]
-               );
-
-               $this->assertEquals( 0, $result->numRows() );
-       }
-
-       /**
-        * @covers ::update
-        * @covers ::restrictionsByBlockId
-        * @covers ::restrictionsToRemove
-        */
-       public function testUpdateSame() {
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               BlockRestriction::update( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               $db = wfGetDb( DB_REPLICA );
-               $result = $db->select(
-                       [ 'ipblocks_restrictions' ],
-                       [ '*' ],
-                       [ 'ir_ipb_id' => $block->getId() ]
-               );
-
-               $this->assertEquals( 1, $result->numRows() );
-               $row = $result->fetchObject();
-               $this->assertEquals( $block->getId(), $row->ir_ipb_id );
-               $this->assertEquals( $page->getId(), $row->ir_value );
-       }
-
-       /**
-        * @covers ::updateByParentBlockId
-        */
-       public function testDeleteAllUpdateByParentBlockId() {
-               // Create a block and an autoblock (a child block)
-               $block = $this->insertBlock();
-               $pageFoo = $this->getExistingTestPage( 'Foo' );
-               $pageBar = $this->getExistingTestPage( 'Bar' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $pageFoo->getId() ),
-               ] );
-               $autoblockId = $block->doAutoblock( '127.0.0.1' );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
-
-               // Ensure that the restrictions on the autoblock are the same as the block.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 1, $restrictions );
-               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
-
-               // Update the restrictions on the autoblock (but leave the block unchanged)
-               BlockRestriction::updateByParentBlockId( $block->getId(), [
-                       new PageRestriction( $block->getId(), $pageBar->getId() ),
-               ] );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-               $this->assertEquals( $pageFoo->getId(), $restrictions[0]->getValue() );
-
-               // Ensure that the restrictions on the autoblock have been updated.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 1, $restrictions );
-               $this->assertEquals( $pageBar->getId(), $restrictions[0]->getValue() );
-       }
-
-       /**
-        * @covers ::updateByParentBlockId
-        */
-       public function testUpdateByParentBlockId() {
-               // Create a block and an autoblock (a child block)
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-               $autoblockId = $block->doAutoblock( '127.0.0.1' );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               // Ensure that the restrictions on the autoblock have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 1, $restrictions );
-
-               // Remove the restrictions on the autoblock (but leave the block unchanged)
-               BlockRestriction::updateByParentBlockId( $block->getId(), [] );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               // Ensure that the restrictions on the autoblock have been updated.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 0, $restrictions );
-       }
-
-       /**
-        * @covers ::updateByParentBlockId
-        */
-       public function testNoAutoblocksUpdateByParentBlockId() {
-               // Create a block with no autoblock.
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               // Update the restrictions on any autoblocks (there are none).
-               BlockRestriction::updateByParentBlockId( $block->getId(), $restrictions );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-       }
-
-       /**
-        * @covers ::delete
-        */
-       public function testDelete() {
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               $result = BlockRestriction::delete( array_merge( $restrictions, [ new \stdClass() ] ) );
-               $this->assertTrue( $result );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 0, $restrictions );
-       }
-
-       /**
-        * @covers ::deleteByBlockId
-        */
-       public function testDeleteByBlockId() {
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               $result = BlockRestriction::deleteByBlockId( $block->getId() );
-               $this->assertNotFalse( $result );
-
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 0, $restrictions );
-       }
-
-       /**
-        * @covers ::deleteByParentBlockId
-        */
-       public function testDeleteByParentBlockId() {
-               // Create a block with no autoblock.
-               $block = $this->insertBlock();
-               $page = $this->getExistingTestPage( 'Foo' );
-               BlockRestriction::insert( [
-                       new PageRestriction( $block->getId(), $page->getId() ),
-               ] );
-               $autoblockId = $block->doAutoblock( '127.0.0.1' );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               // Ensure that the restrictions on the autoblock are the same as the block.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 1, $restrictions );
-
-               // Remove all of the restrictions on the autoblock (but leave the block unchanged).
-               $result = BlockRestriction::deleteByParentBlockId( $block->getId() );
-               // NOTE: commented out until https://gerrit.wikimedia.org/r/c/mediawiki/core/+/469324 is merged
-               //$this->assertTrue( $result );
-
-               // Ensure that the restrictions on the block have not changed.
-               $restrictions = BlockRestriction::loadByBlockId( $block->getId() );
-               $this->assertCount( 1, $restrictions );
-
-               // Ensure that the restrictions on the autoblock have been removed.
-               $restrictions = BlockRestriction::loadByBlockId( $autoblockId );
-               $this->assertCount( 0, $restrictions );
-       }
-
-       /**
-        * @covers ::equals
-        * @dataProvider equalsDataProvider
-        *
-        * @param array $a
-        * @param array $b
-        * @param bool $expected
-        */
-       public function testEquals( array $a, array $b, $expected ) {
-               $this->assertSame( $expected, BlockRestriction::equals( $a, $b ) );
-       }
-
-       public function equalsDataProvider() {
-               return [
-                       [
-                               [
-                                       new \stdClass(),
-                                       new PageRestriction( 1, 1 ),
-                               ],
-                               [
-                                       new \stdClass(),
-                                       new PageRestriction( 1, 2 )
-                               ],
-                               false,
-                       ],
-                       [
-                               [
-                                       new PageRestriction( 1, 1 ),
-                               ],
-                               [
-                                       new PageRestriction( 1, 1 ),
-                                       new PageRestriction( 1, 2 )
-                               ],
-                               false,
-                       ],
-                       [
-                               [],
-                               [],
-                               true,
-                       ],
-                       [
-                               [
-                                       new PageRestriction( 1, 1 ),
-                                       new PageRestriction( 1, 2 ),
-                                       new PageRestriction( 2, 3 ),
-                               ],
-                               [
-                                       new PageRestriction( 2, 3 ),
-                                       new PageRestriction( 1, 2 ),
-                                       new PageRestriction( 1, 1 ),
-                               ],
-                               true
-                       ],
-                       [
-                               [
-                                       new NamespaceRestriction( 1, NS_USER ),
-                               ],
-                               [
-                                       new NamespaceRestriction( 1, NS_USER ),
-                               ],
-                               true
-                       ],
-                       [
-                               [
-                                       new NamespaceRestriction( 1, NS_USER ),
-                               ],
-                               [
-                                       new NamespaceRestriction( 1, NS_TALK ),
-                               ],
-                               false
-                       ],
-               ];
-       }
-
-       /**
-        * @covers ::setBlockId
-        */
-       public function testSetBlockId() {
-               $restrictions = [
-                       new \stdClass(),
-                       new PageRestriction( 1, 1 ),
-                       new PageRestriction( 1, 2 ),
-                       new NamespaceRestriction( 1, NS_USER ),
-               ];
-
-               $this->assertSame( 1, $restrictions[1]->getBlockId() );
-               $this->assertSame( 1, $restrictions[2]->getBlockId() );
-               $this->assertSame( 1, $restrictions[3]->getBlockId() );
-
-               $result = BlockRestriction::setBlockId( 2, $restrictions );
-
-               foreach ( $result as $restriction ) {
-                       $this->assertSame( 2, $restriction->getBlockId() );
-               }
-       }
-
-       protected function insertBlock() {
-               $badActor = $this->getTestUser()->getUser();
-               $sysop = $this->getTestSysop()->getUser();
-
-               $block = new \Block( [
-                       'address' => $badActor->getName(),
-                       'user' => $badActor->getId(),
-                       'by' => $sysop->getId(),
-                       'expiry' => 'infinity',
-                       'sitewide' => 0,
-                       'enableAutoblock' => true,
-               ] );
-
-               $block->insert();
-
-               return $block;
-       }
-
-       protected function insertRestriction( $blockId, $type, $value ) {
-               $this->db->insert( 'ipblocks_restrictions', [
-                       'ir_ipb_id' => $blockId,
-                       'ir_type' => $type,
-                       'ir_value' => $value,
-               ] );
-       }
-
-       protected function resetTables() {
-               $this->db->delete( 'ipblocks', '*', __METHOD__ );
-               $this->db->delete( 'ipblocks_restrictions', '*', __METHOD__ );
-       }
-}
index ec443e7..591f27d 100644 (file)
@@ -19,11 +19,10 @@ class GlobalVarConfigTest extends MediaWikiTestCase {
         */
        public function testConstructor( $prefix ) {
                $var = $prefix . 'GlobalVarConfigTest';
-               $rand = wfRandomString();
-               $this->setMwGlobals( $var, $rand );
+               $this->setMwGlobals( $var, 'testvalue' );
                $config = new GlobalVarConfig( $prefix );
                $this->assertInstanceOf( GlobalVarConfig::class, $config );
-               $this->assertEquals( $rand, $config->get( 'GlobalVarConfigTest' ) );
+               $this->assertEquals( 'testvalue', $config->get( 'GlobalVarConfigTest' ) );
        }
 
        public static function provideConstructor() {
@@ -41,7 +40,7 @@ class GlobalVarConfigTest extends MediaWikiTestCase {
         * @covers GlobalVarConfig::hasWithPrefix
         */
        public function testHas() {
-               $this->setMwGlobals( 'wgGlobalVarConfigTestHas', wfRandomString() );
+               $this->setMwGlobals( 'wgGlobalVarConfigTestHas', 'testvalue' );
                $config = new GlobalVarConfig();
                $this->assertTrue( $config->has( 'GlobalVarConfigTestHas' ) );
                $this->assertFalse( $config->has( 'GlobalVarConfigTestNotHas' ) );
diff --git a/tests/phpunit/includes/config/ServiceOptionsTest.php b/tests/phpunit/includes/config/ServiceOptionsTest.php
new file mode 100644 (file)
index 0000000..966cf41
--- /dev/null
@@ -0,0 +1,149 @@
+<?php
+
+use MediaWiki\Config\ServiceOptions;
+
+/**
+ * @coversDefaultClass \MediaWiki\Config\ServiceOptions
+ */
+class ServiceOptionsTest extends MediaWikiTestCase {
+       public static $testObj;
+
+       public static function setUpBeforeClass() {
+               parent::setUpBeforeClass();
+
+               self::$testObj = new stdclass();
+       }
+
+       /**
+        * @dataProvider provideConstructor
+        * @covers ::__construct
+        * @covers ::assertRequiredOptions
+        * @covers ::get
+        */
+       public function testConstructor( $expected, $keys, ...$sources ) {
+               $options = new ServiceOptions( $keys, ...$sources );
+
+               foreach ( $expected as $key => $val ) {
+                       $this->assertSame( $val, $options->get( $key ) );
+               }
+
+               // This is lumped in the same test because there's no support for depending on a test that
+               // has a data provider.
+               $options->assertRequiredOptions( array_keys( $expected ) );
+
+               // Suppress warning if no assertions were run. This is expected for empty arguments.
+               $this->assertTrue( true );
+       }
+
+       public function provideConstructor() {
+               return [
+                       'No keys' => [ [], [], [ 'a' => 'aval' ] ],
+                       'Simple array source' => [
+                               [ 'a' => 'aval', 'b' => 'bval' ],
+                               [ 'a', 'b' ],
+                               [ 'a' => 'aval', 'b' => 'bval', 'c' => 'cval' ],
+                       ],
+                       'Simple HashConfig source' => [
+                               [ 'a' => 'aval', 'b' => 'bval' ],
+                               [ 'a', 'b' ],
+                               new HashConfig( [ 'a' => 'aval', 'b' => 'bval', 'c' => 'cval' ] ),
+                       ],
+                       'Three different sources' => [
+                               [ 'a' => 'aval', 'b' => 'bval' ],
+                               [ 'a', 'b' ],
+                               [ 'z' => 'zval' ],
+                               new HashConfig( [ 'a' => 'aval', 'c' => 'cval' ] ),
+                               [ 'b' => 'bval', 'd' => 'dval' ],
+                       ],
+                       'null key' => [
+                               [ 'a' => null ],
+                               [ 'a' ],
+                               [ 'a' => null ],
+                       ],
+                       'Numeric option name' => [
+                               [ '0' => 'nothing' ],
+                               [ '0' ],
+                               [ '0' => 'nothing' ],
+                       ],
+                       'Multiple sources for one key' => [
+                               [ 'a' => 'winner' ],
+                               [ 'a' ],
+                               [ 'a' => 'winner' ],
+                               [ 'a' => 'second place' ],
+                       ],
+                       'Object value is passed by reference' => [
+                               [ 'a' => self::$testObj ],
+                               [ 'a' ],
+                               [ 'a' => self::$testObj ],
+                       ],
+               ];
+       }
+
+       /**
+        * @covers ::__construct
+        */
+       public function testKeyNotFound() {
+               $this->setExpectedException( InvalidArgumentException::class,
+                       'Key "a" not found in input sources' );
+
+               new ServiceOptions( [ 'a' ], [ 'b' => 'bval' ], [ 'c' => 'cval' ] );
+       }
+
+       /**
+        * @covers ::__construct
+        * @covers ::assertRequiredOptions
+        */
+       public function testOutOfOrderAssertRequiredOptions() {
+               $options = new ServiceOptions( [ 'a', 'b' ], [ 'a' => '', 'b' => '' ] );
+               $options->assertRequiredOptions( [ 'b', 'a' ] );
+               $this->assertTrue( true, 'No exception thrown' );
+       }
+
+       /**
+        * @covers ::__construct
+        * @covers ::get
+        */
+       public function testGetUnrecognized() {
+               $this->setExpectedException( InvalidArgumentException::class,
+                       'Unrecognized option "b"' );
+
+               $options = new ServiceOptions( [ 'a' ], [ 'a' => '' ] );
+               $options->get( 'b' );
+       }
+
+       /**
+        * @covers ::__construct
+        * @covers ::assertRequiredOptions
+        */
+       public function testExtraKeys() {
+               $this->setExpectedException( Wikimedia\Assert\PreconditionException::class,
+                       'Precondition failed: Unsupported options passed: b, c!' );
+
+               $options = new ServiceOptions( [ 'a', 'b', 'c' ], [ 'a' => '', 'b' => '', 'c' => '' ] );
+               $options->assertRequiredOptions( [ 'a' ] );
+       }
+
+       /**
+        * @covers ::__construct
+        * @covers ::assertRequiredOptions
+        */
+       public function testMissingKeys() {
+               $this->setExpectedException( Wikimedia\Assert\PreconditionException::class,
+                       'Precondition failed: Required options missing: a, b!' );
+
+               $options = new ServiceOptions( [ 'c' ], [ 'c' => '' ] );
+               $options->assertRequiredOptions( [ 'a', 'b', 'c' ] );
+       }
+
+       /**
+        * @covers ::__construct
+        * @covers ::assertRequiredOptions
+        */
+       public function testExtraAndMissingKeys() {
+               $this->setExpectedException( Wikimedia\Assert\PreconditionException::class,
+                       'Precondition failed: Unsupported options passed: b! Required options missing: c!' );
+
+               $options = new ServiceOptions( [ 'a', 'b' ], [ 'a' => '', 'b' => '' ] );
+               $options->assertRequiredOptions( [ 'a', 'c' ] );
+       }
+}
index b79cdf3..106a13b 100644 (file)
@@ -30,7 +30,6 @@ use Wikimedia\Rdbms\LBFactorySimple;
 use Wikimedia\Rdbms\LBFactoryMulti;
 use Wikimedia\Rdbms\LoadBalancer;
 use Wikimedia\Rdbms\ChronologyProtector;
-use Wikimedia\Rdbms\DatabaseMysqli;
 use Wikimedia\Rdbms\MySQLMasterPos;
 use Wikimedia\Rdbms\DatabaseDomain;
 
@@ -47,7 +46,7 @@ class LBFactoryTest extends MediaWikiTestCase {
         * @dataProvider getLBFactoryClassProvider
         */
        public function testGetLBFactoryClass( $expected, $deprecated ) {
-               $mockDB = $this->getMockBuilder( DatabaseMysqli::class )
+               $mockDB = $this->getMockBuilder( IDatabase::class )
                        ->disableOriginalConstructor()
                        ->getMock();
 
@@ -291,7 +290,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                $m2Pos = new MySQLMasterPos( 'db1064-bin.002400/794074907', $now );
 
                // Master DB 1
-               $mockDB1 = $this->getMockBuilder( DatabaseMysqli::class )
+               $mockDB1 = $this->getMockBuilder( IDatabase::class )
                        ->disableOriginalConstructor()
                        ->getMock();
                $mockDB1->method( 'writesOrCallbacksPending' )->willReturn( true );
@@ -316,7 +315,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                $lb1->method( 'getMasterPos' )->willReturn( $m1Pos );
                $lb1->method( 'getServerName' )->with( 0 )->willReturn( 'master1' );
                // Master DB 2
-               $mockDB2 = $this->getMockBuilder( DatabaseMysqli::class )
+               $mockDB2 = $this->getMockBuilder( IDatabase::class )
                        ->disableOriginalConstructor()
                        ->getMock();
                $mockDB2->method( 'writesOrCallbacksPending' )->willReturn( true );
index 6b977a3..b14d89c 100644 (file)
@@ -118,6 +118,16 @@ class DeprecationHelperTest extends MediaWikiTestCase {
                        $wrapper = TestingAccessWrapper::newFromObject( $this->testSubclass );
                        $this->assertSame( 1, $wrapper->privateNonDeprecated );
                }, E_USER_ERROR, "Cannot access non-public property $fullName" );
+
+               $fullName = 'TestDeprecatedSubclass::$subclassPrivateNondeprecated';
+               $this->assertErrorTriggered( function () {
+                       $this->assertSame( null, $this->testSubclass->subclassPrivateNondeprecated );
+               }, E_USER_ERROR, "Cannot access non-public property $fullName" );
+               $this->assertErrorTriggered( function () {
+                       $this->testSubclass->subclassPrivateNondeprecated = 0;
+                       $wrapper = TestingAccessWrapper::newFromObject( $this->testSubclass );
+                       $this->assertSame( 1, $wrapper->subclassPrivateNondeprecated );
+               }, E_USER_ERROR, "Cannot access non-public property $fullName" );
        }
 
        protected function assertErrorTriggered( callable $callback, $level, $message ) {
index 0b6c8cf..28f8fa2 100644 (file)
@@ -2,6 +2,8 @@
 
 class TestDeprecatedSubclass extends TestDeprecatedClass {
 
+       private $subclassPrivateNondeprecated = 1;
+
        public function getDeprecatedPrivateParentProperty() {
                return $this->privateDeprecated;
        }
index 4dc2f9e..8548fde 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
 use Wikimedia\TestingAccessWrapper;
 
 /**
@@ -97,7 +98,7 @@ class FileBackendTest extends MediaWikiTestCase {
                        'name' => 'localtesting',
                        'lockManager' => LockManagerGroup::singleton()->get( 'fsLockManager' ),
                        'parallelize' => 'implicit',
-                       'wikiId' => wfWikiID() . wfRandomString(),
+                       'wikiId' => 'testdb',
                        'backends' => [
                                [
                                        'name' => 'localmultitesting1',
@@ -1538,7 +1539,8 @@ class FileBackendTest extends MediaWikiTestCase {
                $url = $this->backend->getFileHttpUrl( [ 'src' => $source ] );
 
                if ( $url !== null ) { // supported
-                       $data = Http::request( "GET", $url, [], __METHOD__ );
+                       $data = MediaWikiServices::getInstance()->getHttpRequestFactory()->
+                               get( $url, [], __METHOD__ );
                        $this->assertEquals( $content, $data,
                                "HTTP GET of URL has right contents ($backendName)." );
                }
@@ -2567,11 +2569,9 @@ class FileBackendTest extends MediaWikiTestCase {
                        'wikiId' => wfWikiID()
                ] ) );
 
-               $name = wfRandomString( 300 );
-
                $input = [
                        'headers' => [
-                               'content-Disposition' => FileBackend::makeContentDisposition( 'inline', $name ),
+                               'content-Disposition' => FileBackend::makeContentDisposition( 'inline', 'name' ),
                                'Content-dUration' => 25.6,
                                'X-LONG-VALUE' => str_pad( '0', 300 ),
                                'CONTENT-LENGTH' => 855055,
@@ -2579,7 +2579,7 @@ class FileBackendTest extends MediaWikiTestCase {
                ];
                $expected = [
                        'headers' => [
-                               'content-disposition' => FileBackend::makeContentDisposition( 'inline', $name ),
+                               'content-disposition' => FileBackend::makeContentDisposition( 'inline', 'name' ),
                                'content-duration' => 25.6,
                                'content-length' => 855055
                        ]
index 4c9855b..346be7a 100644 (file)
@@ -112,7 +112,7 @@ class FileBackendDBRepoWrapperTest extends MediaWikiTestCase {
        }
 
        protected function getMocks() {
-               $dbMock = $this->getMockBuilder( Wikimedia\Rdbms\DatabaseMysqli::class )
+               $dbMock = $this->getMockBuilder( Wikimedia\Rdbms\IDatabase::class )
                        ->disableOriginalClone()
                        ->disableOriginalConstructor()
                        ->getMock();
index 9beea5b..0c78c2b 100644 (file)
@@ -28,7 +28,7 @@ class MigrateFileRepoLayoutTest extends MediaWikiTestCase {
                        ]
                ] );
 
-               $dbMock = $this->getMockBuilder( Wikimedia\Rdbms\DatabaseMysqli::class )
+               $dbMock = $this->getMockBuilder( Wikimedia\Rdbms\IDatabase::class )
                        ->disableOriginalConstructor()
                        ->getMock();
 
index 5a343f6..67de698 100644 (file)
@@ -7,7 +7,7 @@ class RepoGroupTest extends MediaWikiTestCase {
 
        function testHasForeignRepoNegative() {
                $this->setMwGlobals( 'wgForeignFileRepos', [] );
-               RepoGroup::destroySingleton();
+               $this->overrideMwServices();
                FileBackendGroup::destroySingleton();
                $this->assertFalse( RepoGroup::singleton()->hasForeignRepos() );
        }
@@ -27,7 +27,7 @@ class RepoGroupTest extends MediaWikiTestCase {
 
        function testForEachForeignRepoNone() {
                $this->setMwGlobals( 'wgForeignFileRepos', [] );
-               RepoGroup::destroySingleton();
+               $this->overrideMwServices();
                FileBackendGroup::destroySingleton();
                $fakeCallback = $this->createMock( RepoGroupTestHelper::class );
                $fakeCallback->expects( $this->never() )->method( 'callback' );
@@ -48,7 +48,7 @@ class RepoGroupTest extends MediaWikiTestCase {
                        'apiThumbCacheExpiry' => 86400,
                        'directory' => $wgUploadDirectory
                ] ] );
-               RepoGroup::destroySingleton();
+               $this->overrideMwServices();
                FileBackendGroup::destroySingleton();
        }
 }
index eee4296..a8c53d9 100644 (file)
@@ -67,6 +67,8 @@ class HttpTest extends MediaWikiTestCase {
         * @covers Http::getProxy
         */
        public function testGetProxy() {
+               $this->hideDeprecated( 'Http::getProxy' );
+
                $this->setMwGlobals( 'wgHTTPProxy', false );
                $this->assertEquals(
                        '',
index 1baaa54..ce07f78 100644 (file)
@@ -259,8 +259,7 @@ class JobQueueTest extends MediaWikiTestCase {
                $this->assertEquals( 0, $queue->getSize(), "Queue is empty ($desc)" );
                $this->assertEquals( 0, $queue->getAcquiredCount(), "Queue is empty ($desc)" );
 
-               $id = wfRandomString( 32 );
-               $root1 = Job::newRootJobParams( "nulljobspam:$id" ); // task ID/timestamp
+               $root1 = Job::newRootJobParams( "nulljobspam:testId" ); // task ID/timestamp
                for ( $i = 0; $i < 5; ++$i ) {
                        $this->assertNull( $queue->push( $this->newJob( 0, $root1 ) ), "Push worked ($desc)" );
                }
index 9fe3e3d..878b895 100644 (file)
@@ -27,10 +27,6 @@ class JobTest extends MediaWikiTestCase {
                $requestId = 'requestId=' . WebRequest::getRequestId();
 
                return [
-                       [
-                               $this->getMockJob( false ),
-                               'someCommand Special: ' . $requestId
-                       ],
                        [
                                $this->getMockJob( [ 'key' => 'val' ] ),
                                'someCommand Special: key=val ' . $requestId
@@ -85,16 +81,24 @@ class JobTest extends MediaWikiTestCase {
        }
 
        public function getMockJob( $params ) {
-               $title = new Title();
                $mock = $this->getMockForAbstractClass(
                        Job::class,
-                       [ 'someCommand', $title, $params ],
+                       [ 'someCommand', $params ],
                        'SomeJob'
                );
 
                return $mock;
        }
 
+       /**
+        * @covers Job::__construct()
+        */
+       public function testInvalidParamsArgument() {
+               $params = false;
+               $this->setExpectedException( InvalidArgumentException::class, '$params must be an array' );
+               $job = $this->getMockJob( $params );
+       }
+
        /**
         * @dataProvider provideTestJobFactory
         *
@@ -165,15 +169,15 @@ class JobTest extends MediaWikiTestCase {
         */
        public function testJobSignatureTitleBased() {
                $testPage = Title::makeTitle( NS_PROJECT, 'x' );
-               $blankTitle = Title::makeTitle( NS_SPECIAL, '' );
+               $blankPage = Title::makeTitle( NS_SPECIAL, 'Blankpage' );
                $params = [ 'z' => 1, 'causeAction' => 'unknown', 'causeAgent' => 'unknown' ];
                $paramsWithTitle = $params + [ 'namespace' => NS_PROJECT, 'title' => 'x' ];
+               $paramsWithBlankpage = $params + [ 'namespace' => NS_SPECIAL, 'title' => 'Blankpage' ];
 
                $job = new RefreshLinksJob( $testPage, $params );
                $this->assertEquals( $testPage->getPrefixedText(), $job->getTitle()->getPrefixedText() );
-               $this->assertSame( $testPage, $job->getTitle() );
+               $this->assertTrue( $testPage->equals( $job->getTitle() ) );
                $this->assertJobParamsMatch( $job, $paramsWithTitle );
-               $this->assertSame( $testPage, $job->getTitle() );
 
                $job = Job::factory( 'refreshLinks', $testPage, $params );
                $this->assertEquals( $testPage->getPrefixedText(), $job->getTitle()->getPrefixedText() );
@@ -184,8 +188,8 @@ class JobTest extends MediaWikiTestCase {
                $this->assertJobParamsMatch( $job, $paramsWithTitle );
 
                $job = Job::factory( 'refreshLinks', $params );
-               $this->assertTrue( $blankTitle->equals( $job->getTitle() ) );
-               $this->assertJobParamsMatch( $job, $params );
+               $this->assertTrue( $blankPage->equals( $job->getTitle() ) );
+               $this->assertJobParamsMatch( $job, $paramsWithBlankpage );
        }
 
        /**
index ef333f9..4c93789 100644 (file)
@@ -85,9 +85,9 @@ class CSSMinTest extends MediaWikiTestCase {
         * @covers CSSMin::getMimeType
         */
        public function testGetMimeType( $fileContents, $fileExtension, $expected ) {
-               $fileName = wfTempDir() . DIRECTORY_SEPARATOR . uniqid( 'MW_PHPUnit_CSSMinTest_' ) . '.'
-                       . $fileExtension;
-               $this->addTmpFiles( $fileName );
+               // Automatically removed when it falls out of scope (including if the test fails)
+               $file = TempFSFile::factory( 'PHPUnit_CSSMinTest_', $fileExtension, wfTempDir() );
+               $fileName = $file->getPath();
                file_put_contents( $fileName, $fileContents );
                $this->assertSame( $expected, CSSMin::getMimeType( $fileName ) );
        }
index 0376803..9f88474 100644 (file)
@@ -28,8 +28,8 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
         * @covers MultiWriteBagOStuff::doWrite
         */
        public function testSetImmediate() {
-               $key = wfRandomString();
-               $value = wfRandomString();
+               $key = 'key';
+               $value = 'value';
                $this->cache->set( $key, $value );
 
                // Set in tier 1
@@ -42,8 +42,8 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
         * @covers MultiWriteBagOStuff
         */
        public function testSyncMerge() {
-               $key = wfRandomString();
-               $value = wfRandomString();
+               $key = 'keyA';
+               $value = 'value';
                $func = function () use ( $value ) {
                        return $value;
                };
@@ -56,14 +56,14 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
                // Set in tier 1
                $this->assertEquals( $value, $this->cache1->get( $key ), 'Written to tier 1' );
                // Not yet set in tier 2
-               $this->assertEquals( false, $this->cache2->get( $key ), 'Not written to tier 2' );
+               $this->assertFalse( $this->cache2->get( $key ), 'Not written to tier 2' );
 
                $dbw->commit();
 
                // Set in tier 2
                $this->assertEquals( $value, $this->cache2->get( $key ), 'Written to tier 2' );
 
-               $key = wfRandomString();
+               $key = 'keyB';
 
                $dbw->begin();
                $this->cache->merge( $key, $func, 0, 1, BagOStuff::WRITE_SYNC );
@@ -80,8 +80,8 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
         * @covers MultiWriteBagOStuff::set
         */
        public function testSetDelayed() {
-               $key = wfRandomString();
-               $value = (object)[ 'v' => wfRandomString() ];
+               $key = 'key';
+               $value = (object)[ 'v' => 'saved value' ];
                $expectValue = clone $value;
 
                // XXX: DeferredUpdates bound to transactions in CLI mode
@@ -90,12 +90,12 @@ class MultiWriteBagOStuffTest extends MediaWikiTestCase {
                $this->cache->set( $key, $value );
 
                // Test that later changes to $value don't affect the saved value (e.g. T168040)
-               $value->v = 'bogus';
+               $value->v = 'other value';
 
                // Set in tier 1
                $this->assertEquals( $expectValue, $this->cache1->get( $key ), 'Written to tier 1' );
                // Not yet set in tier 2
-               $this->assertEquals( false, $this->cache2->get( $key ), 'Not written to tier 2' );
+               $this->assertFalse( $this->cache2->get( $key ), 'Not written to tier 2' );
 
                $dbw->commit();
 
index b7f22ec..550ec0b 100644 (file)
@@ -23,40 +23,40 @@ class ReplicatedBagOStuffTest extends MediaWikiTestCase {
         * @covers ReplicatedBagOStuff::set
         */
        public function testSet() {
-               $key = wfRandomString();
-               $value = wfRandomString();
+               $key = 'a key';
+               $value = 'a value';
                $this->cache->set( $key, $value );
 
                // Write to master.
-               $this->assertEquals( $this->writeCache->get( $key ), $value );
+               $this->assertEquals( $value, $this->writeCache->get( $key ) );
                // Don't write to replica. Replication is deferred to backend.
-               $this->assertEquals( $this->readCache->get( $key ), false );
+               $this->assertFalse( $this->readCache->get( $key ) );
        }
 
        /**
         * @covers ReplicatedBagOStuff::get
         */
        public function testGet() {
-               $key = wfRandomString();
+               $key = 'a key';
 
-               $write = wfRandomString();
+               $write = 'one value';
                $this->writeCache->set( $key, $write );
-               $read = wfRandomString();
+               $read = 'another value';
                $this->readCache->set( $key, $read );
 
                // Read from replica.
-               $this->assertEquals( $this->cache->get( $key ), $read );
+               $this->assertEquals( $read, $this->cache->get( $key ) );
        }
 
        /**
         * @covers ReplicatedBagOStuff::get
         */
        public function testGetAbsent() {
-               $key = wfRandomString();
-               $value = wfRandomString();
+               $key = 'a key';
+               $value = 'a value';
                $this->writeCache->set( $key, $value );
 
                // Don't read from master. No failover if value is absent.
-               $this->assertEquals( $this->cache->get( $key ), false );
+               $this->assertFalse( $this->cache->get( $key ) );
        }
 }
index 91ee276..e90577c 100644 (file)
@@ -140,7 +140,8 @@ class LinkRendererTest extends MediaWikiLangTestCase {
        public function testGetLinkClasses() {
                $wanCache = ObjectCache::getMainWANInstance();
                $titleFormatter = MediaWikiServices::getInstance()->getTitleFormatter();
-               $linkCache = new LinkCache( $titleFormatter, $wanCache );
+               $nsInfo = MediaWikiServices::getInstance()->getNamespaceInfo();
+               $linkCache = new LinkCache( $titleFormatter, $wanCache, $nsInfo );
                $foobarTitle = new TitleValue( NS_MAIN, 'FooBar' );
                $redirectTitle = new TitleValue( NS_MAIN, 'Redirect' );
                $userTitle = new TitleValue( NS_USER, 'Someuser' );
index ba4b2e2..3ff677e 100644 (file)
@@ -41,9 +41,9 @@ class PageArchiveMcrTest extends PageArchiveTestBase {
                return [
                        [
                                'ar_minor_edit' => '0',
-                               'ar_user' => '0',
+                               'ar_user' => null,
                                'ar_user_text' => $this->ipEditor,
-                               'ar_actor' => null,
+                               'ar_actor' => (string)User::newFromName( $this->ipEditor, false )->getActorId( $this->db ),
                                'ar_len' => '11',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->ipRev->getId() ),
@@ -63,7 +63,7 @@ class PageArchiveMcrTest extends PageArchiveTestBase {
                                'ar_minor_edit' => '0',
                                'ar_user' => (string)$this->getTestUser()->getUser()->getId(),
                                'ar_user_text' => $this->getTestUser()->getUser()->getName(),
-                               'ar_actor' => null,
+                               'ar_actor' => (string)$this->getTestUser()->getUser()->getActorId(),
                                'ar_len' => '7',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->firstRev->getId() ),
index f8d4ef9..8d7ed61 100644 (file)
@@ -43,9 +43,9 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                return [
                        [
                                'ar_minor_edit' => '0',
-                               'ar_user' => '0',
+                               'ar_user' => null,
                                'ar_user_text' => $this->ipEditor,
-                               'ar_actor' => null,
+                               'ar_actor' => (string)User::newFromName( $this->ipEditor, false )->getActorId( $this->db ),
                                'ar_len' => '11',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->ipRev->getId() ),
@@ -70,7 +70,7 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                                'ar_minor_edit' => '0',
                                'ar_user' => (string)$this->getTestUser()->getUser()->getId(),
                                'ar_user_text' => $this->getTestUser()->getUser()->getName(),
-                               'ar_actor' => null,
+                               'ar_actor' => (string)$this->getTestUser()->getUser()->getActorId(),
                                'ar_len' => '7',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->firstRev->getId() ),
index 06c0456..218d4ce 100644 (file)
@@ -82,7 +82,7 @@ abstract class PageArchiveTestBase extends MediaWikiTestCase {
 
                $this->tablesUsed += $this->getMcrTablesToReset();
 
-               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_OLD );
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
                $this->setMwGlobals( 'wgContentHandlerUseDB', $this->getContentHandlerUseDB() );
                $this->setMwGlobals(
                        'wgMultiContentRevisionSchemaMigrationStage',
index 48a9ecd..a00eb3f 100644 (file)
@@ -1,6 +1,7 @@
 <?php
 
 use MediaWiki\Auth\AuthManager;
+use MediaWiki\Config\ServiceOptions;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Preferences\DefaultPreferencesFactory;
 use Wikimedia\TestingAccessWrapper;
@@ -51,11 +52,19 @@ class DefaultPreferencesFactoryTest extends \MediaWikiTestCase {
         * @return DefaultPreferencesFactory
         */
        protected function getPreferencesFactory() {
+               $mockNsInfo = $this->createMock( NamespaceInfo::class );
+               $mockNsInfo->method( 'getValidNamespaces' )->willReturn( [
+                       NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK
+               ] );
+               $mockNsInfo->expects( $this->never() )
+                       ->method( $this->anythingBut( 'getValidNamespaces', '__destruct' ) );
+
                return new DefaultPreferencesFactory(
-                       $this->config,
+                       new ServiceOptions( DefaultPreferencesFactory::$constructorOptions, $this->config ),
                        new Language(),
                        AuthManager::singleton(),
-                       MediaWikiServices::getInstance()->getLinkRenderer()
+                       MediaWikiServices::getInstance()->getLinkRenderer(),
+                       $mockNsInfo
                );
        }
 
index 0fdcf6d..f04d35c 100644 (file)
@@ -37,7 +37,7 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
 
                $store = new CachingSiteStore(
                        $this->getHashSiteStore( $testSites ),
-                       wfGetMainCache()
+                       ObjectCache::getLocalClusterInstance()
                );
 
                $sites = $store->getSites();
@@ -62,7 +62,9 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
         * @covers CachingSiteStore::saveSites
         */
        public function testSaveSites() {
-               $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+               $store = new CachingSiteStore(
+                       new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+               );
 
                $sites = [];
 
@@ -108,7 +110,7 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
                                return $siteList;
                        } ) );
 
-               $store = new CachingSiteStore( $dbSiteStore, wfGetMainCache() );
+               $store = new CachingSiteStore( $dbSiteStore, ObjectCache::getLocalClusterInstance() );
 
                // initialize internal cache
                $this->assertGreaterThan( 0, $store->getSites()->count(), 'count sites' );
@@ -138,7 +140,9 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
         * @covers CachingSiteStore::clear
         */
        public function testClear() {
-               $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+               $store = new CachingSiteStore(
+                       new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+               );
                $this->assertTrue( $store->clear() );
 
                $site = $store->getSite( 'enwiki' );
index 2ce097b..f545948 100644 (file)
@@ -197,6 +197,37 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testRcHidemyselfFilter() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $user = $this->getTestUser()->getUser();
+               $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "NOT((rc_actor = '{$user->getActorId()}'))",
+                       ],
+                       [
+                               'hidemyself' => 1,
+                       ],
+                       "rc conditions: hidemyself=1 (logged in)",
+                       $user
+               );
+
+               $user = User::newFromName( '10.11.12.13', false );
+               $id = $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "NOT((rc_actor = '{$user->getActorId()}'))",
+                       ],
+                       [
+                               'hidemyself' => 1,
+                       ],
+                       "rc conditions: hidemyself=1 (anon)",
+                       $user
+               );
+       }
+
+       public function testRcHidemyselfFilter_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -230,6 +261,37 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testRcHidebyothersFilter() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $user = $this->getTestUser()->getUser();
+               $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "(rc_actor = '{$user->getActorId()}')",
+                       ],
+                       [
+                               'hidebyothers' => 1,
+                       ],
+                       "rc conditions: hidebyothers=1 (logged in)",
+                       $user
+               );
+
+               $user = User::newFromName( '10.11.12.13', false );
+               $id = $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "(rc_actor = '{$user->getActorId()}')",
+                       ],
+                       [
+                               'hidebyothers' => 1,
+                       ],
+                       "rc conditions: hidebyothers=1 (anon)",
+                       $user
+               );
+       }
+
+       public function testRcHidebyothersFilter_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -464,6 +526,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelAllExperienceLevels() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'newcomer;learner;experienced',
+                       ],
+                       "rc conditions: userExpLevel=newcomer;learner;experienced"
+               );
+       }
+
+       public function testFilterUserExpLevelAllExperienceLevels_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -482,6 +560,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelRegistrered() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'registered',
+                       ],
+                       "rc conditions: userExpLevel=registered"
+               );
+       }
+
+       public function testFilterUserExpLevelRegistrered_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -500,6 +594,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelUnregistrered() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'unregistered',
+                       ],
+                       "rc conditions: userExpLevel=unregistered"
+               );
+       }
+
+       public function testFilterUserExpLevelUnregistrered_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -518,6 +628,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelRegistreredOrLearner() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'registered;learner',
+                       ],
+                       "rc conditions: userExpLevel=registered;learner"
+               );
+       }
+
+       public function testFilterUserExpLevelRegistreredOrLearner_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -536,6 +662,20 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelUnregistreredOrExperienced() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $conds = $this->buildQuery( [ 'userExpLevel' => 'unregistered;experienced' ] );
+
+               $this->assertRegExp(
+                       '/\(actor_rc_user\.actor_user IS NULL\) OR '
+                               . '\(\(user_editcount >= 500\) AND \(user_registration <= \'[^\']+\'\)\)/',
+                       reset( $conds ),
+                       "rc conditions: userExpLevel=unregistered;experienced"
+               );
+       }
+
+       public function testFilterUserExpLevelUnregistreredOrExperienced_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
index dc02922..e881611 100644 (file)
@@ -158,9 +158,7 @@ class ContribsPagerTest extends MediaWikiTestCase {
 
                $this->assertContains( 'ip_changes', $queryInfo[0] );
                $this->assertArrayHasKey( 'ip_changes', $queryInfo[5] );
-               $this->assertSame( 'ipc_rev_timestamp', $queryInfo[1]['rev_timestamp'] );
-               $this->assertSame( 'ipc_rev_id', $queryInfo[1]['rev_id'] );
-               $this->assertSame( [ 'rev_timestamp DESC', 'rev_id DESC' ], $queryInfo[4]['ORDER BY'] );
+               $this->assertSame( [ 'ipc_rev_timestamp DESC', 'ipc_rev_id DESC' ], $queryInfo[4]['ORDER BY'] );
        }
 
 }
index 182ca0d..c1f2e42 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 
-use MediaWiki\Block\BlockRestriction;
+use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Block\Restriction\PageRestriction;
 use MediaWiki\Block\Restriction\NamespaceRestriction;
 use Wikimedia\TestingAccessWrapper;
+use Wikimedia\Rdbms\LoadBalancer;
 
 /**
  * @group Blocking
@@ -280,7 +281,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
                $this->assertSame( $reason, $block->getReason() );
                $this->assertSame( $expiry, $block->getExpiry() );
                $this->assertCount( 2, $block->getRestrictions() );
-               $this->assertTrue( BlockRestriction::equals( $block->getRestrictions(), [
+               $this->assertTrue( $this->getBlockRestrictionStore()->equals( $block->getRestrictions(), [
                        new PageRestriction( $block->getId(), $pageMars->getId() ),
                        new PageRestriction( $block->getId(), $pageSaturn->getId() ),
                ] ) );
@@ -335,7 +336,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
                $this->assertSame( $expiry, $block->getExpiry() );
                $this->assertFalse( $block->isSitewide() );
                $this->assertCount( 2, $block->getRestrictions() );
-               $this->assertTrue( BlockRestriction::equals( $block->getRestrictions(), [
+               $this->assertTrue( $this->getBlockRestrictionStore()->equals( $block->getRestrictions(), [
                        new PageRestriction( $block->getId(), $pageMars->getId() ),
                        new PageRestriction( $block->getId(), $pageSaturn->getId() ),
                ] ) );
@@ -351,7 +352,7 @@ class SpecialBlockTest extends SpecialPageTestBase {
                $this->assertSame( $expiry, $block->getExpiry() );
                $this->assertFalse( $block->isSitewide() );
                $this->assertCount( 1, $block->getRestrictions() );
-               $this->assertTrue( BlockRestriction::equals( $block->getRestrictions(), [
+               $this->assertTrue( $this->getBlockRestrictionStore()->equals( $block->getRestrictions(), [
                        new PageRestriction( $block->getId(), $pageMars->getId() ),
                ] ) );
 
@@ -471,4 +472,17 @@ class SpecialBlockTest extends SpecialPageTestBase {
                $this->db->delete( 'ipblocks', '*', __METHOD__ );
                $this->db->delete( 'ipblocks_restrictions', '*', __METHOD__ );
        }
+
+       /**
+        * Get a BlockRestrictionStore instance
+        *
+        * @return BlockRestrictionStore
+        */
+       private function getBlockRestrictionStore() : BlockRestrictionStore {
+               $loadBalancer = $this->getMockBuilder( LoadBalancer::class )
+                                          ->disableOriginalConstructor()
+                                          ->getMock();
+
+               return new BlockRestrictionStore( $loadBalancer );
+       }
 }
index 21b6468..556c640 100644 (file)
  * @file
  */
 
-use MediaWiki\MediaWikiServices;
+use MediaWiki\Config\ServiceOptions;
 
 class NamespaceInfoTest extends MediaWikiTestCase {
+       /**********************************************************************************************
+        * Shared code
+        * %{
+        */
+       private $scopedCallback;
 
-       /** @var NamespaceInfo */
-       private $obj;
-
-       protected function setUp() {
+       public function setUp() {
                parent::setUp();
 
-               $this->setMwGlobals( [
-                       'wgContentNamespaces' => [ NS_MAIN ],
-                       'wgNamespacesWithSubpages' => [
-                               NS_TALK => true,
-                               NS_USER => true,
-                               NS_USER_TALK => true,
-                       ],
-                       'wgCapitalLinks' => true,
-                       'wgCapitalLinkOverrides' => [],
-                       'wgNonincludableNamespaces' => [],
-               ] );
-
-               $this->obj = MediaWikiServices::getInstance()->getNamespaceInfo();
-       }
+               // Boo, there's still some global state in the class :(
+               global $wgHooks;
+               $hooks = $wgHooks;
+               unset( $hooks['CanonicalNamespaces'] );
+               $this->setMwGlobals( 'wgHooks', $hooks );
 
-       /**
-        * @todo Write more texts, handle $wgAllowImageMoving setting
-        * @covers NamespaceInfo::isMovable
-        */
-       public function testIsMovable() {
-               $this->assertFalse( $this->obj->isMovable( NS_SPECIAL ) );
+               $this->scopedCallback =
+                       ExtensionRegistry::getInstance()->setAttributeForTest( 'ExtensionNamespaces', [] );
        }
 
-       private function assertIsSubject( $ns ) {
-               $this->assertTrue( $this->obj->isSubject( $ns ) );
-       }
+       public function tearDown() {
+               $this->scopedCallback = null;
 
-       private function assertIsNotSubject( $ns ) {
-               $this->assertFalse( $this->obj->isSubject( $ns ) );
+               parent::tearDown();
        }
 
        /**
-        * Please make sure to change testIsTalk() if you change the assertions below
-        * @covers NamespaceInfo::isSubject
+        * TODO Make this a const once HHVM support is dropped (T192166)
         */
-       public function testIsSubject() {
-               // Special namespaces
-               $this->assertIsSubject( NS_MEDIA );
-               $this->assertIsSubject( NS_SPECIAL );
-
-               // Subject pages
-               $this->assertIsSubject( NS_MAIN );
-               $this->assertIsSubject( NS_USER );
-               $this->assertIsSubject( 100 ); # user defined
-
-               // Talk pages
-               $this->assertIsNotSubject( NS_TALK );
-               $this->assertIsNotSubject( NS_USER_TALK );
-               $this->assertIsNotSubject( 101 ); # user defined
+       private static $defaultOptions = [
+               'AllowImageMoving' => true,
+               'CanonicalNamespaceNames' => [
+                       NS_TALK => 'Talk',
+                       NS_USER => 'User',
+                       NS_USER_TALK => 'User_talk',
+                       NS_SPECIAL => 'Special',
+                       NS_MEDIA => 'Media',
+               ],
+               'CapitalLinkOverrides' => [],
+               'CapitalLinks' => true,
+               'ContentNamespaces' => [ NS_MAIN ],
+               'ExtraNamespaces' => [],
+               'ExtraSignatureNamespaces' => [],
+               'NamespaceContentModels' => [],
+               'NamespaceProtection' => [],
+               'NamespacesWithSubpages' => [
+                       NS_TALK => true,
+                       NS_USER => true,
+                       NS_USER_TALK => true,
+               ],
+               'NonincludableNamespaces' => [],
+               'RestrictionLevels' => [ '', 'autoconfirmed', 'sysop' ],
+       ];
+
+       private function newObj( array $options = [] ) : NamespaceInfo {
+               return new NamespaceInfo( new ServiceOptions( NamespaceInfo::$constructorOptions,
+                       $options, self::$defaultOptions ) );
        }
 
-       private function assertIsTalk( $ns ) {
-               $this->assertTrue( $this->obj->isTalk( $ns ) );
-       }
+       // %} End shared code
 
-       private function assertIsNotTalk( $ns ) {
-               $this->assertFalse( $this->obj->isTalk( $ns ) );
-       }
+       /**********************************************************************************************
+        * Basic methods
+        * %{
+        */
 
        /**
-        * Reverse of testIsSubject().
-        * Please update testIsSubject() if you change assertions below
-        * @covers NamespaceInfo::isTalk
+        * @covers NamespaceInfo::__construct
+        * @dataProvider provideConstructor
+        * @param ServiceOptions $options
+        * @param string|null $expectedExceptionText
         */
-       public function testIsTalk() {
-               // Special namespaces
-               $this->assertIsNotTalk( NS_MEDIA );
-               $this->assertIsNotTalk( NS_SPECIAL );
-
-               // Subject pages
-               $this->assertIsNotTalk( NS_MAIN );
-               $this->assertIsNotTalk( NS_USER );
-               $this->assertIsNotTalk( 100 ); # user defined
+       public function testConstructor( ServiceOptions $options, $expectedExceptionText = null ) {
+               if ( $expectedExceptionText !== null ) {
+                       $this->setExpectedException( \Wikimedia\Assert\PreconditionException::class,
+                               $expectedExceptionText );
+               }
+               new NamespaceInfo( $options );
+               $this->assertTrue( true );
+       }
 
-               // Talk pages
-               $this->assertIsTalk( NS_TALK );
-               $this->assertIsTalk( NS_USER_TALK );
-               $this->assertIsTalk( 101 ); # user defined
+       public function provideConstructor() {
+               return [
+                       [ new ServiceOptions( NamespaceInfo::$constructorOptions, self::$defaultOptions ) ],
+                       [ new ServiceOptions( [], [] ), 'Required options missing: ' ],
+                       [ new ServiceOptions(
+                               array_merge( NamespaceInfo::$constructorOptions, [ 'invalid' ] ),
+                               self::$defaultOptions,
+                               [ 'invalid' => '' ]
+                       ), 'Unsupported options passed: invalid' ],
+               ];
        }
 
        /**
-        * @covers NamespaceInfo::getSubject
+        * @dataProvider provideIsMovable
+        * @covers NamespaceInfo::isMovable
+        *
+        * @param bool $expected
+        * @param int $ns
+        * @param bool $allowImageMoving
         */
-       public function testGetSubject() {
-               // Special namespaces are their own subjects
-               $this->assertEquals( NS_MEDIA, $this->obj->getSubject( NS_MEDIA ) );
-               $this->assertEquals( NS_SPECIAL, $this->obj->getSubject( NS_SPECIAL ) );
-
-               $this->assertEquals( NS_MAIN, $this->obj->getSubject( NS_TALK ) );
-               $this->assertEquals( NS_USER, $this->obj->getSubject( NS_USER_TALK ) );
+       public function testIsMovable( $expected, $ns, $allowImageMoving = true ) {
+               $obj = $this->newObj( [ 'AllowImageMoving' => $allowImageMoving ] );
+               $this->assertSame( $expected, $obj->isMovable( $ns ) );
        }
 
-       /**
-        * Regular getTalk() calls
-        * Namespaces without a talk page (NS_MEDIA, NS_SPECIAL) are tested in
-        * the function testGetTalkExceptions()
-        * @covers NamespaceInfo::getTalk
-        */
-       public function testGetTalk() {
-               $this->assertEquals( NS_TALK, $this->obj->getTalk( NS_MAIN ) );
-               $this->assertEquals( NS_TALK, $this->obj->getTalk( NS_TALK ) );
-               $this->assertEquals( NS_USER_TALK, $this->obj->getTalk( NS_USER ) );
-               $this->assertEquals( NS_USER_TALK, $this->obj->getTalk( NS_USER_TALK ) );
+       public function provideIsMovable() {
+               return [
+                       'Main' => [ true, NS_MAIN ],
+                       'Talk' => [ true, NS_TALK ],
+                       'Special' => [ false, NS_SPECIAL ],
+                       'Nonexistent even namespace' => [ true, 1234 ],
+                       'Nonexistent odd namespace' => [ true, 12345 ],
+
+                       'Media with image moving' => [ false, NS_MEDIA, true ],
+                       'Media with no image moving' => [ false, NS_MEDIA, false ],
+                       'File with image moving' => [ true, NS_FILE, true ],
+                       'File with no image moving' => [ false, NS_FILE, false ],
+               ];
        }
 
        /**
-        * Exceptions with getTalk()
-        * NS_MEDIA does not have talk pages. MediaWiki raise an exception for them.
-        * @expectedException MWException
-        * @covers NamespaceInfo::getTalk
+        * @param int $ns
+        * @param bool $expected
+        * @dataProvider provideIsSubject
+        * @covers NamespaceInfo::isSubject
         */
-       public function testGetTalkExceptionsForNsMedia() {
-               $this->assertNull( $this->obj->getTalk( NS_MEDIA ) );
+       public function testIsSubject( $ns, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->isSubject( $ns ) );
        }
 
        /**
-        * Exceptions with getTalk()
-        * NS_SPECIAL does not have talk pages. MediaWiki raise an exception for them.
-        * @expectedException MWException
-        * @covers NamespaceInfo::getTalk
+        * @param int $ns
+        * @param bool $expected
+        * @dataProvider provideIsSubject
+        * @covers NamespaceInfo::isTalk
         */
-       public function testGetTalkExceptionsForNsSpecial() {
-               $this->assertNull( $this->obj->getTalk( NS_SPECIAL ) );
+       public function testIsTalk( $ns, $expected ) {
+               $this->assertSame( !$expected, $this->newObj()->isTalk( $ns ) );
        }
 
-       /**
-        * Regular getAssociated() calls
-        * Namespaces without an associated page (NS_MEDIA, NS_SPECIAL) are tested in
-        * the function testGetAssociatedExceptions()
-        * @covers NamespaceInfo::getAssociated
-        */
-       public function testGetAssociated() {
-               $this->assertEquals( NS_TALK, $this->obj->getAssociated( NS_MAIN ) );
-               $this->assertEquals( NS_MAIN, $this->obj->getAssociated( NS_TALK ) );
+       public function provideIsSubject() {
+               return [
+                       // Special namespaces
+                       [ NS_MEDIA, true ],
+                       [ NS_SPECIAL, true ],
+
+                       // Subject pages
+                       [ NS_MAIN, true ],
+                       [ NS_USER, true ],
+                       [ 100, true ],
+
+                       // Talk pages
+                       [ NS_TALK, false ],
+                       [ NS_USER_TALK, false ],
+                       [ 101, false ],
+               ];
        }
 
-       # ## Exceptions with getAssociated()
-       # ## NS_MEDIA and NS_SPECIAL do not have talk pages. MediaWiki raises
-       # ## an exception for them.
        /**
-        * @expectedException MWException
-        * @covers NamespaceInfo::getAssociated
+        * @covers NamespaceInfo::exists
+        * @dataProvider provideExists
+        * @param int $ns
+        * @param bool $expected
         */
-       public function testGetAssociatedExceptionsForNsMedia() {
-               $this->assertNull( $this->obj->getAssociated( NS_MEDIA ) );
+       public function testExists( $ns, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->exists( $ns ) );
        }
 
-       /**
-        * @expectedException MWException
-        * @covers NamespaceInfo::getAssociated
-        */
-       public function testGetAssociatedExceptionsForNsSpecial() {
-               $this->assertNull( $this->obj->getAssociated( NS_SPECIAL ) );
+       public function provideExists() {
+               return [
+                       'Main' => [ NS_MAIN, true ],
+                       'Talk' => [ NS_TALK, true ],
+                       'Media' => [ NS_MEDIA, true ],
+                       'Special' => [ NS_SPECIAL, true ],
+                       'Nonexistent' => [ 12345, false ],
+                       'Negative nonexistent' => [ -12345, false ],
+               ];
        }
 
        /**
         * Note if we add a namespace registration system with keys like 'MAIN'
-        * we should add tests here for equivilance on things like 'MAIN' == 0
+        * we should add tests here for equivalence on things like 'MAIN' == 0
         * and 'MAIN' == NS_MAIN.
         * @covers NamespaceInfo::equals
         */
        public function testEquals() {
-               $this->assertTrue( $this->obj->equals( NS_MAIN, NS_MAIN ) );
-               $this->assertTrue( $this->obj->equals( NS_MAIN, 0 ) ); // In case we make NS_MAIN 'MAIN'
-               $this->assertTrue( $this->obj->equals( NS_USER, NS_USER ) );
-               $this->assertTrue( $this->obj->equals( NS_USER, 2 ) );
-               $this->assertTrue( $this->obj->equals( NS_USER_TALK, NS_USER_TALK ) );
-               $this->assertTrue( $this->obj->equals( NS_SPECIAL, NS_SPECIAL ) );
-               $this->assertFalse( $this->obj->equals( NS_MAIN, NS_TALK ) );
-               $this->assertFalse( $this->obj->equals( NS_USER, NS_USER_TALK ) );
-               $this->assertFalse( $this->obj->equals( NS_PROJECT, NS_TEMPLATE ) );
+               $obj = $this->newObj();
+               $this->assertTrue( $obj->equals( NS_MAIN, NS_MAIN ) );
+               $this->assertTrue( $obj->equals( NS_MAIN, 0 ) ); // In case we make NS_MAIN 'MAIN'
+               $this->assertTrue( $obj->equals( NS_USER, NS_USER ) );
+               $this->assertTrue( $obj->equals( NS_USER, 2 ) );
+               $this->assertTrue( $obj->equals( NS_USER_TALK, NS_USER_TALK ) );
+               $this->assertTrue( $obj->equals( NS_SPECIAL, NS_SPECIAL ) );
+               $this->assertFalse( $obj->equals( NS_MAIN, NS_TALK ) );
+               $this->assertFalse( $obj->equals( NS_USER, NS_USER_TALK ) );
+               $this->assertFalse( $obj->equals( NS_PROJECT, NS_TEMPLATE ) );
        }
 
        /**
+        * @param int $ns1
+        * @param int $ns2
+        * @param bool $expected
+        * @dataProvider provideSubjectEquals
         * @covers NamespaceInfo::subjectEquals
         */
-       public function testSubjectEquals() {
-               $this->assertSameSubject( NS_MAIN, NS_MAIN );
-               $this->assertSameSubject( NS_MAIN, 0 ); // In case we make NS_MAIN 'MAIN'
-               $this->assertSameSubject( NS_USER, NS_USER );
-               $this->assertSameSubject( NS_USER, 2 );
-               $this->assertSameSubject( NS_USER_TALK, NS_USER_TALK );
-               $this->assertSameSubject( NS_SPECIAL, NS_SPECIAL );
-               $this->assertSameSubject( NS_MAIN, NS_TALK );
-               $this->assertSameSubject( NS_USER, NS_USER_TALK );
+       public function testSubjectEquals( $ns1, $ns2, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->subjectEquals( $ns1, $ns2 ) );
+       }
 
-               $this->assertDifferentSubject( NS_PROJECT, NS_TEMPLATE );
-               $this->assertDifferentSubject( NS_SPECIAL, NS_MAIN );
+       public function provideSubjectEquals() {
+               return [
+                       [ NS_MAIN, NS_MAIN, true ],
+                       // In case we make NS_MAIN 'MAIN'
+                       [ NS_MAIN, 0, true ],
+                       [ NS_USER, NS_USER, true ],
+                       [ NS_USER, 2, true ],
+                       [ NS_USER_TALK, NS_USER_TALK, true ],
+                       [ NS_SPECIAL, NS_SPECIAL, true ],
+                       [ NS_MAIN, NS_TALK, true ],
+                       [ NS_USER, NS_USER_TALK, true ],
+
+                       [ NS_PROJECT, NS_TEMPLATE, false ],
+                       [ NS_SPECIAL, NS_MAIN, false ],
+                       [ NS_MEDIA, NS_SPECIAL, false ],
+                       [ NS_SPECIAL, NS_MEDIA, false ],
+               ];
        }
 
        /**
-        * @covers NamespaceInfo::subjectEquals
+        * @dataProvider provideHasTalkNamespace
+        * @covers NamespaceInfo::hasTalkNamespace
+        *
+        * @param int $ns
+        * @param bool $expected
         */
-       public function testSpecialAndMediaAreDifferentSubjects() {
-               $this->assertDifferentSubject(
-                       NS_MEDIA, NS_SPECIAL,
-                       "NS_MEDIA and NS_SPECIAL are different subject namespaces"
-               );
-               $this->assertDifferentSubject(
-                       NS_SPECIAL, NS_MEDIA,
-                       "NS_SPECIAL and NS_MEDIA are different subject namespaces"
-               );
+       public function testHasTalkNamespace( $ns, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->hasTalkNamespace( $ns ) );
        }
 
        public function provideHasTalkNamespace() {
@@ -235,178 +263,180 @@ class NamespaceInfoTest extends MediaWikiTestCase {
        }
 
        /**
-        * @dataProvider provideHasTalkNamespace
-        * @covers NamespaceInfo::hasTalkNamespace
-        *
-        * @param int $index
+        * @param int $ns
         * @param bool $expected
+        * @param array $contentNamespaces
+        * @covers NamespaceInfo::isContent
+        * @dataProvider provideIsContent
         */
-       public function testHasTalkNamespace( $index, $expected ) {
-               $actual = $this->obj->hasTalkNamespace( $index );
-               $this->assertSame( $actual, $expected, "NS $index" );
-       }
-
-       private function assertIsContent( $ns ) {
-               $this->assertTrue( $this->obj->isContent( $ns ) );
+       public function testIsContent( $ns, $expected, $contentNamespaces = [ NS_MAIN ] ) {
+               $obj = $this->newObj( [ 'ContentNamespaces' => $contentNamespaces ] );
+               $this->assertSame( $expected, $obj->isContent( $ns ) );
        }
 
-       private function assertIsNotContent( $ns ) {
-               $this->assertFalse( $this->obj->isContent( $ns ) );
+       public function provideIsContent() {
+               return [
+                       [ NS_MAIN, true ],
+                       [ NS_MEDIA, false ],
+                       [ NS_SPECIAL, false ],
+                       [ NS_TALK, false ],
+                       [ NS_USER, false ],
+                       [ NS_CATEGORY, false ],
+                       [ 100, false ],
+                       [ 100, true, [ NS_MAIN, 100, 252 ] ],
+                       [ 252, true, [ NS_MAIN, 100, 252 ] ],
+                       [ NS_MAIN, true, [ NS_MAIN, 100, 252 ] ],
+                       // NS_MAIN is always content
+                       [ NS_MAIN, true, [] ],
+               ];
        }
 
        /**
-        * @covers NamespaceInfo::isContent
+        * @dataProvider provideWantSignatures
+        * @covers NamespaceInfo::wantSignatures
+        *
+        * @param int $index
+        * @param bool $expected
         */
-       public function testIsContent() {
-               // NS_MAIN is a content namespace per DefaultSettings.php
-               // and per function definition.
-
-               $this->assertIsContent( NS_MAIN );
-
-               // Other namespaces which are not expected to be content
+       public function testWantSignatures( $index, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->wantSignatures( $index ) );
+       }
 
-               $this->assertIsNotContent( NS_MEDIA );
-               $this->assertIsNotContent( NS_SPECIAL );
-               $this->assertIsNotContent( NS_TALK );
-               $this->assertIsNotContent( NS_USER );
-               $this->assertIsNotContent( NS_CATEGORY );
-               $this->assertIsNotContent( 100 );
+       public function provideWantSignatures() {
+               return [
+                       'Main' => [ NS_MAIN, false ],
+                       'Talk' => [ NS_TALK, true ],
+                       'User' => [ NS_USER, false ],
+                       'User talk' => [ NS_USER_TALK, true ],
+                       'Special' => [ NS_SPECIAL, false ],
+                       'Media' => [ NS_MEDIA, false ],
+                       'Nonexistent talk' => [ 12345, true ],
+                       'Nonexistent subject' => [ 123456, false ],
+                       'Nonexistent negative odd' => [ -12345, false ],
+               ];
        }
 
        /**
-        * Similar to testIsContent() but alters the $wgContentNamespaces
-        * global variable.
-        * @covers NamespaceInfo::isContent
+        * @dataProvider provideWantSignatures_ExtraSignatureNamespaces
+        * @covers NamespaceInfo::wantSignatures
+        *
+        * @param int $index
+        * @param int $expected
         */
-       public function testIsContentAdvanced() {
-               global $wgContentNamespaces;
-
-               // Test that user defined namespace #252 is not content
-               $this->assertIsNotContent( 252 );
-
-               // Bless namespace # 252 as a content namespace
-               $wgContentNamespaces[] = 252;
-
-               $this->assertIsContent( 252 );
-
-               // Makes sure NS_MAIN was not impacted
-               $this->assertIsContent( NS_MAIN );
+       public function testWantSignatures_ExtraSignatureNamespaces( $index, $expected ) {
+               $obj = $this->newObj( [ 'ExtraSignatureNamespaces' =>
+                       [ NS_MAIN, NS_USER, NS_SPECIAL, NS_MEDIA, 123456, -12345 ] ] );
+               $this->assertSame( $expected, $obj->wantSignatures( $index ) );
        }
 
-       private function assertIsWatchable( $ns ) {
-               $this->assertTrue( $this->obj->isWatchable( $ns ) );
-       }
+       public function provideWantSignatures_ExtraSignatureNamespaces() {
+               $ret = array_map(
+                       function ( $arr ) {
+                               // We've added all these as extra signature namespaces, so expect true
+                               return [ $arr[0], true ];
+                       },
+                       self::provideWantSignatures()
+               );
 
-       private function assertIsNotWatchable( $ns ) {
-               $this->assertFalse( $this->obj->isWatchable( $ns ) );
+               // Add one more that's false
+               $ret['Another nonexistent subject'] = [ 12345678, false ];
+               return $ret;
        }
 
        /**
+        * @param int $ns
+        * @param bool $expected
         * @covers NamespaceInfo::isWatchable
+        * @dataProvider provideIsWatchable
         */
-       public function testIsWatchable() {
-               // Specials namespaces are not watchable
-               $this->assertIsNotWatchable( NS_MEDIA );
-               $this->assertIsNotWatchable( NS_SPECIAL );
-
-               // Core defined namespaces are watchables
-               $this->assertIsWatchable( NS_MAIN );
-               $this->assertIsWatchable( NS_TALK );
-
-               // Additional, user defined namespaces are watchables
-               $this->assertIsWatchable( 100 );
-               $this->assertIsWatchable( 101 );
+       public function testIsWatchable( $ns, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->isWatchable( $ns ) );
        }
 
-       private function assertHasSubpages( $ns ) {
-               $this->assertTrue( $this->obj->hasSubpages( $ns ) );
-       }
+       public function provideIsWatchable() {
+               return [
+                       // Specials namespaces are not watchable
+                       [ NS_MEDIA, false ],
+                       [ NS_SPECIAL, false ],
 
-       private function assertHasNotSubpages( $ns ) {
-               $this->assertFalse( $this->obj->hasSubpages( $ns ) );
+                       // Core defined namespaces are watchables
+                       [ NS_MAIN, true ],
+                       [ NS_TALK, true ],
+
+                       // Additional, user defined namespaces are watchables
+                       [ 100, true ],
+                       [ 101, true ],
+               ];
        }
 
        /**
+        * @param int $ns
+        * @param int $expected
+        * @param array|null $namespacesWithSubpages To pass to constructor
         * @covers NamespaceInfo::hasSubpages
+        * @dataProvider provideHasSubpages
         */
-       public function testHasSubpages() {
-               global $wgNamespacesWithSubpages;
-
-               // Special namespaces:
-               $this->assertHasNotSubpages( NS_MEDIA );
-               $this->assertHasNotSubpages( NS_SPECIAL );
-
-               // Namespaces without subpages
-               $this->assertHasNotSubpages( NS_MAIN );
+       public function testHasSubpages( $ns, $expected, array $namespacesWithSubpages = null ) {
+               $obj = $this->newObj( $namespacesWithSubpages
+                       ? [ 'NamespacesWithSubpages' => $namespacesWithSubpages ]
+                       : [] );
+               $this->assertSame( $expected, $obj->hasSubpages( $ns ) );
+       }
 
-               $wgNamespacesWithSubpages[NS_MAIN] = true;
-               $this->assertHasSubpages( NS_MAIN );
+       public function provideHasSubpages() {
+               return [
+                       // Special namespaces:
+                       [ NS_MEDIA, false ],
+                       [ NS_SPECIAL, false ],
 
-               $wgNamespacesWithSubpages[NS_MAIN] = false;
-               $this->assertHasNotSubpages( NS_MAIN );
+                       // Namespaces without subpages
+                       [ NS_MAIN, false ],
+                       [ NS_MAIN, true, [ NS_MAIN => true ] ],
+                       [ NS_MAIN, false, [ NS_MAIN => false ] ],
 
-               // Some namespaces with subpages
-               $this->assertHasSubpages( NS_TALK );
-               $this->assertHasSubpages( NS_USER );
-               $this->assertHasSubpages( NS_USER_TALK );
+                       // Some namespaces with subpages
+                       [ NS_TALK, true ],
+                       [ NS_USER, true ],
+                       [ NS_USER_TALK, true ],
+               ];
        }
 
        /**
+        * @param $contentNamespaces To pass to constructor
+        * @param array $expected
+        * @dataProvider provideGetContentNamespaces
         * @covers NamespaceInfo::getContentNamespaces
         */
-       public function testGetContentNamespaces() {
-               global $wgContentNamespaces;
-
-               $this->assertEquals(
-                       [ NS_MAIN ],
-                       $this->obj->getContentNamespaces(),
-                       '$wgContentNamespaces is an array with only NS_MAIN by default'
-               );
-
-               # test !is_array( $wgcontentNamespaces )
-               $wgContentNamespaces = '';
-               $this->assertEquals( [ NS_MAIN ], $this->obj->getContentNamespaces() );
-
-               $wgContentNamespaces = false;
-               $this->assertEquals( [ NS_MAIN ], $this->obj->getContentNamespaces() );
-
-               $wgContentNamespaces = null;
-               $this->assertEquals( [ NS_MAIN ], $this->obj->getContentNamespaces() );
+       public function testGetContentNamespaces( $contentNamespaces, array $expected ) {
+               $obj = $this->newObj( [ 'ContentNamespaces' => $contentNamespaces ] );
+               $this->assertSame( $expected, $obj->getContentNamespaces() );
+       }
 
-               $wgContentNamespaces = 5;
-               $this->assertEquals( [ NS_MAIN ], $this->obj->getContentNamespaces() );
+       public function provideGetContentNamespaces() {
+               return [
+                       // Non-array
+                       [ '', [ NS_MAIN ] ],
+                       [ false, [ NS_MAIN ] ],
+                       [ null, [ NS_MAIN ] ],
+                       [ 5, [ NS_MAIN ] ],
 
-               # test $wgContentNamespaces === []
-               $wgContentNamespaces = [];
-               $this->assertEquals( [ NS_MAIN ], $this->obj->getContentNamespaces() );
+                       // Empty array
+                       [ [], [ NS_MAIN ] ],
 
-               # test !in_array( NS_MAIN, $wgContentNamespaces )
-               $wgContentNamespaces = [ NS_USER, NS_CATEGORY ];
-               $this->assertEquals(
-                       [ NS_MAIN, NS_USER, NS_CATEGORY ],
-                       $this->obj->getContentNamespaces(),
-                       'NS_MAIN is forced in $wgContentNamespaces even if unwanted'
-               );
+                       // NS_MAIN is forced to be content even if unwanted
+                       [ [ NS_USER, NS_CATEGORY ], [ NS_MAIN, NS_USER, NS_CATEGORY ] ],
 
-               # test other cases, return $wgcontentNamespaces as is
-               $wgContentNamespaces = [ NS_MAIN ];
-               $this->assertEquals(
-                       [ NS_MAIN ],
-                       $this->obj->getContentNamespaces()
-               );
-
-               $wgContentNamespaces = [ NS_MAIN, NS_USER, NS_CATEGORY ];
-               $this->assertEquals(
-                       [ NS_MAIN, NS_USER, NS_CATEGORY ],
-                       $this->obj->getContentNamespaces()
-               );
+                       // In other cases, return as-is
+                       [ [ NS_MAIN ], [ NS_MAIN ] ],
+                       [ [ NS_MAIN, NS_USER, NS_CATEGORY ], [ NS_MAIN, NS_USER, NS_CATEGORY ] ],
+               ];
        }
 
        /**
         * @covers NamespaceInfo::getSubjectNamespaces
         */
        public function testGetSubjectNamespaces() {
-               $subjectsNS = $this->obj->getSubjectNamespaces();
+               $subjectsNS = $this->newObj()->getSubjectNamespaces();
                $this->assertContains( NS_MAIN, $subjectsNS,
                        "Talk namespaces should have NS_MAIN" );
                $this->assertNotContains( NS_TALK, $subjectsNS,
@@ -422,7 +452,7 @@ class NamespaceInfoTest extends MediaWikiTestCase {
         * @covers NamespaceInfo::getTalkNamespaces
         */
        public function testGetTalkNamespaces() {
-               $talkNS = $this->obj->getTalkNamespaces();
+               $talkNS = $this->newObj()->getTalkNamespaces();
                $this->assertContains( NS_TALK, $talkNS,
                        "Subject namespaces should have NS_TALK" );
                $this->assertNotContains( NS_MAIN, $talkNS,
@@ -434,167 +464,870 @@ class NamespaceInfoTest extends MediaWikiTestCase {
                        "Subject namespaces should not have NS_SPECIAL" );
        }
 
-       private function assertIsCapitalized( $ns ) {
-               $this->assertTrue( $this->obj->isCapitalized( $ns ) );
+       /**
+        * @param int $ns
+        * @param bool $expected
+        * @param bool $capitalLinks To pass to constructor
+        * @param array $capitalLinkOverrides To pass to constructor
+        * @dataProvider provideIsCapitalized
+        * @covers NamespaceInfo::isCapitalized
+        */
+       public function testIsCapitalized(
+               $ns, $expected, $capitalLinks = true, array $capitalLinkOverrides = []
+       ) {
+               $obj = $this->newObj( [
+                       'CapitalLinks' => $capitalLinks,
+                       'CapitalLinkOverrides' => $capitalLinkOverrides,
+               ] );
+               $this->assertSame( $expected, $obj->isCapitalized( $ns ) );
        }
 
-       private function assertIsNotCapitalized( $ns ) {
-               $this->assertFalse( $this->obj->isCapitalized( $ns ) );
+       public function provideIsCapitalized() {
+               return [
+                       // Test default settings
+                       [ NS_PROJECT, true ],
+                       [ NS_PROJECT_TALK, true ],
+                       [ NS_MEDIA, true ],
+                       [ NS_FILE, true ],
+
+                       // Always capitalized no matter what
+                       [ NS_SPECIAL, true, false ],
+                       [ NS_USER, true, false ],
+                       [ NS_MEDIAWIKI, true, false ],
+
+                       // Even with an override too
+                       [ NS_SPECIAL, true, false, [ NS_SPECIAL => false ] ],
+                       [ NS_USER, true, false, [ NS_USER => false ] ],
+                       [ NS_MEDIAWIKI, true, false, [ NS_MEDIAWIKI => false ] ],
+
+                       // Overrides work for other namespaces
+                       [ NS_PROJECT, false, true, [ NS_PROJECT => false ] ],
+                       [ NS_PROJECT, true, false, [ NS_PROJECT => true ] ],
+
+                       // NS_MEDIA is treated like NS_FILE, and ignores NS_MEDIA overrides
+                       [ NS_MEDIA, false, true, [ NS_FILE => false, NS_MEDIA => true ] ],
+                       [ NS_MEDIA, true, false, [ NS_FILE => true, NS_MEDIA => false ] ],
+                       [ NS_FILE, false, true, [ NS_FILE => false, NS_MEDIA => true ] ],
+                       [ NS_FILE, true, false, [ NS_FILE => true, NS_MEDIA => false ] ],
+               ];
        }
 
        /**
-        * Some namespaces are always capitalized per code definition
-        * in NamespaceInfo::$alwaysCapitalizedNamespaces
-        * @covers NamespaceInfo::isCapitalized
+        * @covers NamespaceInfo::hasGenderDistinction
         */
-       public function testIsCapitalizedHardcodedAssertions() {
-               // NS_MEDIA and NS_FILE are treated the same
-               $this->assertEquals(
-                       $this->obj->isCapitalized( NS_MEDIA ),
-                       $this->obj->isCapitalized( NS_FILE ),
-                       'NS_MEDIA and NS_FILE have same capitalization rendering'
-               );
+       public function testHasGenderDistinction() {
+               $obj = $this->newObj();
 
-               // Boths are capitalized by default
-               $this->assertIsCapitalized( NS_MEDIA );
-               $this->assertIsCapitalized( NS_FILE );
+               // Namespaces with gender distinctions
+               $this->assertTrue( $obj->hasGenderDistinction( NS_USER ) );
+               $this->assertTrue( $obj->hasGenderDistinction( NS_USER_TALK ) );
+
+               // Other ones, "genderless"
+               $this->assertFalse( $obj->hasGenderDistinction( NS_MEDIA ) );
+               $this->assertFalse( $obj->hasGenderDistinction( NS_SPECIAL ) );
+               $this->assertFalse( $obj->hasGenderDistinction( NS_MAIN ) );
+               $this->assertFalse( $obj->hasGenderDistinction( NS_TALK ) );
+       }
 
-               // Always capitalized namespaces
-               // @see NamespaceInfo::$alwaysCapitalizedNamespaces
-               $this->assertIsCapitalized( NS_SPECIAL );
-               $this->assertIsCapitalized( NS_USER );
-               $this->assertIsCapitalized( NS_MEDIAWIKI );
+       /**
+        * @covers NamespaceInfo::isNonincludable
+        */
+       public function testIsNonincludable() {
+               $obj = $this->newObj( [ 'NonincludableNamespaces' => [ NS_USER ] ] );
+               $this->assertTrue( $obj->isNonincludable( NS_USER ) );
+               $this->assertFalse( $obj->isNonincludable( NS_TEMPLATE ) );
        }
 
        /**
-        * Follows up for testIsCapitalizedHardcodedAssertions() but alter the
-        * global $wgCapitalLink setting to have extended coverage.
+        * @dataProvider provideGetNamespaceContentModel
+        * @covers NamespaceInfo::getNamespaceContentModel
         *
-        * NamespaceInfo::isCapitalized() rely on two global settings:
-        *   $wgCapitalLinkOverrides = []; by default
-        *   $wgCapitalLinks = true; by default
-        * This function test $wgCapitalLinks
+        * @param int $ns
+        * @param string $expected
+        */
+       public function testGetNamespaceContentModel( $ns, $expected ) {
+               $obj = $this->newObj( [ 'NamespaceContentModels' =>
+                       [ NS_USER => CONTENT_MODEL_WIKITEXT, 123 => CONTENT_MODEL_JSON, 1234 => 'abcdef' ],
+               ] );
+               $this->assertSame( $expected, $obj->getNamespaceContentModel( $ns ) );
+       }
+
+       public function provideGetNamespaceContentModel() {
+               return [
+                       [ NS_MAIN, null ],
+                       [ NS_TALK, null ],
+                       [ NS_USER, CONTENT_MODEL_WIKITEXT ],
+                       [ NS_USER_TALK, null ],
+                       [ NS_SPECIAL, null ],
+                       [ 122, null ],
+                       [ 123, CONTENT_MODEL_JSON ],
+                       [ 1234, 'abcdef' ],
+                       [ 1235, null ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideGetCategoryLinkType
+        * @covers NamespaceInfo::getCategoryLinkType
         *
-        * Global setting correctness is tested against the NS_PROJECT and
-        * NS_PROJECT_TALK namespaces since they are not hardcoded nor specials
-        * @covers NamespaceInfo::isCapitalized
+        * @param int $ns
+        * @param string $expected
         */
-       public function testIsCapitalizedWithWgCapitalLinks() {
-               $this->assertIsCapitalized( NS_PROJECT );
-               $this->assertIsCapitalized( NS_PROJECT_TALK );
+       public function testGetCategoryLinkType( $ns, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->getCategoryLinkType( $ns ) );
+       }
 
-               $this->setMwGlobals( 'wgCapitalLinks', false );
+       public function provideGetCategoryLinkType() {
+               return [
+                       [ NS_MAIN, 'page' ],
+                       [ NS_TALK, 'page' ],
+                       [ NS_USER, 'page' ],
+                       [ NS_USER_TALK, 'page' ],
+
+                       [ NS_FILE, 'file' ],
+                       [ NS_FILE_TALK, 'page' ],
 
-               // hardcoded namespaces (see above function) are still capitalized:
-               $this->assertIsCapitalized( NS_SPECIAL );
-               $this->assertIsCapitalized( NS_USER );
-               $this->assertIsCapitalized( NS_MEDIAWIKI );
+                       [ NS_CATEGORY, 'subcat' ],
+                       [ NS_CATEGORY_TALK, 'page' ],
 
-               // setting is correctly applied
-               $this->assertIsNotCapitalized( NS_PROJECT );
-               $this->assertIsNotCapitalized( NS_PROJECT_TALK );
+                       [ 100, 'page' ],
+                       [ 101, 'page' ],
+               ];
        }
 
+       // %} End basic methods
+
+       /**********************************************************************************************
+        * getSubject/Talk/Associated
+        * %{
+        */
        /**
-        * Counter part for NamespaceInfo::testIsCapitalizedWithWgCapitalLinks() now
-        * testing the $wgCapitalLinkOverrides global.
+        * @dataProvider provideSubjectTalk
+        * @covers NamespaceInfo::getSubject
+        * @covers NamespaceInfo::getSubjectPage
+        * @covers NamespaceInfo::isMethodValidFor
+        * @covers Title::getSubjectPage
         *
-        * @todo split groups of assertions in autonomous testing functions
-        * @covers NamespaceInfo::isCapitalized
+        * @param int $subject
+        * @param int $talk
         */
-       public function testIsCapitalizedWithWgCapitalLinkOverrides() {
-               global $wgCapitalLinkOverrides;
+       public function testGetSubject( $subject, $talk ) {
+               $obj = $this->newObj();
+               $this->assertSame( $subject, $obj->getSubject( $subject ) );
+               $this->assertSame( $subject, $obj->getSubject( $talk ) );
+
+               $subjectTitleVal = new TitleValue( $subject, 'A' );
+               $talkTitleVal = new TitleValue( $talk, 'A' );
+               // Object will be the same one passed in if it's a subject, different but equal object if
+               // it's talk
+               $this->assertSame( $subjectTitleVal, $obj->getSubjectPage( $subjectTitleVal ) );
+               $this->assertEquals( $subjectTitleVal, $obj->getSubjectPage( $talkTitleVal ) );
+
+               $subjectTitle = Title::makeTitle( $subject, 'A' );
+               $talkTitle = Title::makeTitle( $talk, 'A' );
+               $this->assertSame( $subjectTitle, $subjectTitle->getSubjectPage() );
+               $this->assertEquals( $subjectTitle, $talkTitle->getSubjectPage() );
+       }
 
-               // Test default settings
-               $this->assertIsCapitalized( NS_PROJECT );
-               $this->assertIsCapitalized( NS_PROJECT_TALK );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getSubject
+        * @covers NamespaceInfo::getSubjectPage
+        *
+        * @param int $ns
+        */
+       public function testGetSubject_special( $ns ) {
+               $obj = $this->newObj();
+               $this->assertSame( $ns, $obj->getSubject( $ns ) );
 
-               // hardcoded namespaces (see above function) are capitalized:
-               $this->assertIsCapitalized( NS_SPECIAL );
-               $this->assertIsCapitalized( NS_USER );
-               $this->assertIsCapitalized( NS_MEDIAWIKI );
+               $title = new TitleValue( $ns, 'A' );
+               $this->assertSame( $title, $obj->getSubjectPage( $title ) );
+       }
 
-               // Hardcoded namespaces remains capitalized
-               $wgCapitalLinkOverrides[NS_SPECIAL] = false;
-               $wgCapitalLinkOverrides[NS_USER] = false;
-               $wgCapitalLinkOverrides[NS_MEDIAWIKI] = false;
+       /**
+        * @dataProvider provideSubjectTalk
+        * @covers NamespaceInfo::getTalk
+        * @covers NamespaceInfo::getTalkPage
+        * @covers NamespaceInfo::isMethodValidFor
+        * @covers Title::getTalkPage
+        *
+        * @param int $subject
+        * @param int $talk
+        */
+       public function testGetTalk( $subject, $talk ) {
+               $obj = $this->newObj();
+               $this->assertSame( $talk, $obj->getTalk( $subject ) );
+               $this->assertSame( $talk, $obj->getTalk( $talk ) );
+
+               $subjectTitleVal = new TitleValue( $subject, 'A' );
+               $talkTitleVal = new TitleValue( $talk, 'A' );
+               // Object will be the same one passed in if it's a talk, different but equal object if it's
+               // subject
+               $this->assertEquals( $talkTitleVal, $obj->getTalkPage( $subjectTitleVal ) );
+               $this->assertSame( $talkTitleVal, $obj->getTalkPage( $talkTitleVal ) );
+
+               $subjectTitle = Title::makeTitle( $subject, 'A' );
+               $talkTitle = Title::makeTitle( $talk, 'A' );
+               $this->assertEquals( $talkTitle, $subjectTitle->getTalkPage() );
+               $this->assertSame( $talkTitle, $talkTitle->getTalkPage() );
+       }
 
-               $this->assertIsCapitalized( NS_SPECIAL );
-               $this->assertIsCapitalized( NS_USER );
-               $this->assertIsCapitalized( NS_MEDIAWIKI );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getTalk
+        * @covers NamespaceInfo::isMethodValidFor
+        *
+        * @param int $ns
+        */
+       public function testGetTalk_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getTalk does not make any sense for given namespace $ns" );
+               $this->newObj()->getTalk( $ns );
+       }
 
-               $wgCapitalLinkOverrides[NS_PROJECT] = false;
-               $this->assertIsNotCapitalized( NS_PROJECT );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getTalk
+        * @covers NamespaceInfo::getTalkPage
+        * @covers NamespaceInfo::isMethodValidFor
+        *
+        * @param int $ns
+        */
+       public function testGetTalkPage_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getTalk does not make any sense for given namespace $ns" );
+               $this->newObj()->getTalkPage( new TitleValue( $ns, 'A' ) );
+       }
 
-               $wgCapitalLinkOverrides[NS_PROJECT] = true;
-               $this->assertIsCapitalized( NS_PROJECT );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getTalk
+        * @covers NamespaceInfo::getTalkPage
+        * @covers NamespaceInfo::isMethodValidFor
+        * @covers Title::getTalkPage
+        *
+        * @param int $ns
+        */
+       public function testTitleGetTalkPage_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getTalk does not make any sense for given namespace $ns" );
+               Title::makeTitle( $ns, 'A' )->getTalkPage();
+       }
 
-               unset( $wgCapitalLinkOverrides[NS_PROJECT] );
-               $this->assertIsCapitalized( NS_PROJECT );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getAssociated
+        * @covers NamespaceInfo::isMethodValidFor
+        *
+        * @param int $ns
+        */
+       public function testGetAssociated_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getAssociated does not make any sense for given namespace $ns" );
+               $this->newObj()->getAssociated( $ns );
        }
 
        /**
-        * @covers NamespaceInfo::hasGenderDistinction
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getAssociated
+        * @covers NamespaceInfo::getAssociatedPage
+        * @covers NamespaceInfo::isMethodValidFor
+        *
+        * @param int $ns
         */
-       public function testHasGenderDistinction() {
-               // Namespaces with gender distinctions
-               $this->assertTrue( $this->obj->hasGenderDistinction( NS_USER ) );
-               $this->assertTrue( $this->obj->hasGenderDistinction( NS_USER_TALK ) );
+       public function testGetAssociatedPage_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getAssociated does not make any sense for given namespace $ns" );
+               $this->newObj()->getAssociatedPage( new TitleValue( $ns, 'A' ) );
+       }
 
-               // Other ones, "genderless"
-               $this->assertFalse( $this->obj->hasGenderDistinction( NS_MEDIA ) );
-               $this->assertFalse( $this->obj->hasGenderDistinction( NS_SPECIAL ) );
-               $this->assertFalse( $this->obj->hasGenderDistinction( NS_MAIN ) );
-               $this->assertFalse( $this->obj->hasGenderDistinction( NS_TALK ) );
+       /**
+        * @dataProvider provideSpecialNamespaces
+        * @covers NamespaceInfo::getAssociated
+        * @covers NamespaceInfo::getAssociatedPage
+        * @covers NamespaceInfo::isMethodValidFor
+        * @covers Title::getOtherPage
+        *
+        * @param int $ns
+        */
+       public function testTitleGetOtherPage_special( $ns ) {
+               $this->setExpectedException( MWException::class,
+                       "NamespaceInfo::getAssociated does not make any sense for given namespace $ns" );
+               Title::makeTitle( $ns, 'A' )->getOtherPage();
        }
 
        /**
-        * @covers NamespaceInfo::isNonincludable
+        * @dataProvider provideSubjectTalk
+        * @covers NamespaceInfo::getAssociated
+        * @covers NamespaceInfo::getAssociatedPage
+        * @covers Title::getOtherPage
+        *
+        * @param int $subject
+        * @param int $talk
         */
-       public function testIsNonincludable() {
-               global $wgNonincludableNamespaces;
+       public function testGetAssociated( $subject, $talk ) {
+               $obj = $this->newObj();
+               $this->assertSame( $talk, $obj->getAssociated( $subject ) );
+               $this->assertSame( $subject, $obj->getAssociated( $talk ) );
+
+               $subjectTitle = new TitleValue( $subject, 'A' );
+               $talkTitle = new TitleValue( $talk, 'A' );
+               // Object will not be the same
+               $this->assertEquals( $talkTitle, $obj->getAssociatedPage( $subjectTitle ) );
+               $this->assertEquals( $subjectTitle, $obj->getAssociatedPage( $talkTitle ) );
+
+               $subjectTitle = Title::makeTitle( $subject, 'A' );
+               $talkTitle = Title::makeTitle( $talk, 'A' );
+               $this->assertEquals( $talkTitle, $subjectTitle->getOtherPage() );
+               $this->assertEquals( $subjectTitle, $talkTitle->getOtherPage() );
+       }
+
+       public static function provideSubjectTalk() {
+               return [
+                       // Format: [ subject, talk ]
+                       'Main/talk' => [ NS_MAIN, NS_TALK ],
+                       'User/user talk' => [ NS_USER, NS_USER_TALK ],
+                       'Unknown namespaces also supported' => [ 106, 107 ],
+               ];
+       }
+
+       public static function provideSpecialNamespaces() {
+               return [
+                       'Special' => [ NS_SPECIAL ],
+                       'Media' => [ NS_MEDIA ],
+                       'Unknown negative index' => [ -613 ],
+               ];
+       }
 
-               $wgNonincludableNamespaces = [ NS_USER ];
+       // %} End getSubject/Talk/Associated
 
-               $this->assertTrue( $this->obj->isNonincludable( NS_USER ) );
-               $this->assertFalse( $this->obj->isNonincludable( NS_TEMPLATE ) );
+       /**********************************************************************************************
+        * Canonical namespaces
+        * %{
+        */
+
+       // Default canonical namespaces
+       // %{
+       private function getDefaultNamespaces() {
+               return [ NS_MAIN => '' ] + self::$defaultOptions['CanonicalNamespaceNames'];
        }
 
-       private function assertSameSubject( $ns1, $ns2, $msg = '' ) {
-               $this->assertTrue( $this->obj->subjectEquals( $ns1, $ns2 ), $msg );
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces() {
+               $this->assertSame(
+                       $this->getDefaultNamespaces(),
+                       $this->newObj()->getCanonicalNamespaces()
+               );
        }
 
-       private function assertDifferentSubject( $ns1, $ns2, $msg = '' ) {
-               $this->assertFalse( $this->obj->subjectEquals( $ns1, $ns2 ), $msg );
+       /**
+        * @dataProvider provideGetCanonicalName
+        * @covers NamespaceInfo::getCanonicalName
+        *
+        * @param int $index
+        * @param string|bool $expected
+        */
+       public function testGetCanonicalName( $index, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->getCanonicalName( $index ) );
        }
 
-       public function provideGetCategoryLinkType() {
+       public function provideGetCanonicalName() {
                return [
-                       [ NS_MAIN, 'page' ],
-                       [ NS_TALK, 'page' ],
-                       [ NS_USER, 'page' ],
-                       [ NS_USER_TALK, 'page' ],
+                       'Main' => [ NS_MAIN, '' ],
+                       'Talk' => [ NS_TALK, 'Talk' ],
+                       'With underscore not space' => [ NS_USER_TALK, 'User_talk' ],
+                       'Special' => [ NS_SPECIAL, 'Special' ],
+                       'Nonexistent' => [ 12345, false ],
+                       'Nonexistent negative' => [ -12345, false ],
+               ];
+       }
 
-                       [ NS_FILE, 'file' ],
-                       [ NS_FILE_TALK, 'page' ],
+       /**
+        * @dataProvider provideGetCanonicalIndex
+        * @covers NamespaceInfo::getCanonicalIndex
+        *
+        * @param string $name
+        * @param int|null $expected
+        */
+       public function testGetCanonicalIndex( $name, $expected ) {
+               $this->assertSame( $expected, $this->newObj()->getCanonicalIndex( $name ) );
+       }
 
-                       [ NS_CATEGORY, 'subcat' ],
-                       [ NS_CATEGORY_TALK, 'page' ],
+       public function provideGetCanonicalIndex() {
+               return [
+                       'Main' => [ '', NS_MAIN ],
+                       'Talk' => [ 'talk', NS_TALK ],
+                       'Not lowercase' => [ 'Talk', null ],
+                       'With underscore' => [ 'user_talk', NS_USER_TALK ],
+                       'Space is not recognized for underscore' => [ 'user talk', null ],
+                       '0' => [ '0', null ],
+               ];
+       }
 
-                       [ 100, 'page' ],
-                       [ 101, 'page' ],
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces() {
+               $this->assertSame(
+                       [ NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK ],
+                       $this->newObj()->getValidNamespaces()
+               );
+       }
+
+       // %} End default canonical namespaces
+
+       // No canonical namespace names
+       // %{
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces_NoCanonicalNamespaceNames() {
+               $obj = $this->newObj( [ 'CanonicalNamespaceNames' => [] ] );
+
+               $this->assertSame( [ NS_MAIN => '' ], $obj->getCanonicalNamespaces() );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalName
+        */
+       public function testGetCanonicalName_NoCanonicalNamespaceNames() {
+               $obj = $this->newObj( [ 'CanonicalNamespaceNames' => [] ] );
+
+               $this->assertSame( '', $obj->getCanonicalName( NS_MAIN ) );
+               $this->assertFalse( $obj->getCanonicalName( NS_TALK ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalIndex
+        */
+       public function testGetCanonicalIndex_NoCanonicalNamespaceNames() {
+               $obj = $this->newObj( [ 'CanonicalNamespaceNames' => [] ] );
+
+               $this->assertSame( NS_MAIN, $obj->getCanonicalIndex( '' ) );
+               $this->assertNull( $obj->getCanonicalIndex( 'talk' ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces_NoCanonicalNamespaceNames() {
+               $obj = $this->newObj( [ 'CanonicalNamespaceNames' => [] ] );
+
+               $this->assertSame( [ NS_MAIN ], $obj->getValidNamespaces() );
+       }
+
+       // %} End no canonical namespace names
+
+       // Test extension namespaces
+       // %{
+       private function setupExtensionNamespaces() {
+               $this->scopedCallback = null;
+               $this->scopedCallback = ExtensionRegistry::getInstance()->setAttributeForTest(
+                       'ExtensionNamespaces',
+                       [ NS_MAIN => 'No effect', NS_TALK => 'No effect', 12345 => 'Extended' ]
+               );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces_ExtensionNamespaces() {
+               $this->setupExtensionNamespaces();
+
+               $this->assertSame(
+                       $this->getDefaultNamespaces() + [ 12345 => 'Extended' ],
+                       $this->newObj()->getCanonicalNamespaces()
+               );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalName
+        */
+       public function testGetCanonicalName_ExtensionNamespaces() {
+               $this->setupExtensionNamespaces();
+               $obj = $this->newObj();
+
+               $this->assertSame( '', $obj->getCanonicalName( NS_MAIN ) );
+               $this->assertSame( 'Talk', $obj->getCanonicalName( NS_TALK ) );
+               $this->assertSame( 'Extended', $obj->getCanonicalName( 12345 ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalIndex
+        */
+       public function testGetCanonicalIndex_ExtensionNamespaces() {
+               $this->setupExtensionNamespaces();
+               $obj = $this->newObj();
+
+               $this->assertSame( NS_MAIN, $obj->getCanonicalIndex( '' ) );
+               $this->assertSame( NS_TALK, $obj->getCanonicalIndex( 'talk' ) );
+               $this->assertSame( 12345, $obj->getCanonicalIndex( 'extended' ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces_ExtensionNamespaces() {
+               $this->setupExtensionNamespaces();
+
+               $this->assertSame(
+                       [ NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK, 12345 ],
+                       $this->newObj()->getValidNamespaces()
+               );
+       }
+
+       // %} End extension namespaces
+
+       // Hook namespaces
+       // %{
+       /**
+        * @return array Expected canonical namespaces
+        */
+       private function setupHookNamespaces() {
+               $callback =
+                       function ( &$canonicalNamespaces ) {
+                               $canonicalNamespaces[NS_MAIN] = 'Main';
+                               unset( $canonicalNamespaces[NS_MEDIA] );
+                               $canonicalNamespaces[123456] = 'Hooked';
+                       };
+               $this->setTemporaryHook( 'CanonicalNamespaces', $callback );
+               $expected = $this->getDefaultNamespaces();
+               ( $callback )( $expected );
+               return $expected;
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces_HookNamespaces() {
+               $expected = $this->setupHookNamespaces();
+
+               $this->assertSame( $expected, $this->newObj()->getCanonicalNamespaces() );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalName
+        */
+       public function testGetCanonicalName_HookNamespaces() {
+               $this->setupHookNamespaces();
+               $obj = $this->newObj();
+
+               $this->assertSame( 'Main', $obj->getCanonicalName( NS_MAIN ) );
+               $this->assertFalse( $obj->getCanonicalName( NS_MEDIA ) );
+               $this->assertSame( 'Hooked', $obj->getCanonicalName( 123456 ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalIndex
+        */
+       public function testGetCanonicalIndex_HookNamespaces() {
+               $this->setupHookNamespaces();
+               $obj = $this->newObj();
+
+               $this->assertSame( NS_MAIN, $obj->getCanonicalIndex( 'main' ) );
+               $this->assertNull( $obj->getCanonicalIndex( 'media' ) );
+               $this->assertSame( 123456, $obj->getCanonicalIndex( 'hooked' ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces_HookNamespaces() {
+               $this->setupHookNamespaces();
+
+               $this->assertSame(
+                       [ NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK, 123456 ],
+                       $this->newObj()->getValidNamespaces()
+               );
+       }
+
+       // %} End hook namespaces
+
+       // Extra namespaces
+       // %{
+       /**
+        * @return NamespaceInfo
+        */
+       private function setupExtraNamespaces() {
+               return $this->newObj( [ 'ExtraNamespaces' =>
+                       [ NS_MAIN => 'No effect', NS_TALK => 'No effect', 1234567 => 'Extra' ]
+               ] );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces_ExtraNamespaces() {
+               $this->assertSame(
+                       $this->getDefaultNamespaces() + [ 1234567 => 'Extra' ],
+                       $this->setupExtraNamespaces()->getCanonicalNamespaces()
+               );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalName
+        */
+       public function testGetCanonicalName_ExtraNamespaces() {
+               $obj = $this->setupExtraNamespaces();
+
+               $this->assertSame( '', $obj->getCanonicalName( NS_MAIN ) );
+               $this->assertSame( 'Talk', $obj->getCanonicalName( NS_TALK ) );
+               $this->assertSame( 'Extra', $obj->getCanonicalName( 1234567 ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalIndex
+        */
+       public function testGetCanonicalIndex_ExtraNamespaces() {
+               $obj = $this->setupExtraNamespaces();
+
+               $this->assertNull( $obj->getCanonicalIndex( 'no effect' ) );
+               $this->assertNull( $obj->getCanonicalIndex( 'no_effect' ) );
+               $this->assertSame( 1234567, $obj->getCanonicalIndex( 'extra' ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces_ExtraNamespaces() {
+               $this->assertSame(
+                       [ NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK, 1234567 ],
+                       $this->setupExtraNamespaces()->getValidNamespaces()
+               );
+       }
+
+       // %} End extra namespaces
+
+       // Canonical namespace caching
+       // %{
+       /**
+        * @covers NamespaceInfo::getCanonicalNamespaces
+        */
+       public function testGetCanonicalNamespaces_caching() {
+               $obj = $this->newObj();
+
+               // This should cache the values
+               $obj->getCanonicalNamespaces();
+
+               // Now try to alter them through nefarious means
+               $this->setupExtensionNamespaces();
+               $this->setupHookNamespaces();
+
+               // Should have no effect
+               $this->assertSame( $this->getDefaultNamespaces(), $obj->getCanonicalNamespaces() );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalName
+        */
+       public function testGetCanonicalName_caching() {
+               $obj = $this->newObj();
+
+               // This should cache the values
+               $obj->getCanonicalName( NS_MAIN );
+
+               // Now try to alter them through nefarious means
+               $this->setupExtensionNamespaces();
+               $this->setupHookNamespaces();
+
+               // Should have no effect
+               $this->assertSame( '', $obj->getCanonicalName( NS_MAIN ) );
+               $this->assertSame( 'Media', $obj->getCanonicalName( NS_MEDIA ) );
+               $this->assertFalse( $obj->getCanonicalName( 12345 ) );
+               $this->assertFalse( $obj->getCanonicalName( 123456 ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getCanonicalIndex
+        */
+       public function testGetCanonicalIndex_caching() {
+               $obj = $this->newObj();
+
+               // This should cache the values
+               $obj->getCanonicalIndex( '' );
+
+               // Now try to alter them through nefarious means
+               $this->setupExtensionNamespaces();
+               $this->setupHookNamespaces();
+
+               // Should have no effect
+               $this->assertSame( NS_MAIN, $obj->getCanonicalIndex( '' ) );
+               $this->assertSame( NS_MEDIA, $obj->getCanonicalIndex( 'media' ) );
+               $this->assertNull( $obj->getCanonicalIndex( 'extended' ) );
+               $this->assertNull( $obj->getCanonicalIndex( 'hooked' ) );
+       }
+
+       /**
+        * @covers NamespaceInfo::getValidNamespaces
+        */
+       public function testGetValidNamespaces_caching() {
+               $obj = $this->newObj();
+
+               // This should cache the values
+               $obj->getValidNamespaces();
+
+               // Now try to alter through nefarious means
+               $this->setupExtensionNamespaces();
+               $this->setupHookNamespaces();
+
+               // Should have no effect
+               $this->assertSame(
+                       [ NS_MAIN, NS_TALK, NS_USER, NS_USER_TALK ],
+                       $obj->getValidNamespaces()
+               );
+       }
+
+       // %} End canonical namespace caching
+
+       // Miscellaneous
+       // %{
+
+       /**
+        * @dataProvider provideGetValidNamespaces_misc
+        * @covers NamespaceInfo::getValidNamespaces
+        *
+        * @param array $namespaces List of namespace indices to return from getCanonicalNamespaces()
+        *   (list is overwritten by a hook, so NS_MAIN doesn't have to be present)
+        * @param array $expected
+        */
+       public function testGetValidNamespaces_misc( array $namespaces, array $expected ) {
+               // Each namespace's name is just its index
+               $this->setTemporaryHook( 'CanonicalNamespaces',
+                       function ( &$canonicalNamespaces ) use ( $namespaces ) {
+                               $canonicalNamespaces = array_combine( $namespaces, $namespaces );
+                       }
+               );
+               $this->assertSame( $expected, $this->newObj()->getValidNamespaces() );
+       }
+
+       public function provideGetValidNamespaces_misc() {
+               return [
+                       'Out of order (T109137)' => [ [ 1, 0 ], [ 0, 1 ] ],
+                       'Alphabetical order' => [ [ 10, 2 ], [ 2, 10 ] ],
+                       'Negative' => [ [ -1000, -500, -2, 0 ], [ 0 ] ],
                ];
        }
 
+       // %} End miscellaneous
+       // %} End canonical namespaces
+
+       /**********************************************************************************************
+        * Restriction levels
+        * %{
+        */
+
+       /**
+        * This mock user can only have isAllowed() called on it.
+        *
+        * @param array $groups Groups for the mock user to have
+        * @return User
+        */
+       private function getMockUser( array $groups = [] ) : User {
+               $groups[] = '*';
+
+               $mock = $this->createMock( User::class );
+               $mock->method( 'isAllowed' )->will( $this->returnCallback(
+                       function ( $action ) use ( $groups ) {
+                               global $wgGroupPermissions, $wgRevokePermissions;
+                               if ( $action == '' ) {
+                                       return true;
+                               }
+                               foreach ( $wgRevokePermissions as $group => $rights ) {
+                                       if ( !in_array( $group, $groups ) ) {
+                                               continue;
+                                       }
+                                       if ( isset( $rights[$action] ) && $rights[$action] ) {
+                                               return false;
+                                       }
+                               }
+                               foreach ( $wgGroupPermissions as $group => $rights ) {
+                                       if ( !in_array( $group, $groups ) ) {
+                                               continue;
+                                       }
+                                       if ( isset( $rights[$action] ) && $rights[$action] ) {
+                                               return true;
+                                       }
+                               }
+                               return false;
+                       }
+               ) );
+               $mock->expects( $this->never() )->method( $this->anythingBut( 'isAllowed' ) );
+               return $mock;
+       }
+
        /**
-        * @dataProvider provideGetCategoryLinkType
-        * @covers NamespaceInfo::getCategoryLinkType
+        * @dataProvider provideGetRestrictionLevels
+        * @covers NamespaceInfo::getRestrictionLevels
         *
-        * @param int $index
-        * @param string $expected
+        * @param array $expected
+        * @param int $ns
+        * @param User|null $user
         */
-       public function testGetCategoryLinkType( $index, $expected ) {
-               $actual = $this->obj->getCategoryLinkType( $index );
-               $this->assertSame( $expected, $actual, "NS $index" );
+       public function testGetRestrictionLevels( array $expected, $ns, User $user = null ) {
+               $this->setMwGlobals( [
+                       'wgGroupPermissions' => [
+                               '*' => [ 'edit' => true ],
+                               'autoconfirmed' => [ 'editsemiprotected' => true ],
+                               'sysop' => [
+                                       'editsemiprotected' => true,
+                                       'editprotected' => true,
+                               ],
+                               'privileged' => [ 'privileged' => true ],
+                       ],
+                       'wgRevokePermissions' => [
+                               'noeditsemiprotected' => [ 'editsemiprotected' => true ],
+                       ],
+               ] );
+               $obj = $this->newObj( [
+                       'NamespaceProtection' => [
+                               NS_MAIN => 'autoconfirmed',
+                               NS_USER => 'sysop',
+                               101 => [ 'editsemiprotected', 'privileged' ],
+                       ],
+               ] );
+               $this->assertSame( $expected, $obj->getRestrictionLevels( $ns, $user ) );
        }
+
+       public function provideGetRestrictionLevels() {
+               return [
+                       'No namespace restriction' => [ [ '', 'autoconfirmed', 'sysop' ], NS_TALK ],
+                       'Restricted to autoconfirmed' => [ [ '', 'sysop' ], NS_MAIN ],
+                       'Restricted to sysop' => [ [ '' ], NS_USER ],
+                       // @todo Bug -- 'sysop' protection should be allowed in this case. Someone who's
+                       // autoconfirmed and also privileged can edit this namespace, and would be blocked by
+                       // the sysop protection.
+                       'Restricted to someone in two groups' => [ [ '' ], 101 ],
+
+                       'No special permissions' => [ [ '' ], NS_TALK, $this->getMockUser() ],
+                       'autoconfirmed' => [
+                               [ '', 'autoconfirmed' ],
+                               NS_TALK,
+                               $this->getMockUser( [ 'autoconfirmed' ] )
+                       ],
+                       'autoconfirmed revoked' => [
+                               [ '' ],
+                               NS_TALK,
+                               $this->getMockUser( [ 'autoconfirmed', 'noeditsemiprotected' ] )
+                       ],
+                       'sysop' => [
+                               [ '', 'autoconfirmed', 'sysop' ],
+                               NS_TALK,
+                               $this->getMockUser( [ 'sysop' ] )
+                       ],
+                       'sysop with autoconfirmed revoked (a bit silly)' => [
+                               [ '', 'sysop' ],
+                               NS_TALK,
+                               $this->getMockUser( [ 'sysop', 'noeditsemiprotected' ] )
+                       ],
+               ];
+       }
+
+       // %} End restriction levels
 }
+
+/**
+ * For really cool vim folding this needs to be at the end:
+ * vim: foldmarker=%{,%} foldmethod=marker
+ */
index d41a1f8..48c8a95 100644 (file)
@@ -28,7 +28,7 @@ class UserTest extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgGroupPermissions' => [],
                        'wgRevokePermissions' => [],
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
                $this->overrideMwServices();
 
@@ -504,20 +504,24 @@ class UserTest extends MediaWikiTestCase {
        }
 
        /**
+        * @covers User::isRegistered
         * @covers User::isLoggedIn
         * @covers User::isAnon
         */
        public function testLoggedIn() {
                $user = $this->getMutableTestUser()->getUser();
+               $this->assertTrue( $user->isRegistered() );
                $this->assertTrue( $user->isLoggedIn() );
                $this->assertFalse( $user->isAnon() );
 
                // Non-existent users are perceived as anonymous
                $user = User::newFromName( 'UTNonexistent' );
+               $this->assertFalse( $user->isRegistered() );
                $this->assertFalse( $user->isLoggedIn() );
                $this->assertTrue( $user->isAnon() );
 
                $user = new User;
+               $this->assertFalse( $user->isRegistered() );
                $this->assertFalse( $user->isLoggedIn() );
                $this->assertTrue( $user->isAnon() );
        }
@@ -617,7 +621,7 @@ class UserTest extends MediaWikiTestCase {
 
                // Confirm that the block has been applied as required.
                $this->assertTrue( $user1->isLoggedIn() );
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $block->getId() );
@@ -638,7 +642,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertNotEquals( $user1->getToken(), $user2->getToken() );
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertTrue( $user2->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user2->getBlock() );
                // Non-strict type-check.
                $this->assertEquals( true, $user2->getBlock()->isAutoblocking(), 'Autoblock does not work' );
                // Can't directly compare the objects because of member type differences.
@@ -654,7 +658,7 @@ class UserTest extends MediaWikiTestCase {
                $user3 = User::newFromSession( $request3 );
                $user3->load();
                $this->assertTrue( $user3->isLoggedIn() );
-               $this->assertTrue( $user3->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user3->getBlock() );
                $this->assertEquals( true, $user3->getBlock()->isAutoblocking() ); // Non-strict type-check.
 
                // Clean up.
@@ -694,7 +698,7 @@ class UserTest extends MediaWikiTestCase {
 
                // 2. Test that the cookie IS NOT present.
                $this->assertTrue( $user->isLoggedIn() );
-               $this->assertTrue( $user->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $user->getBlockId() );
@@ -739,7 +743,7 @@ class UserTest extends MediaWikiTestCase {
 
                // 2. Test the cookie's expiry timestamp.
                $this->assertTrue( $user1->isLoggedIn() );
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $user1->getBlockId() );
@@ -783,6 +787,7 @@ class UserTest extends MediaWikiTestCase {
                        RequestContext::getMain()->setRequest( $request );
                        TestingAccessWrapper::newFromObject( $user )->mRequest = $request;
                        $request->getSession()->setUser( $user );
+                       $this->overrideMwServices();
                };
                $this->setMwGlobals( 'wgSoftBlockRanges', [ '10.0.0.0/8' ] );
 
@@ -849,7 +854,7 @@ class UserTest extends MediaWikiTestCase {
                $user2->load();
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertFalse( $user2->isBlocked() );
+               $this->assertNull( $user2->getBlock() );
 
                // Clean up.
                $block->delete();
@@ -885,7 +890,7 @@ class UserTest extends MediaWikiTestCase {
                $user1 = User::newFromSession( $request1 );
                $user1->mBlock = $block;
                $user1->load();
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
 
                // 2. Create a new request, set the cookie to just the block ID, and the user should
                // still get blocked when they log in again.
@@ -897,7 +902,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertNotEquals( $user1->getToken(), $user2->getToken() );
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertTrue( $user2->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user2->getBlock() );
                $this->assertEquals( true, $user2->getBlock()->isAutoblocking() ); // Non-strict type-check.
 
                // Clean up.
@@ -980,7 +985,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertFalse( $user->getExperienceLevel() );
        }
 
-       public static function provideIsLocallBlockedProxy() {
+       public static function provideIsLocallyBlockedProxy() {
                return [
                        [ '1.2.3.4', '1.2.3.4' ],
                        [ '1.2.3.4', '1.2.3.0/16' ],
@@ -988,10 +993,12 @@ class UserTest extends MediaWikiTestCase {
        }
 
        /**
-        * @dataProvider provideIsLocallBlockedProxy
+        * @dataProvider provideIsLocallyBlockedProxy
         * @covers User::isLocallyBlockedProxy
         */
        public function testIsLocallyBlockedProxy( $ip, $blockListEntry ) {
+               $this->hideDeprecated( 'User::isLocallyBlockedProxy' );
+
                $this->setMwGlobals(
                        'wgProxyList', []
                );
@@ -1048,6 +1055,75 @@ class UserTest extends MediaWikiTestCase {
                $user = User::newFromId( $id );
                $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by ID' );
 
+               $user2 = User::newFromActorId( $user->getActorId() );
+               $this->assertEquals( $user->getId(), $user2->getId(),
+                       'User::newFromActorId works for an existing user' );
+
+               $row = $this->db->selectRow( 'user', User::selectFields(), [ 'user_id' => $id ], __METHOD__ );
+               $user = User::newFromRow( $row );
+               $this->assertTrue( $user->getActorId() > 0,
+                       'Actor ID can be retrieved for user loaded with User::selectFields()' );
+
+               $user = User::newFromId( $id );
+               $user->setName( 'UserTestActorId4-renamed' );
+               $user->saveSettings();
+               $this->assertEquals(
+                       $user->getName(),
+                       $this->db->selectField(
+                               'actor', 'actor_name', [ 'actor_id' => $user->getActorId() ], __METHOD__
+                       ),
+                       'User::saveSettings updates actor table for name change'
+               );
+
+               // For sanity
+               $ip = '192.168.12.34';
+               $this->db->delete( 'actor', [ 'actor_name' => $ip ], __METHOD__ );
+
+               $user = User::newFromName( $ip, false );
+               $this->assertFalse( $user->getActorId() > 0, 'Anonymous user has no actor ID by default' );
+               $this->assertTrue( $user->getActorId( $this->db ) > 0,
+                       'Actor ID can be created for an anonymous user' );
+
+               $user = User::newFromName( $ip, false );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be loaded for an anonymous user' );
+               $user2 = User::newFromActorId( $user->getActorId() );
+               $this->assertEquals( $user->getName(), $user2->getName(),
+                       'User::newFromActorId works for an anonymous user' );
+       }
+
+       /**
+        * Actor tests with SCHEMA_COMPAT_READ_OLD
+        *
+        * The only thing different from testActorId() is the behavior if the actor
+        * row doesn't exist in the DB, since with SCHEMA_COMPAT_READ_NEW that
+        * situation can't happen. But we copy all the other tests too just for good measure.
+        *
+        * @covers User::newFromActorId
+        */
+       public function testActorId_old() {
+               $this->setMwGlobals( [
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD,
+               ] );
+               $this->overrideMwServices();
+
+               $domain = MediaWikiServices::getInstance()->getDBLoadBalancer()->getLocalDomainID();
+               $this->hideDeprecated( 'User::selectFields' );
+
+               // Newly-created user has an actor ID
+               $user = User::createNew( 'UserTestActorIdOld1' );
+               $id = $user->getId();
+               $this->assertTrue( $user->getActorId() > 0, 'User::createNew sets an actor ID' );
+
+               $user = User::newFromName( 'UserTestActorIdOld2' );
+               $user->addToDatabase();
+               $this->assertTrue( $user->getActorId() > 0, 'User::addToDatabase sets an actor ID' );
+
+               $user = User::newFromName( 'UserTestActorIdOld1' );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by name' );
+
+               $user = User::newFromId( $id );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by ID' );
+
                $user2 = User::newFromActorId( $user->getActorId() );
                $this->assertEquals( $user->getId(), $user2->getId(),
                        'User::newFromActorId works for an existing user' );
@@ -1066,7 +1142,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertFalse( $user->getActorId() > 0, 'No Actor ID by default if none in database' );
                $this->assertTrue( $user->getActorId( $this->db ) > 0, 'Actor ID can be created if none in db' );
 
-               $user->setName( 'UserTestActorId4-renamed' );
+               $user->setName( 'UserTestActorIdOld4-renamed' );
                $user->saveSettings();
                $this->assertEquals(
                        $user->getName(),
@@ -1129,6 +1205,15 @@ class UserTest extends MediaWikiTestCase {
                $this->assertSame( 'Bogus', $test->getName() );
                $this->assertSame( 654321, $test->getActorId() );
 
+               // Loading remote user by name from remote wiki should succeed
+               $test = User::newFromAnyId( null, 'Bogus', null, 'foo' );
+               $this->assertSame( 0, $test->getId() );
+               $this->assertSame( 'Bogus', $test->getName() );
+               $this->assertSame( 0, $test->getActorId() );
+               $test = User::newFromAnyId( 123456, 'Bogus', 654321, 'foo' );
+               $this->assertSame( 0, $test->getId() );
+               $this->assertSame( 0, $test->getActorId() );
+
                // Exceptional cases
                try {
                        User::newFromAnyId( null, null, null );
@@ -1140,6 +1225,13 @@ class UserTest extends MediaWikiTestCase {
                        $this->fail( 'Expected exception not thrown' );
                } catch ( InvalidArgumentException $ex ) {
                }
+
+               // Loading remote user by id from remote wiki should fail
+               try {
+                       User::newFromAnyId( 123456, null, 654321, 'foo' );
+                       $this->fail( 'Expected exception not thrown' );
+               } catch ( InvalidArgumentException $ex ) {
+               }
        }
 
        /**
@@ -1459,7 +1551,7 @@ class UserTest extends MediaWikiTestCase {
                $user = User::newFromSession( $request );
 
                // logged in users should be inmune to cookie block of type ip/range
-               $this->assertFalse( $user->isBlocked() );
+               $this->assertNull( $user->getBlock() );
 
                // cookie is being cleared
                $cookies = $request->response()->getCookies();
index a8761e3..f424b21 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\User\UserIdentityValue;
+
 /**
  * @author Addshore
  *
@@ -14,7 +16,8 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $this->setExpectedException( DBReadOnlyError::class );
-               $noWriteService->addWatch( $this->getTestSysop()->getUser(), new TitleValue( 0, 'Foo' ) );
+               $noWriteService->addWatch(
+                       new UserIdentityValue( 1, 'MockUser', 0 ), new TitleValue( 0, 'Foo' ) );
        }
 
        public function testAddWatchBatchForUser() {
@@ -24,7 +27,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $this->setExpectedException( DBReadOnlyError::class );
-               $noWriteService->addWatchBatchForUser( $this->getTestSysop()->getUser(), [] );
+               $noWriteService->addWatchBatchForUser( new UserIdentityValue( 1, 'MockUser', 0 ), [] );
        }
 
        public function testRemoveWatch() {
@@ -34,7 +37,8 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $this->setExpectedException( DBReadOnlyError::class );
-               $noWriteService->removeWatch( $this->getTestSysop()->getUser(), new TitleValue( 0, 'Foo' ) );
+               $noWriteService->removeWatch(
+                       new UserIdentityValue( 1, 'MockUser', 0 ), new TitleValue( 0, 'Foo' ) );
        }
 
        public function testSetNotificationTimestampsForUser() {
@@ -45,7 +49,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
 
                $this->setExpectedException( DBReadOnlyError::class );
                $noWriteService->setNotificationTimestampsForUser(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        'timestamp',
                        []
                );
@@ -59,7 +63,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
 
                $this->setExpectedException( DBReadOnlyError::class );
                $noWriteService->updateNotificationTimestamp(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'Foo' ),
                        'timestamp'
                );
@@ -73,8 +77,8 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
 
                $this->setExpectedException( DBReadOnlyError::class );
                $noWriteService->resetNotificationTimestamp(
-                       $this->getTestSysop()->getUser(),
-                       Title::newFromText( 'Foo' )
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
+                       new TitleValue( 0, 'Foo' )
                );
        }
 
@@ -85,7 +89,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->countWatchedItems(
-                       $this->getTestSysop()->getUser()
+                       new UserIdentityValue( 1, 'MockUser', 0 )
                );
                $this->assertEquals( __METHOD__, $return );
        }
@@ -154,7 +158,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->getWatchedItem(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'Foo' )
                );
                $this->assertEquals( __METHOD__, $return );
@@ -167,7 +171,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->loadWatchedItem(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'Foo' )
                );
                $this->assertEquals( __METHOD__, $return );
@@ -182,7 +186,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->getWatchedItemsForUser(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        []
                );
                $this->assertEquals( __METHOD__, $return );
@@ -195,7 +199,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->isWatched(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'Foo' )
                );
                $this->assertEquals( __METHOD__, $return );
@@ -210,7 +214,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->getNotificationTimestampsBatch(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        [ new TitleValue( 0, 'Foo' ) ]
                );
                $this->assertEquals( __METHOD__, $return );
@@ -225,7 +229,7 @@ class NoWriteWatchedItemStoreUnitTest extends MediaWikiTestCase {
                $noWriteService = new NoWriteWatchedItemStore( $innerService );
 
                $return = $noWriteService->countUnreadNotifications(
-                       $this->getTestSysop()->getUser(),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        88
                );
                $this->assertEquals( __METHOD__, $return );
index 63c2b82..3ba8773 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\User\UserIdentityValue;
+use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\LoadBalancer;
 use Wikimedia\TestingAccessWrapper;
 
@@ -78,12 +80,10 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
        }
 
        /**
-        * @return PHPUnit_Framework_MockObject_MockObject|Database
+        * @return PHPUnit_Framework_MockObject_MockObject|IDatabase
         */
        private function getMockDb() {
-               $mock = $this->getMockBuilder( Database::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
+               $mock = $this->createMock( IDatabase::class );
 
                $mock->expects( $this->any() )
                        ->method( 'makeList' )
@@ -126,7 +126,7 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
        }
 
        /**
-        * @param PHPUnit_Framework_MockObject_MockObject|Database $mockDb
+        * @param PHPUnit_Framework_MockObject_MockObject|IDatabase $mockDb
         * @return PHPUnit_Framework_MockObject_MockObject|LoadBalancer
         */
        private function getMockLoadBalancer( $mockDb ) {
@@ -141,7 +141,6 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
        }
 
        /**
-        * @param PHPUnit_Framework_MockObject_MockObject|Database $mockDb
         * @return PHPUnit_Framework_MockObject_MockObject|WatchedItemStore
         */
        private function getMockWatchedItemStore() {
@@ -158,34 +157,32 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
 
        /**
         * @param int $id
+        * @param string[] $extraMethods Extra methods that are expected might be called
         * @return PHPUnit_Framework_MockObject_MockObject|User
         */
-       private function getMockNonAnonUserWithId( $id ) {
+       private function getMockNonAnonUserWithId( $id, array $extraMethods = [] ) {
                $mock = $this->getMockBuilder( User::class )->getMock();
-               $mock->expects( $this->any() )
-                       ->method( 'isAnon' )
-                       ->will( $this->returnValue( false ) );
-               $mock->expects( $this->any() )
-                       ->method( 'getId' )
-                       ->will( $this->returnValue( $id ) );
+               $mock->method( 'isRegistered' )->willReturn( true );
+               $mock->method( 'getId' )->willReturn( $id );
+               $methods = array_merge( [
+                       'isRegistered',
+                       'getId',
+               ], $extraMethods );
+               $mock->expects( $this->never() )->method( $this->anythingBut( ...$methods ) );
                return $mock;
        }
 
        /**
         * @param int $id
+        * @param string[] $extraMethods Extra methods that are expected might be called
         * @return PHPUnit_Framework_MockObject_MockObject|User
         */
-       private function getMockUnrestrictedNonAnonUserWithId( $id ) {
-               $mock = $this->getMockNonAnonUserWithId( $id );
-               $mock->expects( $this->any() )
-                       ->method( 'isAllowed' )
-                       ->will( $this->returnValue( true ) );
-               $mock->expects( $this->any() )
-                       ->method( 'isAllowedAny' )
-                       ->will( $this->returnValue( true ) );
-               $mock->expects( $this->any() )
-                       ->method( 'useRCPatrol' )
-                       ->will( $this->returnValue( true ) );
+       private function getMockUnrestrictedNonAnonUserWithId( $id, array $extraMethods = [] ) {
+               $mock = $this->getMockNonAnonUserWithId( $id,
+                       array_merge( [ 'isAllowed', 'isAllowedAny', 'useRCPatrol' ], $extraMethods ) );
+               $mock->method( 'isAllowed' )->willReturn( true );
+               $mock->method( 'isAllowedAny' )->willReturn( true );
+               $mock->method( 'useRCPatrol' )->willReturn( true );
                return $mock;
        }
 
@@ -195,18 +192,19 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
         * @return PHPUnit_Framework_MockObject_MockObject|User
         */
        private function getMockNonAnonUserWithIdAndRestrictedPermissions( $id, $notAllowedAction ) {
-               $mock = $this->getMockNonAnonUserWithId( $id );
+               $mock = $this->getMockNonAnonUserWithId( $id,
+                       [ 'isAllowed', 'isAllowedAny', 'useRCPatrol', 'useNPPatrol' ] );
 
-               $mock->expects( $this->any() )
-                       ->method( 'isAllowed' )
+               $mock->method( 'isAllowed' )
                        ->will( $this->returnCallback( function ( $action ) use ( $notAllowedAction ) {
                                return $action !== $notAllowedAction;
                        } ) );
-               $mock->expects( $this->any() )
-                       ->method( 'isAllowedAny' )
+               $mock->method( 'isAllowedAny' )
                        ->will( $this->returnCallback( function ( ...$actions ) use ( $notAllowedAction ) {
                                return !in_array( $notAllowedAction, $actions );
                        } ) );
+               $mock->method( 'useRCPatrol' )->willReturn( false );
+               $mock->method( 'useNPPatrol' )->willReturn( false );
 
                return $mock;
        }
@@ -216,7 +214,8 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
         * @return PHPUnit_Framework_MockObject_MockObject|User
         */
        private function getMockNonAnonUserWithIdAndNoPatrolRights( $id ) {
-               $mock = $this->getMockNonAnonUserWithId( $id );
+               $mock = $this->getMockNonAnonUserWithId( $id,
+                       [ 'isAllowed', 'isAllowedAny', 'useRCPatrol', 'useNPPatrol' ] );
 
                $mock->expects( $this->any() )
                        ->method( 'isAllowed' )
@@ -235,14 +234,6 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
                return $mock;
        }
 
-       private function getMockAnonUser() {
-               $mock = $this->getMockBuilder( User::class )->getMock();
-               $mock->expects( $this->any() )
-                       ->method( 'isAnon' )
-                       ->will( $this->returnValue( true ) );
-               return $mock;
-       }
-
        private function getFakeRow( array $rowValues ) {
                $fakeRow = new stdClass();
                foreach ( $rowValues as $valueName => $value ) {
@@ -1384,7 +1375,7 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
 
                $queryService = $this->newService( $mockDb );
                $user = $this->getMockUnrestrictedNonAnonUserWithId( 1 );
-               $otherUser = $this->getMockUnrestrictedNonAnonUserWithId( 2 );
+               $otherUser = $this->getMockUnrestrictedNonAnonUserWithId( 2, [ 'getOption' ] );
                $otherUser->expects( $this->once() )
                        ->method( 'getOption' )
                        ->with( 'watchlisttoken' )
@@ -1415,7 +1406,7 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
 
                $queryService = $this->newService( $mockDb );
                $user = $this->getMockUnrestrictedNonAnonUserWithId( 1 );
-               $otherUser = $this->getMockUnrestrictedNonAnonUserWithId( 2 );
+               $otherUser = $this->getMockUnrestrictedNonAnonUserWithId( 2, [ 'getOption' ] );
                $otherUser->expects( $this->once() )
                        ->method( 'getOption' )
                        ->with( 'watchlisttoken' )
@@ -1715,7 +1706,8 @@ class WatchedItemQueryServiceUnitTest extends MediaWikiTestCase {
 
                $queryService = $this->newService( $mockDb );
 
-               $items = $queryService->getWatchedItemsForUser( $this->getMockAnonUser() );
+               $items = $queryService->getWatchedItemsForUser(
+                       new UserIdentityValue( 0, 'AnonUser', 0 ) );
                $this->assertEmpty( $items );
        }
 
index 2f95688..82308de 100644 (file)
@@ -1,8 +1,10 @@
 <?php
 use MediaWiki\Linker\LinkTarget;
+use MediaWiki\Revision\RevisionLookup;
+use MediaWiki\Revision\RevisionRecord;
+use MediaWiki\User\UserIdentityValue;
 use Wikimedia\Rdbms\LBFactory;
 use Wikimedia\Rdbms\LoadBalancer;
-use Wikimedia\ScopedCallback;
 use Wikimedia\TestingAccessWrapper;
 
 /**
@@ -109,28 +111,42 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        /**
-        * @param int $id
-        * @return PHPUnit_Framework_MockObject_MockObject|User
+        * Assumes that only getSubjectPage and getTalkPage will ever be called, and everything passed
+        * to them will have namespace 0.
         */
-       private function getMockNonAnonUserWithId( $id ) {
-               $mock = $this->createMock( User::class );
-               $mock->expects( $this->any() )
-                       ->method( 'isAnon' )
-                       ->will( $this->returnValue( false ) );
-               $mock->expects( $this->any() )
-                       ->method( 'getId' )
-                       ->will( $this->returnValue( $id ) );
-               $mock->expects( $this->any() )
-                       ->method( 'getUserPage' )
-                       ->will( $this->returnValue( Title::makeTitle( NS_USER, 'MockUser' ) ) );
+       private function getMockNsInfo() : NamespaceInfo {
+               $mock = $this->createMock( NamespaceInfo::class );
+               $mock->method( 'getSubjectPage' )->will( $this->returnArgument( 0 ) );
+               $mock->method( 'getTalkPage' )->will( $this->returnCallback(
+                               function ( $target ) {
+                                       return new TitleValue( 1, $target->getDbKey() );
+                               }
+                       ) );
+               $mock->expects( $this->never() )
+                       ->method( $this->anythingBut( 'getSubjectPage', 'getTalkPage' ) );
                return $mock;
        }
 
        /**
-        * @return User
+        * No methods may be called except provided callbacks, if any.
+        *
+        * @param array $callbacks Keys are method names, values are callbacks
+        * @param array $counts Keys are method names, values are expected number of times to be called
+        *   (default is any number is okay)
         */
-       private function getAnonUser() {
-               return User::newFromName( 'Anon_User' );
+       private function getMockRevisionLookup(
+               array $callbacks = [], array $counts = []
+       ) : RevisionLookup {
+               $mock = $this->createMock( RevisionLookup::class );
+               foreach ( $callbacks as $method => $callback ) {
+                       $count = isset( $counts[$method] ) ? $this->exactly( $counts[$method] ) : $this->any();
+                       $mock->expects( $count )
+                               ->method( $method )
+                               ->will( $this->returnCallback( $callbacks[$method] ) );
+               }
+               $mock->expects( $this->never() )
+                       ->method( $this->anythingBut( ...array_keys( $callbacks ) ) );
+               return $mock;
        }
 
        private function getFakeRow( array $rowValues ) {
@@ -141,24 +157,33 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                return $fakeRow;
        }
 
-       private function newWatchedItemStore(
-               LBFactory $lbFactory,
-               JobQueueGroup $queueGroup,
-               HashBagOStuff $cache,
-               ReadOnlyMode $readOnlyMode
-       ) {
+       /**
+        * @param array $mocks Associative array providing mocks to use when constructing the
+        *   WatchedItemStore. Anything not provided will fall back to a default. Valid keys:
+        *     * lbFactory
+        *     * db
+        *     * queueGroup
+        *     * cache
+        *     * readOnlyMode
+        *     * nsInfo
+        *     * revisionLookup
+        */
+       private function newWatchedItemStore( array $mocks = [] ) : WatchedItemStore {
                return new WatchedItemStore(
-                       $lbFactory,
-                       $queueGroup,
+                       $mocks['lbFactory'] ??
+                               $this->getMockLBFactory( $mocks['db'] ?? $this->getMockDb() ),
+                       $mocks['queueGroup'] ?? $this->getMockJobQueueGroup(),
                        new HashBagOStuff(),
-                       $cache,
-                       $readOnlyMode,
-                       1000
+                       $mocks['cache'] ?? $this->getMockCache(),
+                       $mocks['readOnlyMode'] ?? $this->getMockReadOnlyMode(),
+                       1000,
+                       $mocks['nsInfo'] ?? $this->getMockNsInfo(),
+                       $mocks['revisionLookup'] ?? $this->getMockRevisionLookup()
                );
        }
 
        public function testClearWatchedItems() {
-               $user = $this->getMockNonAnonUserWithId( 7 );
+               $user = new UserIdentityValue( 7, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -187,12 +212,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->method( 'delete' )
                        ->with( 'RM-KEY' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
                TestingAccessWrapper::newFromObject( $store )
                        ->cacheIndex = [ 0 => [ 'F' => [ 7 => 'RM-KEY', 9 => 'KEEP-KEY' ] ] ];
 
@@ -200,7 +220,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testClearWatchedItems_tooManyItemsWatched() {
-               $user = $this->getMockNonAnonUserWithId( 7 );
+               $user = new UserIdentityValue( 7, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -220,18 +240,13 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse( $store->clearUserWatchedItems( $user ) );
        }
 
        public function testCountWatchedItems() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->exactly( 1 ) )
@@ -251,12 +266,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals( 12, $store->countWatchedItems( $user ) );
        }
@@ -283,12 +293,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals( 7, $store->countWatchers( $titleValue ) );
        }
@@ -336,12 +341,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $expected = [
                        0 => [ 'SomeDbKey' => 100, 'OtherDbKey' => 300 ],
@@ -404,12 +404,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $expected = [
                        0 => [ 'SomeDbKey' => 100, 'OtherDbKey' => 300 ],
@@ -454,12 +449,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals( 7, $store->countVisitingWatchers( $titleValue, '111' ) );
        }
@@ -537,12 +527,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $expected = [
                        0 => [ 'SomeDbKey' => 100, 'OtherDbKey' => 300 ],
@@ -643,12 +628,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $expected = [
                        0 => [
@@ -698,12 +678,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $expected = [
                        0 => [ 'SomeDbKey' => 0, 'OtherDbKey' => 0 ],
@@ -716,7 +691,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testCountUnreadNotifications() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->exactly( 1 ) )
@@ -737,12 +712,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals( 9, $store->countUnreadNotifications( $user ) );
        }
@@ -751,7 +721,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
         * @dataProvider provideIntWithDbUnsafeVersion
         */
        public function testCountUnreadNotifications_withUnreadLimit_overLimit( $limit ) {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->exactly( 1 ) )
@@ -773,12 +743,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertSame(
                        true,
@@ -790,7 +755,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
         * @dataProvider provideIntWithDbUnsafeVersion
         */
        public function testCountUnreadNotifications_withUnreadLimit_underLimit( $limit ) {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->exactly( 1 ) )
@@ -812,12 +777,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        9,
@@ -844,16 +804,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnValue( new FakeResultWrapper( [] ) ) );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb ] );
 
                $store->duplicateEntry(
-                       Title::newFromText( 'Old_Title' ),
-                       Title::newFromText( 'New_Title' )
+                       new TitleValue( 0, 'Old_Title' ),
+                       new TitleValue( 0, 'New_Title' )
                );
        }
 
@@ -904,16 +859,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $store->duplicateEntry(
-                       Title::newFromText( 'Old_Title' ),
-                       Title::newFromText( 'New_Title' )
+                       new TitleValue( 0, 'Old_Title' ),
+                       new TitleValue( 0, 'New_Title' )
                );
        }
 
@@ -952,22 +902,17 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $store->duplicateAllAssociatedEntries(
-                       Title::newFromText( 'Old_Title' ),
-                       Title::newFromText( 'New_Title' )
+                       new TitleValue( 0, 'Old_Title' ),
+                       new TitleValue( 0, 'New_Title' )
                );
        }
 
        public function provideLinkTargetPairs() {
                return [
-                       [ Title::newFromText( 'Old_Title' ), Title::newFromText( 'New_Title' ) ],
+                       [ new TitleValue( 0, 'Old_Title' ), new TitleValue( 0, 'New_Title' ) ],
                        [ new TitleValue( 0, 'Old_Title' ),  new TitleValue( 0, 'New_Title' ) ],
                ];
        }
@@ -1047,12 +992,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $store->duplicateAllAssociatedEntries(
                        $oldTarget,
@@ -1081,16 +1021,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->method( 'delete' )
                        ->with( '0:Some_Page:1' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $store->addWatch(
-                       $this->getMockNonAnonUserWithId( 1 ),
-                       Title::newFromText( 'Some_Page' )
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
+                       new TitleValue( 0, 'Some_Page' )
                );
        }
 
@@ -1103,30 +1038,21 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )
                        ->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $store->addWatch(
-                       $this->getAnonUser(),
-                       Title::newFromText( 'Some_Page' )
+                       new UserIdentityValue( 0, 'AnonUser', 0 ),
+                       new TitleValue( 0, 'Some_Page' )
                );
        }
 
        public function testAddWatchBatchForUser_readOnlyDBReturnsFalse() {
                $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $this->getMockDb() ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode( true )
-               );
+                       [ 'readOnlyMode' => $this->getMockReadOnlyMode( true ) ] );
 
                $this->assertFalse(
                        $store->addWatchBatchForUser(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                [ new TitleValue( 0, 'Some_Page' ), new TitleValue( 1, 'Some_Page' ) ]
                        )
                );
@@ -1168,14 +1094,9 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->method( 'delete' )
                        ->with( '1:Some_Page:1' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
-               $mockUser = $this->getMockNonAnonUserWithId( 1 );
+               $mockUser = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $this->assertTrue(
                        $store->addWatchBatchForUser(
@@ -1194,23 +1115,18 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )
                        ->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->addWatchBatchForUser(
-                               $this->getAnonUser(),
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
                                [ new TitleValue( 0, 'Other_Page' ) ]
                        )
                );
        }
 
        public function testAddWatchBatchReturnsTrue_whenGivenEmptyList() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->never() )
                        ->method( 'insert' );
@@ -1219,12 +1135,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )
                        ->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertTrue(
                        $store->addWatchBatchForUser( $user, [] )
@@ -1255,15 +1166,10 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                '0:SomeDbKey:1'
                        );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $watchedItem = $store->loadWatchedItem(
-                       $this->getMockNonAnonUserWithId( 1 ),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'SomeDbKey' )
                );
                $this->assertInstanceOf( WatchedItem::class, $watchedItem );
@@ -1291,16 +1197,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->loadWatchedItem(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1315,16 +1216,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->loadWatchedItem(
-                               $this->getAnonUser(),
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1365,18 +1261,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                [ '1:SomeDbKey:1' ]
                        );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
-               $titleValue = new TitleValue( 0, 'SomeDbKey' );
                $this->assertTrue(
                        $store->removeWatch(
-                               $this->getMockNonAnonUserWithId( 1 ),
-                               Title::newFromTitleValue( $titleValue )
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
+                               new TitleValue( 0, 'SomeDbKey' )
                        )
                );
        }
@@ -1417,18 +1307,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                [ '1:SomeDbKey:1' ]
                        );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
-               $titleValue = new TitleValue( 0, 'SomeDbKey' );
                $this->assertFalse(
                        $store->removeWatch(
-                               $this->getMockNonAnonUserWithId( 1 ),
-                               Title::newFromTitleValue( $titleValue )
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
+                               new TitleValue( 0, 'SomeDbKey' )
                        )
                );
        }
@@ -1443,16 +1327,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )
                        ->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->removeWatch(
-                               $this->getAnonUser(),
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1489,15 +1368,10 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                '0:SomeDbKey:1'
                        );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $watchedItem = $store->getWatchedItem(
-                       $this->getMockNonAnonUserWithId( 1 ),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'SomeDbKey' )
                );
                $this->assertInstanceOf( WatchedItem::class, $watchedItem );
@@ -1511,7 +1385,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockDb->expects( $this->never() )
                        ->method( 'selectRow' );
 
-               $mockUser = $this->getMockNonAnonUserWithId( 1 );
+               $mockUser = new UserIdentityValue( 1, 'MockUser', 0 );
                $linkTarget = new TitleValue( 0, 'SomeDbKey' );
                $cachedItem = new WatchedItem( $mockUser, $linkTarget, '20151212010101' );
 
@@ -1525,12 +1399,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        )
                        ->will( $this->returnValue( $cachedItem ) );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        $cachedItem,
@@ -1564,16 +1433,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' )
                        ->will( $this->returnValue( false ) );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->getWatchedItem(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1589,16 +1453,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->getWatchedItem(
-                               $this->getAnonUser(),
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1631,13 +1490,8 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'set' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $watchedItems = $store->getWatchedItemsForUser( $user );
 
@@ -1670,7 +1524,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockDb = $this->getMockDb();
                $mockCache = $this->getMockCache();
                $mockLoadBalancer = $this->getMockLBFactory( $mockDb, $dbType );
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
 
                $mockDb->expects( $this->once() )
                        ->method( 'select' )
@@ -1684,11 +1538,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->will( $this->returnValue( [] ) );
 
                $store = $this->newWatchedItemStore(
-                       $mockLoadBalancer,
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+                       [ 'lbFactory' => $mockLoadBalancer, 'cache' => $mockCache ] );
 
                $watchedItems = $store->getWatchedItemsForUser(
                        $user,
@@ -1698,16 +1548,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testGetWatchedItemsForUser_badSortOptionThrowsException() {
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $this->getMockDb() ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore();
 
                $this->setExpectedException( InvalidArgumentException::class );
                $store->getWatchedItemsForUser(
-                       $this->getMockNonAnonUserWithId( 1 ),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        [ 'sort' => 'foo' ]
                );
        }
@@ -1741,16 +1586,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                '0:SomeDbKey:1'
                        );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertTrue(
                        $store->isWatched(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1779,16 +1619,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' )
                        ->will( $this->returnValue( false ) );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->isWatched(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1804,16 +1639,11 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->isWatched(
-                               $this->getAnonUser(),
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' )
                        )
                );
@@ -1873,19 +1703,15 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [
                                0 => [ 'SomeDbKey' => '20151212010101', ],
                                1 => [ 'AnotherDbKey' => null, ],
                        ],
-                       $store->getNotificationTimestampsBatch( $this->getMockNonAnonUserWithId( 1 ), $targets )
+                       $store->getNotificationTimestampsBatch(
+                               new UserIdentityValue( 1, 'MockUser', 0 ), $targets )
                );
        }
 
@@ -1925,18 +1751,14 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [
                                0 => [ 'OtherDbKey' => false, ],
                        ],
-                       $store->getNotificationTimestampsBatch( $this->getMockNonAnonUserWithId( 1 ), $targets )
+                       $store->getNotificationTimestampsBatch(
+                               new UserIdentityValue( 1, 'MockUser', 0 ), $targets )
                );
        }
 
@@ -1946,7 +1768,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        new TitleValue( 1, 'AnotherDbKey' ),
                ];
 
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $cachedItem = new WatchedItem( $user, $targets[0], '20151212010101' );
 
                $mockDb = $this->getMockDb();
@@ -1988,12 +1810,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [
@@ -2010,7 +1827,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        new TitleValue( 1, 'AnotherDbKey' ),
                ];
 
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $cachedItems = [
                        new WatchedItem( $user, $targets[0], '20151212010101' ),
                        new WatchedItem( $user, $targets[1], null ),
@@ -2030,12 +1847,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [
@@ -2058,19 +1870,15 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache = $this->getMockCache();
                $mockCache->expects( $this->never() )->method( $this->anything() );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [
                                0 => [ 'SomeDbKey' => false, ],
                                1 => [ 'AnotherDbKey' => false, ],
                        ],
-                       $store->getNotificationTimestampsBatch( $this->getAnonUser(), $targets )
+                       $store->getNotificationTimestampsBatch(
+                               new UserIdentityValue( 0, 'AnonUser', 0 ), $targets )
                );
        }
 
@@ -2084,17 +1892,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->resetNotificationTimestamp(
-                               $this->getAnonUser(),
-                               Title::newFromText( 'SomeDbKey' )
+                               new UserIdentityValue( 0, 'AnonUser', 0 ),
+                               new TitleValue( 0, 'SomeDbKey' )
                        )
                );
        }
@@ -2119,24 +1922,19 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'set' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertFalse(
                        $store->resetNotificationTimestamp(
-                               $this->getMockNonAnonUserWithId( 1 ),
-                               Title::newFromText( 'SomeDbKey' )
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
+                               new TitleValue( 0, 'SomeDbKey' )
                        )
                );
        }
 
        public function testResetNotificationTimestamp_item() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
-               $title = Title::newFromText( 'SomeDbKey' );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
+               $title = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -2173,12 +1971,22 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                // don't run
                        } );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               // We don't care if these methods actually do anything here
+               $mockRevisionLookup = $this->getMockRevisionLookup( [
+                       'getRevisionByTitle' => function () {
+                               return null;
+                       },
+                       'getTimestampFromId' => function () {
+                               return '00000000000000';
+                       },
+               ] );
+
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
 
                $this->assertTrue(
                        $store->resetNotificationTimestamp(
@@ -2189,8 +1997,8 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testResetNotificationTimestamp_noItemForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
-               $title = Title::newFromText( 'SomeDbKey' );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
+               $title = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->never() )
@@ -2204,12 +2012,23 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+
+               // We don't care if these methods actually do anything here
+               $mockRevisionLookup = $this->getMockRevisionLookup( [
+                       'getRevisionByTitle' => function () {
+                               return null;
+                       },
+                       'getTimestampFromId' => function () {
+                               return '00000000000000';
+                       },
+               ] );
+
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
 
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
@@ -2226,26 +2045,6 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                );
        }
 
-       /**
-        * @param string $text
-        * @param int $ns
-        *
-        * @return PHPUnit_Framework_MockObject_MockObject|Title
-        */
-       private function getMockTitle( $text, $ns = 0 ) {
-               $title = $this->createMock( Title::class );
-               $title->expects( $this->any() )
-                       ->method( 'getText' )
-                       ->will( $this->returnValue( str_replace( '_', ' ', $text ) ) );
-               $title->expects( $this->any() )
-                       ->method( 'getDbKey' )
-                       ->will( $this->returnValue( str_replace( '_', ' ', $text ) ) );
-               $title->expects( $this->any() )
-                       ->method( 'getNamespace' )
-                       ->will( $this->returnValue( $ns ) );
-               return $title;
-       }
-
        private function verifyCallbackJob(
                ActivityUpdateJob $job,
                LinkTarget $expectedTitle,
@@ -2265,13 +2064,9 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testResetNotificationTimestamp_oldidSpecifiedLatestRevisionForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $oldid = 22;
-               $title = $this->getMockTitle( 'SomeTitle' );
-               $title->expects( $this->once() )
-                       ->method( 'getNextRevisionID' )
-                       ->with( $oldid )
-                       ->will( $this->returnValue( false ) );
+               $title = new TitleValue( 0, 'SomeTitle' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->never() )
@@ -2285,12 +2080,35 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeTitle:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+
+               $mockRevisionRecord = $this->createMock( RevisionRecord::class );
+               $mockRevisionRecord->expects( $this->never() )->method( $this->anything() );
+
+               $mockRevisionLookup = $this->getMockRevisionLookup( [
+                       'getTimestampFromId' => function () {
+                               return '00000000000000';
+                       },
+                       'getRevisionById' => function ( $id, $flags ) use ( $oldid, $mockRevisionRecord ) {
+                               $this->assertSame( $oldid, $id );
+                               $this->assertSame( 0, $flags );
+                               return $mockRevisionRecord;
+                       },
+                       'getNextRevision' =>
+                       function ( $oldRev, $titleArg ) use ( $mockRevisionRecord, $title ) {
+                               $this->assertSame( $mockRevisionRecord, $oldRev );
+                               $this->assertSame( $title, $titleArg );
+                               return false;
+                       },
+               ], [
+                       'getNextRevision' => 1,
+               ] );
+
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
 
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
@@ -2318,13 +2136,15 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testResetNotificationTimestamp_oldidSpecifiedNotLatestRevisionForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $oldid = 22;
-               $title = $this->getMockTitle( 'SomeDbKey' );
-               $title->expects( $this->once() )
-                       ->method( 'getNextRevisionID' )
-                       ->with( $oldid )
-                       ->will( $this->returnValue( 33 ) );
+               $title = new TitleValue( 0, 'SomeDbKey' );
+
+               $mockRevision = $this->createMock( RevisionRecord::class );
+               $mockRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockNextRevision = $this->createMock( RevisionRecord::class );
+               $mockNextRevision->expects( $this->never() )->method( $this->anything() );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -2352,12 +2172,34 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+
+               $mockRevisionLookup = $this->getMockRevisionLookup(
+                       [
+                               'getTimestampFromId' => function ( $oldidParam ) use ( $oldid ) {
+                                       $this->assertSame( $oldid, $oldidParam );
+                               },
+                               'getRevisionById' => function ( $id ) use ( $oldid, $mockRevision ) {
+                                       $this->assertSame( $oldid, $id );
+                                       return $mockRevision;
+                               },
+                               'getNextRevision' =>
+                               function ( RevisionRecord $rev ) use ( $mockRevision, $mockNextRevision ) {
+                                       $this->assertSame( $mockRevision, $rev );
+                                       return $mockNextRevision;
+                               },
+                       ],
+                       [
+                               'getTimestampFromId' => 2,
+                               'getRevisionById' => 1,
+                               'getNextRevision' => 1,
+                       ]
+               );
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
 
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
@@ -2374,15 +2216,6 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                }
                        ) );
 
-               $getTimestampCallCounter = 0;
-               $scopedOverrideRevision = $store->overrideRevisionGetTimestampFromIdCallback(
-                       function ( $titleParam, $oldidParam ) use ( &$getTimestampCallCounter, $title, $oldid ) {
-                               $getTimestampCallCounter++;
-                               $this->assertEquals( $title, $titleParam );
-                               $this->assertEquals( $oldid, $oldidParam );
-                       }
-               );
-
                $this->assertTrue(
                        $store->resetNotificationTimestamp(
                                $user,
@@ -2391,19 +2224,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                $oldid
                        )
                );
-               $this->assertEquals( 2, $getTimestampCallCounter );
-
-               ScopedCallback::consume( $scopedOverrideRevision );
        }
 
        public function testResetNotificationTimestamp_notWatchedPageForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $oldid = 22;
-               $title = $this->getMockTitle( 'SomeDbKey' );
-               $title->expects( $this->once() )
-                       ->method( 'getNextRevisionID' )
-                       ->with( $oldid )
-                       ->will( $this->returnValue( 33 ) );
+               $title = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -2427,13 +2253,42 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
+
+               $mockRevision = $this->createMock( RevisionRecord::class );
+               $mockRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockNextRevision = $this->createMock( RevisionRecord::class );
+               $mockNextRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockRevisionLookup = $this->getMockRevisionLookup(
+                       [
+                               'getTimestampFromId' => function ( $oldidParam ) use ( $oldid ) {
+                                       $this->assertSame( $oldid, $oldidParam );
+                               },
+                               'getRevisionById' => function ( $id ) use ( $oldid, $mockRevision ) {
+                                       $this->assertSame( $oldid, $id );
+                                       return $mockRevision;
+                               },
+                               'getNextRevision' =>
+                               function ( RevisionRecord $rev ) use ( $mockRevision, $mockNextRevision ) {
+                                       $this->assertSame( $mockRevision, $rev );
+                                       return $mockNextRevision;
+                               },
+                       ],
+                       [
+                               'getTimestampFromId' => 1,
+                               'getRevisionById' => 1,
+                               'getNextRevision' => 1,
+                       ]
                );
 
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
+
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
                        ->will( $this->returnCallback(
@@ -2460,13 +2315,9 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testResetNotificationTimestamp_futureNotificationTimestampForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $oldid = 22;
-               $title = $this->getMockTitle( 'SomeDbKey' );
-               $title->expects( $this->once() )
-                       ->method( 'getNextRevisionID' )
-                       ->with( $oldid )
-                       ->will( $this->returnValue( 33 ) );
+               $title = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -2494,13 +2345,42 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
+
+               $mockRevision = $this->createMock( RevisionRecord::class );
+               $mockRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockNextRevision = $this->createMock( RevisionRecord::class );
+               $mockNextRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockRevisionLookup = $this->getMockRevisionLookup(
+                       [
+                               'getTimestampFromId' => function ( $oldidParam ) use ( $oldid ) {
+                                       $this->assertEquals( $oldid, $oldidParam );
+                               },
+                               'getRevisionById' => function ( $id ) use ( $oldid, $mockRevision ) {
+                                       $this->assertSame( $oldid, $id );
+                                       return $mockRevision;
+                               },
+                               'getNextRevision' =>
+                               function ( RevisionRecord $rev ) use ( $mockRevision, $mockNextRevision ) {
+                                       $this->assertSame( $mockRevision, $rev );
+                                       return $mockNextRevision;
+                               },
+                       ],
+                       [
+                               'getTimestampFromId' => 2,
+                               'getRevisionById' => 1,
+                               'getNextRevision' => 1,
+                       ]
                );
 
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
+
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
                        ->will( $this->returnCallback(
@@ -2516,15 +2396,6 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                }
                        ) );
 
-               $getTimestampCallCounter = 0;
-               $scopedOverrideRevision = $store->overrideRevisionGetTimestampFromIdCallback(
-                       function ( $titleParam, $oldidParam ) use ( &$getTimestampCallCounter, $title, $oldid ) {
-                               $getTimestampCallCounter++;
-                               $this->assertEquals( $title, $titleParam );
-                               $this->assertEquals( $oldid, $oldidParam );
-                       }
-               );
-
                $this->assertTrue(
                        $store->resetNotificationTimestamp(
                                $user,
@@ -2533,19 +2404,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                $oldid
                        )
                );
-               $this->assertEquals( 2, $getTimestampCallCounter );
-
-               ScopedCallback::consume( $scopedOverrideRevision );
        }
 
        public function testResetNotificationTimestamp_futureNotificationTimestampNotForced() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $oldid = 22;
-               $title = $this->getMockTitle( 'SomeDbKey' );
-               $title->expects( $this->once() )
-                       ->method( 'getNextRevisionID' )
-                       ->with( $oldid )
-                       ->will( $this->returnValue( 33 ) );
+               $title = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
                $mockDb->expects( $this->once() )
@@ -2573,12 +2437,40 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->with( '0:SomeDbKey:1' );
 
                $mockQueueGroup = $this->getMockJobQueueGroup();
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $mockQueueGroup,
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+
+               $mockRevision = $this->createMock( RevisionRecord::class );
+               $mockRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockNextRevision = $this->createMock( RevisionRecord::class );
+               $mockNextRevision->expects( $this->never() )->method( $this->anything() );
+
+               $mockRevisionLookup = $this->getMockRevisionLookup(
+                       [
+                               'getTimestampFromId' => function ( $oldidParam ) use ( $oldid ) {
+                                       $this->assertEquals( $oldid, $oldidParam );
+                               },
+                               'getRevisionById' => function ( $id ) use ( $oldid, $mockRevision ) {
+                                       $this->assertSame( $oldid, $id );
+                                       return $mockRevision;
+                               },
+                               'getNextRevision' =>
+                               function ( RevisionRecord $rev ) use ( $mockRevision, $mockNextRevision ) {
+                                       $this->assertSame( $mockRevision, $rev );
+                                       return $mockNextRevision;
+                               },
+                       ],
+                       [
+                               'getTimestampFromId' => 2,
+                               'getRevisionById' => 1,
+                               'getNextRevision' => 1,
+                       ]
+               );
+               $store = $this->newWatchedItemStore( [
+                       'db' => $mockDb,
+                       'queueGroup' => $mockQueueGroup,
+                       'cache' => $mockCache,
+                       'revisionLookup' => $mockRevisionLookup,
+               ] );
 
                $mockQueueGroup->expects( $this->any() )
                        ->method( 'lazyPush' )
@@ -2595,15 +2487,6 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                }
                        ) );
 
-               $getTimestampCallCounter = 0;
-               $scopedOverrideRevision = $store->overrideRevisionGetTimestampFromIdCallback(
-                       function ( $titleParam, $oldidParam ) use ( &$getTimestampCallCounter, $title, $oldid ) {
-                               $getTimestampCallCounter++;
-                               $this->assertEquals( $title, $titleParam );
-                               $this->assertEquals( $oldid, $oldidParam );
-                       }
-               );
-
                $this->assertTrue(
                        $store->resetNotificationTimestamp(
                                $user,
@@ -2612,31 +2495,19 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                                $oldid
                        )
                );
-               $this->assertEquals( 2, $getTimestampCallCounter );
-
-               ScopedCallback::consume( $scopedOverrideRevision );
        }
 
        public function testSetNotificationTimestampsForUser_anonUser() {
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $this->getMockDb() ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
-               $this->assertFalse( $store->setNotificationTimestampsForUser( $this->getAnonUser(), '' ) );
+               $store = $this->newWatchedItemStore();
+               $this->assertFalse( $store->setNotificationTimestampsForUser(
+                       new UserIdentityValue( 0, 'AnonUser', 0 ), '' ) );
        }
 
        public function testSetNotificationTimestampsForUser_allRows() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $timestamp = '20100101010101';
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $this->getMockDb() ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore();
 
                // Note: This does not actually assert the job is correct
                $callableCallCounter = 0;
@@ -2653,15 +2524,10 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testSetNotificationTimestampsForUser_nullTimestamp() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $timestamp = null;
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $this->getMockDb() ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore();
 
                // Note: This does not actually assert the job is correct
                $callableCallCounter = 0;
@@ -2677,7 +2543,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testSetNotificationTimestampsForUser_specificTargets() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $timestamp = '20100101010101';
                $targets = [ new TitleValue( 0, 'Foo' ), new TitleValue( 0, 'Bar' ) ];
 
@@ -2699,12 +2565,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->method( 'affectedRows' )
                        ->will( $this->returnValue( 2 ) );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $this->getMockCache(),
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb ] );
 
                $this->assertTrue(
                        $store->setNotificationTimestampsForUser( $user, $timestamp, $targets )
@@ -2743,17 +2604,12 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $this->assertEquals(
                        [ 2, 3 ],
                        $store->updateNotificationTimestamp(
-                               $this->getMockNonAnonUserWithId( 1 ),
+                               new UserIdentityValue( 1, 'MockUser', 0 ),
                                new TitleValue( 0, 'SomeDbKey' ),
                                '20151212010101'
                        )
@@ -2785,15 +2641,10 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                $mockCache->expects( $this->never() )->method( 'get' );
                $mockCache->expects( $this->never() )->method( 'delete' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                $watchers = $store->updateNotificationTimestamp(
-                       $this->getMockNonAnonUserWithId( 1 ),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        new TitleValue( 0, 'SomeDbKey' ),
                        '20151212010101'
                );
@@ -2802,7 +2653,7 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
        }
 
        public function testUpdateNotificationTimestamp_clearsCachedItems() {
-               $user = $this->getMockNonAnonUserWithId( 1 );
+               $user = new UserIdentityValue( 1, 'MockUser', 0 );
                $titleValue = new TitleValue( 0, 'SomeDbKey' );
 
                $mockDb = $this->getMockDb();
@@ -2830,18 +2681,13 @@ class WatchedItemStoreUnitTest extends MediaWikiTestCase {
                        ->method( 'delete' )
                        ->with( '0:SomeDbKey:1' );
 
-               $store = $this->newWatchedItemStore(
-                       $this->getMockLBFactory( $mockDb ),
-                       $this->getMockJobQueueGroup(),
-                       $mockCache,
-                       $this->getMockReadOnlyMode()
-               );
+               $store = $this->newWatchedItemStore( [ 'db' => $mockDb, 'cache' => $mockCache ] );
 
                // This will add the item to the cache
                $store->getWatchedItem( $user, $titleValue );
 
                $store->updateNotificationTimestamp(
-                       $this->getMockNonAnonUserWithId( 1 ),
+                       new UserIdentityValue( 1, 'MockUser', 0 ),
                        $titleValue,
                        '20151212010101'
                );
index 0a04993..a1bdbad 100644 (file)
@@ -32,7 +32,7 @@ class MockFileBackend extends MemoryFileBackend {
        protected function doGetLocalCopyMulti( array $params ) {
                $tmpFiles = []; // (path => MockFSFile)
                foreach ( $params['srcs'] as $src ) {
-                       $tmpFiles[$src] = new MockFSFile( wfTempDir() . '/' . wfRandomString( 32 ) );
+                       $tmpFiles[$src] = new MockFSFile( "Fake path for $src" );
                }
                return $tmpFiles;
        }
index eeaf05a..b2c51ca 100644 (file)
@@ -7,17 +7,16 @@
  * @since 1.28
  */
 class MockLocalRepo extends LocalRepo {
-       function getLocalCopy( $virtualUrl ) {
-               return new MockFSFile( wfTempDir() . '/' . wfRandomString( 32 ) );
+       public function getLocalCopy( $virtualUrl ) {
+               return new MockFSFile( "Fake path for $virtualUrl" );
        }
 
-       function getLocalReference( $virtualUrl ) {
-               return new MockFSFile( wfTempDir() . '/' . wfRandomString( 32 ) );
+       public function getLocalReference( $virtualUrl ) {
+               return new MockFSFile( "Fake path for $virtualUrl" );
        }
 
-       function getFileProps( $virtualUrl ) {
+       public function getFileProps( $virtualUrl ) {
                $fsFile = $this->getLocalReference( $virtualUrl );
-
                return $fsFile->getProps();
        }
 }
index 00d607f..d340221 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 require_once dirname( __DIR__ ) . '/includes/upload/UploadFromUrlTest.php';
 
 class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
@@ -57,7 +59,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
 
                $wgParserCacheType = CACHE_NONE;
                DeferredUpdates::clearPendingUpdates();
-               $wgMemc = wfGetMainCache();
+               $wgMemc = ObjectCache::getLocalClusterInstance();
                $messageMemc = wfGetMessageCacheStorage();
 
                RequestContext::resetMain();
@@ -71,7 +73,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                        $wgStyleDirectory = "$IP/skins";
                }
 
-               RepoGroup::destroySingleton();
+               MediaWikiServices::getInstance()->resetServiceForTesting( 'RepoGroup' );
                FileBackendGroup::destroySingleton();
        }
 
@@ -80,7 +82,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
                        $GLOBALS[$var] = $val;
                }
                // Restore backends
-               RepoGroup::destroySingleton();
+               MediaWikiServices::getInstance()->resetServiceForTesting( 'RepoGroup' );
                FileBackendGroup::destroySingleton();
 
                parent::tearDown();
index 0bcce12..29cffaf 100644 (file)
@@ -7,7 +7,7 @@
        } ) );
 
        QUnit.test( '.parse( string )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+               this.server.respondWith( 'POST', /api.php/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
                ] );
@@ -18,7 +18,7 @@
        } );
 
        QUnit.test( '.parse( Object.toString )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+               this.server.respondWith( 'POST', /api.php/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
                ] );
@@ -33,7 +33,7 @@
        } );
 
        QUnit.test( '.parse( mw.Title )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&page=Earth/, [ 200,
+               this.server.respondWith( 'GET', /action=parse.*&page=Earth/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Earth</b> is a planet.</p>" } }'
                ] );
index da5e909..3f75243 100644 (file)
@@ -1,5 +1,6 @@
 const Page = require( 'wdio-mediawiki/Page' ),
-       Api = require( 'wdio-mediawiki/Api' );
+       Api = require( 'wdio-mediawiki/Api' ),
+       Util = require( 'wdio-mediawiki/Util' );
 
 class HistoryPage extends Page {
        get heading() { return browser.element( '#firstHeading' ); }
@@ -17,6 +18,16 @@ class HistoryPage extends Page {
                super.openTitle( title, { action: 'history' } );
        }
 
+       toggleRollbackConfirmationSetting( enable ) {
+               Util.waitForModuleState( 'mediawiki.api', 'ready', 5000 );
+               return browser.execute( function ( enable ) {
+                       return new mw.Api().saveOption(
+                               'showrollbackconfirmation',
+                               enable ? '1' : '0'
+                       );
+               }, enable );
+       }
+
        vandalizePage( name, content ) {
                let vandalUsername = 'Evil_' + browser.options.username;
 
index 970fb9e..383b372 100644 (file)
@@ -16,14 +16,7 @@ describe( 'Rollback with confirmation', function () {
                // Enable rollback confirmation for admin user
                // Requires user to log in again, handled by deleteCookie() call in beforeEach function
                UserLoginPage.loginAdmin();
-
-               browser.pause( 300 );
-               browser.execute( function () {
-                       return ( new mw.Api() ).saveOption(
-                               'showrollbackconfirmation',
-                               '1'
-                       );
-               } );
+               HistoryPage.toggleRollbackConfirmationSetting( true );
        } );
 
        beforeEach( function () {
@@ -48,22 +41,22 @@ describe( 'Rollback with confirmation', function () {
                assert.strictEqual( HistoryPage.rollbackConfirmableNo.getText(), 'Cancel' );
        } );
 
-       it.skip( 'should offer a way to cancel rollbacks', function () {
+       it( 'should offer a way to cancel rollbacks', function () {
                HistoryPage.rollback.click();
 
-               browser.pause( 300 );
+               HistoryPage.rollbackConfirmableNo.waitForVisible( 5000 );
 
                HistoryPage.rollbackConfirmableNo.click();
 
-               browser.pause( 500 );
+               browser.pause( 1000 ); // Waiting to ensure we are NOT redirected and stay on the same page
 
                assert.strictEqual( HistoryPage.heading.getText(), 'Revision history of "' + name + '"' );
        } );
 
-       it.skip( 'should perform rollbacks after confirming intention', function () {
+       it( 'should perform rollbacks after confirming intention', function () {
                HistoryPage.rollback.click();
 
-               browser.pause( 300 );
+               HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 );
 
                HistoryPage.rollbackConfirmableYes.click();
 
@@ -103,14 +96,7 @@ describe( 'Rollback without confirmation', function () {
                // Disable rollback confirmation for admin user
                // Requires user to log in again, handled by deleteCookie() call in beforeEach function
                UserLoginPage.loginAdmin();
-
-               browser.pause( 300 );
-               browser.execute( function () {
-                       return ( new mw.Api() ).saveOption(
-                               'showrollbackconfirmation',
-                               '0'
-                       );
-               } );
+               HistoryPage.toggleRollbackConfirmationSetting( false );
        } );
 
        beforeEach( function () {
index 247c958..dd08ee9 100644 (file)
@@ -1,5 +1,21 @@
 module.exports = {
        getTestString( prefix = '' ) {
                return prefix + Math.random().toString() + '-Iñtërnâtiônàlizætiøn';
+       },
+
+       /**
+        * Wait for a given module to reach a specific state
+        * @param {string} moduleName The name of the module to wait for
+        * @param {string} moduleStatus 'registered', 'loaded', 'loading', 'ready', 'error', 'missing'
+        * @param {int} timeout The wait time in milliseconds before the wait fails
+        */
+       waitForModuleState( moduleName, moduleStatus = 'ready', timeout = 2000 ) {
+               browser.waitUntil( () => {
+                       const result = browser.execute( ( module ) => {
+                               return typeof mw !== 'undefined' &&
+                                       mw.loader.getState( module.name ) === module.status;
+                       }, { status: moduleStatus, name: moduleName } );
+                       return result.value;
+               }, timeout, 'Failed to wait for ' + moduleName + ' to be ' + moduleStatus + ' after ' + timeout + ' ms.' );
        }
 };