Merge "Default $wgActorTableSchemaMigrationStage to READ_NEW"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 9 Apr 2019 20:26:30 +0000 (20:26 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 9 Apr 2019 20:26:30 +0000 (20:26 +0000)
202 files changed:
.fresnel.yml
.phan/config.php
.phpcs.xml
RELEASE-NOTES-1.33
autoload.php
composer.json
docs/hooks.txt
includes/AutoLoader.php
includes/CommentStore.php
includes/GlobalFunctions.php
includes/MagicWord.php
includes/MediaWikiServices.php
includes/MovePage.php
includes/OutputPage.php
includes/Permissions/PermissionManager.php [new file with mode: 0644]
includes/Revision/RevisionStore.php
includes/ServiceWiring.php
includes/Title.php
includes/actions/McrUndoAction.php
includes/api/ApiBase.php
includes/api/ApiContinuationManager.php
includes/api/i18n/ar.json
includes/api/i18n/de.json
includes/api/i18n/fr.json
includes/api/i18n/pt-br.json
includes/api/i18n/sv.json
includes/api/i18n/zh-hant.json
includes/auth/AuthenticationRequest.php
includes/block/BlockRestriction.php
includes/block/Restriction/AbstractRestriction.php
includes/debug/DeprecationHelper.php
includes/diff/TextSlotDiffRenderer.php
includes/editpage/TextConflictHelper.php
includes/export/Dump7ZipOutput.php
includes/export/DumpPipeOutput.php
includes/export/WikiExporter.php
includes/export/XmlDumpWriter.php
includes/filebackend/lockmanager/LockManagerGroup.php
includes/filerepo/file/File.php
includes/filerepo/file/ForeignAPIFile.php
includes/filerepo/file/ForeignDBFile.php
includes/filerepo/file/LocalFile.php
includes/gallery/PackedHoverImageGallery.php [new file with mode: 0644]
includes/gallery/PackedOverlayImageGallery.php
includes/htmlform/OOUIHTMLForm.php
includes/htmlform/fields/HTMLSelectAndOtherField.php
includes/import/UploadSourceAdapter.php
includes/installer/DatabaseUpdater.php
includes/installer/MssqlUpdater.php
includes/installer/PostgresUpdater.php
includes/installer/WebInstallerComplete.php
includes/installer/WebInstallerDocument.php
includes/installer/i18n/fa.json
includes/installer/i18n/ia.json
includes/installer/i18n/it.json
includes/installer/i18n/nl.json
includes/installer/i18n/sv.json
includes/jobqueue/Job.php
includes/jobqueue/JobQueueMemory.php
includes/jobqueue/jobs/ClearWatchlistNotificationsJob.php
includes/jobqueue/jobs/DeletePageJob.php
includes/jobqueue/jobs/UserGroupExpiryJob.php
includes/libs/IP.php
includes/libs/mime/MimeAnalyzer.php
includes/libs/mime/XmlTypeCheck.php
includes/libs/objectcache/MemcachedClient.php
includes/libs/objectcache/MemcachedPeclBagOStuff.php
includes/libs/objectcache/WinCacheBagOStuff.php
includes/libs/rdbms/ChronologyProtector.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/Database.php
includes/libs/rdbms/database/DatabaseMssql.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/database/MaintainableDBConnRef.php
includes/libs/rdbms/encasing/MssqlBlob.php
includes/libs/rdbms/exception/DBReadOnlyRoleError.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/ILBFactory.php
includes/libs/rdbms/loadbalancer/ILoadBalancer.php
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/logging/LogEntry.php
includes/media/BitmapHandler.php
includes/media/DjVuHandler.php
includes/media/DjVuImage.php
includes/media/JpegHandler.php
includes/media/SvgHandler.php
includes/media/TransformationalImageHandler.php
includes/page/ImagePage.php
includes/page/WikiPage.php
includes/parser/Parser.php
includes/parser/ParserFactory.php
includes/parser/Preprocessor_DOM.php
includes/profiler/ProfilerStub.php
includes/rcfeed/UDPRCFeedEngine.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderFileModule.php
includes/resourceloader/ResourceLoaderImage.php
includes/resourceloader/ResourceLoaderOOUIFileModule.php
includes/resourceloader/ResourceLoaderOOUIModule.php
includes/resourceloader/ResourceLoaderSkinModule.php
includes/resourceloader/ResourceLoaderWikiModule.php
includes/search/NullIndexField.php
includes/search/SearchPostgres.php
includes/specialpage/AuthManagerSpecialPage.php
includes/specialpage/ChangesListSpecialPage.php
includes/specialpage/ImageQueryPage.php
includes/specials/SpecialBlock.php
includes/specials/SpecialComparePages.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialExpandTemplates.php
includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialPageLanguage.php
includes/specials/SpecialUndelete.php
includes/specials/SpecialUploadStash.php
includes/specials/SpecialVersion.php
includes/specials/forms/UploadForm.php
includes/specials/pagers/NewFilesPager.php
includes/upload/UploadBase.php
includes/user/User.php
includes/utils/BatchRowUpdate.php
languages/Language.php
languages/LanguageConverter.php
languages/i18n/ar.json
languages/i18n/as.json
languages/i18n/az.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bn.json
languages/i18n/ca.json
languages/i18n/ckb.json
languages/i18n/cs.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/el.json
languages/i18n/en.json
languages/i18n/eu.json
languages/i18n/exif/it.json
languages/i18n/exif/mk.json
languages/i18n/fi.json
languages/i18n/fy.json
languages/i18n/hy.json
languages/i18n/hyw.json
languages/i18n/ia.json
languages/i18n/io.json
languages/i18n/is.json
languages/i18n/ja.json
languages/i18n/lb.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/my.json
languages/i18n/nl.json
languages/i18n/pl.json
languages/i18n/qqq.json
languages/i18n/ru.json
languages/i18n/rue.json
languages/i18n/sat.json
languages/i18n/sh.json
languages/i18n/skr-arab.json
languages/i18n/sl.json
languages/i18n/sv.json
languages/i18n/th.json
languages/i18n/uk.json
languages/i18n/ur.json
languages/i18n/yue.json
languages/i18n/zh-hant.json
languages/messages/MessagesEn.php
maintenance/7zip.inc
maintenance/Maintenance.php
maintenance/dumpTextPass.php
maintenance/hhvm/makeRepo.php
maintenance/hhvm/run-server
maintenance/mwdocgen.php
maintenance/populateImageSha1.php
maintenance/populatePPSortKey.php
maintenance/preprocessorFuzzTest.php
maintenance/storage/checkStorage.php
maintenance/storage/recompressTracked.php
maintenance/wrapOldPasswords.php
resources/Resources.php
resources/src/mediawiki.Title/.eslintrc.json [new file with mode: 0644]
resources/src/mediawiki.Title/Title.js
resources/src/mediawiki.action/mediawiki.action.history.styles.css [deleted file]
resources/src/mediawiki.action/mediawiki.action.history.styles.less [new file with mode: 0644]
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.less/mediawiki.mixins.less
resources/src/mediawiki.user.js
resources/src/startup/mediawiki.js
resources/src/startup/startup.js
tests/phpunit/MediaWikiLoggerPHPUnitTestListener.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/Permissions/PermissionManagerTest.php [new file with mode: 0644]
tests/phpunit/includes/TitlePermissionTest.php
tests/phpunit/includes/TitleTest.php
tests/phpunit/includes/api/ApiQuerySiteinfoTest.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/db/LoadBalancerTest.php
tests/phpunit/includes/libs/rdbms/database/DBConnRefTest.php
tests/phpunit/includes/media/MediaWikiMediaTestCase.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
tests/selenium/specs/rollback.js

index 2f71e4b..e85de79 100644 (file)
@@ -1,7 +1,7 @@
 warmup: true
 runs: 5
 scenarios:
-  Load a page:
+  Read a page:
     # The only page that exists by default is the main page.
     # But its actual name is configurable/unknown (T216791).
     # Omit 'title' to let MediaWiki show the default (which is the main page),
@@ -29,6 +29,18 @@ scenarios:
     probes:
       - screenshot
       - trace
+  View history of a page:
+    url: "{MW_SERVER}{MW_SCRIPT_PATH}/index.php?action=history"
+    viewport:
+      width: 1100
+      height: 700
+    reports:
+      - navtiming
+      - paint
+      - transfer
+    probes:
+      - screenshot
+      - trace
   View recent changes:
     url: "{MW_SERVER}{MW_SCRIPT_PATH}/index.php?title=Special:RecentChanges"
     viewport:
index e4ba47f..12e723d 100644 (file)
@@ -77,92 +77,46 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
        "PhanAccessMethodInternal",
        // approximate error count: 17
        "PhanCommentParamOnEmptyParamList",
-       // approximate error count: 30
+       // approximate error count: 29
        "PhanCommentParamWithoutRealParam",
        // approximate error count: 2
        "PhanCompatibleNegativeStringOffset",
-       // approximate error count: 1
-       "PhanEmptyFQSENInCallable",
-       // approximate error count: 1
-       "PhanInvalidCommentForDeclarationType",
-       // approximate error count: 6
-       "PhanNonClassMethodCall",
        // approximate error count: 21
        "PhanParamReqAfterOpt",
-       // approximate error count: 27
+       // approximate error count: 26
        "PhanParamSignatureMismatch",
        // approximate error count: 4
        "PhanParamSignatureMismatchInternal",
-       // approximate error count: 1
-       "PhanParamSignatureRealMismatchTooFewParameters",
-       // approximate error count: 1
-       "PhanParamSuspiciousOrder",
        // approximate error count: 127
        "PhanParamTooMany",
        // approximate error count: 2
-       "PhanParamTooManyCallable",
-       // approximate error count: 1
-       "PhanParamTooManyInternal",
-       // approximate error count: 2
-       "PhanPluginDuplicateExpressionBinaryOp",
-       // approximate error count: 2
        "PhanTraitParentReference",
-       // approximate error count: 27
+       // approximate error count: 30
        "PhanTypeArraySuspicious",
-       // approximate error count: 33
+       // approximate error count: 27
        "PhanTypeArraySuspiciousNullable",
        // approximate error count: 26
        "PhanTypeComparisonFromArray",
-       // approximate error count: 2
-       "PhanTypeComparisonToArray",
-       // approximate error count: 1
-       "PhanTypeConversionFromArray",
-       // approximate error count: 2
-       "PhanTypeExpectedObjectOrClassName",
-       // approximate error count: 7
-       "PhanTypeExpectedObjectPropAccess",
-       // approximate error count: 3
-       "PhanTypeInstantiateAbstract",
-       // approximate error count: 1
-       "PhanTypeInvalidCallableArraySize",
-       // approximate error count: 62
+       // approximate error count: 63
        "PhanTypeInvalidDimOffset",
-       // approximate error count: 10
-       "PhanTypeInvalidExpressionArrayDestructuring",
-       // approximate error count: 1
-       "PhanTypeInvalidLeftOperand",
        // approximate error count: 7
        "PhanTypeInvalidLeftOperandOfIntegerOp",
        // approximate error count: 2
-       "PhanTypeInvalidRightOperand",
-       // approximate error count: 2
        "PhanTypeInvalidRightOperandOfIntegerOp",
-       // approximate error count: 1
-       "PhanTypeMagicVoidWithReturn",
-       // approximate error count: 152
+       // approximate error count: 154
        "PhanTypeMismatchArgument",
-       // approximate error count: 28
+       // approximate error count: 27
        "PhanTypeMismatchArgumentInternal",
-       // approximate error count: 1
-       "PhanTypeMismatchBitwiseBinaryOperands",
-       // approximate error count: 1
-       "PhanTypeMismatchDeclaredParam",
        // approximate error count: 2
        "PhanTypeMismatchDimEmpty",
-       // approximate error count: 29
+       // approximate error count: 27
        "PhanTypeMismatchDimFetch",
        // approximate error count: 10
        "PhanTypeMismatchForeach",
        // approximate error count: 77
        "PhanTypeMismatchProperty",
-       // approximate error count: 88
+       // approximate error count: 84
        "PhanTypeMismatchReturn",
-       // approximate error count: 43
-       "PhanTypeMissingReturn",
-       // approximate error count: 1
-       "PhanTypeNoAccessiblePropertiesForeach",
-       // approximate error count: 4
-       "PhanTypeNonVarPassByRef",
        // approximate error count: 12
        "PhanTypeObjectUnsetDeclaredProperty",
        // approximate error count: 9
@@ -173,22 +127,14 @@ $cfg['suppress_issue_types'] = array_merge( $cfg['suppress_issue_types'], [
        "PhanUndeclaredConstant",
        // approximate error count: 3
        "PhanUndeclaredInvokeInCallable",
-       // approximate error count: 242
+       // approximate error count: 237
        "PhanUndeclaredMethod",
-       // approximate error count: 847
+       // approximate error count: 846
        "PhanUndeclaredProperty",
-       // approximate error count: 1
-       "PhanUndeclaredTypeReturnType",
-       // approximate error count: 3
-       "PhanUndeclaredTypeThrowsType",
        // approximate error count: 2
        "PhanUndeclaredVariableAssignOp",
        // approximate error count: 55
        "PhanUndeclaredVariableDim",
-       // approximate error count: 4
-       "PhanUnextractableAnnotationElementName",
-       // approximate error count: 4
-       "PhanUnextractableAnnotationSuffix",
 ] );
 
 $cfg['ignore_undeclared_variables_in_global_scope'] = true;
index 9939c54..170e16d 100644 (file)
                <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
                <exclude-pattern>*/includes/Feed\.php</exclude-pattern>
                <exclude-pattern>*/includes/filerepo/file/LocalFile\.php</exclude-pattern>
-               <exclude-pattern>*/includes/gallery/PackedOverlayImageGallery\.php</exclude-pattern>
                <exclude-pattern>*/includes/htmlform/HTMLFormElement\.php</exclude-pattern>
                <exclude-pattern>*/includes/libs/filebackend/FileBackendStore\.php</exclude-pattern>
                <exclude-pattern>*/includes/libs/filebackend/FSFileBackend\.php</exclude-pattern>
index 8c88911..1d18932 100644 (file)
@@ -440,6 +440,8 @@ because of Phabricator reports.
   insertions into links tables.
 * Category::newFromID( $id )->getID() will now return $id without any
   validation, to avoid a mostly unnecessary DB query.
+* On Special:Version, the name for an extension can no longer be arbitrary
+  html when no link is specified.
 
 == Compatibility ==
 MediaWiki 1.33 requires PHP 7.0.13 or later. Although HHVM 3.18.5 or later is
index bb1b3b2..b22aeab 100644 (file)
@@ -1070,7 +1070,7 @@ $wgAutoloadLocalClasses = [
        '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',
-       'PackedHoverImageGallery' => __DIR__ . '/includes/gallery/PackedOverlayImageGallery.php',
+       'PackedHoverImageGallery' => __DIR__ . '/includes/gallery/PackedHoverImageGallery.php',
        'PackedImageGallery' => __DIR__ . '/includes/gallery/PackedImageGallery.php',
        'PackedOverlayImageGallery' => __DIR__ . '/includes/gallery/PackedOverlayImageGallery.php',
        'Page' => __DIR__ . '/includes/page/Page.php',
@@ -1636,6 +1636,7 @@ $wgAutoloadLocalClasses = [
        'Wikimedia\\Rdbms\\DBQueryError' => __DIR__ . '/includes/libs/rdbms/exception/DBQueryError.php',
        'Wikimedia\\Rdbms\\DBQueryTimeoutError' => __DIR__ . '/includes/libs/rdbms/exception/DBQueryTimeoutError.php',
        'Wikimedia\\Rdbms\\DBReadOnlyError' => __DIR__ . '/includes/libs/rdbms/exception/DBReadOnlyError.php',
+       'Wikimedia\\Rdbms\\DBReadOnlyRoleError' => __DIR__ . '/includes/libs/rdbms/exception/DBReadOnlyRoleError.php',
        'Wikimedia\\Rdbms\\DBReplicationWaitError' => __DIR__ . '/includes/libs/rdbms/exception/DBReplicationWaitError.php',
        'Wikimedia\\Rdbms\\DBTransactionError' => __DIR__ . '/includes/libs/rdbms/exception/DBTransactionError.php',
        'Wikimedia\\Rdbms\\DBTransactionSizeError' => __DIR__ . '/includes/libs/rdbms/exception/DBTransactionSizeError.php',
index 3faf620..b6814c5 100644 (file)
@@ -65,7 +65,7 @@
                "jakub-onderka/php-console-highlighter": "0.3.2",
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "24.0.0",
+               "mediawiki/mediawiki-codesniffer": "25.0.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "3.1.5",
                "seld/jsonlint": "1.7.1",
index 5f2c129..21e535c 100644 (file)
@@ -1612,7 +1612,7 @@ $out: OutputPage object
 notifications.
 &$title: Title object of page
 &$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getCanonicalURL()
+$query: query options as string passed to Title::getCanonicalURL()
 
 'GetContentModels': Add content models to the list of available models.
 &$models: array containing current model list, as strings. Extensions should add to this list.
@@ -1650,7 +1650,7 @@ $single: Only extract the current language; if false, the prop value should
 'GetFullURL': Modify fully-qualified URLs used in redirects/export/offsite data.
 &$title: Title object of page
 &$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getFullURL()
+$query: query options as string passed to Title::getFullURL()
 
 'GetHumanTimestamp': Pre-emptively override the human-readable timestamp
 generated by MWTimestamp::getHumanTimestamp(). Return false in this hook to use
@@ -1664,7 +1664,7 @@ $lang: Language that will be used to render the timestamp
 'GetInternalURL': Modify fully-qualified URLs used for squid cache purging.
 &$title: Title object of page
 &$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getInternalURL()
+$query: query options as string passed to Title::getInternalURL()
 
 'GetIP': modify the ip of the current user (called only once).
 &$ip: string holding the ip as determined so far
@@ -1689,7 +1689,7 @@ be buggy for internal urls on render if you do not re-implement the horrible
 hack that Title::getLocalURL uses in your own extension.
 &$title: Title object of page
 &$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getLocalURL()
+$query: query options as string passed to Title::getLocalURL()
 
 'GetLocalURL::Article': Modify local URLs specifically pointing to article paths
 without any fancy queries or variants.
@@ -1699,7 +1699,7 @@ without any fancy queries or variants.
 'GetLocalURL::Internal': Modify local URLs to internal pages.
 &$title: Title object of page
 &$url: string value as output (out parameter, can modify)
-$query: query options passed to Title::getLocalURL()
+$query: query options as string passed to Title::getLocalURL()
 
 'GetLogTypesOnUser': Add log types where the target is a userpage
 &$types: Array of log types
index f8fbf83..fa11bcb 100644 (file)
@@ -134,6 +134,7 @@ class AutoLoader {
                        'MediaWiki\\Edit\\' => __DIR__ . '/edit/',
                        'MediaWiki\\EditPage\\' => __DIR__ . '/editpage/',
                        'MediaWiki\\Linker\\' => __DIR__ . '/linker/',
+                       'MediaWiki\\Permissions\\' => __DIR__ . '/Permissions/',
                        'MediaWiki\\Preferences\\' => __DIR__ . '/preferences/',
                        'MediaWiki\\Revision\\' => __DIR__ . '/Revision/',
                        'MediaWiki\\Session\\' => __DIR__ . '/session/',
index 1a60bb7..4a673c4 100644 (file)
@@ -202,6 +202,7 @@ class CommentStore {
         *   - fields: (string[]) to include in the `$vars` to `IDatabase->select()`
         *   - joins: (array) to include in the `$join_conds` to `IDatabase->select()`
         *  All tables, fields, and joins are aliased, so `+` is safe to use.
+        * @phan-return array{tables:string[],fields:string[],joins:array}
         */
        public function getJoin( $key = null ) {
                $key = $this->getKey( $key );
index b0a79e8..cdbc27a 100644 (file)
@@ -2136,7 +2136,7 @@ function wfStringToBool( $val ) {
  * @param string|string[] ...$args strings to escape and glue together,
  *  or a single array of strings parameter
  * @return string
- * @deprecated since 1.30 use MediaWiki\Shell::escape()
+ * @deprecated since 1.30 use MediaWiki\Shell\Shell::escape()
  */
 function wfEscapeShellArg( ...$args ) {
        return Shell::escape( ...$args );
index 4420d1d..3c77234 100644 (file)
@@ -125,6 +125,7 @@ class MagicWord {
         * @deprecated since 1.32, use MagicWordFactory::get
         */
        public static function get( $id ) {
+               wfDeprecated( __METHOD__, '1.32' );
                return MediaWikiServices::getInstance()->getMagicWordFactory()->get( $id );
        }
 
@@ -135,6 +136,7 @@ class MagicWord {
         * @deprecated since 1.32, use MagicWordFactory::getVariableIDs
         */
        public static function getVariableIDs() {
+               wfDeprecated( __METHOD__, '1.32' );
                return MediaWikiServices::getInstance()->getMagicWordFactory()->getVariableIDs();
        }
 
@@ -144,6 +146,7 @@ class MagicWord {
         * @deprecated since 1.32, use MagicWordFactory::getSubstIDs
         */
        public static function getSubstIDs() {
+               wfDeprecated( __METHOD__, '1.32' );
                return MediaWikiServices::getInstance()->getMagicWordFactory()->getSubstIDs();
        }
 
@@ -155,6 +158,7 @@ class MagicWord {
         * @deprecated since 1.32, use MagicWordFactory::getCacheTTL
         */
        public static function getCacheTTL( $id ) {
+               wfDeprecated( __METHOD__, '1.32' );
                return MediaWikiServices::getInstance()->getMagicWordFactory()->getCacheTTL( $id );
        }
 
@@ -165,6 +169,7 @@ class MagicWord {
         * @deprecated since 1.32, use MagicWordFactory::getDoubleUnderscoreArray
         */
        public static function getDoubleUnderscoreArray() {
+               wfDeprecated( __METHOD__, '1.32' );
                return MediaWikiServices::getInstance()->getMagicWordFactory()->getDoubleUnderscoreArray();
        }
 
index 292e8df..6bf5d1d 100644 (file)
@@ -14,6 +14,7 @@ use Hooks;
 use IBufferingStatsdDataFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
 use MediaWiki\Http\HttpRequestFactory;
+use MediaWiki\Permissions\PermissionManager;
 use MediaWiki\Preferences\PreferencesFactory;
 use MediaWiki\Shell\CommandFactory;
 use MediaWiki\Revision\RevisionRenderer;
@@ -721,6 +722,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'PerDbNameStatsdDataFactory' );
        }
 
+       /**
+        * @since 1.33
+        * @return PermissionManager
+        */
+       public function getPermissionManager() {
+               return $this->getService( 'PermissionManager' );
+       }
+
        /**
         * @since 1.31
         * @return PreferencesFactory
index db5750a..2edd669 100644 (file)
@@ -427,8 +427,8 @@ class MovePage {
         * Can also be used to revert after a DB failure.
         *
         * @private
-        * @param Title Old location to move the file from.
-        * @param Title New location to move the file to.
+        * @param Title $oldTitle Old location to move the file from.
+        * @param Title $newTitle New location to move the file to.
         * @return Status
         */
        private function moveFile( $oldTitle, $newTitle ) {
index 786ecc4..b0000ab 100644 (file)
@@ -2187,7 +2187,7 @@ class OutputPage extends ContextSource {
         * Parse wikitext and return the HTML (internal implementation helper)
         *
         * @param string $text
-        * @param Title The title to use
+        * @param Title $title The title to use
         * @param bool $linestart Is this the start of a line?
         * @param bool $tidy Whether the output should be tidied
         * @param bool $interface Use interface language (instead of content language) while parsing
@@ -3223,7 +3223,10 @@ class OutputPage extends ContextSource {
                // Use an IE conditional comment to serve the script only to old IE
                $pieces[] = '<!--[if lt IE 9]>' .
                        ResourceLoaderClientHtml::makeLoad(
-                               ResourceLoaderContext::newDummyContext(),
+                               new ResourceLoaderContext(
+                                       $this->getResourceLoader(),
+                                       new FauxRequest( [] )
+                               ),
                                [ 'html5shiv' ],
                                ResourceLoaderModule::TYPE_SCRIPTS,
                                [ 'sync' => true ],
diff --git a/includes/Permissions/PermissionManager.php b/includes/Permissions/PermissionManager.php
new file mode 100644 (file)
index 0000000..1d94e0e
--- /dev/null
@@ -0,0 +1,1047 @@
+<?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\Permissions;
+
+use Action;
+use Exception;
+use FatalError;
+use Hooks;
+use MediaWiki\Linker\LinkTarget;
+use MediaWiki\Special\SpecialPageFactory;
+use MessageSpecifier;
+use MWException;
+use MWNamespace;
+use RequestContext;
+use SpecialPage;
+use Title;
+use User;
+use WikiPage;
+
+/**
+ * A service class for checking permissions
+ * To obtain an instance, use MediaWikiServices::getInstance()->getPermissionManager().
+ *
+ * @since 1.33
+ */
+class PermissionManager {
+
+       /** @var string Does cheap permission checks from replica DBs (usable for GUI creation) */
+       const RIGOR_QUICK = 'quick';
+
+       /** @var string Does cheap and expensive checks possibly from a replica DB */
+       const RIGOR_FULL = 'full';
+
+       /** @var string Does cheap and expensive checks, using the master as needed */
+       const RIGOR_SECURE = 'secure';
+
+       /** @var SpecialPageFactory */
+       private $specialPageFactory;
+
+       /** @var string[] List of pages names anonymous user may see */
+       private $whitelistRead;
+
+       /** @var string[] Whitelists publicly readable titles with regular expressions */
+       private $whitelistReadRegexp;
+
+       /** @var bool Require users to confirm email address before they can edit */
+       private $emailConfirmToEdit;
+
+       /** @var bool If set to true, blocked users will no longer be allowed to log in */
+       private $blockDisablesLogin;
+
+       /**
+        * @param SpecialPageFactory $specialPageFactory
+        * @param string[] $whitelistRead
+        * @param string[] $whitelistReadRegexp
+        * @param bool $emailConfirmToEdit
+        * @param bool $blockDisablesLogin
+        */
+       public function __construct(
+               SpecialPageFactory $specialPageFactory,
+               $whitelistRead,
+               $whitelistReadRegexp,
+               $emailConfirmToEdit,
+               $blockDisablesLogin
+       ) {
+               $this->specialPageFactory = $specialPageFactory;
+               $this->whitelistRead = $whitelistRead;
+               $this->whitelistReadRegexp = $whitelistReadRegexp;
+               $this->emailConfirmToEdit = $emailConfirmToEdit;
+               $this->blockDisablesLogin = $blockDisablesLogin;
+       }
+
+       /**
+        * Can $user perform $action on a page?
+        *
+        * The method is intended to replace Title::userCan()
+        * The $user parameter need to be superseded by UserIdentity value in future
+        * The $title parameter need to be superseded by PageIdentity value in future
+        *
+        * @see Title::userCan()
+        *
+        * @param string $action
+        * @param User $user
+        * @param LinkTarget $page
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        *
+        * @return bool
+        * @throws Exception
+        */
+       public function userCan( $action, User $user, LinkTarget $page, $rigor = self::RIGOR_SECURE ) {
+               return !count( $this->getPermissionErrorsInternal( $action, $user, $page, $rigor, true ) );
+       }
+
+       /**
+        * Can $user perform $action on a page?
+        *
+        * @todo FIXME: This *does not* check throttles (User::pingLimiter()).
+        *
+        * @param string $action Action that permission needs to be checked for
+        * @param User $user User to check
+        * @param LinkTarget $page
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param array $ignoreErrors Array of Strings Set this to a list of message keys
+        *   whose corresponding errors may be ignored.
+        *
+        * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
+        * @throws Exception
+        */
+       public function getPermissionErrors(
+               $action,
+               User $user,
+               LinkTarget $page,
+               $rigor = self::RIGOR_SECURE,
+               $ignoreErrors = []
+       ) {
+               $errors = $this->getPermissionErrorsInternal( $action, $user, $page, $rigor );
+
+               // Remove the errors being ignored.
+               foreach ( $errors as $index => $error ) {
+                       $errKey = is_array( $error ) ? $error[0] : $error;
+
+                       if ( in_array( $errKey, $ignoreErrors ) ) {
+                               unset( $errors[$index] );
+                       }
+                       if ( $errKey instanceof MessageSpecifier && in_array( $errKey->getKey(), $ignoreErrors ) ) {
+                               unset( $errors[$index] );
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check if user is blocked from editing a particular article
+        *
+        * @param User $user
+        * @param LinkTarget $page Title to check
+        * @param bool $fromReplica Whether to check the replica DB instead of the master
+        *
+        * @return bool
+        * @throws FatalError
+        * @throws MWException
+        */
+       public function isBlockedFrom( User $user, LinkTarget $page, $fromReplica = false ) {
+               $blocked = $user->isHidden();
+
+               // TODO: remove upon further migration to LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+
+               if ( !$blocked ) {
+                       $block = $user->getBlock( $fromReplica );
+                       if ( $block ) {
+                               // Special handling for a user's own talk page. The block is not aware
+                               // of the user, so this must be done here.
+                               if ( $page->equals( $user->getTalkPage() ) ) {
+                                       $blocked = $block->appliesToUsertalk( $page );
+                               } else {
+                                       $blocked = $block->appliesToTitle( $page );
+                               }
+                       }
+               }
+
+               // only for the purpose of the hook. We really don't need this here.
+               $allowUsertalk = $user->isAllowUsertalk();
+
+               Hooks::run( 'UserIsBlockedFrom', [ $user, $page, &$blocked, &$allowUsertalk ] );
+
+               return $blocked;
+       }
+
+       /**
+        * Can $user perform $action on a page? This is an internal function,
+        * with multiple levels of checks depending on performance needs; see $rigor below.
+        * It does not check wfReadOnly().
+        *
+        * @param string $action Action that permission needs to be checked for
+        * @param User $user User to check
+        * @param LinkTarget $page
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Set this to true to stop after the first permission error.
+        *
+        * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
+        * @throws Exception
+        */
+       private function getPermissionErrorsInternal(
+               $action,
+               User $user,
+               LinkTarget $page,
+               $rigor = self::RIGOR_SECURE,
+               $short = false
+       ) {
+               if ( !in_array( $rigor, [ self::RIGOR_QUICK, self::RIGOR_FULL, self::RIGOR_SECURE ] ) ) {
+                       throw new Exception( "Invalid rigor parameter '$rigor'." );
+               }
+
+               # Read has special handling
+               if ( $action == 'read' ) {
+                       $checks = [
+                               'checkPermissionHooks',
+                               'checkReadPermissions',
+                               'checkUserBlock', // for wgBlockDisablesLogin
+                       ];
+                       # Don't call checkSpecialsAndNSPermissions, checkSiteConfigPermissions
+                       # or checkUserConfigPermissions here as it will lead to duplicate
+                       # error messages. This is okay to do since anywhere that checks for
+                       # create will also check for edit, and those checks are called for edit.
+               } elseif ( $action == 'create' ) {
+                       $checks = [
+                               'checkQuickPermissions',
+                               'checkPermissionHooks',
+                               'checkPageRestrictions',
+                               'checkCascadingSourcesRestrictions',
+                               'checkActionPermissions',
+                               'checkUserBlock'
+                       ];
+               } else {
+                       $checks = [
+                               'checkQuickPermissions',
+                               'checkPermissionHooks',
+                               'checkSpecialsAndNSPermissions',
+                               'checkSiteConfigPermissions',
+                               'checkUserConfigPermissions',
+                               'checkPageRestrictions',
+                               'checkCascadingSourcesRestrictions',
+                               'checkActionPermissions',
+                               'checkUserBlock'
+                       ];
+               }
+
+               $errors = [];
+               foreach ( $checks as $method ) {
+                       $errors = $this->$method( $action, $user, $errors, $rigor, $short, $page );
+
+                       if ( $short && $errors !== [] ) {
+                               break;
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check various permission hooks
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        * @throws FatalError
+        * @throws MWException
+        */
+       private function checkPermissionHooks(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove when LinkTarget usage will expand further
+               $page = Title::newFromLinkTarget( $page );
+               // Use getUserPermissionsErrors instead
+               $result = '';
+               if ( !Hooks::run( 'userCan', [ &$page, &$user, $action, &$result ] ) ) {
+                       return $result ? [] : [ [ 'badaccess-group0' ] ];
+               }
+               // Check getUserPermissionsErrors hook
+               if ( !Hooks::run( 'getUserPermissionsErrors', [ &$page, &$user, $action, &$result ] ) ) {
+                       $errors = $this->resultToError( $errors, $result );
+               }
+               // Check getUserPermissionsErrorsExpensive hook
+               if (
+                       $rigor !== self::RIGOR_QUICK
+                       && !( $short && count( $errors ) > 0 )
+                       && !Hooks::run( 'getUserPermissionsErrorsExpensive', [ &$page, &$user, $action, &$result ] )
+               ) {
+                       $errors = $this->resultToError( $errors, $result );
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Add the resulting error code to the errors array
+        *
+        * @param array $errors List of current errors
+        * @param array $result Result of errors
+        *
+        * @return array List of errors
+        */
+       private function resultToError( $errors, $result ) {
+               if ( is_array( $result ) && count( $result ) && !is_array( $result[0] ) ) {
+                       // A single array representing an error
+                       $errors[] = $result;
+               } elseif ( is_array( $result ) && is_array( $result[0] ) ) {
+                       // A nested array representing multiple errors
+                       $errors = array_merge( $errors, $result );
+               } elseif ( $result !== '' && is_string( $result ) ) {
+                       // A string representing a message-id
+                       $errors[] = [ $result ];
+               } elseif ( $result instanceof MessageSpecifier ) {
+                       // A message specifier representing an error
+                       $errors[] = [ $result ];
+               } elseif ( $result === false ) {
+                       // a generic "We don't want them to do that"
+                       $errors[] = [ 'badaccess-group0' ];
+               }
+               return $errors;
+       }
+
+       /**
+        * Check that the user is allowed to read this page.
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        * @throws FatalError
+        * @throws MWException
+        */
+       private function checkReadPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove when LinkTarget usage will expand further
+               $page = Title::newFromLinkTarget( $page );
+
+               $whitelisted = false;
+               if ( User::isEveryoneAllowed( 'read' ) ) {
+                       # Shortcut for public wikis, allows skipping quite a bit of code
+                       $whitelisted = true;
+               } elseif ( $user->isAllowed( 'read' ) ) {
+                       # If the user is allowed to read pages, he is allowed to read all pages
+                       $whitelisted = true;
+               } elseif ( $this->isSameSpecialPage( 'Userlogin', $page )
+                                  || $this->isSameSpecialPage( 'PasswordReset', $page )
+                                  || $this->isSameSpecialPage( 'Userlogout', $page )
+               ) {
+                       # Always grant access to the login page.
+                       # Even anons need to be able to log in.
+                       $whitelisted = true;
+               } elseif ( is_array( $this->whitelistRead ) && count( $this->whitelistRead ) ) {
+                       # Time to check the whitelist
+                       # Only do these checks is there's something to check against
+                       $name = $page->getPrefixedText();
+                       $dbName = $page->getPrefixedDBkey();
+
+                       // Check for explicit whitelisting with and without underscores
+                       if ( in_array( $name, $this->whitelistRead, true )
+                                || in_array( $dbName, $this->whitelistRead, true ) ) {
+                               $whitelisted = true;
+                       } elseif ( $page->getNamespace() == NS_MAIN ) {
+                               # Old settings might have the title prefixed with
+                               # a colon for main-namespace pages
+                               if ( in_array( ':' . $name, $this->whitelistRead ) ) {
+                                       $whitelisted = true;
+                               }
+                       } elseif ( $page->isSpecialPage() ) {
+                               # If it's a special page, ditch the subpage bit and check again
+                               $name = $page->getDBkey();
+                               list( $name, /* $subpage */ ) =
+                                       $this->specialPageFactory->resolveAlias( $name );
+                               if ( $name ) {
+                                       $pure = SpecialPage::getTitleFor( $name )->getPrefixedText();
+                                       if ( in_array( $pure, $this->whitelistRead, true ) ) {
+                                               $whitelisted = true;
+                                       }
+                               }
+                       }
+               }
+
+               if ( !$whitelisted && is_array( $this->whitelistReadRegexp )
+                        && !empty( $this->whitelistReadRegexp ) ) {
+                       $name = $page->getPrefixedText();
+                       // Check for regex whitelisting
+                       foreach ( $this->whitelistReadRegexp as $listItem ) {
+                               if ( preg_match( $listItem, $name ) ) {
+                                       $whitelisted = true;
+                                       break;
+                               }
+                       }
+               }
+
+               if ( !$whitelisted ) {
+                       # If the title is not whitelisted, give extensions a chance to do so...
+                       Hooks::run( 'TitleReadWhitelist', [ $page, $user, &$whitelisted ] );
+                       if ( !$whitelisted ) {
+                               $errors[] = $this->missingPermissionError( $action, $short );
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Get a description array when the user doesn't have the right to perform
+        * $action (i.e. when User::isAllowed() returns false)
+        *
+        * @param string $action The action to check
+        * @param bool $short Short circuit on first error
+        * @return array Array containing an error message key and any parameters
+        */
+       private function missingPermissionError( $action, $short ) {
+               // We avoid expensive display logic for quickUserCan's and such
+               if ( $short ) {
+                       return [ 'badaccess-group0' ];
+               }
+
+               // TODO: it would be a good idea to replace the method below with something else like
+               //  maybe callback injection
+               return User::newFatalPermissionDeniedStatus( $action )->getErrorsArray()[0];
+       }
+
+       /**
+        * Returns true if this title resolves to the named special page
+        *
+        * @param string $name The special page name
+        * @param LinkTarget $page
+        *
+        * @return bool
+        */
+       private function isSameSpecialPage( $name, LinkTarget $page ) {
+               if ( $page->getNamespace() == NS_SPECIAL ) {
+                       list( $thisName, /* $subpage */ ) =
+                               $this->specialPageFactory->resolveAlias( $page->getDBkey() );
+                       if ( $name == $thisName ) {
+                               return true;
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Check that the user isn't blocked from editing.
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        * @throws MWException
+        */
+       private function checkUserBlock(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // Account creation blocks handled at userlogin.
+               // Unblocking handled in SpecialUnblock
+               if ( $rigor === self::RIGOR_QUICK || in_array( $action, [ 'createaccount', 'unblock' ] ) ) {
+                       return $errors;
+               }
+
+               // Optimize for a very common case
+               if ( $action === 'read' && !$this->blockDisablesLogin ) {
+                       return $errors;
+               }
+
+               if ( $this->emailConfirmToEdit
+                        && !$user->isEmailConfirmed()
+                        && $action === 'edit'
+               ) {
+                       $errors[] = [ 'confirmedittext' ];
+               }
+
+               $useReplica = ( $rigor !== self::RIGOR_SECURE );
+               $block = $user->getBlock( $useReplica );
+
+               // If the user does not have a block, or the block they do have explicitly
+               // allows the action (like "read" or "upload").
+               if ( !$block || $block->appliesToRight( $action ) === false ) {
+                       return $errors;
+               }
+
+               // Determine if the user is blocked from this action on this page.
+               // What gets passed into this method is a user right, not an action name.
+               // There is no way to instantiate an action by restriction. However, this
+               // will get the action where the restriction is the same. This may result
+               // in actions being blocked that shouldn't be.
+               $actionObj = null;
+               if ( Action::exists( $action ) ) {
+                       // TODO: this drags a ton of dependencies in, would be good to avoid WikiPage
+                       //  instantiation and decouple it creating an ActionPermissionChecker interface
+                       $wikiPage = WikiPage::factory( Title::newFromLinkTarget( $page, 'clone' ) );
+                       // Creating an action will perform several database queries to ensure that
+                       // the action has not been overridden by the content type.
+                       // FIXME: avoid use of RequestContext since it drags in User and Title dependencies
+                       //  probably we may use fake context object since it's unlikely that Action uses it
+                       //  anyway. It would be nice if we could avoid instantiating the Action at all.
+                       $actionObj = Action::factory( $action, $wikiPage, RequestContext::getMain() );
+                       // Ensure that the retrieved action matches the restriction.
+                       if ( $actionObj && $actionObj->getRestriction() !== $action ) {
+                               $actionObj = null;
+                       }
+               }
+
+               // If no action object is returned, assume that the action requires unblock
+               // which is the default.
+               if ( !$actionObj || $actionObj->requiresUnblock() ) {
+                       if ( $this->isBlockedFrom( $user, $page, $useReplica ) ) {
+                               // @todo FIXME: Pass the relevant context into this function.
+                               $errors[] = $block->getPermissionsError( RequestContext::getMain() );
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Permissions checks that fail most often, and which are easiest to test.
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        * @throws FatalError
+        * @throws MWException
+        */
+       private function checkQuickPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove when LinkTarget usage will expand further
+               $page = Title::newFromLinkTarget( $page );
+
+               if ( !Hooks::run( 'TitleQuickPermissions',
+                       [ $page, $user, $action, &$errors, ( $rigor !== self::RIGOR_QUICK ), $short ] )
+               ) {
+                       return $errors;
+               }
+
+               $isSubPage = MWNamespace::hasSubpages( $page->getNamespace() ) ?
+                       strpos( $page->getText(), '/' ) !== false : false;
+
+               if ( $action == 'create' ) {
+                       if (
+                               ( MWNamespace::isTalk( $page->getNamespace() ) && !$user->isAllowed( 'createtalk' ) ) ||
+                               ( !MWNamespace::isTalk( $page->getNamespace() ) && !$user->isAllowed( 'createpage' ) )
+                       ) {
+                               $errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ];
+                       }
+               } elseif ( $action == 'move' ) {
+                       if ( !$user->isAllowed( 'move-rootuserpages' )
+                                && $page->getNamespace() == NS_USER && !$isSubPage ) {
+                               // Show user page-specific message only if the user can move other pages
+                               $errors[] = [ 'cant-move-user-page' ];
+                       }
+
+                       // Check if user is allowed to move files if it's a file
+                       if ( $page->getNamespace() == NS_FILE && !$user->isAllowed( 'movefile' ) ) {
+                               $errors[] = [ 'movenotallowedfile' ];
+                       }
+
+                       // Check if user is allowed to move category pages if it's a category page
+                       if ( $page->getNamespace() == NS_CATEGORY && !$user->isAllowed( 'move-categorypages' ) ) {
+                               $errors[] = [ 'cant-move-category-page' ];
+                       }
+
+                       if ( !$user->isAllowed( 'move' ) ) {
+                               // User can't move anything
+                               $userCanMove = User::groupHasPermission( 'user', 'move' );
+                               $autoconfirmedCanMove = User::groupHasPermission( 'autoconfirmed', 'move' );
+                               if ( $user->isAnon() && ( $userCanMove || $autoconfirmedCanMove ) ) {
+                                       // custom message if logged-in users without any special rights can move
+                                       $errors[] = [ 'movenologintext' ];
+                               } else {
+                                       $errors[] = [ 'movenotallowed' ];
+                               }
+                       }
+               } elseif ( $action == 'move-target' ) {
+                       if ( !$user->isAllowed( 'move' ) ) {
+                               // User can't move anything
+                               $errors[] = [ 'movenotallowed' ];
+                       } elseif ( !$user->isAllowed( 'move-rootuserpages' )
+                                          && $page->getNamespace() == NS_USER && !$isSubPage ) {
+                               // Show user page-specific message only if the user can move other pages
+                               $errors[] = [ 'cant-move-to-user-page' ];
+                       } elseif ( !$user->isAllowed( 'move-categorypages' )
+                                          && $page->getNamespace() == NS_CATEGORY ) {
+                               // Show category page-specific message only if the user can move other pages
+                               $errors[] = [ 'cant-move-to-category-page' ];
+                       }
+               } elseif ( !$user->isAllowed( $action ) ) {
+                       $errors[] = $this->missingPermissionError( $action, $short );
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check against page_restrictions table requirements on this
+        * page. The user must possess all required rights for this
+        * action.
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        */
+       private function checkPageRestrictions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+               foreach ( $page->getRestrictions( $action ) as $right ) {
+                       // Backwards compatibility, rewrite sysop -> editprotected
+                       if ( $right == 'sysop' ) {
+                               $right = 'editprotected';
+                       }
+                       // Backwards compatibility, rewrite autoconfirmed -> editsemiprotected
+                       if ( $right == 'autoconfirmed' ) {
+                               $right = 'editsemiprotected';
+                       }
+                       if ( $right == '' ) {
+                               continue;
+                       }
+                       if ( !$user->isAllowed( $right ) ) {
+                               $errors[] = [ 'protectedpagetext', $right, $action ];
+                       } elseif ( $page->areRestrictionsCascading() && !$user->isAllowed( 'protect' ) ) {
+                               $errors[] = [ 'protectedpagetext', 'protect', $action ];
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check restrictions on cascading pages.
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        */
+       private function checkCascadingSourcesRestrictions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+               if ( $rigor !== self::RIGOR_QUICK && !$page->isUserConfigPage() ) {
+                       # We /could/ use the protection level on the source page, but it's
+                       # fairly ugly as we have to establish a precedence hierarchy for pages
+                       # included by multiple cascade-protected pages. So just restrict
+                       # it to people with 'protect' permission, as they could remove the
+                       # protection anyway.
+                       list( $cascadingSources, $restrictions ) = $page->getCascadeProtectionSources();
+                       # Cascading protection depends on more than this page...
+                       # Several cascading protected pages may include this page...
+                       # Check each cascading level
+                       # This is only for protection restrictions, not for all actions
+                       if ( isset( $restrictions[$action] ) ) {
+                               foreach ( $restrictions[$action] as $right ) {
+                                       // Backwards compatibility, rewrite sysop -> editprotected
+                                       if ( $right == 'sysop' ) {
+                                               $right = 'editprotected';
+                                       }
+                                       // Backwards compatibility, rewrite autoconfirmed -> editsemiprotected
+                                       if ( $right == 'autoconfirmed' ) {
+                                               $right = 'editsemiprotected';
+                                       }
+                                       if ( $right != '' && !$user->isAllowedAll( 'protect', $right ) ) {
+                                               $wikiPages = '';
+                                               foreach ( $cascadingSources as $wikiPage ) {
+                                                       $wikiPages .= '* [[:' . $wikiPage->getPrefixedText() . "]]\n";
+                                               }
+                                               $errors[] = [ 'cascadeprotected', count( $cascadingSources ), $wikiPages, $action ];
+                                       }
+                               }
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check action permissions not already checked in checkQuickPermissions
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        * @throws Exception
+        */
+       private function checkActionPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               global $wgDeleteRevisionsLimit, $wgLang;
+
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+
+               if ( $action == 'protect' ) {
+                       if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $page, $rigor, true ) ) ) {
+                               // If they can't edit, they shouldn't protect.
+                               $errors[] = [ 'protect-cantedit' ];
+                       }
+               } elseif ( $action == 'create' ) {
+                       $title_protection = $page->getTitleProtection();
+                       if ( $title_protection ) {
+                               if ( $title_protection['permission'] == ''
+                                        || !$user->isAllowed( $title_protection['permission'] )
+                               ) {
+                                       $errors[] = [
+                                               'titleprotected',
+                                               // TODO: get rid of the User dependency
+                                               User::whoIs( $title_protection['user'] ),
+                                               $title_protection['reason']
+                                       ];
+                               }
+                       }
+               } elseif ( $action == 'move' ) {
+                       // Check for immobile pages
+                       if ( !MWNamespace::isMovable( $page->getNamespace() ) ) {
+                               // Specific message for this case
+                               $errors[] = [ 'immobile-source-namespace', $page->getNsText() ];
+                       } elseif ( !$page->isMovable() ) {
+                               // Less specific message for rarer cases
+                               $errors[] = [ 'immobile-source-page' ];
+                       }
+               } elseif ( $action == 'move-target' ) {
+                       if ( !MWNamespace::isMovable( $page->getNamespace() ) ) {
+                               $errors[] = [ 'immobile-target-namespace', $page->getNsText() ];
+                       } elseif ( !$page->isMovable() ) {
+                               $errors[] = [ 'immobile-target-page' ];
+                       }
+               } elseif ( $action == 'delete' ) {
+                       $tempErrors = $this->checkPageRestrictions( 'edit', $user, [], $rigor, true, $page );
+                       if ( !$tempErrors ) {
+                               $tempErrors = $this->checkCascadingSourcesRestrictions( 'edit',
+                                       $user, $tempErrors, $rigor, true, $page );
+                       }
+                       if ( $tempErrors ) {
+                               // If protection keeps them from editing, they shouldn't be able to delete.
+                               $errors[] = [ 'deleteprotected' ];
+                       }
+                       if ( $rigor !== self::RIGOR_QUICK && $wgDeleteRevisionsLimit
+                                && !$this->userCan( 'bigdelete', $user, $page ) && $page->isBigDeletion()
+                       ) {
+                               $errors[] = [ 'delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ];
+                       }
+               } elseif ( $action === 'undelete' ) {
+                       if ( count( $this->getPermissionErrorsInternal( 'edit', $user, $page, $rigor, true ) ) ) {
+                               // Undeleting implies editing
+                               $errors[] = [ 'undelete-cantedit' ];
+                       }
+                       if ( !$page->exists()
+                                && count( $this->getPermissionErrorsInternal( 'create', $user, $page, $rigor, true ) )
+                       ) {
+                               // Undeleting where nothing currently exists implies creating
+                               $errors[] = [ 'undelete-cantcreate' ];
+                       }
+               }
+               return $errors;
+       }
+
+       /**
+        * Check permissions on special pages & namespaces
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        */
+       private function checkSpecialsAndNSPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+
+               # Only 'createaccount' can be performed on special pages,
+               # which don't actually exist in the DB.
+               if ( $page->getNamespace() == NS_SPECIAL && $action !== 'createaccount' ) {
+                       $errors[] = [ 'ns-specialprotected' ];
+               }
+
+               # Check $wgNamespaceProtection for restricted namespaces
+               if ( $page->isNamespaceProtected( $user ) ) {
+                       $ns = $page->getNamespace() == NS_MAIN ?
+                               wfMessage( 'nstab-main' )->text() : $page->getNsText();
+                       $errors[] = $page->getNamespace() == NS_MEDIAWIKI ?
+                               [ 'protectedinterface', $action ] : [ 'namespaceprotected', $ns, $action ];
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check sitewide CSS/JSON/JS permissions
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        */
+       private function checkSiteConfigPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+
+               if ( $action != 'patrol' ) {
+                       $error = null;
+                       // Sitewide CSS/JSON/JS changes, like all NS_MEDIAWIKI changes, also require the
+                       // editinterface right. That's implemented as a restriction so no check needed here.
+                       if ( $page->isSiteCssConfigPage() && !$user->isAllowed( 'editsitecss' ) ) {
+                               $error = [ 'sitecssprotected', $action ];
+                       } elseif ( $page->isSiteJsonConfigPage() && !$user->isAllowed( 'editsitejson' ) ) {
+                               $error = [ 'sitejsonprotected', $action ];
+                       } elseif ( $page->isSiteJsConfigPage() && !$user->isAllowed( 'editsitejs' ) ) {
+                               $error = [ 'sitejsprotected', $action ];
+                       } elseif ( $page->isRawHtmlMessage() ) {
+                               // Raw HTML can be used to deploy CSS or JS so require rights for both.
+                               if ( !$user->isAllowed( 'editsitejs' ) ) {
+                                       $error = [ 'sitejsprotected', $action ];
+                               } elseif ( !$user->isAllowed( 'editsitecss' ) ) {
+                                       $error = [ 'sitecssprotected', $action ];
+                               }
+                       }
+
+                       if ( $error ) {
+                               if ( $user->isAllowed( 'editinterface' ) ) {
+                                       // Most users / site admins will probably find out about the new, more restrictive
+                                       // permissions by failing to edit something. Give them more info.
+                                       // TODO remove this a few release cycles after 1.32
+                                       $error = [ 'interfaceadmin-info', wfMessage( $error[0], $error[1] ) ];
+                               }
+                               $errors[] = $error;
+                       }
+               }
+
+               return $errors;
+       }
+
+       /**
+        * Check CSS/JSON/JS sub-page permissions
+        *
+        * @param string $action The action to check
+        * @param User $user User to check
+        * @param array $errors List of current errors
+        * @param string $rigor One of PermissionManager::RIGOR_ constants
+        *   - RIGOR_QUICK  : does cheap permission checks from replica DBs (usable for GUI creation)
+        *   - RIGOR_FULL   : does cheap and expensive checks possibly from a replica DB
+        *   - RIGOR_SECURE : does cheap and expensive checks, using the master as needed
+        * @param bool $short Short circuit on first error
+        *
+        * @param LinkTarget $page
+        *
+        * @return array List of errors
+        */
+       private function checkUserConfigPermissions(
+               $action,
+               User $user,
+               $errors,
+               $rigor,
+               $short,
+               LinkTarget $page
+       ) {
+               // TODO: remove & rework upon further use of LinkTarget
+               $page = Title::newFromLinkTarget( $page );
+
+               # Protect css/json/js subpages of user pages
+               # XXX: this might be better using restrictions
+
+               if ( $action === 'patrol' ) {
+                       return $errors;
+               }
+
+               if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $page->getText() ) ) {
+                       // Users need editmyuser* to edit their own CSS/JSON/JS subpages.
+                       if (
+                               $page->isUserCssConfigPage()
+                               && !$user->isAllowedAny( 'editmyusercss', 'editusercss' )
+                       ) {
+                               $errors[] = [ 'mycustomcssprotected', $action ];
+                       } elseif (
+                               $page->isUserJsonConfigPage()
+                               && !$user->isAllowedAny( 'editmyuserjson', 'edituserjson' )
+                       ) {
+                               $errors[] = [ 'mycustomjsonprotected', $action ];
+                       } elseif (
+                               $page->isUserJsConfigPage()
+                               && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' )
+                       ) {
+                               $errors[] = [ 'mycustomjsprotected', $action ];
+                       }
+               } else {
+                       // Users need editmyuser* to edit their own CSS/JSON/JS subpages, except for
+                       // deletion/suppression which cannot be used for attacks and we want to avoid the
+                       // situation where an unprivileged user can post abusive content on their subpages
+                       // and only very highly privileged users could remove it.
+                       if ( !in_array( $action, [ 'delete', 'deleterevision', 'suppressrevision' ], true ) ) {
+                               if (
+                                       $page->isUserCssConfigPage()
+                                       && !$user->isAllowed( 'editusercss' )
+                               ) {
+                                       $errors[] = [ 'customcssprotected', $action ];
+                               } elseif (
+                                       $page->isUserJsonConfigPage()
+                                       && !$user->isAllowed( 'edituserjson' )
+                               ) {
+                                       $errors[] = [ 'customjsonprotected', $action ];
+                               } elseif (
+                                       $page->isUserJsConfigPage()
+                                       && !$user->isAllowed( 'edituserjs' )
+                               ) {
+                                       $errors[] = [ 'customjsprotected', $action ];
+                               }
+                       }
+               }
+
+               return $errors;
+       }
+
+}
index 2a54a9b..0329bd1 100644 (file)
@@ -1670,6 +1670,7 @@ class RevisionStore
        ) {
                if ( !$this->hasMcrSchemaFlags( SCHEMA_COMPAT_READ_NEW ) ) {
                        $mainSlot = $this->emulateMainSlot_1_29( $revisionRow, $queryFlags, $title );
+                       // @phan-suppress-next-line PhanTypeInvalidCallableArraySize false positive
                        $slots = new RevisionSlots( [ SlotRecord::MAIN => $mainSlot ] );
                } else {
                        // XXX: do we need the same kind of caching here
index e121898..a7e8c0b 100644 (file)
@@ -46,6 +46,7 @@ use MediaWiki\Linker\LinkRenderer;
 use MediaWiki\Linker\LinkRendererFactory;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Permissions\PermissionManager;
 use MediaWiki\Preferences\PreferencesFactory;
 use MediaWiki\Preferences\DefaultPreferencesFactory;
 use MediaWiki\Revision\MainSlotRoleHandler;
@@ -367,7 +368,8 @@ return [
                        $services->getContentLanguage(),
                        wfUrlProtocols(),
                        $services->getSpecialPageFactory(),
-                       $services->getMainConfig()
+                       $services->getMainConfig(),
+                       $services->getLinkRendererFactory()
                );
        },
 
@@ -389,6 +391,16 @@ return [
                );
        },
 
+       'PermissionManager' => function ( MediaWikiServices $services ) : PermissionManager {
+               $config = $services->getMainConfig();
+               return new PermissionManager(
+                       $services->getSpecialPageFactory(),
+                       $config->get( 'WhitelistRead' ),
+                       $config->get( 'WhitelistReadRegexp' ),
+                       $config->get( 'EmailConfirmToEdit' ),
+                       $config->get( 'BlockDisablesLogin' ) );
+       },
+
        'PreferencesFactory' => function ( MediaWikiServices $services ) : PreferencesFactory {
                $factory = new DefaultPreferencesFactory(
                        $services->getMainConfig(),
@@ -417,6 +429,7 @@ return [
        },
 
        'ResourceLoader' => function ( MediaWikiServices $services ) : ResourceLoader {
+               global $IP;
                $config = $services->getMainConfig();
 
                $rl = new ResourceLoader(
@@ -424,6 +437,7 @@ return [
                        LoggerFactory::getInstance( 'resourceloader' )
                );
                $rl->addSource( $config->get( 'ResourceLoaderSources' ) );
+               $rl->register( include "$IP/resources/Resources.php" );
 
                return $rl;
        },
index 6d86b22..3891c82 100644 (file)
@@ -22,6 +22,7 @@
  * @file
  */
 
+use MediaWiki\Permissions\PermissionManager;
 use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
 use MediaWiki\Linker\LinkTarget;
@@ -53,6 +54,15 @@ class Title implements LinkTarget, IDBAccessObject {
         */
        const GAID_FOR_UPDATE = 1;
 
+       /**
+        * Flag for use with factory methods like newFromLinkTarget() that have
+        * a $forceClone parameter. If set, the method must return a new instance.
+        * Without this flag, some factory methods may return existing instances.
+        *
+        * @since 1.33
+        */
+       const NEW_CLONE = 'clone';
+
        /**
         * @name Private member variables
         * Please use the accessor functions instead.
@@ -231,27 +241,39 @@ class Title implements LinkTarget, IDBAccessObject {
        }
 
        /**
-        * Create a new Title from a TitleValue
+        * Returns a Title given a TitleValue.
+        * If the given TitleValue is already a Title instance, that instance is returned,
+        * unless $forceClone is "clone". If $forceClone is "clone" and the given TitleValue
+        * is already a Title instance, that instance is copied using the clone operator.
         *
         * @param TitleValue $titleValue Assumed to be safe.
+        * @param string $forceClone set to NEW_CLONE to ensure a fresh instance is returned.
         *
         * @return Title
         */
-       public static function newFromTitleValue( TitleValue $titleValue ) {
-               return self::newFromLinkTarget( $titleValue );
+       public static function newFromTitleValue( TitleValue $titleValue, $forceClone = '' ) {
+               return self::newFromLinkTarget( $titleValue, $forceClone );
        }
 
        /**
-        * Create a new Title from a LinkTarget
+        * Returns a Title given a LinkTarget.
+        * If the given LinkTarget is already a Title instance, that instance is returned,
+        * unless $forceClone is "clone". If $forceClone is "clone" and the given LinkTarget
+        * is already a Title instance, that instance is copied using the clone operator.
         *
         * @param LinkTarget $linkTarget Assumed to be safe.
+        * @param string $forceClone set to NEW_CLONE to ensure a fresh instance is returned.
         *
         * @return Title
         */
-       public static function newFromLinkTarget( LinkTarget $linkTarget ) {
+       public static function newFromLinkTarget( LinkTarget $linkTarget, $forceClone = '' ) {
                if ( $linkTarget instanceof Title ) {
                        // Special case if it's already a Title object
-                       return $linkTarget;
+                       if ( $forceClone === self::NEW_CLONE ) {
+                               return clone $linkTarget;
+                       } else {
+                               return $linkTarget;
+                       }
                }
                return self::makeTitle(
                        $linkTarget->getNamespace(),
@@ -268,6 +290,10 @@ class Title implements LinkTarget, IDBAccessObject {
         * Title objects returned by this method are guaranteed to be valid, and
         * thus return true from the isValid() method.
         *
+        * @note The Title instance returned by this method is not guaranteed to be a fresh instance.
+        * It may instead be a cached instance created previously, with references to it remaining
+        * elsewhere.
+        *
         * @param string|int|null $text The link text; spaces, prefixes, and an
         *   initial ':' indicating the main namespace are accepted.
         * @param int $defaultNamespace The namespace to use if none is specified
@@ -302,6 +328,10 @@ class Title implements LinkTarget, IDBAccessObject {
         * Title objects returned by this method are guaranteed to be valid, and
         * thus return true from the isValid() method.
         *
+        * @note The Title instance returned by this method is not guaranteed to be a fresh instance.
+        * It may instead be a cached instance created previously, with references to it remaining
+        * elsewhere.
+        *
         * @see Title::newFromText
         *
         * @since 1.25
@@ -593,6 +623,10 @@ class Title implements LinkTarget, IDBAccessObject {
        /**
         * Create a new Title for the Main Page
         *
+        * @note The Title instance returned by this method is not guaranteed to be a fresh instance.
+        * It may instead be a cached instance created previously, with references to it remaining
+        * elsewhere.
+        *
         * @return Title The new object
         */
        public static function newMainPage() {
@@ -699,6 +733,7 @@ class Title implements LinkTarget, IDBAccessObject {
                                // Allow unicode if a single high-bit character appears
                                $r0 = sprintf( '\x%02x', $ord0 );
                                $allowUnicode = true;
+                               // @phan-suppress-next-line PhanParamSuspiciousOrder false positive
                        } elseif ( strpos( '-\\[]^', $d0 ) !== false ) {
                                $r0 = '\\' . $d0;
                        } else {
@@ -2030,8 +2065,8 @@ class Title implements LinkTarget, IDBAccessObject {
         * protocol-relative, the URL will be expanded to http://
         *
         * @see self::getLocalURL for the arguments.
-        * @param string $query
-        * @param string|bool $query2
+        * @param string|string[] $query
+        * @param string|bool $query2 Deprecated
         * @return string The URL
         */
        public function getInternalURL( $query = '', $query2 = false ) {
@@ -2053,8 +2088,8 @@ class Title implements LinkTarget, IDBAccessObject {
         * NOTE: Unlike getInternalURL(), the canonical URL includes the fragment
         *
         * @see self::getLocalURL for the arguments.
-        * @param string $query
-        * @param string|bool $query2
+        * @param string|string[] $query
+        * @param string|bool $query2 Deprecated
         * @return string The URL
         * @since 1.18
         */
@@ -2093,7 +2128,13 @@ class Title implements LinkTarget, IDBAccessObject {
         *
         * @param string $action Action that permission needs to be checked for
         * @param User|null $user User to check (since 1.19); $wgUser will be used if not provided.
+        *
         * @return bool
+        * @throws Exception
+        *
+        * @deprecated since 1.33,
+        * use MediaWikiServices::getInstance()->getPermissionManager()->quickUserCan(..) instead
+        *
         */
        public function quickUserCan( $action, $user = null ) {
                return $this->userCan( $action, $user, false );
@@ -2106,15 +2147,29 @@ class Title implements LinkTarget, IDBAccessObject {
         * @param User|null $user User to check (since 1.19); $wgUser will be used if not
         *   provided.
         * @param string $rigor Same format as Title::getUserPermissionsErrors()
+        *
         * @return bool
+        * @throws Exception
+        *
+        * @deprecated since 1.33,
+        * use MediaWikiServices::getInstance()->getPermissionManager()->userCan(..) instead
+        *
         */
-       public function userCan( $action, $user = null, $rigor = 'secure' ) {
+       public function userCan( $action, $user = null, $rigor = PermissionManager::RIGOR_SECURE ) {
                if ( !$user instanceof User ) {
                        global $wgUser;
                        $user = $wgUser;
                }
 
-               return !count( $this->getUserPermissionsErrorsInternal( $action, $user, $rigor, true ) );
+               // TODO: this is for b/c, eventually will be removed
+               if ( $rigor === true ) {
+                       $rigor = PermissionManager::RIGOR_SECURE; // b/c
+               } elseif ( $rigor === false ) {
+                       $rigor = PermissionManager::RIGOR_QUICK; // b/c
+               }
+
+               return MediaWikiServices::getInstance()->getPermissionManager()
+                       ->userCan( $action, $user, $this, $rigor );
        }
 
        /**
@@ -2130,99 +2185,26 @@ class Title implements LinkTarget, IDBAccessObject {
         *   - secure : does cheap and expensive checks, using the master as needed
         * @param array $ignoreErrors Array of Strings Set this to a list of message keys
         *   whose corresponding errors may be ignored.
+        *
         * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
-        */
-       public function getUserPermissionsErrors(
-               $action, $user, $rigor = 'secure', $ignoreErrors = []
-       ) {
-               $errors = $this->getUserPermissionsErrorsInternal( $action, $user, $rigor );
-
-               // Remove the errors being ignored.
-               foreach ( $errors as $index => $error ) {
-                       $errKey = is_array( $error ) ? $error[0] : $error;
-
-                       if ( in_array( $errKey, $ignoreErrors ) ) {
-                               unset( $errors[$index] );
-                       }
-                       if ( $errKey instanceof MessageSpecifier && in_array( $errKey->getKey(), $ignoreErrors ) ) {
-                               unset( $errors[$index] );
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Permissions checks that fail most often, and which are easiest to test.
+        * @throws Exception
         *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
+        * @deprecated since 1.33,
+        * use MediaWikiServices::getInstance()->getPermissionManager()->getUserPermissionsErrors()
         *
-        * @return array List of errors
         */
-       private function checkQuickPermissions( $action, $user, $errors, $rigor, $short ) {
-               if ( !Hooks::run( 'TitleQuickPermissions',
-                       [ $this, $user, $action, &$errors, ( $rigor !== 'quick' ), $short ] )
-               ) {
-                       return $errors;
-               }
-
-               if ( $action == 'create' ) {
-                       if (
-                               ( $this->isTalkPage() && !$user->isAllowed( 'createtalk' ) ) ||
-                               ( !$this->isTalkPage() && !$user->isAllowed( 'createpage' ) )
-                       ) {
-                               $errors[] = $user->isAnon() ? [ 'nocreatetext' ] : [ 'nocreate-loggedin' ];
-                       }
-               } elseif ( $action == 'move' ) {
-                       if ( !$user->isAllowed( 'move-rootuserpages' )
-                                       && $this->mNamespace == NS_USER && !$this->isSubpage() ) {
-                               // Show user page-specific message only if the user can move other pages
-                               $errors[] = [ 'cant-move-user-page' ];
-                       }
-
-                       // Check if user is allowed to move files if it's a file
-                       if ( $this->mNamespace == NS_FILE && !$user->isAllowed( 'movefile' ) ) {
-                               $errors[] = [ 'movenotallowedfile' ];
-                       }
-
-                       // Check if user is allowed to move category pages if it's a category page
-                       if ( $this->mNamespace == NS_CATEGORY && !$user->isAllowed( 'move-categorypages' ) ) {
-                               $errors[] = [ 'cant-move-category-page' ];
-                       }
-
-                       if ( !$user->isAllowed( 'move' ) ) {
-                               // User can't move anything
-                               $userCanMove = User::groupHasPermission( 'user', 'move' );
-                               $autoconfirmedCanMove = User::groupHasPermission( 'autoconfirmed', 'move' );
-                               if ( $user->isAnon() && ( $userCanMove || $autoconfirmedCanMove ) ) {
-                                       // custom message if logged-in users without any special rights can move
-                                       $errors[] = [ 'movenologintext' ];
-                               } else {
-                                       $errors[] = [ 'movenotallowed' ];
-                               }
-                       }
-               } elseif ( $action == 'move-target' ) {
-                       if ( !$user->isAllowed( 'move' ) ) {
-                               // User can't move anything
-                               $errors[] = [ 'movenotallowed' ];
-                       } elseif ( !$user->isAllowed( 'move-rootuserpages' )
-                                       && $this->mNamespace == NS_USER && !$this->isSubpage() ) {
-                               // Show user page-specific message only if the user can move other pages
-                               $errors[] = [ 'cant-move-to-user-page' ];
-                       } elseif ( !$user->isAllowed( 'move-categorypages' )
-                                       && $this->mNamespace == NS_CATEGORY ) {
-                               // Show category page-specific message only if the user can move other pages
-                               $errors[] = [ 'cant-move-to-category-page' ];
-                       }
-               } elseif ( !$user->isAllowed( $action ) ) {
-                       $errors[] = $this->missingPermissionError( $action, $short );
+       public function getUserPermissionsErrors(
+               $action, $user, $rigor = PermissionManager::RIGOR_SECURE, $ignoreErrors = []
+       ) {
+               // TODO: this is for b/c, eventually will be removed
+               if ( $rigor === true ) {
+                       $rigor = PermissionManager::RIGOR_SECURE; // b/c
+               } elseif ( $rigor === false ) {
+                       $rigor = PermissionManager::RIGOR_QUICK; // b/c
                }
 
-               return $errors;
+               return MediaWikiServices::getInstance()->getPermissionManager()
+                       ->getPermissionErrors( $action, $user, $this, $rigor, $ignoreErrors );
        }
 
        /**
@@ -2253,582 +2235,6 @@ class Title implements LinkTarget, IDBAccessObject {
                return $errors;
        }
 
-       /**
-        * Check various permission hooks
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkPermissionHooks( $action, $user, $errors, $rigor, $short ) {
-               // Use getUserPermissionsErrors instead
-               $result = '';
-               // Avoid PHP 7.1 warning from passing $this by reference
-               $titleRef = $this;
-               if ( !Hooks::run( 'userCan', [ &$titleRef, &$user, $action, &$result ] ) ) {
-                       return $result ? [] : [ [ 'badaccess-group0' ] ];
-               }
-               // Check getUserPermissionsErrors hook
-               // Avoid PHP 7.1 warning from passing $this by reference
-               $titleRef = $this;
-               if ( !Hooks::run( 'getUserPermissionsErrors', [ &$titleRef, &$user, $action, &$result ] ) ) {
-                       $errors = $this->resultToError( $errors, $result );
-               }
-               // Check getUserPermissionsErrorsExpensive hook
-               if (
-                       $rigor !== 'quick'
-                       && !( $short && count( $errors ) > 0 )
-                       && !Hooks::run( 'getUserPermissionsErrorsExpensive', [ &$titleRef, &$user, $action, &$result ] )
-               ) {
-                       $errors = $this->resultToError( $errors, $result );
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check permissions on special pages & namespaces
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkSpecialsAndNSPermissions( $action, $user, $errors, $rigor, $short ) {
-               # Only 'createaccount' can be performed on special pages,
-               # which don't actually exist in the DB.
-               if ( $this->isSpecialPage() && $action !== 'createaccount' ) {
-                       $errors[] = [ 'ns-specialprotected' ];
-               }
-
-               # Check $wgNamespaceProtection for restricted namespaces
-               if ( $this->isNamespaceProtected( $user ) ) {
-                       $ns = $this->mNamespace == NS_MAIN ?
-                               wfMessage( 'nstab-main' )->text() : $this->getNsText();
-                       $errors[] = $this->mNamespace == NS_MEDIAWIKI ?
-                               [ 'protectedinterface', $action ] : [ 'namespaceprotected', $ns, $action ];
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check sitewide CSS/JSON/JS permissions
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkSiteConfigPermissions( $action, $user, $errors, $rigor, $short ) {
-               if ( $action != 'patrol' ) {
-                       $error = null;
-                       // Sitewide CSS/JSON/JS changes, like all NS_MEDIAWIKI changes, also require the
-                       // editinterface right. That's implemented as a restriction so no check needed here.
-                       if ( $this->isSiteCssConfigPage() && !$user->isAllowed( 'editsitecss' ) ) {
-                               $error = [ 'sitecssprotected', $action ];
-                       } elseif ( $this->isSiteJsonConfigPage() && !$user->isAllowed( 'editsitejson' ) ) {
-                               $error = [ 'sitejsonprotected', $action ];
-                       } elseif ( $this->isSiteJsConfigPage() && !$user->isAllowed( 'editsitejs' ) ) {
-                               $error = [ 'sitejsprotected', $action ];
-                       } elseif ( $this->isRawHtmlMessage() ) {
-                               // Raw HTML can be used to deploy CSS or JS so require rights for both.
-                               if ( !$user->isAllowed( 'editsitejs' ) ) {
-                                       $error = [ 'sitejsprotected', $action ];
-                               } elseif ( !$user->isAllowed( 'editsitecss' ) ) {
-                                       $error = [ 'sitecssprotected', $action ];
-                               }
-                       }
-
-                       if ( $error ) {
-                               if ( $user->isAllowed( 'editinterface' ) ) {
-                                       // Most users / site admins will probably find out about the new, more restrictive
-                                       // permissions by failing to edit something. Give them more info.
-                                       // TODO remove this a few release cycles after 1.32
-                                       $error = [ 'interfaceadmin-info', wfMessage( $error[0], $error[1] ) ];
-                               }
-                               $errors[] = $error;
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check CSS/JSON/JS sub-page permissions
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkUserConfigPermissions( $action, $user, $errors, $rigor, $short ) {
-               # Protect css/json/js subpages of user pages
-               # XXX: this might be better using restrictions
-
-               if ( $action === 'patrol' ) {
-                       return $errors;
-               }
-
-               if ( preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) {
-                       // Users need editmyuser* to edit their own CSS/JSON/JS subpages.
-                       if (
-                               $this->isUserCssConfigPage()
-                               && !$user->isAllowedAny( 'editmyusercss', 'editusercss' )
-                       ) {
-                               $errors[] = [ 'mycustomcssprotected', $action ];
-                       } elseif (
-                               $this->isUserJsonConfigPage()
-                               && !$user->isAllowedAny( 'editmyuserjson', 'edituserjson' )
-                       ) {
-                               $errors[] = [ 'mycustomjsonprotected', $action ];
-                       } elseif (
-                               $this->isUserJsConfigPage()
-                               && !$user->isAllowedAny( 'editmyuserjs', 'edituserjs' )
-                       ) {
-                               $errors[] = [ 'mycustomjsprotected', $action ];
-                       }
-               } else {
-                       // Users need editmyuser* to edit their own CSS/JSON/JS subpages, except for
-                       // deletion/suppression which cannot be used for attacks and we want to avoid the
-                       // situation where an unprivileged user can post abusive content on their subpages
-                       // and only very highly privileged users could remove it.
-                       if ( !in_array( $action, [ 'delete', 'deleterevision', 'suppressrevision' ], true ) ) {
-                               if (
-                                       $this->isUserCssConfigPage()
-                                       && !$user->isAllowed( 'editusercss' )
-                               ) {
-                                       $errors[] = [ 'customcssprotected', $action ];
-                               } elseif (
-                                       $this->isUserJsonConfigPage()
-                                       && !$user->isAllowed( 'edituserjson' )
-                               ) {
-                                       $errors[] = [ 'customjsonprotected', $action ];
-                               } elseif (
-                                       $this->isUserJsConfigPage()
-                                       && !$user->isAllowed( 'edituserjs' )
-                               ) {
-                                       $errors[] = [ 'customjsprotected', $action ];
-                               }
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check against page_restrictions table requirements on this
-        * page. The user must possess all required rights for this
-        * action.
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkPageRestrictions( $action, $user, $errors, $rigor, $short ) {
-               foreach ( $this->getRestrictions( $action ) as $right ) {
-                       // Backwards compatibility, rewrite sysop -> editprotected
-                       if ( $right == 'sysop' ) {
-                               $right = 'editprotected';
-                       }
-                       // Backwards compatibility, rewrite autoconfirmed -> editsemiprotected
-                       if ( $right == 'autoconfirmed' ) {
-                               $right = 'editsemiprotected';
-                       }
-                       if ( $right == '' ) {
-                               continue;
-                       }
-                       if ( !$user->isAllowed( $right ) ) {
-                               $errors[] = [ 'protectedpagetext', $right, $action ];
-                       } elseif ( $this->mCascadeRestriction && !$user->isAllowed( 'protect' ) ) {
-                               $errors[] = [ 'protectedpagetext', 'protect', $action ];
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check restrictions on cascading pages.
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkCascadingSourcesRestrictions( $action, $user, $errors, $rigor, $short ) {
-               if ( $rigor !== 'quick' && !$this->isUserConfigPage() ) {
-                       # We /could/ use the protection level on the source page, but it's
-                       # fairly ugly as we have to establish a precedence hierarchy for pages
-                       # included by multiple cascade-protected pages. So just restrict
-                       # it to people with 'protect' permission, as they could remove the
-                       # protection anyway.
-                       list( $cascadingSources, $restrictions ) = $this->getCascadeProtectionSources();
-                       # Cascading protection depends on more than this page...
-                       # Several cascading protected pages may include this page...
-                       # Check each cascading level
-                       # This is only for protection restrictions, not for all actions
-                       if ( isset( $restrictions[$action] ) ) {
-                               foreach ( $restrictions[$action] as $right ) {
-                                       // Backwards compatibility, rewrite sysop -> editprotected
-                                       if ( $right == 'sysop' ) {
-                                               $right = 'editprotected';
-                                       }
-                                       // Backwards compatibility, rewrite autoconfirmed -> editsemiprotected
-                                       if ( $right == 'autoconfirmed' ) {
-                                               $right = 'editsemiprotected';
-                                       }
-                                       if ( $right != '' && !$user->isAllowedAll( 'protect', $right ) ) {
-                                               $pages = '';
-                                               foreach ( $cascadingSources as $page ) {
-                                                       $pages .= '* [[:' . $page->getPrefixedText() . "]]\n";
-                                               }
-                                               $errors[] = [ 'cascadeprotected', count( $cascadingSources ), $pages, $action ];
-                                       }
-                               }
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check action permissions not already checked in checkQuickPermissions
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkActionPermissions( $action, $user, $errors, $rigor, $short ) {
-               global $wgDeleteRevisionsLimit, $wgLang;
-
-               if ( $action == 'protect' ) {
-                       if ( count( $this->getUserPermissionsErrorsInternal( 'edit', $user, $rigor, true ) ) ) {
-                               // If they can't edit, they shouldn't protect.
-                               $errors[] = [ 'protect-cantedit' ];
-                       }
-               } elseif ( $action == 'create' ) {
-                       $title_protection = $this->getTitleProtection();
-                       if ( $title_protection ) {
-                               if ( $title_protection['permission'] == ''
-                                       || !$user->isAllowed( $title_protection['permission'] )
-                               ) {
-                                       $errors[] = [
-                                               'titleprotected',
-                                               User::whoIs( $title_protection['user'] ),
-                                               $title_protection['reason']
-                                       ];
-                               }
-                       }
-               } elseif ( $action == 'move' ) {
-                       // Check for immobile pages
-                       if ( !MWNamespace::isMovable( $this->mNamespace ) ) {
-                               // Specific message for this case
-                               $errors[] = [ 'immobile-source-namespace', $this->getNsText() ];
-                       } elseif ( !$this->isMovable() ) {
-                               // Less specific message for rarer cases
-                               $errors[] = [ 'immobile-source-page' ];
-                       }
-               } elseif ( $action == 'move-target' ) {
-                       if ( !MWNamespace::isMovable( $this->mNamespace ) ) {
-                               $errors[] = [ 'immobile-target-namespace', $this->getNsText() ];
-                       } elseif ( !$this->isMovable() ) {
-                               $errors[] = [ 'immobile-target-page' ];
-                       }
-               } elseif ( $action == 'delete' ) {
-                       $tempErrors = $this->checkPageRestrictions( 'edit', $user, [], $rigor, true );
-                       if ( !$tempErrors ) {
-                               $tempErrors = $this->checkCascadingSourcesRestrictions( 'edit',
-                                       $user, $tempErrors, $rigor, true );
-                       }
-                       if ( $tempErrors ) {
-                               // If protection keeps them from editing, they shouldn't be able to delete.
-                               $errors[] = [ 'deleteprotected' ];
-                       }
-                       if ( $rigor !== 'quick' && $wgDeleteRevisionsLimit
-                               && !$this->userCan( 'bigdelete', $user ) && $this->isBigDeletion()
-                       ) {
-                               $errors[] = [ 'delete-toobig', $wgLang->formatNum( $wgDeleteRevisionsLimit ) ];
-                       }
-               } elseif ( $action === 'undelete' ) {
-                       if ( count( $this->getUserPermissionsErrorsInternal( 'edit', $user, $rigor, true ) ) ) {
-                               // Undeleting implies editing
-                               $errors[] = [ 'undelete-cantedit' ];
-                       }
-                       if ( !$this->exists()
-                               && count( $this->getUserPermissionsErrorsInternal( 'create', $user, $rigor, true ) )
-                       ) {
-                               // Undeleting where nothing currently exists implies creating
-                               $errors[] = [ 'undelete-cantcreate' ];
-                       }
-               }
-               return $errors;
-       }
-
-       /**
-        * Check that the user isn't blocked from editing.
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkUserBlock( $action, $user, $errors, $rigor, $short ) {
-               global $wgEmailConfirmToEdit, $wgBlockDisablesLogin;
-               // Account creation blocks handled at userlogin.
-               // Unblocking handled in SpecialUnblock
-               if ( $rigor === 'quick' || in_array( $action, [ 'createaccount', 'unblock' ] ) ) {
-                       return $errors;
-               }
-
-               // Optimize for a very common case
-               if ( $action === 'read' && !$wgBlockDisablesLogin ) {
-                       return $errors;
-               }
-
-               if ( $wgEmailConfirmToEdit
-                       && !$user->isEmailConfirmed()
-                       && $action === 'edit'
-               ) {
-                       $errors[] = [ 'confirmedittext' ];
-               }
-
-               $useReplica = ( $rigor !== 'secure' );
-               $block = $user->getBlock( $useReplica );
-
-               // If the user does not have a block, or the block they do have explicitly
-               // allows the action (like "read" or "upload").
-               if ( !$block || $block->appliesToRight( $action ) === false ) {
-                       return $errors;
-               }
-
-               // Determine if the user is blocked from this action on this page.
-               // What gets passed into this method is a user right, not an action name.
-               // There is no way to instantiate an action by restriction. However, this
-               // will get the action where the restriction is the same. This may result
-               // in actions being blocked that shouldn't be.
-               $actionObj = null;
-               if ( Action::exists( $action ) ) {
-                       // Clone the title to prevent mutations to this object which is done
-                       // by Title::loadFromRow() in WikiPage::loadFromRow().
-                       $page = WikiPage::factory( clone $this );
-                       // Creating an action will perform several database queries to ensure that
-                       // the action has not been overridden by the content type.
-                       // @todo FIXME: Pass the relevant context into this function.
-                       $actionObj = Action::factory( $action, $page, RequestContext::getMain() );
-                       // Ensure that the retrieved action matches the restriction.
-                       if ( $actionObj && $actionObj->getRestriction() !== $action ) {
-                               $actionObj = null;
-                       }
-               }
-
-               // If no action object is returned, assume that the action requires unblock
-               // which is the default.
-               if ( !$actionObj || $actionObj->requiresUnblock() ) {
-                       if ( $user->isBlockedFrom( $this, $useReplica ) ) {
-                               // @todo FIXME: Pass the relevant context into this function.
-                               $errors[] = $block->getPermissionsError( RequestContext::getMain() );
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Check that the user is allowed to read this page.
-        *
-        * @param string $action The action to check
-        * @param User $user User to check
-        * @param array $errors List of current errors
-        * @param string $rigor Same format as Title::getUserPermissionsErrors()
-        * @param bool $short Short circuit on first error
-        *
-        * @return array List of errors
-        */
-       private function checkReadPermissions( $action, $user, $errors, $rigor, $short ) {
-               global $wgWhitelistRead, $wgWhitelistReadRegexp;
-
-               $whitelisted = false;
-               if ( User::isEveryoneAllowed( 'read' ) ) {
-                       # Shortcut for public wikis, allows skipping quite a bit of code
-                       $whitelisted = true;
-               } elseif ( $user->isAllowed( 'read' ) ) {
-                       # If the user is allowed to read pages, he is allowed to read all pages
-                       $whitelisted = true;
-               } elseif ( $this->isSpecial( 'Userlogin' )
-                       || $this->isSpecial( 'PasswordReset' )
-                       || $this->isSpecial( 'Userlogout' )
-               ) {
-                       # Always grant access to the login page.
-                       # Even anons need to be able to log in.
-                       $whitelisted = true;
-               } elseif ( is_array( $wgWhitelistRead ) && count( $wgWhitelistRead ) ) {
-                       # Time to check the whitelist
-                       # Only do these checks is there's something to check against
-                       $name = $this->getPrefixedText();
-                       $dbName = $this->getPrefixedDBkey();
-
-                       // Check for explicit whitelisting with and without underscores
-                       if ( in_array( $name, $wgWhitelistRead, true ) || in_array( $dbName, $wgWhitelistRead, true ) ) {
-                               $whitelisted = true;
-                       } elseif ( $this->mNamespace == NS_MAIN ) {
-                               # Old settings might have the title prefixed with
-                               # a colon for main-namespace pages
-                               if ( in_array( ':' . $name, $wgWhitelistRead ) ) {
-                                       $whitelisted = true;
-                               }
-                       } elseif ( $this->isSpecialPage() ) {
-                               # If it's a special page, ditch the subpage bit and check again
-                               $name = $this->mDbkeyform;
-                               list( $name, /* $subpage */ ) =
-                                       MediaWikiServices::getInstance()->getSpecialPageFactory()->
-                                               resolveAlias( $name );
-                               if ( $name ) {
-                                       $pure = SpecialPage::getTitleFor( $name )->getPrefixedText();
-                                       if ( in_array( $pure, $wgWhitelistRead, true ) ) {
-                                               $whitelisted = true;
-                                       }
-                               }
-                       }
-               }
-
-               if ( !$whitelisted && is_array( $wgWhitelistReadRegexp ) && !empty( $wgWhitelistReadRegexp ) ) {
-                       $name = $this->getPrefixedText();
-                       // Check for regex whitelisting
-                       foreach ( $wgWhitelistReadRegexp as $listItem ) {
-                               if ( preg_match( $listItem, $name ) ) {
-                                       $whitelisted = true;
-                                       break;
-                               }
-                       }
-               }
-
-               if ( !$whitelisted ) {
-                       # If the title is not whitelisted, give extensions a chance to do so...
-                       Hooks::run( 'TitleReadWhitelist', [ $this, $user, &$whitelisted ] );
-                       if ( !$whitelisted ) {
-                               $errors[] = $this->missingPermissionError( $action, $short );
-                       }
-               }
-
-               return $errors;
-       }
-
-       /**
-        * Get a description array when the user doesn't have the right to perform
-        * $action (i.e. when User::isAllowed() returns false)
-        *
-        * @param string $action The action to check
-        * @param bool $short Short circuit on first error
-        * @return array Array containing an error message key and any parameters
-        */
-       private function missingPermissionError( $action, $short ) {
-               // We avoid expensive display logic for quickUserCan's and such
-               if ( $short ) {
-                       return [ 'badaccess-group0' ];
-               }
-
-               return User::newFatalPermissionDeniedStatus( $action )->getErrorsArray()[0];
-       }
-
-       /**
-        * Can $user perform $action on this page? This is an internal function,
-        * with multiple levels of checks depending on performance needs; see $rigor below.
-        * It does not check wfReadOnly().
-        *
-        * @param string $action Action that permission needs to be checked for
-        * @param User $user User to check
-        * @param string $rigor One of (quick,full,secure)
-        *   - quick  : does cheap permission checks from replica DBs (usable for GUI creation)
-        *   - full   : does cheap and expensive checks possibly from a replica DB
-        *   - secure : does cheap and expensive checks, using the master as needed
-        * @param bool $short Set this to true to stop after the first permission error.
-        * @return array Array of arrays of the arguments to wfMessage to explain permissions problems.
-        */
-       protected function getUserPermissionsErrorsInternal(
-               $action, $user, $rigor = 'secure', $short = false
-       ) {
-               if ( $rigor === true ) {
-                       $rigor = 'secure'; // b/c
-               } elseif ( $rigor === false ) {
-                       $rigor = 'quick'; // b/c
-               } elseif ( !in_array( $rigor, [ 'quick', 'full', 'secure' ] ) ) {
-                       throw new Exception( "Invalid rigor parameter '$rigor'." );
-               }
-
-               # Read has special handling
-               if ( $action == 'read' ) {
-                       $checks = [
-                               'checkPermissionHooks',
-                               'checkReadPermissions',
-                               'checkUserBlock', // for wgBlockDisablesLogin
-                       ];
-               # Don't call checkSpecialsAndNSPermissions, checkSiteConfigPermissions
-               # or checkUserConfigPermissions here as it will lead to duplicate
-               # error messages. This is okay to do since anywhere that checks for
-               # create will also check for edit, and those checks are called for edit.
-               } elseif ( $action == 'create' ) {
-                       $checks = [
-                               'checkQuickPermissions',
-                               'checkPermissionHooks',
-                               'checkPageRestrictions',
-                               'checkCascadingSourcesRestrictions',
-                               'checkActionPermissions',
-                               'checkUserBlock'
-                       ];
-               } else {
-                       $checks = [
-                               'checkQuickPermissions',
-                               'checkPermissionHooks',
-                               'checkSpecialsAndNSPermissions',
-                               'checkSiteConfigPermissions',
-                               'checkUserConfigPermissions',
-                               'checkPageRestrictions',
-                               'checkCascadingSourcesRestrictions',
-                               'checkActionPermissions',
-                               'checkUserBlock'
-                       ];
-               }
-
-               $errors = [];
-               foreach ( $checks as $method ) {
-                       $errors = $this->$method( $action, $user, $errors, $rigor, $short );
-
-                       if ( $short && $errors !== [] ) {
-                               break;
-                       }
-               }
-
-               return $errors;
-       }
-
        /**
         * Get a filtered list of all restriction types supported by this wiki.
         * @param bool $exists True to get all restriction types that apply to
@@ -3326,7 +2732,7 @@ class Title implements LinkTarget, IDBAccessObject {
                $id = $this->getArticleID();
                if ( $id ) {
                        $fname = __METHOD__;
-                       $loadRestrictionsFromDb = function ( Database $dbr ) use ( $fname, $id ) {
+                       $loadRestrictionsFromDb = function ( IDatabase $dbr ) use ( $fname, $id ) {
                                return iterator_to_array(
                                        $dbr->select(
                                                'page_restrictions',
index b0f89dc..e9de846 100644 (file)
@@ -30,7 +30,7 @@ class McrUndoAction extends FormAction {
 
        protected $undo = 0, $undoafter = 0, $cur = 0;
 
-       /** @param RevisionRecord|null */
+       /** @var RevisionRecord|null */
        protected $curRev = null;
 
        public function getName() {
index 9b3d116..528ced8 100644 (file)
@@ -800,6 +800,7 @@ abstract class ApiBase extends ContextSource {
                                        // $results if all are done.
                                        unset( $targets[$placeholder] );
                                        $placeholder = '{' . $placeholder . '}';
+                                       // @phan-suppress-next-line PhanTypeNoAccessiblePropertiesForeach
                                        foreach ( $results[$target] as $value ) {
                                                if ( !preg_match( '/^[^{}]*$/', $value ) ) {
                                                        // Skip values that make invalid parameter names.
index 7da8ed9..e4c52dd 100644 (file)
@@ -217,6 +217,8 @@ class ApiContinuationManager {
                        // Some modules are unfinished: include those params, and copy
                        // the generator params.
                        foreach ( $continuationData as $module => $kvp ) {
+                               // XXX: Not sure why phan is complaining here...
+                               // @phan-suppress-next-line PhanTypeInvalidLeftOperand
                                $data += $kvp;
                        }
                        $generatorParams = [];
index ea67f15..cf9785e 100644 (file)
        "apihelp-query+userinfo-paramvalue-prop-registrationdate": "يضيف تاريخ تسجيل المستخدم.",
        "apihelp-query+userinfo-paramvalue-prop-unreadcount": "يضيف عدد الصفحات غير المقروءة في قائمة مراقبة المستخدم (بحد أقصى $1; ترجع <samp>$2</samp> إذا كان أكثر).",
        "apihelp-query+userinfo-paramvalue-prop-centralids": "يضيف المعرفات المركزية وحالة المرفقات للمستخدم.",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "يضيف تاريخ آخر مساهمة للمستخدم.",
        "apihelp-query+userinfo-param-attachedwiki": "باستخدام <kbd>$1prop=centralids</kbd>، حدد ما إذا كان المستخدم مرتبطا بالويكي المحدد بواسطة هذا المعرف.",
        "apihelp-query+userinfo-example-simple": "الحصول على معلومات حول المستخدم الحالي.",
        "apihelp-query+userinfo-example-data": "الحصول على معلومات حول المستخدم الحالي.",
index 883fb55..54d6cc5 100644 (file)
        "apihelp-query+userinfo-paramvalue-prop-options": "Listet alle Einstellungen auf, die der aktuelle Benutzer festgelegt hat.",
        "apihelp-query+userinfo-paramvalue-prop-editcount": "Ergänzt den Bearbeitungszähler des aktuellen Benutzers.",
        "apihelp-query+userinfo-paramvalue-prop-realname": "Fügt den bürgerlichen Namen des Benutzers hinzu.",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "Ergänzt das Datum des letzten Benutzerbeitrags.",
        "apihelp-query+userinfo-example-simple": "Informationen über den aktuellen Benutzer abrufen",
        "apihelp-query+userinfo-example-data": "Ruft zusätzliche Informationen über den aktuellen Benutzer ab.",
        "apihelp-query+users-summary": "Informationen über eine Liste von Benutzern abrufen.",
index 8fc7fe0..9ae584b 100644 (file)
        "apihelp-query+userinfo-paramvalue-prop-registrationdate": "Ajoute la date d’inscription de l’utilisateur.",
        "apihelp-query+userinfo-paramvalue-prop-unreadcount": "Ajoute le compteur de pages non lues de la liste de suivi de l’utilisateur (au maximum $1 ; renvoie <samp>$2</samp> s’il y en a plus).",
        "apihelp-query+userinfo-paramvalue-prop-centralids": "Ajoute les IDs centraux et l’état d’attachement de l’utilisateur.",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "Ajoute la date de la dernière contribution de l'utilisateur.",
        "apihelp-query+userinfo-param-attachedwiki": "Avec <kbd>$1prop=centralids</kbd>, indiquer si l’utilisateur est attaché au wiki identifié par cet ID.",
        "apihelp-query+userinfo-example-simple": "Obtenir des informations sur l’utilisateur actuel.",
        "apihelp-query+userinfo-example-data": "Obtenir des informations supplémentaires sur l’utilisateur actuel.",
index eec3902..27b4d79 100644 (file)
        "apihelp-query+userinfo-paramvalue-prop-registrationdate": "Adiciona a data de registro do usuário.",
        "apihelp-query+userinfo-paramvalue-prop-unreadcount": "Adiciona a contagem de páginas não lidas na lista de páginas vigiadas do usuário (máximo $1; retorna <samp>$2</samp> se mais).",
        "apihelp-query+userinfo-paramvalue-prop-centralids": "Adiciona os IDs centrais e o status do anexo do usuário.",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "Adiciona a data da última contribuição do usuário.",
        "apihelp-query+userinfo-param-attachedwiki": "Com <kbd>$1prop=centralids</kbd>, indique se o usuário está conectado com a wiki identificada por este ID.",
        "apihelp-query+userinfo-example-simple": "Ober informações sobre o usuário atual.",
        "apihelp-query+userinfo-example-data": "Obter informações adicionais sobre o usuário atual.",
index df94ce2..710133e 100644 (file)
        "apihelp-query+usercontribs-summary": "Hämta alla redigeringar av en användare.",
        "apihelp-query+userinfo-summary": "Få information om den aktuella användaren.",
        "apihelp-query+userinfo-paramvalue-prop-preferencestoken": "Hämta en nyckel för att ändra aktuell användares inställningar.",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "Lägg till datumet för användarens senaste bidrag.",
        "apihelp-query+userinfo-example-simple": "Få information om den aktuella användaren.",
        "apihelp-query+userinfo-example-data": "Få ytterligare information om den aktuella användaren.",
        "apihelp-query+users-summary": "Hämta information om en lista över användare.",
index c2f586c..225db87 100644 (file)
@@ -24,8 +24,8 @@
        "apihelp-main-param-action": "要執行的動作。",
        "apihelp-main-param-format": "輸出的格式。",
        "apihelp-main-param-maxlag": "最大延遲可在當 MediaWiki 安裝於資料庫複寫叢集時使用。為了保存引起更多站台複寫延遲的操作,此參數可讓客戶端等待至複寫延遲小於指定值為止。在過渡延遲的情況下,錯誤碼 <samp>maxlag</samp> 會帶有著像是 <samp>Waiting for $host: $lag seconds lagged</samp> 的訊息內容回傳。<br />請查看[[mw:Special:MyLanguage/Manual:Maxlag_parameter|手冊:Maxlag 參數]]來獲取更多資訊。",
-       "apihelp-main-param-smaxage": "將HTTP緩存控制頭欄位設為<code>s-maxage</code>秒。錯誤不會做緩存。",
-       "apihelp-main-param-maxage": "將HTTP緩存控制頭欄位設為<code>max-age</code>秒。錯誤不會做緩存。",
+       "apihelp-main-param-smaxage": "將HTTP暫存控制頭欄位設為<code>s-maxage</code>秒。錯誤不會做暫存。",
+       "apihelp-main-param-maxage": "將HTTP暫存控制頭欄位設為<code>max-age</code>秒。錯誤不會做暫存。",
        "apihelp-main-param-assert": "若設為<kbd>user</kbd>,會確認使用者是否已登入;若設為<kbd>bot</kbd>,會確認是否擁有機械人權限。",
        "apihelp-main-param-assertuser": "確認目前使用者就是指定的使用者。",
        "apihelp-main-param-requestid": "在此處提供的任何值都將包括在響應之中。可用於區分請求。",
        "apihelp-query+userinfo-paramvalue-prop-registrationdate": "添加使用者的註冊日期。",
        "apihelp-query+userinfo-paramvalue-prop-unreadcount": "添加未讀頁面數目在使用者的監視清單(最多 $1,若有更多則回傳 <samp>$2</samp>)。",
        "apihelp-query+userinfo-paramvalue-prop-centralids": "替使用者添加中心 ID 與附加狀態。",
+       "apihelp-query+userinfo-paramvalue-prop-latestcontrib": "添加使用者最新貢獻的日期。",
        "apihelp-query+userinfo-param-attachedwiki": "以 <kbd>$1prop=centralids</kbd> 來表明使用者是否附加於由此 ID 所識別出的 wiki。",
        "apihelp-query+userinfo-example-simple": "取得目前使用者的資訊。",
        "apihelp-query+userinfo-example-data": "取得目前使用者的額外資訊。",
        "apihelp-format-example-generic": "以 $1 格式傳回查詢結果。",
        "apihelp-format-param-wrappedhtml": "回傳作為 JSON 物件的美觀列印 HTML 內容以及關聯 ResourceLoader 模組。",
        "apihelp-json-summary": "使用 JSON 格式輸出資料。",
-       "apihelp-json-param-callback": "若有指定,將輸出包在指定的函式調用。出於安全考量,會限制所有使用者特定資料。",
+       "apihelp-json-param-callback": "若有指定,將輸出包在指定的函式呼叫。出於安全考量,會限制所有使用者特定資料。",
        "apihelp-json-param-utf8": "若有指定的話,將多數(並非全部)非 ASCII 字元編碼成 UTF-8,而不是以十六進位轉義序列來取代掉。預設是當 <var>formatversion</var> 不是 <kbd>1</kbd> 時。",
-       "apihelp-json-param-ascii": "è\8b¥æ\9c\89æ\8c\87å®\9aï¼\8c編碼æ\89\80æ\9c\89使ç\94¨å\8d\81å\85­é\80²ä½\8dè½\89義序列的非 ASCII。預設當 <var>formatversion</var> 為 <kbd>1</kbd> 時。",
-       "apihelp-json-param-formatversion": "輸出格式:\n;1:向下兼容格式(XML 風格布林,用於內容節點的 <samp>*</samp> 鍵、其它)。\n;2:現代格式。\n;latest:使用最新格式(目前為 <kbd>2</kbd>)可能會不帶警告作更改。",
+       "apihelp-json-param-ascii": "è\8b¥æ\9c\89æ\8c\87å®\9aï¼\8c編碼æ\89\80æ\9c\89使ç\94¨å\8d\81å\85­é\80²ä½\8dè·³è\84«序列的非 ASCII。預設當 <var>formatversion</var> 為 <kbd>1</kbd> 時。",
+       "apihelp-json-param-formatversion": "輸出格式:\n;1:向下相容格式(XML 式布林值,用於內容節點的 <samp>*</samp> 鍵、其它)。\n;2:現代格式。\n;latest:使用最新格式(目前為 <kbd>2</kbd>)可能會不帶警告作更改。",
        "apihelp-jsonfm-summary": "使用 JSON 格式輸出資料 (使用 HTML 格式顯示)。",
        "apihelp-none-summary": "不輸出。",
        "apihelp-php-summary": "使用序列化 PHP 格式輸出資料。",
        "api-help-examples": "{{PLURAL:$1|範例}}:",
        "api-help-permissions": "{{PLURAL:$1|權限}}:",
        "api-help-permissions-granted-to": "{{PLURAL:$1|已授權給}}: $2",
-       "api-help-right-apihighlimits": "在 API 查詢使用較高的限制(慢查詢:$1;快查詢:$2)。慢查詢的限制也適用於多值參數。",
+       "api-help-right-apihighlimits": "在 API 查詢使用較高的限制(慢速查詢:$1;快速查詢:$2)。慢速查詢的限制也適用於多值參數。",
        "api-help-open-in-apisandbox": "<small>[在沙盒中開啟]</small>",
-       "api-help-authmanager-general-usage": "使用此模組的一般程式是:\n# 通過 <kbd>amirequestsfor=$4</kbd> 取得來自 <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> 的可用欄位,和來自 <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd> 的<kbd>$5</kbd>權杖。\n# 向用戶顯示欄位,並獲得其提交的內容。\n# 提交(POST)至此模組,提供 <var>$1returnurl</var> 及任何相關欄位。\n# 在回應中檢查 <samp>status</samp>。\n#* 如果您收到了 <samp>PASS</samp>(成功)或<samp>FAIL</samp>(失敗),則認為操作結束。成功與否如上句所示。\n#* 如果您收到了 <samp>UI</samp>,向用戶顯示新欄位,並再次獲取其提交的內容。然後再次使用 <var>$1continue</var>,向本模組提交相關欄位,並重復第四步。\n#* 如果您收到了 <samp>REDIRECT</samp>,將使用者指向<samp>redirecttarget</samp> 中的目標,等待其返回<var>$1returnurl</var>。然後再次使用 <var>$1continue</var>,向本模組提交返回 URL 中提供的一切欄位,並重復第四步。\n#* 如果您收到了 <samp>RESTART</samp>,這意味著身份驗證正常運作,但我們沒有連結的使用者帳戶。您可以將此視為 <samp>UI</samp>或<samp>FAIL</samp>。",
+       "api-help-authmanager-general-usage": "使用此模組的一般步驟是:\n# 透過 <kbd>amirequestsfor=$4</kbd> 取得來自 <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> 的可用欄位,和來自 <kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd> 的<kbd>$5</kbd>權杖。\n# 向使用者顯示欄位,並獲得其提交的內容。\n# 提交(POST)至此模組,提供 <var>$1returnurl</var> 及任何相關欄位。\n# 在回應中檢查 <samp>status</samp>。\n#* 如果您收到了 <samp>PASS</samp>(成功)或<samp>FAIL</samp>(失敗),則認為操作結束。成功與否如上句所示。\n#* 如果您收到了 <samp>UI</samp>,向使用者顯示新欄位,並再次獲取其提交的內容。然後再次使用 <var>$1continue</var>,向本模組提交相關欄位,並重復第四步。\n#* 如果您收到了 <samp>REDIRECT</samp>,將使用者指向<samp>redirecttarget</samp> 中的目標,等待其返回<var>$1returnurl</var>。然後再次使用 <var>$1continue</var>,向本模組提交返回 URL 中提供的一切欄位,並重復第四步。\n#* 如果您收到了 <samp>RESTART</samp>,表示身份驗證正常運作,但我們沒有連結的使用者帳戶。您可以將此視為 <samp>UI</samp>或<samp>FAIL</samp>。",
        "api-help-authmanagerhelper-requests": "只使用這些身份驗證請求,透過自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>回傳的<samp>id</samp>與<kbd>amirequestsfor=$1</kbd>,或來自此模組之前的回應。",
        "api-help-authmanagerhelper-request": "使用此身份驗證請求,透過自<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>回傳的<samp>id</samp>與<kbd>amirequestsfor=$1</kbd>。",
        "api-help-authmanagerhelper-messageformat": "用於回傳訊息的格式。",
index 7fc362a..4744c4d 100644 (file)
@@ -370,6 +370,7 @@ abstract class AuthenticationRequest {
         * @return AuthenticationRequest
         */
        public static function __set_state( $data ) {
+               // @phan-suppress-next-line PhanTypeInstantiateAbstract
                $ret = new static();
                foreach ( $data as $k => $v ) {
                        $ret->$k = $v;
index cbd30c2..2e8752e 100644 (file)
@@ -25,6 +25,7 @@ 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;
 
index 20678ad..7970266 100644 (file)
@@ -97,6 +97,7 @@ abstract class AbstractRestriction implements Restriction {
         * @inheritDoc
         */
        public static function newFromRow( \stdClass $row ) {
+               // @phan-suppress-next-line PhanTypeInstantiateAbstract
                return new static( $row->ir_ipb_id, $row->ir_value );
        }
 
index cd78005..dc73ac9 100644 (file)
@@ -50,7 +50,7 @@ trait DeprecationHelper {
         * the name of the class defining the property, <component> is the MediaWiki component
         * (extension, skin etc.) for use in the deprecation warning) or null if it is MediaWiki.
         * E.g. [ 'mNewRev' => [ '1.32', 'DifferenceEngine', null ]
-        * @var string[]
+        * @var string[][]
         */
        protected $deprecatedPublicProperties = [];
 
@@ -68,7 +68,7 @@ trait DeprecationHelper {
        protected function deprecatePublicProperty(
                $property, $version, $class = null, $component = null
        ) {
-               $this->deprecatedPublicProperties[$property] = [ $version, $class ?: get_class(), $component ];
+               $this->deprecatedPublicProperties[$property] = [ $version, $class ?: __CLASS__, $component ];
        }
 
        public function __get( $name ) {
@@ -79,7 +79,7 @@ trait DeprecationHelper {
                        return $this->$name;
                }
 
-               $qualifiedName = get_class() . '::$' . $name;
+               $qualifiedName = __CLASS__ . '::$' . $name;
                if ( $this->deprecationHelperGetPropertyOwner( $name ) ) {
                        // 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 );
@@ -99,7 +99,7 @@ trait DeprecationHelper {
                        return;
                }
 
-               $qualifiedName = get_class() . '::$' . $name;
+               $qualifiedName = __CLASS__ . '::$' . $name;
                if ( $this->deprecationHelperGetPropertyOwner( $name ) ) {
                        // 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 );
index e2cdd82..001944c 100644 (file)
@@ -214,12 +214,6 @@ class TextSlotDiffRenderer extends SlotDiffRenderer {
                                        $newText,
                                        2
                                );
-
-                               // Log a warning in case the configuration value is set to not silently ignore it
-                               if ( $this->wikiDiff2MovedParagraphDetectionCutoff > 0 ) {
-                                       wfLogWarning( '$wgWikiDiff2MovedParagraphDetectionCutoff is set but has no
-                                               effect since the used version of WikiDiff2 does not support it.' );
-                               }
                        }
 
                        return $text;
index f7d0945..2471b52 100644 (file)
@@ -166,7 +166,6 @@ class TextConflictHelper {
         * HTML to build the textbox1 on edit conflicts
         *
         * @param array $customAttribs
-        * @return string HTML
         */
        public function getEditConflictMainTextBox( array $customAttribs = [] ) {
                $builder = new TextboxBuilder();
index 31c945c..a50150e 100644 (file)
@@ -23,6 +23,8 @@
  * @file
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * @ingroup Dump
  */
@@ -49,8 +51,8 @@ class Dump7ZipOutput extends DumpPipeOutput {
         */
        function setup7zCommand( $file ) {
                $command = "7za a -bd -si -mx=";
-               $command .= wfEscapeShellArg( $this->compressionLevel ) . ' ';
-               $command .= wfEscapeShellArg( $file );
+               $command .= Shell::escape( $this->compressionLevel ) . ' ';
+               $command .= Shell::escape( $file );
                // Suppress annoying useless crap from p7zip
                // Unfortunately this could suppress real error messages too
                $command .= ' >' . wfGetNull() . ' 2>&1';
index 26010da..a353c44 100644 (file)
@@ -25,6 +25,8 @@
  * @file
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * @ingroup Dump
  */
@@ -38,7 +40,7 @@ class DumpPipeOutput extends DumpFileOutput {
         */
        function __construct( $command, $file = null ) {
                if ( !is_null( $file ) ) {
-                       $command .= " > " . wfEscapeShellArg( $file );
+                       $command .= " > " . Shell::escape( $file );
                }
 
                $this->startCommand( $command );
@@ -94,7 +96,7 @@ class DumpPipeOutput extends DumpFileOutput {
                        $this->renameOrException( $newname );
                        if ( $open ) {
                                $command = $this->command;
-                               $command .= " > " . wfEscapeShellArg( $this->filename );
+                               $command .= " > " . Shell::escape( $this->filename );
                                $this->startCommand( $command );
                        }
                }
index 120632c..e02cd83 100644 (file)
@@ -469,8 +469,8 @@ class WikiExporter {
        protected function outputPageStreamBatch( $results, $lastRow ) {
                foreach ( $results as $row ) {
                        if ( $lastRow === null ||
-                               $lastRow->page_namespace != $row->page_namespace ||
-                               $lastRow->page_title != $row->page_title ) {
+                               $lastRow->page_namespace !== $row->page_namespace ||
+                               $lastRow->page_title !== $row->page_title ) {
                                if ( $lastRow !== null ) {
                                        $output = '';
                                        if ( $this->dumpUploads ) {
index 6ca8853..54249a8 100644 (file)
@@ -207,6 +207,12 @@ class XmlDumpWriter {
         * @return string
         */
        function closePage() {
+               if ( $this->currentTitle !== null ) {
+                       $linkCache = MediaWikiServices::getInstance()->getLinkCache();
+                       // In rare cases, link cache has the same key for some pages which
+                       // might be read as part of the same batch. T220424 and T220316
+                       $linkCache->clearLink( $this->currentTitle );
+               }
                return "  </page>\n";
        }
 
@@ -289,8 +295,13 @@ class XmlDumpWriter {
                        try {
                                $text = $content_handler->exportTransform( $text, $content_format );
                        }
-                       catch ( MWException $ex ) {
-                               // leave text as is; that's the way it goes
+                       catch ( Exception $ex ) {
+                               if ( $ex instanceof MWException || $ex instanceof RuntimeException ) {
+                                       // leave text as is; that's the way it goes
+                                       wfLogWarning( 'exportTransform failed on text for revid ' . $row->rev_id . "\n" );
+                               } else {
+                                       throw $ex;
+                               }
                        }
                        $out .= "      " . Xml::elementClean( 'text',
                                [ 'xml:space' => 'preserve', 'bytes' => intval( $row->rev_len ) ],
@@ -299,21 +310,33 @@ class XmlDumpWriter {
                        // TODO: make this fully MCR aware, see T174031
                        $rev = $this->getRevisionStore()->newRevisionFromRow( $row, 0, $this->currentTitle );
                        $slot = $rev->getSlot( 'main' );
-                       $content = $slot->getContent();
-
-                       if ( $content instanceof TextContent ) {
-                               // HACK: For text based models, bypass the serialization step.
-                               // This allows extensions (like Flow)that use incompatible combinations
-                               // of serialization format and content model.
-                               $text = $content->getNativeData();
-                       } else {
-                               $text = $content->serialize( $content_format );
+                       try {
+                               $content = $slot->getContent();
+
+                               if ( $content instanceof TextContent ) {
+                                       // HACK: For text based models, bypass the serialization step.
+                                       // This allows extensions (like Flow)that use incompatible combinations
+                                       // of serialization format and content model.
+                                       $text = $content->getNativeData();
+                               } else {
+                                       $text = $content->serialize( $content_format );
+                               }
+                               $text = $content_handler->exportTransform( $text, $content_format );
+                               $out .= "      " . Xml::elementClean( 'text',
+                                       [ 'xml:space' => 'preserve', 'bytes' => intval( $slot->getSize() ) ],
+                                       strval( $text ) ) . "\n";
+                       }
+                       catch ( Exception $ex ) {
+                               if ( $ex instanceof MWException || $ex instanceof RuntimeException ) {
+                                       // there's no provsion in the schema for an attribute that will let
+                                       // the user know this element was unavailable due to error; an empty
+                                       // tag is the best we can do
+                                       $out .= "      " . Xml::element( 'text' ) . "\n";
+                                       wfLogWarning( 'failed to load content for revid ' . $row->rev_id . "\n" );
+                               } else {
+                                       throw $ex;
+                               }
                        }
-
-                       $text = $content_handler->exportTransform( $text, $content_format );
-                       $out .= "      " . Xml::elementClean( 'text',
-                               [ 'xml:space' => 'preserve', 'bytes' => intval( $slot->getSize() ) ],
-                               strval( $text ) ) . "\n";
                } elseif ( isset( $row->rev_text_id ) ) {
                        // Stub output for pre-MCR schema
                        // TODO: MCR: rev_text_id only exists in the pre-MCR schema. Remove this when
index aa955d0..43f6010 100644 (file)
@@ -129,6 +129,7 @@ class LockManagerGroup {
                        }
                        $config['logger'] = LoggerFactory::getInstance( 'LockManager' );
 
+                       // @phan-suppress-next-line PhanTypeInstantiateAbstract
                        $this->managers[$name]['instance'] = new $class( $config );
                }
 
index 97abe33..7d4f4df 100644 (file)
@@ -29,6 +29,7 @@ use MediaWiki\MediaWikiServices;
  * @ingroup FileAbstraction
  */
 
+// @phan-file-suppress PhanTypeMissingReturn false positives
 /**
  * Implements some public methods and some protected utility functions which
  * are required by multiple child classes. Contains stub functionality for
index 3a75720..ab8ef2f 100644 (file)
@@ -154,7 +154,7 @@ class ForeignAPIFile extends File {
 
        /**
         * @param int $page
-        * @return int|number
+        * @return int
         */
        public function getWidth( $page = 1 ) {
                return isset( $this->mInfo['width'] ) ? intval( $this->mInfo['width'] ) : 0;
index 1869967..3438a63 100644 (file)
@@ -24,6 +24,7 @@
 use MediaWiki\MediaWikiServices;
 use Wikimedia\Rdbms\DBUnexpectedError;
 
+// @phan-file-suppress PhanTypeMissingReturn false positives
 /**
  * Foreign file with an accessible MediaWiki database
  *
index 134a104..aa04fae 100644 (file)
@@ -796,11 +796,14 @@ class LocalFile extends File {
        /** isVisible inherited */
 
        /**
+        * Checks if this file exists in its parent repo, as referenced by its
+        * virtual URL.
+        *
         * @return bool
         */
        function isMissing() {
                if ( $this->missing === null ) {
-                       list( $fileExists ) = $this->repo->fileExists( $this->getVirtualUrl() );
+                       $fileExists = $this->repo->fileExists( $this->getVirtualUrl() );
                        $this->missing = !$fileExists;
                }
 
diff --git a/includes/gallery/PackedHoverImageGallery.php b/includes/gallery/PackedHoverImageGallery.php
new file mode 100644 (file)
index 0000000..2e1ef7d
--- /dev/null
@@ -0,0 +1,28 @@
+<?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
+ */
+
+/**
+ * Same as Packed except different CSS is applied to make the
+ * caption only show up on hover. If a touch screen is detected,
+ * falls back to PackedHoverGallery. Degrades gracefully for
+ * screen readers.
+ */
+class PackedHoverImageGallery extends PackedOverlayImageGallery {
+}
index 0a5a457..4c72f87 100644 (file)
@@ -53,12 +53,3 @@ class PackedOverlayImageGallery extends PackedImageGallery {
                        . "\n\t\t\t</div></div>";
        }
 }
-
-/**
- * Same as Packed except different CSS is applied to make the
- * caption only show up on hover. If a touch screen is detected,
- * falls back to PackedHoverGallery. Degrades gracefully for
- * screen readers.
- */
-class PackedHoverImageGallery extends PackedOverlayImageGallery {
-}
index 738db09..e21d783 100644 (file)
@@ -145,6 +145,10 @@ class OOUIHTMLForm extends HTMLForm {
                        [ 'class' => 'mw-htmlform-submit-buttons' ], "\n$buttons" ) . "\n";
        }
 
+       /**
+        * @inheritDoc
+        * @return OOUI\PanelLayout
+        */
        protected function wrapFieldSetSection( $legend, $section, $attributes, $isRoot ) {
                // to get a user visible effect, wrap the fieldset into a framed panel layout
                $layout = new OOUI\PanelLayout( [
index 4e64e9d..f137bf1 100644 (file)
@@ -144,7 +144,7 @@ class HTMLSelectAndOtherField extends HTMLSelectField {
        /**
         * @param WebRequest $request
         *
-        * @return array("<overall message>","<select value>","<text field value>")
+        * @return array ["<overall message>","<select value>","<text field value>"]
         */
        public function loadDataFromRequest( $request ) {
                if ( $request->getCheck( $this->mName ) ) {
index ccacbe4..7ac895c 100644 (file)
@@ -32,7 +32,7 @@ class UploadSourceAdapter {
        /** @var array */
        public static $sourceRegistrations = [];
 
-       /** @var string */
+       /** @var ImportSource */
        private $mSource;
 
        /** @var string */
index 750f108..54ffa5a 100644 (file)
@@ -20,8 +20,8 @@
  * @file
  * @ingroup Deployment
  */
-use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
+use Wikimedia\Rdbms\IMaintainableDatabase;
 use MediaWiki\MediaWikiServices;
 
 require_once __DIR__ . '/../../maintenance/Maintenance.php';
@@ -59,7 +59,7 @@ abstract class DatabaseUpdater {
        /**
         * Handle to the database subclass
         *
-        * @var Database
+        * @var IMaintainableDatabase
         */
        protected $db;
 
@@ -110,11 +110,15 @@ abstract class DatabaseUpdater {
        protected $holdContentHandlerUseDB = true;
 
        /**
-        * @param Database &$db To perform updates on
+        * @param IMaintainableDatabase &$db To perform updates on
         * @param bool $shared Whether to perform updates on shared tables
         * @param Maintenance|null $maintenance Maintenance object which created us
         */
-       protected function __construct( Database &$db, $shared, Maintenance $maintenance = null ) {
+       protected function __construct(
+               IMaintainableDatabase &$db,
+               $shared,
+               Maintenance $maintenance = null
+       ) {
                $this->db = $db;
                $this->db->setFlag( DBO_DDLMODE ); // For Oracle's handling of schema files
                $this->shared = $shared;
@@ -177,14 +181,18 @@ abstract class DatabaseUpdater {
        }
 
        /**
-        * @param Database $db
+        * @param IMaintainableDatabase $db
         * @param bool $shared
         * @param Maintenance|null $maintenance
         *
         * @throws MWException
         * @return DatabaseUpdater
         */
-       public static function newForDB( Database $db, $shared = false, Maintenance $maintenance = null ) {
+       public static function newForDB(
+               IMaintainableDatabase $db,
+               $shared = false,
+               Maintenance $maintenance = null
+       ) {
                $type = $db->getType();
                if ( in_array( $type, Installer::getDBTypes() ) ) {
                        $class = ucfirst( $type ) . 'Updater';
@@ -198,7 +206,7 @@ abstract class DatabaseUpdater {
        /**
         * Get a database connection to run updates
         *
-        * @return Database
+        * @return IMaintainableDatabase
         */
        public function getDB() {
                return $this->db;
index 75f3894..b8dc5ff 100644 (file)
@@ -166,6 +166,7 @@ class MssqlUpdater extends DatabaseUpdater {
                parent::applyPatch( $path, $isFullPath, $msg );
                $this->db->scrollableCursor( $prevScroll );
                $this->db->prepareStatements( $prevPrep );
+               return true;
        }
 
        /**
index 9ba8d02..008240a 100644 (file)
@@ -839,7 +839,7 @@ END;
                if ( !$this->db->tableExists( $table, __METHOD__ ) ) {
                        $this->output( "...skipping: '$table' table doesn't exist yet.\n" );
 
-                       return;
+                       return true;
                }
 
                // Second requirement: the new index must be missing
@@ -853,17 +853,18 @@ END;
                                        "            $old should be manually removed if not needed anymore.\n" );
                        }
 
-                       return;
+                       return true;
                }
 
                // Third requirement: the old index must exist
                if ( !$this->db->indexExists( $table, $old, __METHOD__ ) ) {
                        $this->output( "...skipping: index $old doesn't exist.\n" );
 
-                       return;
+                       return true;
                }
 
                $this->db->query( "ALTER INDEX $old RENAME TO $new" );
+               return true;
        }
 
        protected function dropPgField( $table, $field ) {
index 456058e..9f80489 100644 (file)
@@ -59,6 +59,7 @@ class WebInstallerComplete extends WebInstallerPage {
 
                $this->parent->restoreLinkPopups();
                $this->endForm( false, false );
+               return '';
        }
 
 }
index f79d272..5241b3c 100644 (file)
@@ -32,6 +32,7 @@ abstract class WebInstallerDocument extends WebInstallerPage {
                $this->parent->output->addWikiTextAsInterface( $text );
                $this->startForm();
                $this->endForm( false );
+               return '';
        }
 
        /**
index c7fe405..bef363d 100644 (file)
@@ -16,7 +16,8 @@
                        "Hamisun",
                        "Alifakoor",
                        "Seb35",
-                       "Ahmad252"
+                       "Ahmad252",
+                       "FarsiNevis"
                ]
        },
        "config-desc": "نصب‌کنندهٔ مدیاویکی",
        "config-install-done": "'''تبریک!'''\nبا موفقیت مدیاویکی را نصب کردید.\nبرنامه نصب‌کننده پرونده <code>LocalSettings.php</code> را درست کرد.\nکه شامل تمام تنظیمات می‌باشد.\n\nشما نیاز به دریافت آن دارید و آن را در پایهٔ نصب ویکی قرار دهید (همان پوشهٔ index.php). دریافت باید به صورت خودکار شروع شده‌باشد.\n\nاگر دریافت شروع نشد یا اگر آن را لغو کردید با کلیک روی پیوند زیر می‌توانید آن را دریافت کنید:\n\n$3\n\n'''توجه داشته باشید:''' اگر این را الآن انجام ندهید، این پرونده تولیدشده در صورتی که نصب را بدون دریافت آن تمام کردید بعداً در اختیار شما قرار نخواهد گرفت.\n\nوقتی انجام شد شما می‌توانید '''[$2 وارد ویکی شوید]'''.",
        "config-install-done-path": "<strong>تبریک!</strong>\nمدیاویکی با موفقیت نصب گردید.\nبرنامه نصب‌کننده یک پرونده <code>LocalSettings.php</code> ایجاد کرده است که شامل تمام تنظیمات می‌باشد.\n\nلازم است شما آن را دریافت کرده و در <code>$4</code> قرار دهید. اِن دریافت می باِست به صورت خودکار شروع شده‌باشد.\n\nاگر دریافت شروع نشده بود و یا آن را لغو کرده اید با کلیک روی پیوند زیر می‌توانید آن را دریافت کنید:\n\n$3\n\n<strong>توجه:</strong> اگر این کار را هم اکنون انجام ندهید و بدون دریافت آن از برنامه نصب خارج شويد، این پرونده تنظیمات تولیدشده در آینده در اختیار شما قرار نخواهد داشت.\n\nوقتی که آن کار را انجام داديد، می‌توانید <strong>[$2 وارد ويکی خودتان شويد]</strong>.",
        "config-install-success": "نصب مدیاویکی موفق بود. شما می‌توانید برای دیدن ویکی‌تان از <$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 01dc661..86cddd6 100644 (file)
        "config-sqlite-cant-create-db": "Non poteva crear le file de base de datos <code>$1</code>.",
        "config-sqlite-fts3-downgrade": "PHP non ha supporto pro FTS3. Le tabellas es retrogradate.",
        "config-can-upgrade": "Il ha tabellas MediaWiki in iste base de datos.\nPro actualisar los a MediaWiki $1, clicca super '''Continuar'''.",
+       "config-upgrade-error": "Un error ha occurrite durante le actualisation del tabellas MediaWiki in tu base de datos.\n\nPro plus information, examina le registro supra. Pro tentar lo de novo, clicca sur <strong>Continuar</strong>.",
        "config-upgrade-done": "Actualisation complete.\n\nTu pote ora [$1 comenciar a usar tu wiki].\n\nSi tu vole regenerar tu file <code>LocalSettings.php</code>, clicca super le button hic infra.\nIsto '''non es recommendate''' si tu non ha problemas con tu wiki.",
        "config-upgrade-done-no-regenerate": "Actualisation complete.\n\nTu pote ora [$1 comenciar a usar tu wiki].",
        "config-regenerate": "Regenerar LocalSettings.php →",
        "config-install-done": "<strong>Felicitationes!</strong>\nTu ha installate MediaWiki.\n\nLe installator ha generate un file <code>LocalSettings.php</code>.\nIste contine tote le configuration.\n\nEs necessari discargar lo e poner lo in le base del installation wiki (le mesme directorio que index.php).\nLe discargamento debe haber comenciate automaticamente.\n\nSi le discargamento non ha comenciate, o si illo esseva cancellate, recomencia le discargamento con un clic sur le ligamine sequente:\n\n$3\n\n<strong>Nota:</strong> Si tu non discarga iste file de configuration ora, illo non essera disponibile plus tarde.\n\nPost facer isto, tu pote <strong>[$2 entrar in tu wiki]</strong>.",
        "config-install-done-path": "<strong>Felicitationes!</strong>\nTu ha installate MediaWiki.\n\nLe installator ha generate un file <code>LocalSettings.php</code>.\nIste contine tote le configuration.\n\nEs necessari discargar lo e poner lo in <code>$4</code>.\nLe discargamento debe haber comenciate automaticamente.\n\nSi le discargamento non ha comenciate, o si illo esseva cancellate, recomencia le discargamento con un clic sur le ligamine sequente:\n\n$3\n\n<strong>Nota:</strong> Si tu non discarga iste file de configuration ora, illo non essera disponibile plus tarde.\n\nPost facer isto, tu pote <strong>[$2 entrar in tu wiki]</strong>.",
        "config-install-success": "MediaWiki ha essite installate con successo. Tu pote ora\nvisitar <$1$2> pro vider tu wiki.\nSi tu ha questiones, consulta nostre lista de questiones frequentemente ponite:\n<https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ> o usa un del\nforos de supporto indicate sur ille pagina.",
+       "config-install-db-success": "Le installation del base de datos ha succedite",
        "config-download-localsettings": "Discargar <code>LocalSettings.php</code>",
        "config-help": "adjuta",
        "config-help-tooltip": "clicca pro displicar",
        "config-skins-screenshots": "$1 (capturas de schermo: $2)",
        "config-extensions-requires": "$1 (require $2)",
        "config-screenshot": "captura de schermo",
+       "config-extension-not-found": "Impossibile trovar le file de registration pro le extension \"$1\"",
+       "config-extension-dependency": "Un error de dependentia se ha producite durante le installation del extension \"$1\": $2",
        "mainpagetext": "<strong>MediaWiki ha essite installate.</strong>",
        "mainpagedocfooter": "Consulta le [https://meta.wikimedia.org/wiki/Help:Contents Guida del usator] pro information sur le uso del software wiki.\n\n== Pro initiar ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Lista de configurationes]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ FAQ a proposito de MediaWiki]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Lista de diffusion pro annuncios de nove versiones de MediaWiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Traducer MediaWiki in tu lingua]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Como combatter le spam in tu wiki]"
 }
index 5be6e03..c1eabf2 100644 (file)
        "config-sqlite-cant-create-db": "Impossibile creare il file di database <code>$1</code> .",
        "config-sqlite-fts3-downgrade": "Il PHP è mancante del supporto FTS3, declassamento tabelle in corso",
        "config-can-upgrade": "Ci sono tabelle di MediaWiki in questo database.\nPer aggiornarle a MediaWiki $1, fai clic su '''continua'''.",
+       "config-upgrade-error": "Si è verificato un errore durante l'aggiornamento delle tabelle MediaWiki nel tuo database.\n\nPer ulteriori informazioni guarda nel registro qui sopra, per riprovare clicca su <strong>Continua</strong>.",
        "config-upgrade-done": "Aggiornamento completo.\n\nPuoi [$1 iniziare ad usare il tuo wiki].\n\nSe vuoi rigenerare il tuo file <code>LocalSettings.php</code>, clicca sul pulsante sotto. Questa operazione '''non è raccomandata''', a meno che non hai problemi con il tuo wiki.",
        "config-upgrade-done-no-regenerate": "Aggiornamento completo.\n\nPuoi [$1 iniziare ad usare il tuo wiki].",
        "config-regenerate": "Rigenera LocalSettings.php →",
        "config-install-mainpage-failed": "Impossibile inserire la pagina principale: $1",
        "config-install-done": "<strong>Complimenti!</strong>\nHai installato MediaWiki.\n\nIl programma di installazione ha generato un file <code>LocalSettings.php</code> che contiene tutte le impostazioni.\n\nDevi scaricarlo ed inserirlo nella directory base del tuo wiki (la stessa dove è presente index.php). Il download dovrebbe partire automaticamente.\n\nSe il download non si avvia, o se è stato annullato, puoi riavviarlo cliccando sul collegamento di seguito:\n\n$3\n\n<strong>Nota:</strong> se esci ora dall'installazione senza scaricare il file di configurazione che è stato generato, questo poi non sarà più disponibile in seguito.\n\nQuando hai fatto, puoi <strong>[$2 entrare nel tuo wiki]</strong>.",
        "config-install-done-path": "<strong>Complimenti!</strong>\nHai installato MediaWiki.\n\nIl programma di installazione ha generato un file <code>LocalSettings.php</code> che contiene tutte le impostazioni.\n\nDevi scaricarlo ed inserirlo in <code>$4</code>. Il download dovrebbe partire automaticamente.\n\nSe il download non si avvia, o se è stato annullato, puoi riavviarlo cliccando sul collegamento seguente:\n\n$3\n\n<strong>Nota:</strong> se esci ora dall'installazione senza scaricare il file di configurazione che è stato generato, questo poi non sarà più disponibile in seguito.\n\nQuando hai fatto, puoi <strong>[$2 entrare nel tuo wiki]</strong>.",
+       "config-install-success": "MediaWiki è stato installato corretamente. Ora puoi visitare <$1$2> per vedere il tuo wiki.\nSe hai domande, controlla la nostra lista di domande frequenti:\n<https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ> o usa usa uno dei forum di supporto riepilogati su quella pagina.",
+       "config-install-db-success": "Il database è stato configurato correttamente",
        "config-download-localsettings": "Scarica <code>LocalSettings.php</code>",
        "config-help": "aiuto",
        "config-help-tooltip": "fai clic per espandere",
index 54f743d..c79aa63 100644 (file)
        "config-install-done": "<strong>Gefeliciteerd!</strong>\nU hebt MediaWiki geïnstalleerd.\n\nHet installatieprogramma heeft het bestand <code>LocalSettings.php</code> aangemaakt.\nDit bevat al uw instellingen.\n\nU moet het bestand downloaden en in de hoofdmap van uw wiki-installatie plaatsen, in dezelfde map als index.php.\nDe download zou automatisch moeten zijn gestart.\n\nAls de download niet is gestart of als u de download hebt geannuleerd, dan kunt u de download opnieuw starten door op de onderstaande koppeling te klikken:\n\n$3\n\n<strong>Let op:</strong> als u dit niet nu doet, dan is het bestand als u later de installatieprocedure afsluit zonder het bestand te downloaden niet meer beschikbaar.\n\nNa het plaatsen van het bestand met instellingen kunt u <strong>[$2 uw wiki gebruiken]</strong>.",
        "config-install-done-path": "<strong>Gefeliciteerd!</strong>\nU hebt MediaWiki geïnstalleerd.\n\nHet installatieprogramma heeft het bestand <code>LocalSettings.php</code> aangemaakt.\nDit bevat al uw instellingen.\n\nU moet het bestand downloaden en in <code>$4</code> plaatsen. De download zou automatisch moeten zijn gestart.\n\nAls de download niet is gestart of als u de download hebt geannuleerd, dan kunt u de download opnieuw starten door op de onderstaande koppeling te klikken:\n\n$3\n\n<strong>Let op:</strong> Als u dit niet nu doet, dan is het bestand als u later de installatieprocedure afsluit zonder het bestand te downloaden niet meer beschikbaar.\n\nNa het plaatsen van het bestand met instellingen kunt u <strong>[$2 uw wiki gebruiken]</strong>.",
        "config-install-success": "MediaWiki is geïnstalleerd. U kunt nu\n<$1$2> bezoeken om uw wiki te bekijken.\nAls u vragen hebt, bekijk dan onze lijst met veelgestelde vragen:\n<https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ>, of gebruik een van de hulpforums vermeld op die pagina.",
+       "config-install-db-success": "Het installeren van de database is geslaagd",
        "config-download-localsettings": "<code>LocalSettings.php</code> downloaden",
        "config-help": "hulp",
        "config-help-tooltip": "klik om uit te vouwen",
index a313371..d0b5e14 100644 (file)
@@ -87,7 +87,7 @@
        "config-using-32bit": "<strong>Varning:</strong> ditt system verkar vara en 32-bitarsversion. Detta [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit rekommenderas inte].",
        "config-db-type": "Databastyp:",
        "config-db-host": "Databasvärd:",
-       "config-db-host-help": "Om din databasserver är på en annan server, ange då värdnamnet eller IP-adressen här.\n\nOm du använder ett delat webbhotell, bör din leverantör ge dig rätt värdnamn i deras dokumentation.\n\nOm du installerar på en Windowsserver och använder MySQL, kanske \"localhost\" inte fungerar för servernamnet. Om det inte gör det försök med \"127.0.0.1\" som den lokala IP-adressen.\n\nOm du använder PostgreSQL, lämna detta fält blankt för att ansluta via en Unix-socket.",
+       "config-db-host-help": "Om din databasserver är på en annan server, ange då värdnamnet eller IP-adressen här.\n\nOm du använder ett delat webbhotell, bör din leverantör ge dig rätt värdnamn i deras dokumentation.\n\nOm du använder MySQL, kanske \"localhost\" inte fungerar för servernamnet. Om det inte gör det försök med \"127.0.0.1\" som den lokala IP-adressen.\n\nOm du använder PostgreSQL, lämna detta fält blankt för att ansluta via en Unix-socket.",
        "config-db-host-oracle": "Databas TNS:",
        "config-db-host-oracle-help": "Ange ett giltigt [http://download.oracle.com/docs/cd/B28359_01/network.111/b28317/tnsnames.htm Local Connect Name]; en tnsnames.ora-fil måste vara synlig för denna installation.<br />Om du använder klientbibliotek 10g eller nyare kan du också använda [http://download.oracle.com/docs/cd/E11882_01/network.112/e10836/naming.htm Easy Connect] namngivningsmetoden.",
        "config-db-wiki-settings": "Identifiera denna wiki",
        "config-invalid-db-server-oracle": "Ogiltig databas-TNS \"$1\".\nAnvända antingen \"TNS Name\" eller en \"Easy Connect\"-sträng ([http://docs.oracle.com/cd/E11882_01/network.112/e10836/naming.htm Oracles namngivningsmetoder]).",
        "config-invalid-db-name": "\"$1\" är ett ogiltigt databasnamn.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).",
        "config-invalid-db-prefix": "\"$1\" är ett ogiltigt databasprefix.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).",
-       "config-connection-error": "$1.\n\nKontrollera värd, användarnamn och lösenord och försök igen.",
+       "config-connection-error": "$1.\n\nKontrollera värd, användarnamn och lösenord och försök igen. Om du använder \"localhost\" som databasvärden, försök använda \"127.0.0.1\" istället (eller tvärtom).",
        "config-invalid-schema": "\"$1\" är ett ogiltigt schema för MediaWiki.\nAnvänd bara ASCII-bokstäver (a-z, A-Z), siffror (0-9), understreck (_) och bindestreck (-).",
        "config-db-sys-create-oracle": "Installationsprogrammet stöder endast användningen av ett SYSDBA-konto för att skapa ett nytt konto.",
        "config-db-sys-user-exists-oracle": "Användarkontot \"$1\" finns redan. SYSDBA kan endast användas för att skapa ett nytt konto!",
        "config-install-done": "<strong>Grattis!</strong>\nDu har installerat MediaWiki.\n\nInstallationsprogrammet har genererat filen <code>LocalSettings.php</code>.\nDet innehåller alla dina konfigurationer.\n\nDu kommer att behöva ladda ner den och placera den i roten för din wiki-installation (samma katalog som index.php). Nedladdningen borde ha startats automatiskt.\n\nOm ingen nedladdning erbjöds, eller om du har avbrutit det kan du starta om nedladdningen genom att klicka på länken nedan:\n\n$3\n\n<strong>OBS</strong>: Om du inte gör detta nu, kommer denna genererade konfigurationsfil inte vara tillgänglig för dig senare om du avslutar installationen utan att ladda ned den.\n\nNär det är klart, kan du <strong>[$2 gå in på din wiki]</strong>",
        "config-install-done-path": "<strong>Grattis!</strong>\nDu har installerat MediaWiki.\n\nInstallationsprogrammet har genererat filen <code>LocalSettings.php</code>.\nDet innehåller alla dina konfigurationer.\n\nDu kommer att behöva ladda ner den och placera den i <code>$4</code>. Nedladdningen borde ha startats automatiskt.\n\nOm ingen nedladdning erbjöds, eller om du har avbrutit det kan du starta om nedladdningen genom att klicka på länken nedan:\n\n$3\n\n<strong>OBS</strong>: Om du inte gör detta nu, kommer denna genererade konfigurationsfil inte vara tillgänglig för dig senare om du avslutar installationen utan att ladda ned den.\n\nNär det är klart, kan du <strong>[$2 gå in på din wiki]</strong>",
        "config-install-success": "MediaWiki har installerats. Du kan nu besöka <$1$2> för att se din wiki.\nOm du undrar någonting, kolla in vår lista över vanliga ställda frågor:\n<https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ> eller använda något supportforum som länkas på sidan.",
+       "config-install-db-success": "Databasen har konfigurerats",
        "config-download-localsettings": "Ladda ner <code>LocalSettings.php</code>",
        "config-help": "hjälp",
        "config-help-tooltip": "klicka för att expandera",
index 0b5e62d..060003b 100644 (file)
@@ -106,13 +106,13 @@ abstract class Job implements IJobSpecification {
 
        /**
         * @param string $command
-        * @param array $params
+        * @param array|Title|null $params
         */
-       public function __construct( $command, $params = [] ) {
+       public function __construct( $command, $params = null ) {
                if ( $params instanceof Title ) {
                        // Backwards compatibility for old signature ($command, $title, $params)
                        $title = $params;
-                       $params = func_num_args() >= 3 ? func_get_arg( 2 ) : [];
+                       $params = func_get_arg( 2 );
                } else {
                        // Subclasses can override getTitle() to return something more meaningful
                        $title = Title::makeTitle( NS_SPECIAL, 'Blankpage' );
@@ -120,7 +120,7 @@ abstract class Job implements IJobSpecification {
 
                $this->command = $command;
                $this->title = $title;
-               $this->params = is_array( $params ) ? $params : []; // sanity
+               $this->params = is_array( $params ) ? $params : [];
                if ( !isset( $this->params['requestId'] ) ) {
                        $this->params['requestId'] = WebRequest::getRequestId();
                }
index b6c4005..cbcd4fb 100644 (file)
@@ -151,7 +151,7 @@ class JobQueueMemory extends JobQueue {
                }
 
                $claimed =& $this->getQueueData( 'claimed' );
-               $job->setMetadata( 'claimId', null );
+               unset( $claimed[$job->getMetadata( 'claimId' )] );
        }
 
        /**
index b71580a..3b2c899 100644 (file)
@@ -96,5 +96,6 @@ class ClearWatchlistNotificationsJob extends Job {
                                $firstBatch = false;
                        }
                } while ( $idsToUpdate );
+               return true;
        }
 }
index 9b5cef4..e6dfae4 100644 (file)
@@ -4,7 +4,7 @@
  * Class DeletePageJob
  */
 class DeletePageJob extends Job {
-       public function __construct( $title, $params ) {
+       public function __construct( $title, $params = [] ) {
                parent::__construct( 'deletePage', $title, $params );
        }
 
index 0945e58..bd0df5b 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 class UserGroupExpiryJob extends Job {
-       public function __construct( $params = false ) {
+       public function __construct( $params = [] ) {
                parent::__construct( 'userGroupExpiry', Title::newMainPage(), $params );
                $this->removeDuplicates = true;
        }
index 8efcd15..da525e7 100644 (file)
@@ -467,7 +467,7 @@ class IP {
         * to an integer network and a number of bits
         *
         * @param string $range IP with CIDR prefix
-        * @return array(int or string, int)
+        * @return array [int or string, int]
         */
        public static function parseCIDR( $range ) {
                if ( self::isIPv6( $range ) ) {
@@ -557,7 +557,7 @@ class IP {
         *
         * @param string $range
         *
-        * @return array(string, int)
+        * @return array [string, int]
         */
        private static function parseCIDR6( $range ) {
                # Explode into <expanded IP,range>
@@ -598,7 +598,7 @@ class IP {
         *
         * @param string $range
         *
-        * @return array(string, string)
+        * @return array [string, string]
         */
        private static function parseRange6( $range ) {
                # Expand any IPv6 IP
index e08da61..413fb2a 100644 (file)
@@ -806,6 +806,8 @@ EOT;
                if ( $eocdrPos !== false ) {
                        $this->logger->info( __METHOD__ . ": ZIP signature present in $file\n" );
                        // Check if it really is a ZIP file, make sure the EOCDR is at the end (T40432)
+                       // FIXME: unpack()'s third argument was added in PHP 7.1
+                       // @phan-suppress-next-line PhanParamTooManyInternal
                        $commentLength = unpack( "n", $tail, $eocdrPos + 20 )[0];
                        if ( $eocdrPos + 22 + $commentLength !== strlen( $tail ) ) {
                                $this->logger->info( __METHOD__ . ": ZIP EOCDR not at end. Not a ZIP file." );
index 746f3f5..0b52391 100644 (file)
@@ -72,7 +72,7 @@ class XmlTypeCheck {
         * Additional parsing options
         */
        private $parserOptions = [
-               'processing_instruction_handler' => '',
+               'processing_instruction_handler' => null,
                'external_dtd_handler' => '',
                'dtd_handler' => '',
                'require_safe_dtd' => true
index 1cc07b7..937ca55 100644 (file)
@@ -255,8 +255,6 @@ class MemcachedClient {
         * Memcache initializer
         *
         * @param array $args Associative array of settings
-        *
-        * @return mixed
         */
        public function __construct( $args ) {
                $this->set_servers( $args['servers'] ?? array() );
index 489f001..692771d 100644 (file)
@@ -138,6 +138,9 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                return $params;
        }
 
+       /**
+        * @suppress PhanTypeNonVarPassByRef
+        */
        protected function doGet( $key, $flags = 0, &$casToken = null ) {
                $this->debugLog( "get($key)" );
                if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
index 818f6f1..8c419b2 100644 (file)
@@ -70,12 +70,18 @@ class WinCacheBagOStuff extends BagOStuff {
        public function set( $key, $value, $expire = 0, $flags = 0 ) {
                $result = wincache_ucache_set( $key, serialize( $value ), $expire );
 
+               // false positive, wincache_ucache_set returns an empty array
+               // in some circumstances.
+               // @phan-suppress-next-line PhanTypeComparisonToArray
                return ( $result === [] || $result === true );
        }
 
        public function add( $key, $value, $exptime = 0, $flags = 0 ) {
                $result = wincache_ucache_add( $key, serialize( $value ), $exptime );
 
+               // false positive, wincache_ucache_add returns an empty array
+               // in some circumstances.
+               // @phan-suppress-next-line PhanTypeComparisonToArray
                return ( $result === [] || $result === true );
        }
 
index 3e71e36..62a2968 100644 (file)
@@ -72,7 +72,7 @@ class ChronologyProtector implements LoggerAwareInterface {
 
        /**
         * @param BagOStuff $store
-        * @param array[] $client Map of (ip: <IP>, agent: <user-agent> [, clientId: <hash>] )
+        * @param array $client Map of (ip: <IP>, agent: <user-agent> [, clientId: <hash>] )
         * @param int|null $posIndex Write counter index [optional]
         * @since 1.27
         */
index cf582b7..f3ab1c5 100644 (file)
@@ -8,7 +8,6 @@ use InvalidArgumentException;
  * Helper class to handle automatically marking connections as reusable (via RAII pattern)
  * as well handling deferring the actual network connection until the handle is used
  *
- * @note: proxy methods are defined explicitly to avoid interface errors
  * @ingroup Database
  * @since 1.22
  */
@@ -19,6 +18,8 @@ class DBConnRef implements IDatabase {
        private $conn;
        /** @var array|null N-tuple of (server index, group, DatabaseDomain|string) */
        private $params;
+       /** @var int One of DB_MASTER/DB_REPLICA */
+       private $role;
 
        const FLD_INDEX = 0;
        const FLD_GROUP = 1;
@@ -27,10 +28,13 @@ class DBConnRef implements IDatabase {
 
        /**
         * @param ILoadBalancer $lb Connection manager for $conn
-        * @param Database|array $conn Database handle or (server index, query groups, domain, flags)
+        * @param Database|array $conn Database or (server index, query groups, domain, flags)
+        * @param int $role The type of connection asked for; one of DB_MASTER/DB_REPLICA
+        * @internal This method should not be called outside of LoadBalancer
         */
-       public function __construct( ILoadBalancer $lb, $conn ) {
+       public function __construct( ILoadBalancer $lb, $conn, $role ) {
                $this->lb = $lb;
+               $this->role = $role;
                if ( $conn instanceof Database ) {
                        $this->conn = $conn; // live handle
                } elseif ( is_array( $conn ) && count( $conn ) >= 4 && $conn[self::FLD_DOMAIN] !== false ) {
@@ -49,6 +53,14 @@ class DBConnRef implements IDatabase {
                return $this->conn->$name( ...$arguments );
        }
 
+       /**
+        * @return int DB_MASTER when this *requires* the master DB, otherwise DB_REPLICA
+        * @since 1.33
+        */
+       public function getReferenceRole() {
+               return $this->role;
+       }
+
        public function getServerInfo() {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
@@ -255,7 +267,11 @@ class DBConnRef implements IDatabase {
        }
 
        public function query( $sql, $fname = __METHOD__, $flags = 0 ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
+               if ( $this->role !== ILoadBalancer::DB_MASTER ) {
+                       $flags |= IDatabase::QUERY_REPLICA_ROLE;
+               }
+
+               return $this->__call( __FUNCTION__, [ $sql, $fname, $flags ] );
        }
 
        public function freeResult( $res ) {
@@ -310,6 +326,8 @@ class DBConnRef implements IDatabase {
        public function lockForUpdate(
                $table, $conds = '', $fname = __METHOD__, $options = [], $join_conds = []
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -326,10 +344,14 @@ class DBConnRef implements IDatabase {
        }
 
        public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function update( $table, $values, $conds, $fname = __METHOD__, $options = [] ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -435,26 +457,36 @@ class DBConnRef implements IDatabase {
        }
 
        public function nextSequenceValue( $seqName ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function upsert(
                $table, array $rows, $uniqueIndexes, array $set, $fname = __METHOD__
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function deleteJoin(
                $delTable, $joinTable, $delVar, $joinVar, $conds, $fname = __METHOD__
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function delete( $table, $conds, $fname = __METHOD__ ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -462,6 +494,8 @@ class DBConnRef implements IDatabase {
                $destTable, $srcTable, $varMap, $conds,
                $fname = __METHOD__, $insertOptions = [], $selectOptions = [], $selectJoinConds = []
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -529,18 +563,21 @@ class DBConnRef implements IDatabase {
        }
 
        public function onTransactionResolution( callable $callback, $fname = __METHOD__ ) {
+               // DB_REPLICA role: caller might want to refresh cache after a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function onTransactionCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
+               // DB_REPLICA role: caller might want to refresh cache after a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) {
-               return $this->__call( __FUNCTION__, func_get_args() );
+               return $this->onTransactionCommitOrIdle( $callback, $fname );
        }
 
        public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
+               // DB_REPLICA role: caller might want to refresh cache after a cache mutex is released
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -551,20 +588,24 @@ class DBConnRef implements IDatabase {
        public function startAtomic(
                $fname = __METHOD__, $cancelable = IDatabase::ATOMIC_NOT_CANCELABLE
        ) {
+               // Don't call assertRoleAllowsWrites(); caller might want a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function endAtomic( $fname = __METHOD__ ) {
+               // Don't call assertRoleAllowsWrites(); caller might want a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function cancelAtomic( $fname = __METHOD__, AtomicSectionIdentifier $sectionId = null ) {
+               // Don't call assertRoleAllowsWrites(); caller might want a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function doAtomicSection(
                $fname, callable $callback, $cancelable = self::ATOMIC_NOT_CANCELABLE
        ) {
+               // Don't call assertRoleAllowsWrites(); caller might want a REPEATABLE-READ snapshot
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -627,18 +668,26 @@ class DBConnRef implements IDatabase {
        }
 
        public function lockIsFree( $lockName, $method ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function lock( $lockName, $method, $timeout = 5 ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function unlock( $lockName, $method ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -674,6 +723,26 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
+       /**
+        * Error out if the role is not DB_MASTER
+        *
+        * Note that the underlying connection may or may not itself be read-only.
+        * It could even be to a writable master (both server-side and to the application).
+        * This error is meant for the case when a DB_REPLICA handle was requested but a
+        * a write was attempted on that handle regardless.
+        *
+        * In configurations where the master DB has some generic read load or is the only server,
+        * DB_MASTER/DB_REPLICA will sometimes (or always) use the same connection to the master DB.
+        * This does not effect the role of DBConnRef instances.
+        * @throws DBReadOnlyRoleError
+        */
+       protected function assertRoleAllowsWrites() {
+               // DB_MASTER is "prima facie" writable
+               if ( $this->role !== ILoadBalancer::DB_MASTER ) {
+                       throw new DBReadOnlyRoleError( $this->conn, "Cannot write with role DB_REPLICA" );
+               }
+       }
+
        /**
         * Clean up the connection when out of scope
         */
index 2739205..ba97887 100644 (file)
@@ -104,7 +104,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
        /** @var callable Deprecation logging callback */
        protected $deprecationLogger;
 
-       /** @var resource|null Database connection */
+       /** @var object|resource|null Database connection */
        protected $conn = null;
        /** @var bool */
        protected $opened = false;
@@ -1032,7 +1032,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
         */
        protected function assertIsWritableMaster() {
                if ( $this->getLBInfo( 'replica' ) === true ) {
-                       throw new DBUnexpectedError(
+                       throw new DBReadOnlyRoleError(
                                $this,
                                'Write operations are not allowed on replica database connections.'
                        );
@@ -1194,7 +1194,6 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
 
                $flags = (int)$flags; // b/c; this field used to be a bool
                $ignoreErrors = $this->hasFlags( $flags, self::QUERY_SILENCE_ERRORS );
-               $pseudoPermanent = $this->hasFlags( $flags, self::QUERY_PSEUDO_PERMANENT );
 
                $priorTransaction = $this->trxLevel;
                $priorWritesPending = $this->writesOrCallbacksPending();
@@ -1206,8 +1205,13 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                        $this->assertIsWritableMaster();
                        # Do not treat temporary table writes as "meaningful writes" that need committing.
                        # Profile them as reads. Integration tests can override this behavior via $flags.
+                       $pseudoPermanent = $this->hasFlags( $flags, self::QUERY_PSEUDO_PERMANENT );
                        $tableType = $this->registerTempTableWrite( $sql, $pseudoPermanent );
                        $isEffectiveWrite = ( $tableType !== self::TEMP_NORMAL );
+                       # DBConnRef uses QUERY_REPLICA_ROLE to enforce the replica role for raw SQL queries
+                       if ( $isEffectiveWrite && $this->hasFlags( $flags, self::QUERY_REPLICA_ROLE ) ) {
+                               throw new DBReadOnlyRoleError( $this, "Cannot write; target role is DB_REPLICA" );
+                       }
                } else {
                        $isEffectiveWrite = false;
                }
@@ -3580,6 +3584,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware
                                list( $phpCallback ) = $callback;
                                $this->clearFlag( self::DBO_TRX ); // make each query its own transaction
                                try {
+                                       // @phan-suppress-next-line PhanParamTooManyCallable
                                        call_user_func( $phpCallback, $trigger, $this );
                                } catch ( Exception $ex ) {
                                        call_user_func( $this->errorLogger, $ex );
index 2aefd5f..6d266ae 100644 (file)
@@ -702,12 +702,6 @@ class DatabaseMssql extends Database {
                                }
                                if ( is_null( $value ) ) {
                                        $sql .= 'null';
-                               } elseif ( is_array( $value ) || is_object( $value ) ) {
-                                       if ( is_object( $value ) && $value instanceof Blob ) {
-                                               $sql .= $this->addQuotes( $value );
-                                       } else {
-                                               $sql .= $this->addQuotes( serialize( $value ) );
-                                       }
                                } else {
                                        $sql .= $this->addQuotes( $value );
                                }
index b4440d6..e25b4d2 100644 (file)
@@ -113,6 +113,8 @@ interface IDatabase {
         *   permanent as far as write tracking is concerned. This is useful for testing.
         */
        const QUERY_PSEUDO_PERMANENT = 2;
+       /** @var int Enforce that a query does not make effective writes */
+       const QUERY_REPLICA_ROLE = 4;
 
        /** @var bool Parameter to unionQueries() for UNION ALL */
        const UNION_ALL = true;
@@ -1011,6 +1013,7 @@ interface IDatabase {
         * @param string $valuename
         *
         * @return string
+        * @deprecated Since 1.33
         */
        public function aggregateValue( $valuedata, $valuename = 'value' );
 
@@ -1554,7 +1557,6 @@ interface IDatabase {
         *
         * @param callable $callback
         * @param string $fname Caller name
-        * @return mixed
         * @since 1.28
         */
        public function onTransactionResolution( callable $callback, $fname = __METHOD__ );
@@ -1598,7 +1600,6 @@ interface IDatabase {
         *
         * @param callable $callback
         * @param string $fname
-        * @return mixed
         * @since 1.20
         * @deprecated Since 1.32
         */
@@ -1644,7 +1645,6 @@ interface IDatabase {
         *
         * @param string $name Callback name
         * @param callable|null $callback Use null to unset a listener
-        * @return mixed
         * @since 1.28
         */
        public function setTransactionListener( $name, callable $callback = null );
@@ -2172,7 +2172,6 @@ interface IDatabase {
         * the aliases can be removed, and then the old X-named indexes dropped.
         *
         * @param string[] $aliases
-        * @return mixed
         * @since 1.31
         */
        public function setIndexAliases( array $aliases );
index 8a2c795..10a0897 100644 (file)
@@ -30,6 +30,8 @@ class MaintainableDBConnRef extends DBConnRef implements IMaintainableDatabase {
                $fname = false,
                callable $inputCallback = null
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -40,14 +42,20 @@ class MaintainableDBConnRef extends DBConnRef implements IMaintainableDatabase {
                $fname = __METHOD__,
                callable $inputCallback = null
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function dropTable( $tableName, $fName = __METHOD__ ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function deadlockLoop() {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -66,6 +74,8 @@ class MaintainableDBConnRef extends DBConnRef implements IMaintainableDatabase {
        public function duplicateTableStructure(
                $oldName, $newName, $temporary = false, $fname = __METHOD__
        ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -74,10 +84,14 @@ class MaintainableDBConnRef extends DBConnRef implements IMaintainableDatabase {
        }
 
        public function lockTables( array $read, array $write, $method ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
        public function unlockTables( $method ) {
+               $this->assertRoleAllowsWrites();
+
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
index 8e68aba..1819a9a 100644 (file)
@@ -6,15 +6,13 @@ class MssqlBlob extends Blob {
        /** @noinspection PhpMissingParentConstructorInspection */
 
        /**
-        * @param string $data
+        * @param Blob|string $data
         */
        public function __construct( $data ) {
                if ( $data instanceof MssqlBlob ) {
-                       return $data;
+                       $this->data = $data->data;
                } elseif ( $data instanceof Blob ) {
                        $this->data = $data->fetch();
-               } elseif ( is_array( $data ) && is_object( $data ) ) {
-                       $this->data = serialize( $data );
                } else {
                        $this->data = $data;
                }
diff --git a/includes/libs/rdbms/exception/DBReadOnlyRoleError.php b/includes/libs/rdbms/exception/DBReadOnlyRoleError.php
new file mode 100644 (file)
index 0000000..4d565ba
--- /dev/null
@@ -0,0 +1,30 @@
+<?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 Database
+ */
+
+namespace Wikimedia\Rdbms;
+
+/**
+ * Exception class for attempted DB write access to a DBConnRef with the DB_REPLICA role
+ *
+ * @ingroup Database
+ */
+class DBReadOnlyRoleError extends DBUnexpectedError {
+}
index 98c06ad..cb8be21 100644 (file)
@@ -390,7 +390,6 @@ interface ILBFactory {
         * the aliases can be removed, and then the old X-named indexes dropped.
         *
         * @param string[] $aliases
-        * @return mixed
         * @since 1.31
         */
        public function setIndexAliases( array $aliases );
index b20bf04..52d8370 100644 (file)
@@ -291,13 +291,13 @@ interface ILoadBalancer {
         *
         * @see ILoadBalancer::getConnection() for parameter information
         *
-        * @param int $db Server index or DB_MASTER/DB_REPLICA
+        * @param int $i Server index or DB_MASTER/DB_REPLICA
         * @param array|string|bool $groups Query group(s), or false for the generic reader
         * @param string|bool $domain Domain ID, or false for the current domain
         * @param int $flags Bitfield of CONN_* class constants (e.g. CONN_TRX_AUTOCOMMIT)
         * @return MaintainableDBConnRef
         */
-       public function getMaintenanceConnectionRef( $db, $groups = [], $domain = false, $flags = 0 );
+       public function getMaintenanceConnectionRef( $i, $groups = [], $domain = false, $flags = 0 );
 
        /**
         * Open a connection to the server given by the specified index
@@ -680,7 +680,6 @@ interface ILoadBalancer {
         * the aliases can be removed, and then the old X-named indexes dropped.
         *
         * @param string[] $aliases
-        * @return mixed
         * @since 1.31
         */
        public function setIndexAliases( array $aliases );
index bd22aca..da5382a 100644 (file)
@@ -834,23 +834,36 @@ class LoadBalancer implements ILoadBalancer {
                }
        }
 
-       public function getConnectionRef( $db, $groups = [], $domain = false, $flags = 0 ) {
+       public function getConnectionRef( $i, $groups = [], $domain = false, $flags = 0 ) {
                $domain = $this->resolveDomainID( $domain );
+               $role = $this->getRoleFromIndex( $i );
 
-               return new DBConnRef( $this, $this->getConnection( $db, $groups, $domain, $flags ) );
+               return new DBConnRef( $this, $this->getConnection( $i, $groups, $domain, $flags ), $role );
        }
 
-       public function getLazyConnectionRef( $db, $groups = [], $domain = false, $flags = 0 ) {
+       public function getLazyConnectionRef( $i, $groups = [], $domain = false, $flags = 0 ) {
                $domain = $this->resolveDomainID( $domain );
+               $role = $this->getRoleFromIndex( $i );
 
-               return new DBConnRef( $this, [ $db, $groups, $domain, $flags ] );
+               return new DBConnRef( $this, [ $i, $groups, $domain, $flags ], $role );
        }
 
-       public function getMaintenanceConnectionRef( $db, $groups = [], $domain = false, $flags = 0 ) {
+       public function getMaintenanceConnectionRef( $i, $groups = [], $domain = false, $flags = 0 ) {
                $domain = $this->resolveDomainID( $domain );
+               $role = $this->getRoleFromIndex( $i );
 
                return new MaintainableDBConnRef(
-                       $this, $this->getConnection( $db, $groups, $domain, $flags ) );
+                       $this, $this->getConnection( $i, $groups, $domain, $flags ), $role );
+       }
+
+       /**
+        * @param int $i Server index or DB_MASTER/DB_REPLICA
+        * @return int One of DB_MASTER/DB_REPLICA
+        */
+       private function getRoleFromIndex( $i ) {
+               return ( $i === self::DB_MASTER || $i === $this->getWriterIndex() )
+                       ? self::DB_MASTER
+                       : self::DB_REPLICA;
        }
 
        public function openConnection( $i, $domain = false, $flags = 0 ) {
index 5cad31f..c5e4a92 100644 (file)
@@ -100,7 +100,7 @@ interface LogEntry {
        /**
         * Get the access restriction.
         *
-        * @return string
+        * @return int
         */
        public function getDeleted();
 
index f003554..2d1c3b2 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Media
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * Generic handler for bitmap images
  *
@@ -228,7 +230,7 @@ class BitmapHandler extends TransformationalImageHandler {
                $rotation = isset( $params['disableRotation'] ) ? 0 : $this->getRotation( $image );
                list( $width, $height ) = $this->extractPreRotationDimensions( $params, $rotation );
 
-               $cmd = wfEscapeShellArg( ...array_merge(
+               $cmd = Shell::escape( ...array_merge(
                        [ $wgImageMagickConvertCommand ],
                        $quality,
                        // Specify white background color, will be used for transparent images
@@ -373,12 +375,12 @@ class BitmapHandler extends TransformationalImageHandler {
                global $wgCustomConvertCommand;
 
                # Variables: %s %d %w %h
-               $src = wfEscapeShellArg( $params['srcPath'] );
-               $dst = wfEscapeShellArg( $params['dstPath'] );
+               $src = Shell::escape( $params['srcPath'] );
+               $dst = Shell::escape( $params['dstPath'] );
                $cmd = $wgCustomConvertCommand;
                $cmd = str_replace( '%s', $src, str_replace( '%d', $dst, $cmd ) ); # Filenames
-               $cmd = str_replace( '%h', wfEscapeShellArg( $params['physicalHeight'] ),
-                       str_replace( '%w', wfEscapeShellArg( $params['physicalWidth'] ), $cmd ) ); # Size
+               $cmd = str_replace( '%h', Shell::escape( $params['physicalHeight'] ),
+                       str_replace( '%w', Shell::escape( $params['physicalWidth'] ), $cmd ) ); # Size
                wfDebug( __METHOD__ . ": Running custom convert command $cmd\n" );
                $retval = 0;
                $err = wfShellExecWithStderr( $cmd, $retval );
@@ -569,10 +571,10 @@ class BitmapHandler extends TransformationalImageHandler {
                $scaler = $this->getScalerType( null, false );
                switch ( $scaler ) {
                        case 'im':
-                               $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . " " .
-                                       wfEscapeShellArg( $this->escapeMagickInput( $params['srcPath'], $scene ) ) .
-                                       " -rotate " . wfEscapeShellArg( "-$rotation" ) . " " .
-                                       wfEscapeShellArg( $this->escapeMagickOutput( $params['dstPath'] ) );
+                               $cmd = Shell::escape( $wgImageMagickConvertCommand ) . " " .
+                                       Shell::escape( $this->escapeMagickInput( $params['srcPath'], $scene ) ) .
+                                       " -rotate " . Shell::escape( "-$rotation" ) . " " .
+                                       Shell::escape( $this->escapeMagickOutput( $params['dstPath'] ) );
                                wfDebug( __METHOD__ . ": running ImageMagick: $cmd\n" );
                                $retval = 0;
                                $err = wfShellExecWithStderr( $cmd, $retval );
index a0e7f2c..3b904e8 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Media
  */
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 /**
  * Handler for DjVu images
@@ -204,7 +205,7 @@ class DjVuHandler extends ImageHandler {
 
                # Use a subshell (brackets) to aggregate stderr from both pipeline commands
                # before redirecting it to the overall stdout. This works in both Linux and Windows XP.
-               $cmd = '(' . wfEscapeShellArg(
+               $cmd = '(' . Shell::escape(
                        $wgDjvuRenderer,
                        "-format=ppm",
                        "-page={$page}",
@@ -213,7 +214,7 @@ class DjVuHandler extends ImageHandler {
                if ( $wgDjvuPostProcessor ) {
                        $cmd .= " | {$wgDjvuPostProcessor}";
                }
-               $cmd .= ' > ' . wfEscapeShellArg( $dstPath ) . ') 2>&1';
+               $cmd .= ' > ' . Shell::escape( $dstPath ) . ') 2>&1';
                wfDebug( __METHOD__ . ": $cmd\n" );
                $retval = '';
                $err = wfShellExec( $cmd, $retval );
index d059cd8..7189179 100644 (file)
@@ -24,6 +24,8 @@
  * @ingroup Media
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * Support for detecting/validating DjVu image files and getting
  * some basic file metadata (resolution etc)
@@ -108,7 +110,7 @@ class DjVuImage {
                                $this->dumpForm( $file, $chunkLength, $indent + 1 );
                        } else {
                                fseek( $file, $chunkLength, SEEK_CUR );
-                               if ( $chunkLength & 1 == 1 ) {
+                               if ( ( $chunkLength & 1 ) == 1 ) {
                                        // Padding byte between chunks
                                        fseek( $file, 1, SEEK_CUR );
                                }
@@ -166,7 +168,7 @@ class DjVuImage {
        private function skipChunk( $file, $chunkLength ) {
                fseek( $file, $chunkLength, SEEK_CUR );
 
-               if ( $chunkLength & 0x01 == 1 && !feof( $file ) ) {
+               if ( ( $chunkLength & 0x01 ) == 1 && !feof( $file ) ) {
                        // padding byte
                        fseek( $file, 1, SEEK_CUR );
                }
@@ -253,19 +255,19 @@ class DjVuImage {
                if ( isset( $wgDjvuDump ) ) {
                        # djvudump is faster as of version 3.5
                        # https://sourceforge.net/p/djvu/bugs/71/
-                       $cmd = wfEscapeShellArg( $wgDjvuDump ) . ' ' . wfEscapeShellArg( $this->mFilename );
+                       $cmd = Shell::escape( $wgDjvuDump ) . ' ' . Shell::escape( $this->mFilename );
                        $dump = wfShellExec( $cmd );
                        $xml = $this->convertDumpToXML( $dump );
                } elseif ( isset( $wgDjvuToXML ) ) {
-                       $cmd = wfEscapeShellArg( $wgDjvuToXML ) . ' --without-anno --without-text ' .
-                               wfEscapeShellArg( $this->mFilename );
+                       $cmd = Shell::escape( $wgDjvuToXML ) . ' --without-anno --without-text ' .
+                               Shell::escape( $this->mFilename );
                        $xml = wfShellExec( $cmd );
                } else {
                        $xml = null;
                }
                # Text layer
                if ( isset( $wgDjvuTxt ) ) {
-                       $cmd = wfEscapeShellArg( $wgDjvuTxt ) . ' --detail=page ' . wfEscapeShellArg( $this->mFilename );
+                       $cmd = Shell::escape( $wgDjvuTxt ) . ' --detail=page ' . Shell::escape( $this->mFilename );
                        wfDebug( __METHOD__ . ": $cmd\n" );
                        $retval = '';
                        $txt = wfShellExec( $cmd, $retval, [], [ 'memory' => self::DJVUTXT_MEMORY_LIMIT ] );
index 4bcb53d..4aca5b3 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Media
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * JPEG specific handler.
  * Inherits most stuff from BitmapHandler, just here to do the metadata handler differently.
@@ -140,17 +142,23 @@ class JpegHandler extends ExifBitmapHandler {
                $rotation = ( $params['rotation'] + $this->getRotation( $file ) ) % 360;
 
                if ( $wgJpegTran && is_executable( $wgJpegTran ) ) {
-                       $cmd = wfEscapeShellArg( $wgJpegTran ) .
-                               " -rotate " . wfEscapeShellArg( $rotation ) .
-                               " -outfile " . wfEscapeShellArg( $params['dstPath'] ) .
-                               " " . wfEscapeShellArg( $params['srcPath'] );
-                       wfDebug( __METHOD__ . ": running jpgtran: $cmd\n" );
-                       $retval = 0;
-                       $err = wfShellExecWithStderr( $cmd, $retval );
-                       if ( $retval !== 0 ) {
-                               $this->logErrorForExternalProcess( $retval, $err, $cmd );
-
-                               return new MediaTransformError( 'thumbnail_error', 0, 0, $err );
+                       $command = Shell::command( $wgJpegTran,
+                               '-rotate',
+                               $rotation,
+                               '-outfile',
+                               $params['dstPath'],
+                               $params['srcPath']
+                       );
+                       $result = $command
+                               ->includeStderr()
+                               ->execute();
+                       if ( $result->getExitCode() !== 0 ) {
+                               $this->logErrorForExternalProcess( $result->getExitCode(),
+                                       $result->getStdout(),
+                                       $command
+                               );
+
+                               return new MediaTransformError( 'thumbnail_error', 0, 0, $result->getStdout() );
                        }
 
                        return false;
@@ -240,20 +248,21 @@ class JpegHandler extends ExifBitmapHandler {
                        return false;
                }
 
-               $cmd = wfEscapeShellArg( $wgExiftool,
+               $result = Shell::command(
+                       $wgExiftool,
                        '-EXIF:ColorSpace',
                        '-ICC_Profile:ProfileDescription',
                        '-S',
                        '-T',
                        $filepath
-               );
-
-               $output = wfShellExecWithStderr( $cmd, $retval );
+               )
+                       ->includeStderr()
+                       ->execute();
 
                // Explode EXIF data into an array with [0 => Color Space, 1 => Device Model Desc]
-               $data = explode( "\t", trim( $output ) );
+               $data = explode( "\t", trim( $result->getStdout() ) );
 
-               if ( $retval !== 0 ) {
+               if ( $result->getExitCode() !== 0 ) {
                        return false;
                }
 
@@ -271,16 +280,20 @@ class JpegHandler extends ExifBitmapHandler {
                        return false;
                }
 
-               $cmd = wfEscapeShellArg( $wgExiftool,
+               $command = Shell::command( $wgExiftool,
                        '-overwrite_original',
                        '-icc_profile<=' . $profileFilepath,
                        $filepath
                );
-
-               $output = wfShellExecWithStderr( $cmd, $retval );
-
-               if ( $retval !== 0 ) {
-                       $this->logErrorForExternalProcess( $retval, $output, $cmd );
+               $result = $command
+                       ->includeStderr()
+                       ->execute();
+
+               if ( $result->getExitCode() !== 0 ) {
+                       $this->logErrorForExternalProcess( $result->getExitCode(),
+                               $result->getStdout(),
+                               $command
+                       );
 
                        return false;
                }
index 4d75d04..bdda674 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  * @ingroup Media
  */
+
+use MediaWiki\Shell\Shell;
 use Wikimedia\ScopedCallback;
 
 /**
@@ -335,11 +337,11 @@ class SvgHandler extends ImageHandler {
                                // External command
                                $cmd = str_replace(
                                        [ '$path/', '$width', '$height', '$input', '$output' ],
-                                       [ $wgSVGConverterPath ? wfEscapeShellArg( "$wgSVGConverterPath/" ) : "",
+                                       [ $wgSVGConverterPath ? Shell::escape( "$wgSVGConverterPath/" ) : "",
                                                intval( $width ),
                                                intval( $height ),
-                                               wfEscapeShellArg( $srcPath ),
-                                               wfEscapeShellArg( $dstPath ) ],
+                                               Shell::escape( $srcPath ),
+                                               Shell::escape( $dstPath ) ],
                                        $wgSVGConverters[$wgSVGConverter]
                                );
 
index 38dc390..dbeca0b 100644 (file)
@@ -26,6 +26,7 @@
  * @ingroup Media
  */
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 /**
  * Handler for images that need to be transformed
@@ -517,7 +518,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
                        function () use ( $method ) {
                                global $wgImageMagickConvertCommand;
 
-                               $cmd = wfEscapeShellArg( $wgImageMagickConvertCommand ) . ' -version';
+                               $cmd = Shell::escape( $wgImageMagickConvertCommand ) . ' -version';
                                wfDebug( $method . ": Running convert -version\n" );
                                $retval = '';
                                $return = wfShellExecWithStderr( $cmd, $retval );
index 60237ff..6c1ac39 100644 (file)
@@ -1222,7 +1222,7 @@ EOT
         * @return TitleArray|Title[]
         */
        public function getForeignCategories() {
-               $this->mPage->getForeignCategories();
+               return $this->mPage->getForeignCategories();
        }
 
 }
index 4b0e503..655fa27 100644 (file)
@@ -2997,7 +2997,7 @@ class WikiPage implements Page, IDBAccessObject {
         * @param Content|null $content Page content to be used when determining
         *   the required updates. This may be needed because $this->getContent()
         *   may already return null when the page proper was deleted.
-        * @param RevisionRecord|Revision|null $revision The current page revision at the time of
+        * @param Revision|null $revision The current page revision at the time of
         *   deletion, used when determining the required updates. This may be needed because
         *   $this->getRevision() may already return null when the page proper was deleted.
         * @param User|null $user The user that caused the deletion
index 0ced8a1..47e5b40 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Parser
  */
 use MediaWiki\Linker\LinkRenderer;
+use MediaWiki\Linker\LinkRendererFactory;
 use MediaWiki\MediaWikiServices;
 use MediaWiki\Special\SpecialPageFactory;
 use Wikimedia\ScopedCallback;
@@ -276,6 +277,9 @@ class Parser {
        /** @var Config */
        private $siteConfig;
 
+       /** @var LinkRendererFactory */
+       private $linkRendererFactory;
+
        /**
         * @param array $parserConf See $wgParserConf documentation
         * @param MagicWordFactory|null $magicWordFactory
@@ -284,11 +288,13 @@ class Parser {
         * @param string|null $urlProtocols As returned from wfUrlProtocols()
         * @param SpecialPageFactory|null $spFactory
         * @param Config|null $siteConfig
+        * @param LinkRendererFactory|null $linkRendererFactory
         */
        public function __construct(
                array $parserConf = [], MagicWordFactory $magicWordFactory = null,
                Language $contLang = null, ParserFactory $factory = null, $urlProtocols = null,
-               SpecialPageFactory $spFactory = null, Config $siteConfig = null
+               SpecialPageFactory $spFactory = null, Config $siteConfig = null,
+               LinkRendererFactory $linkRendererFactory = null
        ) {
                $this->mConf = $parserConf;
                $this->mUrlProtocols = $urlProtocols ?? wfUrlProtocols();
@@ -320,6 +326,9 @@ class Parser {
                $this->factory = $factory ?? $services->getParserFactory();
                $this->specialPageFactory = $spFactory ?? $services->getSpecialPageFactory();
                $this->siteConfig = $siteConfig ?? MediaWikiServices::getInstance()->getMainConfig();
+
+               $this->linkRendererFactory =
+                       $linkRendererFactory ?? MediaWikiServices::getInstance()->getLinkRendererFactory();
        }
 
        /**
@@ -973,9 +982,9 @@ class Parser {
         * @return LinkRenderer
         */
        public function getLinkRenderer() {
+               // XXX We make the LinkRenderer with current options and then cache it forever
                if ( !$this->mLinkRenderer ) {
-                       $this->mLinkRenderer = MediaWikiServices::getInstance()
-                               ->getLinkRendererFactory()->create();
+                       $this->mLinkRenderer = $this->linkRendererFactory->create();
                        $this->mLinkRenderer->setStubThreshold(
                                $this->getOptions()->getStubThreshold()
                        );
index eb05ace..05c0622 100644 (file)
@@ -18,6 +18,7 @@
  * @file
  * @ingroup Parser
  */
+use MediaWiki\Linker\LinkRendererFactory;
 
 use MediaWiki\Special\SpecialPageFactory;
 
@@ -43,6 +44,9 @@ class ParserFactory {
        /** @var Config */
        private $siteConfig;
 
+       /** @var LinkRendererFactory */
+       private $linkRendererFactory;
+
        /**
         * @param array $parserConf See $wgParserConf documentation
         * @param MagicWordFactory $magicWordFactory
@@ -50,11 +54,12 @@ class ParserFactory {
         * @param string $urlProtocols As returned from wfUrlProtocols()
         * @param SpecialPageFactory $spFactory
         * @param Config $siteConfig
+        * @param LinkRendererFactory $linkRendererFactory
         * @since 1.32
         */
        public function __construct(
                array $parserConf, MagicWordFactory $magicWordFactory, Language $contLang, $urlProtocols,
-               SpecialPageFactory $spFactory, Config $siteConfig
+               SpecialPageFactory $spFactory, Config $siteConfig, LinkRendererFactory $linkRendererFactory
        ) {
                $this->parserConf = $parserConf;
                $this->magicWordFactory = $magicWordFactory;
@@ -62,6 +67,7 @@ class ParserFactory {
                $this->urlProtocols = $urlProtocols;
                $this->specialPageFactory = $spFactory;
                $this->siteConfig = $siteConfig;
+               $this->linkRendererFactory = $linkRendererFactory;
        }
 
        /**
@@ -70,6 +76,7 @@ class ParserFactory {
         */
        public function create() : Parser {
                return new Parser( $this->parserConf, $this->magicWordFactory, $this->contLang, $this,
-                       $this->urlProtocols, $this->specialPageFactory, $this->siteConfig );
+                       $this->urlProtocols, $this->specialPageFactory, $this->siteConfig,
+                       $this->linkRendererFactory );
        }
 }
index 3bcd012..4ed6b79 100644 (file)
@@ -858,6 +858,9 @@ class PPDStack {
                return $this->accum;
        }
 
+       /**
+        * @return bool|PPDPart
+        */
        public function getCurrentPart() {
                if ( $this->top === false ) {
                        return false;
@@ -970,6 +973,9 @@ class PPDStackElement {
                $this->parts[] = new $class( $s );
        }
 
+       /**
+        * @return PPDPart
+        */
        public function getCurrentPart() {
                return $this->parts[count( $this->parts ) - 1];
        }
index 1017e44..fe46798 100644 (file)
@@ -32,9 +32,11 @@ class ProfilerStub extends Profiler {
        }
 
        public function getFunctionStats() {
+               return [];
        }
 
        public function getOutput() {
+               return '';
        }
 
        public function close() {
index f76d771..7e69a02 100644 (file)
@@ -32,5 +32,6 @@ class UDPRCFeedEngine extends RCFeedEngine {
        public function send( array $feed, $line ) {
                $transport = UDPTransport::newFromString( $feed['uri'] );
                $transport->emit( $line );
+               return true;
        }
 }
index 839948d..02e02bb 100644 (file)
@@ -240,8 +240,6 @@ class ResourceLoader implements LoggerAwareInterface {
         * @param LoggerInterface|null $logger [optional]
         */
        public function __construct( Config $config = null, LoggerInterface $logger = null ) {
-               global $IP;
-
                $this->logger = $logger ?: new NullLogger();
 
                if ( !$config ) {
@@ -254,8 +252,9 @@ class ResourceLoader implements LoggerAwareInterface {
                // Add 'local' source first
                $this->addSource( 'local', $config->get( 'LoadScript' ) );
 
-               // Register core modules
-               $this->register( include "$IP/resources/Resources.php" );
+               // Special module that always exists
+               $this->register( 'startup', [ 'class' => ResourceLoaderStartUpModule::class ] );
+
                // Register extension modules
                $this->register( $config->get( 'ResourceModules' ) );
 
@@ -319,8 +318,6 @@ class ResourceLoader implements LoggerAwareInterface {
         * @throws MWException If a duplicate module registration is attempted
         * @throws MWException If a module name contains illegal characters (pipes or commas)
         * @throws MWException If something other than a ResourceLoaderModule is being registered
-        * @return bool False if there were any errors, in which case one or more modules were
-        *   not registered
         */
        public function register( $name, $info = null ) {
                $moduleSkinStyles = $this->config->get( 'ResourceModuleSkinStyles' );
@@ -1175,7 +1172,7 @@ MESSAGE;
         */
        private function ensureNewline( $str ) {
                $end = substr( $str, -1 );
-               if ( $end === false || $end === "\n" ) {
+               if ( $end === false || $end === '' || $end === "\n" ) {
                        return $str;
                }
                return $str . "\n";
@@ -1447,7 +1444,7 @@ MESSAGE;
                        }
                }
 
-               array_walk( $modules, [ 'self', 'trimArray' ] );
+               array_walk( $modules, [ self::class, 'trimArray' ] );
 
                return Xml::encodeJsCall(
                        'mw.loader.register',
index f11f294..372d12d 100644 (file)
@@ -132,7 +132,6 @@ class ResourceLoaderContext implements MessageLocalizer {
         * things that don't "really" need a context.
         *
         * Use cases:
-        * - Creating html5shiv script tag in OutputPage.
         * - Unit tests (deprecated, create empty instance directly or use RLTestCase).
         *
         * @return ResourceLoaderContext
index 9be5de3..031541b 100644 (file)
@@ -385,7 +385,7 @@ class ResourceLoaderFileModule extends ResourceLoaderModule {
                if ( $this->packageFiles !== null ) {
                        $packageFiles = $this->getPackageFiles( $context );
                        if ( $deprecationScript ) {
-                               $mainFile =& $packageFiles['files'][ $packageFiles['main'] ];
+                               $mainFile =& $packageFiles['files'][$packageFiles['main']];
                                $mainFile['content'] = $deprecationScript . $mainFile['content'];
                        }
                        return $packageFiles;
index 8cd5b19..27fa5ad 100644 (file)
@@ -20,6 +20,8 @@
  * @file
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * Class encapsulating an image used in a ResourceLoaderImageModule.
  *
@@ -73,7 +75,7 @@ class ResourceLoaderImage {
                }
                // Remove 'deprecated' key
                if ( is_array( $this->descriptor ) ) {
-                       unset( $this->descriptor[ 'deprecated' ] );
+                       unset( $this->descriptor['deprecated'] );
                }
 
                // Ensure that all files have common extension.
@@ -373,7 +375,7 @@ class ResourceLoaderImage {
                if ( strpos( $wgSVGConverter, 'rsvg' ) === 0 ) {
                        $command = 'rsvg-convert';
                        if ( $wgSVGConverterPath ) {
-                               $command = wfEscapeShellArg( "$wgSVGConverterPath/" ) . $command;
+                               $command = Shell::escape( "$wgSVGConverterPath/" ) . $command;
                        }
 
                        $process = proc_open(
index e97e074..7d39a58 100644 (file)
@@ -28,15 +28,15 @@ class ResourceLoaderOOUIFileModule extends ResourceLoaderFileModule {
        use ResourceLoaderOOUIModule;
 
        public function __construct( $options = [] ) {
-               if ( isset( $options[ 'themeScripts' ] ) ) {
-                       $skinScripts = $this->getSkinSpecific( $options[ 'themeScripts' ], 'scripts' );
+               if ( isset( $options['themeScripts'] ) ) {
+                       $skinScripts = $this->getSkinSpecific( $options['themeScripts'], 'scripts' );
                        if ( !isset( $options['skinScripts'] ) ) {
                                $options['skinScripts'] = [];
                        }
                        $this->extendSkinSpecific( $options['skinScripts'], $skinScripts );
                }
-               if ( isset( $options[ 'themeStyles' ] ) ) {
-                       $skinStyles = $this->getSkinSpecific( $options[ 'themeStyles' ], 'styles' );
+               if ( isset( $options['themeStyles'] ) ) {
+                       $skinStyles = $this->getSkinSpecific( $options['themeStyles'], 'styles' );
                        if ( !isset( $options['skinStyles'] ) ) {
                                $options['skinStyles'] = [];
                        }
index 0a4e94e..0395127 100644 (file)
@@ -104,7 +104,7 @@ trait ResourceLoaderOOUIModule {
         */
        protected function getThemePath( $theme, $kind, $module ) {
                $paths = self::getThemePaths();
-               $path = $paths[ $theme ][ $kind ];
+               $path = $paths[$theme][$kind];
                $path = str_replace( '{module}', $module, $path );
                return $path;
        }
index 6393803..2dd6c17 100644 (file)
@@ -98,14 +98,14 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
 
                if ( !is_array( $logo ) ) {
                        // No media queries required if we only have one variant
-                       $preloadLinks[ $logo ] = [ 'as' => 'image' ];
+                       $preloadLinks[$logo] = [ 'as' => 'image' ];
                        return $preloadLinks;
                }
 
                if ( isset( $logo['svg'] ) ) {
                        // No media queries required if we only have a 1x and svg variant
                        // because all preload-capable browsers support SVGs
-                       $preloadLinks [ $logo['svg'] ] = [ 'as' => 'image' ];
+                       $preloadLinks[$logo['svg']] = [ 'as' => 'image' ];
                        return $preloadLinks;
                }
 
@@ -124,7 +124,10 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
                } );
 
                foreach ( $logosPerDppx as $dppx => $src ) {
-                       $logos[] = [ 'dppx' => $dppx, 'src' => $src ];
+                       $logos[] = [
+                               'dppx' => $dppx,
+                               'src' => $src
+                       ];
                }
 
                $logosCount = count( $logos );
@@ -138,21 +141,24 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
                                // Smallest dppx
                                // min-resolution is ">=" (larger than or equal to)
                                // "not min-resolution" is essentially "<"
-                               $media_query = 'not all and (min-resolution: ' . $logos[ 1 ]['dppx'] . 'dppx)';
+                               $media_query = 'not all and (min-resolution: ' . $logos[1]['dppx'] . 'dppx)';
                        } elseif ( $i !== $logosCount - 1 ) {
                                // In between
                                // Media query expressions can only apply "not" to the entire expression
                                // (e.g. can't express ">= 1.5 and not >= 2).
                                // Workaround: Use <= 1.9999 in place of < 2.
-                               $upper_bound = floatval( $logos[ $i + 1 ]['dppx'] ) - 0.000001;
-                               $media_query = '(min-resolution: ' . $logos[ $i ]['dppx'] .
+                               $upper_bound = floatval( $logos[$i + 1]['dppx'] ) - 0.000001;
+                               $media_query = '(min-resolution: ' . $logos[$i]['dppx'] .
                                        'dppx) and (max-resolution: ' . $upper_bound . 'dppx)';
                        } else {
                                // Largest dppx
-                               $media_query = '(min-resolution: ' . $logos[ $i ]['dppx'] . 'dppx)';
+                               $media_query = '(min-resolution: ' . $logos[$i]['dppx'] . 'dppx)';
                        }
 
-                       $preloadLinks[ $logos[$i]['src'] ] = [ 'as' => 'image', 'media' => $media_query ];
+                       $preloadLinks[$logos[$i]['src']] = [
+                               'as' => 'image',
+                               'media' => $media_query
+                       ];
                }
 
                return $preloadLinks;
index a91537f..9fad348 100644 (file)
@@ -433,7 +433,7 @@ class ResourceLoaderWikiModule extends ResourceLoaderModule {
                                // Avoid including ids or timestamps of revision/page tables so
                                // that versions are not wasted
                                $title = new TitleValue( (int)$row->page_namespace, $row->page_title );
-                               $titleInfo[ self::makeTitleKey( $title ) ] = [
+                               $titleInfo[self::makeTitleKey( $title )] = [
                                        'page_len' => $row->page_len,
                                        'page_latest' => $row->page_latest,
                                        'page_touched' => $row->page_touched,
index ff1e8cb..22f5998 100644 (file)
@@ -22,6 +22,7 @@ class NullIndexField implements SearchIndexField {
         * @return $this
         */
        public function setFlag( $flag, $unset = false ) {
+               return $this;
        }
 
        /**
index 6d5f117..74ee552 100644 (file)
@@ -23,6 +23,8 @@
  * @file
  * @ingroup Search
  */
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\SlotRecord;
 
 /**
  * Search engine hook base class for Postgres
@@ -137,10 +139,16 @@ class SearchPostgres extends SearchDatabase {
                $top = $res->fetchRow()[0];
 
                $this->searchTerms = [];
+               $slotRoleStore = MediaWikiServices::getInstance()->getSlotRoleStore();
                if ( $top === "" ) { # # e.g. if only stopwords are used XXX return something better
                        $query = "SELECT page_id, page_namespace, page_title, 0 AS score " .
-                               "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " .
-                               "AND r.rev_text_id = c.old_id AND 1=0";
+                               "FROM page p, revision r, slots s, content c, pagecontent pc " .
+                               "WHERE p.page_latest = r.rev_id " .
+                               "AND s.slot_revision_id = r.rev_id " .
+                               "AND s.slot_role_id = " . $slotRoleStore->getId( SlotRecord::MAIN ) . " " .
+                               "AND c.content_id = s.slot_content_id " .
+                               "AND pc.old_id = substring( c.content_address from '^tt:([0-9]+)$' )::int " .
+                               "AND 1=0";
                } else {
                        $m = [];
                        if ( preg_match_all( "/'([^']+)'/", $top, $m, PREG_SET_ORDER ) ) {
@@ -151,10 +159,14 @@ class SearchPostgres extends SearchDatabase {
 
                        $query = "SELECT page_id, page_namespace, page_title, " .
                                "ts_rank($fulltext, to_tsquery($searchstring), 5) AS score " .
-                               "FROM page p, revision r, pagecontent c WHERE p.page_latest = r.rev_id " .
-                               "AND r.rev_text_id = c.old_id AND $fulltext @@ to_tsquery($searchstring)";
+                               "FROM page p, revision r, slots s, content c, pagecontent pc " .
+                               "WHERE p.page_latest = r.rev_id " .
+                               "AND s.slot_revision_id = r.rev_id " .
+                               "AND s.slot_role_id = " . $slotRoleStore->getId( SlotRecord::MAIN ) . " " .
+                               "AND c.content_id = s.slot_content_id " .
+                               "AND pc.old_id = substring( c.content_address from '^tt:([0-9]+)$' )::int " .
+                               "AND $fulltext @@ to_tsquery($searchstring)";
                }
-
                # # Namespaces - defaults to 0
                if ( !is_null( $this->namespaces ) ) { // null -> search all
                        if ( count( $this->namespaces ) < 1 ) {
@@ -178,9 +190,17 @@ class SearchPostgres extends SearchDatabase {
 
        function update( $pageid, $title, $text ) {
                # # We don't want to index older revisions
-               $sql = "UPDATE pagecontent SET textvector = NULL WHERE textvector IS NOT NULL and old_id IN " .
-                               "(SELECT DISTINCT rev_text_id FROM revision WHERE rev_page = " . intval( $pageid ) .
-                               " ORDER BY rev_text_id DESC OFFSET 1)";
+               $slotRoleStore = MediaWikiServices::getInstance()->getSlotRoleStore();
+               $sql = "UPDATE pagecontent SET textvector = NULL " .
+                       "WHERE textvector IS NOT NULL " .
+                       "AND old_id IN " .
+                       "(SELECT DISTINCT substring( c.content_address from '^tt:([0-9]+)$' )::int AS old_rev_text_id " .
+                       " FROM content c, slots s, revision r " .
+                       " WHERE r.rev_page = $pageid " .
+                       " AND s.slot_revision_id = r.rev_id " .
+                       " AND s.slot_role_id = " . $slotRoleStore->getId( SlotRecord::MAIN ) . " " .
+                       " AND c.content_id = s.slot_content_id " .
+                       " ORDER BY old_rev_text_id DESC OFFSET 1)";
                $this->db->query( $sql );
                return true;
        }
index 0e0a26a..101570f 100644 (file)
@@ -710,7 +710,6 @@ abstract class AuthManagerSpecialPage extends SpecialPage {
         * are shown closer to the bottom; weight defaults to 0. Negative weight is allowed.)
         * Keep order if weights are equal.
         * @param array &$formDescriptor
-        * @return array
         */
        protected static function sortFormDescriptorFields( array &$formDescriptor ) {
                $i = 0;
index 82bc84d..1b43a42 100644 (file)
@@ -1052,6 +1052,7 @@ abstract class ChangesListSpecialPage extends SpecialPage {
         *
         * There is light processing to simplify core maintenance.
         * @param array $definition
+        * @phan-param array<int,array{class:string}> $definition
         */
        protected function registerFiltersFromDefinitions( array $definition ) {
                $autoFillPriority = -1;
index 8df6493..722251d 100644 (file)
@@ -68,6 +68,7 @@ abstract class ImageQueryPage extends QueryPage {
 
        // Gotta override this since it's abstract
        function formatResult( $skin, $result ) {
+               return false;
        }
 
        /**
index b558d5e..155d6a4 100644 (file)
@@ -620,6 +620,7 @@ class SpecialBlock extends FormSpecialPage {
         *     the HTMLForm
         * @param WebRequest|null $request Optionally try and get data from a request too
         * @return array [ User|string|null, Block::TYPE_ constant|null ]
+        * @phan-return array{0:User|string|null,1:int|null}
         */
        public static function getTargetAndType( $par, WebRequest $request = null ) {
                $i = 0;
index 9d1b79e..36928ca 100644 (file)
@@ -44,7 +44,6 @@ class SpecialComparePages extends SpecialPage {
         * Show a form for filtering namespace and username
         *
         * @param string|null $par
-        * @return string
         */
        public function execute( $par ) {
                $this->setHeaders();
index 887f905..5f80215 100644 (file)
@@ -248,7 +248,8 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * @param User $user
         * @param string $editToken Edit token
         * @param Config|null $config optional for backwards compatibility
-        * @return string|null Null on success or string on error
+        * @return null|string|array Null on success, string on error, or array on
+        *  hook error
         */
        public static function getPermissionsError( $user, $editToken, Config $config = null ) {
                if ( $config === null ) {
@@ -298,7 +299,6 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * Form to ask for target user name.
         *
         * @param string $name User name submitted.
-        * @return string Form asking for user name.
         */
        protected function userForm( $name ) {
                $htmlForm = HTMLForm::factory( 'ooui', [
index 619665b..9ea5e08 100644 (file)
@@ -154,7 +154,6 @@ class SpecialExpandTemplates extends SpecialPage {
         *
         * @param string $title Value for context title field
         * @param string $input Value for input textbox
-        * @return string
         */
        private function makeForm( $title, $input ) {
                $fields = [
index 2599b16..e8e5ea0 100644 (file)
@@ -132,6 +132,7 @@ class MIMEsearchPage extends QueryPage {
                        ->setMethod( 'get' )
                        ->prepareForm()
                        ->displayForm( false );
+               return '';
        }
 
        protected function getSuggestionsForTypes() {
index 52db060..7e41305 100644 (file)
@@ -44,6 +44,7 @@ class SpecialPageLanguage extends FormSpecialPage {
 
        protected function preText() {
                $this->getOutput()->addModules( 'mediawiki.special.pageLanguage' );
+               return parent::preText();
        }
 
        protected function getFormFields() {
index 51d6fd9..5f69426 100644 (file)
@@ -549,7 +549,6 @@ class SpecialUndelete extends SpecialPage {
         *
         * @param Revision $previousRev
         * @param Revision $currentRev
-        * @return string HTML
         */
        function showDiff( $previousRev, $currentRev ) {
                $diffContext = clone $this->getContext();
index fe55d94..24d58c8 100644 (file)
@@ -261,6 +261,15 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                $scalerThumbUrl = $scalerBaseUrl . '/' . $file->getUrlRel() .
                        '/' . rawurlencode( $scalerThumbName );
 
+               // If a thumb proxy is set up for the repo, we favor that, as that will
+               // keep the request internal
+               $thumbProxyUrl = $file->getRepo()->getThumbProxyUrl();
+
+               if ( strlen( $thumbProxyUrl ) ) {
+                       $scalerThumbUrl = $thumbProxyUrl . 'temp/' . $file->getUrlRel() .
+                       '/' . rawurlencode( $scalerThumbName );
+               }
+
                // make an http request based on wgUploadStashScalerBaseUrl to lazy-create
                // a thumbnail
                $httpOptions = [
@@ -268,6 +277,14 @@ class SpecialUploadStash extends UnlistedSpecialPage {
                        'timeout' => 5 // T90599 attempt to time out cleanly
                ];
                $req = MWHttpRequest::factory( $scalerThumbUrl, $httpOptions, __METHOD__ );
+
+               $secret = $file->getRepo()->getThumbProxySecret();
+
+               // Pass a secret key shared with the proxied service if any
+               if ( strlen( $secret ) ) {
+                       $req->setHeader( 'X-Swift-Secret', $secret );
+               }
+
                $status = $req->execute();
                if ( !$status->isOK() ) {
                        $errors = $status->getErrorsArray();
index 2ad0def..391d9ab 100644 (file)
@@ -703,7 +703,7 @@ class SpecialVersion extends SpecialPage {
                                [ 'class' => 'mw-version-ext-name' ]
                        );
                } else {
-                       $extensionNameLink = $extensionName;
+                       $extensionNameLink = htmlspecialchars( $extensionName );
                }
 
                // ... and the version information
index da4398a..7a47edf 100644 (file)
@@ -393,7 +393,7 @@ class UploadForm extends HTMLForm {
         */
        public function show() {
                $this->addUploadJS();
-               parent::show();
+               return parent::show();
        }
 
        /**
index d05ebf8..88dff6e 100644 (file)
@@ -204,5 +204,6 @@ class NewFilesPager extends RangeChronologicalPager {
                        . htmlspecialchars( $time )
                        . "</i><br />\n"
                );
+               return '';
        }
 }
index 9e92e78..2bbe7c3 100644 (file)
@@ -21,6 +21,7 @@
  * @ingroup Upload
  */
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 /**
  * @defgroup Upload Upload related
@@ -1863,10 +1864,10 @@ abstract class UploadBase {
 
                if ( strpos( $command, "%f" ) === false ) {
                        # simple pattern: append file to scan
-                       $command .= " " . wfEscapeShellArg( $file );
+                       $command .= " " . Shell::escape( $file );
                } else {
                        # complex pattern: replace "%f" with file to scan
-                       $command = str_replace( "%f", wfEscapeShellArg( $file ), $command );
+                       $command = str_replace( "%f", Shell::escape( $file ), $command );
                }
 
                wfDebug( __METHOD__ . ": running virus scan: $command \n" );
index c191c70..5b07315 100644 (file)
@@ -1671,11 +1671,11 @@ class User implements IDBAccessObject, UserIdentity {
         * protected against race conditions using a compare-and-set (CAS) mechanism
         * based on comparing $this->mTouched with the user_touched field.
         *
-        * @param Database $db
+        * @param IDatabase $db
         * @param array $conditions WHERE conditions for use with Database::update
         * @return array WHERE conditions for use with Database::update
         */
-       protected function makeUpdateConditions( Database $db, array $conditions ) {
+       protected function makeUpdateConditions( IDatabase $db, array $conditions ) {
                if ( $this->mTouched ) {
                        // CAS check: only update if the row wasn't changed sicne it was loaded.
                        $conditions['user_touched'] = $db->timestamp( $this->mTouched );
@@ -2205,6 +2205,9 @@ class User implements IDBAccessObject, UserIdentity {
 
                // Set the user limit key
                if ( $userLimit !== false ) {
+                       // phan is confused because &can-bypass's value is a bool, so it assumes
+                       // that $userLimit is also a bool here.
+                       // @phan-suppress-next-line PhanTypeInvalidExpressionArrayDestructuring
                        list( $max, $period ) = $userLimit;
                        wfDebug( __METHOD__ . ": effective user limit: $max in {$period}s\n" );
                        $keys[$cache->makeKey( 'limiter', $action, 'user', $id )] = $userLimit;
@@ -2236,6 +2239,9 @@ class User implements IDBAccessObject, UserIdentity {
 
                $triggered = false;
                foreach ( $keys as $key => $limit ) {
+                       // phan is confused because &can-bypass's value is a bool, so it assumes
+                       // that $userLimit is also a bool here.
+                       // @phan-suppress-next-line PhanTypeInvalidExpressionArrayDestructuring
                        list( $max, $period ) = $limit;
                        $summary = "(limit $max in {$period}s)";
                        $count = $cache->get( $key );
@@ -2291,29 +2297,15 @@ class User implements IDBAccessObject, UserIdentity {
         * @param Title $title Title to check
         * @param bool $fromReplica Whether to check the replica DB instead of the master
         * @return bool
+        * @throws MWException
+        *
+        * @deprecated since 1.33,
+        * use MediaWikiServices::getInstance()->getPermissionManager()->isBlockedFrom(..)
+        *
         */
        public function isBlockedFrom( $title, $fromReplica = false ) {
-               $blocked = $this->isHidden();
-
-               if ( !$blocked ) {
-                       $block = $this->getBlock( $fromReplica );
-                       if ( $block ) {
-                               // Special handling for a user's own talk page. The block is not aware
-                               // of the user, so this must be done here.
-                               if ( $title->equals( $this->getTalkPage() ) ) {
-                                       $blocked = $block->appliesToUsertalk( $title );
-                               } else {
-                                       $blocked = $block->appliesToTitle( $title );
-                               }
-                       }
-               }
-
-               // only for the purpose of the hook. We really don't need this here.
-               $allowUsertalk = $this->mAllowUsertalk;
-
-               Hooks::run( 'UserIsBlockedFrom', [ $this, $title, &$blocked, &$allowUsertalk ] );
-
-               return $blocked;
+               return MediaWikiServices::getInstance()->getPermissionManager()
+                       ->isBlockedFrom( $this, $title, $fromReplica );
        }
 
        /**
@@ -5741,4 +5733,14 @@ class User implements IDBAccessObject, UserIdentity {
                // XXX it's not clear whether central ID providers are supposed to obey this
                return $this->getName() === $user->getName();
        }
+
+       /**
+        * Checks if usertalk is allowed
+        *
+        * @return bool
+        */
+       public function isAllowUsertalk() {
+               return $this->mAllowUsertalk;
+       }
+
 }
index f42b5a0..f2bc615 100644 (file)
@@ -77,7 +77,7 @@ class BatchRowUpdate {
                $this->reader = $reader;
                $this->writer = $writer;
                $this->generator = $generator;
-               $this->output = function () {
+               $this->output = function ( $text ) {
                }; // nop
        }
 
index f72ac1a..52cb231 100644 (file)
@@ -3697,6 +3697,7 @@ class Language {
                                        }
                                } elseif ( $dispLen > $length && $dispLen > strlen( $ellipsis ) ) {
                                        # String in fact does need truncation, the truncation point was OK.
+                                       // @phan-suppress-next-line PhanTypeInvalidExpressionArrayDestructuring
                                        list( $ret, $openTags ) = $maybeState; // reload state
                                        $ret = $this->removeBadCharLast( $ret ); // multi-byte char fix
                                        $ret .= $ellipsis; // add ellipsis
index 8aa7c87..c5ff9d6 100644 (file)
@@ -60,7 +60,13 @@ class LanguageConverter {
        public $mVariantFallbacks;
        public $mVariantNames;
        public $mTablesLoaded = false;
+
+       /**
+        * @var ReplacementArray[]
+        * @phan-var array<string,ReplacementArray>
+        */
        public $mTables;
+
        // 'bidirectional' 'unidirectional' 'disable' for each variant
        public $mManualLevel;
 
index f3ad0e3..c5af1e9 100644 (file)
        "delete-confirm": "حذف \"$1\"",
        "delete-legend": "حذف",
        "historywarning": "'''تنبيه:''' الصفحة التي تريد حذفها بها {{PLURAL:$1|نسخة|نسخة واحدة|نسختان|$1 نسخ|$1 نسخة}}. انظر",
-       "historyaction-submit": "أظÙ\87ر",
+       "historyaction-submit": "عرض Ø§Ù\84Ù\85راجعات",
        "confirmdeletetext": "أنت على وشك أن تقوم بحذف صفحة بالإضافة إلى كل تاريخها.\nمن فضلك التأكد من عزمك على الحذف، وبأنك مدرك للعواقب، وبأنك تقوم بهذا بالتوافق مع [[{{MediaWiki:Policy-url}}|السياسة]].",
        "actioncomplete": "انتهاء العملية",
        "actionfailed": "الفعل فشل",
index 3030ab4..e2bdb21 100644 (file)
        "version-entrypoints-header-url": "ইউআৰএল",
        "version-libraries-version": "সংস্কৰণ",
        "redirect": "ফাইল, সদস্য, পৃষ্ঠা বা সংশোধন বা লগ আই ডি-ৰে পুনঃনিৰ্দেশ",
-       "redirect-summary": "এই বিশেষ পৃষ্ঠাটোৱে আপোনাক অন্য এটা ফাইললৈ (ফাইলৰ নাম), এটা পৃষ্ঠালৈ (সংশোধন আই ডি বা পৃষ্ঠা আই ডি), অথবা অন্য সদস্যৰ পৃষ্ঠালৈ (সদস্যৰ সাংখ্যিক আই ডি) পুনঃনির্দেশিত কৰিছে।\nব্যৱহাৰ: [[{{#Special:Redirect}}/file/Example.jpg]], [[{{#Special:Redirect}}/page/64308]], [[{{#Special:Redirect}}/revision/328429]], বা [[{{#Special:Redirect}}/user/101]]।",
+       "redirect-summary": "এই বিশেষ পৃষ্ঠাটোৱে আপোনাক অন্য এটা ফাইললৈ (ফাইলৰ নাম), এটা পৃষ্ঠালৈ (সংশোধন আই ডি বা পৃষ্ঠা আই ডি), অথবা অন্য সদস্যৰ পৃষ্ঠালৈ (সদস্যৰ সাংখ্যিক আই ডি), এটা সূচী ভুক্তিলৈ (প্ৰদত্ত সূচী ভুক্তি) পুনঃনির্দেশিত কৰিছে।\nব্যৱহাৰ: [[{{#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": "মূল্য:",
index cb005a9..19de701 100644 (file)
@@ -80,6 +80,7 @@
        "tog-norollbackdiff": "Geri qaytardıqdan sonra dəyişikliklər arasındakı fərqi göstərmə",
        "tog-useeditwarning": "Qeyd edilməmiş dəyişikliyə sahib bir dəyişiklik səhifəsindən çıxarkən məni xəbərdar et",
        "tog-prefershttps": "Daxil olarkən hər zaman mühafizə edilən bağlantıdan istifadə et.",
+       "tog-showrollbackconfirmation": "Bir rollback linkinə kliklədiyinizdə təsdiq sorğusunu göstərin",
        "underline-always": "Həmişə",
        "underline-never": "Heç vaxt",
        "underline-default": "Susmaya görə brouzer",
        "createacct-reason-help": "Hesab yaratma qeydlərində göstərilən mesaj",
        "createacct-submit": "İstifadəçi hesabı yarat",
        "createacct-another-submit": "İstifadəçi hesabı yarat",
+       "createacct-continue-submit": "Hesab yaratmağı davam etdirin",
+       "createacct-another-continue-submit": "Hesab yaratmağı davam etdirin",
        "createacct-benefit-heading": "{{SITENAME}} sizin kimi insanlar tərəfindən yaradılır.",
        "createacct-benefit-body1": "{{PLURAL:$1|redaktə}}",
        "createacct-benefit-body2": "{{PLURAL:$1|səhifə|səhifə}}",
        "createacct-benefit-body3": "yeni {{PLURAL:$1|redaktor}}",
        "badretype": "Daxil etdiyiniz parol uyğun gəlmir.",
+       "usernameinprogress": "Bu istifadəçi adı üçün bir hesab yaratma artıq başlamışdır.\nZəhmət olmasa, gözləyin.",
        "userexists": "Daxil edilmiş ad artıq istifadədədir.\nLütfən başqa ad seçin.",
+       "createacct-normalization": "Texniki məhdudiyyətlər səbəbiylə istifadəçi adınız \"$2\" olaraq düzəldiləcək.",
        "loginerror": "Daxil olma xətası",
        "createacct-error": "Hesab yaratma xətası",
        "createaccounterror": "Bu istifadəçi adını yaratmaq mümkün olmadı: $1",
        "nocookieslogin": "{{SITENAME}} istifadəçilərin daxil ola bilməsi üçün \"cookie\"lərdən istifadə edir. Siz \"cookie\"lərin qəbuluna qadağa qoymusunuz. Lütfən, onların qəbuluna icazə verin və bir daha daxil olmağa cəhd edin.",
        "nocookiesfornew": "İstifadəçinin akkauntu yaradılmayıb, ona görə də biz onun mənbəsini təsdiqləyə bilmədik.\nKukların qoşulmasına əmin olduqdan sonra səhifəni yeniləyib bir daha sınayın.",
        "nocookiesforlogin": "{{int:nocookieslogin}}",
+       "createacct-loginerror": "Hesab müvəffəqiyyətlə yaradılıb, lakin avtomatik olaraq daxil olma mümkün olmadə. Zəhmət olmasa, [[Special:UserLogin|daxil olma]] səhifəsinə keçin.",
        "noname": "Siz mövcud olan istifadəçi adı daxil etməmisiniz.",
        "loginsuccesstitle": "Daxil oldunuz",
        "loginsuccess": "'''\"$1\" adı ilə sistemə daxil oldunuz.'''",
        "nosuchusershort": "\"$1\" adlı istifadəçi mövcud deyil. Yazdığınızı yoxlayın.",
        "nouserspecified": "İstifadəçi adı daxil etməlisiniz.",
        "login-userblocked": "Bu istifadəçi bloklanıb. Sistemə giriş üçün icazə verilmir.",
-       "wrongpassword": "Səhv parol. Təkrar yazın.",
+       "wrongpassword": "Yanlış istifadəçi adı və ya parol.\nZəhmət olmasa bir daha cəhd edin.",
        "wrongpasswordempty": "Parol boş. Təkrar yazın.",
        "passwordtooshort": "Parolda ən azı {{PLURAL:$1|1 hərf yaxud simvol|$1 hərf yaxud simvol}} olmalıdır.",
+       "passwordtoolong": "Parolda ən azı {{PLURAL:$1|1 hərf yaxud simvol|$1 hərf yaxud simvol}} olmalıdır.",
+       "passwordtoopopular": "Çox istifadə edilən parollar seçilə bilməz. Xahiş edirik təxmin edilməsi daha çətin olan bir parol seçin.",
+       "passwordinlargeblacklist": "Daxil edilən parol çox istifadə edilən parolların siyahısında mövcuddur. Xahiş edirik daha bənzərsiz parol seçin.",
        "password-name-match": "Parol adınızdan fərqli olmalıdır.",
        "password-login-forbidden": "Bu istifadəçi adından və paroldan istifadə qadağan olunub.",
        "mailmypassword": "E-mail ilə yeni parol göndər",
        "passwordremindertitle": "{{SITENAME}} parol xatırladıcı",
-       "passwordremindertext": "Kimsə (ehtimal ki, siz özünüz, $1 IP ünvanından) {{SITENAME}} ($4) layihəsi \nüçün yeni bir parol göndərilməsini istəyib. \"$2\" adlı istifadəçi üçün müvəqqəti \nolaraq \"$3\" parolu yaradılıb. Əgər bu sizin istəyiniz əsasında olubsa, \nhesabınıza daxil olaraq yeni bir parol yaratmağınız vacibdir. Müvəqqəti parolunuz\n{{PLURAL:$5|1 gün|$5 gün}} ərzində qüvvədə olacaqdır.\n\nParol dəyişdirməni siz istəməmisinizsə və ya parolunuzu xatırladınızsa \nvə artıq parolunuzu dəyişdirmək istəmirsinizsə, bu mesaja əhəmiyyət vermədən \nəvvəlki parolunuzdan istifadə etməyə davam edə bilərsiniz.",
+       "passwordremindertext": "Kimsə ($1 IP ünvanından) {{SITENAME}} ($4) layihəsi \nüçün yeni bir parol göndərilməsini istəyib. \"$2\" adlı istifadəçi üçün müvəqqəti \nolaraq \"$3\" parolu yaradılıb. Əgər bu sizin istəyiniz əsasında olubsa, \nhesabınıza daxil olaraq yeni bir parol yaratmağınız vacibdir. Müvəqqəti parolunuz\n{{PLURAL:$5|1 gün|$5 gün}} ərzində qüvvədə olacaqdır.\n\nParol dəyişdirməni siz istəməmisinizsə və ya parolunuzu xatırladınızsa \nvə artıq parolunuzu dəyişdirmək istəmirsinizsə, bu mesaja əhəmiyyət vermədən \nəvvəlki parolunuzdan istifadə etməyə davam edə bilərsiniz.",
        "noemail": "\"$1\" adlı istifadəçi e-poçt ünvanını qeyd etməmişdir.",
        "noemailcreate": "Düzgün e-poçt ünvanı qeyd etməlisiniz",
        "passwordsent": "Yeni parol \"$1\" üçün qeydiyyata alınan e-poçt ünvanına göndərilmişdir.\nXahiş edirik, e-məktubu aldıqdan sonra yenidən daxil olasınız.",
        "createaccount-text": "Biriləri {{SITENAME}} saytında ($4) sizin e-poçt ünvanınızdan istifadə edərək, parolu \"$3\" olan, \"$2\" adlı bir hesab yaratdı.\n\nSayta daxil olmalı və parolunuzu dəyişdirməlisiniz.\n\nƏgər istifadəçi hesabını səhvən yaratmısınızsa, bu mesajı gözardı edə bilərsiniz.",
        "login-throttled": "Sistemə daxil olmaq üçün həddən artıq cəhd etmisiniz.\nYeni cəhd etməzdən əvvəl $1 gözləyin.",
        "login-abort-generic": "Giriş uğursuz alındı — ləğv olundu",
+       "login-migrated-generic": "Hesabınız köçürüldü və bu vikidə istifadəçi adınız artıq mövcud deyil.",
        "loginlanguagelabel": "Dil: $1",
        "suspicious-userlogout": "Sizin çıxış üçün cəhdiniz uğursuz alındı. Bu, brouzerin yaxud proksi-keşləmənin düzgün işləməməsindən qaynaqlanır.",
        "createacct-another-realname-tip": "Gərçək adınız istəyə bağlıdır.\nƏgər gərçək adınızı göstərsəniz, çalışmalarınıza müraciət etmək üçün istifadə ediləcəkdir.",
        "pt-login": "Daxil ol",
        "pt-login-button": "Daxil ol",
+       "pt-login-continue-button": "Daxil olmağa davam edin",
        "pt-createaccount": "Hesab yarat",
        "pt-userlogout": "Çıxış",
        "php-mail-error-unknown": "PHP-nin mail() funksiyasında naməlum xəta",
        "retypenew": "Yeni parolu təkrar yazın:",
        "resetpass_submit": "Parol yaradın və sistemə daxil olun",
        "changepassword-success": "Parolunuz dəyişdirildi!",
+       "changepassword-throttled": "Sistemə daxil olmaq üçün həddən artıq cəhd etmisiniz.\nYeni cəhd etməzdən əvvəl $1 gözləyin.",
+       "botpasswords": "Bot parolları",
+       "botpasswords-summary": "<em>Bot parolları</em> hesabın əsas giriş etmə məlumatlarını istifadə etmədən API vasitəsilə bir istifadəçi hesabına giriş imkanı verir. Bir bot parol ilə daxil olduqda mövcud istifadəçi hüquqları məhdudlaşdırıla bilər.\n\nNiyə bunu edə biləcəyinizi bilmirsinizsə, bunu etməməlisiniz. Heç kim sizdən bunlardan birini yaratmağı və ona verməyinizi istəməyəcək.",
+       "botpasswords-disabled": "Bot parolları söndürüldü.",
+       "botpasswords-no-central-id": "Bot parollarını istifadə etmək üçün mərkəzləşdirilmiş bir hesaba daxil olmalısınız.",
+       "botpasswords-existing": "Mövcud bot parolları",
+       "botpasswords-createnew": "Yeni bot parolu yarat",
+       "botpasswords-editexisting": "Mövcud bot parolunu redaktə et",
+       "botpasswords-label-needsreset": "(parol sıfırlanmalıdır)",
        "botpasswords-label-appid": "Bot adı:",
        "botpasswords-label-create": "Yarat",
        "botpasswords-label-update": "Yenilə",
        "botpasswords-label-cancel": "Ləğv et",
        "botpasswords-label-delete": "Sil",
+       "botpasswords-label-resetpassword": "Parolu sıfırla",
+       "botpasswords-label-grants": "Tətbiq edilən hüquqlar:",
+       "botpasswords-help-grants": "Hüquqlar, istifadəçi hesabınız tərəfindən artıq saxlanılan hüquqlara giriş imkanı verir. Burada bir hüquq verilərkən, istifadəçi hesabınızın başqa cür olmadığı heç bir haqqı təmin etmir. Daha ətraflı məlumat üçün [[Special:ListGrants| hüquqlar]] səhifəsinə baxın.",
+       "botpasswords-label-grants-column": "Hüquq verildi",
+       "botpasswords-bad-appid": "\"$1\" bot adı etibarlı deyil.",
+       "botpasswords-insert-failed": "Bot adı \"$1\" əlavə etməyib. Artıq əlavə edilsin?",
+       "botpasswords-update-failed": "\"$1\" bot adı yenilənmədi. Silinsin?",
+       "botpasswords-created-title": "Bot parolu yaradıldı",
+       "botpasswords-created-body": "\"$2\" adlı istifadəçinin \"$1\" bot adı üçün bot parolu yaradıldı.",
+       "botpasswords-updated-title": "Bot parolu yeniləndi",
+       "botpasswords-updated-body": "\"$2\" adlı istifadəçinin \"$1\" bot adı üçün bot parolu yeniləndi.",
+       "botpasswords-deleted-title": "Bot parolu silindi",
+       "botpasswords-deleted-body": "\"$2\" adlı istifadəçinin \"$1\" bot adı üçün bot parolu silindi.",
+       "botpasswords-newpassword": "<strong>$1</strong> ilə daxil olmaq üçün yeni parol: <strong>$2</strong>. <em> Gələcək arayış üçün qeyd edin. </em> <br> (Giriş adının nüfuzlu istifadəçi adı ilə eyni olmasını tələb edən köhnə botlara görə <strong>$3</strong> istifadəçi adını və <strong>$4</strong> parolunu da istifadə edə bilərsiniz)",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider mövcud deyil.",
+       "botpasswords-restriction-failed": "Bot parol məhdudiyyətləri bu girişə mane olur.",
+       "botpasswords-invalid-name": "Göstərilən istifadəçi adı bot ayırıcısını (\"$1\") ehtiva etmir.",
+       "botpasswords-not-exist": "\"$1\" istifadəçisinin \"$2\" adlı bot parolu yoxdur.",
+       "botpasswords-needs-reset": "\"$1\" adlı istifadəçinin \"$2\" bot adı üçün bot parolu sıfırlanmalıdır.",
+       "botpasswords-locked": "Hesabınız kilidləndiyinə görə bot parolu ilə giriş edə bilməzsiniz.",
        "resetpass_forbidden": "Parolu dəyişmək mümkün deyil",
+       "resetpass_forbidden-reason": "Parolu dəyişmək mümkün deyil: $1",
        "resetpass-no-info": "Bu səhifəni birbaşa açmaq üçün sistemə daxil olmalısınız.",
        "resetpass-submit-loggedin": "Parolu dəyiş",
        "resetpass-submit-cancel": "Ləğv et",
        "resetpass-wrong-oldpass": "Müvəqqəti və ya daimi parolda yanlışlıq var.\nOla bilər siz parolu müvəffəqiyyətlə dəyişmisiniz, yaxud yeni müvəqqəti parol üçün müraciət etmisiniz.",
+       "resetpass-recycled": "Şifrənizi, mövcud parolunuzdan başqa bir şeyə dəyişdirin.",
+       "resetpass-temp-emailed": "Siz müvəqqəti e-poçt kodu ilə daxil oldunuz. \nDaxil olmağı bitirmək üçün buraya yeni bir parol yazmalısınız:",
        "resetpass-temp-password": "Müvəqqəti parol:",
        "resetpass-abort-generic": "Parol dəyişikliyi bir genişlənmə tərəfindən ləğv edildi.",
+       "resetpass-expired": "Parolunuzun müddəti doldu. Giriş etmək üçün yeni bir parol təyin edin.",
+       "resetpass-expired-soft": "Parolunuzun müddəti başa çatdı və dəyişdirilməlidir. Xahiş edirik yeni bir parol seçin və ya daha sonra dəyişdirmək üçün \"{{int:authprovider-resetpass-skip-label}}\" düyməsini basın.",
+       "resetpass-validity": "Parolunuz etibarlı deyil: $1\n\nGiriş etmək üçün yeni bir parol təyin edin.",
+       "resetpass-validity-soft": "Parolunuz etibarlı deyil: $1\n\nXahiş edirik yeni bir parol seçin və ya daha sonra dəyişdirmək üçün \"{{int: authprovider-resetpass-skip-label}}\" düyməsini basın.",
        "passwordreset": "Parolu yenilə",
        "passwordreset-text-one": "Parolunuzu sıfırlamaq üçün bu formanı doldurun.",
        "passwordreset-text-many": "{{PLURAL:$1|Parolunuzu sıfırlamaq üçün sahələrdən birini doldurun.}}",
        "passwordreset-email": "E-mail ünvanı:",
        "passwordreset-emailtitle": "{{SITENAME}} hesabın yaradılması",
        "passwordreset-emailtext-ip": "Kimsə, (ehtimal ki siz özünüz, $1 IP adresindən) {{SITENAME}} ($4) layihəsindəki hesabınızın \nparolunun yenilənməsini istəyib. Aşağıdakı istifadəçi {{PLURAL:$3|hesabı|hesabları}} bu e-poçt adresinə bağlıdır:\n\n$2\n\nBu müvəqqəti {{PLURAL:$3|parol|parollar}} {{PLURAL:$5|bir gün|$5 gün}} qüvvədə olacaqdır.\nSiz müvəqqəti parolla daxil olub yeni bir parol seçməlisiniz. Əgər parolun dəyişdirilməsini siz istəməmisinizsə və ya parolunuzu xatırladınızsa və artıq onu dəyişmək istəmirsinizsə, bu məktuba əhəmiyyət verməyərək köhnə parolunuzu istifadə etməyə davam edə bilərsiniz.",
+       "passwordreset-emailtext-user": "Kimsə, ($1 IP adresindən) {{SITENAME}} ($4) layihəsindəki hesabınızın \nparolunun sıfırlanmasını istəyib. Aşağıdakı istifadəçi {{PLURAL:$3|hesabı|hesabları}} bu e-poçt adresinə bağlıdır:\n\n$2\n\nBu müvəqqəti {{PLURAL:$3|parol|parollar}} {{PLURAL:$5|bir gün|$5 gün}} qüvvədə olacaqdır.\nSiz müvəqqəti parolla daxil olub yeni bir parol seçməlisiniz. Əgər parolun dəyişdirilməsini siz istəməmisinizsə və ya parolunuzu xatırladınızsa və artıq onu dəyişmək istəmirsinizsə, bu məktuba əhəmiyyət verməyərək köhnə parolunuzu istifadə etməyə davam edə bilərsiniz.",
        "passwordreset-emailelement": "İstifadəçi adı: \n$1\n\nMüvəqqəti parol: \n$2",
        "passwordreset-emailsentemail": "Əgər bu imeyl sizin istifadəçi hesabınıza bağlıdırsa, o halda parol sıfırlama məktubu ora göndəriləcək.",
+       "passwordreset-emailsentusername": "Əgər bu e-poçt sizin istifadəçi hesabınıza bağlıdırsa, o halda parol sıfırlama məktubu ora göndəriləcək.",
+       "passwordreset-nocaller": "Çağırıcı təmin edilməlidir",
+       "passwordreset-nosuchcaller": "Çağırıcı yoxdur: $1",
+       "passwordreset-ignored": "Parolun sıfırlanması işlənməmişdir. Bəlkə heç bir provayder qurulmayıb?",
        "passwordreset-invalidemail": "Səhv e-poçt",
+       "passwordreset-nodata": "Nə bir istifadəçi adı, nə də bir e-poçt ünvanı verilmədi.",
        "changeemail": "E-məktub ünvanını dəyiş və ya sil",
+       "changeemail-header": "E-poçt ünvanınızı dəyişdirmək üçün bu formanı tamamlayın. Hesabınızdakı hər hansı bir e-poçt ünvanının birləşməsini aradan qaldırmaq istəyirsinizsə, formu təqdim edərkən yeni e-poçt ünvanını boş buraxın.",
+       "changeemail-no-info": "Bu səhifəni birbaşa açmaq üçün sistemə daxil olmalısınız.",
        "changeemail-oldemail": "Hazırkı e-poçt ünvanı:",
        "changeemail-newemail": "Yeni e-poçt ünvanı:",
+       "changeemail-newemail-help": "E-poçt ünvanınızı çıxarmaq istəyirsinizsə, bu sahə boş olmalıdır. Unudulan bir parolu sıfırlaya bilməyəcəksiniz və e-poçt ünvanı çıxarıldıqda bu vikidən e-poçt ala bilməyəcəksiniz.",
        "changeemail-none": "(yoxdur)",
+       "changeemail-password": "Sizin {{SITENAME}} parolunuz:",
        "changeemail-submit": "E-poçtu dəyiş",
+       "changeemail-throttled": "Sistemə daxil olmaq üçün həddən artıq cəhd etmisiniz.\nYeni cəhd etməzdən əvvəl $1 gözləyin.",
+       "changeemail-nochange": "Fərqli bir yeni e-poçt ünvanı daxil edin.",
+       "resettokens": "Jetonları sıfırla",
+       "resettokens-text": "Hesabınızla əlaqəli müəyyən şəxsi məlumatlara giriş imkanı verən jetonlar sıfırlana bilər.\n\nTəsadüfən kimsə ilə paylaşdığınız təqdirdə və ya hesabınız pozulduğu halda bunu etməlisiniz.",
+       "resettokens-no-tokens": "Sıfırlanacaq heç bir jeton yoxdur.",
+       "resettokens-tokens": "Jetonlar:",
+       "resettokens-token-label": "$1 (cari dəyər: $2)",
+       "resettokens-watchlist-token": "[[Special:Watchlist|İzləmə siyahınızdakı]] səhifələrdə dəyişikliklərin web feed-i (Atom / RSS) üçün jeton",
+       "resettokens-done": "Jetonlar sıfırlandı.",
+       "resettokens-resetbutton": "Seçilmiş jetonları sıfırla",
        "bold_sample": "Qalın mətn",
        "bold_tip": "Qalın mətn",
        "italic_sample": "Kursiv mətn",
        "publishchanges": "Dəyişiklikləri yayımla",
        "savearticle-start": "Səhifəni dərc et...",
        "savechanges-start": "Dəyişiklikləri yadda saxla...",
+       "publishpage-start": "Səhifəni yayımla...",
+       "publishchanges-start": "Dəyişiklikləri yayımla...",
        "preview": "Sınaq görüntüsü",
        "showpreview": "Sınaq göstərişi",
        "showdiff": "Dəyişiklikləri göstər",
+       "blankarticle": "<strong>Xəbərdarlıq:</strong> Yaratdığınız səhifə boşdur. Əgər bir daha \"$1\" düyməsinə klikləsəniz, səhifə heç bir məzmun olmadan yaradılacaq.",
        "anoneditwarning": "<strong>Diqqət:</strong> Siz sistemə daxil olmamısınız. Hər hansı dəyişiklik etsəniz, sizin IP-ünvanınız hamıya görünəcək. Əgər <strong>[$1 daxil olsanız]</strong> və ya <strong>[$2 hesab yaratsanız]</strong>, redaktələriniz sizin istifadəçi adınıza yazılacaq və digər üstünlüklər də qazanacaqsınız.",
        "anonpreviewwarning": "Sistemə daxil olmamısınız. \"Səhifəni qeyd et\" düyməsini bassanız IP ünvanınız səhifənin tarixçəsində qeyd olunacaq.",
        "missingsummary": "'''Xatırlatma.''' Siz dəyişikliklərin qısa şərhini verməmisiniz. \"Səhifəni qeyd et\" düyməsinə təkrar basandan sonra sizin dəyişiklikləriniz şərhsiz qeyd olunacaq.",
+       "selfredirect": "<strong>Xəbərdarlıq:</strong> Bu səhifəni özünüzə istiqamətləndirirsiniz.\nİstiqamətləndirmə üçün yanlış hədəf göstərə bilərsiniz və ya səhv səhifəni redaktə edə bilərsiniz.\nYenidən \"$1\" düyməsinə bassanız, yenidən istiqamətləndirmə yaradılacaq.",
        "missingcommenttext": "Zəhmət olmasa, şərh yazın.",
+       "missingcommentheader": "<strong>Xatırlatma:</strong> Bu şərh üçün bir mövzu vermədiniz.\nYenidən \"$1\" düyməsinə basarsanız, düzəlişiniz heçnəsiz saxlanacaq.",
        "summary-preview": "Dəyişikliyin izahının görünüşü:",
        "subject-preview": "Sərlövhə belə olacaq:",
+       "previewerrortext": "Redaktələrinizin sınaq görüntüsü göstərilərkən bir səhv baş verdi.",
        "blockedtitle": "İstifadəçi bloklanıb",
+       "blocked-email-user": "<strong>İstifadəçi adınız e-poçt göndərməkdən bloklanmışdır. Siz hələ də bu vikidə redaktə edə bilərsiniz.</strong> Tam blok detallarını [[Special:MyContributions|istifadəçi fəaliyyətləri]] səhifəsində görə bilərsiniz.\n\nBloklayan: $1\nVerilmiş səbəb:<em>$2</em>\n\n*Blokun başlaması: $8\n*Blokun bitməsi: $6\n*Blok məqsədi: $7\n*Blok ID:#$5",
+       "blockedtext-partial": "<strong>İstifadəçi adınız bu səhifəni redaktə etməkdən bloklanmışdır. Siz bu vikidə digər səhifələrdə redaktə edə bilərsiniz.</strong> Tam blok detallarını [[Special:MyContributions|istifadəçi fəaliyyətləri]] səhifəsində görə bilərsiniz.\n\nBloklayan: $1\nVerilmiş səbəb:<em>$2</em>\n\n*Blokun başlaması: $8\n*Blokun bitməsi: $6\n*Blok məqsədi: $7\n*Blok ID:#$5",
+       "blockedtext": "<strong>Sizin istifadəçi adınız və ya IP ünvanınız bloklanmışdır.</strong>\n\nBloklayan: $1\nSəbəb: <em>$2</em>\n\n*Blokun başlaması: $8\n*Blokun bitməsi: $6\n*Blok məqsədi:$7\n\nSiz $1 ilə və ya  [[{{MediaWiki:Grouppage-sysop}}|digər idarəçilərlə]] bloku müzakirə edə bilərsiniz.\n[[Special:Preferences|Nizamlamalarda]] etibarlı bir e-poçt ünvanı göstərilmədikcə və onu istifadə etməmisinizsə, \"{{int: emailuser}}\" funksiyasından istifadə edə bilməzsiniz.\nSizin IP ünvanınız: $3\nBlok ID: #$5\nXahiş etdiyiniz hər hansı bir sorğuda yuxarıda göstərilən məlumatları daxil edin.",
+       "autoblockedtext": "Sizin IP ünvanınız avtomatik olaraq bloklanıb, çünki digər bloklanmış istifadəçi tərəfindən istifadə edilib.\n\nBloklayan: $1\nSəbəb: <em>$2</em>\n\n*Blokun başlaması: $8\n*Blokun bitməsi: $6\n*Blok məqsədi:$7\n\nSiz $1 ilə və ya  [[{{MediaWiki:Grouppage-sysop}}|digər idarəçilərlə]] bloku müzakirə edə bilərsiniz.\n[[Special:Preferences|Nizamlamalarda]] etibarlı bir e-poçt ünvanı göstərilmədikcə və onu istifadə etməmisinizsə, \"{{int: emailuser}}\" funksiyasından istifadə edə bilməzsiniz.\nSizin IP ünvanınız: $3\nBlok ID: #$5\nXahiş etdiyiniz hər hansı bir sorğuda yuxarıda göstərilən məlumatları daxil edin.",
+       "systemblockedtext": "Sizin istifadəçi adınız və ya IP ünvanınız MediaWiki tərəfindən avtomatik olaraq bloklanıb.\n\nSəbəb: <em>$2</em>\n\n*Blokun başlaması: $8\n*Blokun bitməsi: $6\n*Blok məqsədi:$7\n\n\nSizin IP ünvanınız: $3\nXahiş etdiyiniz hər hansı bir sorğuda yuxarıda göstərilən məlumatları daxil edin.",
        "blockednoreason": "səbəb göstərilməyib",
        "whitelistedittext": "Dəyişiklik edə bilmək üçün $1.",
        "confirmedittext": "Siz elektron ünvanınızı səhifədə dəyişiklik etməzdən əvvəl göstərməlisiniz.\nZəhmət olmasa elektron ünvanınızı [[Special:Preferences|istifadəçi nizamlaması]] səhifənizdə göstərib təsdiq ediniz.",
        "accmailtext": "[[User talk:$1|$1]] üçün təsadüfi yolla yaradılmış parol $2 ünvanına göndərildi.\nHesabınıza daxil olduqdan sonra, parolunuzu ''[[Special:ChangePassword|parolu dəyiş]]'' səhifəsində dəyişdirə bilərsiniz.",
        "newarticle": "(Yeni)",
        "newarticletext": "Mövcud olmayan səhifəyə olan keçidi izlədiniz. Aşağıdakı sahəyə məzmununu yazaraq bu səhifəni '''siz''' yarada bilərsiniz. (əlavə məlumat üçün [$1 kömək səhifəsinə] baxın). Əgər bu səhifəyə səhvən gəlmisinizsə sadəcə olaraq brauzerin '''geri''' düyməsinə vurun.",
-       "anontalkpagetext": "----\n<em>Bu səhifə qeydiyyatdan keçməmiş və ya daxil olmamış anonim istifadəçiyə aid müzakirə səhifəsidir.</em>\nOna görə bu istifadəçini rəqəmlərdən ibarət IP ünvanı ilə müəyyən etmək məcburiyyətindəyik.\nBelə IP-ünvan bir neçə fərd tərəfindən istifadədə ola bilər.\nƏgər siz anonim istifadəçisinizsə və bu mesajın sizə aid olmadığını düşünürsünüzsə, onda [[Special:CreateAccount|qeydiyyatdan keçin]] və ya [[Special:UserLogin|daxil olun]] ki, digər anonim istifadəçilərlə qarışıqlıq yaşamayasınız.",
+       "anontalkpagetext": "----\n<em>Bu səhifə qeydiyyatdan keçməmiş və ya daxil olmamış anonim istifadəçiyə aid müzakirə səhifəsidir.</em>\nOna görə bu istifadəçini rəqəmlərdən ibarət IP ünvanı ilə müəyyən etmək məcburiyyətindəyik.\nBelə IP ünvan bir neçə fərd tərəfindən istifadədə ola bilər.\nƏgər siz anonim istifadəçisinizsə və bu mesajın sizə aid olmadığını düşünürsünüzsə, onda [[Special:CreateAccount|qeydiyyatdan keçin]] və ya [[Special:UserLogin|daxil olun]] ki, digər anonim istifadəçilərlə qarışıqlıq yaşamayasınız.",
        "noarticletext": "Hal-hazırda bu səhifə boşdur. Başqa səhifələrdə eyni adda səhifəni [[Special:Search/{{PAGENAME}}|axtara]], əlaqəli qeydlərə\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} baxa] və ya [{{fullurl:{{FULLPAGENAME}}|action=edit}} bu adda səhifəni yarada]</span> bilərsiniz.",
        "noarticletext-nopermission": "Hal-hazırda bu səhifə boşdur. Başqa səhifələrdə eyni adlı səhifəni [[Special:Search/{{PAGENAME}}| axtara]], <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} əlaqəli qeydlərə baxa] və ya səhifəni [{{fullurl:{{FULLPAGENAME}}|action=edit}} redaktə edə bilərsiniz]</span>, lakin sizin bu məqaləni yaratmaq hüququnuz yoxdur.",
+       "missing-revision": "\"{{FULLPAGENAME}}\" adlı səhifənin #$1 versiyası mövcud deyil.\n\nBu adətən silinmiş bir səhifəyə köhnəlmiş keçid bağlantısı ilə bağlıdır. Detallar üçün [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} silmə qeydlərinə] baxın.",
        "userpage-userdoesnotexist": "\"<nowiki>$1</nowiki>\" istifadəçi adı qeydiyyata alınmayıb.\nƏgər siz bu səhifəni yaratmaq/redaktə etmək istəyirsinizsə, xahiş edirik bunu yoxlayın.",
        "userpage-userdoesnotexist-view": "\"$1\" istifadəçi hesabı qeydiyyatda deyil",
        "blocked-notice-logextract": "Bu istifadəçi hal-hazırda bloklanmışdır.\nBloklama qeydlərinin sonuncusu aşağıda göstərilmişdir:",
+       "clearyourcache": "<strong>Qeyd:</strong> Yaddaşa verdikdən sonra dəyişikliklərin görünməsi üçün brauzerinizin keşindən yan keçilməsi lazım ola bilər. \n<strong>Mozilla / Firefox / Safari:</strong>''' <em>Reload</em> düyməsini basarkən eyni vaxtda <em>Shift</em>-i basılı tutun və ya ''Ctrl-Shift-R''-a basın. (Apple Mac-da ''Cmd-Shift-R''). '''İE''': ''Refresh'' düyməsini basarkən eyni vaxtda ''Ctrl''-i basılı tutun və ya ''Ctrl-F5''-ə basın. '''Conqueror:''' Sadəcə ''Reload'' düyməsinə və ya ''F5''-ə basın. '''Opera''' brauzeri istifadəçiləri ''Tools→Preferences''-dən ''cache''-lərini tamamilə təmizləməli ola bilərlər.",
        "usercssyoucanpreview": "'''İpucu:''' Qeyd etmədən əvvəl \"{{int:showpreview}}\"ə klikləyərək yeni CSSinizi yoxlayın.",
+       "userjsonyoucanpreview": "'''İpucu:''' Qeyd etməzdən əvvəl \"{{int:showpreview}}\" düyməsinə klikləyərək yeni JSON-unuzu yoxlayın.",
        "userjsyoucanpreview": "'''İpucu:''' Qeyd etmədən əvvəl \"{{int:showpreview}}\"ə klikləyərək yeni JavaScriptinizi yoxlayın.",
        "usercsspreview": "''Xatırladırıq ki, siz yalnız CSS-də sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
+       "userjsonpreview": "''Xatırladırıq ki, siz yalnız JSON-da sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
        "userjspreview": "''Xatırladırıq ki, siz yalnız JavaScript-də test/sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
        "sitecsspreview": "''Xatırladırıq ki, siz yalnız CSS-də sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
+       "sitejsonpreview": "''Xatırladırıq ki, siz yalnız JSON-da sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
        "sitejspreview": "''Xatırladırıq ki, siz yalnız JavaScript kodunda sınaq göstərişi etmisiniz.'''\n'''Bu hələ yaddaşda saxlanılmayıb!'''",
+       "userinvalidconfigtitle": "<strong>Xəbərdarlıq:</strong> \"$1\" dərisi (skin) yoxdur.\nXüsusi css, .json, və .js səhifələri kiçik hərflə başlayır. Məsələn: {{ns:user}}:Foo/vector.css",
        "updated": "(yeniləndi)",
        "note": "'''Qeyd:'''",
        "previewnote": "<strong>Unutmayın ki, bu yalnız sınaq göstərişidir.</strong> Dəyişiklikləriniz hal-hazırda qeyd edilməmişdir!",
        "continue-editing": "Redaktə sahəsinə qayıt",
        "previewconflict": "Bu sınaq göstərişidir və yaddaşda saxlayacağınız təqdirdə mətnin redaktə səhifəsinin yuxarı hissəsində nəticənin necə olacağını göstərir.",
        "session_fail_preview": "Üzr istəyirik! Sizin redaktəniz saxlanmadı. \n\nOla bilsin ki, profilinizdən çıxmısınız. <strong>Lütfən hesabınıza daxil olmağınızı yoxlayın və təkrar cəhd edin</strong>. Problem həll olunmazsa, [[Special:UserLogout|hesabınızdan çıxın]] və yenidən daxil olun, həmçinin brauzerinizin bu saytdan kukiləri qəbul etdiyini yoxlayın.",
+       "session_fail_preview_html": "Üzr istəyirik! Sessiya məlumatlarının itirilməsi səbəbindən düzəlişiniz yayımlanmadı.\n\n<em> {{SITENAME}} saytında xammal HTML effektiv olduğundan, sınaq görüntüsü JavaScript hücumlarına qarşı tədbir kimi gizlidir.</em>\n\n<strong>Bu qanuni bir redaktə cəhdidirsə, yenidən cəhd edin. </strong>\nƏgər hələ də işləməsə, [[Special:UserLogout|çıxış]] edin və yenidən daxil olun və brauzerinizin bu saytda çərəzlərə (cookies) icazə verdiyini yoxlayın.",
+       "token_suffix_mismatch": "<strong>Redaktəniz rədd edildi, çünki müştəri düzəliş jetonundakı punktuasiya simvollarını qarışdırdı.</strong>\nDüzəliş səhifə mətninin korrupsiyasının qarşısını almaq üçün rədd edildi.\nBu, bir arqument \"web-based anonim proxy\" xidməti istifadə edərkən bəzən olur.",
+       "edit_form_incomplete": "<strong>Düzəliş formasının bir hissəsi serverə çatmadı; Redaktələrinizin sağlam olduğunu və yenidən cəhd etdiyini təkrarlayın.</strong>",
        "editing": "Redaktə $1",
        "creating": "Qurulur $1",
        "editingsection": "Redaktə $1 (bölmə)",
        "yourtext": "Mətniniz",
        "storedversion": "Qeyd edilmiş versiya",
        "editingold": "'''DİQQƏT! Siz bu səhifənin köhnə versiyasını redaktə edirsiniz. Məqaləni yaddaşda saxlayacağınız halda bu versiyadan sonra edilmiş hər bir dəyişiklik itiriləcək.'''",
+       "unicode-support-fail": "Brauzeriniz Unicode-nu dəstəkləmir. Səhifələri redaktə edərkən, redaktəniz saxlanmadı.",
        "yourdiff": "Fərqlər",
        "copyrightwarning": "Xahiş olunur diqqətə alasınız ki, {{SITENAME}}dakı bütün fəaliyyətləriniz $2 lisenziyasına tabe olduğu hesab edilir (təfərrüat üçün bax: $1). Əgər yazdıqlarınızın əsaslı şəkildə redaktə edilməsini və istənildiyi vaxt başqa yerə ötürülməsini istəmirsinizsə, yazılarınızı burada dərc etməyin.\n<br />\nSiz eyni zamanda söz verirsiniz ki, bu yazıları siz özünüz yazmısınız və ya onları hamıya açıq mühitdən ya da buna bənzər mənbədən köçürmüsünüz.\n\n----\n\n<div style=\"font-weight: bold; font-size: 110%; color:red;\">MÜƏLLİF HÜQUQLARI İLƏ QORUNMUŞ HEÇ BİR İŞİ İCAZƏSİZ DƏRC ETMƏYİN!</div>",
+       "copyrightwarning2": "{{SITENAME}} saytında edilən bütün töhfələr digər istifadəçilər tərəfindən redaktə, dəyişdirilə və ya silinə bilər.\nYazılarınızın redaktə edilməsini istəmirsinizsə, buraya təqdim etməyin. <br />\nSiz də bunu özünüz yazdığınızı və ya ictimai bir domendən və ya digər bir etibarlı mənbədən kopyaladığınızı vəd edirsiniz (ətraflı məlumat üçün $1-ə baxın).",
+       "editpage-cannot-use-custom-model": "Bu səhifənin məzmunu modeli dəyişdirilə bilməz.",
+       "longpageerror": "<strong>Səhv: Siz təqdim etdiyiniz mətn {{PLURAL:$11 kilobayt|$1 kilobayt}} uzundur; bu {{PLURAL: $2 |bir kilobayt | $2 kilobayt}} maksimumdan daha uzundur.</strong>\nSaxlanıla bilməz.",
+       "readonlywarning": "<strong>Xəbərdarlıq: Verilənlər bazası saxlamaq üçün kilidlənib, beləliklə, düzəlişlərinizi hazırda saxlaya bilməyəcəksiniz.</strong>\nMətni mətn faylına kopyalayıp yapışdırılmasını və daha sonra saxlamağınızı tövsiyə edirik.\n\nBunu kilidləyən sistem idarəçisi bu izahatı verdi: $1",
+       "protectedpagewarning": "<strong>Xəbərdarlıq:</strong> Bu səhifə mühafizə edildiyi üçün yalnız idarəçilər redaktə edə bilərlər.\n\nƏn son jurnal qeydi aşağıda verilmişdir:",
        "semiprotectedpagewarning": "'''Qeyd:''' Bu səhifə mühafizəli olduğu üçün onu yalnız qeydiyyatdan keçmiş istifadəçilər redaktə edə bilərlər.",
+       "cascadeprotectedwarning": "<strong>Xəbərdarlıq:</strong> Bu səhifə yalnız [[Special:ListGroupRights|xüsusi hüquqlara malik]] istifadəçilər tərəfindən redaktə ediləcək şəkildə mühafizə edilir. Çünki bu səhifə aşağıdakı kaskad mühafizə ilə qorunan {{PLURAL:$1|səhifəyə|səhifələrə}} daxildir:",
        "titleprotectedwarning": "'''DİQQƏT! Bu səhifə mühafizəlidir, yalnız [[Special:ListGroupRights|icazəsi olan]] istifadəçilər onu redaktə edə bilərlər.'''",
        "templatesused": "Bu səhifədə istifadə edilmiş {{PLURAL:$1|şablon|şablonlar}}:",
        "templatesusedpreview": "Bu sınaq göstərişində istifadə edilmiş {{PLURAL:$1|şablon|şablonlar}}:",
        "permissionserrors": "İcazə xətası",
        "permissionserrorstext": "Siz, bunu aşağıdakı {{PLURAL:$1|səbəbə|səbəblərə}} görə edə bilməzsiniz:",
        "permissionserrorstext-withaction": "Aşağıdakı {{PLURAL:$1|səbəbə|səbəblərə}} görə, $2 hüququnuz yoxdur:",
+       "contentmodelediterror": "<code>$1</code> <code>$2</code> səhifəsinin mövcud məzmun modelindən fərqləndiyi üçün bu versiyanı redaktə edə bilməzsiniz.",
        "recreate-moveddeleted-warn": "'''Diqqət! Siz əvvəllər silinmiş səhifəni bərpa etmək istəyirsiz.'''\n\nBu səhifəni yenidən yaratmağın nə qədər zəruri olduğunu bir daha yoxlayın.\nBu səhifə üçün silmə qeydləri aşağıda göstərilmişdir:",
        "moveddeleted-notice": "Bu səhifə silinmişdir.\nMəlumat üçün aşağıda bu səhifənin tarixçəsindən müvafiq silmə, mühafizə və köçmə qeydləri göstərilmişdir.",
+       "moveddeleted-notice-recent": "Üzr istəyirik, bu səhifə son vaxtlarda silinib (son 24 saat ərzində)\nBu səhifənin silinməsi, mühafizə edilməsi və yerdəyişmə qeydləri aşağıda verilmişdir.",
        "log-fulllog": "Bütöv məlumatı göstər",
        "edit-hook-aborted": "Düzəlişlər qarmaq-prosedur tərəfindən geri qaytarılıb.\nƏlavə izahat verilməyib.",
        "edit-gone-missing": "Səhifəni yeniləmək mümkün deyil.\nÇox güman ki, səhifə silinmişdir.",
index f5f5c7f..cfe5371 100644 (file)
        "alllogstext": "Сумесны паказ усіх журналаў падзеяў {{GRAMMAR:родны|{{SITENAME}}}}.\nВы можаце адфільтраваць вынікі па тыпе журналу, удзельніку (улічваецца рэгістар) ці старонцы (таксама ўлічваецца рэгістар).",
        "logempty": "Падобных запісаў у журнале няма.",
        "log-title-wildcard": "Шукаць назвы, якія пачынаюцца з гэтага тэксту",
-       "showhideselectedlogentries": "Ð\9fаказаÑ\86Ñ\8c\81Ñ\85аваÑ\86Ñ\8c Ð²Ñ\8bбÑ\80анÑ\8bÑ\8f Ð·Ð°Ð¿Ñ\96Ñ\81Ñ\8b Ñ\9e журнале",
+       "showhideselectedlogentries": "Ð\97Ñ\8cмÑ\8fнÑ\96Ñ\86Ñ\8c Ð±Ð°Ñ\87наÑ\81Ñ\8cÑ\86Ñ\8c Ð°Ð±Ñ\80анÑ\8bÑ\85 Ð·Ð°Ð¿Ñ\96Ñ\81аÑ\9e Ñ\83 журнале",
        "log-edit-tags": "Рэдагаваць меткі да абраных запісаў у журнале падзеяў",
        "checkbox-select": "Выбраць: $1",
        "checkbox-all": "усе",
        "allpages": "Усе старонкі",
        "nextpage": "Наступная старонка ($1)",
        "prevpage": "Папярэдняя старонка ($1)",
-       "allpagesfrom": "Паказаць старонкі, пачынаючы з:",
+       "allpagesfrom": "Паказаць старонкі ад:",
        "allpagesto": "Паказаць старонкі да:",
        "allarticles": "Усе старонкі",
        "allinnamespace": "Усе старонкі (прастора назваў: $1)",
index 8f7bc9b..7d6e3f0 100644 (file)
@@ -81,6 +81,7 @@
        "tog-norollbackdiff": "Не паказваць розніцу ў выніку адкату",
        "tog-useeditwarning": "Папярэдзіць мяне, калі я пакідаю старонку з незахаванымі праўкамі",
        "tog-prefershttps": "Заўсёды выкарыстоўваць бяспечнае злучэнне па ўваходзе ў сістэму",
+       "tog-showrollbackconfirmation": "Паказваць акно пацвярджэння пры націску спасылкі адкату",
        "underline-always": "Заўсёды",
        "underline-never": "Ніколі",
        "underline-default": "Як у браўзеры",
        "returnto": "Вярнуцца да $1.",
        "tagline": "З пляцоўкі {{SITENAME}}",
        "help": "Даведка",
+       "help-mediawiki": "Дапамога пра MediaWiki",
        "search": "Знайсці",
        "search-ignored-headings": " #<!-- не змяняйце гэты радок --> <pre>\n# Загалоўкі, якія будзе ігнараваць рухавік пошуку.\n# Змены набудуць моц па наступным індэксаванні старонкі.\n# Вы можаце змусіць пераіндэксаванне старонкі, зрабіўшы пустое рэдагаванне.\n# Сінтаксіс наступны:\n#   * Усё ад сімвала \"#\" да канца радка - каментарый.\n#   * Кожны непусты радок - дакладны загаловак, які трэба ігнараваць, з рэгістрам і інш.\nКрыніцы\nСпасылкі\nГл. таксама\n #</pre> <!-- не змяняйце гэты радок -->",
        "searchbutton": "Знайсці",
        "ns-specialprotected": "Не дазволена правіць старонкі ў прасторы назваў {{ns:special}}.",
        "titleprotected": "Назва засцерагаецца ад стварэння; ахова пастаўлена ўдзельнікам: [[User:$1|$1]].\nТлумачэнне пастаноўкі пад ахову: <em>$2</em>.",
        "filereadonlyerror": "Немагчыма змяніць файл \"$1\", таму што файлавае сховішча \"$2\" зараз у рэжыме \"толькі для чытання\".\n\nСістэмны адміністратар, які абмежаваў доступ, патлумачыў гэта так: \"$3\".",
+       "invalidtitle": "Няслушная назва",
        "invalidtitle-knownnamespace": "Недапушчальны загаловак з прасторай імёнаў \"$2\" і тэкстам \"$3\"",
        "invalidtitle-unknownnamespace": "Недапушчальны загаловак з невядомым лікам прасторы імён $1 і тэкстам \"$2\"",
        "exception-nologin": "Вы не ўвайшлі ў сістэму",
        "resetpass-temp-password": "Тымчасовы пароль:",
        "resetpass-abort-generic": "Змяненне пароля было спынена прыстаўкаю.",
        "resetpass-expired": "Ваш пароль пратэрмінаваны. Калі ласка, устанавіце новы пароль для ўваходу ў сістэму.",
-       "resetpass-expired-soft": "Ваш пароль пратэрмінаваны, яго трэба замяніць. Калі ласка, выберыце новы пароль зараз, ці націсніце \"{{int:authprovider-resetpass-skip-label}}\", каб змяніць яго пазней.",
+       "resetpass-expired-soft": "Ваш пароль пратэрмінаваны і яго трэба замяніць. Калі ласка, выберыце новы пароль зараз, ці націсніце \"{{int:authprovider-resetpass-skip-label}}\", каб змяніць яго пазней.",
+       "resetpass-validity": "Ваш пароль няверны: $1 \n\nКалі ласка, устанавіце новы пароль для ўваходу ў сістэму.",
        "resetpass-validity-soft": "Ваш пароль недапушчальны: $1\n\nКалі ласка, выберыце новы пароль зараз, або націсніце \"{{int:authprovider-resetpass-skip-label}}\", каб скінуць яго пазней.",
        "passwordreset": "Выслаць мне новы пароль",
        "passwordreset-text-one": "Запоўніце гэту форму, каб атрымаць часовы пароль па эл.пошце.",
        "histfirst": "найстарэйшыя",
        "histlast": "найноўшыя",
        "historysize": "({{PLURAL:$1|1 байт|$1 байты|$1 байтаў}})",
-       "historyempty": "(пуста)",
+       "historyempty": "пуста",
        "history-feed-title": "Гісторыя версій",
        "history-feed-description": "Гісторыя версій гэтай старонкі",
        "history-feed-item-nocomment": "$1 на $2",
        "difference-missing-revision": "{{PLURAL:$2|$2 версія|$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": "Знойдзена ў назвах",
        "textmatches": "Знойдзена ў тэкстах",
        "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-reupload-own": "Запісваць паўзверх існуючага файла, які ўкладвалі самі",
        "right-reupload-shared": "Перамагаць файлы з агульнага сховішча тутэйшымі файламі",
        "right-upload_by_url": "Укладваць файлы з сеціўнага адраса (URL)",
-       "right-purge": "ЧÑ\8bÑ\81Ñ\86Ñ\96Ñ\86Ñ\8c ÐºÑ\8dÑ\88 Ð¿Ð»Ñ\8fÑ\86оÑ\9eкÑ\96 Ð´Ð»Ñ\8f Ñ\81Ñ\82аÑ\80онкÑ\96 Ð±ÐµÐ· Ð¿Ð°Ñ\86веÑ\80джаннÑ\8f",
+       "right-purge": "Ð\90Ñ\87Ñ\8bÑ\81Ñ\82ка ÐºÑ\8dÑ\88Ñ\83 Ð¿Ð»Ñ\8fÑ\86оÑ\9eкÑ\96 Ð´Ð»Ñ\8f Ñ\81Ñ\82аÑ\80онкÑ\96",
        "right-autoconfirmed": "Не падпарадкоўвацца абмежаванням хуткасці, накладзеным на IP",
        "right-bot": "Лічыцца аўтаматычным працэсам",
        "right-nominornewtalk": "Не паведамляць пра новыя паведамленні ў адказ на дробныя праўкі размоўных старонак",
        "grant-createaccount": "Ствараць уліковыя запісы",
        "grant-createeditmovepage": "Ствараць, правіць і пераносіць старонкі",
        "grant-delete": "Выдаляць старонкі, версіі і запісы ў журналах",
-       "grant-editinterface": "Правіць прасторы назваў MediaWiki і CSS/JSON/JavaScript удзельніка",
+       "grant-editinterface": "Правіць прасторы назваў MediaWiki і JSON сайту/удзельніка",
        "grant-editmycssjs": "Правіць Ваш карыстальніцкі CSS/JSON/JavaScript",
        "grant-editmyoptions": "Змяняць вашы настройкі",
        "grant-editmywatchlist": "Правіць ваш спіс назірання",
        "rcfilters-activefilters-hide": "Схаваць",
        "rcfilters-activefilters-show": "Паказаць",
        "rcfilters-activefilters-hide-tooltip": "Схаваць вобласць актыўных фільтраў",
+       "rcfilters-activefilters-show-tooltip": "Паказаць вобласць актыўных фільтраў",
        "rcfilters-advancedfilters": "Пашыраныя фільтры",
        "rcfilters-limit-title": "Вынікі для паказу",
        "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|змена|змены|змен}}, $2",
        "rcfilters-watchlist-markseen-button": "Пазначыць усе змены як прагледжаныя",
        "rcfilters-watchlist-edit-watchlist-button": "Рэдагаваць Ваш спіс назіраных старонак",
        "rcfilters-watchlist-showupdated": "Змены старонак, якія Вы не наведвалі з таго часу, як яны адбыліся, выдзелены <strong>тлустым</strong> і пазначаны маркерам.",
-       "rcfilters-preference-label": "СÑ\85аваÑ\86Ñ\8c Ð¿Ð°Ð»ÐµÐ¿Ñ\88анÑ\83Ñ\8e Ð²ÐµÑ\80Ñ\81Ñ\96Ñ\8e Â«Ð\90поÑ\88нÑ\96Ñ\85 Ð·Ð¼ÐµÐ½Â»",
+       "rcfilters-preference-label": "Ð\92Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ñ\96нÑ\82Ñ\8dÑ\80Ñ\84ейÑ\81 Ð±ÐµÐ· JavaScript",
        "rcfilters-preference-help": "Адкатвае рэдызайн інтэрфейсу 2017 года і ўсе інструменты, дададзеныя з тых часоў.",
-       "rcfilters-watchlist-preference-label": "СÑ\85аваÑ\86Ñ\8c Ð¿Ð°Ð»ÐµÐ¿Ñ\88анÑ\83Ñ\8e Ð²ÐµÑ\80Ñ\81Ñ\96Ñ\8e Ñ\81пÑ\96Ñ\81а Ð½Ð°Ð·Ñ\96Ñ\80аннÑ\8f",
+       "rcfilters-watchlist-preference-label": "Ð\92Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ñ\96нÑ\82Ñ\8dÑ\80Ñ\84ейÑ\81 Ð±ÐµÐ· JavaScript",
        "rcfilters-watchlist-preference-help": "Адкатвае рэдызайн інтэрфейсу 2017 года і ўсе інструменты, дададзеныя з тых часоў.",
        "rcnotefrom": "Ніжэй {{PLURAL:$5|паказана змяненне|паказаны змены}} з <strong>$3, $4</strong> (не больш за <strong>$1</strong>).",
        "rclistfrom": "Паказаць змены з $3 $2",
        "recentchangeslinked-feed": "Звязаныя праўкі",
        "recentchangeslinked-toolbox": "Звязаныя праўкі",
        "recentchangeslinked-title": "Змяненні, якія датычаць \"$1\"",
-       "recentchangeslinked-summary": "Увядзіце імя старонкі, каб убачыць змяненні на старонках, якія спасылаюцца на дадзеную старонку ці на якія яна спасылаецца. (Каб убачыць складнікі катэгорыі, увядзіце Катэгорыя:Назва катэгорыі). Старонкі, якія ўваходзяць у [[Special:Watchlist|Ваш спіс назірання]], выдзелены <strong>тлустым шрыфтам</strong>.",
+       "recentchangeslinked-summary": "Увядзіце імя старонкі, каб убачыць змяненні на старонках, на якія яна спасылаецца або якія спасылаюцца на яе (каб убачыць складнікі катэгорыі, увядзіце {{ns:category}}:Назва катэгорыі). Змены старонак з [[Special:Watchlist|Вашага спісу назірання]] выдзелены <strong>тлустым шрыфтам</strong>.",
        "recentchangeslinked-page": "Назва старонкі:",
        "recentchangeslinked-to": "Паказваць, замест гэтага, змяненні на старонках, што спасылаюцца сюды",
        "recentchanges-page-added-to-category": "[[:$1]] дададзена ў катэгорыю",
        "listfiles_size": "Памер у байтах",
        "listfiles_description": "Апісанне",
        "listfiles_count": "Версіі",
-       "listfiles-show-all": "Уключыць старыя версіі відарысаў",
+       "listfiles-show-all": "Уключыць старыя версіі файлаў",
        "listfiles-latestversion": "Актуальная версія",
        "listfiles-latestversion-yes": "Так",
        "listfiles-latestversion-no": "Не",
        "filehist-filesize": "Аб'ём файла",
        "filehist-comment": "Тлумачэнне",
        "imagelinks": "Выкарыстанне файла",
-       "linkstoimage": "Наступн{{PLURAL:$1|ая старонка спасылаецца|ыя $1 старонкі спасылаюцца}} на гэты файл:",
+       "linkstoimage": "{{PLURAL:$1|Наступная $1 старонка выкарыстоўвае|Наступныя $1 старонкі выкарыстоўваюць|Наступныя $1 старонак выкарыстоўваюць}} гэты файл:",
        "linkstoimage-more": "На гэты файл існуюць спасылкі з больш як $1 {{PLURAL:$1|старонкі|старонак}}.\nНаступны пералік паказвае толькі {{PLURAL:$1|першую спасылку|першыя $1 з іх}}.\nТаксама ёсць [[Special:WhatLinksHere/$2|поўны пералік]].",
        "nolinkstoimage": "Няма старонак, якія б спасылаліся на файл.",
        "morelinkstoimage": "Паказаць [[Special:WhatLinksHere/$1|больш спасылак]] на гэты файл.",
        "statistics-files": "Укладзеныя файлы",
        "statistics-edits": "Праўкі старонак ад часу інсталяцыі {{SITENAME}}",
        "statistics-edits-average": "Колькасць правак на 1 старонку",
-       "statistics-users": "Registered [[Special:ListUsers|users]]",
+       "statistics-users": "Зарэгістраваныя ўдзельнікі",
        "statistics-users-active": "Актыўныя ўдзельнікі",
        "statistics-users-active-desc": "Удзельнікі, якія хоць нешта зрабілі за апошн{{PLURAL:$1|і дзень|ія $1 дзён}}",
        "pageswithprop": "Старонкі з уласцівасцю старонкі",
        "pageswithprop-legend": "Старонкі з пэўнай уласцівасцю",
        "pageswithprop-text": "На гэтай старонцы пералічаны старонкі, якія выкарыстоўваюць пэўную уласцівасць.",
        "pageswithprop-prop": "Назва ўласцівасці:",
+       "pageswithprop-reverse": "Сартаваць у зваротным парадку",
+       "pageswithprop-sortbyvalue": "Сартаваць па значэнню ўласцівасці",
        "pageswithprop-submit": "Перайсці",
        "pageswithprop-prophidden-long": "доўгае тэкставае значэнне ўласцівасці схавана ($1)",
        "pageswithprop-prophidden-binary": "двайковае значэнне ўласцівасці схавана ($1)",
        "doubleredirects": "Падвойныя перасылкі",
        "doubleredirectstext": "Тут пералічаныя старонкі-перасылкі, якія паказваюць на іншыя перасылкі.\nКожны радок утрымлівае спасылкі на першую і другую перасылкі, а таксама мэту другой перасылкі, якая звычайна і ёсць \"сапраўдная\" мэтавая старонка, на якую павінна была паказваць першая перасылка.\n<del>Закрэсленыя складнікі</del> ўжо былі папраўленыя.",
        "double-redirect-fixed-move": "Назва [[$1]] была перанесена.\nПасля аўтаматычнага абнаўлення зараз яна перасылае да [[$2]]",
-       "double-redirect-fixed-maintenance": "Аўтаматычнае выпраўленне падвойнай перасылкі з [[$1]] на [[$2]] цягам тэхнічнага абслугоўвання.",
+       "double-redirect-fixed-maintenance": "Аўтаматычнае выпраўленне падвойнай перасылкі з [[$1]] на [[$2]] цягам тэхнічнага абслугоўвання",
        "double-redirect-fixer": "Выпраўляльнік перасылак",
        "brokenredirects": "Паламаныя перасылкі",
        "brokenredirectstext": "Гэтыя перасылкі паказваюць на старонкі, якіх няма:",
        "prefixindex": "Старонкі з назвамі на ўзор",
        "prefixindex-namespace": "Усе старонкі з прэфіксам (прастора назваў «{{ns:$1}}»)",
        "prefixindex-submit": "Паказаць",
-       "prefixindex-strip": "Ð\9fÑ\80Ñ\8bбÑ\80аÑ\86Ñ\8c Ð¿Ñ\80Ñ\8dÑ\84Ñ\96кÑ\81 Ñ\83 Ð¿ÐµÑ\80алÑ\96кÑ\83",
+       "prefixindex-strip": "Ð\9fÑ\80Ñ\8bбÑ\80аÑ\86Ñ\8c Ð¿Ñ\80Ñ\8dÑ\84Ñ\96кÑ\81 Ñ\83 Ð²Ñ\8bнÑ\96каÑ\85",
        "shortpages": "Старонкі малога аб'ёму",
        "longpages": "Старонкі вялікага аб'ёму",
        "deadendpages": "Старонкі без спасылак",
        "protectedtitles-submit": "Паказаць назвы",
        "listusers": "Усе ўдзельнікі",
        "listusers-editsonly": "Толькі ўдзельнікі, якія маюць праўкі",
+       "listusers-temporarygroupsonly": "Паказваць толькі ўдзельнікаў у тымчасовых групах удзельнікаў",
        "listusers-creationsort": "У парадку датаў стварэння",
        "listusers-desc": "Парадкаваць да памяншэння",
        "usereditcount": "$1 {{PLURAL:$1|праўка|праўкі|правак}}",
        "deleting-backlinks-warning": "<strong>Увага:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|Іншыя старонкі]] спасылаюцца на ці ўключаюць старонку, якую вы збіраецеся выдаліць.",
        "deleting-subpages-warning": "<strong>Увага:</strong> Старонка, якую Вы хочаце выдаліць, мае [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|$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|праўку|праўкі|правак}}",
index afe6fa4..3fccc3c 100644 (file)
@@ -86,6 +86,7 @@
        "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",
        "histfirst": "সবচেয়ে পুরনো",
        "histlast": "সবচেয়ে নতুন",
        "historysize": "({{PLURAL:$1|১ বাইট|$1 বাইট}})",
-       "historyempty": "(খালি)",
+       "historyempty": "খালি",
        "history-feed-title": "সংশোধনের ইতিহাস",
        "history-feed-description": "এই উইকিতে এই পাতার সংশোধনের ইতিহাস",
        "history-feed-item-nocomment": "$2-এ $1",
        "specialpages-group-developer": "ডেভলপারের সরঞ্জাম",
        "blankpage": "খালি পাতা",
        "intentionallyblankpage": "এই পাতাটি ইচ্ছা করে খালি রাখা হয়েছে",
+       "disabledspecialpage-disabled": "এই পৃষ্ঠাটি একজন সিস্টেম প্রশাসক দ্বারা নিষ্ক্রিয় করা হয়েছে।",
        "external_image_whitelist": "  #এই লাইন ঠিক যেমন আছে<প্রাক> তেমন রাখুন<pre>\n #রেগুলার এক্সপ্রেশনের টুকরা নীচে (শুধুমাত্র অংশ / / মধ্যে যে যায়) বসান\n#এইগুলি এক্সটার্নাল (hotlinked) ইমেজের URL-এর সাথে মেলানো হবে\n#যেগুলি মিলবে, সেগুলি চিত্র হিসাবে প্রদর্শিত হবে, অন্যথায় শুধুমাত্র ইমেজ লিঙ্ক প্রদর্শিত হবে\n#যে লাইনের প্রারম্ভে # আছে সেই লাইনগুলি মন্তব্যসমূহ হিসাবে ব্যবহার করা হয়\n#এটি কেস-অসংবেদী\n\n#এই রেখার উপরের regex টুকরা বসান. এই লাইন ঠিক যেমন আছে তেমন রাখুন</pre>",
        "tags": "বৈধ পরিবর্তন ট্যাগ",
        "tag-filter": "[[Special:Tags|ট্যাগ]] ছাঁকনি:",
index 7a05ff7..99ee8dc 100644 (file)
        "delete-confirm": "Supressió de la pàgina «$1»",
        "delete-legend": "Suprimeix",
        "historywarning": "<strong>Avís:</strong> la pàgina que esteu a punt d'eliminar té un historial amb $1 {{PLURAL:$1|revisió|revisions}}:",
-       "historyaction-submit": "Mostra",
+       "historyaction-submit": "Mostra les revisions",
        "confirmdeletetext": "Esteu a punt d'esborrar de forma permanent una pàgina o imatge i tot el seu historial de la base de dades.\nConfirmeu que realment ho voleu fer, que enteneu les\nconseqüències, i que el que esteu fent està d'acord amb la [[{{MediaWiki:Policy-url}}|política]] del projecte.",
        "actioncomplete": "Acció realitzada",
        "actionfailed": "L'acció ha fallat",
index f8e43e4..7050e30 100644 (file)
        "logentry-import-upload": "$1 {{GENDER:$2|بارکرد}} $3 بە بەکارھێنانی [[special:Import|بارکەر]]",
        "logentry-import-interwiki": "$1 $3ی لە ویکییەکی ترەوە ھاوردەکرد",
        "logentry-import-interwiki-details": "$1 $3ی لە $5ەوە ھەناردە کرد ($4 بەسەرداچوونەوە)",
+       "logentry-merge-merge": "$1 $3ی لەگەڵ $4 تێکەڵکرد (بەسەرداچوونەکان لە $5 زیاترن)",
        "logentry-move-move": "$1 پەڕەی $3ی {{GENDER:$2|گواستەوە}} بۆ $4",
        "logentry-move-move-noredirect": "$1 پەڕەی $3ی بە بێ بەجێھشتنی ڕەوانەکەرێک {{GENDER:$2|گواستەوە}} بۆ $4",
        "logentry-move-move_redir": "$1 پەڕەی $3 {{GENDER:$2|گواستەوە}} بۆ $4 کە پێشتر ڕەوانەکەر بوو",
index 91fede1..a39d2be 100644 (file)
        "brokenredirectstext": "Tato přesměrování vedou na neexistující stránky:",
        "brokenredirects-edit": "editovat",
        "brokenredirects-delete": "smazat",
-       "withoutinterwiki": "Stránky bez mezijazykových odkazů (interwiki)",
+       "withoutinterwiki": "Stránky bez mezijazykových odkazů",
        "withoutinterwiki-summary": "Tyto stránky neobsahují žádný mezijazykový odkaz:",
        "withoutinterwiki-legend": "Prefix",
        "withoutinterwiki-submit": "Zobrazit",
index 7087387..5a1c423 100644 (file)
@@ -72,7 +72,8 @@
                        "Jorn Ari",
                        "Fnielsen",
                        "Weblars",
-                       "Kranix"
+                       "Kranix",
+                       "Psl85"
                ]
        },
        "tog-underline": "Understreg link:",
        "tog-norollbackdiff": "Vis ikke forskel efter udførelse af en tilbagerulning",
        "tog-useeditwarning": "Advar mig, hvis jeg forlader en redigeringsside med ændringer, der ikke er gemt.",
        "tog-prefershttps": "Brug altid en sikker forbindelse, når jeg er logget ind",
+       "tog-showrollbackconfirmation": "Bed om bekræftelse når der bliver klikket på et tilbagerulningslink",
        "underline-always": "Altid",
        "underline-never": "Aldrig",
        "underline-default": "Standard for browseren eller udseendet",
        "edithelp": "Hjælp til redigering",
        "helppage-top-gethelp": "Hjælp",
        "mainpage": "Forside",
-       "mainpage-description": "Hovedside",
+       "mainpage-description": "Forside",
        "policy-url": "Project:Politik",
        "portal": "Fællesskabs portal",
        "portal-url": "Project:Fællesskabs portal",
        "cannotlogoutnow-title": "Kan ikke logge af på nuværende tidspunkt",
        "cannotlogoutnow-text": "Det er ikke muligt at logge af når du bruger $1.",
        "welcomeuser": "Velkommen, $1!",
-       "welcomecreation-msg": "Din konto er blevet oprettet.\nDu kan ændre dine {{SITENAME}} [[Special:Indstilling|indstillinger]] hvis du ønsker.",
+       "welcomecreation-msg": "Din konto er blevet oprettet.\nDu kan ændre dine {{SITENAME}} [[Special:Preferences|indstillinger]] hvis du ønsker.",
        "yourname": "Brugernavn:",
        "userlogin-yourname": "Brugernavn",
        "userlogin-yourname-ph": "Indtast dit brugernavn",
        "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.",
        "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-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.",
        "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",
        "histfirst": "ældste",
        "histlast": "nyeste",
        "historysize": "($1 {{PLURAL:$1|Byte|Bytes}})",
-       "historyempty": "(tom)",
+       "historyempty": "tom",
        "history-feed-title": "Versionshistorie",
        "history-feed-description": "Versionshistorie for denne side i {{SITENAME}}",
        "history-feed-item-nocomment": "$1 med $2",
        "right-reupload-own": "Overskrive en eksisterende fil, som er lagt op af brugeren selv",
        "right-reupload-shared": "Lægge en lokal fil op, selvom den allerede findes centralt",
        "right-upload_by_url": "Lægge en fil op fra en URL",
-       "right-purge": "Nulstille sidens cache uden bekræftelse",
+       "right-purge": "Nulstil sidens cache for en side",
        "right-autoconfirmed": "Påvirkes ikke af IP-baserede hastighedsgrænser",
        "right-bot": "Redigeringer markeres som robot",
        "right-nominornewtalk": "Mindre ændringer på diskussionssider markerer ikke disse med nyt indhold",
        "deleteprotected": "Du kan ikke slette denne side, fordi den er beskyttet.",
        "deleting-backlinks-warning": "<strong>Advarsel:</strong> [[Special:WhatLinksHere/{{FULLPAGENAME}}|Andre sider]] henviser til eller inkluderer den side, du er ved at slette.",
        "rollback": "Fjern redigeringer",
+       "rollback-confirmation-confirm": "Bekræft venligst:",
+       "rollback-confirmation-yes": "Tilbagerul",
+       "rollback-confirmation-no": "Fortryd",
        "rollbacklink": "rul tilbage",
        "rollbacklinkcount": "rul {{PLURAL:$1|en redigering|$1 redigeringer}} tilbage",
        "rollbacklinkcount-morethan": "rul mere end {{PLURAL:$1|en redigering|$1 redigeringer}} tilbage",
        "ipb-change-block": "Forny brugerens blokering med disse indstillinger",
        "ipb-confirm": "Bekræft blokering",
        "ipb-partial": "Delvist",
+       "ipb-partial-help": "Specifikke sider eller navnerum.",
        "ipb-pages-label": "Sider",
        "ipb-namespaces-label": "Navnerum",
        "badipaddress": "IP-adressen/brugernavnet er udformet forkert eller eksistere ikke.",
index 64344d7..9612ca7 100644 (file)
        "pageinfo-robot-index": "Erlaubt",
        "pageinfo-robot-noindex": "Nicht erlaubt",
        "pageinfo-watchers": "Anzahl der Beobachter dieser Seite",
-       "pageinfo-visiting-watchers": "Anzahl der Beobachter dieser Seite, die die letzten Bearbeitungen besucht haben",
+       "pageinfo-visiting-watchers": "Anzahl der Beobachter dieser Seite, welche die letzten Bearbeitungen besucht haben",
        "pageinfo-few-watchers": "Weniger als {{PLURAL:$1|ein|$1}} Beobachter",
        "pageinfo-few-visiting-watchers": "Es könnte einen beobachtenden Benutzer geben oder nicht, der die letzten Bearbeitungen besucht hat",
        "pageinfo-redirects-name": "Anzahl der Weiterleitungen zu dieser Seite",
index 8994708..9510e96 100644 (file)
        "watchthis": "Na pele de seyr ke",
        "savearticle": "Pele qeyd ke",
        "savechanges": "Vurnayışan qeyd ke",
-       "publishpage": "Riperri bare ke",
+       "publishpage": "Pele neşr kerê",
        "publishchanges": "Vırnayışan qeyd ke",
        "savearticle-start": "Pele qeyd ke...",
        "savechanges-start": "Vurnayışan qeyd ke...",
        "template-protected": "(şeveknaye)",
        "template-semiprotected": "(nime staryayış)",
        "hiddencategories": "Ena per de {{PLURAL:$1|1 kategoriyo nımıte|$1 kategoriyê nımıtey}} muhtewa benê:",
-       "edittools": "<div id=\"specialcharss\" class=\"toccolours specialchars\" style=\"margin-top:.5em; padding: .3em .5em; font-size: 100%; color:#aaa; text-align:left;\" title=\"{{int:bw-edittools-tooltip}}\">\n<p class=\"specialbasic\" id=\"Standard\">\n'''{{int:bw-edittools-lead-in}}''' \n<charinsert>Á á É é Í í Ó ó Ú ú Ý ý</charinsert> –\n<charinsert>À à È è Ì ì Ò ò Ù ù </charinsert> –\n<charinsert> â Ê ê Î î Ô ô Û û </charinsert> –\n<charinsert>Ä ä Ë ë Ï ï Ö ö Ü ü Ÿ ÿ</charinsert> –\n<charinsert>Æ æ Ø ø Œ œ ẞ ß </charinsert> –\n<charinsert>Å å Ů ů </charinsert> –\n<charinsert>àã Ẽ ẽ ɛ̃ Ĩ ĩ Ñ ñ Õ õ ɔ̃ Ũ ũ </charinsert> –\n<charinsert>Рð Þ þ </charinsert> –\n<charinsert>Ç ç Ģ ģ Ķ ķ Ļ ļ Ņ ņ Ŗ ŗ Ş ş Ţ ţ </charinsert> –\n<charinsert>Ć ć Ĺ ĺ Ń ń Ŕ ŕ Ś ś Ý ý Ź ź </charinsert> –\n<charinsert>Č č Ď ď Ľ ľ Ň ň Ř ř Š š Ť ť Ž ž </charinsert> –\n<charinsert>Ǎ ǎ Ě ě Ǐ ǐ Ǒ ǒ Ǔ ǔ </charinsert> –\n<charinsert>Ā ā Ē ē Ī ī Ō ō Ū ū </charinsert> –\n<charinsert>ǖ ǘ ǚ ǜ </charinsert> –\n<charinsert>Ĉ ĉ Ĝ ĝ Ĥ ĥ Ĵ ĵ Ŝ ŝ Ŵ ŵ Ŷ ŷ </charinsert> –\n<charinsert>Ă ă Ğ ğ Ŭ ŭ </charinsert> –\n<charinsert>Ċ ċ Ė ė Ġ ġ Għ għ İ ı Ż ż </charinsert> –\n<charinsert>Ą ą Ę ę Į į Ų ų </charinsert> –\n<charinsert>Ő ő Ű ű </charinsert> –\n<charinsert>Đ đ Ħ ħ Ł ł Ŀ ŀ </charinsert> –\n<charinsert>Ɖ ɖ Ɛ ɛ Ƒ ƒ Ɣ ɣ Ŋ ŋ Ɔ ɔ Ʋ ʋ </charinsert> -\n<charinsert>Ə ə </charinsert> –\n<charinsert>– — ’</charinsert> –\n<charinsert>~ | ° ¹ ² ³ ⅛ ¼ ⅓ ⅜ ½ ⅝ ¾ ⅔ ⅞ € $ ¥ £ † × ← → ↔ ↑ ± ≠ © ® ™ ‰ «+» ‹+› „+“ „+” ‚+‘ ¡ ¿ …</charinsert> –\n<charinsert>&amp;nbsp; &nbsp; [[Category:+]] #REDIRECT[[+]] {{msg-mw|+|notext=1}} &#33;!FUZZY!! ~~~~  &lt;nowiki>+</nowiki></charinsert>\n<charinsert>ڈ ڑ ٹ </charinsert>\n<charinsert>ټ څ ځ ډ ړ ږ ښ ڼ ؤ ي ې ۍ ئ </charinsert>\n<charinsert>{{{+}}} {{+}} {{subst:+}} <noinclude>+</noinclude></charinsert>\n<charinsert>&lt;!--&nbsp;+&nbsp;--> &lt;br&nbsp;/></charinsert>\n</p></div>",
+       "edittools": "<!-- Beno ke no metın bınê formanê vurnayışi û barkerdışi de bımocniyo. -->",
        "edittools-upload": "-",
        "nocreatetext": "{{SITENAME}}, Perrê newey vıraştış rê destur çıniyo.\nŞıma şenê tepeya şorê u eke şıma qeydbiyayey [[Special:UserLogin|şıma şenê yew hesab akerê]], eke şıma niyê [[Special:UserLogin|şıma şenê qeyd bıbê]].",
        "nocreate-loggedin": "Desturê şıma çıniyo ke pelanê neweyan vırazê.",
        "prevn": "{{PLURAL:$1|$1}} verên",
        "nextn": "{{PLURAL:$1|$1}} peyên",
        "prev-page": "Perra verêne",
-       "next-page": "pela peyco",
+       "next-page": "pela bahdoyêne",
        "prevn-title": "$1o verên  {{PLURAL:$1|netice|neticeyan}}",
        "nextn-title": "$1o ke yeno {{PLURAL:$1|netice|neticey}}",
        "shown-title": "Her pele sero $1 {{PLURAL:$1|netici|netica}} bımocne",
        "searchprofile-articles": "Pelê zerreki",
        "searchprofile-images": "Multimedya",
        "searchprofile-everything": "Her çi",
-       "searchprofile-advanced": "Hirayên",
+       "searchprofile-advanced": "Herayên",
        "searchprofile-articles-tooltip": "$1 de cı geyre",
        "searchprofile-images-tooltip": "Dosya cı geyre",
        "searchprofile-everything-tooltip": "Tedeesteyan hemine cı geyre (pelanê werênayışi zi tey)",
        "unusedtemplates": "Şablonê ke nêguriyenê",
        "unusedtemplatestext": "no pel, {{ns:template}} pelê ke pelê binan de nêaseni, ninan keno.",
        "unusedtemplateswlh": "linkanê binî",
-       "randompage": "Perra raştameyiye",
+       "randompage": "Pela raştameyiye",
        "randompage-nopages": "Na {{PLURAL:$2|heruna namey|heruna nameyan}} de nê peli çıniyê: $1.",
        "randomincategory": "Ena kategoriye dı pela raştameye",
        "randomincategory-invalidcategory": "\"$1\" yew nameyê kategoriya vêrdiye niyo.",
        "checkbox-none": "Çıniyo",
        "checkbox-invert": "Dimlaşt ke",
        "allpages": "Pêro peli",
-       "nextpage": "Pela peyco ($1)",
+       "nextpage": "Pela bahdoyêne ($1)",
        "prevpage": "Pela veri ($1)",
        "allpagesfrom": "Herfa kı pa liste bo:",
        "allpagesto": "Perranê ke ena herfe qediyenê bımotne:",
        "delete-warning-toobig": "no pel wayirê tarixê vurnayiş ê derg o, $1 {{PLURAL:$1|revizyonê|revizyonê}} seri de.\nhewn a kerdışê ıney {{SITENAME}} şuxul bıne gırano;\nbı diqqet dewam kerê.",
        "deleteprotected": "Şıma nêşenê ena perer esternê,  çıkı per starya ya.",
        "rollback": "vurnayişan tepiya bıger",
+       "rollback-confirmation-yes": "Peyser biya",
        "rollback-confirmation-no": "Bıtexelne",
        "rollbacklink": "ageyrayış",
        "rollbacklinkcount": "$1 {{PLURAL:$1|vurnayış|vurnayışi}} peyd gıroti",
        "tooltip-search-go": "Ebe nê namey tami şo yew pela ke esta",
        "tooltip-search-fulltext": "Pelan miyan de nê metıni cı geyre",
        "tooltip-p-logo": "Şo perra seri",
-       "tooltip-n-mainpage": "Şo perra seri",
+       "tooltip-n-mainpage": "Şo pela seri",
        "tooltip-n-mainpage-description": "Şo perra seri",
        "tooltip-n-portal": "Heqa procey de, kes çı şeno bıkero, çı kamca vêniyeno",
        "tooltip-n-currentevents": "Vurnayışanê peyênan de melumatê pey bıvêne",
        "tooltip-ca-nstab-category": "Pela kategoriye bıvêne",
        "tooltip-minoredit": "Ney vırnayışo werdi nışan bıkerê",
        "tooltip-save": "Vurnayışanê xo qeyd ke",
-       "tooltip-publish": "Vırnayışê xo aşkera ke",
+       "tooltip-publish": "Vurnayışê xo neşr kerê",
        "tooltip-preview": "Vurnayışanê xo çım ra bıviyarnê. Qeydkerdış ra ver bıgurê cı!",
        "tooltip-diff": "Kamci vırnayışê ke şıma nuştey sero kerdê, inan bıvênê.",
        "tooltip-compareselectedversions": "Ena per de ferqê rewziyonan de dı weçinaya bıvinê",
        "brackets": "[$1]",
        "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← pela veri",
-       "imgmultipagenext": "pela peyco →",
+       "imgmultipagenext": "pela bahdoyêne →",
        "imgmultigo": "Şo!",
        "imgmultigoto": "Şo pela da $1",
        "img-lang-default": "(zıwano hesabiyaye)",
        "img-lang-go": "Şo",
        "ascending_abbrev": "berz",
        "descending_abbrev": "nızm",
-       "table_pager_next": "Pela peyco",
+       "table_pager_next": "Pela bahdoyêne",
        "table_pager_prev": "Pela veri",
        "table_pager_first": "Pela sıfteyêne",
        "table_pager_last": "Pela peyêne",
index 36d1847..70bf7e3 100644 (file)
        "pageinfo-category-subcats": "Αριθμός υποκατηγοριών",
        "pageinfo-category-files": "Αριθμός αρχείων",
        "pageinfo-user-id": "Αναγνωριστικό χρήση",
+       "pageinfo-view-protect-log": "Δείτε το αρχείο καταγραφών προστασίας για αυτή τη σελίδα.",
        "markaspatrolleddiff": "Σήμανση ως ελεγμένο",
        "markaspatrolledtext": "Σήμανση αυτής της σελίδας ως ελεγμένης",
        "markaspatrolledtext-file": "Επισημάνετε αυτή τη έκδοση του αρχείου ως ελεγμένη",
index 2a22fda..197499c 100644 (file)
        "delete-confirm": "Delete \"$1\"",
        "delete-legend": "Delete",
        "historywarning": "<strong>Warning:</strong> The page you are about to delete has a history with $1 {{PLURAL:$1|revision|revisions}}:",
-       "historyaction-submit": "Show",
+       "historyaction-submit": "Show revisions",
        "confirmdeletetext": "You are about to delete a page along with all of its history.\nPlease confirm that you intend to do this, that you understand the consequences, and that you are doing this in accordance with [[{{MediaWiki:Policy-url}}|the policy]].",
        "actioncomplete": "Action complete",
        "actionfailed": "Action failed",
index eb0d1f4..6ae07b3 100644 (file)
        "deleting-subpages-warning": "<strong>Oharra:</strong> Ezabatuko duzun orrialdeak [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|a subpage|$1 subpages|51=over 50 subpages}}]] dauka.",
        "rollback": "Desegin aldaketak",
        "rollback-confirmation-confirm": "Mesedez baieztatu:",
+       "rollback-confirmation-yes": "Desegin",
        "rollback-confirmation-no": "Utzi",
        "rollbacklink": "desegin",
        "rollbacklinkcount": "desegin {{PLURAL:$1|edizio bat|$1 edizio}}",
        "confirm-unwatch-top": "Orrialde hau zure jarraipen-zerrendatik kendu?",
        "confirm-rollback-button": "Ados",
        "confirm-rollback-top": "Orrialde honen edizioak leheneratu?",
+       "confirm-rollback-bottom": "Ekintza honek orrialde honetan hautatutako aldaketak zuzenean desegingo ditu.",
        "confirm-mcrrestore-title": "Errebisio bat berritu",
        "confirm-mcrundo-title": "Aldaketa bat desegin",
        "mcrundofailed": "Desegiteak akatsa",
        "logentry-rights-autopromote": "$1 automatikoki $4tik $5ra  {{GENDER:$2|igo}} egin zaio",
        "logentry-upload-upload": "$1(e)k $3 {{GENDER:$2|igo du}}",
        "logentry-upload-overwrite": "$1(e)k $3(r)en bertsio berria {{GENDER:$2|igo du}}",
-       "logentry-upload-revert": "$1(e)k $3 {{GENDER:$2|igo du}}",
+       "logentry-upload-revert": "$1(e)k $3 bertsio zahar batera {{GENDER:$2|itzuli du}}",
        "log-name-managetags": "Etiketa kudeatze erregistroa",
        "log-description-managetags": "Orrialde honetan [[Special:Tags|etiketekin]] lotutako kudeaketa-zereginak zerrendatzen dira. Saioak administratzaileak eskuz egiten dituen ekintzak soilik ditu; Wiki softwarerrarekin etiketak sortu edo ezabatzeko ahalmenarekin erregistro honetan erregistratutako sarrerarik gabe.",
        "logentry-managetags-create": "$1 lankideak \"$4\" etiketa {{GENDER:$2|sortu du}}",
index 9ba8e44..a323e26 100644 (file)
        "exif-compression-6": "JPEG (vecchio)",
        "exif-copyrighted-true": "Protetto da copyright",
        "exif-copyrighted-false": "Status del copyright non impostato",
+       "exif-photometricinterpretation-0": "Bianco e nero (bianco è 0)",
        "exif-photometricinterpretation-1": "Bianco e nero (nero è 0)",
+       "exif-photometricinterpretation-3": "Tavolozza",
+       "exif-photometricinterpretation-4": "Maschera di trasparenza",
+       "exif-photometricinterpretation-5": "Separato (probabilmente CMYK)",
+       "exif-photometricinterpretation-8": "CIE L*a*b*",
+       "exif-photometricinterpretation-9": "CIE L*a*b* (codifica ICC)",
+       "exif-photometricinterpretation-10": "CIE L*a*b* (codifica ITU)",
        "exif-unknowndate": "Data sconosciuta",
        "exif-orientation-1": "Normale",
        "exif-orientation-2": "Capovolto orizzontalmente",
index 5253e8d..89a5d4b 100644 (file)
        "exif-gpsspeed-n": "Јазли",
        "exif-gpsdestdistance-k": "Километри",
        "exif-gpsdestdistance-m": "Милји",
-       "exif-gpsdestdistance-n": "Ð\9dаÑ\83Ñ\82иÑ\87ки милји",
+       "exif-gpsdestdistance-n": "Ð\9cоÑ\80Ñ\81ки милји",
        "exif-gpsdop-excellent": "Одлична ($1)",
        "exif-gpsdop-good": "Добра ($1)",
        "exif-gpsdop-moderate": "Умерена ($1)",
index ee2b147..4bf08f2 100644 (file)
        "createacct-loginerror": "Tunnus luotiin onnistuneesti, mutta automaattista sisäänkirjautumista ei voitu tehdä. Siirry [[Special:UserLogin|manuaaliseen kirjautumiseen]].",
        "noname": "Et ole määritellyt kelvollista käyttäjänimeä.",
        "loginsuccesstitle": "Olet kirjautunut sisään",
-       "loginsuccess": "'''Olet kirjautunut sivustolle {{SITENAME}} käyttäjänä $1.'''",
+       "loginsuccess": "<strong>Olet kirjautunut {{GRAMMAR:illative|{{SITENAME}}}} käyttäjänä \"$1\".</strong>",
        "nosuchuser": "Käyttäjää ”$1” ei ole olemassa.\nNimet ovat kirjainkoosta riippuvaisia. \nTarkista, kirjoititko nimen oikein, tai [[Special:CreateAccount|luo uusi käyttäjätunnus]].",
        "nosuchusershort": "Käyttäjää nimeltä ”$1” ei ole. Kirjoititko nimen oikein?",
        "nouserspecified": "Käyttäjätunnusta ei ole määritelty.",
        "edit-gone-missing": "Sivun päivitys ei onnistunut.\nSe on ilmeisesti poistettu.",
        "edit-conflict": "Päällekkäinen muokkaus.",
        "edit-no-change": "Muokkauksesi sivuutettiin, koska tekstiin ei tehty mitään muutoksia.",
+       "edit-slots-cannot-add": "{{PLURAL:$1|Seuraava slotti ei ole tuettu|Seuraavat slotit eivät ole tuettuja}} täällä: $2.",
+       "edit-slots-cannot-remove": "{{PLURAL:$1|Seuraava slotti vaaditaan eikä sitä voi poistaa|Seuraavat alueet vaaditaan eikä niitä voida poistaa}}: $2.",
+       "edit-slots-missing": "{{PLURAL:$1|Seuraava slotti puuttuu|Seuraavat slotit puuttuvat}}: $2.",
        "postedit-confirmation-created": "Sivu on nyt luotu.",
        "postedit-confirmation-restored": "Sivu on nyt palautettu (aiempaan versioonsa).",
        "postedit-confirmation-saved": "Muokkauksesi on tallennettu.",
        "defaultmessagetext": "Viestin oletusteksti",
        "content-failed-to-parse": "Sisältö tyypiltään $2 ei jäsenny tyypiksi $1: $3",
        "invalid-content-data": "Virheellinen sisältö",
-       "content-not-allowed-here": "Sivun [[:$2]] sisältö ei voi olla tyyppiä $1.",
+       "content-not-allowed-here": "Sivun [[:$2]] sisältö ei voi olla tyyppiä \"$1\" slotissa \"$3\"",
        "editwarning-warning": "Tältä sivulta poistuminen saattaa aiheuttaa kaikkien tekemiesi muutosten katoamisen.\nJos olet kirjautunut sisään, voit poistaa tämän varoituksen käytöstä omien asetuksien osiossa ”{{int:prefs-editing}}”.",
        "editpage-invalidcontentmodel-title": "Sisältömalli ei ole tuettu",
        "editpage-invalidcontentmodel-text": "Sisältömalli ”$1” ei ole tuettu.",
        "upload-form-label-own-work": "Tämä on oma työni",
        "upload-form-label-infoform-categories": "Luokat",
        "upload-form-label-infoform-date": "Päivämäärä",
-       "upload-form-label-own-work-message-generic-local": "Vakuutan, että tallennan tämän tiedoston noudattaen sivustolla {{SITENAME}} voimassa olevia käyttöehtoja sekä lisenssejä koskevia käytäntöjä.",
+       "upload-form-label-own-work-message-generic-local": "Vakuutan, että tallennan tämän tiedoston noudattaen {{GRAMMAR:inessive|{{SITENAME}}}} voimassa olevia käyttöehtoja sekä lisenssejä koskevia käytäntöjä.",
        "upload-form-label-not-own-work-message-generic-local": "Jos et kykene tallentamaan tätä tiedostoa noudattaen niitä käytäntöjä, jotka ovat voimassa sivustolla {{SITENAME}}, sulje tämä dialogi ja kokeile jotain toista menetelmää.",
        "upload-form-label-not-own-work-local-generic-local": "Voit myös kokeilla [[Special:Upload|yleistä tallentamista]].",
        "upload-form-label-own-work-message-generic-foreign": "Ymmärrän, että olen tallentamassa tätä tiedostoa yhteiseen mediasäilöön. Vakuutan, että teen tämän noudattaen asiaankuuluvia käyttöehtoja ja lisenssejä koskevia käytäntöjä.",
        "emailuser-title-target": "Lähetä sähköpostia tälle {{GENDER:$1|käyttäjälle}}",
        "emailuser-title-notarget": "Lähetä sähköpostia käyttäjälle",
        "emailpagetext": "Jos tämä {{GENDER:$1|käyttäjä}} on antanut asetuksissaan kelvollisen sähköpostiosoitteen, alla olevalla lomakkeella voit lähettää hänelle viestin. [[Special:Preferences|Omissa asetuksissasi]] annettu sähköpostiosoite näkyy sähköpostin lähettäjän osoitteena, jotta vastaanottaja voi suoraan vastata viestiin.",
-       "defemailsubject": "Sähköpostia käyttäjältä $1 sivustolta {{SITENAME}}",
+       "defemailsubject": "Sähköpostia käyttäjältä $1 {{GRAMMAR:elative|{{SITENAME}}}}",
        "usermaildisabled": "Käyttäjien sähköposti poistettu käytöstä",
        "usermaildisabledtext": "Et voi lähettää sähköpostia muille käyttäjille tässä wikissä",
        "noemailtitle": "Ei sähköpostiosoitetta",
        "watcherrortext": "Sivun ”$1” tarkkailulista-asetusten muutoksissa tapahtui virhe.",
        "enotif_reset": "Merkitse kaikki sivut nähdyiksi",
        "enotif_impersonal_salutation": "{{GRAMMAR:genitive|{{SITENAME}}}} käyttäjä",
-       "enotif_subject_deleted": "{{GENDER:$2|$2}} poisti {{GRAMMAR:elative|{{SITENAME}}}} sivun $1",
-       "enotif_subject_created": "{{GENDER:$2|$2}} loi {{GRAMMAR:illative|{{SITENAME}}}} sivun $1",
-       "enotif_subject_moved": "{{GENDER:$2|$2}} siirsi {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1",
-       "enotif_subject_restored": "{{GENDER:$2|$2}} palautti {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1",
-       "enotif_subject_changed": "{{GENDER:$2|$2}} muutti {{GRAMMAR:inessive|{{SITENAME}}}} sivua $1",
-       "enotif_body_intro_deleted": "{{GENDER:$2|$2}} poisti {{GRAMMAR:elative|{{SITENAME}}}} sivun $1 $PAGEEDITDATE ($3).",
+       "enotif_subject_deleted": "$2 {{GENDER:$2|poisti}} {{GRAMMAR:elative|{{SITENAME}}}} sivun $1",
+       "enotif_subject_created": "$2 {{GENDER:$2|loi}} {{GRAMMAR:illative|{{SITENAME}}}} sivun $1",
+       "enotif_subject_moved": "$2 {{GENDER:$2|siirsi}} {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1",
+       "enotif_subject_restored": "$2 {{GENDER:$2|palautti}} {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1",
+       "enotif_subject_changed": "$2 {{GENDER:$2|muutti}} {{GRAMMAR:inessive|{{SITENAME}}}} sivua $1",
+       "enotif_body_intro_deleted": "$2 {{GENDER:$2|poisti}} {{GRAMMAR:elative|{{SITENAME}}}} sivun $1 $PAGEEDITDATE ($3).",
        "enotif_body_intro_created": "{{GENDER:$2|$2}} loi {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1 $PAGEEDITDATE. Sivun nykyinen versio on osoitteessa $3.",
        "enotif_body_intro_moved": "{{GENDER:$2|$2}} siirsi {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1 $PAGEEDITDATE. Sivun nykyinen versio on osoitteessa $3.",
        "enotif_body_intro_restored": "{{GENDER:$2|$2}} palautti {{GRAMMAR:inessive|{{SITENAME}}}} sivun $1 $PAGEEDITDATE. Sivun nykyinen versio on osoitteessa $3.",
        "deletereasonotherlist": "Muu syy",
        "deletereason-dropdown": "* Yleiset poistosyyt\n** Spam tai mainossivu\n** Vandalismi\n** Tekijänoikeusrikkomus\n** Sivun tekijän pyyntö\n** Virheellinen ohjaus",
        "delete-edit-reasonlist": "Muokkaa poistosyitä",
-       "delete-toobig": "Tällä sivulla on pitkä muokkaushistoria, yli $1 {{PLURAL:$1|versio|versiota}}. \nTämänkaltaisten sivujen poistamista on rajoitettu. Tällä ehkäistään sivuston {{SITENAME}} vaurioitumista tahattomasti.",
+       "delete-toobig": "Tällä sivulla on pitkä muokkaushistoria, yli $1 {{PLURAL:$1|versio|versiota}}. \nTämänkaltaisten sivujen poistamista on rajoitettu. Tällä ehkäistään {{GRAMMAR:genitive|{{SITENAME}}}} vaurioitumista tahattomasti.",
        "delete-warning-toobig": "Tällä sivulla on pitkä muutoshistoria – yli $1 {{PLURAL:$1|versio|versiota}}. Näin suurien muutoshistorioiden poistaminen voi haitata sivuston suorituskykyä.",
        "deleteprotected": "Et voi poistaa tätä sivua, koska se on suojattu.",
        "deleting-backlinks-warning": "<strong>Varoitus:</strong> Sivulle, jota olet poistamassa, johtaa [[Special:WhatLinksHere/{{FULLPAGENAME}}|linkkejä muilta sivuilta]], taikka sivu on sisällytetty muuhun sivuun.",
        "mycontris": "Muokkaukset",
        "anoncontribs": "Muokkaukset",
        "contribsub2": "Käyttäjän {{GENDER:$3|$1}} ($2) muokkaukset",
+       "contributions-subtitle": "Käyttäjän {{GENDER:$3|$1}} muokkaukset",
        "contributions-userdoesnotexist": "Käyttäjätunnusta ”$1” ei ole rekisteröity.",
+       "negative-namespace-not-supported": "Negatiivisia arvoja sisältäviä nimiavaruuksia ei tueta.",
        "nocontribs": "Näihin ehtoihin sopivia muokkauksia ei löytynyt.",
        "uctop": "uusin",
        "month": "Alkaen kuukaudesta (ja aiemmin):",
        "ip_range_toolow": "IP-alueet eivät käytännöllisesti katsoen ole sallittuja.",
        "proxyblocker": "Välityspalvelinesto",
        "proxyblockreason": "IP-osoitteestasi on estetty muokkaukset, koska se on avoin välityspalvelin. Ota yhteyttä Internet-palveluntarjoajaasi tai tekniseen tukeen ja kerro heille tästä tietoturvaongelmasta.",
-       "sorbsreason": "IP-osoitteesi on listattu avoimena välityspalvelimena DNSBL:n mustalla listalla sivustolla {{SITENAME}}.",
-       "sorbs_create_account_reason": "IP-osoitteesi on listattu avoimena välityspalvelimena DNSBL:n mustalla listalla sivustolla {{SITENAME}}. \nEt voi luoda käyttäjätunnusta.",
+       "sorbsreason": "IP-osoitteesi on listattu avoimena välityspalvelimena DNSBL:n mustalla listalla {{GRAMMAR:inessive|{{SITENAME}}}}.",
+       "sorbs_create_account_reason": "IP-osoitteesi on listattu avoimena välityspalvelimena DNSBL:n mustalla listalla {{GRAMMAR:inessive|{{SITENAME}}}}.\nEt voi luoda käyttäjätunnusta.",
        "softblockrangesreason": "Anonyymit muokkaukset eivät ole sallittuja IP-osoitteestasi ($1). Ole hyvä ja kirjaudu.",
        "xffblockreason": "Yhteydet IP-osoitteesta, joka löytyy sinun tai käyttämäsi välipalvelimen X-Forwarded-For-otsakkeesta, on estetty. Alkuperäinen estämisen syy oli: $1",
        "cant-see-hidden-user": "Käyttäjä, jota yrität estää, on jo estetty ja käyttäjänimi on piilotettu. \nKoska sinulla ei ole hideuser-oikeutta, et voi nähdä tai muuttaa käyttäjän estoasetuksia.",
        "confirmemail_body_set": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on vaihtanut {{GRAMMAR:inessive|{{SITENAME}}}} tunnuksen $2 sähköpostiosoitteeksi tämän osoitteen.\n\nVarmenna, että tämä tunnus kuuluu sinulle ja aktivoi sähköpostitoiminnot uudelleen avaamalla seuraava linkki selaimellasi:\n\n$3\n\nJos tunnus ei kuulu sinulle, peruuta sähköpostiosoitteen varmennus avaamalla seuraava linkki:\n\n$5\n\nVarmennuskoodi vanhenee $4.",
        "confirmemail_invalidated": "Sähköpostiosoitteen varmennus peruutettiin",
        "invalidateemail": "Sähköpostiosoitteen varmennuksen peruuttaminen",
-       "notificationemail_subject_changed": "Sivuston {{SITENAME}} rekisteröity sähköpostiosoite on vaihdettu",
-       "notificationemail_subject_removed": "Sivuston {{SITENAME}} rekisteröity sähköpostiosoite on poistettu",
+       "notificationemail_subject_changed": "{{GRAMMAR:genitive|{{SITENAME}}}} rekisteröity sähköpostiosoite on vaihdettu",
+       "notificationemail_subject_removed": "{{GRAMMAR:genitive|{{SITENAME}}}} rekisteröity sähköpostiosoite on poistettu",
        "notificationemail_body_changed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on vaihtanut tunnuksen ”$2” sähköpostiosoitteeksi ”$3” sivustolla {{SITENAME}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.",
        "notificationemail_body_removed": "Joku, todennäköisesti sinä, IP-osoitteesta $1 on poistanut tunnuksen ”$2” sähköpostiosoitteen sivustolla {{SITENAME}}.\n\nJos se et ollut sinä, ota yhteyttä sivuston ylläpitäjään välittömästi.",
        "scarytranscludedisabled": "[Wikienvälinen sisällytys ei ole käytössä]",
        "logentry-partialblock-block-page": "the {{PLURAL:$1|page|pages}} $2",
        "logentry-partialblock-block-ns": "the {{PLURAL:$1|namespace|namespaces}} $2",
        "logentry-partialblock-block": "$1 {{GENDER:$2|blocked}} {{GENDER:$4|$3}} from editing $7 with an expiration time of $5 $6",
-       "logentry-partialblock-reblock": "$1 {{GENDER:$2|muutti}} käyttäjän {{GENDER:$4|$3}} muokkauseston asetuksia estäen muokkausten tekemisen {{PLURAL:$8||sivuihin}} $7. Eston kesto on $5 $6",
+       "logentry-partialblock-reblock": "$1 {{GENDER:$2|muutti}} käyttäjän {{GENDER:$4|$3}} muokkauseston asetuksia estäen muokkausten tekemisen $7. Eston kesto on $5 $6",
        "logentry-non-editing-block-block": "$1 {{GENDER:$2|esti}} käyttäjää {{GENDER:$4|$3}} suorittamasta määrättyjä toimenpiteitä (lukuun ottamatta muokkaamista). Eston kesto on $5 $6",
        "logentry-non-editing-block-reblock": "$1 {{GENDER:$2|muutti}} käyttäjän {{GENDER:$4|$3}} toimintaeston asetuksia, jotka koskevat määrättyjä toimenpiteitä. Eston kesto on $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|esti}} käyttäjän {{GENDER:$4|$3}}. Eston kesto on $5 $6",
index 6126782..c4bf792 100644 (file)
@@ -37,6 +37,7 @@
        "tog-watchdefault": "Sides dy't jo feroare hawwe folgje",
        "tog-watchmoves": "Siden dy't jo werneamd hawwe folgje",
        "tog-watchdeletion": "Siden dy't jo wiske hawwe folgje",
+       "tog-watchrollback": "Siden dêr't ik wizigings weromdraaid haw oan myn folchlist taheakje",
        "tog-minordefault": "Markearje alle feroarings standert as fan lytse betsjutting",
        "tog-previewontop": "By it neisjen, bewurkingsfjild ûnderoan sette",
        "tog-previewonfirst": "Lit foarbyld sjen by earste wiziging",
@@ -59,6 +60,7 @@
        "tog-diffonly": "Side-ynhâld dy't feroare wurdt net sjen litte",
        "tog-showhiddencats": "Ferburgen kategoryen werjaan",
        "tog-norollbackdiff": "Gjin ferskillen sjen litte nei it útfieren fan weromdraaien",
+       "tog-showrollbackconfirmation": "Befêstigingsdialooch sjen litte by it klikken op 'weromdraaie'",
        "underline-always": "Altyd",
        "underline-never": "Nea",
        "underline-default": "Webblêder-standert",
        "create-local": "Lokale beskriuwing tafoegje",
        "delete": "Fuortsmite",
        "undelete_short": "$1 {{PLURAL:$1|ferzje|ferzjes}} weromsette",
-       "protect": "Skoattel",
+       "protect": "Skoattelje",
        "protect_change": "feroarje nivo fan skoatteljen",
        "unprotect": "Jou frij",
        "newpage": "Nije side",
        "passwordremindertitle": "Nij tydlik wachtwurd foar {{SITENAME}}",
        "passwordremindertext": "Immen (nei alle gedachten jo, fan ynternetadres $1) had in nij wachtwurd\nfoar {{SITENAME}} ($4) oanfrege. Der is in tydlik wachtwurd foar meidogger\n\"$2\"  makke en ynstelt as \"$3\". As dat jo bedoeling wie, melde jo jo dan\nno oan en kies in nij wachtwurd. Dyn tydlik wachtwurd komt yn {{PLURAL:$5|ien dei|$5 dagen}} te ferfallen.\nDer is in tydlik wachtwurd oanmakke foar meidogger \"$2\": \"$3\".\n\nAs immen oars as jo dit fersyk dien hat of at it wachtwurd jo tuskentiidsk wer yn 't sin kommen is en\njo it net langer feroarje wolle, dan kinne jo dit berjocht ferjitte en\nfierdergean mei it brûken fan jo âlde wachtwurd.",
        "noemail": "Der is gjin e-postadres foar meidogger \"$1\".",
-       "passwordsent": "In nij wachtwurd is tastjoerd oan it e-postadres foar \"$1\". Jo kinne jo wer oanmelde as jo it wachtwurd ûntfongen hawwe.",
+       "passwordsent": "Der is in nij wachtwurd ferstjoerd nei it opjûne e-mailadres fan \"$1\".\nMeld jo nei ûntfangst op 'e nij oan.",
        "blocked-mailpassword": "Jo IP-adres is blokkearre foar it meitsjen fan feroarings. Om misbrûk tefoaren te kommen is it net mûglik in oar wachtwurd oan te freegjen.",
        "eauthentsent": "Foar befêstiging is jo in netpostberjocht tastjoerd op it adres dat jo ynsteld hawwe. Der wurdt gjin oare netpost stjoerd, oant jo it adres befêstigje sa't it yn it netpostberjocht stiet.",
        "throttled-mailpassword": "Yn {{PLURAL:$1|de lêste oere|de lêste $1 oeren}} is der al in wachtwurdwink ferstjoerd.\nOm misbrûk tefoaren te kommen wurdt der mar ien wachtwurdwink yn 'e {{PLURAL:$1|oere|$1 oeren}} ferstjoerd.",
        "accmailtitle": "Wachtwurd ferstjoerd.",
        "accmailtext": "Samar in wachtwurd foar [[User talk:$1|$1]] is ferstjoerd nei $2. It kin wizige wurde op 'e side \n<em>[[Special:ChangePassword|Wachtwurd feroarje]]</em> nei oanmelden.",
        "newarticle": "(Nij)",
-       "newarticletext": "Jo hawwe in keppeling folge nei in side dêr't noch gjin tekst op stiet.\nOm sels tekst te meistjsen kinne jo dy gewoan yntype in dit bewurkingsfjild\n([$1 Mear ynformaasje oer bewurkjen].)\nOars kinne jo tebek mei de tebek-knop fan jo blêder.",
+       "newarticletext": "Jo hawwe in keppeling folge nei in side dêr't noch gjin tekst op stiet.\nBegjin mei skriuwen yn it fjild hjirûnder om de side oan te meitsjen (sjoch de [$1 helpside] foar mear ynformaasje).\nKlik op de <strong>tebek</strong>-knop fan jo webblêder at jo hjir by ûngelok telâne kommen binne.",
        "anontalkpagetext": "----\n<em>Dit is de oerlisside fan in ûnbekende meidogger; in meidogger dy't him/har net oanmeld hat.</em>\nOm't der gjin namme bekend is, wurdt it ynternet-adres brûkt om oan te jaan om wa't it giet.\nMar faak is it sa dat sa'n adres net altyd troch deselde persoan brûkt wurdt.\nAs jo it idee hawwe dat jo as ûnbekende meidogger opmerkings foar in oar krije, dan kinne jo jo [[Special:CreateAccount|registrearje]], of jo [[Special:UserLogin|oanmelde]]. Fan in oanmelde meidogger is it ynternet-adres net sichtber, en as oanmelde meidogger krije jo allinnich opmerkings dy't foar josels bedoeld binne.",
        "noarticletext": "Der stiet noch gjin tekst op dizze side.\nJo kinne [[Special:Search/{{PAGENAME}}|nei dizze sidenamme sykje]] yn oare siden,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} de besibbe lochs trochsykje]\nof [{{fullurl:{{FULLPAGENAME}}|action=edit}} dizze side oanmeitsje]</span>.",
        "userpage-userdoesnotexist": "Jo bewurkje in meidoggerside fan in meidogger dy't net bestiet (meidogger \"<nowiki>$1</nowiki>\").\nKontrolearje oft jo dizze side wol oanmeitsje/bewurkje wolle.",
        "editing": "Bewurkje \"$1\"",
        "creating": "$1 oanmeitsje",
        "editingsection": "Bewurkje $1 (seksje)",
-       "editingcomment": "Dwaande mei bewurkjen fan $1 (opmerking)",
+       "editingcomment": "Bewurkjen fan $1 (nij mêd)",
        "editconflict": "Tagelyk bewurke: \"$1\"",
        "explainconflict": "In oar hat de side feroare sûnt jo begûn binne mei it bewurkjen.\nIt earste bewurkingsfjild is hoe't de tekst wilens wurden is.\nJo feroarings stean yn it twadde fjild.\nDy wurde allinnich tapast safier as jo se yn it earste fjild ynpasse.\n'''Allinnich''' de tekst út it earste fjild kin fêstlein wurde.",
        "yourtext": "Jo tekst",
        "showingresults": "Totaal {{PLURAL:$1|<strong>1</strong> resultaat|<strong>$1</strong> resultaten}}, hjirûnder werjûn fan #<strong>$2</strong> ôf.",
        "search-showingresults": "{{PLURAL:$4|Resultaat <strong>$1</strong> fan <strong>$3</strong>|Resultaten <strong>$1 - $2</strong> fan <strong>$3</strong>}}",
        "search-nonefound": "Der binne gjin resultaten foar jo sykopdracht.",
-       "powersearch-legend": "Sykje",
+       "powersearch-legend": "Utwreidich sykje",
        "powersearch-ns": "Sykje yn nammeromten:",
        "powersearch-togglelabel": "Oantikje:",
        "powersearch-toggleall": "Alle",
        "powersearch-togglenone": "Gjin",
        "powersearch-remember": "Seleksje ûnthâlde foar sykopdrachten yn 'e takomst",
        "search-external": "Utwindich sykje",
-       "searchdisabled": "<p>Op it stuit stiet it trochsykjen fan tekst út omdat dizze funksje tefolle kompjûterkapasiteit ferget. As we nije apparatuer krije, en dy is ûnderweis, dan wurdt dizze funksje wer aktyf. Oant salang kinne jo sykje fia Google:</p>",
+       "searchdisabled": "Sykjen op {{SITENAME}} is útskeakele.\nJo kinne yn 'e tuskentiid mei Google sykje.\nTink derom dat harren yndeksearring fan 'e ynhâld op {{SITENAME}} ferâldere wêze kin.",
        "preferences": "Foarkarren",
        "mypreferences": "Foarkarren",
        "prefs-edits": "Tal bewurkings:",
        "skin-preview": "Proefbyld",
        "datedefault": "Gjin foarkar",
        "prefs-user-pages": "Meidoggersiden",
-       "prefs-personal": "Persoanlike gegevens",
+       "prefs-personal": "Meidogger",
        "prefs-rc": "Koartlyn feroare",
        "prefs-watchlist": "Folchlist",
        "prefs-editwatchlist": "Folchlist bewurkje",
        "right-deletedhistory": "Wiske ferzjes besjen, sûnder sjen te kinnen wat wiske is.",
        "right-browsearchive": "Wiske siden besjen",
        "right-undelete": "Wiske siden tebeksette",
-       "right-suppressrevision": "Ferskûle ferzjes besjen en tebeksette",
+       "right-suppressrevision": "Beskate sideferzjes fan in meidogger besjen, ferbergje of net ferbergje",
        "right-suppressionlog": "Net-publike logboeken besjen",
        "right-block": "Oare meidoggers de mûglikheid ta bewurkjen ôfnimme",
        "right-blockemail": "In meidogger it rjocht ta it ferstjoeren fan e-mail ôfnimme",
        "right-siteadmin": "De database blokkearje en wer frij jaan",
        "right-override-export-depth": "Alle siden oant en mei in keppelingsdjipte fan fiif fuortskriuwe",
        "grant-group-email": "E-mail stjoere",
+       "grant-rollback": "Wizigings oan siden weromdraaie",
        "newuserlogpage": "Ynskriuwingsloch",
        "newuserlogpagetext": "Dit is in loch fan meidoggers dy't de lêste tiid ynskreaun binne.",
        "rightslog": "Rjochtenloch",
        "recentchanges-legend-heading": "<strong>Leginda:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(sjoch ek de [[Special:NewPages|list mei nije siden]])",
        "rcfilters-legend-heading": "<strong>List fan ôfkoartings:</strong>",
-       "rcnotefrom": "Dit binne de feroarings sûnt <b>$2</b> (maksimaal <b>$1</b>).",
+       "rcnotefrom": "Hjirûnder {{PLURAL:$5|stiet de feroaring|steane de feroarings}} sûnt <strong>$3, $4</strong> (maksimaal <strong>$1</strong> werjûn).",
        "rclistfrom": "Jou nije feroarings, begjinnende mei $3 $2",
-       "rcshowhideminor": "lytse feroarings $1",
+       "rcshowhideminor": "Lytse feroarings $1",
        "rcshowhideminor-show": "werjaan",
        "rcshowhideminor-hide": "ferbergje",
-       "rcshowhidebots": "bots $1",
+       "rcshowhidebots": "Bots $1",
        "rcshowhidebots-show": "werjaan",
        "rcshowhidebots-hide": "ferbergje",
        "rcshowhideliu": "Registrearre meidoggers $1",
        "rcshowhideliu-show": "werjaan",
        "rcshowhideliu-hide": "ferbergje",
-       "rcshowhideanons": "$1 anonimen",
+       "rcshowhideanons": "Anonime meidoggers $1",
        "rcshowhideanons-show": "werjaan",
        "rcshowhideanons-hide": "ferbergje",
        "rcshowhidepatr": "kontrolearre bewurkings $1",
        "rcshowhidepatr-show": "werjaan",
        "rcshowhidepatr-hide": "ferbergje",
-       "rcshowhidemine": "$1 eigen bewurkings",
+       "rcshowhidemine": "Myn bewurkings $1",
        "rcshowhidemine-show": "werjaan",
        "rcshowhidemine-hide": "ferbergje",
-       "rclinks": "Jou $1 nije feroarings yn de lêste $2 dagen",
+       "rclinks": "Jou de lêste $1 feroarings fan 'e lêste $2 dagen",
        "diff": "fersk.",
        "hist": "skied.",
        "hide": "gjin",
        "recentchangeslinked-to": "Feroarings oan siden mei ferwizings nei dizze side besjen",
        "upload": "Bied bestân oan",
        "uploadbtn": "Bied bestân oan",
-       "reuploaddesc": "Werom nei oanbied-side.",
+       "reuploaddesc": "Opladen annulearje en weromgean nei it oanbiedformulier",
        "uploadnologin": "Net oanmeld",
        "uploadnologintext": "Jo moatte $1 om bestannen oplade te kinnen.",
        "upload_directory_missing": "De heechlaadmap ($1) is der net en koe net oanmakke wurde troch de webserver.",
        "deletereasonotherlist": "Oare reden",
        "deletereason-dropdown": "*Faak-brûkte redenen\n** Frege troch de skriuwer\n** Skeining fan auteursrjocht\n** Fandalisme",
        "rollback": "Wizigings weromdraaie",
+       "rollback-confirmation-yes": "Weromdraaie",
        "rollbacklink": "weromdraaie",
        "rollbacklinkcount": "$1 {{PLURAL:$1|bewurking|bewurkings}} weromdraaie",
        "rollbacklinkcount-morethan": "mear as $1 {{PLURAL:$1|bewurking|bewurkings}} weromdraaie",
        "tooltip-pt-createaccount": "Jo wurde fan herten útnûge in akkount oan te meitsjen en jo oan te melden, mar it hoecht net.",
        "tooltip-ca-talk": "Oerlis oer de ynhâldlike side",
        "tooltip-ca-edit": "Dizze side bewurkje",
-       "tooltip-ca-addsection": "In opmerking tafoegje oan de oerlis-side.",
-       "tooltip-ca-viewsource": "Dizze side is befeilige, mar jo kinne de boarne wol besjen.",
+       "tooltip-ca-addsection": "In nij mêd tafoegje",
+       "tooltip-ca-viewsource": "Dizze side is skoattele, mar jo kinne de boarne wol besjen.",
        "tooltip-ca-history": "Eardere ferzjes fan dizze side",
        "tooltip-ca-protect": "Dizze side befeiligje",
        "tooltip-ca-delete": "Dizze side weidwaan",
        "markedaspatrollederror-noautopatrol": "Jo meie jo eigen bewurkings net sels markearre.",
        "previousdiff": "← Eardere ferskillen",
        "nextdiff": "Neikommende ferskillen →",
-       "imagemaxsize": "Behein ôfmjittings fan ôfbyld op beskriuwingsside ta:",
-       "thumbsize": "Mjitte fan miniatueren:",
+       "imagemaxsize": "Beheining fan 'e ôfbyldingsgrutte op bestânsbeskriuwingssiden:",
+       "thumbsize": "Miniatuergrutte:",
        "widthheight": "$1 × $2",
        "widthheightpage": "$1 × $2, $3 {{PLURAL:$3|side|siden}}",
        "file-info": "bestânsgrutte: $1, MIME-type: $2",
        "noimages": "Neat te sjen.",
        "ilsubmit": "Sykje",
        "bydate": "datum",
+       "sp-newimages-showfrom": "Nije bestannen besjen fan $2, $1 ôf",
        "video-dims": "$1, $2 × $3",
        "seconds-abbrev": "$1 s",
        "minutes-abbrev": "$1 min",
        "confirm-watch-button": "OK",
        "confirm-unwatch-button": "OK",
        "confirm-unwatch-top": "Dizze side fan myn folchlist ôfhelje",
+       "confirm-rollback-bottom": "Dizze hanneling sil de oanjûne sidewizigings fuortdaliks weromdraaie.",
        "semicolon-separator": ";&#32;",
        "comma-separator": ",&#32;",
        "colon-separator": ":&#32;",
        "tag-mw-blank": "Leech meitsjen",
        "tag-mw-replace": "Ferfongen",
        "tag-mw-rollback": "Weromdraaid",
+       "tag-mw-rollback-description": "Bewurkings mei de keppeling 'weromdraaie', dy't foargeande wizigings ûngedien makke hawwe",
        "tag-mw-undo": "Ungedien meitsjen",
        "tags-source-header": "Boarne",
        "tags-active-header": "Aktyf?",
index 5cb261c..fb8899f 100644 (file)
        "mypreferencesprotected": "Դուք բավարար իրավունքներ չունեք Ձեր նախընտրությունները խմբագրելու համար։",
        "ns-specialprotected": "«{{ns:special}}» անվանատարածքի էջերը չեն կարող խմբագրվել։",
        "titleprotected": "Այս անվանմամբ էջի ստեղծումը արգելվել է [[User:$1|$1]] մասնակցի կողմից։\nՏրված պատճառն է՝ <em>$2</em>։",
+       "invalidtitle": "Սխալ վերնագիր",
        "exception-nologin": "Չեք մտել համակարգ",
        "exception-nologin-text": "Խնդրում ենք, մուտք գործեք՝ այս էջը դիտելու կամ գործողությունը կատարելու համար։",
        "virus-badscanner": "Սխալ կարգավորւմ։ Անծանոթ վիրուսների զննիչ. ''$1''",
        "savechanges": "Պահպանել փոփոխությունները",
        "publishpage": "Ստեղծել էջը",
        "publishchanges": "Պահպանել",
+       "savearticle-start": "Հիշել էջը...",
+       "savechanges-start": "Հիշել փոփոխությունները...",
+       "publishpage-start": "Հրատարակել էջը...",
        "publishchanges-start": "Պահպանել…",
        "preview": "Նախադիտում",
        "showpreview": "Նախադիտել",
        "edit-already-exists": "Հրարավոր չէ նոր էջ ստեղծել․ այն արդեն գոյություն ունի։",
        "defaultmessagetext": "Լռելյան տեքստը",
        "editwarning-warning": "Այս էջը լքելով դուք կարող եք կորցնել ձեր կատարած փոփոխությունները։\nԵթե դուք գրանցված եք համակարգում, կարող եք անջատել այս նախազգուշացումը ձեր նախընրությունների «{{int:prefs-editing}}» բաժնում։",
+       "slot-name-main": "Հիմնական",
        "content-model-wikitext": "վիքիտեքստ",
        "content-model-text": "պարզ տեքստ",
        "content-model-javascript": "ՋավաՍկրիպտ",
        "diff-empty": "(Տարբերություն չկա)",
        "diff-multi-sameuser": "(Միևնույն մասնակցի {{PLURAL:$1|մեկ միջանկյալ տարբերակ|$1 միջանկյալ տարբերակներ}} թաքցված է)",
        "searchresults": "Որոնման արդյունքներ",
+       "search-filter-title-prefix-reset": "Որոնել բոլոր էջեր",
        "searchresults-title": "«$1»-ի որոնման արդյունքներ",
        "titlematches": "Համընկած հոդվածների անվանումներ",
        "textmatches": "Համընկած տեքստերով էջեր",
        "prefs-rc": "Վերջին փոփոխություններ",
        "prefs-watchlist": "Հսկացանկ",
        "prefs-editwatchlist": "Խմբագրել հսկացանկը",
+       "prefs-editwatchlist-clear": "Մաքրել հսկացանկը",
        "prefs-watchlist-days": "Հսկացանկում ցուցադրվող օրերի թիվը՝",
        "prefs-watchlist-days-max": "Առավելագույնը $1 {{PLURAL:$1|օր}}",
        "prefs-watchlist-edits": "Ընդարձակված հսկացանկում ցուցադրվող օրերի թիվը՝",
        "grant-group-email": "Ուղարկել էլ. նամակ",
        "grant-createaccount": "Ստեղծել հաշիվներ",
        "grant-createeditmovepage": "Ստեղծել․ խմբագրել և տեղափոխել էջեր",
+       "grant-uploadfile": "Բեռնել նոր նիշքեր",
        "grant-basic": "Հիմնական իրավունքներ",
+       "grant-viewmywatchlist": "Դիտել ձեր հսկացանկը",
        "newuserlogpage": "Մասնակիցների գրանցման տեղեկամատյան",
        "newuserlogpagetext": "Սա նոր մասնակիցների գրանցման տեղեկամատյանն է.",
        "rightslog": "Մասնակցի իրավունքների տեղեկամատյան",
        "action-read": "կարդալ այս էջը",
        "action-edit": "խմբագրել այս էջը",
        "action-createpage": "Ստեղծել էջ",
+       "action-createtalk": "Ստեղծել քննարկման էջ",
        "action-createaccount": "ստեղծել այս մասնակցային հաշիվը",
        "action-move": "տեղափոխել այս էջը",
        "action-move-rootuserpages": "տեղափոխել մասնակցի էջի արմատը",
        "rcfilters-other-review-tools": "Վերանայման այլ գործիքներ",
        "rcfilters-group-results-by-page": "Արդյունքները խմբավորել էջերով",
        "rcfilters-activefilters": "Ակտիվ զտիչներ",
+       "rcfilters-activefilters-hide": "Թաքցնել",
+       "rcfilters-activefilters-show": "Ցուցադրել",
        "rcfilters-advancedfilters": "Ընդլայնված ֆիլտրեր",
        "rcfilters-limit-title": "Ցուցադրվող արդյունքներ",
        "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|փոփոխություն|փոփոխություններ}}, $2",
        "upload-misc-error-text": "Տեղի ունեցավ անհայտ սխալ բեռնման ընթացքում։ Խնդրում ենք ստուգել URL-հասցեի ճշտությունն ու հասանելիությունը և փորձել կրկին։ Սխալի կրկնման դեպքում կապնվեք համակարգային ադմինիստրատորի հետ։",
        "upload-dialog-title": "Բեռնել նիշք",
        "upload-dialog-button-cancel": "Չեղարկել",
+       "upload-dialog-button-back": "Հետ",
        "upload-dialog-button-done": "Արված է",
        "upload-dialog-button-save": "Հիշել",
        "upload-dialog-button-upload": "Բեռնել",
        "license-nopreview": "(Նախադիտումը մատչելի չէ)",
        "upload_source_url": " (գործուն, հանրամատչելի URL-հասցե)",
        "upload_source_file": " (նիշք ձեր համակարգչի վրա)",
+       "listfiles-delete": "ջնջել",
        "listfiles_search_for": "Որոնել պատկերի անվամբ.",
        "imgfile": "նիշք",
        "listfiles": "Նիշքերի ցանկ",
        "listfiles_size": "Չափ",
        "listfiles_description": "Նկարագրություն",
        "listfiles_count": "Տարբերակ",
+       "listfiles-latestversion": "Ընթացիկ տարբերակ",
        "listfiles-latestversion-yes": "Այո",
        "listfiles-latestversion-no": "Ոչ",
        "file-anchor-link": "Նիշք",
        "unusedtemplateswlh": "այլ հղումներ",
        "randompage": "Պատահական էջ",
        "randompage-nopages": "Այս անվանատարածքում էջեր չկան։",
+       "randomincategory-category": "Կատեգորիա:",
+       "randomincategory-legend": "Կատեգորիայի պատահական էջ",
        "randomincategory-submit": "Անցնել",
        "randomredirect": "Պատահական վերահղում",
        "randomredirect-nopages": "Այս անվանատարածքում վերահղումներ չկան։",
        "protectedpages": "Պաշտպանված էջեր",
        "protectedpages-noredirect": "Թաքցնել վերահղումները",
        "protectedpagesempty": "Ներկայումս չկան պաշտպանված էջեր նշված պարամետրերով։",
+       "protectedpages-page": "Էջ",
+       "protectedpages-expiry": "Լրանում է",
        "protectedpages-submit": "Ցույց տալ էջերը",
+       "protectedpages-unknown-timestamp": "Անհայտ",
        "protectedtitles": "Պաշտպանված անվանումներ",
        "protectedtitles-submit": "Ցույց տալ վերնագրերը",
        "listusers": "Մասնակիցների ցանկ",
        "notargettext": "Դուք չեք նշել նպատակային էջ կամ մասնակից այս ֆունկցիայի գործածման համար։",
        "pager-newer-n": "{{PLURAL:$1|ավելի թարմ 1|ավելի թարմ $1}}",
        "pager-older-n": "{{PLURAL:$1|ավելի հին 1|ավելի հին $1}}",
+       "apisandbox-reset": "Մաքրել",
+       "apisandbox-retry": "Կրկնել",
+       "apisandbox-examples": "Օրինակներ",
+       "apisandbox-add-multi": "Ավելացնել",
+       "apisandbox-results": "Արդյունք",
+       "apisandbox-continue": "Շարունակել",
+       "apisandbox-continue-clear": "Մաքրել",
        "booksources": "Գրքային աղբյուրներ",
        "booksources-search-legend": "Գրքի մասին տեղեկությունների որոնում",
        "booksources-search": "Որոնել",
        "alllogstext": "{{SITENAME}} կայքի տեղեկամատյանների համընդհանուր ցանկ։\nԴուք կարող եք սահմանափակել արդյունքները ըստ տեղեկամատյանի տեսակի, մասնակցի անունի կամ համապատասխան էջի։",
        "logempty": "Տեղեկամատյանում չկան համընկնող տարրեր։",
        "log-title-wildcard": "Որոնել այս տեքստով սկսվող անվանումներ",
+       "checkbox-all": "Բոլորը",
+       "checkbox-none": "Ոչ մեկը",
        "allpages": "Բոլոր էջերը",
        "nextpage": "Հաջորդ էջը ($1)",
        "prevpage": "Նախորդ էջը ($1)",
        "deletedcontributions-title": "Մասնակցի ջնջված ներդրում",
        "sp-deletedcontributions-contribs": "ներդրում",
        "linksearch": "Արտաքին հղումներ",
+       "linksearch-ns": "Անվանատարածք.",
        "linksearch-ok": "Որոնել",
        "linksearch-line": " \n$1-ը հղվել է $2 ից",
        "listusersfrom": "Ցուցադրել մասնակիցներին՝ սկսած.",
        "activeusers": "Ակտիվ մասնակիցների ցանկ",
        "activeusers-noresult": "Այդպիսի մասնակիցներ չեն գտնվել։",
        "activeusers-submit": "Ցույց տալ ակտիվ մասնակիցներին",
+       "listgrouprights-group": "Խումբ",
+       "listgrouprights-rights": "Իրավունքներ",
        "listgrouprights-members": "(անդամների ցանկ)",
        "listgrouprights-addgroup": "Ավելացնեել {{PLURAL:$2|խումբ|խմբեր}}՝  $1",
+       "listgrants-rights": "Իրավունքներ",
        "mailnologin": "Ուղարկման հասցե չկա",
        "mailnologintext": "Անհրաժեշտ է [[Special:UserLogin|մտնել համակարգ]] և ունենալ գործող էլ-փոստի հասցե ձեր [[Special:Preferences|նախընտրություններում]]՝ ուրիշ մասնակիցներին էլեկտրոնային նամակներ ուղարկելու համար։",
        "emailuser": "էլ-նամակ ուղարկել այս մասնակցին",
        "delete-edit-reasonlist": "Խմբագրել ջնջման պատճառները",
        "deleting-backlinks-warning": "'''Զգուշացում''', ձեր կողմից ջնջվող էջին հղվում են [[Special:WhatLinksHere/{{FULLPAGENAME}}|այլ հոդվածներ]]:",
        "rollback": "Հետ գլորել խմբագրումները",
+       "rollback-confirmation-confirm": "Խնդրում ենք հաստատել.",
+       "rollback-confirmation-no": "Չեղարկել",
        "rollbacklink": "հետ գլորել",
        "rollbacklinkcount": "հետ գլորել $1 {{PLURAL:$1|խմբագրում}}",
        "rollbacklinkcount-morethan": "հետ գլորել ավելի քան $1 {{PLURAL:$1|խմբագրում|խմբագրում}}",
        "rollback-success": "Հետ են շրջվել $1 մասնակցի խմբագրումները. վերադարձվել է $2 մասնակցի վերջին տարբերակին։",
        "sessionfailure-title": "Սեսիայի խափանում",
        "sessionfailure": "Կարծես խնդիր է առաջացել կապված ձեր ընթացիկ աշխատանքային սեսիայի հետ.\nայս գործողությունը բեկանվել է սեսիայի հափշտակման կանխման նպատակով։\nԽնդրում ենք սեղմել «back» կոճակը և վերբեռնել այն էջը որտեղից եկել եք ու փորձել կրկին։",
+       "changecontentmodel-reason-label": "Պատճառ՝",
+       "changecontentmodel-submit": "Փոխել",
+       "logentry-contentmodel-change-revertlink": "հետ շրջել",
+       "logentry-contentmodel-change-revert": "հետ շրջել",
        "protectlogpage": "Պաշտպանման տեղեկամատյան",
        "protectlogtext": "Ստորև բերված է պաշտպանված և պաշտպանումից հանված էջերի ցանկը։ Տես նաև [[Special:ProtectedPages|ներկայումս պաշտպանված էջերի ցանկը]]։",
        "protectedarticle": "պաշտպանվեց «[[$1]]» էջը",
        "mycontris": "Ներդրում",
        "anoncontribs": "Ներդրումներ",
        "contribsub2": "{{GENDER:$3|$1}}-ի ներդրումները ($2)",
+       "contributions-subtitle": "{{GENDER:$3|$1}}-ի համար",
        "nocontribs": "Այս չափանիշներին համապատասխանող փոփոխություններ չեն գտնվել։",
        "uctop": " վերջինը",
        "month": "Սկսած ամսից (և վաղ)՝",
        "sp-contributions-username": "IP-հասցե կամ մասնակցի անուն.",
        "sp-contributions-toponly": "Ցույց տալ միայն այն խմբագրումները, որոնք վերջին փոփոխություն են",
        "sp-contributions-newonly": "Ցույց տալ միայն նոր էջերի խմբագրումները",
+       "sp-contributions-hideminor": "Թագցնել չնչին խմբագրումներ",
        "sp-contributions-submit": "Որոնել",
        "whatlinkshere": "Այստեղ հղվող էջերը",
        "whatlinkshere-title": "Էջեր, որոնք հղում են դեպի «$1»",
        "ipbwatchuser": "Հսկացանկում ավելացնել մասնակցի էջն ու քննարկման էջը",
        "ipb-disableusertalk": "Արգելել մասնակցին խմբագրել իր քննարկման էջն արգելափակման ընթացքում",
        "ipb-pages-label": "Էջեր",
+       "ipb-namespaces-label": "Անվանատարածքներ",
        "badipaddress": "Սխալ IP-հասցե",
        "blockipsuccesssub": "Արգելափակումը կատարված է",
        "blockipsuccesstext": "[[Special:Contributions/$1|«$1»]] արգելափակված է։\n<br />Տես [[Special:BlockList|արգելափակված IP-հասցեների ցանկը]]։",
        "ipb-blocklist": "Դիտել գործող արգելափակումները",
        "ipb-blocklist-contribs": "$1 մասնակցի ներդրումը",
        "block-expiry": "Մարման ժամկետ.",
+       "block-reason": "Պատճառ՝",
        "unblockip": "Արգելափակումից հանել մասնակցին",
        "unblockiptext": "Օգտագործեք ստորև ձևը՝ նախկինում արգելափակված IP-հասցեի կամ մասնակցի գրելու հնարավորությունը վերականգնելու համար։",
        "ipusubmit": "Հանել արգելափակումը",
        "unblocked": "[[User:$1|$1]] մասնակիցը անարգելված է։",
        "unblocked-id": "$1 արգելափակումը հանված է",
        "blocklist": "Արգելափակված մասնակիցներ։",
+       "autoblocklist-submit": "Որոնել",
        "ipblocklist": "Արգելափակված IP-հասցեները և մասնակիցները",
        "ipblocklist-legend": "Արգելափակված մասնակցի որոնում",
        "blocklist-expiry": "Լրանում է",
+       "blocklist-reason": "Պատճառ",
        "ipblocklist-submit": "Որոնել",
        "infiniteblock": "ընդմիշտ",
        "expiringblock": "կմարվի $1 $2",
        "createaccountblock": "մասնակցային հաշվի ստեղծումը արգելափակված է",
        "emailblock": "էլ-փոստը արգելափակված",
        "blocklist-nousertalk": "չի կարող խմբագրել իր քննարկման էջը",
+       "blocklist-editing-page": "էջեր",
+       "blocklist-editing-ns": "անվանատարածքներ",
        "ipblocklist-empty": "Արգելափակումների ցանկը դատարկ է։",
        "ipblocklist-no-results": "Նշված IP-հասցեն կամ մասնակցի անունը արգելափակված չէ։",
        "blocklink": "արգելափակել",
        "allmessages-filter-all": "Բոլորը",
        "allmessages-language": "Լեզու",
        "allmessages-filter-submit": "Անցնել",
+       "allmessages-filter-translate": "Թարգմանել",
        "thumbnail-more": "Ընդարձակել",
        "filemissing": "Նման նիշք չկա",
        "thumbnail_error": "Պատկերիկի ստեղծման սխալ. $1",
        "import": "Էջերի ներմուծում",
        "importinterwiki": "Միջվիքի ներմուծում",
        "import-interwiki-text": "Նշեք վիքի և ներմուծվող էջի անվանումը։\nՓոփոխումների ժամանակները և խմբագրողների անունները կպահպանվեն։\nԲոլոր միջվիքի ներմուծման գործողությունները գրանցվում են [[Special:Log/import|ներմուծման տեղեկամատյանում]]։",
+       "import-interwiki-sourcewiki": "Աղբյուր վիքի.",
+       "import-interwiki-sourcepage": "Աղբյուր էջ.",
        "import-interwiki-history": "Պատճենել այս էջի փոփոխումների լրիվ պատմությունը",
        "import-interwiki-submit": "Ներմուծել",
        "import-upload-filename": "Նիշքի անուն․",
        "pageinfo-display-title": "Վերնագիր",
        "pageinfo-default-sort": "Լռելյայն տեսակավորման բանալի",
        "pageinfo-length": "Ծավալ (բայթերով)",
+       "pageinfo-namespace": "Անվանատարածք",
        "pageinfo-article-id": "Էջի N",
        "pageinfo-language": "Բովանդակության լեզու",
        "pageinfo-language-change": "փոխել",
        "pageinfo-content-model": "Էջի բովանդակության մոդելը",
+       "pageinfo-content-model-change": "փոխել",
        "pageinfo-robot-policy": "Կարգավիճակը որոնողական համակարգերում",
        "pageinfo-robot-index": "ինդեքսավորվող",
        "pageinfo-robot-noindex": "ինդեքսավորվող չէ",
        "pageinfo-contentpage": "Հաշվառված որպես բովանդակային էջ",
        "pageinfo-contentpage-yes": "Այո",
        "pageinfo-protect-cascading-yes": "Այո",
+       "pageinfo-category-pages": "Էջերի քանակ",
+       "pageinfo-category-subcats": "Ենթակատեգորիաների քանակ",
+       "pageinfo-category-files": "Հոդվածների քանակ",
+       "pageinfo-user-id": "Մասնակցի ID-ն",
        "markaspatrolleddiff": "Նշել որպես ստուգված",
        "markaspatrolledtext": "Նշել այս էջը որպես ստուգված",
        "markedaspatrolled": "Նշված է որպես ստուգված",
        "confirm-watch-top": "Ավելացնե՞լ ձեր հսկացանկին",
        "confirm-unwatch-button": "Լավ",
        "confirm-unwatch-top": "Հեռացնե՞լ Ձեր հսկացանկից։",
+       "confirm-rollback-button": "Լավ",
        "imgmultipageprev": "← նախորդ էջ",
        "imgmultipagenext": "հաջորդ էջ →",
        "imgmultigo": "Անցնե՛լ",
        "imgmultigoto": "Անցնել $1 էջը",
+       "img-lang-go": "Անցնել",
        "ascending_abbrev": "աճմ. կարգ.",
        "descending_abbrev": "նվազ",
        "table_pager_next": "Հաջորդ էջ",
        "watchlistedit-raw-done": "Ձեր հսկացանկը թարմացված է։",
        "watchlistedit-raw-added": "Ավելացվեց {{PLURAL:$1|1 անվանում|$1 անվանում}}.",
        "watchlistedit-raw-removed": "Հեռացվեց {{PLURAL:$1|1 անվանում|$1 անվանում}}.",
+       "watchlistedit-clear-title": "Մաքրել հսկացանկը",
+       "watchlistedit-clear-legend": "Մաքրել հսկացանկը",
        "watchlisttools-clear": "Մաքրել հսկացանկը",
        "watchlisttools-view": "Փոփոխությունները հսկացանկում",
        "watchlisttools-edit": "Դիտել և խմբագրել հսկացանկը",
        "watchlisttools-raw": "Խմբագրել հում հսկացանկը",
        "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|քննարկում]])",
        "version": "ՄեդիաՎիքի տարբերակը",
+       "version-editors": "Խմբագիրներ",
        "version-ext-license": "Արտոնագիր",
        "version-ext-colheader-name": "Ընդլայնում",
        "version-ext-colheader-version": "Տարբերակ",
        "version-ext-colheader-license": "Արտոնագիր",
+       "version-ext-colheader-description": "Նկարագրություն",
+       "version-ext-colheader-credits": "Հեղինակներ",
        "version-license-title": "Արտոնագիր $1-ի համար",
        "version-poweredby-credits": "Այս վիքին աշխատում է '''[https://www.mediawiki.org/ MediaWiki]'''֊ով, copyright © 2001-$1 $2։",
+       "version-poweredby-translators": "translatewiki.net թարգմանիչներ",
+       "version-software-version": "Տարբերակ",
+       "version-libraries-library": "Գրադարան",
+       "version-libraries-version": "Տարբերակ",
+       "version-libraries-license": "Արտոնագիր",
+       "version-libraries-description": "Նկարագրություն",
+       "version-libraries-authors": "Հեղինակներ",
        "redirect": "Վերահղում նիշքի, մասնակցի, էջի, տարբերակի կամ գրանցամատյանի նույնականացման համարից",
        "redirect-submit": "Անցնել",
        "redirect-lookup": "Որոնում՝",
        "tag-filter": "[[Special:Tags|Պիտակների]] զտիչ՝",
        "tag-filter-submit": "Ֆիլտրել",
        "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Պիտակ}}]]: $2",
+       "tag-mw-new-redirect": "Նոր վերահղում",
        "tags-title": "Պիտակներ",
        "tags-source-header": "Աղբյուր",
        "tags-actions-header": "Գործողություններ",
        "compare-invalid-title": "Ձեր նշած վերնագիրը անվավեր է։",
        "compare-title-not-exists": "Ձեր նշած վերնագիրը գոյություն չունի:",
        "compare-revision-not-exists": "Ձեր նշած փոփոխությունը գոյություն չունի։",
+       "diff-form": "Տարբերությունները",
+       "permanentlink": "Մշտական հղում",
        "dberr-problems": "Այս կայքում առաջացել են տեխնիկական խնդիրներ։ Հայցում ենք ձեր ներողությունը։",
        "dberr-again": "Փորձեք մի քանի րոպե սպասել և վերաբեռնել էջը։",
        "htmlform-submit": " \nՀաշվել",
+       "htmlform-selectorother-other": "Այլ",
+       "htmlform-no": "Ոչ",
+       "htmlform-yes": "Այո",
+       "htmlform-title-not-exists": "$1՝ գոյություն չունի",
        "logentry-delete-delete": "$1 {{GENDER:$2|ջնջեց}} $3 էջը",
        "logentry-delete-restore": "$1 վերականգնեց $3 ($4) էջը",
        "logentry-delete-event": "$1 փոխեց տեղեկամատյանի {{PLURAL:$5|1 գրանցման|$5 գրանցումների}} տեսանելությունը $3-ում. $4",
        "feedback-close": "Արված է",
        "feedback-message": "Հաղորդագրություն․",
        "feedback-subject": "Թեմա.",
+       "feedback-thanks-title": "Շնորհակալություն",
        "searchsuggest-search": "Որոնել {{SITENAME}} կայքում",
        "duration-seconds": "$1 {{PLURAL:$1|վայրկյան}}",
        "duration-minutes": "$1 {{PLURAL:$1|րոպե}}",
        "duration-centuries": "$1 {{PLURAL:$1|դար}}",
        "duration-millennia": "$1 {{PLURAL:$1|հազարամյակ}}",
        "expandtemplates": "Կաղապարների ընդարձակում",
+       "expand_templates_ok": "Լավ",
+       "pagelang-name": "Էջ",
+       "pagelang-select-lang": "Ընտրեք լեզուն",
+       "pagelang-reason": "Պատճառ",
+       "pagelang-submit": "Հաստատել",
        "pagelang-nonexistent-page": "$1 էջը գոյություն չունի",
+       "mediastatistics-header-total": "Բոլոր նիշքեր",
        "special-characters-group-latin": "Լատիներեն",
        "special-characters-group-latinextended": "Լատիներեն ընդլայնված",
        "special-characters-group-ipa": "ՄՀԱ (IPA)",
        "date-range-from": "Սկսած՝",
        "date-range-to": "Մինչև՝",
        "randomrootpage": "Պատահական կենտրոնական էջ",
-       "authmanager-create-from-login": "Հաշիվ ստեղծելու համար, խնդրում ենք լրացնել ստորև դաշտերը"
+       "authmanager-create-from-login": "Հաշիվ ստեղծելու համար, խնդրում ենք լրացնել ստորև դաշտերը",
+       "authprovider-resetpass-skip-label": "Բաց թողնել",
+       "passwordpolicies-group": "Խումբ"
 }
index 32b76ab..7988367 100644 (file)
@@ -5,7 +5,8 @@
                        "Armeniki",
                        "Azniv Stepanian",
                        "Rajemian",
-                       "Դավիթ Սարոյան"
+                       "Դավիթ Սարոյան",
+                       "Kareyac"
                ]
        },
        "underline-always": "Միշտ",
        "pt-userlogout": "Դուրս գալ",
        "php-mail-error-unknown": "Անյայտ սխալ PHP-ի mail() կախարկութեան մէջ:",
        "changepassword": "Գաղտնաբառը փոխել",
+       "oldpassword": "Հին գաղտնաբառը.",
        "newpassword": "Նոր գաղտնաբառը.",
        "retypenew": "Նորէն մուտքագրէք գաղտնաբառը",
        "changepassword-success": "Ձեր գաղտնաբառը փոխուեցաւ։",
        "recreate-moveddeleted-warn": "<strong>Զգուշացում. Նախապէս ջնջուած էջ մը պիտի վերստեղծուի։<strong>\n\nԿը խնդրուի մտածել այս էջի խմբագրման նպատակայարմարութեան մասին։ \nՁեր դիւրութեան համար ներքեւ կը գտնէք այս էջի ջնջումին և տեղափոխումին տեղեկատետրերը։",
        "moveddeleted-notice": "Այս էջը ջնջուած է։\nԷջին ջնջումի, պահպանումի եւ փոխադրումի տեղեկատետրը տրամադրելի է ներքեւ որպէս տեղեկութիւն։",
        "edit-conflict": "Խմբագրման ընհարում։",
+       "slot-name-main": "Գլխաւոր",
        "content-model-wikitext": "ուիքիթէքսթ",
        "content-model-text": "պարզ բնաբան",
        "content-model-javascript": "ՃաւաՍքրիփթ",
        "history-fieldset-title": "Որոնել տարբերակներ",
        "histfirst": "հնագոյն",
        "histlast": "նորագոյն",
+       "historyempty": "պարապ",
        "history-feed-title": "Վերանայումներու ցուցակ",
        "history-feed-description": "Ուիքիի այս էջին վերանայումներու ցուցակը",
        "history-feed-item-nocomment": "$1՝ $2",
        "rev-showdeleted": "Ցուցադրել",
        "revdelete-show-file-submit": "Այո",
        "revdelete-log": "Պատճառ.",
+       "pagehist": "Էջի պատմութիւն",
        "revdelete-reasonotherlist": "Ուրիշ պատճառ.",
        "mergehistory-reason": "Պատճառ.",
        "mergelog": "Ձուլման տեղեկատետր",
        "searchall": "բոլոր",
        "search-showingresults": "{{PLURAL:$4|<strong>$1</strong> արդիւնք <strong>$3</strong>-էն|<strong>$1 - $2</strong> արդիւնքներ <strong>$3</strong>-էն}}",
        "search-nonefound": "Որոնումին համապատասխանող արդիւնքներ չգտնուեցան",
+       "powersearch-toggleall": "Բոլոր",
+       "powersearch-togglenone": "Ոչ մէկ",
+       "preferences": "Նախընտրութիւններ",
        "mypreferences": "Նախընտրութիւններ",
        "skin-preview": "Նախադիտել",
+       "prefs-watchlist": "Հսկողութեան ցանկ",
+       "saveprefs": "Յիշել",
+       "searchresultshead": "Որոնել",
        "stub-threshold-sample-link": "օրինակ",
        "timezoneregion-africa": "Ափրիկէ",
        "timezoneregion-america": "Ամերիկա",
        "timezoneregion-europe": "Եւրոպա",
        "timezoneregion-indian": "Հնդկական Ովկիանոս",
        "timezoneregion-pacific": "Խաղաղ Ովկիանոս",
+       "prefs-searchoptions": "Որոնել",
        "youremail": "Էլեկտրական Նամակ",
+       "yourlanguage": "Լեզու.",
        "email": "Էլեկտրական Նամակ",
+       "prefs-info": "Հիմնական տուեալներ",
+       "prefs-editor": "Խմբագրող",
+       "prefs-preview": "Նախադիտել",
        "group": "Խումբ.",
        "group-bot": "Մեքենայիկներ",
        "group-sysop": "Վարիչներ",
index b14ea23..15d49ef 100644 (file)
        "histfirst": "le plus ancian",
        "histlast": "le plus nove",
        "historysize": "({{PLURAL:$1|1 byte|$1 bytes}})",
-       "historyempty": "(vacue)",
+       "historyempty": "vacue",
        "history-feed-title": "Historia de versiones",
        "history-feed-description": "Historia del versiones de iste pagina in le wiki",
        "history-feed-item-nocomment": "$1 a $2",
        "right-reupload-own": "Superscriber un file anteriormente incargate per uno mesme",
        "right-reupload-shared": "Supplantar localmente le files del respositorio commun de media",
        "right-upload_by_url": "Incargar un file ab un adresse URL",
-       "right-purge": "Purgar le cache de un pagina in le sito sin confirmation",
+       "right-purge": "Purgar le cache de un pagina in le sito",
        "right-autoconfirmed": "Non esser subjecte al limites de frequentia a base de adresse IP",
        "right-bot": "Esser tractate como processo automatic",
        "right-nominornewtalk": "Non reciper notification de nove messages quando se face modificationes minor in le pagina de discussion",
        "mycontris": "Contributiones",
        "anoncontribs": "Contributiones",
        "contribsub2": "Pro {{GENDER:$3|$1}} ($2)",
+       "contributions-subtitle": "Pro {{GENDER:$3|$1}}",
        "contributions-userdoesnotexist": "Le conto de usator \"$1\" non es registrate.",
        "negative-namespace-not-supported": "Le spatios de nomines con valores negative non es supportate.",
        "nocontribs": "Nulle modification correspondente a iste criterios ha essite trovate.",
index 215df67..bf65f50 100644 (file)
        "undelete_short": "Restaurar {{PLURAL:$1|1 redakto|$1 redakti}}",
        "viewdeleted_short": "Vidar {{PLURAL:$1|1 redakto efacita|$1 redakti efacita}}",
        "protect": "Protektar",
-       "protect_change": "chanjar",
+       "protect_change": "modifikar",
        "unprotect": "Desprotektar",
        "newpage": "Nova pagino",
        "talkpagelinktext": "Diskutez",
        "right-suppressrevision": "Vidar, celar e deskovrar specifika revizi di pagini de irga uzero",
        "right-blockemail": "Blokusar uzero pri sendar e-posto",
        "right-unblockself": "Desblokusar su",
+       "right-protect": "Modifikar la protekto-nivelo e la pagini protektata en serio",
        "right-viewmywatchlist": "Vidar vua propra atenco-listo",
        "right-editmyoptions": "Modifikar vua propra preferaji",
        "right-rollback": "Rapide retrorular la redakti da la lasta uzero qua redaktis specigita pagino",
        "sessionfailure": "Semblas ke eventis problemo kun vua sesiono di 'login';\nta agado abrogesis, quale presorgo kontre sequestro di sesiono ('hijacking').\nVoluntez risendar la formulario, plenigita.",
        "changecontentmodel": "Chanjar la konteno-modelo di (u)la pagino",
        "changecontentmodel-title-label": "Titulo di la pagino",
+       "changecontentmodel-submit": "Modifikar",
        "log-name-contentmodel": "Registro di la modifikuri en la modelo pri kontenajo",
        "logentry-contentmodel-change-revertlink": "restaurar",
        "logentry-contentmodel-change-revert": "restaurar",
        "expand_templates_output": "Rezulto",
        "expand_templates_ok": "O.K.",
        "expand_templates_preview": "Previdar",
+       "pagelanguage": "Modifikar la linguo di la pagino",
        "pagelang-language": "Linguo",
+       "right-pagelang": "Modifikar l'idiomo di la pagino",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 bicoko*|$1 bicoki*}} ($2; $3%)",
        "special-characters-group-latin": "Latina",
        "special-characters-group-latinextended": "Latina extensita",
index d77ab4c..1c6b41b 100644 (file)
        "botpasswords-label-cancel": "Hætta við",
        "botpasswords-label-delete": "Eyða",
        "botpasswords-label-resetpassword": "Endurstilla lykilorðið",
+       "botpasswords-label-grants": "Tiltækar heimildir:",
        "botpasswords-bad-appid": "Vélmennanafnið „$1“ er ógilt.",
        "botpasswords-created-title": "Vélmennalykilorð var búið til",
        "botpasswords-updated-title": "Vélmennalykilorð var uppfært",
        "prefs-help-prefershttps": "Þessi stilling tekur gildi í næsta skiptið sem þú skráir þig inn.",
        "prefswarning-warning": "Þú hefur gert breytingar á kjörstillingum þínum sem ekki er búið að vista.\nEf þú ferð af þessari síðu án þess að smella á \"$1\" verða kjörstillingar þínar ekki uppfærðar.",
        "prefs-tabs-navigation-hint": "Ábending: Þú getur notað vinstri og hægri örvalyklana til að flakka á milli flipa í flipalistanum.",
-       "userrights": "Notandaréttindi",
+       "userrights": "Réttindi notenda",
        "userrights-lookup-user": "Velja notanda",
        "userrights-user-editname": "Skráðu notandanafn:",
        "editusergroup": "Hlaða inn notanda hópum",
        "speciallogtitlelabel": "Beinist að (titill eða {{ns:user}}:notandanafn fyrir notanda):",
        "log": "Aðgerðaskrár",
        "logeventslist-submit": "Birta",
+       "logeventslist-patrol-log": "Yfirferðarskrá",
+       "logeventslist-tag-log": "Aðgerðaskrá yfir merki",
        "all-logs-page": "Allar aðgerðir",
        "alllogstext": "Safn allra aðgerðaskráa {{SITENAME}}.\nÞú getur takmarkað listann með því að velja tegund aðgerðaskráar, notandanafn, eða síðu.",
        "logempty": "Engin slík aðgerð fannst.",
        "listgrouprights-namespaceprotection-header": "Takmarkanir nafnrýmis",
        "listgrouprights-namespaceprotection-namespace": "Nafnrými",
        "listgrouprights-namespaceprotection-restrictedto": "Réttindi sem leyfa notanda að breyta",
+       "listgrants": "Veittar heimildir",
        "listgrants-rights": "Réttindi",
        "listgrants-grant-display": "$1 <code>($2)</code>",
        "trackingcategories-name": "Heiti skilaboða",
        "specialpages-group-highuse": "Mest notuðu síðurnar",
        "specialpages-group-pages": "Listar yfir síður",
        "specialpages-group-pagetools": "Síðuverkfæri",
-       "specialpages-group-wiki": "Gögn og tól",
+       "specialpages-group-wiki": "Gögn og verkfæri",
        "specialpages-group-redirects": "Tilvísaðar kerfissíður",
        "specialpages-group-spam": "Amasendingasíur",
        "specialpages-group-developer": "Forritaratól",
index 358ef27..5e81e28 100644 (file)
        "right-reupload-own": "自身がアップロードした既存のファイルに上書き",
        "right-reupload-shared": "共有メディアリポジトリ上のファイルにローカルで上書き",
        "right-upload_by_url": "URL からファイルをアップロード",
-       "right-purge": "確認なしでサイト上のページ・キャッシュを破棄",
+       "right-purge": "サイト上のページ キャッシュを破棄",
        "right-autoconfirmed": "IPベースの速度制限を受けない",
        "right-bot": "自動処理と認識させる",
        "right-nominornewtalk": "議論ページの細部の編集をした際に、新着メッセージとして通知しない",
        "rcfilters-view-tags-help-icon-tooltip": "タグ付けされた編集とは",
        "rcfilters-liveupdates-button": "自動読み込み",
        "rcfilters-liveupdates-button-title-on": "自動読み込みを停止",
-       "rcfilters-liveupdates-button-title-off": "æ\96°ã\81\97ã\81\84ç·¨é\9b\86ã\82\92å\8d³åº§ã\81«èª­ã\81¿è¡¨ç¤ºã\81\99ã\82\8b",
+       "rcfilters-liveupdates-button-title-off": "新しい編集を即座に表示する",
        "rcfilters-watchlist-markseen-button": "すべての変更を訪問済みにする",
        "rcfilters-watchlist-edit-watchlist-button": "ウォッチリストを編集",
        "rcfilters-watchlist-showupdated": "最終訪問以降に変更されたページは、塗りつぶされた丸印と一緒に、<strong>太字</strong>で表示されます。",
        "delete-warning-toobig": "このページには、 $1版を超える編集履歴があります。\n削除すると、{{SITENAME}}のデータベース処理に大きな負荷がかかります。\n十分に注意してください。",
        "deleteprotected": "このページは保護されているため削除できません。",
        "deleting-backlinks-warning": "<strong>警告:</strong> 削除しようとしているページは、[[Special:WhatLinksHere/{{FULLPAGENAME}}|他のページ]]からリンクまたは参照読み込みされています。",
-       "deleting-subpages-warning": "<strong>警告:</strong>削除しようとしているページは、[[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|サブページ|$1 個のサブページ|51=50 個以上のサブページ}}]]があります。",
+       "deleting-subpages-warning": "<strong>警告:</strong> 削除しようとしているページには、[[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|下位ページ|$1 件の下位ページ|51=50 件以上の下位ページ}}]]があります。",
        "rollback": "編集を巻き戻し",
+       "rollback-confirmation-yes": "巻き戻し",
+       "rollback-confirmation-no": "キャンセル",
        "rollbacklink": "巻き戻し",
        "rollbacklinkcount": "$1{{PLURAL:$1|編集}}を巻き戻し",
        "rollbacklinkcount-morethan": "$1{{PLURAL:$1|編集}}以上を巻き戻し",
        "cant-move-category-page": "カテゴリのページを移動させる権限がありません。",
        "cant-move-to-category-page": "ページをカテゴリのページに移動させる権限がありません。",
        "cant-move-subpages": "下位のページを移動する権限がありません。",
-       "namespace-nosubpages": "名前空間「$1」はサブページが許可されていません。",
+       "namespace-nosubpages": "名前空間「$1」は下位ページが許可されていません。",
        "newtitle": "新しいページ名:",
        "move-watch": "移動元と移動先ページをウォッチ",
        "movepagebtn": "ページを移動",
        "log-action-filter-suppress-reblock": "再ブロックによる利用者の秘匿",
        "log-action-filter-upload-upload": "新規アップロード",
        "log-action-filter-upload-overwrite": "再アップロード",
+       "log-action-filter-upload-revert": "差し戻し",
        "authmanager-authn-not-in-progress": "認証が行われていない、またはセッションデータが失われました。最初からやり直してください。",
        "authmanager-authn-no-primary": "指定された証明情報を認証できませんでした。",
        "authmanager-authn-no-local-user": "指定された証明情報は、このウィキのどの利用者にも関連付けられていません。",
        "unlinkaccounts": "アカウントの関連付け解除",
        "unlinkaccounts-success": "アカウントの関連付けが解除されました。",
        "authenticationdatachange-ignored": "認証データの変更は処理されませんでした。プロバイダーが設定されていない可能性があります。",
-       "userjsispublic": "注意: JavaScript のサブページは第三者が閲覧可能なため、機微な情報を含めないでください。",
-       "userjsonispublic": "注意: JSON のサブページは第三者が閲覧可能なため、機微な情報を含めないでください。",
-       "usercssispublic": "注意: CSS のサブページは第三者が閲覧可能なため、機微な情報を含めないでください。",
+       "userjsispublic": "注意: JavaScript の下位ページは第三者が閲覧可能なため、機微な情報を含めないでください。",
+       "userjsonispublic": "注意: JSON の下位ページは第三者が閲覧可能なため、機微な情報を含めないでください。",
+       "usercssispublic": "注意: CSS の下位ページは第三者が閲覧可能なため、機微な情報を含めないでください。",
        "restrictionsfield-badip": "無効な IP アドレス、またはその範囲: $1",
        "restrictionsfield-label": "許可する IP の範囲:",
        "restrictionsfield-help": "一行につき、単一の IP アドレス、もしくは CIDR による範囲。全帯域からの接続を許可する場合: <pre>0.0.0.0/0\n::/0</pre>",
        "undelete-cantedit": "このページを編集する許可がないため復元できません。",
        "undelete-cantcreate": "同名のページが存在せず、このページを作成する許可がないため復元できません。",
        "pagedata-title": "ページ・データ",
-       "pagedata-text": "このページは、ページへのデータインターフェースを提供します。サブページの構文を使用して、URLにページタイトルを入力してください。\n* コンテンツのネゴシエーションは、クライアントのAcceptヘッダーに基づいて適用されます。つまり、ページデータはクライアントが優先する形式で提供されます。",
+       "pagedata-text": "このページは、ページへのデータインターフェースを提供します。下位ページの構文を使用して、URLにページ名を入力してください。\n* コンテンツのネゴシエーションは、クライアントのAcceptヘッダーに基づいて適用されます。つまり、ページデータはクライアントが優先する形式で提供されます。",
        "pagedata-not-acceptable": "該当する形式が見つかりません。対応している MIME タイプ: $1",
        "pagedata-bad-title": "「$1」は無効なページ名です。",
-       "unregistered-user-config": "セキュリティ上の理由から、JavaScript、CSSおよびJSONの利用者サブページは、登録されていない利用者に対しては読み込みできません。",
+       "unregistered-user-config": "セキュリティ上の理由から、JavaScript、CSSおよびJSONの利用者下位ページは、登録されていない利用者に対しては読み込みできません。",
        "passwordpolicies": "パスワードポリシー",
        "passwordpolicies-summary": "これは、このウィキで定義されている利用者グループの有効なパスワードポリシーの一覧です。",
        "passwordpolicies-group": "グループ",
        "passwordpolicies-policy-maximalpasswordlength": "パスワードは$1{{PLURAL:$1|文字}}以下でなければなりません",
        "passwordpolicies-policy-passwordcannotbepopular": "パスワードは{{PLURAL:$1|一般的なものにすることはできません|一般的な$1個のパスワードのリストと一致するものにすることはできません}}",
        "easydeflate-invaliddeflate": "提供されたコンテンツが適切に圧縮されていません",
-       "unprotected-js": "ã\82»ã\82­ã\83¥ã\83ªã\83\86ã\82£ä¸\8aã\81®ç\90\86ç\94±ã\81\8bã\82\89ã\80\81JavaScriptã\81¯ä¿\9dè­·ã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84ã\83\9aã\83¼ã\82¸ã\81\8bã\82\89ã\83­ã\83¼ã\83\89ã\81\99ã\82\8bã\81\93ã\81¨ã\81¯ã\81§ã\81\8dã\81¾ã\81\9bã\82\93ã\80\82MediaWiki: å\90\8då\89\8d空é\96\93å\86\85ã\80\81ã\81¾ã\81\9fã\81¯å\88©ç\94¨è\80\85ã\82µã\83\96ã\83\9aã\83¼ã\82¸ã\81¨ã\81\97ã\81¦のみjavascriptを作成してください。"
+       "unprotected-js": "ã\82»ã\82­ã\83¥ã\83ªã\83\86ã\82£ä¸\8aã\81®ç\90\86ç\94±ã\81\8bã\82\89ã\80\81JavaScriptã\81¯ä¿\9dè­·ã\81\95ã\82\8cã\81¦ã\81\84ã\81ªã\81\84ã\83\9aã\83¼ã\82¸ã\81\8bã\82\89ã\81¯èª­ã\81¿è¾¼ã\81¿ã\81§ã\81\8dã\81¾ã\81\9bã\82\93ã\80\82MediaWiki: å\90\8då\89\8d空é\96\93å\86\85ã\80\81å\88©ç\94¨è\80\85ä¸\8bä½\8dã\83\9aã\83¼ã\82¸ã\81®ã\81\84ã\81\9aã\82\8cã\81\8bã\81§のみjavascriptを作成してください。"
 }
index 39680c1..f3425ca 100644 (file)
        "right-reupload-own": "E Fichier iwwerschreiwen deen Dir selwer eropgelueden hutt",
        "right-reupload-shared": "Lokalt Iwwerschreiwe vun engem Fichier deen an engem gemeinsam benotzte Repertoire steet",
        "right-upload_by_url": "Fichiere vun enger URL-Adress eroplueden",
-       "right-purge": "De Säitecache eidel maachen ouni nozefroen",
+       "right-purge": "De Säitecache fir eng Säit eidel maachen",
        "right-autoconfirmed": "Net betraff vun IP-baséierten Zäitlimiten",
        "right-bot": "Als automatesche Prozess behandelen (Bot)",
        "right-nominornewtalk": "Kleng Ännerungen op Diskussiounssäite léisen de Banner vun de neie Messagen net aus",
index 2857255..bbf8090 100644 (file)
        "viewsourceold": "преглед на кодот",
        "editlink": "уреди",
        "viewsourcelink": "преглед на кодот",
-       "editsectionhint": "УÑ\80еди Ð³Ð¾ Ð¿Ð°Ñ\81Ñ\83Ñ\81оÑ\82: $1",
+       "editsectionhint": "УÑ\80еди Ð³Ð¾ Ð¾Ð´Ð´ÐµÐ»Ð¾Ñ\82 â\80\9e$1â\80\9c",
        "toc": "Содржина",
        "showtoc": "прикажи",
        "hidetoc": "скриј",
        "histfirst": "најстари",
        "histlast": "најнови",
        "historysize": "({{PLURAL:$1|1 бајт|$1 бајти}})",
-       "historyempty": "(празно)",
+       "historyempty": "празно",
        "history-feed-title": "Историја на измените",
        "history-feed-description": "Историја на измените на оваа страница на викито",
        "history-feed-item-nocomment": "$1 на $2",
        "prefs-custom-json": "Прилагоден JSON",
        "prefs-custom-js": "Посебно JS",
        "prefs-common-config": "Заеднички CSS/JSON/JavaScript за сите рува:",
-       "prefs-reset-intro": "Може да ја користите оваа страница за враќање на вашите нагодувања на основно-зададените нагодувања на викито. Ова дејство е неповратно.",
+       "prefs-reset-intro": "Може да ја користите оваа страница за враќање на вашите нагодувања на стандардните нагодувања на мрежното место.\nОва дејство е неповратно.",
        "prefs-emailconfirm-label": "Потврда на е-пошта:",
        "youremail": "Е-пошта:",
        "username": "{{GENDER:$1|Корисничко име}}:",
        "right-reupload-own": "Преснимување на постоечка податотека подигната од вас",
        "right-reupload-shared": "Презапис на едни податотеки врз други на заедничкото мултимедијално складиште месно",
        "right-upload_by_url": "Подигање на податотека од URL-адреса",
-       "right-purge": "Ð\91Ñ\80иÑ\88еÑ\9aе Ð¾Ð´ Ð¾Ð¿Ñ\81лÑ\83жÑ\83ваÑ\87ки Ð¼ÐµÑ\93Ñ\83Ñ\81клад Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86аÑ\82а Ð±ÐµÐ· Ð±Ð°Ñ\80аÑ\9aе Ð¿Ð¾Ñ\82вÑ\80да Ð·Ð° Ñ\82оа",
+       "right-purge": "Ð\91Ñ\80иÑ\88еÑ\9aе Ð½Ð° Ð¼ÐµÑ\93Ñ\83Ñ\81клад Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86а",
        "right-autoconfirmed": "Без ограничувања на стапки за IP-адреса",
        "right-bot": "Третиран како автоматски процес",
        "right-nominornewtalk": "Ситните уредувања на разговорни страници да не поттикнуваат потсетник за нова порака",
        "grant-delete": "Бришење страници, преработки и дневнички записи",
        "grant-editinterface": "Уредување на именскиот простор „МедијаВики“ и JSON за цело вики/за корисник",
        "grant-editmycssjs": "Уредување на вашиот кориснички CSS/JSON/JavaScript",
-       "grant-editmyoptions": "Уредување на вашите кориснички нагодувања и поставеноста на JSON",
+       "grant-editmyoptions": "Уредување на вашите кориснички нагодувања и JSON-конфигурацијата",
        "grant-editmywatchlist": "Уредување на вашите набљудувани",
        "grant-editsiteconfig": "Уредување на CSS/JS за цело вики и за корисник",
        "grant-editpage": "Менување постоечки страници",
        "windows-nonascii-filename": "Опслужувачот не поддржува податотечни имиња со псоебни знаци.",
        "fileexists": "Податотека со ова име веќе постои. Проверете <strong>[[:$1]]</strong> ако не {{GENDER:|сте}} сигурни дали сакате да ја промените.\n[[$1|thumb]]",
        "filepageexists": "Описната страница на оваа податотека е веќе создадена на <strong>[[:$1]]</strong>, но не постои податотека со тоа име.\nОписот кој го внесовте нема да стои на описната страница.\nДоколку сакате описот да стои тука, ќе морате да го уредите рачно.\n[[$1|thumb]]",
-       "fileexists-extension": "Податотека со слично име веќе постои: [[$2|thumb]]\n* Име на податотека која се подигнува: <strong>[[:$1]]</strong>\n* Име на постоечката податотека: <strong>[[:$2]]</strong>\nДали можеби би сакале да користите покарактеристично име.",
+       "fileexists-extension": "Податотека со слично име веќе постои: [[$2|thumb]]\n* Име на податотека која се подигнува: <strong>[[:$1]]</strong>\n* Име на постоечката податотека: <strong>[[:$2]]</strong>\nДали можеби би сакале да користите покарактеристично име?",
        "fileexists-thumbnail-yes": "Се чини дека податотеката е слика со намалена големина ''(минијатура)''. [[$1|thumb]]\nПроверете ја податотеката <strong>[[:$1]]</strong>.\nАко податотеката која ја проверувате е истата слика во својата изворна големина тогаш не мора да ја подигате дополнително.",
        "file-thumbnail-no": "Името на податотеката почнува со <strong>$1</strong>.\nИзгледа дека е слика со намалена големина ''(мини, thumbnail)''.\nАко ја имате оваа слика во изворна големина, подигнете ја неја. Во спротивно сменете го името на податотеката.",
        "fileexists-forbidden": "Податотека со тоа име веќе постои и не може да биде заменета.\nАко и понатаму сакате да ја подигнете вашата податотеката, ве молиме вратете се назад и подигнете ја под друго име. [[File:$1|thumb|center|$1]]",
        "upload-form-label-own-work": "Ова е мое дело",
        "upload-form-label-infoform-categories": "Категории",
        "upload-form-label-infoform-date": "Датум",
-       "upload-form-label-own-work-message-generic-local": "Потврдувам дека податотекава ја подигам во согласност со условите на користење и правилата за лиценцирање на {{SITENAME}}.",
+       "upload-form-label-own-work-message-generic-local": "Потврдувам дека ја подигам податотекава во согласност со условите на користење и правилата за лиценцирање на {{SITENAME}}.",
        "upload-form-label-not-own-work-message-generic-local": "Ако не сте во можност да ја подигнете податотекава согласно правилата на {{SITENAME}}, затворете го дијалогов и обидете се на друг начин.",
        "upload-form-label-not-own-work-local-generic-local": "Можете да ја пробате и [[Special:Upload|стандардната страница за подигање]].",
        "upload-form-label-own-work-message-generic-foreign": "Разбирам дека ја подигам податотекава на заедничко складиште. Потврдувам дека со тоа ги почитувам тамошните услови на користење и лиценцните правила.",
        "pageinfo-category-files": "Број на податотеки",
        "pageinfo-user-id": "Корисничка назнака",
        "pageinfo-file-hash": "Тарабна вредност",
-       "pageinfo-view-protect-log": "Погл. го дневникот на заштити за страницава.",
+       "pageinfo-view-protect-log": "Преглед на дневникот на заштити за страницава.",
        "markaspatrolleddiff": "Означи како проверена верзија",
        "markaspatrolledtext": "Означи ја верзијата како проверена",
        "markaspatrolledtext-file": "Означи ја верзијава како испатролирана",
        "mediastatistics-summary": "Статистики за подигнати типови податотеки. Се зема предвид само последната верзија на податотеката. Старите и избришаните верзии не се бројат.",
        "mediastatistics-nfiles": "$1 ($2 %)",
        "mediastatistics-nbytes": "{{PLURAL:$1|Еден бајт|$1 бајти}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Ð\92кÑ\83пен Ð¾Ð±ÐµÐ¼ Ð½Ð° Ð¿Ð°Ñ\81Ñ\83Ñ\81от: {{PLURAL:$1|$1 бајт|$1 бајти}} ($2; $3%).",
+       "mediastatistics-bytespertype": "Ð\92кÑ\83пен Ð¾Ð±ÐµÐ¼ Ð½Ð° Ð¾Ð´Ð´ÐµÐ»от: {{PLURAL:$1|$1 бајт|$1 бајти}} ($2; $3%).",
        "mediastatistics-allbytes": "Вкупен обем на сите податотеки: {{PLURAL:$1|$1 бајт|$1 бајти}} ($2).",
        "mediastatistics-table-mimetype": "MIME-тип",
        "mediastatistics-table-extensions": "Можни додатоци",
index bfec830..a6dc7e4 100644 (file)
        "and": "&#32;ഒപ്പം",
        "faq": "പതിവുചോദ്യങ്ങൾ",
        "actions": "നടപടികൾ",
-       "namespaces": "നാമമേഖല",
+       "namespaces": "നാമമേഖലകൾ",
        "variants": "രൂപഭേദങ്ങൾ",
        "navigation-heading": "ഗമന വഴികാട്ടി",
        "errorpagetitle": "പിഴവ്",
        "history": "നാൾവഴി",
        "history_short": "നാൾവഴി",
        "history_small": "നാൾവഴി",
-       "updatedmarker": "à´\95à´´à´¿à´\9eàµ\8dà´\9e à´¸à´¨àµ\8dദർശനതàµ\8dതിനàµ\81 ശേഷം മാറ്റം വന്നത്",
+       "updatedmarker": "à´\95à´´à´¿à´\9eàµ\8dà´\9e à´¸à´¨àµ\8dദർശനതàµ\8dതിനàµ\8d ശേഷം മാറ്റം വന്നത്",
        "printableversion": "അച്ചടിരൂപം",
        "permalink": "സ്ഥിരംകണ്ണി",
        "print": "അച്ചടിയ്ക്കുക",
        "viewdeleted_short": "{{PLURAL:$1|മായ്ക്കപ്പെട്ട ഒരു തിരുത്തൽ|മായ്ക്കപ്പെട്ട $1 തിരുത്തലുകൾ}} കാണുക",
        "protect": "സം‌രക്ഷിക്കുക",
        "protect_change": "സംരക്ഷണമാനത്തിൽ മാറ്റം വരുത്തുക",
-       "unprotect": "à´¸à´\82à´°à´\95àµ\8dà´·à´£à´\82",
+       "unprotect": "à´¸à´\82à´°à´\95àµ\8dഷണതàµ\8dതിൽ à´®à´¾à´±àµ\8dà´±à´\82വരàµ\81à´¤àµ\8dà´¤àµ\81à´\95",
        "newpage": "പുതിയ താൾ",
        "talkpagelinktext": "സംവാദം",
        "specialpage": "പ്രത്യേക താൾ",
-       "personaltools": "à´¸àµ\8dà´µà´\95ാരàµ\8dയതാളàµ\81à´\95ൾ",
+       "personaltools": "à´µàµ\8dà´¯à´\95àµ\8dതിà´\97à´¤ à´\89à´ªà´\95à´°à´£à´\99àµ\8dà´\99ൾ",
        "talk": "സംവാദം",
        "views": "ദർശനീയത",
        "toolbox": "ഉപകരണങ്ങൾ",
        "versionrequired": "മീഡിയാവിക്കിയുടെ പതിപ്പ് $1 ആവശ്യമാണ്",
        "versionrequiredtext": "ഈ താൾ ഉപയോഗിക്കാൻ മീഡിയവിക്കി പതിപ്പ് $1 ആവശ്യമാണ്. കൂടുതൽ വിവരങ്ങൾക്ക് [[Special:Version|മീഡിയാവിക്കി പതിപ്പ് താൾ]] കാണുക.",
        "ok": "ശരി",
-       "retrievedfrom": "\"$1\" à´\8eà´¨àµ\8dà´¨ à´¤à´¾à´³à´¿àµ½à´¨à´¿à´¨àµ\8dà´¨àµ\81 ശേഖരിച്ചത്",
+       "retrievedfrom": "\"$1\" à´\8eà´¨àµ\8dà´¨ à´¤à´¾à´³à´¿àµ½à´¨à´¿à´¨àµ\8dà´¨àµ\8d ശേഖരിച്ചത്",
        "youhavenewmessages": "താങ്കൾക്ക് $1 ഉണ്ട് ($2).",
        "youhavenewmessagesfromusers": "താങ്കൾക്ക് {{PLURAL:$3|ഒരു ഉപയോക്താവ്|$3 ഉപയോക്താക്കൾ}} $1 ചേർത്തിട്ടുണ്ട് ($2).",
        "youhavenewmessagesmanyusers": "താങ്കൾക്ക് പലർ $1 ചേർത്തിട്ടുണ്ട് ($2).",
        "red-link-title": "$1 (ഇതുവരെ എഴുതപ്പെട്ടിട്ടില്ല)",
        "sort-descending": "അവരോഹണമായി ക്രമപ്പെടുത്തുക",
        "sort-ascending": "ആരോഹണമായി ക്രമപ്പെടുത്തുക",
-       "nstab-main": "à´²àµ\87à´\96à´¨à´\82",
+       "nstab-main": "താൾ",
        "nstab-user": "ഉപയോക്തൃതാൾ",
        "nstab-media": "മീഡിയാ താൾ",
        "nstab-special": "പ്രത്യേക താൾ",
        "badretype": "താങ്കൾ നൽകിയ രഹസ്യവാക്കുകൾ ഒത്തുപോകുന്നില്ല.",
        "usernameinprogress": "ഈ ഉപയോക്തൃനാമത്തിലുള്ള അംഗത്വ നിർമ്മിതി നടന്നുകൊണ്ടിരിക്കുന്നു.\nദയവായി കാത്തിരിക്കുക.",
        "userexists": "നൽകിയ ഉപയോക്തൃനാമം മുമ്പേ നിലവിലുണ്ട്.\nദയവായി മറ്റൊരു ഉപയോക്തൃനാമം തിരഞ്ഞെടുക്കുക.",
+       "createacct-normalization": "സാങ്കേതിക കാരണങ്ങളാൽ താങ്കളുടെ ഉപയോക്തൃനാമം \"$2\" എന്നാക്കി മാറ്റുന്നതാണ്.",
        "loginerror": "പ്രവേശനം സാധിച്ചില്ല",
        "createacct-error": "അംഗത്വസൃഷ്ടിക്കിടെ പിഴവുണ്ടായി",
        "createaccounterror": "അംഗത്വമെടുക്കാൻ കഴിഞ്ഞില്ല:$1",
        "histfirst": "ഏറ്റവും പഴയവ",
        "histlast": "ഏറ്റവും പുതിയവ",
        "historysize": "({{PLURAL:$1|1 ബൈറ്റ്|$1 ബൈറ്റുകൾ}})",
-       "historyempty": "(ശൂന്യം)",
+       "historyempty": "ശൂന്യം",
        "history-feed-title": "നാൾവഴി",
        "history-feed-description": "വിക്കിയിൽ ഈ താളിന്റെ നാൾവഴി",
        "history-feed-item-nocomment": "$2 സമയത്ത് $1",
        "right-reupload-own": "സ്വയം അപ്‌ലോഡ് ചെയ്ത പ്രമാണങ്ങൾക്കു മുകളിലേയ്ക്ക് പ്രമാണങ്ങൾ അപ്‌ലോഡ് ചെയ്യുക",
        "right-reupload-shared": "പങ്ക് വെയ്ക്കപ്പെട്ട മീഡിയ സംഭരണിയെ പ്രാദേശികമായി അതിലംഘിക്കുക",
        "right-upload_by_url": "യു.ആർ.എല്ലിൽ നിന്നും പ്രമാണങ്ങൾ അപ്‌ലോഡ് ചെയ്യുക",
-       "right-purge": "à´¸àµ\8dഥിരàµ\80à´\95à´°à´£à´\82 à´\92à´¨àµ\8dà´¨àµ\81à´\82 à´\87à´²àµ\8dലാതàµ\86 à´¸àµ\88à´±àµ\8dറിനàµ\8dà´±àµ\86 à´\95ാഷàµ\86 à´\92à´°àµ\81 à´¤à´¾à´³à´¿à´¨à´¾à´¯à´¿ à´ªàµ¼à´\9càµ\8d à´\9aàµ\86à´¯àµ\8dà´¯àµ\81à´\95",
+       "right-purge": "സൈറ്റിന്റെ കാഷെ ഒരു താളിനായി പർജ് ചെയ്യുക",
        "right-autoconfirmed": "ഐ.പി. അധിഷ്ഠിത പരിധികൾ ബാധകമല്ല",
        "right-bot": "യാന്ത്രിക പ്രവൃത്തിയായി കണക്കാക്കപ്പെടുന്നു",
        "right-nominornewtalk": "സംവാദം താളുകളിലെ ചെറുതിരുത്തലുകൾ പുതിയ സന്ദേശങ്ങളുണ്ടെന്ന അറിയിപ്പിനു കാരണമാകരുത്",
        "linkaccounts-submit": "അംഗത്വങ്ങൾ കണ്ണി ചേർക്കുക",
        "unlinkaccounts": "അംഗത്വങ്ങൾ കണ്ണി മാറ്റുക",
        "unlinkaccounts-success": "അംഗത്വം കണ്ണി മാറ്റി.",
+       "userjsispublic": "ദയവായി ശ്രദ്ധിക്കുക: ജാവാസ്ക്രിപ്റ്റ് ഉപതാളുകൾ മറ്റ് ഉപയോക്താക്കൾക്ക് കാണാൻ കഴിയും, അവയിൽ സ്വകാര്യവിവരങ്ങൾ ചേർക്കാതിരിക്കുക.",
+       "userjsonispublic": "ദയവായി ശ്രദ്ധിക്കുക: ജെസൺ ഉപതാളുകൾ മറ്റ് ഉപയോക്താക്കൾക്ക് കാണാൻ കഴിയും, അവയിൽ സ്വകാര്യവിവരങ്ങൾ ചേർക്കാതിരിക്കുക.",
+       "usercssispublic": "ദയവായി ശ്രദ്ധിക്കുക: സി.എസ്.എസ്. ഉപതാളുകൾ മറ്റ് ഉപയോക്താക്കൾക്ക് കാണാൻ കഴിയും, അവയിൽ സ്വകാര്യവിവരങ്ങൾ ചേർക്കാതിരിക്കുക.",
        "restrictionsfield-badip": "അസാധുവായ ഐ.പി. വിലാസം അല്ലെങ്കിൽ പരിധി:$1",
        "restrictionsfield-label": "അനുവദിച്ചിട്ടുള്ള ഐ.പി. പരിധികൾ:",
        "edit-error-short": "പിഴവ്: $1",
index 5220e22..50dfe18 100644 (file)
@@ -72,6 +72,7 @@
        "tog-norollbackdiff": "နောက်ပြန်ပြင်ဆင်ခြင်း လုပ်ဆောင်ပြီးပါက ကွဲပြားမှုကိုမပြပါနှင့်။",
        "tog-useeditwarning": "မသိမ်းရသေးသော ပြောင်းလဲမှုများ နှင့် တည်းဖြတ်ဆဲစာမျက်နှာမှ ထွက်သွားလျှင် သတိပေးပါ",
        "tog-prefershttps": "လော့ဂ်အင်ဝင်ချိန်တွင် လုံခြုံသော ဆက်သွယ်မှုကို အမြဲတမ်း အသုံးပြုရန်",
+       "tog-showrollbackconfirmation": "နောက်ပြန် ပြန်သွားရန်လင့်ခ်ကို နှိပ်သောအခါ အတည်ပြုချက်တောင်းခံပုံအား ပြသရန်",
        "underline-always": "အမြဲ",
        "underline-never": "ဘယ်သောအခါမျှ",
        "underline-default": "ဘရောက်ဆာ သို့ Skin default အတိုင်း",
        "histfirst": "အဟောင်းဆုံး",
        "histlast": "အသစ်ဆုံး",
        "historysize": "({{PLURAL:$1|1 ဘိုက်|$1 ဘိုက်}})",
-       "historyempty": "(ဘာမှမရှိ)",
+       "historyempty": "ဘာမှမရှိ",
        "history-feed-title": "မူရာဇဝင်မှတ်တမ်း",
        "history-feed-description": "ဝီကီပေါ်ရှိ ဤစာမျက်နှာ၏ တည်းဖြတ်မှုရာဇဝင်",
        "history-feed-item-nocomment": "$2 က $1",
        "deleting-backlinks-warning": "<strong>သတိပေးချက်။</strong> သင်ဖျက်ပစ်တော့မည့် စာမျက်နှာအား [[Special:WhatLinksHere/{{FULLPAGENAME}}|အခြားစာမျက်နှာများမှ]] ချိတ်ဆက်ထားခြင်း သို့မဟုတ် ထည့်သွင်းထားခြင်း ရှိနေသည်။",
        "deleting-subpages-warning": "<strong>သတိပေးချက်။</strong> သင်ဖျက်တော့မည့် စာမျက်နှာတွင် [[Special:PrefixIndex/{{FULLPAGENAME}}/|{{PLURAL:$1|စာမျက်နှာခွဲ တစ်ခု|စာမျက်နှာခွဲ $1 ခု|51=စာမျက်နှာခွဲ ၅၀ ကျော်}}]] ရှိနေသည်။",
        "rollback": "နောက်ပြန်ပြင် တည်းဖြတ်မှုများ",
+       "rollback-confirmation-yes": "နောက်ပြန် ပြန်သွားရန်",
+       "rollback-confirmation-no": "မလုပ်တော့ပါ",
        "rollbacklink": "နောက်ပြန် ပြန်သွားရန်",
        "rollbacklinkcount": "{{PLURAL:$1|တည်းဖြတ်မှု|တည်းဖြတ်မှုများ}} $1 ကို နောက်ပြန်ပြင်ရန်",
        "rollbacklinkcount-morethan": "$1 ထက်ပိုသော {{PLURAL:$1|တည်းဖြတ်မှု|တည်းဖြတ်မှုများ}}ကို နောက်ပြန်ပြင်ရန်",
index 7f03be9..dfaf649 100644 (file)
        "histfirst": "oudste",
        "histlast": "nieuwste",
        "historysize": "({{PLURAL:$1|1 byte|$1 bytes}})",
-       "historyempty": "(leeg)",
+       "historyempty": "leeg",
        "history-feed-title": "Bewerkingsoverzicht",
        "history-feed-description": "Bewerkingsoverzicht voor deze pagina op de wiki",
        "history-feed-item-nocomment": "$1 op $3 om $4",
index 09ed79b..aa6717e 100644 (file)
        "previewerrortext": "Wystąpił błąd podczas próby podglądu Twoich zmian.",
        "blockedtitle": "Użytkownik jest zablokowany",
        "blocked-email-user": "<strong>Twoje konto zostało wyłączone z wysyłania wiadomości emaili innym użytkownikom. Wciąż możesz edytować inne strony na wiki.</strong> Więcej szczegółów na temat blokady znajdziesz na swojej [[Special:MyContributions|stroni wkładu]].\n\nBlokada została nałożona przez $1.\n\nPodany powód to: <em>$2</em>.\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zablokowany został: $7\n* Identyfikator blokady: #$5",
-       "blockedtext-partial": "<strong>Twoje konto lub adres IP zostało wyłączone z dokonywania zmian na tej stronie. Wciąż możesz edytować inne strony na wiki.</strong> Więcej szczegółów na temat blokady znajdziesz na swojej [[Special:MyContributions|stroni wkładu]].\n\nBlokada została nałożona przez $1.\n\nPodany powód to: <em>$2</em>.\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zablokowany został: $7\n* Identyfikator blokady: #$5",
+       "blockedtext-partial": "<strong>Twoje konto lub adres IP zostało wyłączone z dokonywania zmian na tej stronie. Wciąż możesz edytować inne strony na wiki.</strong> Więcej szczegółów na temat blokady znajdziesz na swojej [[Special:MyContributions|stronie swojego wkładu]].\n\nBlokada została nałożona przez $1.\n\nPodany powód to: <em>$2</em>.\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zablokowany został: $7\n* Identyfikator blokady: #$5",
        "blockedtext": "<strong>Twoje konto lub adres IP zostały zablokowane.</strong>\n\nBlokada została nałożona przez $1.\nPodany powód to: <em>$2</em>.\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zablokowany został: $7\n\nW celu wyjaśnienia przyczyny zablokowania możesz się skontaktować z $1 lub innym [[{{MediaWiki:Grouppage-sysop}}|administratorem]].\nNie możesz użyć funkcji „{{int:emailuser}}”, jeśli brak jest poprawnego adresu e‐mail w Twoich [[Special:Preferences|preferencjach]] lub jeśli taka możliwość została Ci zablokowana.\nTwój obecny adres IP to $3, a numer identyfikacyjny blokady to #$5.\nProsimy o podanie obu tych informacji przy wyjaśnianiu blokady.",
        "autoblockedtext": "Ten adres IP został zablokowany automatycznie, gdyż korzysta z niego inny użytkownik, zablokowany przez administratora $1.\nPowód blokady:\n\n:<em>$2</em>\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zablokowany został: $7\n\nMożesz skontaktować się z $1 lub jednym z pozostałych [[{{MediaWiki:Grouppage-sysop}}|administratorów]] w celu uzyskania informacji o blokadzie.\n\nNie możesz użyć funkcji „{{int:emailuser}}”, jeśli brak jest poprawnego adresu e‐mail w Twoich [[Special:Preferences|preferencjach]] lub jeśli taka możliwość została Ci zablokowana.\n\nTwój obecny adres IP to $3, a numer identyfikacyjny blokady to #$5.\nProsimy o podanie obu tych numerów przy wyjaśnianiu blokady.",
        "systemblockedtext": "Twoja nazwa użytkownika lub adres IP zostały automatycznie zablokowane przez MediaWiki.\nPodany powód to:\n\n:<em>$2</em>\n\n* Początek blokady: $8\n* Wygaśnięcie blokady: $6\n* Zamierzano zablokować: $7\n\nTwój obecny adres IP to $3.\nProsimy o dołączenie powyższych szczegółów w jakichkolwiek zadawanych pytaniach.",
        "logentry-block-block": "$1 {{GENDER:$2|zablokował|zablokowała|zablokował(a)}} {{GENDER:$4|$3}}, czas blokady: $5 $6",
        "logentry-block-unblock": "$1 {{GENDER:$2|zdjął|zdjęła}} blokadę z {{GENDER:$4|$3}}",
        "logentry-block-reblock": "$1 {{GENDER:$2|zmienił|zmieniła}} ustawienia blokady dla {{GENDER:$4|$3}}, czas blokady: $5 $6",
-       "logentry-partialblock-block-page": "{{PLURAL:$1|strony|stron}}: $2",
-       "logentry-partialblock-block-ns": "przestrzeni nazw{{PLURAL:$1|:|}} $2",
+       "logentry-partialblock-block-page": "{{PLURAL:$1|strony|stron:}} $2",
+       "logentry-partialblock-block-ns": "przestrzeni {{PLURAL:$1|nazw:|nazw}} $2",
        "logentry-partialblock-block": "$1 {{GENDER:$2|wyłączył|wyłączyła}} {{GENDER:$4|$3}} z edytowania $7, czas blokady: $5 $6",
        "logentry-partialblock-reblock": "$1 {{GENDER:$2|zmienił|zmieniła}} ustawienia wyłączenia {{GENDER:$4|$3}} z edytowania $7, czas blokady: $5 $6",
        "logentry-non-editing-block-block": "$1 {{GENDER:$2|zablokował|zablokowała}} {{GENDER:$4|$3}} wykonywanie określonych operacji nieedycyjnych, czas blokady: $5 $6",
index e45dda0..a658900 100644 (file)
        "delete-confirm": "Used as page title. Parameters:\n* $1 - the page title\n{{Identical|Delete}}",
        "delete-legend": "{{Identical|Delete}}",
        "historywarning": "Warning when about to delete a page that has history.\n\nFollowed by a link which points to the history page.\n\nParameters:\n* $1 - the number of revisions that the page has",
-       "historyaction-submit": "Submit button on history pages\n{{Identical|Show}}",
+       "historyaction-submit": "Submit button to show revisions on revision history pages",
        "confirmdeletetext": "Introduction shown when deleting a page.\n\nRefers to {{msg-mw|Policy-url}}.",
        "actioncomplete": "Used in several situations, for example when a page has been deleted.\n\nSee also:\n* {{msg-mw|Actionfailed|page title}}",
        "actionfailed": "Used as page title when the submit operation failed, in [[Special:RevisionDelete]].\n\nSee also:\n* {{msg-mw|Actioncomplete|page title}}",
index d16e9aa..a7d26b1 100644 (file)
        "tog-norollbackdiff": "Не показывать разницу версий после выполнения отката",
        "tog-useeditwarning": "Предупреждать, когда я покидаю страницу с несохранёнными изменениями",
        "tog-prefershttps": "Всегда использовать защищённое соединение после представления системе",
+       "tog-showrollbackconfirmation": "Показывать подтверждение при нажатии ссылки для отката",
        "underline-always": "Всегда",
        "underline-never": "Никогда",
        "underline-default": "Использовать настройки браузера",
        "histfirst": "старейшие",
        "histlast": "новейшие",
        "historysize": "($1 {{PLURAL:$1|байт|байта|байт}})",
-       "historyempty": "(пусто)",
+       "historyempty": "пусто",
        "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": "Очистка кэша страниц без подтверждения",
+       "right-purge": "Очистка кэша страницы",
        "right-autoconfirmed": "Обход ограничений скорости на IP-адрес",
        "right-bot": "Автоматический процесс",
        "right-nominornewtalk": "Малые правки на страницах обсуждений участников не создают для них уведомление о новом сообщении",
        "ipb-confirm": "Подтвердить блокировку",
        "ipb-sitewide": "Во всём проекте",
        "ipb-partial": "Частичная",
+       "ipb-sitewide-help": "Каждая страница вики и все другие действия вклада.",
+       "ipb-partial-help": "Конкретные страницы или пространства имён.",
        "ipb-pages-label": "Страницы",
        "ipb-namespaces-label": "Пространства имён",
        "badipaddress": "IP-адрес записан в неправильном формате, или участника с таким именем не существует.",
        "confirm-unwatch-top": "Удалить эту страницу из вашего списка наблюдения?",
        "confirm-rollback-button": "ОК",
        "confirm-rollback-top": "Откатить правки на этой странице?",
+       "confirm-rollback-bottom": "Это действие немедленно откатит выбранные изменения этой страницы.",
        "confirm-mcrrestore-title": "Восстановить версию",
        "confirm-mcrundo-title": "Отменить изменение",
        "mcrundofailed": "Отменить не удалось",
        "logentry-rights-autopromote": "$1 был{{GENDER:$2||а}} автоматически переведен{{GENDER:$2||а}} из $4 в $5",
        "logentry-upload-upload": "$1 загрузил{{GENDER:$2||а}} $3",
        "logentry-upload-overwrite": "$1 загрузил{{GENDER:$2||а}} новую версию $3",
-       "logentry-upload-revert": "$1 Ð·Ð°Ð³Ñ\80Ñ\83зил{{GENDER:$2||а}} $3",
+       "logentry-upload-revert": "$1 Ð¾Ñ\82каÑ\82ил{{GENDER:$2||а}} $3 Ðº Ñ\81Ñ\82аÑ\80ой Ð²ÐµÑ\80Ñ\81ии",
        "log-name-managetags": "Журнал управления метками",
        "log-description-managetags": "На этой странице перечислены задачи, связанные с управлением [[Special:Tags|метками]]. Журнал содержит только действия, выполненные администратором вручную. Метки могут быть созданы или удалены с помощью программного обеспечения вики без добавления записей в этот журнал.",
        "logentry-managetags-create": "$1 создал{{GENDER:$2||а}} метку «$4»",
        "log-action-filter-suppress-reblock": "Сокрытие пользователя через повторное блокирование",
        "log-action-filter-upload-upload": "Новая загрузка",
        "log-action-filter-upload-overwrite": "Повторно загрузить",
+       "log-action-filter-upload-revert": "Откатить",
        "authmanager-authn-not-in-progress": "Проверка подлинности не выполняется или данные сессии были утеряны. Пожалуйста, начните снова с самого начала.",
        "authmanager-authn-no-primary": "Предоставленные учётные данные не могут быть проверены на подлинность.",
        "authmanager-authn-no-local-user": "Предоставленные учётные данные не связаны ни с одним участником этой вики.",
        "passwordpolicies-policy-passwordcannotbepopular": "Пароль не может соответствовать {{PLURAL:$1|самому часто используемому паролю|какому-либо из $1 самых часто используемых паролей}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Пароль не может соответствовать какому-либо из 100 000 самых часто используемых паролей.",
        "passwordpolicies-policyflag-forcechange": "необходимо изменить при входе",
+       "passwordpolicies-policyflag-suggestchangeonlogin": "предложить изменение при входе",
        "easydeflate-invaliddeflate": "Предоставленное содержимое не спущено надлежащим образом",
        "unprotected-js": "По соображениям безопасности JavaScript нельзя загружать с незащищённых страниц. Пожалуйста, создавайте скрипты только в пространстве имён MediaWiki: или как подстраницы участника."
 }
index d5e5473..fb18ded 100644 (file)
        "view": "Видіти",
        "view-foreign": "Видіти на $1",
        "edit": "Едітовати",
+       "edit-local": "Едітовати локальный опис",
        "create": "Створити",
+       "create-local": "Придати локальный опис",
        "delete": "Вымазати",
        "undelete_short": "Обновити $1 {{PLURAL:$1|верзію|верзії|верзії}}",
        "viewdeleted_short": "Видїти {{PLURAL:$1|змазанов едітаціёв|$1 змазаны едітації|$1 змазаных едітацій}}",
        "jumptonavigation": "навіґація",
        "jumptosearch": "Найти",
        "view-pool-error": "Перебачте, серверы суть теперь переладованы.\nТоту сторінку собі теперь пoзерать много хоснователїв.\nПросиме Вас, почекайте і спробуйте доступность пізнїше.\n\n$1",
+       "generic-pool-error": "Перебачте, серверы суть теперь переладованы.\nТоту сторінку собі теперь пoзерать много хоснователїв.\nПросиме Вас, почекайте і спробуйте доступность пізнїше.",
        "pool-timeout": "Час скінчіня чекать про замок",
        "pool-queuefull": "Фронта є повна",
        "pool-errorunknown": "Незнама хыба",
        "ns-specialprotected": "Шпеціалны сторінкы не є можне едітовати.",
        "titleprotected": "Створїня сторінкы з таков назвов было заборонене хоснователём [[User:$1|$1]] з причінов: <em>$2</em>.",
        "filereadonlyerror": "Не годно змінити файл „$1“, бо архів файлів „$2“ є теперь лем на чітаня.\n\nАдміністратор сервера, котрый архів заблоковав, додав тото пояснїня: „''$3''“.",
+       "invalidtitle": "Неприпустна назва",
        "invalidtitle-knownnamespace": "Непряавилна назва в просторї назв „$2“ і текстом „$3“",
        "invalidtitle-unknownnamespace": "Неправилна назва з незнамым чіслом простору назв $1 і текстом „$2“",
        "exception-nologin": "Не сьте приголошеный(а)",
        "resetpass_submit": "Наставити гесло і приголосити ся",
        "changepassword-success": "Ваше гесло было змінено!",
        "changepassword-throttled": "Зробили сьте дуже много спроб о приголошіня.\nПросиме Вас, почекайте $1 перед далшов спробов.",
+       "botpasswords-label-create": "Створити",
+       "botpasswords-label-update": "Обновити",
+       "botpasswords-label-cancel": "Зрушыти",
+       "botpasswords-label-delete": "Вымазати",
        "resetpass_forbidden": "Гесла не є можне змінити",
        "resetpass_forbidden-reason": "Гесла не є можне змінити: $1",
        "resetpass-no-info": "Ку тій сторінцї мають прямый приступ лем приголошены хоснователї.",
        "action-createpage": "створити тоту сторінку",
        "action-createtalk": "створити тоту діскузну сторінку",
        "action-createaccount": "Вытворїня того конта хоснователя",
+       "action-history": "зобразити історію той сторінкы",
        "action-minoredit": "означіти тото едітованя як мале",
        "action-move": "Переменовати тоту сторінку",
        "action-move-subpages": "переменованя той сторінкы зо вшыткыма єй підсторінками",
        "action-upload_by_url": "наладовати тот файл з URL адресы",
        "action-writeapi": "хосновати API про писаня",
        "action-delete": "Вымазати тоту сторінку",
-       "action-deleterevision": "вымазати тоту ревізію сторінкы",
-       "action-deletedhistory": "зобразити історію змазаных ревізій той сторінкы",
+       "action-deleterevision": "вымазаня ревізій",
+       "action-deletedhistory": "зобразити історію змазаных ревізій сторінкы",
+       "action-deletedtext": "зобразити змазаны тексты ревізії",
        "action-browsearchive": "глядати змазаны сторінкы",
        "action-undelete": "обновити тоту сторінку",
-       "action-suppressrevision": "Ñ\81конÑ\82Ñ\80олÑ\91ваÑ\82и Ñ\96 Ð¾Ð±Ð½Ð¾Ð²Ð¸Ñ\82и Ñ\82оÑ\82Ñ\83 Ñ\81Ñ\85ованÑ\83 Ñ\80евÑ\96зÑ\96Ñ\8e",
+       "action-suppressrevision": "Ñ\81конÑ\82Ñ\80олÑ\91ваÑ\82и Ñ\96 Ð¾Ð±Ð½Ð¾Ð²Ð¸Ñ\82и Ñ\81Ñ\85ованÑ\8b Ñ\80евÑ\96зÑ\96Ñ\97",
        "action-suppressionlog": "перегляд того пріватного лоґу",
        "action-block": "блокованя того хоснователя",
        "action-protect": "змінити рівень охраны той сторінкы",
        "action-rollback": "швыдко вернути управы послїднёго хоснователя едітуючого дану сторінку",
-       "action-import": "Ñ\96мпоÑ\80Ñ\82 Ñ\82ой Ñ\81Ñ\82оÑ\80Ñ\96нкÑ\8b з іншой вікі",
-       "action-importupload": "Ñ\96мпоÑ\80Ñ\82 Ñ\82ой Ñ\81Ñ\82оÑ\80Ñ\96нкÑ\8b Ð· файлу",
+       "action-import": "Ñ\96мпоÑ\80Ñ\82 Ñ\81Ñ\82оÑ\80Ñ\96нок з іншой вікі",
+       "action-importupload": "Ñ\96мпоÑ\80Ñ\82 Ñ\81Ñ\82оÑ\80Ñ\96нок Ð· Ð½Ð°Ð»Ð°Ð´Ð¾Ð²Ð°Ð½Ñ\8f файлу",
        "action-patrol": "позначіти чуджі едітованя як перевірены",
        "action-autopatrol": "означіти властных едітовань як патролованы",
        "action-unwatchedpages": "зображіня списку неслїдованых сторінок",
        "action-viewmywatchlist": "перезерати ваш список слїдованых сторінок",
        "action-viewmyprivateinfo": "перезерати вашы пріватны даны",
        "action-editmyprivateinfo": "едітовати вашы пріватны інформації",
+       "action-editcontentmodel": "едітовати модел обсягу сторінкы",
        "nchanges": "$1 {{PLURAL:$1|зміна|зміны|змін}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|од остатнёй навщівы}}",
        "enhancedrc-history": "історія",
        "uploaderror": "Під час ладованя ся притрафила хыба",
        "upload-recreate-warning": "'''Увага: Файл з тов назвов быв оперед змазаный ці переменованый.'''\n\nТу є про перегляд зображеный список мазаня і переменованя той сторінкы:",
        "uploadtext": "Ниже даный формуларь служыть на наладовованя файлів. Уж наладованы файлы собі можете перезерати і глядати помочов [[Special:FileList|списку наладованых файлів]], кажде наладованя ся тыж зазначує до [[Special:Log/upload|книгы наладованя]], змазаня суть в [[Special:Log/delete|книзї змазаных сторінок]].\n\nПро вложіня образчіка до сторінкы хоснуйте єден із слїдуючіх способів запису:\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Файл.jpg]]</nowiki></code>''' до сторінкы вложыть цїлый образок,\n* '''<code><nowiki>[[</nowiki>{{ns:file}}<nowiki>:Файл.png|thumb|left|Попис]]</nowiki></code>''' вложыть нагляд в рамику зарівнанім на лівый бік, з пописом „Попис“,\n* '''<code><nowiki>[[</nowiki>{{ns:media}}<nowiki>:Файл.ogg]]</nowiki></code>''' вложыть дірект одказ на файл, без того жебы ся зобразив на сторінцї.",
-       "upload-permitted": "Дозволены тіпы  файлів: $1.",
-       "upload-preferred": "Преферованы тіпы файлів: $1",
-       "upload-prohibited": "Заказаны тіпы файлів: $1.",
+       "upload-permitted": "{{PLURAL:$2|Дозволеный формат|Дозволены форматы}} файлів: $1.",
+       "upload-preferred": "{{PLURAL:$2|Преферованый формат|Преферованы форматы}} файлів: $1.",
+       "upload-prohibited": "{{PLURAL:$2|Заказаный формат|Заказаны форматы}} файлів: $1.",
        "uploadlogpage": "Лоґ наладованых файлів",
        "uploadlogpagetext": "Ниже найдете список найновшых файлів. Смотьте [[Special:NewFiles|ґалерію новых образків]] про веце візуалного нагляду.",
        "filename": "Назва файлу:",
        "largefileserver": "Розмір файлу є векшый як ліміт наставленый на сервері.",
        "emptyfile": "Файл, котрый сьте вложыли ся видить быти порожнїй. Могла то запричінити хыба в назві файлу. Просиме, перевірте ці сьте справды хотїли вложыти тот файл.",
        "windows-nonascii-filename": "Тота вікі не підпорує назвы файлів з шпеціалныма сімболами.",
-       "fileexists": "Файл з тов назвов уж екзістує, просиме посмотьте ся на <strong>[[:$1]]</strong>, покы не знаєте напевно, ці хочете тот файл нагородити.\n[[$1|thumb]]",
+       "fileexists": "Файл з тов назвов уж екзістує, просиме сконтролёвати <strong>[[:$1]]</strong>, покы не знаєте напевно, ці хочете тот файл нагородити.\n[[$1|thumb]]",
        "filepageexists": "Пописова сторінка про файл з тов назвов уж была на  <strong>[[:$1]]</strong> створена, але одповідаючій файл дотеперь не екзістує.\nЗгорнутя, котре ту зазначіте, ся на пописовій сторінцї не зобразить.\nКідь там хочете своє згорнутя зобразити, будете мусити дану сторінку едітовати мануално. [[$1|thumb]]",
        "fileexists-extension": "Уже екзістує файл з подобным іменом: [[$2|thumb]]\n* Назва наладованого файлу: <strong>[[:$1]]</strong>\n* Назва екзістуючого файлу: <strong>[[:$2]]</strong>\nВыберте іншу назву.",
        "fileexists-thumbnail-yes": "Тот файл є асі образчік в зменшеній великости ''(нагляд)''. [[$1|thumb]]\nПеревірте файл <strong>[[:$1]]</strong>.\nКідь є вказаный файл векшый, але інакше єднакый, не треба окремо наладовати ёго зменшену верзію.",
        "upload-too-many-redirects": "URL обсягує барз велё напрямлінь",
        "upload-http-error": "Стала ся хыба HTTP: $1",
        "upload-copy-upload-invalid-domain": "Наладовованя копірованём негодно з той домены.",
+       "upload-dialog-title": "Наладовати файл",
+       "upload-dialog-button-cancel": "Зрушыти",
+       "upload-dialog-button-back": "Назад",
+       "upload-dialog-button-done": "Готово",
+       "upload-dialog-button-save": "Уложыти",
+       "upload-dialog-button-upload": "Наладовати",
+       "upload-form-label-infoform-title": "Детайлы",
+       "upload-form-label-infoform-name": "Назва",
+       "upload-form-label-infoform-name-tooltip": "Куртый унікатный тітулок того файлу, котрый буде служыти як ёго назва. Можете хосновати обычайный текст і з павзами. Не вказуйте росшырїня файлу.",
+       "upload-form-label-infoform-description": "Опис",
+       "upload-form-label-infoform-description-tooltip": "Курто попиште вшыткы важны інформації о дїли.\nУ фотоґрафіях спомяните головны зображены обєкты, місце і окацію.",
+       "upload-form-label-usage-title": "Хоснованя",
+       "upload-form-label-infoform-categories": "Катеґорії",
+       "upload-form-label-infoform-date": "Датум",
        "backend-fail-stream": "Не вдало ся транслёвати файл $1.",
        "backend-fail-backup": "Не вдало ся створити резервну копію файлу $1.",
        "backend-fail-notexists": "Файл $1 не існує.",
index 9768a57..f6a73cc 100644 (file)
        "histfirst": "ᱢᱟᱨᱮᱱᱟᱜ",
        "histlast": "ᱱᱟᱣᱟᱱᱟᱜ",
        "historysize": "({{PLURAL:$1 1 ᱵᱟᱭᱤᱴ $1 ᱵᱟᱭᱤᱴᱥ}})",
-       "historyempty": "(ᱠᱷᱟᱹᱞᱤ)",
+       "historyempty": "ᱠᱷᱟᱹᱞᱤ",
        "history-feed-title": "ᱥᱩᱫᱷᱨᱟᱹᱣ ᱱᱟᱜᱟᱢ",
        "history-feed-description": "ᱣᱤᱠᱤᱨᱮ ᱱᱤᱭᱟᱹ ᱥᱟᱦᱴᱟ ᱵᱚᱫᱚᱞ ᱨᱮᱱᱟᱜ ᱱᱟᱜᱟᱢ",
        "history-feed-item-nocomment": "$2 ᱨᱮ $1",
        "enhancedrc-history": "ᱱᱟᱜᱟᱢ",
        "recentchanges": "ᱨᱚᱠᱟ ᱵᱚᱫᱚᱞᱠᱚ",
        "recentchanges-legend": "ᱱᱟᱣᱟᱱᱟ ᱵᱚᱫᱚᱞ ᱛᱮᱭᱟᱜᱠᱚ",
-       "recentchanges-summary": "á±±á±\9aá±£á±\9f á±¥á±\9fᱦᱴá±\9fᱨᱮ á±©á±­á± á±¤ á±¨á±®á±­á±\9fá±\9c á±¡á±\9aá±\9bá±\9a á± á±·á±\9aá±± á±±á±\9fá±£á±\9f á±µá±\9aᱫá±\9aá±\9eá± á±\9a á±¯á±\9fᱸᱡá±\9fᱸᱭᱢᱮ᱾",
+       "recentchanges-summary": "á±±á±\9aᱶá±\9f á±¥á±\9fᱦᱴá±\9fᱨᱮ á±£á±¤á± á±¤ á±¨á±®á±­á±\9fá±\9c á±¡á±\9aá±\9bá±\9a á± á±·á±\9aá±± á±¨á±\9aá± á±\9f á±µá±\9aᱫá±\9aá±\9eá± á±\9a á±¯á±\9fᱸᱡá±\9fᱸᱭᱢᱮ ᱾",
        "recentchanges-noresult": "ᱮᱢᱞᱮᱱ ᱥᱚᱢᱚᱭ ᱵᱷᱤᱛᱤᱨ ᱨᱮ ᱵᱚᱫᱚᱞᱟᱜ ᱠᱚ ᱵᱟᱭ ᱢᱤᱫᱩᱜ ᱠᱟᱱᱟ ᱾",
-       "recentchanges-feed-description": "ᱱᱚᱣᱟ feed ᱨᱮ ᱩᱭᱠᱤ ᱨᱮᱭᱟᱜ ᱡᱚᱛᱚ ᱠᱷᱚᱱ ᱱᱟᱣᱟ ᱵᱚᱫᱚᱞᱠᱚ ᱯᱟᱸᱡᱟᱸᱭᱢᱮ᱾",
+       "recentchanges-feed-description": "ᱱᱚᱣᱟ ᱯᱷᱤᱰ ᱨᱮ ᱣᱤᱠᱤ ᱨᱮᱭᱟᱜ ᱡᱚᱛᱚ ᱠᱷᱚᱱ ᱱᱟᱣᱟ ᱵᱚᱫᱚᱞᱠᱚ ᱯᱟᱸᱡᱟᱸᱭᱢᱮ᱾",
        "recentchanges-label-newpage": "ᱱᱚᱣᱟ ᱥᱟᱯᱲᱟᱣ ᱢᱤᱫᱴᱮᱱ ᱱᱟᱣᱟ ᱥᱟᱦᱴᱟᱭ ᱛᱮᱭᱟᱨᱠᱮᱫᱟ",
        "recentchanges-label-minor": "ᱱᱚᱣᱟ ᱫᱚ ᱦᱩᱰᱤᱧ ᱥᱟᱯᱲᱟᱣ ᱠᱟᱱᱟ",
        "recentchanges-label-bot": "ᱱᱚᱣᱟ ᱥᱟᱯᱲᱟᱣ ᱫᱚ ᱵᱚᱴ ᱮ ᱠᱚᱨᱟᱣᱠᱟᱫᱟ",
index e500f94..277dd77 100644 (file)
        "mergehistory-comment": "Spojeno [[:$1]] u [[:$2]]: $3",
        "mergehistory-same-destination": "Izvorne i odredišne stranice ne mogu biti iste",
        "mergehistory-reason": "Razlog:",
-       "mergelog": "Registar spajanja",
+       "mergelog": "Evidencija spajanja",
        "revertmerge": "Ukini spajanje",
        "mergelogpagetext": "Ispod je spisak nedavnih spajanja historija stranica.",
        "history-title": "Historija izmjena stranice \"$1\"",
        "grant-viewdeleted": "Pregled obrisanih datoteka i stranica",
        "grant-viewmywatchlist": "Pregled vaših praćenja",
        "grant-viewrestrictedlogs": "Pregledanje ograničenih unosa u zapisniku",
-       "newuserlogpage": "Registar novih korisnika",
+       "newuserlogpage": "Evidencija novih korisnika",
        "newuserlogpagetext": "Ovo je evidencija registracije novih korisnika.",
        "rightslog": "Evidencija korisničkih prava",
        "rightslogtext": "Ovo je evidencija izmjene korisničkih prava.",
        "upload-permitted": "{{PLURAL:$2|Podržana vrsta|Podržane vrste}} datoteka: $1.",
        "upload-preferred": "{{PLURAL:$2|Preferirana vrsta|Preferirane vrste}} datoteka: $1.",
        "upload-prohibited": "{{PLURAL:$2|Zabranjena vrsta|Zabranjene vrste}} datoteka: $1.",
-       "uploadlogpage": "Registar postavljanja",
+       "uploadlogpage": "Evidencija postavljanja",
        "uploadlogpagetext": "Ispod je popis najnovijih postavljanja datoteka.\nVidi [[Special:NewFiles|galeriju novih datoteka]] za slikovitiji pregled.",
        "filename": "Ime fajla / Име датотеке",
        "filedesc": "Sažetak - Опис",
        "logeventslist-tag-log": "Evidencija oznaka",
        "all-logs-page": "Sve evidencije - Све евиденције",
        "alllogstext": "Zajednički prikaz svih dostupnih evidencija sa {{SITENAME}}.\nMožete specificirati prikaz izabiranjem specifičnog spiska, korisničkog imena ili promjenjenog članka (razlikovati velika slova).",
-       "logempty": "Ne postoji takav zapis.",
+       "logempty": "Nema pronađenih stavki u evidenciji.",
        "log-title-wildcard": "Traži naslove koji počinju s ovim tekstom",
        "showhideselectedlogentries": "Prikaži/sakrij izabrane zapise u evidenciji",
        "log-edit-tags": "Uredi oznake izabranih zapisničkih unosa",
        "changecontentmodel-nodirectediting": "Model sadržaja $1 ne podržava izravno uređivanje",
        "changecontentmodel-emptymodels-title": "Nema dostupnih modela sadržaja",
        "changecontentmodel-emptymodels-text": "Model sadržaja stranice [[:$1]] se ne može pretvoriti ni u jedan drugi tip.",
-       "log-name-contentmodel": "Zapisnik promjene modela sadržaja",
+       "log-name-contentmodel": "Evidencija promjene modela sadržaja",
        "log-description-contentmodel": "Ova stranica navodi promjene u modelu sadržaja stranica, kao i stranice stvorene s modelom sadržaja koji se razlikuje od predodređenog.",
        "logentry-contentmodel-new": "$1 {{GENDER:$2|napravio je|napravila je}} stranicu $3 s nestandardnim modelom sadržaja \"$5\"",
        "logentry-contentmodel-change": "$1 {{GENDER:$2|promijenio|promijenila}} je model sadržaja stranice $3 iz \"$4\" u \"$5\"",
index 337d978..1adcdf5 100644 (file)
        "mainpage": "پہلا پرت",
        "mainpage-description": "پہلا پرت",
        "policy-url": "Project:پالیسی",
-       "portal": "بیٹھک",
+       "portal": "برادری دا پھاٹک",
        "portal-url": "Project:دیوان عام",
        "privacy": "پرائیویسی پالیسی",
        "privacypage": "Project:پرائیویسی پالیسی",
index 0f44ffe..7bcf82a 100644 (file)
        "histfirst": "najstarejše",
        "histlast": "najnovejše",
        "historysize": "({{PLURAL:$1|$1 zlog|$1 zloga|$1 zlogi|$1 zlogov}})",
-       "historyempty": "(prazno)",
+       "historyempty": "prazno",
        "history-feed-title": "Zgodovina strani",
        "history-feed-description": "Zgodovina navedene strani {{GRAMMAR:rodilnik|{{SITENAME}}}}",
        "history-feed-item-nocomment": "$1 ob $2",
index 24fd18f..cb2de8b 100644 (file)
        "histfirst": "äldsta",
        "histlast": "nyaste",
        "historysize": "({{PLURAL:$1|1 byte|$1 byte}})",
-       "historyempty": "(tom)",
+       "historyempty": "tom",
        "history-feed-title": "Versionshistorik",
        "history-feed-description": "Versionshistorik för denna sida på wikin",
        "history-feed-item-nocomment": "$1 den $2",
index 17b6511..64ec265 100644 (file)
        "moredotdotdot": "ดูเพิ่ม...",
        "morenotlisted": "รายการนี้อาจไม่สมบูรณ์",
        "mypage": "หน้า",
-       "mytalk": "à¸\9eูà¸\94à¸\84ุย",
-       "anontalk": "à¸\9eูà¸\94à¸\84ุย",
+       "mytalk": "คุย",
+       "anontalk": "คุย",
        "navigation": "การนำทาง",
        "and": "&#32;และ",
        "faq": "คำถามที่พบบ่อย",
        "protect_change": "เปลี่ยน",
        "unprotect": "เปลี่ยนการล็อก",
        "newpage": "หน้าใหม่",
-       "talkpagelinktext": "à¸\9eูà¸\94à¸\84ุย",
+       "talkpagelinktext": "คุย",
        "specialpage": "หน้าพิเศษ",
        "personaltools": "เครื่องมือส่วนตัว",
        "talk": "อภิปราย",
        "cannotchangeemail": "ไม่สามารถเปลี่ยนที่อยู่อีเมลบนวิกินี้",
        "emaildisabled": "เว็บไซต์นี้ไม่สามารถส่งอีเมล",
        "accountcreated": "สร้างบัญชีแล้ว",
-       "accountcreatedtext": "สรà¹\89าà¸\87à¸\9aัà¸\8dà¸\8aีà¸\9cูà¹\89à¹\83à¸\8aà¹\89สำหรัà¸\9a [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|à¸\9eูà¸\94à¸\84ุย]]) à¹\81ลà¹\89ว",
+       "accountcreatedtext": "สร้างบัญชีผู้ใช้สำหรับ [[{{ns:User}}:$1|$1]] ([[{{ns:User talk}}:$1|คุย]]) แล้ว",
        "createaccount-title": "การสร้างบัญชีสำหรับ {{SITENAME}}",
        "createaccount-text": "มีบางคนสร้างบัญชีโดยใช้ที่อยู่อีเมลของคุณบน {{SITENAME}} ($4) โดยใช้ชื่อ \"$2\" และรหัสผ่าน \"$3\" \nคุณควรเข้าสู่ระบบและเปลี่ยนรหัสผ่านทันที\n\nคุณอาจเพิกเฉยข้อความนี้ หากการสร้างบัญชีนี้เป็นความผิดพลาด",
        "login-throttled": "ที่ผ่านมาคุณพยายามล็อกอินมากครั้งเกินไป\nกรุณารอ $1 ก่อนลองอีกครั้ง",
        "categoriesfrom": "แสดงหมวดหมู่เริ่มจาก:",
        "deletedcontributions": "การเข้ามีส่วนร่วมของผู้ใช้ที่ถูกลบ",
        "deletedcontributions-title": "การเข้ามีส่วนร่วมของผู้ใช้ที่ถูกลบ",
-       "sp-deletedcontributions-contribs": "à¹\80รืà¹\88อà¸\87à¸\97ีà¹\88มีส่วนร่วม",
+       "sp-deletedcontributions-contribs": "à¸\81ารà¹\80à¸\82à¹\89ามีส่วนร่วม",
        "linksearch": "ค้นหาลิงก์ภายนอก",
        "linksearch-pat": "รูปแบบการค้นหา:",
        "linksearch-ns": "เนมสเปซ:",
index e81bb47..9c5db0f 100644 (file)
        "logeventslist-tag-log": "Журнал міток",
        "all-logs-page": "Усі публічні журнали",
        "alllogstext": "Комбінований показ журналів {{grammar:genitive|{{SITENAME}}}}.\nВи можете відфільтрувати результати за типом журналу, іменем користувача (враховується регістр) або зазначеною сторінкою (також враховується регістр).",
-       "logempty": "У Ð¶Ñ\83Ñ\80налÑ\96 Ð½ÐµÐ¼Ð°Ñ\94 Ð¿Ð¾Ð´Ñ\96бних записів.",
+       "logempty": "У Ð¶Ñ\83Ñ\80налÑ\96 Ð½ÐµÐ¼Ð°Ñ\94 Ð²Ñ\96дповÑ\96дних записів.",
        "log-title-wildcard": "Знайти заголовки, що починаються з цих символів",
        "showhideselectedlogentries": "Показати/приховати виділені записи журналу",
        "log-edit-tags": "Змінити мітки для вибраних записів журналів",
index 611501f..6fcb108 100644 (file)
@@ -40,7 +40,8 @@
                        "Fitoschido",
                        "Dcljr",
                        "Bukhari",
-                       "Sajidkhan"
+                       "Sajidkhan",
+                       "Hmfs.ind"
                ]
        },
        "tog-underline": "ربط کی خط کشیدگی:",
        "nstab-category": "زمرہ",
        "mainpage-nstab": "صفحۂ اول",
        "nosuchaction": "مطلوبہ اقدام موجود نہیں",
-       "nosuchactiontext": "URL کی جانب سے مختص کیا گیا عمل درست نہیں.\nآپ نے شاید URL غلط لکھا، یا کسی غیر صحیح ربط کی پیروی کی ہے.\n{{اِس سے SITENAME کے زیرِ استعمال مصنع لطیف میں کھٹمل کی نشاندہی کا بھی اندیشہ ہے}}.",
+       "nosuchactiontext": "URL کی جانب سے مختص کیا گیا عمل درست نہیں۔\nآپ نے شاید URL غلط لکھا ہے یا کسی نادرست ربط پر کلک کیا ہے۔\nاِس سے {{SITENAME}} کے زیرِ استعمال سافٹ ویئر میں کسی خامی کی موجودگی کا بھی اندیشہ ہے۔",
        "nosuchspecialpage": "کوئی ایسا خاص صفحہ نہیں",
        "nospecialpagetext": "<strong>آپ نے ایک غیر موجود خصوصی صفحہ کی درخواست کی ہے۔</strong>\n\nدرست خاص صفحات کی ایک فہرست [[Special:SpecialPages|{{int:specialpages}}]] پر دیکھی جاسکتی ہے۔",
        "error": "نقص",
index 6cd17f6..fd4f1bd 100644 (file)
@@ -80,6 +80,7 @@
        "tog-norollbackdiff": "進行反轉之後唔睇差異",
        "tog-useeditwarning": "當我離開未保存好嘅修改嗰陣警告我",
        "tog-prefershttps": "簽到後繼續用加密連線",
+       "tog-showrollbackconfirmation": "撳「反轉」掣嘅時候要撳確認",
        "underline-always": "全部",
        "underline-never": "永不",
        "underline-default": "瀏覽器或瀏覽器膚色預設",
        "grant-editprotected": "改保護咗嘅版",
        "grant-highvolume": "大量編輯",
        "grant-oversight": "收埋用戶同禁止顯示修訂",
+       "grant-rollback": "反轉一啲版面嘅修改",
        "grant-sendemail": "寄電郵畀其他用戶",
        "grant-uploadeditmovefile": "上載、𠖫同搬檔",
        "grant-uploadfile": "上載新檔案",
        "deleteprotected": "你唔可以刪呢版,因為佢畀人保護咗。",
        "deleting-backlinks-warning": "<strong>警告:</strong>有[[Special:WhatLinksHere/{{FULLPAGENAME}}|其他版]]連過來或嵌咗你準備刪嘅呢版。",
        "rollback": "反轉修改",
+       "rollback-confirmation-yes": "反轉",
        "rollbacklink": "反轉",
        "rollbacklinkcount": "反轉 $1 次修改",
        "rollbacklinkcount-morethan": "反轉超過$1次嘅{{PLURAL:$1|edit|修改}}",
        "confirm-unwatch-button": "好",
        "confirm-unwatch-top": "喺你嘅監視清單度刪走呢一版?",
        "confirm-rollback-button": "好",
+       "confirm-rollback-bottom": "呢個動作會立即反轉晒揀咗嘅修改。",
+       "confirm-mcrundo-title": "還原一個改動",
        "comma-separator": "、",
        "word-separator": "",
        "parentheses": "($1)",
        "tag-mw-blank": "清空",
        "tag-mw-replace": "換咗",
        "tag-mw-rollback": "反轉",
+       "tag-mw-rollback-description": "用「反轉」掣將之前修改打回頭嘅修改",
+       "tag-mw-undo": "還原",
+       "tag-mw-undo-description": "用「還原」掣還原之前修改嘅修改",
        "tags-title": "標籤",
        "tags-intro": "呢一版列示咗個軟件標示嘅編輯,同埋佢哋嘅解釋。",
        "tags-tag": "標籤名",
        "tags-hitcount": "$1次更改",
        "tags-create-reason": "原因:",
        "tags-create-submit": "開",
+       "tags-delete-explanation-warning": "呢個動作<strong>冇得返轉頭</strong>,係<strong>還原唔到</strong>嘅,就算資料庫管理員都還原唔到。唔該諗清楚你係咪想刪走呢個標籤。",
        "tags-delete-reason": "原因:",
        "tags-activate-title": "啟用標籤",
        "tags-activate-reason": "原因:",
index 0caf584..33ce701 100644 (file)
        "histfirst": "最舊",
        "histlast": "最新",
        "historysize": "($1 位元組)",
-       "historyempty": "(空)",
+       "historyempty": "",
        "history-feed-title": "修訂歷史",
        "history-feed-description": "本 Wiki 上此頁面的修訂歷史",
        "history-feed-item-nocomment": "$1 於 $2",
        "print.css": "/* 此處的 CSS 會影響列印輸出 */",
        "noscript.css": "/* 此 CSS 會影響沒有啟用 JavaScript 的使用者 */",
        "group-autoconfirmed.css": "/* 此 CSS 會影響自動確認的使用者 */",
+       "group-user.css": "/* 置於此處的CSS只會影響已註冊使用者 */",
        "group-bot.css": "/* 此 CSS 會影響機器人 */",
        "group-sysop.css": "/* 這裡的 CSS 會影響管理員 */",
        "group-bureaucrat.css": "/* 此 CSS 會影響行政員 */",
        "common.json": "/* 在此的任一 JavaScript 會為全部使用者在所有頁面裡載入。 */",
        "common.js": "/* 此 JavaScript 會用於使用者載入的每一個頁面。 */",
+       "group-autoconfirmed.js": "/* 這裡的任何JavaScript只會為自動確認的使用者載入 */",
+       "group-user.js": "/* 這裡的任何JavaScript只會為已註冊使用者載入 */",
+       "group-bot.js": "/* 這裡的任何JavaScript只會為機器人載入 */",
        "group-sysop.js": "/* 這裡的 JavaScript 會影響管理員 */",
+       "group-bureaucrat.js": "/* 這裡的任何JavaScript只會為行政員載入 */",
        "anonymous": "{{SITENAME}} 的匿名{{PLURAL:$1|使用者}}",
        "siteuser": "{{SITENAME}}使用者 $1",
        "anonuser": "{{SITENAME}} 匿名使用者 $1",
index f325641..86ac01a 100644 (file)
@@ -438,7 +438,7 @@ $specialPageAliases = [
        'Listgrants'                => [ 'ListGrants' ],
        'Listredirects'             => [ 'ListRedirects' ],
        'ListDuplicatedFiles'       => [ 'ListDuplicatedFiles', 'ListFileDuplicates' ],
-       'Listusers'                 => [ 'ListUsers', 'UserList' ],
+       'Listusers'                 => [ 'ListUsers', 'UserList', 'Users' ],
        'Lockdb'                    => [ 'LockDB' ],
        'Log'                       => [ 'Log', 'Logs' ],
        'Lonelypages'               => [ 'LonelyPages', 'OrphanedPages' ],
index 9c1093b..6a763f2 100644 (file)
@@ -24,6 +24,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\Shell\Shell;
+
 /**
  * Stream wrapper around 7za filter program.
  * Required since we can't pass an open file resource to XMLReader->open()
@@ -48,7 +50,7 @@ class SevenZipStream {
                } else {
                        return false;
                }
-               $arg = wfEscapeShellArg( $this->stripPath( $path ) );
+               $arg = Shell::escape( $this->stripPath( $path ) );
                $command = "7za $options $arg";
                if ( !wfIsWindows() ) {
                        // Suppress the stupid messages on stderr
index 6e545a6..0d4f14c 100644 (file)
@@ -1615,10 +1615,10 @@ abstract class Maintenance {
                $bash = ExecutableFinder::findInDefaultPaths( 'bash' );
                if ( !wfIsWindows() && $bash ) {
                        $retval = false;
-                       $encPrompt = wfEscapeShellArg( $prompt );
+                       $encPrompt = Shell::escape( $prompt );
                        $command = "read -er -p $encPrompt && echo \"\$REPLY\"";
-                       $encCommand = wfEscapeShellArg( $command );
-                       $line = wfShellExec( "$bash -c $encCommand", $retval, [], [ 'walltime' => 0 ] );
+                       $encCommand = Shell::escape( $command );
+                       $line = Shell::escape( "$bash -c $encCommand", $retval, [], [ 'walltime' => 0 ] );
 
                        if ( $retval == 0 ) {
                                return $line;
index 61c63e9..7566fe0 100644 (file)
@@ -29,6 +29,7 @@ require_once __DIR__ . '/7zip.inc';
 require_once __DIR__ . '/../includes/export/WikiExporter.php';
 
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 use MediaWiki\Storage\BlobAccessException;
 use MediaWiki\Storage\SqlBlobStore;
 use Wikimedia\Rdbms\IMaintainableDatabase;
@@ -756,7 +757,7 @@ TEXT
 
                if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) {
                        $cmd = implode( " ",
-                               array_map( 'wfEscapeShellArg',
+                               array_map( [ Shell::class, 'escape' ],
                                        [
                                                $this->php,
                                                "$IP/../multiversion/MWScript.php",
@@ -764,7 +765,7 @@ TEXT
                                                '--wiki', wfWikiID() ] ) );
                } else {
                        $cmd = implode( " ",
-                               array_map( 'wfEscapeShellArg',
+                               array_map( [ Shell::class, 'escape' ],
                                        [
                                                $this->php,
                                                "$IP/maintenance/fetchText.php",
index a8a0c71..9502cdc 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\Shell\Shell;
+
 require __DIR__ . '/../Maintenance.php';
 
 class HHVMMakeRepo extends Maintenance {
@@ -103,7 +105,7 @@ class HHVMMakeRepo extends Maintenance {
 
                $hhvm = $this->getOption( 'hhvm', 'hhvm' );
                $verbose = $this->getOption( 'verbose', 3 );
-               $cmd = wfEscapeShellArg(
+               $cmd = Shell::escape(
                        $hhvm,
                        '--hphp',
                        '--target', 'hhbc',
index d84e02f..e1deb4c 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/hhvm -f
 <?php
 
+use MediaWiki\Shell\Shell;
+
 require __DIR__ . '/../Maintenance.php';
 
 class RunHipHopServer extends Maintenance {
@@ -12,8 +14,8 @@ class RunHipHopServer extends Maintenance {
                global $IP;
 
                passthru(
-                       'cd ' . wfEscapeShellArg( $IP ) . " && " .
-                       wfEscapeShellArg(
+                       'cd ' . Shell::escape( $IP ) . " && " .
+                       Shell::escape(
                                'hhvm',
                                '-c', __DIR__."/server.conf",
                                '--mode=server',
index 2d6a0be..791b360 100644 (file)
@@ -33,6 +33,8 @@
  * @version first release
  */
 
+use MediaWiki\Shell\Shell;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -88,7 +90,7 @@ class MWDocGen extends Maintenance {
 
                // Do not use wfShellWikiCmd, because mwdoc-filter.php is not
                // a Maintenance script.
-               $this->inputFilter = wfEscapeShellArg( [
+               $this->inputFilter = Shell::escape( [
                        $wgPhpCli,
                        $IP . '/maintenance/mwdoc-filter.php'
                ] );
index 212a20d..a71abb6 100644 (file)
@@ -21,6 +21,8 @@
  * @ingroup Maintenance
  */
 
+use MediaWiki\Shell\Shell;
+
 require_once __DIR__ . '/Maintenance.php';
 
 /**
@@ -107,9 +109,9 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance {
                        // in the pipe buffer. This can improve performance by up to a
                        // factor of 2.
                        global $wgDBuser, $wgDBserver, $wgDBpassword, $wgDBname;
-                       $cmd = 'mysql -u' . wfEscapeShellArg( $wgDBuser ) .
-                               ' -h' . wfEscapeShellArg( $wgDBserver ) .
-                               ' -p' . wfEscapeShellArg( $wgDBpassword, $wgDBname );
+                       $cmd = 'mysql -u' . Shell::escape( $wgDBuser ) .
+                               ' -h' . Shell::escape( $wgDBserver ) .
+                               ' -p' . Shell::escape( $wgDBpassword, $wgDBname );
                        $this->output( "Using pipe method\n" );
                        $pipe = popen( $cmd, 'w' );
                }
index 1ba7054..591fbd4 100644 (file)
@@ -93,6 +93,7 @@ class PopulatePPSortKey extends LoggedUpdateMaintenance {
                }
 
                $this->output( "Populating page_props.pp_sortkey complete.\n" );
+               return true;
        }
 
        protected function getUpdateKey() {
index d5d27ad..8df01e6 100644 (file)
@@ -239,7 +239,7 @@ class PPFuzzTest {
 class PPFuzzUser extends User {
        public $ppfz_test, $mDataLoaded;
 
-       function load() {
+       function load( $flags = null ) {
                if ( $this->mDataLoaded ) {
                        return;
                }
index 26d4e79..68184ea 100644 (file)
@@ -22,6 +22,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 
 if ( !defined( 'MEDIAWIKI' ) ) {
        $optionsWithoutArgs = [ 'fix' ];
@@ -451,7 +452,7 @@ class CheckStorage {
                echo "Filtering XML dump...\n";
                $exitStatus = 0;
                passthru( 'mwdumper ' .
-                       wfEscapeShellArg(
+                       Shell::escape(
                                "--output=file:$filteredXmlFileName",
                                "--filter=revlist:$revFileName",
                                $xml
index 7f36442..de52e7a 100644 (file)
@@ -24,6 +24,7 @@
 
 use MediaWiki\Logger\LegacyLogger;
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Shell\Shell;
 use Wikimedia\Rdbms\IDatabase;
 
 $optionsWithArgs = RecompressTracked::getOptionsWithArgs();
@@ -215,19 +216,19 @@ class RecompressTracked {
         * writing are all slow.
         */
        function startReplicaProcs() {
-               $cmd = 'php ' . wfEscapeShellArg( __FILE__ );
+               $cmd = 'php ' . Shell::escape( __FILE__ );
                foreach ( self::$cmdLineOptionMap as $cmdOption => $classOption ) {
                        if ( $cmdOption == 'replica-id' ) {
                                continue;
                        } elseif ( in_array( $cmdOption, self::$optionsWithArgs ) && isset( $this->$classOption ) ) {
-                               $cmd .= " --$cmdOption " . wfEscapeShellArg( $this->$classOption );
+                               $cmd .= " --$cmdOption " . Shell::escape( $this->$classOption );
                        } elseif ( $this->$classOption ) {
                                $cmd .= " --$cmdOption";
                        }
                }
                $cmd .= ' --child' .
-                       ' --wiki ' . wfEscapeShellArg( wfWikiID() ) .
-                       ' ' . wfEscapeShellArg( ...$this->destClusters );
+                       ' --wiki ' . Shell::escape( wfWikiID() ) .
+                       ' ' . Shell::escape( ...$this->destClusters );
 
                $this->replicaPipes = $this->replicaProcs = [];
                for ( $i = 0; $i < $this->numProcs; $i++ ) {
@@ -274,7 +275,9 @@ class RecompressTracked {
        function dispatch( /*...*/ ) {
                $args = func_get_args();
                $pipes = $this->replicaPipes;
-               $numPipes = stream_select( $x = [], $pipes, $y = [], 3600 );
+               $x = [];
+               $y = [];
+               $numPipes = stream_select( $x, $pipes, $y, 3600 );
                if ( !$numPipes ) {
                        $this->critical( "Error waiting to write to replica DBs. Aborting" );
                        exit( 1 );
index ef9e46e..00046d3 100644 (file)
@@ -114,7 +114,7 @@ class WrapOldPasswords extends Maintenance {
 
                        // Clear memcached so old passwords are wiped out
                        foreach ( $updateUsers as $user ) {
-                               $user->clearSharedCache();
+                               $user->clearSharedCache( 'refresh' );
                        }
                } while ( $res->numRows() );
        }
index af40b73..a63b19b 100644 (file)
@@ -27,12 +27,6 @@ if ( !defined( 'MEDIAWIKI' ) ) {
 global $wgResourceBasePath;
 
 return [
-
-       /**
-        * Special modules who have their own classes
-        */
-       'startup' => [ 'class' => ResourceLoaderStartUpModule::class ],
-
        // Scripts managed by the local wiki (stored in the MediaWiki namespace)
        'site' => [ 'class' => ResourceLoaderSiteModule::class ],
        'site.styles' => [ 'class' => ResourceLoaderSiteStylesModule::class ],
@@ -1446,7 +1440,7 @@ return [
        ],
        'mediawiki.action.history.styles' => [
                'skinStyles' => [
-                       'default' => 'resources/src/mediawiki.action/mediawiki.action.history.styles.css',
+                       'default' => 'resources/src/mediawiki.action/mediawiki.action.history.styles.less',
                ],
                'targets' => [ 'desktop', 'mobile' ],
        ],
diff --git a/resources/src/mediawiki.Title/.eslintrc.json b/resources/src/mediawiki.Title/.eslintrc.json
new file mode 100644 (file)
index 0000000..ad8dbb3
--- /dev/null
@@ -0,0 +1,5 @@
+{
+       "parserOptions": {
+               "sourceType": "module"
+       }
+}
index 78ae135..900dab2 100644 (file)
 /*!
  * @author Neil Kandalgaonkar, 2010
- * @author Timo Tijhof
  * @since 1.18
  */
 
-( function () {
-       /**
-        * Parse titles into an object structure. Note that when using the constructor
-        * directly, passing invalid titles will result in an exception. Use #newFromText to use the
-        * logic directly and get null for invalid titles which is easier to work with.
-        *
-        * Note that in the constructor and #newFromText method, `namespace` is the **default** namespace
-        * only, and can be overridden by a namespace prefix in `title`. If you do not want this behavior,
-        * use #makeTitle. Compare:
-        *
-        *     new mw.Title( 'Foo', NS_TEMPLATE ).getPrefixedText();                  // => 'Template:Foo'
-        *     mw.Title.newFromText( 'Foo', NS_TEMPLATE ).getPrefixedText();          // => 'Template:Foo'
-        *     mw.Title.makeTitle( NS_TEMPLATE, 'Foo' ).getPrefixedText();            // => 'Template:Foo'
-        *
-        *     new mw.Title( 'Category:Foo', NS_TEMPLATE ).getPrefixedText();         // => 'Category:Foo'
-        *     mw.Title.newFromText( 'Category:Foo', NS_TEMPLATE ).getPrefixedText(); // => 'Category:Foo'
-        *     mw.Title.makeTitle( NS_TEMPLATE, 'Category:Foo' ).getPrefixedText();   // => 'Template:Category:Foo'
-        *
-        *     new mw.Title( 'Template:Foo', NS_TEMPLATE ).getPrefixedText();         // => 'Template:Foo'
-        *     mw.Title.newFromText( 'Template:Foo', NS_TEMPLATE ).getPrefixedText(); // => 'Template:Foo'
-        *     mw.Title.makeTitle( NS_TEMPLATE, 'Template:Foo' ).getPrefixedText();   // => 'Template:Template:Foo'
-        *
-        * @class mw.Title
-        */
-
-       /* Private members */
-
-       var
-               mwString = require( 'mediawiki.String' ),
-
-               toUpperMapping = require( './phpCharToUpper.json' ),
-
-               namespaceIds = mw.config.get( 'wgNamespaceIds' ),
-
-               /**
-                * @private
-                * @static
-                * @property NS_MAIN
-                */
-               NS_MAIN = namespaceIds[ '' ],
-
-               /**
-                * @private
-                * @static
-                * @property NS_TALK
-                */
-               NS_TALK = namespaceIds.talk,
-
-               /**
-                * @private
-                * @static
-                * @property NS_SPECIAL
-                */
-               NS_SPECIAL = namespaceIds.special,
-
-               /**
-                * @private
-                * @static
-                * @property NS_MEDIA
-                */
-               NS_MEDIA = namespaceIds.media,
-
-               /**
-                * @private
-                * @static
-                * @property NS_FILE
-                */
-               NS_FILE = namespaceIds.file,
-
-               /**
-                * @private
-                * @static
-                * @property FILENAME_MAX_BYTES
-                */
-               FILENAME_MAX_BYTES = 240,
-
-               /**
-                * @private
-                * @static
-                * @property TITLE_MAX_BYTES
-                */
-               TITLE_MAX_BYTES = 255,
-
-               /**
-                * Get the namespace id from a namespace name (either from the localized, canonical or alias
-                * name).
-                *
-                * Example: On a German wiki this would return 6 for any of 'File', 'Datei', 'Image' or
-                * even 'Bild'.
-                *
-                * @private
-                * @static
-                * @method getNsIdByName
-                * @param {string} ns Namespace name (case insensitive, leading/trailing space ignored)
-                * @return {number|boolean} Namespace id or boolean false
-                */
-               getNsIdByName = function ( ns ) {
-                       var id;
-
-                       // Don't cast non-strings to strings, because null or undefined should not result in
-                       // returning the id of a potential namespace called "Null:" (e.g. on null.example.org/wiki)
-                       // Also, toLowerCase throws exception on null/undefined, because it is a String method.
-                       if ( typeof ns !== 'string' ) {
-                               return false;
-                       }
-                       // TODO: Should just use local var namespaceIds here but it
-                       // breaks test which modify the config
-                       id = mw.config.get( 'wgNamespaceIds' )[ ns.toLowerCase() ];
-                       if ( id === undefined ) {
-                               return false;
-                       }
-                       return id;
-               },
-
-               /**
-                * @private
-                * @method getNamespacePrefix_
-                * @param {number} namespace
-                * @return {string}
-                */
-               getNamespacePrefix = function ( namespace ) {
-                       return namespace === NS_MAIN ?
-                               '' :
-                               ( mw.config.get( 'wgFormattedNamespaces' )[ namespace ].replace( / /g, '_' ) + ':' );
-               },
-
-               rUnderscoreTrim = /^_+|_+$/g,
-
-               rSplit = /^(.+?)_*:_*(.*)$/,
-
-               // See MediaWikiTitleCodec.php#getTitleInvalidRegex
-               rInvalid = new RegExp(
-                       '[^' + mw.config.get( 'wgLegalTitleChars' ) + ']' +
-                       // URL percent encoding sequences interfere with the ability
-                       // to round-trip titles -- you can't link to them consistently.
-                       '|%[0-9A-Fa-f]{2}' +
-                       // XML/HTML character references produce similar issues.
-                       '|&[A-Za-z0-9\u0080-\uFFFF]+;' +
-                       '|&#[0-9]+;' +
-                       '|&#x[0-9A-Fa-f]+;'
-               ),
-
-               // From MediaWikiTitleCodec::splitTitleString() in PHP
-               // Note that this is not equivalent to /\s/, e.g. underscore is included, tab is not included.
-               rWhitespace = /[ _\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/g,
-
-               // From MediaWikiTitleCodec::splitTitleString() in PHP
-               rUnicodeBidi = /[\u200E\u200F\u202A-\u202E]/g,
-
-               /**
-                * Slightly modified from Flinfo. Credit goes to Lupo and Flominator.
-                * @private
-                * @static
-                * @property sanitationRules
-                */
-               sanitationRules = [
-                       // "signature"
-                       {
-                               pattern: /~{3}/g,
-                               replace: '',
-                               generalRule: true
-                       },
-                       // control characters
-                       {
-                               // eslint-disable-next-line no-control-regex
-                               pattern: /[\x00-\x1f\x7f]/g,
-                               replace: '',
-                               generalRule: true
-                       },
-                       // URL encoding (possibly)
-                       {
-                               pattern: /%([0-9A-Fa-f]{2})/g,
-                               replace: '% $1',
-                               generalRule: true
-                       },
-                       // HTML-character-entities
-                       {
-                               pattern: /&(([A-Za-z0-9\x80-\xff]+|#[0-9]+|#x[0-9A-Fa-f]+);)/g,
-                               replace: '& $1',
-                               generalRule: true
-                       },
-                       // slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/])
-                       {
-                               pattern: new RegExp( '[' + mw.config.get( 'wgIllegalFileChars', '' ) + ']', 'g' ),
-                               replace: '-',
-                               fileRule: true
-                       },
-                       // brackets, greater than
-                       {
-                               pattern: /[}\]>]/g,
-                               replace: ')',
-                               generalRule: true
-                       },
-                       // brackets, lower than
-                       {
-                               pattern: /[{[<]/g,
-                               replace: '(',
-                               generalRule: true
-                       },
-                       // everything that wasn't covered yet
-                       {
-                               pattern: new RegExp( rInvalid.source, 'g' ),
-                               replace: '-',
-                               generalRule: true
-                       },
-                       // directory structures
-                       {
-                               pattern: /^(\.|\.\.|\.\/.*|\.\.\/.*|.*\/\.\/.*|.*\/\.\.\/.*|.*\/\.|.*\/\.\.)$/g,
-                               replace: '',
-                               generalRule: true
-                       }
-               ],
-
-               /**
-                * Internal helper for #constructor and #newFromText.
-                *
-                * Based on Title.php#secureAndSplit
-                *
-                * @private
-                * @static
-                * @method parse
-                * @param {string} title
-                * @param {number} [defaultNamespace=NS_MAIN]
-                * @return {Object|boolean}
-                */
-               parse = function ( title, defaultNamespace ) {
-                       var namespace, m, id, i, fragment, ext;
-
-                       namespace = defaultNamespace === undefined ? NS_MAIN : defaultNamespace;
-
-                       title = title
-                               // Strip Unicode bidi override characters
-                               .replace( rUnicodeBidi, '' )
-                               // Normalise whitespace to underscores and remove duplicates
-                               .replace( rWhitespace, '_' )
-                               // Trim underscores
-                               .replace( rUnderscoreTrim, '' );
-
-                       // Process initial colon
-                       if ( title !== '' && title[ 0 ] === ':' ) {
-                               // Initial colon means main namespace instead of specified default
-                               namespace = NS_MAIN;
-                               title = title
-                                       // Strip colon
-                                       .slice( 1 )
-                                       // Trim underscores
-                                       .replace( rUnderscoreTrim, '' );
-                       }
-
-                       if ( title === '' ) {
-                               return false;
-                       }
-
-                       // Process namespace prefix (if any)
-                       m = title.match( rSplit );
-                       if ( m ) {
-                               id = getNsIdByName( m[ 1 ] );
-                               if ( id !== false ) {
-                                       // Ordinary namespace
-                                       namespace = id;
-                                       title = m[ 2 ];
-
-                                       // For Talk:X pages, make sure X has no "namespace" prefix
-                                       if ( namespace === NS_TALK && ( m = title.match( rSplit ) ) ) {
-                                               // Disallow titles like Talk:File:x (subject should roundtrip: talk:file:x -> file:x -> file_talk:x)
-                                               if ( getNsIdByName( m[ 1 ] ) !== false ) {
-                                                       return false;
-                                               }
-                                       }
-                               }
-                       }
-
-                       // Process fragment
-                       i = title.indexOf( '#' );
-                       if ( i === -1 ) {
-                               fragment = null;
-                       } else {
-                               fragment = title
-                                       // Get segment starting after the hash
-                                       .slice( i + 1 )
-                                       // Convert to text
-                                       // NB: Must not be trimmed ("Example#_foo" is not the same as "Example#foo")
-                                       .replace( /_/g, ' ' );
-
-                               title = title
-                                       // Strip hash
-                                       .slice( 0, i )
-                                       // Trim underscores, again (strips "_" from "bar" in "Foo_bar_#quux")
-                                       .replace( rUnderscoreTrim, '' );
-                       }
-
-                       // Reject illegal characters
-                       if ( title.match( rInvalid ) ) {
-                               return false;
-                       }
-
-                       // Disallow titles that browsers or servers might resolve as directory navigation
-                       if (
-                               title.indexOf( '.' ) !== -1 && (
-                                       title === '.' || title === '..' ||
-                                       title.indexOf( './' ) === 0 ||
-                                       title.indexOf( '../' ) === 0 ||
-                                       title.indexOf( '/./' ) !== -1 ||
-                                       title.indexOf( '/../' ) !== -1 ||
-                                       title.slice( -2 ) === '/.' ||
-                                       title.slice( -3 ) === '/..'
-                               )
-                       ) {
-                               return false;
-                       }
-
-                       // Disallow magic tilde sequence
-                       if ( title.indexOf( '~~~' ) !== -1 ) {
-                               return false;
-                       }
-
-                       // Disallow titles exceeding the TITLE_MAX_BYTES byte size limit (size of underlying database field)
-                       // Except for special pages, e.g. [[Special:Block/Long name]]
-                       // Note: The PHP implementation also asserts that even in NS_SPECIAL, the title should
-                       // be less than 512 bytes.
-                       if ( namespace !== NS_SPECIAL && mwString.byteLength( title ) > TITLE_MAX_BYTES ) {
-                               return false;
-                       }
+/**
+ * Parse titles into an object structure. Note that when using the constructor
+ * directly, passing invalid titles will result in an exception. Use #newFromText to use the
+ * logic directly and get null for invalid titles which is easier to work with.
+ *
+ * Note that in the constructor and #newFromText method, `namespace` is the **default** namespace
+ * only, and can be overridden by a namespace prefix in `title`. If you do not want this behavior,
+ * use #makeTitle. Compare:
+ *
+ *     new mw.Title( 'Foo', NS_TEMPLATE ).getPrefixedText();                  // => 'Template:Foo'
+ *     mw.Title.newFromText( 'Foo', NS_TEMPLATE ).getPrefixedText();          // => 'Template:Foo'
+ *     mw.Title.makeTitle( NS_TEMPLATE, 'Foo' ).getPrefixedText();            // => 'Template:Foo'
+ *
+ *     new mw.Title( 'Category:Foo', NS_TEMPLATE ).getPrefixedText();         // => 'Category:Foo'
+ *     mw.Title.newFromText( 'Category:Foo', NS_TEMPLATE ).getPrefixedText(); // => 'Category:Foo'
+ *     mw.Title.makeTitle( NS_TEMPLATE, 'Category:Foo' ).getPrefixedText();   // => 'Template:Category:Foo'
+ *
+ *     new mw.Title( 'Template:Foo', NS_TEMPLATE ).getPrefixedText();         // => 'Template:Foo'
+ *     mw.Title.newFromText( 'Template:Foo', NS_TEMPLATE ).getPrefixedText(); // => 'Template:Foo'
+ *     mw.Title.makeTitle( NS_TEMPLATE, 'Template:Foo' ).getPrefixedText();   // => 'Template:Template:Foo'
+ *
+ * @class mw.Title
+ */
 
-                       // Can't make a link to a namespace alone.
-                       if ( title === '' && namespace !== NS_MAIN ) {
-                               return false;
-                       }
+/* Private members */
 
-                       // Any remaining initial :s are illegal.
-                       if ( title[ 0 ] === ':' ) {
-                               return false;
-                       }
+var
+       mwString = require( 'mediawiki.String' ),
 
-                       // For backwards-compatibility with old mw.Title, we separate the extension from the
-                       // rest of the title.
-                       i = title.lastIndexOf( '.' );
-                       if ( i === -1 || title.length <= i + 1 ) {
-                               // Extensions are the non-empty segment after the last dot
-                               ext = null;
-                       } else {
-                               ext = title.slice( i + 1 );
-                               title = title.slice( 0, i );
-                       }
+       toUpperMapping = require( './phpCharToUpper.json' ),
 
-                       return {
-                               namespace: namespace,
-                               title: title,
-                               ext: ext,
-                               fragment: fragment
-                       };
-               },
+       namespaceIds = mw.config.get( 'wgNamespaceIds' ),
 
-               /**
-                * Convert db-key to readable text.
-                *
-                * @private
-                * @static
-                * @method text
-                * @param {string} s
-                * @return {string}
-                */
-               text = function ( s ) {
-                       return s.replace( /_/g, ' ' );
-               },
+       /**
+        * @private
+        * @static
+        * @property NS_MAIN
+        */
+       NS_MAIN = namespaceIds[ '' ],
 
-               /**
-                * Sanitizes a string based on a rule set and a filter
-                *
-                * @private
-                * @static
-                * @method sanitize
-                * @param {string} s
-                * @param {Array} filter
-                * @return {string}
-                */
-               sanitize = function ( s, filter ) {
-                       var i, ruleLength, rule, m, filterLength,
-                               rules = sanitationRules;
-
-                       for ( i = 0, ruleLength = rules.length; i < ruleLength; ++i ) {
-                               rule = rules[ i ];
-                               for ( m = 0, filterLength = filter.length; m < filterLength; ++m ) {
-                                       if ( rule[ filter[ m ] ] ) {
-                                               s = s.replace( rule.pattern, rule.replace );
-                                       }
-                               }
-                       }
-                       return s;
-               },
+       /**
+        * @private
+        * @static
+        * @property NS_TALK
+        */
+       NS_TALK = namespaceIds.talk,
 
-               /**
-                * Cuts a string to a specific byte length, assuming UTF-8
-                * or less, if the last character is a multi-byte one
-                *
-                * @private
-                * @static
-                * @method trimToByteLength
-                * @param {string} s
-                * @param {number} length
-                * @return {string}
-                */
-               trimToByteLength = function ( s, length ) {
-                       return mwString.trimByteLength( '', s, length ).newVal;
-               },
+       /**
+        * @private
+        * @static
+        * @property NS_SPECIAL
+        */
+       NS_SPECIAL = namespaceIds.special,
 
-               /**
-                * Cuts a file name to a specific byte length
-                *
-                * @private
-                * @static
-                * @method trimFileNameToByteLength
-                * @param {string} name without extension
-                * @param {string} extension file extension
-                * @return {string} The full name, including extension
-                */
-               trimFileNameToByteLength = function ( name, extension ) {
-                       // There is a special byte limit for file names and ... remember the dot
-                       return trimToByteLength( name, FILENAME_MAX_BYTES - extension.length - 1 ) + '.' + extension;
-               };
+       /**
+        * @private
+        * @static
+        * @property NS_MEDIA
+        */
+       NS_MEDIA = namespaceIds.media,
 
        /**
-        * @method constructor
-        * @param {string} title Title of the page. If no second argument given,
-        *  this will be searched for a namespace
-        * @param {number} [namespace=NS_MAIN] If given, will used as default namespace for the given title
-        * @throws {Error} When the title is invalid
+        * @private
+        * @static
+        * @property NS_FILE
         */
-       function Title( title, namespace ) {
-               var parsed = parse( title, namespace );
-               if ( !parsed ) {
-                       throw new Error( 'Unable to parse title' );
-               }
+       NS_FILE = namespaceIds.file,
 
-               this.namespace = parsed.namespace;
-               this.title = parsed.title;
-               this.ext = parsed.ext;
-               this.fragment = parsed.fragment;
-       }
+       /**
+        * @private
+        * @static
+        * @property FILENAME_MAX_BYTES
+        */
+       FILENAME_MAX_BYTES = 240,
 
-       /* Static members */
+       /**
+        * @private
+        * @static
+        * @property TITLE_MAX_BYTES
+        */
+       TITLE_MAX_BYTES = 255,
 
        /**
-        * Constructor for Title objects with a null return instead of an exception for invalid titles.
+        * Get the namespace id from a namespace name (either from the localized, canonical or alias
+        * name).
         *
-        * Note that `namespace` is the **default** namespace only, and can be overridden by a namespace
-        * prefix in `title`. If you do not want this behavior, use #makeTitle. See #constructor for
-        * details.
+        * Example: On a German wiki this would return 6 for any of 'File', 'Datei', 'Image' or
+        * even 'Bild'.
         *
+        * @private
         * @static
-        * @param {string} title
-        * @param {number} [namespace=NS_MAIN] Default namespace
-        * @return {mw.Title|null} A valid Title object or null if the title is invalid
+        * @method getNsIdByName
+        * @param {string} ns Namespace name (case insensitive, leading/trailing space ignored)
+        * @return {number|boolean} Namespace id or boolean false
         */
-       Title.newFromText = function ( title, namespace ) {
-               var t, parsed = parse( title, namespace );
-               if ( !parsed ) {
-                       return null;
+       getNsIdByName = function ( ns ) {
+               var id;
+
+               // Don't cast non-strings to strings, because null or undefined should not result in
+               // returning the id of a potential namespace called "Null:" (e.g. on null.example.org/wiki)
+               // Also, toLowerCase throws exception on null/undefined, because it is a String method.
+               if ( typeof ns !== 'string' ) {
+                       return false;
                }
+               // TODO: Should just use local var namespaceIds here but it
+               // breaks test which modify the config
+               id = mw.config.get( 'wgNamespaceIds' )[ ns.toLowerCase() ];
+               if ( id === undefined ) {
+                       return false;
+               }
+               return id;
+       },
 
-               t = Object.create( Title.prototype );
-               t.namespace = parsed.namespace;
-               t.title = parsed.title;
-               t.ext = parsed.ext;
-               t.fragment = parsed.fragment;
-
-               return t;
-       };
+       /**
+        * @private
+        * @method getNamespacePrefix_
+        * @param {number} namespace
+        * @return {string}
+        */
+       getNamespacePrefix = function ( namespace ) {
+               return namespace === NS_MAIN ?
+                       '' :
+                       ( mw.config.get( 'wgFormattedNamespaces' )[ namespace ].replace( / /g, '_' ) + ':' );
+       },
+
+       rUnderscoreTrim = /^_+|_+$/g,
+
+       rSplit = /^(.+?)_*:_*(.*)$/,
+
+       // See MediaWikiTitleCodec.php#getTitleInvalidRegex
+       rInvalid = new RegExp(
+               '[^' + mw.config.get( 'wgLegalTitleChars' ) + ']' +
+               // URL percent encoding sequences interfere with the ability
+               // to round-trip titles -- you can't link to them consistently.
+               '|%[0-9A-Fa-f]{2}' +
+               // XML/HTML character references produce similar issues.
+               '|&[A-Za-z0-9\u0080-\uFFFF]+;' +
+               '|&#[0-9]+;' +
+               '|&#x[0-9A-Fa-f]+;'
+       ),
+
+       // From MediaWikiTitleCodec::splitTitleString() in PHP
+       // Note that this is not equivalent to /\s/, e.g. underscore is included, tab is not included.
+       rWhitespace = /[ _\u00A0\u1680\u180E\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]+/g,
+
+       // From MediaWikiTitleCodec::splitTitleString() in PHP
+       rUnicodeBidi = /[\u200E\u200F\u202A-\u202E]/g,
 
        /**
-        * Constructor for Title objects with predefined namespace.
-        *
-        * Unlike #newFromText or #constructor, this function doesn't allow the given `namespace` to be
-        * overridden by a namespace prefix in `title`. See #constructor for details about this behavior.
-        *
-        * The single exception to this is when `namespace` is 0, indicating the main namespace. The
-        * function behaves like #newFromText in that case.
-        *
+        * Slightly modified from Flinfo. Credit goes to Lupo and Flominator.
+        * @private
         * @static
-        * @param {number} namespace Namespace to use for the title
-        * @param {string} title
-        * @return {mw.Title|null} A valid Title object or null if the title is invalid
+        * @property sanitationRules
         */
-       Title.makeTitle = function ( namespace, title ) {
-               return mw.Title.newFromText( getNamespacePrefix( namespace ) + title );
-       };
+       sanitationRules = [
+               // "signature"
+               {
+                       pattern: /~{3}/g,
+                       replace: '',
+                       generalRule: true
+               },
+               // control characters
+               {
+                       // eslint-disable-next-line no-control-regex
+                       pattern: /[\x00-\x1f\x7f]/g,
+                       replace: '',
+                       generalRule: true
+               },
+               // URL encoding (possibly)
+               {
+                       pattern: /%([0-9A-Fa-f]{2})/g,
+                       replace: '% $1',
+                       generalRule: true
+               },
+               // HTML-character-entities
+               {
+                       pattern: /&(([A-Za-z0-9\x80-\xff]+|#[0-9]+|#x[0-9A-Fa-f]+);)/g,
+                       replace: '& $1',
+                       generalRule: true
+               },
+               // slash, colon (not supported by file systems like NTFS/Windows, Mac OS 9 [:], ext4 [/])
+               {
+                       pattern: new RegExp( '[' + mw.config.get( 'wgIllegalFileChars', '' ) + ']', 'g' ),
+                       replace: '-',
+                       fileRule: true
+               },
+               // brackets, greater than
+               {
+                       pattern: /[}\]>]/g,
+                       replace: ')',
+                       generalRule: true
+               },
+               // brackets, lower than
+               {
+                       pattern: /[{[<]/g,
+                       replace: '(',
+                       generalRule: true
+               },
+               // everything that wasn't covered yet
+               {
+                       pattern: new RegExp( rInvalid.source, 'g' ),
+                       replace: '-',
+                       generalRule: true
+               },
+               // directory structures
+               {
+                       pattern: /^(\.|\.\.|\.\/.*|\.\.\/.*|.*\/\.\/.*|.*\/\.\.\/.*|.*\/\.|.*\/\.\.)$/g,
+                       replace: '',
+                       generalRule: true
+               }
+       ],
 
        /**
-        * Constructor for Title objects from user input altering that input to
-        * produce a title that MediaWiki will accept as legal
+        * Internal helper for #constructor and #newFromText.
+        *
+        * Based on Title.php#secureAndSplit
         *
+        * @private
         * @static
+        * @method parse
         * @param {string} title
-        * @param {number|Object} [defaultNamespaceOrOptions=NS_MAIN]
-        *  If given, will used as default namespace for the given title.
-        *  This method can also be called with two arguments, in which case
-        *  this becomes options (see below).
-        * @param {Object} [options] additional options
-        * @param {boolean} [options.forUploading=true]
-        *  Makes sure that a file is uploadable under the title returned.
-        *  There are pages in the file namespace under which file upload is impossible.
-        *  Automatically assumed if the title is created in the Media namespace.
-        * @return {mw.Title|null} A valid Title object or null if the input cannot be turned into a valid title
+        * @param {number} [defaultNamespace=NS_MAIN]
+        * @return {Object|boolean}
         */
-       Title.newFromUserInput = function ( title, defaultNamespaceOrOptions, options ) {
-               var namespace, m, id, ext, parts,
-                       defaultNamespace;
-
-               // defaultNamespace is optional; check whether options moves up
-               if ( arguments.length < 3 && typeof defaultNamespace === 'object' ) {
-                       options = defaultNamespaceOrOptions;
-               } else {
-                       defaultNamespace = defaultNamespaceOrOptions;
-               }
-
-               // merge options into defaults
-               options = $.extend( {
-                       forUploading: true
-               }, options );
+       parse = function ( title, defaultNamespace ) {
+               var namespace, m, id, i, fragment, ext;
 
                namespace = defaultNamespace === undefined ? NS_MAIN : defaultNamespace;
 
-               // Normalise additional whitespace
-               title = title.replace( /\s/g, ' ' ).trim();
+               title = title
+                       // Strip Unicode bidi override characters
+                       .replace( rUnicodeBidi, '' )
+                       // Normalise whitespace to underscores and remove duplicates
+                       .replace( rWhitespace, '_' )
+                       // Trim underscores
+                       .replace( rUnderscoreTrim, '' );
 
                // Process initial colon
                if ( title !== '' && title[ 0 ] === ':' ) {
                        namespace = NS_MAIN;
                        title = title
                                // Strip colon
-                               .substr( 1 )
+                               .slice( 1 )
                                // Trim underscores
                                .replace( rUnderscoreTrim, '' );
                }
 
+               if ( title === '' ) {
+                       return false;
+               }
+
                // Process namespace prefix (if any)
                m = title.match( rSplit );
                if ( m ) {
                                // Ordinary namespace
                                namespace = id;
                                title = m[ 2 ];
+
+                               // For Talk:X pages, make sure X has no "namespace" prefix
+                               if ( namespace === NS_TALK && ( m = title.match( rSplit ) ) ) {
+                                       // Disallow titles like Talk:File:x (subject should roundtrip: talk:file:x -> file:x -> file_talk:x)
+                                       if ( getNsIdByName( m[ 1 ] ) !== false ) {
+                                               return false;
+                                       }
+                               }
                        }
                }
 
-               if (
-                       namespace === NS_MEDIA ||
-                       ( options.forUploading && ( namespace === NS_FILE ) )
-               ) {
-
-                       title = sanitize( title, [ 'generalRule', 'fileRule' ] );
+               // Process fragment
+               i = title.indexOf( '#' );
+               if ( i === -1 ) {
+                       fragment = null;
+               } else {
+                       fragment = title
+                               // Get segment starting after the hash
+                               .slice( i + 1 )
+                               // Convert to text
+                               // NB: Must not be trimmed ("Example#_foo" is not the same as "Example#foo")
+                               .replace( /_/g, ' ' );
 
-                       // Operate on the file extension
-                       // Although it is possible having spaces between the name and the ".ext" this isn't nice for
-                       // operating systems hiding file extensions -> strip them later on
-                       parts = title.split( '.' );
+                       title = title
+                               // Strip hash
+                               .slice( 0, i )
+                               // Trim underscores, again (strips "_" from "bar" in "Foo_bar_#quux")
+                               .replace( rUnderscoreTrim, '' );
+               }
 
-                       if ( parts.length > 1 ) {
+               // Reject illegal characters
+               if ( title.match( rInvalid ) ) {
+                       return false;
+               }
 
-                               // Get the last part, which is supposed to be the file extension
-                               ext = parts.pop();
+               // Disallow titles that browsers or servers might resolve as directory navigation
+               if (
+                       title.indexOf( '.' ) !== -1 && (
+                               title === '.' || title === '..' ||
+                               title.indexOf( './' ) === 0 ||
+                               title.indexOf( '../' ) === 0 ||
+                               title.indexOf( '/./' ) !== -1 ||
+                               title.indexOf( '/../' ) !== -1 ||
+                               title.slice( -2 ) === '/.' ||
+                               title.slice( -3 ) === '/..'
+                       )
+               ) {
+                       return false;
+               }
 
-                               // Remove whitespace of the name part (that W/O extension)
-                               title = parts.join( '.' ).trim();
+               // Disallow magic tilde sequence
+               if ( title.indexOf( '~~~' ) !== -1 ) {
+                       return false;
+               }
 
-                               // Cut, if too long and append file extension
-                               title = trimFileNameToByteLength( title, ext );
+               // Disallow titles exceeding the TITLE_MAX_BYTES byte size limit (size of underlying database field)
+               // Except for special pages, e.g. [[Special:Block/Long name]]
+               // Note: The PHP implementation also asserts that even in NS_SPECIAL, the title should
+               // be less than 512 bytes.
+               if ( namespace !== NS_SPECIAL && mwString.byteLength( title ) > TITLE_MAX_BYTES ) {
+                       return false;
+               }
 
-                       } else {
+               // Can't make a link to a namespace alone.
+               if ( title === '' && namespace !== NS_MAIN ) {
+                       return false;
+               }
 
-                               // Missing file extension
-                               title = parts.join( '.' ).trim();
+               // Any remaining initial :s are illegal.
+               if ( title[ 0 ] === ':' ) {
+                       return false;
+               }
 
-                               // Name has no file extension and a fallback wasn't provided either
-                               return null;
-                       }
+               // For backwards-compatibility with old mw.Title, we separate the extension from the
+               // rest of the title.
+               i = title.lastIndexOf( '.' );
+               if ( i === -1 || title.length <= i + 1 ) {
+                       // Extensions are the non-empty segment after the last dot
+                       ext = null;
                } else {
-
-                       title = sanitize( title, [ 'generalRule' ] );
-
-                       // Cut titles exceeding the TITLE_MAX_BYTES byte size limit
-                       // (size of underlying database field)
-                       if ( namespace !== NS_SPECIAL ) {
-                               title = trimToByteLength( title, TITLE_MAX_BYTES );
-                       }
+                       ext = title.slice( i + 1 );
+                       title = title.slice( 0, i );
                }
 
-               // Any remaining initial :s are illegal.
-               title = title.replace( /^:+/, '' );
-
-               return Title.newFromText( title, namespace );
-       };
+               return {
+                       namespace: namespace,
+                       title: title,
+                       ext: ext,
+                       fragment: fragment
+               };
+       },
 
        /**
-        * Sanitizes a file name as supplied by the user, originating in the user's file system
-        * so it is most likely a valid MediaWiki title and file name after processing.
-        * Returns null on fatal errors.
+        * Convert db-key to readable text.
         *
+        * @private
         * @static
-        * @param {string} uncleanName The unclean file name including file extension but
-        *   without namespace
-        * @return {mw.Title|null} A valid Title object or null if the title is invalid
+        * @method text
+        * @param {string} s
+        * @return {string}
         */
-       Title.newFromFileName = function ( uncleanName ) {
+       text = function ( s ) {
+               return s.replace( /_/g, ' ' );
+       },
 
-               return Title.newFromUserInput( 'File:' + uncleanName, {
-                       forUploading: true
-               } );
-       };
+       /**
+        * Sanitizes a string based on a rule set and a filter
+        *
+        * @private
+        * @static
+        * @method sanitize
+        * @param {string} s
+        * @param {Array} filter
+        * @return {string}
+        */
+       sanitize = function ( s, filter ) {
+               var i, ruleLength, rule, m, filterLength,
+                       rules = sanitationRules;
+
+               for ( i = 0, ruleLength = rules.length; i < ruleLength; ++i ) {
+                       rule = rules[ i ];
+                       for ( m = 0, filterLength = filter.length; m < filterLength; ++m ) {
+                               if ( rule[ filter[ m ] ] ) {
+                                       s = s.replace( rule.pattern, rule.replace );
+                               }
+                       }
+               }
+               return s;
+       },
 
        /**
-        * Get the file title from an image element
+        * Cuts a string to a specific byte length, assuming UTF-8
+        * or less, if the last character is a multi-byte one
         *
-        *     var title = mw.Title.newFromImg( $( 'img:first' ) );
+        * @private
+        * @static
+        * @method trimToByteLength
+        * @param {string} s
+        * @param {number} length
+        * @return {string}
+        */
+       trimToByteLength = function ( s, length ) {
+               return mwString.trimByteLength( '', s, length ).newVal;
+       },
+
+       /**
+        * Cuts a file name to a specific byte length
         *
+        * @private
         * @static
-        * @param {HTMLElement|jQuery} img The image to use as a base
-        * @return {mw.Title|null} The file title or null if unsuccessful
+        * @method trimFileNameToByteLength
+        * @param {string} name without extension
+        * @param {string} extension file extension
+        * @return {string} The full name, including extension
         */
-       Title.newFromImg = function ( img ) {
-               var matches, i, regex, src, decodedSrc,
+       trimFileNameToByteLength = function ( name, extension ) {
+               // There is a special byte limit for file names and ... remember the dot
+               return trimToByteLength( name, FILENAME_MAX_BYTES - extension.length - 1 ) + '.' + extension;
+       };
+
+/**
+ * @method constructor
+ * @param {string} title Title of the page. If no second argument given,
+ *  this will be searched for a namespace
+ * @param {number} [namespace=NS_MAIN] If given, will used as default namespace for the given title
+ * @throws {Error} When the title is invalid
+ */
+function Title( title, namespace ) {
+       var parsed = parse( title, namespace );
+       if ( !parsed ) {
+               throw new Error( 'Unable to parse title' );
+       }
 
-                       // thumb.php-generated thumbnails
-                       thumbPhpRegex = /thumb\.php/,
-                       regexes = [
-                               // Thumbnails
-                               /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)\/[^\s/]+-[^\s/]*$/,
+       this.namespace = parsed.namespace;
+       this.title = parsed.title;
+       this.ext = parsed.ext;
+       this.fragment = parsed.fragment;
+}
+
+/* Static members */
+
+/**
+ * Constructor for Title objects with a null return instead of an exception for invalid titles.
+ *
+ * Note that `namespace` is the **default** namespace only, and can be overridden by a namespace
+ * prefix in `title`. If you do not want this behavior, use #makeTitle. See #constructor for
+ * details.
+ *
+ * @static
+ * @param {string} title
+ * @param {number} [namespace=NS_MAIN] Default namespace
+ * @return {mw.Title|null} A valid Title object or null if the title is invalid
+ */
+Title.newFromText = function ( title, namespace ) {
+       var t, parsed = parse( title, namespace );
+       if ( !parsed ) {
+               return null;
+       }
+
+       t = Object.create( Title.prototype );
+       t.namespace = parsed.namespace;
+       t.title = parsed.title;
+       t.ext = parsed.ext;
+       t.fragment = parsed.fragment;
+
+       return t;
+};
+
+/**
+ * Constructor for Title objects with predefined namespace.
+ *
+ * Unlike #newFromText or #constructor, this function doesn't allow the given `namespace` to be
+ * overridden by a namespace prefix in `title`. See #constructor for details about this behavior.
+ *
+ * The single exception to this is when `namespace` is 0, indicating the main namespace. The
+ * function behaves like #newFromText in that case.
+ *
+ * @static
+ * @param {number} namespace Namespace to use for the title
+ * @param {string} title
+ * @return {mw.Title|null} A valid Title object or null if the title is invalid
+ */
+Title.makeTitle = function ( namespace, title ) {
+       return mw.Title.newFromText( getNamespacePrefix( namespace ) + title );
+};
+
+/**
+ * Constructor for Title objects from user input altering that input to
+ * produce a title that MediaWiki will accept as legal
+ *
+ * @static
+ * @param {string} title
+ * @param {number|Object} [defaultNamespaceOrOptions=NS_MAIN]
+ *  If given, will used as default namespace for the given title.
+ *  This method can also be called with two arguments, in which case
+ *  this becomes options (see below).
+ * @param {Object} [options] additional options
+ * @param {boolean} [options.forUploading=true]
+ *  Makes sure that a file is uploadable under the title returned.
+ *  There are pages in the file namespace under which file upload is impossible.
+ *  Automatically assumed if the title is created in the Media namespace.
+ * @return {mw.Title|null} A valid Title object or null if the input cannot be turned into a valid title
+ */
+Title.newFromUserInput = function ( title, defaultNamespaceOrOptions, options ) {
+       var namespace, m, id, ext, parts,
+               defaultNamespace;
+
+       // defaultNamespace is optional; check whether options moves up
+       if ( arguments.length < 3 && typeof defaultNamespace === 'object' ) {
+               options = defaultNamespaceOrOptions;
+       } else {
+               defaultNamespace = defaultNamespaceOrOptions;
+       }
+
+       // merge options into defaults
+       options = $.extend( {
+               forUploading: true
+       }, options );
+
+       namespace = defaultNamespace === undefined ? NS_MAIN : defaultNamespace;
+
+       // Normalise additional whitespace
+       title = title.replace( /\s/g, ' ' ).trim();
+
+       // Process initial colon
+       if ( title !== '' && title[ 0 ] === ':' ) {
+               // Initial colon means main namespace instead of specified default
+               namespace = NS_MAIN;
+               title = title
+                       // Strip colon
+                       .substr( 1 )
+                       // Trim underscores
+                       .replace( rUnderscoreTrim, '' );
+       }
+
+       // Process namespace prefix (if any)
+       m = title.match( rSplit );
+       if ( m ) {
+               id = getNsIdByName( m[ 1 ] );
+               if ( id !== false ) {
+                       // Ordinary namespace
+                       namespace = id;
+                       title = m[ 2 ];
+               }
+       }
 
-                               // Full size images
-                               /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)$/,
+       if (
+               namespace === NS_MEDIA ||
+               ( options.forUploading && ( namespace === NS_FILE ) )
+       ) {
 
-                               // Thumbnails in non-hashed upload directories
-                               /\/([^\s/]+)\/[^\s/]+-(?:\1|thumbnail)[^\s/]*$/,
+               title = sanitize( title, [ 'generalRule', 'fileRule' ] );
 
-                               // Full-size images in non-hashed upload directories
-                               /\/([^\s/]+)$/
-                       ],
+               // Operate on the file extension
+               // Although it is possible having spaces between the name and the ".ext" this isn't nice for
+               // operating systems hiding file extensions -> strip them later on
+               parts = title.split( '.' );
 
-                       recount = regexes.length;
+               if ( parts.length > 1 ) {
 
-               src = img.jquery ? img[ 0 ].src : img.src;
+                       // Get the last part, which is supposed to be the file extension
+                       ext = parts.pop();
 
-               matches = src.match( thumbPhpRegex );
+                       // Remove whitespace of the name part (that W/O extension)
+                       title = parts.join( '.' ).trim();
 
-               if ( matches ) {
-                       return mw.Title.newFromText( 'File:' + mw.util.getParamValue( 'f', src ) );
+                       // Cut, if too long and append file extension
+                       title = trimFileNameToByteLength( title, ext );
+
+               } else {
+
+                       // Missing file extension
+                       title = parts.join( '.' ).trim();
+
+                       // Name has no file extension and a fallback wasn't provided either
+                       return null;
                }
+       } else {
 
-               decodedSrc = decodeURIComponent( src );
+               title = sanitize( title, [ 'generalRule' ] );
 
-               for ( i = 0; i < recount; i++ ) {
-                       regex = regexes[ i ];
-                       matches = decodedSrc.match( regex );
+               // Cut titles exceeding the TITLE_MAX_BYTES byte size limit
+               // (size of underlying database field)
+               if ( namespace !== NS_SPECIAL ) {
+                       title = trimToByteLength( title, TITLE_MAX_BYTES );
+               }
+       }
 
-                       if ( matches && matches[ 1 ] ) {
-                               return mw.Title.newFromText( 'File:' + matches[ 1 ] );
-                       }
+       // Any remaining initial :s are illegal.
+       title = title.replace( /^:+/, '' );
+
+       return Title.newFromText( title, namespace );
+};
+
+/**
+ * Sanitizes a file name as supplied by the user, originating in the user's file system
+ * so it is most likely a valid MediaWiki title and file name after processing.
+ * Returns null on fatal errors.
+ *
+ * @static
+ * @param {string} uncleanName The unclean file name including file extension but
+ *   without namespace
+ * @return {mw.Title|null} A valid Title object or null if the title is invalid
+ */
+Title.newFromFileName = function ( uncleanName ) {
+
+       return Title.newFromUserInput( 'File:' + uncleanName, {
+               forUploading: true
+       } );
+};
+
+/**
+ * Get the file title from an image element
+ *
+ *     var title = mw.Title.newFromImg( $( 'img:first' ) );
+ *
+ * @static
+ * @param {HTMLElement|jQuery} img The image to use as a base
+ * @return {mw.Title|null} The file title or null if unsuccessful
+ */
+Title.newFromImg = function ( img ) {
+       var matches, i, regex, src, decodedSrc,
+
+               // thumb.php-generated thumbnails
+               thumbPhpRegex = /thumb\.php/,
+               regexes = [
+                       // Thumbnails
+                       /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)\/[^\s/]+-[^\s/]*$/,
+
+                       // Full size images
+                       /\/[a-f0-9]\/[a-f0-9]{2}\/([^\s/]+)$/,
+
+                       // Thumbnails in non-hashed upload directories
+                       /\/([^\s/]+)\/[^\s/]+-(?:\1|thumbnail)[^\s/]*$/,
+
+                       // Full-size images in non-hashed upload directories
+                       /\/([^\s/]+)$/
+               ],
+
+               recount = regexes.length;
+
+       src = img.jquery ? img[ 0 ].src : img.src;
+
+       matches = src.match( thumbPhpRegex );
+
+       if ( matches ) {
+               return mw.Title.newFromText( 'File:' + mw.util.getParamValue( 'f', src ) );
+       }
+
+       decodedSrc = decodeURIComponent( src );
+
+       for ( i = 0; i < recount; i++ ) {
+               regex = regexes[ i ];
+               matches = decodedSrc.match( regex );
+
+               if ( matches && matches[ 1 ] ) {
+                       return mw.Title.newFromText( 'File:' + matches[ 1 ] );
                }
+       }
+
+       return null;
+};
+
+/**
+ * Check if a given namespace is a talk namespace
+ *
+ * See MWNamespace::isTalk in PHP
+ *
+ * @param {number} namespaceId Namespace ID
+ * @return {boolean} Namespace is a talk namespace
+ */
+Title.isTalkNamespace = function ( namespaceId ) {
+       return !!( namespaceId > NS_MAIN && namespaceId % 2 );
+};
+
+/**
+ * Check if signature buttons should be shown in a given namespace
+ *
+ * See MWNamespace::wantSignatures in PHP
+ *
+ * @param {number} namespaceId Namespace ID
+ * @return {boolean} Namespace is a signature namespace
+ */
+Title.wantSignaturesNamespace = function ( namespaceId ) {
+       return Title.isTalkNamespace( namespaceId ) ||
+               mw.config.get( 'wgExtraSignatureNamespaces' ).indexOf( namespaceId ) !== -1;
+};
+
+/**
+ * Whether this title exists on the wiki.
+ *
+ * @static
+ * @param {string|mw.Title} title prefixed db-key name (string) or instance of Title
+ * @return {boolean|null} Boolean if the information is available, otherwise null
+ * @throws {Error} If title is not a string or mw.Title
+ */
+Title.exists = function ( title ) {
+       var match,
+               obj = Title.exist.pages;
+
+       if ( typeof title === 'string' ) {
+               match = obj[ title ];
+       } else if ( title instanceof Title ) {
+               match = obj[ title.toString() ];
+       } else {
+               throw new Error( 'mw.Title.exists: title must be a string or an instance of Title' );
+       }
 
+       if ( typeof match !== 'boolean' ) {
                return null;
-       };
+       }
+
+       return match;
+};
+
+/**
+ * Store page existence
+ *
+ * @static
+ * @property {Object} exist
+ * @property {Object} exist.pages Keyed by title. Boolean true value indicates page does exist.
+ *
+ * @property {Function} exist.set The setter function.
+ *
+ *  Example to declare existing titles:
+ *
+ *     Title.exist.set( ['User:John_Doe', ...] );
+ *
+ *  Example to declare titles nonexistent:
+ *
+ *     Title.exist.set( ['File:Foo_bar.jpg', ...], false );
+ *
+ * @property {string|Array} exist.set.titles Title(s) in strict prefixedDb title form
+ * @property {boolean} [exist.set.state=true] State of the given titles
+ * @return {boolean}
+ */
+Title.exist = {
+       pages: {},
+
+       set: function ( titles, state ) {
+               var i, len,
+                       pages = this.pages;
+
+               titles = Array.isArray( titles ) ? titles : [ titles ];
+               state = state === undefined ? true : !!state;
+
+               for ( i = 0, len = titles.length; i < len; i++ ) {
+                       pages[ titles[ i ] ] = state;
+               }
+               return true;
+       }
+};
+
+/**
+ * Normalize a file extension to the common form, making it lowercase and checking some synonyms,
+ * and ensure it's clean. Extensions with non-alphanumeric characters will be discarded.
+ * Keep in sync with File::normalizeExtension() in PHP.
+ *
+ * @param {string} extension File extension (without the leading dot)
+ * @return {string} File extension in canonical form
+ */
+Title.normalizeExtension = function ( extension ) {
+       var
+               lower = extension.toLowerCase(),
+               squish = {
+                       htm: 'html',
+                       jpeg: 'jpg',
+                       mpeg: 'mpg',
+                       tiff: 'tif',
+                       ogv: 'ogg'
+               };
+       if ( Object.prototype.hasOwnProperty.call( squish, lower ) ) {
+               return squish[ lower ];
+       } else if ( /^[0-9a-z]+$/.test( lower ) ) {
+               return lower;
+       } else {
+               return '';
+       }
+};
+
+/**
+ * PHP's strtoupper differs from String.toUpperCase in a number of cases (T147646).
+ *
+ * @param {string} chr Unicode character
+ * @return {string} Unicode character, in upper case, according to the same rules as in PHP
+ */
+Title.phpCharToUpper = function ( chr ) {
+       var mapped = toUpperMapping[ chr ];
+       return mapped || chr.toUpperCase();
+};
+
+/* Public members */
+
+Title.prototype = {
+       constructor: Title,
 
        /**
-        * Check if a given namespace is a talk namespace
+        * Get the namespace number
         *
-        * See MWNamespace::isTalk in PHP
+        * Example: 6 for "File:Example_image.svg".
         *
-        * @param {number} namespaceId Namespace ID
-        * @return {boolean} Namespace is a talk namespace
+        * @return {number}
         */
-       Title.isTalkNamespace = function ( namespaceId ) {
-               return !!( namespaceId > NS_MAIN && namespaceId % 2 );
-       };
+       getNamespaceId: function () {
+               return this.namespace;
+       },
 
        /**
-        * Check if signature buttons should be shown in a given namespace
+        * Get the namespace prefix (in the content language)
         *
-        * See MWNamespace::wantSignatures in PHP
+        * Example: "File:" for "File:Example_image.svg".
+        * In #NS_MAIN this is '', otherwise namespace name plus ':'
         *
-        * @param {number} namespaceId Namespace ID
-        * @return {boolean} Namespace is a signature namespace
+        * @return {string}
         */
-       Title.wantSignaturesNamespace = function ( namespaceId ) {
-               return Title.isTalkNamespace( namespaceId ) ||
-                       mw.config.get( 'wgExtraSignatureNamespaces' ).indexOf( namespaceId ) !== -1;
-       };
+       getNamespacePrefix: function () {
+               return getNamespacePrefix( this.namespace );
+       },
 
        /**
-        * Whether this title exists on the wiki.
+        * Get the page name without extension or namespace prefix
         *
-        * @static
-        * @param {string|mw.Title} title prefixed db-key name (string) or instance of Title
-        * @return {boolean|null} Boolean if the information is available, otherwise null
-        * @throws {Error} If title is not a string or mw.Title
+        * Example: "Example_image" for "File:Example_image.svg".
+        *
+        * For the page title (full page name without namespace prefix), see #getMain.
+        *
+        * @return {string}
         */
-       Title.exists = function ( title ) {
-               var match,
-                       obj = Title.exist.pages;
-
-               if ( typeof title === 'string' ) {
-                       match = obj[ title ];
-               } else if ( title instanceof Title ) {
-                       match = obj[ title.toString() ];
-               } else {
-                       throw new Error( 'mw.Title.exists: title must be a string or an instance of Title' );
-               }
-
-               if ( typeof match !== 'boolean' ) {
-                       return null;
+       getName: function () {
+               if (
+                       mw.config.get( 'wgCaseSensitiveNamespaces' ).indexOf( this.namespace ) !== -1 ||
+                       !this.title.length
+               ) {
+                       return this.title;
                }
-
-               return match;
-       };
+               return mw.Title.phpCharToUpper( this.title[ 0 ] ) + this.title.slice( 1 );
+       },
 
        /**
-        * Store page existence
+        * Get the page name (transformed by #text)
         *
-        * @static
-        * @property {Object} exist
-        * @property {Object} exist.pages Keyed by title. Boolean true value indicates page does exist.
+        * Example: "Example image" for "File:Example_image.svg".
         *
-        * @property {Function} exist.set The setter function.
+        * For the page title (full page name without namespace prefix), see #getMainText.
         *
-        *  Example to declare existing titles:
+        * @return {string}
+        */
+       getNameText: function () {
+               return text( this.getName() );
+       },
+
+       /**
+        * Get the extension of the page name (if any)
         *
-        *     Title.exist.set( ['User:John_Doe', ...] );
+        * @return {string|null} Name extension or null if there is none
+        */
+       getExtension: function () {
+               return this.ext;
+       },
+
+       /**
+        * Shortcut for appendable string to form the main page name.
         *
-        *  Example to declare titles nonexistent:
+        * Returns a string like ".json", or "" if no extension.
         *
-        *     Title.exist.set( ['File:Foo_bar.jpg', ...], false );
+        * @return {string}
+        */
+       getDotExtension: function () {
+               return this.ext === null ? '' : '.' + this.ext;
+       },
+
+       /**
+        * Get the main page name
         *
-        * @property {string|Array} exist.set.titles Title(s) in strict prefixedDb title form
-        * @property {boolean} [exist.set.state=true] State of the given titles
-        * @return {boolean}
+        * Example: "Example_image.svg" for "File:Example_image.svg".
+        *
+        * @return {string}
         */
-       Title.exist = {
-               pages: {},
+       getMain: function () {
+               return this.getName() + this.getDotExtension();
+       },
 
-               set: function ( titles, state ) {
-                       var i, len,
-                               pages = this.pages;
+       /**
+        * Get the main page name (transformed by #text)
+        *
+        * Example: "Example image.svg" for "File:Example_image.svg".
+        *
+        * @return {string}
+        */
+       getMainText: function () {
+               return text( this.getMain() );
+       },
 
-                       titles = Array.isArray( titles ) ? titles : [ titles ];
-                       state = state === undefined ? true : !!state;
+       /**
+        * Get the full page name
+        *
+        * Example: "File:Example_image.svg".
+        * Most useful for API calls, anything that must identify the "title".
+        *
+        * @return {string}
+        */
+       getPrefixedDb: function () {
+               return this.getNamespacePrefix() + this.getMain();
+       },
 
-                       for ( i = 0, len = titles.length; i < len; i++ ) {
-                               pages[ titles[ i ] ] = state;
-                       }
-                       return true;
-               }
-       };
+       /**
+        * Get the full page name (transformed by #text)
+        *
+        * Example: "File:Example image.svg" for "File:Example_image.svg".
+        *
+        * @return {string}
+        */
+       getPrefixedText: function () {
+               return text( this.getPrefixedDb() );
+       },
 
        /**
-        * Normalize a file extension to the common form, making it lowercase and checking some synonyms,
-        * and ensure it's clean. Extensions with non-alphanumeric characters will be discarded.
-        * Keep in sync with File::normalizeExtension() in PHP.
+        * Get the page name relative to a namespace
         *
-        * @param {string} extension File extension (without the leading dot)
-        * @return {string} File extension in canonical form
+        * Example:
+        *
+        * - "Foo:Bar" relative to the Foo namespace becomes "Bar".
+        * - "Bar" relative to any non-main namespace becomes ":Bar".
+        * - "Foo:Bar" relative to any namespace other than Foo stays "Foo:Bar".
+        *
+        * @param {number} namespace The namespace to be relative to
+        * @return {string}
         */
-       Title.normalizeExtension = function ( extension ) {
-               var
-                       lower = extension.toLowerCase(),
-                       squish = {
-                               htm: 'html',
-                               jpeg: 'jpg',
-                               mpeg: 'mpg',
-                               tiff: 'tif',
-                               ogv: 'ogg'
-                       };
-               if ( Object.prototype.hasOwnProperty.call( squish, lower ) ) {
-                       return squish[ lower ];
-               } else if ( /^[0-9a-z]+$/.test( lower ) ) {
-                       return lower;
+       getRelativeText: function ( namespace ) {
+               if ( this.getNamespaceId() === namespace ) {
+                       return this.getMainText();
+               } else if ( this.getNamespaceId() === NS_MAIN ) {
+                       return ':' + this.getPrefixedText();
                } else {
-                       return '';
+                       return this.getPrefixedText();
                }
-       };
+       },
 
        /**
-        * PHP's strtoupper differs from String.toUpperCase in a number of cases (T147646).
+        * Get the fragment (if any).
         *
-        * @param {string} chr Unicode character
-        * @return {string} Unicode character, in upper case, according to the same rules as in PHP
+        * Note that this method (by design) does not include the hash character and
+        * the value is not url encoded.
+        *
+        * @return {string|null}
         */
-       Title.phpCharToUpper = function ( chr ) {
-               var mapped = toUpperMapping[ chr ];
-               return mapped || chr.toUpperCase();
-       };
-
-       /* Public members */
-
-       Title.prototype = {
-               constructor: Title,
-
-               /**
-                * Get the namespace number
-                *
-                * Example: 6 for "File:Example_image.svg".
-                *
-                * @return {number}
-                */
-               getNamespaceId: function () {
-                       return this.namespace;
-               },
-
-               /**
-                * Get the namespace prefix (in the content language)
-                *
-                * Example: "File:" for "File:Example_image.svg".
-                * In #NS_MAIN this is '', otherwise namespace name plus ':'
-                *
-                * @return {string}
-                */
-               getNamespacePrefix: function () {
-                       return getNamespacePrefix( this.namespace );
-               },
-
-               /**
-                * Get the page name without extension or namespace prefix
-                *
-                * Example: "Example_image" for "File:Example_image.svg".
-                *
-                * For the page title (full page name without namespace prefix), see #getMain.
-                *
-                * @return {string}
-                */
-               getName: function () {
-                       if (
-                               mw.config.get( 'wgCaseSensitiveNamespaces' ).indexOf( this.namespace ) !== -1 ||
-                               !this.title.length
-                       ) {
-                               return this.title;
-                       }
-                       return mw.Title.phpCharToUpper( this.title[ 0 ] ) + this.title.slice( 1 );
-               },
-
-               /**
-                * Get the page name (transformed by #text)
-                *
-                * Example: "Example image" for "File:Example_image.svg".
-                *
-                * For the page title (full page name without namespace prefix), see #getMainText.
-                *
-                * @return {string}
-                */
-               getNameText: function () {
-                       return text( this.getName() );
-               },
-
-               /**
-                * Get the extension of the page name (if any)
-                *
-                * @return {string|null} Name extension or null if there is none
-                */
-               getExtension: function () {
-                       return this.ext;
-               },
-
-               /**
-                * Shortcut for appendable string to form the main page name.
-                *
-                * Returns a string like ".json", or "" if no extension.
-                *
-                * @return {string}
-                */
-               getDotExtension: function () {
-                       return this.ext === null ? '' : '.' + this.ext;
-               },
-
-               /**
-                * Get the main page name
-                *
-                * Example: "Example_image.svg" for "File:Example_image.svg".
-                *
-                * @return {string}
-                */
-               getMain: function () {
-                       return this.getName() + this.getDotExtension();
-               },
-
-               /**
-                * Get the main page name (transformed by #text)
-                *
-                * Example: "Example image.svg" for "File:Example_image.svg".
-                *
-                * @return {string}
-                */
-               getMainText: function () {
-                       return text( this.getMain() );
-               },
-
-               /**
-                * Get the full page name
-                *
-                * Example: "File:Example_image.svg".
-                * Most useful for API calls, anything that must identify the "title".
-                *
-                * @return {string}
-                */
-               getPrefixedDb: function () {
-                       return this.getNamespacePrefix() + this.getMain();
-               },
-
-               /**
-                * Get the full page name (transformed by #text)
-                *
-                * Example: "File:Example image.svg" for "File:Example_image.svg".
-                *
-                * @return {string}
-                */
-               getPrefixedText: function () {
-                       return text( this.getPrefixedDb() );
-               },
-
-               /**
-                * Get the page name relative to a namespace
-                *
-                * Example:
-                *
-                * - "Foo:Bar" relative to the Foo namespace becomes "Bar".
-                * - "Bar" relative to any non-main namespace becomes ":Bar".
-                * - "Foo:Bar" relative to any namespace other than Foo stays "Foo:Bar".
-                *
-                * @param {number} namespace The namespace to be relative to
-                * @return {string}
-                */
-               getRelativeText: function ( namespace ) {
-                       if ( this.getNamespaceId() === namespace ) {
-                               return this.getMainText();
-                       } else if ( this.getNamespaceId() === NS_MAIN ) {
-                               return ':' + this.getPrefixedText();
-                       } else {
-                               return this.getPrefixedText();
-                       }
-               },
-
-               /**
-                * Get the fragment (if any).
-                *
-                * Note that this method (by design) does not include the hash character and
-                * the value is not url encoded.
-                *
-                * @return {string|null}
-                */
-               getFragment: function () {
-                       return this.fragment;
-               },
-
-               /**
-                * Get the URL to this title
-                *
-                * @see mw.util#getUrl
-                * @param {Object} [params] A mapping of query parameter names to values,
-                *     e.g. `{ action: 'edit' }`.
-                * @return {string}
-                */
-               getUrl: function ( params ) {
-                       var fragment = this.getFragment();
-                       if ( fragment ) {
-                               return mw.util.getUrl( this.toString() + '#' + fragment, params );
-                       } else {
-                               return mw.util.getUrl( this.toString(), params );
-                       }
-               },
-
-               /**
-                * Check if the title is in a talk namespace
-                *
-                * @return {boolean} The title is in a talk namespace
-                */
-               isTalkPage: function () {
-                       return Title.isTalkNamespace( this.getNamespaceId() );
-               },
-
-               /**
-                * Get the title for the associated talk page
-                *
-                * @return {mw.Title|null} The title for the associated talk page, null if not available
-                */
-               getTalkPage: function () {
-                       if ( !this.canHaveTalkPage() ) {
-                               return null;
-                       }
-                       return this.isTalkPage() ?
-                               this :
-                               Title.makeTitle( this.getNamespaceId() + 1, this.getMainText() );
-               },
+       getFragment: function () {
+               return this.fragment;
+       },
 
-               /**
-                * Get the title for the subject page of a talk page
-                *
-                * @return {mw.Title|null} The title for the subject page of a talk page, null if not available
-                */
-               getSubjectPage: function () {
-                       return this.isTalkPage() ?
-                               Title.makeTitle( this.getNamespaceId() - 1, this.getMainText() ) :
-                               this;
-               },
+       /**
+        * Get the URL to this title
+        *
+        * @see mw.util#getUrl
+        * @param {Object} [params] A mapping of query parameter names to values,
+        *     e.g. `{ action: 'edit' }`.
+        * @return {string}
+        */
+       getUrl: function ( params ) {
+               var fragment = this.getFragment();
+               if ( fragment ) {
+                       return mw.util.getUrl( this.toString() + '#' + fragment, params );
+               } else {
+                       return mw.util.getUrl( this.toString(), params );
+               }
+       },
 
-               /**
-                * Check the the title can have an associated talk page
-                *
-                * @return {boolean} The title can have an associated talk page
-                */
-               canHaveTalkPage: function () {
-                       return this.getNamespaceId() >= NS_MAIN;
-               },
+       /**
+        * Check if the title is in a talk namespace
+        *
+        * @return {boolean} The title is in a talk namespace
+        */
+       isTalkPage: function () {
+               return Title.isTalkNamespace( this.getNamespaceId() );
+       },
 
-               /**
-                * Whether this title exists on the wiki.
-                *
-                * @see #static-method-exists
-                * @return {boolean|null} Boolean if the information is available, otherwise null
-                */
-               exists: function () {
-                       return Title.exists( this );
+       /**
+        * Get the title for the associated talk page
+        *
+        * @return {mw.Title|null} The title for the associated talk page, null if not available
+        */
+       getTalkPage: function () {
+               if ( !this.canHaveTalkPage() ) {
+                       return null;
                }
-       };
+               return this.isTalkPage() ?
+                       this :
+                       Title.makeTitle( this.getNamespaceId() + 1, this.getMainText() );
+       },
 
        /**
-        * @alias #getPrefixedDb
-        * @method
+        * Get the title for the subject page of a talk page
+        *
+        * @return {mw.Title|null} The title for the subject page of a talk page, null if not available
         */
-       Title.prototype.toString = Title.prototype.getPrefixedDb;
+       getSubjectPage: function () {
+               return this.isTalkPage() ?
+                       Title.makeTitle( this.getNamespaceId() - 1, this.getMainText() ) :
+                       this;
+       },
 
        /**
-        * @alias #getPrefixedText
-        * @method
+        * Check the the title can have an associated talk page
+        *
+        * @return {boolean} The title can have an associated talk page
         */
-       Title.prototype.toText = Title.prototype.getPrefixedText;
+       canHaveTalkPage: function () {
+               return this.getNamespaceId() >= NS_MAIN;
+       },
 
-       // Expose
-       mw.Title = Title;
+       /**
+        * Whether this title exists on the wiki.
+        *
+        * @see #static-method-exists
+        * @return {boolean|null} Boolean if the information is available, otherwise null
+        */
+       exists: function () {
+               return Title.exists( this );
+       }
+};
+
+/**
+ * @alias #getPrefixedDb
+ * @method
+ */
+Title.prototype.toString = Title.prototype.getPrefixedDb;
+
+/**
+ * @alias #getPrefixedText
+ * @method
+ */
+Title.prototype.toText = Title.prototype.getPrefixedText;
 
-}() );
+// Expose
+mw.Title = Title;
diff --git a/resources/src/mediawiki.action/mediawiki.action.history.styles.css b/resources/src/mediawiki.action/mediawiki.action.history.styles.css
deleted file mode 100644 (file)
index 257f153..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* Basic styles for the history page */
-
-#pagehistory .history-user {
-       margin-left: 0.4em;
-       margin-right: 0.2em;
-}
-
-#pagehistory li {
-       border: 1px solid #fff;
-}
-
-#pagehistory li.selected {
-       background-color: #f8f9fa;
-       color: #222;
-       border: 1px dashed #a2a9b1;
-}
-
-.mw-history-revisionactions {
-       float: right;
-}
-
-.updatedmarker {
-       background-color: #b7f430;
-}
diff --git a/resources/src/mediawiki.action/mediawiki.action.history.styles.less b/resources/src/mediawiki.action/mediawiki.action.history.styles.less
new file mode 100644 (file)
index 0000000..7e88f7c
--- /dev/null
@@ -0,0 +1,30 @@
+/* Basic styles for the history page */
+@import 'mediawiki.mixins';
+
+/* Visually hide repeating text, but leave in for better form navigation on screen readers. */
+.action-history .mw-htmlform-ooui .oo-ui-fieldsetLayout:first-child .oo-ui-fieldsetLayout-header {
+       .mixin-screen-reader-text();
+}
+
+#pagehistory .history-user {
+       margin-left: 0.4em;
+       margin-right: 0.2em;
+}
+
+#pagehistory li {
+       border: 1px solid #fff;
+}
+
+#pagehistory li.selected {
+       background-color: #f8f9fa;
+       color: #222;
+       border: 1px dashed #a2a9b1;
+}
+
+.mw-history-revisionactions {
+       float: right;
+}
+
+.updatedmarker {
+       background-color: #b7f430;
+}
index 5f20cf9..a63c5c6 100644 (file)
@@ -462,7 +462,7 @@ a.new {
 }
 
 .mw-datatable th {
-       background-color: #ddf;
+       background-color: #eaeeff;
 }
 
 .mw-datatable td {
index 4c5b4a7..4684ea2 100644 (file)
        list-style-image: e( '/* @embed */' ) url( @url );
 }
 
-.list-style-image-svg( @svg, @fallback ) {
-       list-style-image: e( '/* @embed */' ) url( @svg );
-       /* Fallback to PNG bullet for IE 8 and below using CSS hack */
-       list-style-image: e( '/* @embed */' ) url( @fallback ) e( '\9' );
-}
-
 .hyphens( @value: auto ) {
        & when ( @value = auto ) {
                // Legacy `word-wrap`; IE 6-11, Edge 12+, Firefox 3.5+, Chrome 4+, Safari 3.1+,
index aada50c..5f629e7 100644 (file)
                },
 
                /**
-                * Get an automatically generated random ID (persisted in sessionStorage)
+                * Retrieve a random ID persisted in sessionStorage, generating it if needed
                 *
-                * This ID is ephemeral for everyone, staying in their browser only until they
-                * close their browsing session.
+                * This ID is stored in sessionStorage and persists within a single tab,
+                * including between page views through links and form submissions,
+                * and when going forwards/backwards in browser history, and when restoring
+                * a closed tab, or restoring a closed browser session.
+                *
+                * This is different from session cookies, because it is not shared between
+                * tabs of the same browser. Two simultaneous pageviews in the same browser
+                * can have different session IDs. The ID is also not re-used when opening
+                * a new tab to a website after fully closing others.
+                *
+                * See https://phabricator.wikimedia.org/T118063#4547178 and
+                * https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage
+                * for more information.
                 *
                 * @return {string} Random session ID
                 */
index 5c574a2..0a8dfb8 100644 (file)
                         *             'dependencies': ['required.foo', 'bar.also', ...]
                         *             'group': 'somegroup', (or) null
                         *             'source': 'local', (or) 'anotherwiki'
-                        *             'skip': 'return !!window.Example', (or) null
+                        *             'skip': 'return !!window.Example', (or) null, (or) boolean result of skip
                         *             'module': export Object
                         *
                         *             // Set from execute() or mw.loader.state()
                         *             'state': 'registered', 'loaded', 'loading', 'ready', 'error', or 'missing'
                         *
                         *             // Optionally added at run-time by mw.loader.implement()
-                        *             'skipped': true
                         *             'script': closure, array of urls, or string
                         *             'style': { ... } (see #execute)
                         *             'messages': { 'key': 'value', ... }
 
                        /**
                         * @private
-                        * @param {Array} modules List of module names
+                        * @param {string[]} modules List of module names
                         * @return {string} Hash of concatenated version hashes.
                         */
                        function getCombinedVersion( modules ) {
                         * execute the module or job now.
                         *
                         * @private
-                        * @param {Array} modules Names of modules to be checked
+                        * @param {string[]} modules Names of modules to be checked
                         * @return {boolean} True if all modules are in state 'ready', false otherwise
                         */
                        function allReady( modules ) {
                         *  dependencies, such that later modules depend on earlier modules. The array
                         *  contains the module names. If the array contains already some module names,
                         *  this function appends its result to the pre-existing array.
-                        * @param {StringSet} [unresolved] Used to track the current dependency
-                        *  chain, and to report loops in the dependency graph.
-                        * @throws {Error} If any unregistered module or a dependency loop is encountered
+                        * @param {StringSet} [unresolved] Used to detect loops in the dependency graph.
+                        * @throws {Error} If an unknown module or a circular dependency is encountered
                         */
                        function sortDependencies( module, resolved, unresolved ) {
-                               var i, deps, skip;
+                               var i, skip, deps;
 
                                if ( !( module in registry ) ) {
-                                       throw new Error( 'Unknown dependency: ' + module );
+                                       throw new Error( 'Unknown module: ' + module );
                                }
 
-                               if ( registry[ module ].skip !== null ) {
+                               if ( typeof registry[ module ].skip === 'string' ) {
                                        // eslint-disable-next-line no-new-func
-                                       skip = new Function( registry[ module ].skip );
-                                       registry[ module ].skip = null;
-                                       if ( skip() ) {
-                                               registry[ module ].skipped = true;
+                                       skip = ( new Function( registry[ module ].skip )() );
+                                       registry[ module ].skip = !!skip;
+                                       if ( skip ) {
                                                registry[ module ].dependencies = [];
                                                setAndPropagate( module, 'ready' );
                                                return;
                                        }
                                }
 
-                               if ( resolved.indexOf( module ) !== -1 ) {
-                                       // Module already resolved; nothing to do
-                                       return;
-                               }
                                // Create unresolved if not passed in
                                if ( !unresolved ) {
                                        unresolved = new StringSet();
                                }
 
-                               // Add base modules
-                               if ( baseModules.indexOf( module ) === -1 ) {
-                                       for ( i = 0; i < baseModules.length; i++ ) {
-                                               if ( resolved.indexOf( baseModules[ i ] ) === -1 ) {
-                                                       resolved.push( baseModules[ i ] );
-                                               }
-                                       }
-                               }
-
-                               // Tracks down dependencies
+                               // Track down dependencies
                                deps = registry[ module ].dependencies;
                                unresolved.add( module );
                                for ( i = 0; i < deps.length; i++ ) {
                                                sortDependencies( deps[ i ], resolved, unresolved );
                                        }
                                }
+
                                resolved.push( module );
                        }
 
                         * @throws {Error} If an unregistered module or a dependency loop is encountered
                         */
                        function resolve( modules ) {
-                               var resolved = [],
+                               // Always load base modules
+                               var resolved = baseModules.slice(),
                                        i = 0;
                                for ( ; i < modules.length; i++ ) {
                                        sortDependencies( modules[ i ], resolved );
                         */
                        function resolveStubbornly( modules ) {
                                var saved,
-                                       resolved = [],
+                                       // Always load base modules
+                                       resolved = baseModules.slice(),
                                        i = 0;
                                for ( ; i < modules.length; i++ ) {
                                        saved = resolved.slice();
                                 *  "text/javascript"; if no type is provided, text/javascript is assumed.
                                 */
                                load: function ( modules, type ) {
-                                       var filtered, l;
+                                       var l;
 
                                        // Allow calling with a url or single dependency as a string
                                        if ( typeof modules === 'string' ) {
                                                modules = [ modules ];
                                        }
 
-                                       // Filter out top-level modules that are unknown or failed to load before.
-                                       filtered = modules.filter( function ( module ) {
-                                               var state = mw.loader.getState( module );
-                                               return state !== 'error' && state !== 'missing';
-                                       } );
-                                       // Resolve remaining list using the known dependency tree.
-                                       // This also filters out modules with unknown dependencies. (T36853)
-                                       filtered = resolveStubbornly( filtered );
-                                       // Some modules are not yet ready, add to module load queue.
-                                       enqueue( filtered, undefined, undefined );
+                                       // Resolve modules into flat list for internal queuing.
+                                       // This also filters out unknown modules and modules with
+                                       // unknown dependencies, allowing the rest to continue. (T36853)
+                                       enqueue( resolveStubbornly( modules ), undefined, undefined );
                                },
 
                                /**
index bebf4dc..240757c 100644 (file)
  *
  * Other browsers that pass the check are considered Grade X.
  *
- * @param {string} [str] User agent, defaults to navigator.userAgent
+ * @private
+ * @param {string} ua User agent string
  * @return {boolean} User agent is compatible with MediaWiki JS
  */
-function isCompatible( str ) {
-       var ua = str || navigator.userAgent;
+function isCompatible( ua ) {
        return !!(
                // https://caniuse.com/#feat=es5
                // https://caniuse.com/#feat=use-strict
@@ -76,7 +76,7 @@ function isCompatible( str ) {
        );
 }
 
-if ( !isCompatible() ) {
+if ( !isCompatible( navigator.userAgent ) ) {
        // Handle Grade C
        // Undo speculative Grade A <html> class. See ResourceLoaderClientHtml::getDocumentAttributes().
        document.documentElement.className = document.documentElement.className
index f87afb0..8f34180 100644 (file)
@@ -83,6 +83,11 @@ class MediaWikiLoggerPHPUnitTestListener extends PHPUnit_Framework_BaseTestListe
        private function formatLogs( array $logs ) {
                $message = [];
                foreach ( $logs as $log ) {
+                       if ( $log['channel'] === 'PHPUnitCommand' ) {
+                               // Don't print the log of PHPUnit events while running PHPUnit,
+                               // because PHPUnit is already printing those already.
+                               continue;
+                       }
                        $message[] = sprintf(
                                '[%s] [%s] %s %s',
                                $log['channel'],
index 3ed21e4..74d16ba 100644 (file)
@@ -401,7 +401,8 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
                        self::$useTemporaryTables = !$this->getCliArg( 'use-normal-tables' );
                        self::$reuseDB = $this->getCliArg( 'reuse-db' );
 
-                       $this->db = wfGetDB( DB_MASTER );
+                       $lb = MediaWikiServices::getInstance()->getDBLoadBalancer();
+                       $this->db = $lb->getConnection( DB_MASTER );
 
                        $this->checkDbIsSupported();
 
@@ -1364,6 +1365,9 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
                        JobQueueGroup::singleton()->get( $type )->delete();
                }
 
+               // T219673: close any connections from code that failed to call reuseConnection()
+               // or is still holding onto a DBConnRef instance (e.g. in a singleton).
+               MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->closeAll();
                CloneDatabase::changePrefix( self::$oldTablePrefix );
 
                self::$oldTablePrefix = false;
@@ -1454,12 +1458,12 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
         * @note this method only works when first called. Subsequent calls have no effect,
         * even if using different parameters.
         *
-        * @param Database $db The database connection
+        * @param IMaintainableDatabase $db The database connection
         * @param string $prefix The prefix to use for the new table set (aka schema).
         *
         * @throws MWException If the database table prefix is already $prefix
         */
-       public static function setupTestDB( Database $db, $prefix ) {
+       public static function setupTestDB( IMaintainableDatabase $db, $prefix ) {
                if ( self::$dbSetup ) {
                        return;
                }
@@ -1612,6 +1616,10 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
 
                if ( $tablesToRestore ) {
                        $this->recloneMockTables( $db, $tablesToRestore );
+
+                       // Reset the restored tables, mainly for the side effect of
+                       // re-calling $this->addCoreDBData() if necessary.
+                       $this->resetDB( $db, $tablesToRestore );
                }
        }
 
@@ -1626,6 +1634,7 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
 
                if ( $oldOverrides['alter'] || $oldOverrides['create'] || $oldOverrides['drop'] ) {
                        $this->undoSchemaOverrides( $db, $oldOverrides );
+                       unset( $db->_schemaOverrides );
                }
 
                // Determine new overrides.
diff --git a/tests/phpunit/includes/Permissions/PermissionManagerTest.php b/tests/phpunit/includes/Permissions/PermissionManagerTest.php
new file mode 100644 (file)
index 0000000..7f5ec40
--- /dev/null
@@ -0,0 +1,1410 @@
+<?php
+
+namespace MediaWiki\Tests\Permissions;
+
+use Action;
+use Block;
+use MediaWikiLangTestCase;
+use RequestContext;
+use Title;
+use User;
+use MediaWiki\Block\Restriction\NamespaceRestriction;
+use MediaWiki\Block\Restriction\PageRestriction;
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Permissions\PermissionManager;
+
+/**
+ * @group Database
+ *
+ * @covers \MediaWiki\Permissions\PermissionManager
+ */
+class PermissionManagerTest extends MediaWikiLangTestCase {
+
+       /**
+        * @var string
+        */
+       protected $userName, $altUserName;
+
+       /**
+        * @var Title
+        */
+       protected $title;
+
+       /**
+        * @var User
+        */
+       protected $user, $anonUser, $userUser, $altUser;
+
+       /**
+        * @var PermissionManager
+        */
+       protected $permissionManager;
+
+       /** Constant for self::testIsBlockedFrom */
+       const USER_TALK_PAGE = '<user talk page>';
+
+       protected function setUp() {
+               parent::setUp();
+
+               $localZone = 'UTC';
+               $localOffset = date( 'Z' ) / 60;
+
+               $this->setMwGlobals( [
+                       'wgLocaltimezone' => $localZone,
+                       'wgLocalTZoffset' => $localOffset,
+                       'wgNamespaceProtection' => [
+                               NS_MEDIAWIKI => 'editinterface',
+                       ],
+               ] );
+               // Without this testUserBlock will use a non-English context on non-English MediaWiki
+               // installations (because of how Title::checkUserBlock is implemented) and fail.
+               RequestContext::resetMain();
+
+               $this->userName = 'Useruser';
+               $this->altUserName = 'Altuseruser';
+               date_default_timezone_set( $localZone );
+
+               $this->title = Title::makeTitle( NS_MAIN, "Main Page" );
+               if ( !isset( $this->userUser ) || !( $this->userUser instanceof User ) ) {
+                       $this->userUser = User::newFromName( $this->userName );
+
+                       if ( !$this->userUser->getId() ) {
+                               $this->userUser = User::createNew( $this->userName, [
+                                       "email" => "test@example.com",
+                                       "real_name" => "Test User" ] );
+                               $this->userUser->load();
+                       }
+
+                       $this->altUser = User::newFromName( $this->altUserName );
+                       if ( !$this->altUser->getId() ) {
+                               $this->altUser = User::createNew( $this->altUserName, [
+                                       "email" => "alttest@example.com",
+                                       "real_name" => "Test User Alt" ] );
+                               $this->altUser->load();
+                       }
+
+                       $this->anonUser = User::newFromId( 0 );
+
+                       $this->user = $this->userUser;
+               }
+
+               $this->permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
+               $this->overrideMwServices();
+       }
+
+       protected function setUserPerm( $perm ) {
+               // Setting member variables is evil!!!
+
+               if ( is_array( $perm ) ) {
+                       $this->user->mRights = $perm;
+               } else {
+                       $this->user->mRights = [ $perm ];
+               }
+       }
+
+       protected function setTitle( $ns, $title = "Main_Page" ) {
+               $this->title = Title::makeTitle( $ns, $title );
+       }
+
+       protected function setUser( $userName = null ) {
+               if ( $userName === 'anon' ) {
+                       $this->user = $this->anonUser;
+               } elseif ( $userName === null || $userName === $this->userName ) {
+                       $this->user = $this->userUser;
+               } else {
+                       $this->user = $this->altUser;
+               }
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        *
+        * This test is failing per T201776.
+        *
+        * @group Broken
+        * @covers \MediaWiki\Permissions\PermissionManager::checkQuickPermissions
+        */
+       public function testQuickPermissions() {
+               $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
+               getFormattedNsText( NS_PROJECT );
+
+               $this->setUser( 'anon' );
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "createtalk" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "createpage" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ "nocreatetext" ] ], $res );
+
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreatetext' ] ], $res );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( "createpage" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( "createtalk" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreatetext' ] ], $res );
+
+               $this->setUser( $this->userName );
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "createtalk" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "createpage" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreate-loggedin' ] ], $res );
+
+               $this->setTitle( NS_TALK );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreate-loggedin' ] ], $res );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( "createpage" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( "createtalk" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreate-loggedin' ] ], $res );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'create', $this->user, $this->title );
+               $this->assertEquals( [ [ 'nocreate-loggedin' ] ], $res );
+
+               $this->setUser( 'anon' );
+               $this->setTitle( NS_USER, $this->userName . '' );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'cant-move-user-page' ], [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '/subpage' );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '' );
+               $this->setUserPerm( "move-rootuserpages" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '/subpage' );
+               $this->setUserPerm( "move-rootuserpages" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '' );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'cant-move-user-page' ], [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '/subpage' );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '' );
+               $this->setUserPerm( "move-rootuserpages" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_USER, $this->userName . '/subpage' );
+               $this->setUserPerm( "move-rootuserpages" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setUser( $this->userName );
+               $this->setTitle( NS_FILE, "img.png" );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenotallowedfile' ], [ 'movenotallowed' ] ], $res );
+
+               $this->setTitle( NS_FILE, "img.png" );
+               $this->setUserPerm( "movefile" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenotallowed' ] ], $res );
+
+               $this->setUser( 'anon' );
+               $this->setTitle( NS_FILE, "img.png" );
+               $this->setUserPerm( "" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenotallowedfile' ], [ 'movenologintext' ] ], $res );
+
+               $this->setTitle( NS_FILE, "img.png" );
+               $this->setUserPerm( "movefile" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move', $this->user, $this->title );
+               $this->assertEquals( [ [ 'movenologintext' ] ], $res );
+
+               $this->setUser( $this->userName );
+               $this->setUserPerm( "move" );
+               $this->runGroupPermissions( 'move', [ [ 'movenotallowedfile' ] ] );
+
+               $this->setUserPerm( "" );
+               $this->runGroupPermissions(
+                       'move',
+                       [ [ 'movenotallowedfile' ], [ 'movenotallowed' ] ]
+               );
+
+               $this->setUser( 'anon' );
+               $this->setUserPerm( "move" );
+               $this->runGroupPermissions( 'move', [ [ 'movenotallowedfile' ] ] );
+
+               $this->setUserPerm( "" );
+               $this->runGroupPermissions(
+                       'move',
+                       [ [ 'movenotallowedfile' ], [ 'movenotallowed' ] ],
+                       [ [ 'movenotallowedfile' ], [ 'movenologintext' ] ]
+               );
+
+               if ( $this->isWikitextNS( NS_MAIN ) ) {
+                       // NOTE: some content models don't allow moving
+                       // @todo find a Wikitext namespace for testing
+
+                       $this->setTitle( NS_MAIN );
+                       $this->setUser( 'anon' );
+                       $this->setUserPerm( "move" );
+                       $this->runGroupPermissions( 'move', [] );
+
+                       $this->setUserPerm( "" );
+                       $this->runGroupPermissions( 'move', [ [ 'movenotallowed' ] ],
+                               [ [ 'movenologintext' ] ] );
+
+                       $this->setUser( $this->userName );
+                       $this->setUserPerm( "" );
+                       $this->runGroupPermissions( 'move', [ [ 'movenotallowed' ] ] );
+
+                       $this->setUserPerm( "move" );
+                       $this->runGroupPermissions( 'move', [] );
+
+                       $this->setUser( 'anon' );
+                       $this->setUserPerm( 'move' );
+                       $res = $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title );
+                       $this->assertEquals( [], $res );
+
+                       $this->setUserPerm( '' );
+                       $res = $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title );
+                       $this->assertEquals( [ [ 'movenotallowed' ] ], $res );
+               }
+
+               $this->setTitle( NS_USER );
+               $this->setUser( $this->userName );
+               $this->setUserPerm( [ "move", "move-rootuserpages" ] );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move-target', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setUserPerm( "move" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move-target', $this->user, $this->title );
+               $this->assertEquals( [ [ 'cant-move-to-user-page' ] ], $res );
+
+               $this->setUser( 'anon' );
+               $this->setUserPerm( [ "move", "move-rootuserpages" ] );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move-target', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setTitle( NS_USER, "User/subpage" );
+               $this->setUserPerm( [ "move", "move-rootuserpages" ] );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move-target', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setUserPerm( "move" );
+               $res = $this->permissionManager
+                       ->getPermissionErrors( 'move-target', $this->user, $this->title );
+               $this->assertEquals( [], $res );
+
+               $this->setUser( 'anon' );
+               $check = [
+                       'edit' => [
+                               [ [ 'badaccess-groups', "*, [[$prefix:Users|Users]]", 2 ] ],
+                               [ [ 'badaccess-group0' ] ],
+                               [],
+                               true
+                       ],
+                       'protect' => [
+                               [ [
+                                       'badaccess-groups',
+                                       "[[$prefix:Administrators|Administrators]]", 1 ],
+                                       [ 'protect-cantedit'
+                                       ] ],
+                               [ [ 'badaccess-group0' ], [ 'protect-cantedit' ] ],
+                               [ [ 'protect-cantedit' ] ],
+                               false
+                       ],
+                       '' => [ [], [], [], true ]
+               ];
+
+               foreach ( [ "edit", "protect", "" ] as $action ) {
+                       $this->setUserPerm( null );
+                       $this->assertEquals( $check[$action][0],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, true ) );
+                       $this->assertEquals( $check[$action][0],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'full' ) );
+                       $this->assertEquals( $check[$action][0],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'secure' ) );
+
+                       global $wgGroupPermissions;
+                       $old = $wgGroupPermissions;
+                       $wgGroupPermissions = [];
+
+                       $this->assertEquals( $check[$action][1],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, true ) );
+                       $this->assertEquals( $check[$action][1],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'full' ) );
+                       $this->assertEquals( $check[$action][1],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'secure' ) );
+                       $wgGroupPermissions = $old;
+
+                       $this->setUserPerm( $action );
+                       $this->assertEquals( $check[$action][2],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, true ) );
+                       $this->assertEquals( $check[$action][2],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'full' ) );
+                       $this->assertEquals( $check[$action][2],
+                               $this->permissionManager
+                                       ->getPermissionErrors( $action, $this->user, $this->title, 'secure' ) );
+
+                       $this->setUserPerm( $action );
+                       $this->assertEquals( $check[$action][3],
+                               $this->permissionManager->userCan( $action, $this->user, $this->title, true ) );
+                       $this->assertEquals( $check[$action][3],
+                               $this->permissionManager->userCan( $action, $this->user, $this->title,
+                                       PermissionManager::RIGOR_QUICK ) );
+                       # count( User::getGroupsWithPermissions( $action ) ) < 1
+               }
+       }
+
+       protected function runGroupPermissions( $action, $result, $result2 = null ) {
+               global $wgGroupPermissions;
+
+               if ( $result2 === null ) {
+                       $result2 = $result;
+               }
+
+               $wgGroupPermissions['autoconfirmed']['move'] = false;
+               $wgGroupPermissions['user']['move'] = false;
+               $res = $this->permissionManager
+                       ->getPermissionErrors( $action, $this->user, $this->title );
+               $this->assertEquals( $result, $res );
+
+               $wgGroupPermissions['autoconfirmed']['move'] = true;
+               $wgGroupPermissions['user']['move'] = false;
+               $res = $this->permissionManager
+                       ->getPermissionErrors( $action, $this->user, $this->title );
+               $this->assertEquals( $result2, $res );
+
+               $wgGroupPermissions['autoconfirmed']['move'] = true;
+               $wgGroupPermissions['user']['move'] = true;
+               $res = $this->permissionManager
+                       ->getPermissionErrors( $action, $this->user, $this->title );
+               $this->assertEquals( $result2, $res );
+
+               $wgGroupPermissions['autoconfirmed']['move'] = false;
+               $wgGroupPermissions['user']['move'] = true;
+               $res = $this->permissionManager
+                       ->getPermissionErrors( $action, $this->user, $this->title );
+               $this->assertEquals( $result2, $res );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers MediaWiki\Permissions\PermissionManager::checkSpecialsAndNSPermissions
+        */
+       public function testSpecialsAndNSPermissions() {
+               global $wgNamespaceProtection;
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_SPECIAL );
+
+               $this->assertEquals( [ [ 'badaccess-group0' ], [ 'ns-specialprotected' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( 'bogus' );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MAIN );
+               $this->setUserPerm( '' );
+               $this->assertEquals( [ [ 'badaccess-group0' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $wgNamespaceProtection[NS_USER] = [ 'bogus' ];
+
+               $this->setTitle( NS_USER );
+               $this->setUserPerm( '' );
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'namespaceprotected', 'User', 'bogus' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MEDIAWIKI );
+               $this->setUserPerm( 'bogus' );
+               $this->assertEquals( [ [ 'protectedinterface', 'bogus' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MEDIAWIKI );
+               $this->setUserPerm( 'bogus' );
+               $this->assertEquals( [ [ 'protectedinterface', 'bogus' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $wgNamespaceProtection = null;
+
+               $this->setUserPerm( 'bogus' );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'bogus', $this->user, $this->title ) );
+
+               $this->setUserPerm( '' );
+               $this->assertEquals( [ [ 'badaccess-group0' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'bogus', $this->user, $this->title ) );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testJsConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->userName . '/test.js' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testJsonConfigEditPermissions() {
+               $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
+               getFormattedNsText( NS_PROJECT );
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->userName . '/test.json' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsonprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsonprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testCssConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->userName . '/test.css' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'mycustomcssprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomcssprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'mycustomcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testOtherJsConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->altUserName . '/test.js' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testOtherJsonConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->altUserName . '/test.json' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customjsonprotected', 'bogus' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testOtherCssConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->altUserName . '/test.css' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-group0' ], [ 'customcssprotected', 'bogus' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testOtherNonConfigEditPermissions() {
+               $this->setUser( $this->userName );
+
+               $this->setTitle( NS_USER, $this->altUserName . '/tempo' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       /**
+        * @todo This should use data providers like the other methods here.
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
+        */
+       public function testPatrolActionConfigEditPermissions() {
+               $this->setUser( 'anon' );
+               $this->setTitle( NS_USER, 'ToPatrolOrNotToPatrol' );
+               $this->runConfigEditPermissions(
+                       [ [ 'badaccess-group0' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-group0' ] ],
+                       [ [ 'badaccess-groups' ] ]
+               );
+       }
+
+       protected function runConfigEditPermissions(
+               $resultNone,
+               $resultMyCss,
+               $resultMyJson,
+               $resultMyJs,
+               $resultUserCss,
+               $resultUserJson,
+               $resultUserJs,
+               $resultPatrol
+       ) {
+               $this->setUserPerm( '' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultNone, $result );
+
+               $this->setUserPerm( 'editmyusercss' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultMyCss, $result );
+
+               $this->setUserPerm( 'editmyuserjson' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultMyJson, $result );
+
+               $this->setUserPerm( 'editmyuserjs' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultMyJs, $result );
+
+               $this->setUserPerm( 'editusercss' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultUserCss, $result );
+
+               $this->setUserPerm( 'edituserjson' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultUserJson, $result );
+
+               $this->setUserPerm( 'edituserjs' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( $resultUserJs, $result );
+
+               $this->setUserPerm( '' );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'patrol', $this->user, $this->title );
+               $this->assertEquals( reset( $resultPatrol[0] ), reset( $result[0] ) );
+
+               $this->setUserPerm( [ 'edituserjs', 'edituserjson', 'editusercss' ] );
+               $result = $this->permissionManager
+                       ->getPermissionErrors( 'bogus', $this->user, $this->title );
+               $this->assertEquals( [ [ 'badaccess-group0' ] ], $result );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        *
+        * This test is failing per T201776.
+        *
+        * @group Broken
+        * @covers \MediaWiki\Permissions\PermissionManager::checkPageRestrictions
+        */
+       public function testPageRestrictions() {
+               $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
+               getFormattedNsText( NS_PROJECT );
+
+               $this->setTitle( NS_MAIN );
+               $this->title->mRestrictionsLoaded = true;
+               $this->setUserPerm( "edit" );
+               $this->title->mRestrictions = [ "bogus" => [ 'bogus', "sysop", "protect", "" ] ];
+
+               $this->assertEquals( [],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'edit', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               $this->title->mRestrictions = [ "edit" => [ 'bogus', "sysop", "protect", "" ],
+                       "bogus" => [ 'bogus', "sysop", "protect", "" ] ];
+
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'protectedpagetext', 'bogus', 'bogus' ],
+                       [ 'protectedpagetext', 'editprotected', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus',
+                               $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'protectedpagetext', 'bogus', 'edit' ],
+                       [ 'protectedpagetext', 'editprotected', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ] ],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+               $this->setUserPerm( "" );
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'protectedpagetext', 'bogus', 'bogus' ],
+                       [ 'protectedpagetext', 'editprotected', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus',
+                               $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'badaccess-groups', "*, [[$prefix:Users|Users]]", 2 ],
+                       [ 'protectedpagetext', 'bogus', 'edit' ],
+                       [ 'protectedpagetext', 'editprotected', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ] ],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+               $this->setUserPerm( [ "edit", "editprotected" ] );
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'protectedpagetext', 'bogus', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus',
+                               $this->user, $this->title ) );
+               $this->assertEquals( [
+                       [ 'protectedpagetext', 'bogus', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ] ],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+
+               $this->title->mCascadeRestriction = true;
+               $this->setUserPerm( "edit" );
+
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'bogus', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'edit', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'protectedpagetext', 'bogus', 'bogus' ],
+                       [ 'protectedpagetext', 'editprotected', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus',
+                               $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'protectedpagetext', 'bogus', 'edit' ],
+                       [ 'protectedpagetext', 'editprotected', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ] ],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+
+               $this->setUserPerm( [ "edit", "editprotected" ] );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'bogus', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'edit', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               $this->assertEquals( [ [ 'badaccess-group0' ],
+                       [ 'protectedpagetext', 'bogus', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ],
+                       [ 'protectedpagetext', 'protect', 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus',
+                               $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'protectedpagetext', 'bogus', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ],
+                       [ 'protectedpagetext', 'protect', 'edit' ] ],
+                       $this->permissionManager->getPermissionErrors( 'edit',
+                               $this->user, $this->title ) );
+       }
+
+       /**
+        * @covers \MediaWiki\Permissions\PermissionManager::checkCascadingSourcesRestrictions
+        */
+       public function testCascadingSourcesRestrictions() {
+               $this->setTitle( NS_MAIN, "test page" );
+               $this->setUserPerm( [ "edit", "bogus" ] );
+
+               $this->title->mCascadeSources = [
+                       Title::makeTitle( NS_MAIN, "Bogus" ),
+                       Title::makeTitle( NS_MAIN, "UnBogus" )
+               ];
+               $this->title->mCascadingRestrictions = [
+                       "bogus" => [ 'bogus', "sysop", "protect", "" ]
+               ];
+
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'bogus', $this->user, $this->title ) );
+               $this->assertEquals( [
+                       [ "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ],
+                       [ "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ],
+                       [ "cascadeprotected", 2, "* [[:Bogus]]\n* [[:UnBogus]]\n", 'bogus' ] ],
+                       $this->permissionManager->getPermissionErrors( 'bogus', $this->user, $this->title ) );
+
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'edit', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager->getPermissionErrors( 'edit', $this->user, $this->title ) );
+       }
+
+       /**
+        * @todo This test method should be split up into separate test methods and
+        * data providers
+        * @covers \MediaWiki\Permissions\PermissionManager::checkActionPermissions
+        */
+       public function testActionPermissions() {
+               $this->setUserPerm( [ "createpage" ] );
+               $this->setTitle( NS_MAIN, "test page" );
+               $this->title->mTitleProtection['permission'] = '';
+               $this->title->mTitleProtection['user'] = $this->user->getId();
+               $this->title->mTitleProtection['expiry'] = 'infinity';
+               $this->title->mTitleProtection['reason'] = 'test';
+               $this->title->mCascadeRestriction = false;
+
+               $this->assertEquals( [ [ 'titleprotected', 'Useruser', 'test' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'create', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'create', $this->user, $this->title ) );
+
+               $this->title->mTitleProtection['permission'] = 'editprotected';
+               $this->setUserPerm( [ 'createpage', 'protect' ] );
+               $this->assertEquals( [ [ 'titleprotected', 'Useruser', 'test' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'create', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'create', $this->user, $this->title ) );
+
+               $this->setUserPerm( [ 'createpage', 'editprotected' ] );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'create', $this->user, $this->title ) );
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'create', $this->user, $this->title ) );
+
+               $this->setUserPerm( [ 'createpage' ] );
+               $this->assertEquals( [ [ 'titleprotected', 'Useruser', 'test' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'create', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'create', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MEDIA, "test page" );
+               $this->setUserPerm( [ "move" ] );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'move', $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'immobile-source-namespace', 'Media' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move', $this->user, $this->title ) );
+
+               $this->setTitle( NS_HELP, "test page" );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move', $this->user, $this->title ) );
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'move', $this->user, $this->title ) );
+
+               $this->title->mInterwiki = "no";
+               $this->assertEquals( [ [ 'immobile-source-page' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'move', $this->user, $this->title ) );
+
+               $this->setTitle( NS_MEDIA, "test page" );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( [ [ 'immobile-target-namespace', 'Media' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+
+               $this->setTitle( NS_HELP, "test page" );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( true,
+                       $this->permissionManager->userCan( 'move-target', $this->user, $this->title ) );
+
+               $this->title->mInterwiki = "no";
+               $this->assertEquals( [ [ 'immobile-target-page' ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( false,
+                       $this->permissionManager->userCan( 'move-target', $this->user, $this->title ) );
+       }
+
+       /**
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserBlock
+        */
+       public function testUserBlock() {
+               $this->setMwGlobals( [
+                       'wgEmailConfirmToEdit' => true,
+                       'wgEmailAuthentication' => true,
+               ] );
+
+               $this->overrideMwServices();
+               $this->permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
+               $this->setUserPerm( [
+                       'createpage',
+                       'edit',
+                       'move',
+                       'rollback',
+                       'patrol',
+                       'upload',
+                       'purge'
+               ] );
+               $this->setTitle( NS_HELP, "test page" );
+
+               # $wgEmailConfirmToEdit only applies to 'edit' action
+               $this->assertEquals( [],
+                       $this->permissionManager->getPermissionErrors( 'move-target',
+                               $this->user, $this->title ) );
+               $this->assertContains( [ 'confirmedittext' ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+
+               $this->setMwGlobals( 'wgEmailConfirmToEdit', false );
+               $this->overrideMwServices();
+               $this->permissionManager = MediaWikiServices::getInstance()->getPermissionManager();
+
+               $this->assertNotContains( [ 'confirmedittext' ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+
+               # $wgEmailConfirmToEdit && !$user->isEmailConfirmed() && $action != 'createaccount'
+               $this->assertEquals( [],
+                       $this->permissionManager->getPermissionErrors( 'move-target',
+                               $this->user, $this->title ) );
+
+               global $wgLang;
+               $prev = time();
+               $now = time() + 120;
+               $this->user->mBlockedby = $this->user->getId();
+               $this->user->mBlock = new Block( [
+                       'address' => '127.0.8.1',
+                       'by' => $this->user->getId(),
+                       'reason' => 'no reason given',
+                       'timestamp' => $prev + 3600,
+                       'auto' => true,
+                       'expiry' => 0
+               ] );
+               $this->user->mBlock->mTimestamp = 0;
+               $this->assertEquals( [ [ 'autoblockedtext',
+                       '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
+                       'Useruser', null, 'infinite', '127.0.8.1',
+                       $wgLang->timeanddate( wfTimestamp( TS_MW, $prev ), true ) ] ],
+                       $this->permissionManager->getPermissionErrors( 'move-target',
+                               $this->user, $this->title ) );
+
+               $this->assertEquals( false, $this->permissionManager
+                       ->userCan( 'move-target', $this->user, $this->title ) );
+               // quickUserCan should ignore user blocks
+               $this->assertEquals( true, $this->permissionManager
+                       ->userCan( 'move-target', $this->user, $this->title,
+                               PermissionManager::RIGOR_QUICK ) );
+
+               global $wgLocalTZoffset;
+               $wgLocalTZoffset = -60;
+               $this->user->mBlockedby = $this->user->getName();
+               $this->user->mBlock = new Block( [
+                       'address' => '127.0.8.1',
+                       'by' => $this->user->getId(),
+                       'reason' => 'no reason given',
+                       'timestamp' => $now,
+                       'auto' => false,
+                       'expiry' => 10,
+               ] );
+               $this->assertEquals( [ [ 'blockedtext',
+                       '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
+                       'Useruser', null, '23:00, 31 December 1969', '127.0.8.1',
+                       $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               # $action != 'read' && $action != 'createaccount' && $user->isBlockedFrom( $this )
+               #   $user->blockedFor() == ''
+               #   $user->mBlock->mExpiry == 'infinity'
+
+               $this->user->mBlockedby = $this->user->getName();
+               $this->user->mBlock = new Block( [
+                       'address' => '127.0.8.1',
+                       'by' => $this->user->getId(),
+                       'reason' => 'no reason given',
+                       'timestamp' => $now,
+                       'auto' => false,
+                       'expiry' => 10,
+                       'systemBlock' => 'test',
+               ] );
+
+               $errors = [ [ 'systemblockedtext',
+                       '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
+                       'Useruser', 'test', '23:00, 31 December 1969', '127.0.8.1',
+                       $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ];
+
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'rollback', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'patrol', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'upload', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'purge', $this->user, $this->title ) );
+
+               // partial block message test
+               $this->user->mBlockedby = $this->user->getName();
+               $this->user->mBlock = new Block( [
+                       'address' => '127.0.8.1',
+                       'by' => $this->user->getId(),
+                       'reason' => 'no reason given',
+                       'timestamp' => $now,
+                       'sitewide' => false,
+                       'expiry' => 10,
+               ] );
+
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'rollback', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'patrol', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'upload', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'purge', $this->user, $this->title ) );
+
+               $this->user->mBlock->setRestrictions( [
+                       ( new PageRestriction( 0, $this->title->getArticleID() ) )->setTitle( $this->title ),
+               ] );
+
+               $errors = [ [ 'blockedtext-partial',
+                       '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
+                       'Useruser', null, '23:00, 31 December 1969', '127.0.8.1',
+                       $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ];
+
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'move-target', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'rollback', $this->user, $this->title ) );
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'patrol', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'upload', $this->user, $this->title ) );
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'purge', $this->user, $this->title ) );
+
+               // Test no block.
+               $this->user->mBlockedby = null;
+               $this->user->mBlock = null;
+
+               $this->assertEquals( [],
+                       $this->permissionManager
+                               ->getPermissionErrors( 'edit', $this->user, $this->title ) );
+       }
+
+       /**
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserBlock
+        *
+        * Tests to determine that the passed in permission does not get mixed up with
+        * an action of the same name.
+        */
+       public function testUserBlockAction() {
+               global $wgLang;
+
+               $tester = $this->getMockBuilder( Action::class )
+                                          ->disableOriginalConstructor()
+                                          ->getMock();
+               $tester->method( 'getName' )
+                          ->willReturn( 'tester' );
+               $tester->method( 'getRestriction' )
+                          ->willReturn( 'test' );
+               $tester->method( 'requiresUnblock' )
+                          ->willReturn( false );
+
+               $this->setMwGlobals( [
+                       'wgActions' => [
+                               'tester' => $tester,
+                       ],
+                       'wgGroupPermissions' => [
+                               '*' => [
+                                       'tester' => true,
+                               ],
+                       ],
+               ] );
+
+               $now = time();
+               $this->user->mBlockedby = $this->user->getName();
+               $this->user->mBlock = new Block( [
+                       'address' => '127.0.8.1',
+                       'by' => $this->user->getId(),
+                       'reason' => 'no reason given',
+                       'timestamp' => $now,
+                       'auto' => false,
+                       'expiry' => 'infinity',
+               ] );
+
+               $errors = [ [ 'blockedtext',
+                       '[[User:Useruser|Useruser]]', 'no reason given', '127.0.0.1',
+                       'Useruser', null, 'infinite', '127.0.8.1',
+                       $wgLang->timeanddate( wfTimestamp( TS_MW, $now ), true ) ] ];
+
+               $this->assertEquals( $errors,
+                       $this->permissionManager
+                               ->getPermissionErrors( 'tester', $this->user, $this->title ) );
+       }
+
+       /**
+        * @covers \MediaWiki\Permissions\PermissionManager::isBlockedFrom
+        */
+       public function testBlockInstanceCache() {
+               // First, check the user isn't blocked
+               $user = $this->getMutableTestUser()->getUser();
+               $ut = Title::makeTitle( NS_USER_TALK, $user->getName() );
+               $this->assertNull( $user->getBlock( false ), 'sanity check' );
+               //$this->assertSame( '', $user->blockedBy(), 'sanity check' );
+               //$this->assertSame( '', $user->blockedFor(), 'sanity check' );
+               //$this->assertFalse( (bool)$user->isHidden(), 'sanity check' );
+               $this->assertFalse( $this->permissionManager
+                       ->isBlockedFrom( $user, $ut ), 'sanity check' );
+
+               // Block the user
+               $blocker = $this->getTestSysop()->getUser();
+               $block = new Block( [
+                       'hideName' => true,
+                       'allowUsertalk' => false,
+                       'reason' => 'Because',
+               ] );
+               $block->setTarget( $user );
+               $block->setBlocker( $blocker );
+               $res = $block->insert();
+               $this->assertTrue( (bool)$res['id'], 'sanity check: Failed to insert block' );
+
+               // Clear cache and confirm it loaded the block properly
+               $user->clearInstanceCache();
+               $this->assertInstanceOf( Block::class, $user->getBlock( false ) );
+               //$this->assertSame( $blocker->getName(), $user->blockedBy() );
+               //$this->assertSame( 'Because', $user->blockedFor() );
+               //$this->assertTrue( (bool)$user->isHidden() );
+               $this->assertTrue( $this->permissionManager->isBlockedFrom( $user, $ut ) );
+
+               // Unblock
+               $block->delete();
+
+               // Clear cache and confirm it loaded the not-blocked properly
+               $user->clearInstanceCache();
+               $this->assertNull( $user->getBlock( false ) );
+               //$this->assertSame( '', $user->blockedBy() );
+               //$this->assertSame( '', $user->blockedFor() );
+               //$this->assertFalse( (bool)$user->isHidden() );
+               $this->assertFalse( $this->permissionManager->isBlockedFrom( $user, $ut ) );
+       }
+
+       /**
+        * @covers \MediaWiki\Permissions\PermissionManager::isBlockedFrom
+        * @dataProvider provideIsBlockedFrom
+        * @param string|null $title Title to test.
+        * @param bool $expect Expected result from User::isBlockedFrom()
+        * @param array $options Additional test options:
+        *  - 'blockAllowsUTEdit': (bool, default true) Value for $wgBlockAllowsUTEdit
+        *  - 'allowUsertalk': (bool, default false) Passed to Block::__construct()
+        *  - 'pageRestrictions': (array|null) If non-empty, page restriction titles for the block.
+        */
+       public function testIsBlockedFrom( $title, $expect, array $options = [] ) {
+               $this->setMwGlobals( [
+                       'wgBlockAllowsUTEdit' => $options['blockAllowsUTEdit'] ?? true,
+               ] );
+
+               $user = $this->getTestUser()->getUser();
+
+               if ( $title === self::USER_TALK_PAGE ) {
+                       $title = $user->getTalkPage();
+               } else {
+                       $title = Title::newFromText( $title );
+               }
+
+               $restrictions = [];
+               foreach ( $options['pageRestrictions'] ?? [] as $pagestr ) {
+                       $page = $this->getExistingTestPage(
+                               $pagestr === self::USER_TALK_PAGE ? $user->getTalkPage() : $pagestr
+                       );
+                       $restrictions[] = new PageRestriction( 0, $page->getId() );
+               }
+               foreach ( $options['namespaceRestrictions'] ?? [] as $ns ) {
+                       $restrictions[] = new NamespaceRestriction( 0, $ns );
+               }
+
+               $block = new Block( [
+                       'expiry' => wfTimestamp( TS_MW, wfTimestamp() + ( 40 * 60 * 60 ) ),
+                       'allowUsertalk' => $options['allowUsertalk'] ?? false,
+                       'sitewide' => !$restrictions,
+               ] );
+               $block->setTarget( $user );
+               $block->setBlocker( $this->getTestSysop()->getUser() );
+               if ( $restrictions ) {
+                       $block->setRestrictions( $restrictions );
+               }
+               $block->insert();
+
+               try {
+                       $this->assertSame( $expect, $this->permissionManager->isBlockedFrom( $user, $title ) );
+               } finally {
+                       $block->delete();
+               }
+       }
+
+       public static function provideIsBlockedFrom() {
+               return [
+                       'Sitewide block, basic operation' => [ 'Test page', true ],
+                       'Sitewide block, not allowing user talk' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => false,
+                               ]
+                       ],
+                       'Sitewide block, allowing user talk' => [
+                               self::USER_TALK_PAGE, false, [
+                                       'allowUsertalk' => true,
+                               ]
+                       ],
+                       'Sitewide block, allowing user talk but $wgBlockAllowsUTEdit is false' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => true,
+                                       'blockAllowsUTEdit' => false,
+                               ]
+                       ],
+                       'Partial block, blocking the page' => [
+                               'Test page', true, [
+                                       'pageRestrictions' => [ 'Test page' ],
+                               ]
+                       ],
+                       'Partial block, not blocking the page' => [
+                               'Test page 2', false, [
+                                       'pageRestrictions' => [ 'Test page' ],
+                               ]
+                       ],
+                       'Partial block, not allowing user talk but user talk page is not blocked' => [
+                               self::USER_TALK_PAGE, false, [
+                                       'allowUsertalk' => false,
+                                       'pageRestrictions' => [ 'Test page' ],
+                               ]
+                       ],
+                       'Partial block, allowing user talk but user talk page is blocked' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => true,
+                                       'pageRestrictions' => [ self::USER_TALK_PAGE ],
+                               ]
+                       ],
+                       'Partial block, user talk page is not blocked but $wgBlockAllowsUTEdit is false' => [
+                               self::USER_TALK_PAGE, false, [
+                                       'allowUsertalk' => false,
+                                       'pageRestrictions' => [ 'Test page' ],
+                                       'blockAllowsUTEdit' => false,
+                               ]
+                       ],
+                       'Partial block, user talk page is blocked and $wgBlockAllowsUTEdit is false' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => true,
+                                       'pageRestrictions' => [ self::USER_TALK_PAGE ],
+                                       'blockAllowsUTEdit' => false,
+                               ]
+                       ],
+                       'Partial user talk namespace block, not allowing user talk' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => false,
+                                       'namespaceRestrictions' => [ NS_USER_TALK ],
+                               ]
+                       ],
+                       'Partial user talk namespace block, allowing user talk' => [
+                               self::USER_TALK_PAGE, false, [
+                                       'allowUsertalk' => true,
+                                       'namespaceRestrictions' => [ NS_USER_TALK ],
+                               ]
+                       ],
+                       'Partial user talk namespace block, where $wgBlockAllowsUTEdit is false' => [
+                               self::USER_TALK_PAGE, true, [
+                                       'allowUsertalk' => true,
+                                       'namespaceRestrictions' => [ NS_USER_TALK ],
+                                       'blockAllowsUTEdit' => false,
+                               ]
+                       ],
+               ];
+       }
+
+}
index 13def70..f7ffe8d 100644 (file)
@@ -6,8 +6,8 @@ use MediaWiki\MediaWikiServices;
 /**
  * @group Database
  *
- * @covers Title::getUserPermissionsErrors
- * @covers Title::getUserPermissionsErrorsInternal
+ * @covers \MediaWiki\Permissions\PermissionManager::getPermissionErrors
+ * @covers \MediaWiki\Permissions\PermissionManager::getPermissionErrorsInternal
  */
 class TitlePermissionTest extends MediaWikiLangTestCase {
 
@@ -104,7 +104,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
         * This test is failing per T201776.
         *
         * @group Broken
-        * @covers Title::checkQuickPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkQuickPermissions
         */
        public function testQuickPermissions() {
                $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
@@ -395,7 +395,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkSpecialsAndNSPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkSpecialsAndNSPermissions
         */
        public function testSpecialsAndNSPermissions() {
                global $wgNamespaceProtection;
@@ -452,7 +452,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testJsConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -475,7 +475,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testJsonConfigEditPermissions() {
                $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
@@ -500,7 +500,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testCssConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -523,7 +523,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testOtherJsConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -546,7 +546,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testOtherJsonConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -569,7 +569,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testOtherCssConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -592,7 +592,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testOtherNonConfigEditPermissions() {
                $this->setUser( $this->userName );
@@ -614,7 +614,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
 
        /**
         * @todo This should use data providers like the other methods here.
-        * @covers Title::checkUserConfigPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserConfigPermissions
         */
        public function testPatrolActionConfigEditPermissions() {
                $this->setUser( 'anon' );
@@ -687,7 +687,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
         * This test is failing per T201776.
         *
         * @group Broken
-        * @covers Title::checkPageRestrictions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkPageRestrictions
         */
        public function testPageRestrictions() {
                $prefix = MediaWikiServices::getInstance()->getContentLanguage()->
@@ -780,7 +780,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        }
 
        /**
-        * @covers Title::checkCascadingSourcesRestrictions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkCascadingSourcesRestrictions
         */
        public function testCascadingSourcesRestrictions() {
                $this->setTitle( NS_MAIN, "test page" );
@@ -811,7 +811,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        /**
         * @todo This test method should be split up into separate test methods and
         * data providers
-        * @covers Title::checkActionPermissions
+        * @covers \MediaWiki\Permissions\PermissionManager::checkActionPermissions
         */
        public function testActionPermissions() {
                $this->setUserPerm( [ "createpage" ] );
@@ -885,13 +885,14 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        }
 
        /**
-        * @covers Title::checkUserBlock
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserBlock
         */
        public function testUserBlock() {
                $this->setMwGlobals( [
                        'wgEmailConfirmToEdit' => true,
                        'wgEmailAuthentication' => true,
                ] );
+               $this->overrideMwServices();
 
                $this->setUserPerm( [ 'createpage', 'edit', 'move', 'rollback', 'patrol', 'upload', 'purge' ] );
                $this->setTitle( NS_HELP, "test page" );
@@ -903,6 +904,8 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
                        $this->title->getUserPermissionsErrors( 'edit', $this->user ) );
 
                $this->setMwGlobals( 'wgEmailConfirmToEdit', false );
+               $this->overrideMwServices();
+
                $this->assertNotContains( [ 'confirmedittext' ],
                        $this->title->getUserPermissionsErrors( 'edit', $this->user ) );
 
@@ -1039,7 +1042,7 @@ class TitlePermissionTest extends MediaWikiLangTestCase {
        }
 
        /**
-        * @covers Title::checkUserBlock
+        * @covers \MediaWiki\Permissions\PermissionManager::checkUserBlock
         *
         * Tests to determine that the passed in permission does not get mixed up with
         * an action of the same name.
index 35b196a..149c25b 100644 (file)
@@ -1,5 +1,6 @@
 <?php
 
+use MediaWiki\Linker\LinkTarget;
 use MediaWiki\MediaWikiServices;
 
 /**
@@ -326,7 +327,7 @@ class TitleTest extends MediaWikiTestCase {
         * @param string $action
         * @param array|string|bool $expected Required error
         *
-        * @covers Title::checkReadPermissions
+        * @covers \Mediawiki\Permissions\PermissionManager::checkReadPermissions
         * @dataProvider dataWgWhitelistReadRegexp
         */
        public function testWgWhitelistReadRegexp( $whitelistRegexp, $source, $action, $expected ) {
@@ -564,6 +565,32 @@ class TitleTest extends MediaWikiTestCase {
                $this->assertEquals( $value->getFragment(), $title->getFragment() );
        }
 
+       /**
+        * @covers Title::newFromLinkTarget
+        * @dataProvider provideNewFromTitleValue
+        */
+       public function testNewFromLinkTarget( LinkTarget $value ) {
+               $title = Title::newFromLinkTarget( $value );
+
+               $dbkey = str_replace( ' ', '_', $value->getText() );
+               $this->assertEquals( $dbkey, $title->getDBkey() );
+               $this->assertEquals( $value->getNamespace(), $title->getNamespace() );
+               $this->assertEquals( $value->getFragment(), $title->getFragment() );
+       }
+
+       /**
+        * @covers Title::newFromLinkTarget
+        */
+       public function testNewFromLinkTarget_clone() {
+               $title = Title::newFromText( __METHOD__ );
+               $this->assertSame( $title, Title::newFromLinkTarget( $title ) );
+
+               // The Title::NEW_CLONE flag should ensure that a fresh instance is returned.
+               $clone = Title::newFromLinkTarget( $title, Title::NEW_CLONE );
+               $this->assertNotSame( $title, $clone );
+               $this->assertTrue( $clone->equals( $title ) );
+       }
+
        public static function provideGetTitleValue() {
                return [
                        [ 'Foo' ],
index d3a4ed4..55f4a33 100644 (file)
@@ -590,7 +590,10 @@ class ApiQuerySiteinfoTest extends ApiTestCase {
        }
 
        public function testVariables() {
-               $this->assertSame( MagicWord::getVariableIDs(), $this->doQuery( 'variables' ) );
+               $this->assertSame(
+                       MediaWikiServices::getInstance()->getMagicWordFactory()->getVariableIDs(),
+                       $this->doQuery( 'variables' )
+               );
        }
 
        public function testProtocols() {
index 02c25e7..7d13ac6 100644 (file)
@@ -23,7 +23,6 @@
  * @copyright © 2013 Wikimedia Foundation Inc.
  */
 
-use Wikimedia\Rdbms\Database;
 use Wikimedia\Rdbms\IDatabase;
 use Wikimedia\Rdbms\IMaintainableDatabase;
 use Wikimedia\Rdbms\LBFactory;
@@ -730,7 +729,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                $factory->destroy();
        }
 
-       private function quoteTable( Database $db, $table ) {
+       private function quoteTable( IDatabase $db, $table ) {
                if ( $db->getType() === 'sqlite' ) {
                        return $table;
                } else {
index 2c4e6b4..4291bcc 100644 (file)
@@ -32,7 +32,7 @@ use Wikimedia\Rdbms\LoadMonitorNull;
  * @covers \Wikimedia\Rdbms\LoadBalancer
  */
 class LoadBalancerTest extends MediaWikiTestCase {
-       private function makeServerConfig() {
+       private function makeServerConfig( $flags = DBO_DEFAULT ) {
                global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir;
 
                return [
@@ -44,7 +44,7 @@ class LoadBalancerTest extends MediaWikiTestCase {
                        'type' => $wgDBtype,
                        'dbDirectory' => $wgSQLiteDataDir,
                        'load' => 0,
-                       'flags' => DBO_TRX // REPEATABLE-READ for consistency
+                       'flags' => $flags
                ];
        }
 
@@ -57,7 +57,8 @@ class LoadBalancerTest extends MediaWikiTestCase {
 
                $called = false;
                $lb = new LoadBalancer( [
-                       'servers' => [ $this->makeServerConfig() ],
+                       // Simulate web request with DBO_TRX
+                       'servers' => [ $this->makeServerConfig( DBO_TRX ) ],
                        'queryLogger' => MediaWiki\Logger\LoggerFactory::getInstance( 'DBQuery' ),
                        'localDomain' => new DatabaseDomain( $wgDBname, null, $this->dbPrefix() ),
                        'chronologyCallback' => function () use ( &$called ) {
@@ -71,8 +72,8 @@ class LoadBalancerTest extends MediaWikiTestCase {
                $this->assertSame( 'my_test_wiki', $lb->resolveDomainID( 'my_test_wiki' ) );
                $this->assertSame( $ld->getId(), $lb->resolveDomainID( false ) );
                $this->assertSame( $ld->getId(), $lb->resolveDomainID( $ld ) );
-
                $this->assertFalse( $called );
+
                $dbw = $lb->getConnection( DB_MASTER );
                $this->assertTrue( $called );
                $this->assertTrue( $dbw->getLBInfo( 'master' ), 'master shows as master' );
@@ -106,39 +107,10 @@ class LoadBalancerTest extends MediaWikiTestCase {
        }
 
        public function testWithReplica() {
-               global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir;
-
-               $servers = [
-                       [ // master
-                               'host'        => $wgDBserver,
-                               'dbname'      => $wgDBname,
-                               'tablePrefix' => $this->dbPrefix(),
-                               'user'        => $wgDBuser,
-                               'password'    => $wgDBpassword,
-                               'type'        => $wgDBtype,
-                               'dbDirectory' => $wgSQLiteDataDir,
-                               'load'        => 0,
-                               'flags'       => DBO_TRX // REPEATABLE-READ for consistency
-                       ],
-                       [ // emulated replica
-                               'host'        => $wgDBserver,
-                               'dbname'      => $wgDBname,
-                               'tablePrefix' => $this->dbPrefix(),
-                               'user'        => $wgDBuser,
-                               'password'    => $wgDBpassword,
-                               'type'        => $wgDBtype,
-                               'dbDirectory' => $wgSQLiteDataDir,
-                               'load'        => 100,
-                               'flags'       => DBO_TRX // REPEATABLE-READ for consistency
-                       ]
-               ];
+               global $wgDBserver;
 
-               $lb = new LoadBalancer( [
-                       'servers' => $servers,
-                       'localDomain' => new DatabaseDomain( $wgDBname, null, $this->dbPrefix() ),
-                       'queryLogger' => MediaWiki\Logger\LoggerFactory::getInstance( 'DBQuery' ),
-                       'loadMonitorClass' => LoadMonitorNull::class
-               ] );
+               // Simulate web request with DBO_TRX
+               $lb = $this->newMultiServerLocalLoadBalancer( DBO_TRX );
 
                $dbw = $lb->getConnection( DB_MASTER );
                $this->assertTrue( $dbw->getLBInfo( 'master' ), 'master shows as master' );
@@ -180,6 +152,51 @@ class LoadBalancerTest extends MediaWikiTestCase {
                $lb->closeAll();
        }
 
+       private function newSingleServerLocalLoadBalancer() {
+               global $wgDBname;
+
+               return new LoadBalancer( [
+                       'servers' => [ $this->makeServerConfig() ],
+                       'localDomain' => new DatabaseDomain( $wgDBname, null, $this->dbPrefix() )
+               ] );
+       }
+
+       private function newMultiServerLocalLoadBalancer( $flags = DBO_DEFAULT ) {
+               global $wgDBserver, $wgDBname, $wgDBuser, $wgDBpassword, $wgDBtype, $wgSQLiteDataDir;
+
+               $servers = [
+                       [ // master
+                               'host' => $wgDBserver,
+                               'dbname' => $wgDBname,
+                               'tablePrefix' => $this->dbPrefix(),
+                               'user' => $wgDBuser,
+                               'password' => $wgDBpassword,
+                               'type' => $wgDBtype,
+                               'dbDirectory' => $wgSQLiteDataDir,
+                               'load' => 0,
+                               'flags' => $flags
+                       ],
+                       [ // emulated replica
+                               'host' => $wgDBserver,
+                               'dbname' => $wgDBname,
+                               'tablePrefix' => $this->dbPrefix(),
+                               'user' => $wgDBuser,
+                               'password' => $wgDBpassword,
+                               'type' => $wgDBtype,
+                               'dbDirectory' => $wgSQLiteDataDir,
+                               'load' => 100,
+                               'flags' => $flags
+                       ]
+               ];
+
+               return new LoadBalancer( [
+                       'servers' => $servers,
+                       'localDomain' => new DatabaseDomain( $wgDBname, null, $this->dbPrefix() ),
+                       'queryLogger' => MediaWiki\Logger\LoggerFactory::getInstance( 'DBQuery' ),
+                       'loadMonitorClass' => LoadMonitorNull::class
+               ] );
+       }
+
        private function assertWriteForbidden( Database $db ) {
                try {
                        $db->delete( 'some_table', [ 'id' => 57634126 ], __METHOD__ );
@@ -286,20 +303,20 @@ class LoadBalancerTest extends MediaWikiTestCase {
         * @covers LoadBalancer::getAnyOpenConnection()
         */
        function testOpenConnection() {
-               global $wgDBname;
-
-               $lb = new LoadBalancer( [
-                       'servers' => [ $this->makeServerConfig() ],
-                       'localDomain' => new DatabaseDomain( $wgDBname, null, $this->dbPrefix() )
-               ] );
+               $lb = $this->newSingleServerLocalLoadBalancer();
 
                $i = $lb->getWriterIndex();
                $this->assertEquals( null, $lb->getAnyOpenConnection( $i ) );
+
                $conn1 = $lb->getConnection( $i );
                $this->assertNotEquals( null, $conn1 );
                $this->assertEquals( $conn1, $lb->getAnyOpenConnection( $i ) );
+               $this->assertFalse( $conn1->getFlag( DBO_TRX ) );
+
                $conn2 = $lb->getConnection( $i, [], false, $lb::CONN_TRX_AUTOCOMMIT );
                $this->assertNotEquals( null, $conn2 );
+               $this->assertFalse( $conn2->getFlag( DBO_TRX ) );
+
                if ( $lb->getServerAttributes( $i )[Database::ATTR_DB_LEVEL_LOCKING] ) {
                        $this->assertEquals( null,
                                $lb->getAnyOpenConnection( $i, $lb::CONN_TRX_AUTOCOMMIT ) );
@@ -343,7 +360,7 @@ class LoadBalancerTest extends MediaWikiTestCase {
                                'type' => $wgDBtype,
                                'dbDirectory' => $wgSQLiteDataDir,
                                'load' => 0,
-                               'flags' => DBO_TRX // REPEATABLE-READ for consistency
+                               'flags' => DBO_TRX // simulate a web request with DBO_TRX
                        ],
                ];
 
@@ -416,4 +433,60 @@ class LoadBalancerTest extends MediaWikiTestCase {
                $conn1->close();
                $conn2->close();
        }
+
+       public function testDBConnRefReadsMasterAndReplicaRoles() {
+               $lb = $this->newSingleServerLocalLoadBalancer();
+
+               $rConn = $lb->getConnectionRef( DB_REPLICA );
+               $wConn = $lb->getConnectionRef( DB_MASTER );
+               $wConn2 = $lb->getConnectionRef( 0 );
+
+               $v = [ 'value' => '1', '1' ];
+               $sql = 'SELECT MAX(1) AS value';
+               foreach ( [ $rConn, $wConn, $wConn2 ] as $conn ) {
+                       $conn->clearFlag( $conn::DBO_TRX );
+
+                       $res = $conn->query( $sql, __METHOD__ );
+                       $this->assertEquals( $v, $conn->fetchRow( $res ) );
+
+                       $res = $conn->query( $sql, __METHOD__, $conn::QUERY_REPLICA_ROLE );
+                       $this->assertEquals( $v, $conn->fetchRow( $res ) );
+               }
+
+               $wConn->getScopedLockAndFlush( 'key', __METHOD__, 1 );
+               $wConn2->getScopedLockAndFlush( 'key2', __METHOD__, 1 );
+       }
+
+       /**
+        * @expectedException \Wikimedia\Rdbms\DBReadOnlyRoleError
+        */
+       public function testDBConnRefWritesReplicaRole() {
+               $lb = $this->newSingleServerLocalLoadBalancer();
+
+               $rConn = $lb->getConnectionRef( DB_REPLICA );
+
+               $rConn->query( 'DELETE FROM sometesttable WHERE 1=0' );
+       }
+
+       /**
+        * @expectedException \Wikimedia\Rdbms\DBReadOnlyRoleError
+        */
+       public function testDBConnRefWritesReplicaRoleIndex() {
+               $lb = $this->newMultiServerLocalLoadBalancer();
+
+               $rConn = $lb->getConnectionRef( 1 );
+
+               $rConn->query( 'DELETE FROM sometesttable WHERE 1=0' );
+       }
+
+       /**
+        * @expectedException \Wikimedia\Rdbms\DBReadOnlyRoleError
+        */
+       public function testDBConnRefWritesReplicaRoleInsert() {
+               $lb = $this->newMultiServerLocalLoadBalancer();
+
+               $rConn = $lb->getConnectionRef( DB_REPLICA );
+
+               $rConn->insert( 'test', [ 't' => 1 ], __METHOD__ );
+       }
 }
index 9b72b95..33e5c3b 100644 (file)
@@ -75,12 +75,12 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
         */
        private function getDBConnRef( ILoadBalancer $lb = null ) {
                $lb = $lb ?: $this->getLoadBalancerMock();
-               return new DBConnRef( $lb, $this->getDatabaseMock() );
+               return new DBConnRef( $lb, $this->getDatabaseMock(), DB_MASTER );
        }
 
        public function testConstruct() {
                $lb = $this->getLoadBalancerMock();
-               $ref = new DBConnRef( $lb, $this->getDatabaseMock() );
+               $ref = new DBConnRef( $lb, $this->getDatabaseMock(), DB_MASTER );
 
                $this->assertInstanceOf( ResultWrapper::class, $ref->select( 'whatever', '*' ) );
        }
@@ -99,10 +99,19 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
 
                $ref = new DBConnRef(
                        $lb,
-                       [ DB_MASTER, [ 'test' ], 'dummy', ILoadBalancer::CONN_TRX_AUTOCOMMIT ]
+                       [ DB_MASTER, [ 'test' ], 'dummy', ILoadBalancer::CONN_TRX_AUTOCOMMIT ],
+                       DB_MASTER
                );
 
                $this->assertInstanceOf( ResultWrapper::class, $ref->select( 'whatever', '*' ) );
+               $this->assertEquals( DB_MASTER, $ref->getReferenceRole() );
+
+               $ref2 = new DBConnRef(
+                       $lb,
+                       [ DB_MASTER, [ 'test' ], 'dummy', ILoadBalancer::CONN_TRX_AUTOCOMMIT ],
+                       DB_REPLICA
+               );
+               $this->assertEquals( DB_REPLICA, $ref2->getReferenceRole() );
        }
 
        public function testDestruct() {
@@ -124,7 +133,7 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
                $this->setExpectedException( InvalidArgumentException::class, '' );
 
                $lb = $this->getLoadBalancerMock();
-               new DBConnRef( $lb, 17 ); // bad constructor argument
+               new DBConnRef( $lb, 17, DB_REPLICA ); // bad constructor argument
        }
 
        /**
@@ -137,7 +146,7 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
                $lb->expects( $this->never() )
                        ->method( 'getConnection' );
 
-               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ] );
+               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ], DB_REPLICA );
 
                $this->assertSame( 'dummy', $ref->getDomainID() );
        }
@@ -156,7 +165,7 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
                $this->assertInternalType( 'string', $ref->__toString() );
 
                $lb = $this->getLoadBalancerMock();
-               $ref = new DBConnRef( $lb, [ DB_MASTER, [], 'test', 0 ] );
+               $ref = new DBConnRef( $lb, [ DB_MASTER, [], 'test', 0 ], DB_MASTER );
                $this->assertInternalType( 'string', $ref->__toString() );
        }
 
@@ -166,7 +175,49 @@ class DBConnRefTest extends PHPUnit\Framework\TestCase {
         */
        public function testClose() {
                $lb = $this->getLoadBalancerMock();
-               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ] );
+               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ], DB_MASTER );
                $ref->close();
        }
+
+       /**
+        * @covers Wikimedia\Rdbms\DBConnRef::getReferenceRole
+        */
+       public function testGetReferenceRole() {
+               $lb = $this->getLoadBalancerMock();
+               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ], DB_REPLICA );
+               $this->assertSame( DB_REPLICA, $ref->getReferenceRole() );
+
+               $ref = new DBConnRef( $lb, [ DB_MASTER, [], 'dummy', 0 ], DB_MASTER );
+               $this->assertSame( DB_MASTER, $ref->getReferenceRole() );
+
+               $ref = new DBConnRef( $lb, [ 1, [], 'dummy', 0 ], DB_REPLICA );
+               $this->assertSame( DB_REPLICA, $ref->getReferenceRole() );
+
+               $ref = new DBConnRef( $lb, [ 0, [], 'dummy', 0 ], DB_MASTER );
+               $this->assertSame( DB_MASTER, $ref->getReferenceRole() );
+       }
+
+       /**
+        * @covers Wikimedia\Rdbms\DBConnRef::getReferenceRole
+        * @expectedException Wikimedia\Rdbms\DBReadOnlyRoleError
+        * @dataProvider provideRoleExceptions
+        */
+       public function testRoleExceptions( $method, $args ) {
+               $lb = $this->getLoadBalancerMock();
+               $ref = new DBConnRef( $lb, [ DB_REPLICA, [], 'dummy', 0 ], DB_REPLICA );
+               $ref->$method( ...$args );
+       }
+
+       function provideRoleExceptions() {
+               return [
+                       [ 'insert', [ 'table', [ 'a' => 1 ] ] ],
+                       [ 'update', [ 'table', [ 'a' => 1 ], [ 'a' => 2 ] ] ],
+                       [ 'delete', [ 'table', [ 'a' => 1 ] ] ],
+                       [ 'replace', [ 'table', [ 'a' ], [ 'a' => 1 ] ] ],
+                       [ 'upsert', [ 'table', [ 'a' => 1 ], [ 'a' ], [ 'a = a + 1' ] ] ],
+                       [ 'lock', [ 'k', 'method' ] ],
+                       [ 'unlock', [ 'k', 'method' ] ],
+                       [ 'getScopedLockAndFlush', [ 'k', 'method', 1 ] ]
+               ];
+       }
 }
index 7a536df..2e9acfa 100644 (file)
@@ -70,16 +70,10 @@ abstract class MediaWikiMediaTestCase extends MediaWikiTestCase {
         *
         * File must be in the path returned by getFilePath()
         * @param string $name File name
-        * @param string|null $type MIME type [optional]
+        * @param string|false $type MIME type [optional]
         * @return UnregisteredLocalFile
         */
-       protected function dataFile( $name, $type = null ) {
-               if ( !$type ) {
-                       // Autodetect by file extension for the lazy.
-                       $magic = MediaWiki\MediaWikiServices::getInstance()->getMimeAnalyzer();
-                       $parts = explode( $name, '.' );
-                       $type = $magic->guessTypesForExtension( $parts[count( $parts ) - 1] );
-               }
+       protected function dataFile( $name, $type = false ) {
                return new UnregisteredLocalFile( false, $this->repo,
                        "mwstore://localtesting/data/$name", $type );
        }
index 825c9b9..9ab3a2d 100644 (file)
@@ -120,7 +120,7 @@ Deprecation message.' ]
                // phpcs:enable
                $expected = self::expandVariables( $expected );
 
-               $this->assertEquals( $expected, $client->getHeadHtml() );
+               $this->assertSame( $expected, (string)$client->getHeadHtml() );
        }
 
        /**
@@ -137,7 +137,7 @@ Deprecation message.' ]
                        . '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;skin=fallback&amp;target=example"></script>';
                // phpcs:enable
 
-               $this->assertEquals( $expected, $client->getHeadHtml() );
+               $this->assertSame( $expected, (string)$client->getHeadHtml() );
        }
 
        /**
@@ -154,7 +154,7 @@ Deprecation message.' ]
                        . '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;safemode=1&amp;skin=fallback"></script>';
                // phpcs:enable
 
-               $this->assertEquals( $expected, $client->getHeadHtml() );
+               $this->assertSame( $expected, (string)$client->getHeadHtml() );
        }
 
        /**
@@ -171,7 +171,7 @@ Deprecation message.' ]
                        . '<script async="" src="/w/load.php?lang=nl&amp;modules=startup&amp;only=scripts&amp;skin=fallback"></script>';
                // phpcs:enable
 
-               $this->assertEquals( $expected, $client->getHeadHtml() );
+               $this->assertSame( $expected, (string)$client->getHeadHtml() );
        }
 
        public function testGetBodyHtml() {
@@ -193,7 +193,7 @@ Deprecation message.' ]
                        . '});</script>';
                // phpcs:enable
 
-               $this->assertEquals( $expected, $client->getBodyHtml() );
+               $this->assertSame( $expected, (string)$client->getBodyHtml() );
        }
 
        public static function provideMakeLoad() {
@@ -339,7 +339,7 @@ Deprecation message.' ]
                $context->getResourceLoader()->register( self::makeSampleModules() );
                $actual = ResourceLoaderClientHtml::makeLoad( $context, $modules, $type, $extraQuery, false );
                $expected = self::expandVariables( $expected );
-               $this->assertEquals( $expected, (string)$actual );
+               $this->assertSame( $expected, (string)$actual );
        }
 
        public function testGetDocumentAttributes() {
index e17c78d..8b3427f 100644 (file)
                assert.deepEqual(
                        [ {
                                topic: 'resourceloader.exception',
-                               error: 'Unknown dependency: test.load.unreg',
+                               error: 'Unknown module: test.load.unreg',
                                source: 'resolve'
                        } ],
                        capture
                assert.deepEqual(
                        [ {
                                topic: 'resourceloader.exception',
-                               error: 'Unknown dependency: test.load.missingdep2',
+                               error: 'Unknown module: test.load.missingdep2',
                                source: 'resolve'
                        } ],
                        capture
index 805b793..648e52f 100644 (file)
@@ -50,7 +50,9 @@ describe( 'Rollback with confirmation', function () {
 
        it( 'should offer a way to cancel rollbacks', function () {
                HistoryPage.rollback.click();
+
                browser.pause( 300 );
+
                HistoryPage.rollbackConfirmableNo.click();
 
                browser.pause( 500 );
@@ -60,6 +62,9 @@ describe( 'Rollback with confirmation', function () {
 
        it( 'should perform rollbacks after confirming intention', function () {
                HistoryPage.rollback.click();
+
+               browser.pause( 300 );
+
                HistoryPage.rollbackConfirmableYes.click();
 
                // waitUntil indirectly asserts that the content we are looking for is present