Merge "Setup.php: Ensure that defaults for 'rcdays' and 'watchlistdays' are not invalid"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 6 Jan 2016 22:24:20 +0000 (22:24 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 6 Jan 2016 22:24:20 +0000 (22:24 +0000)
307 files changed:
RELEASE-NOTES-1.27
autoload.php
composer.json
docs/extension.schema.json
docs/hooks.txt
includes/AjaxResponse.php
includes/Block.php
includes/CategoryViewer.php
includes/DefaultSettings.php
includes/DerivativeRequest.php [new file with mode: 0644]
includes/Export.php [deleted file]
includes/FauxRequest.php [new file with mode: 0644]
includes/GlobalFunctions.php
includes/Import.php [deleted file]
includes/Linker.php
includes/OutputPage.php
includes/Setup.php
includes/Title.php
includes/WebRequest.php
includes/api/ApiMain.php
includes/api/ApiQuery.php
includes/api/ApiQueryRecentChanges.php
includes/api/i18n/ce.json
includes/api/i18n/de.json
includes/api/i18n/hu.json
includes/api/i18n/it.json
includes/api/i18n/qqq.json
includes/api/i18n/tt-cyrl.json [new file with mode: 0644]
includes/api/i18n/zh-hans.json
includes/cache/HTMLFileCache.php
includes/changes/ChangesList.php
includes/changes/EnhancedChangesList.php
includes/changes/OldChangesList.php
includes/changes/RecentChange.php
includes/context/RequestContext.php
includes/db/DBConnRef.php
includes/db/Database.php
includes/db/IDatabase.php
includes/debug/MWDebug.php
includes/debug/logger/LegacyLogger.php
includes/export/Dump7ZipOutput.php [new file with mode: 0644]
includes/export/DumpBZip2Output.php [new file with mode: 0644]
includes/export/DumpDBZip2Output.php [new file with mode: 0644]
includes/export/DumpFileOutput.php [new file with mode: 0644]
includes/export/DumpFilter.php [new file with mode: 0644]
includes/export/DumpGZipOutput.php [new file with mode: 0644]
includes/export/DumpLatestFilter.php [new file with mode: 0644]
includes/export/DumpMultiWriter.php [new file with mode: 0644]
includes/export/DumpNamespaceFilter.php [new file with mode: 0644]
includes/export/DumpNotalkFilter.php [new file with mode: 0644]
includes/export/DumpOutput.php [new file with mode: 0644]
includes/export/DumpPipeOutput.php [new file with mode: 0644]
includes/export/WikiExporter.php [new file with mode: 0644]
includes/export/XmlDumpWriter.php [new file with mode: 0644]
includes/filebackend/FSFileBackend.php
includes/filebackend/FileOpBatch.php
includes/filerepo/ForeignAPIRepo.php
includes/htmlform/HTMLButtonField.php
includes/htmlform/HTMLForm.php
includes/htmlform/HTMLFormField.php
includes/htmlform/OOUIHTMLForm.php
includes/import/ImportSource.php [new file with mode: 0644]
includes/import/ImportStreamSource.php [new file with mode: 0644]
includes/import/ImportStringSource.php [new file with mode: 0644]
includes/import/UploadSourceAdapter.php [new file with mode: 0644]
includes/import/WikiImporter.php [new file with mode: 0644]
includes/import/WikiRevision.php [new file with mode: 0644]
includes/installer/i18n/bg.json
includes/installer/i18n/ce.json
includes/installer/i18n/el.json
includes/installer/i18n/ksh.json
includes/installer/i18n/uk.json
includes/installer/i18n/wuu.json
includes/logging/LogEntry.php
includes/logging/LogPage.php
includes/page/WikiPage.php
includes/parser/Parser.php
includes/registration/ExtensionProcessor.php
includes/registration/ExtensionRegistry.php
includes/registration/Processor.php
includes/search/SearchNearMatchResultSet.php [new file with mode: 0644]
includes/search/SearchResultSet.php
includes/search/SqlSearchResultSet.php [new file with mode: 0644]
includes/site/MediaWikiPageNameNormalizer.php [new file with mode: 0644]
includes/site/MediaWikiSite.php
includes/skins/Skin.php
includes/specialpage/QueryPage.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBlockList.php
includes/specials/SpecialChangePassword.php
includes/specials/SpecialComparePages.php
includes/specials/SpecialConfirmemail.php
includes/specials/SpecialContributions.php
includes/specials/SpecialDeletedContributions.php
includes/specials/SpecialEmailInvalidate.php [new file with mode: 0644]
includes/specials/SpecialEmailuser.php
includes/specials/SpecialExpandTemplates.php
includes/specials/SpecialExport.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialListfiles.php
includes/specials/SpecialMediaStatistics.php
includes/specials/SpecialPreferences.php
includes/specials/SpecialShortpages.php
includes/specials/SpecialUnblock.php
includes/specials/SpecialUpload.php
includes/specials/SpecialUserrights.php
includes/templates/EnhancedChangesListGroup.mustache [new file with mode: 0644]
includes/user/User.php
includes/user/UserNamePrefixSearch.php [new file with mode: 0644]
languages/classes/LanguageOs.php
languages/i18n/ast.json
languages/i18n/az.json
languages/i18n/azb.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bg.json
languages/i18n/bgn.json
languages/i18n/bs.json
languages/i18n/ca.json
languages/i18n/ce.json
languages/i18n/cs.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/el.json
languages/i18n/en.json
languages/i18n/es.json
languages/i18n/ext.json
languages/i18n/fa.json
languages/i18n/fr.json
languages/i18n/gl.json
languages/i18n/he.json
languages/i18n/hif-latn.json
languages/i18n/hr.json
languages/i18n/hu.json
languages/i18n/id.json
languages/i18n/ilo.json
languages/i18n/is.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/ka.json
languages/i18n/kk-cyrl.json
languages/i18n/ksh.json
languages/i18n/la.json
languages/i18n/lb.json
languages/i18n/lki.json
languages/i18n/mai.json
languages/i18n/mk.json
languages/i18n/ml.json
languages/i18n/nap.json
languages/i18n/nn.json
languages/i18n/pam.json
languages/i18n/pl.json
languages/i18n/pt-br.json
languages/i18n/qqq.json
languages/i18n/ro.json
languages/i18n/ru.json
languages/i18n/sa.json
languages/i18n/sd.json
languages/i18n/sk.json
languages/i18n/sl.json
languages/i18n/sq.json
languages/i18n/sv.json
languages/i18n/tg-cyrl.json
languages/i18n/th.json
languages/i18n/tr.json
languages/i18n/tt-cyrl.json
languages/i18n/ug-arab.json
languages/i18n/uk.json
languages/i18n/ur.json
languages/i18n/wuu.json
languages/i18n/zh-hans.json
maintenance/Maintenance.php
maintenance/archives/upgradeLogging.php
maintenance/attachLatest.php
maintenance/backup.inc
maintenance/backupTextPass.inc [deleted file]
maintenance/benchmarks/Benchmarker.php
maintenance/benchmarks/bench_delete_truncate.php
maintenance/benchmarks/benchmarkParse.php
maintenance/checkBadRedirects.php
maintenance/checkImages.php
maintenance/checkUsernames.php
maintenance/cleanupAncientTables.php
maintenance/cleanupBlocks.php
maintenance/cleanupImages.php
maintenance/cleanupPreferences.php
maintenance/cleanupRemovedModules.php
maintenance/cleanupSpam.php
maintenance/cleanupTable.inc
maintenance/cleanupTitles.php
maintenance/cleanupWatchlist.php
maintenance/clearInterwikiCache.php
maintenance/convertLinks.php
maintenance/convertUserOptions.php
maintenance/deleteArchivedFiles.php
maintenance/deleteBatch.php
maintenance/deleteDefaultMessages.php
maintenance/deleteEqualMessages.php
maintenance/deleteOldRevisions.php
maintenance/deleteOrphanedRevisions.php
maintenance/deleteRevision.php
maintenance/deleteSelfExternals.php
maintenance/dumpBackup.php
maintenance/dumpLinks.php
maintenance/dumpTextPass.php
maintenance/dumpUploads.php
maintenance/eraseArchivedFile.php
maintenance/fetchText.php
maintenance/fixDefaultJsonContentPages.php
maintenance/fixDoubleRedirects.php
maintenance/fixExtLinksProtocolRelative.php
maintenance/fixTimestamps.php
maintenance/fixUserRegistration.php
maintenance/generateSitemap.php
maintenance/getSlaveServer.php
maintenance/getText.php
maintenance/importDump.php
maintenance/initEditCount.php
maintenance/initSiteStats.php
maintenance/migrateUserGroup.php
maintenance/moveBatch.php
maintenance/namespaceDupes.php
maintenance/nukeNS.php
maintenance/nukePage.php
maintenance/oracle/alterSharedConstraints.php
maintenance/orphans.php
maintenance/patchSql.php
maintenance/populateCategory.php
maintenance/populateContentModel.php
maintenance/populateFilearchiveSha1.php
maintenance/populateImageSha1.php
maintenance/populateLogUsertext.php
maintenance/populateParentId.php
maintenance/populateRevisionLength.php
maintenance/populateRevisionSha1.php
maintenance/purgeList.php
maintenance/reassignEdits.php
maintenance/rebuildFileCache.php
maintenance/rebuildImages.php
maintenance/rebuildall.php
maintenance/rebuildrecentchanges.php
maintenance/rebuildtextindex.php
maintenance/refreshFileHeaders.php
maintenance/refreshImageMetadata.php
maintenance/refreshLinks.php
maintenance/removeUnusedAccounts.php
maintenance/renameDbPrefix.php
maintenance/resetUserTokens.php
maintenance/rollbackEdits.php
maintenance/runBatchedQuery.php
maintenance/showSiteStats.php
maintenance/sqlite.php
maintenance/storage/compressOld.php
maintenance/storage/dumpRev.php
maintenance/storage/fixBug20757.php
maintenance/storage/orphanStats.php
maintenance/storage/recompressTracked.php
maintenance/storage/storageTypeStats.php
maintenance/storage/testCompression.php
maintenance/tidyUpBug37714.php
maintenance/update.php
maintenance/updateArticleCount.php
maintenance/updateCollation.php
maintenance/updateDoubleWidthSearch.php
maintenance/updateRestrictions.php
maintenance/updateSearchIndex.php
maintenance/updateSpecialPages.php
maintenance/waitForSlave.php [deleted file]
maintenance/wrapOldPasswords.php
package.json
phpcs.xml
resources/Resources.php
resources/src/jquery.tipsy/jquery.tipsy.css
resources/src/mediawiki.action/mediawiki.action.edit.preview.js
resources/src/mediawiki.less/mediawiki.ui/variables.less
resources/src/mediawiki.messagePoster/mediawiki.messagePoster.MessagePoster.js
resources/src/mediawiki.messagePoster/mediawiki.messagePoster.factory.js
resources/src/mediawiki.special/mediawiki.special.blocklist.css [new file with mode: 0644]
resources/src/mediawiki.ui/components/anchors.less
resources/src/mediawiki.ui/components/buttons.less
resources/src/mediawiki.ui/components/checkbox.less
resources/src/mediawiki.ui/components/forms.less
resources/src/mediawiki.ui/components/icons.less
resources/src/mediawiki.ui/components/inputs.less
resources/src/mediawiki.ui/components/radio.less
resources/src/mediawiki.ui/components/text.less
resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
resources/src/mediawiki/mediawiki.ForeignUpload.js
resources/src/mediawiki/mediawiki.Upload.BookletLayout.js
resources/src/mediawiki/mediawiki.Upload.js
resources/src/mediawiki/mediawiki.inspect.js
resources/src/mediawiki/page/ready.js
tests/parser/parserTests.txt
tests/phpunit/includes/ImportLinkCacheIntegrationTest.php [deleted file]
tests/phpunit/includes/ImportTest.php [deleted file]
tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php [new file with mode: 0644]
tests/phpunit/includes/import/ImportTest.php [new file with mode: 0644]
tests/phpunit/includes/page/WikiPageTest.php
tests/phpunit/includes/registration/ExtensionProcessorTest.php
tests/phpunit/includes/registration/ExtensionRegistryTest.php
tests/phpunit/includes/site/MediaWikiPageNameNormalizerTest.php [new file with mode: 0644]
tests/phpunit/maintenance/MaintenanceTest.php
tests/phpunit/maintenance/backupTextPassTest.php
tests/phpunit/maintenance/backup_LogTest.php
tests/phpunit/maintenance/backup_PageTest.php
tests/phpunit/tests/MediaWikiTestCaseTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.messagePoster.factory.test.js

index f674d59..4d3507c 100644 (file)
@@ -144,6 +144,8 @@ production.
   ApiQueryBase::keyPartToTitle() all removed (deprecated since 1.24).
 * ApiQueryBase::checkRowCount() was removed (deprecated since 1.24).
 * ApiQueryBase::getDirectionDescription() was removed (deprecated since 1.25).
+* ApiQuery::getModules() was removed (deprecated since 1.21).
+* ApiMain::getModules() was removed (deprecated since 1.21).
 
 === Languages updated in 1.27 ===
 
@@ -190,6 +192,39 @@ changes to languages because of Phabricator reports.
 * OutputPage::loginToUse() was removed (deprecated since 1.19).
 * Article::loadContent() was removed (deprecated since 1.19).
 * User::editToken() was removed (deprecated since 1.19).
+* Removed --force-normal option of dumpBackup.php, as it no longer served
+  any useful purpose since 1.22.
+* The functions processOption() and processArgs() on the BackupDumper and
+  TextPassDumper classes have been removed.
+* The maintenance/backupTextPass.inc file was deleted. You should include
+  maintenance/dumpTextPass.php instead.
+* WikiPage::getUsedTemplates() was removed (deprecated since 1.19).
+* wfEmptyMsg() was removed (deprecated since 1.18).
+* OutputPage::permissionRequired() was removed (deprecated since 1.18).
+* OutputPage::blockedPage() was removed (deprecated since 1.18).
+* User::getSkin() was removed (deprecated since 1.18).
+* OutputPage::includeJQuery() was removed (deprecated since 1.17).
+* WikiPage::updateRestrictions() was removed (deprecated since 1.19).
+* WikiPage::testPreSaveTransform() was removed (deprecated since 1.19).
+* LogPage::logName() was removed (deprecated since 1.19).
+* LogPage::logHeader() was removed (deprecated since 1.19).
+* wfCheckLimits() was removed (deprecated since 1.24).
+* Linker::makeKnownLinkObj() was removed (deprecated since 1.16).
+* Linker::makeLinkObj() was removed (deprecated since 1.16).
+* wfMsgForContentNoTrans() was removed (deprecated since 1.18).
+* ChangesList::usePatrol was removed (deprecated since 1.22).
+* wfMsgNoTrans() was removed (deprecated since 1.18).
+* Linker::makeImageLink2 was removed (deprecated since 1.20).
+* Title::userIsWatching() was removed (deprecated since 1.20).
+* Removed WaitForSlave maintenance script; use SELECT MASTER_POS_WAIT()
+  database function directly instead.
+* wfMsg() was removed (deprecated since 1.18).
+* wfMsgForContent() was removed (deprecated since 1.18).
+* wfMsgReal() was removed (deprecated since 1.18).
+* wfMsgGetKey() was removed (deprecated since 1.18).
+* wfMsgHtml() was removed (deprecated since 1.18).
+* wfMsgWikiHtml() was removed (deprecated since 1.18).
+* wfMsgExt() was removed (deprecated since 1.18).
 
 == Compatibility ==
 
index 8c5ec81..49a3faf 100644 (file)
@@ -331,7 +331,7 @@ $wgAutoloadLocalClasses = array(
        'DeprecatedGlobal' => __DIR__ . '/includes/DeprecatedGlobal.php',
        'DeprecatedInterfaceFinder' => __DIR__ . '/maintenance/findDeprecated.php',
        'DerivativeContext' => __DIR__ . '/includes/context/DerivativeContext.php',
-       'DerivativeRequest' => __DIR__ . '/includes/WebRequest.php',
+       'DerivativeRequest' => __DIR__ . '/includes/DerivativeRequest.php',
        'DerivativeResourceLoaderContext' => __DIR__ . '/includes/resourceloader/DerivativeResourceLoaderContext.php',
        'DescribeFileOp' => __DIR__ . '/includes/filebackend/FileOp.php',
        'Diff' => __DIR__ . '/includes/diff/DairikiDiff.php',
@@ -352,21 +352,22 @@ $wgAutoloadLocalClasses = array(
        'DoubleReplacer' => __DIR__ . '/includes/libs/replacers/DoubleReplacer.php',
        'DummyLinker' => __DIR__ . '/includes/Linker.php',
        'DummyTermColorer' => __DIR__ . '/maintenance/term/MWTerm.php',
-       'Dump7ZipOutput' => __DIR__ . '/includes/Export.php',
-       'DumpBZip2Output' => __DIR__ . '/includes/Export.php',
-       'DumpDBZip2Output' => __DIR__ . '/maintenance/backup.inc',
-       'DumpFileOutput' => __DIR__ . '/includes/Export.php',
-       'DumpFilter' => __DIR__ . '/includes/Export.php',
-       'DumpGZipOutput' => __DIR__ . '/includes/Export.php',
+       'Dump7ZipOutput' => __DIR__ . '/includes/export/Dump7ZipOutput.php',
+       'DumpBZip2Output' => __DIR__ . '/includes/export/DumpBZip2Output.php',
+       'DumpBackup' => __DIR__ . '/maintenance/dumpBackup.php',
+       'DumpDBZip2Output' => __DIR__ . '/includes/export/DumpDBZip2Output.php',
+       'DumpFileOutput' => __DIR__ . '/includes/export/DumpFileOutput.php',
+       'DumpFilter' => __DIR__ . '/includes/export/DumpFilter.php',
+       'DumpGZipOutput' => __DIR__ . '/includes/export/DumpGZipOutput.php',
        'DumpIterator' => __DIR__ . '/maintenance/dumpIterator.php',
-       'DumpLatestFilter' => __DIR__ . '/includes/Export.php',
+       'DumpLatestFilter' => __DIR__ . '/includes/export/DumpLatestFilter.php',
        'DumpLinks' => __DIR__ . '/maintenance/dumpLinks.php',
        'DumpMessages' => __DIR__ . '/maintenance/language/dumpMessages.php',
-       'DumpMultiWriter' => __DIR__ . '/includes/Export.php',
-       'DumpNamespaceFilter' => __DIR__ . '/includes/Export.php',
-       'DumpNotalkFilter' => __DIR__ . '/includes/Export.php',
-       'DumpOutput' => __DIR__ . '/includes/Export.php',
-       'DumpPipeOutput' => __DIR__ . '/includes/Export.php',
+       'DumpMultiWriter' => __DIR__ . '/includes/export/DumpMultiWriter.php',
+       'DumpNamespaceFilter' => __DIR__ . '/includes/export/DumpNamespaceFilter.php',
+       'DumpNotalkFilter' => __DIR__ . '/includes/export/DumpNotalkFilter.php',
+       'DumpOutput' => __DIR__ . '/includes/export/DumpOutput.php',
+       'DumpPipeOutput' => __DIR__ . '/includes/export/DumpPipeOutput.php',
        'DumpRenderer' => __DIR__ . '/maintenance/renderDump.php',
        'DumpRev' => __DIR__ . '/maintenance/storage/dumpRev.php',
        'DuplicateJob' => __DIR__ . '/includes/jobqueue/jobs/DuplicateJob.php',
@@ -376,7 +377,7 @@ $wgAutoloadLocalClasses = array(
        'EditWatchlistCheckboxSeriesField' => __DIR__ . '/includes/specials/SpecialEditWatchlist.php',
        'EditWatchlistNormalHTMLForm' => __DIR__ . '/includes/specials/SpecialEditWatchlist.php',
        'EmailConfirmation' => __DIR__ . '/includes/specials/SpecialConfirmemail.php',
-       'EmailInvalidation' => __DIR__ . '/includes/specials/SpecialConfirmemail.php',
+       'EmailInvalidation' => __DIR__ . '/includes/specials/SpecialEmailInvalidate.php',
        'EmailNotification' => __DIR__ . '/includes/mail/EmailNotification.php',
        'EmaillingJob' => __DIR__ . '/includes/jobqueue/jobs/EmaillingJob.php',
        'EmptyBagOStuff' => __DIR__ . '/includes/libs/objectcache/EmptyBagOStuff.php',
@@ -416,7 +417,7 @@ $wgAutoloadLocalClasses = array(
        'FakeResultWrapper' => __DIR__ . '/includes/db/DatabaseUtility.php',
        'Fallback' => __DIR__ . '/includes/Fallback.php',
        'FatalError' => __DIR__ . '/includes/exception/FatalError.php',
-       'FauxRequest' => __DIR__ . '/includes/WebRequest.php',
+       'FauxRequest' => __DIR__ . '/includes/FauxRequest.php',
        'FauxResponse' => __DIR__ . '/includes/WebResponse.php',
        'FeedItem' => __DIR__ . '/includes/Feed.php',
        'FeedUtils' => __DIR__ . '/includes/FeedUtils.php',
@@ -571,9 +572,9 @@ $wgAutoloadLocalClasses = array(
        'ImportReporter' => __DIR__ . '/includes/specials/SpecialImport.php',
        'ImportSiteScripts' => __DIR__ . '/maintenance/importSiteScripts.php',
        'ImportSites' => __DIR__ . '/maintenance/importSites.php',
-       'ImportSource' => __DIR__ . '/includes/Import.php',
-       'ImportStreamSource' => __DIR__ . '/includes/Import.php',
-       'ImportStringSource' => __DIR__ . '/includes/Import.php',
+       'ImportSource' => __DIR__ . '/includes/import/ImportSource.php',
+       'ImportStreamSource' => __DIR__ . '/includes/import/ImportStreamSource.php',
+       'ImportStringSource' => __DIR__ . '/includes/import/ImportStringSource.php',
        'ImportTitleFactory' => __DIR__ . '/includes/title/ImportTitleFactory.php',
        'IncludableSpecialPage' => __DIR__ . '/includes/specialpage/IncludableSpecialPage.php',
        'IndexPager' => __DIR__ . '/includes/pager/IndexPager.php',
@@ -776,6 +777,7 @@ $wgAutoloadLocalClasses = array(
        'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . '/includes/debug/logger/monolog/WikiProcessor.php',
        'MediaWiki\\Logger\\NullSpi' => __DIR__ . '/includes/debug/logger/NullSpi.php',
        'MediaWiki\\Logger\\Spi' => __DIR__ . '/includes/debug/logger/Spi.php',
+       'MediaWiki\\Site\\MediaWikiPageNameNormalizer' => __DIR__ . '/includes/site/MediaWikiPageNameNormalizer.php',
        'MediaWiki\\Tidy\\Html5Depurate' => __DIR__ . '/includes/tidy/Html5Depurate.php',
        'MediaWiki\\Tidy\\RaggettBase' => __DIR__ . '/includes/tidy/RaggettBase.php',
        'MediaWiki\\Tidy\\RaggettExternal' => __DIR__ . '/includes/tidy/RaggettExternal.php',
@@ -1100,7 +1102,7 @@ $wgAutoloadLocalClasses = array(
        'SearchHighlighter' => __DIR__ . '/includes/search/SearchHighlighter.php',
        'SearchMssql' => __DIR__ . '/includes/search/SearchMssql.php',
        'SearchMySQL' => __DIR__ . '/includes/search/SearchMySQL.php',
-       'SearchNearMatchResultSet' => __DIR__ . '/includes/search/SearchResultSet.php',
+       'SearchNearMatchResultSet' => __DIR__ . '/includes/search/SearchNearMatchResultSet.php',
        'SearchOracle' => __DIR__ . '/includes/search/SearchOracle.php',
        'SearchPostgres' => __DIR__ . '/includes/search/SearchPostgres.php',
        'SearchResult' => __DIR__ . '/includes/search/SearchResult.php',
@@ -1212,7 +1214,7 @@ $wgAutoloadLocalClasses = array(
        'SpecialWhatLinksHere' => __DIR__ . '/includes/specials/SpecialWhatlinkshere.php',
        'SqlBagOStuff' => __DIR__ . '/includes/objectcache/SqlBagOStuff.php',
        'SqlDataUpdate' => __DIR__ . '/includes/deferred/SqlDataUpdate.php',
-       'SqlSearchResultSet' => __DIR__ . '/includes/search/SearchResultSet.php',
+       'SqlSearchResultSet' => __DIR__ . '/includes/search/SqlSearchResultSet.php',
        'Sqlite' => __DIR__ . '/maintenance/sqlite.inc',
        'SqliteInstaller' => __DIR__ . '/includes/installer/SqliteInstaller.php',
        'SqliteMaintenance' => __DIR__ . '/maintenance/sqlite.php',
@@ -1252,7 +1254,7 @@ $wgAutoloadLocalClasses = array(
        'TestFileOpPerformance' => __DIR__ . '/maintenance/fileOpPerfTest.php',
        'TextContent' => __DIR__ . '/includes/content/TextContent.php',
        'TextContentHandler' => __DIR__ . '/includes/content/TextContentHandler.php',
-       'TextPassDumper' => __DIR__ . '/maintenance/backupTextPass.inc',
+       'TextPassDumper' => __DIR__ . '/maintenance/dumpTextPass.php',
        'TextStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
        'TgConverter' => __DIR__ . '/languages/classes/LanguageTg.php',
        'ThrottledError' => __DIR__ . '/includes/exception/ThrottledError.php',
@@ -1314,7 +1316,7 @@ $wgAutoloadLocalClasses = array(
        'UploadFromUrl' => __DIR__ . '/includes/upload/UploadFromUrl.php',
        'UploadFromUrlJob' => __DIR__ . '/includes/jobqueue/jobs/UploadFromUrlJob.php',
        'UploadLogFormatter' => __DIR__ . '/includes/logging/UploadLogFormatter.php',
-       'UploadSourceAdapter' => __DIR__ . '/includes/Import.php',
+       'UploadSourceAdapter' => __DIR__ . '/includes/import/UploadSourceAdapter.php',
        'UploadSourceField' => __DIR__ . '/includes/specials/SpecialUpload.php',
        'UploadStash' => __DIR__ . '/includes/upload/UploadStash.php',
        'UploadStashBadPathException' => __DIR__ . '/includes/upload/UploadStash.php',
@@ -1336,6 +1338,7 @@ $wgAutoloadLocalClasses = array(
        'UserCache' => __DIR__ . '/includes/cache/UserCache.php',
        'UserDupes' => __DIR__ . '/maintenance/userDupes.inc',
        'UserMailer' => __DIR__ . '/includes/mail/UserMailer.php',
+       'UserNamePrefixSearch' => __DIR__ . '/includes/user/UserNamePrefixSearch.php',
        'UserNotLoggedIn' => __DIR__ . '/includes/exception/UserNotLoggedIn.php',
        'UserOptions' => __DIR__ . '/maintenance/userOptions.inc',
        'UserPasswordPolicy' => __DIR__ . '/includes/password/UserPasswordPolicy.php',
@@ -1352,7 +1355,6 @@ $wgAutoloadLocalClasses = array(
        'VirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/VirtualRESTService.php',
        'VirtualRESTServiceClient' => __DIR__ . '/includes/libs/virtualrest/VirtualRESTServiceClient.php',
        'WANObjectCache' => __DIR__ . '/includes/libs/objectcache/WANObjectCache.php',
-       'WaitForSlave' => __DIR__ . '/maintenance/waitForSlave.php',
        'WantedCategoriesPage' => __DIR__ . '/includes/specials/SpecialWantedcategories.php',
        'WantedFilesPage' => __DIR__ . '/includes/specials/SpecialWantedfiles.php',
        'WantedPagesPage' => __DIR__ . '/includes/specials/SpecialWantedpages.php',
@@ -1386,13 +1388,13 @@ $wgAutoloadLocalClasses = array(
        'WebResponse' => __DIR__ . '/includes/WebResponse.php',
        'WikiCategoryPage' => __DIR__ . '/includes/page/WikiCategoryPage.php',
        'WikiDiff3' => __DIR__ . '/includes/diff/WikiDiff3.php',
-       'WikiExporter' => __DIR__ . '/includes/Export.php',
+       'WikiExporter' => __DIR__ . '/includes/export/WikiExporter.php',
        'WikiFilePage' => __DIR__ . '/includes/page/WikiFilePage.php',
-       'WikiImporter' => __DIR__ . '/includes/Import.php',
+       'WikiImporter' => __DIR__ . '/includes/import/WikiImporter.php',
        'WikiMap' => __DIR__ . '/includes/WikiMap.php',
        'WikiPage' => __DIR__ . '/includes/page/WikiPage.php',
        'WikiReference' => __DIR__ . '/includes/WikiMap.php',
-       'WikiRevision' => __DIR__ . '/includes/Import.php',
+       'WikiRevision' => __DIR__ . '/includes/import/WikiRevision.php',
        'WikiStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
        'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php',
        'WikitextContentHandler' => __DIR__ . '/includes/content/WikitextContentHandler.php',
@@ -1408,7 +1410,7 @@ $wgAutoloadLocalClasses = array(
        'XMPValidate' => __DIR__ . '/includes/media/XMPValidate.php',
        'Xhprof' => __DIR__ . '/includes/libs/Xhprof.php',
        'Xml' => __DIR__ . '/includes/Xml.php',
-       'XmlDumpWriter' => __DIR__ . '/includes/Export.php',
+       'XmlDumpWriter' => __DIR__ . '/includes/export/XmlDumpWriter.php',
        'XmlJsCode' => __DIR__ . '/includes/Xml.php',
        'XmlSelect' => __DIR__ . '/includes/XmlSelect.php',
        'XmlTypeCheck' => __DIR__ . '/includes/libs/XmlTypeCheck.php',
index 9775823..89ad8a6 100644 (file)
                "wikimedia/running-stat": "1.1.0",
                "wikimedia/utfnormal": "1.0.3",
                "wikimedia/wrappedstring": "2.0.0",
-               "zordius/lightncandy": "0.21"
+               "zordius/lightncandy": "0.23"
        },
        "require-dev": {
-               "jakub-onderka/php-parallel-lint": "0.9",
+               "jakub-onderka/php-parallel-lint": "0.9.2",
                "justinrainbow/json-schema": "~1.3",
-               "mediawiki/mediawiki-codesniffer": "0.4.0",
+               "mediawiki/mediawiki-codesniffer": "0.5.1",
                "monolog/monolog": "~1.17.2",
                "nikic/php-parser": "1.4.1",
-               "nmred/kafka-php": "0.1.4",
+               "nmred/kafka-php": "0.1.5",
                "phpunit/phpunit": "3.7.37",
                "wikimedia/avro": "1.7.7"
        },
index b635467..4218e8a 100644 (file)
                        "type": "object",
                        "description": "Registry of factory functions to create Config objects"
                },
+               "CentralIdLookupProviders": {
+                       "type": "object",
+                       "description": "Central ID lookup providers"
+               },
                "namespaces": {
                        "type": "array",
                        "description": "Method to add extra namespaces",
                "ValidSkinNames": {
                        "type": "object"
                },
+               "FeedClasses": {
+                       "type": "object",
+                       "description": "Available feeds objects"
+               },
                "SkinOOUIThemes": {
                        "type": "object"
                },
                "ParserTestFiles": {
                        "type": "array",
                        "description": "Parser test suite files to be run by parserTests.php when no specific filename is passed to it"
+               },
+               "load_composer_autoloader": {
+                       "type": "boolean",
+                       "description": "Load the composer autoloader for this extension, if one is present"
                }
        }
 }
index c928aae..83ce62e 100644 (file)
@@ -2571,6 +2571,13 @@ $enotif: EmailNotification object
 
 'SetupAfterCache': Called in Setup.php, after cache objects are set
 
+'ShortPagesQuery': Allow extensions to modify the query used by
+Special:ShortPages.
+&$tables: tables to join in the query
+&$conds: conditions for the query
+&$joinConds: join conditions for the query
+&$options: options for the query
+
 'ShowMissingArticle': Called when generating the output for a non-existent page.
 $article: The article object corresponding to the page
 
index db989a4..6c2782c 100644 (file)
@@ -223,12 +223,12 @@ class AjaxResponse {
                $fname = 'AjaxResponse::checkLastModified';
 
                if ( !$timestamp || $timestamp == '19700101000000' ) {
-                       wfDebug( "$fname: CACHE DISABLED, NO TIMESTAMP\n", 'log' );
+                       wfDebug( "$fname: CACHE DISABLED, NO TIMESTAMP", 'private' );
                        return false;
                }
 
                if ( !$wgCachePages ) {
-                       wfDebug( "$fname: CACHE DISABLED\n", 'log' );
+                       wfDebug( "$fname: CACHE DISABLED", 'private' );
                        return false;
                }
 
@@ -242,8 +242,8 @@ class AjaxResponse {
                        $modsince = preg_replace( '/;.*$/', '', $_SERVER["HTTP_IF_MODIFIED_SINCE"] );
                        $modsinceTime = strtotime( $modsince );
                        $ismodsince = wfTimestamp( TS_MW, $modsinceTime ? $modsinceTime : 1 );
-                       wfDebug( "$fname: -- client send If-Modified-Since: " . $modsince . "\n", 'log' );
-                       wfDebug( "$fname: --  we might send Last-Modified : $lastmod\n", 'log' );
+                       wfDebug( "$fname: -- client send If-Modified-Since: $modsince", 'private' );
+                       wfDebug( "$fname: --  we might send Last-Modified : $lastmod", 'private' );
 
                        if ( ( $ismodsince >= $timestamp )
                                && $wgUser->validateCache( $ismodsince ) &&
@@ -255,16 +255,16 @@ class AjaxResponse {
                                $this->mLastModified = $lastmod;
 
                                wfDebug( "$fname: CACHED client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
-                                       "page: $timestamp ; site $wgCacheEpoch\n", 'log' );
+                                       "page: $timestamp ; site $wgCacheEpoch", 'private' );
 
                                return true;
                        } else {
                                wfDebug( "$fname: READY  client: $ismodsince ; user: {$wgUser->getTouched()} ; " .
-                                       "page: $timestamp ; site $wgCacheEpoch\n", 'log' );
+                                       "page: $timestamp ; site $wgCacheEpoch", 'private' );
                                $this->mLastModified = $lastmod;
                        }
                } else {
-                       wfDebug( "$fname: client did not send If-Modified-Since header\n", 'log' );
+                       wfDebug( "$fname: client did not send If-Modified-Since header", 'private' );
                        $this->mLastModified = $lastmod;
                }
                return false;
@@ -284,12 +284,12 @@ class AjaxResponse {
                if ( $mcvalue ) {
                        # Check to see if the value has been invalidated
                        if ( $touched <= $mcvalue['timestamp'] ) {
-                               wfDebug( "Got $mckey from cache\n" );
+                               wfDebug( "Got $mckey from cache" );
                                $this->mText = $mcvalue['value'];
 
                                return true;
                        } else {
-                               wfDebug( "$mckey has expired\n" );
+                               wfDebug( "$mckey has expired" );
                        }
                }
 
index 4729f50..7b287dc 100644 (file)
@@ -296,7 +296,7 @@ class Block {
                        $block = self::newFromRow( $row );
 
                        # Don't use expired blocks
-                       if ( $block->deleteIfExpired() ) {
+                       if ( $block->isExpired() ) {
                                continue;
                        }
 
@@ -1140,7 +1140,7 @@ class Block {
                $blocks = array();
                foreach ( $rows as $row ) {
                        $block = self::newFromRow( $row );
-                       if ( !$block->deleteIfExpired() ) {
+                       if ( !$block->isExpired() ) {
                                $blocks[] = $block;
                        }
                }
index e2c31a6..2ceeed2 100644 (file)
@@ -713,7 +713,7 @@ class CategoryViewer extends ContextSource {
                        // quick due to the small number of entries.
                        $totalcnt = $rescnt;
                        $category = $this->cat;
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $category ) {
+                       DeferredUpdates::addCallableUpdate( function () use ( $category ) {
                                $category->refreshCounts();
                        } );
                } else {
index 0d4ecac..5e6e511 100644 (file)
@@ -5556,6 +5556,11 @@ $wgTrxProfilerLimits = array(
                'writeQueryTime' => 1,
                'maxAffected' => 500
        ),
+       'POST-nonwrite' => array(
+               'masterConns' => 0,
+               'writes' => 0,
+               'readQueryTime' => 5
+       ),
        // Background job runner
        'JobRunner' => array(
                'readQueryTime' => 30,
@@ -7342,6 +7347,7 @@ $wgUseAjax = true;
 /**
  * List of Ajax-callable functions.
  * Extensions acting as Ajax callbacks must register here
+ * @deprecated (officially) since 1.27; use the API instead
  */
 $wgAjaxExportList = array();
 
diff --git a/includes/DerivativeRequest.php b/includes/DerivativeRequest.php
new file mode 100644 (file)
index 0000000..dda1358
--- /dev/null
@@ -0,0 +1,87 @@
+<?php
+/**
+ * Deal with importing all those nasty globals and things
+ *
+ * Copyright © 2003 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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
+ */
+
+/**
+ * Similar to FauxRequest, but only fakes URL parameters and method
+ * (POST or GET) and use the base request for the remaining stuff
+ * (cookies, session and headers).
+ *
+ * @ingroup HTTP
+ * @since 1.19
+ */
+class DerivativeRequest extends FauxRequest {
+       private $base;
+
+       /**
+        * @param WebRequest $base
+        * @param array $data Array of *non*-urlencoded key => value pairs, the
+        *   fake GET/POST values
+        * @param bool $wasPosted Whether to treat the data as POST
+        */
+       public function __construct( WebRequest $base, $data, $wasPosted = false ) {
+               $this->base = $base;
+               parent::__construct( $data, $wasPosted );
+       }
+
+       public function getCookie( $key, $prefix = null, $default = null ) {
+               return $this->base->getCookie( $key, $prefix, $default );
+       }
+
+       public function checkSessionCookie() {
+               return $this->base->checkSessionCookie();
+       }
+
+       public function getHeader( $name, $flags = 0 ) {
+               return $this->base->getHeader( $name, $flags );
+       }
+
+       public function getAllHeaders() {
+               return $this->base->getAllHeaders();
+       }
+
+       public function getSessionData( $key ) {
+               return $this->base->getSessionData( $key );
+       }
+
+       public function setSessionData( $key, $data ) {
+               $this->base->setSessionData( $key, $data );
+       }
+
+       public function getAcceptLang() {
+               return $this->base->getAcceptLang();
+       }
+
+       public function getIP() {
+               return $this->base->getIP();
+       }
+
+       public function getProtocol() {
+               return $this->base->getProtocol();
+       }
+
+       public function getElapsedTime() {
+               return $this->base->getElapsedTime();
+       }
+}
diff --git a/includes/Export.php b/includes/Export.php
deleted file mode 100644 (file)
index b4d7737..0000000
+++ /dev/null
@@ -1,1549 +0,0 @@
-<?php
-/**
- * Base classes for dumps and export
- *
- * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
- * https://www.mediawiki.org/
- *
- * 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
- */
-
-/**
- * @defgroup Dump Dump
- */
-
-/**
- * @ingroup SpecialPage Dump
- */
-class WikiExporter {
-       /** @var bool Return distinct author list (when not returning full history) */
-       public $list_authors = false;
-
-       /** @var bool */
-       public $dumpUploads = false;
-
-       /** @var bool */
-       public $dumpUploadFileContents = false;
-
-       /** @var string */
-       public $author_list = "";
-
-       const FULL = 1;
-       const CURRENT = 2;
-       const STABLE = 4; // extension defined
-       const LOGS = 8;
-       const RANGE = 16;
-
-       const BUFFER = 0;
-       const STREAM = 1;
-
-       const TEXT = 0;
-       const STUB = 1;
-
-       /** @var int */
-       public $buffer;
-
-       /** @var int */
-       public $text;
-
-       /** @var DumpOutput */
-       public $sink;
-
-       /**
-        * Returns the export schema version.
-        * @return string
-        */
-       public static function schemaVersion() {
-               return "0.10";
-       }
-
-       /**
-        * If using WikiExporter::STREAM to stream a large amount of data,
-        * provide a database connection which is not managed by
-        * LoadBalancer to read from: some history blob types will
-        * make additional queries to pull source data while the
-        * main query is still running.
-        *
-        * @param IDatabase $db
-        * @param int|array $history One of WikiExporter::FULL, WikiExporter::CURRENT,
-        *   WikiExporter::RANGE or WikiExporter::STABLE, or an associative array:
-        *   - offset: non-inclusive offset at which to start the query
-        *   - limit: maximum number of rows to return
-        *   - dir: "asc" or "desc" timestamp order
-        * @param int $buffer One of WikiExporter::BUFFER or WikiExporter::STREAM
-        * @param int $text One of WikiExporter::TEXT or WikiExporter::STUB
-        */
-       function __construct( $db, $history = WikiExporter::CURRENT,
-                       $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
-               $this->db = $db;
-               $this->history = $history;
-               $this->buffer = $buffer;
-               $this->writer = new XmlDumpWriter();
-               $this->sink = new DumpOutput();
-               $this->text = $text;
-       }
-
-       /**
-        * Set the DumpOutput or DumpFilter object which will receive
-        * various row objects and XML output for filtering. Filters
-        * can be chained or used as callbacks.
-        *
-        * @param DumpOutput $sink
-        */
-       public function setOutputSink( &$sink ) {
-               $this->sink =& $sink;
-       }
-
-       public function openStream() {
-               $output = $this->writer->openStream();
-               $this->sink->writeOpenStream( $output );
-       }
-
-       public function closeStream() {
-               $output = $this->writer->closeStream();
-               $this->sink->writeCloseStream( $output );
-       }
-
-       /**
-        * Dumps a series of page and revision records for all pages
-        * in the database, either including complete history or only
-        * the most recent version.
-        */
-       public function allPages() {
-               $this->dumpFrom( '' );
-       }
-
-       /**
-        * Dumps a series of page and revision records for those pages
-        * in the database falling within the page_id range given.
-        * @param int $start Inclusive lower limit (this id is included)
-        * @param int $end Exclusive upper limit (this id is not included)
-        *   If 0, no upper limit.
-        */
-       public function pagesByRange( $start, $end ) {
-               $condition = 'page_id >= ' . intval( $start );
-               if ( $end ) {
-                       $condition .= ' AND page_id < ' . intval( $end );
-               }
-               $this->dumpFrom( $condition );
-       }
-
-       /**
-        * Dumps a series of page and revision records for those pages
-        * in the database with revisions falling within the rev_id range given.
-        * @param int $start Inclusive lower limit (this id is included)
-        * @param int $end Exclusive upper limit (this id is not included)
-        *   If 0, no upper limit.
-        */
-       public function revsByRange( $start, $end ) {
-               $condition = 'rev_id >= ' . intval( $start );
-               if ( $end ) {
-                       $condition .= ' AND rev_id < ' . intval( $end );
-               }
-               $this->dumpFrom( $condition );
-       }
-
-       /**
-        * @param Title $title
-        */
-       public function pageByTitle( $title ) {
-               $this->dumpFrom(
-                       'page_namespace=' . $title->getNamespace() .
-                       ' AND page_title=' . $this->db->addQuotes( $title->getDBkey() ) );
-       }
-
-       /**
-        * @param string $name
-        * @throws MWException
-        */
-       public function pageByName( $name ) {
-               $title = Title::newFromText( $name );
-               if ( is_null( $title ) ) {
-                       throw new MWException( "Can't export invalid title" );
-               } else {
-                       $this->pageByTitle( $title );
-               }
-       }
-
-       /**
-        * @param array $names
-        */
-       public function pagesByName( $names ) {
-               foreach ( $names as $name ) {
-                       $this->pageByName( $name );
-               }
-       }
-
-       public function allLogs() {
-               $this->dumpFrom( '' );
-       }
-
-       /**
-        * @param int $start
-        * @param int $end
-        */
-       public function logsByRange( $start, $end ) {
-               $condition = 'log_id >= ' . intval( $start );
-               if ( $end ) {
-                       $condition .= ' AND log_id < ' . intval( $end );
-               }
-               $this->dumpFrom( $condition );
-       }
-
-       /**
-        * Generates the distinct list of authors of an article
-        * Not called by default (depends on $this->list_authors)
-        * Can be set by Special:Export when not exporting whole history
-        *
-        * @param array $cond
-        */
-       protected function do_list_authors( $cond ) {
-               $this->author_list = "<contributors>";
-               // rev_deleted
-
-               $res = $this->db->select(
-                       array( 'page', 'revision' ),
-                       array( 'DISTINCT rev_user_text', 'rev_user' ),
-                       array(
-                               $this->db->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0',
-                               $cond,
-                               'page_id = rev_id',
-                       ),
-                       __METHOD__
-               );
-
-               foreach ( $res as $row ) {
-                       $this->author_list .= "<contributor>" .
-                               "<username>" .
-                               htmlentities( $row->rev_user_text ) .
-                               "</username>" .
-                               "<id>" .
-                               $row->rev_user .
-                               "</id>" .
-                               "</contributor>";
-               }
-               $this->author_list .= "</contributors>";
-       }
-
-       /**
-        * @param string $cond
-        * @throws MWException
-        * @throws Exception
-        */
-       protected function dumpFrom( $cond = '' ) {
-               # For logging dumps...
-               if ( $this->history & self::LOGS ) {
-                       $where = array( 'user_id = log_user' );
-                       # Hide private logs
-                       $hideLogs = LogEventsList::getExcludeClause( $this->db );
-                       if ( $hideLogs ) {
-                               $where[] = $hideLogs;
-                       }
-                       # Add on any caller specified conditions
-                       if ( $cond ) {
-                               $where[] = $cond;
-                       }
-                       # Get logging table name for logging.* clause
-                       $logging = $this->db->tableName( 'logging' );
-
-                       if ( $this->buffer == WikiExporter::STREAM ) {
-                               $prev = $this->db->bufferResults( false );
-                       }
-                       $result = null; // Assuring $result is not undefined, if exception occurs early
-                       try {
-                               $result = $this->db->select( array( 'logging', 'user' ),
-                                       array( "{$logging}.*", 'user_name' ), // grab the user name
-                                       $where,
-                                       __METHOD__,
-                                       array( 'ORDER BY' => 'log_id', 'USE INDEX' => array( 'logging' => 'PRIMARY' ) )
-                               );
-                               $this->outputLogStream( $result );
-                               if ( $this->buffer == WikiExporter::STREAM ) {
-                                       $this->db->bufferResults( $prev );
-                               }
-                       } catch ( Exception $e ) {
-                               // Throwing the exception does not reliably free the resultset, and
-                               // would also leave the connection in unbuffered mode.
-
-                               // Freeing result
-                               try {
-                                       if ( $result ) {
-                                               $result->free();
-                                       }
-                               } catch ( Exception $e2 ) {
-                                       // Already in panic mode -> ignoring $e2 as $e has
-                                       // higher priority
-                               }
-
-                               // Putting database back in previous buffer mode
-                               try {
-                                       if ( $this->buffer == WikiExporter::STREAM ) {
-                                               $this->db->bufferResults( $prev );
-                                       }
-                               } catch ( Exception $e2 ) {
-                                       // Already in panic mode -> ignoring $e2 as $e has
-                                       // higher priority
-                               }
-
-                               // Inform caller about problem
-                               throw $e;
-                       }
-               # For page dumps...
-               } else {
-                       $tables = array( 'page', 'revision' );
-                       $opts = array( 'ORDER BY' => 'page_id ASC' );
-                       $opts['USE INDEX'] = array();
-                       $join = array();
-                       if ( is_array( $this->history ) ) {
-                               # Time offset/limit for all pages/history...
-                               $revJoin = 'page_id=rev_page';
-                               # Set time order
-                               if ( $this->history['dir'] == 'asc' ) {
-                                       $op = '>';
-                                       $opts['ORDER BY'] = 'rev_timestamp ASC';
-                               } else {
-                                       $op = '<';
-                                       $opts['ORDER BY'] = 'rev_timestamp DESC';
-                               }
-                               # Set offset
-                               if ( !empty( $this->history['offset'] ) ) {
-                                       $revJoin .= " AND rev_timestamp $op " .
-                                               $this->db->addQuotes( $this->db->timestamp( $this->history['offset'] ) );
-                               }
-                               $join['revision'] = array( 'INNER JOIN', $revJoin );
-                               # Set query limit
-                               if ( !empty( $this->history['limit'] ) ) {
-                                       $opts['LIMIT'] = intval( $this->history['limit'] );
-                               }
-                       } elseif ( $this->history & WikiExporter::FULL ) {
-                               # Full history dumps...
-                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
-                       } elseif ( $this->history & WikiExporter::CURRENT ) {
-                               # Latest revision dumps...
-                               if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
-                                       $this->do_list_authors( $cond );
-                               }
-                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
-                       } elseif ( $this->history & WikiExporter::STABLE ) {
-                               # "Stable" revision dumps...
-                               # Default JOIN, to be overridden...
-                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
-                               # One, and only one hook should set this, and return false
-                               if ( Hooks::run( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) {
-                                       throw new MWException( __METHOD__ . " given invalid history dump type." );
-                               }
-                       } elseif ( $this->history & WikiExporter::RANGE ) {
-                               # Dump of revisions within a specified range
-                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
-                               $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
-                       } else {
-                               # Unknown history specification parameter?
-                               throw new MWException( __METHOD__ . " given invalid history dump type." );
-                       }
-                       # Query optimization hacks
-                       if ( $cond == '' ) {
-                               $opts[] = 'STRAIGHT_JOIN';
-                               $opts['USE INDEX']['page'] = 'PRIMARY';
-                       }
-                       # Build text join options
-                       if ( $this->text != WikiExporter::STUB ) { // 1-pass
-                               $tables[] = 'text';
-                               $join['text'] = array( 'INNER JOIN', 'rev_text_id=old_id' );
-                       }
-
-                       if ( $this->buffer == WikiExporter::STREAM ) {
-                               $prev = $this->db->bufferResults( false );
-                       }
-
-                       $result = null; // Assuring $result is not undefined, if exception occurs early
-                       try {
-                               Hooks::run( 'ModifyExportQuery',
-                                               array( $this->db, &$tables, &$cond, &$opts, &$join ) );
-
-                               # Do the query!
-                               $result = $this->db->select( $tables, '*', $cond, __METHOD__, $opts, $join );
-                               # Output dump results
-                               $this->outputPageStream( $result );
-
-                               if ( $this->buffer == WikiExporter::STREAM ) {
-                                       $this->db->bufferResults( $prev );
-                               }
-                       } catch ( Exception $e ) {
-                               // Throwing the exception does not reliably free the resultset, and
-                               // would also leave the connection in unbuffered mode.
-
-                               // Freeing result
-                               try {
-                                       if ( $result ) {
-                                               $result->free();
-                                       }
-                               } catch ( Exception $e2 ) {
-                                       // Already in panic mode -> ignoring $e2 as $e has
-                                       // higher priority
-                               }
-
-                               // Putting database back in previous buffer mode
-                               try {
-                                       if ( $this->buffer == WikiExporter::STREAM ) {
-                                               $this->db->bufferResults( $prev );
-                                       }
-                               } catch ( Exception $e2 ) {
-                                       // Already in panic mode -> ignoring $e2 as $e has
-                                       // higher priority
-                               }
-
-                               // Inform caller about problem
-                               throw $e;
-                       }
-               }
-       }
-
-       /**
-        * Runs through a query result set dumping page and revision records.
-        * The result set should be sorted/grouped by page to avoid duplicate
-        * page records in the output.
-        *
-        * Should be safe for
-        * streaming (non-buffered) queries, as long as it was made on a
-        * separate database connection not managed by LoadBalancer; some
-        * blob storage types will make queries to pull source data.
-        *
-        * @param ResultWrapper $resultset
-        */
-       protected function outputPageStream( $resultset ) {
-               $last = null;
-               foreach ( $resultset as $row ) {
-                       if ( $last === null ||
-                               $last->page_namespace != $row->page_namespace ||
-                               $last->page_title != $row->page_title ) {
-                               if ( $last !== null ) {
-                                       $output = '';
-                                       if ( $this->dumpUploads ) {
-                                               $output .= $this->writer->writeUploads( $last, $this->dumpUploadFileContents );
-                                       }
-                                       $output .= $this->writer->closePage();
-                                       $this->sink->writeClosePage( $output );
-                               }
-                               $output = $this->writer->openPage( $row );
-                               $this->sink->writeOpenPage( $row, $output );
-                               $last = $row;
-                       }
-                       $output = $this->writer->writeRevision( $row );
-                       $this->sink->writeRevision( $row, $output );
-               }
-               if ( $last !== null ) {
-                       $output = '';
-                       if ( $this->dumpUploads ) {
-                               $output .= $this->writer->writeUploads( $last, $this->dumpUploadFileContents );
-                       }
-                       $output .= $this->author_list;
-                       $output .= $this->writer->closePage();
-                       $this->sink->writeClosePage( $output );
-               }
-       }
-
-       /**
-        * @param ResultWrapper $resultset
-        */
-       protected function outputLogStream( $resultset ) {
-               foreach ( $resultset as $row ) {
-                       $output = $this->writer->writeLogItem( $row );
-                       $this->sink->writeLogItem( $row, $output );
-               }
-       }
-}
-
-/**
- * @ingroup Dump
- */
-class XmlDumpWriter {
-       /**
-        * Opens the XML output stream's root "<mediawiki>" element.
-        * This does not include an xml directive, so is safe to include
-        * as a subelement in a larger XML stream. Namespace and XML Schema
-        * references are included.
-        *
-        * Output will be encoded in UTF-8.
-        *
-        * @return string
-        */
-       function openStream() {
-               global $wgLanguageCode;
-               $ver = WikiExporter::schemaVersion();
-               return Xml::element( 'mediawiki', array(
-                       'xmlns'              => "http://www.mediawiki.org/xml/export-$ver/",
-                       'xmlns:xsi'          => "http://www.w3.org/2001/XMLSchema-instance",
-                       /*
-                        * When a new version of the schema is created, it needs staging on mediawiki.org.
-                        * This requires a change in the operations/mediawiki-config git repo.
-                        *
-                        * Create a changeset like https://gerrit.wikimedia.org/r/#/c/149643/ in which
-                        * you copy in the new xsd file.
-                        *
-                        * After it is reviewed, merged and deployed (sync-docroot), the index.html needs purging.
-                        * echo "http://www.mediawiki.org/xml/index.html" | mwscript purgeList.php --wiki=aawiki
-                        */
-                       'xsi:schemaLocation' => "http://www.mediawiki.org/xml/export-$ver/ " .
-                               "http://www.mediawiki.org/xml/export-$ver.xsd",
-                       'version'            => $ver,
-                       'xml:lang'           => $wgLanguageCode ),
-                       null ) .
-                       "\n" .
-                       $this->siteInfo();
-       }
-
-       /**
-        * @return string
-        */
-       function siteInfo() {
-               $info = array(
-                       $this->sitename(),
-                       $this->dbname(),
-                       $this->homelink(),
-                       $this->generator(),
-                       $this->caseSetting(),
-                       $this->namespaces() );
-               return "  <siteinfo>\n    " .
-                       implode( "\n    ", $info ) .
-                       "\n  </siteinfo>\n";
-       }
-
-       /**
-        * @return string
-        */
-       function sitename() {
-               global $wgSitename;
-               return Xml::element( 'sitename', array(), $wgSitename );
-       }
-
-       /**
-        * @return string
-        */
-       function dbname() {
-               global $wgDBname;
-               return Xml::element( 'dbname', array(), $wgDBname );
-       }
-
-       /**
-        * @return string
-        */
-       function generator() {
-               global $wgVersion;
-               return Xml::element( 'generator', array(), "MediaWiki $wgVersion" );
-       }
-
-       /**
-        * @return string
-        */
-       function homelink() {
-               return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalURL() );
-       }
-
-       /**
-        * @return string
-        */
-       function caseSetting() {
-               global $wgCapitalLinks;
-               // "case-insensitive" option is reserved for future
-               $sensitivity = $wgCapitalLinks ? 'first-letter' : 'case-sensitive';
-               return Xml::element( 'case', array(), $sensitivity );
-       }
-
-       /**
-        * @return string
-        */
-       function namespaces() {
-               global $wgContLang;
-               $spaces = "<namespaces>\n";
-               foreach ( $wgContLang->getFormattedNamespaces() as $ns => $title ) {
-                       $spaces .= '      ' .
-                               Xml::element( 'namespace',
-                                       array(
-                                               'key' => $ns,
-                                               'case' => MWNamespace::isCapitalized( $ns ) ? 'first-letter' : 'case-sensitive',
-                                       ), $title ) . "\n";
-               }
-               $spaces .= "    </namespaces>";
-               return $spaces;
-       }
-
-       /**
-        * Closes the output stream with the closing root element.
-        * Call when finished dumping things.
-        *
-        * @return string
-        */
-       function closeStream() {
-               return "</mediawiki>\n";
-       }
-
-       /**
-        * Opens a "<page>" section on the output stream, with data
-        * from the given database row.
-        *
-        * @param object $row
-        * @return string
-        */
-       public function openPage( $row ) {
-               $out = "  <page>\n";
-               $title = Title::makeTitle( $row->page_namespace, $row->page_title );
-               $out .= '    ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n";
-               $out .= '    ' . Xml::element( 'ns', array(), strval( $row->page_namespace ) ) . "\n";
-               $out .= '    ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n";
-               if ( $row->page_is_redirect ) {
-                       $page = WikiPage::factory( $title );
-                       $redirect = $page->getRedirectTarget();
-                       if ( $redirect instanceof Title && $redirect->isValidRedirectTarget() ) {
-                               $out .= '    ';
-                               $out .= Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) );
-                               $out .= "\n";
-                       }
-               }
-
-               if ( $row->page_restrictions != '' ) {
-                       $out .= '    ' . Xml::element( 'restrictions', array(),
-                               strval( $row->page_restrictions ) ) . "\n";
-               }
-
-               Hooks::run( 'XmlDumpWriterOpenPage', array( $this, &$out, $row, $title ) );
-
-               return $out;
-       }
-
-       /**
-        * Closes a "<page>" section on the output stream.
-        *
-        * @access private
-        * @return string
-        */
-       function closePage() {
-               return "  </page>\n";
-       }
-
-       /**
-        * Dumps a "<revision>" section on the output stream, with
-        * data filled in from the given database row.
-        *
-        * @param object $row
-        * @return string
-        * @access private
-        */
-       function writeRevision( $row ) {
-
-               $out = "    <revision>\n";
-               $out .= "      " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
-               if ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {
-                       $out .= "      " . Xml::element( 'parentid', null, strval( $row->rev_parent_id ) ) . "\n";
-               }
-
-               $out .= $this->writeTimestamp( $row->rev_timestamp );
-
-               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_USER ) ) {
-                       $out .= "      " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
-               } else {
-                       $out .= $this->writeContributor( $row->rev_user, $row->rev_user_text );
-               }
-
-               if ( isset( $row->rev_minor_edit ) && $row->rev_minor_edit ) {
-                       $out .= "      <minor/>\n";
-               }
-               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_COMMENT ) ) {
-                       $out .= "      " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n";
-               } elseif ( $row->rev_comment != '' ) {
-                       $out .= "      " . Xml::elementClean( 'comment', array(), strval( $row->rev_comment ) ) . "\n";
-               }
-
-               if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model ) ) {
-                       $content_model = strval( $row->rev_content_model );
-               } else {
-                       // probably using $wgContentHandlerUseDB = false;
-                       $title = Title::makeTitle( $row->page_namespace, $row->page_title );
-                       $content_model = ContentHandler::getDefaultModelFor( $title );
-               }
-
-               $content_handler = ContentHandler::getForModelID( $content_model );
-
-               if ( isset( $row->rev_content_format ) && !is_null( $row->rev_content_format ) ) {
-                       $content_format = strval( $row->rev_content_format );
-               } else {
-                       // probably using $wgContentHandlerUseDB = false;
-                       $content_format = $content_handler->getDefaultFormat();
-               }
-
-               $out .= "      " . Xml::element( 'model', null, strval( $content_model ) ) . "\n";
-               $out .= "      " . Xml::element( 'format', null, strval( $content_format ) ) . "\n";
-
-               $text = '';
-               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_TEXT ) ) {
-                       $out .= "      " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
-               } elseif ( isset( $row->old_text ) ) {
-                       // Raw text from the database may have invalid chars
-                       $text = strval( Revision::getRevisionText( $row ) );
-                       $text = $content_handler->exportTransform( $text, $content_format );
-                       $out .= "      " . Xml::elementClean( 'text',
-                               array( 'xml:space' => 'preserve', 'bytes' => intval( $row->rev_len ) ),
-                               strval( $text ) ) . "\n";
-               } else {
-                       // Stub output
-                       $out .= "      " . Xml::element( 'text',
-                               array( 'id' => $row->rev_text_id, 'bytes' => intval( $row->rev_len ) ),
-                               "" ) . "\n";
-               }
-
-               if ( isset( $row->rev_sha1 )
-                       && $row->rev_sha1
-                       && !( $row->rev_deleted & Revision::DELETED_TEXT )
-               ) {
-                       $out .= "      " . Xml::element( 'sha1', null, strval( $row->rev_sha1 ) ) . "\n";
-               } else {
-                       $out .= "      <sha1/>\n";
-               }
-
-               Hooks::run( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) );
-
-               $out .= "    </revision>\n";
-
-               return $out;
-       }
-
-       /**
-        * Dumps a "<logitem>" section on the output stream, with
-        * data filled in from the given database row.
-        *
-        * @param object $row
-        * @return string
-        * @access private
-        */
-       function writeLogItem( $row ) {
-
-               $out = "  <logitem>\n";
-               $out .= "    " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
-
-               $out .= $this->writeTimestamp( $row->log_timestamp, "    " );
-
-               if ( $row->log_deleted & LogPage::DELETED_USER ) {
-                       $out .= "    " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
-               } else {
-                       $out .= $this->writeContributor( $row->log_user, $row->user_name, "    " );
-               }
-
-               if ( $row->log_deleted & LogPage::DELETED_COMMENT ) {
-                       $out .= "    " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n";
-               } elseif ( $row->log_comment != '' ) {
-                       $out .= "    " . Xml::elementClean( 'comment', null, strval( $row->log_comment ) ) . "\n";
-               }
-
-               $out .= "    " . Xml::element( 'type', null, strval( $row->log_type ) ) . "\n";
-               $out .= "    " . Xml::element( 'action', null, strval( $row->log_action ) ) . "\n";
-
-               if ( $row->log_deleted & LogPage::DELETED_ACTION ) {
-                       $out .= "    " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
-               } else {
-                       $title = Title::makeTitle( $row->log_namespace, $row->log_title );
-                       $out .= "    " . Xml::elementClean( 'logtitle', null, self::canonicalTitle( $title ) ) . "\n";
-                       $out .= "    " . Xml::elementClean( 'params',
-                               array( 'xml:space' => 'preserve' ),
-                               strval( $row->log_params ) ) . "\n";
-               }
-
-               $out .= "  </logitem>\n";
-
-               return $out;
-       }
-
-       /**
-        * @param string $timestamp
-        * @param string $indent Default to six spaces
-        * @return string
-        */
-       function writeTimestamp( $timestamp, $indent = "      " ) {
-               $ts = wfTimestamp( TS_ISO_8601, $timestamp );
-               return $indent . Xml::element( 'timestamp', null, $ts ) . "\n";
-       }
-
-       /**
-        * @param int $id
-        * @param string $text
-        * @param string $indent Default to six spaces
-        * @return string
-        */
-       function writeContributor( $id, $text, $indent = "      " ) {
-               $out = $indent . "<contributor>\n";
-               if ( $id || !IP::isValid( $text ) ) {
-                       $out .= $indent . "  " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n";
-                       $out .= $indent . "  " . Xml::element( 'id', null, strval( $id ) ) . "\n";
-               } else {
-                       $out .= $indent . "  " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n";
-               }
-               $out .= $indent . "</contributor>\n";
-               return $out;
-       }
-
-       /**
-        * Warning! This data is potentially inconsistent. :(
-        * @param object $row
-        * @param bool $dumpContents
-        * @return string
-        */
-       function writeUploads( $row, $dumpContents = false ) {
-               if ( $row->page_namespace == NS_FILE ) {
-                       $img = wfLocalFile( $row->page_title );
-                       if ( $img && $img->exists() ) {
-                               $out = '';
-                               foreach ( array_reverse( $img->getHistory() ) as $ver ) {
-                                       $out .= $this->writeUpload( $ver, $dumpContents );
-                               }
-                               $out .= $this->writeUpload( $img, $dumpContents );
-                               return $out;
-                       }
-               }
-               return '';
-       }
-
-       /**
-        * @param File $file
-        * @param bool $dumpContents
-        * @return string
-        */
-       function writeUpload( $file, $dumpContents = false ) {
-               if ( $file->isOld() ) {
-                       $archiveName = "      " .
-                               Xml::element( 'archivename', null, $file->getArchiveName() ) . "\n";
-               } else {
-                       $archiveName = '';
-               }
-               if ( $dumpContents ) {
-                       $be = $file->getRepo()->getBackend();
-                       # Dump file as base64
-                       # Uses only XML-safe characters, so does not need escaping
-                       # @todo Too bad this loads the contents into memory (script might swap)
-                       $contents = '      <contents encoding="base64">' .
-                               chunk_split( base64_encode(
-                                       $be->getFileContents( array( 'src' => $file->getPath() ) ) ) ) .
-                               "      </contents>\n";
-               } else {
-                       $contents = '';
-               }
-               if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
-                       $comment = Xml::element( 'comment', array( 'deleted' => 'deleted' ) );
-               } else {
-                       $comment = Xml::elementClean( 'comment', null, $file->getDescription() );
-               }
-               return "    <upload>\n" .
-                       $this->writeTimestamp( $file->getTimestamp() ) .
-                       $this->writeContributor( $file->getUser( 'id' ), $file->getUser( 'text' ) ) .
-                       "      " . $comment . "\n" .
-                       "      " . Xml::element( 'filename', null, $file->getName() ) . "\n" .
-                       $archiveName .
-                       "      " . Xml::element( 'src', null, $file->getCanonicalURL() ) . "\n" .
-                       "      " . Xml::element( 'size', null, $file->getSize() ) . "\n" .
-                       "      " . Xml::element( 'sha1base36', null, $file->getSha1() ) . "\n" .
-                       "      " . Xml::element( 'rel', null, $file->getRel() ) . "\n" .
-                       $contents .
-                       "    </upload>\n";
-       }
-
-       /**
-        * Return prefixed text form of title, but using the content language's
-        * canonical namespace. This skips any special-casing such as gendered
-        * user namespaces -- which while useful, are not yet listed in the
-        * XML "<siteinfo>" data so are unsafe in export.
-        *
-        * @param Title $title
-        * @return string
-        * @since 1.18
-        */
-       public static function canonicalTitle( Title $title ) {
-               if ( $title->isExternal() ) {
-                       return $title->getPrefixedText();
-               }
-
-               global $wgContLang;
-               $prefix = $wgContLang->getFormattedNsText( $title->getNamespace() );
-
-               if ( $prefix !== '' ) {
-                       $prefix .= ':';
-               }
-
-               return $prefix . $title->getText();
-       }
-}
-
-/**
- * Base class for output stream; prints to stdout or buffer or wherever.
- * @ingroup Dump
- */
-class DumpOutput {
-
-       /**
-        * @param string $string
-        */
-       function writeOpenStream( $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeCloseStream( $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * @param object $page
-        * @param string $string
-        */
-       function writeOpenPage( $page, $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeClosePage( $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeRevision( $rev, $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeLogItem( $rev, $string ) {
-               $this->write( $string );
-       }
-
-       /**
-        * Override to write to a different stream type.
-        * @param string $string
-        * @return bool
-        */
-       function write( $string ) {
-               print $string;
-       }
-
-       /**
-        * Close the old file, move it to a specified name,
-        * and reopen new file with the old name. Use this
-        * for writing out a file in multiple pieces
-        * at specified checkpoints (e.g. every n hours).
-        * @param string|array $newname File name. May be a string or an array with one element
-        */
-       function closeRenameAndReopen( $newname ) {
-       }
-
-       /**
-        * Close the old file, and move it to a specified name.
-        * Use this for the last piece of a file written out
-        * at specified checkpoints (e.g. every n hours).
-        * @param string|array $newname File name. May be a string or an array with one element
-        * @param bool $open If true, a new file with the old filename will be opened
-        *   again for writing (default: false)
-        */
-       function closeAndRename( $newname, $open = false ) {
-       }
-
-       /**
-        * Returns the name of the file or files which are
-        * being written to, if there are any.
-        * @return null
-        */
-       function getFilenames() {
-               return null;
-       }
-}
-
-/**
- * Stream outputter to send data to a file.
- * @ingroup Dump
- */
-class DumpFileOutput extends DumpOutput {
-       protected $handle = false, $filename;
-
-       /**
-        * @param string $file
-        */
-       function __construct( $file ) {
-               $this->handle = fopen( $file, "wt" );
-               $this->filename = $file;
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeCloseStream( $string ) {
-               parent::writeCloseStream( $string );
-               if ( $this->handle ) {
-                       fclose( $this->handle );
-                       $this->handle = false;
-               }
-       }
-
-       /**
-        * @param string $string
-        */
-       function write( $string ) {
-               fputs( $this->handle, $string );
-       }
-
-       /**
-        * @param string $newname
-        */
-       function closeRenameAndReopen( $newname ) {
-               $this->closeAndRename( $newname, true );
-       }
-
-       /**
-        * @param string $newname
-        * @throws MWException
-        */
-       function renameOrException( $newname ) {
-                       if ( !rename( $this->filename, $newname ) ) {
-                               throw new MWException( __METHOD__ . ": rename of file {$this->filename} to $newname failed\n" );
-                       }
-       }
-
-       /**
-        * @param array $newname
-        * @return string
-        * @throws MWException
-        */
-       function checkRenameArgCount( $newname ) {
-               if ( is_array( $newname ) ) {
-                       if ( count( $newname ) > 1 ) {
-                               throw new MWException( __METHOD__ . ": passed multiple arguments for rename of single file\n" );
-                       } else {
-                               $newname = $newname[0];
-                       }
-               }
-               return $newname;
-       }
-
-       /**
-        * @param string $newname
-        * @param bool $open
-        */
-       function closeAndRename( $newname, $open = false ) {
-               $newname = $this->checkRenameArgCount( $newname );
-               if ( $newname ) {
-                       if ( $this->handle ) {
-                               fclose( $this->handle );
-                               $this->handle = false;
-                       }
-                       $this->renameOrException( $newname );
-                       if ( $open ) {
-                               $this->handle = fopen( $this->filename, "wt" );
-                       }
-               }
-       }
-
-       /**
-        * @return string|null
-        */
-       function getFilenames() {
-               return $this->filename;
-       }
-}
-
-/**
- * Stream outputter to send data to a file via some filter program.
- * Even if compression is available in a library, using a separate
- * program can allow us to make use of a multi-processor system.
- * @ingroup Dump
- */
-class DumpPipeOutput extends DumpFileOutput {
-       protected $command, $filename;
-       protected $procOpenResource = false;
-
-       /**
-        * @param string $command
-        * @param string $file
-        */
-       function __construct( $command, $file = null ) {
-               if ( !is_null( $file ) ) {
-                       $command .= " > " . wfEscapeShellArg( $file );
-               }
-
-               $this->startCommand( $command );
-               $this->command = $command;
-               $this->filename = $file;
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeCloseStream( $string ) {
-               parent::writeCloseStream( $string );
-               if ( $this->procOpenResource ) {
-                       proc_close( $this->procOpenResource );
-                       $this->procOpenResource = false;
-               }
-       }
-
-       /**
-        * @param string $command
-        */
-       function startCommand( $command ) {
-               $spec = array(
-                       0 => array( "pipe", "r" ),
-               );
-               $pipes = array();
-               $this->procOpenResource = proc_open( $command, $spec, $pipes );
-               $this->handle = $pipes[0];
-       }
-
-       /**
-        * @param string $newname
-        */
-       function closeRenameAndReopen( $newname ) {
-               $this->closeAndRename( $newname, true );
-       }
-
-       /**
-        * @param string $newname
-        * @param bool $open
-        */
-       function closeAndRename( $newname, $open = false ) {
-               $newname = $this->checkRenameArgCount( $newname );
-               if ( $newname ) {
-                       if ( $this->handle ) {
-                               fclose( $this->handle );
-                               $this->handle = false;
-                       }
-                       if ( $this->procOpenResource ) {
-                               proc_close( $this->procOpenResource );
-                               $this->procOpenResource = false;
-                       }
-                       $this->renameOrException( $newname );
-                       if ( $open ) {
-                               $command = $this->command;
-                               $command .= " > " . wfEscapeShellArg( $this->filename );
-                               $this->startCommand( $command );
-                       }
-               }
-       }
-}
-
-/**
- * Sends dump output via the gzip compressor.
- * @ingroup Dump
- */
-class DumpGZipOutput extends DumpPipeOutput {
-       /**
-        * @param string $file
-        */
-       function __construct( $file ) {
-               parent::__construct( "gzip", $file );
-       }
-}
-
-/**
- * Sends dump output via the bgzip2 compressor.
- * @ingroup Dump
- */
-class DumpBZip2Output extends DumpPipeOutput {
-       /**
-        * @param string $file
-        */
-       function __construct( $file ) {
-               parent::__construct( "bzip2", $file );
-       }
-}
-
-/**
- * Sends dump output via the p7zip compressor.
- * @ingroup Dump
- */
-class Dump7ZipOutput extends DumpPipeOutput {
-       /**
-        * @param string $file
-        */
-       function __construct( $file ) {
-               $command = $this->setup7zCommand( $file );
-               parent::__construct( $command );
-               $this->filename = $file;
-       }
-
-       /**
-        * @param string $file
-        * @return string
-        */
-       function setup7zCommand( $file ) {
-               $command = "7za a -bd -si -mx=4 " . wfEscapeShellArg( $file );
-               // Suppress annoying useless crap from p7zip
-               // Unfortunately this could suppress real error messages too
-               $command .= ' >' . wfGetNull() . ' 2>&1';
-               return $command;
-       }
-
-       /**
-        * @param string $newname
-        * @param bool $open
-        */
-       function closeAndRename( $newname, $open = false ) {
-               $newname = $this->checkRenameArgCount( $newname );
-               if ( $newname ) {
-                       fclose( $this->handle );
-                       proc_close( $this->procOpenResource );
-                       $this->renameOrException( $newname );
-                       if ( $open ) {
-                               $command = $this->setup7zCommand( $this->filename );
-                               $this->startCommand( $command );
-                       }
-               }
-       }
-}
-
-/**
- * Dump output filter class.
- * This just does output filtering and streaming; XML formatting is done
- * higher up, so be careful in what you do.
- * @ingroup Dump
- */
-class DumpFilter {
-       /**
-        * @var DumpOutput
-        * FIXME will need to be made protected whenever legacy code
-        * is updated.
-        */
-       public $sink;
-
-       /**
-        * @var bool
-        */
-       protected $sendingThisPage;
-
-       /**
-        * @param DumpOutput $sink
-        */
-       function __construct( &$sink ) {
-               $this->sink =& $sink;
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeOpenStream( $string ) {
-               $this->sink->writeOpenStream( $string );
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeCloseStream( $string ) {
-               $this->sink->writeCloseStream( $string );
-       }
-
-       /**
-        * @param object $page
-        * @param string $string
-        */
-       function writeOpenPage( $page, $string ) {
-               $this->sendingThisPage = $this->pass( $page, $string );
-               if ( $this->sendingThisPage ) {
-                       $this->sink->writeOpenPage( $page, $string );
-               }
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeClosePage( $string ) {
-               if ( $this->sendingThisPage ) {
-                       $this->sink->writeClosePage( $string );
-                       $this->sendingThisPage = false;
-               }
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeRevision( $rev, $string ) {
-               if ( $this->sendingThisPage ) {
-                       $this->sink->writeRevision( $rev, $string );
-               }
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeLogItem( $rev, $string ) {
-               $this->sink->writeRevision( $rev, $string );
-       }
-
-       /**
-        * @param string $newname
-        */
-       function closeRenameAndReopen( $newname ) {
-               $this->sink->closeRenameAndReopen( $newname );
-       }
-
-       /**
-        * @param string $newname
-        * @param bool $open
-        */
-       function closeAndRename( $newname, $open = false ) {
-               $this->sink->closeAndRename( $newname, $open );
-       }
-
-       /**
-        * @return array
-        */
-       function getFilenames() {
-               return $this->sink->getFilenames();
-       }
-
-       /**
-        * Override for page-based filter types.
-        * @param object $page
-        * @return bool
-        */
-       function pass( $page ) {
-               return true;
-       }
-}
-
-/**
- * Simple dump output filter to exclude all talk pages.
- * @ingroup Dump
- */
-class DumpNotalkFilter extends DumpFilter {
-       /**
-        * @param object $page
-        * @return bool
-        */
-       function pass( $page ) {
-               return !MWNamespace::isTalk( $page->page_namespace );
-       }
-}
-
-/**
- * Dump output filter to include or exclude pages in a given set of namespaces.
- * @ingroup Dump
- */
-class DumpNamespaceFilter extends DumpFilter {
-       /** @var bool */
-       public $invert = false;
-
-       /** @var array */
-       public $namespaces = array();
-
-       /**
-        * @param DumpOutput $sink
-        * @param array $param
-        * @throws MWException
-        */
-       function __construct( &$sink, $param ) {
-               parent::__construct( $sink );
-
-               $constants = array(
-                       "NS_MAIN"           => NS_MAIN,
-                       "NS_TALK"           => NS_TALK,
-                       "NS_USER"           => NS_USER,
-                       "NS_USER_TALK"      => NS_USER_TALK,
-                       "NS_PROJECT"        => NS_PROJECT,
-                       "NS_PROJECT_TALK"   => NS_PROJECT_TALK,
-                       "NS_FILE"           => NS_FILE,
-                       "NS_FILE_TALK"      => NS_FILE_TALK,
-                       "NS_IMAGE"          => NS_IMAGE, // NS_IMAGE is an alias for NS_FILE
-                       "NS_IMAGE_TALK"     => NS_IMAGE_TALK,
-                       "NS_MEDIAWIKI"      => NS_MEDIAWIKI,
-                       "NS_MEDIAWIKI_TALK" => NS_MEDIAWIKI_TALK,
-                       "NS_TEMPLATE"       => NS_TEMPLATE,
-                       "NS_TEMPLATE_TALK"  => NS_TEMPLATE_TALK,
-                       "NS_HELP"           => NS_HELP,
-                       "NS_HELP_TALK"      => NS_HELP_TALK,
-                       "NS_CATEGORY"       => NS_CATEGORY,
-                       "NS_CATEGORY_TALK"  => NS_CATEGORY_TALK );
-
-               if ( $param { 0 } == '!' ) {
-                       $this->invert = true;
-                       $param = substr( $param, 1 );
-               }
-
-               foreach ( explode( ',', $param ) as $key ) {
-                       $key = trim( $key );
-                       if ( isset( $constants[$key] ) ) {
-                               $ns = $constants[$key];
-                               $this->namespaces[$ns] = true;
-                       } elseif ( is_numeric( $key ) ) {
-                               $ns = intval( $key );
-                               $this->namespaces[$ns] = true;
-                       } else {
-                               throw new MWException( "Unrecognized namespace key '$key'\n" );
-                       }
-               }
-       }
-
-       /**
-        * @param object $page
-        * @return bool
-        */
-       function pass( $page ) {
-               $match = isset( $this->namespaces[$page->page_namespace] );
-               return $this->invert xor $match;
-       }
-}
-
-/**
- * Dump output filter to include only the last revision in each page sequence.
- * @ingroup Dump
- */
-class DumpLatestFilter extends DumpFilter {
-       public $page;
-
-       public $pageString;
-
-       public $rev;
-
-       public $revString;
-
-       /**
-        * @param object $page
-        * @param string $string
-        */
-       function writeOpenPage( $page, $string ) {
-               $this->page = $page;
-               $this->pageString = $string;
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeClosePage( $string ) {
-               if ( $this->rev ) {
-                       $this->sink->writeOpenPage( $this->page, $this->pageString );
-                       $this->sink->writeRevision( $this->rev, $this->revString );
-                       $this->sink->writeClosePage( $string );
-               }
-               $this->rev = null;
-               $this->revString = null;
-               $this->page = null;
-               $this->pageString = null;
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeRevision( $rev, $string ) {
-               if ( $rev->rev_id == $this->page->page_latest ) {
-                       $this->rev = $rev;
-                       $this->revString = $string;
-               }
-       }
-}
-
-/**
- * Base class for output stream; prints to stdout or buffer or wherever.
- * @ingroup Dump
- */
-class DumpMultiWriter {
-
-       /**
-        * @param array $sinks
-        */
-       function __construct( $sinks ) {
-               $this->sinks = $sinks;
-               $this->count = count( $sinks );
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeOpenStream( $string ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->writeOpenStream( $string );
-               }
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeCloseStream( $string ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->writeCloseStream( $string );
-               }
-       }
-
-       /**
-        * @param object $page
-        * @param string $string
-        */
-       function writeOpenPage( $page, $string ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->writeOpenPage( $page, $string );
-               }
-       }
-
-       /**
-        * @param string $string
-        */
-       function writeClosePage( $string ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->writeClosePage( $string );
-               }
-       }
-
-       /**
-        * @param object $rev
-        * @param string $string
-        */
-       function writeRevision( $rev, $string ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->writeRevision( $rev, $string );
-               }
-       }
-
-       /**
-        * @param array $newnames
-        */
-       function closeRenameAndReopen( $newnames ) {
-               $this->closeAndRename( $newnames, true );
-       }
-
-       /**
-        * @param array $newnames
-        * @param bool $open
-        */
-       function closeAndRename( $newnames, $open = false ) {
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $this->sinks[$i]->closeAndRename( $newnames[$i], $open );
-               }
-       }
-
-       /**
-        * @return array
-        */
-       function getFilenames() {
-               $filenames = array();
-               for ( $i = 0; $i < $this->count; $i++ ) {
-                       $filenames[] = $this->sinks[$i]->getFilenames();
-               }
-               return $filenames;
-       }
-}
diff --git a/includes/FauxRequest.php b/includes/FauxRequest.php
new file mode 100644 (file)
index 0000000..888f853
--- /dev/null
@@ -0,0 +1,252 @@
+<?php
+/**
+ * Deal with importing all those nasty globals and things
+ *
+ * Copyright © 2003 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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
+ */
+
+/**
+ * WebRequest clone which takes values from a provided array.
+ *
+ * @ingroup HTTP
+ */
+class FauxRequest extends WebRequest {
+       private $wasPosted = false;
+       private $session = array();
+       private $requestUrl;
+       protected $cookies = array();
+
+       /**
+        * @param array $data Array of *non*-urlencoded key => value pairs, the
+        *   fake GET/POST values
+        * @param bool $wasPosted Whether to treat the data as POST
+        * @param array|null $session Session array or null
+        * @param string $protocol 'http' or 'https'
+        * @throws MWException
+        */
+       public function __construct( $data = array(), $wasPosted = false,
+               $session = null, $protocol = 'http'
+       ) {
+               $this->requestTime = microtime( true );
+
+               if ( is_array( $data ) ) {
+                       $this->data = $data;
+               } else {
+                       throw new MWException( "FauxRequest() got bogus data" );
+               }
+               $this->wasPosted = $wasPosted;
+               if ( $session ) {
+                       $this->session = $session;
+               }
+               $this->protocol = $protocol;
+       }
+
+       /**
+        * Initialise the header list
+        */
+       protected function initHeaders() {
+               // Nothing to init
+       }
+
+       /**
+        * @param string $name
+        * @param string $default
+        * @return string
+        */
+       public function getText( $name, $default = '' ) {
+               # Override; don't recode since we're using internal data
+               return (string)$this->getVal( $name, $default );
+       }
+
+       /**
+        * @return array
+        */
+       public function getValues() {
+               return $this->data;
+       }
+
+       /**
+        * @return array
+        */
+       public function getQueryValues() {
+               if ( $this->wasPosted ) {
+                       return array();
+               } else {
+                       return $this->data;
+               }
+       }
+
+       public function getMethod() {
+               return $this->wasPosted ? 'POST' : 'GET';
+       }
+
+       /**
+        * @return bool
+        */
+       public function wasPosted() {
+               return $this->wasPosted;
+       }
+
+       public function getCookie( $key, $prefix = null, $default = null ) {
+               if ( $prefix === null ) {
+                       global $wgCookiePrefix;
+                       $prefix = $wgCookiePrefix;
+               }
+               $name = $prefix . $key;
+               return isset( $this->cookies[$name] ) ? $this->cookies[$name] : $default;
+       }
+
+       /**
+        * @since 1.26
+        * @param string $name Unprefixed name of the cookie to set
+        * @param string|null $value Value of the cookie to set
+        * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix
+        */
+       public function setCookie( $key, $value, $prefix = null ) {
+               $this->setCookies( array( $key => $value ), $prefix );
+       }
+
+       /**
+        * @since 1.26
+        * @param array $cookies
+        * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix
+        */
+       public function setCookies( $cookies, $prefix = null ) {
+               if ( $prefix === null ) {
+                       global $wgCookiePrefix;
+                       $prefix = $wgCookiePrefix;
+               }
+               foreach ( $cookies as $key => $value ) {
+                       $name = $prefix . $key;
+                       $this->cookies[$name] = $value;
+               }
+       }
+
+       public function checkSessionCookie() {
+               return false;
+       }
+
+       /**
+        * @since 1.25
+        */
+       public function setRequestURL( $url ) {
+               $this->requestUrl = $url;
+       }
+
+       /**
+        * @since 1.25 MWException( "getRequestURL not implemented" )
+        * no longer thrown.
+        */
+       public function getRequestURL() {
+               if ( $this->requestUrl === null ) {
+                       throw new MWException( 'Request URL not set' );
+               }
+               return $this->requestUrl;
+       }
+
+       public function getProtocol() {
+               return $this->protocol;
+       }
+
+       /**
+        * @param string $name
+        * @param string $val
+        */
+       public function setHeader( $name, $val ) {
+               $this->setHeaders( array( $name => $val ) );
+       }
+
+       /**
+        * @since 1.26
+        * @param array $headers
+        */
+       public function setHeaders( $headers ) {
+               foreach ( $headers as $name => $val ) {
+                       $name = strtoupper( $name );
+                       $this->headers[$name] = $val;
+               }
+       }
+
+       /**
+        * @param string $key
+        * @return array|null
+        */
+       public function getSessionData( $key ) {
+               if ( isset( $this->session[$key] ) ) {
+                       return $this->session[$key];
+               }
+               return null;
+       }
+
+       /**
+        * @param string $key
+        * @param array $data
+        */
+       public function setSessionData( $key, $data ) {
+               $this->session[$key] = $data;
+       }
+
+       /**
+        * @return array|mixed|null
+        */
+       public function getSessionArray() {
+               return $this->session;
+       }
+
+       /**
+        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+        * @return string
+        */
+       public function getRawQueryString() {
+               return '';
+       }
+
+       /**
+        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+        * @return string
+        */
+       public function getRawPostString() {
+               return '';
+       }
+
+       /**
+        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
+        * @return string
+        */
+       public function getRawInput() {
+               return '';
+       }
+
+       /**
+        * @param array $extWhitelist
+        * @return bool
+        */
+       public function checkUrlExtension( $extWhitelist = array() ) {
+               return true;
+       }
+
+       /**
+        * @return string
+        */
+       protected function getRawIP() {
+               return '127.0.0.1';
+       }
+}
index e30b371..26fb223 100644 (file)
@@ -1038,7 +1038,12 @@ function wfMatchesDomainList( $url, $domains ) {
  * @since 1.25 support for additional context data
  *
  * @param string $text
- * @param string|bool $dest Unused
+ * @param string|bool $dest Destination of the message:
+ *     - 'all': both to the log and HTML (debug toolbar or HTML comments)
+ *     - 'private': excluded from HTML output
+ *   For backward compatibility, it can also take a boolean:
+ *     - true: same as 'all'
+ *     - false: same as 'private'
  * @param array $context Additional logging context data
  */
 function wfDebug( $text, $dest = 'all', array $context = array() ) {
@@ -1065,6 +1070,7 @@ function wfDebug( $text, $dest = 'all', array $context = array() ) {
        if ( $wgDebugLogPrefix !== '' ) {
                $context['prefix'] = $wgDebugLogPrefix;
        }
+       $context['private'] = ( $dest === false || $dest === 'private' );
 
        $logger = LoggerFactory::getInstance( 'wfDebug' );
        $logger->debug( $text, $context );
@@ -1126,7 +1132,6 @@ function wfDebugMem( $exact = false ) {
  * @param string $text
  * @param string|bool $dest Destination of the message:
  *     - 'all': both to the log and HTML (debug toolbar or HTML comments)
- *     - 'log': only to the log and not in HTML
  *     - 'private': only to the specific log if set in $wgDebugLogGroups and
  *       discarded otherwise
  *   For backward compatibility, it can also take a boolean:
@@ -1137,17 +1142,10 @@ function wfDebugMem( $exact = false ) {
 function wfDebugLog(
        $logGroup, $text, $dest = 'all', array $context = array()
 ) {
-       // Turn $dest into a string if it's a boolean (for b/c)
-       if ( $dest === true ) {
-               $dest = 'all';
-       } elseif ( $dest === false ) {
-               $dest = 'private';
-       }
-
        $text = trim( $text );
 
        $logger = LoggerFactory::getInstance( $logGroup );
-       $context['private'] = ( $dest === 'private' );
+       $context['private'] = ( $dest === false || $dest === 'private' );
        $logger->info( $text, $context );
 }
 
@@ -1462,159 +1460,6 @@ function wfMessageFallback( /*...*/ ) {
        return call_user_func_array( 'Message::newFallbackSequence', $args );
 }
 
-/**
- * Get a message from anywhere, for the current user language.
- *
- * Use wfMsgForContent() instead if the message should NOT
- * change depending on the user preferences.
- *
- * @deprecated since 1.18
- *
- * @param string $key Lookup key for the message, usually
- *    defined in languages/Language.php
- *
- * Parameters to the message, which can be used to insert variable text into
- * it, can be passed to this function in the following formats:
- * - One per argument, starting at the second parameter
- * - As an array in the second parameter
- * These are not shown in the function definition.
- *
- * @return string
- */
-function wfMsg( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $args = func_get_args();
-       array_shift( $args );
-       return wfMsgReal( $key, $args );
-}
-
-/**
- * Same as above except doesn't transform the message
- *
- * @deprecated since 1.18
- *
- * @param string $key
- * @return string
- */
-function wfMsgNoTrans( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $args = func_get_args();
-       array_shift( $args );
-       return wfMsgReal( $key, $args, true, false, false );
-}
-
-/**
- * Get a message from anywhere, for the current global language
- * set with $wgLanguageCode.
- *
- * Use this if the message should NOT change dependent on the
- * language set in the user's preferences. This is the case for
- * most text written into logs, as well as link targets (such as
- * the name of the copyright policy page). Link titles, on the
- * other hand, should be shown in the UI language.
- *
- * Note that MediaWiki allows users to change the user interface
- * language in their preferences, but a single installation
- * typically only contains content in one language.
- *
- * Be wary of this distinction: If you use wfMsg() where you should
- * use wfMsgForContent(), a user of the software may have to
- * customize potentially hundreds of messages in
- * order to, e.g., fix a link in every possible language.
- *
- * @deprecated since 1.18
- *
- * @param string $key Lookup key for the message, usually
- *     defined in languages/Language.php
- * @return string
- */
-function wfMsgForContent( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       global $wgForceUIMsgAsContentMsg;
-       $args = func_get_args();
-       array_shift( $args );
-       $forcontent = true;
-       if ( is_array( $wgForceUIMsgAsContentMsg )
-               && in_array( $key, $wgForceUIMsgAsContentMsg )
-       ) {
-               $forcontent = false;
-       }
-       return wfMsgReal( $key, $args, true, $forcontent );
-}
-
-/**
- * Same as above except doesn't transform the message
- *
- * @deprecated since 1.18
- *
- * @param string $key
- * @return string
- */
-function wfMsgForContentNoTrans( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       global $wgForceUIMsgAsContentMsg;
-       $args = func_get_args();
-       array_shift( $args );
-       $forcontent = true;
-       if ( is_array( $wgForceUIMsgAsContentMsg )
-               && in_array( $key, $wgForceUIMsgAsContentMsg )
-       ) {
-               $forcontent = false;
-       }
-       return wfMsgReal( $key, $args, true, $forcontent, false );
-}
-
-/**
- * Really get a message
- *
- * @deprecated since 1.18
- *
- * @param string $key Key to get.
- * @param array $args
- * @param bool $useDB
- * @param string|bool $forContent Language code, or false for user lang, true for content lang.
- * @param bool $transform Whether or not to transform the message.
- * @return string The requested message.
- */
-function wfMsgReal( $key, $args, $useDB = true, $forContent = false, $transform = true ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $message = wfMsgGetKey( $key, $useDB, $forContent, $transform );
-       $message = wfMsgReplaceArgs( $message, $args );
-       return $message;
-}
-
-/**
- * Fetch a message string value, but don't replace any keys yet.
- *
- * @deprecated since 1.18
- *
- * @param string $key
- * @param bool $useDB
- * @param string|bool $langCode Code of the language to get the message for, or
- *   behaves as a content language switch if it is a boolean.
- * @param bool $transform Whether to parse magic words, etc.
- * @return string
- */
-function wfMsgGetKey( $key, $useDB = true, $langCode = false, $transform = true ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       Hooks::run( 'NormalizeMessageKey', array( &$key, &$useDB, &$langCode, &$transform ) );
-
-       $cache = MessageCache::singleton();
-       $message = $cache->get( $key, $useDB, $langCode );
-       if ( $message === false ) {
-               $message = '&lt;' . htmlspecialchars( $key ) . '&gt;';
-       } elseif ( $transform ) {
-               $message = $cache->transform( $message );
-       }
-       return $message;
-}
-
 /**
  * Replace message parameter keys on the given formatted output.
  *
@@ -1643,159 +1488,6 @@ function wfMsgReplaceArgs( $message, $args ) {
        return $message;
 }
 
-/**
- * Return an HTML-escaped version of a message.
- * Parameter replacements, if any, are done *after* the HTML-escaping,
- * so parameters may contain HTML (eg links or form controls). Be sure
- * to pre-escape them if you really do want plaintext, or just wrap
- * the whole thing in htmlspecialchars().
- *
- * @deprecated since 1.18
- *
- * @param string $key
- * @param string $args,... Parameters
- * @return string
- */
-function wfMsgHtml( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $args = func_get_args();
-       array_shift( $args );
-       return wfMsgReplaceArgs( htmlspecialchars( wfMsgGetKey( $key ) ), $args );
-}
-
-/**
- * Return an HTML version of message
- * Parameter replacements, if any, are done *after* parsing the wiki-text message,
- * so parameters may contain HTML (eg links or form controls). Be sure
- * to pre-escape them if you really do want plaintext, or just wrap
- * the whole thing in htmlspecialchars().
- *
- * @deprecated since 1.18
- *
- * @param string $key
- * @param string $args,... Parameters
- * @return string
- */
-function wfMsgWikiHtml( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $args = func_get_args();
-       array_shift( $args );
-       return wfMsgReplaceArgs(
-               MessageCache::singleton()->parse( wfMsgGetKey( $key ), null,
-               /* can't be set to false */ true, /* interface */ true )->getText(),
-               $args );
-}
-
-/**
- * Returns message in the requested format
- *
- * @deprecated since 1.18
- *
- * @param string $key Key of the message
- * @param array $options Processing rules.
- *   Can take the following options:
- *     parse: parses wikitext to HTML
- *     parseinline: parses wikitext to HTML and removes the surrounding
- *       p's added by parser or tidy
- *     escape: filters message through htmlspecialchars
- *     escapenoentities: same, but allows entity references like &#160; through
- *     replaceafter: parameters are substituted after parsing or escaping
- *     parsemag: transform the message using magic phrases
- *     content: fetch message for content language instead of interface
- *   Also can accept a single associative argument, of the form 'language' => 'xx':
- *     language: Language object or language code to fetch message for
- *       (overridden by content).
- * Behavior for conflicting options (e.g., parse+parseinline) is undefined.
- *
- * @return string
- */
-function wfMsgExt( $key, $options ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       $args = func_get_args();
-       array_shift( $args );
-       array_shift( $args );
-       $options = (array)$options;
-       $validOptions = array( 'parse', 'parseinline', 'escape', 'escapenoentities', 'replaceafter',
-               'parsemag', 'content' );
-
-       foreach ( $options as $arrayKey => $option ) {
-               if ( !preg_match( '/^[0-9]+|language$/', $arrayKey ) ) {
-                       // An unknown index, neither numeric nor "language"
-                       wfWarn( "wfMsgExt called with incorrect parameter key $arrayKey", 1, E_USER_WARNING );
-               } elseif ( preg_match( '/^[0-9]+$/', $arrayKey ) && !in_array( $option, $validOptions ) ) {
-                       // A numeric index with unknown value
-                       wfWarn( "wfMsgExt called with incorrect parameter $option", 1, E_USER_WARNING );
-               }
-       }
-
-       if ( in_array( 'content', $options, true ) ) {
-               $forContent = true;
-               $langCode = true;
-               $langCodeObj = null;
-       } elseif ( array_key_exists( 'language', $options ) ) {
-               $forContent = false;
-               $langCode = wfGetLangObj( $options['language'] );
-               $langCodeObj = $langCode;
-       } else {
-               $forContent = false;
-               $langCode = false;
-               $langCodeObj = null;
-       }
-
-       $string = wfMsgGetKey( $key, /*DB*/true, $langCode, /*Transform*/false );
-
-       if ( !in_array( 'replaceafter', $options, true ) ) {
-               $string = wfMsgReplaceArgs( $string, $args );
-       }
-
-       $messageCache = MessageCache::singleton();
-       $parseInline = in_array( 'parseinline', $options, true );
-       if ( in_array( 'parse', $options, true ) || $parseInline ) {
-               $string = $messageCache->parse( $string, null, true, !$forContent, $langCodeObj );
-               if ( $string instanceof ParserOutput ) {
-                       $string = $string->getText();
-               }
-
-               if ( $parseInline ) {
-                       $string = Parser::stripOuterParagraph( $string );
-               }
-       } elseif ( in_array( 'parsemag', $options, true ) ) {
-               $string = $messageCache->transform( $string,
-                               !$forContent, $langCodeObj );
-       }
-
-       if ( in_array( 'escape', $options, true ) ) {
-               $string = htmlspecialchars( $string );
-       } elseif ( in_array( 'escapenoentities', $options, true ) ) {
-               $string = Sanitizer::escapeHtmlAllowEntities( $string );
-       }
-
-       if ( in_array( 'replaceafter', $options, true ) ) {
-               $string = wfMsgReplaceArgs( $string, $args );
-       }
-
-       return $string;
-}
-
-/**
- * Since wfMsg() and co suck, they don't return false if the message key they
- * looked up didn't exist but instead the key wrapped in <>'s, this function checks for the
- * nonexistence of messages by checking the MessageCache::get() result directly.
- *
- * @deprecated since 1.18. Use Message::isDisabled().
- *
- * @param string $key The message key looked up
- * @return bool True if the message *doesn't* exist.
- */
-function wfEmptyMsg( $key ) {
-       wfDeprecated( __METHOD__, '1.21' );
-
-       return MessageCache::singleton()->get( $key, /*useDB*/true, /*content*/false ) === false;
-}
-
 /**
  * Fetch server name for use in error reporting etc.
  * Use real server name if available, so we know which machine
@@ -2014,21 +1706,6 @@ function wfClientAcceptsGzip( $force = false ) {
        return $result;
 }
 
-/**
- * Obtain the offset and limit values from the request string;
- * used in special pages
- *
- * @param int $deflimit Default limit if none supplied
- * @param string $optionname Name of a user preference to check against
- * @return array
- * @deprecated since 1.24, just call WebRequest::getLimitOffset() directly
- */
-function wfCheckLimits( $deflimit = 50, $optionname = 'rclimit' ) {
-       global $wgRequest;
-       wfDeprecated( __METHOD__, '1.24' );
-       return $wgRequest->getLimitOffset( $deflimit, $optionname );
-}
-
 /**
  * Escapes the given text so that it may be output using addWikiText()
  * without any linking, formatting, etc. making its way through. This
diff --git a/includes/Import.php b/includes/Import.php
deleted file mode 100644 (file)
index f59cf47..0000000
+++ /dev/null
@@ -1,2054 +0,0 @@
-<?php
-/**
- * MediaWiki page data importer.
- *
- * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
- * https://www.mediawiki.org/
- *
- * 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 SpecialPage
- */
-
-/**
- * XML file reader for the page data importer
- *
- * implements Special:Import
- * @ingroup SpecialPage
- */
-class WikiImporter {
-       private $reader = null;
-       private $foreignNamespaces = null;
-       private $mLogItemCallback, $mUploadCallback, $mRevisionCallback, $mPageCallback;
-       private $mSiteInfoCallback, $mPageOutCallback;
-       private $mNoticeCallback, $mDebug;
-       private $mImportUploads, $mImageBasePath;
-       private $mNoUpdates = false;
-       /** @var Config */
-       private $config;
-       /** @var ImportTitleFactory */
-       private $importTitleFactory;
-       /** @var array */
-       private $countableCache = array();
-
-       /**
-        * Creates an ImportXMLReader drawing from the source provided
-        * @param ImportSource $source
-        * @param Config $config
-        * @throws Exception
-        */
-       function __construct( ImportSource $source, Config $config = null ) {
-               if ( !class_exists( 'XMLReader' ) ) {
-                       throw new Exception( 'Import requires PHP to have been compiled with libxml support' );
-               }
-
-               $this->reader = new XMLReader();
-               if ( !$config ) {
-                       wfDeprecated( __METHOD__ . ' without a Config instance', '1.25' );
-                       $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
-               }
-               $this->config = $config;
-
-               if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) {
-                       stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
-               }
-               $id = UploadSourceAdapter::registerSource( $source );
-
-               // Enable the entity loader, as it is needed for loading external URLs via
-               // XMLReader::open (T86036)
-               $oldDisable = libxml_disable_entity_loader( false );
-               if ( defined( 'LIBXML_PARSEHUGE' ) ) {
-                       $status = $this->reader->open( "uploadsource://$id", null, LIBXML_PARSEHUGE );
-               } else {
-                       $status = $this->reader->open( "uploadsource://$id" );
-               }
-               if ( !$status ) {
-                       $error = libxml_get_last_error();
-                       libxml_disable_entity_loader( $oldDisable );
-                       throw new MWException( 'Encountered an internal error while initializing WikiImporter object: ' .
-                               $error->message );
-               }
-               libxml_disable_entity_loader( $oldDisable );
-
-               // Default callbacks
-               $this->setPageCallback( array( $this, 'beforeImportPage' ) );
-               $this->setRevisionCallback( array( $this, "importRevision" ) );
-               $this->setUploadCallback( array( $this, 'importUpload' ) );
-               $this->setLogItemCallback( array( $this, 'importLogItem' ) );
-               $this->setPageOutCallback( array( $this, 'finishImportPage' ) );
-
-               $this->importTitleFactory = new NaiveImportTitleFactory();
-       }
-
-       /**
-        * @return null|XMLReader
-        */
-       public function getReader() {
-               return $this->reader;
-       }
-
-       public function throwXmlError( $err ) {
-               $this->debug( "FAILURE: $err" );
-               wfDebug( "WikiImporter XML error: $err\n" );
-       }
-
-       public function debug( $data ) {
-               if ( $this->mDebug ) {
-                       wfDebug( "IMPORT: $data\n" );
-               }
-       }
-
-       public function warn( $data ) {
-               wfDebug( "IMPORT: $data\n" );
-       }
-
-       public function notice( $msg /*, $param, ...*/ ) {
-               $params = func_get_args();
-               array_shift( $params );
-
-               if ( is_callable( $this->mNoticeCallback ) ) {
-                       call_user_func( $this->mNoticeCallback, $msg, $params );
-               } else { # No ImportReporter -> CLI
-                       echo wfMessage( $msg, $params )->text() . "\n";
-               }
-       }
-
-       /**
-        * Set debug mode...
-        * @param bool $debug
-        */
-       function setDebug( $debug ) {
-               $this->mDebug = $debug;
-       }
-
-       /**
-        * Set 'no updates' mode. In this mode, the link tables will not be updated by the importer
-        * @param bool $noupdates
-        */
-       function setNoUpdates( $noupdates ) {
-               $this->mNoUpdates = $noupdates;
-       }
-
-       /**
-        * Set a callback that displays notice messages
-        *
-        * @param callable $callback
-        * @return callable
-        */
-       public function setNoticeCallback( $callback ) {
-               return wfSetVar( $this->mNoticeCallback, $callback );
-       }
-
-       /**
-        * Sets the action to perform as each new page in the stream is reached.
-        * @param callable $callback
-        * @return callable
-        */
-       public function setPageCallback( $callback ) {
-               $previous = $this->mPageCallback;
-               $this->mPageCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the action to perform as each page in the stream is completed.
-        * Callback accepts the page title (as a Title object), a second object
-        * with the original title form (in case it's been overridden into a
-        * local namespace), and a count of revisions.
-        *
-        * @param callable $callback
-        * @return callable
-        */
-       public function setPageOutCallback( $callback ) {
-               $previous = $this->mPageOutCallback;
-               $this->mPageOutCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the action to perform as each page revision is reached.
-        * @param callable $callback
-        * @return callable
-        */
-       public function setRevisionCallback( $callback ) {
-               $previous = $this->mRevisionCallback;
-               $this->mRevisionCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the action to perform as each file upload version is reached.
-        * @param callable $callback
-        * @return callable
-        */
-       public function setUploadCallback( $callback ) {
-               $previous = $this->mUploadCallback;
-               $this->mUploadCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the action to perform as each log item reached.
-        * @param callable $callback
-        * @return callable
-        */
-       public function setLogItemCallback( $callback ) {
-               $previous = $this->mLogItemCallback;
-               $this->mLogItemCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the action to perform when site info is encountered
-        * @param callable $callback
-        * @return callable
-        */
-       public function setSiteInfoCallback( $callback ) {
-               $previous = $this->mSiteInfoCallback;
-               $this->mSiteInfoCallback = $callback;
-               return $previous;
-       }
-
-       /**
-        * Sets the factory object to use to convert ForeignTitle objects into local
-        * Title objects
-        * @param ImportTitleFactory $factory
-        */
-       public function setImportTitleFactory( $factory ) {
-               $this->importTitleFactory = $factory;
-       }
-
-       /**
-        * Set a target namespace to override the defaults
-        * @param null|int $namespace
-        * @return bool
-        */
-       public function setTargetNamespace( $namespace ) {
-               if ( is_null( $namespace ) ) {
-                       // Don't override namespaces
-                       $this->setImportTitleFactory( new NaiveImportTitleFactory() );
-                       return true;
-               } elseif (
-                       $namespace >= 0 &&
-                       MWNamespace::exists( intval( $namespace ) )
-               ) {
-                       $namespace = intval( $namespace );
-                       $this->setImportTitleFactory( new NamespaceImportTitleFactory( $namespace ) );
-                       return true;
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Set a target root page under which all pages are imported
-        * @param null|string $rootpage
-        * @return Status
-        */
-       public function setTargetRootPage( $rootpage ) {
-               $status = Status::newGood();
-               if ( is_null( $rootpage ) ) {
-                       // No rootpage
-                       $this->setImportTitleFactory( new NaiveImportTitleFactory() );
-               } elseif ( $rootpage !== '' ) {
-                       $rootpage = rtrim( $rootpage, '/' ); // avoid double slashes
-                       $title = Title::newFromText( $rootpage );
-
-                       if ( !$title || $title->isExternal() ) {
-                               $status->fatal( 'import-rootpage-invalid' );
-                       } else {
-                               if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
-                                       global $wgContLang;
-
-                                       $displayNSText = $title->getNamespace() == NS_MAIN
-                                               ? wfMessage( 'blanknamespace' )->text()
-                                               : $wgContLang->getNsText( $title->getNamespace() );
-                                       $status->fatal( 'import-rootpage-nosubpage', $displayNSText );
-                               } else {
-                                       // set namespace to 'all', so the namespace check in processTitle() can pass
-                                       $this->setTargetNamespace( null );
-                                       $this->setImportTitleFactory( new SubpageImportTitleFactory( $title ) );
-                               }
-                       }
-               }
-               return $status;
-       }
-
-       /**
-        * @param string $dir
-        */
-       public function setImageBasePath( $dir ) {
-               $this->mImageBasePath = $dir;
-       }
-
-       /**
-        * @param bool $import
-        */
-       public function setImportUploads( $import ) {
-               $this->mImportUploads = $import;
-       }
-
-       /**
-        * Default per-page callback. Sets up some things related to site statistics
-        * @param array $titleAndForeignTitle Two-element array, with Title object at
-        * index 0 and ForeignTitle object at index 1
-        * @return bool
-        */
-       public function beforeImportPage( $titleAndForeignTitle ) {
-               $title = $titleAndForeignTitle[0];
-               $page = WikiPage::factory( $title );
-               $this->countableCache['title_' . $title->getPrefixedText()] = $page->isCountable();
-               return true;
-       }
-
-       /**
-        * Default per-revision callback, performs the import.
-        * @param WikiRevision $revision
-        * @return bool
-        */
-       public function importRevision( $revision ) {
-               if ( !$revision->getContentHandler()->canBeUsedOn( $revision->getTitle() ) ) {
-                       $this->notice( 'import-error-bad-location',
-                               $revision->getTitle()->getPrefixedText(),
-                               $revision->getID(),
-                               $revision->getModel(),
-                               $revision->getFormat() );
-
-                       return false;
-               }
-
-               try {
-                       $dbw = wfGetDB( DB_MASTER );
-                       return $dbw->deadlockLoop( array( $revision, 'importOldRevision' ) );
-               } catch ( MWContentSerializationException $ex ) {
-                       $this->notice( 'import-error-unserialize',
-                               $revision->getTitle()->getPrefixedText(),
-                               $revision->getID(),
-                               $revision->getModel(),
-                               $revision->getFormat() );
-               }
-
-               return false;
-       }
-
-       /**
-        * Default per-revision callback, performs the import.
-        * @param WikiRevision $revision
-        * @return bool
-        */
-       public function importLogItem( $revision ) {
-               $dbw = wfGetDB( DB_MASTER );
-               return $dbw->deadlockLoop( array( $revision, 'importLogItem' ) );
-       }
-
-       /**
-        * Dummy for now...
-        * @param WikiRevision $revision
-        * @return bool
-        */
-       public function importUpload( $revision ) {
-               $dbw = wfGetDB( DB_MASTER );
-               return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
-       }
-
-       /**
-        * Mostly for hook use
-        * @param Title $title
-        * @param ForeignTitle $foreignTitle
-        * @param int $revCount
-        * @param int $sRevCount
-        * @param array $pageInfo
-        * @return bool
-        */
-       public function finishImportPage( $title, $foreignTitle, $revCount,
-                       $sRevCount, $pageInfo ) {
-
-               // Update article count statistics (T42009)
-               // The normal counting logic in WikiPage->doEditUpdates() is designed for
-               // one-revision-at-a-time editing, not bulk imports. In this situation it
-               // suffers from issues of slave lag. We let WikiPage handle the total page
-               // and revision count, and we implement our own custom logic for the
-               // article (content page) count.
-               $page = WikiPage::factory( $title );
-               $page->loadPageData( 'fromdbmaster' );
-               $content = $page->getContent();
-               if ( $content === null ) {
-                       wfDebug( __METHOD__ . ': Skipping article count adjustment for ' . $title .
-                               ' because WikiPage::getContent() returned null' );
-               } else {
-                       $editInfo = $page->prepareContentForEdit( $content );
-                       $countKey = 'title_' . $title->getPrefixedText();
-                       $countable = $page->isCountable( $editInfo );
-                       if ( array_key_exists( $countKey, $this->countableCache ) &&
-                               $countable != $this->countableCache[$countKey] ) {
-                               DeferredUpdates::addUpdate( SiteStatsUpdate::factory( array(
-                                       'articles' => ( (int)$countable - (int)$this->countableCache[$countKey] )
-                               ) ) );
-                       }
-               }
-
-               $args = func_get_args();
-               return Hooks::run( 'AfterImportPage', $args );
-       }
-
-       /**
-        * Alternate per-revision callback, for debugging.
-        * @param WikiRevision $revision
-        */
-       public function debugRevisionHandler( &$revision ) {
-               $this->debug( "Got revision:" );
-               if ( is_object( $revision->title ) ) {
-                       $this->debug( "-- Title: " . $revision->title->getPrefixedText() );
-               } else {
-                       $this->debug( "-- Title: <invalid>" );
-               }
-               $this->debug( "-- User: " . $revision->user_text );
-               $this->debug( "-- Timestamp: " . $revision->timestamp );
-               $this->debug( "-- Comment: " . $revision->comment );
-               $this->debug( "-- Text: " . $revision->text );
-       }
-
-       /**
-        * Notify the callback function of site info
-        * @param array $siteInfo
-        * @return bool|mixed
-        */
-       private function siteInfoCallback( $siteInfo ) {
-               if ( isset( $this->mSiteInfoCallback ) ) {
-                       return call_user_func_array( $this->mSiteInfoCallback,
-                                       array( $siteInfo, $this ) );
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Notify the callback function when a new "<page>" is reached.
-        * @param Title $title
-        */
-       function pageCallback( $title ) {
-               if ( isset( $this->mPageCallback ) ) {
-                       call_user_func( $this->mPageCallback, $title );
-               }
-       }
-
-       /**
-        * Notify the callback function when a "</page>" is closed.
-        * @param Title $title
-        * @param ForeignTitle $foreignTitle
-        * @param int $revCount
-        * @param int $sucCount Number of revisions for which callback returned true
-        * @param array $pageInfo Associative array of page information
-        */
-       private function pageOutCallback( $title, $foreignTitle, $revCount,
-                       $sucCount, $pageInfo ) {
-               if ( isset( $this->mPageOutCallback ) ) {
-                       $args = func_get_args();
-                       call_user_func_array( $this->mPageOutCallback, $args );
-               }
-       }
-
-       /**
-        * Notify the callback function of a revision
-        * @param WikiRevision $revision
-        * @return bool|mixed
-        */
-       private function revisionCallback( $revision ) {
-               if ( isset( $this->mRevisionCallback ) ) {
-                       return call_user_func_array( $this->mRevisionCallback,
-                                       array( $revision, $this ) );
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Notify the callback function of a new log item
-        * @param WikiRevision $revision
-        * @return bool|mixed
-        */
-       private function logItemCallback( $revision ) {
-               if ( isset( $this->mLogItemCallback ) ) {
-                       return call_user_func_array( $this->mLogItemCallback,
-                                       array( $revision, $this ) );
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * Retrieves the contents of the named attribute of the current element.
-        * @param string $attr The name of the attribute
-        * @return string The value of the attribute or an empty string if it is not set in the current
-        * element.
-        */
-       public function nodeAttribute( $attr ) {
-               return $this->reader->getAttribute( $attr );
-       }
-
-       /**
-        * Shouldn't something like this be built-in to XMLReader?
-        * Fetches text contents of the current element, assuming
-        * no sub-elements or such scary things.
-        * @return string
-        * @access private
-        */
-       public function nodeContents() {
-               if ( $this->reader->isEmptyElement ) {
-                       return "";
-               }
-               $buffer = "";
-               while ( $this->reader->read() ) {
-                       switch ( $this->reader->nodeType ) {
-                       case XMLReader::TEXT:
-                       case XMLReader::CDATA:
-                       case XMLReader::SIGNIFICANT_WHITESPACE:
-                               $buffer .= $this->reader->value;
-                               break;
-                       case XMLReader::END_ELEMENT:
-                               return $buffer;
-                       }
-               }
-
-               $this->reader->close();
-               return '';
-       }
-
-       /**
-        * Primary entry point
-        * @throws MWException
-        * @return bool
-        */
-       public function doImport() {
-               // Calls to reader->read need to be wrapped in calls to
-               // libxml_disable_entity_loader() to avoid local file
-               // inclusion attacks (bug 46932).
-               $oldDisable = libxml_disable_entity_loader( true );
-               $this->reader->read();
-
-               if ( $this->reader->localName != 'mediawiki' ) {
-                       libxml_disable_entity_loader( $oldDisable );
-                       throw new MWException( "Expected <mediawiki> tag, got " .
-                               $this->reader->localName );
-               }
-               $this->debug( "<mediawiki> tag is correct." );
-
-               $this->debug( "Starting primary dump processing loop." );
-
-               $keepReading = $this->reader->read();
-               $skip = false;
-               $rethrow = null;
-               try {
-                       while ( $keepReading ) {
-                               $tag = $this->reader->localName;
-                               $type = $this->reader->nodeType;
-
-                               if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
-                                       // Do nothing
-                               } elseif ( $tag == 'mediawiki' && $type == XMLReader::END_ELEMENT ) {
-                                       break;
-                               } elseif ( $tag == 'siteinfo' ) {
-                                       $this->handleSiteInfo();
-                               } elseif ( $tag == 'page' ) {
-                                       $this->handlePage();
-                               } elseif ( $tag == 'logitem' ) {
-                                       $this->handleLogItem();
-                               } elseif ( $tag != '#text' ) {
-                                       $this->warn( "Unhandled top-level XML tag $tag" );
-
-                                       $skip = true;
-                               }
-
-                               if ( $skip ) {
-                                       $keepReading = $this->reader->next();
-                                       $skip = false;
-                                       $this->debug( "Skip" );
-                               } else {
-                                       $keepReading = $this->reader->read();
-                               }
-                       }
-               } catch ( Exception $ex ) {
-                       $rethrow = $ex;
-               }
-
-               // finally
-               libxml_disable_entity_loader( $oldDisable );
-               $this->reader->close();
-
-               if ( $rethrow ) {
-                       throw $rethrow;
-               }
-
-               return true;
-       }
-
-       private function handleSiteInfo() {
-               $this->debug( "Enter site info handler." );
-               $siteInfo = array();
-
-               // Fields that can just be stuffed in the siteInfo object
-               $normalFields = array( 'sitename', 'base', 'generator', 'case' );
-
-               while ( $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
-                                       $this->reader->localName == 'siteinfo' ) {
-                               break;
-                       }
-
-                       $tag = $this->reader->localName;
-
-                       if ( $tag == 'namespace' ) {
-                               $this->foreignNamespaces[$this->nodeAttribute( 'key' )] =
-                                       $this->nodeContents();
-                       } elseif ( in_array( $tag, $normalFields ) ) {
-                               $siteInfo[$tag] = $this->nodeContents();
-                       }
-               }
-
-               $siteInfo['_namespaces'] = $this->foreignNamespaces;
-               $this->siteInfoCallback( $siteInfo );
-       }
-
-       private function handleLogItem() {
-               $this->debug( "Enter log item handler." );
-               $logInfo = array();
-
-               // Fields that can just be stuffed in the pageInfo object
-               $normalFields = array( 'id', 'comment', 'type', 'action', 'timestamp',
-                                       'logtitle', 'params' );
-
-               while ( $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
-                                       $this->reader->localName == 'logitem' ) {
-                               break;
-                       }
-
-                       $tag = $this->reader->localName;
-
-                       if ( !Hooks::run( 'ImportHandleLogItemXMLTag', array(
-                               $this, $logInfo
-                       ) ) ) {
-                               // Do nothing
-                       } elseif ( in_array( $tag, $normalFields ) ) {
-                               $logInfo[$tag] = $this->nodeContents();
-                       } elseif ( $tag == 'contributor' ) {
-                               $logInfo['contributor'] = $this->handleContributor();
-                       } elseif ( $tag != '#text' ) {
-                               $this->warn( "Unhandled log-item XML tag $tag" );
-                       }
-               }
-
-               $this->processLogItem( $logInfo );
-       }
-
-       /**
-        * @param array $logInfo
-        * @return bool|mixed
-        */
-       private function processLogItem( $logInfo ) {
-
-               $revision = new WikiRevision( $this->config );
-
-               if ( isset( $logInfo['id'] ) ) {
-                       $revision->setID( $logInfo['id'] );
-               }
-               $revision->setType( $logInfo['type'] );
-               $revision->setAction( $logInfo['action'] );
-               if ( isset( $logInfo['timestamp'] ) ) {
-                       $revision->setTimestamp( $logInfo['timestamp'] );
-               }
-               if ( isset( $logInfo['params'] ) ) {
-                       $revision->setParams( $logInfo['params'] );
-               }
-               if ( isset( $logInfo['logtitle'] ) ) {
-                       // @todo Using Title for non-local titles is a recipe for disaster.
-                       // We should use ForeignTitle here instead.
-                       $revision->setTitle( Title::newFromText( $logInfo['logtitle'] ) );
-               }
-
-               $revision->setNoUpdates( $this->mNoUpdates );
-
-               if ( isset( $logInfo['comment'] ) ) {
-                       $revision->setComment( $logInfo['comment'] );
-               }
-
-               if ( isset( $logInfo['contributor']['ip'] ) ) {
-                       $revision->setUserIP( $logInfo['contributor']['ip'] );
-               }
-
-               if ( !isset( $logInfo['contributor']['username'] ) ) {
-                       $revision->setUsername( 'Unknown user' );
-               } else {
-                       $revision->setUserName( $logInfo['contributor']['username'] );
-               }
-
-               return $this->logItemCallback( $revision );
-       }
-
-       private function handlePage() {
-               // Handle page data.
-               $this->debug( "Enter page handler." );
-               $pageInfo = array( 'revisionCount' => 0, 'successfulRevisionCount' => 0 );
-
-               // Fields that can just be stuffed in the pageInfo object
-               $normalFields = array( 'title', 'ns', 'id', 'redirect', 'restrictions' );
-
-               $skip = false;
-               $badTitle = false;
-
-               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
-                                       $this->reader->localName == 'page' ) {
-                               break;
-                       }
-
-                       $skip = false;
-
-                       $tag = $this->reader->localName;
-
-                       if ( $badTitle ) {
-                               // The title is invalid, bail out of this page
-                               $skip = true;
-                       } elseif ( !Hooks::run( 'ImportHandlePageXMLTag', array( $this,
-                                               &$pageInfo ) ) ) {
-                               // Do nothing
-                       } elseif ( in_array( $tag, $normalFields ) ) {
-                               // An XML snippet:
-                               // <page>
-                               //     <id>123</id>
-                               //     <title>Page</title>
-                               //     <redirect title="NewTitle"/>
-                               //     ...
-                               // Because the redirect tag is built differently, we need special handling for that case.
-                               if ( $tag == 'redirect' ) {
-                                       $pageInfo[$tag] = $this->nodeAttribute( 'title' );
-                               } else {
-                                       $pageInfo[$tag] = $this->nodeContents();
-                               }
-                       } elseif ( $tag == 'revision' || $tag == 'upload' ) {
-                               if ( !isset( $title ) ) {
-                                       $title = $this->processTitle( $pageInfo['title'],
-                                               isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null );
-
-                                       // $title is either an array of two titles or false.
-                                       if ( is_array( $title ) ) {
-                                               $this->pageCallback( $title );
-                                               list( $pageInfo['_title'], $foreignTitle ) = $title;
-                                       } else {
-                                               $badTitle = true;
-                                               $skip = true;
-                                       }
-                               }
-
-                               if ( $title ) {
-                                       if ( $tag == 'revision' ) {
-                                               $this->handleRevision( $pageInfo );
-                                       } else {
-                                               $this->handleUpload( $pageInfo );
-                                       }
-                               }
-                       } elseif ( $tag != '#text' ) {
-                               $this->warn( "Unhandled page XML tag $tag" );
-                               $skip = true;
-                       }
-               }
-
-               // @note $pageInfo is only set if a valid $title is processed above with
-               //       no error. If we have a valid $title, then pageCallback is called
-               //       above, $pageInfo['title'] is set and we do pageOutCallback here.
-               //       If $pageInfo['_title'] is not set, then $foreignTitle is also not
-               //       set since they both come from $title above.
-               if ( array_key_exists( '_title', $pageInfo ) ) {
-                       $this->pageOutCallback( $pageInfo['_title'], $foreignTitle,
-                                       $pageInfo['revisionCount'],
-                                       $pageInfo['successfulRevisionCount'],
-                                       $pageInfo );
-               }
-       }
-
-       /**
-        * @param array $pageInfo
-        */
-       private function handleRevision( &$pageInfo ) {
-               $this->debug( "Enter revision handler" );
-               $revisionInfo = array();
-
-               $normalFields = array( 'id', 'timestamp', 'comment', 'minor', 'model', 'format', 'text' );
-
-               $skip = false;
-
-               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
-                                       $this->reader->localName == 'revision' ) {
-                               break;
-                       }
-
-                       $tag = $this->reader->localName;
-
-                       if ( !Hooks::run( 'ImportHandleRevisionXMLTag', array(
-                               $this, $pageInfo, $revisionInfo
-                       ) ) ) {
-                               // Do nothing
-                       } elseif ( in_array( $tag, $normalFields ) ) {
-                               $revisionInfo[$tag] = $this->nodeContents();
-                       } elseif ( $tag == 'contributor' ) {
-                               $revisionInfo['contributor'] = $this->handleContributor();
-                       } elseif ( $tag != '#text' ) {
-                               $this->warn( "Unhandled revision XML tag $tag" );
-                               $skip = true;
-                       }
-               }
-
-               $pageInfo['revisionCount']++;
-               if ( $this->processRevision( $pageInfo, $revisionInfo ) ) {
-                       $pageInfo['successfulRevisionCount']++;
-               }
-       }
-
-       /**
-        * @param array $pageInfo
-        * @param array $revisionInfo
-        * @return bool|mixed
-        */
-       private function processRevision( $pageInfo, $revisionInfo ) {
-               global $wgMaxArticleSize;
-
-               // Make sure revisions won't violate $wgMaxArticleSize, which could lead to
-               // database errors and instability. Testing for revisions with only listed
-               // content models, as other content models might use serialization formats
-               // which aren't checked against $wgMaxArticleSize.
-               if ( ( !isset( $revisionInfo['model'] ) ||
-                       in_array( $revisionInfo['model'], array(
-                               'wikitext',
-                               'css',
-                               'json',
-                               'javascript',
-                               'text',
-                               ''
-                       ) ) ) &&
-                       (int)( strlen( $revisionInfo['text'] ) / 1024 ) > $wgMaxArticleSize
-               ) {
-                       throw new MWException( 'The text of ' .
-                               ( isset( $revisionInfo['id'] ) ?
-                                       "the revision with ID $revisionInfo[id]" :
-                                       'a revision'
-                               ) . " exceeds the maximum allowable size ($wgMaxArticleSize KB)" );
-               }
-
-               $revision = new WikiRevision( $this->config );
-
-               if ( isset( $revisionInfo['id'] ) ) {
-                       $revision->setID( $revisionInfo['id'] );
-               }
-               if ( isset( $revisionInfo['model'] ) ) {
-                       $revision->setModel( $revisionInfo['model'] );
-               }
-               if ( isset( $revisionInfo['format'] ) ) {
-                       $revision->setFormat( $revisionInfo['format'] );
-               }
-               $revision->setTitle( $pageInfo['_title'] );
-
-               if ( isset( $revisionInfo['text'] ) ) {
-                       $handler = $revision->getContentHandler();
-                       $text = $handler->importTransform(
-                               $revisionInfo['text'],
-                               $revision->getFormat() );
-
-                       $revision->setText( $text );
-               }
-               if ( isset( $revisionInfo['timestamp'] ) ) {
-                       $revision->setTimestamp( $revisionInfo['timestamp'] );
-               } else {
-                       $revision->setTimestamp( wfTimestampNow() );
-               }
-
-               if ( isset( $revisionInfo['comment'] ) ) {
-                       $revision->setComment( $revisionInfo['comment'] );
-               }
-
-               if ( isset( $revisionInfo['minor'] ) ) {
-                       $revision->setMinor( true );
-               }
-               if ( isset( $revisionInfo['contributor']['ip'] ) ) {
-                       $revision->setUserIP( $revisionInfo['contributor']['ip'] );
-               } elseif ( isset( $revisionInfo['contributor']['username'] ) ) {
-                       $revision->setUserName( $revisionInfo['contributor']['username'] );
-               } else {
-                       $revision->setUserName( 'Unknown user' );
-               }
-               $revision->setNoUpdates( $this->mNoUpdates );
-
-               return $this->revisionCallback( $revision );
-       }
-
-       /**
-        * @param array $pageInfo
-        * @return mixed
-        */
-       private function handleUpload( &$pageInfo ) {
-               $this->debug( "Enter upload handler" );
-               $uploadInfo = array();
-
-               $normalFields = array( 'timestamp', 'comment', 'filename', 'text',
-                                       'src', 'size', 'sha1base36', 'archivename', 'rel' );
-
-               $skip = false;
-
-               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
-                                       $this->reader->localName == 'upload' ) {
-                               break;
-                       }
-
-                       $tag = $this->reader->localName;
-
-                       if ( !Hooks::run( 'ImportHandleUploadXMLTag', array(
-                               $this, $pageInfo
-                       ) ) ) {
-                               // Do nothing
-                       } elseif ( in_array( $tag, $normalFields ) ) {
-                               $uploadInfo[$tag] = $this->nodeContents();
-                       } elseif ( $tag == 'contributor' ) {
-                               $uploadInfo['contributor'] = $this->handleContributor();
-                       } elseif ( $tag == 'contents' ) {
-                               $contents = $this->nodeContents();
-                               $encoding = $this->reader->getAttribute( 'encoding' );
-                               if ( $encoding === 'base64' ) {
-                                       $uploadInfo['fileSrc'] = $this->dumpTemp( base64_decode( $contents ) );
-                                       $uploadInfo['isTempSrc'] = true;
-                               }
-                       } elseif ( $tag != '#text' ) {
-                               $this->warn( "Unhandled upload XML tag $tag" );
-                               $skip = true;
-                       }
-               }
-
-               if ( $this->mImageBasePath && isset( $uploadInfo['rel'] ) ) {
-                       $path = "{$this->mImageBasePath}/{$uploadInfo['rel']}";
-                       if ( file_exists( $path ) ) {
-                               $uploadInfo['fileSrc'] = $path;
-                               $uploadInfo['isTempSrc'] = false;
-                       }
-               }
-
-               if ( $this->mImportUploads ) {
-                       return $this->processUpload( $pageInfo, $uploadInfo );
-               }
-       }
-
-       /**
-        * @param string $contents
-        * @return string
-        */
-       private function dumpTemp( $contents ) {
-               $filename = tempnam( wfTempDir(), 'importupload' );
-               file_put_contents( $filename, $contents );
-               return $filename;
-       }
-
-       /**
-        * @param array $pageInfo
-        * @param array $uploadInfo
-        * @return mixed
-        */
-       private function processUpload( $pageInfo, $uploadInfo ) {
-               $revision = new WikiRevision( $this->config );
-               $text = isset( $uploadInfo['text'] ) ? $uploadInfo['text'] : '';
-
-               $revision->setTitle( $pageInfo['_title'] );
-               $revision->setID( $pageInfo['id'] );
-               $revision->setTimestamp( $uploadInfo['timestamp'] );
-               $revision->setText( $text );
-               $revision->setFilename( $uploadInfo['filename'] );
-               if ( isset( $uploadInfo['archivename'] ) ) {
-                       $revision->setArchiveName( $uploadInfo['archivename'] );
-               }
-               $revision->setSrc( $uploadInfo['src'] );
-               if ( isset( $uploadInfo['fileSrc'] ) ) {
-                       $revision->setFileSrc( $uploadInfo['fileSrc'],
-                               !empty( $uploadInfo['isTempSrc'] ) );
-               }
-               if ( isset( $uploadInfo['sha1base36'] ) ) {
-                       $revision->setSha1Base36( $uploadInfo['sha1base36'] );
-               }
-               $revision->setSize( intval( $uploadInfo['size'] ) );
-               $revision->setComment( $uploadInfo['comment'] );
-
-               if ( isset( $uploadInfo['contributor']['ip'] ) ) {
-                       $revision->setUserIP( $uploadInfo['contributor']['ip'] );
-               }
-               if ( isset( $uploadInfo['contributor']['username'] ) ) {
-                       $revision->setUserName( $uploadInfo['contributor']['username'] );
-               }
-               $revision->setNoUpdates( $this->mNoUpdates );
-
-               return call_user_func( $this->mUploadCallback, $revision );
-       }
-
-       /**
-        * @return array
-        */
-       private function handleContributor() {
-               $fields = array( 'id', 'ip', 'username' );
-               $info = array();
-
-               if ( $this->reader->isEmptyElement ) {
-                       return $info;
-               }
-               while ( $this->reader->read() ) {
-                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
-                                       $this->reader->localName == 'contributor' ) {
-                               break;
-                       }
-
-                       $tag = $this->reader->localName;
-
-                       if ( in_array( $tag, $fields ) ) {
-                               $info[$tag] = $this->nodeContents();
-                       }
-               }
-
-               return $info;
-       }
-
-       /**
-        * @param string $text
-        * @param string|null $ns
-        * @return array|bool
-        */
-       private function processTitle( $text, $ns = null ) {
-               if ( is_null( $this->foreignNamespaces ) ) {
-                       $foreignTitleFactory = new NaiveForeignTitleFactory();
-               } else {
-                       $foreignTitleFactory = new NamespaceAwareForeignTitleFactory(
-                               $this->foreignNamespaces );
-               }
-
-               $foreignTitle = $foreignTitleFactory->createForeignTitle( $text,
-                       intval( $ns ) );
-
-               $title = $this->importTitleFactory->createTitleFromForeignTitle(
-                       $foreignTitle );
-
-               $commandLineMode = $this->config->get( 'CommandLineMode' );
-               if ( is_null( $title ) ) {
-                       # Invalid page title? Ignore the page
-                       $this->notice( 'import-error-invalid', $foreignTitle->getFullText() );
-                       return false;
-               } elseif ( $title->isExternal() ) {
-                       $this->notice( 'import-error-interwiki', $title->getPrefixedText() );
-                       return false;
-               } elseif ( !$title->canExist() ) {
-                       $this->notice( 'import-error-special', $title->getPrefixedText() );
-                       return false;
-               } elseif ( !$title->userCan( 'edit' ) && !$commandLineMode ) {
-                       # Do not import if the importing wiki user cannot edit this page
-                       $this->notice( 'import-error-edit', $title->getPrefixedText() );
-                       return false;
-               } elseif ( !$title->exists() && !$title->userCan( 'create' ) && !$commandLineMode ) {
-                       # Do not import if the importing wiki user cannot create this page
-                       $this->notice( 'import-error-create', $title->getPrefixedText() );
-                       return false;
-               }
-
-               return array( $title, $foreignTitle );
-       }
-}
-
-/** This is a horrible hack used to keep source compatibility */
-class UploadSourceAdapter {
-       /** @var array */
-       public static $sourceRegistrations = array();
-
-       /** @var string */
-       private $mSource;
-
-       /** @var string */
-       private $mBuffer;
-
-       /** @var int */
-       private $mPosition;
-
-       /**
-        * @param ImportSource $source
-        * @return string
-        */
-       static function registerSource( ImportSource $source ) {
-               $id = wfRandomString();
-
-               self::$sourceRegistrations[$id] = $source;
-
-               return $id;
-       }
-
-       /**
-        * @param string $path
-        * @param string $mode
-        * @param array $options
-        * @param string $opened_path
-        * @return bool
-        */
-       function stream_open( $path, $mode, $options, &$opened_path ) {
-               $url = parse_url( $path );
-               $id = $url['host'];
-
-               if ( !isset( self::$sourceRegistrations[$id] ) ) {
-                       return false;
-               }
-
-               $this->mSource = self::$sourceRegistrations[$id];
-
-               return true;
-       }
-
-       /**
-        * @param int $count
-        * @return string
-        */
-       function stream_read( $count ) {
-               $return = '';
-               $leave = false;
-
-               while ( !$leave && !$this->mSource->atEnd() &&
-                               strlen( $this->mBuffer ) < $count ) {
-                       $read = $this->mSource->readChunk();
-
-                       if ( !strlen( $read ) ) {
-                               $leave = true;
-                       }
-
-                       $this->mBuffer .= $read;
-               }
-
-               if ( strlen( $this->mBuffer ) ) {
-                       $return = substr( $this->mBuffer, 0, $count );
-                       $this->mBuffer = substr( $this->mBuffer, $count );
-               }
-
-               $this->mPosition += strlen( $return );
-
-               return $return;
-       }
-
-       /**
-        * @param string $data
-        * @return bool
-        */
-       function stream_write( $data ) {
-               return false;
-       }
-
-       /**
-        * @return mixed
-        */
-       function stream_tell() {
-               return $this->mPosition;
-       }
-
-       /**
-        * @return bool
-        */
-       function stream_eof() {
-               return $this->mSource->atEnd();
-       }
-
-       /**
-        * @return array
-        */
-       function url_stat() {
-               $result = array();
-
-               $result['dev'] = $result[0] = 0;
-               $result['ino'] = $result[1] = 0;
-               $result['mode'] = $result[2] = 0;
-               $result['nlink'] = $result[3] = 0;
-               $result['uid'] = $result[4] = 0;
-               $result['gid'] = $result[5] = 0;
-               $result['rdev'] = $result[6] = 0;
-               $result['size'] = $result[7] = 0;
-               $result['atime'] = $result[8] = 0;
-               $result['mtime'] = $result[9] = 0;
-               $result['ctime'] = $result[10] = 0;
-               $result['blksize'] = $result[11] = 0;
-               $result['blocks'] = $result[12] = 0;
-
-               return $result;
-       }
-}
-
-/**
- * @todo document (e.g. one-sentence class description).
- * @ingroup SpecialPage
- */
-class WikiRevision {
-       /** @todo Unused? */
-       public $importer = null;
-
-       /** @var Title */
-       public $title = null;
-
-       /** @var int */
-       public $id = 0;
-
-       /** @var string */
-       public $timestamp = "20010115000000";
-
-       /**
-        * @var int
-        * @todo Can't find any uses. Public, because that's suspicious. Get clarity. */
-       public $user = 0;
-
-       /** @var string */
-       public $user_text = "";
-
-       /** @var string */
-       public $model = null;
-
-       /** @var string */
-       public $format = null;
-
-       /** @var string */
-       public $text = "";
-
-       /** @var int */
-       protected $size;
-
-       /** @var Content */
-       public $content = null;
-
-       /** @var ContentHandler */
-       protected $contentHandler = null;
-
-       /** @var string */
-       public $comment = "";
-
-       /** @var bool */
-       public $minor = false;
-
-       /** @var string */
-       public $type = "";
-
-       /** @var string */
-       public $action = "";
-
-       /** @var string */
-       public $params = "";
-
-       /** @var string */
-       public $fileSrc = '';
-
-       /** @var bool|string */
-       public $sha1base36 = false;
-
-       /**
-        * @var bool
-        * @todo Unused?
-        */
-       public $isTemp = false;
-
-       /** @var string */
-       public $archiveName = '';
-
-       protected $filename;
-
-       /** @var mixed */
-       protected $src;
-
-       /** @todo Unused? */
-       public $fileIsTemp;
-
-       /** @var bool */
-       private $mNoUpdates = false;
-
-       /** @var Config $config */
-       private $config;
-
-       public function __construct( Config $config ) {
-               $this->config = $config;
-       }
-
-       /**
-        * @param Title $title
-        * @throws MWException
-        */
-       function setTitle( $title ) {
-               if ( is_object( $title ) ) {
-                       $this->title = $title;
-               } elseif ( is_null( $title ) ) {
-                       throw new MWException( "WikiRevision given a null title in import. "
-                               . "You may need to adjust \$wgLegalTitleChars." );
-               } else {
-                       throw new MWException( "WikiRevision given non-object title in import." );
-               }
-       }
-
-       /**
-        * @param int $id
-        */
-       function setID( $id ) {
-               $this->id = $id;
-       }
-
-       /**
-        * @param string $ts
-        */
-       function setTimestamp( $ts ) {
-               # 2003-08-05T18:30:02Z
-               $this->timestamp = wfTimestamp( TS_MW, $ts );
-       }
-
-       /**
-        * @param string $user
-        */
-       function setUsername( $user ) {
-               $this->user_text = $user;
-       }
-
-       /**
-        * @param string $ip
-        */
-       function setUserIP( $ip ) {
-               $this->user_text = $ip;
-       }
-
-       /**
-        * @param string $model
-        */
-       function setModel( $model ) {
-               $this->model = $model;
-       }
-
-       /**
-        * @param string $format
-        */
-       function setFormat( $format ) {
-               $this->format = $format;
-       }
-
-       /**
-        * @param string $text
-        */
-       function setText( $text ) {
-               $this->text = $text;
-       }
-
-       /**
-        * @param string $text
-        */
-       function setComment( $text ) {
-               $this->comment = $text;
-       }
-
-       /**
-        * @param bool $minor
-        */
-       function setMinor( $minor ) {
-               $this->minor = (bool)$minor;
-       }
-
-       /**
-        * @param mixed $src
-        */
-       function setSrc( $src ) {
-               $this->src = $src;
-       }
-
-       /**
-        * @param string $src
-        * @param bool $isTemp
-        */
-       function setFileSrc( $src, $isTemp ) {
-               $this->fileSrc = $src;
-               $this->fileIsTemp = $isTemp;
-       }
-
-       /**
-        * @param string $sha1base36
-        */
-       function setSha1Base36( $sha1base36 ) {
-               $this->sha1base36 = $sha1base36;
-       }
-
-       /**
-        * @param string $filename
-        */
-       function setFilename( $filename ) {
-               $this->filename = $filename;
-       }
-
-       /**
-        * @param string $archiveName
-        */
-       function setArchiveName( $archiveName ) {
-               $this->archiveName = $archiveName;
-       }
-
-       /**
-        * @param int $size
-        */
-       function setSize( $size ) {
-               $this->size = intval( $size );
-       }
-
-       /**
-        * @param string $type
-        */
-       function setType( $type ) {
-               $this->type = $type;
-       }
-
-       /**
-        * @param string $action
-        */
-       function setAction( $action ) {
-               $this->action = $action;
-       }
-
-       /**
-        * @param array $params
-        */
-       function setParams( $params ) {
-               $this->params = $params;
-       }
-
-       /**
-        * @param bool $noupdates
-        */
-       public function setNoUpdates( $noupdates ) {
-               $this->mNoUpdates = $noupdates;
-       }
-
-       /**
-        * @return Title
-        */
-       function getTitle() {
-               return $this->title;
-       }
-
-       /**
-        * @return int
-        */
-       function getID() {
-               return $this->id;
-       }
-
-       /**
-        * @return string
-        */
-       function getTimestamp() {
-               return $this->timestamp;
-       }
-
-       /**
-        * @return string
-        */
-       function getUser() {
-               return $this->user_text;
-       }
-
-       /**
-        * @return string
-        *
-        * @deprecated Since 1.21, use getContent() instead.
-        */
-       function getText() {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
-
-               return $this->text;
-       }
-
-       /**
-        * @return ContentHandler
-        */
-       function getContentHandler() {
-               if ( is_null( $this->contentHandler ) ) {
-                       $this->contentHandler = ContentHandler::getForModelID( $this->getModel() );
-               }
-
-               return $this->contentHandler;
-       }
-
-       /**
-        * @return Content
-        */
-       function getContent() {
-               if ( is_null( $this->content ) ) {
-                       $handler = $this->getContentHandler();
-                       $this->content = $handler->unserializeContent( $this->text, $this->getFormat() );
-               }
-
-               return $this->content;
-       }
-
-       /**
-        * @return string
-        */
-       function getModel() {
-               if ( is_null( $this->model ) ) {
-                       $this->model = $this->getTitle()->getContentModel();
-               }
-
-               return $this->model;
-       }
-
-       /**
-        * @return string
-        */
-       function getFormat() {
-               if ( is_null( $this->format ) ) {
-                       $this->format = $this->getContentHandler()->getDefaultFormat();
-               }
-
-               return $this->format;
-       }
-
-       /**
-        * @return string
-        */
-       function getComment() {
-               return $this->comment;
-       }
-
-       /**
-        * @return bool
-        */
-       function getMinor() {
-               return $this->minor;
-       }
-
-       /**
-        * @return mixed
-        */
-       function getSrc() {
-               return $this->src;
-       }
-
-       /**
-        * @return bool|string
-        */
-       function getSha1() {
-               if ( $this->sha1base36 ) {
-                       return Wikimedia\base_convert( $this->sha1base36, 36, 16 );
-               }
-               return false;
-       }
-
-       /**
-        * @return string
-        */
-       function getFileSrc() {
-               return $this->fileSrc;
-       }
-
-       /**
-        * @return bool
-        */
-       function isTempSrc() {
-               return $this->isTemp;
-       }
-
-       /**
-        * @return mixed
-        */
-       function getFilename() {
-               return $this->filename;
-       }
-
-       /**
-        * @return string
-        */
-       function getArchiveName() {
-               return $this->archiveName;
-       }
-
-       /**
-        * @return mixed
-        */
-       function getSize() {
-               return $this->size;
-       }
-
-       /**
-        * @return string
-        */
-       function getType() {
-               return $this->type;
-       }
-
-       /**
-        * @return string
-        */
-       function getAction() {
-               return $this->action;
-       }
-
-       /**
-        * @return string
-        */
-       function getParams() {
-               return $this->params;
-       }
-
-       /**
-        * @return bool
-        */
-       function importOldRevision() {
-               $dbw = wfGetDB( DB_MASTER );
-
-               # Sneak a single revision into place
-               $user = User::newFromName( $this->getUser() );
-               if ( $user ) {
-                       $userId = intval( $user->getId() );
-                       $userText = $user->getName();
-                       $userObj = $user;
-               } else {
-                       $userId = 0;
-                       $userText = $this->getUser();
-                       $userObj = new User;
-               }
-
-               // avoid memory leak...?
-               Title::clearCaches();
-
-               $page = WikiPage::factory( $this->title );
-               $page->loadPageData( 'fromdbmaster' );
-               if ( !$page->exists() ) {
-                       # must create the page...
-                       $pageId = $page->insertOn( $dbw );
-                       $created = true;
-                       $oldcountable = null;
-               } else {
-                       $pageId = $page->getId();
-                       $created = false;
-
-                       $prior = $dbw->selectField( 'revision', '1',
-                               array( 'rev_page' => $pageId,
-                                       'rev_timestamp' => $dbw->timestamp( $this->timestamp ),
-                                       'rev_user_text' => $userText,
-                                       'rev_comment' => $this->getComment() ),
-                               __METHOD__
-                       );
-                       if ( $prior ) {
-                               // @todo FIXME: This could fail slightly for multiple matches :P
-                               wfDebug( __METHOD__ . ": skipping existing revision for [[" .
-                                       $this->title->getPrefixedText() . "]], timestamp " . $this->timestamp . "\n" );
-                               return false;
-                       }
-               }
-
-               // Select previous version to make size diffs correct
-               $prevId = $dbw->selectField( 'revision', 'rev_id',
-                       array(
-                               'rev_page' => $pageId,
-                               'rev_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $this->timestamp ) ),
-                       ),
-                       __METHOD__,
-                       array( 'ORDER BY' => array(
-                                       'rev_timestamp DESC',
-                                       'rev_id DESC', // timestamp is not unique per page
-                               )
-                       )
-               );
-
-               # @todo FIXME: Use original rev_id optionally (better for backups)
-               # Insert the row
-               $revision = new Revision( array(
-                       'title' => $this->title,
-                       'page' => $pageId,
-                       'content_model' => $this->getModel(),
-                       'content_format' => $this->getFormat(),
-                       // XXX: just set 'content' => $this->getContent()?
-                       'text' => $this->getContent()->serialize( $this->getFormat() ),
-                       'comment' => $this->getComment(),
-                       'user' => $userId,
-                       'user_text' => $userText,
-                       'timestamp' => $this->timestamp,
-                       'minor_edit' => $this->minor,
-                       'parent_id' => $prevId,
-                       ) );
-               $revision->insertOn( $dbw );
-               $changed = $page->updateIfNewerOn( $dbw, $revision );
-
-               if ( $changed !== false && !$this->mNoUpdates ) {
-                       wfDebug( __METHOD__ . ": running updates\n" );
-                       // countable/oldcountable stuff is handled in WikiImporter::finishImportPage
-                       $page->doEditUpdates(
-                               $revision,
-                               $userObj,
-                               array( 'created' => $created, 'oldcountable' => 'no-change' )
-                       );
-               }
-
-               return true;
-       }
-
-       function importLogItem() {
-               $dbw = wfGetDB( DB_MASTER );
-
-               $user = User::newFromName( $this->getUser() );
-               if ( $user ) {
-                       $userId = intval( $user->getId() );
-                       $userText = $user->getName();
-               } else {
-                       $userId = 0;
-                       $userText = $this->getUser();
-               }
-
-               # @todo FIXME: This will not record autoblocks
-               if ( !$this->getTitle() ) {
-                       wfDebug( __METHOD__ . ": skipping invalid {$this->type}/{$this->action} log time, timestamp " .
-                               $this->timestamp . "\n" );
-                       return;
-               }
-               # Check if it exists already
-               // @todo FIXME: Use original log ID (better for backups)
-               $prior = $dbw->selectField( 'logging', '1',
-                       array( 'log_type' => $this->getType(),
-                               'log_action' => $this->getAction(),
-                               'log_timestamp' => $dbw->timestamp( $this->timestamp ),
-                               'log_namespace' => $this->getTitle()->getNamespace(),
-                               'log_title' => $this->getTitle()->getDBkey(),
-                               'log_comment' => $this->getComment(),
-                               # 'log_user_text' => $this->user_text,
-                               'log_params' => $this->params ),
-                       __METHOD__
-               );
-               // @todo FIXME: This could fail slightly for multiple matches :P
-               if ( $prior ) {
-                       wfDebug( __METHOD__
-                               . ": skipping existing item for Log:{$this->type}/{$this->action}, timestamp "
-                               . $this->timestamp . "\n" );
-                       return;
-               }
-               $log_id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
-               $data = array(
-                       'log_id' => $log_id,
-                       'log_type' => $this->type,
-                       'log_action' => $this->action,
-                       'log_timestamp' => $dbw->timestamp( $this->timestamp ),
-                       'log_user' =>  $userId,
-                       'log_user_text' => $userText,
-                       'log_namespace' => $this->getTitle()->getNamespace(),
-                       'log_title' => $this->getTitle()->getDBkey(),
-                       'log_comment' => $this->getComment(),
-                       'log_params' => $this->params
-               );
-               $dbw->insert( 'logging', $data, __METHOD__ );
-       }
-
-       /**
-        * @return bool
-        */
-       function importUpload() {
-               # Construct a file
-               $archiveName = $this->getArchiveName();
-               if ( $archiveName ) {
-                       wfDebug( __METHOD__ . "Importing archived file as $archiveName\n" );
-                       $file = OldLocalFile::newFromArchiveName( $this->getTitle(),
-                               RepoGroup::singleton()->getLocalRepo(), $archiveName );
-               } else {
-                       $file = wfLocalFile( $this->getTitle() );
-                       $file->load( File::READ_LATEST );
-                       wfDebug( __METHOD__ . 'Importing new file as ' . $file->getName() . "\n" );
-                       if ( $file->exists() && $file->getTimestamp() > $this->getTimestamp() ) {
-                               $archiveName = $file->getTimestamp() . '!' . $file->getName();
-                               $file = OldLocalFile::newFromArchiveName( $this->getTitle(),
-                                       RepoGroup::singleton()->getLocalRepo(), $archiveName );
-                               wfDebug( __METHOD__ . "File already exists; importing as $archiveName\n" );
-                       }
-               }
-               if ( !$file ) {
-                       wfDebug( __METHOD__ . ': Bad file for ' . $this->getTitle() . "\n" );
-                       return false;
-               }
-
-               # Get the file source or download if necessary
-               $source = $this->getFileSrc();
-               $flags = $this->isTempSrc() ? File::DELETE_SOURCE : 0;
-               if ( !$source ) {
-                       $source = $this->downloadSource();
-                       $flags |= File::DELETE_SOURCE;
-               }
-               if ( !$source ) {
-                       wfDebug( __METHOD__ . ": Could not fetch remote file.\n" );
-                       return false;
-               }
-               $sha1 = $this->getSha1();
-               if ( $sha1 && ( $sha1 !== sha1_file( $source ) ) ) {
-                       if ( $flags & File::DELETE_SOURCE ) {
-                               # Broken file; delete it if it is a temporary file
-                               unlink( $source );
-                       }
-                       wfDebug( __METHOD__ . ": Corrupt file $source.\n" );
-                       return false;
-               }
-
-               $user = User::newFromName( $this->user_text );
-
-               # Do the actual upload
-               if ( $archiveName ) {
-                       $status = $file->uploadOld( $source, $archiveName,
-                               $this->getTimestamp(), $this->getComment(), $user, $flags );
-               } else {
-                       $status = $file->upload( $source, $this->getComment(), $this->getComment(),
-                               $flags, false, $this->getTimestamp(), $user );
-               }
-
-               if ( $status->isGood() ) {
-                       wfDebug( __METHOD__ . ": Successful\n" );
-                       return true;
-               } else {
-                       wfDebug( __METHOD__ . ': failed: ' . $status->getHTML() . "\n" );
-                       return false;
-               }
-       }
-
-       /**
-        * @return bool|string
-        */
-       function downloadSource() {
-               if ( !$this->config->get( 'EnableUploads' ) ) {
-                       return false;
-               }
-
-               $tempo = tempnam( wfTempDir(), 'download' );
-               $f = fopen( $tempo, 'wb' );
-               if ( !$f ) {
-                       wfDebug( "IMPORT: couldn't write to temp file $tempo\n" );
-                       return false;
-               }
-
-               // @todo FIXME!
-               $src = $this->getSrc();
-               $data = Http::get( $src, array(), __METHOD__ );
-               if ( !$data ) {
-                       wfDebug( "IMPORT: couldn't fetch source $src\n" );
-                       fclose( $f );
-                       unlink( $tempo );
-                       return false;
-               }
-
-               fwrite( $f, $data );
-               fclose( $f );
-
-               return $tempo;
-       }
-
-}
-
-/**
- * Source interface for XML import.
- */
-interface ImportSource {
-
-       /**
-        * Indicates whether the end of the input has been reached.
-        * Will return true after a finite number of calls to readChunk.
-        *
-        * @return bool true if there is no more input, false otherwise.
-        */
-       function atEnd();
-
-       /**
-        * Return a chunk of the input, as a (possibly empty) string.
-        * When the end of input is reached, readChunk() returns false.
-        * If atEnd() returns false, readChunk() will return a string.
-        * If atEnd() returns true, readChunk() will return false.
-        *
-        * @return bool|string
-        */
-       function readChunk();
-}
-
-/**
- * Used for importing XML dumps where the content of the dump is in a string.
- * This class is ineffecient, and should only be used for small dumps.
- * For larger dumps, ImportStreamSource should be used instead.
- *
- * @ingroup SpecialPage
- */
-class ImportStringSource implements ImportSource {
-       function __construct( $string ) {
-               $this->mString = $string;
-               $this->mRead = false;
-       }
-
-       /**
-        * @return bool
-        */
-       function atEnd() {
-               return $this->mRead;
-       }
-
-       /**
-        * @return bool|string
-        */
-       function readChunk() {
-               if ( $this->atEnd() ) {
-                       return false;
-               }
-               $this->mRead = true;
-               return $this->mString;
-       }
-}
-
-/**
- * Imports a XML dump from a file (either from file upload, files on disk, or HTTP)
- * @ingroup SpecialPage
- */
-class ImportStreamSource implements ImportSource {
-       function __construct( $handle ) {
-               $this->mHandle = $handle;
-       }
-
-       /**
-        * @return bool
-        */
-       function atEnd() {
-               return feof( $this->mHandle );
-       }
-
-       /**
-        * @return string
-        */
-       function readChunk() {
-               return fread( $this->mHandle, 32768 );
-       }
-
-       /**
-        * @param string $filename
-        * @return Status
-        */
-       static function newFromFile( $filename ) {
-               MediaWiki\suppressWarnings();
-               $file = fopen( $filename, 'rt' );
-               MediaWiki\restoreWarnings();
-               if ( !$file ) {
-                       return Status::newFatal( "importcantopen" );
-               }
-               return Status::newGood( new ImportStreamSource( $file ) );
-       }
-
-       /**
-        * @param string $fieldname
-        * @return Status
-        */
-       static function newFromUpload( $fieldname = "xmlimport" ) {
-               $upload =& $_FILES[$fieldname];
-
-               if ( $upload === null || !$upload['name'] ) {
-                       return Status::newFatal( 'importnofile' );
-               }
-               if ( !empty( $upload['error'] ) ) {
-                       switch ( $upload['error'] ) {
-                               case 1:
-                                       # The uploaded file exceeds the upload_max_filesize directive in php.ini.
-                                       return Status::newFatal( 'importuploaderrorsize' );
-                               case 2:
-                                       # The uploaded file exceeds the MAX_FILE_SIZE directive that
-                                       # was specified in the HTML form.
-                                       return Status::newFatal( 'importuploaderrorsize' );
-                               case 3:
-                                       # The uploaded file was only partially uploaded
-                                       return Status::newFatal( 'importuploaderrorpartial' );
-                               case 6:
-                                       # Missing a temporary folder.
-                                       return Status::newFatal( 'importuploaderrortemp' );
-                               # case else: # Currently impossible
-                       }
-
-               }
-               $fname = $upload['tmp_name'];
-               if ( is_uploaded_file( $fname ) ) {
-                       return ImportStreamSource::newFromFile( $fname );
-               } else {
-                       return Status::newFatal( 'importnofile' );
-               }
-       }
-
-       /**
-        * @param string $url
-        * @param string $method
-        * @return Status
-        */
-       static function newFromURL( $url, $method = 'GET' ) {
-               wfDebug( __METHOD__ . ": opening $url\n" );
-               # Use the standard HTTP fetch function; it times out
-               # quicker and sorts out user-agent problems which might
-               # otherwise prevent importing from large sites, such
-               # as the Wikimedia cluster, etc.
-               $data = Http::request( $method, $url, array( 'followRedirects' => true ), __METHOD__ );
-               if ( $data !== false ) {
-                       $file = tmpfile();
-                       fwrite( $file, $data );
-                       fflush( $file );
-                       fseek( $file, 0 );
-                       return Status::newGood( new ImportStreamSource( $file ) );
-               } else {
-                       return Status::newFatal( 'importcantopen' );
-               }
-       }
-
-       /**
-        * @param string $interwiki
-        * @param string $page
-        * @param bool $history
-        * @param bool $templates
-        * @param int $pageLinkDepth
-        * @return Status
-        */
-       public static function newFromInterwiki( $interwiki, $page, $history = false,
-               $templates = false, $pageLinkDepth = 0
-       ) {
-               if ( $page == '' ) {
-                       return Status::newFatal( 'import-noarticle' );
-               }
-
-               # Look up the first interwiki prefix, and let the foreign site handle
-               # subsequent interwiki prefixes
-               $firstIwPrefix = strtok( $interwiki, ':' );
-               $firstIw = Interwiki::fetch( $firstIwPrefix );
-               if ( !$firstIw ) {
-                       return Status::newFatal( 'importbadinterwiki' );
-               }
-
-               $additionalIwPrefixes = strtok( '' );
-               if ( $additionalIwPrefixes ) {
-                       $additionalIwPrefixes .= ':';
-               }
-               # Have to do a DB-key replacement ourselves; otherwise spaces get
-               # URL-encoded to +, which is wrong in this case. Similar to logic in
-               # Title::getLocalURL
-               $link = $firstIw->getURL( strtr( "${additionalIwPrefixes}Special:Export/$page",
-                       ' ', '_' ) );
-
-               $params = array();
-               if ( $history ) {
-                       $params['history'] = 1;
-               }
-               if ( $templates ) {
-                       $params['templates'] = 1;
-               }
-               if ( $pageLinkDepth ) {
-                       $params['pagelink-depth'] = $pageLinkDepth;
-               }
-
-               $url = wfAppendQuery( $link, $params );
-               # For interwikis, use POST to avoid redirects.
-               return ImportStreamSource::newFromURL( $url, "POST" );
-       }
-}
index 5255b9a..80e4c62 100644 (file)
@@ -670,17 +670,6 @@ class Linker {
                return str_replace( "\n", ' ', $prefix . $s . $postfix );
        }
 
-       /**
-        * See makeImageLink()
-        * When this function is removed, remove if( $parser instanceof Parser ) check there too
-        * @deprecated since 1.20
-        */
-       public static function makeImageLink2( Title $title, $file, $frameParams = array(),
-               $handlerParams = array(), $time = false, $query = "", $widthOption = null ) {
-               return self::makeImageLink( null, $title, $file, $frameParams,
-                       $handlerParams, $time, $query, $widthOption );
-       }
-
        /**
         * Get the link parameters for MediaTransformOutput::toHtml() from given
         * frame parameters supplied by the Parser.
@@ -2315,73 +2304,6 @@ class Linker {
 
        /* Deprecated methods */
 
-       /**
-        * @deprecated since 1.16 Use link(); warnings since 1.21
-        *
-        * Make a link for a title which may or may not be in the database. If you need to
-        * call this lots of times, pre-fill the link cache with a LinkBatch, otherwise each
-        * call to this will result in a DB query.
-        *
-        * @param Title $nt The title object to make the link from, e.g. from Title::newFromText.
-        * @param string $text Link text
-        * @param string $query Optional query part
-        * @param string $trail Optional trail. Alphabetic characters at the start of this string will
-        *   be included in the link text. Other characters will be appended after
-        *   the end of the link.
-        * @param string $prefix Optional prefix. As trail, only before instead of after.
-        * @return string
-        */
-       static function makeLinkObj( $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
-               wfDeprecated( __METHOD__, '1.21' );
-
-               $query = wfCgiToArray( $query );
-               list( $inside, $trail ) = self::splitTrail( $trail );
-               if ( $text === '' ) {
-                       $text = self::linkText( $nt );
-               }
-
-               $ret = self::link( $nt, "$prefix$text$inside", array(), $query ) . $trail;
-
-               return $ret;
-       }
-
-       /**
-        * @deprecated since 1.16 Use link(); warnings since 1.21
-        *
-        * Make a link for a title which definitely exists. This is faster than makeLinkObj because
-        * it doesn't have to do a database query. It's also valid for interwiki titles and special
-        * pages.
-        *
-        * @param Title $title Title object of target page
-        * @param string $text Text to replace the title
-        * @param string $query Link target
-        * @param string $trail Text after link
-        * @param string $prefix Text before link text
-        * @param string $aprops Extra attributes to the a-element
-        * @param string $style Style to apply - if empty, use getInternalLinkAttributesObj instead
-        * @return string The a-element
-        */
-       static function makeKnownLinkObj(
-               $title, $text = '', $query = '', $trail = '', $prefix = '', $aprops = '', $style = ''
-       ) {
-               wfDeprecated( __METHOD__, '1.21' );
-
-               if ( $text == '' ) {
-                       $text = self::linkText( $title );
-               }
-               $attribs = Sanitizer::mergeAttributes(
-                       Sanitizer::decodeTagAttributes( $aprops ),
-                       Sanitizer::decodeTagAttributes( $style )
-               );
-               $query = wfCgiToArray( $query );
-               list( $inside, $trail ) = self::splitTrail( $trail );
-
-               $ret = self::link( $title, "$prefix$text$inside", $attribs, $query,
-                       array( 'known', 'noclasses' ) ) . $trail;
-
-               return $ret;
-       }
-
        /**
         * Returns the attributes for the tooltip and access key.
         * @param string $name
index 78eb458..97165b4 100644 (file)
@@ -229,9 +229,6 @@ class OutputPage extends ContextSource {
        /** @var string */
        private $mPageTitleActionText = '';
 
-       /** @var array */
-       private $mParseWarnings = array();
-
        /** @var int Cache stuff. Looks like mEnableClientCache */
        protected $mCdnMaxage = 0;
        /** @var int Upper limit on mCdnMaxage */
@@ -816,7 +813,7 @@ class OutputPage extends ContextSource {
 
                $clientHeader = $this->getRequest()->getHeader( 'If-Modified-Since' );
                if ( $clientHeader === false ) {
-                       wfDebug( __METHOD__ . ": client did not send If-Modified-Since header\n", 'log' );
+                       wfDebug( __METHOD__ . ": client did not send If-Modified-Since header", 'private' );
                        return false;
                }
 
@@ -845,17 +842,17 @@ class OutputPage extends ContextSource {
                }
 
                wfDebug( __METHOD__ . ": client sent If-Modified-Since: " .
-                       wfTimestamp( TS_ISO_8601, $clientHeaderTime ) . "\n", 'log' );
+                       wfTimestamp( TS_ISO_8601, $clientHeaderTime ), 'private' );
                wfDebug( __METHOD__ . ": effective Last-Modified: " .
-                       wfTimestamp( TS_ISO_8601, $maxModified ) . "\n", 'log' );
+                       wfTimestamp( TS_ISO_8601, $maxModified ), 'private' );
                if ( $clientHeaderTime < $maxModified ) {
-                       wfDebug( __METHOD__ . ": STALE, $info\n", 'log' );
+                       wfDebug( __METHOD__ . ": STALE, $info", 'private' );
                        return false;
                }
 
                # Not modified
                # Give a 304 Not Modified response code and disable body output
-               wfDebug( __METHOD__ . ": NOT MODIFIED, $info\n", 'log' );
+               wfDebug( __METHOD__ . ": NOT MODIFIED, $info", 'private' );
                ini_set( 'zlib.output_compression', 0 );
                $this->getRequest()->response()->statusHeader( 304 );
                $this->sendCacheControl();
@@ -1773,7 +1770,6 @@ class OutputPage extends ContextSource {
                $this->mNewSectionLink = $parserOutput->getNewSection();
                $this->mHideNewSectionLink = $parserOutput->getHideNewSection();
 
-               $this->mParseWarnings = $parserOutput->getWarnings();
                if ( !$parserOutput->isCacheable() ) {
                        $this->enableClientCache( false );
                }
@@ -2184,7 +2180,7 @@ class OutputPage extends ContextSource {
                                        # We'll purge the proxy cache explicitly, but require end user agents
                                        # to revalidate against the proxy on each visit.
                                        # Surrogate-Control controls our CDN, Cache-Control downstream caches
-                                       wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", 'log' );
+                                       wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **", 'private' );
                                        # start with a shorter timeout for initial testing
                                        # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
                                        $response->header( 'Surrogate-Control: max-age=' . $config->get( 'SquidMaxage' )
@@ -2195,7 +2191,7 @@ class OutputPage extends ContextSource {
                                        # to revalidate against the proxy on each visit.
                                        # IMPORTANT! The CDN needs to replace the Cache-Control header with
                                        # Cache-Control: s-maxage=0, must-revalidate, max-age=0
-                                       wfDebug( __METHOD__ . ": local proxy caching; {$this->mLastModified} **\n", 'log' );
+                                       wfDebug( __METHOD__ . ": local proxy caching; {$this->mLastModified} **", 'private' );
                                        # start with a shorter timeout for initial testing
                                        # header( "Cache-Control: s-maxage=2678400, must-revalidate, max-age=0" );
                                        $response->header( 'Cache-Control: s-maxage=' . $this->mCdnMaxage
@@ -2204,7 +2200,7 @@ class OutputPage extends ContextSource {
                        } else {
                                # We do want clients to cache if they can, but they *must* check for updates
                                # on revisiting the page.
-                               wfDebug( __METHOD__ . ": private caching; {$this->mLastModified} **\n", 'log' );
+                               wfDebug( __METHOD__ . ": private caching; {$this->mLastModified} **", 'private' );
                                $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' );
                                $response->header( "Cache-Control: private, must-revalidate, max-age=0" );
                        }
@@ -2212,7 +2208,7 @@ class OutputPage extends ContextSource {
                                $response->header( "Last-Modified: {$this->mLastModified}" );
                        }
                } else {
-                       wfDebug( __METHOD__ . ": no caching **\n", 'log' );
+                       wfDebug( __METHOD__ . ": no caching **", 'private' );
 
                        # In general, the absence of a last modified header should be enough to prevent
                        # the client from using its cache. We send a few other things just to make sure.
@@ -2338,15 +2334,6 @@ class OutputPage extends ContextSource {
                print $ins;
        }
 
-       /**
-        * Produce a "user is blocked" page.
-        * @deprecated since 1.18
-        */
-       function blockedPage() {
-               wfDeprecated( __METHOD__, '1.18' );
-               throw new UserBlockedError( $this->getUser()->mBlock );
-       }
-
        /**
         * Prepare this object to display an error page; disable caching and
         * indexing, clear the current text and redirect, set the page's title
@@ -2488,17 +2475,6 @@ class OutputPage extends ContextSource {
                $this->returnToMain();
        }
 
-       /**
-        * Display an error page noting that a given permission bit is required.
-        * @deprecated since 1.18, just throw the exception directly
-        * @param string $permission Key required
-        * @throws PermissionsError
-        */
-       public function permissionRequired( $permission ) {
-               wfDeprecated( __METHOD__, '1.18' );
-               throw new PermissionsError( $permission );
-       }
-
        /**
         * Format a list of error messages
         *
@@ -3953,20 +3929,6 @@ class OutputPage extends ContextSource {
                $this->addWikiText( $s );
        }
 
-       /**
-        * Include jQuery core. Use this to avoid loading it multiple times
-        * before we get a usable script loader.
-        *
-        * @param array $modules List of jQuery modules which should be loaded
-        * @return array The list of modules which were not loaded.
-        * @since 1.16
-        * @deprecated since 1.17
-        */
-       public function includeJQuery( array $modules = array() ) {
-               wfDeprecated( __METHOD__, '1.17' );
-               return array();
-       }
-
        /**
         * Enables/disables TOC, doesn't override __NOTOC__
         * @param bool $flag
index 9e4d2a3..2723258 100644 (file)
@@ -617,15 +617,13 @@ if ( !$wgDBerrorLogTZ ) {
        $wgDBerrorLogTZ = $wgLocaltimezone;
 }
 
+// initialize the request object in $wgRequest
+$wgRequest = RequestContext::getMain()->getRequest(); // BackCompat
+
 // Useful debug output
 if ( $wgCommandLineMode ) {
-       $wgRequest = new FauxRequest( array() );
-
        wfDebug( "\n\nStart command line script $self\n" );
 } else {
-       // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
-       $wgRequest = new WebRequest;
-
        $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
 
        if ( $wgDebugPrintHttpHeaders ) {
index 35d9c6b..3f880f5 100644 (file)
@@ -130,12 +130,6 @@ class Title {
         */
        public $mDefaultNamespace = NS_MAIN;
 
-       /**
-        * @var bool Is $wgUser watching this page? null if unfilled, accessed
-        * through userIsWatching()
-        */
-       protected $mWatched = null;
-
        /** @var int The page length, 0 for special pages */
        protected $mLength = -1;
 
@@ -1875,25 +1869,6 @@ class Title {
                return $s;
        }
 
-       /**
-        * Is $wgUser watching this page?
-        *
-        * @deprecated since 1.20; use User::isWatched() instead.
-        * @return bool
-        */
-       public function userIsWatching() {
-               global $wgUser;
-
-               if ( is_null( $this->mWatched ) ) {
-                       if ( NS_SPECIAL == $this->mNamespace || !$wgUser->isLoggedIn() ) {
-                               $this->mWatched = false;
-                       } else {
-                               $this->mWatched = $wgUser->isWatched( $this );
-                       }
-               }
-               return $this->mWatched;
-       }
-
        /**
         * Can $user perform $action on this page?
         * This skips potentially expensive cascading permission checks
index 23eb63b..6cb39d8 100644 (file)
  * URL or via a POSTed form stripping illegal input characters and
  * normalizing Unicode sequences.
  *
- * Usually this is used via a global singleton, $wgRequest. You should
- * not create a second WebRequest object; make a FauxRequest object if
- * you want to pass arbitrary data to some function in place of the web
- * input.
- *
  * @ingroup HTTP
  */
 class WebRequest {
@@ -1175,294 +1170,3 @@ HTML;
                $this->ip = $ip;
        }
 }
-
-/**
- * WebRequest clone which takes values from a provided array.
- *
- * @ingroup HTTP
- */
-class FauxRequest extends WebRequest {
-       private $wasPosted = false;
-       private $session = array();
-       private $requestUrl;
-       protected $cookies = array();
-
-       /**
-        * @param array $data Array of *non*-urlencoded key => value pairs, the
-        *   fake GET/POST values
-        * @param bool $wasPosted Whether to treat the data as POST
-        * @param array|null $session Session array or null
-        * @param string $protocol 'http' or 'https'
-        * @throws MWException
-        */
-       public function __construct( $data = array(), $wasPosted = false,
-               $session = null, $protocol = 'http'
-       ) {
-               $this->requestTime = microtime( true );
-
-               if ( is_array( $data ) ) {
-                       $this->data = $data;
-               } else {
-                       throw new MWException( "FauxRequest() got bogus data" );
-               }
-               $this->wasPosted = $wasPosted;
-               if ( $session ) {
-                       $this->session = $session;
-               }
-               $this->protocol = $protocol;
-       }
-
-       /**
-        * Initialise the header list
-        */
-       protected function initHeaders() {
-               // Nothing to init
-       }
-
-       /**
-        * @param string $name
-        * @param string $default
-        * @return string
-        */
-       public function getText( $name, $default = '' ) {
-               # Override; don't recode since we're using internal data
-               return (string)$this->getVal( $name, $default );
-       }
-
-       /**
-        * @return array
-        */
-       public function getValues() {
-               return $this->data;
-       }
-
-       /**
-        * @return array
-        */
-       public function getQueryValues() {
-               if ( $this->wasPosted ) {
-                       return array();
-               } else {
-                       return $this->data;
-               }
-       }
-
-       public function getMethod() {
-               return $this->wasPosted ? 'POST' : 'GET';
-       }
-
-       /**
-        * @return bool
-        */
-       public function wasPosted() {
-               return $this->wasPosted;
-       }
-
-       public function getCookie( $key, $prefix = null, $default = null ) {
-               if ( $prefix === null ) {
-                       global $wgCookiePrefix;
-                       $prefix = $wgCookiePrefix;
-               }
-               $name = $prefix . $key;
-               return isset( $this->cookies[$name] ) ? $this->cookies[$name] : $default;
-       }
-
-       /**
-        * @since 1.26
-        * @param string $name Unprefixed name of the cookie to set
-        * @param string|null $value Value of the cookie to set
-        * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix
-        */
-       public function setCookie( $key, $value, $prefix = null ) {
-               $this->setCookies( array( $key => $value ), $prefix );
-       }
-
-       /**
-        * @since 1.26
-        * @param array $cookies
-        * @param string|null $prefix Cookie prefix. Defaults to $wgCookiePrefix
-        */
-       public function setCookies( $cookies, $prefix = null ) {
-               if ( $prefix === null ) {
-                       global $wgCookiePrefix;
-                       $prefix = $wgCookiePrefix;
-               }
-               foreach ( $cookies as $key => $value ) {
-                       $name = $prefix . $key;
-                       $this->cookies[$name] = $value;
-               }
-       }
-
-       public function checkSessionCookie() {
-               return false;
-       }
-
-       /**
-        * @since 1.25
-        */
-       public function setRequestURL( $url ) {
-               $this->requestUrl = $url;
-       }
-
-       /**
-        * @since 1.25 MWException( "getRequestURL not implemented" )
-        * no longer thrown.
-        */
-       public function getRequestURL() {
-               if ( $this->requestUrl === null ) {
-                       throw new MWException( 'Request URL not set' );
-               }
-               return $this->requestUrl;
-       }
-
-       public function getProtocol() {
-               return $this->protocol;
-       }
-
-       /**
-        * @param string $name
-        * @param string $val
-        */
-       public function setHeader( $name, $val ) {
-               $this->setHeaders( array( $name => $val ) );
-       }
-
-       /**
-        * @since 1.26
-        * @param array $headers
-        */
-       public function setHeaders( $headers ) {
-               foreach ( $headers as $name => $val ) {
-                       $name = strtoupper( $name );
-                       $this->headers[$name] = $val;
-               }
-       }
-
-       /**
-        * @param string $key
-        * @return array|null
-        */
-       public function getSessionData( $key ) {
-               if ( isset( $this->session[$key] ) ) {
-                       return $this->session[$key];
-               }
-               return null;
-       }
-
-       /**
-        * @param string $key
-        * @param array $data
-        */
-       public function setSessionData( $key, $data ) {
-               $this->session[$key] = $data;
-       }
-
-       /**
-        * @return array|mixed|null
-        */
-       public function getSessionArray() {
-               return $this->session;
-       }
-
-       /**
-        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
-        * @return string
-        */
-       public function getRawQueryString() {
-               return '';
-       }
-
-       /**
-        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
-        * @return string
-        */
-       public function getRawPostString() {
-               return '';
-       }
-
-       /**
-        * FauxRequests shouldn't depend on raw request data (but that could be implemented here)
-        * @return string
-        */
-       public function getRawInput() {
-               return '';
-       }
-
-       /**
-        * @param array $extWhitelist
-        * @return bool
-        */
-       public function checkUrlExtension( $extWhitelist = array() ) {
-               return true;
-       }
-
-       /**
-        * @return string
-        */
-       protected function getRawIP() {
-               return '127.0.0.1';
-       }
-}
-
-/**
- * Similar to FauxRequest, but only fakes URL parameters and method
- * (POST or GET) and use the base request for the remaining stuff
- * (cookies, session and headers).
- *
- * @ingroup HTTP
- * @since 1.19
- */
-class DerivativeRequest extends FauxRequest {
-       private $base;
-
-       /**
-        * @param WebRequest $base
-        * @param array $data Array of *non*-urlencoded key => value pairs, the
-        *   fake GET/POST values
-        * @param bool $wasPosted Whether to treat the data as POST
-        */
-       public function __construct( WebRequest $base, $data, $wasPosted = false ) {
-               $this->base = $base;
-               parent::__construct( $data, $wasPosted );
-       }
-
-       public function getCookie( $key, $prefix = null, $default = null ) {
-               return $this->base->getCookie( $key, $prefix, $default );
-       }
-
-       public function checkSessionCookie() {
-               return $this->base->checkSessionCookie();
-       }
-
-       public function getHeader( $name, $flags = 0 ) {
-               return $this->base->getHeader( $name, $flags );
-       }
-
-       public function getAllHeaders() {
-               return $this->base->getAllHeaders();
-       }
-
-       public function getSessionData( $key ) {
-               return $this->base->getSessionData( $key );
-       }
-
-       public function setSessionData( $key, $data ) {
-               $this->base->setSessionData( $key, $data );
-       }
-
-       public function getAcceptLang() {
-               return $this->base->getAcceptLang();
-       }
-
-       public function getIP() {
-               return $this->base->getIP();
-       }
-
-       public function getProtocol() {
-               return $this->base->getProtocol();
-       }
-
-       public function getElapsedTime() {
-               return $this->base->getElapsedTime();
-       }
-}
index 49b9786..ef9f901 100644 (file)
@@ -1253,6 +1253,8 @@ class ApiMain extends ApiBase {
                $module = $this->setupModule();
                $this->mModule = $module;
 
+               $this->setRequestExpectations( $module );
+
                $this->checkExecutePermissions( $module );
 
                if ( !$this->checkMaxLag( $module, $params ) ) {
@@ -1284,6 +1286,24 @@ class ApiMain extends ApiBase {
                }
        }
 
+       /**
+        * Set database connection, query, and write expectations given this module request
+        * @param ApiBase $module
+        */
+       protected function setRequestExpectations( ApiBase $module ) {
+               $limits = $this->getConfig()->get( 'TrxProfilerLimits' );
+               $trxProfiler = Profiler::instance()->getTransactionProfiler();
+               if ( $this->getRequest()->wasPosted() ) {
+                       if ( $module->isWriteMode() ) {
+                               $trxProfiler->setExpectations( $limits['POST'], __METHOD__ );
+                       } else {
+                               $trxProfiler->setExpectations( $limits['POST-nonwrite'], __METHOD__ );
+                       }
+               } else {
+                       $trxProfiler->setExpectations( $limits['GET'], __METHOD__ );
+               }
+       }
+
        /**
         * Log the preceding request
         * @param float $time Time in seconds
@@ -1768,15 +1788,6 @@ class ApiMain extends ApiBase {
                $this->getModuleManager()->addModule( $name, 'format', $class );
        }
 
-       /**
-        * Get the array mapping module names to class names
-        * @deprecated since 1.21, Use getModuleManager()'s methods instead.
-        * @return array
-        */
-       function getModules() {
-               return $this->getModuleManager()->getNamesWithClasses( 'action' );
-       }
-
        /**
         * Returns the list of supported formats in form ( 'format' => 'ClassName' )
         *
index 902bca7..d12a68f 100644 (file)
@@ -184,17 +184,6 @@ class ApiQuery extends ApiBase {
                return $this->mPageSet;
        }
 
-       /**
-        * Get the array mapping module names to class names
-        * @deprecated since 1.21, use getModuleManager()'s methods instead
-        * @return array Array(modulename => classname)
-        */
-       public function getModules() {
-               wfDeprecated( __METHOD__, '1.21' );
-
-               return $this->getModuleManager()->getNamesWithClasses();
-       }
-
        /**
         * Get the generators array mapping module names to class names
         * @deprecated since 1.21, list of generators is maintained by ApiPageSet
index c99d87c..5426fb8 100644 (file)
@@ -224,7 +224,7 @@ class ApiQueryRecentChanges extends ApiQueryGeneratorBase {
                        $this->addWhereIf( 'page_is_redirect = 1', isset( $show['redirect'] ) );
 
                        if ( isset( $show['unpatrolled'] ) ) {
-                               // See ChangesList:isUnpatrolled
+                               // See ChangesList::isUnpatrolled
                                if ( $user->useRCPatrol() ) {
                                        $this->addWhere( 'rc_patrolled = 0' );
                                } elseif ( $user->useNPPatrol() ) {
index 5b05755..eaad4de 100644 (file)
@@ -8,6 +8,21 @@
        "apihelp-main-param-format": "Гойту формат.",
        "apihelp-main-param-curtimestamp": "Хилламийн юкъатоха ханна йолу билгало",
        "apihelp-createaccount-param-name": "Декъашхочун цӀе.",
+       "apihelp-delete-description": "ДӀаяккха агӀо.",
+       "apihelp-edit-example-edit": "АгӀо таян",
+       "apihelp-emailuser-description": "Декъашхочунга кехат",
+       "apihelp-emailuser-param-target": "Электронан кехатан адрес.",
+       "apihelp-emailuser-param-subject": "Хьедаран корта.",
+       "apihelp-emailuser-param-text": "Кехатан чулацам",
+       "apihelp-expandtemplates-param-title": "АгӀонан корта.",
+       "apihelp-feedrecentchanges-param-tagfilter": "Тегийн литтар.",
+       "apihelp-login-example-login": "ЧугӀо",
+       "apihelp-logout-description": "ЧугӀой сессийн хаамаш дӀацӀанбе.",
+       "apihelp-move-description": "АгӀон цӀе хийца.",
+       "apihelp-opensearch-param-search": "Лахаран могӀа.",
+       "apihelp-parse-example-page": "АгӀо зер",
+       "apihelp-parse-example-text": "Wikitext зер.",
+       "apihelp-protect-example-protect": "Ларъе агӀо.",
        "apihelp-userrights-param-userid": "Декъашхочун ID.",
        "api-help-datatypes-header": "Хаамийн тайпанаш"
 }
index ded11b4..d745baa 100644 (file)
        "apihelp-query+blocks-paramvalue-prop-expiry": "Fügt den Zeitstempel wann die Sperre abläuft hinzu.",
        "apihelp-query+blocks-paramvalue-prop-reason": "Fügt den angegebenen Grund für die Sperrung hinzu.",
        "apihelp-query+blocks-paramvalue-prop-range": "Fügt den von der Sperrung betroffenen Bereich von IP-Adressen hinzu.",
+       "apihelp-query+blocks-paramvalue-prop-flags": "Markiert die Sperre mit (autoblock, anononly, etc.).",
        "apihelp-query+blocks-param-show": "Zeige nur Elemente, die diese Kriterien erfüllen. Um zum Beispiel unbestimmte Sperren von IP-Adressen zu sehen, setzte <kbd>$1show=ip|!temp</kbd>.",
        "apihelp-query+blocks-example-simple": "Sperren auflisten",
        "apihelp-query+blocks-example-users": "Listet Sperren der Benutzer <kbd>Alice</kbd> und <kbd>Bob</kbd> auf.",
        "apihelp-query+categories-example-generator": "Rufe Informationen über alle Kategorien ab, die in der Seite <kbd>Albert Einstein</kbd> eingetragen sind.",
        "apihelp-query+categoryinfo-description": "Gibt Informationen zu den angegebenen Kategorien zurück.",
        "apihelp-query+categorymembers-description": "Liste alle Seiten in der angegebenen Kategorie auf.",
+       "apihelp-query+categorymembers-param-prop": "Welche Informationsteile einbinden:",
        "apihelp-query+categorymembers-paramvalue-prop-ids": "Fügt die Seitenkennung hinzu.",
        "apihelp-query+categorymembers-paramvalue-prop-title": "Fügt die Titel- und Namensraum-ID der Seite hinzu.",
        "apihelp-query+categorymembers-paramvalue-prop-sortkey": "Fügt den Sortierungsschlüssel (hexadezimale Zeichenkette) hinzu, der verwendet wird, um innerhalb dieser Kategorie zu sortieren.",
        "apihelp-query+categorymembers-param-limit": "Die maximale Anzahl der zurückzugebenden Seiten.",
        "apihelp-query+categorymembers-param-sort": "Eigenschaft, nach der sortiert werden soll.",
        "apihelp-query+categorymembers-param-dir": "Sortierungsrichtung.",
+       "apihelp-query+categorymembers-param-start": "Zeitstempel bei dem die Auflistung beginnen soll. Darf nur zusammen mit <kbd>$1sort=timestamp</kbd> benutzt werden.",
+       "apihelp-query+categorymembers-param-end": "Zeitstempel bei dem die Auflistung enden soll. Darf nur zusammen mit <kbd>$1sort=timestamp</kbd> benutzt werden.",
+       "apihelp-query+categorymembers-param-starthexsortkey": "Sortierungsschlüssel bei dem die Auflistung beginnen soll, wie von <kbd>$1prop=sortkey</kbd> zurückgegeben. Darf nur zusammen mit <kbd>$1sort=sortkey</kbd> verwendet werden.",
+       "apihelp-query+categorymembers-param-endhexsortkey": "Suchschlüssel bei dem die Auflistung enden soll, wie von <kbd>$1prop=sortkey</kbd> zurückgegeben. Darf nur zusammen mit <kbd>$1sort=sortkey</kbd> verwendet werden.",
        "apihelp-query+categorymembers-param-startsortkey": "Stattdessen $1starthexsortkey verwenden.",
        "apihelp-query+categorymembers-param-endsortkey": "Stattdessen $1endhexsortkey verwenden.",
+       "apihelp-query+categorymembers-example-simple": "Rufe die ersten 10 Seiten von <kbd>Category:Physics</kbd> ab.",
+       "apihelp-query+categorymembers-example-generator": "Rufe die Seiteninformationen zu den ersten 10 Seiten von<kbd>Category:Physics</kbd> ab.",
        "apihelp-query+contributors-param-limit": "Wie viele Spender zurückgegeben werden sollen.",
+       "apihelp-query+contributors-example-simple": "Zeige Mitwirkende der Seite <kbd>Main Page</kbd>.",
+       "apihelp-query+deletedrevisions-param-tag": "Listet nur Bearbeitungen auf, die die angegebene Markierung haben.",
        "apihelp-query+deletedrevisions-param-user": "Nur Versionen von diesem Benutzer auflisten.",
+       "apihelp-query+deletedrevisions-param-excludeuser": "Schließe Bearbeitungen dieses Benutzers bei der Auflistung aus.",
+       "apihelp-query+deletedrevs-param-start": "Der Zeitstempel bei dem die Auflistung beginnen soll.",
+       "apihelp-query+deletedrevs-param-end": "Der Zeitstempel bei dem die Auflistung enden soll.",
        "apihelp-query+deletedrevs-param-from": "Auflistung bei diesem Titel beginnen.",
        "apihelp-query+deletedrevs-param-to": "Auflistung bei diesem Titel beenden.",
+       "apihelp-query+deletedrevs-param-prefix": "Suche nach allen Seitentiteln, die mit dem angegebenen Wert beginnen.",
+       "apihelp-query+deletedrevs-param-unique": "Listet nur eine Bearbeitung für jede Seite auf.",
+       "apihelp-query+deletedrevs-param-tag": "Listet nur Bearbeitungen auf, die die angegebene Markierung haben.",
+       "apihelp-query+deletedrevs-param-user": "Liste nur Bearbeitungen von diesem Benutzer auf.",
+       "apihelp-query+deletedrevs-param-excludeuser": "Schließe Bearbeitungen dieses Benutzers bei der Auflistung aus.",
+       "apihelp-query+deletedrevs-param-namespace": "Nur Seiten dieses Namensraums auflisten.",
+       "apihelp-query+deletedrevs-param-limit": "Die maximale Anzahl aufzulistendender Bearbeitungen.",
+       "apihelp-query+disabled-description": "Dieses Abfrage-Modul wurde deaktiviert.",
+       "apihelp-query+duplicatefiles-description": "Liste alle Dateien auf die, basierend auf der Prüfsumme, Duplikate der angegebenen Dateien sind.",
+       "apihelp-query+duplicatefiles-param-limit": "Wie viele doppelte Dateien zurückgeben.",
+       "apihelp-query+duplicatefiles-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+duplicatefiles-param-localonly": "Sucht nur nach Dateien im lokalen Repositorium.",
        "apihelp-query+duplicatefiles-example-simple": "Sucht nach Duplikaten von [[:File:Albert Einstein Head.jpg]].",
        "apihelp-query+duplicatefiles-example-generated": "Sucht nach Duplikaten aller Dateien.",
+       "apihelp-query+embeddedin-description": "Finde alle Seiten, die den angegebenen Titel einbetten (transkludieren).",
+       "apihelp-query+embeddedin-param-title": "Titel nach dem gesucht werden soll. Darf nicht zusammen mit $1pageid verwendet werden.",
+       "apihelp-query+embeddedin-param-pageid": "Seitenkennung nach der gesucht werden soll. Darf nicht zusammen mit $1title verwendet werden.",
        "apihelp-query+embeddedin-param-namespace": "Der aufzulistende Namensraum.",
+       "apihelp-query+embeddedin-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+embeddedin-param-filterredir": "Wie Weiterleitungen behandelt werden sollen.",
        "apihelp-query+embeddedin-param-limit": "Wie viele Seiten insgesamt zurückgegeben werden sollen.",
+       "apihelp-query+embeddedin-example-simple": "Zeige Seiten, die <kbd>Template:Stub</kbd> transkludieren.",
+       "apihelp-query+embeddedin-example-generator": "Rufe Informationen über Seiten ab, die <kbd>Template:Stub</kbd> transkludieren.",
+       "apihelp-query+extlinks-description": "Gebe alle externen URLs (nicht Interwiki) der angegebenen Seiten zurück.",
        "apihelp-query+extlinks-param-limit": "Wie viele Links zurückgegeben werden sollen.",
+       "apihelp-query+extlinks-example-simple": "Rufe eine Liste erxterner Verweise auf <kbd>Main Page</kbd> ab.",
+       "apihelp-query+exturlusage-description": "Listet Seiten auf, die die angegebene URL beinhalten.",
+       "apihelp-query+exturlusage-param-prop": "Welche Informationsteile einbinden:",
+       "apihelp-query+exturlusage-paramvalue-prop-ids": "Fügt die ID der Seite hinzu.",
+       "apihelp-query+exturlusage-paramvalue-prop-title": "Fügt die Titel- und Namensraum-ID der Seite hinzu.",
+       "apihelp-query+exturlusage-paramvalue-prop-url": "Fügt die URL, die in der Seite verwendet wird, hinzu.",
+       "apihelp-query+exturlusage-param-namespace": "Die aufzulistenden Seiten-Namensräume.",
        "apihelp-query+exturlusage-param-limit": "Wie viele Seiten zurückgegeben werden sollen.",
        "apihelp-query+filearchive-param-from": "Der Bildertitel, bei dem die Auflistung beginnen soll.",
        "apihelp-query+filearchive-param-to": "Der Bildertitel, bei dem die Auflistung enden soll.",
        "apihelp-query+filearchive-param-limit": "Wie viele Bilder insgesamt zurückgegeben werden sollen.",
+       "apihelp-query+filearchive-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+filearchive-paramvalue-prop-sha1": "Ergänzt die SHA-1-Prüfsumme für das Bild.",
        "apihelp-query+filearchive-paramvalue-prop-dimensions": "Alias für die Größe.",
        "apihelp-query+filearchive-paramvalue-prop-mediatype": "Ergänzt den Medientyp des Bildes.",
        "apihelp-query+imageinfo-param-start": "Zeitstempel, von dem die Liste beginnen soll.",
        "apihelp-query+imageinfo-param-end": "Zeitstempel, an dem die Liste enden soll.",
        "apihelp-query+imageinfo-param-urlheight": "Ähnlich wie $1urlwidth.",
+       "apihelp-query+images-param-dir": "Die Auflistungsrichtung.",
+       "apihelp-query+imageusage-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+info-description": "Ruft Basisinformationen über die Seite ab.",
        "apihelp-query+info-paramvalue-prop-watchers": "Die Anzahl der Beobachter, falls erlaubt.",
        "apihelp-query+info-param-testactions": "Überprüft, ob der aktuelle Benutzer gewisse Aktionen auf der Seite ausführen kann.",
        "apihelp-query+iwbacklinks-param-prefix": "Präfix für das Interwiki.",
        "apihelp-query+iwbacklinks-paramvalue-prop-iwprefix": "Ergänzt das Präfix des Interwikis.",
        "apihelp-query+iwbacklinks-paramvalue-prop-iwtitle": "Ergänzt den Titel des Interwikis.",
+       "apihelp-query+iwbacklinks-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+iwlinks-paramvalue-prop-url": "Ergänzt die vollständige URL.",
+       "apihelp-query+iwlinks-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+langbacklinks-param-limit": "Wie viele Gesamtseiten zurückgegeben werden sollen.",
+       "apihelp-query+langbacklinks-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+langbacklinks-example-simple": "Ruft Seiten ab, die auf [[:fr:Test]] verlinken.",
        "apihelp-query+langlinks-param-limit": "Wie viele Sprachlinks zurückgegeben werden sollen.",
        "apihelp-query+langlinks-paramvalue-prop-url": "Ergänzt die vollständige URL.",
+       "apihelp-query+langlinks-param-dir": "Die Auflistungsrichtung.",
+       "apihelp-query+links-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+links-example-simple": "Links von der <kbd>Hauptseite</kbd> abrufen",
        "apihelp-query+linkshere-description": "Alle Seiten finden, die auf die angegebenen Seiten verlinken.",
        "apihelp-query+logevents-description": "Ereignisse von den Logbüchern abrufen.",
+       "apihelp-query+logevents-example-simple": "Listet die letzten Logbuch-Ereignisse auf.",
        "apihelp-query+pageswithprop-paramvalue-prop-ids": "Fügt die Seitenkennung hinzu.",
+       "apihelp-query+pageswithprop-param-limit": "Die maximale Anzahl zurückzugebender Seiten.",
        "apihelp-query+prefixsearch-param-search": "Such-Zeichenfolge.",
+       "apihelp-query+prefixsearch-param-offset": "Anzahl der zu überspringenden Ergebnisse.",
        "apihelp-query+recentchanges-paramvalue-prop-timestamp": "Ergänzt den Zeitstempel für die Bearbeitung.",
        "apihelp-query+recentchanges-paramvalue-prop-tags": "Listet Markierungen für den Eintrag auf.",
        "apihelp-query+recentchanges-example-simple": "Listet die letzten Änderungen auf.",
        "apihelp-query+siteinfo-example-simple": "Websiteinformationen abrufen",
        "apihelp-query+tags-description": "Änderungs-Tags auflisten.",
        "apihelp-query+tags-example-simple": "Verfügbare Tags auflisten",
+       "apihelp-query+templates-param-dir": "Die Auflistungsrichtung.",
        "apihelp-query+usercontribs-description": "Alle Bearbeitungen von einem Benutzer abrufen.",
        "apihelp-query+usercontribs-param-limit": "Die maximale Anzahl der zurückzugebenden Beiträge.",
        "apihelp-query+usercontribs-param-start": "Der zurückzugebende Start-Zeitstempel.",
index 8b93819..5eaa449 100644 (file)
        "apihelp-delete-example-simple": "<kbd>Main Page</kbd> törlése.",
        "apihelp-edit-example-edit": "Lap szerkesztése",
        "apihelp-expandtemplates-param-title": "Lap címe.",
-       "apihelp-userrights-param-userid": "Felhasználói azonosító."
+       "apihelp-userrights-param-userid": "Felhasználói azonosító.",
+       "api-help-title": "MediaWiki API súgó",
+       "api-help-lead": "Ez egy automatikusan generált MediaWiki API-dokumentációs lap.\n\nDokumentáció és példák: https://www.mediawiki.org/wiki/API",
+       "api-help-main-header": "Fő modul",
+       "api-help-flag-deprecated": "Ez a modul elavult.",
+       "api-help-flag-internal": "<strong>Ez a modul belső használatú vagy nem stabil.</strong> A működése értesítés nélkül változhat.",
+       "api-help-flag-readrights": "Ez a modul olvasási jogot igényel.",
+       "api-help-flag-writerights": "Ez a modul írási jogot igényel.",
+       "api-help-flag-mustbeposted": "Ez a modul csak POST kéréseket fogad el.",
+       "api-help-flag-generator": "Ez a modul használható generátorként.",
+       "api-help-source": "Forrás: $1",
+       "api-help-source-unknown": "Forrás: <span class=\"apihelp-unknown\">ismeretlen</span>",
+       "api-help-license": "Licenc: [[$1|$2]]",
+       "api-help-license-noname": "Licenc: [[$1|Lásd a linken]]",
+       "api-help-license-unknown": "Licenc: <span class=\"apihelp-unknown\">ismeretlen</span>",
+       "api-help-parameters": "{{PLURAL:$1|Paraméter|Paraméterek}}:",
+       "api-help-param-deprecated": "Elavult.",
+       "api-help-param-required": "Ez a paraméter kötelező.",
+       "api-help-datatypes-header": "Adattípusok",
+       "api-help-param-type-limit": "Típus: egész vagy <kbd>max</kbd>",
+       "api-help-param-type-integer": "Típus: {{PLURAL:$1|1=egész|2=egészek listája}}",
+       "api-help-param-type-boolean": "Típus: logikai ([[Special:ApiHelp/main#main/datatypes|részletek]])",
+       "api-help-param-type-timestamp": "Típus: {{PLURAL:$1|1=időbélyeg|2=időbélyegek listája}} ([[Special:ApiHelp/main#main/datatypes|engedélyezett formátumok]])",
+       "api-help-param-type-user": "Típus: {{PLURAL:$1|1=felhasználónév|2=felhasználónevek listája}}",
+       "api-help-param-list": "{{PLURAL:$1|1=A következő értékek egyike|2=Értékek (elválasztó: <kbd>{{!}}</kbd>)}}: $2",
+       "api-help-param-list-can-be-empty": "{{PLURAL:$1|0=Üresnek kell lennie|Lehet üres vagy $2}}",
+       "api-help-param-limit": "Nem engedélyezett több mint $1.",
+       "api-help-param-limit2": "Nem engedélyezett több mint $1 (botoknak $2).",
+       "api-help-param-integer-min": "Az {{PLURAL:$1|1=érték nem lehet kisebb|2=értékek nem lehetnek kisebbek}} mint $2.",
+       "api-help-param-integer-max": "Az {{PLURAL:$1|1=érték nem lehet nagyobb|2=értékek nem lehetnek nagyobbak}} mint $3.",
+       "api-help-param-integer-minmax": "{{PLURAL:$1|1=Az értéknek $2 és $3 között kell lennie.|2=Az értékeknek $2 és $3 között kell lenniük.}}"
 }
index c4f7a3f..cfa1417 100644 (file)
        "api-help-param-continue": "Quando più risultati sono disponibili, usa questo per continuare.",
        "api-help-param-no-description": "<span class=\"apihelp-empty\">(nessuna descrizione)</span>",
        "api-help-examples": "{{PLURAL:$1|Esempio|Esempi}}:",
+       "api-help-permissions": "{{PLURAL:$1|Permesso|Permessi}}:",
        "api-credits-header": "Crediti"
 }
index 010ff04..31541a5 100644 (file)
@@ -11,7 +11,8 @@
                        "Nemo bis",
                        "Amire80",
                        "Siebrand",
-                       "Purodha"
+                       "Purodha",
+                       "Tacsipacsi"
                ]
        },
        "apihelp-main-description": "{{doc-apihelp-description|main}}",
        "api-help-param-required": "Displayed in the API help for any required parameter",
        "api-help-datatypes-header": "Header for the data type section in the API help output",
        "api-help-datatypes": "{{technical}} {{doc-important|Do not translate or reformat dates inside &lt;kbd%gt; tags}} Documentation of certain API data types\nSee also:\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
-       "api-help-param-type-limit": "{{technical}} {{doc-important|Do not translate text inside &lt;kbd%gt; tags}} Used to indicate that a parameter is a \"limit\" type. Parameters:\n* $1 - Always 1.\nSee also:\n* {{msg-mw|api-help-datatypes}}\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
+       "api-help-param-type-limit": "{{technical}} {{doc-important|Do not translate text inside &lt;kbd&gt; tags}} Used to indicate that a parameter is a \"limit\" type. Parameters:\n* $1 - Always 1.\nSee also:\n* {{msg-mw|api-help-datatypes}}\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
        "api-help-param-type-integer": "{{technical}} Used to indicate that a parameter is an integer or list of integers. Parameters:\n* $1 - 1 if the parameter takes one value, 2 if the parameter takes a list of values.\nSee also:\n* {{msg-mw|api-help-datatypes}}\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
        "api-help-param-type-boolean": "{{technical}} {{doc-important|Do not translate <code>Special:ApiHelp</code> in this message.}} Used to indicate that a parameter is a boolean. Parameters:\n* $1 - Always 1.\nSee also:\n* {{msg-mw|api-help-datatypes}}\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
        "api-help-param-type-password": "{{ignored}}{{technical}} Used to indicate that a parameter is a password or list of passwords. Parameters:\n* $1 - 1 if the parameter takes one value, 2 if the parameter takes a list of values.\nSee also:\n* {{msg-mw|api-help-datatypes}}\n* [[Special:PrefixIndex/MediaWiki:api-help-param-type]]",
diff --git a/includes/api/i18n/tt-cyrl.json b/includes/api/i18n/tt-cyrl.json
new file mode 100644 (file)
index 0000000..54c534c
--- /dev/null
@@ -0,0 +1,8 @@
+{
+       "@metadata": {
+               "authors": [
+                       "Ильнар"
+               ]
+       },
+       "apihelp-feedcontributions-param-newonly": "Битләр ясау үзгәртмәләрен генә күрсәтү."
+}
index 6ef0a80..c7c6a9c 100644 (file)
@@ -16,7 +16,8 @@
                        "御坂美琴",
                        "RyRubyy",
                        "Umherirrender",
-                       "Apflu"
+                       "Apflu",
+                       "Hzy980512"
                ]
        },
        "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|文档]]\n* [[mw:API:FAQ|常见问题]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api 邮件列表]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce API公告]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R 程序错误与功能请求]\n</div>\n<strong>状态信息:</strong>本页所展示的所有特性都应正常工作,但是API仍在开发当中,将会随时变化。请订阅[https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ mediawiki-api-announce 邮件列表]以便获得更新通知。\n\n<strong>错误请求:</strong>当API收到错误请求时,HTTP header将会返回一个包含\"MediaWiki-API-Error\"的值,随后header的值与error code将会送回并设置为相同的值。详细信息请参阅[[mw:API:Errors_and_warnings|API: 错误与警告]]。",
        "apihelp-query+contributors-param-limit": "返回的贡献数。",
        "apihelp-query+contributors-example-simple": "显示<kbd>Main Page</kbd>的贡献。",
        "apihelp-query+deletedrevisions-description": "获得删除修订版本信息。\n\n可在很多途径中使用:\n# 获得一组页面的已删除修订,通过设置标题或页面ID。以标题和时间戳排序。\n# 通过设置它们的ID与修订ID获得关于一组已删除修订。以修订ID排序。",
+       "apihelp-query+deletedrevisions-param-start": "要开始枚举的时间戳。在处理修订ID列表时无视。",
+       "apihelp-query+deletedrevisions-param-end": "要停止枚举的时间戳。在处理修订ID列表时无视。",
        "apihelp-query+deletedrevisions-param-tag": "只列出被此标签标记的修订。",
        "apihelp-query+deletedrevisions-param-user": "只列出此用户做出的修订。",
        "apihelp-query+deletedrevisions-param-excludeuser": "不要列出此用户做出的修订。",
        "apihelp-query+deletedrevs-param-user": "只列出此用户做出的修订。",
        "apihelp-query+deletedrevs-param-excludeuser": "不要列出此用户做出的修订。",
        "apihelp-query+deletedrevs-param-namespace": "只列出此名字空间的页面。",
+       "apihelp-query+deletedrevs-param-limit": "要列出的最大修订数量。",
        "apihelp-query+deletedrevs-param-prop": "要获取的属性:\n;revid:添加被删除修订的修订ID。\n;parentid:添加上一修订的修订ID至页面。\n;user:添加做出修订的用户。\n;userid:添加做出修订的用户ID。\n;comment:添加修订摘要。\n;parsedcomment:添加解析过的修订摘要。\n;minor:如果修订是小编辑则加标签。\n;len:添加修订长度(字节)。\n;sha1:添加修订的SHA-1(base 16)。\n;content:添加修订内容。\n;token:<span class=\"apihelp-deprecated\">已弃用。</span>提供编辑令牌。\n;tags:修订标签。",
        "apihelp-query+deletedrevs-example-mode1": "列出最近已删除的对页面<kbd>Main Page</kbd>和<kbd>Talk:Main Page</kbd>的贡献,带内容(模式1)。",
        "apihelp-query+deletedrevs-example-mode2": "列出由<kbd>Bob</kbd>作出的最近50次已删除贡献(模式2)。",
        "apihelp-query+deletedrevs-example-mode3-main": "列出前50次主名字空间已删除贡献(模式3)。",
        "apihelp-query+deletedrevs-example-mode3-talk": "列出前50次{{ns:talk}}名字空间已删除页面(模式3)。",
        "apihelp-query+disabled-description": "此查询模块已被禁用。",
+       "apihelp-query+duplicatefiles-description": "根据哈希值列出此给定文件的所有副本。",
        "apihelp-query+duplicatefiles-param-limit": "返回多少重复文件。",
        "apihelp-query+duplicatefiles-param-dir": "罗列所采用的方向。",
        "apihelp-query+duplicatefiles-param-localonly": "只看本地存储库的文件。",
        "apihelp-query+users-paramvalue-prop-emailable": "Tags if the user can and wants to receive email through [[Special:Emailuser]].",
        "apihelp-query+users-paramvalue-prop-gender": "Tags the gender of the user. Returns \"male\", \"female\", or \"unknown\".",
        "apihelp-query+users-paramvalue-prop-centralids": "添加中心ID并为用户附加状态。",
+       "apihelp-query+users-param-users": "要获取信息的用户列表。",
        "apihelp-query+users-param-token": "请改用<kbd>[[Special:ApiHelp/query+tokens|action=query&meta=tokens]]</kbd>。",
        "apihelp-query+users-example-simple": "返回用户<kbd>Example</kbd>的信息。",
        "apihelp-query+watchlist-description": "在当前用户的监视列表中获取对页面的最近更改。",
        "apihelp-query+watchlistraw-param-fromtitle": "要列举的起始标题(带名字空间前缀)。",
        "apihelp-query+watchlistraw-param-totitle": "要列举的最终标题(带名字空间前缀)。",
        "apihelp-query+watchlistraw-example-simple": "列出当前用户的监视列表中的页面。",
+       "apihelp-query+watchlistraw-example-generator": "获取在此用户的监视列表中的页面的信息。",
        "apihelp-revisiondelete-description": "删除和恢复修订版本。",
        "apihelp-revisiondelete-param-type": "正在执行的修订版本删除类型。",
        "apihelp-revisiondelete-param-target": "要进行修订版本删除的页面标题,如果对某一类型需要。",
index 298f6e2..29db9c6 100644 (file)
@@ -178,7 +178,7 @@ class HTMLFileCache extends FileCacheBase {
                        return $text;
                }
 
-               wfDebug( __METHOD__ . "()\n", 'log' );
+               wfDebug( __METHOD__ . "()\n", 'private' );
 
                $now = wfTimestampNow();
                if ( $this->useGzip() ) {
index 2494ef1..7eadcc8 100644 (file)
@@ -364,12 +364,24 @@ class ChangesList extends ContextSource {
        }
 
        /**
-        * @param string $s HTML to update
+        * @param string $s Article link will be appended to this string, in place.
         * @param RecentChange $rc
         * @param bool $unpatrolled
         * @param bool $watched
+        * @deprecated since 1.27, use getArticleLink instead.
         */
-       public function insertArticleLink( &$s, &$rc, $unpatrolled, $watched ) {
+       public function insertArticleLink( &$s, RecentChange $rc, $unpatrolled, $watched ) {
+               $s .= $this->getArticleLink( $rc, $unpatrolled, $watched );
+       }
+
+       /**
+        * @param RecentChange $rc
+        * @param bool $unpatrolled
+        * @param bool $watched
+        * @return string HTML
+        * @since 1.26
+        */
+       public function getArticleLink( &$rc, $unpatrolled, $watched ) {
                $params = array();
                if ( $rc->getTitle()->isRedirect() ) {
                        $params = array( 'redirect' => 'no' );
@@ -389,23 +401,12 @@ class ChangesList extends ContextSource {
                # RTL/LTR marker
                $articlelink .= $this->getLanguage()->getDirMark();
 
+               # TODO: Deprecate the $s argument, it seems happily unused.
+               $s = '';
                Hooks::run( 'ChangesListInsertArticleLink',
                        array( &$this, &$articlelink, &$s, &$rc, $unpatrolled, $watched ) );
 
-               $s .= " $articlelink";
-       }
-
-       /**
-        * @param RecentChange $rc
-        * @param bool $unpatrolled
-        * @param bool $watched
-        * @return string
-        * @since 1.26
-        */
-       public function getArticleLink( RecentChange $rc, $unpatrolled, $watched ) {
-               $s = '';
-               $this->insertArticleLink( $s, $rc, $unpatrolled, $watched );
-               return $s;
+               return "{$s} {$articlelink}";
        }
 
        /**
@@ -480,20 +481,6 @@ class ChangesList extends ContextSource {
                }
        }
 
-       /**
-        * Check whether to enable recent changes patrol features
-        *
-        * @deprecated since 1.22
-        * @return bool
-        */
-       public static function usePatrol() {
-               global $wgUser;
-
-               wfDeprecated( __METHOD__, '1.22' );
-
-               return $wgUser->useRCPatrol();
-       }
-
        /**
         * Returns the string which indicates the number of watching users
         * @param int $count Number of user watching a page
index ed374b0..1c49545 100644 (file)
@@ -161,19 +161,22 @@ class EnhancedChangesList extends ChangesList {
        protected function recentChangesBlockGroup( $block ) {
 
                # Add the namespace and title of the block as part of the class
-               $classes = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
+               $tableClasses = array( 'mw-collapsible', 'mw-collapsed', 'mw-enhanced-rc' );
                if ( $block[0]->mAttribs['rc_log_type'] ) {
                        # Log entry
-                       $classes[] = Sanitizer::escapeClass( 'mw-changeslist-log-'
+                       $tableClasses[] = Sanitizer::escapeClass( 'mw-changeslist-log-'
                                . $block[0]->mAttribs['rc_log_type'] );
                } else {
-                       $classes[] = Sanitizer::escapeClass( 'mw-changeslist-ns'
+                       $tableClasses[] = Sanitizer::escapeClass( 'mw-changeslist-ns'
                                . $block[0]->mAttribs['rc_namespace'] . '-' . $block[0]->mAttribs['rc_title'] );
                }
-               $classes[] = $block[0]->watched && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
-                       ? 'mw-changeslist-line-watched' : 'mw-changeslist-line-not-watched';
-               $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
-                       Html::openElement( 'tr' );
+               if ( $block[0]->watched
+                       && $block[0]->mAttribs['rc_timestamp'] >= $block[0]->watched
+               ) {
+                       $tableClasses[] = 'mw-changeslist-line-watched';
+               } else {
+                       $tableClasses[] = 'mw-changeslist-line-not-watched';
+               }
 
                # Collate list of users
                $userlinks = array();
@@ -243,61 +246,44 @@ class EnhancedChangesList extends ChangesList {
                        array_push( $users, $text );
                }
 
-               $users = ' <span class="changedby">'
-                       . $this->msg( 'brackets' )->rawParams(
-                               implode( $this->message['semicolon-separator'], $users )
-                       )->escaped() . '</span>';
-
-               $tl = '<span class="mw-collapsible-toggle mw-collapsible-arrow ' .
-                       'mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span>';
-               $r .= "<td>$tl</td>";
-
-               # Main line
-               $r .= '<td class="mw-enhanced-rc">' . $this->recentChangesFlags(
-                       $collectedRcFlags
-               );
-
-               # Timestamp
-               $r .= '&#160;' . $block[0]->timestamp . '&#160;</td><td>';
-
                # Article link
+               $articleLink = '';
+               $revDeletedMsg = false;
                if ( $namehidden ) {
-                       $r .= ' <span class="history-deleted">' .
-                               $this->msg( 'rev-deleted-event' )->escaped() . '</span>';
+                       $revDeletedMsg = $this->msg( 'rev-deleted-event' )->escaped();
                } elseif ( $allLogs ) {
-                       $r .= $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
+                       $articleLink = $this->maybeWatchedLink( $block[0]->link, $block[0]->watched );
                } else {
-                       $this->insertArticleLink( $r, $block[0], $block[0]->unpatrolled, $block[0]->watched );
+                       $articleLink = $this->getArticleLink( $block[0], $block[0]->unpatrolled, $block[0]->watched );
                }
 
-               $r .= $this->getLanguage()->getDirMark();
-
                $queryParams['curid'] = $curId;
 
                # Sub-entries
-               $lines = '';
+               $lines = array();
                foreach ( $block as $i => $rcObj ) {
                        $line = $this->getLineData( $block, $rcObj, $queryParams );
-                       $lines .= $line;
                        if ( !$line ) {
                                // completely ignore this RC entry if we don't want to render it
                                unset( $block[$i] );
                        }
+                       $lines[] = $line;
                }
                // Further down are some assumptions that $block is a 0-indexed array
                // with (count-1) as last key. Let's make sure it is.
                $block = array_values( $block );
-               if ( empty( $block ) ) {
+
+               if ( empty( $block ) || !$lines ) {
                        // if we can't show anything, don't display this block altogether
                        return '';
                }
 
-               $r .= $this->getLogText( $block, $queryParams, $allLogs,
-                       $collectedRcFlags['newpage'], $namehidden );
-
-               $r .= ' <span class="mw-changeslist-separator">. .</span> ';
+               $logText = $this->getLogText( $block, $queryParams, $allLogs,
+                       $collectedRcFlags['newpage'], $namehidden
+               );
 
                # Character difference (does not apply if only log items)
+               $charDifference = false;
                if ( $RCShowChangedSize && !$allLogs ) {
                        $last = 0;
                        $first = count( $block ) - 1;
@@ -309,37 +295,42 @@ class EnhancedChangesList extends ChangesList {
                                $first--;
                        }
                        # Get net change
-                       $chardiff = $this->formatCharacterDifference( $block[$first], $block[$last] );
-
-                       if ( $chardiff == '' ) {
-                               $r .= ' ';
-                       } else {
-                               $r .= ' ' . $chardiff . ' <span class="mw-changeslist-separator">. .</span> ';
-                       }
-               }
-
-               $r .= $users;
-               $r .= $this->numberofWatchingusers( $block[0]->numberofWatchingusers );
-               $r .= '</td></tr>';
-
-               if ( !$lines ) {
-                       // if there are no lines to be rendered (all aborted by hook), don't render the block
-                       return '';
-               }
-
-               $r .= $lines;
-               $r .= "</table>\n";
+                       $charDifference = $this->formatCharacterDifference( $block[$first], $block[$last] );
+               }
+
+               $numberofWatchingusers = $this->numberofWatchingusers( $block[0]->numberofWatchingusers );
+               $usersList = $this->msg( 'brackets' )->rawParams(
+                       implode( $this->message['semicolon-separator'], $users )
+               )->escaped();
+
+               $templateParams = array(
+                       'articleLink' => $articleLink,
+                       'charDifference' => $charDifference,
+                       'collectedRcFlags' => $this->recentChangesFlags( $collectedRcFlags ),
+                       'languageDirMark' => $this->getLanguage()->getDirMark(),
+                       'lines' => $lines,
+                       'logText' => $logText,
+                       'numberofWatchingusers' => $numberofWatchingusers,
+                       'rev-deleted-event' => $revDeletedMsg,
+                       'tableClasses' => $tableClasses,
+                       'timestamp' => $block[0]->timestamp,
+                       'users' => $usersList,
+               );
 
                $this->rcCacheIndex++;
 
-               return $r;
+               $templateParser = new TemplateParser();
+               return $templateParser->processTemplate(
+                       'EnhancedChangesListGroup',
+                       $templateParams
+               );
        }
 
        /**
         * @param RCCacheEntry[] $block
         * @param RCCacheEntry $rcObj
         * @param array $queryParams
-        * @return string
+        * @return array
         * @throws Exception
         * @throws FatalError
         * @throws MWException
@@ -351,9 +342,13 @@ class EnhancedChangesList extends ChangesList {
                $classes = array();
                $type = $rcObj->mAttribs['rc_type'];
                $data = array();
+               $lineParams = array();
 
-               $trClass = $rcObj->watched && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
-                       ? ' class="mw-enhanced-watched"' : '';
+               if ( $rcObj->watched
+                       && $rcObj->mAttribs['rc_timestamp'] >= $rcObj->watched
+               ) {
+                       $lineParams['classes'] = array( 'mw-enhanced-watched' );
+               }
                $separator = ' <span class="mw-changeslist-separator">. .</span> ';
 
                $data['recentChangesFlags'] = array(
@@ -430,27 +425,23 @@ class EnhancedChangesList extends ChangesList {
                        array( $this, &$data, $block, $rcObj ) );
                if ( !$success ) {
                        // skip entry if hook aborted it
-                       return '';
+                       return array();
                }
 
-               $line = '<tr' . $trClass . '><td></td><td class="mw-enhanced-rc">';
                if ( isset( $data['recentChangesFlags'] ) ) {
-                       $line .= $this->recentChangesFlags( $data['recentChangesFlags'] );
+                       $lineParams['recentChangesFlags'] = $this->recentChangesFlags( $data['recentChangesFlags'] );
                        unset( $data['recentChangesFlags'] );
                }
-               $line .= '&#160;</td><td class="mw-enhanced-rc-nested">';
 
                if ( isset( $data['timestampLink'] ) ) {
-                       $line .= '<span class="mw-enhanced-rc-time">' . $data['timestampLink'] . '</span>';
+                       $lineParams['timestampLink'] = $data['timestampLink'];
                        unset( $data['timestampLink'] );
                }
 
                // everything else: makes it easier for extensions to add or remove data
-               $line .= implode( '', $data );
+               $lineParams['data'] = array_values( $data );
 
-               $line .= "</td></tr>\n";
-
-               return $line;
+               return $lineParams;
        }
 
        /**
index 31b355d..6f05dc4 100644 (file)
@@ -74,10 +74,16 @@ class OldChangesList extends ChangesList {
         */
        private function formatChangeLine( RecentChange $rc, array &$classes, $watched ) {
                $html = '';
+               $unpatrolled = $this->showAsUnpatrolled( $rc );
 
                if ( $rc->mAttribs['rc_log_type'] ) {
                        $logtitle = SpecialPage::getTitleFor( 'Log', $rc->mAttribs['rc_log_type'] );
                        $this->insertLog( $html, $logtitle, $rc->mAttribs['rc_log_type'] );
+                       $flags = $this->recentChangesFlags( array( 'unpatrolled' =>$unpatrolled,
+                               'bot' => $rc->mAttribs['rc_bot'] ), '' );
+                       if ( $flags !== '' ) {
+                               $html .= ' ' . $flags;
+                       }
                // Log entries (old format) or log targets, and special pages
                } elseif ( $rc->mAttribs['rc_namespace'] == NS_SPECIAL ) {
                        list( $name, $htmlubpage ) = SpecialPageFactory::resolveAlias( $rc->mAttribs['rc_title'] );
@@ -86,7 +92,6 @@ class OldChangesList extends ChangesList {
                        }
                // Regular entries
                } else {
-                       $unpatrolled = $this->showAsUnpatrolled( $rc );
                        $this->insertDiffHist( $html, $rc, $unpatrolled );
                        # M, N, b and ! (minor, new, bot and unpatrolled)
                        $html .= $this->recentChangesFlags(
@@ -98,7 +103,7 @@ class OldChangesList extends ChangesList {
                                ),
                                ''
                        );
-                       $this->insertArticleLink( $html, $rc, $unpatrolled, $watched );
+                       $html .= $this->getArticleLink( $rc, $unpatrolled, $watched );
                }
                # Edit/log timestamp
                $this->insertTimestamp( $html, $rc );
index 408b5ee..61c7000 100644 (file)
@@ -700,10 +700,12 @@ class RecentChange {
         * @param string $params
         * @param int $newId
         * @param string $actionCommentIRC
+        * @param int $revId Id of associated revision, if any
         * @return RecentChange
         */
        public static function newLogEntry( $timestamp, &$title, &$user, $actionComment, $ip,
-               $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '' ) {
+               $type, $action, $target, $logComment, $params, $newId = 0, $actionCommentIRC = '',
+               $revId = 0 ) {
                global $wgRequest;
 
                # # Get pageStatus for email notification
@@ -727,6 +729,10 @@ class RecentChange {
                                break;
                }
 
+               // Allow unpatrolled status when an associated rev id is passed
+               // May be used in core by moves and uploads
+               $markPatrolled = ( $revId > 0 ) ? $user->isAllowed( 'autopatrol' ) : true;
+
                $rc = new RecentChange;
                $rc->mTitle = $target;
                $rc->mPerformer = $user;
@@ -741,11 +747,11 @@ class RecentChange {
                        'rc_user' => $user->getId(),
                        'rc_user_text' => $user->getName(),
                        'rc_comment' => $logComment,
-                       'rc_this_oldid' => 0,
+                       'rc_this_oldid' => $revId,
                        'rc_last_oldid' => 0,
                        'rc_bot' => $user->isAllowed( 'bot' ) ? $wgRequest->getBool( 'bot', true ) : 0,
                        'rc_ip' => self::checkIPAddress( $ip ),
-                       'rc_patrolled' => 1,
+                       'rc_patrolled' => $markPatrolled ? 1 : 0,
                        'rc_new' => 0, # obsolete
                        'rc_old_len' => null,
                        'rc_new_len' => null,
index 9b6e1f3..36c644a 100644 (file)
@@ -123,8 +123,13 @@ class RequestContext implements IContextSource, MutableContext {
         */
        public function getRequest() {
                if ( $this->request === null ) {
-                       global $wgRequest; # fallback to $wg till we can improve this
-                       $this->request = $wgRequest;
+                       global $wgCommandLineMode;
+                       // create the WebRequest object on the fly
+                       if ( $wgCommandLineMode ) {
+                               $this->request = new FauxRequest( array() );
+                       } else {
+                               $this->request = new WebRequest();
+                       }
                }
 
                return $this->request;
index 5443eeb..3cac22a 100644 (file)
@@ -429,6 +429,10 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
+       public function doAtomicSection( $fname, $callback ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
        public function begin( $fname = __METHOD__ ) {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
index 31e2653..37c9d6f 100644 (file)
@@ -166,13 +166,6 @@ abstract class DatabaseBase implements IDatabase {
        /** @var TransactionProfiler */
        protected $trxProfiler;
 
-       /**
-        * A string describing the current software version, and possibly
-        * other details in a user-friendly way. Will be listed on Special:Version, etc.
-        * Use getServerVersion() to get machine-friendly information.
-        *
-        * @return string Version information from the database server
-        */
        public function getServerInfo() {
                return $this->getServerVersion();
        }
@@ -197,27 +190,6 @@ abstract class DatabaseBase implements IDatabase {
                return wfSetBit( $this->mFlags, DBO_DEBUG, $debug );
        }
 
-       /**
-        * Turns buffering of SQL result sets on (true) or off (false). Default is
-        * "on".
-        *
-        * Unbuffered queries are very troublesome in MySQL:
-        *
-        *   - If another query is executed while the first query is being read
-        *     out, the first query is killed. This means you can't call normal
-        *     MediaWiki functions while you are reading an unbuffered query result
-        *     from a normal wfGetDB() connection.
-        *
-        *   - Unbuffered queries cause the MySQL server to use large amounts of
-        *     memory and to hold broad locks which block other queries.
-        *
-        * If you want to limit client-side memory, it's almost always better to
-        * split up queries into batches using a LIMIT clause than to switch off
-        * buffering.
-        *
-        * @param null|bool $buffer
-        * @return null|bool The previous value of the flag
-        */
        public function bufferResults( $buffer = null ) {
                if ( is_null( $buffer ) ) {
                        return !(bool)( $this->mFlags & DBO_NOBUFFER );
@@ -242,45 +214,18 @@ abstract class DatabaseBase implements IDatabase {
                return wfSetBit( $this->mFlags, DBO_IGNORE, $ignoreErrors );
        }
 
-       /**
-        * Gets the current transaction level.
-        *
-        * Historically, transactions were allowed to be "nested". This is no
-        * longer supported, so this function really only returns a boolean.
-        *
-        * @return int The previous value
-        */
        public function trxLevel() {
                return $this->mTrxLevel;
        }
 
-       /**
-        * Get the UNIX timestamp of the time that the transaction was established
-        *
-        * This can be used to reason about the staleness of SELECT data
-        * in REPEATABLE-READ transaction isolation level.
-        *
-        * @return float|null Returns null if there is not active transaction
-        * @since 1.25
-        */
        public function trxTimestamp() {
                return $this->mTrxLevel ? $this->mTrxTimestamp : null;
        }
 
-       /**
-        * Get/set the table prefix.
-        * @param string $prefix The table prefix to set, or omitted to leave it unchanged.
-        * @return string The previous table prefix.
-        */
        public function tablePrefix( $prefix = null ) {
                return wfSetVar( $this->mTablePrefix, $prefix );
        }
 
-       /**
-        * Get/set the db schema.
-        * @param string $schema The database schema to set, or omitted to leave it unchanged.
-        * @return string The previous db schema.
-        */
        public function dbSchema( $schema = null ) {
                return wfSetVar( $this->mSchema, $schema );
        }
@@ -294,15 +239,6 @@ abstract class DatabaseBase implements IDatabase {
                $this->fileHandle = $fh;
        }
 
-       /**
-        * Get properties passed down from the server info array of the load
-        * balancer.
-        *
-        * @param string $name The entry of the info array to get, or null to get the
-        *   whole array
-        *
-        * @return array|mixed|null
-        */
        public function getLBInfo( $name = null ) {
                if ( is_null( $name ) ) {
                        return $this->mLBInfo;
@@ -315,14 +251,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Set the LB info array, or a member of it. If called with one parameter,
-        * the LB info array is set to that parameter. If it is called with two
-        * parameters, the member with the given name is set to the given value.
-        *
-        * @param string $name
-        * @param array $value
-        */
        public function setLBInfo( $name, $value = null ) {
                if ( is_null( $value ) ) {
                        $this->mLBInfo = $name;
@@ -396,21 +324,10 @@ abstract class DatabaseBase implements IDatabase {
                return false;
        }
 
-       /**
-        * Returns true if this database does an implicit sort when doing GROUP BY
-        *
-        * @return bool
-        */
        public function implicitGroupby() {
                return true;
        }
 
-       /**
-        * Returns true if this database does an implicit order by when the column has an index
-        * For example: SELECT page_title FROM page LIMIT 1
-        *
-        * @return bool
-        */
        public function implicitOrderby() {
                return true;
        }
@@ -434,132 +351,52 @@ abstract class DatabaseBase implements IDatabase {
                return false;
        }
 
-       /**
-        * Return the last query that went through DatabaseBase::query()
-        * @return string
-        */
        public function lastQuery() {
                return $this->mLastQuery;
        }
 
-       /**
-        * Returns true if the connection may have been used for write queries.
-        * Should return true if unsure.
-        *
-        * @return bool
-        */
        public function doneWrites() {
                return (bool)$this->mDoneWrites;
        }
 
-       /**
-        * Returns the last time the connection may have been used for write queries.
-        * Should return a timestamp if unsure.
-        *
-        * @return int|float UNIX timestamp or false
-        * @since 1.24
-        */
        public function lastDoneWrites() {
                return $this->mDoneWrites ?: false;
        }
 
-       /**
-        * @return bool Whether there is a transaction open with possible write queries
-        * @since 1.27
-        */
        public function writesPending() {
                return $this->mTrxLevel && $this->mTrxDoneWrites;
        }
 
-       /**
-        * Returns true if there is a transaction open with possible write
-        * queries or transaction pre-commit/idle callbacks waiting on it to finish.
-        *
-        * @return bool
-        */
        public function writesOrCallbacksPending() {
                return $this->mTrxLevel && (
                        $this->mTrxDoneWrites || $this->mTrxIdleCallbacks || $this->mTrxPreCommitCallbacks
                );
        }
 
-       /**
-        * Get the time spend running write queries for this
-        *
-        * High times could be due to scanning, updates, locking, and such
-        *
-        * @return float|bool Returns false if not transaction is active
-        * @since 1.26
-        */
        public function pendingWriteQueryDuration() {
                return $this->mTrxLevel ? $this->mTrxWriteDuration : false;
        }
 
-       /**
-        * Is a connection to the database open?
-        * @return bool
-        */
        public function isOpen() {
                return $this->mOpened;
        }
 
-       /**
-        * Set a flag for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
-        *       and removes it in command line mode
-        *   - DBO_PERSISTENT: use persistant database connection
-        */
        public function setFlag( $flag ) {
                $this->mFlags |= $flag;
        }
 
-       /**
-        * Clear a flag for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_DEFAULT: automatically sets DBO_TRX if not in command line mode
-        *       and removes it in command line mode
-        *   - DBO_PERSISTENT: use persistant database connection
-        */
        public function clearFlag( $flag ) {
                $this->mFlags &= ~$flag;
        }
 
-       /**
-        * Returns a boolean whether the flag $flag is set for this connection
-        *
-        * @param int $flag DBO_* constants from Defines.php:
-        *   - DBO_DEBUG: output some debug info (same as debug())
-        *   - DBO_NOBUFFER: don't buffer results (inverse of bufferResults())
-        *   - DBO_TRX: automatically start transactions
-        *   - DBO_PERSISTENT: use persistant database connection
-        * @return bool
-        */
        public function getFlag( $flag ) {
                return !!( $this->mFlags & $flag );
        }
 
-       /**
-        * General read-only accessor
-        *
-        * @param string $name
-        * @return string
-        */
        public function getProperty( $name ) {
                return $this->$name;
        }
 
-       /**
-        * @return string
-        */
        public function getWikiID() {
                if ( $this->mTablePrefix ) {
                        return "{$this->mDBname}-{$this->mTablePrefix}";
@@ -830,13 +667,6 @@ abstract class DatabaseBase implements IDatabase {
                );
        }
 
-       /**
-        * Closes a database connection.
-        * if it is open : commits any open transactions
-        *
-        * @throws MWException
-        * @return bool Operation success. true if already closed.
-        */
        public function close() {
                if ( count( $this->mTrxIdleCallbacks ) ) { // sanity
                        throw new MWException( "Transaction idle callbacks still pending." );
@@ -879,10 +709,6 @@ abstract class DatabaseBase implements IDatabase {
         */
        abstract protected function closeConnection();
 
-       /**
-        * @param string $error Fallback error message, used if none is given by DB
-        * @throws DBConnectionError
-        */
        function reportConnectionError( $error = 'Unknown error' ) {
                $myError = $this->lastError();
                if ( $myError ) {
@@ -927,28 +753,6 @@ abstract class DatabaseBase implements IDatabase {
                return !in_array( $verb, array( 'BEGIN', 'COMMIT', 'ROLLBACK', 'SHOW', 'SET' ) );
        }
 
-       /**
-        * Run an SQL query and return the result. Normally throws a DBQueryError
-        * on failure. If errors are ignored, returns false instead.
-        *
-        * In new code, the query wrappers select(), insert(), update(), delete(),
-        * etc. should be used where possible, since they give much better DBMS
-        * independence and automatically quote or validate user input in a variety
-        * of contexts. This function is generally only useful for queries which are
-        * explicitly DBMS-dependent and are unsupported by the query wrappers, such
-        * as CREATE TABLE.
-        *
-        * However, the query wrappers themselves should call this function.
-        *
-        * @param string $sql SQL query
-        * @param string $fname Name of the calling function, for profiling/SHOW PROCESSLIST
-        *     comment (you can use __METHOD__ or add some extra info)
-        * @param bool $tempIgnore Whether to avoid throwing an exception on errors...
-        *     maybe best to catch the exception instead?
-        * @throws MWException
-        * @return bool|ResultWrapper True for a successful write query, ResultWrapper object
-        *     for a successful read query, or false on failure if $tempIgnore set
-        */
        public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
                global $wgUser;
 
@@ -1082,17 +886,6 @@ abstract class DatabaseBase implements IDatabase {
                return $res;
        }
 
-       /**
-        * Report a query error. Log the error, and if neither the object ignore
-        * flag nor the $tempIgnore flag is set, throw a DBQueryError.
-        *
-        * @param string $error
-        * @param int $errno
-        * @param string $sql
-        * @param string $fname
-        * @param bool $tempIgnore
-        * @throws DBQueryError
-        */
        public function reportQueryError( $error, $errno, $sql, $fname, $tempIgnore = false ) {
                if ( $this->ignoreErrors() || $tempIgnore ) {
                        wfDebug( "SQL ERROR (ignored): $error\n" );
@@ -1217,34 +1010,9 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Free a result object returned by query() or select(). It's usually not
-        * necessary to call this, just use unset() or let the variable holding
-        * the result object go out of scope.
-        *
-        * @param mixed $res A SQL result
-        */
        public function freeResult( $res ) {
        }
 
-       /**
-        * A SELECT wrapper which returns a single field from a single result row.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly
-        * ignored, returns false on failure.
-        *
-        * If no result rows are returned from the query, false is returned.
-        *
-        * @param string|array $table Table name. See DatabaseBase::select() for details.
-        * @param string $var The field name to select. This must be a valid SQL
-        *   fragment: do not use unvalidated user input.
-        * @param string|array $cond The condition array. See DatabaseBase::select() for details.
-        * @param string $fname The function name of the caller.
-        * @param string|array $options The query options. See DatabaseBase::select() for details.
-        *
-        * @return bool|mixed The value from the field, or false on failure.
-        * @throws DBUnexpectedError
-        */
        public function selectField(
                $table, $var, $cond = '', $fname = __METHOD__, $options = array()
        ) {
@@ -1272,27 +1040,8 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * A SELECT wrapper which returns a list of single field values from result rows.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly
-        * ignored, returns false on failure.
-        *
-        * If no result rows are returned from the query, false is returned.
-        *
-        * @param string|array $table Table name. See DatabaseBase::select() for details.
-        * @param string $var The field name to select. This must be a valid SQL
-        *   fragment: do not use unvalidated user input.
-        * @param string|array $cond The condition array. See DatabaseBase::select() for details.
-        * @param string $fname The function name of the caller.
-        * @param string|array $options The query options. See DatabaseBase::select() for details.
-        *
-        * @return bool|array The values from the field, or false on failure
-        * @throws DBUnexpectedError
-        * @since 1.25
-        */
        public function selectFieldValues(
-               $table, $var, $cond = '', $fname = __METHOD__, $options = array()
+               $table, $var, $cond = '', $fname = __METHOD__, $options = array(), $join_conds = array()
        ) {
                if ( $var === '*' ) { // sanity
                        throw new DBUnexpectedError( $this, "Cannot use a * field: got '$var'" );
@@ -1302,7 +1051,7 @@ abstract class DatabaseBase implements IDatabase {
                        $options = array( $options );
                }
 
-               $res = $this->select( $table, $var, $cond, $fname, $options );
+               $res = $this->select( $table, $var, $cond, $fname, $options, $join_conds );
                if ( $res === false ) {
                        return false;
                }
@@ -1446,147 +1195,6 @@ abstract class DatabaseBase implements IDatabase {
                return '';
        }
 
-       /**
-        * Execute a SELECT query constructed using the various parameters provided.
-        * See below for full details of the parameters.
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param string|array $conds Conditions
-        * @param string $fname Caller function name
-        * @param array $options Query options
-        * @param array $join_conds Join conditions
-        *
-        *
-        * @param string|array $table
-        *
-        * May be either an array of table names, or a single string holding a table
-        * name. If an array is given, table aliases can be specified, for example:
-        *
-        *    array( 'a' => 'user' )
-        *
-        * This includes the user table in the query, with the alias "a" available
-        * for use in field names (e.g. a.user_name).
-        *
-        * All of the table names given here are automatically run through
-        * DatabaseBase::tableName(), which causes the table prefix (if any) to be
-        * added, and various other table name mappings to be performed.
-        *
-        *
-        * @param string|array $vars
-        *
-        * May be either a field name or an array of field names. The field names
-        * can be complete fragments of SQL, for direct inclusion into the SELECT
-        * query. If an array is given, field aliases can be specified, for example:
-        *
-        *   array( 'maxrev' => 'MAX(rev_id)' )
-        *
-        * This includes an expression with the alias "maxrev" in the query.
-        *
-        * If an expression is given, care must be taken to ensure that it is
-        * DBMS-independent.
-        *
-        *
-        * @param string|array $conds
-        *
-        * May be either a string containing a single condition, or an array of
-        * conditions. If an array is given, the conditions constructed from each
-        * element are combined with AND.
-        *
-        * Array elements may take one of two forms:
-        *
-        *   - Elements with a numeric key are interpreted as raw SQL fragments.
-        *   - Elements with a string key are interpreted as equality conditions,
-        *     where the key is the field name.
-        *     - If the value of such an array element is a scalar (such as a
-        *       string), it will be treated as data and thus quoted appropriately.
-        *       If it is null, an IS NULL clause will be added.
-        *     - If the value is an array, an IN (...) clause will be constructed
-        *       from its non-null elements, and an IS NULL clause will be added
-        *       if null is present, such that the field may match any of the
-        *       elements in the array. The non-null elements will be quoted.
-        *
-        * Note that expressions are often DBMS-dependent in their syntax.
-        * DBMS-independent wrappers are provided for constructing several types of
-        * expression commonly used in condition queries. See:
-        *    - DatabaseBase::buildLike()
-        *    - DatabaseBase::conditional()
-        *
-        *
-        * @param string|array $options
-        *
-        * Optional: Array of query options. Boolean options are specified by
-        * including them in the array as a string value with a numeric key, for
-        * example:
-        *
-        *    array( 'FOR UPDATE' )
-        *
-        * The supported options are:
-        *
-        *   - OFFSET: Skip this many rows at the start of the result set. OFFSET
-        *     with LIMIT can theoretically be used for paging through a result set,
-        *     but this is discouraged in MediaWiki for performance reasons.
-        *
-        *   - LIMIT: Integer: return at most this many rows. The rows are sorted
-        *     and then the first rows are taken until the limit is reached. LIMIT
-        *     is applied to a result set after OFFSET.
-        *
-        *   - FOR UPDATE: Boolean: lock the returned rows so that they can't be
-        *     changed until the next COMMIT.
-        *
-        *   - DISTINCT: Boolean: return only unique result rows.
-        *
-        *   - GROUP BY: May be either an SQL fragment string naming a field or
-        *     expression to group by, or an array of such SQL fragments.
-        *
-        *   - HAVING: May be either an string containing a HAVING clause or an array of
-        *     conditions building the HAVING clause. If an array is given, the conditions
-        *     constructed from each element are combined with AND.
-        *
-        *   - ORDER BY: May be either an SQL fragment giving a field name or
-        *     expression to order by, or an array of such SQL fragments.
-        *
-        *   - USE INDEX: This may be either a string giving the index name to use
-        *     for the query, or an array. If it is an associative array, each key
-        *     gives the table name (or alias), each value gives the index name to
-        *     use for that table. All strings are SQL fragments and so should be
-        *     validated by the caller.
-        *
-        *   - EXPLAIN: In MySQL, this causes an EXPLAIN SELECT query to be run,
-        *     instead of SELECT.
-        *
-        * And also the following boolean MySQL extensions, see the MySQL manual
-        * for documentation:
-        *
-        *    - LOCK IN SHARE MODE
-        *    - STRAIGHT_JOIN
-        *    - HIGH_PRIORITY
-        *    - SQL_BIG_RESULT
-        *    - SQL_BUFFER_RESULT
-        *    - SQL_SMALL_RESULT
-        *    - SQL_CALC_FOUND_ROWS
-        *    - SQL_CACHE
-        *    - SQL_NO_CACHE
-        *
-        *
-        * @param string|array $join_conds
-        *
-        * Optional associative array of table-specific join conditions. In the
-        * most common case, this is unnecessary, since the join condition can be
-        * in $conds. However, it is useful for doing a LEFT JOIN.
-        *
-        * The key of the array contains the table name or alias. The value is an
-        * array with two elements, numbered 0 and 1. The first gives the type of
-        * join, the second is an SQL fragment giving the join condition for that
-        * table. For example:
-        *
-        *    array( 'page' => array( 'LEFT JOIN', 'page_latest=rev_id' ) )
-        *
-        * @return ResultWrapper|bool If the query returned no rows, a ResultWrapper
-        *   with no rows in it will be returned. If there was a query error, a
-        *   DBQueryError exception will be thrown, except if the "ignore errors"
-        *   option was set, in which case false will be returned.
-        */
        public function select( $table, $vars, $conds = '', $fname = __METHOD__,
                $options = array(), $join_conds = array() ) {
                $sql = $this->selectSQLText( $table, $vars, $conds, $fname, $options, $join_conds );
@@ -1594,22 +1202,6 @@ abstract class DatabaseBase implements IDatabase {
                return $this->query( $sql, $fname );
        }
 
-       /**
-        * The equivalent of DatabaseBase::select() except that the constructed SQL
-        * is returned, instead of being immediately executed. This can be useful for
-        * doing UNION queries, where the SQL text of each query is needed. In general,
-        * however, callers outside of Database classes should just use select().
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param string|array $conds Conditions
-        * @param string $fname Caller function name
-        * @param string|array $options Query options
-        * @param string|array $join_conds Join conditions
-        *
-        * @return string SQL query string.
-        * @see DatabaseBase::select()
-        */
        public function selectSQLText( $table, $vars, $conds = '', $fname = __METHOD__,
                $options = array(), $join_conds = array()
        ) {
@@ -1661,20 +1253,6 @@ abstract class DatabaseBase implements IDatabase {
                return $sql;
        }
 
-       /**
-        * Single row SELECT wrapper. Equivalent to DatabaseBase::select(), except
-        * that a single row object is returned. If the query returns no rows,
-        * false is returned.
-        *
-        * @param string|array $table Table name
-        * @param string|array $vars Field names
-        * @param array $conds Conditions
-        * @param string $fname Caller function name
-        * @param string|array $options Query options
-        * @param array|string $join_conds Join conditions
-        *
-        * @return stdClass|bool
-        */
        public function selectRow( $table, $vars, $conds, $fname = __METHOD__,
                $options = array(), $join_conds = array()
        ) {
@@ -1695,26 +1273,6 @@ abstract class DatabaseBase implements IDatabase {
                return $obj;
        }
 
-       /**
-        * Estimate the number of rows in dataset
-        *
-        * MySQL allows you to estimate the number of rows that would be returned
-        * by a SELECT query, using EXPLAIN SELECT. The estimate is provided using
-        * index cardinality statistics, and is notoriously inaccurate, especially
-        * when large numbers of rows have recently been added or deleted.
-        *
-        * For DBMSs that don't support fast result size estimation, this function
-        * will actually perform the SELECT COUNT(*).
-        *
-        * Takes the same arguments as DatabaseBase::select().
-        *
-        * @param string $table Table name
-        * @param string $vars Unused
-        * @param array|string $conds Filters on the table
-        * @param string $fname Function name for profiling
-        * @param array $options Options for select
-        * @return int Row count
-        */
        public function estimateRowCount(
                $table, $vars = '*', $conds = '', $fname = __METHOD__, $options = array()
        ) {
@@ -1729,23 +1287,6 @@ abstract class DatabaseBase implements IDatabase {
                return $rows;
        }
 
-       /**
-        * Get the number of rows in dataset
-        *
-        * This is useful when trying to do COUNT(*) but with a LIMIT for performance.
-        *
-        * Takes the same arguments as DatabaseBase::select().
-        *
-        * @since 1.27 Added $join_conds parameter
-        *
-        * @param array|string $tables Table names
-        * @param string $vars Unused
-        * @param array|string $conds Filters on the table
-        * @param string $fname Function name for profiling
-        * @param array $options Options for select
-        * @param array $join_conds Join conditions (since 1.27)
-        * @return int Row count
-        */
        public function selectRowCount(
                $tables, $vars = '*', $conds = '', $fname = __METHOD__, $options = array(), $join_conds = array()
        ) {
@@ -1791,30 +1332,12 @@ abstract class DatabaseBase implements IDatabase {
                return $sql;
        }
 
-       /**
-        * Determines whether a field exists in a table
-        *
-        * @param string $table Table name
-        * @param string $field Filed to check on that table
-        * @param string $fname Calling function name (optional)
-        * @return bool Whether $table has filed $field
-        */
        public function fieldExists( $table, $field, $fname = __METHOD__ ) {
                $info = $this->fieldInfo( $table, $field );
 
                return (bool)$info;
        }
 
-       /**
-        * Determines whether an index exists
-        * Usually throws a DBQueryError on failure
-        * If errors are explicitly ignored, returns NULL on failure
-        *
-        * @param string $table
-        * @param string $index
-        * @param string $fname
-        * @return bool|null
-        */
        public function indexExists( $table, $index, $fname = __METHOD__ ) {
                if ( !$this->tableExists( $table ) ) {
                        return null;
@@ -1828,13 +1351,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Query whether a given table exists
-        *
-        * @param string $table
-        * @param string $fname
-        * @return bool
-        */
        public function tableExists( $table, $fname = __METHOD__ ) {
                $table = $this->tableName( $table );
                $old = $this->ignoreErrors( true );
@@ -1844,14 +1360,6 @@ abstract class DatabaseBase implements IDatabase {
                return (bool)$res;
        }
 
-       /**
-        * Determines if a given index is unique
-        *
-        * @param string $table
-        * @param string $index
-        *
-        * @return bool
-        */
        public function indexUnique( $table, $index ) {
                $indexInfo = $this->indexInfo( $table, $index );
 
@@ -1872,39 +1380,6 @@ abstract class DatabaseBase implements IDatabase {
                return implode( ' ', $options );
        }
 
-       /**
-        * INSERT wrapper, inserts an array into a table.
-        *
-        * $a may be either:
-        *
-        *   - A single associative array. The array keys are the field names, and
-        *     the values are the values to insert. The values are treated as data
-        *     and will be quoted appropriately. If NULL is inserted, this will be
-        *     converted to a database NULL.
-        *   - An array with numeric keys, holding a list of associative arrays.
-        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
-        *     each subarray must be identical to each other, and in the same order.
-        *
-        * $options is an array of options, with boolean options encoded as values
-        * with numeric keys, in the same style as $options in
-        * DatabaseBase::select(). Supported options are:
-        *
-        *   - IGNORE: Boolean: if present, duplicate key errors are ignored, and
-        *     any rows which cause duplicate key errors are not inserted. It's
-        *     possible to determine how many rows were successfully inserted using
-        *     DatabaseBase::affectedRows().
-        *
-        * @param string $table Table name. This will be passed through
-        *   DatabaseBase::tableName().
-        * @param array $a Array of rows to insert
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @param array $options Array of options
-        *
-        * @throws DBQueryError Usually throws a DBQueryError on failure. If errors are explicitly ignored,
-        * returns success.
-        *
-        * @return bool
-        */
        public function insert( $table, $a, $fname = __METHOD__, $options = array() ) {
                # No rows to insert, easy just return now
                if ( !count( $a ) ) {
@@ -1993,24 +1468,6 @@ abstract class DatabaseBase implements IDatabase {
                return implode( ' ', $opts );
        }
 
-       /**
-        * UPDATE wrapper. Takes a condition array and a SET array.
-        *
-        * @param string $table Name of the table to UPDATE. This will be passed through
-        *   DatabaseBase::tableName().
-        * @param array $values An array of values to SET. For each array element,
-        *   the key gives the field name, and the value gives the data to set
-        *   that field to. The data will be quoted by DatabaseBase::addQuotes().
-        * @param array $conds An array of conditions (WHERE). See
-        *   DatabaseBase::select() for the details of the format of condition
-        *   arrays. Use '*' to update all rows.
-        * @param string $fname The function name of the caller (from __METHOD__),
-        *   for logging and profiling.
-        * @param array $options An array of UPDATE options, can be:
-        *   - IGNORE: Ignore unique key conflicts
-        *   - LOW_PRIORITY: MySQL-specific, see MySQL manual.
-        * @return bool
-        */
        function update( $table, $values, $conds, $fname = __METHOD__, $options = array() ) {
                $table = $this->tableName( $table );
                $opts = $this->makeUpdateOptions( $options );
@@ -2023,20 +1480,6 @@ abstract class DatabaseBase implements IDatabase {
                return $this->query( $sql, $fname );
        }
 
-       /**
-        * Makes an encoded list of strings from an array
-        *
-        * @param array $a Containing the data
-        * @param int $mode Constant
-        *    - LIST_COMMA: Comma separated, no field names
-        *    - LIST_AND:   ANDed WHERE clause (without the WHERE). See the
-        *      documentation for $conds in DatabaseBase::select().
-        *    - LIST_OR:    ORed WHERE clause (without the WHERE)
-        *    - LIST_SET:   Comma separated with field names, like a SET clause
-        *    - LIST_NAMES: Comma separated field names
-        * @throws MWException|DBUnexpectedError
-        * @return string
-        */
        public function makeList( $a, $mode = LIST_COMMA ) {
                if ( !is_array( $a ) ) {
                        throw new DBUnexpectedError( $this, 'DatabaseBase::makeList called with incorrect parameters' );
@@ -2112,16 +1555,6 @@ abstract class DatabaseBase implements IDatabase {
                return $list;
        }
 
-       /**
-        * Build a partial where clause from a 2-d array such as used for LinkBatch.
-        * The keys on each level may be either integers or strings.
-        *
-        * @param array $data Organized as 2-d
-        *    array(baseKeyVal => array(subKeyVal => [ignored], ...), ...)
-        * @param string $baseKey Field name to match the base-level keys to (eg 'pl_namespace')
-        * @param string $subKey Field name to match the sub-level keys to (eg 'pl_title')
-        * @return string|bool SQL fragment, or false if no items in array
-        */
        public function makeWhereFrom2d( $data, $baseKey, $subKey ) {
                $conds = array();
 
@@ -2153,58 +1586,22 @@ abstract class DatabaseBase implements IDatabase {
                return $valuename;
        }
 
-       /**
-        * @param string $field
-        * @return string
-        */
        public function bitNot( $field ) {
                return "(~$field)";
        }
 
-       /**
-        * @param string $fieldLeft
-        * @param string $fieldRight
-        * @return string
-        */
        public function bitAnd( $fieldLeft, $fieldRight ) {
                return "($fieldLeft & $fieldRight)";
        }
 
-       /**
-        * @param string $fieldLeft
-        * @param string $fieldRight
-        * @return string
-        */
        public function bitOr( $fieldLeft, $fieldRight ) {
                return "($fieldLeft | $fieldRight)";
        }
 
-       /**
-        * Build a concatenation list to feed into a SQL query
-        * @param array $stringList List of raw SQL expressions; caller is
-        *   responsible for any quoting
-        * @return string
-        */
        public function buildConcat( $stringList ) {
                return 'CONCAT(' . implode( ',', $stringList ) . ')';
        }
 
-       /**
-        * Build a GROUP_CONCAT or equivalent statement for a query.
-        *
-        * This is useful for combining a field for several rows into a single string.
-        * NULL values will not appear in the output, duplicated values will appear,
-        * and the resulting delimiter-separated values have no defined sort order.
-        * Code using the results may need to use the PHP unique() or sort() methods.
-        *
-        * @param string $delim Glue to bind the results together
-        * @param string|array $table Table name
-        * @param string $field Field name
-        * @param string|array $conds Conditions
-        * @param string|array $join_conds Join conditions
-        * @return string SQL text
-        * @since 1.23
-        */
        public function buildGroupConcatField(
                $delim, $table, $field, $conds = '', $join_conds = array()
        ) {
@@ -2213,15 +1610,6 @@ abstract class DatabaseBase implements IDatabase {
                return '(' . $this->selectSQLText( $table, $fld, $conds, null, array(), $join_conds ) . ')';
        }
 
-       /**
-        * Change the current database
-        *
-        * @todo Explain what exactly will fail if this is not overridden.
-        *
-        * @param string $db
-        *
-        * @return bool Success or failure
-        */
        public function selectDB( $db ) {
                # Stub. Shouldn't cause serious problems if it's not overridden, but
                # if your database engine supports a concept similar to MySQL's
@@ -2231,18 +1619,10 @@ abstract class DatabaseBase implements IDatabase {
                return true;
        }
 
-       /**
-        * Get the current DB name
-        * @return string
-        */
        public function getDBname() {
                return $this->mDBname;
        }
 
-       /**
-        * Get the server hostname or IP address
-        * @return string
-        */
        public function getServer() {
                return $this->mServer;
        }
@@ -2542,12 +1922,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Adds quotes and backslashes.
-        *
-        * @param string|Blob $s
-        * @return string
-        */
        public function addQuotes( $s ) {
                if ( $s instanceof Blob ) {
                        $s = $s->fetch();
@@ -2595,22 +1969,6 @@ abstract class DatabaseBase implements IDatabase {
                return addcslashes( $s, '\%_' );
        }
 
-       /**
-        * LIKE statement wrapper, receives a variable-length argument list with
-        * parts of pattern to match containing either string literals that will be
-        * escaped or tokens returned by anyChar() or anyString(). Alternatively,
-        * the function could be provided with an array of aforementioned
-        * parameters.
-        *
-        * Example: $dbr->buildLike( 'My_page_title/', $dbr->anyString() ) returns
-        * a LIKE clause that searches for subpages of 'My page title'.
-        * Alternatively:
-        *   $pattern = array( 'My_page_title/', $dbr->anyString() );
-        *   $query .= $dbr->buildLike( $pattern );
-        *
-        * @since 1.16
-        * @return string Fully built LIKE statement
-        */
        public function buildLike() {
                $params = func_get_args();
 
@@ -2631,35 +1989,14 @@ abstract class DatabaseBase implements IDatabase {
                return " LIKE {$this->addQuotes( $s )} ";
        }
 
-       /**
-        * Returns a token for buildLike() that denotes a '_' to be used in a LIKE query
-        *
-        * @return LikeMatch
-        */
        public function anyChar() {
                return new LikeMatch( '_' );
        }
 
-       /**
-        * Returns a token for buildLike() that denotes a '%' to be used in a LIKE query
-        *
-        * @return LikeMatch
-        */
        public function anyString() {
                return new LikeMatch( '%' );
        }
 
-       /**
-        * Returns an appropriately quoted sequence value for inserting a new row.
-        * MySQL has autoincrement fields, so this is just NULL. But the PostgreSQL
-        * subclass will return an integer, and save the value for insertId()
-        *
-        * Any implementation of this function should *not* involve reusing
-        * sequence numbers created for rolled-back transactions.
-        * See http://bugs.mysql.com/bug.php?id=30767 for details.
-        * @param string $seqName
-        * @return null|int
-        */
        public function nextSequenceValue( $seqName ) {
                return null;
        }
@@ -2678,28 +2015,6 @@ abstract class DatabaseBase implements IDatabase {
                return '';
        }
 
-       /**
-        * REPLACE query wrapper.
-        *
-        * REPLACE is a very handy MySQL extension, which functions like an INSERT
-        * except that when there is a duplicate key error, the old row is deleted
-        * and the new row is inserted in its place.
-        *
-        * We simulate this with standard SQL with a DELETE followed by INSERT. To
-        * perform the delete, we need to know what the unique indexes are so that
-        * we know how to find the conflicting rows.
-        *
-        * It may be more efficient to leave off unique indexes which are unlikely
-        * to collide. However if you do this, you run the risk of encountering
-        * errors which wouldn't have occurred in MySQL.
-        *
-        * @param string $table The table to replace the row(s) in.
-        * @param array $uniqueIndexes Is an array of indexes. Each element may be either
-        *    a field name or an array of field names
-        * @param array $rows Can be either a single row to insert, or multiple rows,
-        *    in the same format as for DatabaseBase::insert()
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        */
        public function replace( $table, $uniqueIndexes, $rows, $fname = __METHOD__ ) {
                $quotedTable = $this->tableName( $table );
 
@@ -2782,40 +2097,6 @@ abstract class DatabaseBase implements IDatabase {
                return $this->query( $sql, $fname );
        }
 
-       /**
-        * INSERT ON DUPLICATE KEY UPDATE wrapper, upserts an array into a table.
-        *
-        * This updates any conflicting rows (according to the unique indexes) using
-        * the provided SET clause and inserts any remaining (non-conflicted) rows.
-        *
-        * $rows may be either:
-        *   - A single associative array. The array keys are the field names, and
-        *     the values are the values to insert. The values are treated as data
-        *     and will be quoted appropriately. If NULL is inserted, this will be
-        *     converted to a database NULL.
-        *   - An array with numeric keys, holding a list of associative arrays.
-        *     This causes a multi-row INSERT on DBMSs that support it. The keys in
-        *     each subarray must be identical to each other, and in the same order.
-        *
-        * It may be more efficient to leave off unique indexes which are unlikely
-        * to collide. However if you do this, you run the risk of encountering
-        * errors which wouldn't have occurred in MySQL.
-        *
-        * Usually throws a DBQueryError on failure. If errors are explicitly ignored,
-        * returns success.
-        *
-        * @since 1.22
-        *
-        * @param string $table Table name. This will be passed through DatabaseBase::tableName().
-        * @param array $rows A single row or list of rows to insert
-        * @param array $uniqueIndexes List of single field names or field name tuples
-        * @param array $set An array of values to SET. For each array element, the
-        *   key gives the field name, and the value gives the data to set that
-        *   field to. The data will be quoted by DatabaseBase::addQuotes().
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @throws Exception
-        * @return bool
-        */
        public function upsert( $table, array $rows, array $uniqueIndexes, array $set,
                $fname = __METHOD__
        ) {
@@ -2870,26 +2151,6 @@ abstract class DatabaseBase implements IDatabase {
                return $ok;
        }
 
-       /**
-        * DELETE where the condition is a join.
-        *
-        * MySQL overrides this to use a multi-table DELETE syntax, in other databases
-        * we use sub-selects
-        *
-        * For safety, an empty $conds will not delete everything. If you want to
-        * delete all rows where the join condition matches, set $conds='*'.
-        *
-        * DO NOT put the join condition in $conds.
-        *
-        * @param string $delTable The table to delete from.
-        * @param string $joinTable The other table.
-        * @param string $delVar The variable to join on, in the first table.
-        * @param string $joinVar The variable to join on, in the second table.
-        * @param array $conds Condition array of field names mapped to variables,
-        *   ANDed together in the WHERE clause
-        * @param string $fname Calling function name (use __METHOD__) for logs/profiling
-        * @throws DBUnexpectedError
-        */
        public function deleteJoin( $delTable, $joinTable, $delVar, $joinVar, $conds,
                $fname = __METHOD__
        ) {
@@ -2945,16 +2206,6 @@ abstract class DatabaseBase implements IDatabase {
                return '';
        }
 
-       /**
-        * DELETE query wrapper.
-        *
-        * @param array $table Table name
-        * @param string|array $conds Array of conditions. See $conds in DatabaseBase::select()
-        *   for the format. Use $conds == "*" to delete all rows
-        * @param string $fname Name of the calling function
-        * @throws DBUnexpectedError
-        * @return bool|ResultWrapper
-        */
        public function delete( $table, $conds, $fname = __METHOD__ ) {
                if ( !$conds ) {
                        throw new DBUnexpectedError( $this, 'DatabaseBase::delete() called with no conditions' );
@@ -2973,32 +2224,6 @@ abstract class DatabaseBase implements IDatabase {
                return $this->query( $sql, $fname );
        }
 
-       /**
-        * INSERT SELECT wrapper. Takes data from a SELECT query and inserts it
-        * into another table.
-        *
-        * @param string $destTable The table name to insert into
-        * @param string|array $srcTable May be either a table name, or an array of table names
-        *    to include in a join.
-        *
-        * @param array $varMap Must be an associative array of the form
-        *    array( 'dest1' => 'source1', ...). Source items may be literals
-        *    rather than field names, but strings should be quoted with
-        *    DatabaseBase::addQuotes()
-        *
-        * @param array $conds Condition array. See $conds in DatabaseBase::select() for
-        *    the details of the format of condition arrays. May be "*" to copy the
-        *    whole table.
-        *
-        * @param string $fname The function name of the caller, from __METHOD__
-        *
-        * @param array $insertOptions Options for the INSERT part of the query, see
-        *    DatabaseBase::insert() for details.
-        * @param array $selectOptions Options for the SELECT part of the query, see
-        *    DatabaseBase::select() for details.
-        *
-        * @return ResultWrapper
-        */
        public function insertSelect( $destTable, $srcTable, $varMap, $conds,
                $fname = __METHOD__,
                $insertOptions = array(), $selectOptions = array()
@@ -3068,38 +2293,16 @@ abstract class DatabaseBase implements IDatabase {
                        . "{$limit} ";
        }
 
-       /**
-        * Returns true if current database backend supports ORDER BY or LIMIT for separate subqueries
-        * within the UNION construct.
-        * @return bool
-        */
        public function unionSupportsOrderAndLimit() {
                return true; // True for almost every DB supported
        }
 
-       /**
-        * Construct a UNION query
-        * This is used for providing overload point for other DB abstractions
-        * not compatible with the MySQL syntax.
-        * @param array $sqls SQL statements to combine
-        * @param bool $all Use UNION ALL
-        * @return string SQL fragment
-        */
        public function unionQueries( $sqls, $all ) {
                $glue = $all ? ') UNION ALL (' : ') UNION (';
 
                return '(' . implode( $glue, $sqls ) . ')';
        }
 
-       /**
-        * Returns an SQL expression for a simple conditional. This doesn't need
-        * to be overridden unless CASE isn't supported in your DBMS.
-        *
-        * @param string|array $cond SQL expression which will result in a boolean value
-        * @param string $trueVal SQL expression to return if true
-        * @param string $falseVal SQL expression to return if false
-        * @return string SQL fragment
-        */
        public function conditional( $cond, $trueVal, $falseVal ) {
                if ( is_array( $cond ) ) {
                        $cond = $this->makeList( $cond, LIST_AND );
@@ -3108,67 +2311,26 @@ abstract class DatabaseBase implements IDatabase {
                return " (CASE WHEN $cond THEN $trueVal ELSE $falseVal END) ";
        }
 
-       /**
-        * Returns a comand for str_replace function in SQL query.
-        * Uses REPLACE() in MySQL
-        *
-        * @param string $orig Column to modify
-        * @param string $old Column to seek
-        * @param string $new Column to replace with
-        *
-        * @return string
-        */
        public function strreplace( $orig, $old, $new ) {
                return "REPLACE({$orig}, {$old}, {$new})";
        }
 
-       /**
-        * Determines how long the server has been up
-        * STUB
-        *
-        * @return int
-        */
        public function getServerUptime() {
                return 0;
        }
 
-       /**
-        * Determines if the last failure was due to a deadlock
-        * STUB
-        *
-        * @return bool
-        */
        public function wasDeadlock() {
                return false;
        }
 
-       /**
-        * Determines if the last failure was due to a lock timeout
-        * STUB
-        *
-        * @return bool
-        */
        public function wasLockTimeout() {
                return false;
        }
 
-       /**
-        * Determines if the last query error was something that should be dealt
-        * with by pinging the connection and reissuing the query.
-        * STUB
-        *
-        * @return bool
-        */
        public function wasErrorReissuable() {
                return false;
        }
 
-       /**
-        * Determines if the last failure was due to the database being read-only.
-        * STUB
-        *
-        * @return bool
-        */
        public function wasReadOnlyError() {
                return false;
        }
@@ -3199,9 +2361,9 @@ abstract class DatabaseBase implements IDatabase {
         * Returns whatever the callback function returned on its successful,
         * iteration, or false on error, for example if the retry limit was
         * reached.
-        *
         * @return mixed
-        * @throws DBQueryError
+        * @throws DBUnexpectedError
+        * @throws Exception
         */
        public function deadlockLoop() {
                $args = func_get_args();
@@ -3211,6 +2373,7 @@ abstract class DatabaseBase implements IDatabase {
                $this->begin( __METHOD__ );
 
                $retVal = null;
+               /** @var Exception $e */
                $e = null;
                do {
                        try {
@@ -3238,55 +2401,21 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Wait for the slave to catch up to a given master position.
-        *
-        * @param DBMasterPos $pos
-        * @param int $timeout The maximum number of seconds to wait for
-        *   synchronisation
-        * @return int Zero if the slave was past that position already,
-        *   greater than zero if we waited for some period of time, less than
-        *   zero if we timed out.
-        */
        public function masterPosWait( DBMasterPos $pos, $timeout ) {
                # Real waits are implemented in the subclass.
                return 0;
        }
 
-       /**
-        * Get the replication position of this slave
-        *
-        * @return DBMasterPos|bool False if this is not a slave.
-        */
        public function getSlavePos() {
                # Stub
                return false;
        }
 
-       /**
-        * Get the position of this master
-        *
-        * @return DBMasterPos|bool False if this is not a master
-        */
        public function getMasterPos() {
                # Stub
                return false;
        }
 
-       /**
-        * Run an anonymous function as soon as there is no transaction pending.
-        * If there is a transaction and it is rolled back, then the callback is cancelled.
-        * Queries in the function will run in AUTO-COMMIT mode unless there are begin() calls.
-        * Callbacks must commit any transactions that they begin.
-        *
-        * This is useful for updates to different systems or when separate transactions are needed.
-        * For example, one might want to enqueue jobs into a system outside the database, but only
-        * after the database is updated so that the jobs will see the data when they actually run.
-        * It can also be used for updates that easily cause deadlocks if locks are held too long.
-        *
-        * @param callable $callback
-        * @since 1.20
-        */
        final public function onTransactionIdle( $callback ) {
                $this->mTrxIdleCallbacks[] = array( $callback, wfGetCaller() );
                if ( !$this->mTrxLevel ) {
@@ -3294,17 +2423,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Run an anonymous function before the current transaction commits or now if there is none.
-        * If there is a transaction and it is rolled back, then the callback is cancelled.
-        * Callbacks must not start nor commit any transactions.
-        *
-        * This is useful for updates that easily cause deadlocks if locks are held too long
-        * but where atomicity is strongly desired for these updates and some related updates.
-        *
-        * @param callable $callback
-        * @since 1.22
-        */
        final public function onTransactionPreCommitOrIdle( $callback ) {
                if ( $this->mTrxLevel ) {
                        $this->mTrxPreCommitCallbacks[] = array( $callback, wfGetCaller() );
@@ -3382,30 +2500,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Begin an atomic section of statements
-        *
-        * If a transaction has been started already, just keep track of the given
-        * section name to make sure the transaction is not committed pre-maturely.
-        * This function can be used in layers (with sub-sections), so use a stack
-        * to keep track of the different atomic sections. If there is no transaction,
-        * start one implicitly.
-        *
-        * The goal of this function is to create an atomic section of SQL queries
-        * without having to start a new transaction if it already exists.
-        *
-        * Atomic sections are more strict than transactions. With transactions,
-        * attempting to begin a new transaction when one is already running results
-        * in MediaWiki issuing a brief warning and doing an implicit commit. All
-        * atomic levels *must* be explicitly closed using DatabaseBase::endAtomic(),
-        * and any database transactions cannot be began or committed until all atomic
-        * levels are closed. There is no such thing as implicitly opening or closing
-        * an atomic section.
-        *
-        * @since 1.23
-        * @param string $fname
-        * @throws DBError
-        */
        final public function startAtomic( $fname = __METHOD__ ) {
                if ( !$this->mTrxLevel ) {
                        $this->begin( $fname );
@@ -3420,17 +2514,6 @@ abstract class DatabaseBase implements IDatabase {
                $this->mTrxAtomicLevels[] = $fname;
        }
 
-       /**
-        * Ends an atomic section of SQL statements
-        *
-        * Ends the next section of atomic SQL statements and commits the transaction
-        * if necessary.
-        *
-        * @since 1.23
-        * @see DatabaseBase::startAtomic
-        * @param string $fname
-        * @throws DBError
-        */
        final public function endAtomic( $fname = __METHOD__ ) {
                if ( !$this->mTrxLevel ) {
                        throw new DBUnexpectedError( $this, 'No atomic transaction is open.' );
@@ -3446,21 +2529,21 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Begin a transaction. If a transaction is already in progress,
-        * that transaction will be committed before the new transaction is started.
-        *
-        * Note that when the DBO_TRX flag is set (which is usually the case for web
-        * requests, but not for maintenance scripts), any previous database query
-        * will have started a transaction automatically.
-        *
-        * Nesting of transactions is not supported. Attempts to nest transactions
-        * will cause a warning, unless the current transaction was started
-        * automatically because of the DBO_TRX flag.
-        *
-        * @param string $fname
-        * @throws DBError
-        */
+       final public function doAtomicSection( $fname, $callback ) {
+               if ( !is_callable( $callback ) ) {
+                       throw new UnexpectedValueException( "Invalid callback." );
+               };
+
+               $this->startAtomic( $fname );
+               try {
+                       call_user_func_array( $callback, array( $this, $fname ) );
+               } catch ( Exception $e ) {
+                       $this->rollback( $fname );
+                       throw $e;
+               }
+               $this->endAtomic( $fname );
+       }
+
        final public function begin( $fname = __METHOD__ ) {
                if ( $this->mTrxLevel ) { // implicit commit
                        if ( $this->mTrxAtomicLevels ) {
@@ -3535,20 +2618,6 @@ abstract class DatabaseBase implements IDatabase {
                $this->mTrxLevel = 1;
        }
 
-       /**
-        * Commits a transaction previously started using begin().
-        * If no transaction is in progress, a warning is issued.
-        *
-        * Nesting of transactions is not supported.
-        *
-        * @param string $fname
-        * @param string $flush Flush flag, set to 'flush' to disable warnings about
-        *   explicitly committing implicit transactions, or calling commit when no
-        *   transaction is in progress. This will silently break any ongoing
-        *   explicit transaction. Only set the flush flag if you are sure that it
-        *   is safe to ignore these warnings in your context.
-        * @throws DBUnexpectedError
-        */
        final public function commit( $fname = __METHOD__, $flush = '' ) {
                if ( $this->mTrxLevel && $this->mTrxAtomicLevels ) {
                        // There are still atomic sections open. This cannot be ignored
@@ -3601,20 +2670,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Rollback a transaction previously started using begin().
-        * If no transaction is in progress, a warning is issued.
-        *
-        * No-op on non-transactional databases.
-        *
-        * @param string $fname
-        * @param string $flush Flush flag, set to 'flush' to disable warnings about
-        *   calling rollback when no transaction is in progress. This will silently
-        *   break any ongoing explicit transaction. Only set the flush flag if you
-        *   are sure that it is safe to ignore these warnings in your context.
-        * @throws DBUnexpectedError
-        * @since 1.23 Added $flush parameter
-        */
        final public function rollback( $fname = __METHOD__, $flush = '' ) {
                if ( $flush !== 'flush' ) {
                        if ( !$this->mTrxLevel ) {
@@ -3679,14 +2734,6 @@ abstract class DatabaseBase implements IDatabase {
                        'DatabaseBase::duplicateTableStructure is not implemented in descendant class' );
        }
 
-       /**
-        * List all tables on the database
-        *
-        * @param string $prefix Only show tables with this prefix, e.g. mw_
-        * @param string $fname Calling function name
-        * @throws MWException
-        * @return array
-        */
        function listTables( $prefix = null, $fname = __METHOD__ ) {
                throw new MWException( 'DatabaseBase::listTables is not implemented in descendant class' );
        }
@@ -3727,34 +2774,10 @@ abstract class DatabaseBase implements IDatabase {
                throw new MWException( 'DatabaseBase::isView is not implemented in descendant class' );
        }
 
-       /**
-        * Convert a timestamp in one of the formats accepted by wfTimestamp()
-        * to the format used for inserting into timestamp fields in this DBMS.
-        *
-        * The result is unquoted, and needs to be passed through addQuotes()
-        * before it can be included in raw SQL.
-        *
-        * @param string|int $ts
-        *
-        * @return string
-        */
        public function timestamp( $ts = 0 ) {
                return wfTimestamp( TS_MW, $ts );
        }
 
-       /**
-        * Convert a timestamp in one of the formats accepted by wfTimestamp()
-        * to the format used for inserting into timestamp fields in this DBMS. If
-        * NULL is input, it is passed through, allowing NULL values to be inserted
-        * into timestamp fields.
-        *
-        * The result is unquoted, and needs to be passed through addQuotes()
-        * before it can be included in raw SQL.
-        *
-        * @param string|int $ts
-        *
-        * @return string
-        */
        public function timestampOrNull( $ts = null ) {
                if ( is_null( $ts ) ) {
                        return null;
@@ -3789,11 +2812,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Ping the server and try to reconnect if it there is no connection
-        *
-        * @return bool Success or failure
-        */
        public function ping() {
                # Stub. Not essential to override.
                return true;
@@ -3872,36 +2890,14 @@ abstract class DatabaseBase implements IDatabase {
                return 0;
        }
 
-       /**
-        * Return the maximum number of items allowed in a list, or 0 for unlimited.
-        *
-        * @return int
-        */
        function maxListLen() {
                return 0;
        }
 
-       /**
-        * Some DBMSs have a special format for inserting into blob fields, they
-        * don't allow simple quoted strings to be inserted. To insert into such
-        * a field, pass the data through this function before passing it to
-        * DatabaseBase::insert().
-        *
-        * @param string $b
-        * @return string
-        */
        public function encodeBlob( $b ) {
                return $b;
        }
 
-       /**
-        * Some DBMSs return a special placeholder object representing blob fields
-        * in result objects. Pass the object through this function to return the
-        * original string.
-        *
-        * @param string|Blob $b
-        * @return string
-        */
        public function decodeBlob( $b ) {
                if ( $b instanceof Blob ) {
                        $b = $b->fetch();
@@ -3909,16 +2905,6 @@ abstract class DatabaseBase implements IDatabase {
                return $b;
        }
 
-       /**
-        * Override database's default behavior. $options include:
-        *     'connTimeout' : Set the connection timeout value in seconds.
-        *                     May be useful for very long batch queries such as
-        *                     full-wiki dumps, where a single query reads out over
-        *                     hours or days.
-        *
-        * @param array $options
-        * @return void
-        */
        public function setSessionOptions( array $options ) {
        }
 
@@ -3984,13 +2970,6 @@ abstract class DatabaseBase implements IDatabase {
                }
        }
 
-       /**
-        * Set variables to be used in sourceFile/sourceStream, in preference to the
-        * ones in $GLOBALS. If an array is set here, $GLOBALS will not be used at
-        * all. If it's set to false, $GLOBALS will be used.
-        *
-        * @param bool|array $vars Mapping variable name to value.
-        */
        public function setSchemaVars( $vars ) {
                $this->mSchemaVars = $vars;
        }
@@ -4157,54 +3136,18 @@ abstract class DatabaseBase implements IDatabase {
                return array();
        }
 
-       /**
-        * Check to see if a named lock is available (non-blocking)
-        *
-        * @param string $lockName Name of lock to poll
-        * @param string $method Name of method calling us
-        * @return bool
-        * @since 1.20
-        */
        public function lockIsFree( $lockName, $method ) {
                return true;
        }
 
-       /**
-        * Acquire a named lock
-        *
-        * Named locks are not related to transactions
-        *
-        * @param string $lockName Name of lock to aquire
-        * @param string $method Name of method calling us
-        * @param int $timeout
-        * @return bool
-        */
        public function lock( $lockName, $method, $timeout = 5 ) {
                return true;
        }
 
-       /**
-        * Release a lock
-        *
-        * Named locks are not related to transactions
-        *
-        * @param string $lockName Name of lock to release
-        * @param string $method Name of method calling us
-        *
-        * @return int Returns 1 if the lock was released, 0 if the lock was not established
-        * by this thread (in which case the lock is not released), and NULL if the named
-        * lock did not exist
-        */
        public function unlock( $lockName, $method ) {
                return true;
        }
 
-       /**
-        * Check to see if a named lock used by lock() use blocking queues
-        *
-        * @return bool
-        * @since 1.26
-        */
        public function namedLocksEnqueue() {
                return false;
        }
@@ -4261,51 +3204,22 @@ abstract class DatabaseBase implements IDatabase {
                return 'SearchEngineDummy';
        }
 
-       /**
-        * Find out when 'infinity' is. Most DBMSes support this. This is a special
-        * keyword for timestamps in PostgreSQL, and works with CHAR(14) as well
-        * because "i" sorts after all numbers.
-        *
-        * @return string
-        */
        public function getInfinity() {
                return 'infinity';
        }
 
-       /**
-        * Encode an expiry time into the DBMS dependent format
-        *
-        * @param string $expiry Timestamp for expiry, or the 'infinity' string
-        * @return string
-        */
        public function encodeExpiry( $expiry ) {
                return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
                        ? $this->getInfinity()
                        : $this->timestamp( $expiry );
        }
 
-       /**
-        * Decode an expiry time into a DBMS independent format
-        *
-        * @param string $expiry DB timestamp field value for expiry
-        * @param int $format TS_* constant, defaults to TS_MW
-        * @return string
-        */
        public function decodeExpiry( $expiry, $format = TS_MW ) {
                return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
                        ? 'infinity'
                        : wfTimestamp( $format, $expiry );
        }
 
-       /**
-        * Allow or deny "big selects" for this session only. This is done by setting
-        * the sql_big_selects session variable.
-        *
-        * This is a MySQL-specific feature.
-        *
-        * @param bool|string $value True for allow, false for deny, or "default" to
-        *   restore the initial value
-        */
        public function setBigSelects( $value = true ) {
                // no-op
        }
index 4674c17..31b2758 100644 (file)
@@ -1268,6 +1268,34 @@ interface IDatabase {
         */
        public function endAtomic( $fname = __METHOD__ );
 
+       /**
+        * Run a callback to do an atomic set of updates for this database
+        *
+        * The $callback takes the following arguments:
+        *   - This database object
+        *   - The value of $fname
+        *
+        * If any exception occurs in the callback, then rollback() will be called and the error will
+        * be re-thrown. It may also be that the rollback itself fails with an exception before then.
+        * In any case, such errors are expected to terminate the request, without any outside caller
+        * attempting to catch errors and commit anyway. Note that any rollback undoes all prior
+        * atomic section and uncommitted updates, which trashes the current request, requiring an
+        * error to be displayed.
+        *
+        * This can be an alternative to explicit startAtomic()/endAtomic() calls.
+        *
+        * @see DatabaseBase::startAtomic
+        * @see DatabaseBase::endAtomic
+        *
+        * @param string $fname Caller name (usually __METHOD__)
+        * @param callable $callback Callback that issues DB updates
+        * @throws DBError
+        * @throws RuntimeException
+        * @throws UnexpectedValueException
+        * @since 1.27
+        */
+       public function doAtomicSection( $fname, $callback );
+
        /**
         * Begin a transaction. If a transaction is already in progress,
         * that transaction will be committed before the new transaction is started.
index 841636c..8f943bf 100644 (file)
@@ -300,7 +300,7 @@ class MWDebug {
                        trigger_error( $msg, $level );
                }
 
-               wfDebugLog( $group, $msg, 'log' );
+               wfDebugLog( $group, $msg, 'private' );
        }
 
        /**
index ef7d819..34ea641 100644 (file)
@@ -90,8 +90,10 @@ class LegacyLogger extends AbstractLogger {
                        $destination = self::destination( $this->channel, $message, $context );
                        self::emit( $text, $destination );
                }
-               // Add to debug toolbar
-               MWDebug::debugMsg( $message, array( 'channel' => $this->channel ) + $context );
+               if ( !isset( $context['private'] ) || !$context['private'] ) {
+                       // Add to debug toolbar if not marked as "private"
+                       MWDebug::debugMsg( $message, array( 'channel' => $this->channel ) + $context );
+               }
        }
 
        /**
@@ -116,6 +118,13 @@ class LegacyLogger extends AbstractLogger {
                        // All messages on the wfErrorLog channel should be emitted.
                        $shouldEmit = true;
 
+               } elseif ( $channel === 'wfDebug' ) {
+                       // wfDebug messages are emitted if a catch all logging file has
+                       // been specified. Checked explicitly so that 'private' flagged
+                       // messages are not discarded by unset $wgDebugLogGroups channel
+                       // handling below.
+                       $shouldEmit = $wgDebugLogFile != '';
+
                } elseif ( isset( $wgDebugLogGroups[$channel] ) ) {
                        $logConfig = $wgDebugLogGroups[$channel];
 
diff --git a/includes/export/Dump7ZipOutput.php b/includes/export/Dump7ZipOutput.php
new file mode 100644 (file)
index 0000000..31c945c
--- /dev/null
@@ -0,0 +1,76 @@
+<?php
+/**
+ * Sends dump output via the p7zip compressor.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class Dump7ZipOutput extends DumpPipeOutput {
+       /**
+        * @var int
+        */
+       protected $compressionLevel;
+
+       /**
+        * @param string $file
+        * @param int $cmpLevel Compression level passed to 7za command's -mx
+        */
+       function __construct( $file, $cmpLevel = 4 ) {
+               $this->compressionLevel = $cmpLevel;
+               $command = $this->setup7zCommand( $file );
+               parent::__construct( $command );
+               $this->filename = $file;
+       }
+
+       /**
+        * @param string $file
+        * @return string
+        */
+       function setup7zCommand( $file ) {
+               $command = "7za a -bd -si -mx=";
+               $command .= wfEscapeShellArg( $this->compressionLevel ) . ' ';
+               $command .= wfEscapeShellArg( $file );
+               // Suppress annoying useless crap from p7zip
+               // Unfortunately this could suppress real error messages too
+               $command .= ' >' . wfGetNull() . ' 2>&1';
+               return $command;
+       }
+
+       /**
+        * @param string $newname
+        * @param bool $open
+        */
+       function closeAndRename( $newname, $open = false ) {
+               $newname = $this->checkRenameArgCount( $newname );
+               if ( $newname ) {
+                       fclose( $this->handle );
+                       proc_close( $this->procOpenResource );
+                       $this->renameOrException( $newname );
+                       if ( $open ) {
+                               $command = $this->setup7zCommand( $this->filename );
+                               $this->startCommand( $command );
+                       }
+               }
+       }
+}
diff --git a/includes/export/DumpBZip2Output.php b/includes/export/DumpBZip2Output.php
new file mode 100644 (file)
index 0000000..bbc1c11
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Sends dump output via the bgzip2 compressor.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpBZip2Output extends DumpPipeOutput {
+       /**
+        * @param string $file
+        */
+       function __construct( $file ) {
+               parent::__construct( "bzip2", $file );
+       }
+}
diff --git a/includes/export/DumpDBZip2Output.php b/includes/export/DumpDBZip2Output.php
new file mode 100644 (file)
index 0000000..5edde8f
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Sends dump output via the bgzip2 compressor.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpDBZip2Output extends DumpPipeOutput {
+       /**
+        * @param string $file
+        */
+       function __construct( $file ) {
+               parent::__construct( "dbzip2", $file );
+       }
+}
diff --git a/includes/export/DumpFileOutput.php b/includes/export/DumpFileOutput.php
new file mode 100644 (file)
index 0000000..4bec7d4
--- /dev/null
@@ -0,0 +1,115 @@
+<?php
+/**
+ * Stream outputter to send data to a file.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpFileOutput extends DumpOutput {
+       protected $handle = false, $filename;
+
+       /**
+        * @param string $file
+        */
+       function __construct( $file ) {
+               $this->handle = fopen( $file, "wt" );
+               $this->filename = $file;
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeCloseStream( $string ) {
+               parent::writeCloseStream( $string );
+               if ( $this->handle ) {
+                       fclose( $this->handle );
+                       $this->handle = false;
+               }
+       }
+
+       /**
+        * @param string $string
+        */
+       function write( $string ) {
+               fputs( $this->handle, $string );
+       }
+
+       /**
+        * @param string $newname
+        */
+       function closeRenameAndReopen( $newname ) {
+               $this->closeAndRename( $newname, true );
+       }
+
+       /**
+        * @param string $newname
+        * @throws MWException
+        */
+       function renameOrException( $newname ) {
+                       if ( !rename( $this->filename, $newname ) ) {
+                               throw new MWException( __METHOD__ . ": rename of file {$this->filename} to $newname failed\n" );
+                       }
+       }
+
+       /**
+        * @param array $newname
+        * @return string
+        * @throws MWException
+        */
+       function checkRenameArgCount( $newname ) {
+               if ( is_array( $newname ) ) {
+                       if ( count( $newname ) > 1 ) {
+                               throw new MWException( __METHOD__ . ": passed multiple arguments for rename of single file\n" );
+                       } else {
+                               $newname = $newname[0];
+                       }
+               }
+               return $newname;
+       }
+
+       /**
+        * @param string $newname
+        * @param bool $open
+        */
+       function closeAndRename( $newname, $open = false ) {
+               $newname = $this->checkRenameArgCount( $newname );
+               if ( $newname ) {
+                       if ( $this->handle ) {
+                               fclose( $this->handle );
+                               $this->handle = false;
+                       }
+                       $this->renameOrException( $newname );
+                       if ( $open ) {
+                               $this->handle = fopen( $this->filename, "wt" );
+                       }
+               }
+       }
+
+       /**
+        * @return string|null
+        */
+       function getFilenames() {
+               return $this->filename;
+       }
+}
diff --git a/includes/export/DumpFilter.php b/includes/export/DumpFilter.php
new file mode 100644 (file)
index 0000000..5c27658
--- /dev/null
@@ -0,0 +1,134 @@
+<?php
+/**
+ * Dump output filter class.
+ * This just does output filtering and streaming; XML formatting is done
+ * higher up, so be careful in what you do.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpFilter {
+       /**
+        * @var DumpOutput
+        * FIXME will need to be made protected whenever legacy code
+        * is updated.
+        */
+       public $sink;
+
+       /**
+        * @var bool
+        */
+       protected $sendingThisPage;
+
+       /**
+        * @param DumpOutput $sink
+        */
+       function __construct( &$sink ) {
+               $this->sink =& $sink;
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeOpenStream( $string ) {
+               $this->sink->writeOpenStream( $string );
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeCloseStream( $string ) {
+               $this->sink->writeCloseStream( $string );
+       }
+
+       /**
+        * @param object $page
+        * @param string $string
+        */
+       function writeOpenPage( $page, $string ) {
+               $this->sendingThisPage = $this->pass( $page, $string );
+               if ( $this->sendingThisPage ) {
+                       $this->sink->writeOpenPage( $page, $string );
+               }
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeClosePage( $string ) {
+               if ( $this->sendingThisPage ) {
+                       $this->sink->writeClosePage( $string );
+                       $this->sendingThisPage = false;
+               }
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeRevision( $rev, $string ) {
+               if ( $this->sendingThisPage ) {
+                       $this->sink->writeRevision( $rev, $string );
+               }
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeLogItem( $rev, $string ) {
+               $this->sink->writeRevision( $rev, $string );
+       }
+
+       /**
+        * @param string $newname
+        */
+       function closeRenameAndReopen( $newname ) {
+               $this->sink->closeRenameAndReopen( $newname );
+       }
+
+       /**
+        * @param string $newname
+        * @param bool $open
+        */
+       function closeAndRename( $newname, $open = false ) {
+               $this->sink->closeAndRename( $newname, $open );
+       }
+
+       /**
+        * @return array
+        */
+       function getFilenames() {
+               return $this->sink->getFilenames();
+       }
+
+       /**
+        * Override for page-based filter types.
+        * @param object $page
+        * @return bool
+        */
+       function pass( $page ) {
+               return true;
+       }
+}
diff --git a/includes/export/DumpGZipOutput.php b/includes/export/DumpGZipOutput.php
new file mode 100644 (file)
index 0000000..d9e74a7
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * Sends dump output via the gzip compressor.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpGZipOutput extends DumpPipeOutput {
+       /**
+        * @param string $file
+        */
+       function __construct( $file ) {
+               parent::__construct( "gzip", $file );
+       }
+}
diff --git a/includes/export/DumpLatestFilter.php b/includes/export/DumpLatestFilter.php
new file mode 100644 (file)
index 0000000..d3742b7
--- /dev/null
@@ -0,0 +1,72 @@
+<?php
+/**
+ * Dump output filter to include only the last revision in each page sequence.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpLatestFilter extends DumpFilter {
+       public $page;
+
+       public $pageString;
+
+       public $rev;
+
+       public $revString;
+
+       /**
+        * @param object $page
+        * @param string $string
+        */
+       function writeOpenPage( $page, $string ) {
+               $this->page = $page;
+               $this->pageString = $string;
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeClosePage( $string ) {
+               if ( $this->rev ) {
+                       $this->sink->writeOpenPage( $this->page, $this->pageString );
+                       $this->sink->writeRevision( $this->rev, $this->revString );
+                       $this->sink->writeClosePage( $string );
+               }
+               $this->rev = null;
+               $this->revString = null;
+               $this->page = null;
+               $this->pageString = null;
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeRevision( $rev, $string ) {
+               if ( $rev->rev_id == $this->page->page_latest ) {
+                       $this->rev = $rev;
+                       $this->revString = $string;
+               }
+       }
+}
diff --git a/includes/export/DumpMultiWriter.php b/includes/export/DumpMultiWriter.php
new file mode 100644 (file)
index 0000000..6fe11a3
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+/**
+ * Base class for output stream; prints to stdout or buffer or wherever.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpMultiWriter {
+
+       /**
+        * @param array $sinks
+        */
+       function __construct( $sinks ) {
+               $this->sinks = $sinks;
+               $this->count = count( $sinks );
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeOpenStream( $string ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->writeOpenStream( $string );
+               }
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeCloseStream( $string ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->writeCloseStream( $string );
+               }
+       }
+
+       /**
+        * @param object $page
+        * @param string $string
+        */
+       function writeOpenPage( $page, $string ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->writeOpenPage( $page, $string );
+               }
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeClosePage( $string ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->writeClosePage( $string );
+               }
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeRevision( $rev, $string ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->writeRevision( $rev, $string );
+               }
+       }
+
+       /**
+        * @param array $newnames
+        */
+       function closeRenameAndReopen( $newnames ) {
+               $this->closeAndRename( $newnames, true );
+       }
+
+       /**
+        * @param array $newnames
+        * @param bool $open
+        */
+       function closeAndRename( $newnames, $open = false ) {
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $this->sinks[$i]->closeAndRename( $newnames[$i], $open );
+               }
+       }
+
+       /**
+        * @return array
+        */
+       function getFilenames() {
+               $filenames = array();
+               for ( $i = 0; $i < $this->count; $i++ ) {
+                       $filenames[] = $this->sinks[$i]->getFilenames();
+               }
+               return $filenames;
+       }
+}
diff --git a/includes/export/DumpNamespaceFilter.php b/includes/export/DumpNamespaceFilter.php
new file mode 100644 (file)
index 0000000..e8d4428
--- /dev/null
@@ -0,0 +1,91 @@
+<?php
+/**
+ * Dump output filter to include or exclude pages in a given set of namespaces.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpNamespaceFilter extends DumpFilter {
+       /** @var bool */
+       public $invert = false;
+
+       /** @var array */
+       public $namespaces = array();
+
+       /**
+        * @param DumpOutput $sink
+        * @param array $param
+        * @throws MWException
+        */
+       function __construct( &$sink, $param ) {
+               parent::__construct( $sink );
+
+               $constants = array(
+                       "NS_MAIN"           => NS_MAIN,
+                       "NS_TALK"           => NS_TALK,
+                       "NS_USER"           => NS_USER,
+                       "NS_USER_TALK"      => NS_USER_TALK,
+                       "NS_PROJECT"        => NS_PROJECT,
+                       "NS_PROJECT_TALK"   => NS_PROJECT_TALK,
+                       "NS_FILE"           => NS_FILE,
+                       "NS_FILE_TALK"      => NS_FILE_TALK,
+                       "NS_IMAGE"          => NS_IMAGE, // NS_IMAGE is an alias for NS_FILE
+                       "NS_IMAGE_TALK"     => NS_IMAGE_TALK,
+                       "NS_MEDIAWIKI"      => NS_MEDIAWIKI,
+                       "NS_MEDIAWIKI_TALK" => NS_MEDIAWIKI_TALK,
+                       "NS_TEMPLATE"       => NS_TEMPLATE,
+                       "NS_TEMPLATE_TALK"  => NS_TEMPLATE_TALK,
+                       "NS_HELP"           => NS_HELP,
+                       "NS_HELP_TALK"      => NS_HELP_TALK,
+                       "NS_CATEGORY"       => NS_CATEGORY,
+                       "NS_CATEGORY_TALK"  => NS_CATEGORY_TALK );
+
+               if ( $param { 0 } == '!' ) {
+                       $this->invert = true;
+                       $param = substr( $param, 1 );
+               }
+
+               foreach ( explode( ',', $param ) as $key ) {
+                       $key = trim( $key );
+                       if ( isset( $constants[$key] ) ) {
+                               $ns = $constants[$key];
+                               $this->namespaces[$ns] = true;
+                       } elseif ( is_numeric( $key ) ) {
+                               $ns = intval( $key );
+                               $this->namespaces[$ns] = true;
+                       } else {
+                               throw new MWException( "Unrecognized namespace key '$key'\n" );
+                       }
+               }
+       }
+
+       /**
+        * @param object $page
+        * @return bool
+        */
+       function pass( $page ) {
+               $match = isset( $this->namespaces[$page->page_namespace] );
+               return $this->invert xor $match;
+       }
+}
diff --git a/includes/export/DumpNotalkFilter.php b/includes/export/DumpNotalkFilter.php
new file mode 100644 (file)
index 0000000..d99b1b1
--- /dev/null
@@ -0,0 +1,37 @@
+<?php
+/**
+ * Simple dump output filter to exclude all talk pages.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpNotalkFilter extends DumpFilter {
+       /**
+        * @param object $page
+        * @return bool
+        */
+       function pass( $page ) {
+               return !MWNamespace::isTalk( $page->page_namespace );
+       }
+}
diff --git a/includes/export/DumpOutput.php b/includes/export/DumpOutput.php
new file mode 100644 (file)
index 0000000..edd73fc
--- /dev/null
@@ -0,0 +1,114 @@
+<?php
+/**
+ * Base class for output stream; prints to stdout or buffer or wherever.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpOutput {
+
+       /**
+        * @param string $string
+        */
+       function writeOpenStream( $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeCloseStream( $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * @param object $page
+        * @param string $string
+        */
+       function writeOpenPage( $page, $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeClosePage( $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeRevision( $rev, $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * @param object $rev
+        * @param string $string
+        */
+       function writeLogItem( $rev, $string ) {
+               $this->write( $string );
+       }
+
+       /**
+        * Override to write to a different stream type.
+        * @param string $string
+        * @return bool
+        */
+       function write( $string ) {
+               print $string;
+       }
+
+       /**
+        * Close the old file, move it to a specified name,
+        * and reopen new file with the old name. Use this
+        * for writing out a file in multiple pieces
+        * at specified checkpoints (e.g. every n hours).
+        * @param string|array $newname File name. May be a string or an array with one element
+        */
+       function closeRenameAndReopen( $newname ) {
+       }
+
+       /**
+        * Close the old file, and move it to a specified name.
+        * Use this for the last piece of a file written out
+        * at specified checkpoints (e.g. every n hours).
+        * @param string|array $newname File name. May be a string or an array with one element
+        * @param bool $open If true, a new file with the old filename will be opened
+        *   again for writing (default: false)
+        */
+       function closeAndRename( $newname, $open = false ) {
+       }
+
+       /**
+        * Returns the name of the file or files which are
+        * being written to, if there are any.
+        * @return null
+        */
+       function getFilenames() {
+               return null;
+       }
+}
diff --git a/includes/export/DumpPipeOutput.php b/includes/export/DumpPipeOutput.php
new file mode 100644 (file)
index 0000000..61177ab
--- /dev/null
@@ -0,0 +1,102 @@
+<?php
+/**
+ * Stream outputter to send data to a file via some filter program.
+ * Even if compression is available in a library, using a separate
+ * program can allow us to make use of a multi-processor system.
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class DumpPipeOutput extends DumpFileOutput {
+       protected $command, $filename;
+       protected $procOpenResource = false;
+
+       /**
+        * @param string $command
+        * @param string $file
+        */
+       function __construct( $command, $file = null ) {
+               if ( !is_null( $file ) ) {
+                       $command .= " > " . wfEscapeShellArg( $file );
+               }
+
+               $this->startCommand( $command );
+               $this->command = $command;
+               $this->filename = $file;
+       }
+
+       /**
+        * @param string $string
+        */
+       function writeCloseStream( $string ) {
+               parent::writeCloseStream( $string );
+               if ( $this->procOpenResource ) {
+                       proc_close( $this->procOpenResource );
+                       $this->procOpenResource = false;
+               }
+       }
+
+       /**
+        * @param string $command
+        */
+       function startCommand( $command ) {
+               $spec = array(
+                       0 => array( "pipe", "r" ),
+               );
+               $pipes = array();
+               $this->procOpenResource = proc_open( $command, $spec, $pipes );
+               $this->handle = $pipes[0];
+       }
+
+       /**
+        * @param string $newname
+        */
+       function closeRenameAndReopen( $newname ) {
+               $this->closeAndRename( $newname, true );
+       }
+
+       /**
+        * @param string $newname
+        * @param bool $open
+        */
+       function closeAndRename( $newname, $open = false ) {
+               $newname = $this->checkRenameArgCount( $newname );
+               if ( $newname ) {
+                       if ( $this->handle ) {
+                               fclose( $this->handle );
+                               $this->handle = false;
+                       }
+                       if ( $this->procOpenResource ) {
+                               proc_close( $this->procOpenResource );
+                               $this->procOpenResource = false;
+                       }
+                       $this->renameOrException( $newname );
+                       if ( $open ) {
+                               $command = $this->command;
+                               $command .= " > " . wfEscapeShellArg( $this->filename );
+                               $this->startCommand( $command );
+                       }
+               }
+       }
+}
diff --git a/includes/export/WikiExporter.php b/includes/export/WikiExporter.php
new file mode 100644 (file)
index 0000000..ab2632d
--- /dev/null
@@ -0,0 +1,469 @@
+<?php
+/**
+ * Base class for exporting
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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
+ */
+
+/**
+ * @defgroup Dump Dump
+ */
+
+/**
+ * @ingroup SpecialPage Dump
+ */
+class WikiExporter {
+       /** @var bool Return distinct author list (when not returning full history) */
+       public $list_authors = false;
+
+       /** @var bool */
+       public $dumpUploads = false;
+
+       /** @var bool */
+       public $dumpUploadFileContents = false;
+
+       /** @var string */
+       public $author_list = "";
+
+       const FULL = 1;
+       const CURRENT = 2;
+       const STABLE = 4; // extension defined
+       const LOGS = 8;
+       const RANGE = 16;
+
+       const BUFFER = 0;
+       const STREAM = 1;
+
+       const TEXT = 0;
+       const STUB = 1;
+
+       /** @var int */
+       public $buffer;
+
+       /** @var int */
+       public $text;
+
+       /** @var DumpOutput */
+       public $sink;
+
+       /**
+        * Returns the export schema version.
+        * @return string
+        */
+       public static function schemaVersion() {
+               return "0.10";
+       }
+
+       /**
+        * If using WikiExporter::STREAM to stream a large amount of data,
+        * provide a database connection which is not managed by
+        * LoadBalancer to read from: some history blob types will
+        * make additional queries to pull source data while the
+        * main query is still running.
+        *
+        * @param IDatabase $db
+        * @param int|array $history One of WikiExporter::FULL, WikiExporter::CURRENT,
+        *   WikiExporter::RANGE or WikiExporter::STABLE, or an associative array:
+        *   - offset: non-inclusive offset at which to start the query
+        *   - limit: maximum number of rows to return
+        *   - dir: "asc" or "desc" timestamp order
+        * @param int $buffer One of WikiExporter::BUFFER or WikiExporter::STREAM
+        * @param int $text One of WikiExporter::TEXT or WikiExporter::STUB
+        */
+       function __construct( $db, $history = WikiExporter::CURRENT,
+                       $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
+               $this->db = $db;
+               $this->history = $history;
+               $this->buffer = $buffer;
+               $this->writer = new XmlDumpWriter();
+               $this->sink = new DumpOutput();
+               $this->text = $text;
+       }
+
+       /**
+        * Set the DumpOutput or DumpFilter object which will receive
+        * various row objects and XML output for filtering. Filters
+        * can be chained or used as callbacks.
+        *
+        * @param DumpOutput $sink
+        */
+       public function setOutputSink( &$sink ) {
+               $this->sink =& $sink;
+       }
+
+       public function openStream() {
+               $output = $this->writer->openStream();
+               $this->sink->writeOpenStream( $output );
+       }
+
+       public function closeStream() {
+               $output = $this->writer->closeStream();
+               $this->sink->writeCloseStream( $output );
+       }
+
+       /**
+        * Dumps a series of page and revision records for all pages
+        * in the database, either including complete history or only
+        * the most recent version.
+        */
+       public function allPages() {
+               $this->dumpFrom( '' );
+       }
+
+       /**
+        * Dumps a series of page and revision records for those pages
+        * in the database falling within the page_id range given.
+        * @param int $start Inclusive lower limit (this id is included)
+        * @param int $end Exclusive upper limit (this id is not included)
+        *   If 0, no upper limit.
+        */
+       public function pagesByRange( $start, $end ) {
+               $condition = 'page_id >= ' . intval( $start );
+               if ( $end ) {
+                       $condition .= ' AND page_id < ' . intval( $end );
+               }
+               $this->dumpFrom( $condition );
+       }
+
+       /**
+        * Dumps a series of page and revision records for those pages
+        * in the database with revisions falling within the rev_id range given.
+        * @param int $start Inclusive lower limit (this id is included)
+        * @param int $end Exclusive upper limit (this id is not included)
+        *   If 0, no upper limit.
+        */
+       public function revsByRange( $start, $end ) {
+               $condition = 'rev_id >= ' . intval( $start );
+               if ( $end ) {
+                       $condition .= ' AND rev_id < ' . intval( $end );
+               }
+               $this->dumpFrom( $condition );
+       }
+
+       /**
+        * @param Title $title
+        */
+       public function pageByTitle( $title ) {
+               $this->dumpFrom(
+                       'page_namespace=' . $title->getNamespace() .
+                       ' AND page_title=' . $this->db->addQuotes( $title->getDBkey() ) );
+       }
+
+       /**
+        * @param string $name
+        * @throws MWException
+        */
+       public function pageByName( $name ) {
+               $title = Title::newFromText( $name );
+               if ( is_null( $title ) ) {
+                       throw new MWException( "Can't export invalid title" );
+               } else {
+                       $this->pageByTitle( $title );
+               }
+       }
+
+       /**
+        * @param array $names
+        */
+       public function pagesByName( $names ) {
+               foreach ( $names as $name ) {
+                       $this->pageByName( $name );
+               }
+       }
+
+       public function allLogs() {
+               $this->dumpFrom( '' );
+       }
+
+       /**
+        * @param int $start
+        * @param int $end
+        */
+       public function logsByRange( $start, $end ) {
+               $condition = 'log_id >= ' . intval( $start );
+               if ( $end ) {
+                       $condition .= ' AND log_id < ' . intval( $end );
+               }
+               $this->dumpFrom( $condition );
+       }
+
+       /**
+        * Generates the distinct list of authors of an article
+        * Not called by default (depends on $this->list_authors)
+        * Can be set by Special:Export when not exporting whole history
+        *
+        * @param array $cond
+        */
+       protected function do_list_authors( $cond ) {
+               $this->author_list = "<contributors>";
+               // rev_deleted
+
+               $res = $this->db->select(
+                       array( 'page', 'revision' ),
+                       array( 'DISTINCT rev_user_text', 'rev_user' ),
+                       array(
+                               $this->db->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0',
+                               $cond,
+                               'page_id = rev_id',
+                       ),
+                       __METHOD__
+               );
+
+               foreach ( $res as $row ) {
+                       $this->author_list .= "<contributor>" .
+                               "<username>" .
+                               htmlentities( $row->rev_user_text ) .
+                               "</username>" .
+                               "<id>" .
+                               $row->rev_user .
+                               "</id>" .
+                               "</contributor>";
+               }
+               $this->author_list .= "</contributors>";
+       }
+
+       /**
+        * @param string $cond
+        * @throws MWException
+        * @throws Exception
+        */
+       protected function dumpFrom( $cond = '' ) {
+               # For logging dumps...
+               if ( $this->history & self::LOGS ) {
+                       $where = array( 'user_id = log_user' );
+                       # Hide private logs
+                       $hideLogs = LogEventsList::getExcludeClause( $this->db );
+                       if ( $hideLogs ) {
+                               $where[] = $hideLogs;
+                       }
+                       # Add on any caller specified conditions
+                       if ( $cond ) {
+                               $where[] = $cond;
+                       }
+                       # Get logging table name for logging.* clause
+                       $logging = $this->db->tableName( 'logging' );
+
+                       if ( $this->buffer == WikiExporter::STREAM ) {
+                               $prev = $this->db->bufferResults( false );
+                       }
+                       $result = null; // Assuring $result is not undefined, if exception occurs early
+                       try {
+                               $result = $this->db->select( array( 'logging', 'user' ),
+                                       array( "{$logging}.*", 'user_name' ), // grab the user name
+                                       $where,
+                                       __METHOD__,
+                                       array( 'ORDER BY' => 'log_id', 'USE INDEX' => array( 'logging' => 'PRIMARY' ) )
+                               );
+                               $this->outputLogStream( $result );
+                               if ( $this->buffer == WikiExporter::STREAM ) {
+                                       $this->db->bufferResults( $prev );
+                               }
+                       } catch ( Exception $e ) {
+                               // Throwing the exception does not reliably free the resultset, and
+                               // would also leave the connection in unbuffered mode.
+
+                               // Freeing result
+                               try {
+                                       if ( $result ) {
+                                               $result->free();
+                                       }
+                               } catch ( Exception $e2 ) {
+                                       // Already in panic mode -> ignoring $e2 as $e has
+                                       // higher priority
+                               }
+
+                               // Putting database back in previous buffer mode
+                               try {
+                                       if ( $this->buffer == WikiExporter::STREAM ) {
+                                               $this->db->bufferResults( $prev );
+                                       }
+                               } catch ( Exception $e2 ) {
+                                       // Already in panic mode -> ignoring $e2 as $e has
+                                       // higher priority
+                               }
+
+                               // Inform caller about problem
+                               throw $e;
+                       }
+               # For page dumps...
+               } else {
+                       $tables = array( 'page', 'revision' );
+                       $opts = array( 'ORDER BY' => 'page_id ASC' );
+                       $opts['USE INDEX'] = array();
+                       $join = array();
+                       if ( is_array( $this->history ) ) {
+                               # Time offset/limit for all pages/history...
+                               $revJoin = 'page_id=rev_page';
+                               # Set time order
+                               if ( $this->history['dir'] == 'asc' ) {
+                                       $op = '>';
+                                       $opts['ORDER BY'] = 'rev_timestamp ASC';
+                               } else {
+                                       $op = '<';
+                                       $opts['ORDER BY'] = 'rev_timestamp DESC';
+                               }
+                               # Set offset
+                               if ( !empty( $this->history['offset'] ) ) {
+                                       $revJoin .= " AND rev_timestamp $op " .
+                                               $this->db->addQuotes( $this->db->timestamp( $this->history['offset'] ) );
+                               }
+                               $join['revision'] = array( 'INNER JOIN', $revJoin );
+                               # Set query limit
+                               if ( !empty( $this->history['limit'] ) ) {
+                                       $opts['LIMIT'] = intval( $this->history['limit'] );
+                               }
+                       } elseif ( $this->history & WikiExporter::FULL ) {
+                               # Full history dumps...
+                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
+                       } elseif ( $this->history & WikiExporter::CURRENT ) {
+                               # Latest revision dumps...
+                               if ( $this->list_authors && $cond != '' ) { // List authors, if so desired
+                                       $this->do_list_authors( $cond );
+                               }
+                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
+                       } elseif ( $this->history & WikiExporter::STABLE ) {
+                               # "Stable" revision dumps...
+                               # Default JOIN, to be overridden...
+                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page AND page_latest=rev_id' );
+                               # One, and only one hook should set this, and return false
+                               if ( Hooks::run( 'WikiExporter::dumpStableQuery', array( &$tables, &$opts, &$join ) ) ) {
+                                       throw new MWException( __METHOD__ . " given invalid history dump type." );
+                               }
+                       } elseif ( $this->history & WikiExporter::RANGE ) {
+                               # Dump of revisions within a specified range
+                               $join['revision'] = array( 'INNER JOIN', 'page_id=rev_page' );
+                               $opts['ORDER BY'] = array( 'rev_page ASC', 'rev_id ASC' );
+                       } else {
+                               # Unknown history specification parameter?
+                               throw new MWException( __METHOD__ . " given invalid history dump type." );
+                       }
+                       # Query optimization hacks
+                       if ( $cond == '' ) {
+                               $opts[] = 'STRAIGHT_JOIN';
+                               $opts['USE INDEX']['page'] = 'PRIMARY';
+                       }
+                       # Build text join options
+                       if ( $this->text != WikiExporter::STUB ) { // 1-pass
+                               $tables[] = 'text';
+                               $join['text'] = array( 'INNER JOIN', 'rev_text_id=old_id' );
+                       }
+
+                       if ( $this->buffer == WikiExporter::STREAM ) {
+                               $prev = $this->db->bufferResults( false );
+                       }
+
+                       $result = null; // Assuring $result is not undefined, if exception occurs early
+                       try {
+                               Hooks::run( 'ModifyExportQuery',
+                                               array( $this->db, &$tables, &$cond, &$opts, &$join ) );
+
+                               # Do the query!
+                               $result = $this->db->select( $tables, '*', $cond, __METHOD__, $opts, $join );
+                               # Output dump results
+                               $this->outputPageStream( $result );
+
+                               if ( $this->buffer == WikiExporter::STREAM ) {
+                                       $this->db->bufferResults( $prev );
+                               }
+                       } catch ( Exception $e ) {
+                               // Throwing the exception does not reliably free the resultset, and
+                               // would also leave the connection in unbuffered mode.
+
+                               // Freeing result
+                               try {
+                                       if ( $result ) {
+                                               $result->free();
+                                       }
+                               } catch ( Exception $e2 ) {
+                                       // Already in panic mode -> ignoring $e2 as $e has
+                                       // higher priority
+                               }
+
+                               // Putting database back in previous buffer mode
+                               try {
+                                       if ( $this->buffer == WikiExporter::STREAM ) {
+                                               $this->db->bufferResults( $prev );
+                                       }
+                               } catch ( Exception $e2 ) {
+                                       // Already in panic mode -> ignoring $e2 as $e has
+                                       // higher priority
+                               }
+
+                               // Inform caller about problem
+                               throw $e;
+                       }
+               }
+       }
+
+       /**
+        * Runs through a query result set dumping page and revision records.
+        * The result set should be sorted/grouped by page to avoid duplicate
+        * page records in the output.
+        *
+        * Should be safe for
+        * streaming (non-buffered) queries, as long as it was made on a
+        * separate database connection not managed by LoadBalancer; some
+        * blob storage types will make queries to pull source data.
+        *
+        * @param ResultWrapper $resultset
+        */
+       protected function outputPageStream( $resultset ) {
+               $last = null;
+               foreach ( $resultset as $row ) {
+                       if ( $last === null ||
+                               $last->page_namespace != $row->page_namespace ||
+                               $last->page_title != $row->page_title ) {
+                               if ( $last !== null ) {
+                                       $output = '';
+                                       if ( $this->dumpUploads ) {
+                                               $output .= $this->writer->writeUploads( $last, $this->dumpUploadFileContents );
+                                       }
+                                       $output .= $this->writer->closePage();
+                                       $this->sink->writeClosePage( $output );
+                               }
+                               $output = $this->writer->openPage( $row );
+                               $this->sink->writeOpenPage( $row, $output );
+                               $last = $row;
+                       }
+                       $output = $this->writer->writeRevision( $row );
+                       $this->sink->writeRevision( $row, $output );
+               }
+               if ( $last !== null ) {
+                       $output = '';
+                       if ( $this->dumpUploads ) {
+                               $output .= $this->writer->writeUploads( $last, $this->dumpUploadFileContents );
+                       }
+                       $output .= $this->author_list;
+                       $output .= $this->writer->closePage();
+                       $this->sink->writeClosePage( $output );
+               }
+       }
+
+       /**
+        * @param ResultWrapper $resultset
+        */
+       protected function outputLogStream( $resultset ) {
+               foreach ( $resultset as $row ) {
+                       $output = $this->writer->writeLogItem( $row );
+                       $this->sink->writeLogItem( $row, $output );
+               }
+       }
+}
diff --git a/includes/export/XmlDumpWriter.php b/includes/export/XmlDumpWriter.php
new file mode 100644 (file)
index 0000000..3bd4c96
--- /dev/null
@@ -0,0 +1,440 @@
+<?php
+/**
+ * XmlDumpWriter
+ *
+ * Copyright © 2003, 2005, 2006 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 Dump
+ */
+class XmlDumpWriter {
+       /**
+        * Opens the XML output stream's root "<mediawiki>" element.
+        * This does not include an xml directive, so is safe to include
+        * as a subelement in a larger XML stream. Namespace and XML Schema
+        * references are included.
+        *
+        * Output will be encoded in UTF-8.
+        *
+        * @return string
+        */
+       function openStream() {
+               global $wgLanguageCode;
+               $ver = WikiExporter::schemaVersion();
+               return Xml::element( 'mediawiki', array(
+                       'xmlns'              => "http://www.mediawiki.org/xml/export-$ver/",
+                       'xmlns:xsi'          => "http://www.w3.org/2001/XMLSchema-instance",
+                       /*
+                        * When a new version of the schema is created, it needs staging on mediawiki.org.
+                        * This requires a change in the operations/mediawiki-config git repo.
+                        *
+                        * Create a changeset like https://gerrit.wikimedia.org/r/#/c/149643/ in which
+                        * you copy in the new xsd file.
+                        *
+                        * After it is reviewed, merged and deployed (sync-docroot), the index.html needs purging.
+                        * echo "http://www.mediawiki.org/xml/index.html" | mwscript purgeList.php --wiki=aawiki
+                        */
+                       'xsi:schemaLocation' => "http://www.mediawiki.org/xml/export-$ver/ " .
+                               "http://www.mediawiki.org/xml/export-$ver.xsd",
+                       'version'            => $ver,
+                       'xml:lang'           => $wgLanguageCode ),
+                       null ) .
+                       "\n" .
+                       $this->siteInfo();
+       }
+
+       /**
+        * @return string
+        */
+       function siteInfo() {
+               $info = array(
+                       $this->sitename(),
+                       $this->dbname(),
+                       $this->homelink(),
+                       $this->generator(),
+                       $this->caseSetting(),
+                       $this->namespaces() );
+               return "  <siteinfo>\n    " .
+                       implode( "\n    ", $info ) .
+                       "\n  </siteinfo>\n";
+       }
+
+       /**
+        * @return string
+        */
+       function sitename() {
+               global $wgSitename;
+               return Xml::element( 'sitename', array(), $wgSitename );
+       }
+
+       /**
+        * @return string
+        */
+       function dbname() {
+               global $wgDBname;
+               return Xml::element( 'dbname', array(), $wgDBname );
+       }
+
+       /**
+        * @return string
+        */
+       function generator() {
+               global $wgVersion;
+               return Xml::element( 'generator', array(), "MediaWiki $wgVersion" );
+       }
+
+       /**
+        * @return string
+        */
+       function homelink() {
+               return Xml::element( 'base', array(), Title::newMainPage()->getCanonicalURL() );
+       }
+
+       /**
+        * @return string
+        */
+       function caseSetting() {
+               global $wgCapitalLinks;
+               // "case-insensitive" option is reserved for future
+               $sensitivity = $wgCapitalLinks ? 'first-letter' : 'case-sensitive';
+               return Xml::element( 'case', array(), $sensitivity );
+       }
+
+       /**
+        * @return string
+        */
+       function namespaces() {
+               global $wgContLang;
+               $spaces = "<namespaces>\n";
+               foreach ( $wgContLang->getFormattedNamespaces() as $ns => $title ) {
+                       $spaces .= '      ' .
+                               Xml::element( 'namespace',
+                                       array(
+                                               'key' => $ns,
+                                               'case' => MWNamespace::isCapitalized( $ns ) ? 'first-letter' : 'case-sensitive',
+                                       ), $title ) . "\n";
+               }
+               $spaces .= "    </namespaces>";
+               return $spaces;
+       }
+
+       /**
+        * Closes the output stream with the closing root element.
+        * Call when finished dumping things.
+        *
+        * @return string
+        */
+       function closeStream() {
+               return "</mediawiki>\n";
+       }
+
+       /**
+        * Opens a "<page>" section on the output stream, with data
+        * from the given database row.
+        *
+        * @param object $row
+        * @return string
+        */
+       public function openPage( $row ) {
+               $out = "  <page>\n";
+               $title = Title::makeTitle( $row->page_namespace, $row->page_title );
+               $out .= '    ' . Xml::elementClean( 'title', array(), self::canonicalTitle( $title ) ) . "\n";
+               $out .= '    ' . Xml::element( 'ns', array(), strval( $row->page_namespace ) ) . "\n";
+               $out .= '    ' . Xml::element( 'id', array(), strval( $row->page_id ) ) . "\n";
+               if ( $row->page_is_redirect ) {
+                       $page = WikiPage::factory( $title );
+                       $redirect = $page->getRedirectTarget();
+                       if ( $redirect instanceof Title && $redirect->isValidRedirectTarget() ) {
+                               $out .= '    ';
+                               $out .= Xml::element( 'redirect', array( 'title' => self::canonicalTitle( $redirect ) ) );
+                               $out .= "\n";
+                       }
+               }
+
+               if ( $row->page_restrictions != '' ) {
+                       $out .= '    ' . Xml::element( 'restrictions', array(),
+                               strval( $row->page_restrictions ) ) . "\n";
+               }
+
+               Hooks::run( 'XmlDumpWriterOpenPage', array( $this, &$out, $row, $title ) );
+
+               return $out;
+       }
+
+       /**
+        * Closes a "<page>" section on the output stream.
+        *
+        * @access private
+        * @return string
+        */
+       function closePage() {
+               return "  </page>\n";
+       }
+
+       /**
+        * Dumps a "<revision>" section on the output stream, with
+        * data filled in from the given database row.
+        *
+        * @param object $row
+        * @return string
+        * @access private
+        */
+       function writeRevision( $row ) {
+
+               $out = "    <revision>\n";
+               $out .= "      " . Xml::element( 'id', null, strval( $row->rev_id ) ) . "\n";
+               if ( isset( $row->rev_parent_id ) && $row->rev_parent_id ) {
+                       $out .= "      " . Xml::element( 'parentid', null, strval( $row->rev_parent_id ) ) . "\n";
+               }
+
+               $out .= $this->writeTimestamp( $row->rev_timestamp );
+
+               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_USER ) ) {
+                       $out .= "      " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
+               } else {
+                       $out .= $this->writeContributor( $row->rev_user, $row->rev_user_text );
+               }
+
+               if ( isset( $row->rev_minor_edit ) && $row->rev_minor_edit ) {
+                       $out .= "      <minor/>\n";
+               }
+               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_COMMENT ) ) {
+                       $out .= "      " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n";
+               } elseif ( $row->rev_comment != '' ) {
+                       $out .= "      " . Xml::elementClean( 'comment', array(), strval( $row->rev_comment ) ) . "\n";
+               }
+
+               if ( isset( $row->rev_content_model ) && !is_null( $row->rev_content_model ) ) {
+                       $content_model = strval( $row->rev_content_model );
+               } else {
+                       // probably using $wgContentHandlerUseDB = false;
+                       $title = Title::makeTitle( $row->page_namespace, $row->page_title );
+                       $content_model = ContentHandler::getDefaultModelFor( $title );
+               }
+
+               $content_handler = ContentHandler::getForModelID( $content_model );
+
+               if ( isset( $row->rev_content_format ) && !is_null( $row->rev_content_format ) ) {
+                       $content_format = strval( $row->rev_content_format );
+               } else {
+                       // probably using $wgContentHandlerUseDB = false;
+                       $content_format = $content_handler->getDefaultFormat();
+               }
+
+               $out .= "      " . Xml::element( 'model', null, strval( $content_model ) ) . "\n";
+               $out .= "      " . Xml::element( 'format', null, strval( $content_format ) ) . "\n";
+
+               $text = '';
+               if ( isset( $row->rev_deleted ) && ( $row->rev_deleted & Revision::DELETED_TEXT ) ) {
+                       $out .= "      " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
+               } elseif ( isset( $row->old_text ) ) {
+                       // Raw text from the database may have invalid chars
+                       $text = strval( Revision::getRevisionText( $row ) );
+                       $text = $content_handler->exportTransform( $text, $content_format );
+                       $out .= "      " . Xml::elementClean( 'text',
+                               array( 'xml:space' => 'preserve', 'bytes' => intval( $row->rev_len ) ),
+                               strval( $text ) ) . "\n";
+               } else {
+                       // Stub output
+                       $out .= "      " . Xml::element( 'text',
+                               array( 'id' => $row->rev_text_id, 'bytes' => intval( $row->rev_len ) ),
+                               "" ) . "\n";
+               }
+
+               if ( isset( $row->rev_sha1 )
+                       && $row->rev_sha1
+                       && !( $row->rev_deleted & Revision::DELETED_TEXT )
+               ) {
+                       $out .= "      " . Xml::element( 'sha1', null, strval( $row->rev_sha1 ) ) . "\n";
+               } else {
+                       $out .= "      <sha1/>\n";
+               }
+
+               Hooks::run( 'XmlDumpWriterWriteRevision', array( &$this, &$out, $row, $text ) );
+
+               $out .= "    </revision>\n";
+
+               return $out;
+       }
+
+       /**
+        * Dumps a "<logitem>" section on the output stream, with
+        * data filled in from the given database row.
+        *
+        * @param object $row
+        * @return string
+        * @access private
+        */
+       function writeLogItem( $row ) {
+
+               $out = "  <logitem>\n";
+               $out .= "    " . Xml::element( 'id', null, strval( $row->log_id ) ) . "\n";
+
+               $out .= $this->writeTimestamp( $row->log_timestamp, "    " );
+
+               if ( $row->log_deleted & LogPage::DELETED_USER ) {
+                       $out .= "    " . Xml::element( 'contributor', array( 'deleted' => 'deleted' ) ) . "\n";
+               } else {
+                       $out .= $this->writeContributor( $row->log_user, $row->user_name, "    " );
+               }
+
+               if ( $row->log_deleted & LogPage::DELETED_COMMENT ) {
+                       $out .= "    " . Xml::element( 'comment', array( 'deleted' => 'deleted' ) ) . "\n";
+               } elseif ( $row->log_comment != '' ) {
+                       $out .= "    " . Xml::elementClean( 'comment', null, strval( $row->log_comment ) ) . "\n";
+               }
+
+               $out .= "    " . Xml::element( 'type', null, strval( $row->log_type ) ) . "\n";
+               $out .= "    " . Xml::element( 'action', null, strval( $row->log_action ) ) . "\n";
+
+               if ( $row->log_deleted & LogPage::DELETED_ACTION ) {
+                       $out .= "    " . Xml::element( 'text', array( 'deleted' => 'deleted' ) ) . "\n";
+               } else {
+                       $title = Title::makeTitle( $row->log_namespace, $row->log_title );
+                       $out .= "    " . Xml::elementClean( 'logtitle', null, self::canonicalTitle( $title ) ) . "\n";
+                       $out .= "    " . Xml::elementClean( 'params',
+                               array( 'xml:space' => 'preserve' ),
+                               strval( $row->log_params ) ) . "\n";
+               }
+
+               $out .= "  </logitem>\n";
+
+               return $out;
+       }
+
+       /**
+        * @param string $timestamp
+        * @param string $indent Default to six spaces
+        * @return string
+        */
+       function writeTimestamp( $timestamp, $indent = "      " ) {
+               $ts = wfTimestamp( TS_ISO_8601, $timestamp );
+               return $indent . Xml::element( 'timestamp', null, $ts ) . "\n";
+       }
+
+       /**
+        * @param int $id
+        * @param string $text
+        * @param string $indent Default to six spaces
+        * @return string
+        */
+       function writeContributor( $id, $text, $indent = "      " ) {
+               $out = $indent . "<contributor>\n";
+               if ( $id || !IP::isValid( $text ) ) {
+                       $out .= $indent . "  " . Xml::elementClean( 'username', null, strval( $text ) ) . "\n";
+                       $out .= $indent . "  " . Xml::element( 'id', null, strval( $id ) ) . "\n";
+               } else {
+                       $out .= $indent . "  " . Xml::elementClean( 'ip', null, strval( $text ) ) . "\n";
+               }
+               $out .= $indent . "</contributor>\n";
+               return $out;
+       }
+
+       /**
+        * Warning! This data is potentially inconsistent. :(
+        * @param object $row
+        * @param bool $dumpContents
+        * @return string
+        */
+       function writeUploads( $row, $dumpContents = false ) {
+               if ( $row->page_namespace == NS_FILE ) {
+                       $img = wfLocalFile( $row->page_title );
+                       if ( $img && $img->exists() ) {
+                               $out = '';
+                               foreach ( array_reverse( $img->getHistory() ) as $ver ) {
+                                       $out .= $this->writeUpload( $ver, $dumpContents );
+                               }
+                               $out .= $this->writeUpload( $img, $dumpContents );
+                               return $out;
+                       }
+               }
+               return '';
+       }
+
+       /**
+        * @param File $file
+        * @param bool $dumpContents
+        * @return string
+        */
+       function writeUpload( $file, $dumpContents = false ) {
+               if ( $file->isOld() ) {
+                       $archiveName = "      " .
+                               Xml::element( 'archivename', null, $file->getArchiveName() ) . "\n";
+               } else {
+                       $archiveName = '';
+               }
+               if ( $dumpContents ) {
+                       $be = $file->getRepo()->getBackend();
+                       # Dump file as base64
+                       # Uses only XML-safe characters, so does not need escaping
+                       # @todo Too bad this loads the contents into memory (script might swap)
+                       $contents = '      <contents encoding="base64">' .
+                               chunk_split( base64_encode(
+                                       $be->getFileContents( array( 'src' => $file->getPath() ) ) ) ) .
+                               "      </contents>\n";
+               } else {
+                       $contents = '';
+               }
+               if ( $file->isDeleted( File::DELETED_COMMENT ) ) {
+                       $comment = Xml::element( 'comment', array( 'deleted' => 'deleted' ) );
+               } else {
+                       $comment = Xml::elementClean( 'comment', null, $file->getDescription() );
+               }
+               return "    <upload>\n" .
+                       $this->writeTimestamp( $file->getTimestamp() ) .
+                       $this->writeContributor( $file->getUser( 'id' ), $file->getUser( 'text' ) ) .
+                       "      " . $comment . "\n" .
+                       "      " . Xml::element( 'filename', null, $file->getName() ) . "\n" .
+                       $archiveName .
+                       "      " . Xml::element( 'src', null, $file->getCanonicalURL() ) . "\n" .
+                       "      " . Xml::element( 'size', null, $file->getSize() ) . "\n" .
+                       "      " . Xml::element( 'sha1base36', null, $file->getSha1() ) . "\n" .
+                       "      " . Xml::element( 'rel', null, $file->getRel() ) . "\n" .
+                       $contents .
+                       "    </upload>\n";
+       }
+
+       /**
+        * Return prefixed text form of title, but using the content language's
+        * canonical namespace. This skips any special-casing such as gendered
+        * user namespaces -- which while useful, are not yet listed in the
+        * XML "<siteinfo>" data so are unsafe in export.
+        *
+        * @param Title $title
+        * @return string
+        * @since 1.18
+        */
+       public static function canonicalTitle( Title $title ) {
+               if ( $title->isExternal() ) {
+                       return $title->getPrefixedText();
+               }
+
+               global $wgContLang;
+               $prefix = $wgContLang->getFormattedNsText( $title->getNamespace() );
+
+               if ( $prefix !== '' ) {
+                       $prefix .= ':';
+               }
+
+               return $prefix . $title->getText();
+       }
+}
index 07370ad..f11c218 100644 (file)
@@ -64,6 +64,7 @@ class FSFileBackend extends FileBackendStore {
         *   - containerPaths : Map of container names to custom file system directories.
         *                      This should only be used for backwards-compatibility.
         *   - fileMode       : Octal UNIX file permissions to use on files stored.
+        * @param array $config
         */
        public function __construct( array $config ) {
                parent::__construct( $config );
@@ -561,9 +562,6 @@ class FSFileBackend extends FileBackendStore {
                }
        }
 
-       /**
-        * @see FileBackendStore::doClearCache()
-        */
        protected function doClearCache( array $paths = null ) {
                clearstatcache(); // clear the PHP file stat cache
        }
@@ -682,7 +680,7 @@ class FSFileBackend extends FileBackendStore {
        }
 
        /**
-        * @param FileBackendStoreOpHandle[] $fileOpHandles
+        * @param FSFileOpHandle[] $fileOpHandles
         *
         * @return Status[]
         */
index faa1314..95a7897 100644 (file)
@@ -49,7 +49,7 @@ class FileOpBatch {
         *   - a) unexpected operation errors occurred (network partitions, disk full...)
         *   - b) significant operation errors occurred and 'force' was not set
         *
-        * @param array $performOps List of FileOp operations
+        * @param FileOp[] $performOps List of FileOp operations
         * @param array $opts Batch operation options
         * @param FileJournal $journal Journal to log operations to
         * @return Status
@@ -147,6 +147,7 @@ class FileOpBatch {
        protected static function runParallelBatches( array $pPerformOps, Status $status ) {
                $aborted = false; // set to true on unexpected errors
                foreach ( $pPerformOps as $performOpsBatch ) {
+                       /** @var FileOp[] $performOpsBatch */
                        if ( $aborted ) { // check batch op abort flag...
                                // We can't continue (even with $ignoreErrors) as $predicates is wrong.
                                // Log the remaining ops as failed for recovery...
@@ -157,6 +158,7 @@ class FileOpBatch {
                                }
                                continue;
                        }
+                       /** @var Status[] $statuses */
                        $statuses = array();
                        $opHandles = array();
                        // Get the backend; all sub-batch ops belong to a single backend
index f898bb6..debdeb5 100644 (file)
@@ -499,7 +499,7 @@ class ForeignAPIRepo extends FileRepo {
 
        /**
         * Like a Http:get request, but with custom User-Agent.
-        * @see Http:get
+        * @see Http::get
         * @param string $url
         * @param string $timeout
         * @param array $options
index 1d45e5f..b4849e5 100644 (file)
@@ -5,10 +5,24 @@
  * click handling code in JavaScript. Use a HTMLSubmitField if you merely
  * wish to add a submit button to a form.
  *
+ * Additional recognized configuration parameters include:
+ * - flags: OOUI flags for the button, see OOUI\\FlaggedElement
+ * - buttonlabel-message: Message to use for the button display text, instead
+ *   of the value from 'default'. Overrides 'buttonlabel' and 'buttonlabel-raw'.
+ * - buttonlabel: Text to display for the button display text, instead
+ *   of the value from 'default'. Overrides 'buttonlabel-raw'.
+ * - buttonlabel-raw: HTMLto display for the button display text, instead
+ *   of the value from 'default'.
+ *
+ * Note that the buttonlabel parameters are not supported on IE6 and IE7 due to
+ * bugs in those browsers. If detected, they will be served buttons using the
+ * value of 'default' as the button label.
+ *
  * @since 1.22
  */
 class HTMLButtonField extends HTMLFormField {
        protected $buttonType = 'button';
+       protected $buttonLabel = null;
 
        /** @var array $mFlags Flags to add to OOUI Button widget */
        protected $mFlags = array();
@@ -18,6 +32,30 @@ class HTMLButtonField extends HTMLFormField {
                if ( isset( $info['flags'] ) ) {
                        $this->mFlags = $info['flags'];
                }
+
+               # Generate the label from a message, if possible
+               if ( isset( $info['buttonlabel-message'] ) ) {
+                       $msgInfo = $info['buttonlabel-message'];
+
+                       if ( is_array( $msgInfo ) ) {
+                               $msg = array_shift( $msgInfo );
+                       } else {
+                               $msg = $msgInfo;
+                               $msgInfo = array();
+                       }
+
+                       $this->buttonLabel = $this->msg( $msg, $msgInfo )->parse();
+               } elseif ( isset( $info['buttonlabel'] ) ) {
+                       if ( $info['buttonlabel'] === '&#160;' ) {
+                               // Apparently some things set &nbsp directly and in an odd format
+                               $this->buttonLabel = '&#160;';
+                       } else {
+                               $this->buttonLabel = htmlspecialchars( $info['buttonlabel'] );
+                       }
+               } elseif ( isset( $info['buttonlabel-raw'] ) ) {
+                       $this->buttonLabel = $info['buttonlabel-raw'];
+               }
+
                parent::__construct( $info );
        }
 
@@ -37,9 +75,16 @@ class HTMLButtonField extends HTMLFormField {
                $attr = array(
                        'class' => 'mw-htmlform-submit ' . $this->mClass . $flags,
                        'id' => $this->mID,
+                       'type' => $this->buttonType,
+                       'name' => $this->mName,
+                       'value' => $value,
                ) + $this->getAttributes( array( 'disabled', 'tabindex' ) );
 
-               return Html::input( $this->mName, $value, $this->buttonType, $attr );
+               if ( $this->isBadIE() ) {
+                       return Html::element( 'input', $attr );
+               } else {
+                       return Html::rawElement( 'button', $attr, $this->buttonLabel ?: htmlspecialchars( $value ) );
+               }
        }
 
        /**
@@ -51,11 +96,14 @@ class HTMLButtonField extends HTMLFormField {
                return new OOUI\ButtonInputWidget( array(
                        'name' => $this->mName,
                        'value' => $value,
-                       'label' => $value,
+                       'label' => !$this->isBadIE() && $this->buttonLabel
+                               ? new OOUI\HtmlSnippet( $this->buttonLabel )
+                               : $value,
                        'type' => $this->buttonType,
                        'classes' => array( 'mw-htmlform-submit', $this->mClass ),
                        'id' => $this->mID,
                        'flags' => $this->mFlags,
+                       'useInputTag' => $this->isBadIE(),
                ) + $this->getAttributes( array( 'disabled', 'tabindex' ), array( 'tabindex' => 'tabIndex' ) ) );
        }
 
@@ -74,4 +122,15 @@ class HTMLButtonField extends HTMLFormField {
        public function validate( $value, $alldata ) {
                return true;
        }
+
+       /**
+        * IE<8 has bugs with <button>, so we'll need to avoid them.
+        * @return bool Whether the request is from a bad version of IE
+        */
+       private function isBadIE() {
+               $request = $this->mParent
+                       ? $this->mParent->getRequest()
+                       : RequestContext::getMain()->getRequest();
+               return preg_match( '/MSIE [1-7]\./i', $request->getHeader( 'User-Agent' ) );
+       }
 }
index b0d90af..ee7faa5 100644 (file)
@@ -526,6 +526,21 @@ class HTMLForm extends ContextSource {
                return false;
        }
 
+       /**
+        * Same as self::show with the difference, that the form will be
+        * added to the output, no matter, if the validation was good or not.
+        * @return bool|Status Whether submission was successful.
+        */
+       function showAlways() {
+               $this->prepareForm();
+
+               $result = $this->tryAuthorizedSubmit();
+
+               $this->displayForm( $result );
+
+               return $result;
+       }
+
        /**
         * Validate all the fields, and call the submission callback
         * function if everything is kosher.
@@ -656,10 +671,10 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Set the introductory message, overwriting any existing message.
+        * Set the introductory message HTML, overwriting any existing message.
         * @since 1.19
         *
-        * @param string $msg Complete text of message to display
+        * @param string $msg Complete HTML of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -670,9 +685,9 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Add introductory text.
+        * Add HTML to introductory message.
         *
-        * @param string $msg Complete text of message to display
+        * @param string $msg Complete HTML of message to display
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
@@ -683,9 +698,9 @@ class HTMLForm extends ContextSource {
        }
 
        /**
-        * Add header text, inside the form.
+        * Add HTML to the header, inside the form.
         *
-        * @param string $msg Complete text of message to display
+        * @param string $msg Additional HTML to display in header
         * @param string|null $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -707,7 +722,7 @@ class HTMLForm extends ContextSource {
         * Set header text, inside the form.
         * @since 1.19
         *
-        * @param string $msg Complete text of message to display
+        * @param string $msg Complete HTML of header to display
         * @param string|null $section The section to add the header to
         *
         * @return HTMLForm $this for chaining calls (since 1.20)
@@ -727,7 +742,7 @@ class HTMLForm extends ContextSource {
         *
         * @param string|null $section The section to get the header text for
         * @since 1.26
-        * @return string
+        * @return string HTML
         */
        function getHeaderText( $section = null ) {
                if ( is_null( $section ) ) {
@@ -855,15 +870,53 @@ class HTMLForm extends ContextSource {
        /**
         * Add a button to the form
         *
-        * @param string $name Field name.
-        * @param string $value Field value
-        * @param string $id DOM id for the button (default: null)
-        * @param array $attribs
-        *
+        * @since 1.27 takes an array as shown. Earlier versions accepted
+        *  'name', 'value', 'id', and 'attribs' as separate parameters in that
+        *  order.
+        * @note Custom labels ('label', 'label-message', 'label-raw') are not
+        *  supported for IE6 and IE7 due to bugs in those browsers. If detected,
+        *  they will be served buttons using 'value' as the button label.
+        * @param array $data Data to define the button:
+        *  - name: (string) Button name.
+        *  - value: (string) Button value.
+        *  - label-message: (string, optional) Button label message key to use
+        *    instead of 'value'. Overrides 'label' and 'label-raw'.
+        *  - label: (string, optional) Button label text to use instead of
+        *    'value'. Overrides 'label-raw'.
+        *  - label-raw: (string, optional) Button label HTML to use instead of
+        *    'value'.
+        *  - id: (string, optional) DOM id for the button.
+        *  - attribs: (array, optional) Additional HTML attributes.
+        *  - flags: (string|string[], optional) OOUI flags.
         * @return HTMLForm $this for chaining calls (since 1.20)
         */
-       public function addButton( $name, $value, $id = null, $attribs = null ) {
-               $this->mButtons[] = compact( 'name', 'value', 'id', 'attribs' );
+       public function addButton( $data ) {
+               if ( !is_array( $data ) ) {
+                       $args = func_get_args();
+                       if ( count( $args ) < 2 || count( $args ) > 4 ) {
+                               throw new InvalidArgumentException(
+                                       'Incorrect number of arguments for deprecated calling style'
+                               );
+                       }
+                       $data = array(
+                               'name' => $args[0],
+                               'value' => $args[1],
+                               'id' => isset( $args[2] ) ? $args[2] : null,
+                               'attribs' => isset( $args[3] ) ? $args[3] : null,
+                       );
+               } else {
+                       if ( !isset( $data['name'] ) ) {
+                               throw new InvalidArgumentException( 'A name is required' );
+                       }
+                       if ( !isset( $data['value'] ) ) {
+                               throw new InvalidArgumentException( 'A value is required' );
+                       }
+               }
+               $this->mButtons[] = $data + array(
+                       'id' => null,
+                       'attribs' => null,
+                       'flags' => null,
+               );
 
                return $this;
        }
@@ -904,7 +957,7 @@ class HTMLForm extends ContextSource {
         *
         * @param bool|string|array|Status $submitResult Output from HTMLForm::trySubmit()
         *
-        * @return string
+        * @return string HTML
         */
        function getHTML( $submitResult ) {
                # For good measure (it is the default)
@@ -1041,6 +1094,9 @@ class HTMLForm extends ContextSource {
                        ) . "\n";
                }
 
+               // IE<8 has bugs with <button>, so we'll need to avoid them.
+               $isBadIE = preg_match( '/MSIE [1-7]\./i', $this->getRequest()->getHeader( 'User-Agent' ) );
+
                foreach ( $this->mButtons as $button ) {
                        $attrs = array(
                                'type' => 'submit',
@@ -1048,6 +1104,16 @@ class HTMLForm extends ContextSource {
                                'value' => $button['value']
                        );
 
+                       if ( isset( $button['label-message'] ) ) {
+                               $label = $this->msg( $button['label-message'] )->parse();
+                       } elseif ( isset( $button['label'] ) ) {
+                               $label = htmlspecialchars( $button['label'] );
+                       } elseif ( isset( $button['label-raw'] ) ) {
+                               $label = $button['label-raw'];
+                       } else {
+                               $label = htmlspecialchars( $button['value'] );
+                       }
+
                        if ( $button['attribs'] ) {
                                $attrs += $button['attribs'];
                        }
@@ -1061,7 +1127,11 @@ class HTMLForm extends ContextSource {
                                $attrs['class'][] = 'mw-ui-button';
                        }
 
-                       $buttons .= Html::element( 'input', $attrs ) . "\n";
+                       if ( $isBadIE ) {
+                               $buttons .= Html::element( 'input', $attrs ) . "\n";
+                       } else {
+                               $buttons .= Html::rawElement( 'button', $attrs, $label ) . "\n";
+                       }
                }
 
                $html = Html::rawElement( 'span',
@@ -1152,6 +1222,8 @@ class HTMLForm extends ContextSource {
         */
        public function setSubmitDestructive() {
                $this->mSubmitFlags = array( 'destructive', 'primary' );
+
+               return $this;
        }
 
        /**
@@ -1160,6 +1232,8 @@ class HTMLForm extends ContextSource {
         */
        public function setSubmitProgressive() {
                $this->mSubmitFlags = array( 'progressive', 'primary' );
+
+               return $this;
        }
 
        /**
@@ -1396,6 +1470,7 @@ class HTMLForm extends ContextSource {
                $hasLabel = false;
 
                // Conveniently, PHP method names are case-insensitive.
+               // For grep: this can call getDiv, getRaw, getInline, getVForm, getOOUI
                $getFieldHtmlMethod = $displayFormat == 'table' ? 'getTableRow' : ( 'get' . $displayFormat );
 
                foreach ( $fields as $key => $value ) {
index d4a293e..3d9ec1f 100644 (file)
@@ -1054,8 +1054,8 @@ abstract class HTMLFormField {
 
                foreach ( $oldoptions as $text => $data ) {
                        $options[] = array(
-                               'data' => $data,
-                               'label' => $text,
+                               'data' => (string)$data,
+                               'label' => (string)$text,
                        );
                }
 
index c11449a..811eaf4 100644 (file)
@@ -50,6 +50,9 @@ class OOUIHTMLForm extends HTMLForm {
        function getButtons() {
                $buttons = '';
 
+               // IE<8 has bugs with <button>, so we'll need to avoid them.
+               $isBadIE = preg_match( '/MSIE [1-7]\./i', $this->getRequest()->getHeader( 'User-Agent' ) );
+
                if ( $this->mShowSubmit ) {
                        $attribs = array( 'infusable' => true );
 
@@ -70,6 +73,7 @@ class OOUIHTMLForm extends HTMLForm {
                        $attribs['label'] = $this->getSubmitText();
                        $attribs['value'] = $this->getSubmitText();
                        $attribs['flags'] = $this->mSubmitFlags;
+                       $attribs['useInputTag'] = $isBadIE;
 
                        $buttons .= new OOUI\ButtonInputWidget( $attribs );
                }
@@ -78,6 +82,7 @@ class OOUIHTMLForm extends HTMLForm {
                        $buttons .= new OOUI\ButtonInputWidget( array(
                                'type' => 'reset',
                                'label' => $this->msg( 'htmlform-reset' )->text(),
+                               'useInputTag' => $isBadIE,
                        ) );
                }
 
@@ -92,13 +97,27 @@ class OOUIHTMLForm extends HTMLForm {
                                $attrs['id'] = $button['id'];
                        }
 
+                       if ( $isBadIE ) {
+                               $label = $button['value'];
+                       } elseif ( isset( $button['label-message'] ) ) {
+                               $label = new OOUI\HtmlSnippet( $this->msg( $button['label-message'] )->parse() );
+                       } elseif ( isset( $button['label'] ) ) {
+                               $label = $button['label'];
+                       } elseif ( isset( $button['label-raw'] ) ) {
+                               $label = new OOUI\HtmlSnippet( $button['label-raw'] );
+                       } else {
+                               $label = $button['value'];
+                       }
+
                        $attrs['classes'] = isset( $attrs['class'] ) ? (array)$attrs['class'] : array();
 
                        $buttons .= new OOUI\ButtonInputWidget( array(
                                'type' => 'submit',
                                'name' => $button['name'],
                                'value' => $button['value'],
-                               'label' => $button['value'],
+                               'label' => $label,
+                               'flags' => $button['flags'],
+                               'useInputTag' => $isBadIE,
                        ) + $attrs );
                }
 
diff --git a/includes/import/ImportSource.php b/includes/import/ImportSource.php
new file mode 100644 (file)
index 0000000..75d20b4
--- /dev/null
@@ -0,0 +1,51 @@
+<?php
+/**
+ * Source interface for XML import.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * Source interface for XML import.
+ *
+ * @ingroup SpecialPage
+ */
+interface ImportSource {
+
+       /**
+        * Indicates whether the end of the input has been reached.
+        * Will return true after a finite number of calls to readChunk.
+        *
+        * @return bool true if there is no more input, false otherwise.
+        */
+       function atEnd();
+
+       /**
+        * Return a chunk of the input, as a (possibly empty) string.
+        * When the end of input is reached, readChunk() returns false.
+        * If atEnd() returns false, readChunk() will return a string.
+        * If atEnd() returns true, readChunk() will return false.
+        *
+        * @return bool|string
+        */
+       function readChunk();
+}
diff --git a/includes/import/ImportStreamSource.php b/includes/import/ImportStreamSource.php
new file mode 100644 (file)
index 0000000..0e03d9f
--- /dev/null
@@ -0,0 +1,172 @@
+<?php
+/**
+ * MediaWiki page data importer.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * Imports a XML dump from a file (either from file upload, files on disk, or HTTP)
+ * @ingroup SpecialPage
+ */
+class ImportStreamSource implements ImportSource {
+       function __construct( $handle ) {
+               $this->mHandle = $handle;
+       }
+
+       /**
+        * @return bool
+        */
+       function atEnd() {
+               return feof( $this->mHandle );
+       }
+
+       /**
+        * @return string
+        */
+       function readChunk() {
+               return fread( $this->mHandle, 32768 );
+       }
+
+       /**
+        * @param string $filename
+        * @return Status
+        */
+       static function newFromFile( $filename ) {
+               MediaWiki\suppressWarnings();
+               $file = fopen( $filename, 'rt' );
+               MediaWiki\restoreWarnings();
+               if ( !$file ) {
+                       return Status::newFatal( "importcantopen" );
+               }
+               return Status::newGood( new ImportStreamSource( $file ) );
+       }
+
+       /**
+        * @param string $fieldname
+        * @return Status
+        */
+       static function newFromUpload( $fieldname = "xmlimport" ) {
+               $upload =& $_FILES[$fieldname];
+
+               if ( $upload === null || !$upload['name'] ) {
+                       return Status::newFatal( 'importnofile' );
+               }
+               if ( !empty( $upload['error'] ) ) {
+                       switch ( $upload['error'] ) {
+                               case 1:
+                                       # The uploaded file exceeds the upload_max_filesize directive in php.ini.
+                                       return Status::newFatal( 'importuploaderrorsize' );
+                               case 2:
+                                       # The uploaded file exceeds the MAX_FILE_SIZE directive that
+                                       # was specified in the HTML form.
+                                       return Status::newFatal( 'importuploaderrorsize' );
+                               case 3:
+                                       # The uploaded file was only partially uploaded
+                                       return Status::newFatal( 'importuploaderrorpartial' );
+                               case 6:
+                                       # Missing a temporary folder.
+                                       return Status::newFatal( 'importuploaderrortemp' );
+                               # case else: # Currently impossible
+                       }
+
+               }
+               $fname = $upload['tmp_name'];
+               if ( is_uploaded_file( $fname ) ) {
+                       return ImportStreamSource::newFromFile( $fname );
+               } else {
+                       return Status::newFatal( 'importnofile' );
+               }
+       }
+
+       /**
+        * @param string $url
+        * @param string $method
+        * @return Status
+        */
+       static function newFromURL( $url, $method = 'GET' ) {
+               wfDebug( __METHOD__ . ": opening $url\n" );
+               # Use the standard HTTP fetch function; it times out
+               # quicker and sorts out user-agent problems which might
+               # otherwise prevent importing from large sites, such
+               # as the Wikimedia cluster, etc.
+               $data = Http::request( $method, $url, array( 'followRedirects' => true ), __METHOD__ );
+               if ( $data !== false ) {
+                       $file = tmpfile();
+                       fwrite( $file, $data );
+                       fflush( $file );
+                       fseek( $file, 0 );
+                       return Status::newGood( new ImportStreamSource( $file ) );
+               } else {
+                       return Status::newFatal( 'importcantopen' );
+               }
+       }
+
+       /**
+        * @param string $interwiki
+        * @param string $page
+        * @param bool $history
+        * @param bool $templates
+        * @param int $pageLinkDepth
+        * @return Status
+        */
+       public static function newFromInterwiki( $interwiki, $page, $history = false,
+               $templates = false, $pageLinkDepth = 0
+       ) {
+               if ( $page == '' ) {
+                       return Status::newFatal( 'import-noarticle' );
+               }
+
+               # Look up the first interwiki prefix, and let the foreign site handle
+               # subsequent interwiki prefixes
+               $firstIwPrefix = strtok( $interwiki, ':' );
+               $firstIw = Interwiki::fetch( $firstIwPrefix );
+               if ( !$firstIw ) {
+                       return Status::newFatal( 'importbadinterwiki' );
+               }
+
+               $additionalIwPrefixes = strtok( '' );
+               if ( $additionalIwPrefixes ) {
+                       $additionalIwPrefixes .= ':';
+               }
+               # Have to do a DB-key replacement ourselves; otherwise spaces get
+               # URL-encoded to +, which is wrong in this case. Similar to logic in
+               # Title::getLocalURL
+               $link = $firstIw->getURL( strtr( "${additionalIwPrefixes}Special:Export/$page",
+                       ' ', '_' ) );
+
+               $params = array();
+               if ( $history ) {
+                       $params['history'] = 1;
+               }
+               if ( $templates ) {
+                       $params['templates'] = 1;
+               }
+               if ( $pageLinkDepth ) {
+                       $params['pagelink-depth'] = $pageLinkDepth;
+               }
+
+               $url = wfAppendQuery( $link, $params );
+               # For interwikis, use POST to avoid redirects.
+               return ImportStreamSource::newFromURL( $url, "POST" );
+       }
+}
diff --git a/includes/import/ImportStringSource.php b/includes/import/ImportStringSource.php
new file mode 100644 (file)
index 0000000..85983b1
--- /dev/null
@@ -0,0 +1,57 @@
+<?php
+/**
+ * MediaWiki page data importer.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * Used for importing XML dumps where the content of the dump is in a string.
+ * This class is ineffecient, and should only be used for small dumps.
+ * For larger dumps, ImportStreamSource should be used instead.
+ *
+ * @ingroup SpecialPage
+ */
+class ImportStringSource implements ImportSource {
+       function __construct( $string ) {
+               $this->mString = $string;
+               $this->mRead = false;
+       }
+
+       /**
+        * @return bool
+        */
+       function atEnd() {
+               return $this->mRead;
+       }
+
+       /**
+        * @return bool|string
+        */
+       function readChunk() {
+               if ( $this->atEnd() ) {
+                       return false;
+               }
+               $this->mRead = true;
+               return $this->mString;
+       }
+}
diff --git a/includes/import/UploadSourceAdapter.php b/includes/import/UploadSourceAdapter.php
new file mode 100644 (file)
index 0000000..17fbdfb
--- /dev/null
@@ -0,0 +1,149 @@
+<?php
+/**
+ * MediaWiki page data importer.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * This is a horrible hack used to keep source compatibility.
+ * @ingroup SpecialPage
+ */
+class UploadSourceAdapter {
+       /** @var array */
+       public static $sourceRegistrations = array();
+
+       /** @var string */
+       private $mSource;
+
+       /** @var string */
+       private $mBuffer;
+
+       /** @var int */
+       private $mPosition;
+
+       /**
+        * @param ImportSource $source
+        * @return string
+        */
+       static function registerSource( ImportSource $source ) {
+               $id = wfRandomString();
+
+               self::$sourceRegistrations[$id] = $source;
+
+               return $id;
+       }
+
+       /**
+        * @param string $path
+        * @param string $mode
+        * @param array $options
+        * @param string $opened_path
+        * @return bool
+        */
+       function stream_open( $path, $mode, $options, &$opened_path ) {
+               $url = parse_url( $path );
+               $id = $url['host'];
+
+               if ( !isset( self::$sourceRegistrations[$id] ) ) {
+                       return false;
+               }
+
+               $this->mSource = self::$sourceRegistrations[$id];
+
+               return true;
+       }
+
+       /**
+        * @param int $count
+        * @return string
+        */
+       function stream_read( $count ) {
+               $return = '';
+               $leave = false;
+
+               while ( !$leave && !$this->mSource->atEnd() &&
+                               strlen( $this->mBuffer ) < $count ) {
+                       $read = $this->mSource->readChunk();
+
+                       if ( !strlen( $read ) ) {
+                               $leave = true;
+                       }
+
+                       $this->mBuffer .= $read;
+               }
+
+               if ( strlen( $this->mBuffer ) ) {
+                       $return = substr( $this->mBuffer, 0, $count );
+                       $this->mBuffer = substr( $this->mBuffer, $count );
+               }
+
+               $this->mPosition += strlen( $return );
+
+               return $return;
+       }
+
+       /**
+        * @param string $data
+        * @return bool
+        */
+       function stream_write( $data ) {
+               return false;
+       }
+
+       /**
+        * @return mixed
+        */
+       function stream_tell() {
+               return $this->mPosition;
+       }
+
+       /**
+        * @return bool
+        */
+       function stream_eof() {
+               return $this->mSource->atEnd();
+       }
+
+       /**
+        * @return array
+        */
+       function url_stat() {
+               $result = array();
+
+               $result['dev'] = $result[0] = 0;
+               $result['ino'] = $result[1] = 0;
+               $result['mode'] = $result[2] = 0;
+               $result['nlink'] = $result[3] = 0;
+               $result['uid'] = $result[4] = 0;
+               $result['gid'] = $result[5] = 0;
+               $result['rdev'] = $result[6] = 0;
+               $result['size'] = $result[7] = 0;
+               $result['atime'] = $result[8] = 0;
+               $result['mtime'] = $result[9] = 0;
+               $result['ctime'] = $result[10] = 0;
+               $result['blksize'] = $result[11] = 0;
+               $result['blocks'] = $result[12] = 0;
+
+               return $result;
+       }
+}
diff --git a/includes/import/WikiImporter.php b/includes/import/WikiImporter.php
new file mode 100644 (file)
index 0000000..9bf9282
--- /dev/null
@@ -0,0 +1,1070 @@
+<?php
+/**
+ * MediaWiki page data importer.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * XML file reader for the page data importer.
+ *
+ * implements Special:Import
+ * @ingroup SpecialPage
+ */
+class WikiImporter {
+       private $reader = null;
+       private $foreignNamespaces = null;
+       private $mLogItemCallback, $mUploadCallback, $mRevisionCallback, $mPageCallback;
+       private $mSiteInfoCallback, $mPageOutCallback;
+       private $mNoticeCallback, $mDebug;
+       private $mImportUploads, $mImageBasePath;
+       private $mNoUpdates = false;
+       /** @var Config */
+       private $config;
+       /** @var ImportTitleFactory */
+       private $importTitleFactory;
+       /** @var array */
+       private $countableCache = array();
+
+       /**
+        * Creates an ImportXMLReader drawing from the source provided
+        * @param ImportSource $source
+        * @param Config $config
+        * @throws Exception
+        */
+       function __construct( ImportSource $source, Config $config = null ) {
+               if ( !class_exists( 'XMLReader' ) ) {
+                       throw new Exception( 'Import requires PHP to have been compiled with libxml support' );
+               }
+
+               $this->reader = new XMLReader();
+               if ( !$config ) {
+                       wfDeprecated( __METHOD__ . ' without a Config instance', '1.25' );
+                       $config = ConfigFactory::getDefaultInstance()->makeConfig( 'main' );
+               }
+               $this->config = $config;
+
+               if ( !in_array( 'uploadsource', stream_get_wrappers() ) ) {
+                       stream_wrapper_register( 'uploadsource', 'UploadSourceAdapter' );
+               }
+               $id = UploadSourceAdapter::registerSource( $source );
+
+               // Enable the entity loader, as it is needed for loading external URLs via
+               // XMLReader::open (T86036)
+               $oldDisable = libxml_disable_entity_loader( false );
+               if ( defined( 'LIBXML_PARSEHUGE' ) ) {
+                       $status = $this->reader->open( "uploadsource://$id", null, LIBXML_PARSEHUGE );
+               } else {
+                       $status = $this->reader->open( "uploadsource://$id" );
+               }
+               if ( !$status ) {
+                       $error = libxml_get_last_error();
+                       libxml_disable_entity_loader( $oldDisable );
+                       throw new MWException( 'Encountered an internal error while initializing WikiImporter object: ' .
+                               $error->message );
+               }
+               libxml_disable_entity_loader( $oldDisable );
+
+               // Default callbacks
+               $this->setPageCallback( array( $this, 'beforeImportPage' ) );
+               $this->setRevisionCallback( array( $this, "importRevision" ) );
+               $this->setUploadCallback( array( $this, 'importUpload' ) );
+               $this->setLogItemCallback( array( $this, 'importLogItem' ) );
+               $this->setPageOutCallback( array( $this, 'finishImportPage' ) );
+
+               $this->importTitleFactory = new NaiveImportTitleFactory();
+       }
+
+       /**
+        * @return null|XMLReader
+        */
+       public function getReader() {
+               return $this->reader;
+       }
+
+       public function throwXmlError( $err ) {
+               $this->debug( "FAILURE: $err" );
+               wfDebug( "WikiImporter XML error: $err\n" );
+       }
+
+       public function debug( $data ) {
+               if ( $this->mDebug ) {
+                       wfDebug( "IMPORT: $data\n" );
+               }
+       }
+
+       public function warn( $data ) {
+               wfDebug( "IMPORT: $data\n" );
+       }
+
+       public function notice( $msg /*, $param, ...*/ ) {
+               $params = func_get_args();
+               array_shift( $params );
+
+               if ( is_callable( $this->mNoticeCallback ) ) {
+                       call_user_func( $this->mNoticeCallback, $msg, $params );
+               } else { # No ImportReporter -> CLI
+                       echo wfMessage( $msg, $params )->text() . "\n";
+               }
+       }
+
+       /**
+        * Set debug mode...
+        * @param bool $debug
+        */
+       function setDebug( $debug ) {
+               $this->mDebug = $debug;
+       }
+
+       /**
+        * Set 'no updates' mode. In this mode, the link tables will not be updated by the importer
+        * @param bool $noupdates
+        */
+       function setNoUpdates( $noupdates ) {
+               $this->mNoUpdates = $noupdates;
+       }
+
+       /**
+        * Set a callback that displays notice messages
+        *
+        * @param callable $callback
+        * @return callable
+        */
+       public function setNoticeCallback( $callback ) {
+               return wfSetVar( $this->mNoticeCallback, $callback );
+       }
+
+       /**
+        * Sets the action to perform as each new page in the stream is reached.
+        * @param callable $callback
+        * @return callable
+        */
+       public function setPageCallback( $callback ) {
+               $previous = $this->mPageCallback;
+               $this->mPageCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the action to perform as each page in the stream is completed.
+        * Callback accepts the page title (as a Title object), a second object
+        * with the original title form (in case it's been overridden into a
+        * local namespace), and a count of revisions.
+        *
+        * @param callable $callback
+        * @return callable
+        */
+       public function setPageOutCallback( $callback ) {
+               $previous = $this->mPageOutCallback;
+               $this->mPageOutCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the action to perform as each page revision is reached.
+        * @param callable $callback
+        * @return callable
+        */
+       public function setRevisionCallback( $callback ) {
+               $previous = $this->mRevisionCallback;
+               $this->mRevisionCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the action to perform as each file upload version is reached.
+        * @param callable $callback
+        * @return callable
+        */
+       public function setUploadCallback( $callback ) {
+               $previous = $this->mUploadCallback;
+               $this->mUploadCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the action to perform as each log item reached.
+        * @param callable $callback
+        * @return callable
+        */
+       public function setLogItemCallback( $callback ) {
+               $previous = $this->mLogItemCallback;
+               $this->mLogItemCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the action to perform when site info is encountered
+        * @param callable $callback
+        * @return callable
+        */
+       public function setSiteInfoCallback( $callback ) {
+               $previous = $this->mSiteInfoCallback;
+               $this->mSiteInfoCallback = $callback;
+               return $previous;
+       }
+
+       /**
+        * Sets the factory object to use to convert ForeignTitle objects into local
+        * Title objects
+        * @param ImportTitleFactory $factory
+        */
+       public function setImportTitleFactory( $factory ) {
+               $this->importTitleFactory = $factory;
+       }
+
+       /**
+        * Set a target namespace to override the defaults
+        * @param null|int $namespace
+        * @return bool
+        */
+       public function setTargetNamespace( $namespace ) {
+               if ( is_null( $namespace ) ) {
+                       // Don't override namespaces
+                       $this->setImportTitleFactory( new NaiveImportTitleFactory() );
+                       return true;
+               } elseif (
+                       $namespace >= 0 &&
+                       MWNamespace::exists( intval( $namespace ) )
+               ) {
+                       $namespace = intval( $namespace );
+                       $this->setImportTitleFactory( new NamespaceImportTitleFactory( $namespace ) );
+                       return true;
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Set a target root page under which all pages are imported
+        * @param null|string $rootpage
+        * @return Status
+        */
+       public function setTargetRootPage( $rootpage ) {
+               $status = Status::newGood();
+               if ( is_null( $rootpage ) ) {
+                       // No rootpage
+                       $this->setImportTitleFactory( new NaiveImportTitleFactory() );
+               } elseif ( $rootpage !== '' ) {
+                       $rootpage = rtrim( $rootpage, '/' ); // avoid double slashes
+                       $title = Title::newFromText( $rootpage );
+
+                       if ( !$title || $title->isExternal() ) {
+                               $status->fatal( 'import-rootpage-invalid' );
+                       } else {
+                               if ( !MWNamespace::hasSubpages( $title->getNamespace() ) ) {
+                                       global $wgContLang;
+
+                                       $displayNSText = $title->getNamespace() == NS_MAIN
+                                               ? wfMessage( 'blanknamespace' )->text()
+                                               : $wgContLang->getNsText( $title->getNamespace() );
+                                       $status->fatal( 'import-rootpage-nosubpage', $displayNSText );
+                               } else {
+                                       // set namespace to 'all', so the namespace check in processTitle() can pass
+                                       $this->setTargetNamespace( null );
+                                       $this->setImportTitleFactory( new SubpageImportTitleFactory( $title ) );
+                               }
+                       }
+               }
+               return $status;
+       }
+
+       /**
+        * @param string $dir
+        */
+       public function setImageBasePath( $dir ) {
+               $this->mImageBasePath = $dir;
+       }
+
+       /**
+        * @param bool $import
+        */
+       public function setImportUploads( $import ) {
+               $this->mImportUploads = $import;
+       }
+
+       /**
+        * Default per-page callback. Sets up some things related to site statistics
+        * @param array $titleAndForeignTitle Two-element array, with Title object at
+        * index 0 and ForeignTitle object at index 1
+        * @return bool
+        */
+       public function beforeImportPage( $titleAndForeignTitle ) {
+               $title = $titleAndForeignTitle[0];
+               $page = WikiPage::factory( $title );
+               $this->countableCache['title_' . $title->getPrefixedText()] = $page->isCountable();
+               return true;
+       }
+
+       /**
+        * Default per-revision callback, performs the import.
+        * @param WikiRevision $revision
+        * @return bool
+        */
+       public function importRevision( $revision ) {
+               if ( !$revision->getContentHandler()->canBeUsedOn( $revision->getTitle() ) ) {
+                       $this->notice( 'import-error-bad-location',
+                               $revision->getTitle()->getPrefixedText(),
+                               $revision->getID(),
+                               $revision->getModel(),
+                               $revision->getFormat() );
+
+                       return false;
+               }
+
+               try {
+                       $dbw = wfGetDB( DB_MASTER );
+                       return $dbw->deadlockLoop( array( $revision, 'importOldRevision' ) );
+               } catch ( MWContentSerializationException $ex ) {
+                       $this->notice( 'import-error-unserialize',
+                               $revision->getTitle()->getPrefixedText(),
+                               $revision->getID(),
+                               $revision->getModel(),
+                               $revision->getFormat() );
+               }
+
+               return false;
+       }
+
+       /**
+        * Default per-revision callback, performs the import.
+        * @param WikiRevision $revision
+        * @return bool
+        */
+       public function importLogItem( $revision ) {
+               $dbw = wfGetDB( DB_MASTER );
+               return $dbw->deadlockLoop( array( $revision, 'importLogItem' ) );
+       }
+
+       /**
+        * Dummy for now...
+        * @param WikiRevision $revision
+        * @return bool
+        */
+       public function importUpload( $revision ) {
+               $dbw = wfGetDB( DB_MASTER );
+               return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
+       }
+
+       /**
+        * Mostly for hook use
+        * @param Title $title
+        * @param ForeignTitle $foreignTitle
+        * @param int $revCount
+        * @param int $sRevCount
+        * @param array $pageInfo
+        * @return bool
+        */
+       public function finishImportPage( $title, $foreignTitle, $revCount,
+                       $sRevCount, $pageInfo ) {
+
+               // Update article count statistics (T42009)
+               // The normal counting logic in WikiPage->doEditUpdates() is designed for
+               // one-revision-at-a-time editing, not bulk imports. In this situation it
+               // suffers from issues of slave lag. We let WikiPage handle the total page
+               // and revision count, and we implement our own custom logic for the
+               // article (content page) count.
+               $page = WikiPage::factory( $title );
+               $page->loadPageData( 'fromdbmaster' );
+               $content = $page->getContent();
+               if ( $content === null ) {
+                       wfDebug( __METHOD__ . ': Skipping article count adjustment for ' . $title .
+                               ' because WikiPage::getContent() returned null' );
+               } else {
+                       $editInfo = $page->prepareContentForEdit( $content );
+                       $countKey = 'title_' . $title->getPrefixedText();
+                       $countable = $page->isCountable( $editInfo );
+                       if ( array_key_exists( $countKey, $this->countableCache ) &&
+                               $countable != $this->countableCache[$countKey] ) {
+                               DeferredUpdates::addUpdate( SiteStatsUpdate::factory( array(
+                                       'articles' => ( (int)$countable - (int)$this->countableCache[$countKey] )
+                               ) ) );
+                       }
+               }
+
+               $args = func_get_args();
+               return Hooks::run( 'AfterImportPage', $args );
+       }
+
+       /**
+        * Alternate per-revision callback, for debugging.
+        * @param WikiRevision $revision
+        */
+       public function debugRevisionHandler( &$revision ) {
+               $this->debug( "Got revision:" );
+               if ( is_object( $revision->title ) ) {
+                       $this->debug( "-- Title: " . $revision->title->getPrefixedText() );
+               } else {
+                       $this->debug( "-- Title: <invalid>" );
+               }
+               $this->debug( "-- User: " . $revision->user_text );
+               $this->debug( "-- Timestamp: " . $revision->timestamp );
+               $this->debug( "-- Comment: " . $revision->comment );
+               $this->debug( "-- Text: " . $revision->text );
+       }
+
+       /**
+        * Notify the callback function of site info
+        * @param array $siteInfo
+        * @return bool|mixed
+        */
+       private function siteInfoCallback( $siteInfo ) {
+               if ( isset( $this->mSiteInfoCallback ) ) {
+                       return call_user_func_array( $this->mSiteInfoCallback,
+                                       array( $siteInfo, $this ) );
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Notify the callback function when a new "<page>" is reached.
+        * @param Title $title
+        */
+       function pageCallback( $title ) {
+               if ( isset( $this->mPageCallback ) ) {
+                       call_user_func( $this->mPageCallback, $title );
+               }
+       }
+
+       /**
+        * Notify the callback function when a "</page>" is closed.
+        * @param Title $title
+        * @param ForeignTitle $foreignTitle
+        * @param int $revCount
+        * @param int $sucCount Number of revisions for which callback returned true
+        * @param array $pageInfo Associative array of page information
+        */
+       private function pageOutCallback( $title, $foreignTitle, $revCount,
+                       $sucCount, $pageInfo ) {
+               if ( isset( $this->mPageOutCallback ) ) {
+                       $args = func_get_args();
+                       call_user_func_array( $this->mPageOutCallback, $args );
+               }
+       }
+
+       /**
+        * Notify the callback function of a revision
+        * @param WikiRevision $revision
+        * @return bool|mixed
+        */
+       private function revisionCallback( $revision ) {
+               if ( isset( $this->mRevisionCallback ) ) {
+                       return call_user_func_array( $this->mRevisionCallback,
+                                       array( $revision, $this ) );
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Notify the callback function of a new log item
+        * @param WikiRevision $revision
+        * @return bool|mixed
+        */
+       private function logItemCallback( $revision ) {
+               if ( isset( $this->mLogItemCallback ) ) {
+                       return call_user_func_array( $this->mLogItemCallback,
+                                       array( $revision, $this ) );
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * Retrieves the contents of the named attribute of the current element.
+        * @param string $attr The name of the attribute
+        * @return string The value of the attribute or an empty string if it is not set in the current
+        * element.
+        */
+       public function nodeAttribute( $attr ) {
+               return $this->reader->getAttribute( $attr );
+       }
+
+       /**
+        * Shouldn't something like this be built-in to XMLReader?
+        * Fetches text contents of the current element, assuming
+        * no sub-elements or such scary things.
+        * @return string
+        * @access private
+        */
+       public function nodeContents() {
+               if ( $this->reader->isEmptyElement ) {
+                       return "";
+               }
+               $buffer = "";
+               while ( $this->reader->read() ) {
+                       switch ( $this->reader->nodeType ) {
+                       case XMLReader::TEXT:
+                       case XMLReader::CDATA:
+                       case XMLReader::SIGNIFICANT_WHITESPACE:
+                               $buffer .= $this->reader->value;
+                               break;
+                       case XMLReader::END_ELEMENT:
+                               return $buffer;
+                       }
+               }
+
+               $this->reader->close();
+               return '';
+       }
+
+       /**
+        * Primary entry point
+        * @throws MWException
+        * @return bool
+        */
+       public function doImport() {
+               // Calls to reader->read need to be wrapped in calls to
+               // libxml_disable_entity_loader() to avoid local file
+               // inclusion attacks (bug 46932).
+               $oldDisable = libxml_disable_entity_loader( true );
+               $this->reader->read();
+
+               if ( $this->reader->localName != 'mediawiki' ) {
+                       libxml_disable_entity_loader( $oldDisable );
+                       throw new MWException( "Expected <mediawiki> tag, got " .
+                               $this->reader->localName );
+               }
+               $this->debug( "<mediawiki> tag is correct." );
+
+               $this->debug( "Starting primary dump processing loop." );
+
+               $keepReading = $this->reader->read();
+               $skip = false;
+               $rethrow = null;
+               try {
+                       while ( $keepReading ) {
+                               $tag = $this->reader->localName;
+                               $type = $this->reader->nodeType;
+
+                               if ( !Hooks::run( 'ImportHandleToplevelXMLTag', array( $this ) ) ) {
+                                       // Do nothing
+                               } elseif ( $tag == 'mediawiki' && $type == XMLReader::END_ELEMENT ) {
+                                       break;
+                               } elseif ( $tag == 'siteinfo' ) {
+                                       $this->handleSiteInfo();
+                               } elseif ( $tag == 'page' ) {
+                                       $this->handlePage();
+                               } elseif ( $tag == 'logitem' ) {
+                                       $this->handleLogItem();
+                               } elseif ( $tag != '#text' ) {
+                                       $this->warn( "Unhandled top-level XML tag $tag" );
+
+                                       $skip = true;
+                               }
+
+                               if ( $skip ) {
+                                       $keepReading = $this->reader->next();
+                                       $skip = false;
+                                       $this->debug( "Skip" );
+                               } else {
+                                       $keepReading = $this->reader->read();
+                               }
+                       }
+               } catch ( Exception $ex ) {
+                       $rethrow = $ex;
+               }
+
+               // finally
+               libxml_disable_entity_loader( $oldDisable );
+               $this->reader->close();
+
+               if ( $rethrow ) {
+                       throw $rethrow;
+               }
+
+               return true;
+       }
+
+       private function handleSiteInfo() {
+               $this->debug( "Enter site info handler." );
+               $siteInfo = array();
+
+               // Fields that can just be stuffed in the siteInfo object
+               $normalFields = array( 'sitename', 'base', 'generator', 'case' );
+
+               while ( $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XmlReader::END_ELEMENT &&
+                                       $this->reader->localName == 'siteinfo' ) {
+                               break;
+                       }
+
+                       $tag = $this->reader->localName;
+
+                       if ( $tag == 'namespace' ) {
+                               $this->foreignNamespaces[$this->nodeAttribute( 'key' )] =
+                                       $this->nodeContents();
+                       } elseif ( in_array( $tag, $normalFields ) ) {
+                               $siteInfo[$tag] = $this->nodeContents();
+                       }
+               }
+
+               $siteInfo['_namespaces'] = $this->foreignNamespaces;
+               $this->siteInfoCallback( $siteInfo );
+       }
+
+       private function handleLogItem() {
+               $this->debug( "Enter log item handler." );
+               $logInfo = array();
+
+               // Fields that can just be stuffed in the pageInfo object
+               $normalFields = array( 'id', 'comment', 'type', 'action', 'timestamp',
+                                       'logtitle', 'params' );
+
+               while ( $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
+                                       $this->reader->localName == 'logitem' ) {
+                               break;
+                       }
+
+                       $tag = $this->reader->localName;
+
+                       if ( !Hooks::run( 'ImportHandleLogItemXMLTag', array(
+                               $this, $logInfo
+                       ) ) ) {
+                               // Do nothing
+                       } elseif ( in_array( $tag, $normalFields ) ) {
+                               $logInfo[$tag] = $this->nodeContents();
+                       } elseif ( $tag == 'contributor' ) {
+                               $logInfo['contributor'] = $this->handleContributor();
+                       } elseif ( $tag != '#text' ) {
+                               $this->warn( "Unhandled log-item XML tag $tag" );
+                       }
+               }
+
+               $this->processLogItem( $logInfo );
+       }
+
+       /**
+        * @param array $logInfo
+        * @return bool|mixed
+        */
+       private function processLogItem( $logInfo ) {
+
+               $revision = new WikiRevision( $this->config );
+
+               if ( isset( $logInfo['id'] ) ) {
+                       $revision->setID( $logInfo['id'] );
+               }
+               $revision->setType( $logInfo['type'] );
+               $revision->setAction( $logInfo['action'] );
+               if ( isset( $logInfo['timestamp'] ) ) {
+                       $revision->setTimestamp( $logInfo['timestamp'] );
+               }
+               if ( isset( $logInfo['params'] ) ) {
+                       $revision->setParams( $logInfo['params'] );
+               }
+               if ( isset( $logInfo['logtitle'] ) ) {
+                       // @todo Using Title for non-local titles is a recipe for disaster.
+                       // We should use ForeignTitle here instead.
+                       $revision->setTitle( Title::newFromText( $logInfo['logtitle'] ) );
+               }
+
+               $revision->setNoUpdates( $this->mNoUpdates );
+
+               if ( isset( $logInfo['comment'] ) ) {
+                       $revision->setComment( $logInfo['comment'] );
+               }
+
+               if ( isset( $logInfo['contributor']['ip'] ) ) {
+                       $revision->setUserIP( $logInfo['contributor']['ip'] );
+               }
+
+               if ( !isset( $logInfo['contributor']['username'] ) ) {
+                       $revision->setUsername( 'Unknown user' );
+               } else {
+                       $revision->setUserName( $logInfo['contributor']['username'] );
+               }
+
+               return $this->logItemCallback( $revision );
+       }
+
+       private function handlePage() {
+               // Handle page data.
+               $this->debug( "Enter page handler." );
+               $pageInfo = array( 'revisionCount' => 0, 'successfulRevisionCount' => 0 );
+
+               // Fields that can just be stuffed in the pageInfo object
+               $normalFields = array( 'title', 'ns', 'id', 'redirect', 'restrictions' );
+
+               $skip = false;
+               $badTitle = false;
+
+               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
+                                       $this->reader->localName == 'page' ) {
+                               break;
+                       }
+
+                       $skip = false;
+
+                       $tag = $this->reader->localName;
+
+                       if ( $badTitle ) {
+                               // The title is invalid, bail out of this page
+                               $skip = true;
+                       } elseif ( !Hooks::run( 'ImportHandlePageXMLTag', array( $this,
+                                               &$pageInfo ) ) ) {
+                               // Do nothing
+                       } elseif ( in_array( $tag, $normalFields ) ) {
+                               // An XML snippet:
+                               // <page>
+                               //     <id>123</id>
+                               //     <title>Page</title>
+                               //     <redirect title="NewTitle"/>
+                               //     ...
+                               // Because the redirect tag is built differently, we need special handling for that case.
+                               if ( $tag == 'redirect' ) {
+                                       $pageInfo[$tag] = $this->nodeAttribute( 'title' );
+                               } else {
+                                       $pageInfo[$tag] = $this->nodeContents();
+                               }
+                       } elseif ( $tag == 'revision' || $tag == 'upload' ) {
+                               if ( !isset( $title ) ) {
+                                       $title = $this->processTitle( $pageInfo['title'],
+                                               isset( $pageInfo['ns'] ) ? $pageInfo['ns'] : null );
+
+                                       // $title is either an array of two titles or false.
+                                       if ( is_array( $title ) ) {
+                                               $this->pageCallback( $title );
+                                               list( $pageInfo['_title'], $foreignTitle ) = $title;
+                                       } else {
+                                               $badTitle = true;
+                                               $skip = true;
+                                       }
+                               }
+
+                               if ( $title ) {
+                                       if ( $tag == 'revision' ) {
+                                               $this->handleRevision( $pageInfo );
+                                       } else {
+                                               $this->handleUpload( $pageInfo );
+                                       }
+                               }
+                       } elseif ( $tag != '#text' ) {
+                               $this->warn( "Unhandled page XML tag $tag" );
+                               $skip = true;
+                       }
+               }
+
+               // @note $pageInfo is only set if a valid $title is processed above with
+               //       no error. If we have a valid $title, then pageCallback is called
+               //       above, $pageInfo['title'] is set and we do pageOutCallback here.
+               //       If $pageInfo['_title'] is not set, then $foreignTitle is also not
+               //       set since they both come from $title above.
+               if ( array_key_exists( '_title', $pageInfo ) ) {
+                       $this->pageOutCallback( $pageInfo['_title'], $foreignTitle,
+                                       $pageInfo['revisionCount'],
+                                       $pageInfo['successfulRevisionCount'],
+                                       $pageInfo );
+               }
+       }
+
+       /**
+        * @param array $pageInfo
+        */
+       private function handleRevision( &$pageInfo ) {
+               $this->debug( "Enter revision handler" );
+               $revisionInfo = array();
+
+               $normalFields = array( 'id', 'timestamp', 'comment', 'minor', 'model', 'format', 'text' );
+
+               $skip = false;
+
+               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
+                                       $this->reader->localName == 'revision' ) {
+                               break;
+                       }
+
+                       $tag = $this->reader->localName;
+
+                       if ( !Hooks::run( 'ImportHandleRevisionXMLTag', array(
+                               $this, $pageInfo, $revisionInfo
+                       ) ) ) {
+                               // Do nothing
+                       } elseif ( in_array( $tag, $normalFields ) ) {
+                               $revisionInfo[$tag] = $this->nodeContents();
+                       } elseif ( $tag == 'contributor' ) {
+                               $revisionInfo['contributor'] = $this->handleContributor();
+                       } elseif ( $tag != '#text' ) {
+                               $this->warn( "Unhandled revision XML tag $tag" );
+                               $skip = true;
+                       }
+               }
+
+               $pageInfo['revisionCount']++;
+               if ( $this->processRevision( $pageInfo, $revisionInfo ) ) {
+                       $pageInfo['successfulRevisionCount']++;
+               }
+       }
+
+       /**
+        * @param array $pageInfo
+        * @param array $revisionInfo
+        * @return bool|mixed
+        */
+       private function processRevision( $pageInfo, $revisionInfo ) {
+               global $wgMaxArticleSize;
+
+               // Make sure revisions won't violate $wgMaxArticleSize, which could lead to
+               // database errors and instability. Testing for revisions with only listed
+               // content models, as other content models might use serialization formats
+               // which aren't checked against $wgMaxArticleSize.
+               if ( ( !isset( $revisionInfo['model'] ) ||
+                       in_array( $revisionInfo['model'], array(
+                               'wikitext',
+                               'css',
+                               'json',
+                               'javascript',
+                               'text',
+                               ''
+                       ) ) ) &&
+                       (int)( strlen( $revisionInfo['text'] ) / 1024 ) > $wgMaxArticleSize
+               ) {
+                       throw new MWException( 'The text of ' .
+                               ( isset( $revisionInfo['id'] ) ?
+                                       "the revision with ID $revisionInfo[id]" :
+                                       'a revision'
+                               ) . " exceeds the maximum allowable size ($wgMaxArticleSize KB)" );
+               }
+
+               $revision = new WikiRevision( $this->config );
+
+               if ( isset( $revisionInfo['id'] ) ) {
+                       $revision->setID( $revisionInfo['id'] );
+               }
+               if ( isset( $revisionInfo['model'] ) ) {
+                       $revision->setModel( $revisionInfo['model'] );
+               }
+               if ( isset( $revisionInfo['format'] ) ) {
+                       $revision->setFormat( $revisionInfo['format'] );
+               }
+               $revision->setTitle( $pageInfo['_title'] );
+
+               if ( isset( $revisionInfo['text'] ) ) {
+                       $handler = $revision->getContentHandler();
+                       $text = $handler->importTransform(
+                               $revisionInfo['text'],
+                               $revision->getFormat() );
+
+                       $revision->setText( $text );
+               }
+               if ( isset( $revisionInfo['timestamp'] ) ) {
+                       $revision->setTimestamp( $revisionInfo['timestamp'] );
+               } else {
+                       $revision->setTimestamp( wfTimestampNow() );
+               }
+
+               if ( isset( $revisionInfo['comment'] ) ) {
+                       $revision->setComment( $revisionInfo['comment'] );
+               }
+
+               if ( isset( $revisionInfo['minor'] ) ) {
+                       $revision->setMinor( true );
+               }
+               if ( isset( $revisionInfo['contributor']['ip'] ) ) {
+                       $revision->setUserIP( $revisionInfo['contributor']['ip'] );
+               } elseif ( isset( $revisionInfo['contributor']['username'] ) ) {
+                       $revision->setUserName( $revisionInfo['contributor']['username'] );
+               } else {
+                       $revision->setUserName( 'Unknown user' );
+               }
+               $revision->setNoUpdates( $this->mNoUpdates );
+
+               return $this->revisionCallback( $revision );
+       }
+
+       /**
+        * @param array $pageInfo
+        * @return mixed
+        */
+       private function handleUpload( &$pageInfo ) {
+               $this->debug( "Enter upload handler" );
+               $uploadInfo = array();
+
+               $normalFields = array( 'timestamp', 'comment', 'filename', 'text',
+                                       'src', 'size', 'sha1base36', 'archivename', 'rel' );
+
+               $skip = false;
+
+               while ( $skip ? $this->reader->next() : $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
+                                       $this->reader->localName == 'upload' ) {
+                               break;
+                       }
+
+                       $tag = $this->reader->localName;
+
+                       if ( !Hooks::run( 'ImportHandleUploadXMLTag', array(
+                               $this, $pageInfo
+                       ) ) ) {
+                               // Do nothing
+                       } elseif ( in_array( $tag, $normalFields ) ) {
+                               $uploadInfo[$tag] = $this->nodeContents();
+                       } elseif ( $tag == 'contributor' ) {
+                               $uploadInfo['contributor'] = $this->handleContributor();
+                       } elseif ( $tag == 'contents' ) {
+                               $contents = $this->nodeContents();
+                               $encoding = $this->reader->getAttribute( 'encoding' );
+                               if ( $encoding === 'base64' ) {
+                                       $uploadInfo['fileSrc'] = $this->dumpTemp( base64_decode( $contents ) );
+                                       $uploadInfo['isTempSrc'] = true;
+                               }
+                       } elseif ( $tag != '#text' ) {
+                               $this->warn( "Unhandled upload XML tag $tag" );
+                               $skip = true;
+                       }
+               }
+
+               if ( $this->mImageBasePath && isset( $uploadInfo['rel'] ) ) {
+                       $path = "{$this->mImageBasePath}/{$uploadInfo['rel']}";
+                       if ( file_exists( $path ) ) {
+                               $uploadInfo['fileSrc'] = $path;
+                               $uploadInfo['isTempSrc'] = false;
+                       }
+               }
+
+               if ( $this->mImportUploads ) {
+                       return $this->processUpload( $pageInfo, $uploadInfo );
+               }
+       }
+
+       /**
+        * @param string $contents
+        * @return string
+        */
+       private function dumpTemp( $contents ) {
+               $filename = tempnam( wfTempDir(), 'importupload' );
+               file_put_contents( $filename, $contents );
+               return $filename;
+       }
+
+       /**
+        * @param array $pageInfo
+        * @param array $uploadInfo
+        * @return mixed
+        */
+       private function processUpload( $pageInfo, $uploadInfo ) {
+               $revision = new WikiRevision( $this->config );
+               $text = isset( $uploadInfo['text'] ) ? $uploadInfo['text'] : '';
+
+               $revision->setTitle( $pageInfo['_title'] );
+               $revision->setID( $pageInfo['id'] );
+               $revision->setTimestamp( $uploadInfo['timestamp'] );
+               $revision->setText( $text );
+               $revision->setFilename( $uploadInfo['filename'] );
+               if ( isset( $uploadInfo['archivename'] ) ) {
+                       $revision->setArchiveName( $uploadInfo['archivename'] );
+               }
+               $revision->setSrc( $uploadInfo['src'] );
+               if ( isset( $uploadInfo['fileSrc'] ) ) {
+                       $revision->setFileSrc( $uploadInfo['fileSrc'],
+                               !empty( $uploadInfo['isTempSrc'] ) );
+               }
+               if ( isset( $uploadInfo['sha1base36'] ) ) {
+                       $revision->setSha1Base36( $uploadInfo['sha1base36'] );
+               }
+               $revision->setSize( intval( $uploadInfo['size'] ) );
+               $revision->setComment( $uploadInfo['comment'] );
+
+               if ( isset( $uploadInfo['contributor']['ip'] ) ) {
+                       $revision->setUserIP( $uploadInfo['contributor']['ip'] );
+               }
+               if ( isset( $uploadInfo['contributor']['username'] ) ) {
+                       $revision->setUserName( $uploadInfo['contributor']['username'] );
+               }
+               $revision->setNoUpdates( $this->mNoUpdates );
+
+               return call_user_func( $this->mUploadCallback, $revision );
+       }
+
+       /**
+        * @return array
+        */
+       private function handleContributor() {
+               $fields = array( 'id', 'ip', 'username' );
+               $info = array();
+
+               if ( $this->reader->isEmptyElement ) {
+                       return $info;
+               }
+               while ( $this->reader->read() ) {
+                       if ( $this->reader->nodeType == XMLReader::END_ELEMENT &&
+                                       $this->reader->localName == 'contributor' ) {
+                               break;
+                       }
+
+                       $tag = $this->reader->localName;
+
+                       if ( in_array( $tag, $fields ) ) {
+                               $info[$tag] = $this->nodeContents();
+                       }
+               }
+
+               return $info;
+       }
+
+       /**
+        * @param string $text
+        * @param string|null $ns
+        * @return array|bool
+        */
+       private function processTitle( $text, $ns = null ) {
+               if ( is_null( $this->foreignNamespaces ) ) {
+                       $foreignTitleFactory = new NaiveForeignTitleFactory();
+               } else {
+                       $foreignTitleFactory = new NamespaceAwareForeignTitleFactory(
+                               $this->foreignNamespaces );
+               }
+
+               $foreignTitle = $foreignTitleFactory->createForeignTitle( $text,
+                       intval( $ns ) );
+
+               $title = $this->importTitleFactory->createTitleFromForeignTitle(
+                       $foreignTitle );
+
+               $commandLineMode = $this->config->get( 'CommandLineMode' );
+               if ( is_null( $title ) ) {
+                       # Invalid page title? Ignore the page
+                       $this->notice( 'import-error-invalid', $foreignTitle->getFullText() );
+                       return false;
+               } elseif ( $title->isExternal() ) {
+                       $this->notice( 'import-error-interwiki', $title->getPrefixedText() );
+                       return false;
+               } elseif ( !$title->canExist() ) {
+                       $this->notice( 'import-error-special', $title->getPrefixedText() );
+                       return false;
+               } elseif ( !$title->userCan( 'edit' ) && !$commandLineMode ) {
+                       # Do not import if the importing wiki user cannot edit this page
+                       $this->notice( 'import-error-edit', $title->getPrefixedText() );
+                       return false;
+               } elseif ( !$title->exists() && !$title->userCan( 'create' ) && !$commandLineMode ) {
+                       # Do not import if the importing wiki user cannot create this page
+                       $this->notice( 'import-error-create', $title->getPrefixedText() );
+                       return false;
+               }
+
+               return array( $title, $foreignTitle );
+       }
+}
diff --git a/includes/import/WikiRevision.php b/includes/import/WikiRevision.php
new file mode 100644 (file)
index 0000000..8705bb0
--- /dev/null
@@ -0,0 +1,698 @@
+<?php
+/**
+ * MediaWiki page data importer.
+ *
+ * Copyright © 2003,2005 Brion Vibber <brion@pobox.com>
+ * https://www.mediawiki.org/
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * Represents a revision, log entry or upload during the import process.
+ * This class sticks closely to the structure of the XML dump.
+ *
+ * @ingroup SpecialPage
+ */
+class WikiRevision {
+       /** @todo Unused? */
+       public $importer = null;
+
+       /** @var Title */
+       public $title = null;
+
+       /** @var int */
+       public $id = 0;
+
+       /** @var string */
+       public $timestamp = "20010115000000";
+
+       /**
+        * @var int
+        * @todo Can't find any uses. Public, because that's suspicious. Get clarity. */
+       public $user = 0;
+
+       /** @var string */
+       public $user_text = "";
+
+       /** @var string */
+       public $model = null;
+
+       /** @var string */
+       public $format = null;
+
+       /** @var string */
+       public $text = "";
+
+       /** @var int */
+       protected $size;
+
+       /** @var Content */
+       public $content = null;
+
+       /** @var ContentHandler */
+       protected $contentHandler = null;
+
+       /** @var string */
+       public $comment = "";
+
+       /** @var bool */
+       public $minor = false;
+
+       /** @var string */
+       public $type = "";
+
+       /** @var string */
+       public $action = "";
+
+       /** @var string */
+       public $params = "";
+
+       /** @var string */
+       public $fileSrc = '';
+
+       /** @var bool|string */
+       public $sha1base36 = false;
+
+       /**
+        * @var bool
+        * @todo Unused?
+        */
+       public $isTemp = false;
+
+       /** @var string */
+       public $archiveName = '';
+
+       protected $filename;
+
+       /** @var mixed */
+       protected $src;
+
+       /** @todo Unused? */
+       public $fileIsTemp;
+
+       /** @var bool */
+       private $mNoUpdates = false;
+
+       /** @var Config $config */
+       private $config;
+
+       public function __construct( Config $config ) {
+               $this->config = $config;
+       }
+
+       /**
+        * @param Title $title
+        * @throws MWException
+        */
+       function setTitle( $title ) {
+               if ( is_object( $title ) ) {
+                       $this->title = $title;
+               } elseif ( is_null( $title ) ) {
+                       throw new MWException( "WikiRevision given a null title in import. "
+                               . "You may need to adjust \$wgLegalTitleChars." );
+               } else {
+                       throw new MWException( "WikiRevision given non-object title in import." );
+               }
+       }
+
+       /**
+        * @param int $id
+        */
+       function setID( $id ) {
+               $this->id = $id;
+       }
+
+       /**
+        * @param string $ts
+        */
+       function setTimestamp( $ts ) {
+               # 2003-08-05T18:30:02Z
+               $this->timestamp = wfTimestamp( TS_MW, $ts );
+       }
+
+       /**
+        * @param string $user
+        */
+       function setUsername( $user ) {
+               $this->user_text = $user;
+       }
+
+       /**
+        * @param string $ip
+        */
+       function setUserIP( $ip ) {
+               $this->user_text = $ip;
+       }
+
+       /**
+        * @param string $model
+        */
+       function setModel( $model ) {
+               $this->model = $model;
+       }
+
+       /**
+        * @param string $format
+        */
+       function setFormat( $format ) {
+               $this->format = $format;
+       }
+
+       /**
+        * @param string $text
+        */
+       function setText( $text ) {
+               $this->text = $text;
+       }
+
+       /**
+        * @param string $text
+        */
+       function setComment( $text ) {
+               $this->comment = $text;
+       }
+
+       /**
+        * @param bool $minor
+        */
+       function setMinor( $minor ) {
+               $this->minor = (bool)$minor;
+       }
+
+       /**
+        * @param mixed $src
+        */
+       function setSrc( $src ) {
+               $this->src = $src;
+       }
+
+       /**
+        * @param string $src
+        * @param bool $isTemp
+        */
+       function setFileSrc( $src, $isTemp ) {
+               $this->fileSrc = $src;
+               $this->fileIsTemp = $isTemp;
+       }
+
+       /**
+        * @param string $sha1base36
+        */
+       function setSha1Base36( $sha1base36 ) {
+               $this->sha1base36 = $sha1base36;
+       }
+
+       /**
+        * @param string $filename
+        */
+       function setFilename( $filename ) {
+               $this->filename = $filename;
+       }
+
+       /**
+        * @param string $archiveName
+        */
+       function setArchiveName( $archiveName ) {
+               $this->archiveName = $archiveName;
+       }
+
+       /**
+        * @param int $size
+        */
+       function setSize( $size ) {
+               $this->size = intval( $size );
+       }
+
+       /**
+        * @param string $type
+        */
+       function setType( $type ) {
+               $this->type = $type;
+       }
+
+       /**
+        * @param string $action
+        */
+       function setAction( $action ) {
+               $this->action = $action;
+       }
+
+       /**
+        * @param array $params
+        */
+       function setParams( $params ) {
+               $this->params = $params;
+       }
+
+       /**
+        * @param bool $noupdates
+        */
+       public function setNoUpdates( $noupdates ) {
+               $this->mNoUpdates = $noupdates;
+       }
+
+       /**
+        * @return Title
+        */
+       function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * @return int
+        */
+       function getID() {
+               return $this->id;
+       }
+
+       /**
+        * @return string
+        */
+       function getTimestamp() {
+               return $this->timestamp;
+       }
+
+       /**
+        * @return string
+        */
+       function getUser() {
+               return $this->user_text;
+       }
+
+       /**
+        * @return string
+        *
+        * @deprecated Since 1.21, use getContent() instead.
+        */
+       function getText() {
+               ContentHandler::deprecated( __METHOD__, '1.21' );
+
+               return $this->text;
+       }
+
+       /**
+        * @return ContentHandler
+        */
+       function getContentHandler() {
+               if ( is_null( $this->contentHandler ) ) {
+                       $this->contentHandler = ContentHandler::getForModelID( $this->getModel() );
+               }
+
+               return $this->contentHandler;
+       }
+
+       /**
+        * @return Content
+        */
+       function getContent() {
+               if ( is_null( $this->content ) ) {
+                       $handler = $this->getContentHandler();
+                       $this->content = $handler->unserializeContent( $this->text, $this->getFormat() );
+               }
+
+               return $this->content;
+       }
+
+       /**
+        * @return string
+        */
+       function getModel() {
+               if ( is_null( $this->model ) ) {
+                       $this->model = $this->getTitle()->getContentModel();
+               }
+
+               return $this->model;
+       }
+
+       /**
+        * @return string
+        */
+       function getFormat() {
+               if ( is_null( $this->format ) ) {
+                       $this->format = $this->getContentHandler()->getDefaultFormat();
+               }
+
+               return $this->format;
+       }
+
+       /**
+        * @return string
+        */
+       function getComment() {
+               return $this->comment;
+       }
+
+       /**
+        * @return bool
+        */
+       function getMinor() {
+               return $this->minor;
+       }
+
+       /**
+        * @return mixed
+        */
+       function getSrc() {
+               return $this->src;
+       }
+
+       /**
+        * @return bool|string
+        */
+       function getSha1() {
+               if ( $this->sha1base36 ) {
+                       return Wikimedia\base_convert( $this->sha1base36, 36, 16 );
+               }
+               return false;
+       }
+
+       /**
+        * @return string
+        */
+       function getFileSrc() {
+               return $this->fileSrc;
+       }
+
+       /**
+        * @return bool
+        */
+       function isTempSrc() {
+               return $this->isTemp;
+       }
+
+       /**
+        * @return mixed
+        */
+       function getFilename() {
+               return $this->filename;
+       }
+
+       /**
+        * @return string
+        */
+       function getArchiveName() {
+               return $this->archiveName;
+       }
+
+       /**
+        * @return mixed
+        */
+       function getSize() {
+               return $this->size;
+       }
+
+       /**
+        * @return string
+        */
+       function getType() {
+               return $this->type;
+       }
+
+       /**
+        * @return string
+        */
+       function getAction() {
+               return $this->action;
+       }
+
+       /**
+        * @return string
+        */
+       function getParams() {
+               return $this->params;
+       }
+
+       /**
+        * @return bool
+        */
+       function importOldRevision() {
+               $dbw = wfGetDB( DB_MASTER );
+
+               # Sneak a single revision into place
+               $user = User::newFromName( $this->getUser() );
+               if ( $user ) {
+                       $userId = intval( $user->getId() );
+                       $userText = $user->getName();
+                       $userObj = $user;
+               } else {
+                       $userId = 0;
+                       $userText = $this->getUser();
+                       $userObj = new User;
+               }
+
+               // avoid memory leak...?
+               Title::clearCaches();
+
+               $page = WikiPage::factory( $this->title );
+               $page->loadPageData( 'fromdbmaster' );
+               if ( !$page->exists() ) {
+                       // must create the page...
+                       $pageId = $page->insertOn( $dbw );
+                       $created = true;
+                       $oldcountable = null;
+               } else {
+                       $pageId = $page->getId();
+                       $created = false;
+
+                       $prior = $dbw->selectField( 'revision', '1',
+                               array( 'rev_page' => $pageId,
+                                       'rev_timestamp' => $dbw->timestamp( $this->timestamp ),
+                                       'rev_user_text' => $userText,
+                                       'rev_comment' => $this->getComment() ),
+                               __METHOD__
+                       );
+                       if ( $prior ) {
+                               // @todo FIXME: This could fail slightly for multiple matches :P
+                               wfDebug( __METHOD__ . ": skipping existing revision for [[" .
+                                       $this->title->getPrefixedText() . "]], timestamp " . $this->timestamp . "\n" );
+                               return false;
+                       }
+               }
+
+               if ( !$pageId ) {
+                       // This seems to happen if two clients simultaneously try to import the
+                       // same page
+                       wfDebug( __METHOD__ . ': got invalid $pageId when importing revision of [[' .
+                               $this->title->getPrefixedText() . ']], timestamp ' . $this->timestamp . "\n" );
+                       return false;
+               }
+
+               // Select previous version to make size diffs correct
+               // @todo This assumes that multiple revisions of the same page are imported
+               // in order from oldest to newest.
+               $prevId = $dbw->selectField( 'revision', 'rev_id',
+                       array(
+                               'rev_page' => $pageId,
+                               'rev_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $this->timestamp ) ),
+                       ),
+                       __METHOD__,
+                       array( 'ORDER BY' => array(
+                                       'rev_timestamp DESC',
+                                       'rev_id DESC', // timestamp is not unique per page
+                               )
+                       )
+               );
+
+               # @todo FIXME: Use original rev_id optionally (better for backups)
+               # Insert the row
+               $revision = new Revision( array(
+                       'title' => $this->title,
+                       'page' => $pageId,
+                       'content_model' => $this->getModel(),
+                       'content_format' => $this->getFormat(),
+                       // XXX: just set 'content' => $this->getContent()?
+                       'text' => $this->getContent()->serialize( $this->getFormat() ),
+                       'comment' => $this->getComment(),
+                       'user' => $userId,
+                       'user_text' => $userText,
+                       'timestamp' => $this->timestamp,
+                       'minor_edit' => $this->minor,
+                       'parent_id' => $prevId,
+                       ) );
+               $revision->insertOn( $dbw );
+               $changed = $page->updateIfNewerOn( $dbw, $revision );
+
+               if ( $changed !== false && !$this->mNoUpdates ) {
+                       wfDebug( __METHOD__ . ": running updates\n" );
+                       // countable/oldcountable stuff is handled in WikiImporter::finishImportPage
+                       $page->doEditUpdates(
+                               $revision,
+                               $userObj,
+                               array( 'created' => $created, 'oldcountable' => 'no-change' )
+                       );
+               }
+
+               return true;
+       }
+
+       function importLogItem() {
+               $dbw = wfGetDB( DB_MASTER );
+
+               $user = User::newFromName( $this->getUser() );
+               if ( $user ) {
+                       $userId = intval( $user->getId() );
+                       $userText = $user->getName();
+               } else {
+                       $userId = 0;
+                       $userText = $this->getUser();
+               }
+
+               # @todo FIXME: This will not record autoblocks
+               if ( !$this->getTitle() ) {
+                       wfDebug( __METHOD__ . ": skipping invalid {$this->type}/{$this->action} log time, timestamp " .
+                               $this->timestamp . "\n" );
+                       return;
+               }
+               # Check if it exists already
+               // @todo FIXME: Use original log ID (better for backups)
+               $prior = $dbw->selectField( 'logging', '1',
+                       array( 'log_type' => $this->getType(),
+                               'log_action' => $this->getAction(),
+                               'log_timestamp' => $dbw->timestamp( $this->timestamp ),
+                               'log_namespace' => $this->getTitle()->getNamespace(),
+                               'log_title' => $this->getTitle()->getDBkey(),
+                               'log_comment' => $this->getComment(),
+                               # 'log_user_text' => $this->user_text,
+                               'log_params' => $this->params ),
+                       __METHOD__
+               );
+               // @todo FIXME: This could fail slightly for multiple matches :P
+               if ( $prior ) {
+                       wfDebug( __METHOD__
+                               . ": skipping existing item for Log:{$this->type}/{$this->action}, timestamp "
+                               . $this->timestamp . "\n" );
+                       return;
+               }
+               $log_id = $dbw->nextSequenceValue( 'logging_log_id_seq' );
+               $data = array(
+                       'log_id' => $log_id,
+                       'log_type' => $this->type,
+                       'log_action' => $this->action,
+                       'log_timestamp' => $dbw->timestamp( $this->timestamp ),
+                       'log_user' => $userId,
+                       'log_user_text' => $userText,
+                       'log_namespace' => $this->getTitle()->getNamespace(),
+                       'log_title' => $this->getTitle()->getDBkey(),
+                       'log_comment' => $this->getComment(),
+                       'log_params' => $this->params
+               );
+               $dbw->insert( 'logging', $data, __METHOD__ );
+       }
+
+       /**
+        * @return bool
+        */
+       function importUpload() {
+               # Construct a file
+               $archiveName = $this->getArchiveName();
+               if ( $archiveName ) {
+                       wfDebug( __METHOD__ . "Importing archived file as $archiveName\n" );
+                       $file = OldLocalFile::newFromArchiveName( $this->getTitle(),
+                               RepoGroup::singleton()->getLocalRepo(), $archiveName );
+               } else {
+                       $file = wfLocalFile( $this->getTitle() );
+                       $file->load( File::READ_LATEST );
+                       wfDebug( __METHOD__ . 'Importing new file as ' . $file->getName() . "\n" );
+                       if ( $file->exists() && $file->getTimestamp() > $this->getTimestamp() ) {
+                               $archiveName = $file->getTimestamp() . '!' . $file->getName();
+                               $file = OldLocalFile::newFromArchiveName( $this->getTitle(),
+                                       RepoGroup::singleton()->getLocalRepo(), $archiveName );
+                               wfDebug( __METHOD__ . "File already exists; importing as $archiveName\n" );
+                       }
+               }
+               if ( !$file ) {
+                       wfDebug( __METHOD__ . ': Bad file for ' . $this->getTitle() . "\n" );
+                       return false;
+               }
+
+               # Get the file source or download if necessary
+               $source = $this->getFileSrc();
+               $flags = $this->isTempSrc() ? File::DELETE_SOURCE : 0;
+               if ( !$source ) {
+                       $source = $this->downloadSource();
+                       $flags |= File::DELETE_SOURCE;
+               }
+               if ( !$source ) {
+                       wfDebug( __METHOD__ . ": Could not fetch remote file.\n" );
+                       return false;
+               }
+               $sha1File = ltrim( sha1_file( $source ), '0' );
+               $sha1 = $this->getSha1();
+               if ( $sha1 && ( $sha1 !== $sha1File ) ) {
+                       if ( $flags & File::DELETE_SOURCE ) {
+                               # Broken file; delete it if it is a temporary file
+                               unlink( $source );
+                       }
+                       wfDebug( __METHOD__ . ": Corrupt file $source.\n" );
+                       return false;
+               }
+
+               $user = User::newFromName( $this->user_text );
+
+               # Do the actual upload
+               if ( $archiveName ) {
+                       $status = $file->uploadOld( $source, $archiveName,
+                               $this->getTimestamp(), $this->getComment(), $user, $flags );
+               } else {
+                       $status = $file->upload( $source, $this->getComment(), $this->getComment(),
+                               $flags, false, $this->getTimestamp(), $user );
+               }
+
+               if ( $status->isGood() ) {
+                       wfDebug( __METHOD__ . ": Successful\n" );
+                       return true;
+               } else {
+                       wfDebug( __METHOD__ . ': failed: ' . $status->getHTML() . "\n" );
+                       return false;
+               }
+       }
+
+       /**
+        * @return bool|string
+        */
+       function downloadSource() {
+               if ( !$this->config->get( 'EnableUploads' ) ) {
+                       return false;
+               }
+
+               $tempo = tempnam( wfTempDir(), 'download' );
+               $f = fopen( $tempo, 'wb' );
+               if ( !$f ) {
+                       wfDebug( "IMPORT: couldn't write to temp file $tempo\n" );
+                       return false;
+               }
+
+               // @todo FIXME!
+               $src = $this->getSrc();
+               $data = Http::get( $src, array(), __METHOD__ );
+               if ( !$data ) {
+                       wfDebug( "IMPORT: couldn't fetch source $src\n" );
+                       fclose( $f );
+                       unlink( $tempo );
+                       return false;
+               }
+
+               fwrite( $f, $data );
+               fclose( $f );
+
+               return $tempo;
+       }
+
+}
index 2023b64..27a5449 100644 (file)
@@ -62,7 +62,7 @@
        "config-magic-quotes-sybase": "'''Фатално: [http://www.php.net/manual/en/ref.info.php#ini.magic-quotes-sybase magic_quotes_sybase] е активирана!'''\nТова може да повреди непредвидимо въвеждането на данните.\nИнсталацията на МедияУики е невъзможна докато тази настройка не бъде изключена.",
        "config-mbstring": "'''Фатално: [http://www.php.net/manual/en/ref.mbstring.php#mbstring.overload mbstring.func_overload] е активирана!'''\nТова може да повреди непредвидимо въвеждането на данните.\nИнсталацията на МедияУики е невъзможна докато тази настройка не бъде изключена.",
        "config-safe-mode": "'''Предупреждение:''' PHP работи в [http://www.php.net/features.safe-mode безопасен режим].\nТова може да създаде проблеми, особено ако качването на файлове е разрешено, както и при поддръжката на <code>math</code>.",
-       "config-xml-bad": "Ð\9bипÑ\81ва XML Ð¼Ð¾Ð´Ñ\83лÑ\8aÑ\82 Ð½Ð° PHP.\nÐ\9cедиÑ\8fУики Ñ\81е Ð½Ñ\83ждае Ð¾Ñ\82 Ð½Ñ\8fкои Ñ\84Ñ\83нкÑ\86ии Ð¾Ñ\82 Ñ\82ози Ð¼Ð¾Ð´Ñ\83л Ð¸ Ð½Ñ\8fма Ð´Ð° Ñ\80абоÑ\82и Ð¿Ñ\80и Ð½Ð°Ð»Ð¸Ñ\87наÑ\82а ÐºÐ¾Ð½Ñ\84игÑ\83Ñ\80аÑ\86иÑ\8f.\nÐ\9fÑ\80и Mandrake, Ð½ÐµÐ¾Ð±Ñ\85одимо Ðµ Ð´Ð° Ñ\81е Ð¸Ð½Ñ\81Ñ\82алиÑ\80а Ð¿Ð°ÐºÐµÑ\82Ñ\8aт php-xml.",
+       "config-xml-bad": "Ð\97а PHP Ð»Ð¸Ð¿Ñ\81ва XML Ð¼Ð¾Ð´Ñ\83л.\nÐ\9cедиÑ\8fÑ\83ики Ð½Ñ\8fма Ð´Ð° Ñ\80абоÑ\82и Ð² Ñ\82ази ÐºÐ¾Ð½Ñ\84игÑ\83Ñ\80аÑ\86иÑ\8f, Ñ\82Ñ\8aй ÐºÐ°Ñ\82о Ñ\81е Ð¸Ð·Ð¸Ñ\81ква Ñ\84Ñ\83нкÑ\86ионалноÑ\81Ñ\82 Ð½Ð° Ñ\82ози Ð¼Ð¾Ð´Ñ\83л.\nÐ\9cоже Ð±Ð¸ Ñ\89е Ñ\82Ñ\80Ñ\8fбва Ð´Ð° Ð¸Ð½Ñ\81Ñ\82алиÑ\80аÑ\82е RPM-пакет php-xml.",
        "config-pcre-old": "<strong>Фатална грешка:</strong> Изисква се PCRE версия $1 или по-нова.\nИзпълнимият файл на PHP е свързан с PCRE версия $2.\n[https://www.mediawiki.org/wiki/Manual:Errors_and_symptoms/Повече информация за PCRE].",
        "config-pcre-no-utf8": "'''Фатално''': Модулът PCRE на PHP изглежда е компилиран без поддръжка на PCRE_UTF8.\nЗа да функционира правилно, МедияУики изисква поддръжка на UTF-8.",
        "config-memory-raised": "<code>memory_limit</code> на PHP е $1, увеличаване до $2.",
        "config-db-install-account": "Потребителска сметка за инсталацията",
        "config-db-username": "Потребителско име за базата от данни:",
        "config-db-password": "Парола за базата от данни:",
-       "config-db-password-empty": "Въведете парола за новия потребител на базата от данни: $1.\nВъпреки че е допустимо да се създават потребители без пароли, това е незащитено действие.",
-       "config-db-username-empty": "Необходимо е да се въведе стойност за „{{int:config-db-username}}“.",
        "config-db-install-username": "Въвежда се потребителско име, което ще се използва за свързване с базата от данни по време на процеса по инсталация.\nТова не е потребителско име за сметка в МедияУики; това е потребителско име за базата от данни.",
        "config-db-install-password": "Въвежда се парола, която ще бъде използвана за свързване с базата от данни по време на инсталационния процес.\nТова не е парола за сметка в МедияУики; това е парола за базата от данни.",
        "config-db-install-help": "Въвеждат се потребителско име и парола, които ще бъдат използвани за свързване с базата от данни по време на инсталационния процес.",
        "config-nofile": "Файлът „$1“ не може да бъде открит. Да не е бил изтрит?",
        "config-extension-link": "Знаете ли, че това уики поддържа [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions разширения]?\n\nМожете да разгледате [//www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category разширенията по категория] или [//www.mediawiki.org/wiki/Extension_Matrix Матрицата на разширенията] за пълен списък на разширенията.",
        "mainpagetext": "'''Уикито беше успешно инсталирано.'''",
-       "mainpagedocfooter": "Разгледайте [//meta.wikimedia.org/wiki/Help:Contents ръководството] за подробна информация относно използването на уики софтуера.\n\n== Първи стъпки ==\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Настройки за конфигуриране]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ ЧЗВ за МедияУики]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Пощенски списък относно нови версии на МедияУики]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Локализиране на МедияУики]"
+       "mainpagedocfooter": "Разгледайте [//meta.wikimedia.org/wiki/Help:Contents ръководството] за подробна информация относно използването на уики софтуера.\n\n== Първи стъпки ==\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Настройки за конфигуриране]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ ЧЗВ за МедияУики]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Пощенски списък относно нови версии на МедияУики]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Локализиране на МедияУики]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Научете как да се справяте със спама във вашето уики]"
 }
index 0709665..757e2e2 100644 (file)
@@ -48,6 +48,8 @@
        "config-site-name-blank": "Язъе сайтан цӀе.",
        "config-project-namespace": "ЦӀерийн ана проектан:",
        "config-ns-generic": "Проект",
+       "config-ns-other-default": "MyWiki",
+       "config-admin-password": "Пароль:",
        "config-admin-password-confirm": "Кхин цӀа пароль:",
        "config-profile-wiki": "Елин вики",
        "config-profile-no-anon": "ДӀаяздар кхолла деза",
        "config-email-settings": "Электронан пошт нисяр",
        "config-enable-email": "Латае дӀайохьуьйту e-mail",
        "config-upload-deleted": "ДӀаяхна файлийн директори:",
+       "config-logo": "Логотипан URL:",
        "config-cc-again": "Хьаржа кхин цӀа…",
        "config-skins": "Кечяран тема",
        "config-skins-use-as-default": "ХӀара тема Ӏад йитарца лелае",
        "config-skins-must-enable-some": "Ахьа цхьаъ мукъа тема латина йита езаш ю.",
        "config-skins-must-enable-default": "Ӏад йитарца йолу тема латина хила еза.",
+       "config-install-step-done": "кхочушдина",
+       "config-install-step-failed": "тар цаделира",
        "config-install-user": "Декъашхочун хаамийн база кхоллар",
        "config-install-user-alreadyexists": "Декъашхо «$1» хӀинцале волуш ву",
        "config-install-user-create-failed": "Декъашхо «$1» кхолла цаделира: $2",
index 58fccb5..6130399 100644 (file)
@@ -56,6 +56,8 @@
        "config-unicode-using-intl": "Χρησιμοποιώντας την [http://pecl.php.net/intl επέκταση intl PECL] για κανονικοποίηση Unicode.",
        "config-unicode-pure-php-warning": "<strong>Προειδοποίηση:</strong> Η [http://pecl.php.net/intl επέκταση intl PECL] δεν είναι διαθέσιμη για να χειριστεί την κανονικοποίηση Unicode, επιστρέφουμε στην αργή αμιγώς PHP εφαρμογή.\nΕάν λειτουργείτε έναν ιστότοπο υψηλής επισκεψιμότητας, θα πρέπει να ρίξετε μια ματιά στην [//www.mediawiki.org/wiki/Special:MyLanguage/Unicode_normalization_considerations κανονικοποίηση Unicode].",
        "config-outdated-sqlite": "<strong>Προειδοποίηση:</strong> έχετε την SQLite $1, που είναι χαμηλότερα απαιτούμενη έκδοση $2. SQLite δεν θα είναι διαθέσιμη.",
+       "config-register-globals-error": "<strong>Σφάλμα: PHP <code>[http://php.net/register_globals τις register_globals]</code> η επιλογή είναι ενεργοποιημένη.\nΘα πρέπει να απενεργοποιηθεί για να συνεχίσετε με την εγκατάσταση.</strong>\nΔείτε [https://www.mediawiki.org/wiki/register_globals https://www.mediawiki.org/wiki/register_globals] για βοήθεια σχετικά με το πώς να το κάνετε.",
+       "config-safe-mode": "<strong>Προειδοποίηση:</strong> Το  PHP [http://www.php.net/features.safe-mode safe mode] είναι ενεργό.\nΑυτό μπορεί να προκαλέσει προβλήματα, ιδιαίτερα εάν η χρήση αρχείων και  υποστήριξη <code>math</code>.",
        "config-xml-bad": "Το PHP XML module λείπει.\nΤο MediaWiki απαιτεί λειτουργίες σε αυτήν την ενότητα και δεν θα λειτουργήσει με αυτή την παραμετροποίηση. \nΜπορεί να χρειαστεί να εγκαταστήσετε το πακέτο php-xml RPM.",
        "config-pcre-no-utf8": "<strong>Κρίσιμο:</strong> Το PCRE module της PHP  φαίνεται να είναι μεταγλωτισμένο χωρίς υποσήριξη  PCRE_UTF8.\nΤο MediaWiki απαιτεί υποστήριξη UTF-8 για να λειτουργήσει σωστά.",
        "config-memory-raised": "Το  <code>memory_limit</code> της PHP είναι  $1 και αυξήθηκε σε  $2.",
        "config-db-install-account": "Λογαριασμός χρήστη για την εγκατάσταση",
        "config-db-username": "Όνομα χρήστη βάσης δεδομένων:",
        "config-db-password": "Κωδικός πρόσβασης βάσης δεδομένων:",
+       "config-db-install-help": "Εισάγετε το όνομα χρήστη και τον κωδικό πρόσβασης που θα χρησιμοποιηθεί για τη σύνδεση με τη βάση δεδομένων κατά τη διάρκεια της διαδικασίας εγκατάστασης.",
        "config-db-account-lock": "Χρησιμοποιήστε το ίδιο όνομα χρήστη και κωδικό πρόσβασης στη διάρκεια της κανονικής λειτουργίας",
        "config-db-wiki-account": "Λογαριασμός χρήστη για κανονική λειτουργία",
+       "config-db-wiki-help": "Εισάγετε το όνομα χρήστη και τον κωδικό πρόσβασης που θα χρησιμοποιηθεί για τη σύνδεση με τη βάση δεδομένων κατά τη διάρκεια της κανονικής λειτουργίας του wiki.\nΕάν ο λογαριασμός δεν υπάρχει, και o λογαριασμός εγκατάστασης  έχει επαρκή δικαιώματα, αυτός ο λογαριασμός χρήστη θα δημιουργηθεί με τα ελάχιστα δικαιώματα που απαιτούνται για να λειτουργήσετε το wiki.",
        "config-db-prefix": "Πρόθεμα πίνακα βάσης δεδομένων:",
        "config-db-prefix-help": "Εάν χρειάζεστε να μοιραστείτε μία βάση δεδομένων μεταξύ πολλαπλών wikis, ή μεταξύ του MediaWiki και μιας άλλης web εφαρμογής, μπορείτε να επιλέξετε να προσθέσετε ένα πρόθεμα όλα τα ονόματα πίνακα για να αποφεύγονται οι συγκρούσεις.\nΜην χρησιμοποιείτε κενά διαστήματα.\n\nΑυτό το πεδίο αφήνεται συνήθως άδειο.",
        "config-db-charset": "Σύνολο χαρακτήρων βάσης δεδομένων",
index fd7dd5c..ac76621 100644 (file)
        "config-db-web-account": "Dä Zohjang zor Daatebangk för et Wiki",
        "config-db-web-help": "Donn ene Name un e Paßwoot för der Zohjang zor Daatebangk för et Wiki em nomaale Bedrief aanjävve.",
        "config-db-web-account-same": "Donn dersällve Zohjang nämme, wi heh beim Opsäze.",
-       "config-db-web-create": "Donn dä Zohjang aanlääje, wann dä noch nit doh es.",
+       "config-db-web-create": "Donn dä Zohjang aanlähje, wann dä noch nit doh es.",
        "config-db-web-no-create-privs": "Dä Zohjang för et Opsäze es nit berääschtesch, ene ander Zohjan enzereeschte.\nDä aanjejovve Zohjang för der Nomaalbedrief moß dröm schunn enjersht sen!",
        "config-mysql-engine": "De Zoot udder et Fommaat vun de Tabälle:",
        "config-mysql-innodb": "InnoDB",
index ebd99ba..708536f 100644 (file)
        "config-oracle-temp-ts": "Тимчасовий простір таблиць:",
        "config-type-mysql": "MySQL (або сумісний)",
        "config-type-mssql": "Microsoft SQL Server",
-       "config-support-info": "MediaWiki підтримує таки системи баз даних:\n\n$1\n\nЯкщо Ви не бачите серед перерахованих систему баз даних, яку використовуєте, виконайте вказівки, вказані вище, щоб увімкнути підтримку.",
+       "config-support-info": "MediaWiki підтримує такі системи баз даних:\n\n$1\n\nЯкщо Ви не бачите серед перерахованих систему баз даних, яку використовуєте, виконайте вказівки, вказані вище, щоб увімкнути підтримку.",
        "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] є основною для MediaWiki і найкраще підтримується.  MediaWiki також працює із [{{int:version-db-mariadb-url}} MariaDB] та [{{int:version-db-percona-url}} Percona Server], які сумісні з MySQL.  ([http://www.php.net/manual/en/mysqli.installation.php як зібрати PHP з допомогою MySQL])",
        "config-dbsupport-postgres": "*  [{{int:version-db-postgres-url}} PostgreSQL] — популярна відкрита СУБД, альтернатива MySQL. Можуть зустрічатись деякі невеликі невиправлені помилки, не рекомендується використовувати у робочій системі.([http://www.php.net/manual/en/pgsql.installation.php як зібрати PHP з допомогою PostgreSQL]).",
        "config-dbsupport-sqlite": "*  [{{int:version-db-sqlite-url}} SQLite] — легка система баз даних, яка дуже добре підтримується. ([http://www.php.net/manual/en/pdo.installation.php Як зібрати PHP з допомогою SQLite], що використовує PDO)",
index 283ad3c..1443452 100644 (file)
@@ -2,10 +2,12 @@
        "@metadata": {
                "authors": [
                        "Wu-chinese.com",
-                       "Poiuyt"
+                       "Poiuyt",
+                       "飞舞回堂前"
                ]
        },
        "config-information": "信息",
+       "config-page-language": "闲话",
        "mainpagetext": "'''MediaWiki安装成功哉!'''",
        "mainpagedocfooter": "请访问[//meta.wikimedia.org/wiki/Help:Contents 用户手册]以获得使用此维基软件个信息!\n\n== 入门 ==\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings MediaWiki 配置设置列表]\n* [//www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ MediaWiki 常见问题解答]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki 发布邮件列表]"
 }
index 8427adb..993f3de 100644 (file)
@@ -386,6 +386,9 @@ class ManualLogEntry extends LogEntryBase {
        /** @var string Comment for the log entry */
        protected $comment = '';
 
+       /** @var int A rev id associated to the log entry */
+       protected $revId = 0;
+
        /** @var int Deletion state of the log entry */
        protected $deleted;
 
@@ -484,6 +487,17 @@ class ManualLogEntry extends LogEntryBase {
                $this->comment = $comment;
        }
 
+       /**
+        * Set an associated revision id.
+        *
+        * @since 1.27
+        *
+        * @param int $revId
+        */
+       public function setAssociatedRevId( $revId ) {
+               $this->revId = $revId;
+       }
+
        /**
         * Set the 'legacy' flag
         *
@@ -608,7 +622,8 @@ class ManualLogEntry extends LogEntryBase {
                        $this->getComment(),
                        LogEntryBase::makeParamBlob( $this->getParameters() ),
                        $newId,
-                       $formatter->getIRCActionComment() // Used for IRC feeds
+                       $formatter->getIRCActionComment(), // Used for IRC feeds
+                       $this->getAssociatedRevId() // Used for e.g. moves and uploads
                );
        }
 
@@ -632,6 +647,12 @@ class ManualLogEntry extends LogEntryBase {
                if ( $to === 'udp' || $to === 'rcandudp' ) {
                        $rc->notifyRCFeeds();
                }
+
+               // Log the autopatrol if an associated rev id was passed
+               if ( $this->getAssociatedRevId() > 0 &&
+                       $rc->getAttribute( 'rc_patrolled' ) === 1 ) {
+                       PatrolLog::record( $rc, true, $this->getPerformer() );
+               }
        }
 
        // LogEntry->
@@ -672,6 +693,14 @@ class ManualLogEntry extends LogEntryBase {
                return $this->comment;
        }
 
+       /**
+        * @since 1.27
+        * @return int
+        */
+       public function getAssociatedRevId() {
+               return $this->revId;
+       }
+
        /**
         * @since 1.25
         * @return bool
index 2e28917..6b70cec 100644 (file)
@@ -211,42 +211,6 @@ class LogPage {
                return in_array( $type, LogPage::validTypes() );
        }
 
-       /**
-        * Get the name for the given log type
-        *
-        * @param string $type Log type
-        * @return string Log name
-        * @deprecated since 1.19, warnings in 1.21. Use getName()
-        */
-       public static function logName( $type ) {
-               global $wgLogNames;
-
-               wfDeprecated( __METHOD__, '1.21' );
-
-               if ( isset( $wgLogNames[$type] ) ) {
-                       return str_replace( '_', ' ', wfMessage( $wgLogNames[$type] )->text() );
-               } else {
-                       // Bogus log types? Perhaps an extension was removed.
-                       return $type;
-               }
-       }
-
-       /**
-        * Get the log header for the given log type
-        *
-        * @todo handle missing log types
-        * @param string $type Logtype
-        * @return string Header text of this logtype
-        * @deprecated since 1.19, warnings in 1.21. Use getDescription()
-        */
-       public static function logHeader( $type ) {
-               global $wgLogHeaders;
-
-               wfDeprecated( __METHOD__, '1.21' );
-
-               return wfMessage( $wgLogHeaders[$type] )->parse();
-       }
-
        /**
         * Generate text for a log entry.
         * Only LogFormatter should call this function.
index 8fb760d..00ac127 100644 (file)
@@ -3559,64 +3559,6 @@ class WikiPage implements Page, IDBAccessObject {
                }
        }
 
-       /**
-        * Return a list of templates used by this article.
-        * Uses the templatelinks table
-        *
-        * @deprecated since 1.19; use Title::getTemplateLinksFrom()
-        * @return array Array of Title objects
-        */
-       public function getUsedTemplates() {
-               return $this->mTitle->getTemplateLinksFrom();
-       }
-
-       /**
-        * This function is called right before saving the wikitext,
-        * so we can do things like signatures and links-in-context.
-        *
-        * @deprecated since 1.19; use Parser::preSaveTransform() instead
-        * @param string $text Article contents
-        * @param User $user User doing the edit
-        * @param ParserOptions $popts Parser options, default options for
-        *   the user loaded if null given
-        * @return string Article contents with altered wikitext markup (signatures
-        *      converted, {{subst:}}, templates, etc.)
-        */
-       public function preSaveTransform( $text, User $user = null, ParserOptions $popts = null ) {
-               global $wgParser, $wgUser;
-
-               wfDeprecated( __METHOD__, '1.19' );
-
-               $user = is_null( $user ) ? $wgUser : $user;
-
-               if ( $popts === null ) {
-                       $popts = ParserOptions::newFromUser( $user );
-               }
-
-               return $wgParser->preSaveTransform( $text, $this->mTitle, $user, $popts );
-       }
-
-       /**
-        * Update the article's restriction field, and leave a log entry.
-        *
-        * @deprecated since 1.19
-        * @param array $limit Set of restriction keys
-        * @param string $reason
-        * @param int &$cascade Set to false if cascading protection isn't allowed.
-        * @param array $expiry Per restriction type expiration
-        * @param User $user The user updating the restrictions
-        * @return bool True on success
-        */
-       public function updateRestrictions(
-               $limit = array(), $reason = '', &$cascade = 0, $expiry = array(), User $user = null
-       ) {
-               global $wgUser;
-
-               $user = is_null( $user ) ? $wgUser : $user;
-
-               return $this->doUpdateRestrictions( $limit, $expiry, $cascade, $reason, $user )->isOK();
-       }
-
        /**
         * Returns a list of updates to be performed when this page is deleted. The
         * updates should remove any information about this page from secondary data
index eaecedd..7b4a650 100644 (file)
@@ -5276,9 +5276,8 @@ class Parser {
        }
 
        /**
-        * @todo FIXME: Update documentation. makeLinkObj() is deprecated.
         * Replace "<!--LINK-->" link placeholders with actual links, in the buffer
-        * Placeholders created in Skin::makeLinkObj()
+        * Placeholders created in Linker::link()
         *
         * @param string $text
         * @param int $options
index 84e873d..aac0c79 100644 (file)
@@ -23,6 +23,7 @@ class ExtensionProcessor implements Processor {
                'AvailableRights',
                'ContentHandlers',
                'ConfigRegistry',
+               'CentralIdLookupProviders',
                'RateLimits',
                'RecentChangesFlags',
                'MediaHandlers',
@@ -44,6 +45,7 @@ class ExtensionProcessor implements Processor {
                'APIPropModules',
                'APIListModules',
                'ValidSkinNames',
+               'FeedClasses',
        );
 
        /**
@@ -57,8 +59,7 @@ class ExtensionProcessor implements Processor {
                'wgGroupPermissions' => 'array_plus_2d',
                'wgRevokePermissions' => 'array_plus_2d',
                'wgHooks' => 'array_merge_recursive',
-               // credits are handled in the ExtensionRegistry
-               // 'wgExtensionCredits' => 'array_merge_recursive',
+               'wgExtensionCredits' => 'array_merge_recursive',
                'wgExtraGenderNamespaces' => 'array_plus',
                'wgNamespacesWithSubpages' => 'array_plus',
                'wgNamespaceContentModels' => 'array_plus',
@@ -102,6 +103,7 @@ class ExtensionProcessor implements Processor {
                'ParserTestFiles',
                'AutoloadClasses',
                'manifest_version',
+               'load_composer_autoloader',
        );
 
        /**
@@ -293,6 +295,11 @@ class ExtensionProcessor implements Processor {
                }
        }
 
+       /**
+        * @param string $path
+        * @param array $info
+        * @throws Exception
+        */
        protected function extractCredits( $path, array $info ) {
                $credits = array(
                        'path' => $path,
@@ -304,7 +311,18 @@ class ExtensionProcessor implements Processor {
                        }
                }
 
-               $this->credits[$credits['name']] = $credits;
+               $name = $credits['name'];
+
+               // If someone is loading the same thing twice, throw
+               // a nice error (T121493)
+               if ( isset( $this->credits[$name] ) ) {
+                       $firstPath = $this->credits[$name]['path'];
+                       $secondPath = $credits['path'];
+                       throw new Exception( "It was attempted to load $name twice, from $firstPath and $secondPath." );
+               }
+
+               $this->credits[$name] = $credits;
+               $this->globals['wgExtensionCredits'][$credits['type']][] = $credits;
        }
 
        /**
@@ -353,4 +371,15 @@ class ExtensionProcessor implements Processor {
                        $array[$name] = $value;
                }
        }
+
+       public function getExtraAutoloaderPaths( $dir, array $info ) {
+               $paths = array();
+               if ( isset( $info['load_composer_autoloader'] ) && $info['load_composer_autoloader'] === true ) {
+                       $path = "$dir/vendor/autoload.php";
+                       if ( file_exists( $path ) ) {
+                               $paths[] = $path;
+                       }
+               }
+               return $paths;
+       }
 }
index 732b4a0..86be86b 100644 (file)
@@ -29,7 +29,7 @@ class ExtensionRegistry {
        /**
         * Bump whenever the registration cache needs resetting
         */
-       const CACHE_VERSION = 1;
+       const CACHE_VERSION = 3;
 
        /**
         * Special key that defines the merge strategy
@@ -173,6 +173,7 @@ class ExtensionRegistry {
        public function readFromQueue( array $queue ) {
                global $wgVersion;
                $autoloadClasses = array();
+               $autoloaderPaths = array();
                $processor = new ExtensionProcessor();
                $incompatible = array();
                $coreVersionParser = new CoreVersionChecker( $wgVersion );
@@ -208,6 +209,9 @@ class ExtensionRegistry {
                                        . '.';
                                continue;
                        }
+                       // Get extra paths for later inclusion
+                       $autoloaderPaths = array_merge( $autoloaderPaths,
+                               $processor->getExtraAutoloaderPaths( dirname( $path ), $info ) );
                        // Compatible, read and extract info
                        $processor->extractInfo( $path, $info, $version );
                }
@@ -221,11 +225,8 @@ class ExtensionRegistry {
                $data = $processor->getExtractedInfo();
                // Need to set this so we can += to it later
                $data['globals']['wgAutoloadClasses'] = array();
-               foreach ( $data['credits'] as $credit ) {
-                       $data['globals']['wgExtensionCredits'][$credit['type']][] = $credit;
-               }
-               $data['globals']['wgExtensionCredits'][self::MERGE_STRATEGY] = 'array_merge_recursive';
                $data['autoload'] = $autoloadClasses;
+               $data['autoloaderPaths'] = $autoloaderPaths;
                return $data;
        }
 
@@ -279,8 +280,11 @@ class ExtensionRegistry {
                        call_user_func( $cb );
                }
 
-               $this->loaded += $info['credits'];
+               foreach ( $info['autoloaderPaths'] as $path ) {
+                       require_once $path;
+               }
 
+               $this->loaded += $info['credits'];
                if ( $info['attributes'] ) {
                        if ( !$this->attributes ) {
                                $this->attributes = $info['attributes'];
index e5669d2..a4100bb 100644 (file)
@@ -40,4 +40,14 @@ interface Processor {
         *              like 'MediaWiki'. Values are a constraint string like "1.26.1".
         */
        public function getRequirements( array $info );
+
+       /**
+        * Get the path for additional autoloaders, e.g. the one of Composer.
+        *
+        * @param string $dir
+        * @param array $info
+        * @return array Containing the paths for autoloader file(s).
+        * @since 1.27
+        */
+       public function getExtraAutoloaderPaths( $dir, array $info );
 }
diff --git a/includes/search/SearchNearMatchResultSet.php b/includes/search/SearchNearMatchResultSet.php
new file mode 100644 (file)
index 0000000..cb4f81d
--- /dev/null
@@ -0,0 +1,26 @@
+<?php
+/**
+ * A SearchResultSet wrapper for SearchEngine::getNearMatch
+ */
+class SearchNearMatchResultSet extends SearchResultSet {
+       private $fetched = false;
+
+       /**
+        * @param Title|null $match Title if matched, else null
+        */
+       public function __construct( $match ) {
+               $this->result = $match;
+       }
+
+       public function numRows() {
+               return $this->result ? 1 : 0;
+       }
+
+       public function next() {
+               if ( $this->fetched || !$this->result ) {
+                       return false;
+               }
+               $this->fetched = true;
+               return SearchResult::newFromTitle( $this->result );
+       }
+}
index 8fb04e4..eccd36e 100644 (file)
@@ -171,89 +171,3 @@ class SearchResultSet {
                return $this->containedSyntax;
        }
 }
-
-/**
- * This class is used for different SQL-based search engines shipped with MediaWiki
- * @ingroup Search
- */
-class SqlSearchResultSet extends SearchResultSet {
-       protected $resultSet;
-       protected $terms;
-       protected $totalHits;
-
-       function __construct( $resultSet, $terms, $total = null ) {
-               $this->resultSet = $resultSet;
-               $this->terms = $terms;
-               $this->totalHits = $total;
-       }
-
-       function termMatches() {
-               return $this->terms;
-       }
-
-       function numRows() {
-               if ( $this->resultSet === false ) {
-                       return false;
-               }
-
-               return $this->resultSet->numRows();
-       }
-
-       function next() {
-               if ( $this->resultSet === false ) {
-                       return false;
-               }
-
-               $row = $this->resultSet->fetchObject();
-               if ( $row === false ) {
-                       return false;
-               }
-
-               return SearchResult::newFromTitle(
-                       Title::makeTitle( $row->page_namespace, $row->page_title )
-               );
-       }
-
-       function free() {
-               if ( $this->resultSet === false ) {
-                       return false;
-               }
-
-               $this->resultSet->free();
-       }
-
-       function getTotalHits() {
-               if ( !is_null( $this->totalHits ) ) {
-                       return $this->totalHits;
-               } else {
-                       // Special:Search expects a number here.
-                       return $this->numRows();
-               }
-       }
-}
-
-/**
- * A SearchResultSet wrapper for SearchEngine::getNearMatch
- */
-class SearchNearMatchResultSet extends SearchResultSet {
-       private $fetched = false;
-
-       /**
-        * @param Title|null $match Title if matched, else null
-        */
-       public function __construct( $match ) {
-               $this->result = $match;
-       }
-
-       public function numRows() {
-               return $this->result ? 1 : 0;
-       }
-
-       public function next() {
-               if ( $this->fetched || !$this->result ) {
-                       return false;
-               }
-               $this->fetched = true;
-               return SearchResult::newFromTitle( $this->result );
-       }
-}
diff --git a/includes/search/SqlSearchResultSet.php b/includes/search/SqlSearchResultSet.php
new file mode 100644 (file)
index 0000000..7a6aaf7
--- /dev/null
@@ -0,0 +1,60 @@
+<?php
+/**
+ * This class is used for different SQL-based search engines shipped with MediaWiki
+ * @ingroup Search
+ */
+class SqlSearchResultSet extends SearchResultSet {
+       protected $resultSet;
+       protected $terms;
+       protected $totalHits;
+
+       function __construct( $resultSet, $terms, $total = null ) {
+               $this->resultSet = $resultSet;
+               $this->terms = $terms;
+               $this->totalHits = $total;
+       }
+
+       function termMatches() {
+               return $this->terms;
+       }
+
+       function numRows() {
+               if ( $this->resultSet === false ) {
+                       return false;
+               }
+
+               return $this->resultSet->numRows();
+       }
+
+       function next() {
+               if ( $this->resultSet === false ) {
+                       return false;
+               }
+
+               $row = $this->resultSet->fetchObject();
+               if ( $row === false ) {
+                       return false;
+               }
+
+               return SearchResult::newFromTitle(
+                       Title::makeTitle( $row->page_namespace, $row->page_title )
+               );
+       }
+
+       function free() {
+               if ( $this->resultSet === false ) {
+                       return false;
+               }
+
+               $this->resultSet->free();
+       }
+
+       function getTotalHits() {
+               if ( !is_null( $this->totalHits ) ) {
+                       return $this->totalHits;
+               } else {
+                       // Special:Search expects a number here.
+                       return $this->numRows();
+               }
+       }
+}
diff --git a/includes/site/MediaWikiPageNameNormalizer.php b/includes/site/MediaWikiPageNameNormalizer.php
new file mode 100644 (file)
index 0000000..f358bd4
--- /dev/null
@@ -0,0 +1,196 @@
+<?php
+
+namespace MediaWiki\Site;
+
+use FormatJson;
+use Http;
+use UtfNormal\Validator;
+
+/**
+ * Service for normalizing a page name using a MediaWiki api.
+ *
+ * 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
+ *
+ * @since 1.27
+ *
+ * @license GNU GPL v2+
+ * @author John Erling Blad < jeblad@gmail.com >
+ * @author Daniel Kinzler
+ * @author Jeroen De Dauw < jeroendedauw@gmail.com >
+ * @author Marius Hoch
+ */
+class MediaWikiPageNameNormalizer {
+
+       /**
+        * Returns the normalized form of the given page title, using the
+        * normalization rules of the given site. If the given title is a redirect,
+        * the redirect weill be resolved and the redirect target is returned.
+        *
+        * @note This actually makes an API request to the remote site, so beware
+        *   that this function is slow and depends on an external service.
+        *
+        * @see Site::normalizePageName
+        *
+        * @since 1.27
+        *
+        * @param string $pageName
+        * @param string $apiUrl
+        *
+        * @return string
+        * @throws \MWException
+        */
+       public function normalizePageName( $pageName, $apiUrl ) {
+
+               // Check if we have strings as arguments.
+               if ( !is_string( $pageName ) ) {
+                       throw new \MWException( '$pageName must be a string' );
+               }
+
+               // Go on call the external site
+
+               // Make sure the string is normalized into NFC (due to T42017)
+               // but do nothing to the whitespaces, that should work appropriately.
+               // @see https://phabricator.wikimedia.org/T42017
+               $pageName = Validator::cleanUp( $pageName );
+
+               // Build the args for the specific call
+               $args = array(
+                       'action' => 'query',
+                       'prop' => 'info',
+                       'redirects' => true,
+                       'converttitles' => true,
+                       'format' => 'json',
+                       'titles' => $pageName,
+                       // @todo options for maxlag and maxage
+                       // Note that maxlag will lead to a long delay before a reply is made,
+                       // but that maxage can avoid the extreme delay. On the other hand
+                       // maxage could be nice to use anyhow as it stops unnecessary requests.
+                       // Also consider smaxage if maxage is used.
+               );
+
+               $url = wfAppendQuery( $apiUrl, $args );
+
+               // Go on call the external site
+               // @todo we need a good way to specify a timeout here.
+               $ret = Http::get( $url, array(), __METHOD__ );
+
+               if ( $ret === false ) {
+                       wfDebugLog( "MediaWikiSite", "call to external site failed: $url" );
+                       return false;
+               }
+
+               $data = FormatJson::decode( $ret, true );
+
+               if ( !is_array( $data ) ) {
+                       wfDebugLog( "MediaWikiSite", "call to <$url> returned bad json: " . $ret );
+                       return false;
+               }
+
+               $page = static::extractPageRecord( $data, $pageName );
+
+               if ( isset( $page['missing'] ) ) {
+                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for a missing page title! "
+                               . $ret );
+                       return false;
+               }
+
+               if ( isset( $page['invalid'] ) ) {
+                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for an invalid page title! "
+                               . $ret );
+                       return false;
+               }
+
+               if ( !isset( $page['title'] ) ) {
+                       wfDebugLog( "MediaWikiSite", "call to <$url> did not return a page title! " . $ret );
+                       return false;
+               }
+
+               return $page['title'];
+       }
+
+       /**
+        * Get normalization record for a given page title from an API response.
+        *
+        * @param array $externalData A reply from the API on a external server.
+        * @param string $pageTitle Identifies the page at the external site, needing normalization.
+        *
+        * @return array|bool A 'page' structure representing the page identified by $pageTitle.
+        */
+       private static function extractPageRecord( $externalData, $pageTitle ) {
+               // If there is a special case with only one returned page
+               // we can cheat, and only return
+               // the single page in the "pages" substructure.
+               if ( isset( $externalData['query']['pages'] ) ) {
+                       $pages = array_values( $externalData['query']['pages'] );
+                       if ( count( $pages ) === 1 ) {
+                               return $pages[0];
+                       }
+               }
+               // This is only used during internal testing, as it is assumed
+               // a more optimal (and lossfree) storage.
+               // Make initial checks and return if prerequisites are not meet.
+               if ( !is_array( $externalData ) || !isset( $externalData['query'] ) ) {
+                       return false;
+               }
+               // Loop over the tree different named structures, that otherwise are similar
+               $structs = array(
+                       'normalized' => 'from',
+                       'converted' => 'from',
+                       'redirects' => 'from',
+                       'pages' => 'title'
+               );
+               foreach ( $structs as $listId => $fieldId ) {
+                       // Check if the substructure exist at all.
+                       if ( !isset( $externalData['query'][$listId] ) ) {
+                               continue;
+                       }
+                       // Filter the substructure down to what we actually are using.
+                       $collectedHits = array_filter(
+                               array_values( $externalData['query'][$listId] ),
+                               function ( $a ) use ( $fieldId, $pageTitle ) {
+                                       return $a[$fieldId] === $pageTitle;
+                               }
+                       );
+                       // If still looping over normalization, conversion or redirects,
+                       // then we need to keep the new page title for later rounds.
+                       if ( $fieldId === 'from' && is_array( $collectedHits ) ) {
+                               switch ( count( $collectedHits ) ) {
+                                       case 0:
+                                               break;
+                                       case 1:
+                                               $pageTitle = $collectedHits[0]['to'];
+                                               break;
+                                       default:
+                                               return false;
+                               }
+                       } elseif ( $fieldId === 'title' && is_array( $collectedHits ) ) {
+                               // If on the pages structure we should prepare for returning.
+
+                               switch ( count( $collectedHits ) ) {
+                                       case 0:
+                                               return false;
+                                       case 1:
+                                               return array_shift( $collectedHits );
+                                       default:
+                                               return false;
+                               }
+                       }
+               }
+               // should never be here
+               return false;
+       }
+
+}
index 029919c..0f7e5d7 100644 (file)
@@ -1,4 +1,7 @@
 <?php
+
+use MediaWiki\Site\MediaWikiPageNameNormalizer;
+
 /**
  * Class representing a MediaWiki site.
  *
@@ -96,13 +99,6 @@ class MediaWikiSite extends Site {
         * @throws MWException
         */
        public function normalizePageName( $pageName ) {
-
-               // Check if we have strings as arguments.
-               if ( !is_string( $pageName ) ) {
-                       throw new MWException( '$pageName must be a string' );
-               }
-
-               // Go on call the external site
                if ( defined( 'MW_PHPUNIT_TEST' ) ) {
                        // If the code is under test, don't call out to other sites, just
                        // normalize locally.
@@ -112,140 +108,17 @@ class MediaWikiSite extends Site {
                        $t = Title::newFromText( $pageName );
                        return $t->getPrefixedText();
                } else {
+                       static $mediaWikiPageNameNormalizer = null;
 
-                       // Make sure the string is normalized into NFC (due to T42017)
-                       // but do nothing to the whitespaces, that should work appropriately.
-                       // @see https://phabricator.wikimedia.org/T42017
-                       $pageName = UtfNormal\Validator::cleanUp( $pageName );
-
-                       // Build the args for the specific call
-                       $args = array(
-                               'action' => 'query',
-                               'prop' => 'info',
-                               'redirects' => true,
-                               'converttitles' => true,
-                               'format' => 'json',
-                               'titles' => $pageName,
-                               // @todo options for maxlag and maxage
-                               // Note that maxlag will lead to a long delay before a reply is made,
-                               // but that maxage can avoid the extreme delay. On the other hand
-                               // maxage could be nice to use anyhow as it stops unnecessary requests.
-                               // Also consider smaxage if maxage is used.
-                       );
-
-                       $url = wfAppendQuery( $this->getFileUrl( 'api.php' ), $args );
-
-                       // Go on call the external site
-                       // @todo we need a good way to specify a timeout here.
-                       $ret = Http::get( $url, array(), __METHOD__ );
-               }
-
-               if ( $ret === false ) {
-                       wfDebugLog( "MediaWikiSite", "call to external site failed: $url" );
-                       return false;
-               }
-
-               $data = FormatJson::decode( $ret, true );
-
-               if ( !is_array( $data ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> returned bad json: " . $ret );
-                       return false;
-               }
-
-               $page = static::extractPageRecord( $data, $pageName );
-
-               if ( isset( $page['missing'] ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for a missing page title! "
-                               . $ret );
-                       return false;
-               }
-
-               if ( isset( $page['invalid'] ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> returned a marker for an invalid page title! "
-                               . $ret );
-                       return false;
-               }
-
-               if ( !isset( $page['title'] ) ) {
-                       wfDebugLog( "MediaWikiSite", "call to <$url> did not return a page title! " . $ret );
-                       return false;
-               }
-
-               return $page['title'];
-       }
-
-       /**
-        * Get normalization record for a given page title from an API response.
-        *
-        * @since 1.21
-        *
-        * @param array $externalData A reply from the API on a external server.
-        * @param string $pageTitle Identifies the page at the external site, needing normalization.
-        *
-        * @return array|bool A 'page' structure representing the page identified by $pageTitle.
-        */
-       private static function extractPageRecord( $externalData, $pageTitle ) {
-               // If there is a special case with only one returned page
-               // we can cheat, and only return
-               // the single page in the "pages" substructure.
-               if ( isset( $externalData['query']['pages'] ) ) {
-                       $pages = array_values( $externalData['query']['pages'] );
-                       if ( count( $pages ) === 1 ) {
-                               return $pages[0];
-                       }
-               }
-               // This is only used during internal testing, as it is assumed
-               // a more optimal (and lossfree) storage.
-               // Make initial checks and return if prerequisites are not meet.
-               if ( !is_array( $externalData ) || !isset( $externalData['query'] ) ) {
-                       return false;
-               }
-               // Loop over the tree different named structures, that otherwise are similar
-               $structs = array(
-                       'normalized' => 'from',
-                       'converted' => 'from',
-                       'redirects' => 'from',
-                       'pages' => 'title'
-               );
-               foreach ( $structs as $listId => $fieldId ) {
-                       // Check if the substructure exist at all.
-                       if ( !isset( $externalData['query'][$listId] ) ) {
-                               continue;
+                       if ( $mediaWikiPageNameNormalizer === null ) {
+                               $mediaWikiPageNameNormalizer = new MediaWikiPageNameNormalizer();
                        }
-                       // Filter the substructure down to what we actually are using.
-                       $collectedHits = array_filter(
-                               array_values( $externalData['query'][$listId] ),
-                               function ( $a ) use ( $fieldId, $pageTitle ) {
-                                       return $a[$fieldId] === $pageTitle;
-                               }
+
+                       return $mediaWikiPageNameNormalizer->normalizePageName(
+                               $pageName,
+                               $this->getFileUrl( 'api.php' )
                        );
-                       // If still looping over normalization, conversion or redirects,
-                       // then we need to keep the new page title for later rounds.
-                       if ( $fieldId === 'from' && is_array( $collectedHits ) ) {
-                               switch ( count( $collectedHits ) ) {
-                                       case 0:
-                                               break;
-                                       case 1:
-                                               $pageTitle = $collectedHits[0]['to'];
-                                               break;
-                                       default:
-                                               return false;
-                               }
-                       }
-                       // If on the pages structure we should prepare for returning.
-                       elseif ( $fieldId === 'title' && is_array( $collectedHits ) ) {
-                               switch ( count( $collectedHits ) ) {
-                                       case 0:
-                                               return false;
-                                       case 1:
-                                               return array_shift( $collectedHits );
-                                       default:
-                                               return false;
-                               }
-                       }
                }
-               // should never be here
-               return false;
        }
 
        /**
index dbb7c7f..83f119d 100644 (file)
@@ -560,7 +560,7 @@ abstract class Skin extends ContextSource {
                        $classes .= ' catlinks-allhidden';
                }
 
-               return "<div id='catlinks' class='$classes'>{$catlinks}</div>";
+               return "<div id='catlinks' class='$classes' data-mw='interface'>{$catlinks}</div>";
        }
 
        /**
index 9755e8e..27e645a 100644 (file)
@@ -275,11 +275,14 @@ abstract class QueryPage extends SpecialPage {
        }
 
        /**
-        * Some special pages (for example SpecialListusers) might not return the
+        * Some special pages (for example SpecialListusers used to) might not return the
         * current object formatted, but return the previous one instead.
         * Setting this to return true will ensure formatResult() is called
         * one more time to make sure that the very last result is formatted
         * as well.
+        *
+        * @deprecated since 1.27
+        *
         * @return bool
         */
        function tryLastResult() {
@@ -325,25 +328,39 @@ abstract class QueryPage extends SpecialPage {
                                                $value = 0;
                                        }
 
-                                       $vals[] = array( 'qc_type' => $this->getName(),
-                                                       'qc_namespace' => $row->namespace,
-                                                       'qc_title' => $row->title,
-                                                       'qc_value' => $value );
+                                       $vals[] = array(
+                                               'qc_type' => $this->getName(),
+                                               'qc_namespace' => $row->namespace,
+                                               'qc_title' => $row->title,
+                                               'qc_value' => $value
+                                       );
                                }
 
-                               $dbw->startAtomic( __METHOD__ );
-                               # Clear out any old cached data
-                               $dbw->delete( 'querycache', array( 'qc_type' => $this->getName() ), $fname );
-                               # Save results into the querycache table on the master
-                               if ( count( $vals ) ) {
-                                       $dbw->insert( 'querycache', $vals, __METHOD__ );
-                               }
-                               # Update the querycache_info record for the page
-                               $dbw->delete( 'querycache_info', array( 'qci_type' => $this->getName() ), $fname );
-                               $dbw->insert( 'querycache_info',
-                                       array( 'qci_type' => $this->getName(), 'qci_timestamp' => $dbw->timestamp() ),
-                                       $fname );
-                               $dbw->endAtomic( __METHOD__ );
+                               $that = $this;
+                               $dbw->doAtomicSection(
+                                       __METHOD__,
+                                       function ( IDatabase $dbw, $fname ) use ( $that, $vals ) {
+                                               # Clear out any old cached data
+                                               $dbw->delete( 'querycache',
+                                                       array( 'qc_type' => $that->getName() ),
+                                                       $fname
+                                               );
+                                               # Save results into the querycache table on the master
+                                               if ( count( $vals ) ) {
+                                                       $dbw->insert( 'querycache', $vals, $fname );
+                                               }
+                                               # Update the querycache_info record for the page
+                                               $dbw->delete( 'querycache_info',
+                                                       array( 'qci_type' => $that->getName() ),
+                                                       $fname
+                                               );
+                                               $dbw->insert( 'querycache_info',
+                                                       array( 'qci_type' => $that->getName(),
+                                                               'qci_timestamp' => $dbw->timestamp() ),
+                                                       $fname
+                                               );
+                                       }
+                               );
                        }
                } catch ( DBError $e ) {
                        if ( !$ignoreErrors ) {
@@ -646,12 +663,9 @@ abstract class QueryPage extends SpecialPage {
                                // @codingStandardsIgnoreEnd
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
-                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
-                                               ? ' class="not-patrolled"'
-                                               : '';
                                        $html[] = $this->listoutput
                                                ? $line
-                                               : "<li{$attr}>{$line}</li>\n";
+                                               : "<li>{$line}</li>\n";
                                }
                        }
 
@@ -660,12 +674,9 @@ abstract class QueryPage extends SpecialPage {
                                $row = null;
                                $line = $this->formatResult( $skin, $row );
                                if ( $line ) {
-                                       $attr = ( isset( $row->usepatrol ) && $row->usepatrol && $row->patrolled == 0 )
-                                               ? ' class="not-patrolled"'
-                                               : '';
                                        $html[] = $this->listoutput
                                                ? $line
-                                               : "<li{$attr}>{$line}</li>\n";
+                                               : "<li>{$line}</li>\n";
                                }
                        }
 
index e125d94..226d633 100644 (file)
@@ -321,7 +321,8 @@ class SpecialBlock extends FormSpecialPage {
        protected function preText() {
                $this->getOutput()->addModules( array( 'mediawiki.special.block', 'mediawiki.userSuggest' ) );
 
-               $text = $this->msg( 'blockiptext' )->parse();
+               $blockCIDRLimit = $this->getConfig()->get( 'BlockCIDRLimit' );
+               $text = $this->msg( 'blockiptext', $blockCIDRLimit['IPv4'], $blockCIDRLimit['IPv6'] )->parse();
 
                $otherBlockMessages = array();
                if ( $this->target !== null ) {
@@ -971,6 +972,24 @@ class SpecialBlock extends FormSpecialPage {
                $out->addWikiMsg( 'blockipsuccesstext', wfEscapeWikiText( $this->target ) );
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
index 9defaba..73a2774 100644 (file)
@@ -46,8 +46,7 @@ class SpecialBlockList extends SpecialPage {
                $out = $this->getOutput();
                $lang = $this->getLanguage();
                $out->setPageTitle( $this->msg( 'ipblocklist' ) );
-               $out->addModuleStyles( 'mediawiki.special' );
-               $out->addModules( 'mediawiki.userSuggest' );
+               $out->addModuleStyles( array( 'mediawiki.special', 'mediawiki.special.blocklist' ) );
 
                $request = $this->getRequest();
                $par = $request->getVal( 'ip', $par );
@@ -71,12 +70,11 @@ class SpecialBlockList extends SpecialPage {
                # Just show the block list
                $fields = array(
                        'Target' => array(
-                               'type' => 'text',
+                               'type' => 'user',
                                'label-message' => 'ipaddressorusername',
                                'tabindex' => '1',
                                'size' => '45',
                                'default' => $this->target,
-                               'cssclass' => 'mw-autocomplete-user', // used by mediawiki.userSuggest
                        ),
                        'Options' => array(
                                'type' => 'multiselect',
@@ -104,7 +102,7 @@ class SpecialBlockList extends SpecialPage {
                );
                $context = new DerivativeContext( $this->getContext() );
                $context->setTitle( $this->getPageTitle() ); // Remove subpage
-               $form = new HTMLForm( $fields, $context );
+               $form = HTMLForm::factory( 'ooui', $fields, $context );
                $form->setMethod( 'get' );
                $form->setWrapperLegendMsg( 'ipblocklist-legend' );
                $form->setSubmitTextMsg( 'ipblocklist-submit' );
index 91ac4e0..371ad19 100644 (file)
@@ -152,7 +152,10 @@ class SpecialChangePassword extends FormSpecialPage {
                                ? 'resetpass-submit-loggedin'
                                : 'resetpass_submit'
                );
-               $form->addButton( 'wpCancel', $this->msg( 'resetpass-submit-cancel' )->text() );
+               $form->addButton( array(
+                       'name' => 'wpCancel',
+                       'value' => $this->msg( 'resetpass-submit-cancel' )->text()
+               ) );
                $form->setHeaderText( $this->msg( 'resetpass_text' )->parseAsBlock() );
                if ( $this->mPreTextMessage instanceof Message ) {
                        $form->addPreText( $this->mPreTextMessage->parseAsBlock() );
index 0f8b729..50a48c3 100644 (file)
@@ -51,11 +51,10 @@ class SpecialComparePages extends SpecialPage {
                $this->outputHeader();
 
                # Form (.mw-searchInput enables suggestions)
-               $form = new HTMLForm( array(
+               $form = HTMLForm::factory( 'ooui', array(
                        'Page1' => array(
-                               'type' => 'text',
+                               'type' => 'title',
                                'name' => 'page1',
-                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page1',
                                'size' => '40',
                                'section' => 'page1',
@@ -70,9 +69,8 @@ class SpecialComparePages extends SpecialPage {
                                'validation-callback' => array( $this, 'checkExistingRevision' ),
                        ),
                        'Page2' => array(
-                               'type' => 'text',
+                               'type' => 'title',
                                'name' => 'page2',
-                               'cssclass' => 'mw-searchInput',
                                'label-message' => 'compare-page2',
                                'size' => '40',
                                'section' => 'page2',
index 147f67e..37d3636 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Implements Special:Confirmemail and Special:Invalidateemail
+ * Implements Special:Confirmemail
  *
  * 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
@@ -78,16 +78,37 @@ class EmailConfirmation extends UnlistedSpecialPage {
                $user = $this->getUser();
                $out = $this->getOutput();
 
-               if ( $this->getRequest()->wasPosted() &&
-                       $user->matchEditToken( $this->getRequest()->getText( 'token' ) )
-               ) {
-                       $status = $user->sendConfirmationMail();
-                       if ( $status->isGood() ) {
+               if ( !$user->isEmailConfirmed() ) {
+                       $descriptor = array();
+                       if ( $user->isEmailConfirmationPending() ) {
+                               $descriptor += array(
+                                       'pending' => array(
+                                               'type' => 'info',
+                                               'raw' => true,
+                                               'default' => "<div class=\"error mw-confirmemail-pending\">\n" .
+                                                       $this->msg( 'confirmemail_pending' )->escaped() .
+                                                       "\n</div>",
+                                       ),
+                               );
+                       }
+
+                       $out->addWikiMsg( 'confirmemail_text' );
+                       $form = HTMLForm::factory( 'ooui', $descriptor, $this->getContext() );
+                       $form
+                               ->setMethod( 'post' )
+                               ->setAction( $this->getPageTitle()->getLocalURL() )
+                               ->setSubmitTextMsg( 'confirmemail_send' )
+                               ->setSubmitCallback( array( $this, 'submitSend' ) );
+
+                       $retval = $form->show();
+
+                       if ( $retval === true ) {
+                               // should never happen, but if so, don't let the user without any message
                                $out->addWikiMsg( 'confirmemail_sent' );
-                       } else {
-                               $out->addWikiText( $status->getWikiText( 'confirmemail_sendfailed' ) );
+                       } elseif ( $retval instanceof Status && $retval->isGood() ) {
+                               $out->addWikiText( $retval->getValue() );
                        }
-               } elseif ( $user->isEmailConfirmed() ) {
+               } else {
                        // date and time are separate parameters to facilitate localisation.
                        // $time is kept for backward compat reasons.
                        // 'emailauthenticated' is also used in SpecialPreferences.php
@@ -97,23 +118,22 @@ class EmailConfirmation extends UnlistedSpecialPage {
                        $d = $lang->userDate( $emailAuthenticated, $user );
                        $t = $lang->userTime( $emailAuthenticated, $user );
                        $out->addWikiMsg( 'emailauthenticated', $time, $d, $t );
-               } else {
-                       if ( $user->isEmailConfirmationPending() ) {
-                               $out->wrapWikiMsg(
-                                       "<div class=\"error mw-confirmemail-pending\">\n$1\n</div>",
-                                       'confirmemail_pending'
-                               );
-                       }
+               }
+       }
 
-                       $out->addWikiMsg( 'confirmemail_text' );
-                       $form = Html::openElement(
-                               'form',
-                               array( 'method' => 'post', 'action' => $this->getPageTitle()->getLocalURL() )
-                       ) . "\n";
-                       $form .= Html::hidden( 'token', $user->getEditToken() ) . "\n";
-                       $form .= Xml::submitButton( $this->msg( 'confirmemail_send' )->text() ) . "\n";
-                       $form .= Html::closeElement( 'form' ) . "\n";
-                       $out->addHTML( $form );
+       /**
+        * Callback for HTMLForm send confirmation mail.
+        *
+        * @return Status Status object with the result
+        */
+       public function submitSend() {
+               $status = $this->getUser()->sendConfirmationMail();
+               if ( $status->isGood() ) {
+                       return Status::newGood( $this->msg( 'confirmemail_sent' )->text() );
+               } else {
+                       return Status::newFatal( new RawMessage(
+                               $status->getWikiText( 'confirmemail_sendfailed' )
+                       ) );
                }
        }
 
@@ -142,49 +162,3 @@ class EmailConfirmation extends UnlistedSpecialPage {
                }
        }
 }
-
-/**
- * Special page allows users to cancel an email confirmation using the e-mail
- * confirmation code
- *
- * @ingroup SpecialPage
- */
-class EmailInvalidation extends UnlistedSpecialPage {
-       public function __construct() {
-               parent::__construct( 'Invalidateemail', 'editmyprivateinfo' );
-       }
-
-       function execute( $code ) {
-               // Ignore things like master queries/connections on GET requests.
-               // It's very convenient to just allow formless link usage.
-               Profiler::instance()->getTransactionProfiler()->resetExpectations();
-
-               $this->setHeaders();
-               $this->checkReadOnly();
-               $this->checkPermissions();
-               $this->attemptInvalidate( $code );
-       }
-
-       /**
-        * Attempt to invalidate the user's email address and show success or failure
-        * as needed; if successful, link to main page
-        *
-        * @param string $code Confirmation code
-        */
-       function attemptInvalidate( $code ) {
-               $user = User::newFromConfirmationCode( $code, User::READ_LATEST );
-               if ( !is_object( $user ) ) {
-                       $this->getOutput()->addWikiMsg( 'confirmemail_invalid' );
-
-                       return;
-               }
-
-               $user->invalidateEmail();
-               $user->saveSettings();
-               $this->getOutput()->addWikiMsg( 'confirmemail_invalidated' );
-
-               if ( !$this->getUser()->isLoggedIn() ) {
-                       $this->getOutput()->returnToMain();
-               }
-       }
-}
index bf3ab90..ab6614b 100644 (file)
@@ -645,6 +645,24 @@ class SpecialContributions extends IncludableSpecialPage {
                return $form;
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
index 6f8e786..f6d560f 100644 (file)
@@ -658,6 +658,24 @@ class DeletedContributionsPage extends SpecialPage {
                return $f;
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
diff --git a/includes/specials/SpecialEmailInvalidate.php b/includes/specials/SpecialEmailInvalidate.php
new file mode 100644 (file)
index 0000000..30f9d2e
--- /dev/null
@@ -0,0 +1,68 @@
+<?php
+/**
+ * Implements Special:EmailInvalidation
+ *
+ * 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 SpecialPage
+ */
+
+/**
+ * Special page allows users to cancel an email confirmation using the e-mail
+ * confirmation code
+ *
+ * @ingroup SpecialPage
+ */
+class EmailInvalidation extends UnlistedSpecialPage {
+       public function __construct() {
+               parent::__construct( 'Invalidateemail', 'editmyprivateinfo' );
+       }
+
+       function execute( $code ) {
+               // Ignore things like master queries/connections on GET requests.
+               // It's very convenient to just allow formless link usage.
+               Profiler::instance()->getTransactionProfiler()->resetExpectations();
+
+               $this->setHeaders();
+               $this->checkReadOnly();
+               $this->checkPermissions();
+               $this->attemptInvalidate( $code );
+       }
+
+       /**
+        * Attempt to invalidate the user's email address and show success or failure
+        * as needed; if successful, link to main page
+        *
+        * @param string $code Confirmation code
+        */
+       function attemptInvalidate( $code ) {
+               $user = User::newFromConfirmationCode( $code, User::READ_LATEST );
+               if ( !is_object( $user ) ) {
+                       $this->getOutput()->addWikiMsg( 'confirmemail_invalid' );
+
+                       return;
+               }
+
+               $user->invalidateEmail();
+               $user->saveSettings();
+               $this->getOutput()->addWikiMsg( 'confirmemail_invalidated' );
+
+               if ( !$this->getUser()->isLoggedIn() ) {
+                       $this->getOutput()->returnToMain();
+               }
+       }
+}
index 3b31530..3aeadc9 100644 (file)
@@ -85,7 +85,6 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                        'Text' => array(
                                'type' => 'textarea',
                                'rows' => 20,
-                               'cols' => 80,
                                'label-message' => 'emailmessage',
                                'required' => true,
                        ),
@@ -99,12 +98,16 @@ class SpecialEmailUser extends UnlistedSpecialPage {
 
        public function execute( $par ) {
                $out = $this->getOutput();
+               $request = $this->getRequest();
                $out->addModuleStyles( 'mediawiki.special' );
 
                $this->mTarget = is_null( $par )
-                       ? $this->getRequest()->getVal( 'wpTarget', $this->getRequest()->getVal( 'target', '' ) )
+                       ? $request->getVal( 'wpTarget', '' )
                        : $par;
 
+               // make sure, that HTMLForm uses the correct target
+               $request->setVal( 'wpTarget', $this->mTarget );
+
                // This needs to be below assignment of $this->mTarget because
                // getDescription() needs it to determine the correct page title.
                $this->setHeaders();
@@ -135,41 +138,16 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                                list( $title, $msg, $params ) = $error;
                                throw new ErrorPageError( $title, $msg, $params );
                }
-               // Got a valid target user name? Else ask for one.
-               $ret = self::getTarget( $this->mTarget );
-               if ( !$ret instanceof User ) {
-                       if ( $this->mTarget != '' ) {
-                               // Messages used here: notargettext, noemailtext, nowikiemailtext
-                               $ret = ( $ret == 'notarget' ) ? 'emailnotarget' : ( $ret . 'text' );
-                               $out->wrapWikiMsg( "<p class='error'>$1</p>", $ret );
-                       }
-                       $out->addHTML( $this->userForm( $this->mTarget ) );
-
-                       return;
-               }
-
-               $this->mTargetObj = $ret;
-
-               $context = new DerivativeContext( $this->getContext() );
-               $context->setTitle( $this->getPageTitle() ); // Remove subpage
-               $form = new HTMLForm( $this->getFormFields(), $context );
-               // By now we are supposed to be sure that $this->mTarget is a user name
-               $form->addPreText( $this->msg( 'emailpagetext', $this->mTarget )->parse() );
-               $form->setSubmitTextMsg( 'emailsend' );
-               $form->setSubmitCallback( array( __CLASS__, 'uiSubmit' ) );
-               $form->setWrapperLegendMsg( 'email-legend' );
-               $form->loadData();
-
-               if ( !Hooks::run( 'EmailUserForm', array( &$form ) ) ) {
-                       return;
-               }
-
-               $result = $form->show();
 
-               if ( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
-                       $out->setPageTitle( $this->msg( 'emailsent' ) );
-                       $out->addWikiMsg( 'emailsenttext', $this->mTarget );
-                       $out->returnToMain( false, $this->mTargetObj->getUserPage() );
+               // a little hack: HTMLForm will check $this->mTarget only, if the form was posted, not
+               // if the user opens Special:EmailUser/Florian (e.g.). So check, if the user did that,
+               // and show the "Send email to user" form directly, if so. Show the "enter username"
+               // form, otherwise.
+               $this->mTargetObj = self::getTarget( $this->mTarget );
+               if ( !$this->mTargetObj instanceof User ) {
+                       $this->userForm( $this->mTarget );
+               } else {
+                       $this->sendEmailForm();
                }
        }
 
@@ -260,31 +238,63 @@ class SpecialEmailUser extends UnlistedSpecialPage {
         * @return string Form asking for user name.
         */
        protected function userForm( $name ) {
-               $this->getOutput()->addModules( 'mediawiki.userSuggest' );
-               $string = Xml::openElement(
-                       'form',
-                       array( 'method' => 'get', 'action' => wfScript(), 'id' => 'askusername' )
-               ) .
-                       Html::hidden( 'title', $this->getPageTitle()->getPrefixedText() ) .
-                       Xml::openElement( 'fieldset' ) .
-                       Html::rawElement( 'legend', null, $this->msg( 'emailtarget' )->parse() ) .
-                       Xml::inputLabel(
-                               $this->msg( 'emailusername' )->text(),
-                               'target',
-                               'emailusertarget',
-                               30,
-                               $name,
-                               array(
-                                       'class' => 'mw-autocomplete-user',  // used by mediawiki.userSuggest
-                                       'autofocus' => true,
-                               )
-                       ) .
-                       ' ' .
-                       Xml::submitButton( $this->msg( 'emailusernamesubmit' )->text() ) .
-                       Xml::closeElement( 'fieldset' ) .
-                       Xml::closeElement( 'form' ) . "\n";
-
-               return $string;
+               $form = HTMLForm::factory( 'ooui', array(
+                       'Target' => array(
+                               'type' => 'user',
+                               'exists' => true,
+                               'label' => $this->msg( 'emailusername' )->text(),
+                               'id' => 'emailusertarget',
+                               'autofocus' => true,
+                               'value' => $name,
+                       ),
+               ), $this->getContext() );
+
+               $form
+                       ->setMethod( 'post' )
+                       ->setSubmitCallback( array( $this, 'sendEmailForm' ) )
+                       ->setSubmitProgressive()
+                       ->setId( 'askusername' )
+                       ->addHiddenField( 'title', $this->getPageTitle()->getPrefixedText() )
+                       ->setWrapperLegendMsg( 'emailtarget' )
+                       ->setSubmitTextMsg( 'emailusernamesubmit' )
+                       ->show();
+       }
+
+       public function sendEmailForm() {
+               $out = $this->getOutput();
+
+               $ret = $this->mTargetObj;
+               if ( !$ret instanceof User ) {
+                       if ( $this->mTarget != '' ) {
+                               // Messages used here: notargettext, noemailtext, nowikiemailtext
+                               $ret = ( $ret == 'notarget' ) ? 'emailnotarget' : ( $ret . 'text' );
+                               return Status::newFatal( $ret );
+                       }
+                       return false;
+               }
+
+               $context = new DerivativeContext( $this->getContext() );
+               $context->setTitle( $this->getPageTitle() ); // Remove subpage
+               $form = HTMLForm::factory( 'ooui', $this->getFormFields(), $context );
+               // By now we are supposed to be sure that $this->mTarget is a user name
+               $form->addPreText( $this->msg( 'emailpagetext', $this->mTarget )->parse() );
+               $form->setSubmitTextMsg( 'emailsend' );
+               $form->setSubmitCallback( array( __CLASS__, 'uiSubmit' ) );
+               $form->setWrapperLegendMsg( 'email-legend' );
+               $form->loadData();
+
+               if ( !Hooks::run( 'EmailUserForm', array( &$form ) ) ) {
+                       return false;
+               }
+
+               $result = $form->show();
+
+               if ( $result === true || ( $result instanceof Status && $result->isGood() ) ) {
+                       $out->setPageTitle( $this->msg( 'emailsent' ) );
+                       $out->addWikiMsg( 'emailsenttext', $this->mTarget );
+                       $out->returnToMain( false, $ret->getUserPage() );
+               }
+               return true;
        }
 
        /**
@@ -392,6 +402,24 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                }
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
index 06eb276..14d8675 100644 (file)
@@ -95,8 +95,8 @@ class SpecialExpandTemplates extends SpecialPage {
                }
 
                $out = $this->getOutput();
-               $out->addWikiMsg( 'expand_templates_intro' );
-               $out->addHTML( $this->makeForm( $titleStr, $input ) );
+
+               $this->makeForm( $titleStr, $input );
 
                if ( $output !== false ) {
                        if ( $this->generateXML && strlen( $output ) > 0 ) {
@@ -130,6 +130,22 @@ class SpecialExpandTemplates extends SpecialPage {
                }
        }
 
+       /**
+        * Callback for the HTMLForm used in self::makeForm.
+        * Checks, if the input was given, and if not, returns a fatal Status
+        * object with an error message.
+        *
+        * @param array $values The values submitted to the HTMLForm
+        * @return Status
+        */
+       public function onSubmitInput( array $values ) {
+               $status = Status::newGood();
+               if ( !strlen( $values['input'] ) ) {
+                       $status = Status::newFatal( 'expand_templates_input_missing' );
+               }
+               return $status;
+       }
+
        /**
         * Generate a form allowing users to enter information
         *
@@ -138,69 +154,62 @@ class SpecialExpandTemplates extends SpecialPage {
         * @return string
         */
        private function makeForm( $title, $input ) {
-               $self = $this->getPageTitle();
-               $request = $this->getRequest();
-               $user = $this->getUser();
-
-               $form = Xml::openElement(
-                       'form',
-                       array( 'method' => 'post', 'action' => $self->getLocalUrl() )
-               );
-               $form .= "<fieldset><legend>" . $this->msg( 'expandtemplates' )->escaped() . "</legend>\n";
-
-               $form .= '<p>' . Xml::inputLabel(
-                       $this->msg( 'expand_templates_title' )->plain(),
-                       'wpContextTitle',
-                       'contexttitle',
-                       60,
-                       $title,
-                       array( 'autofocus' => '', 'class' => 'mw-ui-input-inline' )
-               ) . '</p>';
-               $form .= '<p>' . Xml::label(
-                       $this->msg( 'expand_templates_input' )->text(),
-                       'input'
-               ) . '</p>';
-               $form .= Xml::textarea(
-                       'wpInput',
-                       $input,
-                       10,
-                       10,
-                       array( 'id' => 'input' )
+               $fields = array(
+                       'contexttitle' => array(
+                               'type' => 'text',
+                               'label' => $this->msg( 'expand_templates_title' )->plain(),
+                               'name' => 'wpContextTitle',
+                               'id' => 'contexttitle',
+                               'size' => 60,
+                               'default' => $title,
+                               'autofocus' => true,
+                               'cssclass' => 'mw-ui-input-inline',
+                       ),
+                       'input' => array(
+                               'type' => 'textarea',
+                               'name' => 'wpInput',
+                               'label-message' => 'expand_templates_input',
+                               'rows' => 10,
+                               'default' => $input,
+                               'id' => 'input',
+                       ),
+                       'removecomments' => array(
+                               'type' => 'check',
+                               'label-message' => 'expand_templates_remove_comments',
+                               'name' => 'wpRemoveComments',
+                               'id' => 'removecomments',
+                               'default' => $this->removeComments,
+                       ),
+                       'removenowiki' => array(
+                               'type' => 'check',
+                               'label-message' => 'expand_templates_remove_nowiki',
+                               'name' => 'wpRemoveNowiki',
+                               'id' => 'removenowiki',
+                               'default' => $this->removeNowiki,
+                       ),
+                       'generate_xml' => array(
+                               'type' => 'check',
+                               'label-message' => 'expand_templates_generate_xml',
+                               'name' => 'wpGenerateXml',
+                               'id' => 'generate_xml',
+                               'default' => $this->generateXML,
+                       ),
+                       'generate_rawhtml' => array(
+                               'type' => 'check',
+                               'label-message' => 'expand_templates_generate_rawhtml',
+                               'name' => 'wpGenerateRawHtml',
+                               'id' => 'generate_rawhtml',
+                               'default' => $this->generateRawHtml,
+                       ),
                );
 
-               $form .= '<p>' . Xml::checkLabel(
-                       $this->msg( 'expand_templates_remove_comments' )->text(),
-                       'wpRemoveComments',
-                       'removecomments',
-                       $this->removeComments
-               ) . '</p>';
-               $form .= '<p>' . Xml::checkLabel(
-                       $this->msg( 'expand_templates_remove_nowiki' )->text(),
-                       'wpRemoveNowiki',
-                       'removenowiki',
-                       $this->removeNowiki
-               ) . '</p>';
-               $form .= '<p>' . Xml::checkLabel(
-                       $this->msg( 'expand_templates_generate_xml' )->text(),
-                       'wpGenerateXml',
-                       'generate_xml',
-                       $this->generateXML
-               ) . '</p>';
-               $form .= '<p>' . Xml::checkLabel(
-                       $this->msg( 'expand_templates_generate_rawhtml' )->text(),
-                       'wpGenerateRawHtml',
-                       'generate_rawhtml',
-                       $this->generateRawHtml
-               ) . '</p>';
-               $form .= '<p>' . Xml::submitButton(
-                       $this->msg( 'expand_templates_ok' )->text(),
-                       array( 'accesskey' => 's' )
-               ) . '</p>';
-               $form .= "</fieldset>\n";
-               $form .= Html::hidden( 'wpEditToken', $user->getEditToken( '', $request ) );
-               $form .= Xml::closeElement( 'form' );
-
-               return $form;
+               $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() );
+               $form
+                       ->setSubmitTextMsg( 'expand_templates_ok' )
+                       ->setWrapperLegendMsg( 'expandtemplates' )
+                       ->setHeaderText( $this->msg( 'expand_templates_intro' )->parse() )
+                       ->setSubmitCallback( array( $this, 'onSubmitInput' ) )
+                       ->showAlways();
        }
 
        /**
index 91fef03..3ce9c76 100644 (file)
@@ -235,8 +235,8 @@ class SpecialExport extends SpecialPage {
                        'textarea' => array(
                                'class' => 'HTMLTextAreaField',
                                'name' => 'pages',
+                               'label-message' => 'export-manual',
                                'nodata' => true,
-                               'cols' => 40,
                                'rows' => 10,
                                'default' => $page,
                        ),
@@ -301,7 +301,7 @@ class SpecialExport extends SpecialPage {
                        );
                }
 
-               $htmlForm = HTMLForm::factory( 'div', $formDescriptor, $this->getContext() );
+               $htmlForm = HTMLForm::factory( 'ooui', $formDescriptor, $this->getContext() );
                $htmlForm->setSubmitTextMsg( 'export-submit' );
                $htmlForm->prepareForm()->displayForm( false );
                $this->addHelpLink( 'Help:Export' );
index bb57ee0..323903e 100644 (file)
@@ -241,7 +241,7 @@ class FileDuplicateSearchPage extends QueryPage {
         * @return string[] Matching subpages
         */
        public function prefixSearchSubpages( $search, $limit, $offset ) {
-               $title = Title::newFromText( $search );
+               $title = Title::newFromText( $search, NS_FILE );
                if ( !$title || $title->getNamespace() !== NS_FILE ) {
                        // No prefix suggestion outside of file namespace
                        return array();
index 8de4e2f..9a73a25 100644 (file)
@@ -57,6 +57,24 @@ class SpecialListFiles extends IncludableSpecialPage {
                }
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'media';
        }
index 6e67df0..fb78a40 100644 (file)
@@ -144,6 +144,7 @@ class MediaStatisticsPage extends QueryPage {
                        $this->getOutput()->addWikiText(
                                $this->msg( 'mediastatistics-allbytes' )
                                        ->numParams( $this->totalSize )
+                                       ->sizeParams( $this->totalSize )
                                        ->text()
                        );
                }
@@ -157,6 +158,8 @@ class MediaStatisticsPage extends QueryPage {
                $this->getOutput()->addWikiText(
                                $this->msg( 'mediastatistics-bytespertype' )
                                        ->numParams( $this->totalPerType )
+                                       ->sizeParams( $this->totalPerType )
+                                       ->numParams( $this->makePercentPretty( $this->totalPerType / $this->totalBytes ) )
                                        ->text()
                );
                $this->totalSize += $this->totalPerType;
index 49ab6d5..b45946f 100644 (file)
@@ -128,7 +128,7 @@ class SpecialPreferences extends SpecialPage {
                        throw new PermissionsError( 'editmyoptions' );
                }
 
-               $user = $this->getUser();
+               $user = $this->getUser()->getInstanceForUpdate();
                $user->resetOptions( 'all', $this->getContext() );
                $user->saveSettings();
 
index ba11862..74a1322 100644 (file)
@@ -38,18 +38,27 @@ class ShortPagesPage extends QueryPage {
        }
 
        public function getQueryInfo() {
+               $tables = array( 'page' );
+               $conds = array(
+                       'page_namespace' => MWNamespace::getContentNamespaces(),
+                       'page_is_redirect' => 0
+               );
+               $joinConds = array();
+               $options = array( 'USE INDEX' => array( 'page' => 'page_redirect_namespace_len' ) );
+
+               // Allow extensions to modify the query
+               Hooks::run( 'ShortPagesQuery', array( &$tables, &$conds, &$joinConds, &$options ) );
+
                return array(
-                       'tables' => array( 'page' ),
+                       'tables' => $tables,
                        'fields' => array(
                                'namespace' => 'page_namespace',
                                'title' => 'page_title',
                                'value' => 'page_len'
                        ),
-                       'conds' => array(
-                               'page_namespace' => MWNamespace::getContentNamespaces(),
-                               'page_is_redirect' => 0
-                       ),
-                       'options' => array( 'USE INDEX' => 'page_redirect_namespace_len' )
+                       'conds' => $conds,
+                       'join_conds' => $joinConds,
+                       'options' => $options
                );
        }
 
index f81f1c3..f776832 100644 (file)
@@ -237,6 +237,24 @@ class SpecialUnblock extends SpecialPage {
                return true;
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
index c8c4642..b4470f5 100644 (file)
@@ -405,8 +405,14 @@ class SpecialUpload extends SpecialPage {
 
                $form = $this->getUploadForm( $warningHtml, $sessionKey, /* $hideIgnoreWarning */ true );
                $form->setSubmitText( $this->msg( 'upload-tryagain' )->text() );
-               $form->addButton( 'wpUploadIgnoreWarning', $this->msg( 'ignorewarning' )->text() );
-               $form->addButton( 'wpCancelUpload', $this->msg( 'reuploaddesc' )->text() );
+               $form->addButton( array(
+                       'name' => 'wpUploadIgnoreWarning',
+                       'value' => $this->msg( 'ignorewarning' )->text()
+               ) );
+               $form->addButton( array(
+                       'name' => 'wpCancelUpload',
+                       'value' => $this->msg( 'reuploaddesc' )->text()
+               ) );
 
                $this->showUploadForm( $form );
 
index ea22274..cf94e50 100644 (file)
@@ -776,6 +776,24 @@ class UserrightsPage extends SpecialPage {
                LogEventsList::showLogExtract( $output, 'rights', $user->getUserPage() );
        }
 
+       /**
+        * Return an array of subpages beginning with $search that this special page will accept.
+        *
+        * @param string $search Prefix to search for
+        * @param int $limit Maximum number of results to return (usually 10)
+        * @param int $offset Number of results to skip (usually 0)
+        * @return string[] Matching subpages
+        */
+       public function prefixSearchSubpages( $search, $limit, $offset ) {
+               $user = User::newFromName( $search );
+               if ( !$user ) {
+                       // No prefix suggestion for invalid user
+                       return array();
+               }
+               // Autocomplete subpage as user list - public to allow caching
+               return UserNamePrefixSearch::search( 'public', $search, $limit, $offset );
+       }
+
        protected function getGroupName() {
                return 'users';
        }
diff --git a/includes/templates/EnhancedChangesListGroup.mustache b/includes/templates/EnhancedChangesListGroup.mustache
new file mode 100644 (file)
index 0000000..352eb17
--- /dev/null
@@ -0,0 +1,28 @@
+<table class="{{# tableClasses }}{{ . }} {{/ tableClasses }}">
+       <tr>
+               <td>
+                       <span class="mw-collapsible-toggle mw-collapsible-arrow mw-enhancedchanges-arrow mw-enhancedchanges-arrow-space"></span>
+               </td>
+               <td class="mw-enhanced-rc">{{{ collectedRcFlags }}}&#160;{{ timestamp }}&#160;</td>
+               <td>
+                       {{# rev-deleted-event }}<span class="history-deleted">{{{ . }}}</span>{{/ rev-deleted-event }}
+                       {{{ articleLink }}}{{{ languageDirMark }}}{{{ logText }}}
+                       <span class="mw-changeslist-separator">. .</span>
+                       {{# charDifference }}{{{ . }}} <span class="mw-changeslist-separator">. .</span>{{/ charDifference }}
+                       <span class="changedby">{{{ users }}}</span>
+                       {{ numberofWatchingusers }}
+               </td>
+       </tr>
+       {{# lines }}
+       <tr class="{{# classes }}{{ . }} {{/ classes }}">
+               <td></td>
+               <td class="mw-enhanced-rc">{{{ recentChangesFlags }}}&#160;</td>
+               <td class="mw-enhanced-rc-nested">
+                       {{# timestampLink }}
+                       <span class="mw-enhanced-rc-time">{{{ . }}}</span>
+                       {{/ timestampLink }}
+                       {{# data }}{{{ . }}}{{/ data }}
+               </td>
+       </tr>
+       {{/ lines }}
+</table>
index 8fa430f..3e974e3 100644 (file)
@@ -3323,17 +3323,6 @@ class User implements IDBAccessObject {
                }
        }
 
-       /**
-        * Get the current skin, loading it if required
-        * @return Skin The current skin
-        * @todo FIXME: Need to check the old failback system [AV]
-        * @deprecated since 1.18 Use ->getSkin() in the most relevant outputting context you have
-        */
-       public function getSkin() {
-               wfDeprecated( __METHOD__, '1.18' );
-               return RequestContext::getMain()->getSkin();
-       }
-
        /**
         * Get a WatchedItem for this user and $title.
         *
diff --git a/includes/user/UserNamePrefixSearch.php b/includes/user/UserNamePrefixSearch.php
new file mode 100644 (file)
index 0000000..f565266
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * Prefix search of user names.
+ *
+ * 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
+ */
+
+/**
+ * Handles searching prefixes of user names
+ *
+ * @since 1.27
+ */
+class UserNamePrefixSearch {
+
+       /**
+        * Do a prefix search of user names and return a list of matching user names.
+        *
+        * @param string|User $audience The string 'public' or a user object to show the search for
+        * @param string $search
+        * @param int $limit
+        * @param int $offset How many results to offset from the beginning
+        * @return array Array of strings
+        */
+       public static function search( $audience, $search, $limit, $offset = 0 ) {
+               $user = User::newFromName( $search );
+
+               $dbr = wfGetDB( DB_SLAVE );
+               $prefix = $user ? $user->getName() : '';
+               $tables = array( 'user' );
+               $cond = array( 'user_name ' . $dbr->buildLike( $prefix, $dbr->anyString() ) );
+               $joinConds = array();
+
+               // Filter out hidden user names
+               if ( $audience === 'public' || !$audience->isAllowed( 'hideuser' ) ) {
+                       $tables[] = 'ipblocks';
+                       $cond['ipb_deleted'] = array( 0, null );
+                       $joinConds['ipblocks'] = array( 'LEFT JOIN', 'user_id=ipb_user' );
+               }
+
+               $res = $dbr->selectFieldValues(
+                       $tables,
+                       'user_name',
+                       $cond,
+                       __METHOD__,
+                       array(
+                               'LIMIT' => $limit,
+                               'ORDER BY' => 'user_name',
+                               'OFFSET' => $offset
+                       ),
+                       $joinConds
+               );
+
+               return $res === false ? array() : $res;
+       }
+}
index dbf4cce..d374c85 100644 (file)
@@ -71,15 +71,14 @@ class LanguageOs extends Language {
                if ( preg_match( '/тæ$/u', $word ) ) {
                        $word = mb_substr( $word, 0, -1 );
                        $end_allative = 'æм';
-               }
-               # Works if $word is in singular form.
-               # Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
-               elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) {
+               } elseif ( preg_match( "/[аæеёиоыэюя]$/u", $word ) ) {
+                       # Works if $word is in singular form.
+                       # Checking if $word ends on one of the vowels: е, ё, и, о, ы, э, ю, я.
                        $jot = 'й';
-               }
-               # Checking if $word ends on 'у'. 'У' can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
-               # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
-               elseif ( preg_match( "/у$/u", $word ) ) {
+               } elseif ( preg_match( "/у$/u", $word ) ) {
+                       # Checking if $word ends on 'у'. 'У'
+                       # can be either consonant 'W' or vowel 'U' in cyrillic Ossetic.
+                       # Examples: {{grammar:genitive|аунеу}} = аунеуы, {{grammar:genitive|лæппу}} = лæппуйы.
                        if ( !preg_match( "/[аæеёиоыэюя]$/u", mb_substr( $word, -2, 1 ) ) ) {
                                $jot = 'й';
                        }
index f41175b..9b0254a 100644 (file)
        "passwordreset-emailtext-ip": "Dalguién (seique vusté, dende la direición IP $1)solicitó'l reaniciu de la so contraseña de {{SITENAME}} ($4).\n{{PLURAL:$3|La cuenta d'usuariu siguiente ta asociada|Les cuentes d'usuariu siguientes tán asociaes}}\na esta direición de corréu electrónicu:\n\n$2\n\n{{PLURAL:$3|Esta contraseña provisional caduca|Estes contraseñes provisionales caduquen}} {{PLURAL:$5|nun día|en $5 díes}}.\nTendría d'aniciar sesión y escoyer una contraseña nueva agora. Si esta solicitú la fizo otra persona,\no si recordó la clave orixinal y yá nun quier camudala, pue escaecer esti mensaxe y siguir\nusando la contraseña antigua.",
        "passwordreset-emailtext-user": "L'usuariu $1 de {{SITENAME}} solicitó un reaniciu de la so contraseña de {{SITENAME}} ($4). {{PLURAL:$3|La cuenta d'usuariu siguiente ta asociada|Les cuentes d'usuariu siguientes tán asociaes}} con esta direición de corréu electrónicu:\n\n$2\n\n{{PLURAL:$3|Esta contraseña provisional caduca|Estes contraseñes provisionales caduquen}} {{PLURAL:$5|nun día|en $5 díes}}.\nTendría d'aniciar sesión y escoyer una contraseña nueva agora. Si esta solicitú la fizo otra persona, o si recordó la clave orixinal y yá nun quier camudala, pue escaecer esti mensaxe y siguir usando la contraseña antigua.",
        "passwordreset-emailelement": "Nome d'usuariu: \n$1\n\nContraseña temporal: \n$2",
-       "passwordreset-emailsentemail": "Si esta ye una direición de corréu electrónicu rexistrada pa la to cuenta, unviaráse un corréu pa reaniciar la contraseña.",
-       "passwordreset-emailsentusername": "Si hai una direición rexistrada de corréu electrónicu correspondiente a esta cuenta, unviaráse un corréu electrónicu pa reaniciar la contraseña.",
+       "passwordreset-emailsentemail": "Si esta direición de corréu electrónicu ta asociada cola to cuenta, unviaráse un corréu pa reaniciar la contraseña.",
+       "passwordreset-emailsentusername": "Si hai una direición de corréu electrónicu asociada con esti nome d'usuariu, unviaráse un corréu electrónicu pa reaniciar la contraseña.",
        "passwordreset-emailsent-capture": "Unvióse un corréu electrónicu pa reaniciar la contraseña, que s'amuesa abaxo.",
        "passwordreset-emailerror-capture": "Unvióse un corréu electrónicu pa reaniciar la contraseña, que s'amuesa abaxo, pero falló l'unviu {{GENDER:$2|al usuariu|a la usuaria}}: $1",
        "changeemail": "Camudar o desaniciar la dirección de corréu electrónicu",
        "upload-form-label-select-file": "Seleiciona un ficheru",
        "upload-form-label-infoform-title": "Detalles",
        "upload-form-label-infoform-name": "Nome",
+       "upload-form-label-infoform-name-tooltip": "Un títulu descriptivu únicu pal ficheru, que sirvirá para da-y nome al ficheru. Se pue usar llinguax normal con espacios. Nun amiestes la estensión del ficheru.",
        "upload-form-label-infoform-description": "Descripción",
+       "upload-form-label-infoform-description-tooltip": "Describe de mou curtiu cualquier cosa notable de la obra.\nPa una semeya, cuenta les principales coses qu'apaecen, la ocasión o'l sitiu.",
        "upload-form-label-usage-title": "Usu",
        "upload-form-label-usage-filename": "Nome del ficheru",
        "foreign-structured-upload-form-label-own-work": "Esti ye'l mio propiu trabayu",
        "export-download": "Guardar como archivu",
        "export-templates": "Inxerir plantíes",
        "export-pagelinks": "Incluyir páxines enllazaes fasta una profundidá de:",
+       "export-manual": "Amestar páxines a mano:",
        "allmessages": "Tolos mensaxes del sistema",
        "allmessagesname": "Nome",
        "allmessagesdefault": "Testu predetermináu",
        "expand_templates_preview": "Vista previa",
        "expand_templates_preview_fail_html": "<em>Como {{SITENAME}} tien activáu el códigu HTML puru y hebo una perda de datos de la sesión, la vista previa ta tapecida como precaución escontra ataques de JavaScript.</em>\n\n<strong>Si esti ye un intentu llexítimu d'accesu a la vista previa, vuelvi a intentalo.</strong>\nSi inda nun funciona, intenta [[Special:UserLogout|salir]] y volver a entrar na to cuenta.",
        "expand_templates_preview_fail_html_anon": "<em>Como {{SITENAME}} tien activáu el códigu HTML puru y nun aniciasti sesión, la vista previa ta tapecida como precaución escontra ataques de JavaScript.</em>\n\n<strong>Si esti ye un intentu llexítimu d'accesu a la vista previa, intenta [[Special:UserLogin|entrar]] y vuelvi a intentalo.</strong>",
+       "expand_templates_input_missing": "Fai falta dar daqué de testu d'entrada.",
        "pagelanguage": "Selector de llingua de la páxina",
        "pagelang-name": "Páxina",
        "pagelang-language": "Llingua",
        "pagelang-use-default": "Usar la llingua predeterminada",
        "pagelang-select-lang": "Escoyer llingua",
+       "pagelang-submit": "Unviar",
        "right-pagelang": "Cambiar la llingua de la páxina",
        "action-pagelang": "cambiar la llingua de la páxina",
        "log-name-pagelang": "Rexistru de cambios de llingua",
        "mediastatistics": "Estadístiques de multimedia",
        "mediastatistics-summary": "Estadístiques sobro los tipos de ficheros xubíos. Esto sólo incluye la versión más nueva d'un ficheru. Escluyense les versiones antigües o desaniciaes de los ficheros.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%)",
+       "mediastatistics-bytespertype": "Tamañu total del ficheru pa esta sección: {{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%).",
+       "mediastatistics-allbytes": "Tamañu total del ficheru pa tolos ficheros: {{PLURAL:$1|$1 byte|$1 bytes}} ($2).",
        "mediastatistics-table-mimetype": "Tipu MIME",
        "mediastatistics-table-extensions": "Estensiones posibles",
        "mediastatistics-table-count": "Númberu de ficheros",
        "mediastatistics-header-text": "Testual",
        "mediastatistics-header-executable": "Executables",
        "mediastatistics-header-archive": "Formatos comprimíos",
+       "mediastatistics-header-total": "Tolos ficheros",
        "json-warn-trailing-comma": "$1 {{PLURAL:$1|coma al final desanicióse|comes al final desaniciáronse}} de JSON",
        "json-error-unknown": "Hebo un problema col JSON. Error: $1",
        "json-error-depth": "Pasóse de la fondura máxima de la pila",
index 9cbb3ef..3ae26e9 100644 (file)
        "rows": "Sıralar:",
        "columns": "Sütunlar:",
        "searchresultshead": "Axtar",
-       "stub-threshold": "<a href=\"#\" class=\"stub\">Keçidsiz linki</a> format etmək üçün hüdud (baytlarla):",
-       "stub-threshold-disabled": "Kənarlaşdırılıb",
+       "stub-threshold": "Qaralama məqalələrə keçidlərin tərtibatını təyinetmə diapazonu ($1):",
+       "stub-threshold-sample-link": "nümunə",
+       "stub-threshold-disabled": "Yoxdur",
        "recentchangesdays": "Son dəyişiklərdə göstərilən günlərin miqdarı:",
        "recentchangesdays-max": "Maksimum $1 {{PLURAL:$1|gün|gün}}",
        "recentchangescount": "Son dəyişikliklərdə başlıq sayı:",
        "recentchanges-label-minor": "Bu kiçik redaktədir",
        "recentchanges-label-bot": "Bu redaktə bot tərəfindən edilmişdir",
        "recentchanges-label-unpatrolled": "Bu redaktə hələ patrullanmayıb",
-       "recentchanges-label-plusminus": "Səhifənin ölçüsü bayt miqdarı ilə təyin edilir",
+       "recentchanges-label-plusminus": "Səhifənin ölçüsündəki dəyişiklik (baytlarla)",
        "recentchanges-legend-heading": "'''Legenda:'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (həmçinin bax: [[Special:NewPages|yeni səhifələrin siyahısı]])",
        "rcnotefrom": "Aşağıda <strong>$2</strong>-dən bu yana olan dəyişikliklər göstərilib (<strong>$1</strong>-dən çox olmayaraq).",
        "rc_categories": "Kateqoriyalara limit qoy (\"|\" ilə ayır)",
        "rc_categories_any": "Hər",
        "rc-change-size": "$1",
-       "rc-change-size-new": "$1 üçün dəyişiklikdən sonrakı həcm: {{PLURAL:$1|bayt|bayt|bayt}}",
+       "rc-change-size-new": "Dəyişiklikdən sonrakı ölçü: $1 bayt",
        "newsectionsummary": "/* $1 */ yeni bölmə",
        "rc-enhanced-expand": "Ətraflı göstər",
        "rc-enhanced-hide": "Redaktələri gizlət",
        "backend-fail-copy": "\"$1\" faylı \"$2\" faylına kopyalanmır.",
        "backend-fail-read": "\"$1\" faylı oxunmadı.",
        "backend-fail-create": "\"$1\" faylı yazıla bilmədi.",
+       "backend-fail-maxsize": "$1 faylının ölçüsü $2 baytdan çox olduğu üçün yazmaq mümkün olmadı.",
        "uploadstash": "Gizli yükləmə",
        "uploadstash-clear": "Müvəqqəti faylları təmizlə",
        "uploadstash-refresh": "Fayl siyahısını yenilə",
        "restriction-level": "Məhdudiyyət dərəcəsi:",
        "minimum-size": "Minimum həcm",
        "maximum-size": "Maksimum həcm",
-       "pagesize": "(baytlar)",
+       "pagesize": "(bayt)",
        "restriction-edit": "Redaktə",
        "restriction-move": "Adını dəyiş",
        "restriction-create": "Yarat",
        "exif-xresolution": "Üfiqi xətt",
        "exif-yresolution": "Şaquli xətt",
        "exif-rowsperstrip": "Hər blokdakı sətirlərin sayı",
-       "exif-jpeginterchangeformatlength": "JPEG məlumat bazasının baytları",
+       "exif-jpeginterchangeformatlength": "JPEG məlumatın ölçüsü",
        "exif-datetime": "Faylın dəyişməsi tarixi və vaxtı",
        "exif-imagedescription": "Şəkil başlığı",
        "exif-make": "Kamera istehsalçısı",
        "autosumm-replace": "Səhifənin məzmunu '$1' yazısı ilə dəyişdirildi",
        "autoredircomment": "[[$1]] səhifəsinə istiqamətləndirilir",
        "autosumm-new": "Səhifəni '$1' ilə yarat",
+       "size-bytes": "$1 bayt",
        "watchlistedit-normal-title": "İzlədiyim səhifələri redaktə et",
        "watchlistedit-normal-legend": "İzləmə siyahısından başlıqların silinməsi",
        "watchlistedit-normal-submit": "Başlığın silinməsi",
        "duration-millennia": "$1 {{PLURAL:$1|minillik|minillik}}",
        "limitreport-cputime": "CPU vaxt istifadəsi",
        "limitreport-walltime": "Real vaxt istifadəsi",
+       "limitreport-postexpandincludesize-value": "$1/$2 bayt",
        "expand_templates_output": "Nəticə",
        "expand_templates_ok": "OK",
        "pagelang-name": "Səhifə",
        "pagelang-language": "Dil",
+       "mediastatistics-nbytes": "$1 bayt ($2; $3%)",
        "mediastatistics-header-unknown": "Naməlum",
        "mediastatistics-header-audio": "Audio",
        "mediastatistics-header-video": "Videolar",
index 0b8ce7d..a212a0e 100644 (file)
        "protectthispage": "بۇ صحیفه‌‌نی قوْرو",
        "unprotect": "قوْروماغی دَییشدیر",
        "unprotectthispage": "بۇ صحیفه‌نین قوْروماسینی دَییشدیر",
-       "newpage": "يئنی صحیفه‌‌",
+       "newpage": "يئنی صفحه‌‌",
        "talkpage": "بۇ صحیفه‌نی دانیش",
        "talkpagelinktext": "دانیشیق",
        "specialpage": "اؤزل صفحه",
        "articlepage": "ایچری‌لی صحیفه‌یه باخ",
        "talk": "دانیشیق",
        "views": "گؤرونوشلر",
-       "toolbox": "آراجلار",
+       "toolbox": "آلتلر",
        "userpage": "ایشلدن صفحه‌‌سینه باخ",
        "projectpage": "پروژه صحیفه‌سینه باخ",
        "imagepage": "فایل صحیفه‌سینه باخ",
        "templatesusedsection": "{{PLURAL:$1|شابلون}} بو بؤلمه‌ده ایشلنیب‌دیر:",
        "template-protected": "(قورونوب)",
        "template-semiprotected": "(یاریم‌قورونموش)",
-       "hiddencategories": "بو صحیفه {{PLURAL:$1|بیر گیزلی دسته‌یه|$1 گیزلی دسته‌لره}} عایددیر:",
+       "hiddencategories": "بۇ صفحه {{PLURAL:$1|بیر گیزلی بؤلمه‌یه|$1 گیزلی بؤلمه‌لره}} مربوط‌دور:",
        "nocreatetext": "{{SITENAME}} یئنی صحیفه یارادماق ایمکانی‌نی محدودلاشدیریب‌دیر.\nسیز دالی دؤنوب و اؤنجه‌دن اولان بیر صحیفه‌نی دَییشدیره بیلرسینیز، یا دا [[Special:UserLogin|گیریب یوخسا یئنی حساب آچین]].",
        "nocreate-loggedin": "سیزین یئنی صحیفه‌لر یاراتماغا ایجازه‌نیز یوخدور.",
        "sectioneditnotsupported-title": "بؤلوم دییشدیرمه‌سی دستک‌لنمیر",
        "rc-enhanced-expand": "تفصیل‌لری گؤستر",
        "rc-enhanced-hide": "تفصیل‌لری گیزلت",
        "rc-old-title": "ایلک‌جه «$1» آدی‌له یارانمیشدیر",
-       "recentchangeslinked": "اÛ\8cÙ\84Ú¯Û\8cلی دَییشیکلیکلر",
-       "recentchangeslinked-feed": "اÛ\8cÙ\84Ú¯Û\8cلی دَییشیکلیکلر",
-       "recentchangeslinked-toolbox": "اÛ\8cÙ\84Ú¯Û\8cلی دَییشیکلیکلر",
+       "recentchangeslinked": "باغلی دَییشیکلیکلر",
+       "recentchangeslinked-feed": "باغلی دَییشیکلیکلر",
+       "recentchangeslinked-toolbox": "باغلی دَییشیکلیکلر",
        "recentchangeslinked-title": "''$1'' ایله ایلگی‌لی دییشیکلر",
        "recentchangeslinked-summary": "آشاغیداکی سیياهی، قئيد اوْلونان صحیفه‌‌يه (و يا قئيد اوْلونان کاتئقوْرياداکی صحیفه‌‌لره) داخیلی کئچید وئرن صحیفه‌‌لرده ائدیلمیش سوْن ديَیشیکلیکلرین سیياهیسیدیر. \n[[Special:Watchlist|ایزله‌مه سیياهینیزداکی]] صحیفه‌‌لر '''قالین''' شریفتله گؤستریلمیشدیر.",
        "recentchangeslinked-page": "صفحه آدی:",
        "randomredirect": "راست‌گله یول‌لاندیرما",
        "randomredirect-nopages": "«$1» آدفضاسیندا هئچ بیر یول‌لاندیرما یوخدور.",
        "statistics": "آمارلار",
-       "statistics-header-pages": "صحیفه آمارلاری",
+       "statistics-header-pages": "صفحه آمارلاری",
        "statistics-header-edits": "دَییشمه آمارلاری",
        "statistics-header-users": "ایشلدن‌لر آمارلاری",
        "statistics-header-hooks": "باشقا آمارلار",
        "statistics-articles": "مقاله‌لر",
-       "statistics-pages": "صحیفه‌لر:",
+       "statistics-pages": "صفحه‌لر:",
        "statistics-pages-desc": "بو ویکی‌ده بوتون صحیفه‌لر، او جومله‌دن دانیشیق صحیفه‌لری، یول‌لاندیرمالار و سونرا.",
        "statistics-files": "یوکلنمیش فایل‌لار",
        "statistics-edits": "{{SITENAME}} یولا دوشندن بَری صحیفه دَییشیکلیکلری",
        "databasenotlocked": "وئریلن‌لر بازاسی باغلانماییب.",
        "lockedbyandtime": "({{Gender: $1 | $1}} طرفین‌دن  $2 $3 اعتبار ایله)",
        "move-page": "$1 داشینیر",
-       "move-page-legend": "صحیفه‌نین آدینی دییش",
+       "move-page-legend": "صفحه‌نین آدینی دَییش",
        "movepagetext": "آشاغی‌داکی فورمدان ایستیفاده ائتمک، صحیفه‌نین آدینی، بوتون تاریخچه‌سینی ده کؤچورمک‌له، یئنی باشلیغا دییشه‌جک.\nاسکی باشلیق یئنی باشلیغا یول‌لاندیریلاجاق‌دیر.\nاسکی صحیفه‌یه اولان یول‌لاندیرماقلاری، اوتوماتیک گونجل‌له‌یه بیلرسینیز.\nبو سئچیمی ائتمه‌دیگینیز حالدا، [[Special:DoubleRedirects|تکرارلانان]] و یا [[Special:BrokenRedirects|قیریق یول‌لاندیرمالاری]] یوخلاماغی یاددان چیخارمایین.\nباغلانتیلاری اویغون یئره یول‌لاندیرماسیندان آرخایین اولماق، سیزین مسئولیتینیزده‌دیر.\n\nنظره آلین کی، هدف باشلیق آلتیندا بیر صحیفه مؤوجود اولسا، یئردییشمه '''باش توتمایاجاق'''، مگر بوکی او سونراکی صحیفه یول‌لاندیرما اولا و اؤنجه دَییشمه گئچمیشی ده اولمایا. بو او دئمک‌دیر کی، سهواً آدینی دییشدیگینیز صحیفه‌لری گئری قایتارا بیلمک اولار، بونونلا یاناشی آرتیق مؤوجود اولان صحیفه‌نین اوزرینه باشقا صحیفه یازا بیلمزسینیز.\n\n'''خبردارلیق!'''\nبو یئردییشمه مشهور صحیفه اوچون اساس‌لی و گؤزلنیلمز اولا بیلر؛ اونا گؤره ده بو دییشیک‌لیگی یئرینه یئتیرمزدن اول، بونون مومکون نتیجه‌لرینی باشا دوشدوگونوزدن آرخایین اولون.",
-       "movepagetext-noredirectfixer": "آشاغی‌داکی فورمو دول‌دورماق بیر صحیفنی یئنی‌دن آدلاندیریر، بوتون کئچمیشینی یئنی آدا داشیییر.\nکؤهنه مؤوزو یئنی باشلیغا بیر ایستیقامتلندیرمه صحیفه‌سی اولار.\n[[Special:DoubleRedirects|جوت]] یا دا [[Special:BrokenRedirects|نوزوک ایستیقامتلندیرمه‌لر]] صحیفه‌لرینی ایداره ائدین.\nعلاقه‌لرین گئتمه‌لری لازیم اولان یئرلره گئتدیک‌لرینی عمین اولماق سیزین سوروملولوغونوزدا‌دیر.\n\nیئنی باش‌لیقدا مؤوجود بیر صحیفه وارسا، بوش یا دا بیر ایستیقامتلندیرمه اولمادیقجا و دییشیک‌لیک کئچمیشی اولمادیغی تق‌دیرده، سهیف 'تاشینمایاجاکتیر.\nبو بو معنانی وئرر، بیر صحیفنی اشتباه ائتسه‌نیز صحیفنی کؤهنه آدییلا یئنی‌دن آدلان‌دیرا بیلریک، بو مؤوجود صحیفه‌نین اوزرینه یازماز.\n\n' 'خبردارلیق!'\nبو مشهور بیر صحیفه اوچون تأثیرلی و گؤزلنیلمز بیر دییشیک‌لیک اولا بیلر؛\nخاهیش ائدیریک راتیفیکاسیا ائتمه‌دن اول بونون نتیجه‌لرینی آنلادیغینیزدان امین اولون.",
+       "movepagetext-noredirectfixer": "آشاغی‌داکی فوْرمو دوْلدورماق بیر صفحه‌نی یئنی‌دن آدلاندیریر، بۆتون گئچمیشینی یئنی آدا داشیییر.\nکؤهنه موضوعو یئنی باشلیغا بیر یوْللاندیرما صفحه‌سی اوْلار.\n[[Special:DoubleRedirects|ایکی‌قات]] یوْخسا [[Special:BrokenRedirects|خطالی یوْللاندیرمالار]] صفحه‌لرینی یوْخلایین.\nباغلانتی‌لارین گئتمه‌لری گرک اولان یئرلره گئتدیک‌لرینی آرخایین اوْلماق سیزین مسعولیتینیزدیر.\n\nیئنی باشلیقدا مؤوجود بیر صفحه وارسا، بوْش یوْخسا بیر یوْللاندیرما اوْلمادیقجا و دییشیک‌لیک گئچمیشی اوْلمازسا، صفحه داشینمایاجاق.\nبۇ یانی، بیر صفحه‌نی اشتباه ائتسه‌نیز صفحه‌نی کؤهنه آدییلا یئنی‌دن آدلاندیرا بیلرسینیز، آنجاق بیر صفحه‌نی قاباقجادان مووجود اوْلان صفحه‌یه یوْللاندیرا بیلمزسینیز.\n\n' 'تذکور!'\nچوْخ گؤروشلو صفحه‌لرین یوْللاندیرماسی گؤزله‌نیلمز اثرلری اوْلا بیلر. لوطفا یوْللاندیرمادان قاباق، ایشینیزین نتیجه‌سیندن آرخایین اوْلون.",
        "movepagetalktext": "اویغون دانیشیق صحیفه‌سی آوتوماتیک حرکت ائده‌جک 'گر:'\n* بوش اولمایان دانیشیق صحیفه‌سی یئنی آدلا آرتیق مؤوجوددورسا، و یا\n* سیز بایراغی آشاغی‌دان گؤتورسه‌نیز.\n\nهمین حال‌لاردا ، احتیاج یارانارسا سیز صحیفه‌لری الله بیرلش‌دیرمک مجبوریتینده قالاجاقسینیز",
        "moveuserpage-warning": "' 'خبردارلیق:' بیر ایستیفاده‌چی صحیفه‌سینی داشیماق اوزرسینیز. خاهیش ائدیریک یالنیز صحیفه‌نین تاشیناجاغینا، آنجاق ایستیفاده‌چی‌نین یئنی‌دن آدلاندیریلمایاجاغینا دقت ائدین.",
        "movenologintext": "صحیفه‌نین آدینی دییشیک‌لیک اوچون قئیدیات‌لی و [[Special:UserLogin|سیستئمه]] داخیل اولمانیز لازیم‌دیر.",
        "cant-move-user-page": "ایستیفاده‌چی صحیفه‌لری‌نین آدینی دییشه بیلمزسینیز (باش‌لیق‌لاردان باشقا).",
        "cant-move-to-user-page": "بیر صحیفنی، بیر ایستیفاده‌چی صحیفه‌سینه داشیماغا ایجازه وئریلمیر (بیر ایستیفاده‌چی آلتسایفاسی خاریجینده).",
        "newtitle": "یئنی باش‌لیق",
-       "move-watch": "بو صحیفنی ایزله",
-       "movepagebtn": "صحیفه‌نین آدینی دییش",
+       "move-watch": "بۇ صفحه‌نی ایزله",
+       "movepagebtn": "صفحه‌نین آدینی دَییش",
        "pagemovedsub": "یئردییشمه ائدیلمیش‌دیر",
        "movepage-moved": "'\"$1\" صحیفه‌سی \"$2\" صحیفه‌سینه یئرلشدیریلمیشدیر",
        "movepage-moved-redirect": "یؤنلندیرمه یارادیلدی.",
        "movepage-moved-noredirect": "یؤنلندیرمه‌نین یارادیلماسینین قارشییس آلیندی.",
        "articleexists": "بو آددا صحیفه آرتیق مؤوجوددور و یا سیزین سئچدیگینیز آد اویغون دئییل.\nزحمت اولماسا باشقا آد سئچین.",
        "cantmove-titleprotected": "بیر صحیفنی بو مؤوقئیه داشییا بیلمز، چونکی یئنی موضونون یارادیلماسی قورونور",
-       "movetalk": "بو صحیفه‌نین دانیشیق صحیفه‌سی‌نین ده آدینی دییش‌دیر.",
+       "movetalk": "بۇ صفحه‌نین دانیشیق صفحه‌سی‌نین ده آدینی دَییشدیر.",
        "move-subpages": "یاریم صحیفه‌لری کؤچور ($1-ا قدر)",
        "move-talk-subpages": "دانیشیق صحیفه‌لری‌نین آلت صحیفه‌لرینی کؤچور ($1-ا قدر)",
        "movepage-page-exists": "$1 مادده‌سی اونسوز دا وار اولماقدا‌دیر، و آوتوماتیک اولا‌راق یئنی‌دن یازیلا بیلمز.",
        "table_pager_limit_label": "هر صحیفه‌ده اولان موردلر سایی‌سی",
        "table_pager_limit_submit": "گئت",
        "table_pager_empty": "نتیجه سیز",
-       "autosumm-blank": "صحیفه‌‌نی بوشالتدی",
+       "autosumm-blank": "صفحه‌‌نی بوْشالتدی",
        "autosumm-replace": "صحیفه‌‌نین مظمونو ' $1' يازیسی ایله ديَیشدیریلدی",
        "autoredircomment": "[[$1]] صفحه‌‌سینه یوْللاندیریلیر",
        "autosumm-new": "صفحه‌‌نی ' $1' ایله ياراتدی",
index 664b941..edf10c8 100644 (file)
        "upload-form-label-select-file": "Абраць файл",
        "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-usage-filename": "Назва файлу",
        "foreign-structured-upload-form-label-own-work": "Гэта мая ўласная праца",
        "foreign-structured-upload-form-3-label-question-noderiv": "Ці ўтрымлівае яна або яна натхнёная працай, якой валодае нехта іншы, як прыклад, лягатып?",
        "foreign-structured-upload-form-3-label-yes": "Так",
        "foreign-structured-upload-form-3-label-no": "Не",
+       "foreign-structured-upload-form-3-label-alternative": "На жаль, у гэтым выпадку інструмэнт не падтрымлівае загрузку такога файлу. Вы ўсё яшчэ можаце загрузіць яго з дапамогай [https://commons.wikimedia.org/wiki/Special:UploadWizard майстару загрузкі Вікісховішча], пры ўмове, што файл даступны паводле вольнай ліцэнзіі.",
+       "foreign-structured-upload-form-4-label-good": "З дапамогай гэтага інструмэнту вы можаце загрузіць адукацыйную графіку, створаную вамі, а таксама зробленыя вамі фотаздымкі, якія ня ўтрымліваюць працы, што належаць некаму іншаму.",
+       "foreign-structured-upload-form-4-label-bad": "Вы ня можаце загружаць выявы, знойдзеныя ў пошукавых сыстэмах або спампаваныя зь іншых сайтаў.",
        "backend-fail-stream": "Немагчыма накіраваць файл $1.",
        "backend-fail-backup": "Немагчыма зрабіць рэзэрвовую копію файла $1.",
        "backend-fail-notexists": "Файл $1 не існуе.",
        "protectedtitles": "Забароненыя старонкі",
        "protectedtitles-summary": "На гэтай старонцы знаходзіцца сьпіс назваў, якія абароненыя ад стварэньня. Дзеля сьпісу старонак, якія ў цяперашні час абароненыя, глядзіце [[{{#special:ProtectedPages}}|{{int:protectedpages}}]].",
        "protectedtitlesempty": "Цяпер няма абароненых назваў з пазначанымі парамэтрамі.",
+       "protectedtitles-submit": "Паказаць загалоўкі",
        "listusers": "Сьпіс удзельнікаў і ўдзельніц",
        "listusers-editsonly": "Паказаць толькі ўдзельнікаў, якія маюць рэдагаваньні",
        "listusers-creationsort": "Адсартаваць па даце стварэньня",
        "usereditcount": "$1 {{PLURAL:$1|рэдагаваньне|рэдагаваньні|рэдагаваньняў}}",
        "usercreated": "{{GENDER:$3|Створаны|Створаная}} $1 у $2",
        "newpages": "Новыя старонкі",
+       "newpages-submit": "Паказаць",
        "newpages-username": "Імя ўдзельніка:",
        "ancientpages": "Найстарэйшыя старонкі",
        "move": "Перанесьці",
        "specialloguserlabel": "Выканаўца:",
        "speciallogtitlelabel": "Мэта (назва ці {{ns:user}}:імя_ўдзельніка для ўдзельніка):",
        "log": "Журналы падзеяў",
+       "logeventslist-submit": "Паказаць",
        "all-logs-page": "Усе публічныя журналы падзеяў",
        "alllogstext": "Сумесны паказ усіх журналаў падзеяў {{GRAMMAR:родны|{{SITENAME}}}}.\nВы можаце адфільтраваць вынікі па тыпе журналу, удзельніку ці старонцы.",
        "logempty": "Падобных запісаў у журнале няма.",
        "cachedspecial-viewing-cached-ts": "Вы праглядаеце закэшаваную вэрсію старонкі, якая можа быць неактуальнай.",
        "cachedspecial-refresh-now": "Пабачыць апошнюю вэрсію.",
        "categories": "Катэгорыі",
+       "categories-submit": "Паказаць",
        "categoriespagetext": "{{PLURAL:$1|1=Наступная катэгорыя зьмяшчае|Наступныя катэгорыі зьмяшчаюць}} старонкі альбо мэдыяфайлы.\nТут не паказаныя [[Special:UnusedCategories|катэгорыі, якія не выкарыстоўваюцца]].\nГлядзіце таксама [[Special:WantedCategories|сьпіс запатрабаваных катэгорыяў]].",
        "categoriesfrom": "Паказаць катэгорыі, пачынаючы з:",
        "special-categories-sort-count": "сартаваць паводле колькасьці",
        "activeusers-hidebots": "Схаваць робатаў",
        "activeusers-hidesysops": "Схаваць адміністратараў",
        "activeusers-noresult": "Удзельнікі ня знойдзеныя.",
+       "activeusers-submit": "Паказаць актыўных удзельнікаў",
        "listgrouprights": "Правы групаў удзельнікаў",
        "listgrouprights-summary": "Ніжэй пададзены сьпіс групаў удзельнікаў {{GRAMMAR:родны|{{SITENAME}}}}, разам зь іх правамі.\nТаксама можна паглядзець [[{{MediaWiki:Listgrouprights-helppage}}|дадатковую інфармацыю]] пра асабістыя правы.",
        "listgrouprights-key": "Легенда:\n* <span class=\"listgrouprights-granted\">Прызначаныя правы</span>\n* <span class=\"listgrouprights-revoked\">Адабраныя правы</span>",
        "wlshowlast": "Паказаць за апошнія $1 гадзінаў, $2 дзён",
        "watchlistall2": "усё",
        "watchlist-hide": "Схаваць",
+       "watchlist-submit": "Паказаць",
        "wlshowtime": "Пэрыяд часу для паказу:",
        "wlshowhideminor": "дробныя праўкі",
        "wlshowhidebots": "робатаў",
        "wlshowhideanons": "ананімных удзельнікаў",
        "wlshowhidepatr": "патруляваныя праўкі",
        "wlshowhidemine": "мае праўкі",
+       "wlshowhidecategorization": "катэгарызацыю старонак",
        "watchlist-options": "Налады сьпісу назіраньня",
        "watching": "Дадаецца ў сьпіс назіраньня…",
        "unwatching": "Выдаляецца са сьпісу назіраньня…",
        "delete-confirm": "Выдаліць «$1»",
        "delete-legend": "Выдаліць",
        "historywarning": "<strong>Папярэджаньне</strong>: старонка, якую Вы зьбіраецеся выдаліць, мае гісторыю з $1 {{PLURAL:$1|вэрсіі|вэрсіяў|вэрсіяў}}:",
+       "historyaction-submit": "Паказаць",
        "confirmdeletetext": "Зараз Вы выдаліце старонку разам з усёй гісторыяй зьменаў.\nКалі ласка, пацьвердзіце, што Вы зьбіраецеся гэта зрабіць і што Вы разумееце ўсе наступствы, а таксама робіце гэта ў адпаведнасьці з [[{{MediaWiki:Policy-url}}|правіламі]].",
        "actioncomplete": "Дзеяньне выкананае",
        "actionfailed": "Дзеяньне ня выкананае",
        "whatlinkshere-hidelinks": "$1 спасылкі",
        "whatlinkshere-hideimages": "$1 спасылкі на выявы",
        "whatlinkshere-filters": "Фільтры",
+       "whatlinkshere-submit": "Перайсьці",
        "autoblockid": "Аўтаматычнае блякаваньне №$1",
        "block": "Заблякаваць удзельніка",
        "unblock": "Разблякаваць удзельніка",
        "export-download": "Захаваць як файл",
        "export-templates": "Разам з шаблёнамі",
        "export-pagelinks": "Уключыць зьвязаныя старонкі да глыбіні:",
+       "export-manual": "Дадаць старонкі ўручную:",
        "allmessages": "Сыстэмныя паведамленьні",
        "allmessagesname": "Назва",
        "allmessagesdefault": "Тэкст па змоўчаньні",
        "exif-compression-4": "CCITT Група 4 факсымільнае кадаваньне",
        "exif-copyrighted-true": "Ахоўваецца аўтарскім правам",
        "exif-copyrighted-false": "Статус аўтарскіх правоў ня вызначаны",
+       "exif-photometricinterpretation-1": "Чорны і белы (чорны — 0)",
        "exif-unknowndate": "Невядомая дата",
        "exif-orientation-1": "Звычайная",
        "exif-orientation-2": "Адлюстраваная па гарызанталі",
        "tags-deactivate": "адключыць",
        "tags-hitcount": "$1 {{PLURAL:$1|зьмена|зьмены|зьменаў}}",
        "tags-manage-no-permission": "Вы ня маеце правоў на зьмену метак.",
+       "tags-manage-blocked": "Вы ня можаце мяняць меткі, калі заблякаваныя.",
        "tags-create-heading": "Стварэньне новай меткі",
        "tags-create-explanation": "Па змоўчаньні, наваствораныя меткі будуць даступныя для выкарыстаньня ўдзельнікамі і робатамі.",
        "tags-create-tag-name": "Назва меткі:",
        "tags-deactivate-not-allowed": "Немагчыма дэактываваць метку «$1».",
        "tags-deactivate-submit": "Адключыць",
        "tags-apply-no-permission": "Вы ня маеце права прымяняць меткі да вашых рэдагаваньняў.",
+       "tags-apply-blocked": "Вы ня можаце мяняць меткі да вашых зьменаў, калі заблякаваныя.",
        "tags-apply-not-allowed-one": "Метка «$1» ня можа быць прызначаная ўручную.",
        "tags-apply-not-allowed-multi": "{{PLURAL:$2|Наступную метку|Наступныя меткі}} нельга дадаваць уручную: $1",
        "tags-update-no-permission": "Вы ня маеце права на дадаваньне ці выдаленьне метак зьменаў для асобных вэрсіяў ці запісаў журналаў.",
index 4ae53f9..2144684 100644 (file)
        "protect-level-sysop": "Толькі для адміністратараў",
        "protect-summary-cascade": "каскад",
        "protect-expiring": "скончыцца $1 (UTC)",
-       "protect-expiring-local": "канчацца $1",
+       "protect-expiring-local": "канчаецца $1",
        "protect-expiry-indefinite": "бясконца",
        "protect-cascade": "Каскад - ахоўваць таксама і ўсе тыя старонкі, які ўлучаюцца ў гэтую.",
        "protect-cantedit": "Вы не можаце змяніць узровень аховы гэтай старонкі, таму што не маеце дазволу правіць яе.",
index 2633e0b..50b3ffb 100644 (file)
        "directorynotreadableerror": "Директория \"$1\" не може да бъде четена.",
        "filenotfound": "Файлът „$1“ не беше намерен.",
        "unexpected": "Неочаквана стойност: „$1“=„$2“.",
-       "formerror": "Възникна грешка при изпращане на формуляра",
+       "formerror": "Възникна грешка при изпращане на формуляра.",
        "badarticleerror": "Действието не може да бъде изпълнено на тази страница.",
        "cannotdelete": "Указаната страница или файл \"$1\" не можа да бъде изтрит(а). Възможно е вече да е бил(а) изтрит(а) от някой друг.",
        "cannotdelete-title": "Страницата „$1“ не може да бъде изтрита",
-       "delete-hook-aborted": "Изтриването беше прекъснато от кука.\nНе беше посочена причина за това.",
+       "delete-hook-aborted": "Изтриването беше прекъснато от софтуерно прехващане.\nНе беше посочена причина за това.",
        "no-null-revision": "Не може да бъде създадена празна версия на страницата „$1“",
        "badtitle": "Невалидно заглавие",
        "badtitletext": "Желаното заглавие на страница е невалидно, празно или неправилна препратка към друго уики. Възможно е да съдържа знаци, които не са позволени в заглавия.",
        "title-invalid-talk-namespace": "Желаното заглавие на страница се отнася към беседа, която не съществува",
        "title-invalid-characters": "Желаното заглавие на статия съдържа невалидни знаци: „$1“",
        "title-invalid-relative": "Заглавието съдържа относителен път. Относителни заглавия на статии (./,../) са невалидни, защото често ще са недостижимо, когато биват извиквани от браузъра на потребителя.",
-       "title-invalid-magic-tilde": "Желаното заглавие на статия съдържа невалидна поредица от вълчнички (<nowiki>~~~</nowiki>).",
+       "title-invalid-magic-tilde": "Желаното заглавие на статия съдържа невалидна поредица от тилди (<nowiki>~~~</nowiki>).",
        "title-invalid-too-long": "Желаното заглавие на статия е твърде дълго. Трябва да е не по-дълго от $1 {{PLURAL:$1|байт|байта}} в кодиране UTF-8.",
        "title-invalid-leading-colon": "Желаното заглавие на статия съдържа невалидно двоеточие в началото.",
        "perfcached": "Следните данни са извлечени от склада и затова може да не отговарят на текущото състояние. В складираното копие {{PLURAL:$1|е допустим най-много един резултат|са допустими най-много $1 резултата}}.",
        "mypreferencesprotected": "Нямате права да редактирате настройките си.",
        "ns-specialprotected": "Специалните страници не могат да бъдат редактирани.",
        "titleprotected": "Тази страница е била защитена срещу създаване от [[User:$1|$1]].\nПосочената причина е ''$2''.",
-       "filereadonlyerror": "ФайлÑ\8aÑ\82 â\80\9e$1â\80\9c Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð±Ñ\8aде Ð¿Ñ\80оменен, Ñ\82Ñ\8aй ÐºÐ°Ñ\82о Ñ\84айловоÑ\82о Ñ\85Ñ\80анилиÑ\89е â\80\9e$2â\80\9c Ðµ Ð² Ñ\80ежим Ñ\81амо Ð·Ð° Ñ\87еÑ\82ене.\n\nÐ\90дминиÑ\81Ñ\82Ñ\80аÑ\82оÑ\80Ñ\8aÑ\82, който го е заключил, е посочил следната причина: „$3“.",
+       "filereadonlyerror": "ФайлÑ\8aÑ\82 â\80\9e$1â\80\9c Ð½Ðµ Ð¼Ð¾Ð¶Ðµ Ð´Ð° Ð±Ñ\8aде Ð¿Ñ\80оменен, Ñ\82Ñ\8aй ÐºÐ°Ñ\82о Ñ\84айловоÑ\82о Ñ\85Ñ\80анилиÑ\89е â\80\9e$2â\80\9c Ðµ Ð² Ñ\80ежим Ñ\81амо Ð·Ð° Ñ\87еÑ\82ене.\n\nСиÑ\81Ñ\82емниÑ\8fÑ\82 Ð°Ð´Ð¼Ð¸Ð½Ð¸Ñ\81Ñ\82Ñ\80аÑ\82оÑ\80, който го е заключил, е посочил следната причина: „$3“.",
        "invalidtitle-knownnamespace": "Невалидно заглавие с именно пространство „$2“ и текст „$3“",
        "invalidtitle-unknownnamespace": "Невалидно заглавие с неразпознато именно пространство номер $1 и текст „$2“",
        "exception-nologin": "Не сте влезли в системата",
        "yourname": "Потребителско име:",
        "userlogin-yourname": "Потребителско име",
        "userlogin-yourname-ph": "Въведете вашето потребителско име",
-       "createacct-another-username-ph": "Ð\92Ñ\8aвежда Ñ\81е Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82елÑ\81коÑ\82о име",
+       "createacct-another-username-ph": "Ð\92Ñ\8aведеÑ\82е Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82елÑ\81ко име",
        "yourpassword": "Парола:",
        "userlogin-yourpassword": "Парола",
        "userlogin-yourpassword-ph": "Въведете вашата парола",
        "createacct-emailrequired": "Адрес за електронна поща",
        "createacct-emailoptional": "Адрес за електронна поща (незадължително)",
        "createacct-email-ph": "Въведете Вашия адрес за електронна поща",
-       "createacct-another-email-ph": "Ð\92Ñ\8aвежда Ñ\81е електронна поща",
+       "createacct-another-email-ph": "Ð\92Ñ\8aведеÑ\82е електронна поща",
        "createaccountmail": "Използване на случайна временна парола, която се изпраща на електронната поща, посочена по-долу",
        "createacct-realname": "Истинско име (незадължително)",
        "createaccountreason": "Причина:",
        "sig_tip": "Вашият подпис заедно с времева отметка",
        "hr_tip": "Хоризонтална линия (използвайте пестеливо)",
        "summary": "Резюме:",
-       "subject": "Тема/заглавие:",
+       "subject": "Ð\97аглавие:",
        "minoredit": "Това е малка промяна",
        "watchthis": "Наблюдаване на страницата",
        "savearticle": "Съхраняване",
        "anonpreviewwarning": "Внимание: Не сте влезли в системата. Ако съхраните редакцията си, тя ще бъде записана в историята на страницата с вашият IP-адрес.",
        "missingsummary": "'''Напомняне:''' Не е въведено кратко описание на промените. При повторно натискане на бутона „Съхраняване“, редакцията ще бъде съхранена без резюме.",
        "missingcommenttext": "По-долу въведете вашето съобщение.",
-       "missingcommentheader": "'''Напомняне:''' Не е въведено заглавие на коментара.\nПри повторно натискане на \"{{int:savearticle}}\", редакцията ще бъде записана без такова.",
+       "missingcommentheader": "<strong>Напомняне:</strong> Не е въведено заглавие на коментара.\nПри повторно натискане на \"{{int:savearticle}}\", редакцията ще бъде записана без такова.",
        "summary-preview": "Предварителен преглед на резюмето:",
        "subject-preview": "Предварителен преглед на заглавието:",
+       "previewerrortext": "Възникна грешка при опита за преглед на промените.",
        "blockedtitle": "Потребителят е блокиран",
        "blockedtext": "'''Вашето потребителско име (или IP-адрес) беше блокирано.'''\n\nБлокирането е извършено от $1. Посочената причина е: ''$2''\n\n*Начало на блокирането: $8\n*Край на блокирането: $6\n*Блокирането се отнася за: $7\n\nМожете да се свържете с $1 или с някой от останалите [[{{MediaWiki:Grouppage-sysop}}|администратори]], за да обсъдите блокирането.\n\nМожете да използвате услугата „Пращане писмо на потребител“ само ако не ви е забранена употребата й и ако сте посочили валидна електронна поща в [[Special:Preferences|настройките]] си.\n\nВашият IP адрес е $3, а номерът на блокирането е $5. Включвайте едно от двете или и двете във всяко запитване, което правите.",
        "autoblockedtext": "IP-адресът ви беше блокиран автоматично, защото е бил използван от друг потребител, който е бил блокиран от $1.\nПосочената причина е:\n\n:''$2''\n\n* Начало на блокирането: $8\n* Край на блокирането: $6\n* Блокирането се отнася за: $7\n\nМожете да се свържете с $1 или с някой от останалите [[{{MediaWiki:Grouppage-sysop}}|администратори]], за да обсъдите блокирането.\n\nМожете да използвате услугата „Пращане писмо на потребител“ само ако не ви е забранена употребата й и ако сте посочили валидна електронна поща в [[Special:Preferences|настройките]] си.\n\nТекущият ви IP-адрес е $3, а номерът на блокирането ви е $5. Включвайте ги във всяко питане, което правите.",
        "copyrightwarning": "Обърнете внимание, че всички приноси към {{SITENAME}} се публикуват при условията на $2 (за подробности вижте $1).\nАко не сте съгласни вашата писмена работа да бъде променяна и разпространявана без ограничения, не я публикувайте.<br />\n\nСъщо потвърждавате, че '''вие''' сте написали материала или сте използвали '''свободни ресурси''' — <em>обществено достояние</em> или друг свободен източник.\nАко сте ползвали чужди материали, за които имате разрешение, непременно посочете източника.\n\n<div style=\"font-variant:small-caps\">'''Не публикувайте произведения с авторски права без разрешение!'''</div>",
        "copyrightwarning2": "Обърнете внимание, че всички приноси към {{SITENAME}} могат да бъдат редактирани, променяни или премахвани от останалите сътрудници.\nАко не сте съгласни вашата писмена работа да бъде променяна без ограничения, не я публикувайте.<br />\nСъщо потвърждавате, че '''вие''' сте написали материала или сте използвали '''свободни ресурси''' — <em>обществено достояние</em> или друг свободен източник (за подробности вижте $1).\nАко сте ползвали чужди материали, за които имате разрешение, непременно посочете източника.\n\n<div style=\"font-variant:small-caps\">'''Не публикувайте произведения с авторски права без разрешение!'''</div>",
        "longpageerror": "'''ГРЕШКА: Изпратеният текст е с големина {{PLURAL:$1|един килобайт|$1 килобайта}}, което надвишава позволения максимум от {{PLURAL:$2|един килобайт|$2 килобайта}}.'''\nПоради тази причина той не може да бъде съхранен.",
-       "readonlywarning": "'''ВНИМАНИЕ: Базата от данни беше затворена за поддръжка, затова в момента промените няма да могат да бъдат съхранени.'''\n\nАко желаете, можете да съхраните страницата като текстов файл и да се опитате да я публикувате по-късно.\n\nАдминистраторът, който е затворил базата от данни, е посочил следната причина: $1",
+       "readonlywarning": "<strong>ВНИМАНИЕ: Базата от данни беше затворена за поддръжка, затова в момента промените няма да могат да бъдат съхранени.</strong>\n\nАко желаете, можете да съхраните страницата като текстов файл и да се опитате да я публикувате по-късно.\n\nСистемният администратор, който е затворил базата от данни, е посочил следната причина: $1",
        "protectedpagewarning": "'''Внимание: Страницата е защитена и само потребители със статут на администратори могат да я редактират.'''\nЗа справка по-долу е показан последният запис от дневниците.",
        "semiprotectedpagewarning": "'''Забележка:''' Тази страница е защитена и само регистрирани потребители могат да я редактират.\nЗа справка по-долу е показан последният запис от дневниците.",
-       "cascadeprotectedwarning": "'''Внимание:''' Страницата е защитена, като само потребители с администраторски права могат да я редактират. Тя е включена в {{PLURAL:$1|следната страница|следните страници}} с каскадна защита:",
+       "cascadeprotectedwarning": "<strong>Внимание:</strong> Страницата е защитена, като само потребители с администраторски права могат да я редактират. Тя е включена в {{PLURAL:$1|следната страница|следните страници}} с каскадна защита:",
        "titleprotectedwarning": "'''Внимание: Тази страница е защитена и са необходими [[Special:ListGroupRights|специални права]], за да бъде създадена.'''\nЗа справка по-долу е показан последният запис от дневниците.",
        "templatesused": "{{PLURAL:$1|Шаблон, използван|Шаблони, използвани}} на страницата:",
        "templatesusedpreview": "{{PLURAL:$1|Шаблон, използван|Шаблони, използвани}} в предварителния преглед:",
        "columns": "Колони:",
        "searchresultshead": "Търсене",
        "stub-threshold": "Праг за форматиране на <a href=\"#\" class=\"stub\">препратки към мъничета</a>:",
+       "stub-threshold-sample-link": "пример",
        "stub-threshold-disabled": "Изключено",
        "recentchangesdays": "Брой дни в последни промени:",
        "recentchangesdays-max": "(най-много $1 {{PLURAL:$1|ден|дни}})",
        "upload-misc-error-text": "Неизвестна грешка при качване. Убедете се, че адресът е верен и опитайте отново. Ако отново имате проблем, обърнете се към [[Special:ListUsers/sysop|администратор]].",
        "upload-too-many-redirects": "Адресът съдържа твърде много пренасочвания",
        "upload-http-error": "Възникна HTTP грешка: $1",
+       "upload-dialog-button-cancel": "Отказване",
+       "upload-dialog-button-done": "Готово",
+       "upload-dialog-button-save": "Съхраняване",
+       "upload-dialog-button-upload": "Качване",
+       "upload-form-label-select-file": "Избиране на файл",
+       "upload-form-label-infoform-title": "Подробности",
+       "upload-form-label-infoform-name": "Име",
+       "upload-form-label-infoform-description": "Описание",
+       "upload-form-label-usage-title": "Използване",
+       "upload-form-label-usage-filename": "Име на файл",
+       "foreign-structured-upload-form-label-infoform-categories": "Категории",
+       "foreign-structured-upload-form-label-infoform-date": "Дата",
        "foreign-structured-upload-form-3-label-yes": "Да",
        "foreign-structured-upload-form-3-label-no": "Не",
        "backend-fail-notexists": "Файлът $1 не съществува.",
        "wlshowlast": "Показване на последните $1 часа $2 дни",
        "watchlistall2": "всички",
        "watchlist-hide": "Скриване",
+       "watchlist-submit": "Показване",
        "wlshowtime": "Период от време за показване:",
+       "wlshowhideminor": "малки промени",
+       "wlshowhidebots": "ботове",
+       "wlshowhideliu": "регистрирани потребители",
+       "wlshowhideanons": "анонимни потребители",
+       "wlshowhidepatr": "проверени редакции",
+       "wlshowhidemine": "моите редакции",
        "watchlist-options": "Опции на списъка за наблюдение",
        "watching": "Наблюдение…",
        "unwatching": "Спиране на наблюдение…",
        "deletepage": "Изтриване",
        "confirm": "Потвърждаване",
        "excontent": "съдържанието беше: „$1“",
-       "excontentauthor": "съдържанието беше: „$1“ (като единственият автор беше [[Special:Contributions/$2|$2]])",
+       "excontentauthor": "съдържанието беше: „$1“, като единственият автор беше \"[[Special:Contributions/$2|$2]]\" ([[User talk:$2|беседа]])",
        "exbeforeblank": "премахнато преди това съдържание: „$1“",
        "delete-confirm": "Изтриване на „$1“",
        "delete-legend": "Изтриване",
-       "historywarning": "'''Внимание:''' Страницата, която възнамерявате да изтриете, има история с приблизително $1 {{PLURAL:$1|редакция|редакции}}:",
+       "historywarning": "\"Внимание:</strong>  Страницата, която възнамерявате да изтриете, има история с приблизително $1 {{PLURAL:$1|редакция|редакции}}:",
        "historyaction-submit": "Показване",
        "confirmdeletetext": "На път сте безвъзвратно да изтриете страница или файл, заедно с цялата прилежаща редакционна история, от базата от данни.\nПотвърдете, че искате това, разбирате последствията и правите това в съответствие с [[{{MediaWiki:Policy-url}}|линията на поведение]].",
        "actioncomplete": "Действието беше изпълнено",
        "rollback-success": "Отменени редакции на $1; възвръщане към последната версия на $2.",
        "sessionfailure-title": "Прекъсната сесия",
        "sessionfailure": "Изглежда има проблем със сесията ви; действието беше отказано като предпазна мярка срещу крадене на сесията. Натиснете бутона за връщане на браузъра, презаредете страницата, от която сте дошли, и опитайте отново.",
+       "changecontentmodel-title-label": "Заглавие на страницата",
+       "changecontentmodel-reason-label": "Причина:",
        "protectlogpage": "Дневник на защитата",
        "protectlogtext": "Списък на промените в защитата за страницата.\nМожете да прегледате и [[Special:ProtectedPages|списъка на текущо защитените страници]].",
        "protectedarticle": "защити „[[$1]]“",
        "movenotallowedfile": "Нямате права да премествате файлове.",
        "cant-move-user-page": "Нямате нужните права на достъп, за да местите потребителски страници (можете да местите само подстраници).",
        "cant-move-to-user-page": "Нямате нужните права на достъп, за да извършвате преместване на страници върху потребителски страници (можете да местите само върху подстраници от потребителското пространство).",
-       "newtitle": "Ð\9aÑ\8aм Ð½ово заглавие:",
+       "newtitle": "Ð\9dово заглавие:",
        "move-watch": "Наблюдаване на страницата",
        "movepagebtn": "Преместване",
        "pagemovedsub": "Преместването беше успешно",
        "version-libraries": "Инсталирани библиотеки",
        "version-libraries-library": "Библиотека",
        "version-libraries-version": "Версия",
+       "version-libraries-description": "Описание",
+       "version-libraries-authors": "Автори",
        "redirect-submit": "Отваряне",
        "redirect-value": "Стойност:",
        "redirect-user": "Потребителски номер",
        "mediastatistics-table-mimetype": "MIME тип",
        "mediastatistics-header-audio": "Аудио",
        "mediastatistics-header-video": "Видео",
+       "mediastatistics-header-total": "Всички файлове",
        "json-error-syntax": "Синтактична грешка",
        "headline-anchor-title": "Препратка към този раздел",
        "special-characters-group-latin": "Латиница",
        "special-characters-title-minus": "знак минус",
        "mw-widgets-dateinput-placeholder-day": "ГГГГ-ММ-ДД",
        "mw-widgets-dateinput-placeholder-month": "ГГГГ-ММ",
+       "mw-widgets-titleinput-description-new-page": "страницата все още не съществува",
+       "mw-widgets-titleinput-description-redirect": "пренасочване към $1",
        "api-error-blacklisted": "Моля, изберете различно, описателно заглавие."
 }
index 83bf032..959ef9f 100644 (file)
@@ -5,7 +5,8 @@
                        "Ibrahim khashrowdi",
                        "Rachitrali",
                        "Mjbmr",
-                       "Macofe"
+                       "Macofe",
+                       "Hosseinblue"
                ]
        },
        "tog-underline": "لینکانی جهلگا خط کشیتین",
        "allmessages-prefix": "فیلتر کورتین بئ اساس پدوند:",
        "allmessages-language": "زبان:",
        "allmessages-filter-submit": "برا",
-       "allmessages-filter-translate": "ترجمه",
+       "allmessages-filter-translate": "چاوواشەکِردن زوون",
        "thumbnail-more": "ٹُوه کورتین",
        "filemissing": "فایل وجود نداریت",
        "thumbnail_error": "خطا بئ ناحُنی ئی جۆڑ کورتین ئی وختا: $1",
index b4dabe0..2833ee9 100644 (file)
        "viewpagelogs": "Pogledaj zapisnike ove stranice",
        "nohistory": "Ne postoji historija izmjena za ovu stranicu.",
        "currentrev": "Trenutna verzija",
-       "currentrev-asof": "Trenutna verzija na dan $1",
+       "currentrev-asof": "Trenutna verzija na dan $2 u $3",
        "revisionasof": "Verzija od $1",
        "revision-info": "Izmjena od $1 od {{GENDER:$6|$2}}$7",
        "previousrevision": "← Starija izmjena",
index c4f7245..c0fefac 100644 (file)
        "createacct-error": "Error de creació de compte",
        "createaccounterror": "No s'ha pogut crear el compte: $1",
        "nocookiesnew": "S'ha creat el compte d'usuari, però no s'ha iniciat la sessió.\nEl projecte {{SITENAME}} usa galetes per a iniciar la sessió d'usuari. \nTeniu les galetes desactivades. \nActiveu-les per a poder iniciar la sessió amb el nou nom d'usuari i la nova clau.",
-       "nocookieslogin": "El programari {{SITENAME}} utilitza galetes per enregistrar usuaris. Teniu les galetes desactivades. Activeu-les i torneu a provar.",
+       "nocookieslogin": "{{SITENAME}} utilitza galetes per a enregistrar usuaris. Teniu les galetes desactivades. Activeu-les i torneu a provar.",
        "nocookiesfornew": "No s'ha creat el compte d'usuari, ja que no es podia confirmar el seu origen.\nVerifiqueu que teniu habilitades les galetes al vostre navegador, torneu a carregar aquesta pàgina i intenteu-lo de nou.",
        "nocookiesforlogin": "{{int:nocookieslogin}}",
        "noname": "No heu especificat un nom vàlid d'usuari.",
        "content-model-text": "text net",
        "content-model-javascript": "JavaScript",
        "content-model-css": "CSS",
+       "content-model-json": "JSON",
        "content-json-empty-object": "Objecte buit",
        "content-json-empty-array": "Matriu buida",
        "duplicate-args-warning": "<strong>Avís:</strong> [[:$1]] crida [[:$2]] amb més d'un valor pel paràmetre «$3». Només s'utilitzarà el darrer valor proporcionat.",
        "foreign-structured-upload-form-label-infoform-date": "Data",
        "foreign-structured-upload-form-label-not-own-work-local-local": "També podeu provar [[Special:Upload|la pàgina de càrrega per defecte]].",
        "foreign-structured-upload-form-label-own-work-message-default": "Entenc que esteu carregant el fitxer en un repositori compartit. Confirmo que ho estic fent seguint les condicions d'ús i les polítiques de llicenciament que s'hi apliquen.",
+       "foreign-structured-upload-form-3-label-yes": "Sí",
+       "foreign-structured-upload-form-3-label-no": "No",
        "backend-fail-stream": "No s'ha pogut transmetre el fitxer $1.",
        "backend-fail-backup": "No s'ha pogut fer una còpia de seguretat del fitxer $1.",
        "backend-fail-notexists": "El fitxer $1 no existeix.",
        "usereditcount": "$1 {{PLURAL:$1|modificació|modificacions}}",
        "usercreated": "{{GENDER:$3|Creat}}: $1 a les $2",
        "newpages": "Pàgines noves",
+       "newpages-submit": "Mostra",
        "newpages-username": "Nom d'usuari:",
        "ancientpages": "Pàgines més antigues",
        "move": "Reanomena",
        "specialloguserlabel": "Realitzador:",
        "speciallogtitlelabel": "Objectiu (títol o «{{ns:user}}:nom d’usuari» per a un usuari):",
        "log": "Registres",
+       "logeventslist-submit": "Mostra",
        "all-logs-page": "Tots els registres públics",
        "alllogstext": "Presentació combinada de tots els registres disponibles de {{SITENAME}}.\nPodeu reduir l'extensió seleccionant el tipus de registre, el nom d'usuari realitzador (distingeix entre majúscules i minúscules), o la pàgina objectiu (també en distingeix).",
        "logempty": "No hi ha cap coincidència en el registre.",
        "cachedspecial-viewing-cached-ts": "Esteu veient una versió a la memòria cau de la pàgina, que podria no ser completament actual.",
        "cachedspecial-refresh-now": "Mostra la darrera.",
        "categories": "Categories",
+       "categories-submit": "Mostra",
        "categoriespagetext": "{{PLURAL:$1|La següent categoria conté|Les següents categories contenen}} pàgines, o fitxers multimèdia.\n[[Special:UnusedCategories|Les categories no usades]] no s'hi mostren.\nVegeu també [[Special:WantedCategories|les categories sol·licitades]].",
        "categoriesfrom": "Mostra les categories que comencen a:",
        "special-categories-sort-count": "ordena per recompte",
        "delete-confirm": "Elimina «$1»",
        "delete-legend": "Elimina",
        "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",
        "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 2b08bee..7ca6533 100644 (file)
@@ -16,6 +16,7 @@
        "tog-hideminor": "Къайладаха кигийра нисдарш оц могӀама керла хийцамехь",
        "tog-hidepatrolled": "Къайладаха гӀаролладина нисдарш оц могӀама керла нисдаршкахь",
        "tog-newpageshidepatrolled": "Къайлаяха гӀароллайина агӀонаш оьцу могӀама керла агӀонашкахь",
+       "tog-hidecategorization": "Къайлаяха агӀонийн категореш",
        "tog-extendwatchlist": "Шорбина тӀехьажарна могӀам, ша беригге а, хийцамаш чубогӀуш, тӀехьаббина боцурш а",
        "tog-usenewrc": "Лелабе дика могӀам керла чу хийцамашна (оьшу JavaScript)",
        "tog-numberheadings": "Ша шех хlитто терахь корташна",
@@ -37,7 +38,7 @@
        "tog-shownumberswatching": "Гайта декъашхойн терахь, агӀо латийна болу шай тергаме могӀанан юкъа",
        "tog-oldsig": "Карара куьгтаӀорна:",
        "tog-fancysig": "Шен вики-къастаман куьгтаӀдар (ша шех хьажорг йоцуш)",
-       "tog-uselivepreview": "Ð\9bелайа Ñ\87еÑ\85ка Ñ\85Ñ\8cалÑ\85а Ñ\85Ñ\8cажа (JavaScript, Ð¼Ñ\83Ñ\85а Ñ\8e Ñ\85Ñ\8cажаÑ\80на)",
+       "tog-uselivepreview": "Ð\9bелае Ñ\87еÑ\85ка Ñ\85Ñ\8cалÑ\85а Ñ\85Ñ\8cажаÑ\80",
        "tog-forceeditsummary": "Дага даийта, нагахь нисйарх лаьцна чохь язйина яцахь",
        "tog-watchlisthideown": "Къайлаяха ас нисйинарш тергаме могӀам чура",
        "tog-watchlisthidebots": "Къайладаха тергаме могӀам чура ботан нисдинарш",
        "createacct-benefit-body3": "{{PLURAL:$1|декъашхо|декъашхой}} тӀаьхьарчу хенахь",
        "badretype": "Ахьа язъен паролаш цхьатерра яц",
        "userexists": "Ахьа язъен декъашхочун цӀе йолуш ю, дехар до кхин цӀе харжар.",
-       "loginerror": "Ð\93Ó\80алаÑ\82 Ð´Ñ\83 Ð´ÐµÐºÑ\8aаÑ\88Ñ\85о Ð²Ð¾Ð²Ð·Ð°Ñ\80еÑ\85Ñ\8c/йовзаÑ\80еÑ\85Ñ\8c",
+       "loginerror": "ЦÓ\80е Ñ\8f Ð¿Ð°Ñ\80олÑ\8c Ð½Ð¸Ð¹Ñ\81а Ñ\8fÑ\86",
        "createacct-error": "ДӀаяздар кхуллуш гӀалат ду",
        "createaccounterror": "Декъашхочун дӀаяздар кхолла йиш яц: $1",
        "nocookiesnew": "Декъашхочун дӀаяздар ду амма системин чохь вац/яц. Декъашхой чу гӀош {{SITENAME}} «cookies» лелош ю. Хьа «cookies» лелаян магийна дац дехар до и магийтина керлачу цӀарца а паролаца а системин чугӀо.",
        "nocookieslogin": "{{SITENAME}} лелош ю «cookies» декъашхой системин  чуболучу хенахь. Ахьа иш дӀайаьйина.",
        "nocookiesfornew": "Хьост хьажа йиш цахиларна декъашхочун дӀаяздар цакхоьллина. Хьажа «cookies» латина юьй такха агӀо карлаяьккхина юху гӀорта.",
        "nocookiesforlogin": "{{int:nocookieslogin}}",
-       "noname": "Ð\90Ñ\85Ñ\8cа Ð¼Ð°Ð³Ð¸Ð¹Ñ\82ина Ð¹Ð¾Ð»Ñ\83 Ð´ÐµÐºÑ\8aаÑ\88Ñ\85оÑ\87Ñ\83н Ñ\86Ó\80е Ð±Ð¸Ð»Ð³Ð°Ð» йина яц.",
+       "noname": "Ð\90Ñ\85Ñ\8cа Ð´ÐµÐºÑ\8aаÑ\88Ñ\85оÑ\87Ñ\83н Ñ\86Ó\80е Ð»Ð°Ñ\80Ñ\82Ó\80аÑ\85Ñ\8c Ñ\8fзйина яц.",
        "loginsuccesstitle": "Хьан пароль тӀеэца, марша догӀила Википеди чу!",
        "loginsuccess": "Хlинца ахьа болх бó оцу цlарца $1.",
        "nosuchuser": "Иштта $1 цӀе йолуш декъашхочун дӀаяздар дац.\nДекъашхой цӀерш хаалуш ю дӀаяздарца элпаш.\nНийса юьй хьажа цӀе я [[Special:UserLogin/signup|дӀаяздар кхолла керла]].",
        "nosuchusershort": "Ишта «$1» цӀе йолу декъашхо вац/яц. Хьажа цӀе нийса язйина юй.",
-       "nouserspecified": "Ахьа декъашхочун цӀе билгал ян езаш ю.",
+       "nouserspecified": "Ахьа декъашхочун цӀе язъян езаш ю.",
        "login-userblocked": "ХӀара декъашхо блоктоьхна ву/ю. Системин чувала/яла магийна дац.",
        "wrongpassword": "Ахьа язйина йолу пароль нийса яц. Хьажа юху цхьаъз.",
        "wrongpasswordempty": "Дехар до, язъе еса йоцу пароль.",
        "recentchanges-label-plusminus": "байташкахь барам хийцар",
        "recentchanges-legend-heading": "'''Легенда:&nbsp;'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (хьажа кхин [[Special:NewPages|керла агӀонийн могӀа]])",
+       "recentchanges-submit": "Гайта",
        "rcnotefrom": "Лахахь гайтина тӀера <strong>$2</strong> (хийцамаш <strong>$1</strong> кӀезиг).",
        "rclistfrom": "Гайта хийцам {{CURRENTYEAR}} шаран {{CURRENTDAY}} {{CURRENTMONTHNAMEGEN}} {{CURRENTTIME}} бина болу",
        "rcshowhideminor": "$1 кегийра нисдарш",
        "rcshowhidemine": "$1 айхьа нисдинарш",
        "rcshowhidemine-show": "Гайта",
        "rcshowhidemine-hide": "Къайладаха",
+       "rcshowhidecategorization": "$1 агӀонийн категореш",
+       "rcshowhidecategorization-show": "Гайта",
+       "rcshowhidecategorization-hide": "Къайлаяккха",
        "rclinks": "Гайта тӀаьххьарлерачу $2 дийнахь бина болу $1 хийцамаш\n<br />$3",
        "diff": "башхалла",
        "hist": "истори",
        "boteditletter": "б",
        "number_of_watching_users_pageview": "[$1 {{PLURAL:$1|тӀехьожу декъашхо|тӀехьожу декъашхой}}]",
        "rc_categories": "Категори чура бен (къасторг «|»)",
-       "rc_categories_any": "Муьлхаа",
+       "rc_categories_any": "Муьлха а хаьржиначух",
        "rc-change-size-new": "Хийцам бин чул тӀехьа болу барам: $1 {{PLURAL:$1|байт}}",
        "newsectionsummary": "/* $1 */ Керла хьедар",
        "rc-enhanced-expand": "Гайта мадарра",
        "recentchangeslinked-summary": "ХӀара хийцам биначу агӀонийн могӀам бу, тӀетовжар долуш хьагучу агӀон (я хьагойтуш йолучу категорена).\nАгӀонаш юькъа йогӀуш йолу хьан [[Special:Watchlist|тергаме могӀам чохь]] '''къастийна ю'''.",
        "recentchangeslinked-page": "АгӀон цӀе:",
        "recentchangeslinked-to": "Кхечу агӀор, гайта хийцамаш агӀонашца, хӀоттийначу агӀонтӀе хьажорг йолуш",
+       "recentchanges-page-added-to-category": "[[:$1]] категори чу тоьхна",
        "upload": "Файл чуяккхар",
        "uploadbtn": "Файл чуяккхар",
        "reuploaddesc": "Юху гӀо файл чуйоккху агӀоне",
        "upload-file-error": "Чоьхьара гӀалат",
        "upload-misc-error": "Чуяккхаран цадевза гӀалат",
        "upload-http-error": "Даьлла гӀалат HTTP: $1",
+       "upload-dialog-button-cancel": "Цаоьшу",
+       "upload-dialog-button-done": "Кийчча ю",
+       "upload-dialog-button-save": "Ӏалашъян",
+       "upload-dialog-button-upload": "Чуяккха",
+       "upload-form-label-select-file": "Харжа файл",
+       "upload-form-label-infoform-title": "Мадарра",
+       "upload-form-label-infoform-name": "ЦӀе",
+       "upload-form-label-infoform-description": "Цуьнах лаьцна",
+       "upload-form-label-usage-title": "Лелор",
+       "upload-form-label-usage-filename": "файлан цӀе",
+       "foreign-structured-upload-form-label-own-work": "ХӀара сан долара болх бу",
        "foreign-structured-upload-form-label-infoform-categories": "Категореш",
        "foreign-structured-upload-form-label-infoform-date": "Терахь",
+       "foreign-structured-upload-form-3-label-yes": "ХӀаъ",
+       "foreign-structured-upload-form-3-label-no": "ХӀахӀа",
        "backend-fail-stream": "ДӀаяккха цатарло файл «$1».",
        "backend-fail-backup": "Таро яц файлан $1 тӀаьхьалонан копиян.",
        "backend-fail-notexists": "Файл $1 яц.",
        "mostrevisions": "Сих сиха нисйина йолу агӀонаш",
        "prefixindex": "Хьалха агӀонийн цӀерш хӀотто еза",
        "prefixindex-namespace": "Хьалха агӀонийн цӀерш хӀотто еза («{{ns:$1}}»)",
+       "prefixindex-submit": "Гайта",
        "prefixindex-strip": "Хиламийн могӀам чура префикс къайлаяккха",
        "shortpages": "Боца яззамаш",
        "longpages": "Беха яззамаш",
        "usereditcount": "$1 {{PLURAL:$1|нисдар|нисдарш}}",
        "usercreated": "{{GENDER:$3|дӀавазвелла|дӀаязелла}} $1 $2",
        "newpages": "Керла агӀонаш",
+       "newpages-submit": "Гайта",
        "newpages-username": "Декъашхо:",
        "ancientpages": "Шира агӀонаш",
        "move": "ЦӀе хийца",
        "specialloguserlabel": "Декъашхо:",
        "speciallogtitlelabel": "Ӏалашо (цӀе я декъашхо):",
        "log": "Тéптарш",
+       "logeventslist-submit": "Гайта",
        "all-logs-page": "Дерриге тӀекхочучехь долу тептарш",
        "alllogstext": "Массо юкъара журлийн могӀам. {{SITENAME}}.\nШуьга харжалур бу хилам оцу тептаре хьаьжжина, декъашхочун цӀе (дӀаяздар диц а цадеш) я цо хьейина агӀонаш (ишта дӀаяздар а диц цадеш).",
        "logempty": "Тептарш чохь хӀокху агӀона дӀаяздарш дац.",
        "cachedspecial-viewing-cached-ttl": "Хьо хьоьжу агӀона верси кэш чура ю, иза карлаяьккхина хила мега $1 хьалха.",
        "cachedspecial-refresh-now": "Хьажа тӀехьарчу версега.",
        "categories": "Категореш",
+       "categories-submit": "Гайта",
        "categoriespagetext": "{{PLURAL:$1|1=Лахара категореш чохь ю|Лахара категореш чохь ю}} агӀонаш я медиа-файлаш.\nКхузахь гойтуш яц [[Special:UnusedCategories|лелош йоцу категореш]].\nКхин дӀа [[Special:WantedCategories| хийла еза категореш]].",
        "categoriesfrom": "Гучé яха категореш, тӀера:",
        "special-categories-sort-count": "нисъе дукхаллица",
        "wlnote": "Гойту <strong>$2</strong> {{plural:$2|сахьтчохь}} бина {{PLURAL:$1|тӀеххьара '''$1''' хийцам}}, хан $3 $4",
        "wlshowlast": "Гайта тӀаьххьара $1 сахьт $2 де",
        "watchlistall2": "массо",
+       "watchlist-hide": "Къайлаяккха",
+       "watchlist-submit": "Гайта",
+       "wlshowhideminor": "жима нисдарш",
+       "wlshowhidebots": "Боташ",
+       "wlshowhideliu": "ДӀабазбелла декъашхой",
+       "wlshowhideanons": "ЦӀе хьулйина декъашхой",
+       "wlshowhidepatr": "хьажжина нисдарш",
+       "wlshowhidemine": "Сан нисдарш",
        "watchlist-options": "Тергаме могlаман гlирс нисбар",
        "watching": "Тергаме мlогаман юкъаяккха…",
        "unwatching": "Тергаме могӀанан чура дӀаяккхар…",
        "delete-confirm": "$1 — дӀаяккхар",
        "delete-legend": "ДӀаяккхар",
        "historywarning": "<strong>Тергам бе:</strong> Хьо дӀаяккха гӀертачу агӀона, нисдарийн истори ю, $1 {{PLURAL:$1|верси}} йолуш:",
+       "historyaction-submit": "Гайта",
        "confirmdeletetext": "Хьо гӀерта агӀо я файл дӀаяккха '''дехар до''', дӀаяккхале хьалха хьажа [[{{MediaWiki:Policy-url}}|кхуза]].",
        "actioncomplete": "Дешдерг кхочушдина",
        "actionfailed": "Кхочушъ дина дац",
        "sp-contributions-newbies": "Гайта бекъ къинхьегам, керла дlабазбиначара бина болу",
        "sp-contributions-newbies-sub": "Керла декъашхойн дӀаяздаршкара",
        "sp-contributions-newbies-title": "Дукху хан йоцуш кхоьллинчу декъашхойн дӀаяздарийн къинхьегам",
-       "sp-contributions-blocklog": "блоктоьхарш",
+       "sp-contributions-blocklog": "блокÑ\82оÑ\8cÑ\85наÑ\80Ñ\88",
        "sp-contributions-suppresslog": "Декъашхочун дӀабаьккхина къинхьегам",
        "sp-contributions-deleted": "дӀадяхна нийсдарш",
        "sp-contributions-uploads": "Файлаш",
        "whatlinkshere-hidelinks": "$1 хьажорг",
        "whatlinkshere-hideimages": "$1 файлийн хьажоргаш",
        "whatlinkshere-filters": "Литтарш",
+       "whatlinkshere-submit": "Кхочушдé",
        "autoblockid": "Ша блоккхетар #$1",
        "block": "Декъашхочун блоктохар",
        "unblock": "ДекъашхонтӀера блокдӀаякхар",
        "change-blocklink": "хийцам бе блоктохарна",
        "contribslink": "къинхьегам",
        "emaillink": "дӀадахьийта кехат",
-       "blocklogpage": "Блоктоьхарш болу тептар",
+       "blocklogpage": "Ð\91локÑ\82оÑ\8cÑ\85наÑ\80Ñ\88 Ð±Ð¾Ð»Ñ\83 Ñ\82епÑ\82аÑ\80",
        "blocklog-showlog": "{{GENDER:$1|ХӀокху декъашхочун хьалхо блоктоьхна хила}}.\nЛахахь гойту блоктохарш долу тептар:",
        "blocklogentry": "блоктоьхна [[$1]] цхьана ханна $2 $3",
        "reblock-logentry": "Хийцина  блоктоьхна хан [[$1]] $2 $3",
-       "blocklogtext": "Ð\91локÑ\82оÑ\85аÑ\80Ñ\88на Ð° Ð±Ð»Ð¾ÐºÐ´Ó\80аÑ\8fкÑ\85аÑ\80Ñ\88на Ð° Ñ\82епÑ\82аÑ\80. Ð¨Ð° Ð±Ð»Ð¾ÐºÐºÑ\85еÑ\82аÑ\88 Ð´Ð¾Ð»Ñ\83 IP-адÑ\80еÑ\81аÑ\88 ÐºÑ\85Ñ\83заÑ\85Ñ\8c Ð³Ð¾Ð¹Ñ\82Ñ\83Ñ\88 Ð´Ð°Ñ\86. Ð\9aÑ\85ин. [[Special:BlockList|Ñ\85Ó\80ийнÑ\86а Ð±Ð»Ð¾ÐºÑ\82оÑ\8cÑ\85а Ð±Ðµрш]].",
+       "blocklogtext": "Ð\91локÑ\82оÑ\85аÑ\80Ñ\88на Ð° Ð±Ð»Ð¾ÐºÐ´Ó\80аÑ\8fкÑ\85аÑ\80Ñ\88на Ð° Ñ\82епÑ\82аÑ\80. Ð¨Ð° Ð±Ð»Ð¾ÐºÐºÑ\85еÑ\82аÑ\88 Ð´Ð¾Ð»Ñ\83 IP-адÑ\80еÑ\81аÑ\88 ÐºÑ\85Ñ\83заÑ\85Ñ\8c Ð³Ð¾Ð¹Ñ\82Ñ\83Ñ\88 Ð´Ð°Ñ\86. Ð\9aÑ\85ин. [[Special:BlockList|Ñ\85Ó\80инÑ\86а Ð±Ð»Ð¾ÐºÑ\82оÑ\8cÑ\85нарш]].",
        "unblocklogentry": "дӀаяькхинаблок $1",
        "block-log-flags-anononly": "Къайлаха берш",
        "block-log-flags-nocreate": "цамагдо керла дӏаяздарш кхоллар",
        "patrol-log-page": "ТӀехьажаран тептар",
        "patrol-log-header": "Хьажжина версеш йолу тептар.",
        "log-show-hide-patrol": "$1 тӀехьажаран тептар",
+       "log-show-hide-tag": "$1 билгалонийн тептар",
        "deletedrevision": "ДӀаяьккхина шира верси $1",
        "filedeleteerror-short": "Файл дӀаяккхаран гӀалат: $1",
        "filedeleteerror-long": "Файл дӀайоккхуш гӀалат даьлла:\n\n$1",
        "file-nohires": "Кхи йоккха гlоле башхо яц.",
        "svg-long-desc": "SVG-файл, лартӀахь ю $1 × $2 пиксель, файлан барам: $3",
        "svg-long-desc-animated": "Анимироват йина SVG-файл, номиналан $1 × $2 пиксель, файлан барам: $3",
+       "svg-long-error": "нийса йоцу SVG-файл: $1",
        "show-big-image": "Оригиналан файл",
        "show-big-image-preview": "Барам хьажале: $1.",
        "show-big-image-other": "{{PLURAL:$2|1=Кхин шоралла|Кхин шоралла}}: $1.",
        "version-entrypoints-header-url": "URL",
        "version-entrypoints-articlepath": "[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgArticlePath АгӀона тӀе некъ]",
        "version-entrypoints-scriptpath": "[https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:$wgScriptPath Скриптан тӀе некъ]",
+       "version-libraries": "ДӀахӀоттийна библиотекаш",
+       "version-libraries-library": "Библиотека",
+       "version-libraries-version": "Верси",
+       "version-libraries-license": "Лицензи",
        "version-libraries-description": "Цуьнах лаьцна",
        "version-libraries-authors": "Автораш",
        "redirect": "Декъашхочун файлан тӀера дӀасхьажор",
        "mediastatistics-header-text": "Йозанан",
        "mediastatistics-header-executable": "Кхочушдийриш",
        "mediastatistics-header-archive": "Архиваш",
+       "mediastatistics-header-total": "Массо файлаш",
        "json-error-unknown": "JSON бала бу. ГӀалат: $1",
        "json-error-syntax": "Синтаксин гӀалат",
        "headline-anchor-title": "ХӀокху дакъан тӀе хьажорг",
index aaf599d..a4d7e26 100644 (file)
        "autoredircomment": "Přesměrování na [[$1]]",
        "autosumm-new": "Založena nová stránka s textem „$1“",
        "autosumm-newblank": "Založena prázdná stránka",
+       "size-bytes": "$1 {{PLURAL:$1|bajt|bajty|bajtů}}",
        "size-kilobytes": "$1 KB",
        "lag-warn-normal": "Změny za {{PLURAL:$1|poslední sekundu|poslední $1 sekundy|posledních $1 sekund}} nemusí být v tomto seznamu zobrazeny.",
        "lag-warn-high": "Protože je databázový server právě mimořádně vytížen, nemusí být změny za {{PLURAL:$1|poslední sekundu|poslední $1 sekundy|posledních $1 sekund}} v tomto seznamu zobrazeny.",
index ae89893..2ead049 100644 (file)
        "upload-form-label-select-file": "Datei auswählen",
        "upload-form-label-infoform-title": "Einzelheiten",
        "upload-form-label-infoform-name": "Name",
+       "upload-form-label-infoform-name-tooltip": "Ein eindeutiger erklärender Titel für die Datei, die als Dateiname angeboten wird. Du musst reine Sprache mit Leerzeichen verwenden. Nicht die Dateierweiterung einschließen.",
        "upload-form-label-infoform-description": "Beschreibung",
+       "upload-form-label-infoform-description-tooltip": "Beschreibe kurz alles bedeutende über das Werk.\nErwähne für ein Foto die abgebildeten hauptsächlichen Dinge, das Ereignis oder den Ort.",
        "upload-form-label-usage-title": "Verwendung",
        "upload-form-label-usage-filename": "Dateiname",
        "foreign-structured-upload-form-label-own-work": "Dies ist mein eigenes Werk",
        "unblock": "Benutzer freigeben",
        "blockip": "IP-Adresse/{{GENDER:$1|Benutzer|Benutzerin}} sperren",
        "blockip-legend": "IP-Adresse/Benutzer sperren",
-       "blockiptext": "Mit diesem Formular sperrst du eine IP-Adresse oder einen Benutzernamen, so dass von dort keine Änderungen mehr vorgenommen werden können.\nDies sollte nur erfolgen, um Vandalismus zu verhindern und in Übereinstimmung mit den [[{{MediaWiki:Policy-url}}|Richtlinien]].\nBitte gib den Grund für die Sperre an.",
+       "blockiptext": "Mit diesem Formular sperrst du eine IP-Adresse oder einen Benutzernamen, so dass von dort keine Änderungen mehr vorgenommen werden können.\nDies sollte nur erfolgen, um Vandalismus zu verhindern und in Übereinstimmung mit den [[{{MediaWiki:Policy-url}}|Richtlinien]].\nBitte gib den Grund für die Sperre an.\nDu kannst IP-Bereiche mit der [https://de.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]-Syntax sperren; der größte erlaubte Bereich ist /$1 für IPv4 und /$2 für IPv6.",
        "ipaddressorusername": "IP-Adresse oder Benutzername:",
        "ipbexpiry": "Sperrdauer:",
        "ipbreason": "Grund:",
        "export-download": "Als XML-Datei speichern",
        "export-templates": "Inklusive Vorlagen",
        "export-pagelinks": "Verlinkte Seiten automatisch mit exportieren, bis zur Rekursionstiefe von:",
+       "export-manual": "Seiten manuell hinzufügen:",
        "allmessages": "MediaWiki-Systemnachrichten",
        "allmessagesname": "Name",
        "allmessagesdefault": "Standardtext",
        "expand_templates_preview": "Vorschau",
        "expand_templates_preview_fail_html": "<em>Da {{SITENAME}} rohes HTML aktiviert hat und es einen Verlust deiner Sitzungsdaten gab, ist die Vorschau als Vorsichtsmaßnahme gegen JavaScript-Angriffe versteckt.</em>\n\n<strong>Falls dies ein zulässiger Vorschauversuch ist, versuche es bitte erneut.</strong>\nFalls dieses Problem weiterhin bestehen bleibt, versuche dich [[Special:UserLogout|abzumelden]] und erneut anzumelden.",
        "expand_templates_preview_fail_html_anon": "<em>Da {{SITENAME}} rohes HTML aktiviert hat und du nicht angemeldet bist, ist die Vorschau als Vorsichtsmaßnahme gegen JavaScript-Angriffe versteckt.</em>\n\n<strong>Falls dies ein zulässiger Vorschauversuch ist, [[Special:UserLogin|melde dich bitte an]] und versuche es erneut.</strong>",
+       "expand_templates_input_missing": "Du musst mindestens einen Eingabetext angeben.",
        "pagelanguage": "Seitensprachenauswahl",
        "pagelang-name": "Seite",
        "pagelang-language": "Sprache",
        "mediastatistics-summary": "Statistiken über hochgeladene Dateitypen. Dies beinhaltet nur die aktuellste Version einer Datei. Alte oder gelöschte Dateiversionen sind ausgeschlossen.",
        "mediastatistics-nfiles": "$1 ($2 %)",
        "mediastatistics-nbytes": "{{PLURAL:$1|Ein Byte|$1 Bytes}} ($2; $3 %)",
-       "mediastatistics-bytespertype": "Gesamte Dateigröße für diesen Abschnitt: $1 Bytes.",
-       "mediastatistics-allbytes": "Gesamte Dateigröße für alle Dateien: $1 Bytes.",
+       "mediastatistics-bytespertype": "Gesamte Dateigröße für diesen Abschnitt: {{PLURAL:$1|Ein Byte|$1 Bytes}} ($2; $3%).",
+       "mediastatistics-allbytes": "Gesamte Dateigröße für alle Dateien: {{PLURAL:$1|Ein Byte|$1 Bytes}} ($2).",
        "mediastatistics-table-mimetype": "MIME-Typ",
        "mediastatistics-table-extensions": "Mögliche Erweiterungen",
        "mediastatistics-table-count": "Anzahl der Dateien",
index a91c34d..f2370d6 100644 (file)
        "disclaimers": "Redê mesuliyeti",
        "disclaimerpage": "Project:Reddê mesuliyetê bıngey",
        "edithelp": "Peştdariya vurnayışi",
-       "helppage-top-gethelp": "Desteg",
+       "helppage-top-gethelp": "Peşti",
        "mainpage": "Pela Seri",
        "mainpage-description": "Pela seri",
        "policy-url": "Project:Terzê hereketi",
        "intentionallyblankpage": "Ena pel bi zanayişî weng mendo.",
        "external_image_whitelist": "  #no satır zey xo verde/raverde<pre>\n#parçeyê ifadeya rêzbiyayeyani (têna zerreyê ıney de // ) u çıtayo/çiyo zi mende cêr de têare kerê.\n#ney URL ya (hotlink) resmê teberi de hemcıta benî.\n#Ê yê ke hemcıt (eşleşmek-hemçift) biyê zey resımi asenî, eqsê hal de zi zey gıreyê resmi aseno.\nsatır ê ke pê ney # # destpêkenê zey mışore/mıjore muamele vineno.\n#herfa gırd û qıci ferq nêkeno\n\n#parçeyê ifadeya rêzbiyayeyani bıerzê serê ney satıri. no satır zey xo verde/raverde </pre>",
        "tags": "Etiketê vurnayîşê raştî",
-       "tag-filter": "Avrêcê [[Special:Tags|Etiketi]]:",
+       "tag-filter": "Parzûnê [[Special:Tags|etiketi]]:",
        "tag-filter-submit": "Avrêc",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiket|Etiketi}}]]: $2)",
        "tags-title": "Etiketan",
index 786382b..f80dacb 100644 (file)
        "foreign-structured-upload-form-label-not-own-work-message-default": "Εάν δεν είστε σε θέση να ανεβάσετε αυτό το αρχείο στο πλαίσιο των πολιτικών της shared repository, παρακαλώ κλείστε αυτό το παράθυρο διαλόγου και να επιχειρήσετε μια άλλη μέθοδος.",
        "foreign-structured-upload-form-label-not-own-work-local-default": "Επίσης, μπορεί να θέλετε να δοκιμάσετε χρησιμοποιώντας το [[Special:Upload|τη σελίδα ανεβάσματος για το {{SITENAME}}]], αν αυτό το αρχείο μπορεί να φορτωθεί κάτω σύμφωνα με τις πολιτικές τους.",
        "foreign-structured-upload-form-label-own-work-message-shared": "Δηλώνω ότι κατέχω τα πνευματικά δικαιώματα για αυτό το αρχείο, και συμφωνώ αμετάκλητα στην απελευθέρωση  αυτού του  αρχείου στο Wikimedia Commons με άδεια  [https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0], και συμφωνώ με την [https://wikimediafoundation.org/wiki/Terms_of_Use Όρους Χρήσης].",
-       "foreign-structured-upload-form-label-not-own-work-message-shared": "Αν δεν κατέχει τα πνευματικά δικαιώματα για αυτό το αρχείο, ή επιθυμείτε να το δημοσιεύσετε υπό μια διαφορετική άδεια χρήσης, μπορείτε να χρησιμοποιήσετε τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγό Ανεβάσματος των Κοινών].",
+       "foreign-structured-upload-form-label-not-own-work-message-shared": "Αν δεν κατέχει τα πνευματικά δικαιώματα για αυτό το αρχείο, ή επιθυμείτε να το δημοσιεύσετε υπό μια διαφορετική άδεια χρήσης, μπορείτε να χρησιμοποιήσετε τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγό Ανεβάσματος των Wikimedia Commons].",
        "foreign-structured-upload-form-label-not-own-work-local-shared": "Επίσης, μπορεί να θέλετε να δοκιμάσετε να χρησιμοποιήσετε  το [[Special:Upload|τη σελίδα ανεβάσματος για το {{SITENAME}}]], αν αυτό το αρχείο μπορεί να φορτωθεί σύμφωνα με  τις πολιτικές τους.",
        "foreign-structured-upload-form-2-label-intro": "Σας ευχαριστούμε για τη δωρεά μιας εικόνας που θα χρησιμοποιηθεί στο {{SITENAME}}. Θα πρέπει να συνεχίσετε  μόνο εφόσον πληροί μια σειρά  προϋποθέσεων:",
        "foreign-structured-upload-form-2-label-ownwork": "Πρέπει να είναι εξ ολοκλήρου <strong>δική σας δημιουργία</strong>, όχι απλά παρμένο από το Internet",
-       "foreign-structured-upload-form-2-label-noderiv": "Î\94εν Ï\80Ï\81έÏ\80ει Î½Î±  Ï\80εÏ\81ιέÏ\87οÏ\85ν <strong>κανένα Î­Ï\81γο Î±Ï\80Ï\8c Î¿Ï\80οιονδήÏ\80οÏ\84ε Î¬Î»Î»Î¿Î½</strong>, Î® ÎµÎ¼Ï\80νέονÏ\84αι Î±Ï\80' Î±Ï\85Ï\84οÏ\8dÏ\82",
+       "foreign-structured-upload-form-2-label-noderiv": "Î\94εν Ï\80Ï\81έÏ\80ει Î½Î±  Ï\80εÏ\81ιέÏ\87ει <strong>κανένα Î­Ï\81γο Î±Ï\80Ï\8c Î¿Ï\80οιονδήÏ\80οÏ\84ε Î¬Î»Î»Î¿Î½</strong>, Î® Î¼Îµ Î­Î¼Ï\80νεÏ\85Ï\83η Î±Ï\80Ï\8c Î±Î»Î»Î¿Ï\8d",
        "foreign-structured-upload-form-2-label-useful": "Θα πρέπει να είναι <strong>εκπαιδευτικό και χρήσιμο</strong> για διδασκαλία άλλων",
        "foreign-structured-upload-form-2-label-ccbysa": "Πρέπει να είναι <strong>ΕΝΤΑΞΕΙ για δημοσίευση για πάντα</strong> στο Διαδίκτυο υπό τους όρους της [https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0] άδειας",
-       "foreign-structured-upload-form-2-label-alternative": "Εάν όλα τα παραπάνω δεν είναι αλήθεια, μπορείτε ακόμα να είστε σε θέση να ανεβάσετε αυτό το αρχείο χρησιμοποιώντας τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγό Ανεβάσματος] στα Κοινά, αρκεί να είναι διαθέσιμο υπό μια ελεύθερη άδεια χρήσης.",
-       "foreign-structured-upload-form-2-label-termsofuse": "Î\9cε Ï\84ο Î±Î½Î­Î²Î±Ï\83μα Ï\84οÏ\85 Î±Ï\81Ï\87είοÏ\85, ÎµÏ\80ιβεβαιÏ\8eνεÏ\84ε Ï\8cÏ\84ι Î­Ï\87εÏ\84ε Ï\84α Ï\80νεÏ\85μαÏ\84ικά Î´Î¹ÎºÎ±Î¹Ï\8eμαÏ\84α Î³Î¹Î± Î±Ï\85Ï\84Ï\8c Ï\84ο Î±Ï\81Ï\87είο, ÎºÎ±Î¹ Ï\83Ï\85μÏ\86Ï\89νείÏ\84ε Î±Î¼ÎµÏ\84άκληÏ\84α Î³Î¹Î± Ï\84ην Î±Ï\80ελεÏ\85θέÏ\81Ï\89Ï\83η Î±Ï\85Ï\84οÏ\8d Ï\84οÏ\85 Î±Ï\81Ï\87είοÏ\85 Ï\83Ï\84α Î\9aοινά Ï\84οÏ\85  Wikimedia υπό την άδεια Creative Commons Attribution-ShareAlike 4.0, και συμφωνείτε με τους [https://wikimediafoundation.org/wiki/Terms_of_Use Όρους Χρήσης].",
+       "foreign-structured-upload-form-2-label-alternative": "Εάν όλα τα παραπάνω δεν είναι αλήθεια, μπορείτε ακόμα να είστε σε θέση να ανεβάσετε αυτό το αρχείο χρησιμοποιώντας τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγό Ανεβάσματος] στα Wikimedia Commons, αρκεί να είναι διαθέσιμο υπό μια ελεύθερη άδεια χρήσης.",
+       "foreign-structured-upload-form-2-label-termsofuse": "Î\9cε Ï\84ο Î±Î½Î­Î²Î±Ï\83μα Ï\84οÏ\85 Î±Ï\81Ï\87είοÏ\85, ÎµÏ\80ιβεβαιÏ\8eνεÏ\84ε Ï\8cÏ\84ι Î­Ï\87εÏ\84ε Ï\84α Ï\80νεÏ\85μαÏ\84ικά Î´Î¹ÎºÎ±Î¹Ï\8eμαÏ\84α Î³Î¹Î± Î±Ï\85Ï\84Ï\8c Ï\84ο Î±Ï\81Ï\87είο, ÎºÎ±Î¹ Ï\83Ï\85μÏ\86Ï\89νείÏ\84ε Î±Î¼ÎµÏ\84άκληÏ\84α Î³Î¹Î± Ï\84ην Î´Î·Î¼Î¿Ï\83ίεÏ\85Ï\83η Î±Ï\85Ï\84οÏ\8d Ï\84οÏ\85 Î±Ï\81Ï\87είοÏ\85 Ï\83Ï\84α Wikimedia Commons υπό την άδεια Creative Commons Attribution-ShareAlike 4.0, και συμφωνείτε με τους [https://wikimediafoundation.org/wiki/Terms_of_Use Όρους Χρήσης].",
        "foreign-structured-upload-form-3-label-question-website": "Μήπως κατεβάσατε αυτή την εικόνα από μια ιστοσελίδα, ή την πήραμε μετά από αναζήτηση εικόνων;",
        "foreign-structured-upload-form-3-label-question-ownwork": "Δημιουργήσατε αυτή την εικόνα (τραβήξατε φωτογραφία, κάνατε ένα σκίτσο κ.τ.λ.) μόνος σας;",
        "foreign-structured-upload-form-3-label-question-noderiv": "Περιέχει, ή είναι εμπνευσμένο από έργο που ανήκει σε κάποιον άλλο, όπως ένα λογότυπο;",
        "foreign-structured-upload-form-3-label-yes": "Ναι",
        "foreign-structured-upload-form-3-label-no": "Όχι",
-       "foreign-structured-upload-form-3-label-alternative": "Δυστυχώς, σε αυτή την περίπτωση, αυτό το εργαλείο δεν υποστηρίζει το ανέβασμα αυτού του αρχείου. Μπορείτε ακόμα να είστε  σε θέση να το ανεβάσετε χρησιμοποιώντας τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγός Ανεβάσματος] στα Κοινά, αρκεί να είναι διαθέσιμο υπό μια ελεύθερη άδεια χρήσης.",
+       "foreign-structured-upload-form-3-label-alternative": "Δυστυχώς, σε αυτή την περίπτωση, αυτό το εργαλείο δεν υποστηρίζει το ανέβασμα αυτού του αρχείου. Μπορείτε ακόμα να είστε  σε θέση να το ανεβάσετε χρησιμοποιώντας τον [https://commons.wikimedia.org/wiki/Special:UploadWizard Οδηγός Ανεβάσματος] στα Wikimedia Commons, αρκεί να είναι διαθέσιμο υπό μια ελεύθερη άδεια χρήσης.",
        "foreign-structured-upload-form-4-label-good": "Χρησιμοποιώντας αυτό το εργαλείο, μπορείτε να ανεβάσετε εκπαιδευτικά διαγράμματα που έχετε δημιουργήσει και φωτογραφίες, που δεν περιέχουν έργο που ανήκει σε κάποιον άλλο.",
        "foreign-structured-upload-form-4-label-bad": "Δεν μπορείτε να ανεβάσετε εικόνες που βρέθηκαν σε μια μηχανή αναζήτησης ή που έχετε κατεβάσει από άλλες ιστοσελίδες.",
        "backend-fail-stream": "Αδύνατη η μετάδοση του αρχείου $1.",
index 349cac6..5c811bf 100644 (file)
        "upload-form-label-select-file": "Select file",
        "upload-form-label-infoform-title": "Details",
        "upload-form-label-infoform-name": "Name",
+       "upload-form-label-infoform-name-tooltip": "A unique descriptive title for the file, which will serve as a filename. You may use plain language with spaces. Do not include the file extension.",
        "upload-form-label-infoform-description": "Description",
+       "upload-form-label-infoform-description-tooltip": "Briefly describe everything notable about the work.\nFor a photo, mention the main things that are depicted, the occasion, or the place.",
        "upload-form-label-usage-title": "Usage",
        "upload-form-label-usage-filename": "File name",
        "foreign-structured-upload-form-label-own-work": "This is my own work",
        "unblock-summary": "",
        "blockip": "Block {{GENDER:$1|user}}",
        "blockip-legend": "Block user",
-       "blockiptext": "Use the form below to block write access from a specific IP address or username.\nThis should be done only to prevent vandalism, and in accordance with [[{{MediaWiki:Policy-url}}|policy]].\nFill in a specific reason below (for example, citing particular pages that were vandalized).",
+       "blockiptext": "Use the form below to block write access from a specific IP address or username.\nThis should be done only to prevent vandalism, and in accordance with [[{{MediaWiki:Policy-url}}|policy]].\nFill in a specific reason below (for example, citing particular pages that were vandalized).\nYou can block IP ranges using the [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR] syntax; the largest allowed range is /$1 for IPv4 and /$2 for IPv6.",
        "ipaddressorusername": "IP address or username:",
        "ipbexpiry": "Expiry:",
        "ipbreason": "Reason:",
        "export-download": "Save as file",
        "export-templates": "Include templates",
        "export-pagelinks": "Include linked pages to a depth of:",
+       "export-manual": "Add pages manually:",
        "allmessages": "System messages",
        "allmessagesname": "Name",
        "allmessagesdefault": "Default message text",
        "expand_templates_preview": "Preview",
        "expand_templates_preview_fail_html": "<em>Because {{SITENAME}} has raw HTML enabled and there was a loss of session data, the preview is hidden as a precaution against JavaScript attacks.</em>\n\n<strong>If this is a legitimate preview attempt, please try again.</strong>\nIf it still does not work, try [[Special:UserLogout|logging out]] and logging back in.",
        "expand_templates_preview_fail_html_anon": "<em>Because {{SITENAME}} has raw HTML enabled and you are not logged in, the preview is hidden as a precaution against JavaScript attacks.</em>\n\n<strong>If this is a legitimate preview attempt, please [[Special:UserLogin|log in]] and try again.</strong>",
+       "expand_templates_input_missing": "You need to provide at least some input text.",
        "pagelanguage": "Page language selector",
        "pagelang-name": "Page",
        "pagelang-language": "Language",
        "mediastatistics-summary": "Statistics about uploaded file types. This only includes the most recent version of a file. Old or deleted versions of files are excluded.",
        "mediastatistics-nfiles": "$1 ($2%)",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Total file size for this section: $1 bytes.",
-       "mediastatistics-allbytes": "Total file size for all files: $1 bytes.",
+       "mediastatistics-bytespertype": "Total file size for this section: {{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%).",
+       "mediastatistics-allbytes": "Total file size for all files: {{PLURAL:$1|$1 byte|$1 bytes}} ($2).",
        "mediastatistics-table-mimetype": "MIME type",
        "mediastatistics-table-extensions": "Possible extensions",
        "mediastatistics-table-count": "Number of files",
index da82abe..6ee50d8 100644 (file)
                        "Nelson6e65",
                        "Matiia",
                        "SinNovedades",
-                       "Rodm23"
+                       "Rodm23",
+                       "Yllelder"
                ]
        },
        "tog-underline": "Subrayar los enlaces:",
        "passwordreset-emailtext-ip": "Alguien (probablemente tú, desde la dirección IP $1) ha solicitado el restablecimiento de tu contraseña en {{SITENAME}} ($4). {{PLURAL:$3|La siguiente cuenta está asociada|Las siguientes cuentas están asociadas}}\na esta dirección de correo electrónico:\n\n$2\n\n{{PLURAL:$3|Esta contraseña temporal|Estas contraseñas temporales}} caducarán en {{PLURAL:$5|un día|$5 días}}.\nAhora puedes iniciar sesión y establecer una nueva contraseña. Si fue otra persona la que realizó esta solicitud, o si ya recuerdas tu contraseña original y, por tanto, no deseas cambiarla, puedes ignorar este mensaje y continuar usando tu contraseña anterior.",
        "passwordreset-emailtext-user": "El usuario $1 de {{SITENAME}} solicitó el restablecimiento de tu contraseña en {{SITENAME}}\n($4). {{PLURAL:$3|La siguiente cuenta está asociada|Las siguientes cuentas están asociadas}} a esta dirección de correo electrónico:\n\n$2\n\n{{PLURAL:$3|Esta contraseña temporal|Estas contraseñas temporales}} caducarán en {{PLURAL:$5|un día|$5 días}}.\nAhora puedes iniciar sesión y establecer una nueva contraseña. Si fue otra persona la que realizó esta solicitud, o si ya recuerdas tu contraseña original y, por tanto, no deseas cambiarla, puedes ignorar este mensaje y continuar usando tu contraseña anterior.",
        "passwordreset-emailelement": "Nombre de {{GENDER:$1|usuario|usuaria}}: \n$1\n\nContraseña temporal: \n$2",
-       "passwordreset-emailsentemail": "Si esta es una dirección de correo electrónico registrada para tu cuenta, entonces se enviará un correo electrónico para el restablecimiento de tu contraseña.",
-       "passwordreset-emailsentusername": "Si hay una dirección de correo electrónico conectada a esta cuenta, entonces se enviará un correo electrónico para el restablecimiento de tu contraseña.",
+       "passwordreset-emailsentemail": "Si esta dirección de correo electrónico está asociada a tu cuenta, entonces se enviará un correo electrónico para restablecer la contraseña.",
+       "passwordreset-emailsentusername": "Si existe una dirección de correo electrónico asociada a este nombre de usuario, entonces se enviará un correo para restablecer la contraseña.",
        "passwordreset-emailsent-capture": "Se ha enviado un correo para el restablecimiento de la contraseña, el cual se muestra a continuación.",
        "passwordreset-emailerror-capture": "Se ha generado un correo electrónico de restablecimiento de contraseña, que se muestra a continuación, pero ha fallado el envío {{GENDER:$2|al usuario|a la usuaria}}: $1",
        "changeemail": "Cambiar o eliminar la dirección de correo electrónico",
        "wlshowhideanons": "usuarios anónimos",
        "wlshowhidepatr": "ediciones verificadas",
        "wlshowhidemine": "mis ediciones",
+       "wlshowhidecategorization": "categorización de página",
        "watchlist-options": "Opciones de la lista de seguimiento",
        "watching": "Vigilando...",
        "unwatching": "Eliminando de la lista de seguimiento...",
        "ipbreason-dropdown": "*Motivos comunes de bloqueo\n** Añadir información falsa\n** Eliminar contenido de las páginas\n** Publicitar enlaces a otras páginas web\n** Añadir basura a las páginas\n** Comportamiento intimidatorio u hostil\n** Abuso de múltiples cuentas\n** Nombre de usuario inaceptable",
        "ipb-hardblock": "Impedir que los usuarios identificados editen desde esta dirección IP",
        "ipbcreateaccount": "Prevenir la creación de cuentas de usuario",
-       "ipbemailban": "Prevenir que el usuario envíe correo electrónico",
+       "ipbemailban": "Impedir que el usuario envíe correo electrónico",
        "ipbenableautoblock": "Bloquear automáticamente la última dirección IP usada por este usuario y cualquier IP posterior desde la cual intente editar",
        "ipbsubmit": "Bloquear a este usuario",
        "ipbother": "Especificar caducidad",
        "pagelang-language": "Idioma",
        "pagelang-use-default": "Utilizar el idioma predeterminado",
        "pagelang-select-lang": "Seleccionar idioma",
+       "pagelang-submit": "Enviar",
        "right-pagelang": "Cambiar el idioma de la página",
        "action-pagelang": "cambiar el idioma de la página",
        "log-name-pagelang": "Registro de cambios en idiomas",
        "mediastatistics-summary": "Estadísticas sobre los tipos de archivos cargados. Sólo se incluyen las versiones más recientes. Los archivos antiguos o eliminados están excluidos.",
        "mediastatistics-nfiles": "$1 ($2 %)",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 ''byte''|$1 ''bytes''}} ($2; $3 %)",
+       "mediastatistics-bytespertype": "Tamaño de archivo total para esta sección: {{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%).",
+       "mediastatistics-allbytes": "Tamaño de archivo total para todos los archivos: {{PLURAL:$1|$1 byte|$1 bytes}} ($2).",
        "mediastatistics-table-mimetype": "Tipo MIME",
        "mediastatistics-table-extensions": "Extensiones posibles",
        "mediastatistics-table-count": "Número de archivos",
        "mediastatistics-header-text": "Textual",
        "mediastatistics-header-executable": "Ejecutables",
        "mediastatistics-header-archive": "Formatos comprimidos",
+       "mediastatistics-header-total": "Todos los archivos",
        "json-warn-trailing-comma": "Se {{PLURAL:$1|eliminó una coma|eliminaron $1 comas}} al final en el archivo JSON",
        "json-error-unknown": "Ocurrió un problema con el código JSON. Error: $1",
        "json-error-depth": "Se ha superado la profundidad máxima de la pila",
index 52a6d6c..f713c6d 100644 (file)
@@ -10,7 +10,8 @@
                        "Babanwalia",
                        "Henares",
                        "MarcoAurelio",
-                       "Macofe"
+                       "Macofe",
+                       "Fitoschido"
                ]
        },
        "tog-underline": "Surrayal atihus:",
        "wlheader-showupdated": "Las páhinas que s'án emburacau dendi la úrtima vezi que las visoreasti son muestrás en '''negrina'''",
        "wlnote": "Embahu {{PLURAL:$1|es el úrtimu chambu|son los úrtimus '''$1''' chambus}} enas úrtimas {{PLURAL:$2|oras|'''$2''' oras}}.",
        "wlshowlast": "Muestral úrtimus $1 oras $2 dias",
+       "watchlistall2": "tó",
        "watchlist-options": "Ocionis de la mi lista e seguimientu",
        "watching": "Vehilandu...",
        "unwatching": "Abaldonandu la vehiláncia en...",
        "modifiedarticleprotection": "chambau el nivel de proteción a \"[[$1]]\"",
        "unprotectedarticle": "\"[[$1]]\" esprotehiu",
        "protect-title": "Estableciendu nivel de proteción pa \"$1\"",
-       "prot_1movedto2": "[[$1]] s´á moviu a [[$2]]",
+       "prot_1movedto2": "[[$1]] sá moviu a [[$2]]",
        "protect-legend": "Confirmal proteción",
        "protectcomment": "Razón:",
        "protectexpiry": "Acabiha:",
        "newtitle": "Nuevu entítulu:",
        "move-watch": "Vehilal esta páhina",
        "movepagebtn": "Movel páhina",
-       "pagemovedsub": "S´á moviu la páhina",
+       "pagemovedsub": "Sá moviu la páhina",
        "movepage-moved": "S'á muau '''\"$1\" a \"$2\"'''",
        "movepage-moved-redirect": "Á siu criá una redireción.",
        "articleexists": "Ya desisti una páhina con esi nombri u nu se premiti el nombri qu´as lihiu.\nPol favol, escrebi otru entítulu.",
        "movelogpagetext": "Embahu ai una lista colas páhinas movias.",
        "movereason": "Razón:",
        "revertmove": "revertil",
-       "delete_and_move": "Esborral i movel",
        "delete_and_move_text": "==Es mestel esborral==\n\nYa desisti la páhina \"[[:$1]]\". Te petaria esborrala pa premitil el treslau?",
        "delete_and_move_confirm": "Sí, esborral la páhina",
        "delete_and_move_reason": "Esborrá pa premitil el treslau",
index b014450..be375b0 100644 (file)
        "undelete_short": "احیای {{PLURAL:$1|یک ویرایش|$1 ویرایش}}",
        "viewdeleted_short": "نمایش {{PLURAL:$1|یک ویرایش حذف‌شده|$1 ویرایش حذف‌شده}}",
        "protect": "محافظت",
-       "protect_change": "تغییر",
+       "protect_change": "گؤەڕانن/تغییر",
        "protectthispage": "محافظت از این صفحه",
-       "unprotect": "تغییر محافظت",
+       "unprotect": "گؤەڕانن/تغییر محافظت",
        "unprotectthispage": "تغییر محافظت این صفحه",
        "newpage": "صفحهٔ تازه",
        "talkpage": "بحث دربارهٔ این صفحه",
        "nstab-template": "الگو",
        "nstab-help": "صفحهٔ راهنما",
        "nstab-category": "رده",
-       "mainpage-nstab": "صفحه اصلی",
+       "mainpage-nstab": "صفحهٔ اصلی",
        "nosuchaction": "چنین عملی وجود ندارد",
        "nosuchactiontext": "عمل مشخص‌شده در نشانی اینترنتی نامجاز است.\nممکن است نشانی اینترنتی را اشتباه وارد کرده باشید یا پیوند مشکل‌داری را دنبال کرده باشید.\nهمچنین ممکن است ایرادی در نرم‌افزار استفاده‌شده در {{SITENAME}} وجود داشته باشد.",
        "nosuchspecialpage": "چنین صفحهٔ ویژه‌ای وجود ندارد",
        "php-mail-error-unknown": "خطای ناشناخته در تابع  mail()‎ پی‌اچ‌پی",
        "user-mail-no-addy": "تلاش برای ارسال ایمیل بدون آدرس ایمیل.",
        "user-mail-no-body": "سعی کردید نامه‌ای الکترونیکی با محتوایی بسیار کوتاه و یا خالی بفرستید.",
-       "changepassword": "تغییر گذرواژه",
+       "changepassword": "گؤەڕانن/تغییر رمز",
        "resetpass_announce": "شما باید برای پایان ورود به سامانه، گذرواژهٔ جدیدی را تنظیم کنید.",
        "resetpass_text": "<!-- اینجا متن اضافه کنید -->",
        "resetpass_header": "تغییر گذرواژهٔ حساب کاربری",
        "revdelete-hide-comment": "خلاصهٔ ویرایش",
        "revdelete-hide-user": "نام کاربری/نشانی آی‌پی",
        "revdelete-hide-restricted": "فرونشانی اطلاعات برای مدیران به همراه دیگران",
-       "revdelete-radio-same": "(بدون تغییر)",
+       "revdelete-radio-same": "(بدون گؤەڕانن/تغییر)",
        "revdelete-radio-set": "پنهان",
        "revdelete-radio-unset": "نمایان",
        "revdelete-suppress": "از دسترسی مدیران به داده نیز مانند سایر کاربران جلوگیری به عمل آید.",
        "revdelete-failure": "'''پیدایی نسخه‌ها قابل به روز کردن نیست:'''\n$1",
        "logdelete-success": "تغییر پیدایی مورد با موفقیت انجام شد.",
        "logdelete-failure": "'''پیدایی سیاهه‌ها قابل تنظیم نیست:'''\n$1",
-       "revdel-restore": "تغییر پیدایی",
+       "revdel-restore": "گؤەڕانن/تغییر پیدایی",
        "pagehist": "تاریخچهٔ صفحه",
        "deletedhist": "تاریخچهٔ حذف‌شده",
        "revdelete-hide-current": "خطا در پنهان کردن مورد مورخ $2 ساعت $1: این نسخه، نسخهٔ اخیر است و قابل پنهان کردن نیست.",
        "upload-form-label-select-file": "یک فایل انتخاب کنید",
        "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-usage-filename": "نام پرونده",
        "foreign-structured-upload-form-label-own-work": "این کار خودم است",
        "wlshowhideanons": "کاربران ناشناس",
        "wlshowhidepatr": "ویرایش‌های گشت‌خورده",
        "wlshowhidemine": "ویرایش‌های من",
+       "wlshowhidecategorization": "دسته‌بندی صفحه",
        "watchlist-options": "گزینه‌های پی‌گیری",
        "watching": "پی‌گیری...",
        "unwatching": "توقف پی‌گیری...",
        "export-download": "ذخیره به صورت پرونده",
        "export-templates": "شامل شدن الگوها",
        "export-pagelinks": "شامل شدن صفحه‌های پیوند شده تا این عمق:",
+       "export-manual": "افزودن صفحات به صورت دستی:",
        "allmessages": "پیغام‌های سامانه",
        "allmessagesname": "نام",
        "allmessagesdefault": "متن پیش‌فرض پیغام",
        "allmessagesnotsupportedDB": "این صفحه نمی‌تواند استفاده شود به این دلیل که <bdi>'''$wgUseDatabaseMessages'''</bdi> غیرفعال شده‌است.",
        "allmessages-filter-legend": "پالایه",
        "allmessages-filter": "پالودن بر اساس وضعیت شخصی‌سازی:",
-       "allmessages-filter-unmodified": "تغییر نیافته",
+       "allmessages-filter-unmodified": "نەگؤەڕیائە/تغییرنیافتە",
        "allmessages-filter-all": "همه",
        "allmessages-filter-modified": "تغییر یافته",
        "allmessages-prefix": "پالودن بر اساس پسوند:",
        "expand_templates_preview": "پیش‌نمایش",
        "expand_templates_preview_fail_html": "<em>زیرا {{SITENAME}} تا به HTML خام فعال و یک دست رفتن اطلاعات نشست وجود دارد، پیش نمایش به عنوان یک اقدام احتیاطی در برابر حملات جاوا اسکریپت پنهان است.</em>\n\n<strong>اگر این تلاش پیشنمایش مشروع است، لطفا دوباره سعی کنید. اگر هنوز کار نمی کند، سعی کنید [[Special:UserLogout|خروج از سیستم]] را کلیک نموده و دوباره وارد شوید.",
        "expand_templates_preview_fail_html_anon": "<em>زیرا {{SITENAME}} تا به HTML خام فعال و یک دست رفتن اطلاعات نشست وجود دارد، پیش نمایش به عنوان یک اقدام احتیاطی در برابر حملات جاوا اسکریپت پنهان است.</em>\n\n<strong>اگر این تلاش پیشنمایش مشروع است، لطفا دوباره سعی کنید. اگر هنوز کار نمی کند، سعی کنید [[Special:UserLogout|خروج از سیستم]] را کلیک نموده و دوباره وارد شوید.",
+       "expand_templates_input_missing": "شما نیازمندید که حداقل متن‌هایی را برای وارد کردن تهیه کنید.",
        "pagelanguage": "صفحه انتخاب زبان",
        "pagelang-name": "صفحه",
        "pagelang-language": "زبان",
        "pagelang-use-default": "استفاده از زبان پیش‌فرض",
        "pagelang-select-lang": "انتخاب زبان",
+       "pagelang-submit": "اعمال",
        "right-pagelang": "تغییر صفحهٔ زبان",
        "action-pagelang": "تغییر زبان صفحه",
        "log-name-pagelang": "تغییر سیاههٔ زبان",
        "mediastatistics": "آمار رسانه‌ها",
        "mediastatistics-summary": "آمارها دربارهٔ نوع‌های پرونده‌ای به روزشده. این فقط شامل آخرین نسخهٔ پرونده است. نسخه‌های قدیمی یا حذف‌شده مسثنی هستند.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 بایت}} ($2؛ $3٪)",
+       "mediastatistics-bytespertype": "حجم کل پرونده این بخش: {{PLURAL:$1|$1 بایت|$1 بایت}} ($2; $3%)",
+       "mediastatistics-allbytes": "حجم کل همه پرونده برای همهٔ پرونده‌ها: {{PLURAL:$1|$1 بایت|$1 بایت}} ($2)",
        "mediastatistics-table-mimetype": "نوع مایم",
        "mediastatistics-table-extensions": "افزونه‌های محتمل",
        "mediastatistics-table-count": "تعداد پرونده‌ها",
        "mediastatistics-header-text": "متنی",
        "mediastatistics-header-executable": "اجرایی",
        "mediastatistics-header-archive": "قالب‌های فشرده",
+       "mediastatistics-header-total": "همه پرونده‌ها",
        "json-warn-trailing-comma": "$1 کامای در انتها از جی‌سن {{PLURAL:$1|حذف شد}}.",
        "json-error-unknown": "مشکلی با جی‌سن بود. خطا: $1",
        "json-error-depth": "بیشینهٔ عمق پشته رد شده است",
index 9232f26..bec4b88 100644 (file)
        "upload-form-label-select-file": "Sélectionner un fichier",
        "upload-form-label-infoform-title": "Détails",
        "upload-form-label-infoform-name": "Nom",
+       "upload-form-label-infoform-name-tooltip": "Un titre descriptif unique pour le fichier, qui servira comme nom de fichier. Vous pouvez utiliser du langage courant avec des espaces. Ne pas inclure l’extension du fichier.",
        "upload-form-label-infoform-description": "Description",
+       "upload-form-label-infoform-description-tooltip": "Décrire brièvement tout ce qu’il y a de particulier concernant cette œuvre.\nPour une photo, mentionner les choses principales qui sont vues, l’occasion, ou l’endroit.",
        "upload-form-label-usage-title": "Utilisation",
        "upload-form-label-usage-filename": "Nom du fichier",
        "foreign-structured-upload-form-label-own-work": "Je suis l’auteur de cette œuvre",
        "export-download": "Enregistrer dans un fichier",
        "export-templates": "Inclure les modèles",
        "export-pagelinks": "Inclure les pages liées à une profondeur de :",
+       "export-manual": "Ajouter des pages manuellement :",
        "allmessages": "Messages système",
        "allmessagesname": "Nom du message",
        "allmessagesdefault": "Message par défaut",
        "tags-apply-not-allowed-one": "La balise « $1 » n’est pas autorisée à être appliquée manuellement.",
        "tags-apply-not-allowed-multi": "{{PLURAL:$2|La balise suivante n’est pas autorisée à être appliquée|Les balises suivantes ne sont pas autorisées à être appliquées}} manuellement : $1",
        "tags-update-no-permission": "Vous n’avez pas le droit d’ajouter ou de supprimer des balises de modification des révisions individuelles ou des entrées de journal.",
-       "tags-update-blocked": "Vous ne pouvez pas ajouter ou supprimer des balises lorsque vous êtes bloqué{{GENDER:||e}}.",
+       "tags-update-blocked": "Vous ne pouvez pas ajouter ou supprimer des balises de modifications lorsque vous êtes bloqué{{GENDER:||e}}.",
        "tags-update-add-not-allowed-one": "La balise « $1 » ne peut pas être ajoutée manuellement.",
        "tags-update-add-not-allowed-multi": "{{PLURAL:$2|La balise suivante ne peut pas être ajoutée|Les balises suivantes ne peuvent pas être ajoutées}} manuellement : $1",
        "tags-update-remove-not-allowed-one": "La balise « $1 » ne peut pas être enlevée.",
        "expand_templates_preview": "Aperçu du rendu",
        "expand_templates_preview_fail_html": "<em>Comme {{SITENAME}} a HTML brut activé et qu’il y a eu une perte de données de session, l’aperçu est masqué par précaution contre les attaques JavaScript.</em>\n\n<strong>Si c’est une demande d’aperçu légitime, veuillez réessayer.</strong>\nSi cela ne fonctionne toujours pas, essayez de [[Special:UserLogout|vous déconnecter]] et vous reconnecter.",
        "expand_templates_preview_fail_html_anon": "<em>Comme {{SITENAME}} a HTML brut activé et que vous n’êtes pas connecté, l’aperçu est masqué par précaution contre les attaques JavaScript.</em>\n\n<strong>Si c’est une demande d’aperçu légitime, veuillez [[Special:UserLogin|vous connecter]] et réessayer.</strong>",
+       "expand_templates_input_missing": "Vous devez fournir au moins un texte d’entrée.",
        "pagelanguage": "Sélecteur de langue de la page",
        "pagelang-name": "Page",
        "pagelang-language": "Langue",
        "mediastatistics": "Statistiques sur les médias",
        "mediastatistics-summary": "Statistiques sur les types de fichier téléchargés. Elles ne prennent en compte que la version la plus récente d’un fichier. Les versions anciennes ou supprimées des fichiers sont exclues.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 octet|$1 octets}} ($2 ; $3%)",
-       "mediastatistics-bytespertype": "Taille totale de fichiers pour cette section : $1 octets.",
-       "mediastatistics-allbytes": "Taille totale pour tous les fichiers : $1 octets.",
+       "mediastatistics-bytespertype": "Taille totale de fichiers pour cette section : {{PLURAL:$1|$1 octet|$1 octets}} ($2 ; $3%).",
+       "mediastatistics-allbytes": "Taille totale pour tous les fichiers : {{PLURAL:$1|$1 octet|$1 octets}} ($2).",
        "mediastatistics-table-mimetype": "Type MIME",
        "mediastatistics-table-extensions": "Extensions possibles",
        "mediastatistics-table-count": "Nombre de fichiers",
index 81c2460..93fd3a7 100644 (file)
        "passwordreset-emailtext-ip": "Alguén (probablemente vostede, desde o enderezo IP $1) solicitou o restablecemento do seu\ncontrasinal de {{SITENAME}} ($4). {{PLURAL:$3|A seguinte conta de usuario está asociada|As seguintes contas de usuarios están asociadas}}\na este enderezo de correo electrónico:\n\n$2\n\n{{PLURAL:$3|Este contrasinal temporal caducará|Estes contrasinais temporais caducarán}} {{PLURAL:$5|nun día|en $5 días}}.\nDebería acceder ao sistema e elixir un novo contrasinal agora. Se outra persoa fixo esta\nsolicitude ou se lembrou o seu contrasinal orixinal e xa non o quere cambiar,\nignore esta mensaxe e continúe empregando o seu contrasinal vello.",
        "passwordreset-emailtext-user": "O usuario $1 solicitou o restablecemento do contrasinal de {{SITENAME}}\n($4). {{PLURAL:$3|A seguinte conta de usuario está asociada|As seguintes contas de usuarios están asociadas}}\na este enderezo de correo electrónico:\n\n$2\n\n{{PLURAL:$3|Este contrasinal temporal caducará|Estes contrasinais temporais caducarán}} {{PLURAL:$5|nun día|en $5 días}}.\nDebería acceder ao sistema e elixir un novo contrasinal agora. Se outra persoa fixo esta\nsolicitude ou se lembrou o seu contrasinal orixinal e xa non o quere cambiar,\nignore esta mensaxe e continúe empregando o seu contrasinal vello.",
        "passwordreset-emailelement": "Nome de usuario: \n$1\n\nContrasinal temporal: \n$2",
-       "passwordreset-emailsentemail": "Se esta é unha dirección de correo electrónico rexistrada para a súa conta, entón enviarase un correo electrónico para o restablecemento do seu contrasinal.",
-       "passwordreset-emailsentusername": "Se hai unha dirección de correo electrónico rexistrada para esta conta, entón enviarase un correo electrónico para o restablecemento do contrasinal.",
+       "passwordreset-emailsentemail": "Se esta é unha dirección de correo electrónico asociada á súa conta, entón enviarase un correo electrónico para o restablecemento do seu contrasinal.",
+       "passwordreset-emailsentusername": "Se hai unha dirección de correo electrónico asociada con este nome de usuario, entón enviarase un correo electrónico para o restablecemento do contrasinal.",
        "passwordreset-emailsent-capture": "Enviouse un correo electrónico de restablecemento do contrasinal, mostrado a continuación.",
        "passwordreset-emailerror-capture": "Xerouse un correo electrónico de restablecemento do contrasinal, mostrado a continuación, pero o envío {{GENDER:$2|ao usuario|á usuaria}} fallou: $1",
        "changeemail": "Cambiar ou eliminar o enderezo de correo electrónico",
        "mediastatistics": "Estatísticas do contido multimedia",
        "mediastatistics-summary": "Estatísticas sobre os tipos de ficheiros enviados. Isto inclúe unicamente a última versión de cada ficheiro. As versións vellas ou borradas dos ficheiros quedan excluídas.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Tamaño total de ficheiro para esta sección: $1 bytes.",
-       "mediastatistics-allbytes": "Tamaño total de ficheiro para todos os ficheiros: $1 bytes.",
+       "mediastatistics-bytespertype": "Tamaño total de ficheiro para esta sección: {{PLURAL:$1|$1 byte|$1 bytes}} ($2; $3%).",
+       "mediastatistics-allbytes": "Tamaño total de ficheiro para todos os ficheiros: {{PLURAL:$1|$1 byte|$1 bytes}} ($2).",
        "mediastatistics-table-mimetype": "Tipo MIME",
        "mediastatistics-table-extensions": "Extensións posibles",
        "mediastatistics-table-count": "Número de ficheiros",
index 83dfa37..e07228d 100644 (file)
        "upload-form-label-select-file": "בחירת קובץ",
        "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-usage-filename": "שם הקובץ",
        "foreign-structured-upload-form-label-own-work": "אני יצרתי את הקובץ",
        "unblock": "שחרור משתמש",
        "blockip": "חסימת {{GENDER:$1|משתמש|משתמשת}}",
        "blockip-legend": "חסימת משתמש",
-       "blockiptext": "השתמשו בטופס שלהלן כדי לחסום את הרשאות הכתיבה מכתובת IP או משתמש מסוימים.\nחסימות כאלה צריכות להתבצע רק כדי למנוע השחתה, ובהתאם ל[[{{MediaWiki:Policy-url}}|נהלים]].\nאנא מלאו את הסיבה הפרטנית לחסימה להלן (לדוגמה, באמצעות ציון דפים מסוימים שהשחית המשתמש).",
+       "blockiptext": "השתמשו בטופס שלהלן כדי לחסום את הרשאות הכתיבה מכתובת IP או משתמש מסוימים.\nחסימות כאלה צריכות להתבצע רק כדי למנוע השחתה, ובהתאם ל[[{{MediaWiki:Policy-url}}|נהלים]].\nאנא מלאו את הסיבה הפרטנית לחסימה להלן (לדוגמה, באמצעות ציון דפים מסוימים שהשחית המשתמש).\nבאפשרותך לחסום טווחי IP באמצעות תחביר [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]; הטווח הגדול ביותר שמורשה הוא <span dir=\"ltr\">/$1</span> עבור IPv4 ו־<span dir=\"ltr\">/$2</span> עבור IPv6.",
        "ipaddressorusername": "כתובת IP או שם משתמש:",
        "ipbexpiry": "פקיעה:",
        "ipbreason": "סיבה:",
        "export-download": "שמירה כקובץ",
        "export-templates": "לכלול תבניות",
        "export-pagelinks": "לכלול דפים מקושרים עד לעומק של:",
+       "export-manual": "הוספה ידנית של דפים:",
        "allmessages": "הודעות המערכת",
        "allmessagesname": "שם",
        "allmessagesdefault": "טקסט ברירת המחדל של ההודעה",
        "expand_templates_preview": "תצוגה מקדימה",
        "expand_templates_preview_fail_html": "<em>מכיוון שב{{GRAMMAR:תחילית|{{SITENAME}}}} מופעלת הצגת HTML גולמית ואירע אבדן מידע כניסה, התצוגה המקדימה מוסתרת, וזאת כאמצעי זהירות מפני התקפות JavaScript.</em>\n\n<strong>אם זה ניסיון תקין להציג תצוגה מקדימה, יש לנסות שוב.</strong>\nאם זה עדיין לא עובד, יש לנסות [[Special:UserLogout|לצאת מהחשבון]] ולהיכנס שוב.",
        "expand_templates_preview_fail_html_anon": "<em>מכיוון שב{{GRAMMAR:תחילית|{{SITENAME}}}} מופעלת הצגת HTML גולמית ולא נכנסת לחשבון, התצוגה המקדימה מוסתרת, וזאת כאמצעי זהירות מפני התקפות JavaScript.</em>\n\n<strong>אם זה ניסיון תקין להציג תצוגה מקדימה, יש [[Special:UserLogin|להיכנס לחשבון]] ולנסות שוב.</strong>",
+       "expand_templates_input_missing": "יש לכתוב טקסט (לפחות טקסט קצר).",
        "pagelanguage": "בורר שפת הדף",
        "pagelang-name": "דף",
        "pagelang-language": "שפה",
        "mediastatistics": "סטטיסטיקות קבצים",
        "mediastatistics-summary": "סטטיסטיקה על סוגי קבצים שהועלו. הסטטיסטיקה כוללת רק את הגרסה החדשה ביותר של הקובץ: גרסאות ישנות או מחוקות של קבצים אינן כלולות.",
        "mediastatistics-nbytes": "{{PLURAL:$1|בית אחד|$1 בתים}} ($2; $3%)",
-       "mediastatistics-bytespertype": "ס×\9a ×\92×\93×\9c×\99 ×\94ק×\91צ×\99×\9d ×\91פרק ×\96×\94: $1 ×\91ת×\99×\9d.",
-       "mediastatistics-allbytes": "ס×\9a ×\92×\93×\9c×\99 ×\9b×\9c ×\94ק×\91צ×\99×\9d: $1 ×\91ת×\99×\9d.",
+       "mediastatistics-bytespertype": "×\94×\92×\95×\93×\9c ×\94×\9b×\95×\9c×\9c ×©×\9c ×\94ק×\91צ×\99×\9d ×\91פרק ×\96×\94: {{PLURAL:$1|×\91×\99ת ×\90×\97×\93|$1 ×\91ת×\99×\9d}} ($2; $3%).",
+       "mediastatistics-allbytes": "×\94×\92×\95×\93×\9c ×\94×\9b×\95×\9c×\9c ×©×\9c ×\9b×\9c ×\94ק×\91צ×\99×\9d: {{PLURAL:$1|×\91×\99ת ×\90×\97×\93|$1 ×\91ת×\99×\9d}} ($2).",
        "mediastatistics-table-mimetype": "סוג MIME",
        "mediastatistics-table-extensions": "סיומות אפשריות",
        "mediastatistics-table-count": "מספר הקבצים",
index 319a29f..7362565 100644 (file)
@@ -23,6 +23,7 @@
        "tog-hideminor": "Chhota aur nawaa badlao ke lukao",
        "tog-hidepatrolled": "Pahraa dewa gais badlao ke nawaa badlao me se lukao",
        "tog-newpageshidepatrolled": "Pahraa dewa gais badlao ke nawaa panna me se lukao",
+       "tog-hidecategorization": "Panna ke categorization ke lukao",
        "tog-extendwatchlist": "Dhyaan suchi ke khol ke sab badlao ke dekhao, khaali nawaa waala nai",
        "tog-usenewrc": "Dher jan se badla gais panna, haali ke badlao aur dhyan suchi me",
        "tog-numberheadings": "Sab heading ke apne se number karo",
        "tog-watchlisthidebots": "Bot waala badlao ke hamaar dhyaan suchi se lukao",
        "tog-watchlisthideminor": "Mamuli badlao ke hamaar dhyaan suchi se lukao",
        "tog-watchlisthideliu": "Logged in sadasya ke badlao ke dhyan suchi se lukao",
+       "tog-watchlistreloadautomatically": "Jab fillter ke badla jaae hae tab dhyan suchi ke automatically upload karo",
        "tog-watchlisthideanons": "Bina naam ke sadasya ke badlao ke dhyan suchi se lukao",
        "tog-watchlisthidepatrolled": "Pahraa dewa gais badlao ke dhyan suchi me se lukao",
+       "tog-watchlisthidecategorization": "Panna ke categorization ke lukao.",
        "tog-ccmeonemails": "Jon e-mail ham duusra sadasya ke lage bhejtaa hai uske copy hamaar lage bhi bhejo",
        "tog-diffonly": "Diff ke niche panna ke content ke nai dekhao",
        "tog-showhiddencats": "Lukawal waala vibhag ke dekhao",
        "morenotlisted": "Ii suchi puura nai hae",
        "mypage": "Panna",
        "mytalk": "Baat",
-       "anontalk": "Ii IP khatir bichar",
+       "anontalk": "Baat",
        "navigation": "Navigation",
        "and": "&#32;aur",
        "qbfind": "Khojo",
        "disclaimers": "Jimmewari se chhutkaari",
        "disclaimerpage": "Project:Saadharan jimmewari nai lo",
        "edithelp": "Badlao pe madat",
+       "helppage-top-gethelp": "Madat",
        "mainpage": "Pahila Panna",
        "mainpage-description": "Pahila Panna",
        "policy-url": "Project:Niti",
        "nstab-template": "Template",
        "nstab-help": "Madat waala panna",
        "nstab-category": "Vibhag",
+       "mainpage-nstab": "Pahila panna",
        "nosuchaction": "Koi aisan kaam nai hai",
        "nosuchactiontext": "Jon kaam ke URL kare ke batais hai uske ii wiki nai pahachane hai\nSaait aap URL ke thiik se type nai karaa hai, nai to galat jorr ke follow karaa hai.\nIi saait ii kaaran se bhi hoe ki  jon software {{SITENAME}} use kare hai, me bug hai",
        "nosuchspecialpage": "Aisan koi khaas panna nai hai",
        "databaseerror-query": "Khoj:$1",
        "databaseerror-function": "Kaam: $1",
        "databaseerror-error": "Galti: $1",
+       "transaction-duration-limit-exceeded": "High replication lag se bache ke khatir, ii transaction ke abort kar dewa gais hae kaheki write duration ($1) exceeded the $2 {{PLURAL:$2|second|seconds}} limit.\nIf you are changing many items at once, try doing multiple smaller operations instead.",
        "laggedslavemode": "Chetawni: Panna me nawaa badlao sait nai hoi.",
        "readonly": "Database band hai",
        "enterlockreason": "Band kare ke kaaran likho, aur ii bhi likho ki kab khola jaai.",
-       "readonlytext": "Database abhi nawaa badlao khatir band hai, saait database me mamuli kaam khatir lekin iske baad fir pahile jaise chale lagi.\n\nJon administrator database ke band karis rahaa, ii kaaran diis hai: $1",
+       "readonlytext": "Database abhi nawaa badlao khatir band hai, saait database me mamuli kaam khatir, lekin iske baad fir pahile jaise chale lagi.\n\nJon administrator database ke band karis rahaa, ii kaaran diis hai: $1",
        "missing-article": "Database, panna me likha akchhar, jiske naam \"$1\" hai, ke nai pais $2 .\n\nIske kaaran ii hoe sake ki aap ek purana antar nai to itihaas waala jorr ke use karaa jiske mitae dewa gais hai.\n\nAgar ii chij nai hai to sait aap ke software me bug hoi.\nIske, URL ke likh ke, koi administrator ke report karo.",
        "missingarticle-rev": "(badlao#: $1)",
        "missingarticle-diff": "(Antar: $1, $2)",
        "readonly_lag": "Database apne se band hoi gais hai jab tak ki duusra database, khaas database ke sanghe kaam nai kare lage.",
+       "nonwrite-api-promise-error": "The 'Promise-Non-Write-API-Action' HTTP header was sent but the request was to an API write module.",
        "internalerror": "Bhitri galti",
        "internalerror_info": "Bhitri galti: $1",
        "internalerror-fatal-exception": "Fatal exception of type \"$1\"",
        "no-null-revision": "Panna \"$1\" ke khatir nawaa null badlao nai banae sakaa hae",
        "badtitle": "Kharaab title",
        "badtitletext": "Jon panna aap mangta hai uske page title invalid, galat, nai to an incorrectly linked inter-language or inter-wiki title. Isme sait ek yah jaada character hoi jon ki title me nai kaam me lawa jae sake hai.",
+       "title-invalid-empty": "Maanga gais panna khaali hae, nai to, isme khaali namespace ke naam hae.",
+       "title-invalid-utf8": "Maanga gias panna me invalid UTF-8 sequence hae.",
+       "title-invalid-interwiki": "Maanga gais panna ke title me ek interwiki link hai, jiske title me nai kaam me lawa jaae sake hai.",
+       "title-invalid-talk-namespace": "Maaga gais panna ke title uu baat waala panna ke refer kare hae jon ki nai hai.",
+       "title-invalid-characters": "Maanga gais panna ke title me invalid character hai:\"$1\".",
+       "title-invalid-relative": "Title me relative path hai. Relative panna ke title (./,../) valid nai hai, kaaheki ii sab panna sadasya ke browser se nai pahuncha jaae sake hai.",
+       "title-invalid-magic-tilde": "Maanga gais panna ke title me invalid magic tilde sequence hai\n(<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "Maanga gais panna bahut lamba hai. Ii UTF-8 encoding me  $1 {{PLURAL:$1|byte|bytes}} se lamba nai rahe sake hai.",
+       "title-invalid-leading-colon": "Maanga gais panna ke title ke suruu me invalid colon hai.",
        "perfcached": "Niche likha data ke cache karaa gais hai aur sait purana hoi. Jaada se jaada {{PLURAL:$1|ek result |$1 results}} cache me hae.",
        "perfcachedts": "Niche likha data ke cache kar dewa gais rahaa, aur pichhle time $1 ke badlaa gais rahaa. Jaada se jaada {{PLURAL:$4|ek result |$4 results}} cache me hae.",
        "querypage-no-updates": "Ii panna me badlao abhi band hai. Data ke abhi nawaa nai karaa jaai.",
        "viewsource": "Source dekho",
        "viewsource-title": "\"$1\" ke source dekho",
        "actionthrottled": "Kaam ke band kar dewa gais hai",
-       "actionthrottledtext": "Spam ke virod me, aap ke ii kaam thora deri me bahut time kare ke rukawat hai, aur aap time limit ke exceed kar diya hai.\nKuch deri be baad fir se kosis karna.",
+       "actionthrottledtext": "Barbaadi ke virod me, aap ke ii kaam thora deri me bahut time kare ke rukawat hai, aur aap time limit ke exceed kar diya hai.\nKuch deri be baad fir se kosis karna.",
        "protectedpagetext": "Ii panna ke badlao ke rok dewa gais hae, jisse ki ispe koi badlao aur koi action nai kare sake.",
-       "viewsourcetext": "Aap ii panna ke source ke dekhe aur nakal utare kare sakta hai:",
-       "viewyourtext": "Aap '''aapan badlao''' ke source ke dekhe aur copy kare saktaa hae",
+       "viewsourcetext": "Aap ii panna ke source ke dekhe aur nakal utare sakta hai.",
+       "viewyourtext": "Aap <strong>aapan badlao</strong> ke source ke ii panna pe  dekhe aur copy kare saktaa hae",
        "protectedinterface": "Ii panna, ii wiki ke khatir, software ke interface text dewe hai, aur iske barbaadi se roke ke khatir band kar dewa gais hai.\nSab wiki me anuwaad ke jorre nai to badle ke khatir, meharbaani kar ke [//translatewiki.net/ translatewiki.net], the MediaWiki localisation project ke kaam me laao.",
        "editinginterface": "'''Chetawani:''' Aap ek panna ke badaltaa hai jon ki software ke interface text dewe hae.\nIi panna me badlao ke asar duusra sadasya ke interface pe bhi hoi.",
        "translateinterface": "Sab wiki me translate kare ke khatir [//translatewiki.net/translatewiki.net], the MediaWiki localisation project, ke kaam me lao.",
-       "cascadeprotected": "Ii panna ke badlao se bachawa gais hai, kahe ki iske {{PLURAL:$1|panna, jon ki|panna, jon ki}} surakchhit hae \"cascading\" option turned on ke saathe me rakkhaa gais hai:\n$2",
+       "cascadeprotected": "Ii panna ke badlao se bachawa gais hai, kaheki iske {{PLURAL:$1|panna, jon ki|panna, jon ki}} surakchhit hae \"cascading\" option turned on ke saathe me rakkhaa gais hai:\n$2",
        "namespaceprotected": "Aap ke paas '''$1''' namespace me panna ke badle ke adhikar nai hai.",
        "customcssprotected": "Aap ke ii CSS panna ke badle ke ijaajat nai hae, kaahe ki isme duusra sadasya ke personal settings hae.",
        "customjsprotected": "Aap ke ii JavaScript panna ke badle ke ijaajat nai hae, kaahe ki isme duusra sadasya ke personal settings hae.",
        "mypreferencesprotected": "Aap ke aapan preferences ke badle ke ijaajat nai hae.",
        "ns-specialprotected": "Khaas panna ke badla nai jae sake hai.",
        "titleprotected": "Ii title ke banae se [[User:$1|$1]] rokis hai.\nIske kaaran hai ''$2''.",
-       "filereadonlyerror": "File \"$1\" ke nai badle sakaa hae, kaahe ki ii file repository \"$2\" me hae aur iske khaali parrha jaae sake hae.\nJon administrator iske lock karis hae, koi kaaran nai diis hae: \"$3\"",
+       "filereadonlyerror": "File \"$1\" ke nai badle sakaa hae, kaahe ki ii file repository \"$2\" me hae aur iske khaali parrha jaae sake hae.\nJon administrator iske lock karis hae, ii diis hae: \"$3\"",
        "invalidtitle-knownnamespace": "Namespace \"$2\" aur text \"$3\" ke kharaab title hae.",
        "invalidtitle-unknownnamespace": "Title gaer kaanuni hae aur iske namespace number \"$1\" aur text \"$2\" ke nai jaana jaawe hae",
        "exception-nologin": "Logged in nai hae",
        "createacct-reason": "Kaaran",
        "createacct-reason-ph": "Aap ke ii account ke banae ke kaaran",
        "createacct-submit": "Aapan account banao",
-       "createacct-another-submit": "Duusra account banao",
+       "createacct-another-submit": "Account banao",
        "createacct-benefit-heading": "Aap ke rakam log {{SITENAME}} ke banain hae.",
        "createacct-benefit-body1": "{{PLURAL:$1|badlao}}",
        "createacct-benefit-body2": "{{PLURAL:$1|panna}}",
        "createacct-benefit-body3": "haali ke {{PLURAL:$1|yogdaan de waala}}",
        "badretype": "Jon duuno password aap likha hai uu ek rakam nai hae.",
+       "usernameinprogress": "Ii sadasya ke account abhi banawa jaae hai.\nMeharbani kar ke sabur karo.",
        "userexists": "Ii sadasya ke naam aur koi ke hae.\nDuusra sadasya ke naam ke choose karo.",
        "loginerror": "Login me kuchh wrong hae",
        "createacct-error": "Account ke banae me galti",
        "wrongpassword": "Galat password likha gais hai. Fir se kosis karo.",
        "wrongpasswordempty": "Koi password nai likha gais hai. Fir se kosis karo.",
        "passwordtooshort": "Password me kamti se kamti {{PLURAL:$1|1 character|$1 characters}} hoe ke chahi.",
+       "passwordtoolong": "Password {{PLURAL:$1|1 character|$1 characters}} se lamba nai rahe sake hai.",
+       "passwordtoopopular": "Sadharan password ke nai kaam me lawa jaae sake hai. Meharbani kar ke aur tagrra password ke choose karo.",
        "password-name-match": "Aap ke password ke aap ke username se different rahe ke chaahi.",
        "password-login-forbidden": "Ii sadasya ke naam aur password ke kaam me laae ke ijaajat nai hae.",
        "mailmypassword": "Password ke badlo",
        "passwordreset-emailtext-ip": "Koi (hoe sake aap, IP address $1 se) {{SITENAME}} ($4) pe aap ke account ke baare me jaankari maanga hae. Niche likha gias sadasya ii e-mail se associated hae.  {{PLURAL:$3|account hae|accounts hae}}\n\n$2\n\n{{PLURAL:$3|Ii temporary password|Ii sab temporary passwords}}  {{PLURAL:$5|ek din|$5 din}} me khalaas hoi.\nAap ke chaahi ki aap login kar ke ek nawaa password banao.  Agar aur koi ii request karis hae, nai to agae aap aapan purana paasword ke yaad kar liya hae, tab ii sandes ke baare me bhuul jaao aur purana password use karte raho.",
        "passwordreset-emailtext-user": "\nSadasya $1 {{SITENAME}} pe aap ke account details ke {{SITENAME}} $4 ke khaatir  reminder maagis hae\n NIche ke sadasya {{PLURAL:$3|account hae|accounts hae}} ii e-mail address: $2 se associatied hae\n\n{{PLURAL:$3|Ii temporary password|Ii sab temporary passwords}}  {{PLURAL:$5|ek din|$5 din}} me khalaas hoi.\nAap ke chaahi ki aap login kar ke ek nawaa password banao.  Agar aur koi ii request karis hae, nai to agae aap aapan purana paasword ke yaad kar liya hae, tab ii sandes ke baare me bhuul jaao aur purana password use karte raho.",
        "passwordreset-emailelement": "Sadasya ke naam: \n$1\n\nKuchh din ke khatir password: \n$2",
-       "passwordreset-emailsent": "Aap ke password yaad karae ke khatir ek e-mail ke bhej dewa gais hae.",
+       "passwordreset-emailsentemail": "Agar ii email aap ke account se associated hai tab ek password reset email ke bheja jaai.",
+       "passwordreset-emailsentusername": "Agar ii email aap ke username se associated hai tab ek password reset email ke bheja jaai.",
        "passwordreset-emailsent-capture": "Ek password yaad karae waala e-mail, jiske niche dekhawa jaawe hae, ke bhej dewa gais hae.",
        "passwordreset-emailerror-capture": "Ek password yaad karae waala e-mail ke banawa gais hae, jiske niche dekhawa jaawe hae, lekin jiske {{GENDER:$2|user}} ke lage bheje nai jawa sake hae: $1",
-       "changeemail": "E-mail address ke badlo",
-       "changeemail-header": "Account e-mail address ke badlo",
+       "changeemail": "E-mail address ke badlo, nai to, hatao",
+       "changeemail-header": "Aapan email ke badle ke khatir ii form ke bharo. Agar aap koi email ke aapan account se nai associate kare mangtaa hai tab form ke submit kare ke time email address ke blank chhorr do.",
+       "changeemail-passwordrequired": "Ii badlao ke confirm kare ke khatir aap ke aapan password ke enter kare ke parri.",
        "changeemail-no-info": "Ii panna ke sidha dekhe ke khaatir, aap ke login kare ke parri.",
        "changeemail-oldemail": "Abhi ke E-mail address:",
        "changeemail-newemail": "Nawaa E-mail address:",
+       "changeemail-newemail-help": "Agar aap aapan email ke hatae mangtaa hai tab ii field ke blank chhorr do.\nAgar email hatae dewa gais hai tab aap bhulawa gais password ke nai reset kare sakegaa aur aap ke ii wiki se email nai mili.",
        "changeemail-none": "(kuchh nai)",
        "changeemail-password": "Aap ke {{SITENAME}} password:",
        "changeemail-submit": "E-mail badlo",
        "changeemail-throttled": "Aap bahut dher dafe login kare ke kosis karaa hae.\nMeharbaani kar ke $1 talak wait kar ke fir se try karo.",
+       "changeemail-nochange": "Meharbaani karke ek duusra email address ke likho.",
        "resettokens": "Token ke reset karo",
        "resettokens-text": "Aap aapan private data pe access roke ke khatir token ke reset kare saktaa hae.\n\nAap ke ii kare ke chaahi agar aap galti se ii jaankari ke aur koi ke de diya hae nai to aap ke account ke bare me aur koi ke pataa hae.",
        "resettokens-no-tokens": "Reset kare ke jhatir koi token nai hae.",
        "sig_tip": "Aapke signature time ke saathe",
        "hr_tip": "Samthar line (bahut jaada nai kaam me laana)",
        "summary": "Sanchhipt:",
-       "subject": "Visay/khaas samachar:",
+       "subject": "Visay:",
        "minoredit": "Ii chhota badlao hai",
        "watchthis": "Ii panna pe dhyaan rakkho",
        "savearticle": "Panna ke bachao",
        "missingsummary": "'''Suchna:''' Aap badlao ke sanchhit me nai likha hai.\nAgar aap Save ke fir se click karaa tab, aap ke badlao bina summary ke save kar lewa jaai.",
        "selfredirect": "<strong>Chetauni:</strong> Aap ii panna ke apne me redirect kartaa hae. \nAap saait wrong target ke specify karaa, nai to wrong panna ke badaltaa hae.\nAgar aap  \"{{int:savearticle}}\" ke fir se click karaa tab redirect ban jaai.",
        "missingcommenttext": "Meharbani kar ke niche aapan vichar deo.",
-       "missingcommentheader": "'''Chetauni:''' Aap ii vichar ke vishay nai likha hai.\nAgar aap \"{{int:savearticle}}\"  pe click karaa tab bina vishay ke iske bachae lewa jaai.",
+       "missingcommentheader": "<strong>Yaad karawa jaae hae:</strong> Aap ii vichar ke vishay nai likha hai.\nAgar aap \"{{int:savearticle}}\"  pe click karaa tab bina vishay ke iske bachae dewa jaai.",
        "summary-preview": "Sanchhep jhalak:",
        "subject-preview": "Suchi ke jhalak:",
+       "previewerrortext": "Aap ke badlao ke preview kare ke time kuchh garrbarro hae gais hai.",
        "blockedtitle": "Sadasya ke rok dewa gais hai",
        "blockedtext": "'''Aapke user name nai to IP address ke rok dewa gae hai.'''\n\nRoke waala hai $1.\nIske kaaran hai ''$2''.\n\n* Roke ke suruu: $8\n* Roke kab khatam hoi: $6\n* Kiske rokaa jae hai: $7\n\nAap $1 ke mile saktaa hai nai to duusra [[{{MediaWiki:Grouppage-sysop}}|administrator]] se rukawat ke baare me baat karo.\nAap ii sadasya ke 'email this user' feature ke kaam me lae ke baat nai kare saktaa hai jab tak ki ek kanuni email address aapke [[Special:Preferences|account preferences]] me nai hai aur aap ke iske kaam me laae ke roka nai gae hai.\nAap ke abhi ke IP address $3 hai, aur roka gae ID hai #$5.\nMeharbani kar ke chahe ek nai to duno ke aapan sawaal me rakho.",
        "autoblockedtext": "Aap ke IP address ke apne se rok dewa gais hai kahe ki koi duusra sadasya iske kaam me kawat rahaa, jiske $1 rokis hai.\n\nIske khatir kaaran hai:\n:''$2''\n\n* Roke ke suruu: $8\n* Roke kab khatam hoi: $6\n*Roke waala: $7\n\nAap $1 ke mile saktaa hai nai to duusra [[{{MediaWiki:Grouppage-sysop}}|administrator]] se rukawat ke baare me baat karo.\n\nAap ii sadasya ke 'email this user' feature ke kaam me lae ke baat nai kare saktaa hai jab tak ki ek kanuni email address aapke [[Special:Preferences|account preferences]] me nai hai aur aap ke iske kaam me laae ke roka nai gae hai.\n\nAap ke abhi ke IP address $3 hai, aur roka gae ID hai #$5.\nMeharbani kar ke chahe ek nai to duno ke aapan sawaal me rakho.",
        "yourdiff": "Antar",
        "copyrightwarning": "Dhyann me rakho ki {{SITENAME}} ke sab yog daan $2 ($1 ke dekho aur kaankari khatir) ke niche dewa gae hai. Agar aap nai mangtaa ki aap ke likha gae koi chij ke duusra logan badle tab hain par nahii likho.<br />\nAap ii bhi waada kartaa hai ki iske aap likha hai aur koi duusra jagah se copy nahi karaa hai.\n'''COPYRIGHT CHIJ KE BINA ANUMATI KE HIAN PAR NAHI SUBMIT KARNA!'''",
        "copyrightwarning2": "Yaad rakhna ki {{SITENAME}} pe sab yogdaan ke duusra sadasya LOG badle, nai to delete, kare sake hai.\nAgar aap nai mangta ki koi aur aap ke yogdaan ke badle, tab aap hian par nai likho.<br />\nAap ii bhi kasam khata hai ki aap iske apne se likha hai aur kahin se copy nai karaa hai (Aur jaankari khatir $1 ke dekho).\n''' COPYRIGHT WORK KE BINA AUNUMATI KE SUBMIT NAI KARNA!'''",
+       "editpage-cannot-use-custom-model": "Ii panna ke content model ke nai badla jaawe sake hai.",
        "longpageerror": "!'''ERROR: Jon text aap submit karaa hai uu {{PLURAL:$1|ek kilobyte|$1 kilobytes}} lamba hai, jon ki maximum {{PLURAL:$2|ek kilobyte|$2 kilobytes}} se lamba hai.'''\nIske bajawa nai karaa jae sake hai.",
-       "readonlywarning": "'''Chetauni: Database ke maintenance khatir band kar dewa gais hai, tab abhi aap aapan badlao ke save nai kare paega.'''\nAap saait aapan badlao ke ek text file me cut-n-paste kar ke baad me use kare khatir save kar le sakta hai.\nAdministrator jon ki iske lock karis hai ii kaaran diis :hai: $1",
+       "readonlywarning": "<strong>Chetauni: Database ke maintenance khatir band kar dewa gais hai, tab abhi aap aapan badlao ke save nai kare paega.</strong>\nAap saait aapan badlao ke ek text file me cut-n-paste kar ke baad me use kare khatir save kar le sakta hai.\nAdministrator jon ki iske lock karis hai ii kaaran diis hai: $1",
        "protectedpagewarning": "'''CHETAUNI: Ii panna ke band kar dewa gais hai jisse ke khaali uu sadasya jiske sysop adhikaar hai iske badle sake hai.'''\nNiche sab se nawaa suchi aap ke dekhe ke khatir dewa gais hae:",
        "semiprotectedpagewarning": "'''Suchna:''' Ii panna ke band kar dewa gais hai jisse ki khali registered sadasya iske badle sake hai.\nNiche sab se nawaa suchi ke aap ke dekhe ke khatir dewa gais hae:",
-       "cascadeprotectedwarning": "'''Chetawani:''' Ii panna ke band kar dewa gais jiske kaaran khali uu sadasya jiske lage sysop privileges hai iske badle sake hai, kahe ki iske niche likha gais cascade-protected {{PLURAL:$1|panna|panna}} me rakkha gais hai:",
+       "cascadeprotectedwarning": "<strong>Chetawani:</strong> Ii panna ke band kar dewa gais jiske kaaran khali uu sadasya jiske lage sysop privileges hai iske badle sake hai, kahe ki iske niche likha gais cascade-protected {{PLURAL:$1|panna|panna}} me rakkha gais hai:",
        "titleprotectedwarning": "'''CHETAUNI: Ii panna ke band dewa gais hai jisse ki [[Special:ListGroupRights|specific rights]] ke jarie iske badla jaae sake hai.'''\nAap ke jaankari ke khatir sab se nawaa suchi niche dewa gais hae:",
        "templatesused": "{{PLURAL:$1|Template|Templates}} ke ii panna me kaam me lawa gais hae:",
        "templatesusedpreview": "{{PLURAL:$1|Template|Templates}} ii jhalak me kaam me lawa gais hae:",
        "permissionserrors": "Permissions Errors",
        "permissionserrorstext": "Aap ke uu chij kare ke ijajat nai hai, ii {{PLURAL:$1|kaaran|kaaran}} khatir:",
        "permissionserrorstext-withaction": "Aap ke lage $2 kare khatir ijajat nai hai, ii {{PLURAL:$1|kaaran|kaaran}} se:",
+       "contentmodelediterror": "Aap iske badle nai saktaa hae kaaheki iske content model <code>$1</code> hae, aur ii  abhi ke content model <code>$2</code> ke rakam nai hae.",
        "recreate-moveddeleted-warn": "'''Chetawani: Jon panna ke pahile hatae dewa gais rahaa ke aap fir se banata hai.'''\n\nAap socho ki ii panna ke sampadan aap ke karte rahe ke chaahi ki nai.\nAap ke aaram khatir hatae waala suchi hian pe dewa jaawe hai:",
        "moveddeleted-notice": "Ii panna ke mitae dewa gais hai.\nIi panna ke mitae waala aur hatae waala log aap ke dekhe khatir niche dewa gais hai.",
        "log-fulllog": "Puura log dekho",
        "notextmatches": "Koi panna see text nai mile hae",
        "prevn": "pahile waala {{PLURAL:$1|$1}}",
        "nextn": "aage waala {{PLURAL:$1|$1}}",
+       "prev-page": "pahile waala panna",
+       "next-page": "aage waala panna",
        "prevn-title": "Pahile waala $1 {{PLURAL:$1|natija|natija}}",
        "nextn-title": "Aage waala $1 {{PLURAL:$1|result|results}}",
        "shown-title": "Ek panna me $1 {{PLURAL:$1|result|results}} dekhao",
        "search-category": "(category $1)",
        "search-file-match": "(file content ke match kare hae)",
        "search-suggest": "Ka aap ke matlab rahaa: $1",
+       "search-rewritten": "$1 ke result dekhawa jaae hai. Iske jagah $2 ke khojo.",
        "search-interwiki-caption": "Saathe ke project",
        "search-interwiki-default": "$1 ke result:",
        "search-interwiki-more": "(aur)",
        "showingresultsinrange": "Niche dekhae hai {{PLURAL:$1|<strong>1</strong> result|<strong>$1</strong> results}} #<strong>$2</strong> se suruu hoe ke #<strong>$3</strong> talak.",
        "search-showingresults": "{{PLURAL:$4|Result <strong>$1</strong> of <strong>$3</strong>|Results <strong>$1 - $2</strong> of <strong>$3</strong>}}",
        "search-nonefound": "Ii sawaal ke koi jawab nai hae.",
+       "search-nonefound-thiswiki": "Ii site me aap ke khoj ke koi result nai hai.",
        "powersearch-legend": "Gahira khoj",
        "powersearch-ns": "Namespaces me khojo:",
        "powersearch-togglelabel": "Check karo:",
        "prefs-watchlist-token": "Dhyan suchi ke nisani:",
        "prefs-misc": "Futkar",
        "prefs-resetpass": "Password badlo",
-       "prefs-changeemail": "E-mail badlo",
+       "prefs-changeemail": "E-mail badlo, nai to, hatao",
        "prefs-setemail": "Ek E-mail address ke banao",
        "prefs-email": "E-mail ke option",
        "prefs-rendering": "Dekhe me kaise lage hai",
        "rows": "Taytay:",
        "columns": "Column:",
        "searchresultshead": "Khojo",
-       "stub-threshold": "Threshold ke khatir <a href=\"#\" class=\"stub\">stub link</a> formatting (bytes):",
+       "stub-threshold": "Threshold stub link formatting ke khatir ($1):",
+       "stub-threshold-sample-link": "namuna",
        "stub-threshold-disabled": "Band kar dewa gais hae",
        "recentchangesdays": "Nawaa badlao me ketna roj dekhawa jaae:",
        "recentchangesdays-max": "(sab se jaada $1 {{PLURAL:$1|din|din}})",
        "prefs-help-recentchangescount": "Isme hai haali ke badlao, panna ke itihaas aur loga.",
        "prefs-help-watchlist-token2": "Aap ke dhyan suchi ke web feed ke ii secret key hae.\nAur koi agar iske bare me jaane hae aap ke dhyan suchi ke parrhae sake hae, tab iske aur ki ke nai dena.\n[[Special:ResetTokens|Agar aap iske reset kare mangtaa hae tab hian pe click karo]].",
        "savedprefs": "Aap ke pasand ke save kar lewa gais hai.",
+       "savedrights": "{{GENDER:$1|$1}} ke user rights ke bachae lewa gais hai.",
        "timezonelegend": "Time ke zone:",
        "localtime": "Sthaniye samay:",
        "timezoneuseserverdefault": "Wiki default ke kaam me laao ($1)",
        "badsig": "Invalid raw signature; HTML tags ke check karo.",
        "badsiglength": "Signature bahut lambaa hai.\nIske $1 {{PLURAL:$1|character|characters}} se kamti rahe ke chaahi.",
        "yourgender": "Aap kaise describe hoe mangtaa hae?",
-       "gender-unknown": "Ham bole nai mangtaa hae",
+       "gender-unknown": "Jahaan talak hoe sake, aap ke baare me likhe ke khatir, ii software gender neutral sabd ke kaam me laai.",
        "gender-male": "Uu wiki panna ke badle hae",
        "gender-female": "Uu wiki panna ke badle hae",
        "prefs-help-gender": "Ii preference ke set karna optional hae.\nSoftware aapan value ke use kar ke aap ke address kare hae aur aap ke ke bare me duusre ke batae hae, right grammar use kar ke\nIi jaankari janata ke dekhai.",
        "prefs-help-prefershttps": "Aap ke agla login pe ii preferences effect me aai.",
        "prefswarning-warning": "Aap aapan preferences ke badla hae, jiske abhi talak save nai karaa gae hae.\nAgar aap ii panna ke bina \"$1\" me click kare chhorra, tab aap ke preferences save nai hoi.",
        "prefs-tabs-navigation-hint": "Tip: Aap left aur right arrow key use kar ke tab list me navigate kare saktaa hae.",
-       "email-address-validity-valid": "E-mail address kanuni hae",
-       "email-address-validity-invalid": "Ek kanuni e-mail ke likho",
        "userrights": "Sadasya ke adhikaar ke chalao",
        "userrights-lookup-user": "Sadasya ke group ke manage karo",
        "userrights-user-editname": "Ek Username ke enter karo:",
        "editusergroup": "User groups ke badlo",
-       "editinguser": "Sadasya '''[[User:$1|$1]]'''  ke adhikaar ke badlaa jaawe hae $2",
+       "editinguser": "{{GENDER:$1|Sadasya}} <strong>[[User:$1|$1]]</strong>  ke adhikaar ke badlaa jaawe hae $2",
        "userrights-editusergroup": "User groupske badlo",
        "saveusergroups": "User groups ke save karo",
        "userrights-groupsmember": "Iske member hai:",
        "group-bot": "Bots",
        "group-sysop": "Sysops",
        "group-bureaucrat": "Bureaucrats",
-       "group-suppress": "Oversights",
+       "group-suppress": "Suppressors",
        "group-all": "(sab)",
        "group-user-member": "{{GENDER:$1|sadasya}}",
        "group-autoconfirmed-member": "{{GENDER:$1|autoconfirmed sadasya}}",
        "group-bot-member": "{{GENDER:$1|bot}}",
        "group-sysop-member": "{{GENDER:$1|administrator}}",
        "group-bureaucrat-member": "{{GENDER:$1|bureaucrat}}",
-       "group-suppress-member": "{{GENDER:$1|oversight}}",
+       "group-suppress-member": "{{GENDER:$1|suppressor}}",
        "grouppage-user": "{{ns:project}}:Sadasya",
        "grouppage-autoconfirmed": "{{ns:project}}:Autoconfirmed sadasya",
        "grouppage-bot": "{{ns:project}}:Bots",
        "grouppage-sysop": "{{ns:project}}:Администраторар",
        "grouppage-bureaucrat": "{{ns:project}}:Bureaucrats",
-       "grouppage-suppress": "{{ns:project}}:Oversight",
+       "grouppage-suppress": "{{ns:project}}:Suppress",
        "right-read": "Panna ke parrho",
        "right-edit": "Panna ke badlo",
        "right-createpage": "Panna banao (jon ki salah kare waala panna nai hai)",
        "recentchanges-label-plusminus": "Panna ke size etna bytes se badla",
        "recentchanges-legend-heading": "'''Legend:'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (aur dekho [[Special:NewPages|nawaa panna ke suchi]])",
+       "recentchanges-submit": "Dekhao",
        "rcnotefrom": "Niche {{PLURAL:$5|badlao hae|badlao hae}} <strong>$3, $4</strong> (<strong>$1</strong> talak dekhawa gais) talak.",
        "rclistfrom": "$3 $2 se suruu kar ke nawaa badlao dekhao",
        "rcshowhideminor": "$1 chhota badlao",
        "rcshowhidemine": "$1 hamaar sampadan",
        "rcshowhidemine-show": "Dekhao",
        "rcshowhidemine-hide": "Lukao",
+       "rcshowhidecategorization-show": "Dekhao",
        "rclinks": "Pichhla $1 badlao pichle $2 din me dekhao <br />$3",
        "diff": "farka",
        "hist": "itihaas",
index 1a46b82..19062c2 100644 (file)
        "nstab-user": "{{GENDER:{{BASEPAGENAME}}|Stranica suradnika|Stranica suradnice}}",
        "nstab-media": "Mediji",
        "nstab-special": "Posebna stranica",
-       "nstab-project": "Stranica o projektu",
+       "nstab-project": "Stranica projekta",
        "nstab-image": "Datoteka",
        "nstab-mediawiki": "Poruka",
        "nstab-template": "Predložak",
        "filehist-filesize": "Veličina datoteke",
        "filehist-comment": "Komentar",
        "imagelinks": "Upotreba datoteke",
-       "linkstoimage": "{{PLURAL:$1|Sljedeća stranica povezuje|$1 sljedećih stranice povezuju}} na ovu datoteku:",
+       "linkstoimage": "{{PLURAL:$1|Sljedeća stranica povezuje|$1 sljedeće stranice povezuju|$1 sljedećih stranica povezuje}} na ovu datoteku:",
        "linkstoimage-more": "Više od $1 {{PLURAL:$1|stranice povezuje|stranica povezuje}} na ovu datoteku.\nSljedeći popis prikazuje {{PLURAL:$1|stranice koje|prvih $1 stranica koje}} vode na ovu datoteku.\n[[Special:WhatLinksHere/$2|Ovdje se nalazi]] potpuni popis.",
        "nolinkstoimage": "Nijedna stranica ne povezuje na ovu sliku.",
        "morelinkstoimage": "Pogledaj [[Special:WhatLinksHere/$1|više poveznica]] za ovu datoteku.",
        "wlshowlast": "Prikaži posljednjih $1 sati $2 dana",
        "watchlistall2": "sve",
        "watchlist-hide": "Sakrij",
+       "watchlist-submit": "Prikaži",
        "wlshowtime": "Prikaži posljednjih:",
        "wlshowhideminor": "manje promjene",
        "wlshowhidebots": "botove",
index d1e45f7..d71203c 100644 (file)
        "permalink": "Hivatkozás erre a változatra",
        "print": "Nyomtatás",
        "view": "Olvasás",
-       "view-foreign": "Megtekintés ezen: $1",
+       "view-foreign": "Megtekintés itt: $1",
        "edit": "Szerkesztés",
        "edit-local": "Helyi leírás szerkesztése",
        "create": "Létrehozás",
        "sig_tip": "Aláírás időponttal",
        "hr_tip": "Vízszintes vonal (ritkán használd)",
        "summary": "Összefoglaló:",
-       "subject": "Téma/fÅ\91cím:",
+       "subject": "Tárgy:",
        "minoredit": "Apró változtatás",
        "watchthis": "A lap figyelése",
        "savearticle": "Lap mentése",
        "whatlinkshere-hidelinks": "linkek $1",
        "whatlinkshere-hideimages": "fájlhivatkozások $1",
        "whatlinkshere-filters": "Elemek szűrése",
+       "whatlinkshere-submit": "Indítás",
        "autoblockid": "$1. autoblokk",
        "block": "Felhasználó blokkolása",
        "unblock": "Felhasználó blokkolásának feloldása",
index c06a6f9..9477837 100644 (file)
@@ -43,7 +43,8 @@
                        "Ilham",
                        "Matma Rex",
                        "WongKentir",
-                       "Rachmat.Wahidi"
+                       "Rachmat.Wahidi",
+                       "Arief"
                ]
        },
        "tog-underline": "Garis bawahi pranala:",
        "passwordreset-emailtext-ip": "Seseorang (mungkin Anda, dari alamat IP $1) meminta pengingat\ndetail akun untuk {{SITENAME}} ($4). {{PLURAL:$3|Akun|Akun-akun}} berikut\nterkait dengan alamat surel ini:\n\n$2\n\n{{PLURAL:$3|Sandi sementara}} berikut akan kedaluwarsa dalam {{PLURAL:$5|$5 hari}}.\nAnda harus masuk dan memilih sandi baru sekarang. Jika orang lain membuat\npermintaan ini atau jika Anda ingat sandi asli dan tidak lagi\ningin mengubahnya, Anda dapat mengabaikan pesan ini dan terus menggunakan sandi lama.",
        "passwordreset-emailtext-user": "Seseorang (mungkin Anda, dari alamat IP $1) meminta pengingat detail akun untuk {{SITENAME}} ($4).\n{{PLURAL:$3|Akun|Akun-akun}} berikut terkait dengan alamat surel ini:\n\n$2\n\n{{PLURAL:$3|Sandi sementara}} berikut akan kedaluwarsa dalam {{PLURAL:$5|$5 hari}}.\nAnda harus masuk dan memilih sandi baru sekarang. Jika orang lain membuat\npermintaan ini atau jika Anda ingat sandi asli dan tidak lagi\ningin mengubahnya, Anda dapat mengabaikan pesan ini dan terus menggunakan sandi lama.",
        "passwordreset-emailelement": "Nama pengguna: \n$1\n\nSandi sementara: \n$2",
-       "passwordreset-emailsent": "Surel setel ulang kata sandi telah dikirimkan.",
+       "passwordreset-emailsentemail": "Surel setel ulang kata sandi telah dikirimkan.",
        "passwordreset-emailsent-capture": "Surel setel ulang kata sandi telah dikirim, yang ditampilkan di bawah.",
        "passwordreset-emailerror-capture": "Surel setel ulang kata sandi telah dibuat, yang ditampilkan di bawah, namun pengiriman pada {{GENDER:$2|pengguna}} gagal: $1",
        "changeemail": "Ubah alamat surel",
        "prefs-help-prefershttps": "Preferensi ini akan diaktifkan kali berikutnya Anda masuk log.",
        "prefswarning-warning": "Perubahan preferensi anda belum tersimpan. Apabila anda meninggalkan halaman ini tanpa men-klik \"$1\" preferensi anda tidak akan diperbarui.",
        "prefs-tabs-navigation-hint": "Tip: Anda dapat menggunakan tombol panah kiri dan kanan untuk bernavigasi antartab di dalam daftar tab.",
-       "email-address-validity-valid": "Alamat surel tampaknya sah",
-       "email-address-validity-invalid": "Masukkan alamat surel yang sah",
        "userrights": "Manajemen hak pengguna",
        "userrights-lookup-user": "Mengatur kelompok pengguna",
        "userrights-user-editname": "Masukkan nama pengguna:",
        "upload-form-label-select-file": "Pilih berkas",
        "upload-form-label-infoform-title": "Rincian",
        "upload-form-label-infoform-name": "Nama",
+       "upload-form-label-infoform-name-tooltip": "Judul singkat yang unik untuk berkas, yang akan menjadi nama berkas. Anda dapat gunakan bahasa yang sederhana berikut spasi. Jangan menyertakan ekstensi berkas.",
        "upload-form-label-infoform-description": "Deskripsi",
+       "upload-form-label-infoform-description-tooltip": "Jelaskan dengan singkat hal-hal penting tentang karya ini.\nUntuk foto, sebutkan hal-hal utama yang ditampilkan, kesempatan atau tempat yang ditampilkan di foto.",
        "upload-form-label-usage-title": "Penggunaan",
        "upload-form-label-usage-filename": "Nama berkas",
        "foreign-structured-upload-form-label-own-work": "Ini adalah karya saya sendiri",
        "movenosubpage": "Halaman ini tak memiliki subhalaman.",
        "movereason": "Alasan:",
        "revertmove": "batalkan",
-       "delete_and_move": "Hapus dan pindahkan",
        "delete_and_move_text": "==Penghapusan diperlukan==\nHalaman yang dituju, \"[[:$1]]\", telah mempunyai isi. Apakah Anda hendak menghapusnya untuk memberikan ruang bagi pemindahan?",
        "delete_and_move_confirm": "Ya, hapus halaman tersebut",
        "delete_and_move_reason": "Dihapus untuk mengantisipasikan pemindahan halaman dari \"[[$1]]\"",
        "mediastatistics": "Statistik media",
        "mediastatistics-summary": "Statistik mengenai jenis berkas yang diunggah. Hanya mencakup versi terbaru dari berkas. Berkas lama dan berkas yang sudah dihapus tidak termasuk.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 bita}} ($2; $3%)",
+       "mediastatistics-bytespertype": "Total ukuran file untuk bagian ini: {{PLURAL: $ 1 | $ 1 byte | $ 1 byte}} ($ 2; $ 3%).",
+       "mediastatistics-allbytes": "Total ukuran untuk semua file: {{PLURAL: $ 1 | $ 1 byte | $ 1 byte}} ($ 2).",
        "mediastatistics-table-mimetype": "Tipe MIME",
        "mediastatistics-table-extensions": "Ekstensi",
        "mediastatistics-table-count": "Jumlah file",
index 54d78c3..8ef32b7 100644 (file)
        "laggedslavemode": "<strong>Ballaag:</strong> Ti panid ket mabalin a saan nga aglaon kadagiti kinaudi a panagpabaro.",
        "readonly": "Narikepan ti database",
        "enterlockreason": "Agikabil ti rason para iti pannakarikep, mangiraman ti maysa a karkulo no kaanonto a malukatan",
-       "readonlytext": "Ti database ket agdama a narikpan kadagiti baro a panagikabil ken panagbaliw, mabalin a gapu dagiti kadawyan a pagsimpa, kalpasanna a normalto nga agsubli.\n\nTi administrador a nangrikep ket nangited iti daytoy a palawag: $1",
+       "readonlytext": "Ti database ket agdama a narikpan kadagiti baro a panagikabil ken panagbaliw, mabalin a gapu dagiti kadawyan a pagsimpa, kalpasanna a normalto nga agsubli.\n\nTi administrador ti sistema a nangrikep ket nangited iti daytoy a palawag: $1",
        "missing-article": "Ti database ket saan a nakabiruk ti testo ti panid a mabirukanna koma, a nanaganan ti \"$1\" $2.\n\nDaytoy ket kadawyan a gapuanan babaen ti sumaganad a baak a paggiddiatan wenno silpo ti pakasaritaan ti maysa panid a dati a naikkat.\n\nNo saan a kasta, mabalin a nakasarakka ti parikut ti sopwer.\n\nPangngaasi nga ipadamagmo kadagiti [[Special:ListUsers/sysop|administrador]], isuratmo ti pakaammo dayta nga URL.",
        "missingarticle-rev": "(rebision#: $1)",
        "missingarticle-diff": "(Dip: $1, $2)",
        "mypreferencesprotected": "Awan pammalubosmo nga agurnos kadagiti kakaykayatam.",
        "ns-specialprotected": "Saan a mabalin nga urnosen dagiti espesial a panid.",
        "titleprotected": "Daytoy a titulo ket nasalakniban manipud iti pannakapartuat babaen ni [[User:$1|$1]].\nTi naited a rason ket \"<em>$2</em>\".",
-       "filereadonlyerror": "Di nabaliwan ti papeles ti \"$1\" gapu ta ti repositorio ti papeles ti \"$2\" ket mabasa laeng a moda.\n\nTi administrador a nangserra ket nangited iti daytoy a panagilawlawag: \"$3\".",
+       "filereadonlyerror": "Di nabaliwan ti papeles ti \"$1\" gapu ta ti repositorio ti papeles ti \"$2\" ket mabasa laeng a moda.\n\nTi administrador ti sistema a nangserra ket nangited iti daytoy a panagilawlawag: \"$3\".",
        "invalidtitle-knownnamespace": "Imbalido a titulo iti nagan ti espasio \"$2\" ken teksto \"$3\"",
        "invalidtitle-unknownnamespace": "Imbalido a titulo iti di ammo a nagan ti espasio a bilang $1 ken teksto \"$2\"",
        "exception-nologin": "Saan a nakastrek",
        "passwordreset-emailtext-ip": "Adda (baka sika, ti naggapuan ti IP a pagtaengan $1) a nagkiddaw ti maysa a panangisaad manen ti kontrasenias para iti {{SITNAME}} ($4) . {{PLURAL:$3|Ti |Dagiti}} sumaganad a pakabilangan ti agar-aramat ket\nmainaig iti daytoy nga esurat a pagtaengan:\n\n$2\n\n{{PLURAL:$3|Daytoy temporario a kontrasenias|Dagitoy temporario a kontrasenias}} ket agpaso {{PLURAL:$5|iti maysa nga aldaw|kadagiti $5 nga aldaw}}.\nSumrekka koman tapno agpilika ti baro a kontraseniasmo tattan. No adda met sabali a nagaramid daytoy a \npanagkiddaw, wenno malagipmo ti dati a kontraseniasmo, ket saanmo a kayaten a sukatan, saanmo nga ikaskaso daytoy a mensahe ken \nagtuloyka nga agusar ti daan a kontrasenias.",
        "passwordreset-emailtext-user": "Daytoy nga agar-aramat $1 iti {{SITENAME}} ket nagkiddaw ti maysa a panangisaad manen ti bukod a kontrasenias para iti {{SITENAME}}\n($4) . {{PLURAL:$3|Ti|Dagiti}} sumaganad a pakabilangan ti agar-aramat ket\nmainaig iti daytoy nga esurat a pagtaengan:\n\n$2\n\n{{PLURAL:$3|Daytoy temporario a kontrasenias|Dagitoy temporario a kontrasenias}} ket agpaso {{PLURAL:$5|iti maysa nga aldaw|kadagiti $5 nga aldaw}}.\nSumrekka koman tapno agpilika ti baro a kontraseniasmo tattan. No adda met sabali a nagaramid daytoy a \npanagkiddaw, wenno malagipmo ti dati a kontraseniasmo, ken saanmo a kayaten a sukatan, saanmo nga ikaskaso daytoy a mensahe ken \nagtuloykan nga agusar ti daan a kontraseniasmo.",
        "passwordreset-emailelement": "Nagan ti agar-aramat: \n$1\n\nTemporario a kontrasenias: \n$2",
-       "passwordreset-emailsent": "No daytoy ket nairehistro nga adres ti esurat para iti pakabilangam, maipatulodto ti maysa nga esurat iti panangisaad manen ti kontrasenias.",
+       "passwordreset-emailsentemail": "No daytoy nga adres ti esurat ket mainaig iti pakabilangam, maipatulodto ti maysa nga esurat iti panangisaad manen ti kontrasenias.",
        "passwordreset-emailsent-capture": "Ti maysa nga esurat ti panangisaad manen ti kontrasenias ket naipatuloden, a naipakita dita baba.",
        "passwordreset-emailerror-capture": "Naaramid ti maysa nga esurat a panangisaad manen ti kontrasenias, a napaikita dita baba, ngem ti panangitulod kenni {{GENDER:$2|agar-aramat}} ket napaay: $1",
        "changeemail": "Sukatan wenno ikkaten ti adres ti esurat",
        "copyrightwarning2": "Pangngaasi a laglagipen nga amin a kontribusion iti {{SITENAME}} ket mabalin a maurnos, mabaliwan, wenno ikkaten dagiti sabali a kontributor.\nNo dimo kayat a ti sinuratmo ket maurnos nga awanan-asi ken maiwaras nga awan sungsungbatan kenka, saanmon nga ited ditoy.<br />\nIkarkarim pay kadakami a bukodmo a sinurat daytoy, wenno kinopia manipud iti publiko a dominio wenno ti kapadpadana a nawaya a nagtaudan. (kitaen ti $1 para kadagiti salaysay).\n<strong>Saan a mangited ti nakarbengan ti kopia nga obra no awan iti pammalubos!</strong>",
        "editpage-cannot-use-custom-model": "Saan a mabaliwan ti modelo ti linaon iti daytoy a panid.",
        "longpageerror": "<strong>Biddut: Ti teksto nga intedmo ket {{PLURAL:$1|maysa a kilobyte|$1 kilkilobyte}} ti katiddogna, nga at-atiddog ngem ti kangatuan iti  {{PLURAL:$2|maysa a kilobyte|$2 kilkilobyte}}.</strong>\nSaan a mabalin a maidulin.",
-       "readonlywarning": "<strong>Ballaag: Narikepan ti database tapno mataripato, isu a saanmo a mabalin nga idulin dagita inurnosmo tattan.</strong>\nMabalinmo ti agkopia ken agipegket ti testom iti papeles ti testo ken idulinmo daytoy intono madamdama.\n\nTi administrador a nangrikep ket nangited iti daytoy a palawag: $1",
+       "readonlywarning": "<strong>Ballaag: Narikepan ti database tapno mataripato, isu a saanmo a mabalin nga idulin dagita inurnosmo tattan.</strong>\nMabalinmo ti agkopia ken agipegket ti testom iti papeles ti testo ken idulinmo daytoy intono madamdama.\n\nTi administrador ti sistema a nangrikep ket nangited iti daytoy a palawag: $1",
        "protectedpagewarning": "<strong>Ballaag: Daytoy a panid ket nasalakniban tapno dagiti laeng agar-aramat nga addaan iti gundaway nga administrador ti makaurnos ditoy.</strong>\nTi naudi a naikabil iti listaan ket naited dita baba para iti reperensia:",
        "semiprotectedpagewarning": "<strong>Nota:</strong> Nasalakniban daytoy a panid tapno dagiti laeng nakarehistro nga agar-aramat ti makaurnos ditoy.\nTi naudi a naikabil iti listaan ket naited dita baba para iti reperensia:",
        "cascadeprotectedwarning": "<strong>Ballaag:</strong> Daytoy a panid ket nasalakniban tapno dagiti laeng agar-aramat nga addaan iti gundaway nga administrador ti makaurnos gapu ta nailak-am {{PLURAL:$1|iti sumaganad a panid|kadagiti sumaganad a panid}} a nasalakniban iti sariap:",
        "permissionserrors": "Biddut ti pammalubos",
        "permissionserrorstext": "Awan ti pammalubosmo nga agaramid iti dayta, gapu ti sumaganad {{PLURAL:$1|a rason|a rasrason}}:",
        "permissionserrorstext-withaction": "Awan ti pammalubosmo nga $2, gapu ti sumaganad a {{PLURAL:$1|rason|rasrason}}:",
-       "contentmodelediterror": "Saanmo a maurnos daytoy a rebision gapu ta ti modelo ti linaon ket <code>$1</code>, ken ti agdama a linaon ti panid ket <code>$2</code>.",
+       "contentmodelediterror": "Saanmo a maurnos daytoy a rebision gapu ta ti modelo ti linaon ket <code>$1</code>, a maigiddiat manipud iti agdama a modelo ti linaon ti panid ti <code>$2</code>.",
        "recreate-moveddeleted-warn": "<strong>Ballaag: Agparpartuatka manen ti dati a naikkat a panid.</strong>\n\nUsigem koma no maitutop ti agtuloy nga agurnos iti daytoy a panid.\nTi listaan ti pannakaikkat ken pannakaiyalis para iti daytoy a panid ket naited ditoy para iti pakainugotan:",
        "moveddeleted-notice": "Naikkaten daytoy a panid.\nTi listaan ti pannakaikkat ken pannakaiyalis para iti panid ket naited dita baba para iti reperensia.",
        "moveddeleted-notice-recent": "Pasensian, daytoy a panid ket kaik-ikkat idi (iti kaunegan dagiti 24 nga oras).\nTi listaan ti pannakaikkat ken pannakaiyalis para iti panid ket naited dita baba para iti reperensia.",
        "prefs-help-prefershttps": "Daytoy a kakaykayatan ket mapakabaelanto iti sumaruno nga iseserrekmo.",
        "prefswarning-warning": "Nagaramikka kadagiti panagbalbaliw kadagiti kakaykayatam a saan pay a naidulin.\nNo panawan daytoy a panid a saan nga agpindut iti \"$1\" dagiti kakaykayatam ket saanto a mapabaro.",
        "prefs-tabs-navigation-hint": "Pakaammo: Mabalinmo nga usaren dagiti kanigid ken kanawan a tekla ti pana tapno madaliasat ti baetan dagiti etiketa iti listaan dagiti etiketa.",
-       "email-address-validity-valid": "Ti esurat a pagtaengan ket kasla umisu",
-       "email-address-validity-invalid": "Ikabil ti umisu nga esurat a pagtaengan",
        "userrights": "Panagtaripato kadagiti karbengan ti agar-aramat",
        "userrights-lookup-user": "Agtaripato kadagiti grupo ti agar-aramat",
        "userrights-user-editname": "Mangiserrek iti nagan ti agar-aramat:",
        "recentchanges-label-plusminus": "Ti panagbaliw ti kadakkel ti panid babaen ti bilang dagiti byte",
        "recentchanges-legend-heading": "'''Leyenda:'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (kitaen pay ti [[Special:NewPages|listaan ti baro a pampanid]])",
+       "recentchanges-submit": "Ipakita",
        "rcnotefrom": "Dita baba ket {{PLURAL:$5|ti sinukatan|dagiti sinukatan}} manipud idi <strong>$3, $4</strong> (aginggana iti <strong>$1</strong> a naipakita).",
        "rclistfrom": "Ipakita dagiti kabarbaro a sinukatan a mangrugi manipud idi $2, $3",
        "rcshowhideminor": "$1 dagiti bassit a panagurnos",
        "foreign-structured-upload-form-label-own-work": "Daytoy ket bukodko nga obra",
        "foreign-structured-upload-form-label-infoform-categories": "Katkategoria",
        "foreign-structured-upload-form-label-infoform-date": "Petsa",
+       "foreign-structured-upload-form-3-label-yes": "Wen",
+       "foreign-structured-upload-form-3-label-no": "Saan",
        "backend-fail-stream": "Saan a maipan ti papeles $1.",
        "backend-fail-backup": "Saan a makaidulin ti kapada ti papeles ti $1.",
        "backend-fail-notexists": "Awan ti papeles ti $1.",
        "mostrevisions": "Dagiti panid a kaaduan kadagiti rebision",
        "prefixindex": "Amin a pampanid nga addaan iti pasakbay",
        "prefixindex-namespace": "Amin a pampanid nga addaan iti pasaruno (nagan ti espasio ti $1)",
+       "prefixindex-submit": "Ipakita",
        "prefixindex-strip": "Ikkaten ti pasakbay iti listaan",
        "shortpages": "Dagiti ababa a panid",
        "longpages": "Dagiti atiddog a panid",
        "protectedpages-performer": "Nangsalaknib nga agar-aramat",
        "protectedpages-params": "Dagiti parametro ti panagsalaknib",
        "protectedpages-reason": "Rason",
+       "protectedpages-submit": "Ipakita dagiti panid",
        "protectedpages-unknown-timestamp": "Di ammo",
        "protectedpages-unknown-performer": "Di ammo nga agar-aramat",
        "protectedtitles": "Dagiti nasalakniban a titulo",
        "protectedtitles-summary": "Daytoy a panid ket ilistana dagiti titulo nga agdama a nasalakniban manipud ti pannakapartuat. Para iti listaan dagiti adda a panid a nasalakniban, kitaen ti  [[{{#special:ProtectedPages}}|{{int:protectedpages}}]]..",
        "protectedtitlesempty": "Awan dagiti titulo nga agdama a nasalakniban kadagitoy a parametro.",
+       "protectedtitles-submit": "Ipakita dagiti titulo",
        "listusers": "Listaan ti agar-aramat",
        "listusers-editsonly": "Ipakita laeng dagiti agar-aramat nga addaan kadagiti inurnos",
        "listusers-creationsort": "Ilasin babaen ti petsa a pannakapartuat",
        "usereditcount": "$1 {{PLURAL:$1|nga inurnos|kadagiti inurnos}}",
        "usercreated": "{{GENDER:$3|Pinartuat}} idi $1, $2",
        "newpages": "Baro a pampanid",
+       "newpages-submit": "Ipakita",
        "newpages-username": "Nagan ti agar-aramat:",
        "ancientpages": "Dagiti kadaanan a panid",
        "move": "Iyalis",
        "specialloguserlabel": "Nangitungpal:",
        "speciallogtitlelabel": "Puntaan (titulo wenno {{ns:user}}:nagan ti agar-aramat para iti agar-aramat):",
        "log": "Dagiti listaan",
+       "logeventslist-submit": "Ipakita",
        "all-logs-page": "Amin a listaan a publiko",
        "alllogstext": "Naikaykaysa a panagiparang kadagiti amin a magun-od a listaan iti {{SITENAME}}.\nMapabassitmo ti panagkita babaen ti panagpili ti kita ti listaan, ti nagan ti agar-aramat (sensitibo ti kadakkel ti letra), wenno ti naapektaran a panid (sensitibo pay ti kadakkel ti letra).",
        "logempty": "Awan dagiti maipada a banag iti listaan.",
        "cachedspecial-viewing-cached-ts": "Kitkitaem ti maysa a naidulin a bersion iti daytoy a panid, a mabalin daytoy a saan a kompleto nga agpayso.",
        "cachedspecial-refresh-now": "Kitaen ti kinaudian.",
        "categories": "Katkategoria",
+       "categories-submit": "Ipakita",
        "categoriespagetext": "Ti sumaganad a {{PLURAL:$1|kategoria ket aglaon|katkategoria ket aglaon}} kadagiti panid wenno midia.\n[[Special:UnusedCategories|Dagiti saan a nausar a kategoria]] ket saan a maiparang ditoy.\nKitaen met [[Special:WantedCategories|dagiti makiddaw a kategoria]].",
        "categoriesfrom": "Ipakita dagiti kategoria a mangrugi iti:",
        "special-categories-sort-count": "ilasin babaen ti bilang",
        "activeusers-hidebots": "Ilemmeng dagiti bot",
        "activeusers-hidesysops": "Ilemmeng dagiti administrador",
        "activeusers-noresult": "Awan ti nasarakan nga agar-aramat.",
+       "activeusers-submit": "Ipakita dagiti aktibo nga agar-aramat",
        "listgrouprights": "Dagiti karbengan ti grupo ti agar-aramat",
        "listgrouprights-summary": "Dagiti sumaganad a listaan ti grupo ti agar-aramat a naipalawag iti daytoy a wiki, a nairaman dagiti mainaig a karbengan ti panagserrekda.\nAdda pay mabalin nga [[{{MediaWiki:Listgrouprights-helppage}}|adu a pakaammo]] a maipanggep kadagiti kabukbuodan a karbengan.",
        "listgrouprights-key": "Leyenda: \n* <span class=\"listgrouprights-granted\">Naited a karbengan</span> \n* <span class=\"listgrouprights-revoked\">Naukas a karbengan</span>",
        "wlshowlast": "Ipakita dagiti naudi a $1 nga or-oras $2 nga al-aldaw",
        "watchlistall2": "amin",
        "watchlist-hide": "Ilemmeng",
-       "wlshowtime": "Ipakita ti naudi:",
+       "watchlist-submit": "Ipakita",
+       "wlshowtime": "Ipakita a paset ti panawen:",
        "wlshowhideminor": "dagiti bassit a panagurnos",
        "wlshowhidebots": "dagiti bot",
        "wlshowhideliu": "dagiti nakarehistro nga agar-aramat",
        "wlshowhideanons": "dagiti di ammo nga agar-aramat",
        "wlshowhidepatr": "dagiti napatrulian a panagurnos",
        "wlshowhidemine": "dagiti inurnosko",
+       "wlshowhidecategorization": "pannakaikategoria ti panid",
        "watchlist-options": "Dagiti pagpilian ti listaan a bambantayan",
        "watching": "Bambantayan...",
        "unwatching": "Saanen a bantayan...",
        "delete-confirm": "Ikkaten ti \"$1\"",
        "delete-legend": "Ikkaten",
        "historywarning": "<strong>Ballaag:</strong> Ti panid a kayatmo nga ikkaten ket adda pakasaritaanna iti $1 {{PLURAL:$1|a rebision|kadagiti rebision}}:",
+       "historyaction-submit": "Ipakita",
        "confirmdeletetext": "Mangrugrugika a mangikkat iti maysa a panid a kakuyog amin ti pakasaritaanna.\nPangngaasi a pasingkedam a naikeddeng a kayatmo nga aramiden daytoy, a maawatam ti pagbnagan ti panangikkatmo, ken aramidem daytoy a kas maiyannugot iti [[{{MediaWiki:Policy-url}}|annuroten]].",
        "actioncomplete": "Nalpasen ti aramid",
        "actionfailed": "Napaay ti aramid",
        "whatlinkshere-hidelinks": "$1 dagiti silpo",
        "whatlinkshere-hideimages": "$1 dagiti silpo ti papeles",
        "whatlinkshere-filters": "Dagiti sagat",
+       "whatlinkshere-submit": "Inkan",
        "autoblockid": "Auto a panagserra #$1",
        "block": "Seraan ti agar-aramat",
        "unblock": "Ikkaten ti serra ti agar-aramat",
        "move-page-legend": "Iyalis ti panid",
        "movepagetext": "Ti panagusar ti porma dita baba, ket mangnagan manen ti panid, a mangiyalis amin ti pakasaritaanna iti baro a nagan.\nTi daan a titulo ket agbalin a baw-ing a panid iti baro a titulo.\nMapabarom a kas automatiko dagiti baw-ing a nakatudo dita kasisigud a titulo.\nNo agpilika a saanmo a kayat, siguraduem a kitaen ti [[Special:DoubleRedirects|doble]] wenno [[Special:BrokenRedirects|nadadael a baw-ing]].\nRenbbengmo ti mangpatalged nga amin a silpo ket agtultuloy a nakatudo iti nasken a papananda.\n\nLaglagipen a ti panid ket <strong>saan</strong> a maiyalis no addan sigud a panid iti baro a titulo, malaksid no ti kinaudi ket maysa a baw-ing ken awan ti napalabas a pakasaritaan ti panag-urnos. \nKayat a sawen daytoy a mabalinmo a suktan ti nagan ti maysa a panid manipud iti punto ti pannakasukat ti nagan no nagbiddutka, ken saan mo a mabalin a suratan manen ti addaan a panid.\n\n<strong>Ballaag!</strong>\nMabalin a maysa daytoy a nakaro ken saan a bigla a panagbaliw iti maysa a nasikat a panid;\npangngaasim a pasingkedam a maawatam ti ibunga daytoy sakbay nga agtuloyka a mangbaliw.",
        "movepagetext-noredirectfixer": "Ti panagusar ti kinabuklan dita baba, ket panaganan ti panid, iyalisna amin ti pakasaritaanna iti baro a nagan.\nTi daan a titulo ket agbalin baw-ing a panid idiay baro a titulo.\nPasaruduam a kitaen ti [[Special:DoubleRedirects|doble]] wenno [[Special:BrokenRedirects|nadadael a baw-ing]].\nRebbengem ti mangpatalged nga amin a silpo ket agtultuloy a nakatudo iti nasken a papananda.\n\nLaglagipen a ti panid ket <strong>saan</strong> a maiyalis no addan sigud a panid iti baro a titulo, malaksid no awan linaonna wenno no maysa a baw-ing a panid ken awan ti panagbaliw iti pakasaritaan ti napalabas. \nKayat a sawen daytoy a mabalinmo a suktan ti nagan ti maysa a panid manipud iti punto ti pannakasukat ti nagan no nagbiddutka, ken saanmo a mabalin a suratan manen ti addaan a panid.\n\n<strong>Ballaag!</strong>\nMabalin a maysa daytoy a nakaro ken saan a bigla a panagbaliw iti maysa a nasikat a panid;\npangngaasim ta pasingkedam a maawatam ti ibunga daytoy sakbay nga agtuloyka a mangbaliw.",
-       "movepagetalktext": "Ti mainaig a tungtungan ti panid ket automatikonto a maiyalis a karamanna <strong>malaksid:</strong>\n*Ti addan ti awan linaon a tungtungan ti panid babaen ti baro a nagan, wenno\n*No ikkatem ti kur-itna ti kahon iti baba.\n\nKadagitoy a kaso, masapul nga iyalis wenno manual nga itiponmo ti panid no kayatmo.",
+       "movepagetalktext": "No kur-item daytoy a kahon, automatikonto a maiyalis ti mainaig a tungtungan a panid, malaksid no addanto idiay iti adda linaon a tungtungan a panid.\n\nIti daytoy a kaso, masapul nga iyalis wenno manual nga itiponmo ti panid no kayatmo.",
        "moveuserpage-warning": "<strong>Ballaag:</strong> Mangrugrugika nga agiyalis ti panid ti agar-aramat. Pangngaasi a laglapipen a ti panid ket isu laeng ti maiyalis ken ti agar-aramat ket <em>saanto</em> a managanan.",
        "movecategorypage-warning": "<strong>Ballaag:</strong> Mangiyal-aliskan iti panid ti kategoria. Pangngaasi a laglagipen a ti maiyalisto laeng ket ti panid ken ti aniaman a pampanid iti daan a kategoria ket <em>saanto</em> a maikategoria iti baro.",
        "movenologintext": "Masapul a nakarehistroka nga agar-aramat ken [[Special:UserLogin|nakastrek]] tapno makaiyalis iti panid.",
        "export-download": "Idulin a kas papeles",
        "export-templates": "Mangiraman kadagiti plantilia",
        "export-pagelinks": "Mangiraman kadagiti nakasilpo a panid iti kauneg iti:",
+       "export-manual": "Manual nga inayon dagiti panid:",
        "allmessages": "Dagiti mensahe ti sistema",
        "allmessagesname": "Nagan",
        "allmessagesdefault": "Kasisigud a testo ti mensahe",
        "exif-compression-1": "Saan a napespes",
        "exif-copyrighted-true": "Nakarbengan ti kopia",
        "exif-copyrighted-false": "Saan a naisaad ti kasasaad ti karbengan ti kopia",
+       "exif-photometricinterpretation-1": "Nangisit ken puraw (Ti nangisit ket 0)",
        "exif-unknowndate": "Di ammo a petsa",
        "exif-orientation-1": "Kadawyan",
        "exif-orientation-2": "Horisontal a binaliktad",
        "pagelang-language": "Pagsasao",
        "pagelang-use-default": "Usaren ti kasisigud a pagsasao",
        "pagelang-select-lang": "Agpili iti pagsasao",
+       "pagelang-submit": "Ited",
        "right-pagelang": "Baliwan ti pagsasao ti panid",
        "action-pagelang": "baliwan ti pagsasao ti panid",
        "log-name-pagelang": "Listaan ti panagbaliw ti pagsasao",
        "mediastatistics-header-video": "Dagiti video",
        "mediastatistics-header-office": "Opisina",
        "mediastatistics-header-text": "Tekstual",
+       "mediastatistics-header-total": "Amin a papeles",
        "json-error-unknown": "Adda idi parikut ti JSON. Biddut: $1",
        "json-error-state-mismatch": "Imbalido wenno nadadael a JSON",
        "json-error-syntax": "Biddut ti sintaksis",
index e26678c..c7c8a4b 100644 (file)
        "morenotlisted": "Þessi listi er ekki tæmandi.",
        "mypage": "Síða",
        "mytalk": "Spjall",
-       "anontalk": "Spjallsíða þessa vistfangs.",
+       "anontalk": "Spjall",
        "navigation": "Flakk",
        "and": "&#32;og",
        "qbfind": "Finna",
        "view-foreign": "Skoða á $1",
        "edit": "Breyta",
        "create": "Skapa",
+       "create-local": "Bæta við staðbundinni lýsingu",
        "editthispage": "Breyta þessari síðu",
        "create-this-page": "Skapa þessari síðu",
        "delete": "Eyða",
        "viewsource": "Skoða efni",
        "viewsource-title": "Skoða efni $1",
        "actionthrottled": "Aðgerðin kafnaði",
-       "actionthrottledtext": "Til þess að verjast ruslpósti, er ekki hægt að framkvæma þessa aðgerð of oft, og þú hefur farið fram yfir þau takmörk. Gjörðu svo vel og reyndu aftur eftir nokkrar mínútur.",
+       "actionthrottledtext": "Til þess að verjast misnotkun, er ekki hægt að framkvæma þessa aðgerð of oft, og þú hefur farið fram yfir þau takmörk. Vinsamlegast reyndu aftur eftir nokkrar mínútur.",
        "protectedpagetext": "Þessari síðu hefur verið læst til að koma í veg fyrir breytingar eða aðrar aðgerðir.",
-       "viewsourcetext": "Þú getur skoðað og afritað kóða þessarar síðu:",
+       "viewsourcetext": "Þú getur skoðað og afritað kóða þessarar síðu.",
        "viewyourtext": "Þú getur skoðað og afritað kóða <strong>breytinganna þinna</strong> yfir á þessa síðu.",
        "protectedinterface": "Þessi síða útvegar textann sem birtist í viðmóti hugbúnaðarins sem keyrir þessa síðu, og er læst til að koma í veg fyrir misnotkun.\nTil þess að bæta við eða breyta þýðingum fyrir öll wiki verkefni, vinsamlegast notaðu [//translatewiki.net/ translatewiki.net], staðfæringaverkefni MediaWiki",
        "editinginterface": "<strong>Aðvörun:</strong> Þú ert að breyta síðu sem hefur að geyma texta fyrir notendaumhverfi hugbúnaðarins.\nBreytingar á þessari síðu munu hafa áhrif á notendaumhverfi annarra notenda á þessu vefsvæði.",
        "mycustomjsprotected": "Þú hefur ekki leyfi til þess að breyta þessari JavaScript-síðu.",
        "ns-specialprotected": "Kerfissíðum er ekki hægt að breyta.",
        "titleprotected": "Þessi titill hefur verið verndaður fyrir sköpun af [[User:$1|$1]].\nÁstæðan sem gefin var ''$2''.",
-       "filereadonlyerror": "Ekki var hægt að breyta skránni \"$1\" því skráin í skráarsafninu \"$2\" er engöngu hægt að lesa.\n\nMöppudýrið sem læsti skránni gaf þessa ástæðu: \"''$3''\".",
+       "filereadonlyerror": "Ekki var hægt að breyta skránni \"$1\" því skráin í skráarsafninu \"$2\" er engöngu hægt að lesa.\n\nKerfisstjórinn sem læsti skránni gaf þessa ástæðu: \"$3\".",
        "invalidtitle-knownnamespace": "Ógildur titill í nafnrými \"$2\" og með textann \"$3\"",
        "invalidtitle-unknownnamespace": "Ógildur titill með óþekkt nafnrými númer $1 og texta \"$2\"",
        "exception-nologin": "Óinnskráð(ur)",
        "createacct-reason": "Ástæða",
        "createacct-reason-ph": "Afhverju ertu að búa til annan aðgang",
        "createacct-submit": "Búa til aðganginn",
-       "createacct-another-submit": "Stofna annan aðgang",
+       "createacct-another-submit": "Stofna aðgang",
        "createacct-benefit-heading": "{{SITENAME}} er skrifuð af fólki eins og þér.",
        "createacct-benefit-body1": "{{PLURAL:$1|breyting|breytingar}}",
        "createacct-benefit-body2": "{{PLURAL:$1|síða|síður}}",
        "passwordreset-emailtext-ip": "Einhver (líklegast þú, á vistfanginu $1) hefur beðið um \nendursetningu lykilorðsins þíns fyrir {{SITENAME}} ($4). Aðgangur eftirfarandi {{PLURAL:$3|notanda er|notendum eru}} tengd þessu netfangi:\n\n$2\n\nEf þetta er það sem þú vildir, þarftu að skrá þig inn og velja nýtt lykilorð. {{PLURAL:$3|Tímabundna lykilorðið rennur|Tímabundnu lykilorðin renna}} út eftir $5 {{PLURAL:$5|dag|daga}}.\n\nEf það varst ekki þú sem fórst fram á þetta, eða ef þú manst lykilorðið þitt, og villt ekki lengur breyta því, skaltu hunsa þessi skilaboð og halda áfram að nota gamla lykilorðið.",
        "passwordreset-emailtext-user": "Notandinn $1 á {{SITENAME}} hefur beðið um endursetningu lykilorðsins þíns fyrir {{SITENAME}} ($4). Aðgangur eftirfarandi {{PLURAL:$3|notanda er|notendum eru}} tengd þessu netfangi:\n\n$2\n\nEf þetta er það sem þú vildir, þarftu að skrá þig inn og velja nýtt lykilorð. {{PLURAL:$3|Tímabundna lykilorðið rennur|Tímabundnu lykilorðin renna}} út eftir $5 {{PLURAL:$5|dag|daga}}.\n\nEf það varst ekki þú sem fórst fram á þetta, eða ef þú manst aftur lykilorðið þitt, og vilt ekki lengur breyta því, skaltu hunsa þessi skilaboð og halda áfram að nota gamla lykilorðið.",
        "passwordreset-emailelement": "Notendanafn: \n$1\n\nTímabundið lykilorð: \n$2",
-       "passwordreset-emailsentemail": "Töluvpóstur til að endursetja lykilorðið hefur verið sendur.",
+       "passwordreset-emailsentemail": "Ef þetta netfang er skráð fyrir aðganginum þínum þá hefur töluvpóstur verið sendur til að endursetja lykilorðið.",
        "passwordreset-emailsent-capture": "Tölvupóstur til að endursetja lykilorðið hefur verið sendur í tölvupósti, sem er sýndur hér fyrir neðan.",
        "passwordreset-emailerror-capture": "Tölvupóstur til að endursetja lykilorðið var búinn til, sem er sýndur hér fyrir neðan, en ekki tókst að senda hana til {{GENDER:$2|notandans}}: $1",
-       "changeemail": "Breyting netfangs",
-       "changeemail-header": "Breyta skráðu netfangi",
+       "changeemail": "Breyta eða fjarlægja netfang",
+       "changeemail-header": "Fylltu út þetta eyðublað til að breyta netfanginu þínu. Ef þú vilt fjarlægja tengingu allra netfanga frá aðganginum þínum skildu þá netfangs reitinn eftir tóman.",
        "changeemail-no-info": "Þú verður að vera skráð(ur) inn til að hafa aðgang að þessari síðu.",
        "changeemail-oldemail": "Núverandi netfang:",
        "changeemail-newemail": "Nýtt netfang:",
        "sig_tip": "Undirskrift þín auk tímasetningar",
        "hr_tip": "Lárétt lína (notist sparlega)",
        "summary": "Breytingarágrip:",
-       "subject": "Fyrirsögn:",
+       "subject": "Umræðuefni:",
        "minoredit": "Þetta er minniháttar breyting",
        "watchthis": "Vakta þessa síðu",
        "savearticle": "Vista síðu",
        "anonpreviewwarning": "Þú ert ekki innskráð(ur). Vistfang þitt skráist í breytingaskrá síðunnar.",
        "missingsummary": "'''Áminning:''' Þú hefur ekki skrifað breytingarágrip.\nEf þú smellir á Vista aftur, verður breyting þín vistuð án þess.",
        "missingcommenttext": "Gerðu svo vel og skrifaðu athugasemd fyrir neðan.",
-       "missingcommentheader": "'''Áminning:''' Þú hefur ekki gefið upp umræðuefni/fyrirsögn.\nEf þú smellir á \"{{int:savearticle}}\" aftur, verður breyting þín vistuð án þess.",
+       "missingcommentheader": "<strong>Áminning:</strong> Þú hefur ekki gefið upp umræðuefni.\nEf þú smellir á \"{{int:savearticle}}\" aftur, verður breyting þín vistuð án þess.",
        "summary-preview": "Forskoða breytingarágrip:",
-       "subject-preview": "Forskoðun umræðuefnis/fyrirsagnar:",
+       "subject-preview": "Forskoðun umræðuefnis:",
        "blockedtitle": "Notandi er bannaður",
        "blockedtext": "'''Notandanafn þitt eða vistfang hefur verið bannað.'''\n\nBannið var sett af $1.\nÁstæðan er eftirfarandi: ''$2''.\n\n* Bannið hófst: $8\n* Banninu lýkur: $6\n* Sá sem banna átti: $7\n\nÞú getur haft samband við $1 eða annan [[{{MediaWiki:Grouppage-sysop}}|stjórnanda]] til að ræða bannið.\nÞú getur ekki notað „Senda þessum notanda tölvupóst“ aðgerðina nema gilt netfang sé skráð í [[Special:Preferences|notandastillingum þínum]] og að þér hafi ekki verið óheimilað það.\nNúverandi vistfang þitt er $3, og bönnunarnúmerið er #$5.\nVinsamlegast tilgreindu allt að ofanverðu í fyrirspurnum þínum.",
        "autoblockedtext": "Vistfang þitt hefur verið sjálfvirkt bannað því það var notað af öðrum notanda, sem var bannaður af $1.\nÁstæðan er eftirfarandi:\n\n:''$2''\n\n* Bannið hófst: $8\n* Banninu lýkur: $6\n* Sá sem banna átti: $7\n\nÞú getur haft samband við $1 eða annan [[{{MediaWiki:Grouppage-sysop}}|stjórnanda]] til að ræða bannið.\n\nAthugaðu að þú getur ekki notað „Senda þessum notanda tölvupóst“ aðgerðina nema gilt netfang sé skráð í [[Special:Preferences|notandastillingum þínum]] og að þér hafi ekki verið óheimilað það.\n\nNúverandi vistfang þitt er $3, og bönnunarnúmerið er #$5.\nVinsamlegast tilgreindu allt að ofanverðu í fyrirspurnum þínum.",
        "copyrightwarning": "Vinsamlegast athugaðu að öll framlög á {{SITENAME}} eru álitin leyfisbundin samkvæmt $2 (sjá $1 fyrir frekari upplýsingar).  Ef þú vilt ekki að skrif þín falli undir þetta leyfi og öllum verði frjálst að breyta og endurútgefa efnið samkvæmt því skaltu ekki leggja þau fram hér.<br />\nÞú berð ábyrgð á framlögum þínum, þau verða að vera þín skrif eða afrit texta í almannaeigu eða sambærilegs frjáls texta.\n'''AFRITIРEKKI HÖFUNDARRÉTTARVARIN VERK Á ÞESSA SÍÐU ÁN LEYFIS'''",
        "copyrightwarning2": "Vinsamlegast athugið að aðrir notendur geta breytt eða fjarlægt öll framlög til {{SITENAME}}.\nEf þú vilt ekki að textanum verði breytt skaltu ekki senda hann inn hér.<br />\nÞú lofar okkur einnig að þú hafir skrifað þetta sjálfur, að efnið sé í almannaeigu eða að það heyri undir frjálst leyfi. (sjá $1).\n'''EKKI SENDA INN HÖFUNDARRÉTTARVARIРEFNI ÁN LEYFIS RÉTTHAFA!'''",
        "longpageerror": "'''VILLA: Textinn sem þú sendir inn er $1 {{PLURAL:$1|kílóbæti}} að lengd, en hámarkið er $2 {{PLURAL:$2|kílóbæti}}. Ekki er hægt að vista textann.'''",
-       "readonlywarning": "'''AÐVÖRUN: Gagnagrunninum hefur verið læst til að unnt sé að framkvæma viðhaldsaðgerðir, svo þú getur ekki vistað breytingar þínar núna.'''\nÞú ættir að klippa og líma textann yfir í textaskjal til þess að geyma hann til seinni tíma.\n\nStjórnandinn sem læsti honum gaf þessa skýringu: $1",
+       "readonlywarning": "<strong>AÐVÖRUN: Gagnagrunninum hefur verið læst til að unnt sé að framkvæma viðhaldsaðgerðir, svo þú getur ekki vistað breytingar þínar núna.</strong>\nÞú ættir að klippa og líma textann yfir í textaskjal til þess að geyma hann til seinni tíma.\n\nKerfisstjórinn sem læsti honum gaf þessa skýringu: $1",
        "protectedpagewarning": "'''Viðvörun: Þessari síðu hefur verið læst svo aðeins notendur með möppudýraréttindi geti breytt henni.'''\nSíðasta færsla síðunnar úr verndunarskrá er sýnd til skýringar:",
        "semiprotectedpagewarning": "'''Athugið''': Þessari síðu hefur verið læst þannig að aðeins innskráðir notendur geti breytt henni.\nSíðasta færsla síðunnar úr verndunarskrá er sýnd til skýringar:",
        "cascadeprotectedwarning": "<strong>Viðvörun:</strong> Þessari síðu hefur verið læst svo aðeins möppudýr geta breytt henni, því hún er ítengd keðjuvörn eftirfarandi {{PLURAL:$1|síðu|síðna}}:",
        "template-protected": "(vernduð)",
        "template-semiprotected": "(hálfvernduð)",
        "hiddencategories": "Þessi síða er meðlimur í $1 {{PLURAL:$1|földum flokki|földum flokkum}}:",
+       "edittools": "<!-- Þessi texti verður sýndur undir breytingar og upphölunar eyðublöðum. -->",
        "nocreatetext": "{{SITENAME}} hefur takmarkað eiginleikann að gera nýjar síður.\nÞú getur farið til baka og breytt núverandi síðum, eða [[Special:UserLogin|skráð þið inn eða búið til aðgang]].",
        "nocreate-loggedin": "Þú hefur ekki leyfi til að búa til nýjar síður.",
        "sectioneditnotsupported-title": "Hlutabreyting er ekki virk",
        "mergehistory-go": "Sýna breytingar sem hægt er að sameina",
        "mergehistory-submit": "Sameina útgáfur",
        "mergehistory-empty": "Engar útgáfur sem hægt er að sameina.",
-       "mergehistory-done": "$3 {{PLURAL:$3|útgáfa|útgáfur}} af $1 sameinaðar í [[:$2]].",
+       "mergehistory-done": "$3 {{PLURAL:$3|útgáfa|útgáfur}} af $1 {{PLURAL:$3|var|voru}} sameinaðar í [[:$2]].",
        "mergehistory-fail": "Gat ekki sameinað breytingasögur. Vinsamlegast athugaðu síðuna og tímabreyturnar.",
        "mergehistory-no-source": "Upprunasíðan $1 er ekki til.",
        "mergehistory-no-destination": "Marksíðan $1 er ekki til.",
        "prefs-watchlist-token": "Tóki vaktlistans:",
        "prefs-misc": "Aðrar stillingar",
        "prefs-resetpass": "Breyta lykilorði",
-       "prefs-changeemail": "Breyta netfangi",
+       "prefs-changeemail": "Breyta eða fjarlægja netfang",
        "prefs-setemail": "Skrá netfang",
        "prefs-email": "Tölvupóststillingar",
        "prefs-rendering": "Útlit",
        "rows": "Raðir",
        "columns": "Dálkar",
        "searchresultshead": "Leit",
-       "stub-threshold": "Þröskuldur fyrir <a href=\"#\" class=\"stub\">stubbatengla</a> (bæt):",
+       "stub-threshold": "Þröskuldur fyrir stílsnið stubbatengla ($1):",
        "stub-threshold-disabled": "Óvirkt",
        "recentchangesdays": "Fjöldi daga sem nýlegar breytingar ná yfir:",
        "recentchangesdays-max": "(hámark $1 {{PLURAL:$1|dag|daga}})",
        "enhancedrc-history": "breytingaskrá",
        "recentchanges": "Nýlegar breytingar",
        "recentchanges-legend": "Stillingar nýlegra breytinga",
-       "recentchanges-summary": "Hér geturðu fylgst með nýjustu breytingunum. {{SITENAME}} inniheldur '''[[Special:NewPages|{{NUMBEROFARTICLES}}]]''' {{PLURAL:{{NUMBEROFARTICLES}}|grein|greinar}} og '''[[Special:Statistics|{{NUMBEROFEDITS}}]]''' {{PLURAL:{{NUMBEROFEDITS}}|breytingu|breytingar}}. '''[[Special:ActiveUsers|{{NUMBEROFACTIVEUSERS}}]]''' {{PLURAL:{{NUMBEROFACTIVEUSERS}}|notandi|notendur}} hafa hjálpað til í þessum mánuði.",
+       "recentchanges-summary": "Hér geturðu fylgst með nýjustu breytingunum.",
        "recentchanges-noresult": "Engar breytingar í uppgefna tímabilinu sem passa við þessa mælikvarða.",
        "recentchanges-feed-description": "Hér er hægt að fylgjast með nýlegum breytingum á {{SITENAME}}.",
        "recentchanges-label-newpage": "Þessi breyting skapaði nýja síðu",
        "badfilename": "Skáarnafninu hefur verið breytt í „$1“.",
        "filetype-mime-mismatch": "Skráarendingin \".$1\" samræmist ekki MIME-gerð skrárinnar ($2).",
        "filetype-badmime": "Skrárir af MIME-gerðinni „$1“ er ekki leyfilegt að hlaða inn.",
-       "filetype-bad-ie-mime": "Mistókst að hlaða inn skrá því Internet Explorer myndi uppgvötva hana sem \"$1\" sem er óheimil og mögulega hættulegt skráarsnið.",
+       "filetype-bad-ie-mime": "Mistókst að hlaða inn skrá því Internet Explorer myndi uppgötva hana sem \"$1\" sem er óheimil og mögulega hættulegt skráarsnið.",
        "filetype-unwanted-type": "'''„.$1“''' er óæskileg skráargerð.\n{{PLURAL:$3|Ákjósanleg skráargerð er|Ákjósanlegar skráargerðir eru}} $2.",
        "filetype-banned-type": "'''„.$1“''' {{PLURAL:$4|er ekki leifileg skráargerð|eru ekki leifilegar skráargerðir}}.\n{{PLURAL:$3|Leyfileg skráargerð er|Leyfilegar skráargerðir eru}} $2.",
        "filetype-missing": "Skráin hefur engan viðauka (dæmi \".jpg\").",
        "booksources-text": "Fyrir neðan er listi af tenglum í aðrar síður sem selja nýjar og notaðar bækur og gætu einnig haft nánari upplýsingar í sambandi við bókina sem þú varst að leita að:",
        "booksources-invalid-isbn": "ISBN gildið virðist ekki vera gilt; leitaðu eftir villum við innslátt eða afritun gildisins frá upsprettu þess.",
        "specialloguserlabel": "Gerandi:",
-       "speciallogtitlelabel": "Beinist að (titill eða notandi):",
+       "speciallogtitlelabel": "Beinist að (titill eða {{ns:user}}:notendanafn fyrir notanda):",
        "log": "Aðgerðaskrár",
        "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.",
        "activeusers-noresult": "Enginn notandi fannst.",
        "listgrouprights": "Notandahópréttindi",
        "listgrouprights-summary": "Hér er listi yfir notendahópa á þessum wiki, með þeirra réttindum. \nÞað gæti verið til síða með [[{{MediaWiki:Listgrouprights-helppage}}|frekari upplýsingar]] um einstök réttindi.",
-       "listgrouprights-key": "* <span class=\"listgrouprights-granted\">Veitt réttindi</span>\n* <span class=\"listgrouprights-revoked\">Afturkölluð réttindi</span>",
+       "listgrouprights-key": "Skýringar:\n* <span class=\"listgrouprights-granted\">Veitt réttindi</span>\n* <span class=\"listgrouprights-revoked\">Afturkölluð réttindi</span>",
        "listgrouprights-group": "Hópur",
        "listgrouprights-rights": "Réttindi",
        "listgrouprights-helppage": "Help:Hópréttindi",
        "emailccsubject": "Afrit af skilaboðinu þínu til $1: $2",
        "emailsent": "Sending tókst",
        "emailsenttext": "Skilaboðin þín hafa verið send.",
-       "emailuserfooter": "Þessi tölvupóstur var sendur af $1 til $2 með möguleikanum \"{{int:emailuser}}\" á {{SITENAME}}.",
+       "emailuserfooter": "Þessi tölvupóstur var {{GENDER:$1|sendur}} af $1 til {{GENDER:$2|$2}} með möguleikanum \"{{int:emailuser}}\" á {{SITENAME}}.",
        "usermessage-summary": "Skil eftir meldingu.",
        "usermessage-editor": "Meldinga sendiboði",
        "watchlist": "Vaktlistinn",
        "deletepage": "Eyða",
        "confirm": "Staðfesta",
        "excontent": "innihaldið var: „$1“",
-       "excontentauthor": "innihaldið var: '$1' (og öll framlög voru frá '[[Special:Contributions/$2|$2]]')",
+       "excontentauthor": "innihaldið var: „$1“ og öll framlög voru frá „[[Special:Contributions/$2|$2]]“ ([[User talk:$2|talk]])",
        "exbeforeblank": "innihald fyrir tæmingu var: '$1'",
        "delete-confirm": "Eyða „$1“",
        "delete-legend": "Eyða",
        "undeletepagetext": "Eftirfarandi $1 {{PLURAL:$1|síðu hefur verið eytt en hún er þó enn í gagnagrunninum og getur verið endurvakin|síðum hefur verið eytt en eru þó enn í gagnagrunninum og geta verið endurvaknar}}.\nGagnagrunnurinn kann að vera tæmdur reglulega.",
        "undelete-fieldset-title": "Endurvekja breytingar",
        "undeleteextrahelp": "Til þess að endurvekja alla breytingarskrá síðunnar, skildu öll box eftir óhökuð og ýttu á '''''{{int:undeletebtn}}'''''.\nTil þess að framkvæma ákveðna endurvakningu, ýttu á þau box sem standa hliðiná þeim útgáfum sem á að endurvekja og ýttu á '''''{{int:undeletebtn}}'''''.",
-       "undeleterevisions": "$1 {{PLURAL:$1|breyting|breytingar}}",
+       "undeleterevisions": "$1 {{PLURAL:$1|breytingu|breytingum}} eytt",
        "undeletehistory": "Ef þú endurvekur síðuna verða allar útgáfur færðar í breytingarsögu.\nEf ný síða með sama nafni hefur verið stofnuð síðan henni var eytt, verða breytingar síðunnar færðar síðast í breytingarskránna.",
        "undeleterevdel": "Endurvakning síðu verður ekki framkvæmd ef það leiðir til þess að haus síðunnar eða breytingarsaga hennar verði að hluta til eydd.\nÍ slíkum málum, þarft þú að afhaka við eða affela nýjustu eyddu breytinguna.",
        "undeletehistorynoadmin": "Þessari síðu hefur verið eytt. Ástæðan sést í ágripinu fyrir neðan, ásamt upplýsingum um hvaða notendur breyttu síðunni fyrir eyðingu.\nInnihald greinarinnar er einungis aðgengilegt möppudýrum.",
        "contributions": "Framlög {{GENDER:$1|notanda}}",
        "contributions-title": "Framlög notanda $1",
        "mycontris": "Framlög",
+       "anoncontribs": "Framlög",
        "contribsub2": "Eftir {{GENDER:$3|$1}} ($2)",
        "nocontribs": "Engar breytingar fundnar sem passa við þessa viðmiðun.",
        "uctop": "(núverandi)",
        "move-page-legend": "Færa síðu",
        "movepagetext": "Hér er hægt að endurnefna síðu. Hún færist, ásamt breytingaskránni, yfir á nýtt heiti og eldra heitið myndar tilvísun á það. Þú getur sjálfkrafa uppfært tilvísanir á nýja heitið. Ef þú vilt það síður, athugaðu þá hvort nokkuð myndist [[Special:DoubleRedirects|tvöfaldar]] eða [[Special:BrokenRedirects|brotnar tilvísanir]].\nÞú berð ábyrgð á því að tenglar vísi á rétta staði.\n\nAthugaðu að síðan mun '''ekki''' færast ef þegar er síða á nafninu sem þú hyggst færa hana á, nema sú síða sé tóm eða tilvísun sem vísar á síðuna sem þú ætlar að færa. Þú getur þar með fært síðuna aftur til baka án þess að missa breytingarsöguna, en ekki fært hana yfir venjulega síðu.\n\n'''Varúð:'''\nAthugaðu að þessi aðgerð getur kallað fram viðbrögð annarra notenda og getur þýtt mjög rótækar breytingar á vinsælum síðum.",
        "movepagetext-noredirectfixer": "Með þessu eyðublaði er hægt að endurnefna síðu og færa alla breytingarskrá hennar á nýja nafnið. Gamli titillinn verður að tilvísun á nýja titilinn. \nAthugaðu hvort síðan tengist [[Special:DoubleRedirects|tvöfaldri]]- eða [[Special:BrokenRedirects|brotinni]] tilvísun.\nÞú berð ábyrgð á því að tenglarnir haldi áfram að tengjast á réttan stað.\n\nAthugaðu að síðan verður '''ekki''' færð ef síða er þegar til á nýja titlinum, nema hann sé annaðhvort tómur, tilvísun eða hafi enga breytingarskrá.\nÞetta merkir að þú getur fært síðu aftur til baka á þann stað sem hún var færð frá ef þú gerir mistök og þú getur ekki skrifað yfir síðu sem er þegar til.\n\n'''Varúð:'''\nEf síðan er vinsæl þá getur þessi aðgerð kallað fram viðbrögð annara notenda og getur þýtt mjög rótækar breytingar á öðrum síðum. Vertu viss um að þú skiljir hættuna áður en þú heldur áfram.",
-       "movepagetalktext": "Spallsíða síðunnar verður sjálfkrafa færð með ef hún er til nema:\n* Þú sért að færa síðuna á milli nafnrýma\n* Spallsíða sé þegar til undir nýja nafninu\n* Þú veljir að færa hana ekki\nÍ þeim tilfellum verður að færa hana handvirkt.",
+       "movepagetalktext": "Ef þú hakar við þennan reit mun viðeigandi spjallsíða vera færð sjálfkrafa á nýja titilinn, nema að spjallsíða sem er ekki tóm sé þegar til staðar.\n\nÍ því tilfelli þarft þú að færa eða sameina síðuna handvirkt ef þess er óskað.",
        "moveuserpage-warning": "'''Viðvörun:''' Þú ert í þann mund að færa notendasíðu. Athugaðu aðeins síðan verður færð og notendanafni hans verður '''ekki''' breytt.",
        "movenologintext": "Þú verður að vera [[Special:UserLogin|innskráð(ur)]] til að geta fært síður.",
        "movenotallowed": "Þú hefur ekki leyfi til að færa síður.",
        "movenotallowedfile": "Þú hefur ekki leyfi til að færa skrár.",
        "cant-move-user-page": "Þú hefur ekki leyfi til að færa notandasíðu (fyrir utan undirsíður).",
        "cant-move-to-user-page": "Þú hefur ekki leyfi til að færa síðu á notandasíðu (að frátöldum undirsíðum notanda).",
-       "newtitle": "Á nýja titilinn:",
+       "newtitle": "Nýr titill:",
        "move-watch": "Vakta þessa síðu",
        "movepagebtn": "Færa síðu",
        "pagemovedsub": "Færsla tókst",
index 9d213b0..d837fba 100644 (file)
        "upload-form-label-select-file": "Seleziona file",
        "upload-form-label-infoform-title": "Dettagli",
        "upload-form-label-infoform-name": "Nome",
+       "upload-form-label-infoform-name-tooltip": "Un titolo breve e distintivo per il file, che verrà utilizzato come suo nome. Puoi usare un linguaggio semplice con spazi. Non includere l'estensione del file.",
        "upload-form-label-infoform-description": "Descrizione",
+       "upload-form-label-infoform-description-tooltip": "Descrivi sinteticamente tutto quanto sia degno di nota a proposito di quest'opera.\nPer le foto, indica le cose principali che vi sono rappresentate, l'occasione e/o il luogo in cui sono state scattate.",
        "upload-form-label-usage-title": "Utilizzo",
        "upload-form-label-usage-filename": "Nome del file",
        "foreign-structured-upload-form-label-own-work": "Questo è un mio lavoro",
        "export-download": "Richiedi il salvataggio come file",
        "export-templates": "Includi i template",
        "export-pagelinks": "Includi pagine correlate ad una profondità di:",
+       "export-manual": "Aggiungi pagine manualmente:",
        "allmessages": "Messaggi di sistema",
        "allmessagesname": "Nome",
        "allmessagesdefault": "Testo predefinito",
        "expand_templates_preview": "Anteprima",
        "expand_templates_preview_fail_html": "<em>Dato che {{SITENAME}} ha dell'HTML grezzo attivato e c'è stata una perdita dei dati della sessione, l'anteprima è nascosta per precauzione contro gli attacchi a JavaScript.</em>\n\n<strong>Se si tratta di un normale tentativo d'anteprima, riprova.</strong> \nSe comunque non dovesse funzionare, prova ad [[Special:UserLogout|uscire]] ed a rientrare.",
        "expand_templates_preview_fail_html_anon": "<em>Poiché {{SITENAME}} ha dell'HTML grezzo attivato e non hai effettuato l'accesso, l'anteprima è nascosta come precauzione contro gli attacchi JavaScript.</em>\n\n<strong>Se si tratta di un normale tentativo d'anteprima, [[Special:UserLogin|entra]] e riprova.</strong>",
+       "expand_templates_input_missing": "Devi inserire del testo come input.",
        "pagelanguage": "Seleziona lingua della pagina",
        "pagelang-name": "Pagina",
        "pagelang-language": "Lingua",
        "mediastatistics": "Statistiche relative ai file multimediali",
        "mediastatistics-summary": "Statistiche sui tipi di file caricati. Sono incluse solo la versione più recente di un file. Versioni vecchie o cancellate dei file sono escluse.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Dimensione totale dei file per questa sezione: $1 byte.",
-       "mediastatistics-allbytes": "Dimensione totale di tutti i file: $1 byte.",
+       "mediastatistics-bytespertype": "Dimensione totale dei file per questa sezione: {{PLURAL:$1|$1 byte}} ($2; $3%).",
+       "mediastatistics-allbytes": "Dimensione totale di tutti i file: {{PLURAL:$1|$1 byte}} ($2).",
        "mediastatistics-table-mimetype": "Tipo MIME",
        "mediastatistics-table-extensions": "Possibili estensioni",
        "mediastatistics-table-count": "Numero di file",
index 81bfe5f..94700cc 100644 (file)
        "upload-form-label-select-file": "ファイル選択",
        "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-usage-filename": "ファイル名",
        "foreign-structured-upload-form-label-own-work": "これはあなた自身による作業です",
        "foreign-structured-upload-form-label-not-own-work-local-default": "このファイルはその方針の下でそこにアップロードすることができれば、また、 [[Special:Upload|the upload page on {{SITENAME}}]]を使用してみてください",
        "foreign-structured-upload-form-label-own-work-message-shared": "私は、このファイルの著作権を所有していることを宣誓し、取消し不能な形で  [https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0] ライセンスのもとでウィキメディア・コモンズに、このファイルを解放することに同意します。そして私は、  [https://wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] に同意します。",
        "foreign-structured-upload-form-label-not-own-work-message-shared": "このファイルの著作権を所有していない場合、または別のライセンスの下でそれをリリースしたい場合には、 [https://commons.wikimedia.org/wiki/Special:UploadWizard Commons Upload Wizard] を使用することを検討してください。",
-       "foreign-structured-upload-form-label-not-own-work-local-shared": "ã\82\82ã\81\97ã\82µã\82¤ã\83\88ã\81\8cã\80\81ã\81\9dã\82\8cã\82\89ã\81®æ\96¹é\87\9dã\81®ä¸\8bã\81§ã\80\81ã\81\93ã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\81®ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\82\92許å\8f¯ã\81\99ã\82\8bå ´å\90\88ã\81¯ã\80\81You may also want to try using [[Special:Upload|{{SITENAME}}ä¸\8aã\81§ã\81®ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\83\9aã\83¼ã\82¸]]ã\82\92使ç\94¨ã\81\99ã\82\8bã\81\93ã\81¨ã\82\82試ã\81\97ã\81¦ã\81\8fã\81 ã\81\95ã\81\84。",
+       "foreign-structured-upload-form-label-not-own-work-local-shared": "ã\82\82ã\81\97ã\82µã\82¤ã\83\88ã\81\8cã\80\81ã\81\9dã\82\8cã\82\89ã\81®æ\96¹é\87\9dã\81®ä¸\8bã\81«ã\81¦ã\80\81ã\81\93ã\81®ã\83\95ã\82¡ã\82¤ã\83«ã\81®ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\82\92許å\8f¯ã\81\97ã\81¦ã\81\84ã\82\8bå ´å\90\88ã\81¯ã\80\81[[Special:Upload|{{SITENAME}}ä¸\8aã\81§ã\81®ã\82¢ã\83\83ã\83\97ã\83­ã\83¼ã\83\89ã\83\9aã\83¼ã\82¸]]ã\81®å\88©ç\94¨ã\82\82æ¤\9cè¨\8eã\81§ã\81\8dã\81¾ã\81\99。",
        "foreign-structured-upload-form-3-label-yes": "はい",
        "foreign-structured-upload-form-3-label-no": "いいえ",
        "backend-fail-stream": "ファイル $1 をストリームできませんでした。",
        "expand_templates_preview": "プレビュー",
        "expand_templates_preview_fail_html": "<em>{{SITENAME}} ではHTMLソースが有効になっており、セッションデータの損失が生じているので、JavaScript の攻撃に対する予防措置としてプレビューは表示されません。</em>\n\n<strong>これが合法的なプレビューの試みである場合には、もう一度試してください。</strong>\nそれでも動作しない場合は、[[Special:UserLogout|ログアウト]]して再度ログインしてみてください。",
        "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}} ではHTMLソースが有効になっており、ログインしていないため、JavaScript の攻撃に対する予防措置としてプレビューは表示されません。</em>\n\n<strong>これが合法的なプレビューの試みである場合には、[[Special:UserLogin|ログイン]]してもう一度試してください。</strong>",
+       "expand_templates_input_missing": "文章を入力してください。",
        "pagelanguage": "ページ言語選択",
        "pagelang-name": "ページ",
        "pagelang-language": "言語",
        "mediastatistics": "メディア統計",
        "mediastatistics-summary": "アップロードされたファイルの種類に関する統計です。これはファイルの最新バージョンのみを含みます。以前のまたは削除されたバージョンについては除外されています。",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 バイト}} ($2; $3%)",
-       "mediastatistics-bytespertype": "このセクションの総ファイルサイズは $1 バイトです。",
-       "mediastatistics-allbytes": "全ファイルの総ファイルサイズは $1 バイトです。",
+       "mediastatistics-bytespertype": "このセクションの総ファイルサイズは {{PLURAL:$1|$1 バイト}} ($2、$3%) です。",
+       "mediastatistics-allbytes": "全ファイルの総ファイルサイズは {{PLURAL:$1|$1 バイト}} ($2) です。",
        "mediastatistics-table-mimetype": "MIMEタイプ",
        "mediastatistics-table-extensions": "取りうる拡張子",
        "mediastatistics-table-count": "ファイル数",
index 5571ae5..fbab2fc 100644 (file)
        "cachedspecial-viewing-cached-ts": "თქვენ ნახულობთ ამ გვერდის ქეშირებულ ვერსიას, რომელიც შესაძლოა მნიშვნელოვნად განსხვავდებოდეს მიმდინარე ვერსისაგან.",
        "cachedspecial-refresh-now": "ბოლო ვერსიის ხილვა.",
        "categories": "კატეგორიები",
+       "categories-submit": "ჩვენება",
        "categoriespagetext": "შემდეგი {{PLURAL:$1|კატეგორია შეიცავს|კატეგორია შეიცავს}} გვერდს ან მედიას.\n[[Special:UnusedCategories|გამოუყენებელი კატეგორიები]] აქ ნაჩვენები არ არის.\nიხ. ასევე [[Special:WantedCategories|მოთხოვნილი კატეგორიები]].",
        "categoriesfrom": "აჩვენეთ კატეგორიები, რომლებიც იწყება:",
        "special-categories-sort-count": "დაალაგეთ რაოდენობის მიხედვით",
        "delete-confirm": "„$1“-ის წაშლა",
        "delete-legend": "წაშლა",
        "historywarning": "'''ყურადღება:''' გვერდს, რომლის წაშლასაც აპირებთ, აქვს დიდი ისტორია: ($1)",
+       "historyaction-submit": "ჩვენება",
        "confirmdeletetext": "თქვენ მოითხოვეთ გვერდისა (ან ფაილისა) და მონაცემთა ბაზიდან მისი ისტორიის წაშლა.\nგთხოვთ დაადასტუროთ, რომ მართლაც აპირებთ ამის გაკეთებას და გესმით თქვენი ქმედებების ფასი.\nასევე გადაამოწმეთ, თუ ასრულებთ ამას [[{{MediaWiki:Policy-url}}|წესებიდან გამომდინარე]].",
        "actioncomplete": "მოქმედება შესრულებულია",
        "actionfailed": "მოქმედება ვერ განხორციელდა",
index c975e86..cfa3451 100644 (file)
        "session_fail_preview_html": "<strong>Кешіріңіз! Сессия деректері жоғалуы салдарынан өңдемеңізді бітіре алмаймыз.</strong>\n\n<em>Сондықтан {{SITENAME}} жобасында қам HTML қосылған, JavaScript шабуылдардан қорғану үшін алдын ала қарап шығу жасырылған.</em>\n\n<strong>Егер бұл өңдеме адал ниетті әрекет болса қайта байқап көріңіз.</strong> \nЕгер бұл әлі істемесе [[Special:UserLogout|шығуды]] және қайта кіруді байқап көріңіз.",
        "token_suffix_mismatch": "<strong>Өңдемеңіз тайдырылды, себебі тұтынғышыңыз өңдеме деректер бумасындағы тыныс белгілерін бүлдіртті.\nБет мәтіні бүлінбеу үшін өңдемеңіз тайдырылады.</strong>\nБұл кей уақытта қатесі толған веб-негізінде тіркелуі жоқ прокси-серверді пайдаланған болуы мүмкін.",
        "edit_form_incomplete": "<strong>Өңдеу пішінінің кейбір бөліктері серверге жетпеді; өңдемелеріңіздің бұзылмағандығына екі рет бақылау жүргізіңіз және қайта байқап көріңіз.</strong>",
-       "editing": "$1 бетін өңдеп жатырсыз",
+       "editing": "Өңдеп жатырсыз: $1",
        "creating": "Жаңадан бастау: $1",
-       "editingsection": "$1 бетінің бөлімін өңдеп жатырсыз",
-       "editingcomment": "$1 бетін өңдеп жатырсыз (жаңа бөлім)",
+       "editingsection": "Өңдеп жатырсыз: $1 бетінің бөлімі",
+       "editingcomment": "Өңдеп жатырсыз: $1 (жаңа бөлім)",
        "editconflict": "Өңдемелер қақтығысы: $1",
        "explainconflict": "Осы бетті сіз өңдей бастағанда басқа біреу бетті өзгерткен.\nЖоғарғы мәтін аумағында қазіргі уақытта бар бет мәтінінен тұрады.\nТөменгі мәтін аумағында сіздің өзгертулеріңіз көрсетіледі.\nӨзгертуіңізді бар мәтінге біріктіруге тура келеді.\n«{{int:savearticle}}» батырмасын басқанда </strong>тек</strong> жоғарғы мәтін аумағы сақталады.",
        "yourtext": "Мәтініңіз",
        "listusers-editsonly": "Тек қатысушы өңдемелерін көрсету",
        "listusers-creationsort": "Басталған уақытына қарай іріктеу",
        "listusers-desc": "Кемуі бойынша ретке келтіру",
-       "usereditcount": "$1 {{PLURAL:$1|өңдеме|өңдемелер}}",
+       "usereditcount": "$1 {{PLURAL:$1|өңдеме|өңдеме}}",
        "usercreated": "$1 $2-та {{GENDER:$3|басталған}}",
        "newpages": "Ең жаңа беттер",
        "newpages-submit": "Көрсету",
index e99b740..5c7ed50 100644 (file)
        "emailccme": "Scheck mer en Kopie vun dä E-Mail.",
        "emailccsubject": "En Kopie vun Dinger E-Mail aan $1: $2",
        "emailsent": "De <i lang=\"en\">e-mail</i> es ongerwähs",
-       "emailsenttext": "Ding E-Mail es jetz lossjescheck woode.",
+       "emailsenttext": "Ding <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"„de eläktrohnesche Poß“\">e-mail</i> es jäz loßßjeschek woode.",
        "emailuserfooter": "Heh di <i lang=\"en\" xml:lang=\"en\" dir=\"ltr\" title=\"„de eläktrohnesche Poß“\">e-mail</i> hät {{GENDER:$1|dä|et|dä Metmaacher|di Metmaacherėn|dät}} „$1“ an {{GENDER:$2|dä|et|dä Metmaacher|di Metmaacherėn|dät}} „$2“ jescheck, un doför {{GRAMMAR:en dative|{{SITENAME}}}} dat „{{int:emailuser}}“ jebruch.",
        "usermessage-summary": "En Nohreesch vum Wiki afjelivvert.",
        "usermessage-editor": "Name vum Metmaacher för de Täxte un Nohreshte vum Wiki ze beärbeide",
        "thumbnail_error_remote": "Ene Fähler es em $1 opjevalle:\n$2",
        "djvu_page_error": "De DjVu-Sgg es ußerhallef",
        "djvu_no_xml": "De XML-Date för di DjVu-Datei kunnte mer nit afrofe",
-       "thumbnail-temp-create": "Mer kunnte kein Zweschedattei für Minnibeldscher aanlääje.",
+       "thumbnail-temp-create": "Mer kunnte kein Zweschedattei für Minnibeldscher aanlähje.",
        "thumbnail-dest-create": "Mer kunnte kein Minnibeldscher faßhallde, woh se hen sulle.",
        "thumbnail_invalid_params": "Ene Parameter för et Breefmarke-Belldsche (<i lang=\"en\">thumbnail</i>) Maache wohr nit en Odenung",
        "thumbnail_toobigimagearea": "Datteij met mih wi $1",
index 8e6733a..86a2f3e 100644 (file)
        "tog-hideminor": "Celare recensiones minores in indice nuper mutatorum",
        "tog-hidepatrolled": "Redactiones censae inter nuper mutatas celandae",
        "tog-newpageshidepatrolled": "Paginae censae inter nouissime creatas celandae",
-       "tog-extendwatchlist": "Extendere indicem paginarum observatarum ut omnes emendationes monstrentur, non solum emendationes recentissimae",
+       "tog-extendwatchlist": "In indice paginarum observatarum omnes, non solum recentissimas mutationes ostendere",
        "tog-usenewrc": "Indice nuper mutatarum excelsa uti",
        "tog-numberheadings": "Subtituli numeris adornandi",
        "tog-showtoolbar": "Affigere trabem redigentem",
        "tog-editondblclick": "Percussus duplex redactionem hortetur",
        "tog-editsectiononrightclick": "Paginarum segmenta dextero percussu in titulis redigenda",
-       "tog-watchcreations": "Paginas quas creo et fasciculos quos impono in paginarum observatarum indicem addere",
-       "tog-watchdefault": "Paginas et fasciculos quos recenseo in paginarum observatarum indicem addere",
-       "tog-watchmoves": "Paginas et fasciculos quos moveo in paginarum observatarum indicem addere",
+       "tog-watchcreations": "Paginas, quas creavero, et fasciculos, quos imposuero, observare",
+       "tog-watchdefault": "Paginas et fasciculos, quos recensuero, observare",
+       "tog-watchmoves": "Paginas et fasciculos, quos movero, observare",
        "tog-watchdeletion": "Paginas et fasciculos quos deleo in paginarum observatarum indicem addere",
        "tog-minordefault": "Notare omnes recensiones quasi minores",
        "tog-previewontop": "Monstrare praevisum ante capsam recensiti, non post ipsam",
        "tog-previewonfirst": "Praevisum monstrare recensione incipiente",
-       "tog-enotifwatchlistpages": "Mittere mihi litteras electronicas si pagina a me observata vel fasciculus a me observatus mutatur",
-       "tog-enotifusertalkpages": "Mittere mihi litteras electronicas si mea disputatio mutatur",
-       "tog-enotifminoredits": "Mittere mihi litteras electronicas etiam pro recensionibus minoribus",
-       "tog-enotifrevealaddr": "Monstrare inscriptio mea electronica in nuntiis notificantibus",
+       "tog-enotifwatchlistpages": "Mutata vel pagina vel fasciculo observando certior fiam",
+       "tog-enotifusertalkpages": "De mutata disputationis pagina mea certior fiam",
+       "tog-enotifminoredits": "Etiam de minoribus recensionibus certior fiam",
+       "tog-enotifrevealaddr": "Ostendatur inscriptio mea electronica in nuntiis notificantibus",
        "tog-shownumberswatching": "Numerum usorum observantium monstrare",
        "tog-oldsig": "Subscriptio, qua nunc uteris:",
        "tog-fancysig": "Subscriptio vicitext (sine nexu automatico)",
        "tog-uselivepreview": "Praevisum viventem adhibere",
        "tog-forceeditsummary": "Si recensionem non summatim descripsero, me roga si continuare velim",
-       "tog-watchlisthideown": "Celare recensiones meas in paginarum observatarum indice",
-       "tog-watchlisthidebots": "Celare recensiones automatarias in paginarum observatarum indice",
-       "tog-watchlisthideminor": "Celare recensiones minores in paginarum observatarum indice",
-       "tog-watchlisthideliu": "Celare recensiones usorum notorum in paginarum observatarum indice",
-       "tog-watchlisthideanons": "Celare recensiones usorum ignotorum in paginarum observatarum indice",
-       "tog-watchlisthidepatrolled": "Recensiones vigilatae paginas custoditas celare",
-       "tog-ccmeonemails": "Mitte mihi transcriptiones litterarum quas ad alios usores mitto",
+       "tog-watchlisthideown": "Recensiones meas in paginarum observatarum indice supprimere",
+       "tog-watchlisthidebots": "Recensiones per automaton factas in paginarum observatarum indice supprimere",
+       "tog-watchlisthideminor": "Minores recensiones in paginarum observatarum indice supprimere",
+       "tog-watchlisthideliu": "Recensiones ab usoribus notis factas in paginarum observatarum indice supprimere",
+       "tog-watchlistreloadautomatically": "Quamprimum aliquis selectus mutatus erit, indicem paginarum observatarum reficere (JavaScript necesse est)",
+       "tog-watchlisthideanons": "Recensiones ab usoribus ignotis factas in paginarum observatarum indice supprimere",
+       "tog-watchlisthidepatrolled": "Recensiones custoditas supprimere",
+       "tog-ccmeonemails": "Transcriptiones earum, quas ad alios usores misero litteras, mihi ipsi mittantur",
        "tog-diffonly": "Nihil nisi differentiam in pagina factam ostendatur",
        "tog-showhiddencats": "Categorias celatas monstrare",
        "tog-norollbackdiff": "Post reversionem paginae differentia neglegatur",
        "noemail": "Nulla inscriptio electronica invenitur per usorem \"$1\".",
        "mailerror": "Error in litteras electronicas inmittendas: $1",
        "acct_creation_throttle_hit": "His superioribus 24 horis ex isto loco IP iam {{PLURAL:$1|nomen impositum est|$1 nomina imposita sunt}}.\nNon autem licet plura sibi imponere. Igitur hodie ex hoc loco IP cetera nomina tibi non imponi possunt.",
-       "emailauthenticated": "Tua inscriptio electronica recognita est $3, $2.",
+       "emailauthenticated": "Inscriptio tua electronica recognita est $3, $2.",
        "emailconfirmlink": "Inscriptionem tuam electronicam adfirmare",
        "emaildisabled": "Huic paginae litteras electronicas mittere non licet.",
        "accountcreated": "Nomen impositum",
        "last": "prox",
        "page_first": "prim",
        "page_last": "ult",
-       "histlegend": "Selige pro dissimilitudine: indica emendationes in botones radiales et \"intrare\" in claviatura vel \"comparatio\" imprime ut conferas.<br />\nTitulus: '''({{int:cur}})''' = dissimilis ab emendatione novissima,\n'''({{int:last}})''' = dissimilis ab emendatione proxima, '''{{int:minoreditletter}}''' = recensio minor.",
+       "histlegend": "Ad seligendas differentias nota diversarum redactionum bullas et agi iube!<br />\nLegenda: '''({{int:cur}})''' = differentiam monstrabit inter hanc et novissimam redactionem,\n'''({{int:last}})''' = differentiam monstrabit inter hanc et superiorem redactionem,\n'''({{int:minoreditletter}})''' = recensio minor.",
        "history-fieldset-title": "Quaerere in paginae historia",
        "history-show-deleted": "Solum recensiones deletas monstrare",
        "histfirst": "veterrima",
        "revertmerge": "Inconfundere",
        "history-title": "Historia paginae \"$1\"",
        "lineno": "Linea $1:",
-       "compareselectedversions": "Conferre emendationes selectas",
+       "compareselectedversions": "Redactiones selectas conferre",
        "showhideselectedversions": "Monstrare/celare emendationes selectas",
        "editundo": "abrogare",
        "diff-empty": "(eadem)",
        "skin-preview": "Praevisum",
        "datedefault": "Nullum praeferentiae",
        "prefs-user-pages": "Paginae usoris",
-       "prefs-personal": "Minutiae rationis",
+       "prefs-personal": "Proprietates",
        "prefs-rc": "Nuper mutata",
        "prefs-watchlist": "Paginae observatae",
        "prefs-watchlist-days": "Numerus dierum displicandus in paginis tuis observatis:",
        "prefs-watchlist-edits-max": "Numerus maximus: 1000",
        "prefs-misc": "Misc",
        "prefs-resetpass": "Tesseram mutare",
-       "prefs-email": "Optiones inscriptionis electronicae",
+       "prefs-email": "Modi de inscriptione electronica servandi",
        "prefs-rendering": "Conspectus",
        "saveprefs": "Servare praeferentias",
        "prefs-editing": "Mensura capsae verbi",
        "timezoneregion-europe": "Europa",
        "timezoneregion-indian": "Oceanus Indicus",
        "timezoneregion-pacific": "Oceanus Pacificus",
-       "allowemail": "Sinere litteras electronicas inscriptioni electronicae meae mittere",
+       "allowemail": "Aliis usoribus concedere, ut litteras electronicas mittant",
        "prefs-searchoptions": "Quaerere",
        "prefs-namespaces": "Spatia nominalia",
        "default": "praedeterminatum",
        "prefs-emailconfirm-label": "Adfirmatio inscriptionis electronicae:",
        "youremail": "Inscriptio electronica:",
        "username": "Nomen usoris:",
+       "prefs-memberingroups": "{{PLURAL:$1|Categoria, cui|Categoriae, quibus}} $2 attribuitur:",
        "prefs-registration": "Tempus, quo nomen impositum est:",
        "yourrealname": "Nomen verum:",
        "yourlanguage": "Lingua:",
        "yourvariant": "Differentia linguae contentorum:",
        "yournick": "Subscriptio nova:",
-       "prefs-help-signature": "Cum in paginis disputationum scribas, \"<nowiki>~~~~</nowiki>\" conscribe, quod in subscriptionem tuam et indicationem temporis convertetur.",
+       "prefs-help-signature": "Commentationibus ad quanque disputationem factis ne subscribe nisi quater undulam (<nowiki>~</nowiki>) ponens! Quae quatuor undulae (<nowiki>~~~~</nowiki>) automatice in subscriptionem tuam et tempus subscribendi convertentur.",
        "badsig": "Subscriptio cruda non est valida; scrutina affixa HTML.",
        "badsiglength": "Subscriptio tua nimis longa est.\n{{PLURAL:$1|Una littera est|$1 litterae sunt}} longitudo maxima.",
        "yourgender": "Sexus:",
        "gender-unknown": "Indefinitus",
        "gender-male": "masculinus",
        "gender-female": "femininus",
+       "prefs-help-gender": "Liber vel libera es istum delectum habere.\nQuodsi feceris, programma eo utetur ad te rite iuxta genus tuum aut appellandum aut appellandam.\nQuod datum ab omnibus videbitur.",
        "email": "Litterae electronicae",
        "prefs-help-realname": "Nomen verum non necesse est.\nSi vis id dare, opera tua tibi ascribentur.",
-       "prefs-help-email": "Non necesse est inscriptionem electronicam dare. Qua tamen data licebit tibi tesseram novam tribuere, si eius oblitus eris.",
-       "prefs-help-email-others": "Si vis, sinit etiam aliis tecum loqui per tuam paginam usoris vel disputationis, nisi te reveles.",
+       "prefs-help-email": "Non necesse est inscriptionem electronicam dare. Qua tamen data tessera tibi tribui poterit nova, si prioris oblitus eris.",
+       "prefs-help-email-others": "Praeterea, si libeat, aliis concedas tibi nuntia per nexum in pagina vel disputatione tua positum mittere electronicas.\nInscriptio tua electronica usoribus tibi scribentis non erit visibilis.",
        "prefs-help-email-required": "Inscriptio electronica necesse est.",
        "prefs-info": "Generalia",
        "prefs-i18n": "Sermonis delectus",
        "prefs-signature": "Subscriptio",
        "prefs-preview": "Praevisum",
-       "prefs-advancedwatchlist": "Praeferentiae monstrare",
+       "prefs-advancedwatchlist": "Indicis modi speciales",
        "prefs-displayrc": "Praeferentiae vultus",
        "prefs-displaywatchlist": "Praeferentiae vultus",
        "prefs-diffs": "Differentiae",
        "userrights-unchangeable-col": "Greges quos tibi non oportet mutare",
        "group": "Grex:",
        "group-user": "Usores",
-       "group-autoconfirmed": "Usores adfirmati automaticale",
+       "group-autoconfirmed": "Usores automatice confirmati",
        "group-bot": "Automata",
        "group-sysop": "Magistratus",
        "group-bureaucrat": "Grapheocrates",
        "group-suppress": "Censurae",
        "group-all": "(omnes)",
        "group-user-member": "{{GENDER:$1|Usor}}",
-       "group-autoconfirmed-member": "{{GENDER:$1|Usor adfirmatus automaticale}}",
+       "group-autoconfirmed-member": "{{GENDER:$1|Usor automatice confirmatus}}",
        "group-bot-member": "{{GENDER:$1|Automaton}}",
        "group-sysop-member": "{{GENDER:$1|Magistratus}}",
        "group-bureaucrat-member": "{{GENDER:$1|Grapheocrates}}",
        "group-suppress-member": "{{GENDER:$1|Censura}}",
        "grouppage-user": "{{ns:project}}:Usores",
-       "grouppage-autoconfirmed": "{{ns:project}}:Usores adfirmati automaticale",
+       "grouppage-autoconfirmed": "{{ns:project}}:Usores automatice confirmati",
        "grouppage-bot": "{{ns:project}}:Automata",
        "grouppage-sysop": "{{ns:project}}:Magistratus",
        "grouppage-bureaucrat": "{{ns:project}}:Grapheocrates",
        "movethispage": "Movere hanc paginam",
        "notargettitle": "Nullus scopus",
        "notargettext": "Paginam aut usorem non notavisti.",
-       "pager-newer-n": "{{PLURAL:$1|novior 1|noviores $1}}",
-       "pager-older-n": "{{PLURAL:$1|senior 1|seniores $1}}",
+       "pager-newer-n": "{{PLURAL:$1|recentiorem 1|recentiores $1}}",
+       "pager-older-n": "{{PLURAL:$1|superiorem 1|superiores $1}}",
        "suppress": "Censura",
        "booksources": "Librorum fontes",
        "booksources-search-legend": "Fontes impressas quaerere",
        "notvisiblerev": "Emendatio deleta est",
        "watchlist-details": "{{PLURAL:$1|$1 paginam|$1 paginas}} observas.",
        "wlheader-enotif": "Mutationes si quae factae erunt, electronice tibi nuntiabuntur.",
-       "wlheader-showupdated": "Paginae nondum a te inspectae typis <strong>crassioribus</strong> ostenduntur.",
+       "wlheader-showupdated": "Paginae nondum a te inspectae <strong>typis crassioribus</strong> ostenduntur.",
        "wlnote": "{{PLURAL:$1|Indicatur mutatio novissima|Indicantur '''$1''' mutationes novissimae}} abhinc {{PLURAL:$2|superiorem horam|superiores '''$2''' horas}} (ab $3, $4) factae.",
        "wlshowlast": "Monstrare proximas $1 horas $2 dies",
        "watchlistall2": "omnes",
        "contributions-title": "Conlationes usoris $1",
        "mycontris": "Conlationes",
        "anoncontribs": "Conlationes",
-       "contribsub2": "Pro $1 ($2)",
+       "contribsub2": "factae ab usore \"$1\" ($2)",
        "nocontribs": "Nullae mutationes inventae sunt ex his indiciis.",
        "uctop": "(vertex)",
        "month": "Ab mense (et prior):",
        "tooltip-save": "Servare mutationes tuas",
        "tooltip-preview": "Praevidere mutationes tuas, quaesumus hoc utere antequam servas!",
        "tooltip-diff": "Monstrare mutationes textui tuas",
-       "tooltip-compareselectedversions": "Inspicere, quantum contenta inter versiones selectas distent",
+       "tooltip-compareselectedversions": "Inspicere, quatenus contenta redactionum selectarum inter se distent",
        "tooltip-watch": "Addere hanc paginam tuis paginis observatis",
        "tooltip-recreate": "Recreare hanc paginam etiamsi deleta est",
        "tooltip-upload": "Incipere imponere",
index 0eaae57..c1be4f0 100644 (file)
        "mypreferencesprotected": "Dir hutt net d'Recht fir Är Astellungen z'änneren.",
        "ns-specialprotected": "Spezialsäite kënnen net verännert ginn.",
        "titleprotected": "Eng Säit mat dësem Numm kann net ugeluecht ginn. Dës Spär gouf vum [[User:$1|$1]] gemaach deen als Grond ''$2'' uginn huet.",
-       "filereadonlyerror": "De Fichier \"$1\" konnt net geännert ginn well de Repertoire vun de Fichieren \"$2\" nëmme geliest däerf ginn.\n\nDeAdministrateur den d'Schreiwe gespaart huet, huet dës Erklärung uginn: \"$3\"",
+       "filereadonlyerror": "De Fichier \"$1\" konnt net geännert ginn well de Repertoire vun de Fichieren \"$2\" nëmme geliest däerf ginn.\n\nDe System-Administrateur den d'Schreiwe gespaart huet, huet dës Erklärung uginn: \"$3\"",
        "invalidtitle-knownnamespace": "Net valabelen Titel mam Nummraum \"$2\" a mam Text \"$3\"",
        "invalidtitle-unknownnamespace": "Net valabelen Titel mat der onbekannter Nummraum-Zuel $1 a mam Text \"$2\"",
        "exception-nologin": "Net ageloggt",
        "foreign-structured-upload-form-label-own-work": "Dëst ass mäin eegent Wierk",
        "foreign-structured-upload-form-label-infoform-categories": "Kategorien",
        "foreign-structured-upload-form-label-infoform-date": "Datum",
+       "foreign-structured-upload-form-3-label-question-website": "Hutt Dir dëst Bild vun engem Internetsite erofgelueden, oder beim Sichen no engem Bild fonnt?",
+       "foreign-structured-upload-form-3-label-question-ownwork": "Hutt Dir dëst Bild (Foto, Zeechnung, asw.) selwer gemaacht?",
        "foreign-structured-upload-form-3-label-yes": "Jo",
        "foreign-structured-upload-form-3-label-no": "Neen",
        "backend-fail-stream": "De Fichier $1 konnt net iwwerdroe ginn.",
        "export-download": "Als XML-Datei späicheren",
        "export-templates": "Inklusiv Schablounen",
        "export-pagelinks": "Verlinkte Säiten mat exportéieren, bis zu enger Déift vun:",
+       "export-manual": "Säite manuell derbäisetzen:",
        "allmessages": "All Systemmessagen",
        "allmessagesname": "Numm",
        "allmessagesdefault": "Standardtext",
        "mediastatistics": "Statistike vun de Medien",
        "mediastatistics-summary": "Statistike vun den Type vun den eropgeluedene Fichieren. Dobäi gëtt nëmmen déi lescht Versioun vun engem Fichier gezielt, al oder geläscht Versioune vu Fichiere sinn ausgeschloss.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 Byte|$1 Byten}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Gesamtgréisst vun de Fichiere vun dësem Abschnitt: $1",
+       "mediastatistics-bytespertype": "Gesamtgréisst vun de Fichiere vun dësem Abschnitt:  {{PLURAL:$1|$1 Byte|$1 Bytes}} ($2; $3%).",
        "mediastatistics-table-mimetype": "MIME-Typ",
        "mediastatistics-table-extensions": "Méiglech Erweiderungen",
        "mediastatistics-table-count": "Zuel vun de Fichieren",
index b454bb8..bc25dfc 100644 (file)
        "undelete_short": "احیای {{PLURAL:$1|یإ دةسکاری|$1 دةسکاری}}",
        "viewdeleted_short": "نمایش {{PLURAL:$1|یک ویرایش حذف‌شده|$1 ویرایش حذف‌شده}}",
        "protect": "پروژۀ",
-       "protect_change": "تغییر/آلِشت",
+       "protect_change": "گؤەڕانن/تغییر",
        "protectthispage": "محافظت إژ ئئ وةڵگة",
-       "unprotect": "تغییر محافظت",
+       "unprotect": "گؤەڕانن/تغییر محافظت",
        "unprotectthispage": "تغییر محافظت ئئ وةڵگة",
        "newpage": "وةڵگة  تازۀ",
        "talkpage": "گةپ دةربارة ئئ وةڵگة",
        "nstab-main": "وةڵگة/پەڕە",
        "nstab-user": "وۀلگۀ کاربۀر",
        "nstab-media": "وةڵگة رسانه",
-       "nstab-special": "Ù\88Û\80Ù\84Ú¯Û\80/Ù¾Û\80رÛ\80 Ù\88Û\8cÚ\98Û\80",
+       "nstab-special": "Ù\88Û\95ÚµÚ¯Û\95(Ù¾Û\95Ú\95Û\95\88Û\8cÚ\98Û\95",
        "nstab-project": "وۀلگۀ پروژۀ",
        "nstab-image": "فایل",
        "nstab-mediawiki": "پیغام",
        "nav-login-createaccount": " إ نؤم هةتن سیستم/ حساوو کاربةری سازین",
        "userlogin": " إ نؤم هةتن سیستم/ حساوو کاربةری سازین",
        "userloginnocreate": "نؤم هۀتن سیستم",
-       "logout": "دةرچئن/خروج",
-       "userlogout": "دةرچئن/خروج",
+       "logout": "دەرچێن|خروج",
+       "userlogout": "دەرچێن|خروج",
        "notloggedin": "وارد سیستم نؤینۀ",
        "userlogin-noaccount": "حساوو کاربۀری نرین؟",
        "userlogin-joinproject": "{{SITENAME}}نام نؤیسی کۀن",
        "pt-login": "نؤم هۀتن.",
        "pt-login-button": "نؤم هۀتن سیستم",
        "pt-createaccount": "حساووئ أرا ووژتان بِسازِن",
-       "pt-userlogout": "دةرچئن/خروج",
+       "pt-userlogout": "دەرچێن|خروج",
        "php-mail-error-unknown": "خطای ناشناخته در تابع  mail()‎ پی‌اچ‌پی",
        "user-mail-no-addy": "تلاش برای ارسال ایمیل بدون آدرس ایمیل.",
        "user-mail-no-body": "سعی کردید ایمیلی با محتوای بی‌دلیل کوتاه و یا خالی بفرستید.",
        "changepassword": "تغییردائن رمز",
        "resetpass_announce": "شما باید برای پایان ورود به سامانه، گذرواژهٔ جدیدی را تنظیم کنید.",
-       "resetpass_header": "تغییر گذرواژهٔ حساب کاربری",
+       "resetpass_header": "گؤەڕانن/تغییر رمز حساب کاربری",
        "oldpassword": "گذرواژهٔ پیشین:",
        "newpassword": "گذرواژهٔ تازه:",
        "retypenew": "گذرواژهٔ تازه را دوباره وارد کنید",
        "changeemail-newemail-help": "برای حذف ایمیل باید این بخش را خالی رها کنید در نتیجه امکان بازگردانی گذرواژه و دریافت ایمیل از ویکی برای شما مقدور نخواهد بود.",
        "changeemail-none": "(هؤیچ کام)",
        "changeemail-password": "گذرواژهٔ {{SITENAME}} هؤمة:",
-       "changeemail-submit": "تغییر ایمیل",
+       "changeemail-submit": "گؤەڕانن/تغییر ایمیل",
        "changeemail-throttled": "شما به مراتب برای ورود تلاش کرده‌اید.\nلطفاً پیش از آنکه دوباره تلاش کنید $1 صبر کنید.",
        "changeemail-nochange": "لطفاً رایانامهٔ جدید و متفاوتی وارد کنید.",
        "resettokens": "بازنشانی شناساننده‌ها",
        "revdelete-hide-comment": "خلاصة دةسکاری",
        "revdelete-hide-user": "نام کاربری/نشانی آی‌پی",
        "revdelete-hide-restricted": "فرونشانی اطلاعات برای مدیران به همراه دیگران",
-       "revdelete-radio-same": "(بدون تغییر)",
+       "revdelete-radio-same": "(بدون گؤەڕانن/تغییر )",
        "revdelete-radio-set": "آشاریا/پنهان",
        "revdelete-radio-unset": "دیارۀ-نمایان",
        "revdelete-suppress": "از دسترسی مدیران به داده نیز مانند سایر کاربران جلوگیری به عمل آید.",
        "revdelete-failure": "'''پیدایی ورژن ها قابل به روز کردن نیست:'''\n$1",
        "logdelete-success": "تغییر پیدایی مورد با موفقیت انجام شد.",
        "logdelete-failure": "'''پیدایی سیاهه‌ها قابل تنظیم نیست:'''\n$1",
-       "revdel-restore": "تغییر پیدایی",
+       "revdel-restore": "گؤەڕانن/تغییر پیدایی",
        "pagehist": "تاریخ وةڵگة",
        "deletedhist": "تاریخچهٔ پاک شده",
        "revdelete-hide-current": "خطا در پنهان کردن مورد مورخ $2 ساعت $1: این نسخه، ورژن اخیر است و قابل پنهان کردن نیست.",
        "sessionfailure-title": "خطای نشست کاربری",
        "sessionfailure": "به نظر می‌رسد مشکلی در مورد نشست کاربری شما وجود دارد؛\nعمل درخواست شده در اقدامی پیشگیرانه در برابر ربوده‌شدن اطلاعات نشست کاربری، لغو شد.\nلطفاً دکمهٔ «بازگشت» را در مرورگر خود بفشارید و صفحه‌ای که از آن به اینجا رسیده‌اید را دوباره فراخوانی کنید، سپس مجدداً سعی کنید.",
        "changecontentmodel": "ویرایش نمونه محتوای یک صفحه",
-       "changecontentmodel-legend": "تغییر نوع محتوی",
+       "changecontentmodel-legend": "گؤەڕانن/تغییر نوع محتوی",
        "changecontentmodel-title-label": "عنوان وةڵگة",
        "changecontentmodel-model-label": "نمونه محتوای جدید",
        "changecontentmodel-reason-label": ":دةلیل",
-       "changecontentmodel-success-title": "نمونه محتوی تغییر یافت",
+       "changecontentmodel-success-title": "نمونه محتوی گؤەڕیا/تغییر یافت",
        "changecontentmodel-success-text": "نوع محتوی [[:$1]]  تغییر یافت",
        "changecontentmodel-cannot-convert": "محتوی در [[:$1]] نمی‌تواند به گونه‌ای از $2 تبدیل شود.",
        "changecontentmodel-nodirectediting": "نمونه محتوی $1 امکان ویرایش مستقیم را پشتیبانی نمی‌کند",
        "modifiedarticleprotection": "وضعیت محافظت «[[$1]]» را تغییر داد",
        "unprotectedarticle": "صفحهٔ «[[$1]]» را از محافظت بیرون آورد",
        "movedarticleprotection": "تنظیمات محافظت را از «[[$2]]» به «[[$1]]» منتقل کرد",
-       "protect-title": "تغییر وضعیت محافظت «$1»",
+       "protect-title": "گؤەڕانن/تغییر وضعیت محافظت «$1»",
        "protect-title-notallowed": "مشاهده سطح حفاظت  \" $1 \"",
        "prot_1movedto2": "[[$1]] به [[$2]] منتقل بی",
        "protect-badnamespace-title": "فضای نام بدون محافظت",
        "allmessagesnotsupportedDB": "این صفحه نمی‌تواند استفاده شود به این دلیل که <bdi>'''$wgUseDatabaseMessages'''</bdi> غیرفعال شده‌است.",
        "allmessages-filter-legend": "پالانۀل/فیلترۀل",
        "allmessages-filter": "پالودن بر اساس وضعیت شخصی‌سازی:",
-       "allmessages-filter-unmodified": "تغییر نیافته",
+       "allmessages-filter-unmodified": "نگؤەڕیائە/تغییرنیافته",
        "allmessages-filter-all": "کۆل",
-       "allmessages-filter-modified": "تغییر یافته",
+       "allmessages-filter-modified": "گؤەڕیائە/تغییریافته",
        "allmessages-prefix": "پالودن بر اساس پسوند:",
        "allmessages-language": ":زوون",
        "allmessages-filter-submit": "بِچۆ",
-       "allmessages-filter-translate": "Ú\86اÙ\88Ù\88اشÛ\80گر زوون",
+       "allmessages-filter-translate": "Ú\86اÙ\88Ù\88اشÛ\95Ú©Ù\90ردÙ\86 زوون",
        "thumbnail-more": "کۀلنگ کِردن",
        "filemissing": "پرونده وجود ندارد",
        "thumbnail_error": "خطا در ایجاد بندانگشتی: $1",
        "tooltip-pt-mycontris": "فهرست مشارکت‌های شما",
        "tooltip-pt-anoncontribs": "لیست دةسکاریةل دؤرس بی/سازریا إژ ئئ آدرس ای پی",
        "tooltip-pt-login": "توصیه مۀکیم بونإ نام سامانه ، هۀرچۀند اجباری نیۀ",
-       "tooltip-pt-logout": "دةرچئن/خروج",
+       "tooltip-pt-logout": "دەرچێن|خروج",
        "tooltip-pt-createaccount": "مکئس تانۀ مۀکیم حساووئ بسازن و بونإ سامانۀ؛ هرچۀند حساوو کاربری سازین دل .بخوایۀ",
        "tooltip-ca-talk": "گۀپ/قسۀ دۀربارۀ بنچۀک/محتوا وۀلگۀ",
        "tooltip-ca-edit": "ئئ وۀلگۀ دۀسکاری کۀن",
        "tooltip-ca-viewsource": ".ئئ وۀلگۀ محافظۀت بیۀ\nمۀتؤنین  متن مبدأ/بنچۀک بؤینین",
        "tooltip-ca-history": "ورژن دؤمائن/پئش ئئ وۀلگۀ",
        "tooltip-ca-protect": "محافظت إژ ئئ وةڵگة",
-       "tooltip-ca-unprotect": "تغییر محافظت ئئ وةڵگة",
+       "tooltip-ca-unprotect": "گؤەڕانن/تغییر محافظت ئئ وةڵگة",
        "tooltip-ca-delete": "حةذف ئئ وةڵگة",
        "tooltip-ca-undelete": "بازگرداندن نسخه‌های صفحهٔ حذف‌شده",
        "tooltip-ca-move": "جاوواز کردن ئئ وۀلگۀ",
        "pageinfo-hidden-categories": "{{PLURAL:$1| ردهٔ|ردهٔ}} پنهان ( $1 )",
        "pageinfo-templates": "{{PLURAL:$1|الگو|الگوها}} استفاده‌شده ($1)",
        "pageinfo-transclusions": "{{PLURAL:$1|صفحهٔ|صفحه‌های}} تراگنجانش‌شده در ($1)",
-       "pageinfo-toolboxlink": "اطÙ\84اعات Ù\88Û\80Ù\84Ú¯Û\80/Ù¾Û\80رÛ\80",
+       "pageinfo-toolboxlink": "اطÙ\84اعات Ù\88Û\95ÚµÚ¯Û\95(Ù¾Û\95Ú\95Û\95)",
        "pageinfo-redirectsto": "تغییرمسیر به",
        "pageinfo-redirectsto-info": "زانستةنیةل",
        "pageinfo-contentpage": "شمرده شده به عنوان صفحهٔ محتوایی",
        "exif-serialnumber": "شماره سریال دوربین",
        "exif-cameraownername": "صاحب دوربین",
        "exif-label": "برچسب",
-       "exif-datetimemetadata": "تاریخ آخرین تغییر فراداده",
+       "exif-datetimemetadata": "تاریخ آخرین گؤەڕانن/تغییر فراداده",
        "exif-nickname": "نام غیررسمی تصویر",
        "exif-rating": "امتیاز (از 5)",
        "exif-rightscertificate": "گواهینامه مدیریت حقوق",
        "blankpage": "وةڵگة خالی",
        "intentionallyblankpage": "این وةڵگة به طور عمدی خالی گذاشته شده است.",
        "external_image_whitelist": " #این سطر را همان‌گونه که هست رها کنید<pre>\n#عبارت‌های باقاعده (regex) را در زیر قرار دهید (فقط بخشی که بین // قرار می‌گیرد)\n#آن‌ها با نشانی اینترنتی تصاویر خارجی پیوند داده شده تطبیق داده می‌شوند\n#مواردی که مطابق باشند به صورت تصویر نمایش می‌یابند، و در غیر این صورت تنها یک پیوند به تصویر نمایش می‌یابد\n#سطرهایی که با # آغاز شوند به عنوان توضیحات در نظر گرفته می‌شوند\n#این سطرها به کوچکی و بزرگی حروف حساس هستند\n\n#عبارت‌های باقاعده (regex)  را زیر این سطر قرار دهید. این سطر را همان‌گونه که هست رها کنید</pre>",
-       "tags": "برچسب‌های تغییر مجاز",
+       "tags": "برچسب‌های گؤەڕانن/تغییر مجاز",
        "tag-filter": ":فیلتر کۀ[[Special:Tags|برچسب‌ۀل]]",
        "tag-filter-submit": "پالانۀل/فیلترۀل",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|بۀرچۀسب|بۀرچۀسبۀل}}]]:$2)",
        "pagelang-use-default": "استفاده إژ زوون پئش فرض",
        "pagelang-select-lang": "زوون انتخاب کۀ",
        "pagelang-submit": "تائید کردن",
-       "right-pagelang": "تغییر وةڵگة زوون",
-       "action-pagelang": "تغییر زوون وةڵگة",
+       "right-pagelang": "گؤەڕانن/تغییر وةڵگة زوون",
+       "action-pagelang": "گؤەڕانن/تغییر زوون وةڵگة",
        "log-name-pagelang": "تغییر سیاههٔ زبان",
        "log-description-pagelang": "ای پهرستنومه در بلگه زونا آلشت گرته.",
        "logentry-pagelang-pagelang": "$1 {{GENDER:$2| تغییریافت}} زبان صفحه برای  $3  از  $4  به  $5 .",
        "special-characters-title-minus": "علامت منفی",
        "mw-widgets-dateinput-no-date": "هیچ داده‌ای انتخاب نشده",
        "mw-widgets-titleinput-description-new-page": "ئئ وةڵگة هنوز/حالی وجود نِئرێ",
-       "mw-widgets-titleinput-description-redirect": "تغییر مسیر به $1",
+       "mw-widgets-titleinput-description-redirect": "گؤەڕانن/تغییر مسیر به $1",
        "api-error-blacklisted": "لطفاً یک عنوان توصیفی متفاوت انتخاب کنید."
 }
index 9e1c5cb..d78cf6d 100644 (file)
        "createaccountreason": "कारण:",
        "createacct-reason": "कारण:",
        "createacct-reason-ph": "अहा इगो आर दोसर खाता कियाक बनउने जा रहल छि",
-       "createacct-captcha": "सुरक्षा जाँच",
-       "createacct-imgcaptcha-ph": "उपरोक्त पाठ लिखु",
        "createacct-submit": "अपन खाता बनाउ",
        "createacct-another-submit": "दोसर खाता बनाउ",
        "createacct-benefit-heading": "{{SITENAME}} अहि जोका लोकनिसभ द्वारा बनावल गेल अछि।",
        "passwordreset-emailtext-ip": "कियो (सम्भवतः अहाँ, अन्तर्जाल सेवा कल्पक $1 सँ) अपन लेखा विवरणक पुनःस्मरणक लेल अनुरोध केलहुँ ऐ लेल {{ अन्तर्जालक नाम}} ($4). ई प्रयोक्ता {{PLURAL:$3|लेखा अछि| लेखा सभ अछि}}\nऐ ई-पत्र संकेतसँ सम्बन्धित:\n\n$2\n\n{{PLURAL:$3|ई अल्पकालक कूटशब्द| ई सभ अल्पकालक कूटशब्द}} खतम भऽ जाएत {{PLURAL:$5|एक दिन|$5 पाँच दिन}}.\nअहाँ सम्प्रवेश करू आ एकटा नव कूटशब्द चुनू।. जौं कियो आन ई आग्रह केने अछि, वा अहाँकेँ अपन पुरान कूटशब्द मोन पड़ि गेल अछि , आ आब एकरा बदलबाक इच्छा नै राखै छी तँ अहाँ ऐ संदेशकेँ बिसरि जाउ आ अपन पुरान कूटशब्दक प्रयोग करैत रहू।",
        "passwordreset-emailtext-user": "प्रयोक्ता $1 {{अन्तर्जाल}} पर अहाँक खाता विवरणक {{SITENAME}} लेल फेरसँ ($4) आग्रह केने छथि। ई प्रयोक्ता {{PLURAL:$3|खाता अछि|खाता सभ अछि}} ऐ ई-पत्र संकेतसँ जुड़ल: $2\n{{PLURAL:$3| ई अस्थायी कूटशब्द|ई सभ अस्थायी कूटशब्द}} खतम भऽ जाएत {{PLURAL:$5|एक दिन|$5 दिन}} मे।\nअहाँ सम्प्रवेश करू आ एकटा नव कूटशब्द आब चुनू। जँ कियो दोसर ई आग्रह केने छथि, वा जँ अहाँकेँ अपन मूल कूटशब्द मोन पड़ि गेल अछि, आ अहाँ आब ओइ कूटशब्दकेँ नै बदलऽ चाहै छी, अहाँ ऐ संदेशकेँ बिसरि सकै छी आ अपन पुरान कूटशब्दक प्रयोग जारी राखि सकै छी।",
        "passwordreset-emailelement": "प्रयोक्ता: \n$1\n\nअस्थायी कूटशब्द: \n$2",
-       "passwordreset-emailsent": "एकटा ई-पत्र मोन पाड़बा लेल पठाओल गेल अछि।",
+       "passwordreset-emailsentemail": "एकटा ई-पत्र मोन पाड़बा लेल पठाओल गेल अछि।",
        "passwordreset-emailsent-capture": "एकटा स्मरण ई-पत्र पठाएल गेल अछि, जे नीचाँ देखाएल अछि।",
        "passwordreset-emailerror-capture": "एकटा स्मरण ई-पत्र बनाएल गेल अछि, जे नीचाँ देखाएल अछि, मुदा प्र्योक्ताकेँ एकरा पठेबाक प्रयास विफल भेल: $1",
        "changeemail": "ई-पत्र संकेत बदलू",
-       "changeemail-text": "अपन ई-पत्र संकेत बदलबा लेल ऐ आवेदनकेँ भरू। अहाँकेँ ऐ परिवर्तनक अनुमोदन लेल अपन कूटशब्द भरए पड़त।",
+       "changeemail-header": "ई-पत्र पता खाता बदलू",
        "changeemail-no-info": "अहाँकेँ ऐ पन्नाकेँ सोझे देखबाले सम्प्रवेशित हुअए पड़त।",
        "changeemail-oldemail": "अखुनका ई-पत्र संकेत:",
        "changeemail-newemail": "नव ई-पत्र संकेत:",
        "prefs-diffs": "अन्तर निर्धारक सभ",
        "prefs-help-prefershttps": "इ प्राथमिकता अहाँके फेर स सम्प्रवेश करलाक बाद प्रभाव पडत।",
        "prefs-tabs-navigation-hint": "सुझाव: अहाँ टैब्स सूचीमे टैब्सके बीच आवागमन करवाक लेल बाम आर दाहिना बागलके कुंजिसभके उपयोग कइर सकैत छी।",
-       "email-address-validity-valid": "ई-पत्र संकेत मान्य बुझाइत अछि",
-       "email-address-validity-invalid": "एकटा मान्य ई-पत्र संकेत लिखू",
        "userrights": "प्रयोक्ता अधिकारक प्रबन्धन",
        "userrights-lookup-user": "प्रयोक्ता संवर्ग सभक प्रबन्ध करू",
        "userrights-user-editname": "एकटा प्रयोक्तानाम लिखू:",
        "nchanges": "$1 {{PLURAL:$1|परिवर्त्तन|परिवर्त्तन}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|अंतिम बेर देखला के बाद स}}",
        "enhancedrc-history": "इतिहास",
-       "recentchanges": "लगक परिवर्तन सभ",
+       "recentchanges": "लगक परिवर्तनसभ",
        "recentchanges-legend": "नव परिवर्तन सभक विकल्प सभ",
        "recentchanges-summary": "ई पन्नापर विकीमे भेल सभसँ अद्यतन परिवर्तनपर नजरि राखू।",
        "recentchanges-noresult": "इ अवधिके दौरान इ मापदंडके पूर्ण करेत समय कोनो परिवर्तन नै केएल गेल अछि।",
        "wlheader-showupdated": "पन्ना सभ जे अहाँक एतए अन्तिम बेर अएलाक बाद बदलल अछि तकर सूची देल अछि '''गाढ़''' मे",
        "wlnote": "नीचाँ {{PLURAL:$1|is the last change|are the last '''$1''' changes}} अन्तिम {{PLURAL:$2|hour|'''$2''' hours}} $3, $4 जेना।",
        "wlshowlast": "देखाउ अन्तिम $1 घण्टा $2 दिन",
+       "watchlistall2": "सभ",
        "watchlist-options": "साकांक्षसूचीक विकल्प सभ",
        "watching": "ताकिमे...",
        "unwatching": "छोड़ल ...",
        "movenosubpage": "अहि पन्ना कऽ कोनो उप पन्ना नहि अछि।",
        "movereason": "कारण:",
        "revertmove": "फेरसँ वएह",
-       "delete_and_move": "मेटाउ आ हटू",
        "delete_and_move_text": "==हटाबैक जरूरत==\nलक्ष्य पृष्ठ \"[[:$1]]\" पहिने सें अस्तित्व में अछि. \nनाम के बदलहि ले की अहां एकरा हटाबय चाहैत छी ?",
        "delete_and_move_confirm": "हँ, पन्ना मेटाउ",
        "delete_and_move_reason": "\"[[$1]]\" सँ घसकेबा लेल जगह बनेबा लेल मेटाएल गेल",
index 796372d..f20007b 100644 (file)
        "passwordreset-emailtext-ip": "Некој (веројатно вие, од IP-адресата $1) побара измена на вашата\nлозинка за {{SITENAME}} ($4). Оваа е-поштенска адреса е наведена во\n{{PLURAL:$3|следнава корисничка сметка|следниве кориснички сметки}}:\n\n$2\n\n{{PLURAL:$3|Оваа привремена лозинка ќе истече|Овие привремени лозинки ќе истечат}} во рок од {{PLURAL:$5|еден ден|$5 дена}}.\nСега треба да се најавите и да внесете нова лозинка. Ако ова барање го\nпоставил некој друг, или пак во меѓувреме сте се сетиле на лозинката, и не сакате\nда ја менувате, тогаш слободно занемарете ја поракава и продолжете да ја користите старата.",
        "passwordreset-emailtext-user": "Корисникот $1 на {{SITENAME}} побара измена на вашата лозинка на {{SITENAME}}\n($4). Оваа е-поштенска адреса е наведена во {{PLURAL:$3|следнава корисничка сметка|следниве кориснички сметки}}:\n\n$2\n\n{{PLURAL:$3|Оваа привремена лозинка ќе истече|Овие привремени лозинки ќе истечат}} во рок од {{PLURAL:$5|еден ден|$5 дена}}.\nСега треба да се најавите и да внесете нова лозинка. Ако ова барање го\nпоставил некој друг, или пак во меѓувреме сте се сетиле на лозинката, и не сакате\nда ја менувате, тогаш слободно занемарете ја поракава и продолжете да ја користите старата.",
        "passwordreset-emailelement": "Корисничко име: \n$1\n\nПривремена лозинка: \n$2",
-       "passwordreset-emailsentemail": "Ð\90ко Ð¾Ð²Ð° Ðµ Ñ\80егиÑ\81Ñ\82Ñ\80иÑ\80анаÑ\82а Ðµ-поÑ\88Ñ\82а Ð·Ð° вашата сметка, тогаш ќе ви биде испратено писмо за задавање на нова лозинка.",
-       "passwordreset-emailsentusername": "Ако има соодветна регистрирана е-пошта, тогаш ќе ви биде испратена порака за промена на лозинката.",
+       "passwordreset-emailsentemail": "Ð\90ко Ð¾Ð²Ð° Ðµ Ñ\80егиÑ\81Ñ\82Ñ\80иÑ\80анаÑ\82а Ðµ-поÑ\88Ñ\82а Ð¿Ð¾Ð²Ñ\80зана Ñ\81о вашата сметка, тогаш ќе ви биде испратено писмо за задавање на нова лозинка.",
+       "passwordreset-emailsentusername": "Ако има соодветна регистрирана е-пошта поврзана со ова корисничко име, тогаш ќе ви биде испратена порака за промена на лозинката.",
        "passwordreset-emailsent-capture": "Испратено е писмо за измена на лозинката (прикажано подолу).",
        "passwordreset-emailerror-capture": "Создадено е писмо за измена на лозинката (прикажано подолу), но не успеав да го испратам на {{GENDER:$2|корисникот}}: $1",
        "changeemail": "Смени или отстрани е-пошта",
        "upload-form-label-select-file": "Одберете податотека",
        "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": "Накратко опишете го сето она што е значајно за делото. Ако е фотографија, споменете ги главните нешта што се прикажани на неа, настанот или местото.",
        "upload-form-label-usage-title": "Употреба",
        "upload-form-label-usage-filename": "Назив на податотеката",
        "foreign-structured-upload-form-label-own-work": "Ова е мое дело",
        "export-download": "Зачувај како податотека",
        "export-templates": "Вклучи и шаблони",
        "export-pagelinks": "Вклучи поврзани страници до длабочина од:",
+       "export-manual": "Додајте страници рачно:",
        "allmessages": "Системски пораки",
        "allmessagesname": "Име",
        "allmessagesdefault": "Текст по основно",
        "size-zetapixel": "$1 ЗП",
        "size-yottapixel": "$1 ЈП",
        "bitrate-bits": "$1 б/с",
-       "bitrate-kilobits": "$1 Ðºб/с",
+       "bitrate-kilobits": "$1 Ð\9aб/с",
        "bitrate-megabits": "$1 Мб/с",
        "bitrate-gigabits": "$1 Гб/с",
        "bitrate-terabits": "$1 Тб/с",
        "expand_templates_preview": "Преглед",
        "expand_templates_preview_fail_html": "<em>Бидејќи {{SITENAME}} има овозможено сиров HTML и се јави губиток на седнички податоци, прегледот е скриен како мерка на претпазливост против напади со JavaScript.</em>\n\n<strong>Ако ова е е легитимен обид за преглед, тогаш обидете се повторно.</strong>\nАко не работи и тогаш, [[Special:UserLogout|одјавете се]] и повторно најавете се.",
        "expand_templates_preview_fail_html_anon": "<em>Бидејќи {{SITENAME}} има овозможено сиров HTML, а вие не сте најавени, прегледот е скриен како мерка на претпазливост против напади со JavaScript.</em>\n\n<strong>Ако ова е е легитимен обид за преглед, тогаш обидете се повторно.</strong>\nАко не работи и тогаш, [[Special:UserLogout|одјавете се]] и повторно најавете се.",
+       "expand_templates_input_missing": "Треба да внесете некаков текст.",
        "pagelanguage": "Изборник за јазик на страницата",
        "pagelang-name": "Страница",
        "pagelang-language": "Јазик",
        "mediastatistics": "Статистики за слики и снимки",
        "mediastatistics-summary": "Статистики за подигнати типови податотеки. Се зема предвид само последната верзија на податотеката. Старите и избришаните верзии не се бројат.",
        "mediastatistics-nbytes": "{{PLURAL:$1|Еден бајт|$1 бајти}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Вкупен обем на пасусот: $1 бајти.",
-       "mediastatistics-allbytes": "Вкупен обем на сите податотеки: $1 бајти.",
+       "mediastatistics-bytespertype": "Вкупен обем на пасусот: {{PLURAL:$1|$1 бајт|$1 бајти}} ($2; $3%).",
+       "mediastatistics-allbytes": "Вкупен обем на сите податотеки: {{PLURAL:$1|$1 бајт|$1 бајти}} ($2).",
        "mediastatistics-table-mimetype": "MIME-тип",
        "mediastatistics-table-extensions": "Можни додатоци",
        "mediastatistics-table-count": "Број на податотеки",
index b5e5065..ffd2a23 100644 (file)
        "upload-form-label-select-file": "പ്രമാണം തിരഞ്ഞെടുക്കുക",
        "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-usage-filename": "പ്രമാണത്തിന്റെ പേര്",
        "foreign-structured-upload-form-label-own-work": "ഇതെന്റെ സ്വന്തം സൃഷ്ടി ആണ്",
        "wlshowhideanons": "അജ്ഞാത ഉപയോക്താക്കൾ",
        "wlshowhidepatr": "റോന്തു ചുറ്റിയ മാറ്റങ്ങൾ",
        "wlshowhidemine": "എന്റെ തിരുത്തുകൾ",
+       "wlshowhidecategorization": "താൾ വർഗ്ഗീകരണം",
        "watchlist-options": "ശ്രദ്ധിക്കുന്ന താളുകളുടെ സജ്ജീകരണങ്ങൾ",
        "watching": "ശ്രദ്ധിക്കുന്നു...",
        "unwatching": "അവഗണിക്കുന്നു...",
        "rollback-success": "$1 ചെയ്ത തിരുത്ത് തിരസ്ക്കരിച്ചിരിക്കുന്നു; $2 ചെയ്ത തൊട്ടു മുൻപത്തെ പതിപ്പിലേക്ക് സേവ് ചെയ്യുന്നു.",
        "sessionfailure-title": "സെഷൻ പരാജയപ്പെട്ടിരിക്കുന്നു",
        "sessionfailure": "താങ്കളുടെ ലോഗിൻ സെഷനിൽ പ്രശ്നങ്ങളുള്ളതായി കാണുന്നു;\nസെഷൻ തട്ടിയെടുക്കൽ ഒഴിവാക്കാനുള്ള മുൻകരുതലായി ഈ പ്രവൃത്തി റദ്ദാക്കിയിരിക്കുന്നു.\nദയവായി പിന്നോട്ട് പോയി താങ്കൾ വന്ന താളിൽ ചെന്ന്, വീണ്ടും ശ്രമിക്കുക.",
+       "changecontentmodel": "താളിന്റെ ഉള്ളടക്ക രീതി തിരുത്തുക",
        "changecontentmodel-title-label": "താളിന്റെ തലക്കെട്ട്",
        "changecontentmodel-model-label": "പുതിയ ഉള്ളടക്ക രീതി",
        "changecontentmodel-reason-label": "കാരണം:",
        "export-download": "ഒരു പ്രമാണമാക്കി സൂക്ഷിക്കുക",
        "export-templates": "ഫലകങ്ങളും ഉൾപ്പെടുത്തുക",
        "export-pagelinks": "ഉൾപ്പെടുത്തേണ്ട കണ്ണികളുള്ള താളുകളുടെ ആഴം:",
+       "export-manual": "താളുകൾ ചേർക്കുക:",
        "allmessages": "സന്ദേശസഞ്ചയം",
        "allmessagesname": "പേര്‌",
        "allmessagesdefault": "സ്വതേയുള്ള ഉള്ളടക്കം",
        "logentry-suppress-block": "$5 $6 കാലത്തേക്ക് {{GENDER:$4|$3}} എന്ന അംഗത്വത്തെ $1 {{GENDER:$2|തടഞ്ഞിരിക്കുന്നു}}",
        "logentry-suppress-reblock": "$5 $6 കാലത്തേക്ക് {{GENDER:$4|$3}} എന്ന അംഗത്വത്തിന്റെ തടയൽ സജ്ജീകരണങ്ങൾ $1 {{GENDER:$2|മാറ്റിയിരിക്കുന്നു}}",
        "logentry-import-upload": "പ്രമാണ അപ്‌ലോഡ് വഴി $3 എന്ന താൾ $1 {{GENDER:$2|ഇറക്കുമതി ചെയ്തിരിക്കുന്നു}}",
+       "logentry-import-upload-details": "പ്രമാണം അപ്‌ലോഡ് ചെയ്യുക വഴി $3 ($4 {{PLURAL:$4|നാൾപ്പതിപ്പ്|നാൾപ്പതിപ്പുകൾ}}) $1 {{GENDER:$2|ഇറക്കുമതി ചെയ്തിരിക്കുന്നു}}",
        "logentry-import-interwiki": "മറ്റൊരു വിക്കിയിൽ നിന്നും $3 എന്ന താൾ $1 {{GENDER:$2|ഇറക്കുമതി ചെയ്തിരിക്കുന്നു}}",
+       "logentry-import-interwiki-details": "$5 വിക്കിയിൽ നിന്നും $3 ($4 {{PLURAL:$4|നാൾപ്പതിപ്പ്|നാൾപ്പതിപ്പുകൾ}}) $1 {{GENDER:$2|ഇറക്കുമതി ചെയ്തിരിക്കുന്നു}}",
        "logentry-merge-merge": "$3 എന്ന താൾ $4 എന്നതിലേക്ക് ($5 നാൾപ്പതിപ്പ് വരെ), $1 {{GENDER:$2|ലയിപ്പിച്ചു}}",
        "logentry-move-move": "$1 എന്ന ഉപയോക്താവ് $3 എന്ന താൾ $4 എന്നാക്കി {{GENDER:$2|മാറ്റിയിരിക്കുന്നു}}",
        "logentry-move-move-noredirect": "$3 എന്ന താൾ $4 എന്ന തലക്കെട്ടിലേയ്ക്ക് തിരിച്ചുവിടലില്ലാതെ $1 {{GENDER:$2|മാറ്റി}}",
        "expand_templates_preview": "എങ്ങനെയുണ്ടെന്നു കാണുക",
        "expand_templates_preview_fail_html": "<em>{{SITENAME}} സംരംഭത്തിൽ അസംസ്കൃത എച്ച്.റ്റി.എം.എൽ സജ്ജമാക്കിയിരിക്കുന്നതിനാലും, സെഷൻ വിവരങ്ങൾ നഷ്ടപ്പെട്ടിരിക്കുന്നതിനാലും, ജാവാസ്ക്രിപ്റ്റ് ആക്രമണങ്ങൾക്കെതിരെയുള്ള മുൻകരുതൽ എന്ന നിലയിൽ എങ്ങനെയുണ്ടെന്ന് കാണൽ മറച്ചിരിക്കുകയാണ്.</em>\n\n<strong>ഇത് എങ്ങനെയുണ്ടെന്ന് കാണാനുള്ള യഥാർത്ഥശ്രമമാണെങ്കിൽ വീണ്ടും ശ്രമിക്കുക.</strong>\nഇപ്പോഴും പ്രവർത്തിക്കുന്നില്ലെങ്കിൽ, [[Special:UserLogout|പുറത്ത് കടന്ന്]] വീണ്ടും പ്രവേശിച്ച ശേഷം പരീക്ഷിക്കുക.",
        "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}} സംരംഭത്തിൽ അസംസ്കൃത എച്ച്.റ്റി.എം.എൽ സജ്ജമാക്കിയിരിക്കുന്നതിനാലും, സെഷൻ വിവരങ്ങൾ നഷ്ടപ്പെട്ടിരിക്കുന്നതിനാലും, ജാവാസ്ക്രിപ്റ്റ് ആക്രമണങ്ങൾക്കെതിരെയുള്ള മുൻകരുതൽ എന്ന നിലയിൽ എങ്ങനെയുണ്ടെന്ന് കാണൽ മറച്ചിരിക്കുകയാണ്.</em>\n\n<strong>ഇത് എങ്ങനെയുണ്ടെന്ന് കാണാനുള്ള യഥാർത്ഥശ്രമമാണെങ്കിൽ [[Special:UserLogin|പ്രവേശിച്ച ശേഷം]] വീണ്ടും ശ്രമിക്കുക.</strong>",
+       "expand_templates_input_missing": "ചില വിവരങ്ങളെങ്കിലും താങ്കൾ നൽകിയിരിക്കണം.",
        "pagelanguage": "താളിന്റെ ഭാഷാ തിരഞ്ഞെടുപ്പ് സൗകര്യം",
        "pagelang-name": "താൾ",
        "pagelang-language": "ഭാഷ",
        "pagelang-use-default": "സ്വതേയുള്ള ഭാഷ ഉപയോഗിക്കുക",
        "pagelang-select-lang": "ഭാഷ തിരഞ്ഞെടുക്കുക",
+       "pagelang-submit": "സമർപ്പിക്കുക",
        "right-pagelang": "താളിന്റെ ഭാഷ മാറ്റുക",
        "action-pagelang": "താളിന്റെ ഭാഷ മാറ്റുക",
        "log-name-pagelang": "ഭാഷ മാറ്റലിന്റെ രേഖ",
        "mediastatistics": "മീഡിയ സ്ഥിതിവിവരക്കണക്കുകൾ",
        "mediastatistics-summary": "അപ്‌ലോഡ് ചെയ്തിട്ടുള്ള പ്രമാണ തരങ്ങളെക്കുറിച്ചുള്ള സ്ഥിതിവിവരക്കണക്കുകൾ. ഇത് പ്രമാണത്തിന്റെ ഏറ്റവും പുതിയ പതിപ്പ് മാത്രമേ ഉൾക്കൊള്ളുന്നുള്ളു. പഴയ അഥവാ മായ്ക്കപ്പെട്ട പ്രമാണപതിപ്പുകൾ ഉൾക്കൊള്ളുന്നില്ല.",
        "mediastatistics-nbytes": "{{PLURAL:$1|ഒരു ബൈറ്റ്|$1 ബൈറ്റ്}} ($2; $3%)",
+       "mediastatistics-bytespertype": "ഈ ഭാഗത്തിന്റെ ആകെ പ്രമാണ വലിപ്പം: {{PLURAL:$1|$1 ബൈറ്റ്|$1 ബൈറ്റുകൾ}} ($2; $3%).",
+       "mediastatistics-allbytes": "എല്ലാ പ്രമാണങ്ങളുടേയും ആകെ പ്രമാണവലിപ്പം: {{PLURAL:$1|$1 ബൈറ്റ്|$1 ബൈറ്റുകൾ}} ($2).",
        "mediastatistics-table-mimetype": "മൈം(MIME) തരം",
        "mediastatistics-table-extensions": "സാദ്ധ്യതയുള്ള എക്സ്റ്റെൻഷനുകൾ",
        "mediastatistics-table-count": "പ്രമാണങ്ങളുടെ എണ്ണം",
        "mediastatistics-header-text": "എഴുത്ത്",
        "mediastatistics-header-executable": "എക്സിക്യൂട്ടബിളുകൾ",
        "mediastatistics-header-archive": "ചുരുക്കിയ ഫയൽതരങ്ങൾ",
+       "mediastatistics-header-total": "എല്ലാ പ്രമാണങ്ങളും",
        "json-warn-trailing-comma": "ജെസണിൽ നിന്നും $1 എന്നതിന്റെ പിന്നാലെയുള്ള {{PLURAL:$1|കോമ|കോമകൾ}} നീക്കി",
        "json-error-unknown": "ജെസണിൽ ഒരു പ്രശ്നമുണ്ടായി. പിഴവ്: $1",
        "json-error-depth": "സ്റ്റാക്കിന്റെ പരമാവധി ആഴം അധികരിച്ചിരിക്കുന്നു",
index cc58be4..9694320 100644 (file)
        "searcharticle": "Vàje",
        "history": "Verziune 'e primma",
        "history_short": "Cronologgia",
-       "updatedmarker": "cagnamiénte 'e mija urdema visita",
+       "updatedmarker": "cagnamiénte 'e ll'urdema visita d' 'a mia",
        "printableversion": "Verzione pe' stampa",
        "permalink": "Jonta permanente",
        "print": "Stampà",
        "passwordreset-emailtext-ip": "Coccherun (può darse ca sì tu, cu n'indirizzo IP $1) ha addimannato na mmasciata c' 'a password nova pe' putè trasì a {{SITENAME}} ($4). {{PLURAL:$3|L'utente associato|L'utente associate}} a st'indirizze e-mail songo:\n\n$2\n\n{{PLURAL:$3|Sta password temporanea ammaturarrà|Sti password temporanee ammaturarranno}} aropp'a {{PLURAL:$5|nu juorno|$5 ghiuorne}}.\nHè 'a trasì e scegliere na password nova mò. \n\nSi nun sì stato tu a fà sta richiesta, o te sì scurdat' 'a password origginale e nun 'a buò cagnà cchiù, lassa perde sta mmasciata e usa 'a password viecchia.",
        "passwordreset-emailtext-user": "L'utente $1 di {{SITENAME}} ha addimannato na mmasciata c' 'a password nova pe' putè trasì a {{SITENAME}} ($4). {{PLURAL:$3|L'utente associato|L'utente associate}} a st'indirizze e-mail songo:\n\n$2\n\n{{PLURAL:$3|Sta password temporanea ammaturarrà|Sti password temporanee ammaturarranno}} aropp'a {{PLURAL:$5|nu juorno|$5 ghiuorne}}.\nHè 'a trasì e scegliere na password nova mò. \n\nSi nun sì stato tu a fà sta richiesta, o te sì scurdat' 'a password origginale e nun 'a buò cagnà cchiù, lassa perde sta mmasciata e usa 'a password viecchia.",
        "passwordreset-emailelement": "Nomme utente: \n$1\n\nPassword temporanea: \n$2",
-       "passwordreset-emailsentemail": "Si chesto fosse nu cunto e-mail riggistrato, allora buò dicere ca se mannarrà na mmasciata e-mail pe' riabbià 'a password.",
-       "passwordreset-emailsentusername": "Si esistesse nu cunto e-mail riggistrato ca currispunnesse a chesto, allora se mannarrà na mmasciata pe' riabbià 'a password.",
+       "passwordreset-emailsentemail": "Si chesto fosse nu cunto e-mail suoccio a 'o cunto vuost, allora buò dicere ca se mannarrà na mmasciata e-mail pe' riabbià 'a password.",
+       "passwordreset-emailsentusername": "Si esistesse nu cunto e-mail suòccio a stu nomme utente, allora se mannarrà na mmasciata pe' riabbià 'a password.",
        "passwordreset-emailsent-capture": "Na mmasciata e-mail pe' riabbià 'a password è stata mannata, chista mmasciata 'a putite vedé ccà abbascio.",
        "passwordreset-emailerror-capture": "Na mmasciata e-mail pe' riabbià 'a password è stata mannata, 'a putite vedé ccà abbascio, ma aita sapé ca nun s'è mannata a {{GENDER:$2|l'utente}} pecché c'è stato cocch'errore: $1",
        "changeemail": "Cagna o lèva l'indirizzo e-mail",
        "userpage-userdoesnotexist": "'O cunto utente \"<nowiki>$1</nowiki>\" nun è riggistrato. Cuntrolla ca si buò overo crià o cagnà sta paggena.",
        "userpage-userdoesnotexist-view": "'O cunto utente \"$1\" nun è riggistrato.",
        "blocked-notice-logextract": "St'utente è bloccato mò.\nL'urdemo elemento d' 'o riggistro 'e blocche è ripurtato ccà abbascio p'avé nu riferimento:",
-       "clearyourcache": "'''Nota:''' aroppo sarvate putisse necessità 'e pulezzà 'a caché d' 'o navigatóre pe' vedé 'e cagnamiente. \n*'''Firefox / Safari''': sprémme 'o buttóne maiuscole e ffà clic ncopp'a ''Recarreca'', o pure spremme ''Ctrl-F5'' o ''Ctrl-R'' (''⌘-R'' ncopp'a Mac)\n*'''Google Chrome''': spremme ''Ctrl-Shift-R'' (''⌘-Shift-R'' ncopp'a nu Mac)\n*'''Internet Explorer''': spremme 'o buttóne ''Ctrl'' pe' tramente ca faie click ncopp'a ''Refresh'', o pure spremmere ''Ctrl-F5''\n*'''Opera''': abbacanta tutt' 'a cache addò menu ''Strumiente → Preferenze''",
+       "clearyourcache": "'''Nota:''' aroppo sarvate putisse necessità 'e pulezzà 'a caché d' 'o navigatóre pe' vedé 'e cagnamiente. \n*'''Firefox / Safari''': sprémme 'o buttóne maiuscole e ffà clic ncopp'a ''Recarreca'', o pure spremme ''Ctrl-F5'' o ''Ctrl-R'' (''⌘-R'' ncopp'a Mac)\n*'''Google Chrome''': spremme ''Ctrl-Shift-R'' (''⌘-Shift-R'' ncopp'a nu Mac)\n*'''Internet Explorer''': spremme 'o buttóne ''Ctrl'' pe' tramente ca faie click ncopp'a ''Refresh'', o pure spremmere ''Ctrl-F5''\n*'''Opera''': sbacanta tutt' 'a cache addò menu ''Strumiente → Preferenze''",
        "usercssyoucanpreview": "'''Cunziglio:''' spremme 'o buttone 'Vide anteprimma' pe' pruvà 'o CSS nuovo apprimma d' 'o sarvà.",
        "userjsyoucanpreview": "'''Cunziglio:''' spremme 'o buttone 'Vide anteprimma' pe' pruvà 'o JavaScript nuovo apprimma d' 'o sarvà.",
        "usercsspreview": "'''Arricuordate ca chest'è sulamente n'anteprimma p' 'o CSS perzunale. 'E cagnamiente nun so' state ancora sarvate!'''",
        "upload-form-label-select-file": "Sceglie file",
        "upload-form-label-infoform-title": "Dettaglie",
        "upload-form-label-infoform-name": "Nomme",
+       "upload-form-label-infoform-name-tooltip": "Nu titolo unico e distintivo p' 'o file, ca serverrà comm'o nomme file. Putite ausà lenguaggio semprice ch' 'e spazi. Nun azzeccà l'estensione d' 'o file.",
        "upload-form-label-infoform-description": "Descrizzione",
+       "upload-form-label-infoform-description-tooltip": "Facite 'a descriziona sintetica 'e tuttuquanto fosse degno 'e nota a proposito 'e st'opera. P' 'e foto, facite assapé 'e ccosi principale ca songo rappresentate, l'accasione e/o luogo dint' 'o quale so' state scattate.",
        "upload-form-label-usage-title": "Aúso",
        "upload-form-label-usage-filename": "Nomme d' 'o file",
        "foreign-structured-upload-form-label-own-work": "Chest'è fatica mia",
        "export-download": "Astipa comm'a nu file",
        "export-templates": "Include 'e template",
        "export-pagelinks": "Include 'e paggene cullegate ca spuntassero nfin' 'a na prufunnità 'e:",
+       "export-manual": "Nzérta paggene manualmente:",
        "allmessages": "'Mmasciate d''o sistema",
        "allmessagesname": "Nomme",
        "allmessagesdefault": "Mmasciata 'e testo predefinita",
        "watchlistedit-clear-done": "L'elenco 'e paggene cuntrullate vuosto è stat'abbacantato.",
        "watchlistedit-clear-removed": "{{PLURAL:$1|nu titolo è stato luvato|$1 titule so' state luvate}}:",
        "watchlistedit-too-many": "Ce stanno troppe paggene 'a veré ccà.",
-       "watchlisttools-clear": "Abbacanta l'elenco 'e paggene cuntrullate",
+       "watchlisttools-clear": "Sbacanta l'elenco 'e paggene cuntrullate",
        "watchlisttools-view": "Vide 'e cagnamiente mpurtante",
        "watchlisttools-edit": "Vide e cagna l'elenco 'e paggene cuntrullate",
        "watchlisttools-raw": "Cagna l'elenco 'e paggene cuntrullate ncruro",
        "expand_templates_preview": "Anteprimma",
        "expand_templates_preview_fail_html": "<em>Siccomme {{SITENAME}} téne 'o HTML 'ncruro appicciato e se songhe spierze 'e date d' 'a sessiona, 'a previsualizzaziona s'è annascunnuta comm'a na prutezione annanz'e uerre 'e JavaScript.</em>\n\n<strong>Si chist'è nu tentativo giustificato 'e previsualizzaziona, pe' piacere facite n'ata vota.</strong>\nSi nun funziona ancora, facite d'[[Special:UserLogout|ascì]] e trasì n'ata vota.",
        "expand_templates_preview_fail_html_anon": "<em>Siccomme {{SITENAME}} téne 'o HTML 'ncruro e vuje nun site trasute 'o sito, 'a previsualizzaziona s'è annascunnuta comm'a na prutezione annanz'e uerre 'e JavaScript.</em>\n\n<strong>Si chist'è nu tentativo giustificato 'e previsualizzaziona, pe' piacere facite d'[[Special:UserLogout|ascì]] e trasì n'ata vota.</strong>",
+       "expand_templates_input_missing": "Avita dà minimo nu poco 'e testo scritto.",
        "pagelanguage": "Scigliete 'a lengua d' 'a paggena pe' bbìa e stu strumiento",
        "pagelang-name": "Paggena",
        "pagelang-language": "Lengua",
        "mediastatistics": "Statistiche d' 'e media",
        "mediastatistics-summary": "Statistiche ncopp' 'e tipe d' 'e file carrecate. Ce truvate azzeccata sulamente 'a verziona cchiù recente d' 'o file. Verziune viecchie o scancellate se so' luvate.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Dimenziona d' 'o file 'e sta seziona: $1 byte.",
-       "mediastatistics-allbytes": "Dimenziona sana 'e file pe' tuttuquante 'e file: $1 byte.",
+       "mediastatistics-bytespertype": "Dimenziona d' 'o file 'e sta seziona: {{PLURAL:$1|$1 byte}}  ($2; $3%).",
+       "mediastatistics-allbytes": "Dimenziona sana 'e file pe' tuttuquante 'e file: {{PLURAL:$1|$1 byte}} ($2).",
        "mediastatistics-table-mimetype": "Tipo 'e MIME",
        "mediastatistics-table-extensions": "Estenziune pussibbele",
        "mediastatistics-table-count": "Nummero 'e file",
index a24db3a..0bb4726 100644 (file)
        "revdelete-uname-unhid": "brukarnamn gjort synleg",
        "revdelete-restricted": "la til avgrensingar for administratorar",
        "revdelete-unrestricted": "fjerna avgrensingar for administratorar",
+       "logentry-block-block": "$1 {{GENDER:$2|blokkerte}} {{GENDER:$4|$3}} for $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|endra}} blokkeringsinnstillingar for {{GENDER:$4|$3}} med opphøyrstid $5 $6",
        "logentry-move-move": "$1 {{GENDER:$2|flytte}} sida $3 til $4",
        "logentry-move-move-noredirect": "$1 {{GENDER:$2|flytte}} sida $3 til $4 utan å lata etter ei omdirigering",
index 59f5979..e6af41d 100644 (file)
@@ -9,7 +9,8 @@
                        "아라",
                        "Leeheonjin",
                        "TTO",
-                       "Macofe"
+                       "Macofe",
+                       "Amiel Guanlao"
                ]
        },
        "tog-underline": "Gulisan lang panglalam deng suglung:",
        "unprotectthispage": "Lako ya pangaprotekta ing bulung a ini",
        "newpage": "Bayung bulung",
        "talkpage": "Pisabian ya ining bulung",
-       "talkpagelinktext": "Pisasabian",
+       "talkpagelinktext": "talamitam",
        "specialpage": "Bulung a Makabukud",
        "personaltools": "Sariling kasangkapan",
        "articlepage": "Lawen me ing kalamnan ning bulung",
index dfa5375..f1a99dc 100644 (file)
        "laggedslavemode": "Uwaga! Ta strona może nie zawierać najnowszych aktualizacji.",
        "readonly": "Baza danych jest zablokowana",
        "enterlockreason": "Podaj powód zablokowania bazy oraz szacunkowy termin jej odblokowania",
-       "readonlytext": "Baza danych jest obecnie zablokowana – nie można wprowadzać nowych informacji ani modyfikować istniejących. Powodem są prawdopodobnie czynności administracyjne. Po ich zakończeniu przywrócona zostanie pełna funkcjonalność bazy.\n\nAdministrator, który zablokował bazę, podał następujące wyjaśnienie: $1",
+       "readonlytext": "Baza danych jest obecnie zablokowana – nie można wprowadzać nowych informacji ani modyfikować istniejących. Powodem są prawdopodobnie czynności administracyjne. Po ich zakończeniu przywrócona zostanie pełna funkcjonalność bazy.\n\nAdministrator systemu, który zablokował bazę, podał następujące wyjaśnienie: $1",
        "missing-article": "W bazie danych nie odnaleziono treści strony „$1” $2.\n\nZazwyczaj jest to spowodowane odwołaniem do nieaktualnego linku prowadzącego do różnicy pomiędzy dwoma wersjami strony lub do wersji z historii usuniętej strony.\n\nJeśli tak nie jest, możliwe, że problem został wywołany przez błąd w oprogramowaniu.\nMożna zgłosić ten fakt [[Special:ListUsers/sysop|administratorowi]], podając adres URL.",
        "missingarticle-rev": "(wersja $1)",
        "missingarticle-diff": "(różnica: $1, $2)",
        "upload-form-label-select-file": "Wybierz plik",
        "upload-form-label-infoform-title": "Szczegóły",
        "upload-form-label-infoform-name": "Nazwa",
+       "upload-form-label-infoform-name-tooltip": "Podaj krótką, opisującą i unikalną nazwę, która będzie służyła jako nazwa pliku. Możesz używać prostego języka i spacji. Nie dodawaj rozszerzenia pliku.",
        "upload-form-label-infoform-description": "Opis",
+       "upload-form-label-infoform-description-tooltip": "Krótko opisz wszystko istotne, co dotyczy tej pracy.\nW przypadku zdjęcia wymień najważniejsze ujęte obiekty, sytuację lub miejsce.",
        "upload-form-label-usage-title": "Korzystanie",
        "upload-form-label-usage-filename": "Nazwa pliku",
        "foreign-structured-upload-form-label-own-work": "To moja własna praca",
        "wlshowhideanons": "anonimowych",
        "wlshowhidepatr": "sprawdzone edycje",
        "wlshowhidemine": "moje edycje",
+       "wlshowhidecategorization": "kategoryzację stron",
        "watchlist-options": "Opcje obserwowanych",
        "watching": "Dodaję do obserwowanych...",
        "unwatching": "Przestaję obserwować...",
        "mediastatistics": "Statystyki mediów",
        "mediastatistics-summary": "Statystyki dotyczące przesłanych typów plików. Dotyczą one tylko najnowszej wersji pliku. Starsze lub usunięte wersje plików nie są uwzględniane.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 bajt|$1 bajty|$1 bajtów}} ($2; $3%)",
+       "mediastatistics-bytespertype": "Całkowity rozmiar pliku dla tej sekcji: {{PLURAL:$1|$1 bajt|$1 bajty|$1 bajtów}} ($2; $3%).",
+       "mediastatistics-allbytes": "Całkowity rozmiar pliku dla wszystkich plików: {{PLURAL:$1|$1 bajt|$1 bajty|$1 bajtów}} ($2).",
        "mediastatistics-table-mimetype": "Typ MIME",
        "mediastatistics-table-extensions": "Możliwe rozszerzenia",
        "mediastatistics-table-count": "Liczba plików",
index 7c7355d..b7556e0 100644 (file)
@@ -87,7 +87,8 @@
                        "Rhcastilhos",
                        "Claudio Emanuel Weiler",
                        "Almondega",
-                       "Eduardo Addad de Oliveira"
+                       "Eduardo Addad de Oliveira",
+                       "Raphaelras"
                ]
        },
        "tog-underline": "Sublinhar links:",
        "contributions": "Contribuições {{GENDER:$1|do usuário|da usuária|do(a) usuário(a)}}",
        "contributions-title": "Contribuições {{GENDER:$1|do usuário|da usuária|do(a) usuário(a)}} $1",
        "mycontris": "Contribuições",
+       "anoncontribs": "Contribuições",
        "contribsub2": "Para {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "A conta de usuário \"$1\" não está registrada.",
        "nocontribs": "Não foram encontradas mudanças com este critério.",
index 87470bf..dc2bd50 100644 (file)
        "upload-form-label-select-file": "Label for the select file widget\n{{Identical|Select file}}",
        "upload-form-label-infoform-title": "Title for the information form\n{{Identical|Detail}}",
        "upload-form-label-infoform-name": "Label for the file name input\n{{Identical|Name}}",
+       "upload-form-label-infoform-name-tooltip": "The tooltip documenting the title field for the file - used as the filename on-wiki.\n\nIdentical to {{msg-mw|mwe-upwiz-tooltip-title}}.",
        "upload-form-label-infoform-description": "Label for the file description input\n{{Identical|Description}}",
+       "upload-form-label-infoform-description-tooltip": "The tooltip documenting the description fields on the details page.\n\nIdentical to {{msg-mw|mwe-upwiz-tooltip-description}}.",
        "upload-form-label-usage-title": "Title for the insert form showing how to use the uploaded item.\n{{Identical|Usage}}",
        "upload-form-label-usage-filename": "Label for the file name input\n{{Identical|Filename}}",
        "foreign-structured-upload-form-label-own-work": "[[File:Cross-wiki media upload dialog, December 2015 AB test option 1.png|thumb]] Label for own work confirmation checkbox",
        "unblock-summary": "{{doc-specialpagesummary|unblock}}",
        "blockip": "Used as the text of a link in the sidebar toolbox. Clicking this link takes you to [[Special:Block]], with a relevant username or IP address (e.g. \"Username\" on [[User talk:Username]], [[Special:Contributions/Username]], etc.) already filled in.\n\nParameters:\n* $1 - username, for GENDER support\n{{Identical|Block user}}",
        "blockip-legend": "Legend/Header for the fieldset around the input form of [[Special:Block]].\n\n{{Identical|Block user}}",
-       "blockiptext": "Used in the {{msg-mw|Blockip}} form in [[Special:Block]].\n\nRefers to {{msg-mw|Policy-url}}.\n\nThis message may follow the message {{msg-mw|Ipb-otherblocks-header}} and other block messages.\n\nSee also:\n* {{msg-mw|Unblockiptext}}",
+       "blockiptext": "Used in the {{msg-mw|Blockip}} form in [[Special:Block]].\n\nRefers to {{msg-mw|Policy-url}}.\n\nThis message may follow the message {{msg-mw|Ipb-otherblocks-header}} and other block messages.\n\nParameters:\n* $1 - CIDR suffix of the largest allowed IPv4 block (as an integer)\n* $2 - CIDR suffix of the largest allowed IPv6 block (as an integer)\n\nSee also:\n* {{msg-mw|Unblockiptext}}",
        "ipaddressorusername": "{{Identical|IP address or username}}",
        "ipbexpiry": "{{Identical|Expiry}}",
        "ipbreason": "Label of the block reason dropdown in [[Special:BlockIP]] and the unblock reason textfield in [{{fullurl:Special:IPBlockList|action=unblock}} Special:IPBlockList?action=unblock].\n\n{{Identical|Reason}}",
        "export-download": "A label of checkbox option in [[Special:Export]]\n\nSee also:\n* {{msg-mw|Exportlistauthors}}",
        "export-templates": "A label of checkbox option in [[Special:Export]]",
        "export-pagelinks": "This is an input in [[Special:Export]]",
+       "export-manual": "The label for the textarea input on [[Special:Export]]",
        "allmessages": "The title of the special page [[Special:AllMessages]].",
        "allmessagesname": "Used on [[Special:Allmessages]] meaning \"the name of the message\".\n{{Identical|Name}}",
        "allmessagesdefault": "The header for the lower row of each column in the table of [[Special:AllMessages]].",
        "expand_templates_preview": "{{Identical|Preview}}",
        "expand_templates_preview_fail_html": "Used as error message in Preview section of [[Special:ExpandTemplates]] page.",
        "expand_templates_preview_fail_html_anon": "Used as error message in Preview section of [[Special:ExpandTemplates]] page.",
+       "expand_templates_input_missing": "Used on [[Special:ExpandTemplates]] as an error message, if no input text was provided.",
        "pagelanguage": "Title for page Special:PageLanguage",
        "pagelang-name": "Input label for page name on Special:PageLanguage\n{{Identical|Page}}",
        "pagelang-language": "Language selector label for Special:PageLanguage\n{{Identical|Language}}",
        "mediastatistics-summary": "Used to explain that this page only does statistics over current versions of files. \"Old\" versions of files and deleted files are not counted.",
        "mediastatistics-nfiles": "{{optional}}\nEntry in table on [[Special:MediaStatistics]] that gives total number of files. $1 - number of files. $2 - percentage of total files that is this type (percent will be formatted to have about 3 interesting digits. e.g. 0.121 or 10.2)",
        "mediastatistics-nbytes": "Combined space of this type of file. Bytes and \"human units\" are shown so that users can better get a sense of magnitude when making comparisons.\n*$1 - total space in bytes.\n*$2 - total space in \"human units\" (i.e. KB, MB, GB, etc)\n*$3 - What percentage of the space all uploads take up does this file take up.",
-       "mediastatistics-bytespertype": "Combined space of one section of [[Special:MediaStatistics]]. \n*$1 - total space in bytes",
-       "mediastatistics-allbytes": "Combined space of all uploaded files. \n*$1 - total space in bytes",
+       "mediastatistics-bytespertype": "Combined space of one section of [[Special:MediaStatistics]]. \n*$1 - total space in bytes\n*$2 - total space in \"human units\" (i.e. KB, MB, GB, etc)\n*$3 - What percentage of the space all uploads take up does this file take up.",
+       "mediastatistics-allbytes": "Combined space of all uploaded files. \n*$1 - total space in bytes\n*$2 - total space in \"human units\" (i.e. KB, MB, GB, etc)",
        "mediastatistics-table-mimetype": "Header for table on Special:MediaStatistics. Column that lists MIME types (The values in this column will look like 'image/jpeg', and be linked to Special:MIMESearch).",
        "mediastatistics-table-extensions": "Header for column in tables on [[Special:MediaStatistics]] that lists possible extensions for a given file type. (The values in this column will be a comma separated list of file extensions, such as '.webm' or '.png, .apng').",
        "mediastatistics-table-count": "Column header on Special:MediaStatistics for the number of files column. The headers in this column use {{msg-mw|mediastatistics-nfiles}}.",
index fb46162..3e70b6e 100644 (file)
        "passwordreset-emailtext-ip": "Cineva (probabil dumneavoastră, de la adresa IP $1) a solicitat resetarea parolei \npentru {{SITENAME}} ($4). {{PLURAL:$3|Următorul cont este asociat|Următoarele conturi sunt asociate}}\ncu această adresă de e-mail:\n\n$2\n\n{{PLURAL:$3|Această parolă temporară va|Aceste parole temporare vor}} expira {{PLURAL:$5|într-o zi|în $5 zile}}.\nAr trebui să vă autentificați și să schimbați parola acum. Dacă altcineva a făcut această cerere \nsau dacă v-ați reamintit parola inițială și nu mai doriți să o schimbați,\nputeți ignora acest mesaj, continuând să utilizați vechea parolă.",
        "passwordreset-emailtext-user": "Utilizatorul $1 de pe {{SITENAME}} a solicitat o resetare a parolei dumneavoastră pentru {{SITENAME}} ($4). Următorul utilizator are {{PLURAL:$3|contul asociat|conturile asociate}} cu această adresă de e-mail:\n\n$2\n\n{{PLURAL:$3|Această parolă temporară va|Aceste parole temporare vor}} expira {{PLURAL:$5|într-o zi|în $5 zile}}.\nAr trebui să vă autentificați și să alegeți acum o nouă parolă. Dacă altcineva a făcut această solicitare, ori dacă v-ați reamintit parola originală și nu mai doriți modificarea ei, puteți ignora acest mesaj, continuând cu vechea parolă.",
        "passwordreset-emailelement": "Nume de utilizator: \n$1\n\nParolă temporară: \n$2",
-       "passwordreset-emailsentemail": "Dacă aceasta este o adresă de e-mail înregistrată pentru contul dumneavoastră, atunci se va trimite un e-mail de resetare a parolei.",
-       "passwordreset-emailsentusername": "Dacă există o adresă de e-mail înregistrată pentru contul dumneavoastră, atunci se va trimite un e-mail de resetare a parolei.",
+       "passwordreset-emailsentemail": "Dacă această adresă de e-mail este asociată contului dumneavoastră, atunci se va trimite un e-mail de resetare a parolei.",
+       "passwordreset-emailsentusername": "Dacă există o adresă de e-mail asociată acestui nume de utilizator, atunci se va trimite un e-mail de resetare a parolei.",
        "passwordreset-emailsent-capture": "Un mesaj de resetare a parolei a fost trimis, fiind afișat mai jos.",
        "passwordreset-emailerror-capture": "Un mesaj de resetare a parolei a fost generat (fiind afișat mai jos), dar trimiterea sa către {{GENDER:$2|utilizator}} a eșuat: $1",
        "changeemail": "Modificare sau înlăturare adresă de e-mail",
        "upload-form-label-select-file": "Selectează fișier",
        "upload-form-label-infoform-title": "Detalii",
        "upload-form-label-infoform-name": "Nume",
+       "upload-form-label-infoform-name-tooltip": "Un titlu unic, descriptiv, care va deveni și numele fișierului. Puteți folosi limbaj simplu cu spații. Nu includeți extensia fișierului.",
        "upload-form-label-infoform-description": "Descriere",
+       "upload-form-label-infoform-description-tooltip": "Descrieți pe scurt orice este notabil despre lucrare.\nPentru o fotografie, menționați principalele lucruri care sunt reprezentate, evenimentul sau locul.",
        "upload-form-label-usage-title": "Utilizare",
        "upload-form-label-usage-filename": "Numele fișierului",
        "foreign-structured-upload-form-label-own-work": "Aceasta este propria mea operă",
        "wlshowhideanons": "utilizatori anonimi",
        "wlshowhidepatr": "modificări patrulate",
        "wlshowhidemine": "modificările mele",
+       "wlshowhidecategorization": "categorisirea paginilor",
        "watchlist-options": "Opțiuni listă de pagini urmărite",
        "watching": "Se urmărește...",
        "unwatching": "Așteptați...",
        "export-download": "Salvează ca fișier",
        "export-templates": "Include formate",
        "export-pagelinks": "Includere pagini legate de la o adâncime de:",
+       "export-manual": "Adăugați pagini manual:",
        "allmessages": "Toate mesajele",
        "allmessagesname": "Nume",
        "allmessagesdefault": "Textul standard",
        "expand_templates_preview": "Previzualizare",
        "expand_templates_preview_fail_html": "<em>Întrucât la {{SITENAME}} este activat HTML brut și a avut loc o pierdere a sesiunii de date, previzualizarea a fost ascunsă ca măsură de precauție împotriva atacurilor prin JavaScript.</em>\n\n<strong>Dacă aceasta este o încercare legitimă de a previzualiza, încercați din nou.</strong>\nDacă nici astfel nu funcționează, încercați să [[Special:UserLogout|închideţi sesiunea]] şi să vă autentificaţi din nou.",
        "expand_templates_preview_fail_html_anon": "<em>Întrucât la {{SITENAME}} este activat HTML brut și nu v-ați autentificat, previzualizarea a fost ascunsă ca măsură de precauție împotriva atacurilor prin JavaScript.</em>\n\n<strong>Dacă aceasta este o încercare legitimă de a previzualiza, [[Special:UserLogin|autentificați-vă]] și încercați din nou.</strong>",
+       "expand_templates_input_missing": "Trebuie să furnizați cel puțin un text ca date de intrare.",
        "pagelanguage": "Selector limbă pagină",
        "pagelang-name": "Pagină",
        "pagelang-language": "Limbă",
        "pagelang-use-default": "Folosește limba implicită",
        "pagelang-select-lang": "Alege limba",
+       "pagelang-submit": "Trimite",
        "right-pagelang": "Modifică limba paginii",
        "action-pagelang": "modificați limba paginii",
        "log-name-pagelang": "Jurnal modificare limbă",
        "mediastatistics": "Statistici multimedia",
        "mediastatistics-summary": "Statistici despre tipurile fișierelor încărcate. Sunt incluse doar cele mai recente versiuni ale fișierelor. Versiunile mai vechi sau șterse ale fișierelor sunt excluse.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 octet|$1 octeți|$1 de octeți}} ($2; $3%)",
+       "mediastatistics-bytespertype": "Dimensiunea totală a fișierului pentru această secțiune: {{PLURAL:$1|$1 octet|$1 octeți|$1 de octeți}} ($2; $3%).",
+       "mediastatistics-allbytes": "Dimensiunea totală pentru toate fișierele: {{PLURAL:$1|$1 octet|$1 octeți|$1 de octeți}} ($2).",
        "mediastatistics-table-mimetype": "Tip MIME",
        "mediastatistics-table-extensions": "Extensii posibile",
        "mediastatistics-table-count": "Număr de fișiere",
        "mediastatistics-header-text": "Text",
        "mediastatistics-header-executable": "Executabile",
        "mediastatistics-header-archive": "Formate comprimate",
+       "mediastatistics-header-total": "Toate fișierele",
        "json-warn-trailing-comma": "$1 {{PLURAL:$1|virgulă|virgule|de virgule}} în exces înlăturat{{PLURAL:$1|ă|e}} din JSON",
        "json-error-unknown": "A apărut o problemă cu JSON. Eroare: $1",
        "json-error-depth": "S-a depășit adâncimea maximă a stivei",
index 88ab7a2..080d35e 100644 (file)
@@ -86,7 +86,8 @@
                        "Nzeemin",
                        "INS Pirat",
                        "Краснорядцева Елена",
-                       "Frhdkazan"
+                       "Frhdkazan",
+                       "Ядерный Трамвай"
                ]
        },
        "tog-underline": "Подчёркивание ссылок:",
        "passwordreset-emailtext-ip": "Кто-то (возможно, вы, с IP-адреса $1) запросил сброс пароля к вашей учётной записи в проекте {{SITENAME}} ($4).\nС этим адресом электронной почты {{PLURAL:$3|1=связана следующая учётная запись|связаны следующие учётные записи}}:\n\n$2\n\n{{PLURAL:$3|1=Этот временный пароль будет|Эти временные пароли будут}} действовать {{PLURAL:$5|$5 день|$5 дня|$5 дней|1=один день}}.\nВы должны представиться системе и выбрать новый пароль. \nЕсли вы не делали этого запроса, или вспомнили свой исходный пароль и не желаете его менять, \nто можете проигнорировать это сообщение и продолжить использовать свой старый пароль.",
        "passwordreset-emailtext-user": "Участник $1 из проекта {{SITENAME}} запросил сброс пароля для вашей учётной записи в проекте {{SITENAME}} ($4).\nС этим адресом электронной почты {{PLURAL:$3|1=связана следующая учётная запись|связаны следующие учётные записи}}:\n\n$2\n\n{{PLURAL:$3|1=Этот временный пароль будет|Эти временные пароли будут}} действовать {{PLURAL:$5|$5 день|$5 дней|$5 дня|1=один день}}.\nВы должны представиться системе и выбрать новый пароль.\nЕсли вы не делали этого запроса или вспомнили свой исходный пароль и не желаете его менять, \nто можете проигнорировать это сообщение и продолжить использовать свой старый пароль.",
        "passwordreset-emailelement": "Имя участника: \n$1\n\nВременный пароль: \n$2",
-       "passwordreset-emailsentemail": "Если это адрес электронной почты, на которую зарегистрирована ваша учётная запись, вам будет отправлено письмо для сброса пароля.",
-       "passwordreset-emailsentusername": "Если есть соответствующий зарегистрированный адрес электронной почты, будет отправлено письмо для восстановления пароля.",
+       "passwordreset-emailsentemail": "Если это адрес электронной почты связан с вашей учётной записью, вам будет отправлено письмо для сброса пароля.",
+       "passwordreset-emailsentusername": "Если есть адрес электронной почты, связанный с этим именем участника, то будет отправлено письмо для восстановления пароля.",
        "passwordreset-emailsent-capture": "Отправлено электронное письмо с информацией о сбросе пароля, текст которого можно увидеть ниже.",
        "passwordreset-emailerror-capture": "Было создано электронное письмо с информацией о сбросе пароля, текст которого можно увидеть ниже, однако его не удалось отправить {{GENDER:$2|участнику|участнице}} по следующей причине: $1",
        "changeemail": "Изменить или удалить адрес электронной почты",
        "showhideselectedversions": "Показать/скрыть выбранные версии",
        "editundo": "отменить",
        "diff-empty": "(нет различий)",
-       "diff-multi-sameuser": "(не {{PLURAL:$1|показана одна промежуточная версия|показаны $1 промежуточные версии|показано $1 промежуточных версий}} этого же участника)",
+       "diff-multi-sameuser": "(не {{PLURAL:$1|показана $1 промежуточная версия|показаны $1 промежуточные версии|показано $1 промежуточных версий}} этого же участника)",
        "diff-multi-otherusers": "(не {{PLURAL:$1|показана $1 промежуточная версия|показаны $1 промежуточные версии|показано $1 промежуточных версий}} {{PLURAL:$2|$2 участника|$2 участников}})",
        "diff-multi-manyusers": "({{PLURAL:$1|не показана $1 промежуточная версия, сделанная|не показаны $1 промежуточных версий, сделанных|не показаны $1 промежуточные версии, сделанные}} более чем {{PLURAL:$2|$2 участником|$2 участниками}})",
        "difference-missing-revision": "Не {{PLURAL:$2|1=найдена|найдены}} {{PLURAL:$2|$2 версия|$2 версий|$2 версии|1=одна из версий}} для этого сравнения ($1).\n\nТакое обычно случается при переходе по устаревшей ссылке сравнения версий для страницы, которая была удалена.\nПодробности могут быть в [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} журнале удалений].",
        "prefs-help-gender": "Этот параметр задавать необязательно.\nДвижок использует это значение, чтобы обращаться к вам и упоминать вас в правильном грамматическом роде.\nЭта информация будет общедоступной.",
        "email": "Электронная почта",
        "prefs-help-realname": "Вводить настоящее имя необязательно.\nЕсли вы заполните его, оно может быть использовано для указания авторства ваших работ.",
-       "prefs-help-email": "Адрес электронной почты указывать необязательно, но он будет необходим в том случае, если вы забудете пароль.",
+       "prefs-help-email": "Адрес почты не обязателен, но это единственный способ восстановить забытый пароль.",
        "prefs-help-email-others": "Он также позволит другим участникам связаться с вами по электронной почте с помощью ссылки на вашей персональной странице или на вашей странице обсуждения. При этом ваш адрес электронной почты не будет никому раскрыт.",
        "prefs-help-email-required": "Необходимо указать адрес электронной почты.",
        "prefs-info": "Основные сведения",
        "upload-form-label-select-file": "Выбрать файл",
        "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": "Коротко опишите всё самое важное об этом произведении. Для фото — укажите, что главное изображено, обстоятельства съёмки или место.",
        "upload-form-label-usage-title": "Использование",
        "upload-form-label-usage-filename": "Имя файла",
        "foreign-structured-upload-form-label-own-work": "Это моя собственная работа",
        "export-download": "Предложить сохранить как файл",
        "export-templates": "Включить шаблоны",
        "export-pagelinks": "Включить связанные страницы глубиной:",
+       "export-manual": "Добавить страницы вручную:",
        "allmessages": "Системные сообщения",
        "allmessagesname": "Сообщение",
        "allmessagesdefault": "Текст по умолчанию",
        "expand_templates_preview": "Предпросмотр",
        "expand_templates_preview_fail_html": "<em>Поскольку на сайте {{SITENAME}} с включенным «сырым» HTML произошла потеря данных сессии, предварительный просмотр скрыт в качестве меры предосторожности против JavaScript-атак.</em>\n\n<strong>Если это была правомерная попытка предварительного просмотра, пожалуйста, попробуйте ещё раз.</strong>\nЕсли у вас по-прежнему не получается, попробуйте [[Special:UserLogout|завершить сеанс работы]] и авторизоваться ещё раз.",
        "expand_templates_preview_fail_html_anon": "<em>Поскольку на сайте {{SITENAME}} включен «сырой» HTML, а вы не авторизовались, предварительный просмотр скрыт в качестве меры предосторожности против JavaScript-атак.</em>\n\n<strong>Если это правомерная попытка предварительного просмотра, пожалуйста, [[Special:UserLogin|войдите]] и попробуйте ещё раз.",
+       "expand_templates_input_missing": "Вы должны вставить хоть какой-то текст.",
        "pagelanguage": "Выбор языка страницы",
        "pagelang-name": "Страница",
        "pagelang-language": "Язык",
        "mediastatistics": "Медиа-статистика",
        "mediastatistics-summary": "Статистические данные о типах загруженных файлов. Она включает информацию только о последних версиях файлов. Более старые или удалённые версии файлов не учитываются.",
        "mediastatistics-nbytes": "$1 байт{{PLURAL:$1||а|ов}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Общий размер файла для этого раздела: $1 байт{{PLURAL:$1||ов|а}}.",
-       "mediastatistics-allbytes": "Общий размер всех файлов: $1 байт{{PLURAL:$1||ов|а}}.",
+       "mediastatistics-bytespertype": "Общий размер файла для этого раздела: $1 байт{{PLURAL:$1||ов|а}} ($2; $3%).",
+       "mediastatistics-allbytes": "Общий размер всех файлов: $1 байт{{PLURAL:$1||ов|а}} ($2).",
        "mediastatistics-table-mimetype": "MIME-тип",
        "mediastatistics-table-extensions": "Возможные расширения",
        "mediastatistics-table-count": "Количество файлов",
index 61415d6..67fcdff 100644 (file)
        "ipb-change-block": "एतैः विन्यासैः सदस्यं पुनः अवरुणद्धु ।",
        "ipb-confirm": "अवरोधं दृढयतु ।",
        "badipaddress": "अमान्यः ऐपिसङ्केतः ।",
-       "blockipsuccesssub": "अवरोधः सफलः ।",
+       "blockipsuccesssub": "अवरोधः सफलः",
        "blockipsuccesstext": "[[Special:Contributions/$1|$1]]इत्येतत् अवरुद्धम् । <br />\nअवरोधानां समीक्षां करोतु । [[Special:BlockList|IP अवरोधसूचिका]]",
        "ipb-blockingself": "भवान् स्वयम् अवरोधने निरतः । निश्चयेन स्वावरोधनम् इच्छति वा ?",
        "ipb-confirmhideuser": "सदस्यगोपनस्य पिञ्जं निपीडयन् भवान् सदस्यावरुद्धिं यतते । एतत् सर्वावलीषु सर्वप्रवेशसूचिकासु च सदस्यनाम निग्रहति । भवान् निश्चयेन एतत् कर्तुमिच्छति वा ?",
index 0484663..11dbca2 100644 (file)
        "tog-hideminor": "تازين تبديلين منجھہ معمولي تبديليون لڪايو",
        "tog-hidepatrolled": "تازيون نگرانيل تبديليون لڪايو",
        "tog-newpageshidepatrolled": "نَوَن صفحن واري فهرست مان نگرانيل صفحا لڪايو",
-       "tog-hidecategorization": "صÙ\81Ø­Ù\86 Ø¬Ø§ Ø°مرا لڪايو",
-       "tog-extendwatchlist": "تازه ترين بدران سموريون تبديليون ڏيکارڻ لاءِ ٽيٽ لسٽ کي وسيع ڪريو.",
+       "tog-hidecategorization": "صÙ\81Ø­Ù\86 Ø¬Ø§ Ø²مرا لڪايو",
+       "tog-extendwatchlist": "تازه ترين بدران سموريون تبديليون ڏيکارڻ لاءِ زير نظر فهرست کي وسيع ڪريو.",
        "tog-numberheadings": "سُرخين کي خودڪاراً نمبر ڏيو",
        "tog-showtoolbar": "سنوار اوزار ڏيکاريو",
        "tog-editondblclick": "ٻٽي ڪلڪ تي صفحا سنواريو",
        "tog-watchcreations": "منهنجا سرجيل صفحا ۽ منهنجا چاڙهيل فائيل منهنجي زيرِ نظر فهرست تي رکو",
-       "tog-watchdefault": "منهنجا ترميميل صفحا منهنجي ٽيٽ فهرست تي رکو",
-       "tog-watchmoves": "جيڪي صفحا ۽ فائيلس آئون چوريان، سي منهنجي ٽيٽ لسٽ ۾ شامل ڪريو.",
-       "tog-watchdeletion": "آئÙ\88Ù\86 Ø¬Ù\8aÚªÙ\8a ØµÙ\81حا Ú\8aاÙ\87Ù\8aاÙ\86Ø\8c Ø³Ù\8a Ù\85Ù\86Ù\87Ù\86جÙ\8a Ù½Ù\8aÙ½ فهرست تي رکو",
-       "tog-watchrollback": "انهن صفحن کي منهنجي ٽيٽ فهرست تي رکو، جن ۾ تبديلين کي مون واپس ورايو آهي.",
+       "tog-watchdefault": "منهنجا ترميميل صفحا ۽ فائيل  منهنجي زير نظر فهرست تي رکو",
+       "tog-watchmoves": "جيڪي صفحا ۽ فائيل آءُٗ چوريان، سي منهنجي زير نظر فهرست ۾ شامل ڪريو.",
+       "tog-watchdeletion": "آءÙ\8fÙ\97 Ø¬Ù\8aÚªÙ\8a ØµÙ\81حا Û½ Ù\81ائÙ\8aÙ\84  Ú\8aاÙ\87Ù\8aاÙ\86Ø\8c Ø³Ù\8a Ù\85Ù\86Ù\87Ù\86جÙ\8a Ø²Ù\8aر Ù\86ظر فهرست تي رکو",
+       "tog-watchrollback": "انهن صفحن کي منهنجي زير نظر فهرست تي رکو، جن ۾ تبديلين کي مون واپس ورايو آهي.",
        "tog-minordefault": "سمورين تبديلين کي بنان چئي معمولي ترميم تصور ڪريو",
        "tog-previewontop": "ترميمي باڪس مٿان پيش نگاهہ ڏيکاريو",
        "tog-previewonfirst": "پهرين ترميم تي پيش نگاهہ ڏيکاريو",
+       "tog-enotifwatchlistpages": "مونکي ايميل ڪريو جڏهن منهنجي زير نظر فهرست ڪا صفحو يا فائيل تبديل ڪيو وڃي",
        "tog-enotifusertalkpages": "منهنجي مباحثي صفحي ۾ تبديليءَ جي صورت ۾ مون کي برق ٽپال اماڻيو",
        "tog-enotifminoredits": "صفحن ۾ معمولي ترميمن جي صورت ۾ بہ مون کي برق ٽپال ڪريو",
        "tog-enotifrevealaddr": "پڌراين ۾ منهنجو برق ٽپال پتو ظاهر ڪريو.",
-       "tog-shownumberswatching": "Ù½Ù\8aÙ½Ù\8aÙ\86دÚ\99 Ù\8aÙ\88زرس Ø¬Ù\88 ØªØ¹Ø¯Ø§Ø¯ Ú\8fÙ\8aکارÙ\8aÙ\88",
+       "tog-shownumberswatching": "Ú\8fسÙ\86دÚ\99 Ù\8aÙ\88زرس Ø¬Ù\88 Ø§Ù\86Ú¯ Ú\8fÙ\8aکارÙ\8aÙ\88",
        "tog-oldsig": "موجوده دستخط",
        "tog-uselivepreview": "سڌي سنئين پيش نگاھہ استعمال ڪريو",
-       "tog-watchlisthideown": "ٽيٽ فهرست مان منهنجون ڪيل ترميمون لڪايو",
+       "tog-watchlisthideown": "زير نظر فهرست مان منهنجون ڪيل ترميمون لڪايو",
        "tog-watchlisthidebots": "ٽيٽ فهرست تان بوٽ جون ترميمون لڪايو",
        "tog-watchlisthideminor": "ٽيٽ فهرست تان معمولي ترميمون لڪايو",
-       "tog-watchlisthideliu": "لاگ اِن ٿيل يوزرس جون ڪيل ترميمون ٽيٽ فهرست ۾ نہ ڏيکاريو",
+       "tog-watchlisthideliu": "لاگ اِن ٿيل يوزرس جون ڪيل ترميمون زيرنظر فهرست ۾ نہ ڏيکاريو",
        "tog-watchlisthideanons": "ٽيٽ فهرست تان اڻڄاتل يوزر جون ترميمون لڪايو",
        "tog-watchlisthidecategorization": "صفحن جا زمرا لڪايو",
        "tog-ccmeonemails": "ٻين يوزرس ڏانهن منهنجي موڪليل برق ٽپال جو پرت مون کي اماڻيو",
@@ -44,6 +45,7 @@
        "tog-prefershttps": "هميشه محفوظ ڪنيڪشن استعمال ڪريو جڏهن لاگ اِن ٿيل هجو",
        "underline-always": "هميشہ",
        "underline-never": "ڪڏهن بہ نہ",
+       "editfont-style": "ايراضي جو فونٽ اسٽائيل سنواريو:",
        "sunday": "آچر",
        "monday": "سومر",
        "tuesday": "اڱارو",
@@ -62,7 +64,7 @@
        "february": "فيبروري",
        "march": "مارچ",
        "april": "اپريل",
-       "may_long": "مَي",
+       "may_long": "مَئي",
        "june": "جُونِ",
        "july": "جُولاءِ",
        "august": "آگسٽ",
@@ -74,7 +76,7 @@
        "february-gen": "فيبروري",
        "march-gen": "مارچ",
        "april-gen": "اپريل",
-       "may-gen": "مَي",
+       "may-gen": "مَئي",
        "june-gen": "جُونِ",
        "july-gen": "جُولاءِ",
        "august-gen": "آگسٽ",
@@ -86,7 +88,7 @@
        "feb": "فيبروري",
        "mar": "مارچ",
        "apr": "اپريل",
-       "may": "مَي",
+       "may": "مَئي",
        "jun": "جُونِ",
        "jul": "جُولاءِ",
        "aug": "آگسٽ",
        "february-date": "فيبروري $1",
        "march-date": "مارچ $1",
        "april-date": "اپريل $1",
-       "may-date": "مَي $1",
+       "may-date": "مَئي $1",
        "june-date": "جُون $1",
        "july-date": "جُولاءِ $1",
        "august-date": "آگسٽ $1",
        "qbedit": "سنواريو",
        "qbpageoptions": "هيءُ صفحو",
        "qbmyoptions": "منهنجا صفحا",
-       "faq": "ڪپوس",
+       "faq": "ڪپس",
        "faqpage": "Project:ڪپوس",
        "actions": "فعل",
        "namespaces": "نانءُ پولار:",
        "notloggedin": "لاگ اِن ٿيل ناهيو",
        "userlogin-noaccount": "کاتو نہ ٿا رکو؟",
        "userlogin-joinproject": "{{SITENAME}} ۾ شامل ٿيو",
-       "nologin": "پنهنجو کاتو نہ ٿا رکو؟ '''$1'''.",
+       "nologin": " کاتو نہ ٿا رکو؟ '''$1'''.",
        "nologinlink": "نئون کاتو کوليو",
        "createaccount": "کاتو کوليو",
        "gotaccount": "ڇا اڳي ئي کاتو رکو ٿا؟ '''$1'''.",
        "changeemail-submit": "برق ٽپال پتو بدلايو",
        "changeemail-throttled": "توهان تازو ئي لاگ اِن ٿيڻ جون هيڪانديون گھڻيون ڪوششون ڪيون آهن. مهرباني ڪري $1 لاءِ ترسي پوءِ وري ڪوشش ڪريو.",
        "changeemail-nochange": "مهرباني ڪري مختلف نئون برق ٽپال پتو ڄاڻايو.",
+       "resettokens": "ٻيهر ترتيب ڪرڻ جا ٽوڪن",
+       "resettokens-no-tokens": "ٻيهر ترتيب ڪرڻ لاءِ ڪي بہ ٽوڪن نہ آهن.",
        "resettokens-tokens": "ٽوڪنس:",
        "resettokens-token-label": "$1 (حاليہ قدر: $2)",
+       "resettokens-resetbutton": "چونڊيل ٽوڪن ٻيهر ترتيب ڪريو",
        "bold_sample": "گهري تحرير",
        "bold_tip": "گهري لکت",
        "italic_sample": "ترڇي لکت",
        "mergehistory-from": "ذريعہ صفحو:",
        "mergehistory-into": "مقصود صفحو:",
        "mergehistory-list": "ضمائتي ترميم سوانح",
+       "mergehistory-go": "ضم ڪرڻ لائق ترميمون ڏيکاريو",
        "mergehistory-submit": "ڀيرن کي ضم ڪريو",
        "mergehistory-empty": "ڪي بہ ڀيرا ضم ڪري نہ ٿا سگھجن.",
        "mergehistory-no-source": "مصدر صفحو $1 وجود نٿو رکي.",
index f8629b1..cc82198 100644 (file)
        "category-file-count-limited": "V tejto kategórii sa {{PLURAL:$1|nachádza jeden súbor|nachádzajú $1 súbory|nachádza $1 súborov}}",
        "listingcontinuesabbrev": "pokrač.",
        "index-category": "Indexované stránky",
-       "noindex-category": "neindexované stránky",
+       "noindex-category": "Neindexované stránky",
        "broken-file-category": "Stránky s odkazom na neexistujúci súbor",
        "about": "Projekt",
        "article": "Stránka s obsahom",
index a7a2bcf..82e7e41 100644 (file)
        "mediastatistics": "Statistika predstavnosti",
        "mediastatistics-summary": "Statistika o naloženih vrstah datotek. To vključuje samo najnovejše različice datotek. Stare in izbrisane različice niso vključene.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 bajt|$1 bajta|$1 bajti|$1 bajtov}} ($2; $3 %)",
-       "mediastatistics-bytespertype": "Skupna velikost datoteke za ta razdelek: $1 bajtov.",
-       "mediastatistics-allbytes": "Skupna velikost datoteke za vse datoteke: $1 bajtov.",
+       "mediastatistics-bytespertype": "Skupna velikost datoteke za ta razdelek: $1 {{PLURAL:$1|bajt|bajta|bajte|bajtov}} ($2; $3 %).",
+       "mediastatistics-allbytes": "Skupna velikost datoteke za vse datoteke: $1 {{PLURAL:$1|bajt|bajta|bajte|bajtov}} ($2).",
        "mediastatistics-table-mimetype": "Vrsta MIME",
        "mediastatistics-table-extensions": "Možne razširitve",
        "mediastatistics-table-count": "Število datotek",
index 5bf69da..89b1bcd 100644 (file)
        "permalink": "Lidhje e përhershme",
        "print": "Printo",
        "view": "Shiko",
-       "view-foreign": "Pamja <span class=\"notranslate\" translate=\"asnjë\">$1</span>",
+       "view-foreign": "Shikoje në $1",
        "edit": "Redakto",
        "edit-local": "Redakto përshkrimin lokal",
        "create": "Krijo",
        "powersearch-legend": "Kërkim i përparuar",
        "powersearch-ns": "Kërkim në hapësira:",
        "powersearch-togglelabel": "Zgjedh:",
-       "powersearch-toggleall": "Tâna",
-       "powersearch-togglenone": "Asnji",
+       "powersearch-toggleall": "Të gjitha",
+       "powersearch-togglenone": "Asnjë",
        "search-external": "Kërkim i jashtëm",
        "searchdisabled": "<p>Kërkimi me tekst të plotë është bllokuar tani për tani ngaqë shërbyesi është shumë i ngarkuar; shpresojmë ta nxjerrim prapë në gjendje normale pas disa punimeve. Deri atëherë mund të përdorni Google-in për kërkime:</p>",
        "preferences": "Parapëlqimet",
index 43c067f..a66f943 100644 (file)
        "laggedslavemode": "<strong>Varning:</strong> Sidan kan sakna de senaste uppdateringarna.",
        "readonly": "Databasen är låst",
        "enterlockreason": "Ange varför databasen låsts och inkludera en uppskattning om när låsningen kommer att hävas",
-       "readonlytext": "Databasen är tillfälligt låst för nya inlägg och andra modifieringar, förmodligen på grund av rutinmässigt underhåll, efter vilket den kommer den att återgå till normalläge.\n\nDen systemadministratör som låste den har angivit följande förklaring: $1",
+       "readonlytext": "Databasen är tillfälligt låst för nya inlägg och andra modifieringar, förmodligen på grund av rutinmässigt underhåll, efter vilket den kommer att återgå till normalläge.\n\nDen systemadministratör som låste den har angivit följande förklaring: $1",
        "missing-article": "Databasen hittade inte texten för en sida som den borde ha funnit, med namnet \"$1\" $2.\n\nDetta orsakas oftast av att man följer en inaktuell länk till en jämförelse mellan versioner (diff) eller en historiklänk för en sida som raderats.\n\nOm inte så är fallet, kan du ha hittat en bugg i mjukvaran.\nRapportera gärna problemet till någon [[Special:ListUsers/sysop|administratör]], ange då URL:en (webbadressen).",
        "missingarticle-rev": "(versionsnummer: $1)",
        "missingarticle-diff": "(Skillnad: $1, $2)",
        "passwordreset-emailtext-ip": "Någon (förmodligen du, från IP-adressen $1) begärde en återställning av ditt lösenord för {{SITENAME}} ($4). Följande användar{{PLURAL:$3|konto är förknippad|konton är förknippade}} med denna e-postadress:\n\n$2\n\n{{PLURAL:$3|Detta|Dessa}} tillfälliga lösenord kommer att gå ut om {{PLURAL:$5|en dag|$5 dagar}}.\nDu bör logga in och välja ett nytt lösenord nu. Om någon annan gjorde denna begäran, eller om du kommer ihåg ditt ursprungliga lösenord, och inte längre önskar ändra det, kan du ignorera detta meddelande och fortsätta använda ditt gamla lösenord.",
        "passwordreset-emailtext-user": "Användaren $1 på {{SITENAME}} begärde en återställning av ditt lösenord för {{SITENAME}} ($4). Följande användar{{PLURAL:$3|konto är förknippad|konton är förknippade}} med denna e-postadress:\n\n$2\n\n{{PLURAL:$3|Detta|Dessa}} tillfälliga lösenord kommer att gå ut om {{PLURAL:$5|en dag|$5 dagar}}.\nDu bör logga in och välja ett nytt lösenord nu. Om någon annan gjorde denna begäran, eller om du kommer ihåg ditt ursprungliga lösenord, och inte längre önskar ändra det, kan du ignorera detta meddelande och fortsätta använda ditt gamla lösenord.",
        "passwordreset-emailelement": "Användarnamn: \n$1\n\nTillfälligt lösenord: \n$2",
-       "passwordreset-emailsentemail": "Om detta är en registrerad e-postadress för ditt konto kommer en lösenordsåterställning skickas via e-post.",
-       "passwordreset-emailsentusername": "Om det finns en motsvarande e-postadress för ditt konto kommer en lösenordsåterställning skickas via e-post.",
+       "passwordreset-emailsentemail": "Om denna e-postadress är associerad med ditt konto kommer en lösenordsåterställning skickas via e-post.",
+       "passwordreset-emailsentusername": "Om det finns en e-postadress som associeras med detta användarnamn kommer en lösenordsåterställning skickas via e-post.",
        "passwordreset-emailsent-capture": "En lösenordsåterställning via e-post har skickats, som visas nedan.",
        "passwordreset-emailerror-capture": "En lösenordsåterställning via e-post har skapats, som visas nedan, men det gick inte att skicka den till {{GENDER:$2|användaren}}: $1",
        "changeemail": "Ändra eller ta bort e-postadress",
        "copyrightwarning2": "Observera att alla bidrag till {{SITENAME}} kan komma att redigeras, ändras, eller tas bort av andra deltagare. Om du inte vill se din text förändrad efter andras gottfinnade skall du inte skriva in någon text här.<br />\nDu lovar oss också att du skrev texten själv, eller kopierade från kulturellt allmängods som inte skyddas av upphovsrätt, eller liknande källor - se $1 för detaljer.\n'''LÄGG INTE UT UPPHOVSRÄTTSSKYDDAT MATERIAL HÄR UTAN TILLÅTELSE!'''",
        "editpage-cannot-use-custom-model": "Innehållsmodellen för denna sida kan inte ändras.",
        "longpageerror": "'''FEL: Texten som du försöker spara är {{PLURAL:$1|en kilobyte|$1 kilobyte}}, vilket är mer än det maximalt tillåtna {{PLURAL:$2|en kilobyte|$2 kilobyte}}.'''\nDen kan inte sparas.",
-       "readonlywarning": "<strong>VARNING: Databasen är tillfälligt låst för underhåll. Du kommer inte att kunna spara dina ändringar just nu.\nDet kan vara klokt att kopiera texten till ett textdokument som sparas på din dator tills vidare.</strong>\n\nSystemadministratören som låste databasen gav följande förklaring: $1",
+       "readonlywarning": "<strong>VARNING: Databasen är tillfälligt låst för underhåll. Du kommer inte att kunna spara dina ändringar just nu.</strong>\nDet kan vara klokt att kopiera texten till ett textdokument som sparas på din dator tills vidare.\n\nSystemadministratören som låste databasen gav följande förklaring: $1",
        "protectedpagewarning": "'''Varning: Den här sidan har låsts så att bara användare med administratörsrättigheter kan redigera den.'''\nDen senaste loggposten tillhandahålls nedan som referens:",
        "semiprotectedpagewarning": "'''Observera:''' Denna sida har låsts så att endast registrerade användare kan redigera den.\nDen senaste loggposten tillhandahålls nedan som referens:",
        "cascadeprotectedwarning": "'''Varning:''' Den här sidan har låsts så att bara användare med administratörsrättigheter kan redigera den, eftersom den är inkluderad på följande {{PLURAL:$1|sida|sidor}} som skyddats med kaskaderande skrivskydd:",
        "permissionserrors": "Behörighetsfel",
        "permissionserrorstext": "Du har inte behörighet att göra det du försöker göra, av följande {{PLURAL:$1|anledning|anledningar}}:",
        "permissionserrorstext-withaction": "Du har inte behörighet att $2, av följande {{PLURAL:$1|anledning|anledningar}}:",
-       "contentmodelediterror": "Du kan inte redigera denna sidversion eftersom dess innehållsmodell är <code>$1</code> som skiljer sig från sidans aktuella innehållsmodell <code>$2</code>.",
+       "contentmodelediterror": "Du kan inte redigera den här sidversionen eftersom dess innehållsmodell är <code>$1</code> som skiljer sig från sidans aktuella innehållsmodell <code>$2</code>.",
        "recreate-moveddeleted-warn": "'''Varning: Du återskapar en sida som tidigare raderats.'''\n\nDu bör överväga om det är lämpligt att fortsätta redigera den här sidan.\nRaderings- och sidflyttningsloggen för den här sidan visas här som hjälp:",
        "moveddeleted-notice": "Den här sidan har raderats.\nRaderings- och sidflyttningsloggen för sidan visas nedan som referens.",
        "moveddeleted-notice-recent": "Tyvärr, denna sida raderades nyligen (inom de senaste 24 timmarna).\nLoggen för radering och flyttning av sidan visas nedan som referens.",
        "upload-form-label-select-file": "Välj fil",
        "upload-form-label-infoform-title": "Detaljer",
        "upload-form-label-infoform-name": "Namn",
+       "upload-form-label-infoform-name-tooltip": "En unik beskrivande titel för filen, som kommer att fungera som ett filnamn. Du kan använda klarspråk med mellanslag. Ta inte med filändelsen.",
        "upload-form-label-infoform-description": "Beskrivning",
+       "upload-form-label-infoform-description-tooltip": "Beskriv kortfattat allt anmärkningsvärt om verket.\nFör ett foto, nämn huvudmotiv, tillfälle eller plats.",
        "upload-form-label-usage-title": "Användning",
        "upload-form-label-usage-filename": "Filnamn",
        "foreign-structured-upload-form-label-own-work": "Detta är mitt eget verk",
        "foreign-structured-upload-form-label-own-work-message-shared": "Jag intygar att jag äger upphovsrätten för denna fil och samtycker till att oåterkalleligen släppa filen på Wikimedia Commons under licensen \n[https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Attribution-ShareAlike 4.0] och jag accepterar [https://wikimediafoundation.org/wiki/Terms_of_Use villkoren för användning].",
        "foreign-structured-upload-form-label-not-own-work-message-shared": "Om du inte äger upphovsrätten för denna fil eller om du önskar att släppa den under en annan licens bör du överväga att använda [https://commons.wikimedia.org/wiki/Special:UploadWizard uppladdningsguiden på Commons].",
        "foreign-structured-upload-form-label-not-own-work-local-shared": "Du kanske skulle vilja prova att använda [[Special:Upload|uppladdningssidan på {{SITENAME}}]] om webbplatsens policys tillåter att denna fil laddas upp.",
-       "foreign-structured-upload-form-2-label-intro": "Tack för att du donera en bild för att användas på {{SITENAME}}. Du bör endast fortsätta om det uppfyller flera villkor:",
-       "foreign-structured-upload-form-2-label-ownwork": "Det måste vara helt och hållet <strong>din egen skapelse</strong>, inte bara taget från internet",
-       "foreign-structured-upload-form-2-label-noderiv": "Det får inte innehålla <strong>något verk av någon annan</strong>, eller inspirerats av dem",
-       "foreign-structured-upload-form-2-label-useful": "Det bör vara <strong>pedagogisk och användbar</strong> för att undervisa andra",
-       "foreign-structured-upload-form-2-label-ccbysa": "Det måste vara <strong>OK att publicera för evigt</strong> på internet under [https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Erkännande-DelaLika 4.0]-licensen",
+       "foreign-structured-upload-form-2-label-intro": "Tack för att du donera en bild för att användas på {{SITENAME}}. Du bör endast fortsätta om den uppfyller flera villkor:",
+       "foreign-structured-upload-form-2-label-ownwork": "Den måste vara helt och hållet <strong>din egen skapelse</strong>, inte bara tagen från Internet",
+       "foreign-structured-upload-form-2-label-noderiv": "Den får inte innehålla <strong>något verk av någon annan</strong>, eller inspirerats av dem",
+       "foreign-structured-upload-form-2-label-useful": "Den bör vara <strong>pedagogisk och användbar</strong> för att undervisa andra",
+       "foreign-structured-upload-form-2-label-ccbysa": "Den måste vara <strong>OK att publicera för evigt</strong> på Internet under [https://creativecommons.org/licenses/by-sa/4.0/ Creative Commons Erkännande-DelaLika 4.0]-licensen",
        "foreign-structured-upload-form-2-label-alternative": "Om inte alla av ovanstående är stämmer in, kan du fortfarande ha möjlighet att ladda upp denna fil med hjälp av [https://commons.wikimedia.org/wiki/Special:UploadWizard Commons Upload Wizard], så länge den är tillgänglig under en fri licens.",
-       "foreign-structured-upload-form-2-label-termsofuse": "Genom att ladda upp filen, att du äger upphovsrätten till denna fil, samt att du samtycker till att oåterkalleligt släppa denna fil till Wikimedia Commons under Creative Commons Erkännande-DelaLika 4.0-licensen, samt att du samtycker till WIkimeidas  [https://wikimediafoundation.org/wiki/Terms_of_Use villkor för användning].",
+       "foreign-structured-upload-form-2-label-termsofuse": "Genom att ladda upp filen bekräftar du att du äger upphovsrätten till denna fil, samt att du samtycker till att oåterkalleligt släppa denna fil till Wikimedia Commons under Creative Commons Erkännande-DelaLika 4.0-licensen, samt att du samtycker till Wikimedias  [https://wikimediafoundation.org/wiki/Terms_of_Use användarvilkor].",
        "foreign-structured-upload-form-3-label-question-website": "Laddade du ner den här bilden från en webbplats eller hittade du den genom en bildsökning?",
-       "foreign-structured-upload-form-3-label-question-ownwork": "Har du skapa denna bild (tagit bilden, skissat, ritat, etc.) själv?",
-       "foreign-structured-upload-form-3-label-question-noderiv": "Innehåller det, eller är det inspirerade av arbete som ägs av någon annan, som t.ex. en logotyp?",
+       "foreign-structured-upload-form-3-label-question-ownwork": "Har du skapat denna bild (tagit bilden, skissat, ritat, etc.) själv?",
+       "foreign-structured-upload-form-3-label-question-noderiv": "Innehåller den, eller är den inspirerade av arbete som ägs av någon annan, som t.ex. en logotyp?",
        "foreign-structured-upload-form-3-label-yes": "Ja",
        "foreign-structured-upload-form-3-label-no": "Nej",
-       "foreign-structured-upload-form-3-label-alternative": "Tyvärr har detta verktyg i detta fall inte stöd för att ladda upp denna fil. Du kan fortfarande ladda upp den med hjälp av [https://commons.wikimedia.org/wiki/Special:UploadWizard Commons uppladdningsguide] så länge den är tillgänglig under en fri licens.",
+       "foreign-structured-upload-form-3-label-alternative": "Tyvärr har detta verktyg i detta fall inte stöd för att ladda upp den här filen. Du kan fortfarande ladda upp den med hjälp av [https://commons.wikimedia.org/wiki/Special:UploadWizard Commons uppladdningsguide] så länge den är tillgänglig under en fri licens.",
        "foreign-structured-upload-form-4-label-good": "Med detta verktyg kan du ladda upp pedagogiska bilder som du har skapat och fotografier som du har tagit, som inte innehåller verk som någon annan äger.",
        "foreign-structured-upload-form-4-label-bad": "Du kan inte ladda upp bilder som hittats på en sökmotor eller har laddats ned från andra webbplatser.",
        "backend-fail-stream": "Kunde inte strömma filen $1.",
        "export-download": "Ladda ner som fil",
        "export-templates": "Inkludera mallar",
        "export-pagelinks": "Inkludera länkade sidor till ett djup på:",
+       "export-manual": "Lägg till sidor manuellt:",
        "allmessages": "Systemmeddelanden",
        "allmessagesname": "Namn",
        "allmessagesdefault": "Standardtext",
        "mediastatistics": "Mediastatistik",
        "mediastatistics-summary": "Statistik om uppladdade filtyper. Detta inkluderar bara den senaste versionen av en fil. Äldre eller raderade filversioner exkluderas.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 byte}} ($2; $3%)",
-       "mediastatistics-bytespertype": "Total filstorlek för detta avsnitt: $1 byte.",
-       "mediastatistics-allbytes": "Total filstorlek för alla filer: $1 byte.",
+       "mediastatistics-bytespertype": "Total filstorlek för detta avsnitt: {{PLURAL:$1|$1 byte}} ($2; $3%).",
+       "mediastatistics-allbytes": "Total filstorlek för alla filer: {{PLURAL:$1|$1 byte}} ($2).",
        "mediastatistics-table-mimetype": "MIME-typ",
        "mediastatistics-table-extensions": "Möjliga tillägg",
        "mediastatistics-table-count": "Antal filer",
index 88b73fd..861a294 100644 (file)
        "nstab-template": "Шаблон",
        "nstab-help": "Кӯмак",
        "nstab-category": "Гурӯҳ",
+       "mainpage-nstab": "Саҳифаи аслӣ",
        "nosuchaction": "Чунин амале вуҷуд надорад",
        "nosuchactiontext": "Амали дар URL мушаххасшуда номӯътабар аст.\nШумо шояд хато пайванди URL-ро ворид намудед, ё пайванди нодурустро пайгирӣ кардед.\nШояд ин як хатогие дар нармафзоре бошад, ки аз тарафи {{SITENAME}} истифода мешавад.",
        "nosuchspecialpage": "Чунин саҳифаи вижа вуҷуд надорад",
        "createaccountreason": "Сабаб:",
        "createacct-reason": "Сабаб",
        "createacct-reason-ph": "Барои чӣ ҳисоби дигареро эҷод карда истодаед",
-       "createacct-captcha": "Бозрасии амниятӣ",
-       "createacct-imgcaptcha-ph": "Матни болоро ворид кунед",
        "createacct-submit": "Ҳисоби худро созед",
        "createacct-another-submit": "Ҳисоби дигаре созед",
        "createacct-benefit-heading": "{{SITENAME}} тавассути одамони мисли шумо сохта шудааст.",
        "number_of_watching_users_pageview": "[$1 пайгирикунанда {{PLURAL:$1|корбар|корбарон}}]",
        "rc_categories": "Маҳдудият ба гурӯҳҳо (бо аломати \"|\" ҷудо кунед)",
        "rc_categories_any": "Ҳар кадом",
+       "rc-change-size-new": "$1 {{PLURAL:$1|байт}} пас аз тағйир",
        "newsectionsummary": "/* $1 */ бахши ҷадид",
        "rc-enhanced-expand": "Намоиши ҷузъиёт",
        "rc-enhanced-hide": "Пинҳони ҷузъиёт",
        "suppress": "Назорат",
        "booksources": "Манбаҳои китобҳо",
        "booksources-search-legend": "Ҷустуҷӯи сарчашмаҳои китоб",
+       "booksources-search": "Ҷустуҷӯ",
        "booksources-text": "Дер зер феҳристи пайвандҳо ба сомонаҳое, ки китобҳои нав ва кӯҳна мефурӯшанд, оварда шудааст. Мумкин аст, иттилооти бештарро дар бораи китобҳои ҷустуҷӯ кардаатон дошта бошанд:",
        "specialloguserlabel": "Иҷрокунанда:",
        "speciallogtitlelabel": "Ҳадаф (унвон ё корбар):",
        "wlheader-showupdated": "Саҳифаҳое, ки пас аз охирин сар заданатон ба онҳо тағйир кардаанд '''пурранг''' нишон дода шудаанд",
        "wlnote": "Дар зер {{PLURAL:$1|охирин тағйир|'''$1''' охирин тағйирот}} дар $2 соати охир {{PLURAL:омадааст|омадаанд}}.",
        "wlshowlast": "Намоиши охирин $1 соат $2 рӯзҳо",
+       "watchlistall2": "ҳама",
        "watchlist-options": "Ихтиёроти феҳристи пайгириҳо",
        "watching": "Пайгири...",
        "unwatching": "Тавқифи пайгири...",
        "contributions": "Ҳиссагузориҳои {{GENDER:$1|корбар}}",
        "contributions-title": "Ҳиссагузориҳои корбар барои $1",
        "mycontris": "Ҳиссагузориҳо",
+       "anoncontribs": "Саҳмгузориҳо",
        "contribsub2": "Барои {{GENDER:$3|$1}} ($2)",
        "nocontribs": "Ҳеҷ тағйире бо ин мушаххасот пайдо нашуд.",
        "uctop": "(кунунӣ)",
        "movesubpage": "{{PLURAL:$1|Зерсаҳифа|Зерсаҳифаҳо}}",
        "movereason": "Сабаб:",
        "revertmove": "вогардонӣ",
-       "delete_and_move": "Ҳазф ва кӯчонидан",
        "delete_and_move_text": "==Ниёз ба ҳазф==\n\nМақолаи мақсад \"[[:$1]]\" вуҷуд дорад. Оё мехоҳед онро ҳазф кунед то интиқол мумкин шавад?",
        "delete_and_move_confirm": "Бале, саҳифа ҳазф шавад",
        "delete_and_move_reason": "Ҳазф шуд барои мумкин шудани кӯчонидан",
        "tooltip-ca-nstab-main": "Дидани саҳифаи мӯҳтавиёт",
        "tooltip-ca-nstab-user": "Намоиши саҳифаи корбар",
        "tooltip-ca-nstab-media": "Дидани саҳифаи расона",
-       "tooltip-ca-nstab-special": "Ð\98н Ñ\81аҳиÑ\84аи Ð¼Ð°Ñ\85Ñ\81Ñ\83Ñ\81 Ð¼ÐµÐ±Ð¾Ñ\88ад, Ð¨Ñ\83мо Ð¾Ð½Ñ\80о Ð²Ð¸Ñ\80оиÑ\88 ÐºÐ°Ñ\80да Ð½Ð°Ð¼ÐµÑ\82авонед",
+       "tooltip-ca-nstab-special": "Ð\98н Ñ\82аÑ\80Ò·Ñ\83ма Ñ\88оÑ\8fд Ð½Ð¸Ñ\91з Ð±Ð° Ð±Ð°Ñ\80ӯзÑ\88ави Ð´Ð¾Ñ\88Ñ\82а Ð±Ð¾Ñ\88ад.",
        "tooltip-ca-nstab-project": "Намоиши саҳифаи лоиҳа",
        "tooltip-ca-nstab-image": "Дидани саҳифаи парванда",
        "tooltip-ca-nstab-mediawiki": "Дидани пайғоми системавӣ",
        "spambot_username": "Спамтозакуни МедиаВики",
        "spam_reverting": "Вогардони ба охирин нусхае, ки пайванде ба $1 надорад",
        "spam_blanking": "Ҳамаи нусхаҳои пайвандҳо $1 доштан, дар ҳоли холӣ кардан",
+       "pageinfo-toolboxlink": "Иттилооти саҳифа",
        "pageinfo-contentpage-yes": "Бале",
        "pageinfo-protect-cascading-yes": "Бале",
        "markaspatrolleddiff": "Ба унвони баррасишуда аломат бизан",
        "feedback-message": "Пайём:",
        "feedback-subject": "Мавзӯъ:",
        "feedback-submit": "Ирсол",
+       "searchsuggest-search": "Ҷустуҷӯ",
        "expandtemplates": "Бастдодани шаблонҳо",
        "expand_templates_intro": "Ин саҳифаи вижа матнеро дарёфт карда ва тамоми шаблонҳои ба кор рафта дар онро ба таври бозгаште баст медиҳад. Ҳамчунин тобеҳои таҷзеҳ\n<nowiki>{{</nowiki>#language:...}}, ва мутағйирҳое чун\n<nowiki>{{</nowiki>CURRENTDAY}}&mdash;ро ҳам баст медиҳад – дар воқеъ тақрибан ҳар чиро ки дохили ду акулот бошад.\nИн кор бо садо задани марҳилаи таҷзеҳи марбут дар худи МедиаВики сурат мегирад.",
        "expand_templates_title": "Унвони мавзӯъ, барои {{FULLPAGENAME}} ва ғайра.:",
index 95019d6..c91db68 100644 (file)
@@ -29,6 +29,7 @@
        "tog-hideminor": "ซ่อนการแก้ไขเล็กน้อยในหน้าปรับปรุงล่าสุด",
        "tog-hidepatrolled": "ซ่อนการแก้ไขที่ตรวจสอบแล้วในหน้าปรับปรุงล่าสุด",
        "tog-newpageshidepatrolled": "ซ่อนหน้าที่ตรวจสอบแล้วในรายการหน้าใหม่",
+       "tog-hidecategorization": "ซ่อนการจัดหมวดหมู่หน้า",
        "tog-extendwatchlist": "ขยายรายการเฝ้าดูให้แสดงการเปลี่ยนแปลงทั้งหมด ไม่เพียงการเปลี่ยนแปลงล่าสุด",
        "tog-usenewrc": "จัดกลุ่มการเปลี่ยนแปลงแบ่งตามหน้าในรายการปรับปรุงล่าสุดและรายการเฝ้าดู",
        "tog-numberheadings": "กำหนดเลขหัวเรื่องอัตโนมัติ",
@@ -59,6 +60,7 @@
        "tog-watchlistreloadautomatically": "โหลดรายการเฝ้าดูใหม่อัตโนมัติเมื่อใดที่มีการเปลี่ยนตัวกรอง (ต้องการจาวาสคริปต์)",
        "tog-watchlisthideanons": "ซ่อนการแก้ไขโดยผู้ใช้นิรนามจากรายการเฝ้าดู",
        "tog-watchlisthidepatrolled": "ซ่อนการแก้ไขที่ตรวจสอบแล้วจากรายการเฝ้าดู",
+       "tog-watchlisthidecategorization": "ซ่อนการจัดหมวดหมู่หน้า",
        "tog-ccmeonemails": "ส่งสำเนาอีเมลที่ฉันส่งหาผู้อื่นให้ฉัน",
        "tog-diffonly": "ไม่แสดงเนื้อหาหน้าใต้ผลต่าง",
        "tog-showhiddencats": "แสดงหมวดหมู่ที่ซ่อนอยู่",
        "passwordreset-emailtext-ip": "บางคน (ซึ่งอาจเป็นคุณ จากเลขที่อยู่ไอพี $1) ขอตั้งรหัสผ่านของคุณใหม่บน{{SITENAME}} ($4) บัญชีผู้ใช้ดังกล่าวเกี่ยวข้องกับที่อยู่อีเมลนี้:\n\n$2\n\n{{PLURAL:$3|รหัสผ่านชั่วคราวนี้|รหัสผ่านชั่วคราวเหล่านี้}}จะหมดอายุใน $5 วัน\nตอนนี้คุณควรล็อกอินและเลือกรหัสผ่านใหม่ หากบุคคลอื่นขอตั้งรหัสผ่านใหม่นี้ หรือคุณจำรหัสผ่านเดิมของคุณได้แล้ว และคุณไม่ต้องการเปลี่ยนรหัสผ่านอีก คุณอาจละเลยข้อความนี้และใช้รหัสผ่านเดิมของคุณต่อไป",
        "passwordreset-emailtext-user": "ผู้ใช้ $1 บน {{SITENAME}} ขอตั้งรหัสผ่านของคุณใหม่สำหรับ {{SITENAME}} ($4) {{PLURAL:$3||}}บัญชีผู้ใช้ดังกล่าวเกี่ยวข้องกับที่อยู่อีเมลนี้:\n\n$2\n\n{{PLURAL:$3|รหัสผ่านชั่วคราวนี้|รหัสผ่านชั่วคราวเหล่านี้}}จะหมดอายุใน $5 วัน\nตอนนี้คุณควรล็อกอินและเลือกรหัสผ่านใหม่ หากบุคคลอื่นขอตั้งรหัสผ่านใหม่นี้ หรือคุณจำรหัสผ่านเดิมของคุณได้แล้ว และคุณไม่ต้องการเปลี่ยนรหัสผ่านอีก คุณอาจละเลยข้อความนี้และใช้รหัสผ่านเดิมของคุณต่อไป",
        "passwordreset-emailelement": "ชื่อผู้ใช้: \n$1\n\nรหัสผ่านชั่วคราว: \n$2",
-       "passwordreset-emailsentemail": "หาà¸\81à¸\99ีà¹\88à¸\84อà¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\97ีà¹\88ลà¸\87à¸\97ะà¹\80à¸\9aียà¸\99สำหรับบัญชีของคุณ เช่นนั้นจะส่งอีเมลตั้งรหัสผ่านใหม่",
-       "passwordreset-emailsentusername": "หาà¸\81à¸\99ีà¹\88à¸\84ือà¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\97ีà¹\88ลà¸\87à¸\97ะà¹\80à¸\9aียà¸\99à¹\84วà¹\89à¸\94à¹\89วยà¸\81ัà¸\99 เช่นนั้นจะส่งอีเมลตั้งรหัสผ่านใหม่",
+       "passwordreset-emailsentemail": "หาà¸\81à¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\99ีà¹\89สัมà¸\9eัà¸\99à¸\98à¹\8cà¸\81ับบัญชีของคุณ เช่นนั้นจะส่งอีเมลตั้งรหัสผ่านใหม่",
+       "passwordreset-emailsentusername": "หาà¸\81มีà¸\97ีà¹\88อยูà¹\88อีà¹\80มลà¸\97ีà¹\88ลà¸\87à¸\97ะà¹\80à¸\9aียà¸\99à¹\84วà¹\89à¸\94à¹\89วยà¸\81ัà¸\9aà¸\8aืà¹\88อà¸\9cูà¹\89à¹\83à¸\8aà¹\89à¸\99ีà¹\89 เช่นนั้นจะส่งอีเมลตั้งรหัสผ่านใหม่",
        "passwordreset-emailsent-capture": "อีเมลตั้งรหัสผ่านใหม่ถูกส่งไปแล้ว ซึ่งแสดงด้านล่าง",
        "passwordreset-emailerror-capture": "อีเมลตั้งรหัสผ่านใหม่ถูกสร้างขึ้นแล้ว ซึ่งแสดงด้านล่าง แต่ไม่สามารถส่งไปยัง{{GENDER:$2|ผู้ใช้}}: $1",
        "changeemail": "เปลี่ยนหรือลบที่อยู่อีเมล",
        "copyrightwarning": "โปรดระลึกว่างานเขียนทั้งหมดใน {{SITENAME}} ถือว่าเผยแพร่ภายใต้ $2 (ดูรายละเอียดทาง $1)\nหากคุณไม่ต้องการให้งานของคุณถูกแก้ไขและกระจายได้ตามใจ ก็อย่าส่งเข้ามา<br />\nนอกจากนี้ คุณยังสัญญาเราว่าคุณเขียนงานด้วยตนเอง หรือคัดลอกจากสาธารณสมบัติหรือทรัพยากรเสรีที่คล้ายกัน\n<strong>อย่าส่งงานมีลิขสิทธิ์โดยไม่ได้รับอนุญาต!</strong>",
        "copyrightwarning2": "โปรดระลึกว่างานเขียนทั้งหมดใน {{SITENAME}} อาจถูกผู้เขียนอื่นแก้ไข เปลี่ยนแปลงหรือนำออก\nหากคุณไม่ต้องการให้งานของคุณถูกแก้ไข ก็อย่าส่งเข้ามา<br />\nนอกจากนี้ คุณยังสัญญาเราว่าคุณเขียนงานด้วยตนเอง หรือคัดลอกจากสาธารณสมบัติหรือทรัพยากรเสรีที่คล้ายกัน (ดูรายละเอียดที่ $1)\n<strong>อย่าส่งงานมีลิขสิทธิ์โดยไม่ได้รับอนุญาต!</strong>",
        "longpageerror": "<strong>ข้อผิดพลาด: ข้อความที่คุณส่งมีขนาด $1 กิโลไบต์\nซึ่งเกินสูงสุด $2 กิโลไบต์</strong>\nไม่สามารถบันทึกได้",
-       "readonlywarning": "<strong>à¸\84ำà¹\80à¸\95ือà¸\99: à¸\90าà¸\99à¸\82à¹\89อมูลà¸\96ูà¸\81ลà¹\87อà¸\81à¹\80à¸\9eืà¹\88อà¸\9aำรุà¸\87รัà¸\81ษา à¸\84ุà¸\93à¸\88ึà¸\87à¹\84มà¹\88สามารà¸\96à¸\9aัà¸\99à¸\97ึà¸\81à¸\81ารà¹\80à¸\9bลีà¹\88ยà¸\99à¹\81à¸\9bลà¸\87ของคุณได้ในขณะนี้</strong>\nคุณอาจต้องการคัดลอกและวางข้อความของคุณในไฟล์ข้อความ และบันทึกไว้ภายหลัง\n\nผู้ดูแลระบบที่ล็อกฐานข้อมูลให้คำอธิบายดังนี้: $1",
+       "readonlywarning": "<strong>à¸\84ำà¹\80à¸\95ือà¸\99: à¸\90าà¸\99à¸\82à¹\89อมูลà¸\96ูà¸\81ลà¹\87อà¸\81à¹\80à¸\9eืà¹\88อà¸\9aำรุà¸\87รัà¸\81ษา à¸\84ุà¸\93à¸\88ึà¸\87à¹\84มà¹\88สามารà¸\96à¸\9aัà¸\99à¸\97ึà¸\81à¸\81ารà¹\81à¸\81à¹\89à¹\84à¸\82ของคุณได้ในขณะนี้</strong>\nคุณอาจต้องการคัดลอกและวางข้อความของคุณในไฟล์ข้อความ และบันทึกไว้ภายหลัง\n\nผู้ดูแลระบบที่ล็อกฐานข้อมูลให้คำอธิบายดังนี้: $1",
        "protectedpagewarning": "<strong>คำเตือน: หน้านี้ถูกล็อก เพื่อให้เฉพาะผู้ใช้ที่มีสิทธิผู้ดูแลระบบแก้ไขได้เท่านั้น</strong>\nรายการปูมล่าสุดจัดไว้ด้านล่างเพื่อการอ้างอิง:",
        "semiprotectedpagewarning": "<strong>หมายเหตุ:</strong> หน้านี้ถูกล็อก เพื่อให้เฉพาะผู้ใช้ลงทะเบียนสามารถแก้ไขเท่านั้น\nรายการปูมล่าสุดได้จัดไว้ด้านล่างนี้เพื่อการอ้างอิง",
        "cascadeprotectedwarning": "<strong>คำเตือน:</strong> หน้านี้ถูกล็อก และแก้ไขได้เฉพาะผู้ใช้ที่มีสิทธิผู้ดูแลระบบ เนื่องจากหน้านี้รวมอยู่ใน{{PLURAL:$1|หน้า}}ที่ถูกล็อกแบบต่อเรียงต่อไปนี้:",
        "rcshowhidemine": "$1การแก้ไขของฉัน",
        "rcshowhidemine-show": "แสดง",
        "rcshowhidemine-hide": "ซ่อน",
+       "rcshowhidecategorization": "$1การจัดหมวดหมู่หน้า",
        "rcshowhidecategorization-show": "แสดง",
        "rcshowhidecategorization-hide": "ซ่อน",
        "rclinks": "แสดงการปรับปรุงล่าสุด $1 รายการ ในช่วง $2 วันที่ผ่านมา<br />$3",
        "mostrevisions": "หน้าที่มีรุ่นปรับปรุงมากสุด",
        "prefixindex": "หน้าทั้งหมดพร้อมคำขึ้นต้น",
        "prefixindex-namespace": "หน้าทั้งหมดพร้อมคำขึ้นต้น (เนมสเปซ $1)",
+       "prefixindex-submit": "แสดง",
        "prefixindex-strip": "ลบคำขึ้นต้นในรายการออก",
        "shortpages": "หน้าสั้น",
        "longpages": "หน้ายาว",
        "whatlinkshere-hidelinks": "$1 ลิงก์",
        "whatlinkshere-hideimages": "$1ลิงก์ไฟล์",
        "whatlinkshere-filters": "ตัวกรอง",
+       "whatlinkshere-submit": "ไป",
        "autoblockid": "บล็อกอัตโนมัติ #$1",
        "block": "บล็อกผู้ใช้",
        "unblock": "ปลดบล็อกผู้ใช้",
        "tags-actions-header": "ปฏิบัติการ",
        "tags-active-yes": "ใช่",
        "tags-active-no": "ไม่",
+       "tags-source-extension": "นิยามโดยส่วนขยาย",
+       "tags-source-manual": "ใช้ด้วยมือโดยผู้ใช้และบอต",
+       "tags-source-none": "เลิกใช้แล้ว",
        "tags-edit": "แก้ไข",
+       "tags-delete": "ลบ",
+       "tags-activate": "เปิดใช้งาน",
+       "tags-deactivate": "ปิดใช้งาน",
        "tags-hitcount": "$1 การเปลี่ยนแปลง",
        "comparepages": "เปรียบเทียบหน้า",
        "compare-page1": "หน้า 1",
        "htmlform-no": "ไม่",
        "htmlform-yes": "ใช่",
        "htmlform-chosen-placeholder": "เลือกตัวเลือก",
+       "htmlform-cloner-required": "ต้องการอย่างน้อยหนึ่งค่า",
+       "htmlform-title-badnamespace": "[[:$1]] ไม่อยู่ในเนมสเปซ \"{{ns:$2}}\"",
+       "htmlform-title-not-creatable": "\"$1\" มิใช่ชื่อเรื่องหน้าที่สร้างได้",
+       "htmlform-title-not-exists": "ไม่มี $1",
+       "htmlform-user-not-exists": "ไม่มี <strong>$1</strong>",
+       "htmlform-user-not-valid": "<strong>$1</strong> มิใช่ชื่อผู้ใช้ที่สมเหตุสมผล",
        "sqlite-has-fts": "รุ่น $1 พร้อมการสนับสนุนการค้นหาข้อความแบบเต็ม",
        "sqlite-no-fts": "รุ่น $1 โดยไม่มีการสนับสนุนการค้นหาข้อความแบบเต็ม",
        "logentry-delete-delete": "$1 ลบหน้า $3",
index 285affb..01bd4f7 100644 (file)
        "recentchanges-label-plusminus": "Sayfa boyutundaki değişikliğin bayt bazında değeri",
        "recentchanges-legend-heading": "'''Gösterge:'''",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (ayrıca [[Special:NewPages|yeni sayfalar listesine]] bakınız)",
+       "recentchanges-submit": "Göster",
        "rcnotefrom": "<strong>$3, $4</strong> tarihinden itibaren yapılan {{PLURAL:$5|değişiklik|değişiklik}} aşağıdadır (<strong>$1</strong> tarhine kadar olanlar gösterilmektedir).",
        "rclistfrom": "$3 $2 tarihinden itibaren yeni değişiklikleri göster",
        "rcshowhideminor": "Küçük değişiklikleri $1",
        "wlshowlast": "Son $1 saati $2 günü göster",
        "watchlistall2": "Hepsini göster",
        "watchlist-hide": "Gizle",
+       "wlshowtime": "Gösterilecek zaman aralığı:",
        "wlshowhideminor": "küçük değişiklikler",
        "wlshowhidebots": "botlar",
        "wlshowhideliu": "kayıtlı kullanıcılar",
        "wlshowhideanons": "anonim kullanıcılar",
        "wlshowhidepatr": "incelenmiş değişiklikler",
+       "wlshowhidemine": "değişikliklerim",
        "watchlist-options": "İzleme listesi seçenekleri",
        "watching": "İzleniyor...",
        "unwatching": "İzlenmiyor...",
index fb26815..76344ed 100644 (file)
        "editold": "үзгәртү",
        "viewsourceold": "башлангыч кодны карау",
        "editlink": "үзгәртү",
-       "viewsourcelink": "башлангыч кодны карау",
+       "viewsourcelink": "чыганак кодны карау",
        "editsectionhint": "$1 бүлеген үзгәртү",
        "toc": "Эчтәлек",
        "showtoc": "күрсәтү",
        "red-link-title": "$1 (мондый бит юк)",
        "sort-descending": "Кимү буенча урнаштыру",
        "sort-ascending": "Арту буенча урнаштыру",
-       "nstab-main": "Ð\91иÑ\82",
+       "nstab-main": "Ð\9cÓ\99калÓ\99",
        "nstab-user": "Кулланучы",
        "nstab-media": "Мультимедиа",
        "nstab-special": "Махсус бит",
        "laggedslavemode": "Игътибар: биттә соңгы яңартулар күрсәтелмәгән булырга мөмкин.",
        "readonly": "Мәгълүматлар базасына язу ябылган",
        "enterlockreason": "Ябылу сәбәбен һәм вакытын күрсәтегез.",
-       "readonlytext": "Мәгълүмат базасы хәзерге вакытта яңа битләр ясаудан һәм башка үзгәртүләрдән ябылган. Бу планлаштырылган хезмәт күрсәтү сәбәпле булырга мөмкин.\nЯбучы оператор түбәндәге аңлатманы калдырган:\n$1",
+       "readonlytext": "Мәгълүмат базасы хәзерге вакытта яңа битләр ясаудан һәм башка үзгәртүләрдән ябылган: бу планлаштырылган хезмәт күрсәтү сәбәпле булырга мөмкин.\nЯбучы идарәче түбәндәге аңлатманы калдырган: $1",
        "missing-article": "Мәгълүматлар базасында «$1» $2 битенең соралган тексты табылмады.\n\nБу, гадәттә, искергән сылтама буенча бетерелгән битнең үзгәртү тарихына күчкәндә килеп чыга.\n\nӘгәр хата монда түгел икән, сез программада хата тапкан булырга мөмкинсез.\nЗинһар өчен, URLны күрсәтеп, бу турыда [[Special:ListUsers/sysop|идарәчегә]] хәбәр итегез.",
        "missingarticle-rev": "(юрама № $1)",
        "missingarticle-diff": "(аерма: $1, $2)",
        "perfcachedts": "Бу мәгълүматлар кэштан алынган, ул соңгы тапкыр $1 яңартылды. Кэшта иң күбе {{PLURAL:$4|язма}} саклана",
        "querypage-no-updates": "Хәзер бу битне яңартып булмый. Монда күрсәтелгән мәгълүматлар кабул ителмәячәк.",
        "viewsource": "Карау",
-       "viewsource-title": "$1 Ð±Ð¸Ñ\82енең Ñ\8fÑ\85ма Ñ\82екÑ\81Ñ\82ын карау",
+       "viewsource-title": "$1 Ð±Ð¸Ñ\82енең Ñ\87Ñ\8bганагын карау",
        "actionthrottled": "Тизлек киметелгән",
-       "actionthrottledtext": "Спамга каршы көрәш өчен аз вакыт эчендә бу гамәлне еш куллану тыелган. Зинһар, соңарак кабатлагыз.",
+       "actionthrottledtext": "Спамга каршы көрәш өчен, аз вакыт эчендә бу гамәлне еш куллану тыелган һәм СЕз бирелгән вакытны бетергәнсез инде. Зинһар, соңарак кабатлагыз.",
        "protectedpagetext": "Бу бит үзгәртүләрдән һәм башка төрле гамәлләрдән якланган.",
-       "viewsourcetext": "Сез бу битнең башлангыч текстын карый һәм күчерә аласыз:",
-       "viewyourtext": "Сез '''үз төзәтмәләрегезне''' бу сәхифәдә карый һәм чыгарылма текстны күчермәли аласыз:",
+       "viewsourcetext": "Сез бу битнең башлангыч текстын карый һәм күчерә аласыз.",
+       "viewyourtext": "Сез <strong>үз төзәтмәләрегезне</strong> бу сәхифәдә карый һәм чыгарылма текстны күчермәли аласыз.",
        "protectedinterface": "Бу биттә программа тәэминатының интерфейс хәбәрләре бар. Вандализмга каршы көрәш сәбәпле, бу битне үзгәртү тыела. Әлеге хәбәрнең тәрҗемәсен өстәү яки үзгәртү өчен, зинһар өчен, MediaWiki [//translatewiki.net/ translatewiki.net] тәрҗемәләү сайтын кулланыгыз.",
        "editinginterface": "<strong>Игътибар:</strong> Сез программа тәэминатының интерфейс тексты булган битне үзгәртәсез. Бу башка кулланучыларга да тәэсир итәчәк.",
        "translateinterface": "Бу хәбәрнең текстын үзгәртү өчен яки өстәмәләр кертү өчен MediaWiki җирләштерү сайтын кулланыгыз [//translatewiki.net/ translatewiki.net].",
        "virus-badscanner": "Көйләү хатасы. Билгесез вируслар сканеры: ''$1''",
        "virus-scanfailed": "сканерлау хатасы ($1 коды)",
        "virus-unknownscanner": "билгесез антивирус:",
-       "logouttext": "'''Сез хисап язмагыздан чыктыгыз.'''\n\nСез {{SITENAME}} проектында аноним рәвештә кала яисә шул ук яки башка исем белән яңадан <span class='plainlinks'>[$1 керә]</span> аласыз.\nКайбер битләр Сез кергән кебек күрсәтелергә мөмкин. Моны бетерү өчен браузер кэшын чистартыгыз.",
+       "logouttext": "<strong>Сез хисап язмагыздан чыктыгыз.</strong>\n\nКайбер битләр Сез кергән кебек күрсәтелергә мөмкин. Моны бетерү өчен браузер кэшын чистартыгыз.",
        "welcomeuser": "Хуш килдегез, $1!",
        "yourname": "Кулланучы исеме:",
        "userlogin-yourname": "Кулланучы исеме",
        "yourpasswordagain": "Серсүзне кабат кертү:",
        "createacct-yourpasswordagain": "Серсүзне раслагыз",
        "createacct-yourpasswordagain-ph": "Серсүзне кабаттан кертегез",
-       "remembermypassword": "Хисап язмамны бу браузерда саклансын (иң күп $1 {{PLURAL:$1|көн|көн|көн}}гә кадәр)",
+       "remembermypassword": "Хисап язмам бу браузерда саклансын (иң күбе $1 {{PLURAL:$1|көн}})",
        "userlogin-remembermypassword": "Системада калырга",
        "userlogin-signwithsecure": "Якланган кушылу",
        "yourdomainname": "Сезнең доменыгыз:",
        "logout": "Чыгу",
        "userlogout": "Чыгу",
        "notloggedin": "Сез хисап язмагызга кермәгәнсез",
-       "userlogin-noaccount": "Ð\90ккаÑ\83нÑ\82 юкмы?",
-       "userlogin-joinproject": "Проектка керү",
+       "userlogin-noaccount": "ХиÑ\81ап Ñ\8fзмагÑ\8bз юкмы?",
+       "userlogin-joinproject": "{{SITENAME}} проектына керү",
        "nologin": "Кулланучы исемең юкмы? '''$1'''",
        "nologinlink": "Хисап язмасы төзү",
        "createaccount": "Яңа кулланучыны теркәү",
        "createacct-emailoptional": "Электрон почта юлламагыз (мәҗбүри түгел)",
        "createacct-email-ph": "Электрон почта юлламагызны языгыз",
        "createacct-another-email-ph": "Электрон почта юлламагызны кертегез",
-       "createaccountmail": "электрон почта аша",
+       "createaccountmail": "Очраклы рәвештә ясалган ваҡытлыча серсузне файдаланырга һәм аны минем электрон почтама җибәрергә",
        "createacct-realname": "Чын исем (мәҗбүри түгел)",
        "createaccountreason": "Сәбәп:",
        "createacct-reason": "Сәбәп",
        "login-userblocked": "Бу кулланучы тыелды. Керү тыелган.",
        "wrongpassword": "Язылган серсүз дөрес түгел. Тагын бер тапкыр сынагыз.",
        "wrongpasswordempty": "Серсүз юлы буш булырга тиеш түгел.",
-       "passwordtooshort": "Сезсүз $1 {{PLURAL:$1|символдан}} торырга тиеш.",
+       "passwordtooshort": "Сезсүз кимендә $1 {{PLURAL:$1|символдан}} торырга тиеш.",
        "password-name-match": "Кертелгән серсүз кулланучы исеменнән аерылырга тиеш.",
        "password-login-forbidden": "Бу кулланучы исемен һәм серсүзне куллану тыелган",
        "mailmypassword": "Серсүзне бетерү",
        "passwordremindertitle": "{{SITENAME}} кулланучысына вакытлы серсүз тапшыру",
-       "passwordremindertext": "Кемдер (бәлки, сездер, IP адресы: $1) {{SITENAME}} ($4) өчен яңа серсүз соратты. $2 өчен яңа серсүз: $3. Әгәр бу сез булсагыз, системага керегез һәм серсүзне алмаштырыгыз. Яңа серсүз $5 {{PLURAL:$5|көн}} гамәлдә булачак.\n\nӘгәр сез серсүзне алмаштыруны сорамаган булсагыз яки, оныткан очракта, исегезгә төшергән булсагыз, бу хәбәргә игътибар бирмичә, иске серсүзегезне куллануны дәвам итегез.",
+       "passwordremindertext": "Кемдер (бәлки, сездер, IP адресы: $1)  {{grammar:genitive|{{SITENAME}}}} ($4) өчен яңа серсүз соратты. $2 кулланучысы өчен яңа вакытлыча серсүз: $3. Әгәр бу сез булган булсагыз, системага керегез һәм яңа серсүз сайлагыз. Сезнең вакытлыча серсүз гамәлдә $5 {{PLURAL:$5|көн}} булачак.\n\nӘгәр сез серсүзне алмаштыруны сорамаган булсагыз яки, оныткан очракта, исегезгә төшергән булсагыз, бу хәбәргә игътибар бирмичә, иске серсүзегезне куллануны дәвам итегез.",
        "noemail": "$1 исемле кулланучы өчен электрон почта адресы язылмаган.",
        "noemailcreate": "Сез дөрес e-mail адресы күрсәтергә тиеш",
        "passwordsent": "Яңа серсүз $1 исемле кулланучының электрон почта адресына җибәрелде.\n\nЗинһар, серсүзне алгач, системага яңадан керегез.",
        "blocked-mailpassword": "Сезнең IP адресыгыз белән битләр үзгәртеп һәм серсүзне яңартып булмый.",
-       "eauthentsent": "Ð\90дÑ\80еÑ\81 Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үне Ð´Ó\99лиллÓ\99Ò¯ Ó©Ñ\87ен Ð°Ò£Ð° Ð¼Ð°Ñ\85Ñ\81Ñ\83Ñ\81 Ñ\85аÑ\82 Ò\97ибÓ\99Ñ\80елде. Ð¥Ð°Ñ\82Ñ\82а Ñ\8fзÑ\8bлганнаÑ\80нÑ\8b Ò¯Ñ\82Ó\99вегез Ñ\81оÑ\80ала.",
+       "eauthentsent": "Ð\9aÒ¯Ñ\80Ñ\81Ó\99Ñ\82елгÓ\99н Ñ\8dлекÑ\82Ñ\80он Ð¿Ð¾Ñ\87Ñ\82а Ð°Ð´Ñ\80еÑ\81Ñ\8bна Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үлÓ\99Ñ\80не Ñ\80аÑ\81лаÑ\83 Ó©Ñ\87ен Ñ\85аÑ\82 Ò\97ибÓ\99Ñ\80елде. Ð\9aилÓ\99Ñ\87Ó\99кÑ\82Ó\99дÓ\99 Ñ\85аÑ\82лаÑ\80 ÐºÐ°Ð±Ñ\83л Ð¸Ñ\82Ò¯ Ó©Ñ\87ен, Ñ\80аÑ\81лаÑ\83нÑ\8b Ò¯Ñ\82егез.",
        "throttled-mailpassword": "Серсүзне электрон почтага җибәрү гамәлен сез {{PLURAL:$1|1=соңгы $1 сәгать}} эчендә кулландыгыз инде. Бу гамәлне явызларча куллануны кисәтү максатыннан аны $1 {{PLURAL:$1|сәгать}} аралыгында бер генә тапкыр башкарып була.",
        "mailerror": "Хат җибәрү хатасы: $1",
        "acct_creation_throttle_hit": "Сезнең IP адресыннан бу тәүлек эчендә {{PLURAL:$1|$1 хисап язмасы}} төзелде инде. Шунлыктан бу гамәл сезнең өчен вакытлыча ябык.",
        "passwordreset-emailerror-capture": "Түбәндә язылган хат-искәртү китерелгән, аны җибәрмәүнең сәбәбе:$1",
        "changeemail": "Электрон әрҗә адресын үзгәртү яисә бетерү",
        "changeemail-header": "Электрон әрҗә адресын үзгәртү",
+       "changeemail-passwordrequired": "Әлеге үзгәрешләрне раслау өчен, Сезгә кулланылучы серсүзне язарга кирәк.",
        "changeemail-no-info": "Бу сәхифәгә турыдан-туры мөрәҗәгать итәр өчен, сез системага керергә тиешсез",
        "changeemail-oldemail": "Хәзерге электрон әрҗә адресы:",
        "changeemail-newemail": "Яңа электрон почта адресы:",
        "changeemail-none": "(юк)",
        "changeemail-password": "«{{SITENAME}}» проекты өчен серсүзегез:",
        "changeemail-submit": "E-mail адресын үзгәртү",
+       "resettokens-tokens": "Токеннар:",
+       "resettokens-token-label": "$1 (агымдагы мәгънә: $2)",
        "bold_sample": "Калын язылыш",
        "bold_tip": "Калын язылыш",
        "italic_sample": "Курсив язылыш",
        "nowiki_tip": "Вики-форматлауны исәпкә алмау",
        "image_sample": "Мисал.jpg",
        "image_tip": "Куелган файл",
-       "media_tip": "Ð\9cедиа-Ñ\84айлга сылтама",
+       "media_tip": "Файлга сылтама",
        "sig_tip": "Имза һәм вакыт",
        "hr_tip": "Горизонталь сызык (еш кулланмагыз)",
        "summary": "Үзгәртүләр тасвирламасы:",
        "edit-gone-missing": "Битне яңартып булмый.\nУл бетерелгән булырга мөмкин.",
        "edit-conflict": "Үзгәртүләр конфликты.",
        "edit-no-change": "Текстта үзгәешләр ясалмау сәбәпле, сезнең үзгәртү кире кагыла.",
+       "postedit-confirmation-created": "Бит төзелде",
        "edit-already-exists": "Яңа бит төзеп булмый.\nУл инде бар.",
        "editwarning-warning": "Башка биткә күчү вакытында бу мәкаләгә керткән үзгәрешләр югалырга мөмкин.\nӘгәрдә сез теркәлгән булсагыз, бу искәрмәне сез «Көйләнмәләрем» өлешендә үзгәртә аласыз.",
        "duplicate-args-category": "Калыпны чакыруда кабатлап торган аргументларны кулланган битләр",
        "nextn": "чираттагы {{PLURAL:$1|$1}}",
        "prevn-title": "Алдагы $1  {{PLURAL:$1|язма}}",
        "nextn-title": "{{PLURAL:$1|Киләсе $1 язма}}",
-       "shown-title": "Сәхифәдә $1 {{PLURAL:$1|1=язма|язма}} күрсәтелсен",
+       "shown-title": "Сәхифәдә $1 {{PLURAL:$1|язма}} күрсәтелсен",
        "viewprevnext": "Күрсәтелүе: ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "<strong>Бу вики-проектта «[[:$1]]» исемле бит бар инде</strong>{{PLURAL:$2|0=|Башка эзләү нәтиҗәләрен дә карап ал.}}",
        "searchmenu-new": "<strong>«Әлеге [[:$1]]» вики-проектта бит ясарга!</strong>\n{{PLURAL:$2|0=|Шулай ук, эзләү ярдәмендә табылган битне карагыз.|Шулай ук, эзләү ярдәмендә табылган битләрне карагыз.}}",
        "searchprofile-images-tooltip": "Файллар эзләү",
        "searchprofile-everything-tooltip": "Барлык битләрдән эзләү",
        "searchprofile-advanced-tooltip": "Бирелгән исемнәр мәйданында эзләү",
-       "search-result-size": "$1 ({{PLURAL:$2|1 сүз|$2 сүз}})",
+       "search-result-size": "$1 ({{PLURAL:$2|$2 сүз}})",
        "search-result-category-size": "{{PLURAL:$1|1=1 әгъза|$1 әгъза}} ({{PLURAL:$2|1=1 асттөркем|$2 асттөркем}}, {{PLURAL:$3|1=1 файл|$3 файл}})",
        "search-redirect": "(юнәлтү $1)",
        "search-section": "($1 бүлеге)",
        "prefs-watchlist-token": "Күзәтү исемлеге токены:",
        "prefs-misc": "Башка көйләнмәләр",
        "prefs-resetpass": "Серсүзне үзгәртү",
+       "prefs-changeemail": "Электрон әрҗә адресын үзгәртү яисә бетерү",
        "prefs-email": "E-mail көйләнмәләре",
        "prefs-rendering": "Күренеш",
        "saveprefs": "Саклау",
        "enhancedrc-history": "тарих",
        "recentchanges": "Соңгы үзгәртүләр",
        "recentchanges-legend": "Соңгы үзгәртүләр көйләүләре",
-       "recentchanges-summary": "Ð\91Ñ\83 Ð±Ð¸Ñ\82Ñ\82Ó\99 {{grammar:genitive|{{SITENAME}}}} Ð¿Ñ\80оекÑ\82Ñ\8bнÑ\8bÒ£ Ñ\81оңгÑ\8b Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үлÓ\99Ñ\80е ÐºÒ¯Ñ\80Ñ\81Ó\99Ñ\82елÓ\99.",
+       "recentchanges-summary": "ТөÑ\80ле Ð±Ð¸Ñ\82лÓ\99Ñ\80дÓ\99 Ñ\8dÑ\88лÓ\99нгÓ\99н Ñ\81оңгÑ\8b Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үлÓ\99Ñ\80 Ð¸Ñ\81емлеге.",
        "recentchanges-feed-description": "Бу агымда соңгы үзгәртүләрне күзәтү.",
        "recentchanges-label-newpage": "Бу үзгәртү белән яңа бит төзелгән",
        "recentchanges-label-minor": "Бу кече үзгәртү",
        "recentchanges-label-unpatrolled": "Үзгәртүне әлегә тикшермәгәннәр",
        "recentchanges-label-plusminus": "Битнең зурлыгы шуның кадәрле байтка үзгәрде",
        "recentchanges-legend-heading": "'''Легенда:&nbsp;'''",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|яңа бит]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (шулай ук [[Special:NewPages|яңа битләр исемлеген]] карагыз)",
        "rcnotefrom": "Астарак <strong>$3, $4</strong> өчен {{PLURAL:$5|үзгәртүләр күрсәтелгән}} (<strong>$1</strong> артык түгел).",
        "rclistfrom": "$3 $2 башлап яңа үзгәртүләрне күрсәт",
        "rcshowhideminor": "кече үзгәртүләрне $1",
-       "rcshowhideminor-show": "күÑ\80Ñ\81Ó\99Ñ\82",
-       "rcshowhideminor-hide": "яшер",
+       "rcshowhideminor-show": "Ð\9aÒ¯Ñ\80Ñ\81Ó\99Ñ\82Ò¯",
+       "rcshowhideminor-hide": "Яшер",
        "rcshowhidebots": "ботларны $1",
        "rcshowhidebots-show": "Күрсәт",
-       "rcshowhidebots-hide": "яшер",
+       "rcshowhidebots-hide": "Яшер",
        "rcshowhideliu": "теркәлгән кулланучыларны $1",
        "rcshowhideliu-show": "күрсәт",
-       "rcshowhideliu-hide": "яшер",
+       "rcshowhideliu-hide": "Яшер",
        "rcshowhideanons": "кермәгән кулланучыларны $1",
-       "rcshowhideanons-show": "күÑ\80Ñ\81Ó\99Ñ\82",
-       "rcshowhideanons-hide": "яшер",
+       "rcshowhideanons-show": "Ð\9aÒ¯Ñ\80Ñ\81Ó\99Ñ\82Ò¯",
+       "rcshowhideanons-hide": "Яшер",
        "rcshowhidepatr": "тикшерелгән үзгәртүләрне $1",
        "rcshowhidepatr-hide": "яшер",
        "rcshowhidemine": "минем үзгәртүләремне $1",
-       "rcshowhidemine-show": "күÑ\80Ñ\81Ó\99Ñ\82",
-       "rcshowhidemine-hide": "яшер",
+       "rcshowhidemine-show": "Ð\9aÒ¯Ñ\80Ñ\81Ó\99Ñ\82Ò¯",
+       "rcshowhidemine-hide": "Яшер",
        "rclinks": "Соңгы $2 көн эчендә соңгы $1 үзгәртүне күрсәт<br />$3",
        "diff": "аерма",
        "hist": "тарих",
-       "hide": "яшер",
-       "show": "күрсәт",
+       "hide": "Яшер",
+       "show": "Ð\9aүрсәт",
        "minoreditletter": "к",
        "newpageletter": "Я",
        "boteditletter": "б",
        "recentchangeslinked-feed": "Бәйләнешле үзгәртүләр",
        "recentchangeslinked-toolbox": "Бәйләнешле үзгәртүләр",
        "recentchangeslinked-title": "\"$1\" битенә бәйләнешле үзгәртүләр",
-       "recentchangeslinked-summary": "Бу күрсәтелгән бит белән сылталган (йә күрсәтелгән төркемгә керткән) битләрнең үзгәртелмәләре исемлеге.\n[[Special:Watchlist|Күзәтү исемлегегезгә]] керә торган битләр '''калын'''.",
+       "recentchangeslinked-summary": "Бу күрсәтелгән бит белән сылталган (йә күрсәтелгән төркемгә керткән) битләрнең үзгәртелмәләре исемлеге.\n[[Special:Watchlist|Күзәтү исемлегегезгә]] керә торган битләр '''калын''' итеп күрсәтелгән.",
        "recentchangeslinked-page": "Битнең исеме:",
        "recentchangeslinked-to": "Моның урынына бу биткә бәйле булган битләрдәге үзгәртүләрне күрсәтү",
        "upload": "Файлны йөкләү",
        "listfiles_count": "Юрамалар",
        "file-anchor-link": "Файл",
        "filehist": "Файлның тарихы",
-       "filehist-help": "Ð\94аÑ\82ага/Ñ\81Ó\99гаÑ\82Ñ\8cкÓ\99, Ñ\88Ñ\83л Ð²Ð°ÐºÑ\8bÑ\82Ñ\82а Ð±Ð¸Ñ\82нең Ð½Ð¸Ð½Ð´Ð¸ Ð±Ñ\83лганлÑ\8bгÑ\8bн ÐºÒ¯Ñ\80Ò¯ Ó©Ñ\87ен басыгыз.",
+       "filehist-help": "ФайлнÑ\8bÒ£ Ð½Ð¸Ð½Ð´Ð¸ Ð±Ñ\83лганлÑ\8bгÑ\8bн ÐºÒ¯Ñ\80Ò¯ Ó©Ñ\87ен Ð´Ð°Ñ\82ага/Ñ\81Ó\99гаÑ\82Ñ\8cкÓ\99 басыгыз.",
        "filehist-deleteall": "Барысын да юк ит",
        "filehist-deleteone": "бетерү",
        "filehist-revert": "кайтару",
        "filehist-current": "хәзерге",
        "filehist-datetime": "Дата/вакыт",
        "filehist-thumb": "Миниатюра",
-       "filehist-thumbtext": "$1 көнне булган версиянең эскизы",
+       "filehist-thumbtext": "$1 көнне булган юрама эскизы",
        "filehist-nothumb": "Миниатюрасы юк",
        "filehist-user": "Кулланучы",
        "filehist-dimensions": "Зурлык",
        "linkstoimage": "{{PLURAL:$1|Киләсе $1 бит|Киләсе $1 битләр|}} әлеге файлга сылтама ясый:",
        "nolinkstoimage": "Бу файлга сылтаган битләр юк.",
        "duplicatesoffile": "{{PLURAL:$1|Әлеге $1 файл }} астагы файлның күчерелмәсе булып тора ([[Special:FileDuplicateSearch/$2|тулырак]]):",
-       "sharedupload": "Бу файл $1'дан һәм башка проектларда кулланырга мөмкин.",
-       "sharedupload-desc-here": "Бу файл $1'дан һәм башка проектларда кулланырга мөмкин. Файл турында [$2 мәгълүмат ] аста бирелгән.",
+       "sharedupload": "Бу файл $1 проектыннан һәм башка проектларда кулланырга мөмкин",
+       "sharedupload-desc-here": "Бу файл $1 проектыннан һәм башка проектларда кулланырга мөмкин. \nФайл турында [$2 тулырак мәгълүмат] түбәндәрәк күрсәтелгән.",
        "filepage-nofile": "Мондый исемле файл юк.",
        "filepage-nofile-link": "Мондый исемле файл  юк. Сез аны [$1 йөкли аласыз].",
        "uploadnewversion-linktext": "Бу файлның яңа юрамасын йөкләү",
        "sp-contributions-search": "Кертемне эзләү",
        "sp-contributions-username": "Кулланучының IP адресы яки исеме:",
        "sp-contributions-toponly": "Соңгы версия булган үзгәртүләрне генә күрсәтелсен",
+       "sp-contributions-newonly": "Битләр ясау үзгәртмәләрен генә күрсәтү",
        "sp-contributions-submit": "Эзләү",
        "whatlinkshere": "Бирегә нәрсә сылтый",
        "whatlinkshere-title": "$1 битенә сылтый торган битләр",
        "whatlinkshere-prev": "{{PLURAL:$1|1=алдагы}} $1",
        "whatlinkshere-next": "{{PLURAL:$1|1=киләсе}} $1",
        "whatlinkshere-links": "← сылтамалар",
-       "whatlinkshere-hideredirs": "юнәлтүләрне $1",
-       "whatlinkshere-hidetrans": "кертүләрне $1",
-       "whatlinkshere-hidelinks": "сылтамаларны $1",
+       "whatlinkshere-hideredirs": "Юнәлтүләрне $1",
+       "whatlinkshere-hidetrans": "Ð\9aертүләрне $1",
+       "whatlinkshere-hidelinks": "Сылтамаларны $1",
        "whatlinkshere-hideimages": "$1 файл сылтамалары",
        "whatlinkshere-filters": "Фильтрлар",
        "blockip": "{{GENDER:$1|Кулланучыны}} тыю",
        "tooltip-pt-mytalk": "Бәхәс битегез",
        "tooltip-pt-preferences": "Көйләнмәләрегез",
        "tooltip-pt-watchlist": "Сез күзәтелгән төзәтмәле битләр исемлеге",
-       "tooltip-pt-mycontris": "Сезнең ÐºÐµÑ\80Ñ\82еменгезне Ð¸Ñ\81емлеге",
+       "tooltip-pt-mycontris": "Сезнең ÐºÐµÑ\80Ñ\82емегез",
        "tooltip-pt-login": "Сез хисап язмасы төзи алыр идегез, әмма бу мәҗбүри түгел.",
        "tooltip-pt-logout": "Чыгу",
        "tooltip-pt-createaccount": "Сезгә аккаунт ясарга һәм системага керергә киңәш итәбез, әмма бу мәҗбүри түгел.",
        "tooltip-ca-watch": "Бу битне сезнең күзәтү исемлегезгә өстәү",
        "tooltip-ca-unwatch": "Бу битне сезнең күзәтү исемлегездә бетерү",
        "tooltip-search": "{{SITENAME}} эчендә эзләү",
-       "tooltip-search-go": "Нәк шундый исеме белән биткә күчәрү",
+       "tooltip-search-go": "Нәкъ шундый исеме белән биткә күчәрү",
        "tooltip-search-fulltext": "Бу текст белән битләрне табу",
-       "tooltip-p-logo": "Баш бит",
-       "tooltip-n-mainpage": "Ð\91аÑ\88 Ð±Ð¸Ñ\82не ÐºÐµÑ\80еп Ñ\87Ñ\8bгÑ\83",
+       "tooltip-p-logo": "Баш биткә күчү",
+       "tooltip-n-mainpage": "Ð\91аÑ\88 Ð±Ð¸Ñ\82кÓ\99 ÐºÒ¯Ñ\87Ò¯",
        "tooltip-n-mainpage-description": "Баш биткә күчү",
        "tooltip-n-portal": "Проект турында, сез нәрсә итә аласыз һәм нәрсә кайда була дип турында.",
        "tooltip-n-currentevents": "Агымдагы вакыйгалар турында мәгълүматны табу",
        "tooltip-t-recentchangeslinked": "Бу биттән сылтаган битләрдә ахыргы үзгәртүләр",
        "tooltip-feed-rss": "Бу бит өчен RSS трансляциясе",
        "tooltip-feed-atom": "Бу бит өчен Atom трансляциясе",
-       "tooltip-t-contributions": "Ð\9aÑ\83лланÑ\83Ñ\87Ñ\8b ÐºÐµÑ\80Ñ\82еменең Ð¸Ñ\81емлегене карау",
+       "tooltip-t-contributions": "Ð\91Ñ\83 ÐºÑ\83лланÑ\83Ñ\87Ñ\8bнÑ\8bÒ£ ÐºÐµÑ\80Ñ\82ем Ð¸Ñ\81емлеген карау",
        "tooltip-t-emailuser": "Бу кулланучыга хат җибәрү",
        "tooltip-t-upload": "Файлларны йөкләү",
        "tooltip-t-specialpages": "Барлык махсус битләр исемлеге",
        "tooltip-ca-nstab-category": "Төркем битен карау",
        "tooltip-minoredit": "Бу үзгәртүне кече дип билгелү",
        "tooltip-save": "Үзгәртүләрегезне саклау",
-       "tooltip-preview": "Сезнең Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үлÓ\99Ñ\80егезнең Ð°Ð»Ð´Ð°Ð½ ÐºÐ°Ñ\80авÑ\8b, Ñ\81аклаÑ\83дан ÐºÐ°Ð´Ó\99Ñ\80 Ð¼Ð¾Ð½Ñ\8b ÐºÑ\83лланÑ\8bгÑ\8bз Ó\99ле!",
+       "tooltip-preview": "Ð\90лдан ÐºÐ°Ñ\80аÑ\83, Ñ\81аклаÑ\83 Ð°Ð»Ð´Ñ\8bннан Ò¯Ð·Ð³Ó\99Ñ\80Ñ\82үлÓ\99Ñ\80егезнең ÐºÐ°Ñ\80ап Ñ\87Ñ\8bгÑ\8bгÑ\8bз!",
        "tooltip-diff": "Сезнең үзгәртүләрегезне күрсәтү.",
        "tooltip-compareselectedversions": "Бу битнең сайланган ике юрамасы арасында аерманы карау",
        "tooltip-watch": "Бу битне күзәтү исемлегемә өстәү",
        "exif-software": "Программалы тәэмин ителеш",
        "exif-artist": "Автор",
        "exif-copyright": "Автор хокуклары хуҗасы",
-       "exif-exifversion": "Exif версиясе",
+       "exif-exifversion": "Exif юрамасы",
        "exif-flashpixversion": "FlashPix юрамасын тәэмин итү",
        "exif-colorspace": "Төсләр тирәлеге",
        "exif-componentsconfiguration": "Төсләр төзелешенең конфигурациясе",
        "specialpages-group-users": "Кулланучылар һәм аларның хокуклары",
        "specialpages-group-highuse": "Еш кулланылучы битләр",
        "specialpages-group-pages": "Битләр исемлеге",
-       "specialpages-group-pagetools": "Бит өчен җиһазлар",
+       "specialpages-group-pagetools": "Бит өчен кораллар",
        "specialpages-group-wiki": "Мәгълүмат һәм җиһазлар",
        "specialpages-group-redirects": "Күчерелүче махсус битләр",
        "specialpages-group-spam": "Спамга каршы кораллар",
        "intentionallyblankpage": "Бу бит махсус буш калдырылган",
        "external_image_whitelist": "#Бу юлны ничек бар, шулаө калдырыгыз<pre>\n#Монда даими фразаларның фрагментларын куегыз (// арасында торган өлешен)\n#алар тышкы сурәтләрнең URL белән бәйләнерләр.\n#Туры килгәннәре сурәт буларак, туры килмәгәннәре сурәткә сылтама буларак күрсәтеләчәкләр.\n# # билгесе белән башланучы юллар шәрехнамә дип саналалар.\n#Юллар регистрга игътибар бирмиләр.\n\n#Даими фразаларның фрагментларын бу кыр өстендә куегыз. Бу кырны ничек бар, шулай калдырыгыз.</pre>",
        "tags": "Гамәлдә булучы үзгәртүләр билгеләре",
-       "tag-filter": "[[Special:Tags|Tag]] фильтры:",
+       "tag-filter": "[[Special:Tags|Билгеләр]] фильтры:",
        "tag-filter-submit": "Фильтрлау",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Билге|Билгеләр}}]]: $2)",
        "tags-title": "Теглар",
        "revdelete-uname-unhid": "кулланучының исеме ачылган",
        "revdelete-restricted": "чикләүләр идарәчеләргә дә кулланыла",
        "revdelete-unrestricted": "чикләүләр идарәчеләр өчен бетерелгән",
-       "logentry-move-move": "$1 $3 сәхифәсен $4 {{GENDER:$2|итеп күчерде}}",
+       "logentry-move-move": "$1  $3 битенең исемен {{GENDER:$2| үзгәртте}}. Яңа исеме: $4",
        "logentry-move-move-noredirect": "$1 юнәлтү калдырмыйча $3 сәхифәсен $4 итеп күчерде",
        "logentry-move-move_redir": "$1 юнәлтү аша $3 сәхифәсен $4 итеп күчерде",
        "logentry-move-move_redir-noredirect": "$1 юнәлтү аша, юнәлтү калдырмыйча $3 сәхифәсен $4 итеп күчерде",
index e10c91e..445856f 100644 (file)
        "nstab-template": "قېلىپ",
        "nstab-help": "ياردەم بەت",
        "nstab-category": "تۈر",
+       "mainpage-nstab": "باش بەت",
        "nosuchaction": "بۇنداق مەشغۇلات يوق",
        "nosuchactiontext": "بۇ مەشغۇلات بېكىتكەن URL ئىناۋەتسىز.\n\nURL نى خاتا كىرگۈزۈپ قالدىڭىز ياكى خاتا ئۇلانمىغا ئەگەشتىڭىز.\n\n {{SITENAME}} بېكەت يۇمشاق دېتالىنىڭ خاتالىقى بولۇشى مۇمكىن.",
        "nosuchspecialpage": "بۇنىڭغا ئوخشاش ئالاھىدە بەت يوق",
        "createaccountreason": "سەۋەب:",
        "createacct-reason": "سەۋەبى",
        "createacct-reason-ph": "نېمىشقا باشقا ھېسابات قۇرماقچى بولدىڭىز",
-       "createacct-captcha": "بىخەتەرلىك تەكشۈرۈشى",
-       "createacct-imgcaptcha-ph": "ئۈستىدە كۆرگىنىڭىزنى كىرگۈزۈڭ",
        "createacct-submit": "ھېساباتىڭىزنى قۇرۇڭ",
        "createacct-another-submit": "باشقا ھېسابات قۇرىمەن",
        "createacct-benefit-heading": "{{SITENAME}} سىزگە ئوخشاش كىشىلەر تەرىپىدىن قۇرۇلغان.",
        "loginlanguagelabel": "تىل: $1",
        "suspicious-userlogout": "تىزىمدىن چىقىش ئىلتىماسىڭىز رەت قىلىندى، چۈنكى ئۇ بەلكىم بۇزۇلغان توركۆرگۈ ياكى غەملەك ۋاكالەتچىسى يوللىغان بولۇشى مۇمكىن.",
        "createacct-another-realname-tip": "ھەقىقىي ئىسمىڭىز ئىختىيارى.\nئەگەر تەمىنلەشنى تاللىسىڭىز، ئۇ سىزنىڭ تۆھپىڭىزنىڭ ئىمزاسى بولىدۇ.",
+       "pt-login": "تىزىمغا كىرىڭ",
+       "pt-createaccount": "ھېسابات قۇر",
        "php-mail-error-unknown": "PHP نىڭ mail() فونكسىيەسىدىكى يوچۇن خاتالىق",
        "user-mail-no-addy": "ئېلخەت ئادرېسسىز خەت يوللاشنى سىنىدى.",
        "user-mail-no-body": "بوش ياكى مەزمۇنى قىسقا مۇۋاپىق بولمىغان تورخەت ئەۋەتىشنى سىنىدى.",
        "passwordreset-emailtext-ip": "باشقىلار (بەلكىم سىز، IP ئادرېسى $1) {{SITENAME}} ($4) دىكى پارولنى قايتا بېكىتىشنى ئىلتىماس قىلدى. تۆۋەندىكى ئىشلەتكۈچىنىڭ {{PLURAL:$3|ھېسابات|ھېسابات}}ى مۇشۇ ئېلخەتكە باغلانغان:\n\n$2\n\n{{PLURAL:$3|بۇ ۋاقىتلىق پارول|بۇ ۋاقىتلىق پارول}} {{PLURAL:$5|بىر كۈن|$5 كۈن}}دە ۋاقتى ئۆتىدۇ. ئەگەر بۇ مەشغۇلاتنى سىز ئىلتىماس قىلغان بولسىڭىز، دەرھال تىزىمغا كىرىپ يېڭى پارولدىن بىرنى تاللاڭ.\nسىز بەلگىلىگەن يېڭى پارول  {{PLURAL:$5|كۈن|$5 كۈن}}دە ۋاقتى توشىدۇ. ئەگەر باشقىلار ئىلتىماس قىلغان بولسا ياكى ئۆزىڭىز بەلگىلىگەن پارول ئېسىڭىزگە كېلىپ ئۇنى ئۆزگەرتمىسىڭىز، \nبۇ ئۇچۇرغا پەرۋا قىلماي ئۆزىڭىزنىڭ كونا پارولىنى ئىشلىتىۋېرىڭ.",
        "passwordreset-emailtext-user": "{{SITENAME}} دىكى ئىشلەتكۈچى $1 بېكەت {{SITENAME}} ($4) دىكى پارولىڭىزنى قايتا بېكىتىشنى ئىلتىماس قىلدى .\nتۆۋەندىكى ئىشلەتكۈچىنىڭ {{PLURAL:$3|ھېسابات|ھېسابات}}($4)ى مۇشۇ ئېلخەتكە باغلانغان:\n\n$2\n\n{{PLURAL:$3|بۇ ۋاقىتلىق پارول|بۇ ۋاقىتلىق پارول}} {{PLURAL:$5|بىر كۈن|$5 كۈن}}دە ۋاقتى ئۆتىدۇ. ئەگەر بۇ مەشغۇلاتنى سىز ئىلتىماس قىلغان بولسىڭىز، دەرھال تىزىمغا كىرىپ يېڭى پارولدىن بىرنى تاللاڭ.\nسىز بەلگىلىگەن يېڭى پارول {{PLURAL:$5|كۈن|$5 كۈن}}دە ۋاقتى توشىدۇ. ئەگەر باشقىلار ئىلتىماس قىلغان بولسا ياكى ئۆزىڭىز بەلگىلىگەن پارول ئېسىڭىزگە كېلىپ ئۇنى ئۆزگەرتمىسىڭىز، \nبۇ ئۇچۇرغا پەرۋا قىلماي ئۆزىڭىزنىڭ كونا پارولىنى ئىشلىتىۋېرىڭ.",
        "passwordreset-emailelement": "ئىشلەتكۈچى نامى: \n$1\n\nۋاقىتلىق پارول: \n$2",
-       "passwordreset-emailsent": "پارولنى قايتا بېكىتىش ئېلخېتى يوللاندى.",
+       "passwordreset-emailsentemail": "پارولنى قايتا بېكىتىش ئېلخېتى يوللاندى.",
        "passwordreset-emailsent-capture": "پارولنى قايتا بېكىتىش ئېلخېتى يوللاندى، تۆۋەندە كۆرسىتىلىدۇ.",
        "passwordreset-emailerror-capture": "ھاسىل قىلىنغان پارولنى قايتا بېكىتىش ئېلخېتى تۆۋەندە كۆرسىتىلگەندەك ئەمما ئۇنى {{GENDER:$2|ئىشلەتكۈچى}}گە يوللىيالمىدى: $1",
        "changeemail": "ئېلخەت ئادرېس ئۆزگەرت",
-       "changeemail-text": "بۇ جەدۋەل تاماملانسا ئېلخەت ئادرېسىڭىزنى ئۆزگەرتىدۇ. سىز ئىم كىرگۈزۈپ بۇ ئۆزگەرتىشنى جەزملەيسىز.",
+       "changeemail-header": "ھېساباتنىڭ ئېلخەت ئادرېسىنى ئۆزگەرت",
        "changeemail-no-info": "سىز تىزىمغا كىرگەندىن كېيىن بىۋاسىتە بۇ بەتكە كىرىشىڭىز لازىم.",
        "changeemail-oldemail": "نۆۋەتتىكى ئېلخەت ئادرېسى:",
        "changeemail-newemail": "يېڭى ئېلخەت ئادرېسى:",
        "prefs-tokenwatchlist": "ئاچقۇچ",
        "prefs-diffs": "پەرقلەر",
        "prefs-help-prefershttps": "بۇ سەپلەك، سىز قايتا تىزىمغا كىرگەندە ئىشلەيدۇ.",
-       "email-address-validity-valid": "ئېلخەت ئادرېسى ئىناۋەتلىك",
-       "email-address-validity-invalid": "ئىناۋەتلىك ئېلخەت ئادرېسىدىن بىرنى كىرگۈزۈڭ",
        "userrights": "ئىشلەتكۈچى ھوقۇقى باشقۇرۇش",
        "userrights-lookup-user": "ئىشلەتكۈچى گۇرۇپپىسى باشقۇرۇش",
        "userrights-user-editname": "ئىشلەتكۈچى ئاتى كىرگۈزۈڭ:",
        "wlheader-showupdated": "سىز ئالدىنقى قېتىم كۆرگەندىن كېيىن ئۆزگەرتىلگەن بەتلەر '''توم''' كۆرۈنىدۇ",
        "wlnote": "تۆۋەندىكىسى يېقىنقى {{PLURAL:$2|سائەت}} ئىچىدىكى ئاخىرقى '{{PLURAL:$1| قېتىملىق}}  ئۆزگەرتىش، $3 $4 گىچە.",
        "wlshowlast": "يېقىنقى $1 سائەت $2 كۈن  نىڭ ئۆزگەرتىشىنى كۆرسەت",
+       "watchlistall2": "ھەممىسى",
        "watchlist-options": "كۆزەت تىزىملىك تاللانما",
        "watching": "كۆزەت قىلىۋاتىدۇ…",
        "unwatching": "كۆزەت قىلمايۋاتىدۇ…",
        "movenosubpage": "بۇ بەتنىڭ تارماق بېتى يوق",
        "movereason": "سەۋەب:",
        "revertmove": "قايتۇر",
-       "delete_and_move": "ئۆچۈرۈپ يۆتكە",
        "delete_and_move_text": "== ئۆچۈرۈش زۆرۈر ==\nنىشان بەت \"[[:$1]]\" مەۋجۇد.\nيۆتكەشكە قولاي بولۇشى ئۈچۈن بۇ بەتنى ئۆچۈرەمسىز؟",
        "delete_and_move_confirm": "ھەئە، بۇ بەتنى ئۆچۈر",
        "delete_and_move_reason": " \"[[$1]]\" يۆتكەشكە قولاي بولۇشى ئۈچۈن ئۆچۈرۈۋېتىلدى",
        "tooltip-pt-mycontris": "تۆھپە تىزىملىكىڭىز",
        "tooltip-pt-login": "تىزىمغا كىرىشىڭىزنى تەۋسىيە قىلىمىز ئەمما مەجبۇرىي ئەمەس",
        "tooltip-pt-logout": "تىزىمدىن چىق",
+       "tooltip-pt-createaccount": "ھېساباتتىن بىرنى قۇرۇپ تىزىمغا كىرىشىڭىزنى تەۋسىيە قىلىمىز، ئەمما بۇ مەجبۇرىي ئەمەس.",
        "tooltip-ca-talk": "بەت مەزمۇنى ھەققىدىكى مۇنازىرە",
        "tooltip-ca-edit": "بۇ بەتنى تەھرىرلىيەلەيسىز.\nساقلاشتىن ئىلگىرى ئالدىن كۆزەت كۇنۇپكىسىنى ئىشلىتىڭ",
        "tooltip-ca-addsection": "يېڭى بىر مۇنازىرە باشلاڭ",
index 62d4875..c2d96e3 100644 (file)
        "databaseerror-query": "Запит: $1",
        "databaseerror-function": "Функція: $1",
        "databaseerror-error": "Помилка: $1",
-       "transaction-duration-limit-exceeded": "Ð\94лÑ\8f Ñ\82ого, Ñ\89об Ñ\83никнÑ\83Ñ\82и Ð»Ð°Ð³Ñ\83 Ð¿Ñ\80и Ñ\80еплÑ\96каÑ\86Ñ\96Ñ\97, Ñ\86Ñ\8f Ñ\82Ñ\80анзакÑ\86Ñ\96Ñ\8f Ð±Ñ\83ла Ð¿ÐµÑ\80еÑ\80вана, Ð¾Ñ\81кÑ\96лÑ\8cки Ñ\82Ñ\80ивалÑ\96Ñ\81Ñ\82Ñ\8c Ð·Ð°Ð¿Ð¸Ñ\81Ñ\83 ($1) Ð¿ÐµÑ\80евиÑ\89ила Ð»Ñ\96мÑ\96в Ð² $2 Ñ\81ек.\nЯкщо ви змінюєте декілька елементів за один раз, постарайтесь замість цього зробити декілька невеликих операцій.",
+       "transaction-duration-limit-exceeded": "Щоб Ñ\83никнÑ\83Ñ\82и Ð²ÐµÐ»Ð¸ÐºÐ¾Ð³Ð¾ Ð»Ð°Ð³Ñ\83 Ð¿Ñ\80и Ñ\80еплÑ\96каÑ\86Ñ\96Ñ\97, Ñ\86Ñ\8f Ñ\82Ñ\80анзакÑ\86Ñ\96Ñ\8f Ð±Ñ\83ла Ð¿ÐµÑ\80еÑ\80вана, Ð¾Ñ\81кÑ\96лÑ\8cки Ñ\82Ñ\80ивалÑ\96Ñ\81Ñ\82Ñ\8c Ð·Ð°Ð¿Ð¸Ñ\81Ñ\83 ($1) Ð¿ÐµÑ\80евиÑ\89ила Ð¾Ð±Ð¼ÐµÐ¶ÐµÐ½Ð½Ñ\8f Ð² $2 {{PLURAL:$2|Ñ\81екÑ\83ндÑ\83\81екÑ\83нд|Ñ\81екÑ\83нди}}.\n\nЯкщо ви змінюєте декілька елементів за один раз, постарайтесь замість цього зробити декілька невеликих операцій.",
        "laggedslavemode": "Увага: сторінка може не містити останніх редагувань.",
        "readonly": "Запис до бази даних заблокований",
        "enterlockreason": "Зазначте причину і приблизний термін блокування",
        "passwordreset-emailtext-ip": "Хтось (імовірно ви, з IP-адреси $1) попросив нагадати деталі вашого облікового запису для {{SITENAME}} ($4). З вашою електронною скринькою пов'язан{{PLURAL:$3|1=ий такий запис|і такі записи}}:\n\n$2\n\n{{PLURAL:$3|1=Цей тимчасовий пароль стане недійсним|Ці тимчасові паролі стануть недійсними}} через $5 {{PLURAL:$5|день|дні|днів}}.\nВи маєте ввійти в систему і вибрати новий пароль. Якщо ж цей запит зробив хтось інший або ви згадали свій старий пароль і не бажаєте його змінювати, можете ігнорувати це повідомлення та продовжувати використовувати старий пароль.",
        "passwordreset-emailtext-user": "Користувач $1 з {{SITENAME}} попросив нагадати деталі вашого облікового запису для {{SITENAME}} ($4). З вашою електронною скринькою пов'язан{{PLURAL:$3|1=ий такий запис|і такі записи}}:\n\n$2\n\n{{PLURAL:$3|1=Цей тимчасовий пароль|Ці тимчасові паролі}} стануть нечинні через {{PLURAL:$5|день|$5 дні|$5 днів}}.\nВи маєте ввійти в систему і вибрати новий пароль. Якщо ж цей запит зробив хтось інший, або ви згадали свій старий пароль і не бажаєте його змінювати, можете просто ігнорувати це повідомлення та продовжувати використовувати старий пароль.",
        "passwordreset-emailelement": "Ім'я користувача: \n$1\n\nТимчасовий пароль: \n$2",
-       "passwordreset-emailsentemail": "Якщо це адреса електронної пошти, на яку зареєстрований ваш обліковий запис, то буде надісланий лист для відновлення пароля.",
-       "passwordreset-emailsentusername": "ЯкÑ\89о Ñ\86е Ð²Ñ\96дповÑ\96дна Ð°Ð´Ñ\80еÑ\81а ÐµÐ»ÐµÐºÑ\82Ñ\80онноÑ\97 Ð¿Ð¾Ñ\88Ñ\82и, Ð±Ñ\83де Ð²Ñ\96дпÑ\80авлено лист для відновлення пароля.",
+       "passwordreset-emailsentemail": "Якщо ця електронна адреса асоційована з вашим обліковим записом, то лист для відновлення пароля буде відправлено на неї.",
+       "passwordreset-emailsentusername": "ЯкÑ\89о Ñ\96Ñ\81нÑ\83Ñ\94 ÐµÐ»ÐµÐºÑ\82Ñ\80онна Ð°Ð´Ñ\80еÑ\81а, Ñ\8fка Ð°Ñ\81оÑ\86Ñ\96йована Ð· Ñ\86им Ð¾Ð±Ð»Ñ\96ковим Ð·Ð°Ð¿Ð¸Ñ\81ом, Ð½Ð° Ð½ÐµÑ\97 Ð±Ñ\83де Ð½Ð°Ð´Ñ\96Ñ\81лано лист для відновлення пароля.",
        "passwordreset-emailsent-capture": "Електронний лист скидання пароля було надіслано, як показано нижче.",
        "passwordreset-emailerror-capture": "Електронний лист для відновлення пароля мав бути надісланий, як показано нижче, але його надсилання {{GENDER:$2|користувачеві|користувачці}} $1 не вдалося.",
        "changeemail": "Змінити або вилучити адресу електронної пошти",
        "upload-form-label-select-file": "Обрати файл",
        "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-usage-filename": "Назва файлу",
        "foreign-structured-upload-form-label-own-work": "Це моя власна робота",
        "wlshowhideanons": "анонімних користувачів",
        "wlshowhidepatr": "перевірені редагування",
        "wlshowhidemine": "мої редагування",
+       "wlshowhidecategorization": "категоризацію сторінок",
        "watchlist-options": "Налаштування списку спостереження",
        "watching": "Додавання до списку спостереження…",
        "unwatching": "Вилучення зі списку спостереження…",
        "export-download": "Зберегти як файл",
        "export-templates": "Включити шаблони",
        "export-pagelinks": "Включити пов'язані сторінки з глибиною:",
+       "export-manual": "Додати сторінки вручну:",
        "allmessages": "Системні повідомлення",
        "allmessagesname": "Назва",
        "allmessagesdefault": "Стандартний текст",
        "tags-deactivate": "вимкнути",
        "tags-hitcount": "$1 {{PLURAL:$1|зміна|зміни|змін}}",
        "tags-manage-no-permission": "У Вас нема дозволу керувати змінами міток.",
+       "tags-manage-blocked": "Не можна змінювати мітки під час блокування.",
        "tags-create-heading": "Створити нову мітку",
        "tags-create-explanation": "За замовчуванням, новостворені мітки будуть доступні для використання користувачами і ботами.",
        "tags-create-tag-name": "Назва мітки:",
        "tags-deactivate-not-allowed": "Неможливо вимкнути мітку «$1».",
        "tags-deactivate-submit": "Вимкнути",
        "tags-apply-no-permission": "Ви не маєте права міняти мітки вашого редагування.",
+       "tags-apply-blocked": "Ви не можете змінювати мітки редагувань, будучи заблокованим.",
        "tags-apply-not-allowed-one": "Мітку «$1» не можна додавати вручну.",
        "tags-apply-not-allowed-multi": "{{PLURAL:$2|Таку мітку|Такі мітки}} не можна додавати вручну: $1",
        "tags-update-no-permission": "Ви не маєте права додавати або вилучати мітки окремих версій чи журнальних записів.",
+       "tags-update-blocked": "Ви не можете додати чи видалити мітки редагувань, будучи заблокованим.",
        "tags-update-add-not-allowed-one": "Мітку \"$1\" не можна додавати вручну.",
        "tags-update-add-not-allowed-multi": "{{PLURAL:$2|Таку мітку|Такі мітки}} не можна додавати вручну: $1",
        "tags-update-remove-not-allowed-one": "Мітку «$1» не дозволено вилучати.",
        "expand_templates_preview": "Попередній перегляд",
        "expand_templates_preview_fail_html": "<em>Оскільки {{SITENAME}} має ввімкненим сирий HTML і відбулась втрата даних сесії, попередній перегляд прихований як захід безпеки від JavaScript-атак.</em>\n\n<strong>Якщо це правомірна спроба попереднього перегляду, будь ласка, спробуйте знову.</strong>\nЯкщо це досі не працює, спробуйте [[Special:UserLogout|вийти із системи]] та знову ввійти до неї.",
        "expand_templates_preview_fail_html_anon": "<em>Оскільки {{SITENAME}} має ввімкненим сирий HTML, а Ви не ввійшли до системи, попередній перегляд прихований як захід безпеки від JavaScript-атак.</em>\n\n<strong>Якщо це правомірна спроба попереднього перегляду, будь ласка, [[Special:UserLogin|увійдіть до системи]] та спробуйте знову.</strong>",
+       "expand_templates_input_missing": "Ви повинні надати принаймні деякий вхідний текст.",
        "pagelanguage": "Вибір мови сторінки",
        "pagelang-name": "Сторінка",
        "pagelang-language": "Мова",
        "pagelang-use-default": "Мова за замовчуванням",
        "pagelang-select-lang": "Оберіть мову",
+       "pagelang-submit": "Відправити",
        "right-pagelang": "зміна мови сторінки",
        "action-pagelang": "змінити мову сторінки",
        "log-name-pagelang": "Журнал змін мови",
        "mediastatistics": "Медіа-статистика",
        "mediastatistics-summary": "Статистичні дані про типи завантажених файлів. Вона тільки включає в себе найновішу версію файлу. Старі або видалені версії файлів виключені.",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1 байт|$1 байтів|$1 байти}} ($2; $3%)",
+       "mediastatistics-bytespertype": "Загальний розмір файлів для цього розділу: {{PLURAL:$1|$1 байт|$1 байтів|$1 байта}} ($2; $3%).",
+       "mediastatistics-allbytes": "Загальний розмір файлів на цій сторінці: {{PLURAL:$1|$1 байт|$1 байта|$1 байтів}} ($2).",
        "mediastatistics-table-mimetype": "MIME-тип",
        "mediastatistics-table-extensions": "Можливі розширення",
        "mediastatistics-table-count": "Кількість файлів",
        "mediastatistics-header-text": "Текст",
        "mediastatistics-header-executable": "Виконувані файли",
        "mediastatistics-header-archive": "Стиснуті формати",
+       "mediastatistics-header-total": "Усі файли",
        "json-warn-trailing-comma": "$1 {{PLURAL:$1|зайву завершальну кому|зайвих завершальних коми|зайвих завершальних ком}} було видалено із JSON",
        "json-error-unknown": "Виникла проблема із JSON. Помилка: $1",
        "json-error-depth": "Перевищено дозволену глибину стека",
index 1892cb6..c446107 100644 (file)
        "protect-othertime": "دیگر وقت:",
        "protect-othertime-op": "دیگر وقت",
        "protect-otherreason-op": "دیگر وجہ",
-       "protect-expiry-options": "1 گھنٹہ:1 گھنٹہ،1 دن:1 دن،1 ہفتہ:1 ہفتہ،2 ہفتے:2 ہفتے،1 مہینا:1 مہینا،3 مہینے:3 مہینے،6 مہینے:6 مہینے،1 سال:1 سال،لامحدود:لامحدود",
+       "protect-expiry-options": "1 hour:1 hour,1 day:1 day,1 week:1 week,2 weeks:2 weeks,1 month:1 month,3 months:3 months,6 months:6 months,1 year:1 year,infinite:infinite",
        "restriction-type": "اجازت:",
        "pagesize": "(بائیٹ)",
        "restriction-edit": "تحریر و ترمیم",
index 28eb8cc..151a632 100644 (file)
        "unprotectthispage": "更改此页个保护",
        "newpage": "新页",
        "talkpage": "探討箇頁",
-       "talkpagelinktext": "讨论",
+       "talkpagelinktext": "讲张",
        "specialpage": "特別頁",
        "personaltools": "私人家伙",
        "articlepage": "望内容页",
        "pool-timeout": "等锁过时",
        "pool-queuefull": "池队列满哉",
        "pool-errorunknown": "弗识个错误",
-       "pool-servererror": "池计数器服务现在弗好用($1)",
+       "pool-servererror": "池计数器服务弗能用($1)。",
        "poolcounter-usage-error": "用法出错:$1",
        "aboutsite": "有关{{SITENAME}}",
        "aboutpage": "Project:关于",
        "laggedslavemode": "警告: 页面可能弗包含最近个更新。",
        "readonly": "數據庫鎖牢",
        "enterlockreason": "请输入锁定个原因,包括预计解锁个辰光",
-       "readonlytext": "数据库目前禁止输入新内容及更改,\n箇蛮有可能是因为数据库拉许维修,完成仔即可恢复。\n\n管理员有如下解释:$1",
+       "readonlytext": "数据库目前锁牢勒上,禁止输入新内容及更改,箇蛮有可能是因为数据库拉许维修,完成仔即可恢复。\n\n系统管理员有如下解释:$1",
        "missing-article": "数据库寻弗着想寻个页面文本:名字“$1”$2。\n\n箇一般是由于点击了链向旧有差异或历史个链接,而原有修订已拨删除导致个。\n\n如果弗是箇种情况,你侬作兴寻着软件里一个错误。畀URL地址记落来,搭[[Special:ListUsers/sysop|管理员]]报告。",
        "missingarticle-rev": "(版本#:$1)",
        "missingarticle-diff": "(两样:$1、$2)",
        "title-invalid-empty": "请求个页面标题是空个,或着只包括名字空间个名称。",
        "title-invalid-utf8": "请求个页面标题包括一只无效个UTF-8序列。",
        "title-invalid-interwiki": "请求个页面标题包含跨wiki个链接,伊弗好用于标题。",
-       "title-invalid-talk-namespace": "请求个页面标题引用子一只弗好存在个讨论页面。",
+       "title-invalid-talk-namespace": "请求个页面标题引用著一只弗能存在个讨论页。",
        "title-invalid-characters": "请求个页面标题包括无效字符:“$1”。",
        "title-invalid-relative": "标题有相对个路径。相关个页面标题(./, ../)呒没效果,因为用户浏览器经常呒没办法到达这些页面。",
        "title-invalid-magic-tilde": "请求个页面标题包含呒没效果个连续波浪线(<nowiki>~~~</nowiki>)。",
        "mypreferencesprotected": "你个私人偏好你呒处编。",
        "ns-specialprotected": "特殊页编辑是弗来三个。",
        "titleprotected": "箇只标题已经拨[[User:$1|$1]]保护以防止创建。理由是''$2''。",
-       "filereadonlyerror": "\"$1\"文件呒处改,文件存勒 \"$2\" 是只读模式。管理员考虑畀渠锁牢个理由是:\"$3\"。",
+       "filereadonlyerror": "“$1”文件呒处改,因为文件库“$2”是只读模式。\n\n锁牢数据库个系统管理员解释如下:“$3”。",
        "invalidtitle-knownnamespace": "非法个题目头,有名字空间$2搭文字$3",
        "invalidtitle-unknownnamespace": "非法个题目头,有弗识个数字$1搭文字$2",
        "exception-nologin": "朆登录",
        "userlogin-yourname": "用户名",
        "userlogin-yourname-ph": "打进侬个用户名",
        "createacct-another-username-ph": "打进用户名",
-       "yourpassword": "密码:",
+       "yourpassword": "密码",
        "userlogin-yourpassword": "密码",
        "userlogin-yourpassword-ph": "密码打进去",
        "createacct-yourpassword-ph": "打进密码",
        "createacct-reason-ph": "为何物建别样账号",
        "createacct-submit": "建立侬个账号",
        "createacct-another-submit": "建立账号",
-       "createacct-benefit-heading": "{{SITENAME}}是靠著搭侬一样个人建立出来个。",
+       "createacct-benefit-heading": "{{SITENAME}}靠像侬一样个人建立。",
        "createacct-benefit-body1": "{{PLURAL:$1|编写}}",
        "createacct-benefit-body2": "{{PLURAL:$1|页}}",
        "createacct-benefit-body3": "此垡{{PLURAL:$1|出力个人}}",
        "pt-login-button": "登录",
        "pt-createaccount": "建账号",
        "pt-userlogout": "登出",
-       "user-mail-no-addy": "尝试发送邮件而弗附带电子邮件个地址。",
-       "user-mail-no-body": "试图发送空个或者主体短的一点也弗合理个电子邮件",
+       "user-mail-no-addy": "尝试发送电子邮件而弗带地址。",
+       "user-mail-no-body": "尝试发送空个或者短得弗合理个电子邮件",
        "changepassword": "改密码",
        "resetpass_announce": "要完成登录,侬必须设定一只新密码。",
        "resetpass_header": "更改密码",
        "oldpassword": "旧密码:",
-       "newpassword": "新密码:",
-       "retypenew": "再打一遍新密码:",
+       "newpassword": "新密码",
+       "retypenew": "再打一遍新密码",
        "resetpass_submit": "设置密码再登录",
        "changepassword-success": "密碼改好哉!\n能界登錄當中...",
        "changepassword-throttled": "侬试登录忒多次哉。等$1再试试看。",
        "resetpass-submit-loggedin": "更改密码",
        "resetpass-submit-cancel": "取消",
        "resetpass-wrong-oldpass": "无效个临时或者现有密码。\n侬作兴已经成功拿密码改脱,或者已经请求一个新个临时密码。",
-       "resetpass-recycled": "请é\87\8d置侬个å¯\86ç \81æ\98¯å¿\92侬å½\93å\89\8då¯\86ç \81ä¸\8då\90\8c个密码。",
+       "resetpass-recycled": "请é\87\8dç½®ä¸\80å\8fªæ\90­ä¾¬å½\93å\89\8då¯\86ç \81å¼\97ä¸\80æ ·个密码。",
        "resetpass-temp-password": "临时密码:",
        "resetpass-abort-generic": "密码更改已经畀扩展程序中止。",
        "resetpass-expired": "侬个密码到期哉。请设置新个登录密码。",
        "userpage-userdoesnotexist": "用户账户“<nowiki>$1</nowiki>”弗曾创建。请垃拉创建/编辑迭个页面前头先检查一记。",
        "userpage-userdoesnotexist-view": "用户账户“$1”弗曾创建。",
        "blocked-notice-logextract": "箇位用户箇歇畀封锁垃许。\n下头有最近个封锁纪录以供参考:",
-       "clearyourcache": "'''注意:垃拉保存之后,侬必须清除浏览器个缓存再好看见所作出个改变。'''\n'''Mozilla / Firefox / Safari''':揿牢''Shift''再点击''刷新'',或揿''Ctrl-F5''或''Ctrl-R''(垃拉Mac上揿 ''Command-R'');\n'''Konqueror''':只需点击''刷新''或揿''F5'';\n'''Opera''':垃拉 ''工具→首选项''里向完整清除渠拉个缓存,或揿''Alt-F5'';\n'''Internet Explorer''':揿牢''Ctrl''再点击''刷新'',或揿''Ctrl-F5''。",
+       "clearyourcache": "<strong>注意:</strong>垃拉保存之后,侬作兴要清除浏览器个缓存再好看见改变。\n* <strong>Firefox或Safari:</strong>揿牢“Shift”个同时点击“刷新”,或揿“Ctrl-F5”或“Ctrl-R”(Mac上是“⌘-R”)\n* <strong>Google Chrome:</strong>揿“Ctrl-Shift-R”(Mac上是“⌘-Shift-R”)\n* <strong>Internet Explorer:</strong>揿牢“Ctrl”个同时点击“刷新”,或揿“Ctrl-F5”\n* <strong>Opera:</strong>垃拉“工具→首选项”里向清除缓存",
        "usercssyoucanpreview": "'''提示:''' 垃拉保存之前请用“{{int:showpreview}}”揿钮来测试新 CSS 。",
        "userjsyoucanpreview": "'''提示:''' 垃拉保存之前请用“{{int:showpreview}}”揿钮来测试新 JavaScript 。",
        "usercsspreview": "'''注意侬只是垃许预览侬个 CSS。'''\n'''还弗曾保存!'''",
        "yourdiff": "两样",
        "copyrightwarning": "请注意侬对{{SITENAME}}个所有贡献侪必须垃拉$2下头发布(请查看垃拉$1个细节)。假使侬弗希望侬个文字畀任意修改搭再发布,请弗要提交。<br />\n侬同时也要向阿拉保证侬所提交个内容是侬自家所作,或得自一个弗受版权保护或相似自由个来源。<strong>弗要垃拉弗曾获得授权个情况下头发表!</strong>",
        "copyrightwarning2": "请注意侬对{{SITENAME}}个所有贡献\n侪可能畀别个贡献者编辑,修改或删除。\n假使侬弗希望侬个文字畀任意修改搭仔再发布,请弗要提交。<br />\n侬同时也要向我伲保证侬提交个内容是侬自家所作,或得自一个弗受版权保护或相似自由个来源(参阅$1个细节)。\n''' 弗要垃拉弗曾获得授权个情况下头发表!'''",
-       "longpageerror": "'''错误:侬提交个文本长度有$1KB,大于$2KB个顶大值。'''该文本弗能保存。",
-       "readonlywarning": "<strong>警告:数据库锁定垃许维护,侬箇歇弗好保存侬个修改。</strong>侬作兴希望先拿侬个文字复制并保存到文本文件,等歇再修改。\n\n锁牢数据库个管理员有如下解释:$1",
+       "longpageerror": "<strong>错误:侬提交个文本长度有$1KB,大于$2KB个顶大值。</strong>该文本弗能保存。",
+       "readonlywarning": "<strong>è­¦å\91\8aï¼\9aæ\95°æ\8d®åº\93é\94\81å®\9aå\9e\83许维æ\8a¤ï¼\8c侬ç®\87æ­\87å¼\97好ä¿\9då­\98侬个修æ\94¹ã\80\82</strong>侬ä½\9cå\85´å¸\8cæ\9c\9bå\85\88æ\8b¿ä¾¬ä¸ªæ\96\87å­\97å¤\8då\88¶å¹¶ä¿\9då­\98å\88°æ\96\87æ\9c¬æ\96\87件ï¼\8cç­\89æ­\87å\86\8dä¿®æ\94¹ã\80\82\n\né\94\81ç\89¢æ\95°æ\8d®åº\93个系ç»\9f管ç\90\86å\91\98æ\9c\89å¦\82ä¸\8b解é\87\8aï¼\9a$1",
        "protectedpagewarning": "<strong>警告:此页已经畀保护,只有拥有管理员权限个用户再好修改。</strong>最近个日志垃拉下底提供以便参考:",
        "semiprotectedpagewarning": "'''注意:''' 本页面畀锁定,仅限注册用户编辑。\n最近个日志垃拉下底提供以便参考:",
        "cascadeprotectedwarning": "<strong>警告:</strong>本页已经畀保护,只有拥有管理员权限个用户再好修改,因为本页已畀下底眼级联保护个{{PLURAL:$1|一只|多只}}页面所嵌入:",
        "next": "后头",
        "last": "上个",
        "page_first": "最前",
-       "page_last": "末",
+       "page_last": "末",
        "histlegend": "选择比较版本:标记要比较个两只版本,回车或者揿页面底里个揿钮。<br /> 图例:(当前) = 搭当前版本有啥两样, (上个) = 搭上个版本有啥两样,小 = 小改动。",
        "history-fieldset-title": "浏览页史",
        "history-show-deleted": "只准删脱个",
        "stub-threshold": "短链接格式阈值($1):",
        "stub-threshold-disabled": "停用",
        "recentchangesdays": "“近段辰光个改动”当中显示几日天:",
-       "recentchangesdays-max": "最长 $1 日",
+       "recentchangesdays-max": "顶多$1天",
        "recentchangescount": "默认显示个编辑数:",
        "prefs-help-recentchangescount": "迭个包括近段辰光个改动、页面历史搭著日志。",
        "savedprefs": "倷个偏好已经保存哉。",
        "timezonelegend": "时区:",
        "localtime": "当地辰光:",
        "timezoneuseserverdefault": "使用wiki默认值($1)",
-       "timezoneuseoffset": "其(指定时差)",
+       "timezoneuseoffset": "其(指定时差)",
        "servertime": "服务器辰光:",
        "guesstimezone": "从浏览器填写",
        "timezoneregion-africa": "非洲",
        "prefs-custom-js": "自定义JavaScript",
        "prefs-common-css-js": "所有皮肤一道用个CSS/JavaScript:",
        "prefs-emailconfirm-label": "电子邮件确认:",
-       "youremail": "电子信箱:",
+       "youremail": "电子信箱",
        "username": "{{GENDER:$1|用户名}}:",
        "prefs-registration": "注册辰光:",
-       "yourrealname": "真名字:",
-       "yourlanguage": "语言:",
-       "yournick": "绰号:",
+       "yourrealname": "真名字",
+       "yourlanguage": "界面语言:",
+       "yournick": "新签名:",
        "badsig": "无效原始签名;检查 HTML 标签。",
        "yourgender": "侬希望畀哪亨称呼?",
        "gender-unknown": "提到侬个辰光,软件会尽量用性别中立个词汇",
        "unwatch": "弗关注",
        "unwatchthispage": "停止监控",
        "notanarticle": "弗是內容頁",
-       "watchlist-details": "弗包括讨论页,有 $1 页徕你侬关注表里向。",
+       "watchlist-details": "有$1页垃拉侬关注表高头,弗包括讨论页。",
        "wlheader-showupdated": "勒侬上趟查看之后畀修改个页面<strong>加粗</strong>显示。",
        "wlnote": "下底是{{PLURAL:$2|过去<strong>$2</strong>个钟头}}个{{PLURAL:$1|最后<strong>$1</strong>届更改}},截至$3 $4。",
        "wlshowlast": "显示上$1个钟头$2日天",
        "changed": "改变哉",
        "deletepage": "删脱页面",
        "confirm": "确认",
+       "excontentauthor": "内容是:“$1”,唯一贡献者是“[[Special:Contributions/$2|$2]]”([[User talk:$2|讲张]])",
        "historywarning": "<strong>警告:</strong>侬要删脱个页面有$1次{{PLURAL:$1|修订}}历史:",
        "confirmdeletetext": "侬即将删除一只页面或图像以及其历史。\n请确定侬要进行此项操作,并且了解其后果,同时侬个行为符合[[{{MediaWiki:Policy-url}}|the policy]]。",
        "actioncomplete": "操作完成哉",
        "year": "从箇年往前:",
        "sp-contributions-newbies": "只显示新用户个贡献",
        "sp-contributions-blocklog": "查封记录",
-       "sp-contributions-talk": "è¨\8eè«\96",
+       "sp-contributions-talk": "讲张",
        "sp-contributions-search": "搜寻贡献记录",
        "sp-contributions-username": "IP地址要勿用户名:",
        "sp-contributions-submit": "搜寻",
        "allmessagesname": "名字",
        "allmessagesdefault": "默认文本",
        "allmessagescurrent": "当前文本",
-       "allmessagestext": "该个是MediaWiki名字空间里可用个系统消息列表。\n如果想为MediaWiki个本地化贡献翻译,请访问[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki本地化]搭[//translatewiki.net translatewiki.net]。",
+       "allmessagestext": "该个是MediaWiki名字空间里可用个系统消息列表。如果想为MediaWiki个本地化贡献翻译,请访问[https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki本地化]搭[//translatewiki.net translatewiki.net]。",
        "allmessagesnotsupportedDB": "'''{{ns:special}}:Allmessages''' 呒处显示,因为 '''$wgUseDatabaseMessages''' 关勒浪。",
        "thumbnail-more": "放大",
        "filemissing": "文件寻弗着哉",
        "logentry-delete-delete": "$1{{GENDER:$2|删除}}页面$3",
        "revdelete-restricted": "已将限制应用到管理员",
        "revdelete-unrestricted": "已移除对管理员个限制",
+       "logentry-block-block": "$1{{GENDER:$2|查封}}{{GENDER:$4|$3}},终止辰光为$5$6",
        "logentry-move-move": "$1{{GENDER:$2|捅荡}}页面$3到$4",
        "logentry-newusers-create": "用户账号$1畀{{GENDER:$2|创建}}",
+       "logentry-newusers-create2": "用户账号$3畀$1{{GENDER:$2|创建}}",
+       "logentry-newusers-autocreate": "用户账号$1畀自动{{GENDER:$2|创建}}",
        "logentry-upload-upload": "$1{{GENDER:$2|上传}}$3",
        "rightsnone": "(呒)",
        "revdelete-summary": "编辑摘要",
-       "searchsuggest-search": "搜寻"
+       "searchsuggest-search": "搜寻",
+       "pagelang-language": "闲话"
 }
index bec3071..356aa9c 100644 (file)
                ]
        },
        "tog-underline": "链接下划线:",
-       "tog-hideminor": "隐藏最近更改中的小编辑",
-       "tog-hidepatrolled": "隐藏最近更改中的已巡查编辑",
-       "tog-newpageshidepatrolled": "隐藏新页面列表中的已巡查页面",
-       "tog-hidecategorization": "隐藏页面的分类",
+       "tog-hideminor": "在最近更改中隐藏小编辑",
+       "tog-hidepatrolled": "在最近更改中隐藏已巡查的编辑",
+       "tog-newpageshidepatrolled": "在新页面列表中隐藏已巡查页面",
+       "tog-hidecategorization": "隐藏页面的分类",
        "tog-extendwatchlist": "扩展监视列表以显示所有更改,而不仅是最近的更改",
        "tog-usenewrc": "按页面合并最近更改和监视列表中的更改",
        "tog-numberheadings": "自动将标题编号",
        "nocookiesnew": "该用户帐户已被创建,但登录失败。{{SITENAME}}使用Cookie实现用户登录。您已禁用Cookie,请启用Cookie,然后使用你的新用户名与密码登录。",
        "nocookieslogin": "{{SITENAME}}使用Cookie实现用户登录。您已停用Cookie。请启用Cookie后再试。",
        "nocookiesfornew": "该用户账户未被创建,我们不能确认它的来源。请确保你已启用Cookie,刷新本页后再试。",
-       "noname": "你没有指定有效的用户名。",
+       "noname": "指定有效的用户名。",
        "loginsuccesstitle": "登录成功",
        "loginsuccess": "<strong>您现在已经以\"$1\"的身份登录了{{SITENAME}}。</strong>",
        "nosuchuser": "没有名为“$1”的用户。用户名区分大小写。请检查你的拼写或[[Special:UserLogin/signup|创建新账户]]。",
        "nosuchusershort": "没有名为“$1”的用户。请检查你的拼写。",
-       "nouserspecified": "你必须指定用户名。",
+       "nouserspecified": "您必须指定一个用户名。",
        "login-userblocked": "该用户已被封禁,禁止登录。",
        "wrongpassword": "您输入的密码错误。请重试。",
        "wrongpasswordempty": "密码输入为空。请重试。",
        "edit-conflict": "编辑冲突。",
        "edit-no-change": "因为没有文字更改,你的编辑已被忽略。",
        "postedit-confirmation-created": "页面已创建。",
-       "postedit-confirmation-restored": "页面已创建。",
+       "postedit-confirmation-restored": "页面已恢复。",
        "postedit-confirmation-saved": "你的编辑已保存。",
        "edit-already-exists": "不可以建立一个新页面。\n它已经存在。",
        "defaultmessagetext": "默认消息文本",
        "rev-deleted-text-view": "本页面版本已被'''删除'''。你可以查看它,详情请见[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} 删除日志]。",
        "rev-suppressed-text-view": "该页面版本已经被'''监督隐藏'''。您可以查看它。在[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} 监督日志]中可以找到详细的信息。",
        "rev-deleted-no-diff": "你不能查看该差异,因为其中一个版本已被'''删除'''。详情请见[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} 删除日志]。",
-       "rev-suppressed-no-diff": "你不能查看该差异,因为其中一个版本已被'''删除'''。",
+       "rev-suppressed-no-diff": "无法查看该差异,因为其中一个版本已被<strong>删除<strong>。",
        "rev-deleted-unhide-diff": "该差异对比的其中的一个版本已经被<strong>删除</strong>。在[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} 删除日志]中可以找到更多的信息。如果您想继续的话,您仍然可以[$1 查看此版本]。",
        "rev-suppressed-unhide-diff": "该页面的其中一次版本已经被<strong>监督隐藏</strong>。\n在[{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} 监督日志]中可以找到更多的资料。如果您想继续的话,您可以仍然[$1 去查看这版本]。",
        "rev-deleted-diff-view": "差异对比中的一次版本已被<strong>删除</strong>。您可以对比此差异。详细信息可在[{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} 删除日志]中找到。",
        "prefs-custom-css": "自定义CSS",
        "prefs-custom-js": "自定义JavaScript",
        "prefs-common-css-js": "所有皮肤共用的CSS/JavaScript:",
-       "prefs-reset-intro": "你可以使用本页面重置你的系统设置为网站默认值。该操作不能撤销。",
+       "prefs-reset-intro": "可以通过本页面将系统设置重置为网站默认值。该操作无法撤销。",
        "prefs-emailconfirm-label": "电子邮件确认:",
        "youremail": "电子邮件:",
        "username": "{{GENDER:$1|用户名}}:",
        "upload-form-label-select-file": "选择文件",
        "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-usage-filename": "文件名",
        "foreign-structured-upload-form-label-own-work": "这是我的作品",
        "export-download": "另存为文件",
        "export-templates": "包含模板",
        "export-pagelinks": "包含链接页面的搜索深度:",
+       "export-manual": "手动添加页面:",
        "allmessages": "系统消息",
        "allmessagesname": "名称",
        "allmessagesdefault": "默认信息文字",
        "compare-submit": "对比",
        "compare-invalid-title": "您指定的标题无效。",
        "compare-title-not-exists": "您指定的标题不存在。",
-       "compare-revision-not-exists": "指定的版本不存在。",
+       "compare-revision-not-exists": "指定的版本不存在。",
        "dberr-problems": "抱歉!本网站出现了一些技术问题。",
        "dberr-again": "请等待几分钟后重试。",
        "dberr-info": "(无法访问数据库:$1)",
        "expand_templates_preview": "预览",
        "expand_templates_preview_fail_html": "<em>因为{{SITENAME}}启用了Raw HTML并且丢失了会话数据,预览被隐藏以防止JavaScript攻击。</em>\n\n<strong>如果这是合法的预览尝试,请再次重试。</strong>\n如果仍然不能工作,尝试[[Special:UserLogout|退出]]并重新登录。",
        "expand_templates_preview_fail_html_anon": "<em>因为{{SITENAME}}启用了Raw HTML并且丢失了会话数据,预览被隐藏以防止JavaScript攻击。</em>\n\n<strong>如果这是合法的预览尝试,请尝试[[Special:UserLogin|登录]]并重试。</strong>",
+       "expand_templates_input_missing": "您需要提供至少一些输入文本。",
        "pagelanguage": "页面语言选择器",
        "pagelang-name": "页面",
        "pagelang-language": "语言",
        "mediastatistics": "媒体统计",
        "mediastatistics-summary": "有关上传文件类型的统计。这只包含文件的最新版本,旧版本或删除版本则不会包括。",
        "mediastatistics-nbytes": "{{PLURAL:$1|$1字节}}($2;$3%)",
-       "mediastatistics-bytespertype": "此段落的总文件大小:$1字节。",
-       "mediastatistics-allbytes": "所有文件的总文件大小:$1字节。",
+       "mediastatistics-bytespertype": "此段落的总文件大小:{{PLURAL:$1|$1字节}}($2;$3%)。",
+       "mediastatistics-allbytes": "所有文件的总文件大小:{{PLURAL:$1|$1字节}}($2)。",
        "mediastatistics-table-mimetype": "MIME类型",
        "mediastatistics-table-extensions": "可用扩展名",
        "mediastatistics-table-count": "文件数",
index 7825ce9..291920b 100644 (file)
@@ -105,10 +105,13 @@ abstract class Maintenance {
 
        /**
         * Used by getDB() / setDB()
-        * @var DatabaseBase
+        * @var IDatabase
         */
        private $mDb = null;
 
+       /** @var float UNIX timestamp */
+       private $lastSlaveWait = 0.0;
+
        /**
         * Used when creating separate schema files.
         * @var resource
@@ -122,6 +125,19 @@ abstract class Maintenance {
         */
        private $config;
 
+       /**
+        * Used to read the options in the order they were passed.
+        * Useful for option chaining (Ex. dumpBackup.php). It will
+        * be an empty array if the options are passed in through
+        * loadParamsAndArgs( $self, $opts, $args ).
+        *
+        * This is an array of arrays where
+        * 0 => the option and 1 => parameter value.
+        *
+        * @var array
+        */
+       public $orderedOptions = array();
+
        /**
         * Default constructor. Children should call this *first* if implementing
         * their own constructors
@@ -184,15 +200,17 @@ abstract class Maintenance {
         * @param bool $required Is the param required?
         * @param bool $withArg Is an argument required with this option?
         * @param string $shortName Character to use as short name
+        * @param bool $multiOccurrence Can this option be passed multiple times?
         */
        protected function addOption( $name, $description, $required = false,
-               $withArg = false, $shortName = false
+               $withArg = false, $shortName = false, $multiOccurrence = false
        ) {
                $this->mParams[$name] = array(
                        'desc' => $description,
                        'require' => $required,
                        'withArg' => $withArg,
-                       'shortName' => $shortName
+                       'shortName' => $shortName,
+                       'multiOccurrence' => $multiOccurrence
                );
 
                if ( $shortName !== false ) {
@@ -210,7 +228,11 @@ abstract class Maintenance {
        }
 
        /**
-        * Get an option, or return the default
+        * Get an option, or return the default.
+        *
+        * If the option was added to support multiple occurrences,
+        * this will return an array.
+        *
         * @param string $name The name of the param
         * @param mixed $default Anything you want, default null
         * @return mixed
@@ -636,43 +658,16 @@ abstract class Maintenance {
        }
 
        /**
-        * Process command line arguments
-        * $mOptions becomes an array with keys set to the option names
-        * $mArgs becomes a zero-based array containing the non-option arguments
+        * Load params and arguments from a given array
+        * of command-line arguments
         *
-        * @param string $self The name of the script, if any
-        * @param array $opts An array of options, in form of key=>value
-        * @param array $args An array of command line arguments
+        * @since 1.27
+        * @param array $argv
         */
-       public function loadParamsAndArgs( $self = null, $opts = null, $args = null ) {
-               # If we were given opts or args, set those and return early
-               if ( $self ) {
-                       $this->mSelf = $self;
-                       $this->mInputLoaded = true;
-               }
-               if ( $opts ) {
-                       $this->mOptions = $opts;
-                       $this->mInputLoaded = true;
-               }
-               if ( $args ) {
-                       $this->mArgs = $args;
-                       $this->mInputLoaded = true;
-               }
-
-               # If we've already loaded input (either by user values or from $argv)
-               # skip on loading it again. The array_shift() will corrupt values if
-               # it's run again and again
-               if ( $this->mInputLoaded ) {
-                       $this->loadSpecialVars();
-
-                       return;
-               }
-
-               global $argv;
-               $this->mSelf = array_shift( $argv );
-
+       public function loadWithArgv( $argv ) {
                $options = array();
                $args = array();
+               $this->orderedOptions = array();
 
                # Parse arguments
                for ( $arg = reset( $argv ); $arg !== false; $arg = next( $argv ) ) {
@@ -687,17 +682,14 @@ abstract class Maintenance {
                        } elseif ( substr( $arg, 0, 2 ) == '--' ) {
                                # Long options
                                $option = substr( $arg, 2 );
-                               if ( array_key_exists( $option, $options ) ) {
-                                       $this->error( "\nERROR: $option parameter given twice\n" );
-                                       $this->maybeHelp( true );
-                               }
                                if ( isset( $this->mParams[$option] ) && $this->mParams[$option]['withArg'] ) {
                                        $param = next( $argv );
                                        if ( $param === false ) {
                                                $this->error( "\nERROR: $option parameter needs a value after it\n" );
                                                $this->maybeHelp( true );
                                        }
-                                       $options[$option] = $param;
+
+                                       $this->setParam( $options, $option, $param );
                                } else {
                                        $bits = explode( '=', $option, 2 );
                                        if ( count( $bits ) > 1 ) {
@@ -706,7 +698,8 @@ abstract class Maintenance {
                                        } else {
                                                $param = 1;
                                        }
-                                       $options[$option] = $param;
+
+                                       $this->setParam( $options, $option, $param );
                                }
                        } elseif ( $arg == '-' ) {
                                # Lonely "-", often used to indicate stdin or stdout.
@@ -719,19 +712,16 @@ abstract class Maintenance {
                                        if ( !isset( $this->mParams[$option] ) && isset( $this->mShortParamsMap[$option] ) ) {
                                                $option = $this->mShortParamsMap[$option];
                                        }
-                                       if ( array_key_exists( $option, $options ) ) {
-                                               $this->error( "\nERROR: $option parameter given twice\n" );
-                                               $this->maybeHelp( true );
-                                       }
+
                                        if ( isset( $this->mParams[$option]['withArg'] ) && $this->mParams[$option]['withArg'] ) {
                                                $param = next( $argv );
                                                if ( $param === false ) {
                                                        $this->error( "\nERROR: $option parameter needs a value after it\n" );
                                                        $this->maybeHelp( true );
                                                }
-                                               $options[$option] = $param;
+                                               $this->setParam( $options, $option, $param );
                                        } else {
-                                               $options[$option] = 1;
+                                               $this->setParam( $options, $option, 1 );
                                        }
                                }
                        } else {
@@ -745,6 +735,75 @@ abstract class Maintenance {
                $this->mInputLoaded = true;
        }
 
+       /**
+        * Helper function used solely by loadParamsAndArgs
+        * to prevent code duplication
+        *
+        * This sets the param in the options array based on
+        * whether or not it can be specified multiple times.
+        *
+        * @since 1.27
+        * @param array $options
+        * @param string $option
+        * @param mixed $value
+        */
+       private function setParam( &$options, $option, $value ) {
+               $this->orderedOptions[] = array( $option, $value );
+
+               if ( isset( $this->mParams[$option] ) ) {
+                       $multi = $this->mParams[$option]['multiOccurrence'];
+                       $exists = array_key_exists( $option, $options );
+                       if ( $multi && $exists ) {
+                               $options[$option][] = $value;
+                       } elseif ( $multi ) {
+                               $options[$option] = array( $value );
+                       } elseif ( !$exists ) {
+                               $options[$option] = $value;
+                       } else {
+                               $this->error( "\nERROR: $option parameter given twice\n" );
+                               $this->maybeHelp( true );
+                       }
+               }
+       }
+
+       /**
+        * Process command line arguments
+        * $mOptions becomes an array with keys set to the option names
+        * $mArgs becomes a zero-based array containing the non-option arguments
+        *
+        * @param string $self The name of the script, if any
+        * @param array $opts An array of options, in form of key=>value
+        * @param array $args An array of command line arguments
+        */
+       public function loadParamsAndArgs( $self = null, $opts = null, $args = null ) {
+               # If we were given opts or args, set those and return early
+               if ( $self ) {
+                       $this->mSelf = $self;
+                       $this->mInputLoaded = true;
+               }
+               if ( $opts ) {
+                       $this->mOptions = $opts;
+                       $this->mInputLoaded = true;
+               }
+               if ( $args ) {
+                       $this->mArgs = $args;
+                       $this->mInputLoaded = true;
+               }
+
+               # If we've already loaded input (either by user values or from $argv)
+               # skip on loading it again. The array_shift() will corrupt values if
+               # it's run again and again
+               if ( $this->mInputLoaded ) {
+                       $this->loadSpecialVars();
+
+                       return;
+               }
+
+               global $argv;
+               $this->mSelf = $argv[0];
+               $this->loadWithArgv( array_slice( $argv, 1 ) );
+       }
+
        /**
         * Run some validation checks on the params, etc
         */
@@ -1026,7 +1085,7 @@ abstract class Maintenance {
        public function purgeRedundantText( $delete = true ) {
                # Data should come off the master, wrapped in a transaction
                $dbw = $this->getDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                # Get "active" text records from the revisions table
                $this->output( 'Searching for active text records in revisions table...' );
@@ -1069,7 +1128,7 @@ abstract class Maintenance {
                }
 
                # Done
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
        }
 
        /**
@@ -1085,7 +1144,10 @@ abstract class Maintenance {
         * If not set, wfGetDB() will be used.
         * This function has the same parameters as wfGetDB()
         *
-        * @return DatabaseBase
+        * @param integer $db DB index (DB_SLAVE/DB_MASTER)
+        * @param array $groups; default: empty array
+        * @param string|bool $wiki; default: current wiki
+        * @return IDatabase
         */
        protected function getDB( $db, $groups = array(), $wiki = false ) {
                if ( is_null( $this->mDb ) ) {
@@ -1098,12 +1160,60 @@ abstract class Maintenance {
        /**
         * Sets database object to be returned by getDB().
         *
-        * @param DatabaseBase $db Database object to be used
+        * @param IDatabase $db Database object to be used
         */
-       public function setDB( $db ) {
+       public function setDB( IDatabase $db ) {
                $this->mDb = $db;
        }
 
+       /**
+        * Begin a transcation on a DB
+        *
+        * This method makes it clear that begin() is called from a maintenance script,
+        * which has outermost scope. This is safe, unlike $dbw->begin() called in other places.
+        *
+        * @param IDatabase $dbw
+        * @param string $fname Caller name
+        * @since 1.27
+        */
+       protected function beginTransaction( IDatabase $dbw, $fname ) {
+               $dbw->begin( $fname );
+       }
+
+       /**
+        * Commit the transcation on a DB handle and wait for slaves to catch up
+        *
+        * This method makes it clear that commit() is called from a maintenance script,
+        * which has outermost scope. This is safe, unlike $dbw->commit() called in other places.
+        *
+        * @param IDatabase $dbw
+        * @param string $fname Caller name
+        * @return bool Whether the slave wait succeeded
+        * @since 1.27
+        */
+       protected function commitTransaction( IDatabase $dbw, $fname ) {
+               $dbw->commit( $fname );
+
+               $ok = wfWaitForSlaves( $this->lastSlaveWait, false, '*', 30 );
+               $this->lastSlaveWait = microtime( true );
+
+               return $ok;
+       }
+
+       /**
+        * Rollback the transcation on a DB handle
+        *
+        * This method makes it clear that rollback() is called from a maintenance script,
+        * which has outermost scope. This is safe, unlike $dbw->rollback() called in other places.
+        *
+        * @param IDatabase $dbw
+        * @param string $fname Caller name
+        * @since 1.27
+        */
+       protected function rollbackTransaction( IDatabase $dbw, $fname ) {
+               $dbw->rollback( $fname );
+       }
+
        /**
         * Lock the search index
         * @param DatabaseBase &$db
index aeadc93..d5b98b5 100644 (file)
@@ -39,7 +39,7 @@ class UpdateLogging {
        public $minTs = false;
 
        function execute() {
-               $this->dbw = wfGetDB( DB_MASTER );
+               $this->dbw = $this->getDB( DB_MASTER );
                $logging = $this->dbw->tableName( 'logging' );
                $logging_1_10 = $this->dbw->tableName( 'logging_1_10' );
                $logging_pre_1_10 = $this->dbw->tableName( 'logging_pre_1_10' );
index fba6b92..a2ea554 100644 (file)
@@ -43,7 +43,7 @@ class AttachLatest extends Maintenance {
 
        public function execute() {
                $this->output( "Looking for pages with page_latest set to 0...\n" );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $conds = array( 'page_latest' => 0 );
                if ( $this->hasOption( 'regenerate-all' ) ) {
                        $conds = '';
index 6e1ddb4..9af9604 100644 (file)
  * @ingroup Dump Maintenance
  */
 
-/**
- * @ingroup Dump Maintenance
- */
-class DumpDBZip2Output extends DumpPipeOutput {
-       function __construct( $file ) {
-               parent::__construct( "dbzip2", $file );
-       }
-}
+require_once __DIR__ . '/Maintenance.php';
+require_once __DIR__ . '/../includes/export/DumpFilter.php';
 
 /**
  * @ingroup Dump Maintenance
  */
-class BackupDumper {
+class BackupDumper extends Maintenance {
        public $reporting = true;
        public $pages = null; // all pages
        public $skipHeader = false; // don't output <mediawiki> and <siteinfo>
@@ -67,7 +61,7 @@ class BackupDumper {
         *
         * @var DatabaseBase|null
         *
-        * @see self::setDb
+        * @see self::setDB
         */
        protected $forcedDb = null;
 
@@ -77,7 +71,11 @@ class BackupDumper {
        // @todo Unused?
        private $stubText = false; // include rev_text_id instead of text; for 2-pass dump
 
-       function __construct( $args ) {
+       /**
+        * @param array $args For backward compatibility
+        */
+       function __construct( $args = null ) {
+               parent::__construct();
                $this->stderr = fopen( "php://stderr", "wt" );
 
                // Built-in output and filter plugins
@@ -91,7 +89,25 @@ class BackupDumper {
                $this->registerFilter( 'notalk', 'DumpNotalkFilter' );
                $this->registerFilter( 'namespace', 'DumpNamespaceFilter' );
 
-               $this->sink = $this->processArgs( $args );
+               // These three can be specified multiple times
+               $this->addOption( 'plugin', 'Load a dump plugin class. Specify as <class>[:<file>].',
+                       false, true, false, true );
+               $this->addOption( 'output', 'Begin a filtered output stream; Specify as <type>:<file>. ' .
+                       '<type>s: file, gzip, bzip2, 7zip, dbzip2', false, true, false, true );
+               $this->addOption( 'filter', 'Add a filter on an output branch. Specify as ' .
+                       '<type>[:<options>]. <types>s: latest, notalk, namespace', false, true, false, true );
+               $this->addOption( 'report', 'Report position and speed after every n pages processed. ' .
+                       'Default: 100.', false, true );
+               $this->addOption( 'server', 'Force reading from MySQL server', false, true );
+               $this->addOption( '7ziplevel', '7zip compression level for all 7zip outputs. Used for ' .
+                       '-mx option to 7za command.', false, true );
+
+               if ( $args ) {
+                       // Args should be loaded and processed so that dump() can be called directly
+                       // instead of execute()
+                       $this->loadWithArgv( $args );
+                       $this->processOptions();
+               }
        }
 
        /**
@@ -125,83 +141,106 @@ class BackupDumper {
                call_user_func_array( $register, array( &$this ) );
        }
 
+       function execute() {
+               throw new MWException( 'execute() must be overridden in subclasses' );
+       }
+
        /**
-        * @param array $args
-        * @return array
+        * Processes arguments and sets $this->$sink accordingly
         */
-       function processArgs( $args ) {
+       function processOptions() {
                $sink = null;
                $sinks = array();
-               foreach ( $args as $arg ) {
-                       $matches = array();
-                       if ( preg_match( '/^--(.+?)(?:=(.+?)(?::(.+?))?)?$/', $arg, $matches ) ) {
-                               MediaWiki\suppressWarnings();
-                               list( /* $full */, $opt, $val, $param ) = $matches;
-                               MediaWiki\restoreWarnings();
-
-                               switch ( $opt ) {
-                                       case "plugin":
-                                               $this->loadPlugin( $val, $param );
-                                               break;
-                                       case "output":
-                                               if ( !is_null( $sink ) ) {
-                                                       $sinks[] = $sink;
-                                               }
-                                               if ( !isset( $this->outputTypes[$val] ) ) {
-                                                       $this->fatalError( "Unrecognized output sink type '$val'" );
-                                               }
-                                               $type = $this->outputTypes[$val];
-                                               $sink = new $type( $param );
-                                               break;
-                                       case "filter":
-                                               if ( is_null( $sink ) ) {
-                                                       $sink = new DumpOutput();
-                                               }
-                                               if ( !isset( $this->filterTypes[$val] ) ) {
-                                                       $this->fatalError( "Unrecognized filter type '$val'" );
-                                               }
-                                               $type = $this->filterTypes[$val];
-                                               $filter = new $type( $sink, $param );
-
-                                               // references are lame in php...
-                                               unset( $sink );
-                                               $sink = $filter;
-
-                                               break;
-                                       case "report":
-                                               $this->reportingInterval = intval( $val );
-                                               break;
-                                       case "server":
-                                               $this->server = $val;
-                                               break;
-                                       case "force-normal":
-                                               if ( !function_exists( 'utf8_normalize' ) ) {
-                                                       $this->fatalError( "UTF-8 normalization extension not loaded. " .
-                                                               "Install or remove --force-normal parameter to use slower code." );
-                                               }
-                                               break;
-                                       default:
-                                               $this->processOption( $opt, $val, $param );
-                               }
+
+               $options = $this->orderedOptions;
+               foreach ( $options as $arg ) {
+                       $opt = $arg[0];
+                       $param = $arg[1];
+
+                       switch ( $opt ) {
+                               case 'plugin':
+                                       $val = explode( ':', $param );
+
+                                       if ( count( $val ) === 1 ) {
+                                               $this->loadPlugin( $val[0] );
+                                       } elseif ( count( $val ) === 2 ) {
+                                               $this->loadPlugin( $val[0], $val[1] );
+                                       } else {
+                                               $this->fatalError( 'Invalid plugin parameter' );
+                                               return;
+                                       }
+
+                                       break;
+                               case 'output':
+                                       $split = explode( ':', $param, 2 );
+                                       if ( count( $split ) !== 2 ) {
+                                               $this->fatalError( 'Invalid output parameter' );
+                                       }
+                                       list( $type, $file ) = $split;
+                                       if ( !is_null( $sink ) ) {
+                                               $sinks[] = $sink;
+                                       }
+                                       if ( !isset( $this->outputTypes[$type] ) ) {
+                                               $this->fatalError( "Unrecognized output sink type '$type'" );
+                                       }
+                                       $class = $this->outputTypes[$type];
+                                       if ( $type === "7zip" ) {
+                                               $sink = new $class( $file, intval( $this->getOption( '7ziplevel' ) ) );
+                                       } else {
+                                               $sink = new $class( $file );
+                                       }
+
+                                       break;
+                               case 'filter':
+                                       if ( is_null( $sink ) ) {
+                                               $sink = new DumpOutput();
+                                       }
+
+                                       $split = explode( ':', $param );
+                                       $key = $split[0];
+
+                                       if ( !isset( $this->filterTypes[$key] ) ) {
+                                               $this->fatalError( "Unrecognized filter type '$key'" );
+                                       }
+
+                                       $type = $this->filterTypes[$key];
+
+                                       if ( count( $split ) === 1 ) {
+                                               $filter = new $type( $sink );
+                                       } elseif ( count( $split ) === 2 ) {
+                                               $filter = new $type( $sink, $split[1] );
+                                       } else {
+                                               $this->fatalError( 'Invalid filter parameter' );
+                                       }
+
+                                       // references are lame in php...
+                                       unset( $sink );
+                                       $sink = $filter;
+
+                                       break;
                        }
                }
 
+               if ( $this->hasOption( 'report' ) ) {
+                       $this->reportingInterval = intval( $this->getOption( 'report' ) );
+               }
+
+               if ( $this->hasOption( 'server' ) ) {
+                       $this->server = $this->getOption( 'server' );
+               }
+
                if ( is_null( $sink ) ) {
                        $sink = new DumpOutput();
                }
                $sinks[] = $sink;
 
                if ( count( $sinks ) > 1 ) {
-                       return new DumpMultiWriter( $sinks );
+                       $this->sink = new DumpMultiWriter( $sinks );
                } else {
-                       return $sink;
+                       $this->sink = $sink;
                }
        }
 
-       function processOption( $opt, $val, $param ) {
-               // extension point for subclasses to add options
-       }
-
        function dump( $history, $text = WikiExporter::TEXT ) {
                # Notice messages will foul up your XML output even if they're
                # relatively harmless.
@@ -298,7 +337,8 @@ class BackupDumper {
         * @param DatabaseBase|null $db (Optional) the database connection to use. If null, resort to
         *   use the globally provided ways to get database connections.
         */
-       function setDb( DatabaseBase $db = null ) {
+       function setDB( IDatabase $db = null ) {
+               parent::setDB( $db );
                $this->forcedDb = $db;
        }
 
@@ -371,12 +411,13 @@ class BackupDumper {
        }
 
        function progress( $string ) {
-               fwrite( $this->stderr, $string . "\n" );
+               if ( $this->reporting ) {
+                       fwrite( $this->stderr, $string . "\n" );
+               }
        }
 
        function fatalError( $msg ) {
-               $this->progress( "$msg\n" );
-               die( 1 );
+               $this->error( "$msg\n", 1 );
        }
 }
 
diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc
deleted file mode 100644 (file)
index 0562333..0000000
+++ /dev/null
@@ -1,925 +0,0 @@
-<?php
-/**
- * BackupDumper that postprocesses XML dumps from dumpBackup.php to add page text
- *
- * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
- * https://www.mediawiki.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- */
-
-require_once __DIR__ . '/backup.inc';
-
-/**
- * @ingroup Maintenance
- */
-class TextPassDumper extends BackupDumper {
-       public $prefetch = null;
-
-       // when we spend more than maxTimeAllowed seconds on this run, we continue
-       // processing until we write out the next complete page, then save output file(s),
-       // rename it/them and open new one(s)
-       public $maxTimeAllowed = 0; // 0 = no limit
-
-       protected $input = "php://stdin";
-       protected $history = WikiExporter::FULL;
-       protected $fetchCount = 0;
-       protected $prefetchCount = 0;
-       protected $prefetchCountLast = 0;
-       protected $fetchCountLast = 0;
-
-       protected $maxFailures = 5;
-       protected $maxConsecutiveFailedTextRetrievals = 200;
-       protected $failureTimeout = 5; // Seconds to sleep after db failure
-
-       protected $bufferSize = 524288; // In bytes. Maximum size to read from the stub in on go.
-
-       protected $php = "php";
-       protected $spawn = false;
-
-       /**
-        * @var bool|resource
-        */
-       protected $spawnProc = false;
-
-       /**
-        * @var bool|resource
-        */
-       protected $spawnWrite = false;
-
-       /**
-        * @var bool|resource
-        */
-       protected $spawnRead = false;
-
-       /**
-        * @var bool|resource
-        */
-       protected $spawnErr = false;
-
-       protected $xmlwriterobj = false;
-
-       protected $timeExceeded = false;
-       protected $firstPageWritten = false;
-       protected $lastPageWritten = false;
-       protected $checkpointJustWritten = false;
-       protected $checkpointFiles = array();
-
-       /**
-        * @var DatabaseBase
-        */
-       protected $db;
-
-       /**
-        * Drop the database connection $this->db and try to get a new one.
-        *
-        * This function tries to get a /different/ connection if this is
-        * possible. Hence, (if this is possible) it switches to a different
-        * failover upon each call.
-        *
-        * This function resets $this->lb and closes all connections on it.
-        *
-        * @throws MWException
-        */
-       function rotateDb() {
-               // Cleaning up old connections
-               if ( isset( $this->lb ) ) {
-                       $this->lb->closeAll();
-                       unset( $this->lb );
-               }
-
-               if ( $this->forcedDb !== null ) {
-                       $this->db = $this->forcedDb;
-
-                       return;
-               }
-
-               if ( isset( $this->db ) && $this->db->isOpen() ) {
-                       throw new MWException( 'DB is set and has not been closed by the Load Balancer' );
-               }
-
-               unset( $this->db );
-
-               // Trying to set up new connection.
-               // We do /not/ retry upon failure, but delegate to encapsulating logic, to avoid
-               // individually retrying at different layers of code.
-
-               // 1. The LoadBalancer.
-               try {
-                       $this->lb = wfGetLBFactory()->newMainLB();
-               } catch ( Exception $e ) {
-                       throw new MWException( __METHOD__
-                               . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" );
-               }
-
-               // 2. The Connection, through the load balancer.
-               try {
-                       $this->db = $this->lb->getConnection( DB_SLAVE, 'dump' );
-               } catch ( Exception $e ) {
-                       throw new MWException( __METHOD__
-                               . " rotating DB failed to obtain new database (" . $e->getMessage() . ")" );
-               }
-       }
-
-       function initProgress( $history = WikiExporter::FULL ) {
-               parent::initProgress();
-               $this->timeOfCheckpoint = $this->startTime;
-       }
-
-       function dump( $history, $text = WikiExporter::TEXT ) {
-               // Notice messages will foul up your XML output even if they're
-               // relatively harmless.
-               if ( ini_get( 'display_errors' ) ) {
-                       ini_set( 'display_errors', 'stderr' );
-               }
-
-               $this->initProgress( $this->history );
-
-               // We are trying to get an initial database connection to avoid that the
-               // first try of this request's first call to getText fails. However, if
-               // obtaining a good DB connection fails it's not a serious issue, as
-               // getText does retry upon failure and can start without having a working
-               // DB connection.
-               try {
-                       $this->rotateDb();
-               } catch ( Exception $e ) {
-                       // We do not even count this as failure. Just let eventual
-                       // watchdogs know.
-                       $this->progress( "Getting initial DB connection failed (" .
-                               $e->getMessage() . ")" );
-               }
-
-               $this->egress = new ExportProgressFilter( $this->sink, $this );
-
-               // it would be nice to do it in the constructor, oh well. need egress set
-               $this->finalOptionCheck();
-
-               // we only want this so we know how to close a stream :-P
-               $this->xmlwriterobj = new XmlDumpWriter();
-
-               $input = fopen( $this->input, "rt" );
-               $this->readDump( $input );
-
-               if ( $this->spawnProc ) {
-                       $this->closeSpawn();
-               }
-
-               $this->report( true );
-       }
-
-       function processOption( $opt, $val, $param ) {
-               global $IP;
-               $url = $this->processFileOpt( $val, $param );
-
-               switch ( $opt ) {
-                       case 'buffersize':
-                               // Lower bound for xml reading buffer size is 4 KB
-                               $this->bufferSize = max( intval( $val ), 4 * 1024 );
-                               break;
-                       case 'prefetch':
-                               require_once "$IP/maintenance/backupPrefetch.inc";
-                               $this->prefetch = new BaseDump( $url );
-                               break;
-                       case 'stub':
-                               $this->input = $url;
-                               break;
-                       case 'maxtime':
-                               $this->maxTimeAllowed = intval( $val ) * 60;
-                               break;
-                       case 'checkpointfile':
-                               $this->checkpointFiles[] = $val;
-                               break;
-                       case 'current':
-                               $this->history = WikiExporter::CURRENT;
-                               break;
-                       case 'full':
-                               $this->history = WikiExporter::FULL;
-                               break;
-                       case 'spawn':
-                               $this->spawn = true;
-                               if ( $val ) {
-                                       $this->php = $val;
-                               }
-                               break;
-               }
-       }
-
-       function processFileOpt( $val, $param ) {
-               $fileURIs = explode( ';', $param );
-               foreach ( $fileURIs as $URI ) {
-                       switch ( $val ) {
-                               case "file":
-                                       $newURI = $URI;
-                                       break;
-                               case "gzip":
-                                       $newURI = "compress.zlib://$URI";
-                                       break;
-                               case "bzip2":
-                                       $newURI = "compress.bzip2://$URI";
-                                       break;
-                               case "7zip":
-                                       $newURI = "mediawiki.compress.7z://$URI";
-                                       break;
-                               default:
-                                       $newURI = $URI;
-                       }
-                       $newFileURIs[] = $newURI;
-               }
-               $val = implode( ';', $newFileURIs );
-
-               return $val;
-       }
-
-       /**
-        * Overridden to include prefetch ratio if enabled.
-        */
-       function showReport() {
-               if ( !$this->prefetch ) {
-                       parent::showReport();
-
-                       return;
-               }
-
-               if ( $this->reporting ) {
-                       $now = wfTimestamp( TS_DB );
-                       $nowts = microtime( true );
-                       $deltaAll = $nowts - $this->startTime;
-                       $deltaPart = $nowts - $this->lastTime;
-                       $this->pageCountPart = $this->pageCount - $this->pageCountLast;
-                       $this->revCountPart = $this->revCount - $this->revCountLast;
-
-                       if ( $deltaAll ) {
-                               $portion = $this->revCount / $this->maxCount;
-                               $eta = $this->startTime + $deltaAll / $portion;
-                               $etats = wfTimestamp( TS_DB, intval( $eta ) );
-                               if ( $this->fetchCount ) {
-                                       $fetchRate = 100.0 * $this->prefetchCount / $this->fetchCount;
-                               } else {
-                                       $fetchRate = '-';
-                               }
-                               $pageRate = $this->pageCount / $deltaAll;
-                               $revRate = $this->revCount / $deltaAll;
-                       } else {
-                               $pageRate = '-';
-                               $revRate = '-';
-                               $etats = '-';
-                               $fetchRate = '-';
-                       }
-                       if ( $deltaPart ) {
-                               if ( $this->fetchCountLast ) {
-                                       $fetchRatePart = 100.0 * $this->prefetchCountLast / $this->fetchCountLast;
-                               } else {
-                                       $fetchRatePart = '-';
-                               }
-                               $pageRatePart = $this->pageCountPart / $deltaPart;
-                               $revRatePart = $this->revCountPart / $deltaPart;
-                       } else {
-                               $fetchRatePart = '-';
-                               $pageRatePart = '-';
-                               $revRatePart = '-';
-                       }
-                       $this->progress( sprintf(
-                               "%s: %s (ID %d) %d pages (%0.1f|%0.1f/sec all|curr), "
-                                       . "%d revs (%0.1f|%0.1f/sec all|curr), %0.1f%%|%0.1f%% "
-                                       . "prefetched (all|curr), ETA %s [max %d]",
-                               $now, wfWikiID(), $this->ID, $this->pageCount, $pageRate,
-                               $pageRatePart, $this->revCount, $revRate, $revRatePart,
-                               $fetchRate, $fetchRatePart, $etats, $this->maxCount
-                       ) );
-                       $this->lastTime = $nowts;
-                       $this->revCountLast = $this->revCount;
-                       $this->prefetchCountLast = $this->prefetchCount;
-                       $this->fetchCountLast = $this->fetchCount;
-               }
-       }
-
-       function setTimeExceeded() {
-               $this->timeExceeded = true;
-       }
-
-       function checkIfTimeExceeded() {
-               if ( $this->maxTimeAllowed
-                       && ( $this->lastTime - $this->timeOfCheckpoint > $this->maxTimeAllowed )
-               ) {
-                       return true;
-               }
-
-               return false;
-       }
-
-       function finalOptionCheck() {
-               if ( ( $this->checkpointFiles && !$this->maxTimeAllowed )
-                       || ( $this->maxTimeAllowed && !$this->checkpointFiles )
-               ) {
-                       throw new MWException( "Options checkpointfile and maxtime must be specified together.\n" );
-               }
-               foreach ( $this->checkpointFiles as $checkpointFile ) {
-                       $count = substr_count( $checkpointFile, "%s" );
-                       if ( $count != 2 ) {
-                               throw new MWException( "Option checkpointfile must contain two '%s' "
-                                       . "for substitution of first and last pageids, count is $count instead, "
-                                       . "file is $checkpointFile.\n" );
-                       }
-               }
-
-               if ( $this->checkpointFiles ) {
-                       $filenameList = (array)$this->egress->getFilenames();
-                       if ( count( $filenameList ) != count( $this->checkpointFiles ) ) {
-                               throw new MWException( "One checkpointfile must be specified "
-                                       . "for each output option, if maxtime is used.\n" );
-                       }
-               }
-       }
-
-       /**
-        * @throws MWException Failure to parse XML input
-        * @param string $input
-        * @return bool
-        */
-       function readDump( $input ) {
-               $this->buffer = "";
-               $this->openElement = false;
-               $this->atStart = true;
-               $this->state = "";
-               $this->lastName = "";
-               $this->thisPage = 0;
-               $this->thisRev = 0;
-               $this->thisRevModel = null;
-               $this->thisRevFormat = null;
-
-               $parser = xml_parser_create( "UTF-8" );
-               xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
-
-               xml_set_element_handler(
-                       $parser,
-                       array( &$this, 'startElement' ),
-                       array( &$this, 'endElement' )
-               );
-               xml_set_character_data_handler( $parser, array( &$this, 'characterData' ) );
-
-               $offset = 0; // for context extraction on error reporting
-               do {
-                       if ( $this->checkIfTimeExceeded() ) {
-                               $this->setTimeExceeded();
-                       }
-                       $chunk = fread( $input, $this->bufferSize );
-                       if ( !xml_parse( $parser, $chunk, feof( $input ) ) ) {
-                               wfDebug( "TextDumpPass::readDump encountered XML parsing error\n" );
-
-                               $byte = xml_get_current_byte_index( $parser );
-                               $msg = wfMessage( 'xml-error-string',
-                                       'XML import parse failure',
-                                       xml_get_current_line_number( $parser ),
-                                       xml_get_current_column_number( $parser ),
-                                       $byte . ( is_null( $chunk ) ? null : ( '; "' . substr( $chunk, $byte - $offset, 16 ) . '"' ) ),
-                                       xml_error_string( xml_get_error_code( $parser ) ) )->escaped();
-
-                               xml_parser_free( $parser );
-
-                               throw new MWException( $msg );
-                       }
-                       $offset += strlen( $chunk );
-               } while ( $chunk !== false && !feof( $input ) );
-               if ( $this->maxTimeAllowed ) {
-                       $filenameList = (array)$this->egress->getFilenames();
-                       // we wrote some stuff after last checkpoint that needs renamed
-                       if ( file_exists( $filenameList[0] ) ) {
-                               $newFilenames = array();
-                               # we might have just written the header and footer and had no
-                               # pages or revisions written... perhaps they were all deleted
-                               # there's no pageID 0 so we use that. the caller is responsible
-                               # for deciding what to do with a file containing only the
-                               # siteinfo information and the mw tags.
-                               if ( !$this->firstPageWritten ) {
-                                       $firstPageID = str_pad( 0, 9, "0", STR_PAD_LEFT );
-                                       $lastPageID = str_pad( 0, 9, "0", STR_PAD_LEFT );
-                               } else {
-                                       $firstPageID = str_pad( $this->firstPageWritten, 9, "0", STR_PAD_LEFT );
-                                       $lastPageID = str_pad( $this->lastPageWritten, 9, "0", STR_PAD_LEFT );
-                               }
-
-                               $filenameCount = count( $filenameList );
-                               for ( $i = 0; $i < $filenameCount; $i++ ) {
-                                       $checkpointNameFilledIn = sprintf( $this->checkpointFiles[$i], $firstPageID, $lastPageID );
-                                       $fileinfo = pathinfo( $filenameList[$i] );
-                                       $newFilenames[] = $fileinfo['dirname'] . '/' . $checkpointNameFilledIn;
-                               }
-                               $this->egress->closeAndRename( $newFilenames );
-                       }
-               }
-               xml_parser_free( $parser );
-
-               return true;
-       }
-
-       /**
-        * Applies applicable export transformations to $text.
-        *
-        * @param string $text
-        * @param string $model
-        * @param string|null $format
-        *
-        * @return string
-        */
-       private function exportTransform( $text, $model, $format = null ) {
-               try {
-                       $handler = ContentHandler::getForModelID( $model );
-                       $text = $handler->exportTransform( $text, $format );
-               }
-               catch ( MWException $ex ) {
-                       $this->progress(
-                               "Unable to apply export transformation for content model '$model': " .
-                               $ex->getMessage()
-                       );
-               }
-
-               return $text;
-       }
-
-       /**
-        * Tries to get the revision text for a revision id.
-        * Export transformations are applied if the content model can is given or can be
-        * determined from the database.
-        *
-        * Upon errors, retries (Up to $this->maxFailures tries each call).
-        * If still no good revision get could be found even after this retrying, "" is returned.
-        * If no good revision text could be returned for
-        * $this->maxConsecutiveFailedTextRetrievals consecutive calls to getText, MWException
-        * is thrown.
-        *
-        * @param string $id The revision id to get the text for
-        * @param string|bool|null $model The content model used to determine
-        *  applicable export transformations.
-        *  If $model is null, it will be determined from the database.
-        * @param string|null $format The content format used when applying export transformations.
-        *
-        * @throws MWException
-        * @return string The revision text for $id, or ""
-        */
-       function getText( $id, $model = null, $format = null ) {
-               global $wgContentHandlerUseDB;
-
-               $prefetchNotTried = true; // Whether or not we already tried to get the text via prefetch.
-               $text = false; // The candidate for a good text. false if no proper value.
-               $failures = 0; // The number of times, this invocation of getText already failed.
-
-               // The number of times getText failed without yielding a good text in between.
-               static $consecutiveFailedTextRetrievals = 0;
-
-               $this->fetchCount++;
-
-               // To allow to simply return on success and do not have to worry about book keeping,
-               // we assume, this fetch works (possible after some retries). Nevertheless, we koop
-               // the old value, so we can restore it, if problems occur (See after the while loop).
-               $oldConsecutiveFailedTextRetrievals = $consecutiveFailedTextRetrievals;
-               $consecutiveFailedTextRetrievals = 0;
-
-               if ( $model === null && $wgContentHandlerUseDB ) {
-                       $row = $this->db->selectRow(
-                               'revision',
-                               array( 'rev_content_model', 'rev_content_format' ),
-                               array( 'rev_id' => $this->thisRev ),
-                               __METHOD__
-                       );
-
-                       if ( $row ) {
-                               $model = $row->rev_content_model;
-                               $format = $row->rev_content_format;
-                       }
-               }
-
-               if ( $model === null || $model === '' ) {
-                       $model = false;
-               }
-
-               while ( $failures < $this->maxFailures ) {
-
-                       // As soon as we found a good text for the $id, we will return immediately.
-                       // Hence, if we make it past the try catch block, we know that we did not
-                       // find a good text.
-
-                       try {
-                               // Step 1: Get some text (or reuse from previous iteratuon if checking
-                               //         for plausibility failed)
-
-                               // Trying to get prefetch, if it has not been tried before
-                               if ( $text === false && isset( $this->prefetch ) && $prefetchNotTried ) {
-                                       $prefetchNotTried = false;
-                                       $tryIsPrefetch = true;
-                                       $text = $this->prefetch->prefetch( intval( $this->thisPage ),
-                                               intval( $this->thisRev ) );
-
-                                       if ( $text === null ) {
-                                               $text = false;
-                                       }
-
-                                       if ( is_string( $text ) && $model !== false ) {
-                                               // Apply export transformation to text coming from an old dump.
-                                               // The purpose of this transformation is to convert up from legacy
-                                               // formats, which may still be used in the older dump that is used
-                                               // for pre-fetching. Applying the transformation again should not
-                                               // interfere with content that is already in the correct form.
-                                               $text = $this->exportTransform( $text, $model, $format );
-                                       }
-                               }
-
-                               if ( $text === false ) {
-                                       // Fallback to asking the database
-                                       $tryIsPrefetch = false;
-                                       if ( $this->spawn ) {
-                                               $text = $this->getTextSpawned( $id );
-                                       } else {
-                                               $text = $this->getTextDb( $id );
-                                       }
-
-                                       if ( $text !== false && $model !== false ) {
-                                               // Apply export transformation to text coming from the database.
-                                               // Prefetched text should already have transformations applied.
-                                               $text = $this->exportTransform( $text, $model, $format );
-                                       }
-
-                                       // No more checks for texts from DB for now.
-                                       // If we received something that is not false,
-                                       // We treat it as good text, regardless of whether it actually is or is not
-                                       if ( $text !== false ) {
-                                               return $text;
-                                       }
-                               }
-
-                               if ( $text === false ) {
-                                       throw new MWException( "Generic error while obtaining text for id " . $id );
-                               }
-
-                               // We received a good candidate for the text of $id via some method
-
-                               // Step 2: Checking for plausibility and return the text if it is
-                               //         plausible
-                               $revID = intval( $this->thisRev );
-                               if ( !isset( $this->db ) ) {
-                                       throw new MWException( "No database available" );
-                               }
-
-                               if ( $model !== CONTENT_MODEL_WIKITEXT ) {
-                                       $revLength = strlen( $text );
-                               } else {
-                                       $revLength = $this->db->selectField( 'revision', 'rev_len', array( 'rev_id' => $revID ) );
-                               }
-
-                               if ( strlen( $text ) == $revLength ) {
-                                       if ( $tryIsPrefetch ) {
-                                               $this->prefetchCount++;
-                                       }
-
-                                       return $text;
-                               }
-
-                               $text = false;
-                               throw new MWException( "Received text is unplausible for id " . $id );
-                       } catch ( Exception $e ) {
-                               $msg = "getting/checking text " . $id . " failed (" . $e->getMessage() . ")";
-                               if ( $failures + 1 < $this->maxFailures ) {
-                                       $msg .= " (Will retry " . ( $this->maxFailures - $failures - 1 ) . " more times)";
-                               }
-                               $this->progress( $msg );
-                       }
-
-                       // Something went wrong; we did not a text that was plausible :(
-                       $failures++;
-
-                       // A failure in a prefetch hit does not warrant resetting db connection etc.
-                       if ( !$tryIsPrefetch ) {
-                               // After backing off for some time, we try to reboot the whole process as
-                               // much as possible to not carry over failures from one part to the other
-                               // parts
-                               sleep( $this->failureTimeout );
-                               try {
-                                       $this->rotateDb();
-                                       if ( $this->spawn ) {
-                                               $this->closeSpawn();
-                                               $this->openSpawn();
-                                       }
-                               } catch ( Exception $e ) {
-                                       $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" .
-                                               " Trying to continue anyways" );
-                               }
-                       }
-               }
-
-               // Retirieving a good text for $id failed (at least) maxFailures times.
-               // We abort for this $id.
-
-               // Restoring the consecutive failures, and maybe aborting, if the dump
-               // is too broken.
-               $consecutiveFailedTextRetrievals = $oldConsecutiveFailedTextRetrievals + 1;
-               if ( $consecutiveFailedTextRetrievals > $this->maxConsecutiveFailedTextRetrievals ) {
-                       throw new MWException( "Graceful storage failure" );
-               }
-
-               return "";
-       }
-
-       /**
-        * May throw a database error if, say, the server dies during query.
-        * @param int $id
-        * @return bool|string
-        * @throws MWException
-        */
-       private function getTextDb( $id ) {
-               global $wgContLang;
-               if ( !isset( $this->db ) ) {
-                       throw new MWException( __METHOD__ . "No database available" );
-               }
-               $row = $this->db->selectRow( 'text',
-                       array( 'old_text', 'old_flags' ),
-                       array( 'old_id' => $id ),
-                       __METHOD__ );
-               $text = Revision::getRevisionText( $row );
-               if ( $text === false ) {
-                       return false;
-               }
-               $stripped = str_replace( "\r", "", $text );
-               $normalized = $wgContLang->normalize( $stripped );
-
-               return $normalized;
-       }
-
-       private function getTextSpawned( $id ) {
-               MediaWiki\suppressWarnings();
-               if ( !$this->spawnProc ) {
-                       // First time?
-                       $this->openSpawn();
-               }
-               $text = $this->getTextSpawnedOnce( $id );
-               MediaWiki\restoreWarnings();
-
-               return $text;
-       }
-
-       function openSpawn() {
-               global $IP;
-
-               if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) {
-                       $cmd = implode( " ",
-                               array_map( 'wfEscapeShellArg',
-                                       array(
-                                               $this->php,
-                                               "$IP/../multiversion/MWScript.php",
-                                               "fetchText.php",
-                                               '--wiki', wfWikiID() ) ) );
-               } else {
-                       $cmd = implode( " ",
-                               array_map( 'wfEscapeShellArg',
-                                       array(
-                                               $this->php,
-                                               "$IP/maintenance/fetchText.php",
-                                               '--wiki', wfWikiID() ) ) );
-               }
-               $spec = array(
-                       0 => array( "pipe", "r" ),
-                       1 => array( "pipe", "w" ),
-                       2 => array( "file", "/dev/null", "a" ) );
-               $pipes = array();
-
-               $this->progress( "Spawning database subprocess: $cmd" );
-               $this->spawnProc = proc_open( $cmd, $spec, $pipes );
-               if ( !$this->spawnProc ) {
-                       $this->progress( "Subprocess spawn failed." );
-
-                       return false;
-               }
-               list(
-                       $this->spawnWrite, // -> stdin
-                       $this->spawnRead, // <- stdout
-               ) = $pipes;
-
-               return true;
-       }
-
-       private function closeSpawn() {
-               MediaWiki\suppressWarnings();
-               if ( $this->spawnRead ) {
-                       fclose( $this->spawnRead );
-               }
-               $this->spawnRead = false;
-               if ( $this->spawnWrite ) {
-                       fclose( $this->spawnWrite );
-               }
-               $this->spawnWrite = false;
-               if ( $this->spawnErr ) {
-                       fclose( $this->spawnErr );
-               }
-               $this->spawnErr = false;
-               if ( $this->spawnProc ) {
-                       pclose( $this->spawnProc );
-               }
-               $this->spawnProc = false;
-               MediaWiki\restoreWarnings();
-       }
-
-       private function getTextSpawnedOnce( $id ) {
-               global $wgContLang;
-
-               $ok = fwrite( $this->spawnWrite, "$id\n" );
-               // $this->progress( ">> $id" );
-               if ( !$ok ) {
-                       return false;
-               }
-
-               $ok = fflush( $this->spawnWrite );
-               // $this->progress( ">> [flush]" );
-               if ( !$ok ) {
-                       return false;
-               }
-
-               // check that the text id they are sending is the one we asked for
-               // this avoids out of sync revision text errors we have encountered in the past
-               $newId = fgets( $this->spawnRead );
-               if ( $newId === false ) {
-                       return false;
-               }
-               if ( $id != intval( $newId ) ) {
-                       return false;
-               }
-
-               $len = fgets( $this->spawnRead );
-               // $this->progress( "<< " . trim( $len ) );
-               if ( $len === false ) {
-                       return false;
-               }
-
-               $nbytes = intval( $len );
-               // actual error, not zero-length text
-               if ( $nbytes < 0 ) {
-                       return false;
-               }
-
-               $text = "";
-
-               // Subprocess may not send everything at once, we have to loop.
-               while ( $nbytes > strlen( $text ) ) {
-                       $buffer = fread( $this->spawnRead, $nbytes - strlen( $text ) );
-                       if ( $buffer === false ) {
-                               break;
-                       }
-                       $text .= $buffer;
-               }
-
-               $gotbytes = strlen( $text );
-               if ( $gotbytes != $nbytes ) {
-                       $this->progress( "Expected $nbytes bytes from database subprocess, got $gotbytes " );
-
-                       return false;
-               }
-
-               // Do normalization in the dump thread...
-               $stripped = str_replace( "\r", "", $text );
-               $normalized = $wgContLang->normalize( $stripped );
-
-               return $normalized;
-       }
-
-       function startElement( $parser, $name, $attribs ) {
-               $this->checkpointJustWritten = false;
-
-               $this->clearOpenElement( null );
-               $this->lastName = $name;
-
-               if ( $name == 'revision' ) {
-                       $this->state = $name;
-                       $this->egress->writeOpenPage( null, $this->buffer );
-                       $this->buffer = "";
-               } elseif ( $name == 'page' ) {
-                       $this->state = $name;
-                       if ( $this->atStart ) {
-                               $this->egress->writeOpenStream( $this->buffer );
-                               $this->buffer = "";
-                               $this->atStart = false;
-                       }
-               }
-
-               if ( $name == "text" && isset( $attribs['id'] ) ) {
-                       $id = $attribs['id'];
-                       $model = trim( $this->thisRevModel );
-                       $format = trim( $this->thisRevFormat );
-
-                       $model = $model === '' ? null : $model;
-                       $format = $format === '' ? null : $format;
-
-                       $text = $this->getText( $id, $model, $format );
-                       $this->openElement = array( $name, array( 'xml:space' => 'preserve' ) );
-                       if ( strlen( $text ) > 0 ) {
-                               $this->characterData( $parser, $text );
-                       }
-               } else {
-                       $this->openElement = array( $name, $attribs );
-               }
-       }
-
-       function endElement( $parser, $name ) {
-               $this->checkpointJustWritten = false;
-
-               if ( $this->openElement ) {
-                       $this->clearOpenElement( "" );
-               } else {
-                       $this->buffer .= "</$name>";
-               }
-
-               if ( $name == 'revision' ) {
-                       $this->egress->writeRevision( null, $this->buffer );
-                       $this->buffer = "";
-                       $this->thisRev = "";
-                       $this->thisRevModel = null;
-                       $this->thisRevFormat = null;
-               } elseif ( $name == 'page' ) {
-                       if ( !$this->firstPageWritten ) {
-                               $this->firstPageWritten = trim( $this->thisPage );
-                       }
-                       $this->lastPageWritten = trim( $this->thisPage );
-                       if ( $this->timeExceeded ) {
-                               $this->egress->writeClosePage( $this->buffer );
-                               // nasty hack, we can't just write the chardata after the
-                               // page tag, it will include leading blanks from the next line
-                               $this->egress->sink->write( "\n" );
-
-                               $this->buffer = $this->xmlwriterobj->closeStream();
-                               $this->egress->writeCloseStream( $this->buffer );
-
-                               $this->buffer = "";
-                               $this->thisPage = "";
-                               // this could be more than one file if we had more than one output arg
-
-                               $filenameList = (array)$this->egress->getFilenames();
-                               $newFilenames = array();
-                               $firstPageID = str_pad( $this->firstPageWritten, 9, "0", STR_PAD_LEFT );
-                               $lastPageID = str_pad( $this->lastPageWritten, 9, "0", STR_PAD_LEFT );
-                               $filenamesCount = count( $filenameList );
-                               for ( $i = 0; $i < $filenamesCount; $i++ ) {
-                                       $checkpointNameFilledIn = sprintf( $this->checkpointFiles[$i], $firstPageID, $lastPageID );
-                                       $fileinfo = pathinfo( $filenameList[$i] );
-                                       $newFilenames[] = $fileinfo['dirname'] . '/' . $checkpointNameFilledIn;
-                               }
-                               $this->egress->closeRenameAndReopen( $newFilenames );
-                               $this->buffer = $this->xmlwriterobj->openStream();
-                               $this->timeExceeded = false;
-                               $this->timeOfCheckpoint = $this->lastTime;
-                               $this->firstPageWritten = false;
-                               $this->checkpointJustWritten = true;
-                       } else {
-                               $this->egress->writeClosePage( $this->buffer );
-                               $this->buffer = "";
-                               $this->thisPage = "";
-                       }
-               } elseif ( $name == 'mediawiki' ) {
-                       $this->egress->writeCloseStream( $this->buffer );
-                       $this->buffer = "";
-               }
-       }
-
-       function characterData( $parser, $data ) {
-               $this->clearOpenElement( null );
-               if ( $this->lastName == "id" ) {
-                       if ( $this->state == "revision" ) {
-                               $this->thisRev .= $data;
-                       } elseif ( $this->state == "page" ) {
-                               $this->thisPage .= $data;
-                       }
-               } elseif ( $this->lastName == "model" ) {
-                       $this->thisRevModel .= $data;
-               } elseif ( $this->lastName == "format" ) {
-                       $this->thisRevFormat .= $data;
-               }
-
-               // have to skip the newline left over from closepagetag line of
-               // end of checkpoint files. nasty hack!!
-               if ( $this->checkpointJustWritten ) {
-                       if ( $data[0] == "\n" ) {
-                               $data = substr( $data, 1 );
-                       }
-                       $this->checkpointJustWritten = false;
-               }
-               $this->buffer .= htmlspecialchars( $data );
-       }
-
-       function clearOpenElement( $style ) {
-               if ( $this->openElement ) {
-                       $this->buffer .= Xml::element( $this->openElement[0], $this->openElement[1], $style );
-                       $this->openElement = false;
-               }
-       }
-}
index 3f8a899..f3e2db0 100644 (file)
@@ -22,7 +22,6 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @todo Report PHP version, OS ..
  * @file
  * @ingroup Benchmark
  */
@@ -39,7 +38,7 @@ abstract class Benchmarker extends Maintenance {
 
        public function __construct() {
                parent::__construct();
-               $this->addOption( 'count', "How many time to run a benchmark", false, true );
+               $this->addOption( 'count', "How many times to run a benchmark", false, true );
        }
 
        public function bench( array $benchs ) {
@@ -76,7 +75,13 @@ abstract class Benchmarker extends Maintenance {
        }
 
        public function getFormattedResults() {
-               $ret = '';
+               $ret = sprintf( "Running PHP version %s (%s) on %s %s %s\n\n",
+                       phpversion(),
+                       php_uname( 'm' ),
+                       php_uname( 's' ),
+                       php_uname( 'r' ),
+                       php_uname( 'v' )
+               );
                foreach ( $this->results as $res ) {
                        // show function with args
                        $ret .= sprintf( "%s times: function %s(%s) :\n",
index 8ae4f03..572c548 100644 (file)
@@ -35,7 +35,7 @@ class BenchmarkDeleteTruncate extends Benchmarker {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $test = $dbw->tableName( 'test' );
                $dbw->query( "CREATE TABLE IF NOT EXISTS /*_*/$test (
index ce38dad..b850e63 100644 (file)
@@ -118,7 +118,7 @@ class BenchmarkParse extends Maintenance {
         * @return bool|string Revision ID, or false if not found or error
         */
        function getRevIdForTime( Title $title, $timestamp ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $id = $dbr->selectField(
                        array( 'revision', 'page' ),
index fec9291..500fc35 100644 (file)
@@ -36,7 +36,7 @@ class CheckBadRedirects extends Maintenance {
 
        public function execute() {
                $this->output( "Fetching redirects...\n" );
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $result = $dbr->select(
                        array( 'page' ),
                        array( 'page_namespace', 'page_title', 'page_latest' ),
index 0364db2..9761927 100644 (file)
@@ -37,7 +37,7 @@ class CheckImages extends Maintenance {
 
        public function execute() {
                $start = '';
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $numImages = 0;
                $numGood = 0;
index a64bc49..6f4d170 100644 (file)
@@ -40,7 +40,7 @@ class CheckUsernames extends Maintenance {
        }
 
        function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $maxUserId = 0;
                do {
index 2dbf8bc..f1467d5 100644 (file)
@@ -46,7 +46,7 @@ class CleanupAncientTables extends Maintenance {
                        );
                }
 
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                $ancientTables = array(
                        'blobs', // 1.4
                        'brokenlinks', // 1.4
index 1736203..437abe9 100644 (file)
@@ -38,7 +38,7 @@ class CleanupBlocks extends Maintenance {
        }
 
        public function execute() {
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
 
                $max = $db->selectField( 'ipblocks', 'MAX(ipb_user)' );
 
index 1bd0217..ab2d808 100644 (file)
@@ -102,7 +102,7 @@ class ImageCleanup extends TableCleanup {
                        $this->output( "DRY RUN: would delete bogus row '$name'\n" );
                } else {
                        $this->output( "deleting bogus row '$name'\n" );
-                       $db = wfGetDB( DB_MASTER );
+                       $db = $this->getDB( DB_MASTER );
                        $db->delete( 'image',
                                array( 'img_name' => $name ),
                                __METHOD__ );
@@ -139,7 +139,7 @@ class ImageCleanup extends TableCleanup {
                        return;
                }
 
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
 
                /*
                 * To prevent key collisions in the update() statements below,
@@ -167,7 +167,7 @@ class ImageCleanup extends TableCleanup {
                } else {
                        $this->output( "renaming $path to $finalPath\n" );
                        // @todo FIXME: Should this use File::move()?
-                       $db->begin( __METHOD__ );
+                       $this->beginTransaction( $db, __METHOD__ );
                        $db->update( 'image',
                                array( 'img_name' => $final ),
                                array( 'img_name' => $orig ),
@@ -184,16 +184,16 @@ class ImageCleanup extends TableCleanup {
                        if ( !file_exists( $dir ) ) {
                                if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
                                        $this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
-                                       $db->rollback( __METHOD__ );
+                                       $this->rollbackTransaction( $db, __METHOD__ );
 
                                        return;
                                }
                        }
                        if ( rename( $path, $finalPath ) ) {
-                               $db->commit( __METHOD__ );
+                               $this->commitTransaction( $db, __METHOD__ );
                        } else {
                                $this->error( "RENAME FAILED" );
-                               $db->rollback( __METHOD__ );
+                               $this->rollbackTransaction( $db, __METHOD__ );
                        }
                }
        }
index 4e19b79..5253ab3 100644 (file)
@@ -34,8 +34,8 @@ class CleanupPreferences extends Maintenance {
        public function execute() {
                global $wgHiddenPrefs;
 
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
                foreach ( $wgHiddenPrefs as $item ) {
                        $dbw->delete(
                                'user_properties',
@@ -43,7 +43,7 @@ class CleanupPreferences extends Maintenance {
                                __METHOD__
                        );
                };
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                $this->output( "Finished!\n" );
        }
 }
index 68f57a3..810fad9 100644 (file)
@@ -39,7 +39,7 @@ class CleanupRemovedModules extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $rl = new ResourceLoader( ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
                $moduleNames = $rl->getModuleNames();
                $moduleList = implode( ', ', array_map( array( $dbw, 'addQuotes' ), $moduleNames ) );
index 44d5810..b43ce81 100644 (file)
@@ -64,7 +64,7 @@ class CleanupSpam extends Maintenance {
                        $this->output( "Finding spam on " . count( $wgLocalDatabases ) . " wikis\n" );
                        $found = false;
                        foreach ( $wgLocalDatabases as $wikiID ) {
-                               $dbr = wfGetDB( DB_SLAVE, array(), $wikiID );
+                               $dbr = $this->getDB( DB_SLAVE, array(), $wikiID );
 
                                $count = $dbr->selectField( 'externallinks', 'COUNT(*)',
                                        array( 'el_index' . $dbr->buildLike( $like ) ), __METHOD__ );
@@ -83,7 +83,7 @@ class CleanupSpam extends Maintenance {
                } else {
                        // Clean up spam on this wiki
 
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = $this->getDB( DB_SLAVE );
                        $res = $dbr->select( 'externallinks', array( 'DISTINCT el_from' ),
                                array( 'el_index' . $dbr->buildLike( $like ) ), __METHOD__ );
                        $count = $dbr->numRows( $res );
@@ -120,8 +120,8 @@ class CleanupSpam extends Maintenance {
                        // This happens e.g. when a link comes from a template rather than the page itself
                        $this->output( "False match\n" );
                } else {
-                       $dbw = wfGetDB( DB_MASTER );
-                       $dbw->begin( __METHOD__ );
+                       $dbw = $this->getDB( DB_MASTER );
+                       $this->beginTransaction( $dbw, __METHOD__ );
                        $page = WikiPage::factory( $title );
                        if ( $rev ) {
                                // Revert to this revision
@@ -151,7 +151,7 @@ class CleanupSpam extends Maintenance {
                                        wfMessage( 'spam_blanking', $domain )->inContentLanguage()->text()
                                );
                        }
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
                }
        }
 }
index 74073bc..0ddaf33 100644 (file)
@@ -106,7 +106,7 @@ class TableCleanup extends Maintenance {
         * @throws MWException
         */
        public function runTable( $params ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                if ( array_diff( array_keys( $params ),
                        array( 'table', 'conds', 'index', 'callback' ) )
index 1eba303..07df1b1 100644 (file)
@@ -78,7 +78,7 @@ class TitleCleanup extends TableCleanup {
        protected function fileExists( $name ) {
                // XXX: Doesn't actually check for file existence, just presence of image record.
                // This is reasonable, since cleanupImages.php only iterates over the image table.
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $row = $dbr->selectRow( 'image', array( 'img_name' ), array( 'img_name' => $name ), __METHOD__ );
 
                return $row !== false;
@@ -118,7 +118,7 @@ class TitleCleanup extends TableCleanup {
                } else {
                        $this->output( "renaming $row->page_id ($row->page_namespace," .
                                "'$row->page_title') to ($row->page_namespace,'$dest')\n" );
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->update( 'page',
                                array( 'page_title' => $dest ),
                                array( 'page_id' => $row->page_id ),
@@ -171,7 +171,7 @@ class TitleCleanup extends TableCleanup {
                } else {
                        $this->output( "renaming $row->page_id ($row->page_namespace," .
                                "'$row->page_title') to ($ns,'$dest')\n" );
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->update( 'page',
                                array(
                                        'page_namespace' => $ns,
index eb7d7b1..16f7b61 100644 (file)
@@ -77,7 +77,7 @@ class WatchlistCleanup extends TableCleanup {
 
        private function removeWatch( $row ) {
                if ( !$this->dryrun && $this->hasOption( 'fix' ) ) {
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->delete(
                                'watchlist', array(
                                'wl_user' => $row->wl_user,
index 80c9004..6a6527f 100644 (file)
@@ -37,7 +37,7 @@ class ClearInterwikiCache extends Maintenance {
 
        public function execute() {
                global $wgLocalDatabases, $wgMemc;
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false );
                $prefixes = array();
                foreach ( $res as $row ) {
index c3ad46a..15ca14b 100644 (file)
@@ -66,7 +66,7 @@ class ConvertLinks extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $type = $dbw->getType();
                if ( $type != 'mysql' ) {
@@ -267,7 +267,7 @@ class ConvertLinks extends Maintenance {
        }
 
        private function createTempTable() {
-               $dbConn = wfGetDB( DB_MASTER );
+               $dbConn = $this->getDB( DB_MASTER );
 
                if ( !( $dbConn->isOpen() ) ) {
                        $this->output( "Opening connection to database failed.\n" );
index 1542a8c..11768c8 100644 (file)
@@ -41,7 +41,7 @@ class ConvertUserOptions extends Maintenance {
        public function execute() {
                $this->output( "...batch conversion of user_options: " );
                $id = 0;
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                if ( !$dbw->fieldExists( 'user', 'user_options', __METHOD__ ) ) {
                        $this->output( "nothing to migrate. " );
index bd8ca10..94ebf87 100644 (file)
@@ -47,7 +47,7 @@ class DeleteArchivedFiles extends Maintenance {
 
                # Data should come off the master, wrapped in a transaction
                $dbw = $this->getDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $this->beginTransaction( $dbw, __METHOD__ );
                $repo = RepoGroup::singleton()->getLocalRepo();
 
                # Get "active" revisions from the filearchive table
@@ -113,7 +113,7 @@ class DeleteArchivedFiles extends Maintenance {
                        $dbw->delete( 'filearchive', array( 'fa_id' => $id ), __METHOD__ );
                }
 
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                $this->output( "Done! [$count file(s)]\n" );
        }
 }
index a3b1561..6c89e67 100644 (file)
@@ -80,7 +80,7 @@ class DeleteBatch extends Maintenance {
                        $this->error( "Unable to read file, exiting", true );
                }
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                # Handle each entry
                // @codingStandardsIgnoreStart Ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
index a1c0f61..a5c6199 100644 (file)
@@ -41,7 +41,7 @@ class DeleteDefaultMessages extends Maintenance {
                global $wgUser;
 
                $this->output( "Checking existence of old default messages..." );
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $res = $dbr->select( array( 'page', 'revision' ),
                        array( 'page_namespace', 'page_title' ),
                        array(
@@ -69,7 +69,7 @@ class DeleteDefaultMessages extends Maintenance {
 
                # Handle deletion
                $this->output( "\n...deleting old default messages (this may take a long time!)...", 'msg' );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                foreach ( $res as $row ) {
                        wfWaitForSlaves();
index de5c5e2..e7bb866 100644 (file)
@@ -174,7 +174,7 @@ class DeleteEqualMessages extends Maintenance {
 
                // Handle deletion
                $this->output( "\n...deleting equal messages (this may take a long time!)..." );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                foreach ( $messageInfo['results'] as $result ) {
                        wfWaitForSlaves();
                        $dbw->ping();
index 847d863..f411148 100644 (file)
@@ -45,8 +45,8 @@ class DeleteOldRevisions extends Maintenance {
        function doDelete( $delete = false, $args = array() ) {
 
                # Data should come off the master, wrapped in a transaction
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                $pageConds = array();
                $revConds = array();
@@ -92,7 +92,7 @@ class DeleteOldRevisions extends Maintenance {
 
                # This bit's done
                # Purge redundant text records
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                if ( $delete ) {
                        $this->purgeRedundantText( true );
                }
index 7f1ffe4..3d5c1a4 100644 (file)
@@ -43,8 +43,8 @@ class DeleteOrphanedRevisions extends Maintenance {
 
                $report = $this->hasOption( 'report' );
 
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
                list( $page, $revision ) = $dbw->tableNamesN( 'page', 'revision' );
 
                # Find all the orphaned revisions
@@ -63,7 +63,7 @@ class DeleteOrphanedRevisions extends Maintenance {
 
                # Nothing to do?
                if ( $report || $count == 0 ) {
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
                        exit( 0 );
                }
 
@@ -73,7 +73,7 @@ class DeleteOrphanedRevisions extends Maintenance {
                $this->output( "done.\n" );
 
                # Close the transaction and call the script to purge unused text records
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
                $this->purgeRedundantText( true );
        }
 
index 818ee36..6cda784 100644 (file)
@@ -43,7 +43,7 @@ class DeleteRevision extends Maintenance {
 
                $this->output( "Deleting revision(s) " . implode( ',', $this->mArgs ) .
                        " from " . wfWikiID() . "...\n" );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $affected = 0;
                foreach ( $this->mArgs as $revID ) {
index a097622..f9bb416 100644 (file)
@@ -39,10 +39,10 @@ class DeleteSelfExternals extends Maintenance {
        public function execute() {
                global $wgServer;
                $this->output( "Deleting self externals from $wgServer\n" );
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                while ( 1 ) {
                        wfWaitForSlaves();
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
                        $q = $db->limitResult( "DELETE /* deleteSelfExternals */ FROM externallinks WHERE el_to"
                                . $db->buildLike( $wgServer . '/', $db->anyString() ), $this->mBatchSize );
                        $this->output( "Deleting a batch\n" );
index 18c78dc..18737a4 100644 (file)
  * @ingroup Dump Maintenance
  */
 
-$originalDir = getcwd();
-
-$optionsWithArgs = array( 'pagelist', 'start', 'end', 'revstart', 'revend' );
-
-require_once __DIR__ . '/commandLine.inc';
 require_once __DIR__ . '/backup.inc';
 
-$dumper = new BackupDumper( $argv );
+class DumpBackup extends BackupDumper {
+       function __construct( $args = null ) {
+               parent::__construct();
 
-if ( isset( $options['quiet'] ) ) {
-       $dumper->reporting = false;
-}
-
-if ( isset( $options['pagelist'] ) ) {
-       $olddir = getcwd();
-       chdir( $originalDir );
-       $pages = file( $options['pagelist'] );
-       chdir( $olddir );
-       if ( $pages === false ) {
-               echo "Unable to open file {$options['pagelist']}\n";
-               die( 1 );
-       }
-       $pages = array_map( 'trim', $pages );
-       $dumper->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) );
-}
-
-if ( isset( $options['start'] ) ) {
-       $dumper->startId = intval( $options['start'] );
-}
-if ( isset( $options['end'] ) ) {
-       $dumper->endId = intval( $options['end'] );
-}
-
-if ( isset( $options['revstart'] ) ) {
-       $dumper->revStartId = intval( $options['revstart'] );
-}
-if ( isset( $options['revend'] ) ) {
-       $dumper->revEndId = intval( $options['revend'] );
-}
-$dumper->skipHeader = isset( $options['skip-header'] );
-$dumper->skipFooter = isset( $options['skip-footer'] );
-$dumper->dumpUploads = isset( $options['uploads'] );
-$dumper->dumpUploadFileContents = isset( $options['include-files'] );
-
-$textMode = isset( $options['stub'] ) ? WikiExporter::STUB : WikiExporter::TEXT;
-
-if ( isset( $options['full'] ) ) {
-       $dumper->dump( WikiExporter::FULL, $textMode );
-} elseif ( isset( $options['current'] ) ) {
-       $dumper->dump( WikiExporter::CURRENT, $textMode );
-} elseif ( isset( $options['stable'] ) ) {
-       $dumper->dump( WikiExporter::STABLE, $textMode );
-} elseif ( isset( $options['logs'] ) ) {
-       $dumper->dump( WikiExporter::LOGS );
-} elseif ( isset( $options['revrange'] ) ) {
-       $dumper->dump( WikiExporter::RANGE, $textMode );
-} else {
-       $dumper->progress( <<<ENDS
+               $this->mDescription = <<<TEXT
 This script dumps the wiki page or logging database into an
 XML interchange wrapper format for export or backup.
 
 XML output is sent to stdout; progress reports are sent to stderr.
 
 WARNING: this is not a full database dump! It is merely for public export
-                of your wiki. For full backup, see our online help at:
+         of your wiki. For full backup, see our online help at:
          https://www.mediawiki.org/wiki/Backup
+TEXT;
+               $this->stderr = fopen( "php://stderr", "wt" );
+               // Actions
+               $this->addOption( 'full', 'Dump all revisions of every page' );
+               $this->addOption( 'current', 'Dump only the latest revision of every page.' );
+               $this->addOption( 'logs', 'Dump all log events' );
+               $this->addOption( 'stable', 'Dump stable versions of pages' );
+               $this->addOption( 'revrange', 'Dump range of revisions specified by revstart and ' .
+                       'revend parameters' );
+               $this->addOption( 'pagelist',
+                       'Dump only pages included in the file', false, true );
+               // Options
+               $this->addOption( 'start', 'Start from page_id or log_id', false, true );
+               $this->addOption( 'end', 'Stop before page_id or log_id n (exclusive)', false, true );
+               $this->addOption( 'revstart', 'Start from rev_id', false, true );
+               $this->addOption( 'revend', 'Stop before rev_id n (exclusive)', false, true );
+               $this->addOption( 'skip-header', 'Don\'t output the <mediawiki> header' );
+               $this->addOption( 'skip-footer', 'Don\'t output the </mediawiki> footer' );
+               $this->addOption( 'stub', 'Don\'t perform old_text lookups; for 2-pass dump' );
+               $this->addOption( 'uploads', 'Include upload records without files' );
+               $this->addOption( 'include-files', 'Include files within the XML stream' );
+
+               if ( $args ) {
+                       $this->loadWithArgv( $args );
+                       $this->processOptions();
+               }
+       }
 
-Usage: php dumpBackup.php <action> [<options>]
-Actions:
-  --full      Dump all revisions of every page.
-  --current   Dump only the latest revision of every page.
-  --logs      Dump all log events.
-  --stable    Stable versions of pages?
-  --pagelist=<file>
-                         Where <file> is a list of page titles to be dumped
-  --revrange  Dump specified range of revisions, requires
-              revstart and revend options.
-Options:
-  --quiet     Don't dump status reports to stderr.
-  --report=n  Report position and speed after every n pages processed.
-                         (Default: 100)
-  --server=h  Force reading from MySQL server h
-  --start=n   Start from page_id or log_id n
-  --end=n     Stop before page_id or log_id n (exclusive)
-  --revstart=n  Start from rev_id n
-  --revend=n    Stop before rev_id n (exclusive)
-  --skip-header Don't output the <mediawiki> header
-  --skip-footer Don't output the </mediawiki> footer
-  --stub      Don't perform old_text lookups; for 2-pass dump
-  --uploads   Include upload records without files
-  --include-files Include files within the XML stream
-  --conf=<file> Use the specified configuration file (LocalSettings.php)
-
-  --wiki=<wiki>  Only back up the specified <wiki>
-
-Fancy stuff: (Works? Add examples please.)
-  --plugin=<class>[:<file>]   Load a dump plugin class
-  --output=<type>:<file>      Begin a filtered output stream;
-                              <type>s: file, gzip, bzip2, 7zip
-  --filter=<type>[:<options>] Add a filter on an output branch
-
-ENDS
-       );
+       function execute() {
+               $this->processOptions();
+
+               $textMode = $this->hasOption( 'stub' ) ? WikiExporter::STUB : WikiExporter::TEXT;
+
+               if ( $this->hasOption( 'full' ) ) {
+                       $this->dump( WikiExporter::FULL, $textMode );
+               } elseif ( $this->hasOption( 'current' ) ) {
+                       $this->dump( WikiExporter::CURRENT, $textMode );
+               } elseif ( $this->hasOption( 'stable' ) ) {
+                       $this->dump( WikiExporter::STABLE, $textMode );
+               } elseif ( $this->hasOption( 'logs' ) ) {
+                       $this->dump( WikiExporter::LOGS );
+               } elseif ( $this->hasOption( 'revrange' ) ) {
+                       $this->dump( WikiExporter::RANGE, $textMode );
+               } else {
+                       $this->error( 'No valid action specified.', 1 );
+               }
+       }
+
+       function processOptions() {
+               parent::processOptions();
+
+               // Evaluate options specific to this class
+               $this->reporting = !$this->hasOption( 'quiet' );
+
+               if ( $this->hasOption( 'pagelist' ) ) {
+                       $filename = $this->getOption( 'pagelist' );
+                       $pages = file( $filename );
+                       if ( $pages === false ) {
+                               $this->fatalError( "Unable to open file {$filename}\n" );
+                       }
+                       $pages = array_map( 'trim', $pages );
+                       $this->pages = array_filter( $pages, create_function( '$x', 'return $x !== "";' ) );
+               }
+
+               if ( $this->hasOption( 'start' ) ) {
+                       $this->startId = intval( $this->getOption( 'start' ) );
+               }
+
+               if ( $this->hasOption( 'end' ) ) {
+                       $this->endId = intval( $this->getOption( 'end' ) );
+               }
+
+               if ( $this->hasOption( 'revstart' ) ) {
+                       $this->revStartId = intval( $this->getOption( 'revstart' ) );
+               }
+
+               if ( $this->hasOption( 'revend' ) ) {
+                       $this->revEndId = intval( $this->getOption( 'revend' ) );
+               }
+
+               $this->skipHeader = $this->hasOption( 'skip-header' );
+               $this->skipFooter = $this->hasOption( 'skip-footer' );
+               $this->dumpUploads = $this->hasOption( 'uploads' );
+               $this->dumpUploadFileContents = $this->hasOption( 'include-files' );
+       }
 }
+
+$maintClass = 'DumpBackup';
+require_once RUN_MAINTENANCE_IF_MAIN;
index 888c2dc..74b500a 100644 (file)
@@ -44,7 +44,7 @@ class DumpLinks extends Maintenance {
        }
 
        public function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $result = $dbr->select( array( 'pagelinks', 'page' ),
                        array(
                                'page_id',
index bde5a07..7511392 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Script that postprocesses XML dumps from dumpBackup.php to add page text
+ * BackupDumper that postprocesses XML dumps from dumpBackup.php to add page text
  *
  * Copyright (C) 2005 Brion Vibber <brion@pobox.com>
  * https://www.mediawiki.org/
  * @ingroup Maintenance
  */
 
-$originalDir = getcwd();
+require_once __DIR__ . '/backup.inc';
+require_once __DIR__ . '/../includes/export/WikiExporter.php';
 
-require_once __DIR__ . '/commandLine.inc';
-require_once __DIR__ . '/backupTextPass.inc';
+/**
+ * @ingroup Maintenance
+ */
+class TextPassDumper extends BackupDumper {
+       public $prefetch = null;
+
+       // when we spend more than maxTimeAllowed seconds on this run, we continue
+       // processing until we write out the next complete page, then save output file(s),
+       // rename it/them and open new one(s)
+       public $maxTimeAllowed = 0; // 0 = no limit
+
+       protected $input = "php://stdin";
+       protected $history = WikiExporter::FULL;
+       protected $fetchCount = 0;
+       protected $prefetchCount = 0;
+       protected $prefetchCountLast = 0;
+       protected $fetchCountLast = 0;
+
+       protected $maxFailures = 5;
+       protected $maxConsecutiveFailedTextRetrievals = 200;
+       protected $failureTimeout = 5; // Seconds to sleep after db failure
+
+       protected $bufferSize = 524288; // In bytes. Maximum size to read from the stub in on go.
+
+       protected $php = "php";
+       protected $spawn = false;
+
+       /**
+        * @var bool|resource
+        */
+       protected $spawnProc = false;
 
-$dumper = new TextPassDumper( $argv );
+       /**
+        * @var bool|resource
+        */
+       protected $spawnWrite = false;
 
-if ( !isset( $options['help'] ) ) {
-       $dumper->dump( true );
-} else {
-       $dumper->progress( <<<ENDS
+       /**
+        * @var bool|resource
+        */
+       protected $spawnRead = false;
+
+       /**
+        * @var bool|resource
+        */
+       protected $spawnErr = false;
+
+       protected $xmlwriterobj = false;
+
+       protected $timeExceeded = false;
+       protected $firstPageWritten = false;
+       protected $lastPageWritten = false;
+       protected $checkpointJustWritten = false;
+       protected $checkpointFiles = array();
+
+       /**
+        * @var DatabaseBase
+        */
+       protected $db;
+
+       /**
+        * @param array $args For backward compatibility
+        */
+       function __construct( $args = null ) {
+               parent::__construct();
+
+               $this->mDescription = <<<TEXT
 This script postprocesses XML dumps from dumpBackup.php to add
 page text which was stubbed out (using --stub).
 
 XML input is accepted on stdin.
 XML output is sent to stdout; progress reports are sent to stderr.
+TEXT;
+               $this->stderr = fopen( "php://stderr", "wt" );
+
+               $this->addOption( 'stub', 'To load a compressed stub dump instead of stdin. ' .
+                       'Specify as --stub=<type>:<file>.', false, true );
+               $this->addOption( 'prefetch', 'Use a prior dump file as a text source, to savepressure on the ' .
+                       'database. (Requires the XMLReader extension). Specify as --prefetch=<type>:<file>',
+                       false, true );
+               $this->addOption( 'maxtime', 'Write out checkpoint file after this many minutes (writing' .
+                       'out complete page, closing xml file properly, and opening new one' .
+                       'with header).  This option requires the checkpointfile option.', false, true );
+               $this->addOption( 'checkpointfile', 'Use this string for checkpoint filenames,substituting ' .
+                       'first pageid written for the first %s (required) and the last pageid written for the ' .
+                       'second %s if it exists.', false, true, false, true ); // This can be specified multiple times
+               $this->addOption( 'quiet', 'Don\'t dump status reports to stderr.' );
+               $this->addOption( 'current', 'Base ETA on number of pages in database instead of all revisions' );
+               $this->addOption( 'spawn', 'Spawn a subprocess for loading text records' );
+               $this->addOption( 'buffersize', 'Buffer size in bytes to use for reading the stub. ' .
+                       '(Default: 512KB, Minimum: 4KB)', false, true );
+
+               if ( $args ) {
+                       $this->loadWithArgv( $args );
+                       $this->processOptions();
+               }
+       }
+
+       function execute() {
+               $this->processOptions();
+               $this->dump( true );
+       }
+
+       function processOptions() {
+               global $IP;
+
+               parent::processOptions();
+
+               if ( $this->hasOption( 'buffersize' ) ) {
+                       $this->bufferSize = max( intval( $this->getOption( 'buffersize' ) ), 4 * 1024 );
+               }
+
+               if ( $this->hasOption( 'prefetch' ) ) {
+                       require_once "$IP/maintenance/backupPrefetch.inc";
+                       $url = $this->processFileOpt( $this->getOption( 'prefetch' ) );
+                       $this->prefetch = new BaseDump( $url );
+               }
+
+               if ( $this->hasOption( 'stub' ) ) {
+                       $this->input = $this->processFileOpt( $this->getOption( 'stub' ) );
+               }
+
+               if ( $this->hasOption( 'maxtime' ) ) {
+                       $this->maxTimeAllowed = intval( $this->getOption( 'maxtime' ) ) * 60;
+               }
+
+               if ( $this->hasOption( 'checkpointfile' ) ) {
+                       $this->checkpointFiles = $this->getOption( 'checkpointfile' );
+               }
+
+               if ( $this->hasOption( 'current' ) ) {
+                       $this->history = WikiExporter::CURRENT;
+               }
+
+               if ( $this->hasOption( 'full' ) ) {
+                       $this->history = WikiExporter::FULL;
+               }
+
+               if ( $this->hasOption( 'spawn' ) ) {
+                       $this->spawn = true;
+                       $val = $this->getOption( 'spawn' );
+                       if ( $val !== 1 ) {
+                               $this->php = $val;
+                       }
+               }
+       }
+
+       /**
+        * Drop the database connection $this->db and try to get a new one.
+        *
+        * This function tries to get a /different/ connection if this is
+        * possible. Hence, (if this is possible) it switches to a different
+        * failover upon each call.
+        *
+        * This function resets $this->lb and closes all connections on it.
+        *
+        * @throws MWException
+        */
+       function rotateDb() {
+               // Cleaning up old connections
+               if ( isset( $this->lb ) ) {
+                       $this->lb->closeAll();
+                       unset( $this->lb );
+               }
+
+               if ( $this->forcedDb !== null ) {
+                       $this->db = $this->forcedDb;
+
+                       return;
+               }
+
+               if ( isset( $this->db ) && $this->db->isOpen() ) {
+                       throw new MWException( 'DB is set and has not been closed by the Load Balancer' );
+               }
+
+               unset( $this->db );
+
+               // Trying to set up new connection.
+               // We do /not/ retry upon failure, but delegate to encapsulating logic, to avoid
+               // individually retrying at different layers of code.
+
+               // 1. The LoadBalancer.
+               try {
+                       $this->lb = wfGetLBFactory()->newMainLB();
+               } catch ( Exception $e ) {
+                       throw new MWException( __METHOD__
+                               . " rotating DB failed to obtain new load balancer (" . $e->getMessage() . ")" );
+               }
+
+               // 2. The Connection, through the load balancer.
+               try {
+                       $this->db = $this->lb->getConnection( DB_SLAVE, 'dump' );
+               } catch ( Exception $e ) {
+                       throw new MWException( __METHOD__
+                               . " rotating DB failed to obtain new database (" . $e->getMessage() . ")" );
+               }
+       }
+
+       function initProgress( $history = WikiExporter::FULL ) {
+               parent::initProgress();
+               $this->timeOfCheckpoint = $this->startTime;
+       }
+
+       function dump( $history, $text = WikiExporter::TEXT ) {
+               // Notice messages will foul up your XML output even if they're
+               // relatively harmless.
+               if ( ini_get( 'display_errors' ) ) {
+                       ini_set( 'display_errors', 'stderr' );
+               }
+
+               $this->initProgress( $this->history );
+
+               // We are trying to get an initial database connection to avoid that the
+               // first try of this request's first call to getText fails. However, if
+               // obtaining a good DB connection fails it's not a serious issue, as
+               // getText does retry upon failure and can start without having a working
+               // DB connection.
+               try {
+                       $this->rotateDb();
+               } catch ( Exception $e ) {
+                       // We do not even count this as failure. Just let eventual
+                       // watchdogs know.
+                       $this->progress( "Getting initial DB connection failed (" .
+                               $e->getMessage() . ")" );
+               }
+
+               $this->egress = new ExportProgressFilter( $this->sink, $this );
+
+               // it would be nice to do it in the constructor, oh well. need egress set
+               $this->finalOptionCheck();
+
+               // we only want this so we know how to close a stream :-P
+               $this->xmlwriterobj = new XmlDumpWriter();
+
+               $input = fopen( $this->input, "rt" );
+               $this->readDump( $input );
+
+               if ( $this->spawnProc ) {
+                       $this->closeSpawn();
+               }
+
+               $this->report( true );
+       }
+
+       function processFileOpt( $opt ) {
+               $split = explode( ':', $opt, 2 );
+               $val = $split[0];
+               $param = '';
+               if ( count( $split ) === 2 ) {
+                       $param = $split[1];
+               }
+               $fileURIs = explode( ';', $param );
+               foreach ( $fileURIs as $URI ) {
+                       switch ( $val ) {
+                               case "file":
+                                       $newURI = $URI;
+                                       break;
+                               case "gzip":
+                                       $newURI = "compress.zlib://$URI";
+                                       break;
+                               case "bzip2":
+                                       $newURI = "compress.bzip2://$URI";
+                                       break;
+                               case "7zip":
+                                       $newURI = "mediawiki.compress.7z://$URI";
+                                       break;
+                               default:
+                                       $newURI = $URI;
+                       }
+                       $newFileURIs[] = $newURI;
+               }
+               $val = implode( ';', $newFileURIs );
+
+               return $val;
+       }
+
+       /**
+        * Overridden to include prefetch ratio if enabled.
+        */
+       function showReport() {
+               if ( !$this->prefetch ) {
+                       parent::showReport();
+
+                       return;
+               }
+
+               if ( $this->reporting ) {
+                       $now = wfTimestamp( TS_DB );
+                       $nowts = microtime( true );
+                       $deltaAll = $nowts - $this->startTime;
+                       $deltaPart = $nowts - $this->lastTime;
+                       $this->pageCountPart = $this->pageCount - $this->pageCountLast;
+                       $this->revCountPart = $this->revCount - $this->revCountLast;
+
+                       if ( $deltaAll ) {
+                               $portion = $this->revCount / $this->maxCount;
+                               $eta = $this->startTime + $deltaAll / $portion;
+                               $etats = wfTimestamp( TS_DB, intval( $eta ) );
+                               if ( $this->fetchCount ) {
+                                       $fetchRate = 100.0 * $this->prefetchCount / $this->fetchCount;
+                               } else {
+                                       $fetchRate = '-';
+                               }
+                               $pageRate = $this->pageCount / $deltaAll;
+                               $revRate = $this->revCount / $deltaAll;
+                       } else {
+                               $pageRate = '-';
+                               $revRate = '-';
+                               $etats = '-';
+                               $fetchRate = '-';
+                       }
+                       if ( $deltaPart ) {
+                               if ( $this->fetchCountLast ) {
+                                       $fetchRatePart = 100.0 * $this->prefetchCountLast / $this->fetchCountLast;
+                               } else {
+                                       $fetchRatePart = '-';
+                               }
+                               $pageRatePart = $this->pageCountPart / $deltaPart;
+                               $revRatePart = $this->revCountPart / $deltaPart;
+                       } else {
+                               $fetchRatePart = '-';
+                               $pageRatePart = '-';
+                               $revRatePart = '-';
+                       }
+                       $this->progress( sprintf(
+                               "%s: %s (ID %d) %d pages (%0.1f|%0.1f/sec all|curr), "
+                                       . "%d revs (%0.1f|%0.1f/sec all|curr), %0.1f%%|%0.1f%% "
+                                       . "prefetched (all|curr), ETA %s [max %d]",
+                               $now, wfWikiID(), $this->ID, $this->pageCount, $pageRate,
+                               $pageRatePart, $this->revCount, $revRate, $revRatePart,
+                               $fetchRate, $fetchRatePart, $etats, $this->maxCount
+                       ) );
+                       $this->lastTime = $nowts;
+                       $this->revCountLast = $this->revCount;
+                       $this->prefetchCountLast = $this->prefetchCount;
+                       $this->fetchCountLast = $this->fetchCount;
+               }
+       }
+
+       function setTimeExceeded() {
+               $this->timeExceeded = true;
+       }
+
+       function checkIfTimeExceeded() {
+               if ( $this->maxTimeAllowed
+                       && ( $this->lastTime - $this->timeOfCheckpoint > $this->maxTimeAllowed )
+               ) {
+                       return true;
+               }
+
+               return false;
+       }
+
+       function finalOptionCheck() {
+               if ( ( $this->checkpointFiles && !$this->maxTimeAllowed )
+                       || ( $this->maxTimeAllowed && !$this->checkpointFiles )
+               ) {
+                       throw new MWException( "Options checkpointfile and maxtime must be specified together.\n" );
+               }
+               foreach ( $this->checkpointFiles as $checkpointFile ) {
+                       $count = substr_count( $checkpointFile, "%s" );
+                       if ( $count != 2 ) {
+                               throw new MWException( "Option checkpointfile must contain two '%s' "
+                                       . "for substitution of first and last pageids, count is $count instead, "
+                                       . "file is $checkpointFile.\n" );
+                       }
+               }
+
+               if ( $this->checkpointFiles ) {
+                       $filenameList = (array)$this->egress->getFilenames();
+                       if ( count( $filenameList ) != count( $this->checkpointFiles ) ) {
+                               throw new MWException( "One checkpointfile must be specified "
+                                       . "for each output option, if maxtime is used.\n" );
+                       }
+               }
+       }
+
+       /**
+        * @throws MWException Failure to parse XML input
+        * @param string $input
+        * @return bool
+        */
+       function readDump( $input ) {
+               $this->buffer = "";
+               $this->openElement = false;
+               $this->atStart = true;
+               $this->state = "";
+               $this->lastName = "";
+               $this->thisPage = 0;
+               $this->thisRev = 0;
+               $this->thisRevModel = null;
+               $this->thisRevFormat = null;
+
+               $parser = xml_parser_create( "UTF-8" );
+               xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
+
+               xml_set_element_handler(
+                       $parser,
+                       array( &$this, 'startElement' ),
+                       array( &$this, 'endElement' )
+               );
+               xml_set_character_data_handler( $parser, array( &$this, 'characterData' ) );
+
+               $offset = 0; // for context extraction on error reporting
+               do {
+                       if ( $this->checkIfTimeExceeded() ) {
+                               $this->setTimeExceeded();
+                       }
+                       $chunk = fread( $input, $this->bufferSize );
+                       if ( !xml_parse( $parser, $chunk, feof( $input ) ) ) {
+                               wfDebug( "TextDumpPass::readDump encountered XML parsing error\n" );
+
+                               $byte = xml_get_current_byte_index( $parser );
+                               $msg = wfMessage( 'xml-error-string',
+                                       'XML import parse failure',
+                                       xml_get_current_line_number( $parser ),
+                                       xml_get_current_column_number( $parser ),
+                                       $byte . ( is_null( $chunk ) ? null : ( '; "' . substr( $chunk, $byte - $offset, 16 ) . '"' ) ),
+                                       xml_error_string( xml_get_error_code( $parser ) ) )->escaped();
+
+                               xml_parser_free( $parser );
+
+                               throw new MWException( $msg );
+                       }
+                       $offset += strlen( $chunk );
+               } while ( $chunk !== false && !feof( $input ) );
+               if ( $this->maxTimeAllowed ) {
+                       $filenameList = (array)$this->egress->getFilenames();
+                       // we wrote some stuff after last checkpoint that needs renamed
+                       if ( file_exists( $filenameList[0] ) ) {
+                               $newFilenames = array();
+                               # we might have just written the header and footer and had no
+                               # pages or revisions written... perhaps they were all deleted
+                               # there's no pageID 0 so we use that. the caller is responsible
+                               # for deciding what to do with a file containing only the
+                               # siteinfo information and the mw tags.
+                               if ( !$this->firstPageWritten ) {
+                                       $firstPageID = str_pad( 0, 9, "0", STR_PAD_LEFT );
+                                       $lastPageID = str_pad( 0, 9, "0", STR_PAD_LEFT );
+                               } else {
+                                       $firstPageID = str_pad( $this->firstPageWritten, 9, "0", STR_PAD_LEFT );
+                                       $lastPageID = str_pad( $this->lastPageWritten, 9, "0", STR_PAD_LEFT );
+                               }
+
+                               $filenameCount = count( $filenameList );
+                               for ( $i = 0; $i < $filenameCount; $i++ ) {
+                                       $checkpointNameFilledIn = sprintf( $this->checkpointFiles[$i], $firstPageID, $lastPageID );
+                                       $fileinfo = pathinfo( $filenameList[$i] );
+                                       $newFilenames[] = $fileinfo['dirname'] . '/' . $checkpointNameFilledIn;
+                               }
+                               $this->egress->closeAndRename( $newFilenames );
+                       }
+               }
+               xml_parser_free( $parser );
+
+               return true;
+       }
+
+       /**
+        * Applies applicable export transformations to $text.
+        *
+        * @param string $text
+        * @param string $model
+        * @param string|null $format
+        *
+        * @return string
+        */
+       private function exportTransform( $text, $model, $format = null ) {
+               try {
+                       $handler = ContentHandler::getForModelID( $model );
+                       $text = $handler->exportTransform( $text, $format );
+               }
+               catch ( MWException $ex ) {
+                       $this->progress(
+                               "Unable to apply export transformation for content model '$model': " .
+                               $ex->getMessage()
+                       );
+               }
 
-Usage: php dumpTextPass.php [<options>]
-Options:
-  --stub=<type>:<file> To load a compressed stub dump instead of stdin
-  --prefetch=<type>:<file> Use a prior dump file as a text source, to save
-                         pressure on the database.
-                         (Requires the XMLReader extension)
-  --maxtime=<minutes> Write out checkpoint file after this many minutes (writing
-                 out complete page, closing xml file properly, and opening new one
-                 with header).  This option requires the checkpointfile option.
-  --checkpointfile=<filenamepattern> Use this string for checkpoint filenames,
-                     substituting first pageid written for the first %s (required) and the
-              last pageid written for the second %s if it exists.
-  --quiet        Don't dump status reports to stderr.
-  --report=n  Report position and speed after every n pages processed.
-                         (Default: 100)
-  --server=h  Force reading from MySQL server h
-  --current      Base ETA on number of pages in database instead of all revisions
-  --spawn        Spawn a subprocess for loading text records
-  --buffersize=<size> Buffer size in bytes to use for reading the stub.
-              (Default: 512KB, Minimum: 4KB)
-  --help      Display this help message
-ENDS
-       );
+               return $text;
+       }
+
+       /**
+        * Tries to get the revision text for a revision id.
+        * Export transformations are applied if the content model can is given or can be
+        * determined from the database.
+        *
+        * Upon errors, retries (Up to $this->maxFailures tries each call).
+        * If still no good revision get could be found even after this retrying, "" is returned.
+        * If no good revision text could be returned for
+        * $this->maxConsecutiveFailedTextRetrievals consecutive calls to getText, MWException
+        * is thrown.
+        *
+        * @param string $id The revision id to get the text for
+        * @param string|bool|null $model The content model used to determine
+        *  applicable export transformations.
+        *  If $model is null, it will be determined from the database.
+        * @param string|null $format The content format used when applying export transformations.
+        *
+        * @throws MWException
+        * @return string The revision text for $id, or ""
+        */
+       function getText( $id, $model = null, $format = null ) {
+               global $wgContentHandlerUseDB;
+
+               $prefetchNotTried = true; // Whether or not we already tried to get the text via prefetch.
+               $text = false; // The candidate for a good text. false if no proper value.
+               $failures = 0; // The number of times, this invocation of getText already failed.
+
+               // The number of times getText failed without yielding a good text in between.
+               static $consecutiveFailedTextRetrievals = 0;
+
+               $this->fetchCount++;
+
+               // To allow to simply return on success and do not have to worry about book keeping,
+               // we assume, this fetch works (possible after some retries). Nevertheless, we koop
+               // the old value, so we can restore it, if problems occur (See after the while loop).
+               $oldConsecutiveFailedTextRetrievals = $consecutiveFailedTextRetrievals;
+               $consecutiveFailedTextRetrievals = 0;
+
+               if ( $model === null && $wgContentHandlerUseDB ) {
+                       $row = $this->db->selectRow(
+                               'revision',
+                               array( 'rev_content_model', 'rev_content_format' ),
+                               array( 'rev_id' => $this->thisRev ),
+                               __METHOD__
+                       );
+
+                       if ( $row ) {
+                               $model = $row->rev_content_model;
+                               $format = $row->rev_content_format;
+                       }
+               }
+
+               if ( $model === null || $model === '' ) {
+                       $model = false;
+               }
+
+               while ( $failures < $this->maxFailures ) {
+
+                       // As soon as we found a good text for the $id, we will return immediately.
+                       // Hence, if we make it past the try catch block, we know that we did not
+                       // find a good text.
+
+                       try {
+                               // Step 1: Get some text (or reuse from previous iteratuon if checking
+                               //         for plausibility failed)
+
+                               // Trying to get prefetch, if it has not been tried before
+                               if ( $text === false && isset( $this->prefetch ) && $prefetchNotTried ) {
+                                       $prefetchNotTried = false;
+                                       $tryIsPrefetch = true;
+                                       $text = $this->prefetch->prefetch( intval( $this->thisPage ),
+                                               intval( $this->thisRev ) );
+
+                                       if ( $text === null ) {
+                                               $text = false;
+                                       }
+
+                                       if ( is_string( $text ) && $model !== false ) {
+                                               // Apply export transformation to text coming from an old dump.
+                                               // The purpose of this transformation is to convert up from legacy
+                                               // formats, which may still be used in the older dump that is used
+                                               // for pre-fetching. Applying the transformation again should not
+                                               // interfere with content that is already in the correct form.
+                                               $text = $this->exportTransform( $text, $model, $format );
+                                       }
+                               }
+
+                               if ( $text === false ) {
+                                       // Fallback to asking the database
+                                       $tryIsPrefetch = false;
+                                       if ( $this->spawn ) {
+                                               $text = $this->getTextSpawned( $id );
+                                       } else {
+                                               $text = $this->getTextDb( $id );
+                                       }
+
+                                       if ( $text !== false && $model !== false ) {
+                                               // Apply export transformation to text coming from the database.
+                                               // Prefetched text should already have transformations applied.
+                                               $text = $this->exportTransform( $text, $model, $format );
+                                       }
+
+                                       // No more checks for texts from DB for now.
+                                       // If we received something that is not false,
+                                       // We treat it as good text, regardless of whether it actually is or is not
+                                       if ( $text !== false ) {
+                                               return $text;
+                                       }
+                               }
+
+                               if ( $text === false ) {
+                                       throw new MWException( "Generic error while obtaining text for id " . $id );
+                               }
+
+                               // We received a good candidate for the text of $id via some method
+
+                               // Step 2: Checking for plausibility and return the text if it is
+                               //         plausible
+                               $revID = intval( $this->thisRev );
+                               if ( !isset( $this->db ) ) {
+                                       throw new MWException( "No database available" );
+                               }
+
+                               if ( $model !== CONTENT_MODEL_WIKITEXT ) {
+                                       $revLength = strlen( $text );
+                               } else {
+                                       $revLength = $this->db->selectField( 'revision', 'rev_len', array( 'rev_id' => $revID ) );
+                               }
+
+                               if ( strlen( $text ) == $revLength ) {
+                                       if ( $tryIsPrefetch ) {
+                                               $this->prefetchCount++;
+                                       }
+
+                                       return $text;
+                               }
+
+                               $text = false;
+                               throw new MWException( "Received text is unplausible for id " . $id );
+                       } catch ( Exception $e ) {
+                               $msg = "getting/checking text " . $id . " failed (" . $e->getMessage() . ")";
+                               if ( $failures + 1 < $this->maxFailures ) {
+                                       $msg .= " (Will retry " . ( $this->maxFailures - $failures - 1 ) . " more times)";
+                               }
+                               $this->progress( $msg );
+                       }
+
+                       // Something went wrong; we did not a text that was plausible :(
+                       $failures++;
+
+                       // A failure in a prefetch hit does not warrant resetting db connection etc.
+                       if ( !$tryIsPrefetch ) {
+                               // After backing off for some time, we try to reboot the whole process as
+                               // much as possible to not carry over failures from one part to the other
+                               // parts
+                               sleep( $this->failureTimeout );
+                               try {
+                                       $this->rotateDb();
+                                       if ( $this->spawn ) {
+                                               $this->closeSpawn();
+                                               $this->openSpawn();
+                                       }
+                               } catch ( Exception $e ) {
+                                       $this->progress( "Rebooting getText infrastructure failed (" . $e->getMessage() . ")" .
+                                               " Trying to continue anyways" );
+                               }
+                       }
+               }
+
+               // Retirieving a good text for $id failed (at least) maxFailures times.
+               // We abort for this $id.
+
+               // Restoring the consecutive failures, and maybe aborting, if the dump
+               // is too broken.
+               $consecutiveFailedTextRetrievals = $oldConsecutiveFailedTextRetrievals + 1;
+               if ( $consecutiveFailedTextRetrievals > $this->maxConsecutiveFailedTextRetrievals ) {
+                       throw new MWException( "Graceful storage failure" );
+               }
+
+               return "";
+       }
+
+       /**
+        * May throw a database error if, say, the server dies during query.
+        * @param int $id
+        * @return bool|string
+        * @throws MWException
+        */
+       private function getTextDb( $id ) {
+               global $wgContLang;
+               if ( !isset( $this->db ) ) {
+                       throw new MWException( __METHOD__ . "No database available" );
+               }
+               $row = $this->db->selectRow( 'text',
+                       array( 'old_text', 'old_flags' ),
+                       array( 'old_id' => $id ),
+                       __METHOD__ );
+               $text = Revision::getRevisionText( $row );
+               if ( $text === false ) {
+                       return false;
+               }
+               $stripped = str_replace( "\r", "", $text );
+               $normalized = $wgContLang->normalize( $stripped );
+
+               return $normalized;
+       }
+
+       private function getTextSpawned( $id ) {
+               MediaWiki\suppressWarnings();
+               if ( !$this->spawnProc ) {
+                       // First time?
+                       $this->openSpawn();
+               }
+               $text = $this->getTextSpawnedOnce( $id );
+               MediaWiki\restoreWarnings();
+
+               return $text;
+       }
+
+       function openSpawn() {
+               global $IP;
+
+               if ( file_exists( "$IP/../multiversion/MWScript.php" ) ) {
+                       $cmd = implode( " ",
+                               array_map( 'wfEscapeShellArg',
+                                       array(
+                                               $this->php,
+                                               "$IP/../multiversion/MWScript.php",
+                                               "fetchText.php",
+                                               '--wiki', wfWikiID() ) ) );
+               } else {
+                       $cmd = implode( " ",
+                               array_map( 'wfEscapeShellArg',
+                                       array(
+                                               $this->php,
+                                               "$IP/maintenance/fetchText.php",
+                                               '--wiki', wfWikiID() ) ) );
+               }
+               $spec = array(
+                       0 => array( "pipe", "r" ),
+                       1 => array( "pipe", "w" ),
+                       2 => array( "file", "/dev/null", "a" ) );
+               $pipes = array();
+
+               $this->progress( "Spawning database subprocess: $cmd" );
+               $this->spawnProc = proc_open( $cmd, $spec, $pipes );
+               if ( !$this->spawnProc ) {
+                       $this->progress( "Subprocess spawn failed." );
+
+                       return false;
+               }
+               list(
+                       $this->spawnWrite, // -> stdin
+                       $this->spawnRead, // <- stdout
+               ) = $pipes;
+
+               return true;
+       }
+
+       private function closeSpawn() {
+               MediaWiki\suppressWarnings();
+               if ( $this->spawnRead ) {
+                       fclose( $this->spawnRead );
+               }
+               $this->spawnRead = false;
+               if ( $this->spawnWrite ) {
+                       fclose( $this->spawnWrite );
+               }
+               $this->spawnWrite = false;
+               if ( $this->spawnErr ) {
+                       fclose( $this->spawnErr );
+               }
+               $this->spawnErr = false;
+               if ( $this->spawnProc ) {
+                       pclose( $this->spawnProc );
+               }
+               $this->spawnProc = false;
+               MediaWiki\restoreWarnings();
+       }
+
+       private function getTextSpawnedOnce( $id ) {
+               global $wgContLang;
+
+               $ok = fwrite( $this->spawnWrite, "$id\n" );
+               // $this->progress( ">> $id" );
+               if ( !$ok ) {
+                       return false;
+               }
+
+               $ok = fflush( $this->spawnWrite );
+               // $this->progress( ">> [flush]" );
+               if ( !$ok ) {
+                       return false;
+               }
+
+               // check that the text id they are sending is the one we asked for
+               // this avoids out of sync revision text errors we have encountered in the past
+               $newId = fgets( $this->spawnRead );
+               if ( $newId === false ) {
+                       return false;
+               }
+               if ( $id != intval( $newId ) ) {
+                       return false;
+               }
+
+               $len = fgets( $this->spawnRead );
+               // $this->progress( "<< " . trim( $len ) );
+               if ( $len === false ) {
+                       return false;
+               }
+
+               $nbytes = intval( $len );
+               // actual error, not zero-length text
+               if ( $nbytes < 0 ) {
+                       return false;
+               }
+
+               $text = "";
+
+               // Subprocess may not send everything at once, we have to loop.
+               while ( $nbytes > strlen( $text ) ) {
+                       $buffer = fread( $this->spawnRead, $nbytes - strlen( $text ) );
+                       if ( $buffer === false ) {
+                               break;
+                       }
+                       $text .= $buffer;
+               }
+
+               $gotbytes = strlen( $text );
+               if ( $gotbytes != $nbytes ) {
+                       $this->progress( "Expected $nbytes bytes from database subprocess, got $gotbytes " );
+
+                       return false;
+               }
+
+               // Do normalization in the dump thread...
+               $stripped = str_replace( "\r", "", $text );
+               $normalized = $wgContLang->normalize( $stripped );
+
+               return $normalized;
+       }
+
+       function startElement( $parser, $name, $attribs ) {
+               $this->checkpointJustWritten = false;
+
+               $this->clearOpenElement( null );
+               $this->lastName = $name;
+
+               if ( $name == 'revision' ) {
+                       $this->state = $name;
+                       $this->egress->writeOpenPage( null, $this->buffer );
+                       $this->buffer = "";
+               } elseif ( $name == 'page' ) {
+                       $this->state = $name;
+                       if ( $this->atStart ) {
+                               $this->egress->writeOpenStream( $this->buffer );
+                               $this->buffer = "";
+                               $this->atStart = false;
+                       }
+               }
+
+               if ( $name == "text" && isset( $attribs['id'] ) ) {
+                       $id = $attribs['id'];
+                       $model = trim( $this->thisRevModel );
+                       $format = trim( $this->thisRevFormat );
+
+                       $model = $model === '' ? null : $model;
+                       $format = $format === '' ? null : $format;
+
+                       $text = $this->getText( $id, $model, $format );
+                       $this->openElement = array( $name, array( 'xml:space' => 'preserve' ) );
+                       if ( strlen( $text ) > 0 ) {
+                               $this->characterData( $parser, $text );
+                       }
+               } else {
+                       $this->openElement = array( $name, $attribs );
+               }
+       }
+
+       function endElement( $parser, $name ) {
+               $this->checkpointJustWritten = false;
+
+               if ( $this->openElement ) {
+                       $this->clearOpenElement( "" );
+               } else {
+                       $this->buffer .= "</$name>";
+               }
+
+               if ( $name == 'revision' ) {
+                       $this->egress->writeRevision( null, $this->buffer );
+                       $this->buffer = "";
+                       $this->thisRev = "";
+                       $this->thisRevModel = null;
+                       $this->thisRevFormat = null;
+               } elseif ( $name == 'page' ) {
+                       if ( !$this->firstPageWritten ) {
+                               $this->firstPageWritten = trim( $this->thisPage );
+                       }
+                       $this->lastPageWritten = trim( $this->thisPage );
+                       if ( $this->timeExceeded ) {
+                               $this->egress->writeClosePage( $this->buffer );
+                               // nasty hack, we can't just write the chardata after the
+                               // page tag, it will include leading blanks from the next line
+                               $this->egress->sink->write( "\n" );
+
+                               $this->buffer = $this->xmlwriterobj->closeStream();
+                               $this->egress->writeCloseStream( $this->buffer );
+
+                               $this->buffer = "";
+                               $this->thisPage = "";
+                               // this could be more than one file if we had more than one output arg
+
+                               $filenameList = (array)$this->egress->getFilenames();
+                               $newFilenames = array();
+                               $firstPageID = str_pad( $this->firstPageWritten, 9, "0", STR_PAD_LEFT );
+                               $lastPageID = str_pad( $this->lastPageWritten, 9, "0", STR_PAD_LEFT );
+                               $filenamesCount = count( $filenameList );
+                               for ( $i = 0; $i < $filenamesCount; $i++ ) {
+                                       $checkpointNameFilledIn = sprintf( $this->checkpointFiles[$i], $firstPageID, $lastPageID );
+                                       $fileinfo = pathinfo( $filenameList[$i] );
+                                       $newFilenames[] = $fileinfo['dirname'] . '/' . $checkpointNameFilledIn;
+                               }
+                               $this->egress->closeRenameAndReopen( $newFilenames );
+                               $this->buffer = $this->xmlwriterobj->openStream();
+                               $this->timeExceeded = false;
+                               $this->timeOfCheckpoint = $this->lastTime;
+                               $this->firstPageWritten = false;
+                               $this->checkpointJustWritten = true;
+                       } else {
+                               $this->egress->writeClosePage( $this->buffer );
+                               $this->buffer = "";
+                               $this->thisPage = "";
+                       }
+               } elseif ( $name == 'mediawiki' ) {
+                       $this->egress->writeCloseStream( $this->buffer );
+                       $this->buffer = "";
+               }
+       }
+
+       function characterData( $parser, $data ) {
+               $this->clearOpenElement( null );
+               if ( $this->lastName == "id" ) {
+                       if ( $this->state == "revision" ) {
+                               $this->thisRev .= $data;
+                       } elseif ( $this->state == "page" ) {
+                               $this->thisPage .= $data;
+                       }
+               } elseif ( $this->lastName == "model" ) {
+                       $this->thisRevModel .= $data;
+               } elseif ( $this->lastName == "format" ) {
+                       $this->thisRevFormat .= $data;
+               }
+
+               // have to skip the newline left over from closepagetag line of
+               // end of checkpoint files. nasty hack!!
+               if ( $this->checkpointJustWritten ) {
+                       if ( $data[0] == "\n" ) {
+                               $data = substr( $data, 1 );
+                       }
+                       $this->checkpointJustWritten = false;
+               }
+               $this->buffer .= htmlspecialchars( $data );
+       }
+
+       function clearOpenElement( $style ) {
+               if ( $this->openElement ) {
+                       $this->buffer .= Xml::element( $this->openElement[0], $this->openElement[1], $style );
+                       $this->openElement = false;
+               }
+       }
 }
+
+$maintClass = 'TextPassDumper';
+require_once RUN_MAINTENANCE_IF_MAIN;
index 9d53f07..026ac02 100644 (file)
@@ -76,7 +76,7 @@ By default, outputs relative paths against the parent directory of \$wgUploadDir
         * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchUsed( $shared ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $image = $dbr->tableName( 'image' );
                $imagelinks = $dbr->tableName( 'imagelinks' );
 
@@ -97,7 +97,7 @@ By default, outputs relative paths against the parent directory of \$wgUploadDir
         * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchLocal( $shared ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $result = $dbr->select( 'image',
                        array( 'img_name' ),
                        '',
index 8fdcef3..69a95e2 100644 (file)
@@ -55,7 +55,7 @@ class EraseArchivedFile extends Maintenance {
                        }
                        $afile = false;
                } else { // specified version
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $row = $dbw->selectRow( 'filearchive', '*',
                                array( 'fa_storage_group' => 'deleted', 'fa_storage_key' => $filekey ),
                                __METHOD__ );
@@ -85,7 +85,7 @@ class EraseArchivedFile extends Maintenance {
        }
 
        protected function scrubAllVersions( $name ) {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $res = $dbw->select( 'filearchive', '*',
                        array( 'fa_name' => $name, 'fa_storage_group' => 'deleted' ),
                        __METHOD__ );
index 983b772..cf12838 100644 (file)
@@ -48,7 +48,7 @@ class FetchText extends Maintenance {
         * note that the text string itself is *not* followed by newline
         */
        public function execute() {
-               $db = wfGetDB( DB_SLAVE );
+               $db = $this->getDB( DB_SLAVE );
                $stdin = $this->getStdin();
                while ( !feof( $stdin ) ) {
                        $line = fgets( $stdin );
index 1265891..25ec342 100644 (file)
@@ -47,7 +47,7 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance {
                        return true;
                }
 
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $namespaces = array(
                        NS_MEDIAWIKI => $dbr->buildLike( $dbr->anyString(), '.json' ),
                        NS_USER => $dbr->buildLike( $dbr->anyString(), '/', $dbr->anyString(), '.json' ),
@@ -80,7 +80,7 @@ class FixDefaultJsonContentPages extends LoggedUpdateMaintenance {
                $this->output( "Processing {$title} ({$row->page_id})...\n" );
                $rev = Revision::newFromTitle( $title );
                $content = $rev->getContent( Revision::RAW );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                if ( $content instanceof JsonContent ) {
                        if ( $content->isValid() ) {
                                // Yay, actually JSON. We need to just change the
index 9568284..ca551f8 100644 (file)
@@ -54,7 +54,7 @@ class FixDoubleRedirects extends Maintenance {
                        $title = null;
                }
 
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                // See also SpecialDoubleRedirects
                $tables = array(
index 0c60e62..a44f8e5 100644 (file)
@@ -47,7 +47,7 @@ class FixExtLinksProtocolRelative extends LoggedUpdateMaintenance {
        }
 
        protected function doDBUpdates() {
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                if ( !$db->tableExists( 'externallinks' ) ) {
                        $this->error( "externallinks table does not exist" );
 
index 5431cf2..c2a748c 100644 (file)
@@ -49,7 +49,7 @@ class FixTimestamps extends Maintenance {
                $grace = 60; // maximum normal clock offset
 
                # Find bounding revision IDs
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $revisionTable = $dbw->tableName( 'revision' );
                $res = $dbw->query( "SELECT MIN(rev_id) as minrev, MAX(rev_id) as maxrev FROM $revisionTable " .
                        "WHERE rev_timestamp BETWEEN '{$start}' AND '{$end}'", __METHOD__ );
index 40e0915..d09760b 100644 (file)
@@ -37,7 +37,7 @@ class FixUserRegistration extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $lastId = 0;
                do {
index 12711ea..c40d0ce 100644 (file)
@@ -196,7 +196,7 @@ class GenerateSitemap extends Maintenance {
                $this->identifier = $this->getOption( 'identifier', wfWikiID() );
                $this->compress = $this->getOption( 'compress', 'yes' ) !== 'no';
                $this->skipRedirects = $this->getOption( 'skip-redirects', false ) !== false;
-               $this->dbr = wfGetDB( DB_SLAVE );
+               $this->dbr = $this->getDB( DB_SLAVE );
                $this->generateNamespaces();
                $this->timestamp = wfTimestamp( TS_ISO_8601, wfTimestampNow() );
                $this->findex = fopen( "{$this->fspath}sitemap-index-{$this->identifier}.xml", 'wb' );
index 68c1943..c858c38 100644 (file)
@@ -40,7 +40,7 @@ class GetSlaveServer extends Maintenance {
                if ( $wgAllDBsAreLocalhost ) {
                        $host = 'localhost';
                } elseif ( $this->hasOption( 'group' ) ) {
-                       $db = wfGetDB( DB_SLAVE, $this->getOption( 'group' ) );
+                       $db = $this->getDB( DB_SLAVE, $this->getOption( 'group' ) );
                        $host = $db->getServer();
                } else {
                        $lb = wfGetLB();
index 7d7c1cc..c4b8cc9 100644 (file)
@@ -39,8 +39,6 @@ class GetTextMaint extends Maintenance {
        }
 
        public function execute() {
-               $this->db = wfGetDB( DB_SLAVE );
-
                $titleText = $this->getArg( 0 );
                $title = Title::newFromText( $titleText );
                if ( !$title ) {
index 43e5060..5806ffc 100644 (file)
@@ -201,7 +201,7 @@ TEXT;
                        if ( !$this->dryRun ) {
                                // bluuuh hack
                                // call_user_func( $this->uploadCallback, $revision );
-                               $dbw = wfGetDB( DB_MASTER );
+                               $dbw = $this->getDB( DB_MASTER );
 
                                return $dbw->deadlockLoop( array( $revision, 'importUpload' ) );
                        }
index 7c6e7d4..dee5db8 100644 (file)
@@ -39,7 +39,7 @@ in the load balancer, usually indicating a replication environment.' );
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $user = $dbw->tableName( 'user' );
                $revision = $dbw->tableName( 'revision' );
 
@@ -58,7 +58,7 @@ in the load balancer, usually indicating a replication environment.' );
                if ( $backgroundMode ) {
                        $this->output( "Using replication-friendly background mode...\n" );
 
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = $this->getDB( DB_SLAVE );
                        $chunkSize = 100;
                        $lastUser = $dbr->selectField( 'user', 'MAX(user_id)', '', __METHOD__ );
 
index cac33ec..8d26063 100644 (file)
@@ -67,7 +67,7 @@ class InitSiteStats extends Maintenance {
 
                if ( $this->hasOption( 'active' ) ) {
                        $this->output( "\nCounting and updating active users..." );
-                       $active = SiteStatsUpdate::cacheUpdate( wfGetDB( DB_MASTER ) );
+                       $active = SiteStatsUpdate::cacheUpdate( $this->getDB( DB_MASTER ) );
                        $this->output( "{$active}\n" );
                }
 
index 6903365..dc20eee 100644 (file)
@@ -41,7 +41,7 @@ class MigrateUserGroup extends Maintenance {
                $count = 0;
                $oldGroup = $this->getArg( 0 );
                $newGroup = $this->getArg( 1 );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $start = $dbw->selectField( 'user_groups', 'MIN(ug_user)',
                        array( 'ug_group' => $oldGroup ), __FUNCTION__ );
                $end = $dbw->selectField( 'user_groups', 'MAX(ug_user)',
@@ -58,7 +58,7 @@ class MigrateUserGroup extends Maintenance {
                        $affected = 0;
                        $this->output( "Doing users $blockStart to $blockEnd\n" );
 
-                       $dbw->begin( __METHOD__ );
+                       $this->beginTransaction( $dbw, __METHOD__ );
                        $dbw->update( 'user_groups',
                                array( 'ug_group' => $newGroup ),
                                array( 'ug_group' => $oldGroup,
@@ -77,7 +77,7 @@ class MigrateUserGroup extends Maintenance {
                                __METHOD__
                        );
                        $affected += $dbw->affectedRows();
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
 
                        // Clear cache for the affected users (bug 40340)
                        if ( $affected > 0 ) {
index 5849908..43d4d25 100644 (file)
@@ -85,7 +85,7 @@ class MoveBatch extends Maintenance {
                }
 
                # Setup complete, now start
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                // @codingStandardsIgnoreStart Ignore avoid function calls in a FOR loop test part warning
                for ( $linenum = 1; !feof( $file ); $linenum++ ) {
                        // @codingStandardsIgnoreEnd
@@ -106,13 +106,13 @@ class MoveBatch extends Maintenance {
                        }
 
                        $this->output( $source->getPrefixedText() . ' --> ' . $dest->getPrefixedText() );
-                       $dbw->begin( __METHOD__ );
+                       $this->beginTransaction( $dbw, __METHOD__ );
                        $mp = new MovePage( $source, $dest );
                        $status = $mp->move( $wgUser, $reason, !$noredirects );
                        if ( !$status->isOK() ) {
                                $this->output( "\nFAILED: " . $status->getWikiText() );
                        }
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
                        $this->output( "\n" );
 
                        if ( $interval ) {
index 28176a5..6e5cd38 100644 (file)
@@ -67,7 +67,7 @@ class NamespaceConflictChecker extends Maintenance {
        }
 
        public function execute() {
-               $this->db = wfGetDB( DB_MASTER );
+               $this->db = $this->getDB( DB_MASTER );
 
                $options = array(
                        'fix' => $this->hasOption( 'fix' ),
@@ -570,6 +570,7 @@ class NamespaceConflictChecker extends Maintenance {
         *
         * @param integer $id The page_id
         * @param Title $newTitle The new title
+        * @return bool
         */
        private function mergePage( $row, Title $newTitle ) {
                $id = $row->page_id;
@@ -583,7 +584,7 @@ class NamespaceConflictChecker extends Maintenance {
                $wikiPage->loadPageData( 'fromdbmaster' );
 
                $destId = $newTitle->getArticleId();
-               $this->db->begin( __METHOD__ );
+               $this->beginTransaction( $this->db, __METHOD__ );
                $this->db->update( 'revision',
                        // SET
                        array( 'rev_page' => $destId ),
@@ -604,7 +605,7 @@ class NamespaceConflictChecker extends Maintenance {
                 */
                $update = new LinksDeletionUpdate( $wikiPage );
                $update->doUpdate();
-               $this->db->commit( __METHOD__ );
+               $this->commitTransaction( $this->db, __METHOD__ );
 
                return true;
        }
index 64bf1b6..0f2dbf6 100644 (file)
@@ -54,8 +54,8 @@ class NukeNS extends Maintenance {
                $ns = $this->getOption( 'ns', NS_MEDIAWIKI );
                $delete = $this->getOption( 'delete', false );
                $all = $this->getOption( 'all', false );
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                $tbl_pag = $dbw->tableName( 'page' );
                $tbl_rev = $dbw->tableName( 'revision' );
@@ -86,7 +86,7 @@ class NukeNS extends Maintenance {
                                // I already have the id & revs
                                if ( $delete ) {
                                        $dbw->query( "DELETE FROM $tbl_pag WHERE page_id = $id" );
-                                       $dbw->commit( __METHOD__ );
+                                       $this->commitTransaction( $dbw, __METHOD__ );
                                        // Delete revisions as appropriate
                                        $child = $this->runChild( 'NukePage', 'nukePage.php' );
                                        $child->deleteRevisions( $revs );
@@ -97,7 +97,7 @@ class NukeNS extends Maintenance {
                                $this->output( "skip: " . $title->getPrefixedText() . "\n" );
                        }
                }
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
 
                if ( $n_deleted > 0 ) {
                        # update statistics - better to decrement existing count, or just count
index 1870273..dc45520 100644 (file)
@@ -43,8 +43,8 @@ class NukePage extends Maintenance {
                $name = $this->getArg();
                $delete = $this->getOption( 'delete', false );
 
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                $tbl_pag = $dbw->tableName( 'page' );
                $tbl_rec = $dbw->tableName( 'recentchanges' );
@@ -79,7 +79,7 @@ class NukePage extends Maintenance {
                                $this->output( "done.\n" );
                        }
 
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
 
                        # Delete revisions as appropriate
                        if ( $delete && $count ) {
@@ -99,20 +99,20 @@ class NukePage extends Maintenance {
                        }
                } else {
                        $this->output( "not found in database.\n" );
-                       $dbw->commit( __METHOD__ );
+                       $this->commitTransaction( $dbw, __METHOD__ );
                }
        }
 
        public function deleteRevisions( $ids ) {
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                $tbl_rev = $dbw->tableName( 'revision' );
 
                $set = implode( ', ', $ids );
                $dbw->query( "DELETE FROM $tbl_rev WHERE rev_id IN ( $set )" );
 
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
        }
 }
 
index eea6f7b..67e5ded 100644 (file)
@@ -48,7 +48,7 @@ class AlterSharedConstraints extends Maintenance {
                        return;
                }
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                foreach ( $wgSharedTables as $table ) {
                        $stable = $dbw->tableNameInternal( $table );
                        if ( $wgSharedPrefix != null ) {
index 7e27107..3c5566f 100644 (file)
@@ -71,7 +71,7 @@ class Orphans extends Maintenance {
         * @param bool $fix Whether to fix broken revisions when found
         */
        private function checkOrphans( $fix ) {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $page = $dbw->tableName( 'page' );
                $revision = $dbw->tableName( 'revision' );
 
@@ -129,7 +129,7 @@ class Orphans extends Maintenance {
         *       but valid revisions do exist)
         */
        private function checkWidows( $fix ) {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $page = $dbw->tableName( 'page' );
                $revision = $dbw->tableName( 'revision' );
 
@@ -175,7 +175,7 @@ class Orphans extends Maintenance {
         * @param bool $fix Whether to fix broken entries
         */
        private function checkSeparation( $fix ) {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $page = $dbw->tableName( 'page' );
                $revision = $dbw->tableName( 'revision' );
 
index 5d9fc1b..1f77bdb 100644 (file)
@@ -44,7 +44,7 @@ class PatchSql extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                foreach ( $this->mArgs as $arg ) {
                        $files = array(
                                $arg,
index 65d272b..481e073 100644 (file)
@@ -71,7 +71,7 @@ TEXT;
                $throttle = $this->getOption( 'throttle', 0 );
                $force = $this->getOption( 'force', false );
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                if ( !$force ) {
                        $row = $dbw->selectRow(
index 7bca0ec..4f9c7ae 100644 (file)
@@ -37,7 +37,7 @@ class PopulateContentModel extends Maintenance {
        }
 
        public function execute() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $ns = $this->getOption( 'ns' );
                if ( !ctype_digit( $ns ) && $ns !== 'all' ) {
                        $this->error( 'Invalid namespace', 1 );
index a3099f9..5a67262 100644 (file)
@@ -45,7 +45,7 @@ class PopulateFilearchiveSha1 extends LoggedUpdateMaintenance {
 
        public function doDBUpdates() {
                $startTime = microtime( true );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $table = 'filearchive';
                $conds = array( 'fa_sha1' => '', 'fa_storage_key IS NOT NULL' );
 
index e9123aa..cc52239 100644 (file)
@@ -67,7 +67,7 @@ class PopulateImageSha1 extends LoggedUpdateMaintenance {
                $isRegen = ( $force || $file != '' ); // forced recalculation?
 
                $t = -microtime( true );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                if ( $file != '' ) {
                        $res = $dbw->select(
                                'image',
index 96cb1ec..60329c0 100644 (file)
@@ -67,12 +67,12 @@ class PopulateLogUsertext extends LoggedUpdateMaintenance {
                        $res = $db->select( array( 'logging', 'user' ),
                                array( 'log_id', 'user_name' ), $cond, __METHOD__ );
 
-                       $db->begin( __METHOD__ );
+                       $this->beginTransaction( $db, __METHOD__ );
                        foreach ( $res as $row ) {
                                $db->update( 'logging', array( 'log_user_text' => $row->user_name ),
                                        array( 'log_id' => $row->log_id ), __METHOD__ );
                        }
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
                        $blockStart += $this->mBatchSize;
                        $blockEnd += $this->mBatchSize;
                        wfWaitForSlaves();
index 686d9f2..9baf28e 100644 (file)
@@ -46,7 +46,7 @@ class PopulateParentId extends LoggedUpdateMaintenance {
        }
 
        protected function doDBUpdates() {
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                if ( !$db->tableExists( 'revision' ) ) {
                        $this->error( "revision table does not exist" );
 
index b73ac7f..a9fb394 100644 (file)
@@ -100,14 +100,14 @@ class PopulateRevisionLength extends LoggedUpdateMaintenance {
                                __METHOD__
                        );
 
-                       $db->begin( __METHOD__ );
+                       $this->beginTransaction( $db, __METHOD__ );
                        # Go through and update rev_len from these rows.
                        foreach ( $res as $row ) {
                                if ( $this->upgradeRow( $row, $table, $idCol, $prefix ) ) {
                                        $count++;
                                }
                        }
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
 
                        $blockStart += $this->mBatchSize;
                        $blockEnd += $this->mBatchSize;
index b401db0..43504b1 100644 (file)
@@ -95,13 +95,13 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
                                AND $idCol IS NOT NULL AND {$prefix}_sha1 = ''";
                        $res = $db->select( $table, '*', $cond, __METHOD__ );
 
-                       $db->begin( __METHOD__ );
+                       $this->beginTransaction( $db, __METHOD__ );
                        foreach ( $res as $row ) {
                                if ( $this->upgradeRow( $row, $table, $idCol, $prefix ) ) {
                                        $count++;
                                }
                        }
-                       $db->commit( __METHOD__ );
+                       $this->commitTransaction( $db, __METHOD__ );
 
                        $blockStart += $this->mBatchSize;
                        $blockEnd += $this->mBatchSize;
@@ -121,20 +121,20 @@ class PopulateRevisionSha1 extends LoggedUpdateMaintenance {
                        array( 'ar_rev_id IS NULL', 'ar_sha1' => '' ), __METHOD__ );
 
                $updateSize = 0;
-               $db->begin( __METHOD__ );
+               $this->beginTransaction( $db, __METHOD__ );
                foreach ( $res as $row ) {
                        if ( $this->upgradeLegacyArchiveRow( $row ) ) {
                                ++$count;
                        }
                        if ( ++$updateSize >= 100 ) {
                                $updateSize = 0;
-                               $db->commit( __METHOD__ );
+                               $this->commitTransaction( $db, __METHOD__ );
                                $this->output( "Commited row with ar_timestamp={$row->ar_timestamp}\n" );
                                wfWaitForSlaves();
-                               $db->begin( __METHOD__ );
+                               $this->beginTransaction( $db, __METHOD__ );
                        }
                }
-               $db->commit( __METHOD__ );
+               $this->commitTransaction( $db, __METHOD__ );
 
                return $count;
        }
index 31ea5d0..9963cbf 100644 (file)
@@ -86,7 +86,7 @@ class PurgeList extends Maintenance {
         * @param int|bool $namespace
         */
        private function purgeNamespace( $namespace = false ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $startId = 0;
                if ( $namespace === false ) {
                        $conds = array();
index 679cadb..e68937a 100644 (file)
@@ -74,8 +74,8 @@ class ReassignEdits extends Maintenance {
         * @return int Number of entries changed, or that would be changed
         */
        private function doReassignEdits( &$from, &$to, $rc = false, $report = false ) {
-               $dbw = wfGetDB( DB_MASTER );
-               $dbw->begin( __METHOD__ );
+               $dbw = $this->getDB( DB_MASTER );
+               $this->beginTransaction( $dbw, __METHOD__ );
 
                # Count things
                $this->output( "Checking current edits..." );
@@ -139,7 +139,7 @@ class ReassignEdits extends Maintenance {
                        }
                }
 
-               $dbw->commit( __METHOD__ );
+               $this->commitTransaction( $dbw, __METHOD__ );
 
                return (int)$total;
        }
index 924457a..e07bf03 100644 (file)
@@ -70,7 +70,7 @@ class RebuildFileCache extends Maintenance {
 
                $this->output( "Building content page file cache from page {$start}!\n" );
 
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $overwrite = $this->getOption( 'overwrite', false );
                $start = ( $start > 0 )
                        ? $start
@@ -89,7 +89,7 @@ class RebuildFileCache extends Maintenance {
                $blockStart = $start;
                $blockEnd = $start + $this->mBatchSize - 1;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                // Go through each page and save the output
                while ( $blockEnd <= $end ) {
                        // Get the pages
@@ -99,7 +99,7 @@ class RebuildFileCache extends Maintenance {
                                array( 'ORDER BY' => 'page_id ASC', 'USE INDEX' => 'PRIMARY' )
                        );
 
-                       $dbw->begin( __METHOD__ ); // for any changes
+                       $this->beginTransaction( $dbw, __METHOD__ ); // for any changes
                        foreach ( $res as $row ) {
                                $rebuilt = false;
                                $wgRequestTime = microtime( true ); # bug 22852
@@ -145,7 +145,7 @@ class RebuildFileCache extends Maintenance {
                                        $this->output( "Page {$row->page_id} not cacheable\n" );
                                }
                        }
-                       $dbw->commit( __METHOD__ ); // commit any changes (just for sanity)
+                       $this->commitTransaction( $dbw, __METHOD__ ); // commit any changes (just for sanity)
 
                        $blockStart += $this->mBatchSize;
                        $blockEnd += $this->mBatchSize;
index b1bb353..1b0a27d 100644 (file)
@@ -58,7 +58,7 @@ class ImageBuilder extends Maintenance {
        }
 
        public function execute() {
-               $this->dbw = wfGetDB( DB_MASTER );
+               $this->dbw = $this->getDB( DB_MASTER );
                $this->dryrun = $this->hasOption( 'dry-run' );
                if ( $this->dryrun ) {
                        $GLOBALS['wgReadOnly'] = 'Dry run mode, image upgrades are suppressed';
@@ -127,7 +127,7 @@ class ImageBuilder extends Maintenance {
                $this->init( $count, $table );
                $this->output( "Processing $table...\n" );
 
-               $result = wfGetDB( DB_SLAVE )->select( $table, '*', array(), __METHOD__ );
+               $result = $this->getDB( DB_SLAVE )->select( $table, '*', array(), __METHOD__ );
 
                foreach ( $result as $row ) {
                        $update = call_user_func( $callback, $row, null );
index eeee9c2..4ff873e 100644 (file)
@@ -41,7 +41,7 @@ class RebuildAll extends Maintenance {
 
        public function execute() {
                // Rebuild the text index
-               if ( wfGetDB( DB_SLAVE )->getType() != 'postgres' ) {
+               if ( $this->getDB( DB_SLAVE )->getType() != 'postgres' ) {
                        $this->output( "** Rebuilding fulltext search index (if you abort "
                                . "this will break searching; run this script again to fix):\n" );
                        $rebuildText = $this->runChild( 'RebuildTextIndex', 'rebuildtextindex.php' );
index f4b0505..b6421f3 100644 (file)
@@ -46,11 +46,10 @@ class RebuildRecentchanges extends Maintenance {
        }
 
        /**
-        * Rebuild pass 1
-        * DOCUMENT ME!
+        * Rebuild pass 1: Insert `recentchanges` entries for page revisions.
         */
        private function rebuildRecentChangesTablePass1() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $dbw->delete( 'recentchanges', '*' );
 
@@ -100,11 +99,11 @@ class RebuildRecentchanges extends Maintenance {
        }
 
        /**
-        * Rebuild pass 2
-        * DOCUMENT ME!
+        * Rebuild pass 2: Enhance entries for page revisions with references to the previous revision
+        * (rc_last_oldid, rc_new etc.) and size differences (rc_old_len, rc_new_len).
         */
        private function rebuildRecentChangesTablePass2() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                list( $recentchanges, $revision ) = $dbw->tableNamesN( 'recentchanges', 'revision' );
 
                $this->output( "Updating links and size differences...\n" );
@@ -167,11 +166,10 @@ class RebuildRecentchanges extends Maintenance {
        }
 
        /**
-        * Rebuild pass 3
-        * DOCUMENT ME!
+        * Rebuild pass 3: Insert `recentchanges` entries for action logs.
         */
        private function rebuildRecentChangesTablePass3() {
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $this->output( "Loading from user, page, and logging tables...\n" );
 
@@ -221,13 +219,12 @@ class RebuildRecentchanges extends Maintenance {
        }
 
        /**
-        * Rebuild pass 4
-        * DOCUMENT ME!
+        * Rebuild pass 4: Mark bot and autopatrolled entries.
         */
        private function rebuildRecentChangesTablePass4() {
                global $wgUseRCPatrol;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                list( $recentchanges, $usergroups, $user ) =
                        $dbw->tableNamesN( 'recentchanges', 'user_groups', 'user' );
index e29d89e..e8d59bc 100644 (file)
@@ -51,12 +51,11 @@ class RebuildTextIndex extends Maintenance {
 
        public function execute() {
                // Shouldn't be needed for Postgres
-               $this->db = wfGetDB( DB_MASTER );
+               $this->db = $this->getDB( DB_MASTER );
                if ( $this->db->getType() == 'postgres' ) {
                        $this->error( "This script is not needed when using Postgres.\n", true );
                }
 
-               $this->db = wfGetDB( DB_MASTER );
                if ( $this->db->getType() == 'sqlite' ) {
                        if ( !DatabaseSqlite::getFulltextSearchModule() ) {
                                $this->error( "Your version of SQLite module for PHP doesn't "
index 8b852e3..6bc72ec 100644 (file)
@@ -47,7 +47,7 @@ class RefreshFileHeaders extends Maintenance {
                $end = str_replace( ' ', '_', $this->getOption( 'end', '' ) ); // page on img_name
 
                $count = 0;
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                do {
                        $conds = array( "img_name > {$dbr->addQuotes( $start )}" );
                        if ( strlen( $end ) ) {
index 831118c..4f2341c 100644 (file)
@@ -95,7 +95,7 @@ class RefreshImageMetadata extends Maintenance {
                $leftAlone = 0;
                $error = 0;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                if ( $this->mBatchSize <= 0 ) {
                        $this->error( "Batch size is too low...", 12 );
                }
index ed16805..a0cd6a9 100644 (file)
@@ -76,7 +76,7 @@ class RefreshLinks extends Maintenance {
                global $wgParser;
 
                $reportingInterval = 100;
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                if ( $start === null ) {
                        $start = 1;
@@ -192,7 +192,7 @@ class RefreshLinks extends Maintenance {
         */
        private function fixRedirect( $id ) {
                $page = WikiPage::newFromID( $id );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                if ( $page === null ) {
                        // This page doesn't exist (any more)
@@ -262,7 +262,7 @@ class RefreshLinks extends Maintenance {
        ) {
                wfWaitForSlaves();
                $this->output( "Deleting illegal entries from the links tables...\n" );
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                do {
                        // Find the start of the next chunk. This is based only
                        // on existent page_ids.
@@ -302,8 +302,8 @@ class RefreshLinks extends Maintenance {
         * @param int $batchSize The size of deletion batches
         */
        private function dfnCheckInterval( $start = null, $end = null, $batchSize = 100 ) {
-               $dbw = wfGetDB( DB_MASTER );
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbw = $this->getDB( DB_MASTER );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $linksTables = array( // table name => page_id field
                        'pagelinks' => 'pl_from',
index 90dc622..7937dd0 100644 (file)
@@ -45,7 +45,7 @@ class RemoveUnusedAccounts extends Maintenance {
                # Do an initial scan for inactive accounts and report the result
                $this->output( "Checking for unused user accounts...\n" );
                $del = array();
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $res = $dbr->select( 'user', array( 'user_id', 'user_name', 'user_touched' ), '', __METHOD__ );
                if ( $this->hasOption( 'ignore-groups' ) ) {
                        $excludedGroups = explode( ',', $this->getOption( 'ignore-groups' ) );
@@ -76,7 +76,7 @@ class RemoveUnusedAccounts extends Maintenance {
                # If required, go back and delete each marked account
                if ( $count > 0 && $this->hasOption( 'delete' ) ) {
                        $this->output( "\nDeleting unused accounts..." );
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->delete( 'user', array( 'user_id' => $del ), __METHOD__ );
                        $dbw->delete( 'user_groups', array( 'ug_user' => $del ), __METHOD__ );
                        $dbw->delete( 'user_former_groups', array( 'ufg_user' => $del ), __METHOD__ );
@@ -107,7 +107,7 @@ class RemoveUnusedAccounts extends Maintenance {
         * @return bool
         */
        private function isInactiveAccount( $id, $master = false ) {
-               $dbo = wfGetDB( $master ? DB_MASTER : DB_SLAVE );
+               $dbo = $this->getDB( $master ? DB_MASTER : DB_SLAVE );
                $checks = array(
                        'revision' => 'rev',
                        'archive' => 'ar',
@@ -117,7 +117,7 @@ class RemoveUnusedAccounts extends Maintenance {
                );
                $count = 0;
 
-               $dbo->begin( __METHOD__ );
+               $this->beginTransaction( $dbo, __METHOD__ );
                foreach ( $checks as $table => $fprefix ) {
                        $conds = array( $fprefix . '_user' => $id );
                        $count += (int)$dbo->selectField( $table, 'COUNT(*)', $conds, __METHOD__ );
@@ -126,7 +126,7 @@ class RemoveUnusedAccounts extends Maintenance {
                $conds = array( 'log_user' => $id, 'log_type != ' . $dbo->addQuotes( 'newusers' ) );
                $count += (int)$dbo->selectField( 'logging', 'COUNT(*)', $conds, __METHOD__ );
 
-               $dbo->commit( __METHOD__ );
+               $this->commitTransaction( $dbo, __METHOD__ );
 
                return $count == 0;
        }
index ed9d1f5..2772f04 100644 (file)
@@ -71,7 +71,7 @@ class RenameDbPrefix extends Maintenance {
                $this->output( "Renaming DB prefix for tables of $wgDBname from '$old' to '$new'\n" );
                $count = 0;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $res = $dbw->query( "SHOW TABLES " . $dbw->buildLike( $old, $dbw->anyString() ) );
                foreach ( $res as $row ) {
                        // XXX: odd syntax. MySQL outputs an oddly cased "Tables of X"
index 08be553..9c7aef2 100644 (file)
@@ -65,7 +65,7 @@ class ResetUserTokens extends Maintenance {
                }
 
                // We list user by user_id from one of the slave database
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $where = array();
                if ( $this->nullsOnly ) {
index 7be5a1f..7134453 100644 (file)
@@ -95,7 +95,7 @@ class RollbackEdits extends Maintenance {
         * @return array
         */
        private function getRollbackTitles( $user ) {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $titles = array();
                $results = $dbr->select(
                        array( 'page', 'revision' ),
index af88905..3fd9e02 100644 (file)
@@ -45,7 +45,7 @@ class BatchedQueryRunner extends Maintenance {
 
                $query = $this->getArg();
                $n = 1;
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                do {
                        $this->output( "Batch $n: " );
                        $n++;
index 370d14e..56cc573 100644 (file)
@@ -53,7 +53,7 @@ class ShowSiteStats extends Maintenance {
                );
 
                // Get cached stats from slave database
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $stats = $dbr->selectRow( 'site_stats', '*', '', __METHOD__ );
 
                // Get maximum size for each column
index b11f1c8..96a8a38 100644 (file)
@@ -59,7 +59,7 @@ class SqliteMaintenance extends Maintenance {
                        return;
                }
 
-               $this->db = wfGetDB( DB_MASTER );
+               $this->db = $this->getDB( DB_MASTER );
 
                if ( $this->db->getType() != 'sqlite' ) {
                        $this->error( "This maintenance script requires a SQLite database.\n" );
index 16c676d..b27b111 100644 (file)
@@ -151,7 +151,7 @@ class CompressOld extends Maintenance {
        private function compressOldPages( $start = 0, $extdb = '' ) {
                $chunksize = 50;
                $this->output( "Starting from old_id $start...\n" );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                do {
                        $res = $dbw->select(
                                'text',
@@ -192,7 +192,7 @@ class CompressOld extends Maintenance {
                        # print "Already compressed row {$row->old_id}\n";
                        return false;
                }
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $flags = $row->old_flags ? "{$row->old_flags},gzip" : "gzip";
                $compress = gzdeflate( $row->old_text );
 
@@ -237,8 +237,8 @@ class CompressOld extends Maintenance {
        ) {
                $loadStyle = self::LS_CHUNKED;
 
-               $dbr = wfGetDB( DB_SLAVE );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbr = $this->getDB( DB_SLAVE );
+               $dbw = $this->getDB( DB_MASTER );
 
                # Set up external storage
                if ( $extdb != '' ) {
@@ -359,7 +359,7 @@ class CompressOld extends Maintenance {
 
                                $chunk = new ConcatenatedGzipHistoryBlob();
                                $stubs = array();
-                               $dbw->begin( __METHOD__ );
+                               $this->beginTransaction( $dbw, __METHOD__ );
                                $usedChunk = false;
                                $primaryOldid = $revs[$i]->rev_text_id;
 
@@ -463,7 +463,7 @@ class CompressOld extends Maintenance {
                                }
                                # Done, next
                                $this->output( "/" );
-                               $dbw->commit( __METHOD__ );
+                               $this->commitTransaction( $dbw, __METHOD__ );
                                $i += $thisChunkSize;
                                wfWaitForSlaves();
                        }
index f12bbd1..dcb76e3 100644 (file)
@@ -36,7 +36,7 @@ class DumpRev extends Maintenance {
        }
 
        public function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                $row = $dbr->selectRow(
                        array( 'text', 'revision' ),
                        array( 'old_flags', 'old_text' ),
index dd4cd54..e926f56 100644 (file)
@@ -42,8 +42,8 @@ class FixBug20757 extends Maintenance {
        }
 
        function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
-               $dbw = wfGetDB( DB_MASTER );
+               $dbr = $this->getDB( DB_SLAVE );
+               $dbw = $this->getDB( DB_MASTER );
 
                $dryRun = $this->getOption( 'dry-run' );
                if ( $dryRun ) {
@@ -213,7 +213,7 @@ class FixBug20757 extends Maintenance {
 
                                if ( !$dryRun ) {
                                        // Reset the text row to point to the original copy
-                                       $dbw->begin( __METHOD__ );
+                                       $this->beginTransaction( $dbw, __METHOD__ );
                                        $dbw->update(
                                                'text',
                                                // SET
@@ -241,7 +241,7 @@ class FixBug20757 extends Maintenance {
                                                ),
                                                __METHOD__
                                        );
-                                       $dbw->commit( __METHOD__ );
+                                       $this->commitTransaction( $dbw, __METHOD__ );
                                        $this->waitForSlaves();
                                }
 
@@ -283,7 +283,7 @@ class FixBug20757 extends Maintenance {
                                unset( $this->mapCache[$key] );
                        }
 
-                       $dbr = wfGetDB( DB_SLAVE );
+                       $dbr = $this->getDB( DB_SLAVE );
                        $map = array();
                        $res = $dbr->select( 'revision',
                                array( 'rev_id', 'rev_text_id' ),
index c5213ad..b1bf95b 100644 (file)
@@ -43,7 +43,7 @@ class OrphanStats extends Maintenance {
        }
 
        public function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
                if ( !$dbr->tableExists( 'blob_orphans' ) ) {
                        $this->error( "blob_orphans doesn't seem to exist, need to run trackBlobs.php first", true );
                }
index f7907ad..7386df8 100644 (file)
@@ -58,6 +58,7 @@ class RecompressTracked {
        public $orphanBatchSize = 1000;
        public $reportingInterval = 10;
        public $numProcs = 1;
+       public $numBatches = 0;
        public $useDiff, $pageBlobClass, $orphanBlobClass;
        public $slavePipes, $slaveProcs, $prevSlaveId;
        public $copyOnly = false;
@@ -195,7 +196,7 @@ class RecompressTracked {
 
                        return false;
                }
-               $row = $dbr->selectRow( 'blob_tracking', '*', false, __METHOD__ );
+               $row = $dbr->selectRow( 'blob_tracking', '*', '', __METHOD__ );
                if ( !$row ) {
                        $this->info( "Warning: blob_tracking table contains no rows, skipping this wiki." );
 
@@ -228,7 +229,7 @@ class RecompressTracked {
 
                $this->slavePipes = $this->slaveProcs = array();
                for ( $i = 0; $i < $this->numProcs; $i++ ) {
-                       $pipes = false;
+                       $pipes = array();
                        $spec = array(
                                array( 'pipe', 'r' ),
                                array( 'file', 'php://stdout', 'w' ),
@@ -340,10 +341,10 @@ class RecompressTracked {
                                break;
                        }
                        foreach ( $res as $row ) {
+                               $startId = $row->bt_page;
                                $this->dispatch( 'doPage', $row->bt_page );
                                $i++;
                        }
-                       $startId = $row->bt_page;
                        $this->report( 'pages', $i, $numPages );
                }
                $this->report( 'pages', $i, $numPages );
@@ -413,6 +414,7 @@ class RecompressTracked {
                        }
                        $ids = array();
                        foreach ( $res as $row ) {
+                               $startId = $row->bt_text_id;
                                $ids[] = $row->bt_text_id;
                                $i++;
                        }
@@ -431,7 +433,6 @@ class RecompressTracked {
                                call_user_func_array( array( $this, 'dispatch' ), $args );
                        }
 
-                       $startId = $row->bt_text_id;
                        $this->report( 'orphans', $i, $numOrphans );
                }
                $this->report( 'orphans', $i, $numOrphans );
@@ -513,6 +514,7 @@ class RecompressTracked {
 
                        $lastTextId = 0;
                        foreach ( $res as $row ) {
+                               $startId = $row->bt_text_id;
                                if ( $lastTextId == $row->bt_text_id ) {
                                        // Duplicate (null edit)
                                        continue;
@@ -533,7 +535,6 @@ class RecompressTracked {
                                        wfWaitForSlaves();
                                }
                        }
-                       $startId = $row->bt_text_id;
                }
 
                $this->debug( "$titleText: committing blob with " . $trx->getSize() . " items" );
@@ -611,12 +612,12 @@ class RecompressTracked {
                        }
                        $this->debug( 'Incomplete: ' . $res->numRows() . ' rows' );
                        foreach ( $res as $row ) {
+                               $startId = $row->bt_text_id;
                                $this->moveTextRow( $row->bt_text_id, $row->bt_new_url );
                                if ( $row->bt_text_id % 10 == 0 ) {
                                        wfWaitForSlaves();
                                }
                        }
-                       $startId = $row->bt_text_id;
                }
        }
 
@@ -693,8 +694,10 @@ class RecompressTracked {
  * Class to represent a recompression operation for a single CGZ blob
  */
 class CgzCopyTransaction {
+       /** @var RecompressTracked */
        public $parent;
        public $blobClass;
+       /** @var ConcatenatedGzipHistoryBlob */
        public $cgz;
        public $referrers;
 
@@ -787,7 +790,8 @@ class CgzCopyTransaction {
                                // All have been moved already
                                if ( $originalCount > 1 ) {
                                        // This is suspcious, make noise
-                                       $this->critical( "Warning: concurrent operation detected, are there two conflicting " .
+                                       $this->parent->critical(
+                                               "Warning: concurrent operation detected, are there two conflicting " .
                                                "processes running, doing the same job?" );
                                }
 
index e33057f..e156efe 100644 (file)
@@ -23,7 +23,7 @@ require_once __DIR__ . '/../Maintenance.php';
 
 class StorageTypeStats extends Maintenance {
        function execute() {
-               $dbr = wfGetDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_SLAVE );
 
                $endId = $dbr->selectField( 'text', 'MAX(old_id)', false, __METHOD__ );
                if ( !$endId ) {
index f7ec662..148a9d1 100644 (file)
@@ -46,7 +46,7 @@ if ( isset( $options['limit'] ) ) {
 }
 $type = isset( $options['type'] ) ? $options['type'] : 'ConcatenatedGzipHistoryBlob';
 
-$dbr = wfGetDB( DB_SLAVE );
+$dbr = $this->getDB( DB_SLAVE );
 $res = $dbr->select(
        array( 'page', 'revision', 'text' ),
        '*',
index 1ad9c7e..eac7b3f 100644 (file)
@@ -7,7 +7,7 @@ require_once __DIR__ . '/Maintenance.php';
 class TidyUpBug37714 extends Maintenance {
        public function execute() {
                // Search for all log entries which are about changing the visability of other log entries.
-               $result = wfGetDB( DB_SLAVE )->select(
+               $result = $this->getDB( DB_SLAVE )->select(
                        'logging',
                        array( 'log_id', 'log_params' ),
                        array(
@@ -22,7 +22,7 @@ class TidyUpBug37714 extends Maintenance {
                foreach ( $result as $row ) {
                        $paramLines = explode( "\n", $row->log_params );
                        $ids = explode( ',', $paramLines[0] ); // Array dereferencing is PHP >= 5.4 :(
-                       $result = wfGetDB( DB_SLAVE )->select( // Work out what log entries were changed here.
+                       $result = $this->getDB( DB_SLAVE )->select( // Work out what log entries were changed here.
                                'logging',
                                'log_type',
                                array( 'log_id' => $ids ),
@@ -33,7 +33,7 @@ class TidyUpBug37714 extends Maintenance {
                                // If there's only one type, the target title can be set to include it.
                                $logTitle = SpecialPage::getTitleFor( 'Log', $result->current()->log_type )->getText();
                                $this->output( 'Set log_title to "' . $logTitle . '" for log entry ' . $row->log_id . ".\n" );
-                               wfGetDB( DB_MASTER )->update(
+                               $this->getDB( DB_MASTER )->update(
                                        'logging',
                                        array( 'log_title' => $logTitle ),
                                        array( 'log_id' => $row->log_id ),
index 452b53c..eeaf9c8 100755 (executable)
@@ -139,7 +139,7 @@ class UpdateMediaWiki extends Maintenance {
 
                # Attempt to connect to the database as a privileged user
                # This will vomit up an error if there are permissions problems
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
 
                $this->output( "Going to run database updates for " . wfWikiID() . "\n" );
                if ( $db->getType() === 'sqlite' ) {
index 55f535d..9537a79 100644 (file)
@@ -44,9 +44,9 @@ class UpdateArticleCount extends Maintenance {
                $this->output( "Counting articles..." );
 
                if ( $this->hasOption( 'use-master' ) ) {
-                       $dbr = wfGetDB( DB_MASTER );
+                       $dbr = $this->getDB( DB_MASTER );
                } else {
-                       $dbr = wfGetDB( DB_SLAVE, 'vslow' );
+                       $dbr = $this->getDB( DB_SLAVE, 'vslow' );
                }
                $counter = new SiteStatsInit( $dbr );
                $result = $counter->articles();
@@ -54,7 +54,7 @@ class UpdateArticleCount extends Maintenance {
                $this->output( "found {$result}.\n" );
                if ( $this->hasOption( 'update' ) ) {
                        $this->output( "Updating site statistics table... " );
-                       $dbw = wfGetDB( DB_MASTER );
+                       $dbw = $this->getDB( DB_MASTER );
                        $dbw->update(
                                'site_stats',
                                array( 'ss_good_articles' => $result ),
index 5cf8afa..bb75314 100644 (file)
@@ -141,7 +141,7 @@ TEXT;
                        $this->output( " processing..." );
 
                        if ( !$dryRun ) {
-                               $dbw->begin( __METHOD__ );
+                               $this->beginTransaction( $dbw, __METHOD__ );
                        }
                        foreach ( $res as $row ) {
                                $title = Title::newFromRow( $row );
@@ -193,7 +193,7 @@ TEXT;
                                }
                        }
                        if ( !$dryRun ) {
-                               $dbw->commit( __METHOD__ );
+                               $this->commitTransaction( $dbw, __METHOD__ );
                        }
 
                        $count += $res->numRows();
index 796cedd..5c21b40 100644 (file)
@@ -51,7 +51,7 @@ class UpdateDoubleWidthSearch extends Maintenance {
        public function execute() {
                $maxLockTime = $this->getOption( 'l', 20 );
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                if ( $dbw->getType() !== 'mysql' ) {
                        $this->error( "This change is only needed on MySQL, quitting.\n", true );
                }
index 5b5cc04..ebfffe4 100644 (file)
@@ -40,7 +40,7 @@ class UpdateRestrictions extends Maintenance {
        }
 
        public function execute() {
-               $db = wfGetDB( DB_MASTER );
+               $db = $this->getDB( DB_MASTER );
                if ( !$db->tableExists( 'page_restrictions' ) ) {
                        $this->error( "page_restrictions table does not exist", true );
                }
index 68a51bd..18edecc 100644 (file)
@@ -96,7 +96,7 @@ class UpdateSearchIndex extends Maintenance {
 
                $wgDisableSearchUpdate = false;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
                $recentchanges = $dbw->tableName( 'recentchanges' );
 
                $this->output( "Updating searchindex between $start and $end\n" );
index c800664..8b24b90 100644 (file)
@@ -42,7 +42,7 @@ class UpdateSpecialPages extends Maintenance {
        public function execute() {
                global $wgQueryCacheLimit, $wgDisableQueryPageUpdate;
 
-               $dbw = wfGetDB( DB_MASTER );
+               $dbw = $this->getDB( DB_MASTER );
 
                $this->doSpecialPageCacheUpdates( $dbw );
 
diff --git a/maintenance/waitForSlave.php b/maintenance/waitForSlave.php
deleted file mode 100644 (file)
index 50665ef..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-<?php
-/**
- * Wait for the slaves to catch up to the master position.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- * @see wfWaitForSlaves()
- */
-
-require_once __DIR__ . '/Maintenance.php';
-
-/**
- * Maintenance script to wait for the slaves to catch up to the master position.
- *
- * @ingroup Maintenance
- */
-class WaitForSlave extends Maintenance {
-       public function execute() {
-               wfWaitForSlaves();
-       }
-}
-
-$maintClass = "WaitForSlave";
-require_once RUN_MAINTENANCE_IF_MAIN;
index 37272a0..e0c10f8 100644 (file)
@@ -72,7 +72,7 @@ class WrapOldPasswords extends Maintenance {
 
                $minUserId = 0;
                do {
-                       $dbw->begin();
+                       $this->beginTransaction( $dbw, __METHOD__ );
 
                        $res = $dbw->select( 'user',
                                array( 'user_id', 'user_name', 'user_password' ),
@@ -112,7 +112,7 @@ class WrapOldPasswords extends Maintenance {
                                $minUserId = $row->user_id;
                        }
 
-                       $dbw->commit();
+                       $this->commitTransaction( $dbw, __METHOD__ );
 
                        // Clear memcached so old passwords are wiped out
                        foreach ( $updateUsers as $user ) {
index 84df938..74eaac5 100644 (file)
@@ -15,9 +15,9 @@
     "grunt-jscs": "2.5.0",
     "grunt-jsonlint": "1.0.7",
     "grunt-karma": "0.12.1",
-    "karma": "0.13.10",
-    "karma-chrome-launcher": "0.2.0",
-    "karma-firefox-launcher": "0.1.6",
+    "karma": "0.13.19",
+    "karma-chrome-launcher": "0.2.2",
+    "karma-firefox-launcher": "0.1.7",
     "karma-qunit": "0.1.5",
     "qunitjs": "1.18.0"
   }
index 376e582..38c7aaa 100644 (file)
--- a/phpcs.xml
+++ b/phpcs.xml
        <rule ref="PSR2.Methods.MethodDeclaration.Underscore">
                <exclude-pattern>*/includes/StubObject.php</exclude-pattern>
        </rule>
+       <rule ref="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures">
+               <severity>0</severity>
+       </rule>
+       <rule ref="Generic.ControlStructures.InlineControlStructure.NotAllowed">
+               <severity>0</severity>
+       </rule>
        <exclude-pattern>node_modules</exclude-pattern>
        <exclude-pattern>vendor</exclude-pattern>
        <exclude-pattern>extensions</exclude-pattern>
        <exclude-pattern>skins</exclude-pattern>
+       <exclude-pattern>.git</exclude-pattern>
 </ruleset>
index ad2f12c..987b97a 100644 (file)
@@ -1186,6 +1186,7 @@ return array(
                ),
                'dependencies' => array(
                        'oojs-ui',
+                       'mediawiki.Title',
                        'mediawiki.user',
                        'mediawiki.Upload',
                        'mediawiki.jqueryMsg',
@@ -1194,7 +1195,9 @@ return array(
                        'upload-form-label-select-file',
                        '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',
                        'upload-form-label-usage-title',
                        'upload-form-label-usage-filename',
                        'api-error-unknownerror',
@@ -1691,6 +1694,10 @@ return array(
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.block.css',
                'dependencies' => 'mediawiki.util',
        ),
+       'mediawiki.special.blocklist' => array(
+               'styles' => 'resources/src/mediawiki.special/mediawiki.special.blocklist.css',
+               'position' => 'top',
+       ),
        'mediawiki.special.changeslist' => array(
                'position' => 'top',
                'styles' => 'resources/src/mediawiki.special/mediawiki.special.changeslist.css',
index 6471516..33d9a00 100644 (file)
        height: 6px;
 }
 /* @noflip */ .tipsy-n .tipsy-arrow {
-       top: 0px;
+       top: 0;
        left: 50%;
        margin-left: -5px;
 }
 /* @noflip */ .tipsy-nw .tipsy-arrow {
-       top: 1px;
+       top: 0;
        left: 10px;
 }
 /* @noflip */ .tipsy-ne .tipsy-arrow {
-       top: 1px;
+       top: 0;
        right: 10px;
 }
 /* @noflip */ .tipsy-s .tipsy-arrow {
-       bottom: 0px;
+       bottom: 0;
        left: 50%;
        margin-left: -5px;
        background-position: bottom left;
 }
 /* @noflip */ .tipsy-sw .tipsy-arrow {
-       bottom: 0px;
+       bottom: 0;
        left: 10px;
        background-position: bottom left;
 }
 /* @noflip */ .tipsy-se .tipsy-arrow {
-       bottom: 0px;
+       bottom: 0;
        right: 10px;
        background-position: bottom left;
 }
 /* @noflip */ .tipsy-e .tipsy-arrow {
        top: 50%;
        margin-top: -5px;
-       right: 1px;
-       width: 5px;
+       right: 0;
+       width: 6px;
        height: 11px;
        background-position: top right;
 }
 /* @noflip */ .tipsy-w .tipsy-arrow {
        top: 50%;
        margin-top: -5px;
-       left: 0px;
+       left: 0;
        width: 6px;
        height: 11px;
 }
index 9a639ba..1d4d0e9 100644 (file)
                                                        .addClass( 'mw-indicator' )
                                                        .attr( 'id', mw.util.escapeId( 'mw-indicator-' + indicator.name ) )
                                                        .html( indicator[ '*' ] )
-                                                       .get( 0 )
+                                                       .get( 0 ),
+                                               // Add a whitespace between the <div>s because
+                                               // they get displayed with display: inline-block
+                                               document.createTextNode( '\n' )
                                        );
-                                       newList.push( document.createTextNode( '\n' ) );
                                } );
                                $( '.mw-indicators' ).empty().append( newList );
 
                                        );
                                }
                                if ( response.parse.categorieshtml ) {
-                                       $( '#catlinks' ).replaceWith( response.parse.categorieshtml[ '*' ] );
+                                       $content = $( $.parseHTML( response.parse.categorieshtml[ '*' ] ) );
+                                       mw.hook( 'wikipage.categories' ).fire( $content );
+                                       $( '.catlinks[data-mw="interface"]' ).replaceWith( $content );
                                }
                                if ( response.parse.templates ) {
                                        newList = [];
index d87e117..507109a 100644 (file)
 @colorGray7: #777;
 @colorGray8: #888;
 @colorGray9: #999;
-@colorGray10: #AAA;
-@colorGray11: #BBB;
-@colorGray12: #CCC;
-@colorGray13: #DDD;
-@colorGray14: #EEE;
-@colorGray15: #F9F9F9; // lightest
+@colorGray10: #aaa;
+@colorGray11: #bbb;
+@colorGray12: #ccc;
+@colorGray13: #ddd;
+@colorGray14: #eee;
+@colorGray15: #f9f9f9; // lightest
 
 // Semantic background colors
 // Blue; for contextual use of a continuing action
 @colorProgressive: #347bff;
-@colorProgressiveHighlight: #2962CC;
-@colorProgressiveActive: #2962CC;
+@colorProgressiveHighlight: #2962cc;
+@colorProgressiveActive: #2962cc;
 // Green; for contextual use of a positive finalizing action
 @colorConstructive: #00af89;
-@colorConstructiveHighlight: #008C6D;
-@colorConstructiveActive: #008C6D;
+@colorConstructiveHighlight: #008c6d;
+@colorConstructiveActive: #008c6d;
 // Orange; for contextual use of returning to a past action
-@colorRegressive: #FF5D00;
+@colorRegressive: #ff5d00;
 // Red; for contextual use of a negative action of high severity
 @colorDestructive: #d11d13;
-@colorDestructiveHighlight: #A7170F;
-@colorDestructiveActive: #A7170F;
+@colorDestructiveHighlight: #a7170f;
+@colorDestructiveActive: #a7170f;
 // Orange; for contextual use of a potentially negative action of medium severity
-@colorMediumSevere: #FF5D00;
+@colorMediumSevere: #ff5d00;
 // Yellow; for contextual use of a potentially negative action of low severity
-@colorLowSevere: #FFB50D;
+@colorLowSevere: #ffb50d;
 
 // Used in mixins to darken contextual colors by the same amount (eg. focus)
 @colorDarkenPercentage: 13.5%;
@@ -50,7 +50,7 @@
 @colorButtonTextHighlight: @colorGray7;
 @colorButtonTextActive: @colorGray7;
 @colorDisabledText: @colorGray12;
-@colorErrorText: #CC0000;
+@colorErrorText: #c00;
 
 // UI colors
 @colorFieldBorder: @colorGray12;
@@ -72,3 +72,7 @@
 // Icon related variables
 @iconSize: 1.5em;
 @iconGutterWidth: 1em;
+
+// Form input sizes
+@checkboxSize: 2em;
+@radioSize: 2em;
index 113fb00..c51a07a 100644 (file)
@@ -17,7 +17,9 @@
         * Post a message (with subject and body) to a talk page.
         *
         * @abstract
-        * @param {string} subject Subject/topic title; plaintext only (no wikitext or HTML)
+        * @param {string} subject Subject/topic title.  The amount of wikitext supported is
+        *   implementation-specific. It is recommended to only use basic wikilink syntax for
+        *   maximum compatibility.
         * @param {string} body Body, as wikitext.  Signature code will automatically be added
         *   by MessagePosters that require one, unless the message already contains the string
         *   ~~~.
index 69655a6..68fb2aa 100644 (file)
@@ -1,52 +1,54 @@
-/*global OO*/
+/*global OO */
 ( function ( mw, $ ) {
        /**
-        * This is a factory for MessagePoster objects, which allows a pluggable to way to script leaving a
-        * talk page message.
+        * Factory for MessagePoster objects. This provides a pluggable to way to script the action
+        * of adding a message to someone's talk page.
         *
         * @class mw.messagePoster.factory
         * @singleton
         */
-       function MwMessagePosterFactory() {
+       function MessagePosterFactory() {
                this.contentModelToClass = {};
        }
 
-       OO.initClass( MwMessagePosterFactory );
+       OO.initClass( MessagePosterFactory );
 
        // Note: This registration scheme is currently not compatible with LQT, since that doesn't
-       // have its own content model, just islqttalkpage.  LQT pages will be passed to the wikitext
+       // have its own content model, just islqttalkpage. LQT pages will be passed to the wikitext
        // MessagePoster.
        /**
-        * Registers a MessagePoster subclass for a given content model.
+        * Register a MessagePoster subclass for a given content model.
         *
         * @param {string} contentModel Content model of pages this MessagePoster can post to
-        * @param {Function} messagePosterConstructor Constructor for MessagePoster
+        * @param {Function} constructor Constructor of a MessagePoster subclass
         */
-       MwMessagePosterFactory.prototype.register = function ( contentModel, messagePosterConstructor ) {
+       MessagePosterFactory.prototype.register = function ( contentModel, constructor ) {
                if ( this.contentModelToClass[ contentModel ] !== undefined ) {
-                       throw new Error( 'The content model \'' + contentModel + '\' is already registered.' );
+                       throw new Error( 'Content model "' + contentModel + '" is already registered' );
                }
 
-               this.contentModelToClass[ contentModel ] = messagePosterConstructor;
+               this.contentModelToClass[ contentModel ] = constructor;
        };
 
        /**
-        * Unregisters a given content model
-        * This is exposed for testing and should not normally be needed.
+        * Unregister a given content model.
+        * This is exposed for testing and should not normally be used.
         *
         * @param {string} contentModel Content model to unregister
         */
-       MwMessagePosterFactory.prototype.unregister = function ( contentModel ) {
+       MessagePosterFactory.prototype.unregister = function ( contentModel ) {
                delete this.contentModelToClass[ contentModel ];
        };
 
        /**
-        * Creates a MessagePoster, given a title.  A promise for this is returned.
-        * This works by determining the content model, then loading the corresponding
-        * module (which will register the MessagePoster class), and finally constructing it.
+        * Create a MessagePoster for given a title.
         *
-        * This does not require the message and should be called as soon as possible, so it does the
-        * API and ResourceLoader requests in the background.
+        * A promise for this is returned. It works by determining the content model, then loading
+        * the corresponding module (which registers the MessagePoster class), and finally constructing
+        * an object for the given title.
+        *
+        * This does not require the message and should be called as soon as possible, so that the
+        * API and ResourceLoader requests run in the background.
         *
         * @param {mw.Title} title Title that will be posted to
         * @param {string} [apiUrl] api.php URL if the title is on another wiki
         *   - error Error explanation
         *   - details Further error details
         */
-       MwMessagePosterFactory.prototype.create = function ( title, apiUrl ) {
-               var pageId, page, contentModel, moduleName, api,
-                       factory = this;
-
-               if ( apiUrl ) {
-                       api = new mw.ForeignApi( apiUrl );
-               } else {
-                       api = new mw.Api();
-               }
+       MessagePosterFactory.prototype.create = function ( title, apiUrl ) {
+               var factory = this,
+                       api = apiUrl ? new mw.ForeignApi( apiUrl ) : new mw.Api();
 
                return api.get( {
                        action: 'query',
                        prop: 'info',
                        indexpageids: true,
                        titles: title.getPrefixedDb()
-               } ).then( function ( result ) {
-                       if ( result.query.pageids && result.query.pageids.length > 0 ) {
-                               pageId = result.query.pageids[ 0 ];
-                               page = result.query.pages[ pageId ];
-
-                               contentModel = page.contentmodel;
-                               moduleName = 'mediawiki.messagePoster.' + contentModel;
-                               return mw.loader.using( moduleName ).then( function () {
-                                       return factory.createForContentModel(
-                                               contentModel,
-                                               title,
-                                               api
-                                       );
-                               }, function () {
-                                       return $.Deferred().reject( 'failed-to-load-module', 'Failed to load the \'' + moduleName + '\' module' );
-                               } );
-                       } else {
+               } ).then( function ( data ) {
+                       var pageId, page, contentModel, moduleName;
+                       if ( !data.query.pageids[ 0 ] ) {
                                return $.Deferred().reject( 'unexpected-response', 'Unexpected API response' );
                        }
-               }, function ( errorCode, details ) {
-                       return $.Deferred().reject( 'content-model-query-failed', errorCode, details );
-               } ).promise();
+                       pageId = data.query.pageids[ 0 ];
+                       page = data.query.pages[ pageId ];
+
+                       contentModel = page.contentmodel;
+                       moduleName = 'mediawiki.messagePoster.' + contentModel;
+                       return mw.loader.using( moduleName ).then( function () {
+                               return factory.createForContentModel(
+                                       contentModel,
+                                       title,
+                                       api
+                               );
+                       }, function () {
+                               return $.Deferred().reject( 'failed-to-load-module', 'Failed to load "' + moduleName + '"' );
+                       } );
+               }, function ( error, details ) {
+                       return $.Deferred().reject( 'content-model-query-failed', error, details );
+               } );
        };
 
        /**
         * Creates a MessagePoster instance, given a title and content model
         *
         * @private
-        *
         * @param {string} contentModel Content model of title
         * @param {mw.Title} title Title being posted to
         * @param {mw.Api} api mw.Api instance that the instance should use
         * @return {mw.messagePoster.MessagePoster}
         *
         */
-       MwMessagePosterFactory.prototype.createForContentModel = function ( contentModel, title, api ) {
+       MessagePosterFactory.prototype.createForContentModel = function ( contentModel, title, api ) {
                return new this.contentModelToClass[ contentModel ]( title, api );
        };
 
        mw.messagePoster = {
-               factory: new MwMessagePosterFactory()
+               factory: new MessagePosterFactory()
        };
 }( mediaWiki, jQuery ) );
diff --git a/resources/src/mediawiki.special/mediawiki.special.blocklist.css b/resources/src/mediawiki.special/mediawiki.special.blocklist.css
new file mode 100644 (file)
index 0000000..b7513b6
--- /dev/null
@@ -0,0 +1,4 @@
+.mw-htmlform-flatlist-item {\r
+       /* FIXME: There should be an option in OOUI to do that */\r
+       display: inline-block !important;\r
+}
\ No newline at end of file
index f0fb7b9..5bb69b8 100644 (file)
@@ -11,7 +11,8 @@
                color: lighten( @mainColor, @colorLightenPercentage );
        }
        // Focus and active states
-       &:focus, &:active {
+       &:focus,
+       &:active {
                color: darken( @mainColor, @colorDarkenPercentage );
                outline: none; // outline fix
        }
@@ -74,7 +75,8 @@ Styleguide 6.2.1.
        &:hover {
                color: @mainColor;
        }
-       &:focus, &:active {
+       &:focus,
+       &:active {
                color: darken( @mainColor, @colorDarkenPercentage );
        }
 }
index 600b771..4ffaeee 100644 (file)
        display: inline-block;
        padding: .5em 1em;
        margin: 0;
-       .box-sizing(border-box);
+       .box-sizing( border-box );
 
        // Disable weird iOS styling
        -webkit-appearance: none;
 
-       // IE6/IE7 hack
-       // http://stackoverflow.com/a/5838575/365238
+       // IE 6 & 7 hack
+       // https://stackoverflow.com/a/5838575/365238
        *display: inline;
        zoom: 1;
 
        // Container styling
-       .button-colors(#FFF, #CCC, #777);
+       .button-colors( #fff, #ccc, #777 );
        border-radius: @borderRadius;
        min-width: 4em;
 
        // Styleguide 2.1.1.
        &.mw-ui-progressive,
        &.mw-ui-primary {
-               .button-colors(@colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive);
+               .button-colors( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
 
                &.mw-ui-quiet {
-                       .button-colors-quiet(@colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive);
+                       .button-colors-quiet( @colorProgressive, @colorProgressiveHighlight, @colorProgressiveActive );
                }
        }
 
        //
        // Styleguide 2.1.2.
        &.mw-ui-constructive {
-               .button-colors(@colorConstructive, @colorConstructiveHighlight, @colorConstructiveActive);
+               .button-colors( @colorConstructive, @colorConstructiveHighlight, @colorConstructiveActive );
 
                &.mw-ui-quiet {
-                       .button-colors-quiet(@colorConstructive, @colorConstructiveHighlight, @colorConstructiveActive);
+                       .button-colors-quiet( @colorConstructive, @colorConstructiveHighlight, @colorConstructiveActive );
                }
        }
 
        //
        // Styleguide 2.1.3.
        &.mw-ui-destructive {
-               .button-colors(@colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive);
+               .button-colors( @colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive );
 
                &.mw-ui-quiet {
-                       .button-colors-quiet(@colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive);
+                       .button-colors-quiet( @colorDestructive, @colorDestructiveHighlight, @colorDestructiveActive );
                }
        }
 
        // Styleguide 2.1.4.
        &.mw-ui-quiet {
                background: transparent;
-               border: none;
+               border: 0;
                text-shadow: none;
-               .button-colors-quiet(@colorButtonText, @colorButtonTextHighlight, @colorButtonTextActive);
+               .button-colors-quiet( @colorButtonText, @colorButtonTextHighlight, @colorButtonTextActive );
 
                &:hover,
                &:focus {
@@ -269,8 +269,8 @@ a.mw-ui-button {
                border-bottom-left-radius: @borderRadius;
        }
 
-       &:not(:first-child) {
-               border-left: none;
+       &:not( :first-child ) {
+               border-left: 0;
        }
 
        &:last-child{
index bd5dd4a..d44e5d7 100644 (file)
@@ -5,8 +5,8 @@
 //
 // Styling checkboxes in a way that works cross browser is a tricky problem to solve.
 // In MediaWiki UI put a checkbox and label inside a mw-ui-checkbox div.
-// This renders in all browsers except IE6-8 which do not support the :checked selector;
-// these are kept backwards-compatible using the :not(#noop) selector.
+// This renders in all browsers except IE 6-8 which do not support the :checked selector;
+// these are kept backwards-compatible using the `:not( #noop )` selector.
 // You should give the checkbox and label matching "id" and "for" attributes, respectively.
 //
 // Markup:
        vertical-align: middle;
 }
 
-@checkboxSize: 2em;
-
 // We use the not selector to cancel out styling on IE 8 and below
-// We also disable this styling on javascript disabled devices. This fixes the issue with
+// We also disable this styling on JavaScript disabled devices. This fixes the issue with
 // Opera Mini where checking/unchecking doesn't apply styling but potentially leaves other
 // more capable browsers with unstyled checkboxes.
-.client-js .mw-ui-checkbox:not(#noop) {
+.client-js .mw-ui-checkbox:not( #noop ) {
        // Position relatively so we can make use of absolute pseudo elements
        position: relative;
        display: table;
@@ -62,8 +60,7 @@
                height: @checkboxSize;
                // This is needed for Firefox mobile (See bug 71750 to workaround default Firefox stylesheet)
                max-width: none;
-               margin: 0;
-               margin-right: 0.4em;
+               margin: 0 0.4em 0 0;
                display: table-cell;
 
                & + label {
                // the pseudo before element of the label after the checkbox now looks like a checkbox
                & + label::before {
                        content: '';
-                       cursor: pointer;
-                       .box-sizing(border-box);
+                       background-color: #fff;
+                       .background-image-svg( 'images/checked.svg', 'images/checked.png' );
+                       background-position: center center;
+                       background-origin: border-box;
+                       background-repeat: no-repeat;
+                       .background-size( @checkboxSize - 0.2em, @checkboxSize - 0.2em );
+                       background-size: 0 0;
+                       .box-sizing( border-box );
                        position: absolute;
+                       // align the checkbox to middle of the text
+                       top: 50%;
                        left: 0;
-                       border-radius: @borderRadius;
                        width: @checkboxSize;
                        height: @checkboxSize;
-                       line-height: @checkboxSize;
-                       background-color: #fff;
-                       border: 1px solid @colorGray7;
-                       // align the checkbox to middle of the text
-                       top: 50%;
                        margin-top: -1em;
-                       .background-image-svg('images/checked.svg', 'images/checked.png');
-                       .background-size( @checkboxSize - 0.2em, @checkboxSize - 0.2em );
-                       background-repeat: no-repeat;
-                       background-position: center center;
-                       background-origin: border-box;
-                       background-size: 0 0;
+                       border: 1px solid @colorGray7;
+                       border-radius: @borderRadius;
+                       line-height: @checkboxSize;
+                       cursor: pointer;
                }
 
                // when the input is checked, style the label pseudo before element that followed as a checked checkbox
 
                // disabled and checked checkboxes have a white circle
                &:disabled:checked + label::before {
-                       .background-image-svg('images/checked_disabled.svg', 'images/checked_disabled.png');
+                       .background-image-svg( 'images/checked_disabled.svg', 'images/checked_disabled.png' );
                }
        }
 }
index 6a5fa96..cc96a5c 100644 (file)
@@ -36,7 +36,7 @@
 //
 // Styleguide 5.1.
 .mw-ui-vform {
-       .box-sizing(border-box);
+       .box-sizing( border-box );
 
        width: @defaultFormWidth;
 
@@ -44,7 +44,7 @@
        select,
        .mw-ui-button {
                display: block;
-               .box-sizing(border-box);
+               .box-sizing( border-box );
                margin: 0;
                width: 100%;
        }
        // Give dropdown lists the same spacing as input fields for consistency.
        // Values taken from .agora-field-styling() in mixins/form.less
        select {
-               padding: 0.35em 0.5em 0.35em 0.5em;
+               padding: 0.35em 0.5em;
                vertical-align: middle;
        }
 
        > label {
                display: block;
-               .box-sizing(border-box);
+               .box-sizing( border-box );
                .agora-label-styling();
                width: auto;
                margin: 0 0 0.2em;
@@ -68,7 +68,7 @@
        // Override input styling just for checkboxes and radio inputs.
        input[type="radio"] {
                display: inline;
-               .box-sizing(content-box);
+               .box-sizing( content-box );
                width: auto;
        }
 
        .errorbox,
        .warningbox,
        .successbox {
-               .box-sizing(border-box);
+               .box-sizing( border-box );
                font-size: 0.9em;
                margin: 0 0 1em 0;
                padding: 0.5em;
 
        // Colours taken from those for .errorbox in shared.css
        .error {
-               color: #cc0000;
+               color: @colorErrorText;
                border: 1px solid #fac5c5;
                background-color: #fae3e3;
                text-shadow: 0 1px #fae3e3;
index c90a6b9..9b9d324 100644 (file)
@@ -2,10 +2,10 @@
 @import "mediawiki.ui/variables";
 
 // Mixins
-.mixin-mw-ui-icon-bgimage(@iconSvg, @iconPng) {
+.mixin-mw-ui-icon-bgimage( @iconSvg, @iconPng ) {
        &.mw-ui-icon {
                &:before {
-                       .background-image-svg(@iconSvg, @iconPng);
+                       .background-image-svg( @iconSvg, @iconPng );
                }
        }
 }
@@ -13,7 +13,7 @@
 // Icons
 //
 // To use icons you must be using a browser that supports pseudo elements.
-// This includes support for IE8.
+// This includes support for IE 8.
 // http://caniuse.com/#feat=css-gencontent
 //
 // For elements that are intended to have both an icon and text, browsers that
@@ -45,6 +45,7 @@
                width: @width;
                min-width: @width;
                max-width: @width;
+
                &:before {
                        left: 0;
                        right: 0;
        &.mw-ui-icon-before:before,
        &.mw-ui-icon-element:before {
                background-position: 50% 50%;
-               float: left;
-               display: block;
                background-repeat: no-repeat;
                background-size: 100% auto;
+               float: left;
+               display: block;
                min-height: @iconSize;
                content: '';
        }
index 62f0e83..d0633ae 100644 (file)
 .mw-ui-input {
        // turn off default input styling for input[type="search"] fields
        -webkit-appearance: none;
-       border: 1px solid @colorFieldBorder;
-       .box-sizing(border-box);
-       width: 100%;
-       padding: .3em .3em .3em .6em;
+       .box-sizing( border-box );
        display: block;
-       vertical-align: middle;
+       width: 100%;
+       border: 1px solid @colorFieldBorder;
        border-radius: @borderRadius;
+       padding: 0.3em 0.3em 0.3em 0.6em;
        font-family: inherit;
        font-size: inherit;
        line-height: inherit;
+       vertical-align: middle;
 
        // Placeholder text styling must be set individually for each browser @winter
        &::-webkit-input-placeholder { // webkit
index 52effd6..448390a 100644 (file)
@@ -5,8 +5,8 @@
 //
 // Styling radios in a way that works cross browser is a tricky problem to solve.
 // In MediaWiki UI put a radio and label inside a mw-ui-radio div.
-// This renders in all browsers except IE6-8 which do not support the :checked selector;
-// these are kept backwards-compatible using the :not(#noop) selector.
+// This renders in all browsers except IE 6-8 which do not support the :checked selector;
+// these are kept backwards-compatible using the `:not( #noop )` selector.
 // You should give the radio and label matching "id" and "for" attributes, respectively.
 //
 // Markup:
        vertical-align: middle;
 }
 
-@radioSize: 2em;
-
 // We use the not selector to cancel out styling on IE 8 and below.
-// We also disable this styling on javascript disabled devices. This fixes the issue with
+// We also disable this styling on JavaScript disabled devices. This fixes the issue with
 // Opera Mini where checking/unchecking doesn't apply styling but potentially leaves other
 // more capable browsers with unstyled radio buttons.
-.client-js .mw-ui-radio:not(#noop) {
+.client-js .mw-ui-radio:not( #noop ) {
        // Position relatively so we can make use of absolute pseudo elements
        position: relative;
        line-height: @radioSize;
                // the pseudo before element of the label after the radio now looks like a radio
                & + label::before {
                        content: '';
-                       cursor: pointer;
-                       .box-sizing(border-box);
+                       background-color: #fff;
+                       .background-image-svg( 'images/radio_checked.svg', 'images/radio_checked.png' );
+                       background-origin: border-box;
+                       background-position: center center;
+                       background-repeat: no-repeat;
+                       .background-size( @radioSize, @radioSize );
+                       background-size: 0 0;
+                       .box-sizing( border-box );
                        position: absolute;
                        left: 0;
-                       border-radius: 100%;
                        width: @radioSize;
                        height: @radioSize;
-                       background-color: #fff;
                        border: 1px solid @colorGray7;
-                       .background-image-svg('images/radio_checked.svg', 'images/radio_checked.png');
-                       .background-size( @radioSize, @radioSize );
-                       background-repeat: no-repeat;
-                       background-position: center center;
-                       background-origin: border-box;
-                       background-size: 0 0;
+                       border-radius: 100%;
+                       cursor: pointer;
                }
 
                // when the input is checked, style the label pseudo before element that followed as a checked radio
 
                // disabled radios have a gray background
                &:disabled + label::before {
-                       cursor: default;
                        background-color: @colorGray14;
                        border-color: @colorGray14;
+                       cursor: default;
                }
 
                // disabled and checked radios have a white circle
                &:disabled:checked + label::before {
-                       .background-image-svg('images/radio_disabled.svg', 'images/radio_disabled.png');
+                       .background-image-svg( 'images/radio_disabled.svg', 'images/radio_disabled.png' );
                }
        }
 }
index 500d42c..cc27e9e 100644 (file)
@@ -26,7 +26,7 @@ Styleguide 6.1.
 */
 
 .mw-ui-text {
-       // The selector order is like this on purpose; IE6 ignores the second selector,
+       // The selector order is like this on purpose; IE 6 ignores the second selector,
        // so we don't want to accidentally apply this color on all mw-ui-CONTEXT classes
        .mw-ui-progressive& {
                color: @colorProgressive;
index d896756..4806097 100644 (file)
@@ -43,7 +43,7 @@
                mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this )
                        .done( function () {
                                // Point the CategorySelector to the right wiki
-                               this.upload.apiPromise.done( function ( api ) {
+                               this.upload.getApi().done( function ( api ) {
                                        // If this is a ForeignApi, it will have a apiUrl, otherwise we don't need to do anything
                                        if ( api.apiUrl ) {
                                                // Can't reuse the same object, CategorySelector calls #abort on its mw.Api instance
                fieldset.addItems( [
                        new OO.ui.FieldLayout( this.filenameWidget, {
                                label: mw.msg( 'upload-form-label-infoform-name' ),
-                               align: 'top'
+                               align: 'top',
+                               help: mw.msg( 'upload-form-label-infoform-name-tooltip' )
                        } ),
                        new OO.ui.FieldLayout( this.descriptionWidget, {
                                label: mw.msg( 'upload-form-label-infoform-description' ),
-                               align: 'top'
+                               align: 'top',
+                               help: mw.msg( 'upload-form-label-infoform-description-tooltip' )
                        } ),
                        new OO.ui.FieldLayout( this.categoriesWidget, {
                                label: mw.msg( 'foreign-structured-upload-form-label-infoform-categories' ),
index 61fb59f..aa08b6c 100644 (file)
         * or to local uploads if no foreign target is configured.
         */
 
+       /**
+        * @inheritdoc
+        */
+       ForeignUpload.prototype.getApi = function () {
+               return this.apiPromise;
+       };
+
        /**
         * Override from mw.Upload to make sure the API info is found and allowed
         */
index 54f3ab6..1cd9101 100644 (file)
         */
        mw.Upload.BookletLayout.prototype.initialize = function () {
                var
-                       apiPromise,
                        booklet = this,
                        deferred = $.Deferred();
 
                this.upload = this.createUpload();
                this.setPage( 'upload' );
 
-               apiPromise = this.upload.apiPromise || $.Deferred().resolve( this.upload.api );
-               apiPromise.done( function ( api ) {
+               this.upload.getApi().done( function ( api ) {
                        // If the user can't upload anything, don't give them the option to.
                        api.getUserInfo().done( function ( userInfo ) {
                                if ( userInfo.rights.indexOf( 'upload' ) === -1 ) {
                        layout = this,
                        file = this.getFile();
 
-               this.filenameWidget.setValue( file.name );
+               this.setFilename( file.name );
+
                this.setPage( 'info' );
 
                if ( this.shouldRecordBucket ) {
                }
 
                this.upload.setFile( file );
-               // Explicitly set the filename so that the old filename isn't used in case of retry
-               this.upload.setFilenameFromFile();
+               // The original file name might contain invalid characters, so use our sanitized one
+               this.upload.setFilename( this.getFilename() );
 
                this.uploadPromise = this.upload.uploadToStash();
                this.uploadPromise.then( function () {
                        } else if ( warnings.badfilename !== undefined ) {
                                // Change the name if the current name isn't acceptable
                                // TODO This might not really be the best place to do this
-                               this.filenameWidget.setValue( warnings.badfilename );
+                               this.setFilename( warnings.badfilename );
                                return new OO.ui.Error(
                                        $( '<p>' ).msg( 'badfilename', warnings.badfilename )
                                );
                fieldset.addItems( [
                        new OO.ui.FieldLayout( this.filenameWidget, {
                                label: mw.msg( 'upload-form-label-infoform-name' ),
-                               align: 'top'
+                               align: 'top',
+                               help: mw.msg( 'upload-form-label-infoform-name-tooltip' )
                        } ),
                        new OO.ui.FieldLayout( this.descriptionWidget, {
                                label: mw.msg( 'upload-form-label-infoform-description' ),
-                               align: 'top'
+                               align: 'top',
+                               help: mw.msg( 'upload-form-label-infoform-description-tooltip' )
                        } )
                ] );
                this.infoForm = new OO.ui.FormLayout( { items: [ fieldset ] } );
         * @return {string}
         */
        mw.Upload.BookletLayout.prototype.getFilename = function () {
-               return this.filenameWidget.getValue();
+               var filename = this.filenameWidget.getValue();
+               if ( this.filenameExtension ) {
+                       filename += '.' + this.filenameExtension;
+               }
+               return filename;
+       };
+
+       /**
+        * Prefills the {@link #infoForm information form} with the given filename.
+        *
+        * @protected
+        * @param {string} filename
+        */
+       mw.Upload.BookletLayout.prototype.setFilename = function ( filename ) {
+               var title = mw.Title.newFromFileName( filename );
+
+               if ( title ) {
+                       this.filenameWidget.setValue( title.getNameText() );
+                       this.filenameExtension = mw.Title.normalizeExtension( title.getExtension() );
+               } else {
+                       // Seems to happen for files with no extension, which should fail some checks anyway...
+                       this.filenameWidget.setValue( filename );
+                       this.filenameExtension = null;
+               }
        };
 
        /**
index d80b4eb..8a74ffc 100644 (file)
 
        UP = Upload.prototype;
 
+       /**
+        * Get the mw.Api instance used by this Upload object.
+        *
+        * @return {jQuery.Promise}
+        * @return {Function} return.done
+        * @return {mw.Api} return.done.api
+        */
+       UP.getApi = function () {
+               return $.Deferred().resolve( this.api ).promise();
+       };
+
        /**
         * Set the text of the file page, to be created on file upload.
         *
index 514a3dd..d444923 100644 (file)
@@ -20,7 +20,7 @@
        function humanSize( bytes ) {
                if ( !$.isNumeric( bytes ) || bytes === 0 ) { return bytes; }
                var i = 0,
-                       units = [ '', ' kB', ' MB', ' GB', ' TB', ' PB' ];
+                       units = [ '', ' KiB', ' MiB', ' GiB', ' TiB', ' PiB' ];
 
                for ( ; bytes >= 1024; bytes /= 1024 ) { i++; }
                // Maintain one decimal for kB and above, but don't
index 9505bdd..4385a2e 100644 (file)
                        } );
                }
 
+               $nodes = $( '.catlinks[data-mw="interface"]' );
+               if ( $nodes.length ) {
+                       /**
+                        * Fired when categories are being added to the DOM
+                        *
+                        * It is encouraged to fire it before the main DOM is changed (when $content
+                        * is still detached).  However, this order is not defined either way, so you
+                        * should only rely on $content itself.
+                        *
+                        * This includes the ready event on a page load (including post-edit loads)
+                        * and when content has been previewed with LivePreview.
+                        *
+                        * @event wikipage_categories
+                        * @member mw.hook
+                        * @param {jQuery} $content The most appropriate element containing the content,
+                        *   such as .catlinks
+                        */
+                       mw.hook( 'wikipage.categories' ).fire( $nodes );
+               }
        } );
 
 }( mediaWiki, jQuery ) );
index 0ed8270..d0a3d08 100644 (file)
@@ -14,6 +14,7 @@
 # Plus any combination of these:
 #
 # cat           add category links
+#               (ignored by Parsoid, since it emits <link>s)
 # ill           add inter-language links
 #               (ignored by Parsoid, since it emits <link>s)
 # subpage       enable subpages (disabled by default)
@@ -1335,6 +1336,8 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tåg" data-mw='{"name":"tåg","attrs":{},"body":{"extsrc":"tåg"}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
 !! test
@@ -3329,14 +3332,18 @@ parsoid=wt2html,wt2wt
 <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":" [[Category:foo]]"}},"i":0}}]}'> </span><link rel="mw:PageProp/Category" href="./Category:Foo" about="#mwt1"> <!-- No pre&#x2D;wrapping -->
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
 !! test
 7b. Indent-pre and category links
 !! options
-parsoid=wt2html,wt2wt
+parsoid=wt2html
 !! wikitext
  [[Category:foo]] a
  [[Category:foo]] {{echo|b}}
-!! html
+!! html/parsoid
 <pre><link rel="mw:PageProp/Category" href="./Category:Foo"> a
  <link rel="mw:PageProp/Category" href="./Category:Foo"> <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"b"}},"i":0}}]}'>b</span></pre>
 !! end
@@ -7119,6 +7126,17 @@ Piped link with multiple pipe characters in link text
 <p><a rel="mw:WikiLink" href="Main_Page" title="Main Page">|The|Main|Page|</a></p>
 !! end
 
+!! test
+Piped link with no link text
+!! wikitext
+[[Thomas Bek (bishop of St David's)|]]
+!! html/php
+<p>[[Thomas Bek (bishop of St David's)|]]
+</p>
+!! html/parsoid
+<p>[[Thomas Bek (bishop of St David's)|]]</p>
+!! end
+
 !! test
 Broken link
 !! wikitext
@@ -10860,8 +10878,14 @@ Un-closed <includeonly>
 !! html
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize the include directives to serialize on their own line.
+## Selser will take care of preserving formatting in scenarios where they
+## intermingled with other wikitext.
 !! test
 Includes and comments at SOL
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 <!-- comment --><noinclude><!-- comment --></noinclude><!-- comment -->== hu ==
 
@@ -11042,10 +11066,14 @@ parsoid=wt2html,wt2wt
 </tbody></table>
 !!end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize the include directives to serialize on their own line.
+## Selser will take care of preserving formatting in scenarios where they
+## intermingled with other wikitext.
 !!test
 2. Table tag in SOL posn. should get reparsed correctly with valid TSR
 !!options
-parsoid=wt2html,wt2wt
+parsoid=wt2html
 !!wikitext
 <includeonly>a</includeonly>{| {{{b}}}
 |c
@@ -14245,7 +14273,7 @@ cat
 pst
 !! wikitext
 [[Category:MediaWiki User's Guide|]]
-!! html
+!! html/php
 [[Category:MediaWiki User's Guide|MediaWiki User's Guide]]
 !! end
 
@@ -14256,19 +14284,26 @@ cat
 pst
 !! wikitext
 [[Category:Foo (bar)|]]
-!! html
+!! html/php
 [[Category:Foo (bar)|Foo]]
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
 !! test
 Category with link tail
 !! options
 cat
 pst
+parsoid=wt2html
 !! wikitext
 123[[Category:Foo]]456
-!! html
+!! html/php
 123[[Category:Foo]]456
+!! html/parsoid
+<p>123<link rel="mw:PageProp/Category" href="Category:Foo"/>456</p>
 !! end
 
 !! test
@@ -14278,7 +14313,7 @@ cat
 pst
 !! wikitext
 [[Category:{{echo|Foo}}]]
-!! html
+!! html/php
 [[Category:{{echo|Foo}}]]
 !! end
 
@@ -14289,7 +14324,7 @@ cat
 pst
 !! wikitext
 [[Category:Foo|{{echo|Bar}}]]
-!! html
+!! html/php
 [[Category:Foo|{{echo|Bar}}]]
 !! end
 
@@ -14300,12 +14335,18 @@ cat
 pst
 !! wikitext
 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
-!! html
+!! html/php
 [[Category:{{echo|Foo}}|{{echo|Bar}}]]
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
 !! test
 Category / paragraph interactions
+!! options
+parsoid=wt2html
 !! wikitext
 Foo [[Category:Baz]] Bar
 
@@ -14332,7 +14373,7 @@ Bar
 [[Category:Baz]]
  {{echo|[[Category:Baz]]}}
 [[Category:Baz]]
-!! html
+!! html/php
 <p>Foo Bar
 </p><p>Foo
 Bar
@@ -14342,20 +14383,32 @@ Bar
 </p><p>Foo
 Bar
 </p>
+!! html/parsoid
+<p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar</p>
+<p>Foo <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> Bar <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz"/> <link rel="mw:PageProp/Category" href="Category:Baz" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"[[Category:Baz]]"}},"i":0}}]}'/></p>
+<link rel="mw:PageProp/Category" href="Category:Baz"/>
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
+##
 ## The whitespace on the empty line is part of the test. Please do not delete
 !! test
 1. Categories and newlines: All preceding newlines should be suppressed (courtesy bug 87)
 !! options
-parsoid=wt2html,wt2wt
+parsoid=wt2html
 !! wikitext
 This
    
 [[Category:Foo]] and this should be part of same paragraph (not an indent-pre)
    
 {{echo|[[Category:Foo]] and so should this!}}
-!! html
+!! html/php
 <p>This and this should be part of same paragraph (not an indent-pre) and so should this!
 </p>
 !! html/parsoid
@@ -14453,8 +14506,14 @@ parsoid=wt2html
 <link rel="mw:PageProp/Category" href="./Category:Foo" data-parsoid='{"stx":"simple","a":{"href":"./Category:Foo"},"sa":{"href":"Category:Foo"}}'/>
 !! end
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
 !! test
 6. Categories and newlines: migrateTrailingCategories dom pass should not migrate categories not preceded by newlines
+!! options
+parsoid=wt2html
 !! wikitext
 * a [[Category:Foo]]
 !! html/parsoid
@@ -14505,13 +14564,20 @@ parsoid
 </p>
 !! end
 
-# html2wt localizes the "Category" namespace.
-# XXX the <link> element needs an empty data-parsoid attribute, or
-# else the html2html test fails because spaces are inserted.
+# We used to, but no longer wt2wt this test since the default serializer
+# will normalize all categories to serialize on their own line.
+# This wikitext usage is going to be fairly uncommon in production and
+# selser will take care of preventing whitespace insertion if this
+# occurs in an article.
+#
+# html2html disabled for the same reason (whitespace insertion between
+# x and y).
+#
+# html2wt disabled because it localizes the "Category" namespace.
 !! test
 Link prefix/suffixes aren't applied to category links
 !! options
-parsoid=wt2html,wt2wt,html2html
+parsoid=wt2html
 language=is
 !! wikitext
 x[[Category:Foo]]y
@@ -16152,10 +16218,15 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
+## Don't expect parsoid to rt this form.
 !! test
 Parser hook: empty input using terminated empty elements
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 <tag/>
 !! html/php
@@ -16165,6 +16236,8 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
 !! test
@@ -16178,6 +16251,8 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":null}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
 !! test
@@ -16191,11 +16266,15 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
-
+## Don't expect parsoid to rt this form.
 !! test
 Parser hook: case insensitive
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 <TAG>input</TAG>
 !! html/php
@@ -16205,11 +16284,15 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
-
+## Don't expect parsoid to rt this form.
 !! test
 Parser hook: case insensitive, redux
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 <TaG>input</TAg>
 !! html/php
@@ -16219,6 +16302,8 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"input"}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
 !! test
@@ -16234,11 +16319,35 @@ array (
 )
 </pre>&lt;/tag&gt;
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{},"body":{"extsrc":"&lt;tag>"}}' data-parsoid='{}' about="#mwt2"></pre>&lt;/tag>
 !! end
 
 !! test
 Parser hook: basic arguments
 !! wikitext
+<tag width="200" height="100" depth="50" square=""></tag>
+!! html/php
+<pre>
+''
+array (
+  'width' => '200',
+  'height' => '100',
+  'depth' => '50',
+  'square' => '',
+)
+</pre>
+
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
+!! end
+
+## Don't expect parsoid to rt this form.
+!! test
+Parser hook: basic arguments, variations
+!! options
+parsoid=wt2html,html2html
+!! wikitext
 <tag width=200 height = "100" depth = '50' square></tag>
 !! html/php
 <pre>
@@ -16251,12 +16360,14 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"width":"200","height":"100","depth":"50","square":""},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
 !! test
 Parser hook: argument containing a forward slash (bug 5344)
 !! wikitext
-<tag filename='/tmp/bla'></tag>
+<tag filename="/tmp/bla"></tag>
 !! html/php
 <pre>
 ''
@@ -16265,10 +16376,15 @@ array (
 )
 </pre>
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"filename":"/tmp/bla"},"body":{"extsrc":""}}' data-parsoid='{}' about="#mwt2"></pre>
 !! end
 
+## Don't expect parsoid to rt this form.
 !! test
 Parser hook: empty input using terminated empty elements (bug 2374)
+!! options
+parsoid=wt2html,html2html
 !! wikitext
 <tag foo=bar/>text
 !! html/php
@@ -16279,6 +16395,8 @@ array (
 )
 </pre>text
 
+!! html/parsoid
+<pre typeof="mw:Extension/tag" data-mw='{"name":"tag","attrs":{"foo":"bar"},"body":null}' data-parsoid='{}' about="#mwt2"></pre>text
 !! end
 
 # </tag> should be output literally since there is no matching tag that begins it
@@ -16311,21 +16429,28 @@ array (
 Parser hook: static parser hook not inside a comment
 !! wikitext
 <statictag>hello, world</statictag>
-<statictag action=flush/>
+
+<statictag action="flush" />
 !! html/php
-<p>hello, world
+<p><br />
+hello, world
 </p>
+!! html/parsoid
+<p><span typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{},"body":{"extsrc":"hello, world"}}' data-parsoid='{}' about="#mwt2"></span></p>
+<p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt4">hello, world</p>
 !! end
 
-
 !! test
 Parser hook: static parser hook inside a comment
 !! wikitext
 <!-- <statictag>hello, world</statictag> -->
-<statictag action=flush/>
+<statictag action="flush" />
 !! html/php
 <p><br />
 </p>
+!! html/parsoid
+<!-- <statictag&#x3E;hello, world</statictag&#x3E; -->
+<p typeof="mw:Extension/statictag" data-mw='{"name":"statictag","attrs":{"action":"flush"},"body":null}' data-parsoid='{}' about="#mwt2"></p>
 !! end
 
 # Nested template calls; this case was broken by Parser.php rev 1.506,
@@ -19211,17 +19336,25 @@ Category:分類
 blah
 !! endarticle
 
+## We used to, but no longer wt2wt this test since the default serializer
+## will normalize all categories to serialize on their own line.
+## This wikitext usage is going to be fairly uncommon in production and
+## selser will take care of preserving formatting in those scenarios.
 !! test
 Don't convert blue categorylinks to another variant (bug 33210)
 !! options
-language=zh cat
+cat
+language=zh
+parsoid=wt2html
 !! wikitext
 [[A]][[Category:分类]]
-!! html
+!! html/php
 <a href="/wiki/Category:%E5%88%86%E7%B1%BB" title="Category:分类">分类</a>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="A" title="A">A</a></p>
+<link rel="mw:PageProp/Category" href="Category:分类"/>
 !! end
 
-
 !! test
 Stripping -{}- tags (language variants)
 !! options
@@ -19756,7 +19889,7 @@ Tildes in comments
 pst
 !! wikitext
 <!-- ~~~~ -->
-!! html
+!! html/php
 <!-- ~~~~ -->
 !! end
 
@@ -20078,7 +20211,7 @@ Edit comment with link
 comment
 !! wikitext
 I like the [[Main Page]] a lot
-!! html
+!! html/php
 I like the <a href="/wiki/Main_Page" title="Main Page">Main Page</a> a lot
 !!end
 
@@ -20088,7 +20221,7 @@ Edit comment with link and link text
 comment
 !! wikitext
 I like the [[Main Page|best pages]] a lot
-!! html
+!! html/php
 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
 !!end
 
@@ -20098,7 +20231,7 @@ Edit comment with link and link text with suffix
 comment
 !! wikitext
 I like the [[Main Page|best page]]s a lot
-!! html
+!! html/php
 I like the <a href="/wiki/Main_Page" title="Main Page">best pages</a> a lot
 !!end
 
@@ -20108,7 +20241,7 @@ Edit comment with section link (non-local, eg in history list)
 comment title=[[Main Page]]
 !! wikitext
 /* External links */ removed bogus entries
-!! html
+!! html/php
 <a href="/wiki/Main_Page#External_links" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
 !!end
 
@@ -20118,7 +20251,7 @@ Edit comment with section link and text before it (non-local, eg in history list
 comment title=[[Main Page]]
 !! wikitext
 pre-comment text /* External links */ removed bogus entries
-!! html
+!! html/php
 pre-comment text <a href="/wiki/Main_Page#External_links" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
 !!end
 
@@ -20128,7 +20261,7 @@ Edit comment with section link (local, eg in diff view)
 comment local title=[[Main Page]]
 !! wikitext
 /* External links */ removed bogus entries
-!! html
+!! html/php
 <a href="#External_links">→</a>‎<span dir="auto"><span class="autocomment">External links: </span> removed bogus entries</span>
 !!end
 
@@ -20140,7 +20273,7 @@ subpage
 title=[[Subpage test]]
 !! wikitext
 Poked at a [[/subpage]] here...
-!! html
+!! html/php
 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">/subpage</a> here...
 !!end
 
@@ -20152,7 +20285,7 @@ subpage
 title=[[Subpage test]]
 !! wikitext
 Poked at a [[/subpage|neat little page]] here...
-!! html
+!! html/php
 Poked at a <a href="/wiki/Subpage_test/subpage" title="Subpage test/subpage">neat little page</a> here...
 !!end
 
@@ -20163,7 +20296,7 @@ comment
 title=[[Subpage test]]
 !! wikitext
 Poked at a [[/subpage]] here...
-!! html
+!! html/php
 Poked at a <a href="/index.php?title=/subpage&amp;action=edit&amp;redlink=1" class="new" title="/subpage (page does not exist)">/subpage</a> here...
 !!end
 
@@ -20175,7 +20308,7 @@ local
 title=[[Main Page]]
 !! wikitext
 [[#section]]
-!! html
+!! html/php
 <a href="#section">#section</a>
 !! end
 
@@ -20186,24 +20319,28 @@ comment
 title=[[Main Page]]
 !! wikitext
 [[#section]]
-!! html
+!! html/php
 <a href="/wiki/Main_Page#section" title="Main Page">#section</a>
 !! end
 
 !! test
 Anchor starting with underscore
+!! options
+title=[[Foo]]
 !! wikitext
 [[#_ref|One]]
-!! html
+!! html/php
 <p><a href="#_ref">One</a>
 </p>
+!! html/parsoid
+<p><a rel="mw:WikiLink" href="./Foo#_ref" data-parsoid='{"stx":"piped","a":{"href":"./Foo#_ref"},"sa":{"href":"#_ref"}}'>One</a></p>
 !! end
 
 !! test
 Id starting with underscore
 !! wikitext
 <div id="_ref"></div>
-!! html
+!! html/*
 <div id="_ref"></div>
 
 !! end
@@ -20215,7 +20352,7 @@ comment
 title=[[Main Page]]
 !! wikitext
 /* __hello__world__ */
-!! html
+!! html/php
 <a href="/wiki/Main_Page#hello_world" title="Main Page">→</a>‎<span dir="auto"><span class="autocomment">__hello__world__</span></span>
 !! end
 
@@ -20534,11 +20671,14 @@ HTML5 data attributes
 !! wikitext
 <span data-foo="bar">Baz</span>
 <p data-abc-def_hij="">Quuz</p>
-!! html
+!! html/php
 <p><span data-foo="bar">Baz</span>
 </p>
 <p data-abc-def_hij="">Quuz</p>
 
+!! html/parsoid
+<p><span data-foo="bar" data-parsoid='{"stx":"html"}'>Baz</span></p>
+<p data-abc-def_hij="" data-parsoid='{"stx":"html"}'>Quuz</p>
 !! end
 
 !! test
@@ -21386,14 +21526,12 @@ parsoid=wt2html,wt2wt
 
 !!test
 Ref: 1. ref-location should be replaced with an index span
-!!options
-parsoid
 !! wikitext
 A <ref>foo</ref>
 B <ref name="x">foo</ref>
 C <ref name="y" />
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-2"},"attrs":{"name":"x"}}'><a href="#cite_note-x-2"><span class="mw-reflink-text">[2]</span></a></span>
 C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"y"}}'><a href="#cite_note-y-3"><span class="mw-reflink-text">[3]</span></a></span></p>
@@ -21406,13 +21544,11 @@ C <span about="#mwt6" class="mw-ref" id="cite_ref-y_3-0" rel="dc:references" typ
 
 !!test
 Ref: 2. ref-tags with identical names should all get the same index
-!!options
-parsoid
 !! wikitext
 A <ref name="x">foo</ref>
 B <ref name="x" />
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
@@ -21422,14 +21558,12 @@ B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typ
 
 !!test
 Ref: 3. spaces in ref-names should be ignored
-!!options
-parsoid
 !! wikitext
 A <ref name="x">foo</ref>
 B <ref name=" x " />
 C <ref name= x  />
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-x_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-x-1"},"attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
 B <span about="#mwt4" class="mw-ref" id="cite_ref-x_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span>
 C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"x"}}'><a href="#cite_note-x-1"><span class="mw-reflink-text">[1]</span></a></span></p>
@@ -21441,12 +21575,10 @@ C <span about="#mwt6" class="mw-ref" id="cite_ref-x_1-2" rel="dc:references" typ
 # NOTE: constructor is a predefined property in JS and constructor as a ref-name can clash with it if not handled properly)
 !!test
 Ref: 4. 'constructor' should be accepted as a valid ref-name
-!!options
-parsoid
 !! wikitext
 A <ref name="constructor">foo</ref>
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-constructor_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-constructor-1"},"attrs":{"name":"constructor"}}'><a href="#cite_note-constructor-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
 <li about="#cite_note-constructor-1" id="cite_note-constructor-1"><a href="#cite_ref-constructor_1-0" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-constructor-1" class="mw-reference-text">foo</span></li>
@@ -21455,15 +21587,13 @@ A <ref name="constructor">foo</ref>
 
 !!test
 Ref: 5. body should accept generic wikitext
-!!options
-parsoid
 !! wikitext
 A <ref>
  This is a '''[[bolded link]]''' and this is a {{echo|transclusion}}
 </ref>
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
@@ -21474,8 +21604,6 @@ A <ref>
 
 !!test
 Ref: 6. indent-pres should not be output in ref-body
-!!options
-parsoid
 !! wikitext
 A <ref>
  foo
@@ -21484,7 +21612,7 @@ A <ref>
 </ref>
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
@@ -21497,8 +21625,6 @@ A <ref>
 
 !!test
 Ref: 7. No p-wrapping in ref-body
-!!options
-parsoid
 !! wikitext
 A <ref>
 foo
@@ -21514,7 +21640,7 @@ booz
 </ref>
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
@@ -21534,27 +21660,23 @@ booz
 
 !!test
 Ref: 8. transclusion wikitext has lower precedence
-!!options
-parsoid
 !! wikitext
 A <ref> foo {{echo|</ref> B C}}
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C<span typeof="mw:Nowiki">}}</span></p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
-<li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <span typeof="mw:Nowiki" data-parsoid='{"src":"{{","dsr":[12,14,0,0]}'>{{</span>echo|</span></li>
+<li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo {{echo|</span></li>
 </ol>
 !!end
 
 !!test
 Ref: 9. unclosed comments should not leak out of ref-body
-!!options
-parsoid
 !! wikitext
 A <ref> foo <!--</ref> B C
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo <!----></span></li>
@@ -21563,13 +21685,11 @@ A <ref> foo <!--</ref> B C
 
 !!test
 Ref: 10. Unclosed HTML tags should not leak out of ref-body
-!!options
-parsoid
 !! wikitext
 A <ref> <b> foo </ref> B C
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B C</p>
 
 
@@ -21580,13 +21700,11 @@ A <ref> <b> foo </ref> B C
 
 !!test
 Ref: 11. ref-tags acts like an inline element wrt P-wrapping
-!!options
-parsoid
 !! wikitext
 A <ref>foo</ref> B
 C <ref>bar</ref> D
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> B
 C <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> D</p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
 
 !!test
 Ref: 13. ref-tags are not SOL-transparent and block indent-pres
-!!options
-parsoid
 !! wikitext
 <ref>foo</ref> A
 <ref>bar
 </ref> B
 <references />
-!! html
+!! html/parsoid
 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span> A
 <span about="#mwt4" class="mw-ref" id="cite_ref-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-2"},"attrs":{}}'><a href="#cite_note-2"><span class="mw-reflink-text">[2]</span></a></span> B</p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
@@ -21639,13 +21755,11 @@ parsoid
 
 !!test
 Ref: 14. A nested ref-tag should be emitted as plain text
-!!options
-parsoid
 !! wikitext
 <ref>foo <ref>bar</ref> baz</ref>
 
 <references />
-!! html
+!! html/parsoid
 <p><span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span>
 </p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt5" data-mw='{"name":"references","attrs":{}}'>
@@ -21655,14 +21769,12 @@ parsoid
 
 !!test
 Ref: 15. ref-tags with identical names should get identical indexes
-!!options
-parsoid
 !! wikitext
 A1 <ref name="a">foo</ref> A2 <ref name="a" />
 B1 <ref name="b" /> B2 <ref name="b">bar</ref>
 
 <references />
-!! html
+!! html/parsoid
 <p>A1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a-1"},"attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span> A2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a"}}'><a href="#cite_note-a-1"><span class="mw-reflink-text">[1]</span></a></span>
 B1 <span about="#mwt7" class="mw-ref" id="cite_ref-b_2-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span> B2 <span about="#mwt8" class="mw-ref" id="cite_ref-b_2-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-b-2"},"attrs":{"name":"b"}}'><a href="#cite_note-b-2"><span class="mw-reflink-text">[2]</span></a></span></p>
 
@@ -21679,7 +21791,7 @@ parsoid=wt2html
 A <ref >foo</ref >
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-1"},"attrs":{}}'><a href="#cite_note-1"><span class="mw-reflink-text">[1]</span></a></span></p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt4" data-mw='{"name":"references","attrs":{}}'>
 <li about="#cite_note-1" id="cite_note-1"><a href="#cite_ref-1" rel="mw:referencedBy"><span class="mw-linkback-text">↑ </span></a> <span id="mw-reference-text-cite_note-1" class="mw-reference-text">foo</span></li></ol>
@@ -21687,13 +21799,11 @@ A <ref >foo</ref >
 
 !!test
 Ref: 17. Generate valid HTML5 id/about attributes
-!!options
-parsoid
 !!wikitext
 <ref name="a b">foo</ref>
 
 <references />
-!!html
+!!html/parsoid
 <p><span class="mw-ref" id="cite_ref-a_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_b-1"},"attrs":{"name":"a b"}}'><a href="#cite_note-a_b-1"><span class="mw-reflink-text">[1]</span></a></span>
 </p>
 
@@ -21704,13 +21814,11 @@ parsoid
 
 !!test
 Ref: 18. T58916: Extension attributes should be parsed as plain text
-!!options
-parsoid
 !!wikitext
 <ref name="{{echo|a}}">foo</ref>
 
 <references />
-!!html
+!!html/parsoid
 <p><span class="mw-ref" id="cite_ref-.7B.7Becho.7Ca.7D.7D_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-.7B.7Becho.7Ca.7D.7D-1"},"attrs":{"name":"{{echo|a}}"}}'><a href="#cite_note-.7B.7Becho.7Ca.7D.7D-1"><span class="mw-reflink-text">[1]</span></a></span>
 </p>
 
@@ -21721,13 +21829,11 @@ parsoid
 
 !!test
 Ref: 19. ref-tags with identical name encodings should get identical indexes
-!!options
-parsoid
 !! wikitext
 1 <ref name="a & b">foo</ref> 2 <ref name="a &amp; b" />
 
 <references />
-!! html
+!! html/parsoid
 <p>1 <span about="#mwt3" class="mw-ref" id="cite_ref-a_.26_b_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-a_.26_b-1"},"attrs":{"name":"a &amp; b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span> 2 <span about="#mwt4" class="mw-ref" id="cite_ref-a_.26_b_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"a &amp;amp; b"}}'><a href="#cite_note-a_.26_b-1"><span class="mw-reflink-text">[1]</span></a></span>
 </p>
 <ol class="mw-references" typeof="mw:Extension/references" about="#mwt6" data-mw='{"name":"references","attrs":{}}'>
@@ -21737,15 +21843,13 @@ parsoid
 
 !!test
 Ref: 20. ref-tags with identical names but different content should keep it
-!!options
-parsoid
 !! wikitext
 A <ref name="foo">Foo one</ref>
 B <ref name="foo">Foo two</ref>
 C <ref name="foo" />
 
 <references />
-!! html
+!! html/parsoid
 <p>A <span about="#mwt2" class="mw-ref" id="cite_ref-foo_1-0" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"id":"mw-reference-text-cite_note-foo-1"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
 B <span about="#mwt4" class="mw-ref" id="cite_ref-foo_1-1" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","body":{"html":"Foo two"},"attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span>
 C <span about="#mwt6" class="mw-ref" id="cite_ref-foo_1-2" rel="dc:references" typeof="mw:Extension/ref" data-mw='{"name":"ref","attrs":{"name":"foo"}}'><a href="#cite_note-foo-1"><span class="mw-reflink-text">[1]</span></a></span></p>
@@ -21979,8 +22083,10 @@ foo<ol class="mw-references" typeof="mw:Extension/references" about="#mwt2" data
 #### https://www.mediawiki.org/wiki/Parsoid/HTML_based_LST
 #### ----------------------------------------------------------------
 
-!!test
+!! test
 LST Sections: 1. Simple section start and end
+!! options
+parsoid={ "suppressErrors": true }
 !! wikitext
 <section begin="2011-05-16" />
 <section end="2014-04-10 (MW 1.23wmf22)" />
@@ -23574,7 +23680,8 @@ parsoid=html2wt
 
  __TOC__ foo
 
-__TOC__ bar
+__TOC__
+ bar
 !! end
 
 #### --------------- HTML tags ---------------
@@ -23723,6 +23830,19 @@ HTML tag with broken attribute value quoting
 </p>
 !! end
 
+!! test
+Self-closed tag with broken attribute value quoting
+!! options
+parsoid=wt2html,html2html
+!! wikitext
+<div title="Hello world />Foo
+!! html/php+tidy
+<div title="Hello world"></div>
+<p>Foo</p>
+!! html/parsoid
+<div title="Hello world " data-parsoid='{"stx":"html","selfClose":true}'></div><p>Foo</p>
+!! end
+
 !! test
 Table with broken attribute value quoting
 !! wikitext
@@ -24351,6 +24471,19 @@ Properly encapsulate empty-content transclusions in fosterable positions
 </table>
 !! end
 
+!! test
+Always encapsulate foster box when template range is expanded to table
+!! options
+parsoid=wt2wt
+!! wikitext
+{|
+hello
+{{OpenTable}}
+|}
+!! html/parsoid
+
+!! end
+
 !!test
 Support <object> element with .data attribute
 !!options
@@ -24785,7 +24918,8 @@ parsoid=html2wt
 </div>
 !! wikitext
 foo
-<nowiki> </nowiki><span>bar</span>
+<span>bar</span>
 
 <span>foo2
 <nowiki> </nowiki></span>bar2
@@ -24827,15 +24961,15 @@ parsoid={
 
 <h2><meta property="mw:PageProp/toc" /> ok</h2>
 !! wikitext
-== hello there [[Category:A1]]  ==
+== hello there [[Category:A1]] ==
 
-==  [[Category:A2]] hi pal ==
+== [[Category:A2]] hi pal ==
 
-==  <!--foo-->  [[Category:A3]]    how goes it ==
+== <!--foo-->  [[Category:A3]]    how goes it ==
 
-== it goes well    [[Category:A4]]  <!--bar-->  ==
+== it goes well    [[Category:A4]]  <!--bar--> ==
 
-==howdy [[Category:A5]] ==
+==howdy [[Category:A5]]==
 
 ==  __TOC__  ok ==
 !! end
@@ -25620,7 +25754,7 @@ parsoid={ "modes": ["html2wt"], "suppressErrors": true }
 # shown to sneak through on occasion. See T101768.
 # The original wikitext here is: [http://test.com [[one]] two three]
 !! test
-Strip span tags added to mark as misnested
+Strip span tags added to mark misnested links
 !! options
 parsoid=html2wt
 !! html/parsoid
@@ -25629,10 +25763,112 @@ parsoid=html2wt
 [http://test.com][[one]] two three
 !! end
 
+!! test
+Use data-parsoid.firstWikitextNode to compute newline constraints for template content
+!! options
+parsoid=html2wt
+!! html/parsoid
+<span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"a"}},"i":0}}]}'>a</span><table about="#mwt2" typeof="mw:Transclusion mw:ExpandedAttrs" data-parsoid='{"a":{"{{echo|c\n{{!}}d\n}}":null},"sa":{"{{echo|c\n{{!}}d\n}}":""},"firstWikitextNode":"table","pi":[[{"k":"1","spc":["","","",""]}]]}' data-mw='{"parts":["{|",{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"c\n{{!}}d\n"}},"i":0}},"\n|}"]}'>
+<tbody><tr><td>d
+</td></tr>
+</tbody></table>
+!! wikitext
+{{echo|a}}
+{|{{echo|c
+{{!}}d
+}}
+|}
+!! end
+
+## This test verifies the presence and computation of this attribute indirectly
+## by making an edit and ensuring that the serialization is correct (which it would be
+## only if firstWikitextNode is properly set).
+!! test
+data-parsoid.firstWikitextNode should be computed properly in the presence of fostered content
+!! options
+parsoid= {
+  "modes": ["wt2wt"],
+  "changes": [
+    [ "div#x", "remove" ],
+    [ "div", "before", "<div>new</div>" ]
+  ]
+}
+!! wikitext
+<div id="x">foo</div>
+{|
+{{echo|<div>boo</div>
+{{!}}b}}
+|c
+|}
+!! wikitext/edited
+
+<div>new</div>
+{|
+{{echo|<div>boo</div>
+{{!}}b}}
+|c
+|}
+!! end
+
 # --------------------------------------------
 # Tests spec'ing wikitext serialization norms |
 # --------------------------------------------
 
+!! test
+1. Categories should always be serialized on their own line
+!! options
+parsoid=html2wt
+!! html/parsoid
+foo<link rel="mw:PageProp/Category" href="./Category:Foo">bar
+!! wikitext
+foo
+[[Category:Foo]]
+bar
+!! end
+
+!! test
+2. Categories that are part of templates should not introduce a line break
+!! wikitext
+foo {{echo|<span>bar</span> [[Category:baz]]}} bar
+!! html/parsoid
+<p>foo <span about="#mwt1" typeof="mw:Transclusion" data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;span>bar&lt;/span> [[Category:baz]]"}},"i":0}}]}'>bar</span><span about="#mwt1"> </span><link rel="mw:PageProp/Category" href="./Category:Baz" about="#mwt1" data-parsoid='{"stx":"simple","a":{"href":"./Category:Baz"},"sa":{"href":"Category:baz"}}'/> bar</p>
+!! end
+
+# Careful while editing these next 2 tests. There are \u200f characters
+# before and after the <link> tags in the HTML and following some
+# of the categories in wikitext
+# Do not remove these characters in edits.
+#
+# As part of the serialization, these bidi characters will get stripped.
+!! test
+RTL (\u200f) and LTR (\u200e) markers around category tags should be stripped
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": true
+}
+!! html/parsoid
+<p>‏<link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />‏
+‏<link rel="mw:PageProp/Category" href="./קטגוריה:_שיטות_משפט" />‏</p>
+!! wikitext
+[[קטגוריה:טקסים]]
+[[קטגוריה: שיטות משפט]]
+!! end
+
+!! test
+RTL (\u200f) and LTR (\u200e) markers should not be stripped if followed by a text node
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": true
+}
+!! html/parsoid
+<p>‏<link rel="mw:PageProp/Category" href="./קטגוריה:טקסים" />‏y</p>
+!! wikitext
+[[קטגוריה:טקסים]]
+‏y
+!! end
+
 !! test
 Lists: Add space after bullets
 !! options
@@ -25720,6 +25956,35 @@ parsoid={
 !! wikitext/edited
 !! end
 
+!! test
+Headings: Replace <br/> with a single whitespace char (when scrubWikitext = true)
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": true
+}
+!! html/parsoid
+<h2>foo<br/>bar</h2>
+<h2>foo <span><br/>bar</span> baz</h2>
+!! wikitext
+== foo bar ==
+
+== foo <span> bar</span> baz ==
+!! end
+
+!! test
+Headings: Replace <br/> with a single whitespace char (when scrubWikitext = false)
+!! options
+parsoid={
+  "modes": ["html2wt"],
+  "scrubWikitext": false
+}
+!! html/parsoid
+<h2>foo<br/>bar</h2>
+!! wikitext
+== foo<br> bar ==
+!! end
+
 !! test
 1. WT Quote Tags: suppress newly created empty style tags
 !! options
@@ -26225,10 +26490,61 @@ parsoid=html2wt
 &lt;nowiki&gt;''foo''&lt;/nowiki&gt;
 !! end
 
+# This is meant to be an interim fix while we go about figuring out
+# how to not introduce these trailing <nowiki/>s in the first place.
+!! test
+T115717: Strip trailing <nowiki/>s (without affecting valid uses)
+!! options
+parsoid=html2wt
+!! html/parsoid
+<p>x<meta typeof="mw:Placeholder" data-parsoid='{"src":"&lt;nowiki/>"}'/><meta typeof="mw:Placeholder" data-parsoid='{"src":"&lt;nowiki/>"}'/>
+y</p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,23,null,null],"pi":[[{"k":"1","named":true,"spc":["\n"," "," ",""]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;nowiki/>"}},"i":0}}]}'></span></p>
+<p><span about="#mwt1" typeof="mw:Transclusion" data-parsoid='{"dsr":[0,24,null,null],"pi":[[{"k":"1","named":true,"spc":["\n"," "," ","\n"]}]]}' data-mw='{"parts":[{"template":{"target":{"wt":"echo","href":"./Template:Echo"},"params":{"1":{"wt":"&lt;nowiki/>"}},"i":0}}]}'></span></p>
+!! wikitext
+x
+y
+
+{{echo|
+1 = <nowiki/>}}
+
+{{echo|
+1 = <nowiki/>
+}}
+!! end
+
 # ---------------------------------------------------
 # End of tests spec'ing wikitext serialization norms |
 # ---------------------------------------------------
 
+# T104032
+!! test
+Bare inline nodes not wrapped inside p-tags should be treated as p-wrapped
+!! options
+parsoid=html2wt
+!! html/parsoid
+a<p>b</p>
+<b>c</b><p>d</p>
+<table><tr>
+<td>a<p>b</p></td>
+<td><b>c</b><p>d</p></td>
+</tr></table>
+!! wikitext
+a
+
+b
+
+'''c'''
+
+d
+{|
+|a
+b
+|'''c'''
+d
+|}
+!! end
+
 # -----------------------------------------------------------------
 # End of section for Parsoid-only html2wt tests for serialization
 # of new content
diff --git a/tests/phpunit/includes/ImportLinkCacheIntegrationTest.php b/tests/phpunit/includes/ImportLinkCacheIntegrationTest.php
deleted file mode 100644 (file)
index 1433b89..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-<?php
-/**
- * Integration test that checks import success and
- * LinkCache integration.
- *
- * @group medium
- * @group Database
- *
- * @author mwjames
- */
-class ImportLinkCacheIntegrationTest extends MediaWikiTestCase {
-
-       private $importStreamSource;
-
-       protected function setUp() {
-               parent::setUp();
-
-               $file = dirname( __DIR__ ) . '/data/import/ImportLinkCacheIntegrationTest.xml';
-
-               $this->importStreamSource = ImportStreamSource::newFromFile( $file );
-
-               if ( !$this->importStreamSource->isGood() ) {
-                       throw new Exception( "Import source for {$file} failed" );
-               }
-       }
-
-       public function testImportForImportSource() {
-
-               $this->doImport( $this->importStreamSource );
-
-               // Imported title
-               $loremIpsum = Title::newFromText( 'Lorem ipsum' );
-
-               $this->assertSame(
-                       $loremIpsum->getArticleID(),
-                       $loremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
-               );
-
-               $categoryLoremIpsum = Title::newFromText( 'Category:Lorem ipsum' );
-
-               $this->assertSame(
-                       $categoryLoremIpsum->getArticleID(),
-                       $categoryLoremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
-               );
-
-               $page = new WikiPage( $loremIpsum );
-               $page->doDeleteArticle( 'import test: delete page' );
-
-               $page = new WikiPage( $categoryLoremIpsum );
-               $page->doDeleteArticle( 'import test: delete page' );
-       }
-
-       /**
-        * @depends testImportForImportSource
-        */
-       public function testReImportForImportSource() {
-
-               $this->doImport( $this->importStreamSource );
-
-               // ReImported title
-               $loremIpsum = Title::newFromText( 'Lorem ipsum' );
-
-               $this->assertSame(
-                       $loremIpsum->getArticleID(),
-                       $loremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
-               );
-
-               $categoryLoremIpsum = Title::newFromText( 'Category:Lorem ipsum' );
-
-               $this->assertSame(
-                       $categoryLoremIpsum->getArticleID(),
-                       $categoryLoremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
-               );
-       }
-
-       private function doImport( $importStreamSource ) {
-
-               $importer = new WikiImporter(
-                       $importStreamSource->value,
-                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
-               );
-               $importer->setDebug( true );
-
-               $reporter = new ImportReporter(
-                       $importer,
-                       false,
-                       '',
-                       false
-               );
-
-               $reporter->setContext( new RequestContext() );
-               $reporter->open();
-               $exception = false;
-
-               try {
-                       $importer->doImport();
-               } catch ( Exception $e ) {
-                       $exception = $e;
-               }
-
-               $result = $reporter->close();
-
-               $this->assertFalse(
-                       $exception
-               );
-
-               $this->assertTrue(
-                       $result->isGood()
-               );
-       }
-
-}
diff --git a/tests/phpunit/includes/ImportTest.php b/tests/phpunit/includes/ImportTest.php
deleted file mode 100644 (file)
index 9c22430..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-<?php
-
-/**
- * Test class for Import methods.
- *
- * @group Database
- *
- * @author Sebastian Brückner < sebastian.brueckner@student.hpi.uni-potsdam.de >
- */
-class ImportTest extends MediaWikiLangTestCase {
-
-       private function getDataSource( $xml ) {
-               return new ImportStringSource( $xml );
-       }
-
-       /**
-        * @covers WikiImporter::handlePage
-        * @dataProvider getRedirectXML
-        * @param string $xml
-        * @param string|null $redirectTitle
-        */
-       public function testHandlePageContainsRedirect( $xml, $redirectTitle ) {
-               $source = $this->getDataSource( $xml );
-
-               $redirect = null;
-               $callback = function ( Title $title, ForeignTitle $foreignTitle, $revCount,
-                       $sRevCount, $pageInfo ) use ( &$redirect ) {
-                       if ( array_key_exists( 'redirect', $pageInfo ) ) {
-                               $redirect = $pageInfo['redirect'];
-                       }
-               };
-
-               $importer = new WikiImporter(
-                       $source,
-                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
-               );
-               $importer->setPageOutCallback( $callback );
-               $importer->doImport();
-
-               $this->assertEquals( $redirectTitle, $redirect );
-       }
-
-       public function getRedirectXML() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
-               return array(
-                       array(
-                               <<< EOF
-<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
-       <page>
-               <title>Test</title>
-               <ns>0</ns>
-               <id>21</id>
-               <redirect title="Test22"/>
-               <revision>
-                       <id>20</id>
-                       <timestamp>2014-05-27T10:00:00Z</timestamp>
-                       <contributor>
-                               <username>Admin</username>
-                               <id>10</id>
-                       </contributor>
-                       <comment>Admin moved page [[Test]] to [[Test22]]</comment>
-                       <model>wikitext</model>
-                       <format>text/x-wiki</format>
-                       <text xml:space="preserve" bytes="20">#REDIRECT [[Test22]]</text>
-                       <sha1>tq456o9x3abm7r9ozi6km8yrbbc56o6</sha1>
-               </revision>
-       </page>
-</mediawiki>
-EOF
-                       ,
-                               'Test22'
-                       ),
-                       array(
-                               <<< EOF
-<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.9/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.9/ http://www.mediawiki.org/xml/export-0.9.xsd" version="0.9" xml:lang="en">
-       <page>
-               <title>Test</title>
-               <ns>0</ns>
-               <id>42</id>
-               <revision>
-                       <id>421</id>
-                       <timestamp>2014-05-27T11:00:00Z</timestamp>
-                       <contributor>
-                               <username>Admin</username>
-                               <id>10</id>
-                       </contributor>
-                       <text xml:space="preserve" bytes="4">Abcd</text>
-                       <sha1>n7uomjq96szt60fy5w3x7ahf7q8m8rh</sha1>
-                       <model>wikitext</model>
-                       <format>text/x-wiki</format>
-               </revision>
-       </page>
-</mediawiki>
-EOF
-                       ,
-                               null
-                       ),
-               );
-               // @codingStandardsIgnoreEnd
-       }
-
-       /**
-        * @covers WikiImporter::handleSiteInfo
-        * @dataProvider getSiteInfoXML
-        * @param string $xml
-        * @param array|null $namespaces
-        */
-       public function testSiteInfoContainsNamespaces( $xml, $namespaces ) {
-               $source = $this->getDataSource( $xml );
-
-               $importNamespaces = null;
-               $callback = function ( array $siteinfo, $innerImporter ) use ( &$importNamespaces ) {
-                       $importNamespaces = $siteinfo['_namespaces'];
-               };
-
-               $importer = new WikiImporter(
-                       $source,
-                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
-               );
-               $importer->setSiteInfoCallback( $callback );
-               $importer->doImport();
-
-               $this->assertEquals( $importNamespaces, $namespaces );
-       }
-
-       public function getSiteInfoXML() {
-               // @codingStandardsIgnoreStart Generic.Files.LineLength
-               return array(
-                       array(
-                               <<< EOF
-<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
-  <siteinfo>
-    <namespaces>
-      <namespace key="-2" case="first-letter">Media</namespace>
-      <namespace key="-1" case="first-letter">Special</namespace>
-      <namespace key="0" case="first-letter" />
-      <namespace key="1" case="first-letter">Talk</namespace>
-      <namespace key="2" case="first-letter">User</namespace>
-      <namespace key="3" case="first-letter">User talk</namespace>
-      <namespace key="100" case="first-letter">Portal</namespace>
-      <namespace key="101" case="first-letter">Portal talk</namespace>
-    </namespaces>
-  </siteinfo>
-</mediawiki>
-EOF
-                       ,
-                               array(
-                                       '-2' => 'Media',
-                                       '-1' => 'Special',
-                                       '0' => '',
-                                       '1' => 'Talk',
-                                       '2' => 'User',
-                                       '3' => 'User talk',
-                                       '100' => 'Portal',
-                                       '101' => 'Portal talk',
-                               )
-                       ),
-               );
-               // @codingStandardsIgnoreEnd
-       }
-
-}
diff --git a/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php b/tests/phpunit/includes/import/ImportLinkCacheIntegrationTest.php
new file mode 100644 (file)
index 0000000..5e3c626
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+/**
+ * Integration test that checks import success and
+ * LinkCache integration.
+ *
+ * @group medium
+ * @group Database
+ *
+ * @author mwjames
+ */
+class ImportLinkCacheIntegrationTest extends MediaWikiTestCase {
+
+       private $importStreamSource;
+
+       protected function setUp() {
+               parent::setUp();
+
+               $file = dirname( __DIR__ ) . '/../data/import/ImportLinkCacheIntegrationTest.xml';
+
+               $this->importStreamSource = ImportStreamSource::newFromFile( $file );
+
+               if ( !$this->importStreamSource->isGood() ) {
+                       throw new Exception( "Import source for {$file} failed" );
+               }
+       }
+
+       public function testImportForImportSource() {
+
+               $this->doImport( $this->importStreamSource );
+
+               // Imported title
+               $loremIpsum = Title::newFromText( 'Lorem ipsum' );
+
+               $this->assertSame(
+                       $loremIpsum->getArticleID(),
+                       $loremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
+               );
+
+               $categoryLoremIpsum = Title::newFromText( 'Category:Lorem ipsum' );
+
+               $this->assertSame(
+                       $categoryLoremIpsum->getArticleID(),
+                       $categoryLoremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
+               );
+
+               $page = new WikiPage( $loremIpsum );
+               $page->doDeleteArticle( 'import test: delete page' );
+
+               $page = new WikiPage( $categoryLoremIpsum );
+               $page->doDeleteArticle( 'import test: delete page' );
+       }
+
+       /**
+        * @depends testImportForImportSource
+        */
+       public function testReImportForImportSource() {
+
+               $this->doImport( $this->importStreamSource );
+
+               // ReImported title
+               $loremIpsum = Title::newFromText( 'Lorem ipsum' );
+
+               $this->assertSame(
+                       $loremIpsum->getArticleID(),
+                       $loremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
+               );
+
+               $categoryLoremIpsum = Title::newFromText( 'Category:Lorem ipsum' );
+
+               $this->assertSame(
+                       $categoryLoremIpsum->getArticleID(),
+                       $categoryLoremIpsum->getArticleID( Title::GAID_FOR_UPDATE )
+               );
+       }
+
+       private function doImport( $importStreamSource ) {
+
+               $importer = new WikiImporter(
+                       $importStreamSource->value,
+                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+               );
+               $importer->setDebug( true );
+
+               $reporter = new ImportReporter(
+                       $importer,
+                       false,
+                       '',
+                       false
+               );
+
+               $reporter->setContext( new RequestContext() );
+               $reporter->open();
+               $exception = false;
+
+               try {
+                       $importer->doImport();
+               } catch ( Exception $e ) {
+                       $exception = $e;
+               }
+
+               $result = $reporter->close();
+
+               $this->assertFalse(
+                       $exception
+               );
+
+               $this->assertTrue(
+                       $result->isGood()
+               );
+       }
+
+}
diff --git a/tests/phpunit/includes/import/ImportTest.php b/tests/phpunit/includes/import/ImportTest.php
new file mode 100644 (file)
index 0000000..f4aac23
--- /dev/null
@@ -0,0 +1,222 @@
+<?php
+
+/**
+ * Test class for Import methods.
+ *
+ * @group Database
+ *
+ * @author Sebastian Brückner < sebastian.brueckner@student.hpi.uni-potsdam.de >
+ */
+class ImportTest extends MediaWikiLangTestCase {
+
+       private function getDataSource( $xml ) {
+               return new ImportStringSource( $xml );
+       }
+
+       /**
+        * @covers WikiImporter
+        * @dataProvider getUnknownTagsXML
+        * @param string $xml
+        * @param string $text
+        * @param string $title
+        */
+       public function testUnknownXMLTags( $xml, $text, $title ) {
+               $source = $this->getDataSource( $xml );
+
+               $importer = new WikiImporter(
+                       $source,
+                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+               );
+
+               $importer->doImport();
+               $title = Title::newFromText( $title );
+               $this->assertTrue( $title->exists() );
+
+               $this->assertEquals( WikiPage::factory( $title )->getContent()->getNativeData(), $text );
+       }
+
+       public function getUnknownTagsXML() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               return array(
+                       array(
+                               <<< EOF
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
+  <page unknown="123" dontknow="533">
+    <title>TestImportPage</title>
+    <unknowntag>Should be ignored</unknowntag>
+    <ns>0</ns>
+    <id unknown="123" dontknow="533">14</id>
+    <revision>
+      <id unknown="123" dontknow="533">15</id>
+      <unknowntag>Should be ignored</unknowntag>
+      <timestamp>2016-01-03T11:18:43Z</timestamp>
+      <contributor>
+        <unknowntag>Should be ignored</unknowntag>
+        <username unknown="123" dontknow="533">Admin</username>
+        <id>1</id>
+      </contributor>
+      <model>wikitext</model>
+      <format>text/x-wiki</format>
+      <text xml:space="preserve" bytes="0">noitazinagro tseb eht si ikiWaideM</text>
+      <sha1>phoiac9h4m842xq45sp7s6u21eteeq1</sha1>
+      <unknowntag>Should be ignored</unknowntag>
+    </revision>
+  </page>
+  <unknowntag>Should be ignored</unknowntag>
+</mediawiki>
+EOF
+                               ,
+                               'noitazinagro tseb eht si ikiWaideM',
+                               'TestImportPage'
+                       )
+               );
+               // @codingStandardsIgnoreEnd
+       }
+
+       /**
+        * @covers WikiImporter::handlePage
+        * @dataProvider getRedirectXML
+        * @param string $xml
+        * @param string|null $redirectTitle
+        */
+       public function testHandlePageContainsRedirect( $xml, $redirectTitle ) {
+               $source = $this->getDataSource( $xml );
+
+               $redirect = null;
+               $callback = function ( Title $title, ForeignTitle $foreignTitle, $revCount,
+                       $sRevCount, $pageInfo ) use ( &$redirect ) {
+                       if ( array_key_exists( 'redirect', $pageInfo ) ) {
+                               $redirect = $pageInfo['redirect'];
+                       }
+               };
+
+               $importer = new WikiImporter(
+                       $source,
+                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+               );
+               $importer->setPageOutCallback( $callback );
+               $importer->doImport();
+
+               $this->assertEquals( $redirectTitle, $redirect );
+       }
+
+       public function getRedirectXML() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               return array(
+                       array(
+                               <<< EOF
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
+       <page>
+               <title>Test</title>
+               <ns>0</ns>
+               <id>21</id>
+               <redirect title="Test22"/>
+               <revision>
+                       <id>20</id>
+                       <timestamp>2014-05-27T10:00:00Z</timestamp>
+                       <contributor>
+                               <username>Admin</username>
+                               <id>10</id>
+                       </contributor>
+                       <comment>Admin moved page [[Test]] to [[Test22]]</comment>
+                       <model>wikitext</model>
+                       <format>text/x-wiki</format>
+                       <text xml:space="preserve" bytes="20">#REDIRECT [[Test22]]</text>
+                       <sha1>tq456o9x3abm7r9ozi6km8yrbbc56o6</sha1>
+               </revision>
+       </page>
+</mediawiki>
+EOF
+                       ,
+                               'Test22'
+                       ),
+                       array(
+                               <<< EOF
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.9/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.9/ http://www.mediawiki.org/xml/export-0.9.xsd" version="0.9" xml:lang="en">
+       <page>
+               <title>Test</title>
+               <ns>0</ns>
+               <id>42</id>
+               <revision>
+                       <id>421</id>
+                       <timestamp>2014-05-27T11:00:00Z</timestamp>
+                       <contributor>
+                               <username>Admin</username>
+                               <id>10</id>
+                       </contributor>
+                       <text xml:space="preserve" bytes="4">Abcd</text>
+                       <sha1>n7uomjq96szt60fy5w3x7ahf7q8m8rh</sha1>
+                       <model>wikitext</model>
+                       <format>text/x-wiki</format>
+               </revision>
+       </page>
+</mediawiki>
+EOF
+                       ,
+                               null
+                       ),
+               );
+               // @codingStandardsIgnoreEnd
+       }
+
+       /**
+        * @covers WikiImporter::handleSiteInfo
+        * @dataProvider getSiteInfoXML
+        * @param string $xml
+        * @param array|null $namespaces
+        */
+       public function testSiteInfoContainsNamespaces( $xml, $namespaces ) {
+               $source = $this->getDataSource( $xml );
+
+               $importNamespaces = null;
+               $callback = function ( array $siteinfo, $innerImporter ) use ( &$importNamespaces ) {
+                       $importNamespaces = $siteinfo['_namespaces'];
+               };
+
+               $importer = new WikiImporter(
+                       $source,
+                       ConfigFactory::getDefaultInstance()->makeConfig( 'main' )
+               );
+               $importer->setSiteInfoCallback( $callback );
+               $importer->doImport();
+
+               $this->assertEquals( $importNamespaces, $namespaces );
+       }
+
+       public function getSiteInfoXML() {
+               // @codingStandardsIgnoreStart Generic.Files.LineLength
+               return array(
+                       array(
+                               <<< EOF
+<mediawiki xmlns="http://www.mediawiki.org/xml/export-0.10/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.mediawiki.org/xml/export-0.10/ http://www.mediawiki.org/xml/export-0.10.xsd" version="0.10" xml:lang="en">
+  <siteinfo>
+    <namespaces>
+      <namespace key="-2" case="first-letter">Media</namespace>
+      <namespace key="-1" case="first-letter">Special</namespace>
+      <namespace key="0" case="first-letter" />
+      <namespace key="1" case="first-letter">Talk</namespace>
+      <namespace key="2" case="first-letter">User</namespace>
+      <namespace key="3" case="first-letter">User talk</namespace>
+      <namespace key="100" case="first-letter">Portal</namespace>
+      <namespace key="101" case="first-letter">Portal talk</namespace>
+    </namespaces>
+  </siteinfo>
+</mediawiki>
+EOF
+                       ,
+                               array(
+                                       '-2' => 'Media',
+                                       '-1' => 'Special',
+                                       '0' => '',
+                                       '1' => 'Talk',
+                                       '2' => 'User',
+                                       '3' => 'User talk',
+                                       '100' => 'Portal',
+                                       '101' => 'Portal talk',
+                               )
+                       ),
+               );
+               // @codingStandardsIgnoreEnd
+       }
+
+}
index 0a46f8a..002e86f 100644 (file)
@@ -1261,22 +1261,6 @@ more stuff
                );
        }
 
-       /**
-        * @dataProvider providePreSaveTransform
-        * @covers WikiPage::preSaveTransform
-        */
-       public function testPreSaveTransform( $text, $expected ) {
-               $this->hideDeprecated( 'WikiPage::preSaveTransform' );
-               $user = new User();
-               $user->setName( "127.0.0.1" );
-
-               // NOTE: assume Help namespace to contain wikitext
-               $page = $this->newPage( "Help:WikiPageTest_testPreloadTransform" );
-               $text = $page->preSaveTransform( $text, $user );
-
-               $this->assertEquals( $expected, $text );
-       }
-
        /**
         * @covers WikiPage::factory
         */
index 843f576..590644f 100644 (file)
@@ -118,7 +118,8 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                                '_prefix' => 'eg',
                                'Bar' => 'somevalue'
                        ),
-               ) + self::$default;
+                       'name' => 'FooBar2',
+               );
                $processor->extractInfo( $this->dir, $info, 1 );
                $processor->extractInfo( $this->dir, $info2, 1 );
                $extracted = $processor->getExtractedInfo();
@@ -193,6 +194,16 @@ class ExtensionProcessorTest extends MediaWikiTestCase {
                }
        }
 
+       /**
+        * @covers ExtensionProcessor::extractCredits
+        */
+       public function testExtractCredits() {
+               $processor = new ExtensionProcessor();
+               $processor->extractInfo( $this->dir, self::$default, 1 );
+               $this->setExpectedException( 'Exception' );
+               $processor->extractInfo( $this->dir, self::$default, 1 );
+       }
+
        /**
         * @covers ExtensionProcessor::extractResourceLoaderModules
         * @dataProvider provideExtractResourceLoaderModules
index 201cbfc..543eb5c 100644 (file)
@@ -25,6 +25,7 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
                        'defines' => array(),
                        'credits' => array(),
                        'attributes' => array(),
+                       'autoloaderPaths' => array()
                );
                $registry = new ExtensionRegistry();
                $class = new ReflectionClass( 'ExtensionRegistry' );
diff --git a/tests/phpunit/includes/site/MediaWikiPageNameNormalizerTest.php b/tests/phpunit/includes/site/MediaWikiPageNameNormalizerTest.php
new file mode 100644 (file)
index 0000000..163c52d
--- /dev/null
@@ -0,0 +1,85 @@
+<?php
+
+use MediaWiki\Site\MediaWikiPageNameNormalizer;
+
+/**
+ * @covers MediaWiki\Site\MediaWikiPageNameNormalizer
+ *
+ * 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
+ *
+ * @since 1.27
+ *
+ * @group Site
+ * @group medium
+ *
+ * @author Marius Hoch
+ */
+class MediaWikiPageNameNormalizerTest extends PHPUnit_Framework_TestCase {
+
+       protected function setUp() {
+               parent::setUp();
+
+               static $connectivity = null;
+
+               if ( $connectivity === null ) {
+                       // Check whether we have (reasonable fast) connectivity
+                       $res = Http::get(
+                               'https://www.wikidata.org/w/api.php?action=query&meta=siteinfo&format=json',
+                               array( 'timeout' => 3 ),
+                               __METHOD__
+                       );
+
+                       if ( $res === false || strpos( $res, '"sitename":"Wikidata"' ) === false ) {
+                               $connectivity = false;
+                       } else {
+                               $connectivity = true;
+                       }
+               }
+
+               if ( !$connectivity ) {
+                       $this->markTestSkipped( 'MediaWikiPageNameNormalizerTest needs internet connectivity.' );
+               }
+       }
+
+       /**
+        * @dataProvider normalizePageTitleProvider
+        */
+       public function testNormalizePageTitle( $expected, $pageName ) {
+               $normalizer = new MediaWikiPageNameNormalizer();
+
+               $this->assertSame(
+                       $expected,
+                       $normalizer->normalizePageName( $pageName, 'https://www.wikidata.org/w/api.php' )
+               );
+       }
+
+       public function normalizePageTitleProvider() {
+               // Note: This makes (very conservative) assumptions about pages on Wikidata
+               // existing or not.
+               return array(
+                       'universe (Q1)' => array(
+                               'Q1', 'Q1'
+                       ),
+                       'Q404 redirects to Q395' => array(
+                               'Q395', 'Q404'
+                       ),
+                       'there is no Q0' => array(
+                               false, 'Q0'
+                       )
+               );
+       }
+
+}
index 5c6a6cd..245a97a 100644 (file)
@@ -120,6 +120,16 @@ class MaintenanceFixup extends Maintenance {
                return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
        }
 
+       public function addOption( $name, $description, $required = false,
+               $withArg = false, $shortName = false, $multiOccurance = false
+       ) {
+               return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
+       }
+
+       public function getOption( $name, $default = null ) {
+               return call_user_func_array( array( "parent", __FUNCTION__ ), func_get_args() );
+       }
+
        // --- Requirements for getting instance of abstract class
 
        public function execute() {
@@ -829,4 +839,37 @@ class MaintenanceTest extends MediaWikiTestCase {
                $this->m->setConfig( $conf );
                $this->assertSame( $conf, $this->m->getConfig() );
        }
+
+       function testParseArgs() {
+               $m2 = new MaintenanceFixup( $this );
+               // Create an option with an argument allowed to be specified multiple times
+               $m2->addOption( 'multi', 'This option does stuff', false, true, false, true );
+               $m2->loadWithArgv( array( '--multi', 'this1', '--multi', 'this2' ) );
+
+               $this->assertEquals( array( 'this1', 'this2' ), $m2->getOption( 'multi' ) );
+               $this->assertEquals( array( array( 'multi', 'this1' ), array( 'multi', 'this2' ) ),
+                       $m2->orderedOptions );
+
+               $m2->simulateShutdown();
+
+               $m2 = new MaintenanceFixup( $this );
+
+               $m2->addOption( 'multi', 'This option does stuff', false, false, false, true );
+               $m2->loadWithArgv( array( '--multi', '--multi' ) );
+
+               $this->assertEquals( array( 1, 1 ), $m2->getOption( 'multi' ) );
+               $this->assertEquals( array( array( 'multi', 1 ), array( 'multi', 1 ) ), $m2->orderedOptions );
+
+               $m2->simulateShutdown();
+
+               $m2 = new MaintenanceFixup( $this );
+               // Create an option with an argument allowed to be specified multiple times
+               $m2->addOption( 'multi', 'This option doesn\'t actually support multiple occurrences' );
+               $m2->loadWithArgv( array( '--multi=yo' ) );
+
+               $this->assertEquals( 'yo', $m2->getOption( 'multi' ) );
+               $this->assertEquals( array( array( 'multi', 'yo' ) ), $m2->orderedOptions );
+
+               $m2->simulateShutdown();
+       }
 }
index f5dd98b..893e4f9 100644 (file)
@@ -1,10 +1,15 @@
 <?php
 
-require_once __DIR__ . "/../../../maintenance/backupTextPass.inc";
+require_once __DIR__ . "/../../../maintenance/dumpTextPass.php";
 
 /**
  * Tests for TextPassDumper that rely on the database
  *
+ * Some of these tests use the old constuctor for TextPassDumper
+ * and the dump() function, while others use the new loadWithArgv( $args )
+ * function and execute(). This is to ensure both the old and new methods
+ * work properly.
+ *
  * @group Database
  * @group Dump
  * @covers TextPassDumper
@@ -172,8 +177,10 @@ class TextPassDumperDatabaseTest extends DumpTestCase {
                // Setting up of the dump
                $nameStub = $this->setUpStub();
                $nameFull = $this->getNewTempFile();
-               $dumper = new TextPassDumper( array( "--stub=file:"
-                       . $nameStub, "--output=file:" . $nameFull ) );
+
+               $dumper = new TextPassDumper( array( "--stub=file:" . $nameStub,
+                       "--output=file:" . $nameFull ) );
+
                $dumper->prefetch = $prefetchMock;
                $dumper->reporting = false;
                $dumper->setDb( $this->db );
@@ -261,7 +268,8 @@ class TextPassDumperDatabaseTest extends DumpTestCase {
                        $this->assertTrue( wfMkdirParents( $nameOutputDir ),
                                "Creating temporary output directory " );
                        $this->setUpStub( $nameStub, $iterations );
-                       $dumper = new TextPassDumper( array( "--stub=file:" . $nameStub,
+                       $dumper = new TextPassDumper();
+                       $dumper->loadWithArgv( array( "--stub=file:" . $nameStub,
                                "--output=" . $checkpointFormat . ":" . $nameOutputDir . "/full",
                                "--maxtime=1" /*This is in minutes. Fixup is below*/,
                                "--buffersize=32768", // The default of 32 iterations fill up 32KB about twice
@@ -272,7 +280,7 @@ class TextPassDumperDatabaseTest extends DumpTestCase {
 
                        // The actual dump and taking time
                        $ts_before = microtime( true );
-                       $dumper->dump( WikiExporter::FULL, WikiExporter::TEXT );
+                       $dumper->execute();
                        $ts_after = microtime( true );
                        $lastDuration = $ts_after - $ts_before;
 
@@ -634,7 +642,9 @@ class TextPassDumperDatabaselessTest extends MediaWikiLangTestCase {
         * @dataProvider bufferSizeProvider
         */
        function testBufferSizeSetting( $expected, $size, $msg ) {
-               $dumper = new TextPassDumperAccessor( array( "--buffersize=" . $size ) );
+               $dumper = new TextPassDumperAccessor();
+               $dumper->loadWithArgv( array( "--buffersize=" . $size ) );
+               $dumper->execute();
                $this->assertEquals( $expected, $dumper->getBufferSize(), $msg );
        }
 
@@ -674,4 +684,8 @@ class TextPassDumperAccessor extends TextPassDumper {
        public function getBufferSize() {
                return $this->bufferSize;
        }
+
+       function dump( $history, $text = null ) {
+               return true;
+       }
 }
index 7ca4596..6629b67 100644 (file)
@@ -2,6 +2,11 @@
 /**
  * Tests for log dumps of BackupDumper
  *
+ * Some of these tests use the old constuctor for TextPassDumper
+ * and the dump() function, while others use the new loadWithArgv( $args )
+ * function and execute(). This is to ensure both the old and new methods
+ * work properly.
+ *
  * @group Database
  * @group Dump
  * @covers BackupDumper
@@ -136,7 +141,8 @@ class BackupDumperLoggerTest extends DumpTestCase {
 
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
+
+               $dumper = new DumpBackup( array( '--output=file:' . $fname ) );
                $dumper->startId = $this->logId1;
                $dumper->endId = $this->logId3 + 1;
                $dumper->reporting = false;
@@ -173,8 +179,10 @@ class BackupDumperLoggerTest extends DumpTestCase {
 
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=gzip:" . $fname,
-                       "--reporting=2" ) );
+
+               $dumper = new DumpBackup();
+               $dumper->loadWithArgv( array( '--logs', '--output=gzip:' . $fname,
+                       '--reporting=2' ) );
                $dumper->startId = $this->logId1;
                $dumper->endId = $this->logId3 + 1;
                $dumper->setDb( $this->db );
@@ -190,7 +198,7 @@ class BackupDumperLoggerTest extends DumpTestCase {
                }
 
                // Performing the dump
-               $dumper->dump( WikiExporter::LOGS, WikiExporter::TEXT );
+               $dumper->execute();
 
                $this->assertTrue( fclose( $dumper->stderr ), "Closing stderr handle" );
 
index 8b6221b..5781d1c 100644 (file)
@@ -6,6 +6,7 @@
  * @group Dump
  * @covers BackupDumper
  */
+
 class BackupDumperPageTest extends DumpTestCase {
 
        // We'll add several pages, revision and texts. The following variables hold the
@@ -98,14 +99,15 @@ class BackupDumperPageTest extends DumpTestCase {
        function testFullTextPlain() {
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
+
+               $dumper = new DumpBackup();
+               $dumper->loadWithArgv( array( '--full', '--quiet', '--output', 'file:' . $fname ) );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
-               $dumper->reporting = false;
                $dumper->setDb( $this->db );
 
                // Performing the dump
-               $dumper->dump( WikiExporter::FULL, WikiExporter::TEXT );
+               $dumper->execute();
 
                // Checking the dumped data
                $this->assertDumpStart( $fname );
@@ -153,14 +155,15 @@ class BackupDumperPageTest extends DumpTestCase {
        function testFullStubPlain() {
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
+
+               $dumper = new DumpBackup();
+               $dumper->loadWithArgv( array( '--full', '--quiet', '--output', 'file:' . $fname, '--stub' ) );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
-               $dumper->reporting = false;
                $dumper->setDb( $this->db );
 
                // Performing the dump
-               $dumper->dump( WikiExporter::FULL, WikiExporter::STUB );
+               $dumper->execute();
 
                // Checking the dumped data
                $this->assertDumpStart( $fname );
@@ -202,7 +205,8 @@ class BackupDumperPageTest extends DumpTestCase {
        function testCurrentStubPlain() {
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=file:" . $fname ) );
+
+               $dumper = new DumpBackup( array( '--output', 'file:' . $fname ) );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
                $dumper->reporting = false;
@@ -247,7 +251,8 @@ class BackupDumperPageTest extends DumpTestCase {
 
                // Preparing the dump
                $fname = $this->getNewTempFile();
-               $dumper = new BackupDumper( array( "--output=gzip:" . $fname ) );
+
+               $dumper = new DumpBackup( array( '--output', 'gzip:' . $fname ) );
                $dumper->startId = $this->pageId1;
                $dumper->endId = $this->pageId4 + 1;
                $dumper->reporting = false;
@@ -306,7 +311,7 @@ class BackupDumperPageTest extends DumpTestCase {
                $fnameMetaCurrent = $this->getNewTempFile();
                $fnameArticles = $this->getNewTempFile();
 
-               $dumper = new BackupDumper( array( "--output=gzip:" . $fnameMetaHistory,
+               $dumper = new DumpBackup( array( "--full", "--stub", "--output=gzip:" . $fnameMetaHistory,
                        "--output=gzip:" . $fnameMetaCurrent, "--filter=latest",
                        "--output=gzip:" . $fnameArticles, "--filter=latest",
                        "--filter=notalk", "--filter=namespace:!NS_USER",
index 2846fde..64def91 100644 (file)
@@ -6,58 +6,81 @@
  */
 class MediaWikiTestCaseTest extends MediaWikiTestCase {
 
-       const GLOBAL_KEY_EXISTING = 'MediaWikiTestCaseTestGLOBAL-Existing';
        const GLOBAL_KEY_NONEXISTING = 'MediaWikiTestCaseTestGLOBAL-NONExisting';
 
+       private static $startGlobals = array(
+               'MediaWikiTestCaseTestGLOBAL-ExistingString' => 'foo',
+               'MediaWikiTestCaseTestGLOBAL-ExistingStringEmpty' => '',
+               'MediaWikiTestCaseTestGLOBAL-ExistingArray' => array( 1, 'foo' => 'bar' ),
+               'MediaWikiTestCaseTestGLOBAL-ExistingArrayEmpty' => array(),
+       );
+
        public static function setUpBeforeClass() {
                parent::setUpBeforeClass();
-               $GLOBALS[self::GLOBAL_KEY_EXISTING] = 'foo';
+               foreach ( self::$startGlobals as $key => $value ) {
+                       $GLOBALS[$key] = $value;
+               }
        }
 
        public static function tearDownAfterClass() {
                parent::tearDownAfterClass();
-               unset( $GLOBALS[self::GLOBAL_KEY_EXISTING] );
+               foreach ( self::$startGlobals as $key => $value ) {
+                       unset( $GLOBALS[$key] );
+               }
+       }
+
+       public function provideExistingKeysAndNewValues() {
+               $providedArray = array();
+               foreach ( array_keys( self::$startGlobals ) as $key ) {
+                       $providedArray[] = array( $key, 'newValue' );
+                       $providedArray[] = array( $key, array( 'newValue' ) );
+               }
+               return $providedArray;
        }
 
        /**
+        * @dataProvider provideExistingKeysAndNewValues
+        *
         * @covers MediaWikiTestCase::setMwGlobals
         * @covers MediaWikiTestCase::tearDown
         */
-       public function testSetGlobalsAreRestoredOnTearDown() {
-               $this->setMwGlobals( self::GLOBAL_KEY_EXISTING, 'bar' );
+       public function testSetGlobalsAreRestoredOnTearDown( $globalKey, $newValue ) {
+               $this->setMwGlobals( $globalKey, $newValue );
                $this->assertEquals(
-                       'bar',
-                       $GLOBALS[self::GLOBAL_KEY_EXISTING],
+                       $newValue,
+                       $GLOBALS[$globalKey],
                        'Global failed to correctly set'
                );
 
                $this->tearDown();
 
                $this->assertEquals(
-                       'foo',
-                       $GLOBALS[self::GLOBAL_KEY_EXISTING],
+                       self::$startGlobals[$globalKey],
+                       $GLOBALS[$globalKey],
                        'Global failed to be restored on tearDown'
                );
        }
 
        /**
+        * @dataProvider provideExistingKeysAndNewValues
+        *
         * @covers MediaWikiTestCase::stashMwGlobals
         * @covers MediaWikiTestCase::tearDown
         */
-       public function testStashedGlobalsAreRestoredOnTearDown() {
-               $this->stashMwGlobals( self::GLOBAL_KEY_EXISTING );
-               $GLOBALS[self::GLOBAL_KEY_EXISTING] = 'bar';
+       public function testStashedGlobalsAreRestoredOnTearDown( $globalKey, $newValue ) {
+               $this->stashMwGlobals( $globalKey );
+               $GLOBALS[$globalKey] = $newValue;
                $this->assertEquals(
-                       'bar',
-                       $GLOBALS[self::GLOBAL_KEY_EXISTING],
+                       $newValue,
+                       $GLOBALS[$globalKey],
                        'Global failed to correctly set'
                );
 
                $this->tearDown();
 
                $this->assertEquals(
-                       'foo',
-                       $GLOBALS[self::GLOBAL_KEY_EXISTING],
+                       self::$startGlobals[$globalKey],
+                       $GLOBALS[$globalKey],
                        'Global failed to be restored on tearDown'
                );
        }
index 288b527..b3c4bee 100644 (file)
@@ -21,7 +21,7 @@
                        function () {
                                mw.messagePoster.factory.register( TEST_MODEL, testMessagePosterConstructor );
                        },
-                       new RegExp( 'The content model \'' + TEST_MODEL + '\' is already registered.' ),
+                       new RegExp( 'Content model "' + TEST_MODEL + '" is already registered' ),
                        'Throws exception is same model is registered a second time'
                );
        } );