Merge "PrefixSearch: Implement searching in multiple namespaces"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 17 Sep 2016 04:13:13 +0000 (04:13 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 17 Sep 2016 04:13:13 +0000 (04:13 +0000)
143 files changed:
RELEASE-NOTES-1.28
autoload.php
docs/hooks.txt
includes/Defines.php
includes/DummyLinker.php
includes/EditPage.php
includes/GlobalFunctions.php
includes/Linker.php
includes/MWTimestamp.php
includes/MediaWiki.php
includes/OutputPage.php
includes/ServiceWiring.php
includes/Setup.php
includes/TemplatesOnThisPageFormatter.php [new file with mode: 0644]
includes/Title.php
includes/actions/InfoAction.php
includes/api/ApiEditPage.php
includes/api/ApiQueryBacklinksprop.php
includes/api/i18n/es.json
includes/auth/EmailNotificationSecondaryAuthenticationProvider.php
includes/auth/TemporaryPasswordPrimaryAuthenticationProvider.php
includes/cache/HTMLFileCache.php
includes/cache/MessageCache.php
includes/changes/RecentChange.php
includes/db/CloneDatabase.php
includes/db/Database.php
includes/db/DatabaseMssql.php
includes/db/DatabaseSqlite.php
includes/db/loadbalancer/LBFactory.php [deleted file]
includes/db/loadbalancer/LBFactoryMW.php [new file with mode: 0644]
includes/db/loadbalancer/LBFactoryMulti.php
includes/db/loadbalancer/LBFactorySimple.php
includes/debug/MWDebug.php
includes/deferred/AtomicSectionUpdate.php
includes/deferred/AutoCommitUpdate.php
includes/deferred/LinksUpdate.php
includes/deferred/MWCallableUpdate.php
includes/exception/MWExceptionRenderer.php
includes/exception/TimestampException.php [deleted file]
includes/filerepo/LocalRepo.php
includes/filerepo/file/LocalFile.php
includes/installer/DatabaseInstaller.php
includes/installer/DatabaseUpdater.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueGroup.php
includes/jobqueue/jobs/RecentChangesUpdateJob.php
includes/jobqueue/utils/PurgeJobUtils.php
includes/libs/StatusValue.php
includes/libs/objectcache/WinCacheBagOStuff.php
includes/libs/rdbms/chronologyprotector/ChronologyProtector.php
includes/libs/rdbms/database/DBConnRef.php
includes/libs/rdbms/database/IDatabase.php
includes/libs/rdbms/defines.php [new file with mode: 0644]
includes/libs/rdbms/lbfactory/LBFactory.php [new file with mode: 0644]
includes/libs/rdbms/loadbalancer/LoadBalancer.php
includes/libs/rdbms/loadmonitor/ILoadMonitor.php [new file with mode: 0644]
includes/libs/rdbms/loadmonitor/LoadMonitor.php
includes/libs/rdbms/loadmonitor/LoadMonitorMySQL.php
includes/libs/rdbms/loadmonitor/LoadMonitorNull.php
includes/libs/time/ConvertableTimestamp.php [new file with mode: 0644]
includes/libs/time/TimestampException.php [new file with mode: 0644]
includes/libs/time/defines.php [new file with mode: 0644]
includes/page/Article.php
includes/page/WikiPage.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderContext.php
includes/resourceloader/ResourceLoaderModule.php
includes/revisiondelete/RevDelList.php
includes/search/AugmentPageProps.php [new file with mode: 0644]
includes/search/PerRowAugmentor.php [new file with mode: 0644]
includes/search/ResultAugmentor.php [new file with mode: 0644]
includes/search/ResultSetAugmentor.php [new file with mode: 0644]
includes/search/SearchEngine.php
includes/search/SearchEngineFactory.php
includes/search/SearchNearMatchResultSet.php
includes/search/SearchResult.php
includes/search/SearchResultSet.php
includes/search/SqlSearchResultSet.php
includes/specials/SpecialSearch.php
includes/user/User.php
includes/user/UserRightsProxy.php
jsduck.json
languages/i18n/ar.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bs.json
languages/i18n/de.json
languages/i18n/diq.json
languages/i18n/egl.json
languages/i18n/en.json
languages/i18n/eo.json
languages/i18n/es.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/gl.json
languages/i18n/gu.json
languages/i18n/he.json
languages/i18n/ia.json
languages/i18n/it.json
languages/i18n/jv.json
languages/i18n/kiu.json
languages/i18n/ko.json
languages/i18n/lb.json
languages/i18n/lv.json
languages/i18n/nb.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/ru.json
languages/i18n/sk.json
languages/i18n/sl.json
languages/i18n/ta.json
languages/i18n/tcy.json
languages/i18n/tr.json
languages/i18n/uk.json
languages/i18n/ur.json
languages/i18n/zh-hans.json
languages/messages/MessagesLzh.php
maintenance/Maintenance.php
maintenance/benchmarks/benchmarkParse.php
maintenance/doMaintenance.php
resources/Resources.php
resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.head-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.head-rtl.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png [new file with mode: 0644]
resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png [new file with mode: 0644]
resources/src/jquery/jquery.arrowSteps.css [new file with mode: 0644]
resources/src/jquery/jquery.arrowSteps.js [new file with mode: 0644]
resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js
resources/src/mediawiki/mediawiki.js
resources/src/mediawiki/mediawiki.user.js
tests/phpunit/includes/MWTimestampTest.php
tests/phpunit/includes/api/ApiQueryAllPagesTest.php
tests/phpunit/includes/api/query/ApiQueryRevisionsTest.php
tests/phpunit/includes/db/DatabaseTest.php
tests/phpunit/includes/db/LBFactoryTest.php
tests/phpunit/includes/libs/time/ConvertableTimestampTest.php [new file with mode: 0644]
tests/phpunit/includes/page/WikiPageTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/search/SearchEngineTest.php
tests/phpunit/includes/user/UserTest.php
tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js

index dfa482a..c3a91c4 100644 (file)
@@ -144,6 +144,7 @@ changes to languages because of Phabricator reports.
   MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
   were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
   respectively. See docs/hooks.txt for the specific changes needed for those hooks.
+* Linker::formatSize() was deprecated. Use Language::formatSize() directly.
 * Aliases for Linker methods, deprecated since 1.21, were removed from Skin:
   * Skin::commentBlock() (use Linker::commentBlock() instead)
   * Skin::generateRollback() (use Linker::generateRollback() instead)
@@ -170,7 +171,7 @@ changes to languages because of Phabricator reports.
   phpunit.php: --regex and --keep-uploads. Instead of --regex, use --filter.
   Instead of --keep-uploads, use the same option to parserTests.php, but you
   must specify a directory with --upload-dir.
-* The 'jquery.arrowSteps' ResourceLoader module was removed.
+* The 'jquery.arrowSteps' ResourceLoader module is now deprecated.
 
 == Compatibility ==
 
index d46d2ce..5cd1b91 100644 (file)
@@ -153,6 +153,7 @@ $wgAutoloadLocalClasses = [
        'AtomFeed' => __DIR__ . '/includes/Feed.php',
        'AtomicSectionUpdate' => __DIR__ . '/includes/deferred/AtomicSectionUpdate.php',
        'AttachLatest' => __DIR__ . '/maintenance/attachLatest.php',
+       'AugmentPageProps' => __DIR__ . '/includes/search/AugmentPageProps.php',
        'AuthManagerSpecialPage' => __DIR__ . '/includes/specialpage/AuthManagerSpecialPage.php',
        'AuthPlugin' => __DIR__ . '/includes/AuthPlugin.php',
        'AuthPluginUser' => __DIR__ . '/includes/AuthPlugin.php',
@@ -280,6 +281,7 @@ $wgAutoloadLocalClasses = [
        'ConvertExtensionToRegistration' => __DIR__ . '/maintenance/convertExtensionToRegistration.php',
        'ConvertLinks' => __DIR__ . '/maintenance/convertLinks.php',
        'ConvertUserOptions' => __DIR__ . '/maintenance/convertUserOptions.php',
+       'ConvertableTimestamp' => __DIR__ . '/includes/libs/time/ConvertableTimestamp.php',
        'ConverterRule' => __DIR__ . '/languages/ConverterRule.php',
        'Cookie' => __DIR__ . '/includes/libs/Cookie.php',
        'CookieJar' => __DIR__ . '/includes/libs/CookieJar.php',
@@ -582,6 +584,7 @@ $wgAutoloadLocalClasses = [
        'IExpiringStore' => __DIR__ . '/includes/libs/objectcache/IExpiringStore.php',
        'IJobSpecification' => __DIR__ . '/includes/jobqueue/JobSpecification.php',
        'ILoadBalancer' => __DIR__ . '/includes/libs/rdbms/loadbalancer/ILoadBalancer.php',
+       'ILoadMonitor' => __DIR__ . '/includes/libs/rdbms/loadmonitor/ILoadMonitor.php',
        'IP' => __DIR__ . '/includes/utils/IP.php',
        'IPSet' => __DIR__ . '/includes/compat/IPSetCompat.php',
        'IPTC' => __DIR__ . '/includes/media/IPTC.php',
@@ -653,7 +656,8 @@ $wgAutoloadLocalClasses = [
        'JsonContentHandler' => __DIR__ . '/includes/content/JsonContentHandler.php',
        'KkConverter' => __DIR__ . '/languages/classes/LanguageKk.php',
        'KuConverter' => __DIR__ . '/languages/classes/LanguageKu.php',
-       'LBFactory' => __DIR__ . '/includes/db/loadbalancer/LBFactory.php',
+       'LBFactory' => __DIR__ . '/includes/libs/rdbms/lbfactory/LBFactory.php',
+       'LBFactoryMW' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMW.php',
        'LBFactoryMulti' => __DIR__ . '/includes/db/loadbalancer/LBFactoryMulti.php',
        'LBFactorySimple' => __DIR__ . '/includes/db/loadbalancer/LBFactorySimple.php',
        'LBFactorySingle' => __DIR__ . '/includes/db/loadbalancer/LBFactorySingle.php',
@@ -1042,6 +1046,7 @@ $wgAutoloadLocalClasses = [
        'PatrolLog' => __DIR__ . '/includes/logging/PatrolLog.php',
        'PatrolLogFormatter' => __DIR__ . '/includes/logging/PatrolLogFormatter.php',
        'Pbkdf2Password' => __DIR__ . '/includes/password/Pbkdf2Password.php',
+       'PerRowAugmentor' => __DIR__ . '/includes/search/PerRowAugmentor.php',
        'PermissionsError' => __DIR__ . '/includes/exception/PermissionsError.php',
        'PhpHttpRequest' => __DIR__ . '/includes/HttpFunctions.php',
        'PhpXmlBugTester' => __DIR__ . '/includes/installer/PhpBugTests.php',
@@ -1181,6 +1186,8 @@ $wgAutoloadLocalClasses = [
        'ResourceLoaderUserTokensModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderUserTokensModule.php',
        'ResourceLoaderWikiModule' => __DIR__ . '/includes/resourceloader/ResourceLoaderWikiModule.php',
        'RestbaseVirtualRESTService' => __DIR__ . '/includes/libs/virtualrest/RestbaseVirtualRESTService.php',
+       'ResultAugmentor' => __DIR__ . '/includes/search/ResultAugmentor.php',
+       'ResultSetAugmentor' => __DIR__ . '/includes/search/ResultSetAugmentor.php',
        'ResultWrapper' => __DIR__ . '/includes/libs/rdbms/database/resultwrapper/ResultWrapper.php',
        'RevDelArchiveItem' => __DIR__ . '/includes/revisiondelete/RevDelArchiveItem.php',
        'RevDelArchiveList' => __DIR__ . '/includes/revisiondelete/RevDelArchiveList.php',
@@ -1397,6 +1404,7 @@ $wgAutoloadLocalClasses = [
        'TempFSFile' => __DIR__ . '/includes/filebackend/TempFSFile.php',
        'TempFileRepo' => __DIR__ . '/includes/filerepo/FileRepo.php',
        'TemplateParser' => __DIR__ . '/includes/TemplateParser.php',
+       'TemplatesOnThisPageFormatter' => __DIR__ . '/includes/TemplatesOnThisPageFormatter.php',
        'TestFileOpPerformance' => __DIR__ . '/maintenance/fileOpPerfTest.php',
        'TextContent' => __DIR__ . '/includes/content/TextContent.php',
        'TextContentHandler' => __DIR__ . '/includes/content/TextContentHandler.php',
@@ -1408,7 +1416,7 @@ $wgAutoloadLocalClasses = [
        'ThumbnailRenderJob' => __DIR__ . '/includes/jobqueue/jobs/ThumbnailRenderJob.php',
        'TidyUpBug37714' => __DIR__ . '/maintenance/tidyUpBug37714.php',
        'TiffHandler' => __DIR__ . '/includes/media/Tiff.php',
-       'TimestampException' => __DIR__ . '/includes/exception/TimestampException.php',
+       'TimestampException' => __DIR__ . '/includes/libs/time/TimestampException.php',
        'Timing' => __DIR__ . '/includes/libs/Timing.php',
        'Title' => __DIR__ . '/includes/Title.php',
        'TitleArray' => __DIR__ . '/includes/TitleArray.php',
index a7fb873..ae0770b 100644 (file)
@@ -2699,6 +2699,13 @@ $page: WikiPage that is being indexed
 $output: ParserOutput that is produced from the page
 $engine: SearchEngine for which the indexing is intended
 
+'SearchResultsAugment': Allows extension to add its code to the list of search
+result augmentors.
+&$setAugmentors: List of whole-set augmentor objects, must implement ResultSetAugmentor
+&$rowAugmentors: List of per-row augmentor objects, must implement ResultAugmentor.
+Note that lists should be in the format name => object and the names in both lists should
+be distinct.
+
 'SecondaryDataUpdates': Allows modification of the list of DataUpdates to
 perform when page content is modified. Currently called by
 AbstractContent::getSecondaryDataUpdates.
index ab02a8e..077f39a 100644 (file)
  * @defgroup Constants MediaWiki constants
  */
 
-/**@{
- * Database related constants
- */
-define( 'DBO_DEBUG', 1 );
-define( 'DBO_NOBUFFER', 2 );
-define( 'DBO_IGNORE', 4 );
-define( 'DBO_TRX', 8 ); // automatically start transaction on first query
-define( 'DBO_DEFAULT', 16 );
-define( 'DBO_PERSISTENT', 32 );
-define( 'DBO_SYSDBA', 64 ); // for oracle maintenance
-define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
-define( 'DBO_SSL', 256 );
-define( 'DBO_COMPRESS', 512 );
-/**@}*/
-
-/**@{
- * Valid database indexes
- * Operation-based indexes
- */
-define( 'DB_REPLICA', -1 );     # Read from a replica (or only server)
-define( 'DB_MASTER', -2 );    # Write to master (or only server)
-/**@}*/
-
 # Obsolete aliases
 define( 'DB_SLAVE', -1 );
 
@@ -185,16 +162,10 @@ define( 'EDIT_AUTOSUMMARY', 64 );
 define( 'EDIT_INTERNAL', 128 );
 /**@}*/
 
-/**@{
- * Flags for Database::makeList()
- * These are also available as Database class constants
+/**
+ * Database related
  */
-define( 'LIST_COMMA', 0 );
-define( 'LIST_AND', 1 );
-define( 'LIST_SET', 2 );
-define( 'LIST_NAMES', 3 );
-define( 'LIST_OR', 4 );
-/**@}*/
+require_once __DIR__ . '/libs/rdbms/defines.php';
 
 /**
  * Unicode and normalisation related
index ba24799..fc94a63 100644 (file)
@@ -453,12 +453,17 @@ class DummyLinker {
                );
        }
 
+       /**
+        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
+        */
        public function formatTemplates(
                $templates,
                $preview = false,
                $section = false,
                $more = null
        ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                return Linker::formatTemplates(
                        $templates,
                        $preview,
@@ -471,7 +476,12 @@ class DummyLinker {
                return Linker::formatHiddenCategories( $hiddencats );
        }
 
+       /**
+        * @deprecated since 1.28, use Language::formatSize() directly
+        */
        public function formatSize( $size ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                return Linker::formatSize( $size );
        }
 
index 140cd72..606b4cd 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 
 /**
  * The edit page/HTML interface (split from Article)
@@ -577,7 +578,7 @@ class EditPage {
                        ) {
                                $this->displayViewSourcePage(
                                        $this->getContentObject(),
-                                       wfMessage(
+                                       $this->context->msg(
                                                'contentmodelediterror',
                                                $revision->getContentModel(),
                                                $this->contentModel
@@ -714,7 +715,7 @@ class EditPage {
                Hooks::run( 'EditPage::showReadOnlyForm:initial', [ $this, &$wgOut ] );
 
                $wgOut->setRobotPolicy( 'noindex,nofollow' );
-               $wgOut->setPageTitle( wfMessage(
+               $wgOut->setPageTitle( $this->context->msg(
                        'viewsource-title',
                        $this->getContextTitle()->getPrefixedText()
                ) );
@@ -747,8 +748,7 @@ class EditPage {
                $this->showTextbox( $text, 'wpTextbox1', [ 'readonly' ] );
                $wgOut->addHTML( $this->editFormTextAfterContent );
 
-               $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
-                       Linker::formatTemplates( $this->getTemplates() ) ) );
+               $wgOut->addHTML( $this->makeTemplatesOnThisPageList( $this->getTemplates() ) );
 
                $wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
@@ -1178,12 +1178,12 @@ class EditPage {
                                                                if ( $firstrev && $firstrev->getId() == $undo ) {
                                                                        $userText = $undorev->getUserText();
                                                                        if ( $userText === '' ) {
-                                                                               $undoSummary = wfMessage(
+                                                                               $undoSummary = $this->context->msg(
                                                                                        'undo-summary-username-hidden',
                                                                                        $undo
                                                                                )->inContentLanguage()->text();
                                                                        } else {
-                                                                               $undoSummary = wfMessage(
+                                                                               $undoSummary = $this->context->msg(
                                                                                        'undo-summary',
                                                                                        $undo,
                                                                                        $userText
@@ -1192,7 +1192,7 @@ class EditPage {
                                                                        if ( $this->summary === '' ) {
                                                                                $this->summary = $undoSummary;
                                                                        } else {
-                                                                               $this->summary = $undoSummary . wfMessage( 'colon-separator' )
+                                                                               $this->summary = $undoSummary . $this->context->msg( 'colon-separator' )
                                                                                        ->inContentLanguage()->text() . $this->summary;
                                                                        }
                                                                        $this->undidRev = $undo;
@@ -1210,7 +1210,7 @@ class EditPage {
                                        // Messages: undo-success, undo-failure, undo-norev, undo-nochange
                                        $class = ( $undoMsg == 'success' ? '' : 'error ' ) . "mw-undo-{$undoMsg}";
                                        $this->editFormPageTop .= $wgOut->parse( "<div class=\"{$class}\">" .
-                                               wfMessage( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
+                                               $this->context->msg( 'undo-' . $undoMsg )->plain() . '</div>', true, /* interface */true );
                                }
 
                                if ( $content === false ) {
@@ -1674,7 +1674,7 @@ class EditPage {
                        // passed.
                        if ( $this->summary === '' ) {
                                $cleanSectionTitle = $wgParser->stripSectionName( $this->sectiontitle );
-                               return wfMessage( 'newsectionsummary' )
+                               return $this->context->msg( 'newsectionsummary' )
                                        ->rawParams( $cleanSectionTitle )->inContentLanguage()->text();
                        }
                } elseif ( $this->summary !== '' ) {
@@ -1682,7 +1682,7 @@ class EditPage {
                        # This is a new section, so create a link to the new section
                        # in the revision summary.
                        $cleanSummary = $wgParser->stripSectionName( $this->summary );
-                       return wfMessage( 'newsectionsummary' )
+                       return $this->context->msg( 'newsectionsummary' )
                                ->rawParams( $cleanSummary )->inContentLanguage()->text();
                }
                return $this->summary;
@@ -2357,7 +2357,7 @@ class EditPage {
                if ( $displayTitle === false ) {
                        $displayTitle = $contextTitle->getPrefixedText();
                }
-               $wgOut->setPageTitle( wfMessage( $msg, $displayTitle ) );
+               $wgOut->setPageTitle( $this->context->msg( $msg, $displayTitle ) );
                # Transmit the name of the message to JavaScript for live preview
                # Keep Resources.php/mediawiki.action.edit.preview in sync with the possible keys
                $wgOut->addJsConfigVars( [
@@ -2442,7 +2442,7 @@ class EditPage {
                # Try to add a custom edit intro, or use the standard one if this is not possible.
                if ( !$this->showCustomIntro() && !$this->mTitle->exists() ) {
                        $helpLink = wfExpandUrl( Skin::makeInternalOrExternalUrl(
-                               wfMessage( 'helppage' )->inContentLanguage()->text()
+                               $this->context->msg( 'helppage' )->inContentLanguage()->text()
                        ) );
                        if ( $wgUser->isLoggedIn() ) {
                                $wgOut->wrapWikiMsg(
@@ -2632,7 +2632,7 @@ class EditPage {
                        . Html::rawElement(
                                'label',
                                [ 'for' => 'wpAntispam' ],
-                               wfMessage( 'simpleantispam-label' )->parse()
+                               $this->context->msg( 'simpleantispam-label' )->parse()
                        )
                        . Xml::element(
                                'input',
@@ -2662,8 +2662,8 @@ class EditPage {
                                : 'confirmrecreate';
                        $wgOut->addHTML(
                                '<div class="mw-confirm-recreate">' .
-                                       wfMessage( $key, $username, "<nowiki>$comment</nowiki>" )->parse() .
-                               Xml::checkLabel( wfMessage( 'recreate' )->text(), 'wpRecreate', 'wpRecreate', false,
+                                       $this->context->msg( $key, $username, "<nowiki>$comment</nowiki>" )->parse() .
+                               Xml::checkLabel( $this->context->msg( 'recreate' )->text(), 'wpRecreate', 'wpRecreate', false,
                                        [ 'title' => Linker::titleAttrib( 'recreate' ), 'tabindex' => 1, 'id' => 'wpRecreate' ]
                                ) .
                                '</div>'
@@ -2752,8 +2752,7 @@ class EditPage {
 
                $wgOut->addHTML( $this->editFormTextAfterTools . "\n" );
 
-               $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
-                       Linker::formatTemplates( $this->getTemplates(), $this->preview, $this->section != '' ) ) );
+               $wgOut->addHTML( $this->makeTemplatesOnThisPageList( $this->getTemplates() ) );
 
                $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 'hiddencats' ],
                        Linker::formatHiddenCategories( $this->page->getHiddenCategories() ) ) );
@@ -2769,7 +2768,7 @@ class EditPage {
                                $this->showConflict();
                        } catch ( MWContentSerializationException $ex ) {
                                // this can't really happen, but be nice if it does.
-                               $msg = wfMessage(
+                               $msg = $this->context->msg(
                                        'content-failed-to-parse',
                                        $this->contentModel,
                                        $this->contentFormat,
@@ -2802,6 +2801,32 @@ class EditPage {
 
        }
 
+       /**
+        * Wrapper around TemplatesOnThisPageFormatter to make
+        * a "templates on this page" list.
+        *
+        * @param Title[] $templates
+        * @return string HTML
+        */
+       protected function makeTemplatesOnThisPageList( array $templates ) {
+               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                       $this->context, MediaWikiServices::getInstance()->getLinkRenderer()
+               );
+
+               // preview if preview, else section if section, else false
+               $type = false;
+               if ( $this->preview ) {
+                       $type = 'preview';
+               } elseif ( $this->section != '' ) {
+                       $type = 'section';
+               }
+
+               return Html::rawElement( 'div', [ 'class' => 'templatesUsed' ],
+                       $templateListFormatter->format( $templates, $type )
+               );
+
+       }
+
        /**
         * Extract the section title from current section text, if any.
         *
@@ -2834,7 +2859,7 @@ class EditPage {
                if ( count( $editNotices ) ) {
                        $wgOut->addHTML( implode( "\n", $editNotices ) );
                } else {
-                       $msg = wfMessage( 'editnotice-notext' );
+                       $msg = $this->context->msg( 'editnotice-notext' );
                        if ( !$msg->isDisabled() ) {
                                $wgOut->addHTML(
                                        '<div class="mw-editnotice-notext">'
@@ -3029,7 +3054,7 @@ class EditPage {
                                ]
                        );
                } else {
-                       if ( !wfMessage( 'longpage-hint' )->isDisabled() ) {
+                       if ( !$this->context->msg( 'longpage-hint' )->isDisabled() ) {
                                $wgOut->wrapWikiMsg( "<div id='mw-edit-longpage-hint'>\n$1\n</div>",
                                        [
                                                'longpage-hint',
@@ -3110,7 +3135,7 @@ class EditPage {
                                return;
                        }
                }
-               $labelText = wfMessage( $isSubjectPreview ? 'subject' : 'summary' )->parse();
+               $labelText = $this->context->msg( $isSubjectPreview ? 'subject' : 'summary' )->parse();
                list( $label, $input ) = $this->getSummaryInput(
                        $summary,
                        $labelText,
@@ -3137,13 +3162,14 @@ class EditPage {
                global $wgParser;
 
                if ( $isSubjectPreview ) {
-                       $summary = wfMessage( 'newsectionsummary' )->rawParams( $wgParser->stripSectionName( $summary ) )
+                       $summary = $this->context->msg( 'newsectionsummary' )
+                               ->rawParams( $wgParser->stripSectionName( $summary ) )
                                ->inContentLanguage()->text();
                }
 
                $message = $isSubjectPreview ? 'subject-preview' : 'summary-preview';
 
-               $summary = wfMessage( $message )->parse()
+               $summary = $this->context->msg( $message )->parse()
                        . Linker::commentBlock( $summary, $this->mTitle, $isSubjectPreview );
                return Xml::tags( 'div', [ 'class' => 'mw-summary-preview' ], $summary );
        }
@@ -3308,7 +3334,7 @@ HTML
                        try {
                                $this->showDiff();
                        } catch ( MWContentSerializationException $ex ) {
-                               $msg = wfMessage(
+                               $msg = $this->context->msg(
                                        'content-failed-to-parse',
                                        $this->contentModel,
                                        $this->contentFormat,
@@ -3383,8 +3409,8 @@ HTML
                }
 
                if ( ( $oldContent && !$oldContent->isEmpty() ) || ( $newContent && !$newContent->isEmpty() ) ) {
-                       $oldtitle = wfMessage( $oldtitlemsg )->parse();
-                       $newtitle = wfMessage( 'yourtext' )->parse();
+                       $oldtitle = $this->context->msg( $oldtitlemsg )->parse();
+                       $newtitle = $this->context->msg( 'yourtext' )->parse();
 
                        if ( !$oldContent ) {
                                $oldContent = $newContent->getContentHandler()->makeEmptyContent();
@@ -3411,7 +3437,7 @@ HTML
         */
        protected function showHeaderCopyrightWarning() {
                $msg = 'editpage-head-copy-warn';
-               if ( !wfMessage( $msg )->isDisabled() ) {
+               if ( !$this->context->msg( $msg )->isDisabled() ) {
                        global $wgOut;
                        $wgOut->wrapWikiMsg( "<div class='editpage-head-copywarn'>\n$1\n</div>",
                                'editpage-head-copy-warn' );
@@ -3429,7 +3455,7 @@ HTML
        protected function showTosSummary() {
                $msg = 'editpage-tos-summary';
                Hooks::run( 'EditPageTosSummary', [ $this->mTitle, &$msg ] );
-               if ( !wfMessage( $msg )->isDisabled() ) {
+               if ( !$this->context->msg( $msg )->isDisabled() ) {
                        global $wgOut;
                        $wgOut->addHTML( '<div class="mw-tos-summary">' );
                        $wgOut->addWikiMsg( $msg );
@@ -3440,7 +3466,7 @@ HTML
        protected function showEditTools() {
                global $wgOut;
                $wgOut->addHTML( '<div class="mw-editTools">' .
-                       wfMessage( 'edittools' )->inContentLanguage()->parse() .
+                       $this->context->msg( 'edittools' )->inContentLanguage()->parse() .
                        '</div>' );
        }
 
@@ -3475,7 +3501,7 @@ HTML
                Hooks::run( 'EditPageCopyrightWarning', [ $title, &$copywarnMsg ] );
 
                return "<div id=\"editpage-copywarn\">\n" .
-                       call_user_func_array( 'wfMessage', $copywarnMsg )->$format() . "\n</div>";
+                       call_user_func_array( 'wfMessage', $copywarnMsg )->title( $title )->$format() . "\n</div>";
        }
 
        /**
@@ -3522,19 +3548,19 @@ HTML
                if ( $cancel !== '' ) {
                        $cancel .= Html::element( 'span',
                                [ 'class' => 'mw-editButtons-pipe-separator' ],
-                               wfMessage( 'pipe-separator' )->text() );
+                               $this->context->msg( 'pipe-separator' )->text() );
                }
 
-               $message = wfMessage( 'edithelppage' )->inContentLanguage()->text();
+               $message = $this->context->msg( 'edithelppage' )->inContentLanguage()->text();
                $edithelpurl = Skin::makeInternalOrExternalUrl( $message );
                $attrs = [
                        'target' => 'helpwindow',
                        'href' => $edithelpurl,
                ];
-               $edithelp = Html::linkButton( wfMessage( 'edithelp' )->text(),
+               $edithelp = Html::linkButton( $this->context->msg( 'edithelp' )->text(),
                        $attrs, [ 'mw-ui-quiet' ] ) .
-                       wfMessage( 'word-separator' )->escaped() .
-                       wfMessage( 'newwindow' )->parse();
+                       $this->context->msg( 'word-separator' )->escaped() .
+                       $this->context->msg( 'newwindow' )->parse();
 
                $wgOut->addHTML( "      <span class='cancelLink'>{$cancel}</span>\n" );
                $wgOut->addHTML( "      <span class='editHelp'>{$edithelp}</span>\n" );
@@ -3572,8 +3598,8 @@ HTML
                        $de = $handler->createDifferenceEngine( $this->mArticle->getContext() );
                        $de->setContent( $content2, $content1 );
                        $de->showDiff(
-                               wfMessage( 'yourtext' )->parse(),
-                               wfMessage( 'storedversion' )->text()
+                               $this->context->msg( 'yourtext' )->parse(),
+                               $this->context->msg( 'storedversion' )->text()
                        );
 
                        $wgOut->wrapWikiMsg( '<h2>$1</h2>', "yourtext" );
@@ -3595,7 +3621,7 @@ HTML
 
                return Linker::linkKnown(
                        $this->getContextTitle(),
-                       wfMessage( 'cancel' )->parse(),
+                       $this->context->msg( 'cancel' )->parse(),
                        Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ),
                        $cancelParams
                );
@@ -3672,11 +3698,11 @@ HTML
                // Quick paranoid permission checks...
                if ( is_object( $data ) ) {
                        if ( $data->log_deleted & LogPage::DELETED_USER ) {
-                               $data->user_name = wfMessage( 'rev-deleted-user' )->escaped();
+                               $data->user_name = $this->context->msg( 'rev-deleted-user' )->escaped();
                        }
 
                        if ( $data->log_deleted & LogPage::DELETED_COMMENT ) {
-                               $data->log_comment = wfMessage( 'rev-deleted-comment' )->escaped();
+                               $data->log_comment = $this->context->msg( 'rev-deleted-comment' )->escaped();
                        }
                }
 
@@ -3703,7 +3729,8 @@ HTML
                                // string, which happens when you initially edit
                                // a category page, due to automatic preview-on-open.
                                $parsedNote = $wgOut->parse( "<div class='previewnote'>" .
-                                       wfMessage( 'session_fail_preview_html' )->text() . "</div>", true, /* interface */true );
+                                       $this->context->msg( 'session_fail_preview_html' )->text() . "</div>",
+                                       true, /* interface */true );
                        }
                        $stats->increment( 'edit.failures.session_loss' );
                        return $parsedNote;
@@ -3725,22 +3752,22 @@ HTML
                        # provide a anchor link to the editform
                        $continueEditing = '<span class="mw-continue-editing">' .
                                '[[#' . self::EDITFORM_ID . '|' . $wgLang->getArrow() . ' ' .
-                               wfMessage( 'continue-editing' )->text() . ']]</span>';
+                               $this->context->msg( 'continue-editing' )->text() . ']]</span>';
                        if ( $this->mTriedSave && !$this->mTokenOk ) {
                                if ( $this->mTokenOkExceptSuffix ) {
-                                       $note = wfMessage( 'token_suffix_mismatch' )->plain();
+                                       $note = $this->context->msg( 'token_suffix_mismatch' )->plain();
                                        $stats->increment( 'edit.failures.bad_token' );
                                } else {
-                                       $note = wfMessage( 'session_fail_preview' )->plain();
+                                       $note = $this->context->msg( 'session_fail_preview' )->plain();
                                        $stats->increment( 'edit.failures.session_loss' );
                                }
                        } elseif ( $this->incompleteForm ) {
-                               $note = wfMessage( 'edit_form_incomplete' )->plain();
+                               $note = $this->context->msg( 'edit_form_incomplete' )->plain();
                                if ( $this->mTriedSave ) {
                                        $stats->increment( 'edit.failures.incomplete_form' );
                                }
                        } else {
-                               $note = wfMessage( 'previewnote' )->plain() . ' ' . $continueEditing;
+                               $note = $this->context->msg( 'previewnote' )->plain() . ' ' . $continueEditing;
                        }
 
                        # don't parse non-wikitext pages, show message about preview
@@ -3771,7 +3798,7 @@ HTML
                                # Messages: usercsspreview, userjspreview, sitecsspreview, sitejspreview
                                if ( $level && $format ) {
                                        $note = "<div id='mw-{$level}{$format}preview'>" .
-                                               wfMessage( "{$level}{$format}preview" )->text() .
+                                               $this->context->msg( "{$level}{$format}preview" )->text() .
                                                ' ' . $continueEditing . "</div>";
                                }
                        }
@@ -3797,7 +3824,7 @@ HTML
                        }
 
                } catch ( MWContentSerializationException $ex ) {
-                       $m = wfMessage(
+                       $m = $this->context->msg(
                                'content-failed-to-parse',
                                $this->contentModel,
                                $this->contentFormat,
@@ -3809,13 +3836,13 @@ HTML
 
                if ( $this->isConflict ) {
                        $conflict = '<h2 id="mw-previewconflict">'
-                               . wfMessage( 'previewconflict' )->escaped() . "</h2>\n";
+                               . $this->context->msg( 'previewconflict' )->escaped() . "</h2>\n";
                } else {
                        $conflict = '<hr />';
                }
 
                $previewhead = "<div class='previewnote'>\n" .
-                       '<h2 id="mw-previewheader">' . wfMessage( 'preview' )->escaped() . "</h2>" .
+                       '<h2 id="mw-previewheader">' . $this->context->msg( 'preview' )->escaped() . "</h2>" .
                        $wgOut->parse( $note, true, /* interface */true ) . $conflict . "</div>\n";
 
                $pageViewLang = $this->mTitle->getPageViewLanguage();
@@ -4035,11 +4062,11 @@ HTML
                // don't show the minor edit checkbox if it's a new page or section
                if ( !$this->isNew ) {
                        $checkboxes['minor'] = '';
-                       $minorLabel = wfMessage( 'minoredit' )->parse();
+                       $minorLabel = $this->context->msg( 'minoredit' )->parse();
                        if ( $wgUser->isAllowed( 'minoredit' ) ) {
                                $attribs = [
                                        'tabindex' => ++$tabindex,
-                                       'accesskey' => wfMessage( 'accesskey-minoredit' )->text(),
+                                       'accesskey' => $this->context->msg( 'accesskey-minoredit' )->text(),
                                        'id' => 'wpMinoredit',
                                ];
                                $minorEditHtml =
@@ -4058,12 +4085,12 @@ HTML
                        }
                }
 
-               $watchLabel = wfMessage( 'watchthis' )->parse();
+               $watchLabel = $this->context->msg( 'watchthis' )->parse();
                $checkboxes['watch'] = '';
                if ( $wgUser->isLoggedIn() ) {
                        $attribs = [
                                'tabindex' => ++$tabindex,
-                               'accesskey' => wfMessage( 'accesskey-watch' )->text(),
+                               'accesskey' => $this->context->msg( 'accesskey-watch' )->text(),
                                'id' => 'wpWatchthis',
                        ];
                        $watchThisHtml =
@@ -4103,7 +4130,7 @@ HTML
                } else {
                        $buttonLabelKey = !$this->mTitle->exists() ? 'savearticle' : 'savechanges';
                }
-               $buttonLabel = wfMessage( $buttonLabelKey )->text();
+               $buttonLabel = $this->context->msg( $buttonLabelKey )->text();
                $attribs = [
                        'id' => 'wpSave',
                        'name' => 'wpSave',
@@ -4117,7 +4144,7 @@ HTML
                        'name' => 'wpPreview',
                        'tabindex' => $tabindex,
                ] + Linker::tooltipAndAccesskeyAttribs( 'preview' );
-               $buttons['preview'] = Html::submitButton( wfMessage( 'showpreview' )->text(),
+               $buttons['preview'] = Html::submitButton( $this->context->msg( 'showpreview' )->text(),
                        $attribs );
                $buttons['live'] = '';
 
@@ -4126,7 +4153,7 @@ HTML
                        'name' => 'wpDiff',
                        'tabindex' => ++$tabindex,
                ] + Linker::tooltipAndAccesskeyAttribs( 'diff' );
-               $buttons['diff'] = Html::submitButton( wfMessage( 'showdiff' )->text(),
+               $buttons['diff'] = Html::submitButton( $this->context->msg( 'showdiff' )->text(),
                        $attribs );
 
                Hooks::run( 'EditPageBeforeEditButtons', [ &$this, &$buttons, &$tabindex ] );
@@ -4140,9 +4167,9 @@ HTML
        function noSuchSectionPage() {
                global $wgOut;
 
-               $wgOut->prepareErrorPage( wfMessage( 'nosuchsectiontitle' ) );
+               $wgOut->prepareErrorPage( $this->context->msg( 'nosuchsectiontitle' ) );
 
-               $res = wfMessage( 'nosuchsectiontext', $this->section )->parseAsBlock();
+               $res = $this->context->msg( 'nosuchsectiontext', $this->section )->parseAsBlock();
                Hooks::run( 'EditPageNoSuchSection', [ &$this, &$res ] );
                $wgOut->addHTML( $res );
 
@@ -4161,7 +4188,7 @@ HTML
                if ( is_array( $match ) ) {
                        $match = $wgLang->listToText( $match );
                }
-               $wgOut->prepareErrorPage( wfMessage( 'spamprotectiontitle' ) );
+               $wgOut->prepareErrorPage( $this->context->msg( 'spamprotectiontitle' ) );
 
                $wgOut->addHTML( '<div id="spamprotected">' );
                $wgOut->addWikiMsg( 'spamprotectiontext' );
index 0e59653..90bba53 100644 (file)
@@ -1992,56 +1992,7 @@ function wfRestoreWarnings() {
 
 # Autodetect, convert and provide timestamps of various types
 
-/**
- * Unix time - the number of seconds since 1970-01-01 00:00:00 UTC
- */
-define( 'TS_UNIX', 0 );
-
-/**
- * MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
- */
-define( 'TS_MW', 1 );
-
-/**
- * MySQL DATETIME (YYYY-MM-DD HH:MM:SS)
- */
-define( 'TS_DB', 2 );
-
-/**
- * RFC 2822 format, for E-mail and HTTP headers
- */
-define( 'TS_RFC2822', 3 );
-
-/**
- * ISO 8601 format with no timezone: 1986-02-09T20:00:00Z
- *
- * This is used by Special:Export
- */
-define( 'TS_ISO_8601', 4 );
-
-/**
- * An Exif timestamp (YYYY:MM:DD HH:MM:SS)
- *
- * @see http://exif.org/Exif2-2.PDF The Exif 2.2 spec, see page 28 for the
- *       DateTime tag and page 36 for the DateTimeOriginal and
- *       DateTimeDigitized tags.
- */
-define( 'TS_EXIF', 5 );
-
-/**
- * Oracle format time.
- */
-define( 'TS_ORACLE', 6 );
-
-/**
- * Postgres format time.
- */
-define( 'TS_POSTGRES', 7 );
-
-/**
- * ISO 8601 basic format with no timezone: 19860209T200000Z.  This is used by ResourceLoader
- */
-define( 'TS_ISO_8601_BASIC', 9 );
+require_once __DIR__ . '/libs/time/defines.php';
 
 /**
  * Get a timestamp string in one of various formats
index bcc348e..8682991 100644 (file)
@@ -1919,6 +1919,8 @@ class Linker {
        }
 
        /**
+        * @deprecated since 1.28, use TemplatesOnThisPageFormatter directly
+        *
         * Returns HTML for the "templates used on this page" list.
         *
         * Make an HTML list of templates, and then add a "More..." link at
@@ -1937,87 +1939,24 @@ class Linker {
        public static function formatTemplates( $templates, $preview = false,
                $section = false, $more = null
        ) {
-               global $wgLang;
-
-               $outText = '';
-               if ( count( $templates ) > 0 ) {
-                       # Do a batch existence check
-                       $batch = new LinkBatch;
-                       foreach ( $templates as $title ) {
-                               $batch->addObj( $title );
-                       }
-                       $batch->execute();
-
-                       # Construct the HTML
-                       $outText = '<div class="mw-templatesUsedExplanation">';
-                       if ( $preview ) {
-                               $outText .= wfMessage( 'templatesusedpreview' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       } elseif ( $section ) {
-                               $outText .= wfMessage( 'templatesusedsection' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       } else {
-                               $outText .= wfMessage( 'templatesused' )->numParams( count( $templates ) )
-                                       ->parseAsBlock();
-                       }
-                       $outText .= "</div><ul>\n";
-
-                       usort( $templates, 'Title::compare' );
-                       foreach ( $templates as $titleObj ) {
-                               $protected = '';
-                               $restrictions = $titleObj->getRestrictions( 'edit' );
-                               if ( $restrictions ) {
-                                       // Check backwards-compatible messages
-                                       $msg = null;
-                                       if ( $restrictions === [ 'sysop' ] ) {
-                                               $msg = wfMessage( 'template-protected' );
-                                       } elseif ( $restrictions === [ 'autoconfirmed' ] ) {
-                                               $msg = wfMessage( 'template-semiprotected' );
-                                       }
-                                       if ( $msg && !$msg->isDisabled() ) {
-                                               $protected = $msg->parse();
-                                       } else {
-                                               // Construct the message from restriction-level-*
-                                               // e.g. restriction-level-sysop, restriction-level-autoconfirmed
-                                               $msgs = [];
-                                               foreach ( $restrictions as $r ) {
-                                                       $msgs[] = wfMessage( "restriction-level-$r" )->parse();
-                                               }
-                                               $protected = wfMessage( 'parentheses' )
-                                                       ->rawParams( $wgLang->commaList( $msgs ) )->escaped();
-                                       }
-                               }
-                               if ( $titleObj->quickUserCan( 'edit' ) ) {
-                                       $editLink = self::link(
-                                               $titleObj,
-                                               wfMessage( 'editlink' )->escaped(),
-                                               [],
-                                               [ 'action' => 'edit' ]
-                                       );
-                               } else {
-                                       $editLink = self::link(
-                                               $titleObj,
-                                               wfMessage( 'viewsourcelink' )->escaped(),
-                                               [],
-                                               [ 'action' => 'edit' ]
-                                       );
-                               }
-                               $outText .= '<li>' . self::link( $titleObj )
-                                       . wfMessage( 'word-separator' )->escaped()
-                                       . wfMessage( 'parentheses' )->rawParams( $editLink )->escaped()
-                                       . wfMessage( 'word-separator' )->escaped()
-                                       . $protected . '</li>';
-                       }
+               wfDeprecated( __METHOD__, '1.28' );
 
-                       if ( $more instanceof Title ) {
-                               $outText .= '<li>' . self::link( $more, wfMessage( 'moredotdotdot' ) ) . '</li>';
-                       } elseif ( $more ) {
-                               $outText .= "<li>$more</li>";
-                       }
+               $type = false;
+               if ( $preview ) {
+                       $type = 'preview';
+               } elseif ( $section ) {
+                       $type = 'section';
+               }
 
-                       $outText .= '</ul>';
+               if ( $more instanceof Message ) {
+                       $more = $more->toString();
                }
-               return $outText;
+
+               $formatter = new TemplatesOnThisPageFormatter(
+                       RequestContext::getMain(),
+                       MediaWikiServices::getInstance()->getLinkRenderer()
+               );
+               return $formatter->format( $templates, $type, $more );
        }
 
        /**
@@ -2049,6 +1988,8 @@ class Linker {
        }
 
        /**
+        * @deprecated since 1.28, use Language::formatSize() directly
+        *
         * Format a size in bytes for output, using an appropriate
         * unit (B, KB, MB or GB) according to the magnitude in question
         *
@@ -2057,6 +1998,8 @@ class Linker {
         * @return string
         */
        public static function formatSize( $size ) {
+               wfDeprecated( __METHOD__, '1.28' );
+
                global $wgLang;
                return htmlspecialchars( $wgLang->formatSize( $size ) );
        }
index defdc96..201e9b6 100644 (file)
  *
  * @since 1.20
  */
-class MWTimestamp {
+class MWTimestamp extends ConvertableTimestamp {
        /**
-        * Standard gmdate() formats for the different timestamp types.
-        */
-       private static $formats = [
-               TS_UNIX => 'U',
-               TS_MW => 'YmdHis',
-               TS_DB => 'Y-m-d H:i:s',
-               TS_ISO_8601 => 'Y-m-d\TH:i:s\Z',
-               TS_ISO_8601_BASIC => 'Ymd\THis\Z',
-               TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness
-               TS_RFC2822 => 'D, d M Y H:i:s',
-               TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
-               TS_POSTGRES => 'Y-m-d H:i:s',
-       ];
-
-       /**
-        * The actual timestamp being wrapped (DateTime object).
-        * @var DateTime
-        */
-       public $timestamp;
-
-       /**
-        * Make a new timestamp and set it to the specified time,
-        * or the current time if unspecified.
-        *
-        * @since 1.20
-        *
-        * @param bool|string|int|float|DateTime $timestamp Timestamp to set, or false for current time
-        */
-       public function __construct( $timestamp = false ) {
-               if ( $timestamp instanceof DateTime ) {
-                       $this->timestamp = $timestamp;
-               } else {
-                       $this->setTimestamp( $timestamp );
-               }
-       }
-
-       /**
-        * Set the timestamp to the specified time, or the current time if unspecified.
-        *
-        * Parse the given timestamp into either a DateTime object or a Unix timestamp,
-        * and then store it.
-        *
-        * @since 1.20
-        *
-        * @param string|bool $ts Timestamp to store, or false for now
-        * @throws TimestampException
-        */
-       public function setTimestamp( $ts = false ) {
-               $m = [];
-               $da = [];
-               $strtime = '';
-
-               // We want to catch 0, '', null... but not date strings starting with a letter.
-               if ( !$ts || $ts === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ) {
-                       $uts = time();
-                       $strtime = "@$uts";
-               } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
-                       # TS_DB
-               } elseif ( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
-                       # TS_EXIF
-               } elseif ( preg_match( '/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/D', $ts, $da ) ) {
-                       # TS_MW
-               } elseif ( preg_match( '/^(-?\d{1,13})(\.\d+)?$/D', $ts, $m ) ) {
-                       # TS_UNIX
-                       $strtime = "@{$m[1]}"; // http://php.net/manual/en/datetime.formats.compound.php
-               } elseif ( preg_match( '/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{6}$/', $ts ) ) {
-                       # TS_ORACLE // session altered to DD-MM-YYYY HH24:MI:SS.FF6
-                       $strtime = preg_replace( '/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3",
-                                       str_replace( '+00:00', 'UTC', $ts ) );
-               } elseif ( preg_match(
-                       '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z?$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_ISO_8601
-               } elseif ( preg_match(
-                       '/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(?:\.*\d*)?Z?$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_ISO_8601_BASIC
-               } elseif ( preg_match(
-                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_POSTGRES
-               } elseif ( preg_match(
-                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',
-                       $ts,
-                       $da
-               ) ) {
-                       # TS_POSTGRES
-               } elseif ( preg_match(
-                       # Day of week
-                       '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' .
-                       # dd Mon yyyy
-                       '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .
-                       # hh:mm:ss
-                       '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S',
-                       $ts
-               ) ) {
-                       # TS_RFC2822, accepting a trailing comment.
-                       # See http://www.squid-cache.org/mail-archive/squid-users/200307/0122.html / r77171
-                       # The regex is a superset of rfc2822 for readability
-                       $strtime = strtok( $ts, ';' );
-               } elseif ( preg_match( '/^[A-Z][a-z]{5,8}, \d\d-[A-Z][a-z]{2}-\d{2} \d\d:\d\d:\d\d/', $ts ) ) {
-                       # TS_RFC850
-                       $strtime = $ts;
-               } elseif ( preg_match( '/^[A-Z][a-z]{2} [A-Z][a-z]{2} +\d{1,2} \d\d:\d\d:\d\d \d{4}/', $ts ) ) {
-                       # asctime
-                       $strtime = $ts;
-               } else {
-                       throw new TimestampException( __METHOD__ . ": Invalid timestamp - $ts" );
-               }
-
-               if ( !$strtime ) {
-                       $da = array_map( 'intval', $da );
-                       $da[0] = "%04d-%02d-%02dT%02d:%02d:%02d.00+00:00";
-                       $strtime = call_user_func_array( "sprintf", $da );
-               }
-
-               try {
-                       $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
-               } catch ( Exception $e ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.', $e->getCode(), $e );
-               }
-
-               if ( $final === false ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.' );
-               }
-               $this->timestamp = $final;
-       }
-
-       /**
-        * Get the timestamp represented by this object in a certain form.
-        *
-        * Convert the internal timestamp to the specified format and then
-        * return it.
-        *
-        * @since 1.20
+        * Get a timestamp instance in GMT
         *
-        * @param int $style Constant Output format for timestamp
-        * @throws TimestampException
-        * @return string The formatted timestamp
+        * @param bool|string $ts Timestamp to set, or false for current time
+        * @return MWTimestamp The instance
         */
-       public function getTimestamp( $style = TS_UNIX ) {
-               if ( !isset( self::$formats[$style] ) ) {
-                       throw new TimestampException( __METHOD__ . ': Illegal timestamp output type.' );
-               }
-
-               $output = $this->timestamp->format( self::$formats[$style] );
-
-               if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
-                       $output .= ' GMT';
-               }
-
-               if ( $style == TS_MW && strlen( $output ) !== 14 ) {
-                       throw new TimestampException( __METHOD__ . ': The timestamp cannot be represented in ' .
-                               'the specified format' );
-               }
-
-               return $output;
+       public static function getInstance( $ts = false ) {
+               return new static( $ts );
        }
 
        /**
@@ -329,52 +173,6 @@ class MWTimestamp {
                return $ts;
        }
 
-       /**
-        * @since 1.20
-        *
-        * @return string
-        */
-       public function __toString() {
-               return $this->getTimestamp();
-       }
-
-       /**
-        * Calculate the difference between two MWTimestamp objects.
-        *
-        * @since 1.22
-        * @param MWTimestamp $relativeTo Base time to calculate difference from
-        * @return DateInterval|bool The DateInterval object representing the
-        *   difference between the two dates or false on failure
-        */
-       public function diff( MWTimestamp $relativeTo ) {
-               return $this->timestamp->diff( $relativeTo->timestamp );
-       }
-
-       /**
-        * Set the timezone of this timestamp to the specified timezone.
-        *
-        * @since 1.22
-        * @param string $timezone Timezone to set
-        * @throws TimestampException
-        */
-       public function setTimezone( $timezone ) {
-               try {
-                       $this->timestamp->setTimezone( new DateTimeZone( $timezone ) );
-               } catch ( Exception $e ) {
-                       throw new TimestampException( __METHOD__ . ': Invalid timezone.', $e->getCode(), $e );
-               }
-       }
-
-       /**
-        * Get the timezone of this timestamp.
-        *
-        * @since 1.22
-        * @return DateTimeZone The timezone
-        */
-       public function getTimezone() {
-               return $this->timestamp->getTimezone();
-       }
-
        /**
         * Get the localized timezone message, if available.
         *
@@ -395,17 +193,6 @@ class MWTimestamp {
                }
        }
 
-       /**
-        * Format the timestamp in a given format.
-        *
-        * @since 1.22
-        * @param string $format Pattern to format in
-        * @return string The formatted timestamp
-        */
-       public function format( $format ) {
-               return $this->timestamp->format( $format );
-       }
-
        /**
         * Get a timestamp instance in the server local timezone ($wgLocaltimezone)
         *
@@ -419,15 +206,4 @@ class MWTimestamp {
                $timestamp->setTimezone( $wgLocaltimezone );
                return $timestamp;
        }
-
-       /**
-        * Get a timestamp instance in GMT
-        *
-        * @since 1.22
-        * @param bool|string $ts Timestamp to set, or false for current time
-        * @return MWTimestamp The instance
-        */
-       public static function getInstance( $ts = false ) {
-               return new self( $ts );
-       }
 }
index 9bbbd35..2fce08c 100644 (file)
@@ -517,6 +517,7 @@ class MediaWiki {
         */
        public function run() {
                try {
+                       $this->setDBProfilingAgent();
                        try {
                                $this->main();
                        } catch ( ErrorPageError $e ) {
@@ -527,12 +528,39 @@ class MediaWiki {
                                $e->report(); // display the GUI error
                        }
                } catch ( Exception $e ) {
+                       $context = $this->context;
+                       if (
+                               $e instanceof DBConnectionError &&
+                               $context->hasTitle() &&
+                               $context->getTitle()->canExist() &&
+                               $context->getRequest()->getVal( 'action', 'view' ) === 'view' &&
+                               HTMLFileCache::useFileCache( $this->context, HTMLFileCache::MODE_OUTAGE )
+                       ) {
+                               // Try to use any (even stale) file during outages...
+                               $cache = new HTMLFileCache( $context->getTitle(), 'view' );
+                               if ( $cache->isCached() ) {
+                                       $cache->loadFromFileCache( $context, HTMLFileCache::MODE_OUTAGE );
+                                       print MWExceptionRenderer::getHTML( $e );
+                                       exit;
+                               }
+
+                       }
+
                        MWExceptionHandler::handleException( $e );
                }
 
                $this->doPostOutputShutdown( 'normal' );
        }
 
+       private function setDBProfilingAgent() {
+               $services = MediaWikiServices::getInstance();
+               // Add a comment for easy SHOW PROCESSLIST interpretation
+               $name = $this->context->getUser()->getName();
+               $services->getDBLoadBalancerFactory()->setAgentName(
+                       mb_strlen( $name ) > 15 ? mb_substr( $name, 0, 15 ) . '...' : $name
+               );
+       }
+
        /**
         * @see MediaWiki::preOutputCommit()
         * @param callable $postCommitWork [default: null]
@@ -809,24 +837,22 @@ class MediaWiki {
                        }
                }
 
-               if ( $this->config->get( 'UseFileCache' ) && $title->getNamespace() >= 0 ) {
-                       if ( HTMLFileCache::useFileCache( $this->context ) ) {
-                               // Try low-level file cache hit
-                               $cache = new HTMLFileCache( $title, $action );
-                               if ( $cache->isCacheGood( /* Assume up to date */ ) ) {
-                                       // Check incoming headers to see if client has this cached
-                                       $timestamp = $cache->cacheTimestamp();
-                                       if ( !$output->checkLastModified( $timestamp ) ) {
-                                               $cache->loadFromFileCache( $this->context );
-                                       }
-                                       // Do any stats increment/watchlist stuff
-                                       // Assume we're viewing the latest revision (this should always be the case with file cache)
-                                       $this->context->getWikiPage()->doViewUpdates( $this->context->getUser() );
-                                       // Tell OutputPage that output is taken care of
-                                       $output->disable();
-
-                                       return;
+               if ( $title->canExist() && HTMLFileCache::useFileCache( $this->context ) ) {
+                       // Try low-level file cache hit
+                       $cache = new HTMLFileCache( $title, $action );
+                       if ( $cache->isCacheGood( /* Assume up to date */ ) ) {
+                               // Check incoming headers to see if client has this cached
+                               $timestamp = $cache->cacheTimestamp();
+                               if ( !$output->checkLastModified( $timestamp ) ) {
+                                       $cache->loadFromFileCache( $this->context );
                                }
+                               // Do any stats increment/watchlist stuff, assuming user is viewing the
+                               // latest revision (which should always be the case for file cache)
+                               $this->context->getWikiPage()->doViewUpdates( $this->context->getUser() );
+                               // Tell OutputPage that output is taken care of
+                               $output->disable();
+
+                               return;
                        }
                }
 
index d9230b0..ba14b99 100644 (file)
@@ -2268,7 +2268,7 @@ class OutputPage extends ContextSource {
                ob_start();
 
                $response->header( 'Content-type: ' . $config->get( 'MimeType' ) . '; charset=UTF-8' );
-               $response->header( 'Content-language: ' . $config->get( 'LanguageCode' ) );
+               $response->header( 'Content-language: ' . $config->get( 'ContLang' )->getHtmlCode() );
 
                // Avoid Internet Explorer "compatibility view" in IE 8-10, so that
                // jQuery etc. can work correctly.
@@ -2726,12 +2726,17 @@ class OutputPage extends ContextSource {
                        );
                        $this->rlExemptStyleModules = $exemptGroups;
 
-                       // Manually handled by getBottomScripts()
-                       $userModule = $rl->getModule( 'user' );
-                       $userState = $userModule->isKnownEmpty( $context ) && !$this->isUserJsPreview()
-                               ? 'ready'
-                               : 'loading';
-                       $this->rlUserModuleState = $exemptStates['user'] = $userState;
+                       $isUserModuleFiltered = !$this->filterModules( [ 'user' ] );
+                       // If this page filters out 'user', makeResourceLoaderLink will drop it.
+                       // Avoid indefinite "loading" state or untrue "ready" state (T145368).
+                       if ( !$isUserModuleFiltered ) {
+                               // Manually handled by getBottomScripts()
+                               $userModule = $rl->getModule( 'user' );
+                               $userState = $userModule->isKnownEmpty( $context ) && !$this->isUserJsPreview()
+                                       ? 'ready'
+                                       : 'loading';
+                               $this->rlUserModuleState = $exemptStates['user'] = $userState;
+                       }
 
                        $rlClient = new ResourceLoaderClientHtml( $context, $this->getTarget() );
                        $rlClient->setConfig( $this->getJSVars() );
index 8734bd6..4ab412e 100644 (file)
@@ -45,7 +45,7 @@ return [
        'DBLoadBalancerFactory' => function( MediaWikiServices $services ) {
                $config = $services->getMainConfig()->get( 'LBFactoryConf' );
 
-               $class = LBFactory::getLBFactoryClass( $config );
+               $class = LBFactoryMW::getLBFactoryClass( $config );
                if ( !isset( $config['readOnlyReason'] ) ) {
                        // TODO: replace the global wfConfiguredReadOnlyReason() with a service.
                        $config['readOnlyReason'] = wfConfiguredReadOnlyReason();
index 2f462b8..ddf5b89 100644 (file)
@@ -504,6 +504,19 @@ if ( !class_exists( 'AutoLoader' ) ) {
 // Reset the global service locator, so any services that have already been created will be
 // re-created while taking into account any custom settings and extensions.
 MediaWikiServices::resetGlobalInstance( new GlobalVarConfig(), 'quick' );
+// Apply $wgSharedDB table aliases for the local LB (all non-foreign DB connections)
+if ( $wgSharedDB && $wgSharedTables ) {
+       MediaWikiServices::getInstance()->getDBLoadBalancer()->setTableAliases(
+               array_fill_keys(
+                       $wgSharedTables,
+                       [
+                               'dbname' => $wgSharedDB,
+                               'schema' => $wgSharedSchema,
+                               'prefix' => $wgSharedPrefix
+                       ]
+               )
+       );
+}
 
 // Define a constant that indicates that the bootstrapping of the service locator
 // is complete.
diff --git a/includes/TemplatesOnThisPageFormatter.php b/includes/TemplatesOnThisPageFormatter.php
new file mode 100644 (file)
index 0000000..c0ae374
--- /dev/null
@@ -0,0 +1,183 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+use MediaWiki\Linker\LinkRenderer;
+use MediaWiki\Linker\LinkTarget;
+
+/**
+ * Handles formatting for the "templates used on this page"
+ * lists. Formerly known as Linker::formatTemplates()
+ *
+ * @since 1.28
+ */
+class TemplatesOnThisPageFormatter {
+
+       /**
+        * @var IContextSource
+        */
+       private $context;
+
+       /**
+        * @var LinkRenderer
+        */
+       private $linkRenderer;
+
+       /**
+        * @param IContextSource $context
+        * @param LinkRenderer $linkRenderer
+        */
+       public function __construct( IContextSource $context, LinkRenderer $linkRenderer ) {
+               $this->context = $context;
+               $this->linkRenderer = $linkRenderer;
+       }
+
+       /**
+        * Make an HTML list of templates, and then add a "More..." link at
+        * the bottom. If $more is null, do not add a "More..." link. If $more
+        * is a LinkTarget, make a link to that title and use it. If $more is a string,
+        * directly paste it in as the link (escaping needs to be done manually).
+        *
+        * @param LinkTarget[] $templates
+        * @param string|bool $type 'preview' if a preview, 'section' if a section edit, false if neither
+        * @param LinkTarget|string|null $more An escaped link for "More..." of the templates
+        * @return string HTML output
+        */
+       public function format( array $templates, $type = false, $more = null ) {
+               if ( !$templates ) {
+                       // No templates
+                       return '';
+               }
+
+               # Do a batch existence check
+               $batch = new LinkBatch;
+               foreach ( $templates as $title ) {
+                       $batch->addObj( $title );
+               }
+               $batch->execute();
+
+               # Construct the HTML
+               $outText = '<div class="mw-templatesUsedExplanation">';
+               $count = count( $templates );
+               if ( $type === 'preview' ) {
+                       $outText .= $this->context->msg( 'templatesusedpreview' )->numParams( $count )
+                               ->parseAsBlock();
+               } elseif ( $type === 'section' ) {
+                       $outText .= $this->context->msg( 'templatesusedsection' )->numParams( $count )
+                               ->parseAsBlock();
+               } else {
+                       $outText .= $this->context->msg( 'templatesused' )->numParams( $count )
+                               ->parseAsBlock();
+               }
+               $outText .= "</div><ul>\n";
+
+               usort( $templates, 'Title::compare' );
+               foreach ( $templates as $template ) {
+                       $outText .= $this->formatTemplate( $template );
+               }
+
+               if ( $more instanceof LinkTarget ) {
+                       $outText .= Html::rawElement( 'li', $this->linkRenderer->makeLink(
+                               $more, $this->context->msg( 'moredotdotdot' )->text() ) );
+               } elseif ( $more ) {
+                       // Documented as should already be escaped
+                       $outText .= Html::rawElement( 'li', $more );
+               }
+
+               $outText .= '</ul>';
+               return $outText;
+       }
+
+       /**
+        * Builds an <li> item for an individual template
+        *
+        * @param LinkTarget $target
+        * @return string
+        */
+       private function formatTemplate( LinkTarget $target ) {
+               // TODO Would be nice if we didn't have to use Title here
+               $titleObj = Title::newFromLinkTarget( $target );
+               $protected = $this->getRestrictionsText( $titleObj->getRestrictions( 'edit' ) );
+               $editLink = $this->buildEditLink( $titleObj );
+               return '<li>' . $this->linkRenderer->makeLink( $target )
+                       . $this->context->msg( 'word-separator' )->escaped()
+                       . $this->context->msg( 'parentheses' )->rawParams( $editLink )->escaped()
+                       . $this->context->msg( 'word-separator' )->escaped()
+                       . $protected . '</li>';
+       }
+
+       /**
+        * If the page is protected, get the relevant text
+        * for those restrictions
+        *
+        * @param array $restrictions
+        * @return string
+        */
+       private function getRestrictionsText( array $restrictions ) {
+               $protected = '';
+               if ( !$restrictions ) {
+                       return $protected;
+               }
+
+               // Check backwards-compatible messages
+               $msg = null;
+               if ( $restrictions === [ 'sysop' ] ) {
+                       $msg = $this->context->msg( 'template-protected' );
+               } elseif ( $restrictions === [ 'autoconfirmed' ] ) {
+                       $msg = $this->context->msg( 'template-semiprotected' );
+               }
+               if ( $msg && !$msg->isDisabled() ) {
+                       $protected = $msg->parse();
+               } else {
+                       // Construct the message from restriction-level-*
+                       // e.g. restriction-level-sysop, restriction-level-autoconfirmed
+                       $msgs = [];
+                       foreach ( $restrictions as $r ) {
+                               $msgs[] = $this->context->msg( "restriction-level-$r" )->parse();
+                       }
+                       $protected = $this->context->msg( 'parentheses' )
+                               ->rawParams( $this->context->getLanguage()->commaList( $msgs ) )->escaped();
+               }
+
+               return $protected;
+       }
+
+       /**
+        * Return a link to the edit page, with the text
+        * saying "view source" if the user can't edit the page
+        *
+        * @param Title $titleObj
+        * @return string
+        */
+       private function buildEditLink( Title $titleObj ) {
+               if ( $titleObj->quickUserCan( 'edit', $this->context->getUser() ) ) {
+                       $linkMsg = 'editlink';
+               } else {
+                       $linkMsg = 'viewsourcelink';
+               }
+
+               return $this->linkRenderer->makeLink(
+                       $titleObj,
+                       $this->context->msg( $linkMsg )->text(),
+                       [],
+                       [ 'action' => 'edit' ]
+               );
+       }
+
+}
index a8b8ad1..6d9ddd6 100644 (file)
@@ -3258,7 +3258,7 @@ class Title implements LinkTarget {
         * This clears some fields in this object, and clears any associated
         * keys in the "bad links" section of the link cache.
         *
-        * - This is called from WikiPage::doEdit() and WikiPage::insertOn() to allow
+        * - This is called from WikiPage::doEditContent() and WikiPage::insertOn() to allow
         * loading of the new page_id. It's also called from
         * WikiPage::doDeleteArticleReal()
         *
index abc7cb2..4d80a1c 100644 (file)
@@ -631,14 +631,15 @@ class InfoAction extends FormlessAction {
                                        $more = null;
                                }
 
+                               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                                       $this->getContext(),
+                                       $linkRenderer
+                               );
+
                                $pageInfo['header-properties'][] = [
                                        $this->msg( 'pageinfo-templates' )
                                                ->numParams( $pageCounts['transclusion']['from'] ),
-                                       Linker::formatTemplates(
-                                               $transcludedTemplates,
-                                               false,
-                                               false,
-                                               $more )
+                                       $templateListFormatter->format( $transcludedTemplates, false, $more )
                                ];
                        }
 
@@ -654,14 +655,15 @@ class InfoAction extends FormlessAction {
                                        $more = null;
                                }
 
+                               $templateListFormatter = new TemplatesOnThisPageFormatter(
+                                       $this->getContext(),
+                                       $linkRenderer
+                               );
+
                                $pageInfo['header-properties'][] = [
                                        $this->msg( 'pageinfo-transclusions' )
                                                ->numParams( $pageCounts['transclusion']['to'] ),
-                                       Linker::formatTemplates(
-                                               $transcludedTargets,
-                                               false,
-                                               false,
-                                               $more )
+                                       $templateListFormatter->format( $transcludedTargets, false, $more )
                                ];
                        }
                }
index ee9150c..d6de834 100644 (file)
@@ -532,7 +532,7 @@ class ApiEditPage extends ApiBase {
 
                        case EditPage::AS_END:
                        default:
-                               // $status came from WikiPage::doEdit()
+                               // $status came from WikiPage::doEditContent()
                                $errors = $status->getErrorsArray();
                                $this->dieUsageMsg( $errors[0] ); // TODO: Add new errors to message map
                                break;
index 236fb9e..8e89c32 100644 (file)
@@ -264,6 +264,12 @@ class ApiQueryBacklinksprop extends ApiQueryGeneratorBase {
                        }
                }
 
+               // MySQL (or at least 5.5.5-10.0.23-MariaDB) chooses a really bad query
+               // plan if it thinks there will be more matching rows in the linktable
+               // than are in page. Use STRAIGHT_JOIN here to force it to use the
+               // intended, fast plan. See T145079 for details.
+               $this->addOption( 'STRAIGHT_JOIN' );
+
                $this->addOption( 'LIMIT', $params['limit'] + 1 );
 
                $res = $this->select( __METHOD__ );
index 7fd649e..8ed1cf5 100644 (file)
@@ -25,7 +25,7 @@
                        "Copper12"
                ]
        },
-       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentación]]\n* [[mw:API:FAQ|Preguntas frecuentes]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de correo]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anuncios de la API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Errores y peticiones]\n</div>\n<strong>Estado:</strong> Todas las características que se muestran en esta página deberían funcionar, pero la API aún se encuentra en desarrollo activo y puede cambiar en cualquier momento. Suscríbete a [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la lista de correo de mediawiki-api-announce] para estar al día de las actualizaciones.\n\n<strong>Solicitudes erróneas:</strong> Cuando se envían solicitudes erróneas a la API, se envía una cabecera HTTP con la clave \"MediaWiki-API-Error\". El valor de la cabecera y el código de error devuelto tomarán el mismo valor. Para más información, véase [[mw:API:Errors_and_warnings|API: Errores y advertencias]].\n\n<strong>Pruebas:</strong> Para facilitar las pruebas de solicitudes a la API, consulta [[Special:ApiSandbox]].",
+       "apihelp-main-description": "<div class=\"hlist plainlinks api-main-links\">\n* [[mw:API:Main_page|Documentación]]\n* [[mw:API:FAQ|Preguntas frecuentes]]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api Lista de correo]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce Anuncios de la API]\n* [https://phabricator.wikimedia.org/maniphest/query/GebfyV4uCaLd/#R Errores y peticiones]\n</div>\n<strong>Estado:</strong> Todas las características que se muestran en esta página deberían funcionar, pero la API aún se encuentra en desarrollo activo y puede cambiar en cualquier momento. Suscríbete a [https://lists.wikimedia.org/pipermail/mediawiki-api-announce/ la lista de correo de mediawiki-api-announce] para estar al día de las actualizaciones.\n\n<strong>Solicitudes erróneas:</strong> Cuando se envían solicitudes erróneas a la API, se envía una cabecera HTTP con la clave \"MediaWiki-API-Error\". El valor de la cabecera y el código de error devuelto tomarán el mismo valor. Para más información, véase [[mw:API:Errors_and_warnings|API: Errores y advertencias]].\n\n<strong>Pruebas:</strong> para facilitar las pruebas de solicitudes a la API, consulta [[Special:ApiSandbox]].",
        "apihelp-main-param-action": "Qué acción se realizará.",
        "apihelp-main-param-format": "El formato de la salida.",
        "apihelp-main-param-maxlag": "El retraso (lag) máximo puede ser utilizado cuando MediaWiki está instalado en un conjunto de bases de datos replicadas. Para evitar cualquier acción que pudiera causar un retraso aún mayor en la replicación del sitio, este parámetro puede causar que el cliente espere hasta que el retraso de replicación sea menor que el valor especificado. En caso de exceso de retraso, se devuelve un código de error <samp>maxlag</samp> con un mensaje similar a <samp>Esperando a $host: $lag segundos de retraso</samp>.<br />Véase [[mw:Manual:Maxlag_parameter|Manual:Parámetro maxlag]] para más información.",
        "apihelp-php-description": "Extraer los datos de salida en formato serializado PHP.",
        "apihelp-rawfm-description": "Extraer los datos de salida, incluidos los elementos de depuración, en formato JSON (embellecido en HTML).",
        "apihelp-xml-param-xslt": "Si se especifica, añade la página nombrada como una hoja de estilo XSL. El valor debe ser un título en el espacio de nombres {{ns:mediawiki}} que termine en <code>.xsl</code>.",
+       "apihelp-xml-param-includexmlnamespace": "Si se especifica, añade un espacio de nombres XML.",
        "api-help-main-header": "Módulo principal",
        "api-help-flag-deprecated": "Este módulo está en desuso.",
        "api-help-flag-readrights": "Este módulo requiere permisos de lectura.",
index a82f018..a485531 100644 (file)
@@ -51,15 +51,18 @@ class EmailNotificationSecondaryAuthenticationProvider
                        && !$this->manager->getAuthenticationSessionData( 'no-email' )
                ) {
                        // TODO show 'confirmemail_oncreate'/'confirmemail_sendfailed' message
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $user ) {
-                               $user = $user->getInstanceForUpdate();
-                               $status = $user->sendConfirmationMail();
-                               $user->saveSettings();
-                               if ( !$status->isGood() ) {
-                                       $this->logger->warning( 'Could not send confirmation email: ' .
-                                               $status->getWikiText( false, false, 'en' ) );
-                               }
-                       } );
+                       wfGetDB( DB_MASTER )->onTransactionIdle(
+                               function () use ( $user ) {
+                                       $user = $user->getInstanceForUpdate();
+                                       $status = $user->sendConfirmationMail();
+                                       $user->saveSettings();
+                                       if ( !$status->isGood() ) {
+                                               $this->logger->warning( 'Could not send confirmation email: ' .
+                                                       $status->getWikiText( false, false, 'en' ) );
+                                       }
+                               },
+                               __METHOD__
+                       );
                }
 
                return AuthenticationResponse::newPass();
index f5571c7..f16423d 100644 (file)
@@ -304,10 +304,13 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $sendMail ) {
                        // Send email after DB commit
-                       $dbw->onTransactionIdle( function () use ( $req ) {
-                               /** @var TemporaryPasswordAuthenticationRequest $req */
-                               $this->sendPasswordResetEmail( $req );
-                       } );
+                       $dbw->onTransactionIdle(
+                               function () use ( $req ) {
+                                       /** @var TemporaryPasswordAuthenticationRequest $req */
+                                       $this->sendPasswordResetEmail( $req );
+                               },
+                               __METHOD__
+                       );
                }
        }
 
@@ -375,9 +378,12 @@ class TemporaryPasswordPrimaryAuthenticationProvider
 
                if ( $mailpassword ) {
                        // Send email after DB commit
-                       wfGetDB( DB_MASTER )->onTransactionIdle( function () use ( $user, $creator, $req ) {
-                               $this->sendNewAccountEmail( $user, $creator, $req->password );
-                       } );
+                       wfGetDB( DB_MASTER )->onTransactionIdle(
+                               function () use ( $user, $creator, $req ) {
+                                       $this->sendNewAccountEmail( $user, $creator, $req->password );
+                               },
+                               __METHOD__
+                       );
                }
 
                return $mailpassword ? 'byemail' : null;
index 1bab0f5..71011e0 100644 (file)
@@ -29,6 +29,9 @@
  * @ingroup Cache
  */
 class HTMLFileCache extends FileCacheBase {
+       const MODE_NORMAL = 0; // normal cache mode
+       const MODE_OUTAGE = 1; // fallback cache for DB outages
+
        /**
         * Construct an HTMLFileCache object from a Title and an action
         *
@@ -93,10 +96,12 @@ class HTMLFileCache extends FileCacheBase {
        /**
         * Check if pages can be cached for this request/user
         * @param IContextSource $context
+        * @param integer $mode One of the HTMLFileCache::MODE_* constants
         * @return bool
         */
-       public static function useFileCache( IContextSource $context ) {
+       public static function useFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
                global $wgUseFileCache, $wgDebugToolbar, $wgContLang;
+
                if ( !$wgUseFileCache ) {
                        return false;
                }
@@ -121,15 +126,23 @@ class HTMLFileCache extends FileCacheBase {
 
                        return false;
                }
+
                $user = $context->getUser();
                // Check for non-standard user language; this covers uselang,
                // and extensions for auto-detecting user language.
                $ulang = $context->getLanguage();
 
                // Check that there are no other sources of variation
-               if ( $user->getId() || $user->getNewtalk() || !$ulang->equals( $wgContLang ) ) {
+               if ( $user->getId() || !$ulang->equals( $wgContLang ) ) {
                        return false;
                }
+
+               if ( $mode === self::MODE_NORMAL ) {
+                       if ( $user->getNewtalk() ) {
+                               return false;
+                       }
+               }
+
                // Allow extensions to disable caching
                return Hooks::run( 'HTMLFileCache::useFileCache', [ $context ] );
        }
@@ -137,17 +150,23 @@ class HTMLFileCache extends FileCacheBase {
        /**
         * Read from cache to context output
         * @param IContextSource $context
+        * @param integer $mode One of the HTMLFileCache::MODE_* constants
         * @return void
         */
-       public function loadFromFileCache( IContextSource $context ) {
-               global $wgMimeType, $wgLanguageCode;
+       public function loadFromFileCache( IContextSource $context, $mode = self::MODE_NORMAL ) {
+               global $wgMimeType, $wgContLang;
 
                wfDebug( __METHOD__ . "()\n" );
                $filename = $this->cachePath();
 
+               if ( $mode === self::MODE_OUTAGE ) {
+                       // Avoid DB errors for queries in sendCacheControl()
+                       $context->getTitle()->resetArticleID( 0 );
+               }
+
                $context->getOutput()->sendCacheControl();
                header( "Content-Type: $wgMimeType; charset=UTF-8" );
-               header( "Content-Language: $wgLanguageCode" );
+               header( 'Content-Language: ' . $wgContLang->getHtmlCode() );
                if ( $this->useGzip() ) {
                        if ( wfClientAcceptsGzip() ) {
                                header( 'Content-Encoding: gzip' );
index d254d3d..e871855 100644 (file)
@@ -1089,7 +1089,7 @@ class MessageCache {
                if ( !$title || !$title instanceof Title ) {
                        global $wgTitle;
                        wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' .
-                               wfGetAllCallers( 5 ) . ' with no title set.' );
+                               wfGetAllCallers( 6 ) . ' with no title set.' );
                        $title = $wgTitle;
                }
                // Sometimes $wgTitle isn't set either...
index 8e74674..590fd37 100644 (file)
@@ -342,18 +342,21 @@ class RecentChange {
                        ) {
                                // @FIXME: This would be better as an extension hook
                                // Send emails or email jobs once this row is safely committed
-                               $dbw->onTransactionIdle( function () use ( $editor, $title ) {
-                                       $enotif = new EmailNotification();
-                                       $enotif->notifyOnPageChange(
-                                               $editor,
-                                               $title,
-                                               $this->mAttribs['rc_timestamp'],
-                                               $this->mAttribs['rc_comment'],
-                                               $this->mAttribs['rc_minor'],
-                                               $this->mAttribs['rc_last_oldid'],
-                                               $this->mExtra['pageStatus']
-                                       );
-                               } );
+                               $dbw->onTransactionIdle(
+                                       function () use ( $editor, $title ) {
+                                               $enotif = new EmailNotification();
+                                               $enotif->notifyOnPageChange(
+                                                       $editor,
+                                                       $title,
+                                                       $this->mAttribs['rc_timestamp'],
+                                                       $this->mAttribs['rc_comment'],
+                                                       $this->mAttribs['rc_minor'],
+                                                       $this->mAttribs['rc_last_oldid'],
+                                                       $this->mExtra['pageStatus']
+                                               );
+                                       },
+                                       __METHOD__
+                               );
                        }
                }
 
index caca7e2..2af742e 100644 (file)
@@ -129,12 +129,9 @@ class CloneDatabase {
         */
        public static function changePrefix( $prefix ) {
                global $wgDBprefix;
-               wfGetLBFactory()->forEachLB( function( LoadBalancer $lb ) use ( $prefix ) {
-                       $lb->setDomainPrefix( $prefix );
-                       $lb->forEachOpenConnection( function ( IDatabase $db ) use ( $prefix ) {
-                               $db->tablePrefix( $prefix );
-                       } );
-               } );
+
+               $lbFactory = wfGetLBFactory();
+               $lbFactory->setDomainPrefix( $prefix );
                $wgDBprefix = $prefix;
        }
 }
index 0c357cc..3d9b41a 100644 (file)
@@ -60,8 +60,12 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        protected $mPassword;
        /** @var string */
        protected $mDBname;
-       /** @var bool */
+       /** @var array[] $aliases Map of (table => (dbname, schema, prefix) map) */
+       protected $tableAliases = [];
+       /** @var bool Whether this PHP instance is for a CLI script */
        protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
 
        /** @var BagOStuff APC cache */
        protected $srvCache;
@@ -83,19 +87,17 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        protected $mTrxPreCommitCallbacks = [];
        /** @var array[] List of (callable, method name) */
        protected $mTrxEndCallbacks = [];
-       /** @var array[] Map of (name => (callable, method name)) */
+       /** @var callable[] Map of (name => callable) */
        protected $mTrxRecurringCallbacks = [];
        /** @var bool Whether to suppress triggering of transaction end callbacks */
        protected $mTrxEndCallbacksSuppressed = false;
 
        /** @var string */
-       protected $mTablePrefix;
+       protected $mTablePrefix = '';
        /** @var string */
-       protected $mSchema;
+       protected $mSchema = '';
        /** @var integer */
        protected $mFlags;
-       /** @var bool */
-       protected $mForeign;
        /** @var array */
        protected $mLBInfo = [];
        /** @var bool|null */
@@ -239,22 +241,21 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
         * @param array $params Parameters passed from DatabaseBase::factory()
         */
        function __construct( array $params ) {
-               global $wgDBprefix, $wgDBmwschema;
-
-               $this->srvCache = ObjectCache::getLocalServerInstance( 'hash' );
-
                $server = $params['host'];
                $user = $params['user'];
                $password = $params['password'];
                $dbName = $params['dbname'];
                $flags = $params['flags'];
-               $tablePrefix = $params['tablePrefix'];
-               $schema = $params['schema'];
-               $foreign = $params['foreign'];
+
+               $this->mSchema = $params['schema'];
+               $this->mTablePrefix = $params['tablePrefix'];
 
                $this->cliMode = isset( $params['cliMode'] )
                        ? $params['cliMode']
                        : ( PHP_SAPI === 'cli' );
+               $this->agent = isset( $params['agent'] )
+                       ? str_replace( '/', '-', $params['agent'] ) // escape for comment
+                       : '';
 
                $this->mFlags = $flags;
                if ( $this->mFlags & DBO_DEFAULT ) {
@@ -267,21 +268,9 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
 
                $this->mSessionVars = $params['variables'];
 
-               /** Get the default table prefix*/
-               if ( $tablePrefix === 'get from global' ) {
-                       $this->mTablePrefix = $wgDBprefix;
-               } else {
-                       $this->mTablePrefix = $tablePrefix;
-               }
-
-               /** Get the database schema*/
-               if ( $schema === 'get from global' ) {
-                       $this->mSchema = $wgDBmwschema;
-               } else {
-                       $this->mSchema = $schema;
-               }
-
-               $this->mForeign = $foreign;
+               $this->srvCache = isset( $params['srvCache'] )
+                       ? $params['srvCache']
+                       : new HashBagOStuff();
 
                $this->profiler = isset( $params['profiler'] )
                        ? $params['profiler']
@@ -324,8 +313,6 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
         * @throws InvalidArgumentException If the database driver or extension cannot be found
         */
        final public static function factory( $dbType, $p = [] ) {
-               global $wgCommandLineMode;
-
                $canonicalDBTypes = [
                        'mysql' => [ 'mysqli', 'mysql' ],
                        'postgres' => [],
@@ -378,12 +365,11 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                        $p['dbname'] = isset( $p['dbname'] ) ? $p['dbname'] : false;
                        $p['flags'] = isset( $p['flags'] ) ? $p['flags'] : 0;
                        $p['variables'] = isset( $p['variables'] ) ? $p['variables'] : [];
-                       $p['tablePrefix'] = isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : 'get from global';
+                       $p['tablePrefix'] = isset( $p['tablePrefix'] ) ? $p['tablePrefix'] : '';
                        if ( !isset( $p['schema'] ) ) {
-                               $p['schema'] = isset( $defaultSchemas[$dbType] ) ? $defaultSchemas[$dbType] : null;
+                               $p['schema'] = isset( $defaultSchemas[$dbType] ) ? $defaultSchemas[$dbType] : '';
                        }
                        $p['foreign'] = isset( $p['foreign'] ) ? $p['foreign'] : false;
-                       $p['cliMode'] = $wgCommandLineMode;
 
                        $conn = new $class( $p );
                        if ( isset( $p['connLogger'] ) ) {
@@ -395,7 +381,9 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                        if ( isset( $p['errorLogger'] ) ) {
                                $conn->errorLogger = $p['errorLogger'];
                        } else {
-                               $conn->errorLogger = [ MWExceptionHandler::class, 'logException' ];
+                               $conn->errorLogger = function ( Exception $e ) {
+                                       trigger_error( get_class( $e ) . ': ' . $e->getMessage(), E_WARNING );
+                               };
                        }
                } else {
                        $conn = null;
@@ -426,18 +414,25 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
         *   - false to disable debugging
         *   - omitted or null to do nothing
         *
-        * @return bool|null Previous value of the flag
+        * @return bool Previous value of the flag
+        * @deprecated since 1.28; use setFlag()
         */
        public function debug( $debug = null ) {
-               return wfSetBit( $this->mFlags, DBO_DEBUG, $debug );
+               $res = $this->getFlag( DBO_DEBUG );
+               if ( $debug !== null ) {
+                       $debug ? $this->setFlag( DBO_DEBUG ) : $this->clearFlag( DBO_DEBUG );
+               }
+
+               return $res;
        }
 
        public function bufferResults( $buffer = null ) {
-               if ( is_null( $buffer ) ) {
-                       return !(bool)( $this->mFlags & DBO_NOBUFFER );
-               } else {
-                       return !wfSetBit( $this->mFlags, DBO_NOBUFFER, !$buffer );
+               $res = !$this->getFlag( DBO_NOBUFFER );
+               if ( $buffer !== null ) {
+                       $buffer ? $this->clearFlag( DBO_NOBUFFER ) : $this->setFlag( DBO_NOBUFFER );
                }
+
+               return $res;
        }
 
        /**
@@ -453,7 +448,12 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
         * @return bool The previous value of the flag.
         */
        protected function ignoreErrors( $ignoreErrors = null ) {
-               return wfSetBit( $this->mFlags, DBO_IGNORE, $ignoreErrors );
+               $res = $this->getFlag( DBO_IGNORE );
+               if ( $ignoreErrors !== null ) {
+                       $ignoreErrors ? $this->setFlag( DBO_IGNORE ) : $this->clearFlag( DBO_IGNORE );
+               }
+
+               return $res;
        }
 
        public function trxLevel() {
@@ -465,11 +465,21 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        }
 
        public function tablePrefix( $prefix = null ) {
-               return wfSetVar( $this->mTablePrefix, $prefix );
+               $old = $this->mTablePrefix;
+               if ( $prefix !== null ) {
+                       $this->mTablePrefix = $prefix;
+               }
+
+               return $old;
        }
 
        public function dbSchema( $schema = null ) {
-               return wfSetVar( $this->mSchema, $schema );
+               $old = $this->mSchema;
+               if ( $schema !== null ) {
+                       $this->mSchema = $schema;
+               }
+
+               return $old;
        }
 
        /**
@@ -634,6 +644,25 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                return $this->mTrxLevel ? $this->mTrxWriteCallers : [];
        }
 
+       protected function pendingWriteAndCallbackCallers() {
+               if ( !$this->mTrxLevel ) {
+                       return [];
+               }
+
+               $fnames = $this->mTrxWriteCallers;
+               foreach ( [
+                       $this->mTrxIdleCallbacks,
+                       $this->mTrxPreCommitCallbacks,
+                       $this->mTrxEndCallbacks
+               ] as $callbacks ) {
+                       foreach ( $callbacks as $callback ) {
+                               $fnames[] = $callback[1];
+                       }
+               }
+
+               return $fnames;
+       }
+
        public function isOpen() {
                return $this->mOpened;
        }
@@ -674,50 +703,13 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        }
 
        public function getWikiID() {
-               if ( $this->mTablePrefix ) {
+               if ( $this->mTablePrefix != '' ) {
                        return "{$this->mDBname}-{$this->mTablePrefix}";
                } else {
                        return $this->mDBname;
                }
        }
 
-       /**
-        * Return a path to the DBMS-specific SQL file if it exists,
-        * otherwise default SQL file
-        *
-        * @param string $filename
-        * @return string
-        */
-       private function getSqlFilePath( $filename ) {
-               global $IP;
-               $dbmsSpecificFilePath = "$IP/maintenance/" . $this->getType() . "/$filename";
-               if ( file_exists( $dbmsSpecificFilePath ) ) {
-                       return $dbmsSpecificFilePath;
-               } else {
-                       return "$IP/maintenance/$filename";
-               }
-       }
-
-       /**
-        * Return a path to the DBMS-specific schema file,
-        * otherwise default to tables.sql
-        *
-        * @return string
-        */
-       public function getSchemaPath() {
-               return $this->getSqlFilePath( 'tables.sql' );
-       }
-
-       /**
-        * Return a path to the DBMS-specific update key file,
-        * otherwise default to update-keys.sql
-        *
-        * @return string
-        */
-       public function getUpdateKeysPath() {
-               return $this->getSqlFilePath( 'update-keys.sql' );
-       }
-
        /**
         * Get information about an index into an object
         * @param string $table Table name
@@ -884,8 +876,6 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        }
 
        public function query( $sql, $fname = __METHOD__, $tempIgnore = false ) {
-               global $wgUser;
-
                $priorWritesPending = $this->writesOrCallbacksPending();
                $this->mLastQuery = $sql;
 
@@ -899,20 +889,9 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                        $this->mDoneWrites = microtime( true );
                }
 
-               # Add a comment for easy SHOW PROCESSLIST interpretation
-               if ( is_object( $wgUser ) && $wgUser->isItemLoaded( 'name' ) ) {
-                       $userName = $wgUser->getName();
-                       if ( mb_strlen( $userName ) > 15 ) {
-                               $userName = mb_substr( $userName, 0, 15 ) . '...';
-                       }
-                       $userName = str_replace( '/', '', $userName );
-               } else {
-                       $userName = '';
-               }
-
                // Add trace comment to the begin of the sql string, right after the operator.
                // Or, for one-word queries (like "BEGIN" or COMMIT") add it to the end (bug 42598)
-               $commentedSql = preg_replace( '/\s|$/', " /* $fname $userName */ ", $sql, 1 );
+               $commentedSql = preg_replace( '/\s|$/', " /* $fname {$this->agent} */ ", $sql, 1 );
 
                # Start implicit transactions that wrap the request if DBO_TRX is enabled
                if ( !$this->mTrxLevel && $this->getFlag( DBO_TRX )
@@ -1876,7 +1855,6 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
         * @return string Full database name
         */
        public function tableName( $name, $format = 'quoted' ) {
-               global $wgSharedDB, $wgSharedPrefix, $wgSharedTables, $wgSharedSchema;
                # Skip the entire process when we have a string quoted on both ends.
                # Note that we check the end so that we will still quote any use of
                # use of `database`.table. But won't break things if someone wants
@@ -1910,17 +1888,17 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                        # In dbs that support it, $database may actually be the schema
                        # but that doesn't affect any of the functionality here
                        $prefix = '';
-                       $schema = null;
+                       $schema = '';
                } else {
                        list( $table ) = $dbDetails;
-                       if ( $wgSharedDB !== null # We have a shared database
-                               && $this->mForeign == false # We're not working on a foreign database
-                               && !$this->isQuotedIdentifier( $table ) # Prevent shared tables listing '`table`'
-                               && in_array( $table, $wgSharedTables ) # A shared table is selected
-                       ) {
-                               $database = $wgSharedDB;
-                               $schema = $wgSharedSchema === null ? $this->mSchema : $wgSharedSchema;
-                               $prefix = $wgSharedPrefix === null ? $this->mTablePrefix : $wgSharedPrefix;
+                       if ( isset( $this->tableAliases[$table] ) ) {
+                               $database = $this->tableAliases[$table]['dbname'];
+                               $schema = is_string( $this->tableAliases[$table]['schema'] )
+                                       ? $this->tableAliases[$table]['schema']
+                                       : $this->mSchema;
+                               $prefix = is_string( $this->tableAliases[$table]['prefix'] )
+                                       ? $this->tableAliases[$table]['prefix']
+                                       : $this->mTablePrefix;
                        } else {
                                $database = null;
                                $schema = $this->mSchema; # Default schema
@@ -1931,7 +1909,9 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                # Quote $table and apply the prefix if not quoted.
                # $tableName might be empty if this is called from Database::replaceVars()
                $tableName = "{$prefix}{$table}";
-               if ( $format == 'quoted' && !$this->isQuotedIdentifier( $tableName ) && $tableName !== '' ) {
+               if ( $format == 'quoted'
+                       && !$this->isQuotedIdentifier( $tableName ) && $tableName !== ''
+               ) {
                        $tableName = $this->addIdentifierQuotes( $tableName );
                }
 
@@ -2723,23 +2703,23 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                return false;
        }
 
-       final public function onTransactionResolution( callable $callback ) {
+       final public function onTransactionResolution( callable $callback, $fname = __METHOD__ ) {
                if ( !$this->mTrxLevel ) {
                        throw new DBUnexpectedError( $this, "No transaction is active." );
                }
-               $this->mTrxEndCallbacks[] = [ $callback, wfGetCaller() ];
+               $this->mTrxEndCallbacks[] = [ $callback, $fname ];
        }
 
-       final public function onTransactionIdle( callable $callback ) {
-               $this->mTrxIdleCallbacks[] = [ $callback, wfGetCaller() ];
+       final public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) {
+               $this->mTrxIdleCallbacks[] = [ $callback, $fname ];
                if ( !$this->mTrxLevel ) {
                        $this->runOnTransactionIdleCallbacks( self::TRIGGER_IDLE );
                }
        }
 
-       final public function onTransactionPreCommitOrIdle( callable $callback ) {
+       final public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
                if ( $this->mTrxLevel ) {
-                       $this->mTrxPreCommitCallbacks[] = [ $callback, wfGetCaller() ];
+                       $this->mTrxPreCommitCallbacks[] = [ $callback, $fname ];
                } else {
                        // If no transaction is active, then make one for this callback
                        $this->startAtomic( __METHOD__ );
@@ -2755,7 +2735,7 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
 
        final public function setTransactionListener( $name, callable $callback = null ) {
                if ( $callback ) {
-                       $this->mTrxRecurringCallbacks[$name] = [ $callback, wfGetCaller() ];
+                       $this->mTrxRecurringCallbacks[$name] = $callback;
                } else {
                        unset( $this->mTrxRecurringCallbacks[$name] );
                }
@@ -2870,9 +2850,8 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                /** @var Exception $e */
                $e = null; // first exception
 
-               foreach ( $this->mTrxRecurringCallbacks as $callback ) {
+               foreach ( $this->mTrxRecurringCallbacks as $phpCallback ) {
                        try {
-                               list( $phpCallback ) = $callback;
                                $phpCallback( $trigger, $this );
                        } catch ( Exception $ex ) {
                                call_user_func( $this->errorLogger, $ex );
@@ -2959,7 +2938,7 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                $this->mTrxAutomatic = ( $mode === self::TRANSACTION_INTERNAL );
                $this->mTrxAutomaticAtomic = false;
                $this->mTrxAtomicLevels = [];
-               $this->mTrxShortId = wfRandomString( 12 );
+               $this->mTrxShortId = sprintf( '%06x', mt_rand( 0, 0xffffff ) );
                $this->mTrxWriteDuration = 0.0;
                $this->mTrxWriteQueryCount = 0;
                $this->mTrxWriteAdjDuration = 0.0;
@@ -3095,9 +3074,10 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        public function flushSnapshot( $fname = __METHOD__ ) {
                if ( $this->writesOrCallbacksPending() || $this->explicitTrxActive() ) {
                        // This only flushes transactions to clear snapshots, not to write data
+                       $fnames = implode( ', ', $this->pendingWriteAndCallbackCallers() );
                        throw new DBUnexpectedError(
                                $this,
-                               "$fname: Cannot COMMIT to clear snapshot because writes are pending."
+                               "$fname: Cannot COMMIT to clear snapshot because writes are pending ($fnames)."
                        );
                }
 
@@ -3170,7 +3150,9 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        }
 
        public function timestamp( $ts = 0 ) {
-               return wfTimestamp( TS_MW, $ts );
+               $t = new ConvertableTimestamp( $ts );
+               // Let errors bubble up to avoid putting garbage in the DB
+               return $t->getTimestamp( TS_MW );
        }
 
        public function timestampOrNull( $ts = null ) {
@@ -3380,25 +3362,6 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                return $error;
        }
 
-       /**
-        * Get the full path of a patch file. Originally based on archive()
-        * from updaters.inc. Keep in mind this always returns a patch, as
-        * it fails back to MySQL if no DB-specific patch can be found
-        *
-        * @param string $patch The name of the patch, like patch-something.sql
-        * @return string Full path to patch file
-        */
-       public function patchPath( $patch ) {
-               global $IP;
-
-               $dbType = $this->getType();
-               if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
-                       return "$IP/maintenance/$dbType/archives/$patch";
-               } else {
-                       return "$IP/maintenance/archives/$patch";
-               }
-       }
-
        public function setSchemaVars( $vars ) {
                $this->mSchemaVars = $vars;
        }
@@ -3583,9 +3546,10 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
                if ( $this->writesOrCallbacksPending() ) {
                        // This only flushes transactions to clear snapshots, not to write data
+                       $fnames = implode( ', ', $this->pendingWriteAndCallbackCallers() );
                        throw new DBUnexpectedError(
                                $this,
-                               "$fname: Cannot COMMIT to clear snapshot because writes are pending."
+                               "$fname: Cannot COMMIT to clear snapshot because writes are pending ($fnames)."
                        );
                }
 
@@ -3598,15 +3562,18 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                                // There is a good chance an exception was thrown, causing any early return
                                // from the caller. Let any error handler get a chance to issue rollback().
                                // If there isn't one, let the error bubble up and trigger server-side rollback.
-                               $this->onTransactionResolution( function () use ( $lockKey, $fname ) {
-                                       $this->unlock( $lockKey, $fname );
-                               } );
+                               $this->onTransactionResolution(
+                                       function () use ( $lockKey, $fname ) {
+                                               $this->unlock( $lockKey, $fname );
+                                       },
+                                       $fname
+                               );
                        } else {
                                $this->unlock( $lockKey, $fname );
                        }
                } );
 
-               $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
+               $this->commit( $fname, self::FLUSHING_INTERNAL );
 
                return $unlocker;
        }
@@ -3678,9 +3645,17 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
        }
 
        public function decodeExpiry( $expiry, $format = TS_MW ) {
-               return ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() )
-                       ? 'infinity'
-                       : wfTimestamp( $format, $expiry );
+               if ( $expiry == '' || $expiry == 'infinity' || $expiry == $this->getInfinity() ) {
+                       return 'infinity';
+               }
+
+               try {
+                       $t = new ConvertableTimestamp( $expiry );
+
+                       return $t->getTimestamp( $format );
+               } catch ( TimestampException $e ) {
+                       return false;
+               }
        }
 
        public function setBigSelects( $value = true ) {
@@ -3700,6 +3675,10 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                return is_string( $reason ) ? $reason : false;
        }
 
+       public function setTableAliases( array $aliases ) {
+               $this->tableAliases = $aliases;
+       }
+
        /**
         * @since 1.19
         * @return string
@@ -3715,18 +3694,11 @@ abstract class DatabaseBase implements IDatabase, LoggerAwareInterface {
                if ( $this->mTrxLevel && $this->mTrxDoneWrites ) {
                        trigger_error( "Uncommitted DB writes (transaction from {$this->mTrxFname})." );
                }
-               $danglingCallbacks = array_merge(
-                       $this->mTrxIdleCallbacks,
-                       $this->mTrxPreCommitCallbacks,
-                       $this->mTrxEndCallbacks
-               );
-               if ( $danglingCallbacks ) {
-                       $callers = [];
-                       foreach ( $danglingCallbacks as $callbackInfo ) {
-                               $callers[] = $callbackInfo[1];
-                       }
-                       $callers = implode( ', ', $callers );
-                       trigger_error( "DB transaction callbacks still pending (from $callers)." );
+
+               $danglingWriters = $this->pendingWriteAndCallbackCallers();
+               if ( $danglingWriters ) {
+                       $fnames = implode( ', ', $danglingWriters );
+                       trigger_error( "DB transaction writes or callbacks still pending ($fnames)." );
                }
        }
 }
index 59c8952..4ffafde 100644 (file)
@@ -165,7 +165,7 @@ class DatabaseMssql extends Database {
         * @throws DBUnexpectedError
         */
        protected function doQuery( $sql ) {
-               if ( $this->debug() ) {
+               if ( $this->getFlag( DBO_DEBUG ) ) {
                        wfDebug( "SQL: [$sql]\n" );
                }
                $this->offset = 0;
index 3c0c279..0cbb496 100644 (file)
@@ -59,7 +59,7 @@ class DatabaseSqlite extends Database {
         * @param array $p
         */
        function __construct( array $p ) {
-               global $wgSharedDB, $wgSQLiteDataDir;
+               global $wgSQLiteDataDir;
 
                $this->dbDir = isset( $p['dbDirectory'] ) ? $p['dbDirectory'] : $wgSQLiteDataDir;
 
@@ -76,8 +76,13 @@ class DatabaseSqlite extends Database {
                        // Super doesn't open when $user is false, but we can work with $dbName
                        if ( $p['dbname'] && !$this->isOpen() ) {
                                if ( $this->open( $p['host'], $p['user'], $p['password'], $p['dbname'] ) ) {
-                                       if ( $wgSharedDB ) {
-                                               $this->attachDatabase( $wgSharedDB );
+                                       $done = [];
+                                       foreach ( $this->tableAliases as $params ) {
+                                               if ( isset( $done[$params['dbname']] ) ) {
+                                                       continue;
+                                               }
+                                               $this->attachDatabase( $params['dbname'] );
+                                               $done[$params['dbname']] = 1;
                                        }
                                }
                        }
diff --git a/includes/db/loadbalancer/LBFactory.php b/includes/db/loadbalancer/LBFactory.php
deleted file mode 100644 (file)
index 6fd1550..0000000
+++ /dev/null
@@ -1,716 +0,0 @@
-<?php
-/**
- * Generator of database load balancing objects.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Database
- */
-
-use Psr\Log\LoggerInterface;
-use MediaWiki\MediaWikiServices;
-use MediaWiki\Services\DestructibleService;
-use MediaWiki\Logger\LoggerFactory;
-
-/**
- * An interface for generating database load balancers
- * @ingroup Database
- */
-abstract class LBFactory implements DestructibleService {
-       /** @var ChronologyProtector */
-       protected $chronProt;
-       /** @var TransactionProfiler */
-       protected $trxProfiler;
-       /** @var LoggerInterface */
-       protected $trxLogger;
-       /** @var LoggerInterface */
-       protected $replLogger;
-       /** @var BagOStuff */
-       protected $srvCache;
-       /** @var BagOStuff */
-       protected $memCache;
-       /** @var WANObjectCache */
-       protected $wanCache;
-
-       /** @var mixed */
-       protected $ticket;
-       /** @var string|bool String if a requested DBO_TRX transaction round is active */
-       protected $trxRoundId = false;
-       /** @var string|bool Reason all LBs are read-only or false if not */
-       protected $readOnlyReason = false;
-       /** @var callable[] */
-       protected $replicationWaitCallbacks = [];
-
-       const SHUTDOWN_NO_CHRONPROT = 0; // don't save DB positions at all
-       const SHUTDOWN_CHRONPROT_ASYNC = 1; // save DB positions, but don't wait on remote DCs
-       const SHUTDOWN_CHRONPROT_SYNC = 2; // save DB positions, waiting on all DCs
-
-       /**
-        * Construct a factory based on a configuration array (typically from $wgLBFactoryConf)
-        * @param array $conf
-        * @TODO: inject objects via dependency framework
-        */
-       public function __construct( array $conf ) {
-               if ( isset( $conf['readOnlyReason'] ) && is_string( $conf['readOnlyReason'] ) ) {
-                       $this->readOnlyReason = $conf['readOnlyReason'];
-               }
-               // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
-               $sCache = ObjectCache::getLocalServerInstance();
-               if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) {
-                       $this->srvCache = $sCache;
-               } else {
-                       $this->srvCache = new EmptyBagOStuff();
-               }
-               $cCache = ObjectCache::getLocalClusterInstance();
-               if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
-                       $this->memCache = $cCache;
-               } else {
-                       $this->memCache = new EmptyBagOStuff();
-               }
-               $wCache = ObjectCache::getMainWANInstance();
-               if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
-                       $this->wanCache = $wCache;
-               } else {
-                       $this->wanCache = WANObjectCache::newEmpty();
-               }
-               $this->trxProfiler = Profiler::instance()->getTransactionProfiler();
-               $this->trxLogger = LoggerFactory::getInstance( 'DBTransaction' );
-               $this->replLogger = LoggerFactory::getInstance( 'DBReplication' );
-               $this->chronProt = $this->newChronologyProtector();
-               $this->ticket = mt_rand();
-       }
-
-       /**
-        * Disables all load balancers. All connections are closed, and any attempt to
-        * open a new connection will result in a DBAccessError.
-        * @see LoadBalancer::disable()
-        */
-       public function destroy() {
-               $this->shutdown( self::SHUTDOWN_NO_CHRONPROT );
-               $this->forEachLBCallMethod( 'disable' );
-       }
-
-       /**
-        * Disables all access to the load balancer, will cause all database access
-        * to throw a DBAccessError
-        */
-       public static function disableBackend() {
-               MediaWikiServices::disableStorageBackend();
-       }
-
-       /**
-        * Get an LBFactory instance
-        *
-        * @deprecated since 1.27, use MediaWikiServices::getDBLoadBalancerFactory() instead.
-        *
-        * @return LBFactory
-        */
-       public static function singleton() {
-               return MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
-       }
-
-       /**
-        * Returns the LBFactory class to use and the load balancer configuration.
-        *
-        * @todo instead of this, use a ServiceContainer for managing the different implementations.
-        *
-        * @param array $config (e.g. $wgLBFactoryConf)
-        * @return string Class name
-        */
-       public static function getLBFactoryClass( array $config ) {
-               // For configuration backward compatibility after removing
-               // underscores from class names in MediaWiki 1.23.
-               $bcClasses = [
-                       'LBFactory_Simple' => 'LBFactorySimple',
-                       'LBFactory_Single' => 'LBFactorySingle',
-                       'LBFactory_Multi' => 'LBFactoryMulti',
-               ];
-
-               $class = $config['class'];
-
-               if ( isset( $bcClasses[$class] ) ) {
-                       $class = $bcClasses[$class];
-                       wfDeprecated(
-                               '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details',
-                               '1.23'
-                       );
-               }
-
-               return $class;
-       }
-
-       /**
-        * Shut down, close connections and destroy the cached instance.
-        *
-        * @deprecated since 1.27, use LBFactory::destroy()
-        */
-       public static function destroyInstance() {
-               MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->destroy();
-       }
-
-       /**
-        * Create a new load balancer object. The resulting object will be untracked,
-        * not chronology-protected, and the caller is responsible for cleaning it up.
-        *
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function newMainLB( $wiki = false );
-
-       /**
-        * Get a cached (tracked) load balancer object.
-        *
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function getMainLB( $wiki = false );
-
-       /**
-        * Create a new load balancer for external storage. The resulting object will be
-        * untracked, not chronology-protected, and the caller is responsible for
-        * cleaning it up.
-        *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract protected function newExternalLB( $cluster, $wiki = false );
-
-       /**
-        * Get a cached (tracked) load balancer for external storage
-        *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $wiki Wiki ID, or false for the current wiki
-        * @return LoadBalancer
-        */
-       abstract public function getExternalLB( $cluster, $wiki = false );
-
-       /**
-        * Execute a function for each tracked load balancer
-        * The callback is called with the load balancer as the first parameter,
-        * and $params passed as the subsequent parameters.
-        *
-        * @param callable $callback
-        * @param array $params
-        */
-       abstract public function forEachLB( $callback, array $params = [] );
-
-       /**
-        * Prepare all tracked load balancers for shutdown
-        * @param integer $mode One of the class SHUTDOWN_* constants
-        * @param callable|null $workCallback Work to mask ChronologyProtector writes
-        */
-       public function shutdown(
-               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
-       ) {
-               if ( $mode === self::SHUTDOWN_CHRONPROT_SYNC ) {
-                       $this->shutdownChronologyProtector( $this->chronProt, $workCallback, 'sync' );
-               } elseif ( $mode === self::SHUTDOWN_CHRONPROT_ASYNC ) {
-                       $this->shutdownChronologyProtector( $this->chronProt, null, 'async' );
-               }
-
-               $this->commitMasterChanges( __METHOD__ ); // sanity
-       }
-
-       /**
-        * Call a method of each tracked load balancer
-        *
-        * @param string $methodName
-        * @param array $args
-        */
-       private function forEachLBCallMethod( $methodName, array $args = [] ) {
-               $this->forEachLB(
-                       function ( LoadBalancer $loadBalancer, $methodName, array $args ) {
-                               call_user_func_array( [ $loadBalancer, $methodName ], $args );
-                       },
-                       [ $methodName, $args ]
-               );
-       }
-
-       /**
-        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
-        *
-        * @param string $fname Caller name
-        * @since 1.28
-        */
-       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
-               $this->forEachLBCallMethod( 'flushReplicaSnapshots', [ $fname ] );
-       }
-
-       /**
-        * Commit on all connections. Done for two reasons:
-        * 1. To commit changes to the masters.
-        * 2. To release the snapshot on all connections, master and replica DB.
-        * @param string $fname Caller name
-        * @param array $options Options map:
-        *   - maxWriteDuration: abort if more than this much time was spent in write queries
-        */
-       public function commitAll( $fname = __METHOD__, array $options = [] ) {
-               $this->commitMasterChanges( $fname, $options );
-               $this->forEachLBCallMethod( 'commitAll', [ $fname ] );
-       }
-
-       /**
-        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
-        *
-        * The DBO_TRX setting will be reverted to the default in each of these methods:
-        *   - commitMasterChanges()
-        *   - rollbackMasterChanges()
-        *   - commitAll()
-        *
-        * This allows for custom transaction rounds from any outer transaction scope.
-        *
-        * @param string $fname
-        * @throws DBTransactionError
-        * @since 1.28
-        */
-       public function beginMasterChanges( $fname = __METHOD__ ) {
-               if ( $this->trxRoundId !== false ) {
-                       throw new DBTransactionError(
-                               null,
-                               "$fname: transaction round '{$this->trxRoundId}' already started."
-                       );
-               }
-               $this->trxRoundId = $fname;
-               // Set DBO_TRX flags on all appropriate DBs
-               $this->forEachLBCallMethod( 'beginMasterChanges', [ $fname ] );
-       }
-
-       /**
-        * Commit changes on all master connections
-        * @param string $fname Caller name
-        * @param array $options Options map:
-        *   - maxWriteDuration: abort if more than this much time was spent in write queries
-        * @throws Exception
-        */
-       public function commitMasterChanges( $fname = __METHOD__, array $options = [] ) {
-               if ( $this->trxRoundId !== false && $this->trxRoundId !== $fname ) {
-                       throw new DBTransactionError(
-                               null,
-                               "$fname: transaction round '{$this->trxRoundId}' still running."
-                       );
-               }
-               // Run pre-commit callbacks and suppress post-commit callbacks, aborting on failure
-               $this->forEachLBCallMethod( 'finalizeMasterChanges' );
-               $this->trxRoundId = false;
-               // Perform pre-commit checks, aborting on failure
-               $this->forEachLBCallMethod( 'approveMasterChanges', [ $options ] );
-               // Log the DBs and methods involved in multi-DB transactions
-               $this->logIfMultiDbTransaction();
-               // Actually perform the commit on all master DB connections and revert DBO_TRX
-               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
-               // Run all post-commit callbacks
-               /** @var Exception $e */
-               $e = null; // first callback exception
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$e ) {
-                       $ex = $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_COMMIT );
-                       $e = $e ?: $ex;
-               } );
-               // Commit any dangling DBO_TRX transactions from callbacks on one DB to another DB
-               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
-               // Throw any last post-commit callback error
-               if ( $e instanceof Exception ) {
-                       throw $e;
-               }
-       }
-
-       /**
-        * Rollback changes on all master connections
-        * @param string $fname Caller name
-        * @since 1.23
-        */
-       public function rollbackMasterChanges( $fname = __METHOD__ ) {
-               $this->trxRoundId = false;
-               $this->forEachLBCallMethod( 'suppressTransactionEndCallbacks' );
-               $this->forEachLBCallMethod( 'rollbackMasterChanges', [ $fname ] );
-               // Run all post-rollback callbacks
-               $this->forEachLB( function ( LoadBalancer $lb ) {
-                       $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_ROLLBACK );
-               } );
-       }
-
-       /**
-        * Log query info if multi DB transactions are going to be committed now
-        */
-       private function logIfMultiDbTransaction() {
-               $callersByDB = [];
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$callersByDB ) {
-                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
-                       $callers = $lb->pendingMasterChangeCallers();
-                       if ( $callers ) {
-                               $callersByDB[$masterName] = $callers;
-                       }
-               } );
-
-               if ( count( $callersByDB ) >= 2 ) {
-                       $dbs = implode( ', ', array_keys( $callersByDB ) );
-                       $msg = "Multi-DB transaction [{$dbs}]:\n";
-                       foreach ( $callersByDB as $db => $callers ) {
-                               $msg .= "$db: " . implode( '; ', $callers ) . "\n";
-                       }
-                       $this->trxLogger->info( $msg );
-               }
-       }
-
-       /**
-        * Determine if any master connection has pending changes
-        * @return bool
-        * @since 1.23
-        */
-       public function hasMasterChanges() {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) {
-                       $ret = $ret || $lb->hasMasterChanges();
-               } );
-
-               return $ret;
-       }
-
-       /**
-        * Detemine if any lagged replica DB connection was used
-        * @return bool
-        * @since 1.28
-        */
-       public function laggedReplicaUsed() {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$ret ) {
-                       $ret = $ret || $lb->laggedReplicaUsed();
-               } );
-
-               return $ret;
-       }
-
-       /**
-        * @return bool
-        * @since 1.27
-        * @deprecated Since 1.28; use laggedReplicaUsed()
-        */
-       public function laggedSlaveUsed() {
-               return $this->laggedReplicaUsed();
-       }
-
-       /**
-        * Determine if any master connection has pending/written changes from this request
-        * @param float $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
-        * @return bool
-        * @since 1.27
-        */
-       public function hasOrMadeRecentMasterChanges( $age = null ) {
-               $ret = false;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $age, &$ret ) {
-                       $ret = $ret || $lb->hasOrMadeRecentMasterChanges( $age );
-               } );
-               return $ret;
-       }
-
-       /**
-        * Waits for the replica DBs to catch up to the current master position
-        *
-        * Use this when updating very large numbers of rows, as in maintenance scripts,
-        * to avoid causing too much lag. Of course, this is a no-op if there are no replica DBs.
-        *
-        * By default this waits on all DB clusters actually used in this request.
-        * This makes sense when lag being waiting on is caused by the code that does this check.
-        * In that case, setting "ifWritesSince" can avoid the overhead of waiting for clusters
-        * that were not changed since the last wait check. To forcefully wait on a specific cluster
-        * for a given wiki, use the 'wiki' parameter. To forcefully wait on an "external" cluster,
-        * use the "cluster" parameter.
-        *
-        * Never call this function after a large DB write that is *still* in a transaction.
-        * It only makes sense to call this after the possible lag inducing changes were committed.
-        *
-        * @param array $opts Optional fields that include:
-        *   - wiki : wait on the load balancer DBs that handles the given wiki
-        *   - cluster : wait on the given external load balancer DBs
-        *   - timeout : Max wait time. Default: ~60 seconds
-        *   - ifWritesSince: Only wait if writes were done since this UNIX timestamp
-        * @throws DBReplicationWaitError If a timeout or error occured waiting on a DB cluster
-        * @since 1.27
-        */
-       public function waitForReplication( array $opts = [] ) {
-               $opts += [
-                       'wiki' => false,
-                       'cluster' => false,
-                       'timeout' => 60,
-                       'ifWritesSince' => null
-               ];
-
-               // Figure out which clusters need to be checked
-               /** @var LoadBalancer[] $lbs */
-               $lbs = [];
-               if ( $opts['cluster'] !== false ) {
-                       $lbs[] = $this->getExternalLB( $opts['cluster'] );
-               } elseif ( $opts['wiki'] !== false ) {
-                       $lbs[] = $this->getMainLB( $opts['wiki'] );
-               } else {
-                       $this->forEachLB( function ( LoadBalancer $lb ) use ( &$lbs ) {
-                               $lbs[] = $lb;
-                       } );
-                       if ( !$lbs ) {
-                               return; // nothing actually used
-                       }
-               }
-
-               // Get all the master positions of applicable DBs right now.
-               // This can be faster since waiting on one cluster reduces the
-               // time needed to wait on the next clusters.
-               $masterPositions = array_fill( 0, count( $lbs ), false );
-               foreach ( $lbs as $i => $lb ) {
-                       if ( $lb->getServerCount() <= 1 ) {
-                               // Bug 27975 - Don't try to wait for replica DBs if there are none
-                               // Prevents permission error when getting master position
-                               continue;
-                       } elseif ( $opts['ifWritesSince']
-                               && $lb->lastMasterChangeTimestamp() < $opts['ifWritesSince']
-                       ) {
-                               continue; // no writes since the last wait
-                       }
-                       $masterPositions[$i] = $lb->getMasterPos();
-               }
-
-               // Run any listener callbacks *after* getting the DB positions. The more
-               // time spent in the callbacks, the less time is spent in waitForAll().
-               foreach ( $this->replicationWaitCallbacks as $callback ) {
-                       $callback();
-               }
-
-               $failed = [];
-               foreach ( $lbs as $i => $lb ) {
-                       if ( $masterPositions[$i] ) {
-                               // The DBMS may not support getMasterPos() or the whole
-                               // load balancer might be fake (e.g. $wgAllDBsAreLocalhost).
-                               if ( !$lb->waitForAll( $masterPositions[$i], $opts['timeout'] ) ) {
-                                       $failed[] = $lb->getServerName( $lb->getWriterIndex() );
-                               }
-                       }
-               }
-
-               if ( $failed ) {
-                       throw new DBReplicationWaitError(
-                               "Could not wait for replica DBs to catch up to " .
-                               implode( ', ', $failed )
-                       );
-               }
-       }
-
-       /**
-        * Add a callback to be run in every call to waitForReplication() before waiting
-        *
-        * Callbacks must clear any transactions that they start
-        *
-        * @param string $name Callback name
-        * @param callable|null $callback Use null to unset a callback
-        * @since 1.28
-        */
-       public function setWaitForReplicationListener( $name, callable $callback = null ) {
-               if ( $callback ) {
-                       $this->replicationWaitCallbacks[$name] = $callback;
-               } else {
-                       unset( $this->replicationWaitCallbacks[$name] );
-               }
-       }
-
-       /**
-        * Get a token asserting that no transaction writes are active
-        *
-        * @param string $fname Caller name (e.g. __METHOD__)
-        * @return mixed A value to pass to commitAndWaitForReplication()
-        * @since 1.28
-        */
-       public function getEmptyTransactionTicket( $fname ) {
-               if ( $this->hasMasterChanges() ) {
-                       $this->trxLogger->error( __METHOD__ . ": $fname does not have outer scope." );
-                       return null;
-               }
-
-               return $this->ticket;
-       }
-
-       /**
-        * Convenience method for safely running commitMasterChanges()/waitForReplication()
-        *
-        * This will commit and wait unless $ticket indicates it is unsafe to do so
-        *
-        * @param string $fname Caller name (e.g. __METHOD__)
-        * @param mixed $ticket Result of getEmptyTransactionTicket()
-        * @param array $opts Options to waitForReplication()
-        * @throws DBReplicationWaitError
-        * @since 1.28
-        */
-       public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] ) {
-               if ( $ticket !== $this->ticket ) {
-                       $logger = LoggerFactory::getInstance( 'DBPerformance' );
-                       $logger->error( __METHOD__ . ": cannot commit; $fname does not have outer scope." );
-                       return;
-               }
-
-               // The transaction owner and any caller with the empty transaction ticket can commit
-               // so that getEmptyTransactionTicket() callers don't risk seeing DBTransactionError.
-               if ( $this->trxRoundId !== false && $fname !== $this->trxRoundId ) {
-                       $this->trxLogger->info( "$fname: committing on behalf of {$this->trxRoundId}." );
-                       $fnameEffective = $this->trxRoundId;
-               } else {
-                       $fnameEffective = $fname;
-               }
-
-               $this->commitMasterChanges( $fnameEffective );
-               $this->waitForReplication( $opts );
-               // If a nested caller committed on behalf of $fname, start another empty $fname
-               // transaction, leaving the caller with the same empty transaction state as before.
-               if ( $fnameEffective !== $fname ) {
-                       $this->beginMasterChanges( $fnameEffective );
-               }
-       }
-
-       /**
-        * @param string $dbName DB master name (e.g. "db1052")
-        * @return float|bool UNIX timestamp when client last touched the DB or false if not recent
-        * @since 1.28
-        */
-       public function getChronologyProtectorTouched( $dbName ) {
-               return $this->chronProt->getTouched( $dbName );
-       }
-
-       /**
-        * Disable the ChronologyProtector for all load balancers
-        *
-        * This can be called at the start of special API entry points
-        *
-        * @since 1.27
-        */
-       public function disableChronologyProtection() {
-               $this->chronProt->setEnabled( false );
-       }
-
-       /**
-        * @return ChronologyProtector
-        */
-       protected function newChronologyProtector() {
-               $request = RequestContext::getMain()->getRequest();
-               $chronProt = new ChronologyProtector(
-                       ObjectCache::getMainStashInstance(),
-                       [
-                               'ip' => $request->getIP(),
-                               'agent' => $request->getHeader( 'User-Agent' ),
-                       ],
-                       $request->getFloat( 'cpPosTime', $request->getCookie( 'cpPosTime', '' ) )
-               );
-               $chronProt->setLogger( $this->replLogger );
-               if ( PHP_SAPI === 'cli' ) {
-                       $chronProt->setEnabled( false );
-               } elseif ( $request->getHeader( 'ChronologyProtection' ) === 'false' ) {
-                       // Request opted out of using position wait logic. This is useful for requests
-                       // done by the job queue or background ETL that do not have a meaningful session.
-                       $chronProt->setWaitEnabled( false );
-               }
-
-               return $chronProt;
-       }
-
-       /**
-        * Get and record all of the staged DB positions into persistent memory storage
-        *
-        * @param ChronologyProtector $cp
-        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
-        * @param string $mode One of (sync, async); whether to wait on remote datacenters
-        */
-       protected function shutdownChronologyProtector(
-               ChronologyProtector $cp, $workCallback, $mode
-       ) {
-               // Record all the master positions needed
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $cp ) {
-                       $cp->shutdownLB( $lb );
-               } );
-               // Write them to the persistent stash. Try to do something useful by running $work
-               // while ChronologyProtector waits for the stash write to replicate to all DCs.
-               $unsavedPositions = $cp->shutdown( $workCallback, $mode );
-               if ( $unsavedPositions && $workCallback ) {
-                       // Invoke callback in case it did not cache the result yet
-                       $workCallback(); // work now to block for less time in waitForAll()
-               }
-               // If the positions failed to write to the stash, at least wait on local datacenter
-               // replica DBs to catch up before responding. Even if there are several DCs, this increases
-               // the chance that the user will see their own changes immediately afterwards. As long
-               // as the sticky DC cookie applies (same domain), this is not even an issue.
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( $unsavedPositions ) {
-                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
-                       if ( isset( $unsavedPositions[$masterName] ) ) {
-                               $lb->waitForAll( $unsavedPositions[$masterName] );
-                       }
-               } );
-       }
-
-       /**
-        * Base parameters to LoadBalancer::__construct()
-        * @return array
-        */
-       final protected function baseLoadBalancerParams() {
-               return [
-                       'localDomain' => wfWikiID(),
-                       'readOnlyReason' => $this->readOnlyReason,
-                       'srvCache' => $this->srvCache,
-                       'memCache' => $this->memCache,
-                       'wanCache' => $this->wanCache,
-                       'trxProfiler' => $this->trxProfiler,
-                       'queryLogger' => LoggerFactory::getInstance( 'DBQuery' ),
-                       'connLogger' => LoggerFactory::getInstance( 'DBConnection' ),
-                       'replLogger' => LoggerFactory::getInstance( 'DBReplication' ),
-                       'errorLogger' => [ MWExceptionHandler::class, 'logException' ],
-                       'hostname' => wfHostname()
-               ];
-       }
-
-       /**
-        * @param LoadBalancer $lb
-        */
-       protected function initLoadBalancer( LoadBalancer $lb ) {
-               if ( $this->trxRoundId !== false ) {
-                       $lb->beginMasterChanges( $this->trxRoundId ); // set DBO_TRX
-               }
-       }
-
-       /**
-        * Append ?cpPosTime parameter to a URL for ChronologyProtector purposes if needed
-        *
-        * Note that unlike cookies, this works accross domains
-        *
-        * @param string $url
-        * @param float $time UNIX timestamp just before shutdown() was called
-        * @return string
-        * @since 1.28
-        */
-       public function appendPreShutdownTimeAsQuery( $url, $time ) {
-               $usedCluster = 0;
-               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$usedCluster ) {
-                       $usedCluster |= ( $lb->getServerCount() > 1 );
-               } );
-
-               if ( !$usedCluster ) {
-                       return $url; // no master/replica clusters touched
-               }
-
-               return wfAppendQuery( $url, [ 'cpPosTime' => $time ] );
-       }
-
-       /**
-        * Close all open database connections on all open load balancers.
-        * @since 1.28
-        */
-       public function closeAll() {
-               $this->forEachLBCallMethod( 'closeAll', [] );
-       }
-}
diff --git a/includes/db/loadbalancer/LBFactoryMW.php b/includes/db/loadbalancer/LBFactoryMW.php
new file mode 100644 (file)
index 0000000..2fb48c7
--- /dev/null
@@ -0,0 +1,154 @@
+<?php
+/**
+ * Generator of database load balancing objects.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+use MediaWiki\MediaWikiServices;
+use MediaWiki\Services\DestructibleService;
+use MediaWiki\Logger\LoggerFactory;
+
+/**
+ * Legacy MediaWiki-specific class for generating database load balancers
+ * @ingroup Database
+ */
+abstract class LBFactoryMW extends LBFactory implements DestructibleService {
+       /** @noinspection PhpMissingParentConstructorInspection */
+       /**
+        * Construct a factory based on a configuration array (typically from $wgLBFactoryConf)
+        * @param array $conf
+        * @TODO: inject objects via dependency framework
+        */
+       public function __construct( array $conf ) {
+               global $wgCommandLineMode;
+
+               $defaults = [
+                       'localDomain' => wfWikiID(),
+                       'hostname' => wfHostname(),
+                       'trxProfiler' => Profiler::instance()->getTransactionProfiler(),
+                       'replLogger' => LoggerFactory::getInstance( 'DBReplication' ),
+                       'queryLogger' => LoggerFactory::getInstance( 'wfLogDBError' ),
+                       'connLogger' => LoggerFactory::getInstance( 'wfLogDBError' ),
+                       'perfLogger' => LoggerFactory::getInstance( 'DBPerformance' ),
+                       'errorLogger' => [ MWExceptionHandler::class, 'logException' ]
+               ];
+               // Use APC/memcached style caching, but avoids loops with CACHE_DB (T141804)
+               $sCache = ObjectCache::getLocalServerInstance();
+               if ( $sCache->getQoS( $sCache::ATTR_EMULATION ) > $sCache::QOS_EMULATION_SQL ) {
+                       $defaults['srvCache'] = $sCache;
+               }
+               $cCache = ObjectCache::getLocalClusterInstance();
+               if ( $cCache->getQoS( $cCache::ATTR_EMULATION ) > $cCache::QOS_EMULATION_SQL ) {
+                       $defaults['memCache'] = $cCache;
+               }
+               $wCache = ObjectCache::getMainWANInstance();
+               if ( $wCache->getQoS( $wCache::ATTR_EMULATION ) > $wCache::QOS_EMULATION_SQL ) {
+                       $defaults['wanCache'] = $wCache;
+               }
+
+               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : $wgCommandLineMode;
+
+               parent::__construct( $conf + $defaults );
+       }
+
+       /**
+        * Returns the LBFactory class to use and the load balancer configuration.
+        *
+        * @todo instead of this, use a ServiceContainer for managing the different implementations.
+        *
+        * @param array $config (e.g. $wgLBFactoryConf)
+        * @return string Class name
+        */
+       public static function getLBFactoryClass( array $config ) {
+               // For configuration backward compatibility after removing
+               // underscores from class names in MediaWiki 1.23.
+               $bcClasses = [
+                       'LBFactory_Simple' => 'LBFactorySimple',
+                       'LBFactory_Single' => 'LBFactorySingle',
+                       'LBFactory_Multi' => 'LBFactoryMulti'
+               ];
+
+               $class = $config['class'];
+
+               if ( isset( $bcClasses[$class] ) ) {
+                       $class = $bcClasses[$class];
+                       wfDeprecated(
+                               '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details',
+                               '1.23'
+                       );
+               }
+
+               return $class;
+       }
+
+       /**
+        * @return bool
+        * @since 1.27
+        * @deprecated Since 1.28; use laggedReplicaUsed()
+        */
+       public function laggedSlaveUsed() {
+               return $this->laggedReplicaUsed();
+       }
+
+       protected function newChronologyProtector() {
+               $request = RequestContext::getMain()->getRequest();
+               $chronProt = new ChronologyProtector(
+                       ObjectCache::getMainStashInstance(),
+                       [
+                               'ip' => $request->getIP(),
+                               'agent' => $request->getHeader( 'User-Agent' ),
+                       ],
+                       $request->getFloat( 'cpPosTime', $request->getCookie( 'cpPosTime', '' ) )
+               );
+               if ( PHP_SAPI === 'cli' ) {
+                       $chronProt->setEnabled( false );
+               } elseif ( $request->getHeader( 'ChronologyProtection' ) === 'false' ) {
+                       // Request opted out of using position wait logic. This is useful for requests
+                       // done by the job queue or background ETL that do not have a meaningful session.
+                       $chronProt->setWaitEnabled( false );
+               }
+
+               return $chronProt;
+       }
+
+       /**
+        * Append ?cpPosTime parameter to a URL for ChronologyProtector purposes if needed
+        *
+        * Note that unlike cookies, this works accross domains
+        *
+        * @param string $url
+        * @param float $time UNIX timestamp just before shutdown() was called
+        * @return string
+        * @since 1.28
+        */
+       public function appendPreShutdownTimeAsQuery( $url, $time ) {
+               $usedCluster = 0;
+               $this->forEachLB( function ( LoadBalancer $lb ) use ( &$usedCluster ) {
+                       $usedCluster |= ( $lb->getServerCount() > 1 );
+               } );
+
+               if ( !$usedCluster ) {
+                       return $url; // no master/replica clusters touched
+               }
+
+               return wfAppendQuery( $url, [ 'cpPosTime' => $time ] );
+       }
+}
index bbee3b8..95bc8f4 100644 (file)
@@ -83,7 +83,7 @@
  *
  * @ingroup Database
  */
-class LBFactoryMulti extends LBFactory {
+class LBFactoryMulti extends LBFactoryMW {
        /** @var array A map of database names to section names */
        private $sectionsByDB;
 
index 908453c..09533eb 100644 (file)
@@ -24,7 +24,7 @@
 /**
  * A simple single-master LBFactory that gets its configuration from the b/c globals
  */
-class LBFactorySimple extends LBFactory {
+class LBFactorySimple extends LBFactoryMW {
        /** @var LoadBalancer */
        private $mainLB;
        /** @var LoadBalancer[] */
@@ -46,7 +46,7 @@ class LBFactorySimple extends LBFactory {
         * @return LoadBalancer
         */
        public function newMainLB( $wiki = false ) {
-               global $wgDBservers;
+               global $wgDBservers, $wgDBprefix, $wgDBmwschema;
 
                if ( is_array( $wgDBservers ) ) {
                        $servers = $wgDBservers;
@@ -56,7 +56,11 @@ class LBFactorySimple extends LBFactory {
                                } else {
                                        $server['replica'] = true;
                                }
-                               $server += [ 'flags' => DBO_DEFAULT ];
+                               $server += [
+                                       'schema' => $wgDBmwschema,
+                                       'tablePrefix' => $wgDBprefix,
+                                       'flags' => DBO_DEFAULT
+                               ];
                        }
                } else {
                        global $wgDBserver, $wgDBuser, $wgDBpassword, $wgDBname, $wgDBtype, $wgDebugDumpSql;
@@ -78,6 +82,8 @@ class LBFactorySimple extends LBFactory {
                                'user' => $wgDBuser,
                                'password' => $wgDBpassword,
                                'dbname' => $wgDBname,
+                               'schema' => $wgDBmwschema,
+                               'tablePrefix' => $wgDBprefix,
                                'type' => $wgDBtype,
                                'load' => 1,
                                'flags' => $flags,
index 8c019d8..dde678f 100644 (file)
@@ -439,7 +439,7 @@ class MWDebug {
 
                if ( $wgDebugComments ) {
                        $html .= "<!-- Debug output:\n" .
-                               htmlspecialchars( implode( "\n", self::$debug ) ) .
+                               htmlspecialchars( implode( "\n", self::$debug ), ENT_NOQUOTES ) .
                                "\n\n-->";
                }
 
index a348719..6585575 100644 (file)
@@ -24,7 +24,7 @@ class AtomicSectionUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->callback = $callback;
 
                if ( $this->dbw->trxLevel() ) {
-                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index d26cf9d..d61dec2 100644 (file)
@@ -23,7 +23,7 @@ class AutoCommitUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->callback = $callback;
 
                if ( $this->dbw->trxLevel() ) {
-                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $this->dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index e24a9c0..d18349b 100644 (file)
@@ -174,9 +174,12 @@ class LinksUpdate extends DataUpdate implements EnqueueableDataUpdate {
                // Commit and release the lock (if set)
                ScopedCallback::consume( $scopedLock );
                // Run post-commit hooks without DBO_TRX
-               $this->getDB()->onTransactionIdle( function() {
-                       Hooks::run( 'LinksUpdateComplete', [ &$this ] );
-               } );
+               $this->getDB()->onTransactionIdle(
+                       function () {
+                               Hooks::run( 'LinksUpdateComplete', [ &$this ] );
+                       },
+                       __METHOD__
+               );
        }
 
        /**
index 47b162c..5247e97 100644 (file)
@@ -19,7 +19,7 @@ class MWCallableUpdate implements DeferrableUpdate, DeferrableCallback {
                $this->fname = $fname;
 
                if ( $dbw && $dbw->trxLevel() ) {
-                       $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ] );
+                       $dbw->onTransactionResolution( [ $this, 'cancelOnRollback' ], $fname );
                }
        }
 
index 58b4ac7..bb7a01f 100644 (file)
@@ -209,7 +209,7 @@ class MWExceptionRenderer {
         * @param Exception $e
         * @return string Html to output
         */
-       private static function getHTML( Exception $e ) {
+       public static function getHTML( Exception $e ) {
                if ( self::showBackTrace( $e ) ) {
                        $html = "<div class=\"errorbox\"><p>" .
                                nl2br( htmlspecialchars( MWExceptionHandler::getLogMessage( $e ) ) ) .
diff --git a/includes/exception/TimestampException.php b/includes/exception/TimestampException.php
deleted file mode 100644 (file)
index b9c0c35..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<?php
-
-/**
- * @since 1.20
- */
-class TimestampException extends MWException {
-}
index fccb755..7b40a7b 100644 (file)
@@ -500,9 +500,12 @@ class LocalRepo extends FileRepo {
        function invalidateImageRedirect( Title $title ) {
                $key = $this->getSharedCacheKey( 'image_redirect', md5( $title->getDBkey() ) );
                if ( $key ) {
-                       $this->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
-                               ObjectCache::getMainWANInstance()->delete( $key );
-                       } );
+                       $this->getMasterDB()->onTransactionPreCommitOrIdle(
+                               function () use ( $key ) {
+                                       ObjectCache::getMainWANInstance()->delete( $key );
+                               },
+                               __METHOD__
+                       );
                }
        }
 
index d63a91b..618272c 100644 (file)
@@ -313,9 +313,12 @@ class LocalFile extends File {
                        return;
                }
 
-               $this->repo->getMasterDB()->onTransactionPreCommitOrIdle( function() use ( $key ) {
-                       ObjectCache::getMainWANInstance()->delete( $key );
-               } );
+               $this->repo->getMasterDB()->onTransactionPreCommitOrIdle(
+                       function () use ( $key ) {
+                               ObjectCache::getMainWANInstance()->delete( $key );
+                       },
+                       __METHOD__
+               );
        }
 
        /**
@@ -2002,12 +2005,15 @@ class LocalFile extends File {
                        }
                        // Release the lock *after* commit to avoid row-level contention.
                        // Make sure it triggers on rollback() as well as commit() (T132921).
-                       $dbw->onTransactionResolution( function () use ( $logger ) {
-                               $status = $this->releaseFileLock();
-                               if ( !$status->isGood() ) {
-                                       $logger->error( "Failed to unlock '{file}'", [ 'file' => $this->name ] );
-                               }
-                       } );
+                       $dbw->onTransactionResolution(
+                               function () use ( $logger ) {
+                                       $status = $this->releaseFileLock();
+                                       if ( !$status->isGood() ) {
+                                               $logger->error( "Failed to unlock '{file}'", [ 'file' => $this->name ] );
+                                       }
+                               },
+                               __METHOD__
+                       );
                        // Callers might care if the SELECT snapshot is safely fresh
                        $this->lockedOwnTrx = $makesTransaction;
                }
index 701403e..ded2bd8 100644 (file)
@@ -192,7 +192,7 @@ abstract class DatabaseInstaller {
                $this->db->begin( __METHOD__ );
 
                $error = $this->db->sourceFile(
-                       call_user_func( [ $this->db, $sourceFileMethod ] )
+                       call_user_func( [ $this, $sourceFileMethod ], $this->db )
                );
                if ( $error !== true ) {
                        $this->db->reportQueryError( $error, 0, '', __METHOD__ );
@@ -227,6 +227,47 @@ abstract class DatabaseInstaller {
                return $this->stepApplySourceFile( 'getUpdateKeysPath', 'updates', false );
        }
 
+       /**
+        * Return a path to the DBMS-specific SQL file if it exists,
+        * otherwise default SQL file
+        *
+        * @param IDatabase $db
+        * @param string $filename
+        * @return string
+        */
+       private function getSqlFilePath( $db, $filename ) {
+               global $IP;
+
+               $dbmsSpecificFilePath = "$IP/maintenance/" . $db->getType() . "/$filename";
+               if ( file_exists( $dbmsSpecificFilePath ) ) {
+                       return $dbmsSpecificFilePath;
+               } else {
+                       return "$IP/maintenance/$filename";
+               }
+       }
+
+       /**
+        * Return a path to the DBMS-specific schema file,
+        * otherwise default to tables.sql
+        *
+        * @param IDatabase $db
+        * @return string
+        */
+       public function getSchemaPath( $db ) {
+               return $this->getSqlFilePath( $db, 'tables.sql' );
+       }
+
+       /**
+        * Return a path to the DBMS-specific update key file,
+        * otherwise default to update-keys.sql
+        *
+        * @param IDatabase $db
+        * @return string
+        */
+       public function getUpdateKeysPath( $db ) {
+               return $this->getSqlFilePath( $db, 'update-keys.sql' );
+       }
+
        /**
         * Create the tables for each extension the user enabled
         * @return Status
index 86b2f3b..0e4b098 100644 (file)
@@ -659,7 +659,7 @@ abstract class DatabaseUpdater {
                $this->output( "$msg ..." );
 
                if ( !$isFullPath ) {
-                       $path = $this->db->patchPath( $path );
+                       $path = $this->patchPath( $this->db, $path );
                }
                if ( $this->fileHandle !== null ) {
                        $this->copyFile( $path );
@@ -671,6 +671,26 @@ abstract class DatabaseUpdater {
                return true;
        }
 
+       /**
+        * Get the full path of a patch file. Originally based on archive()
+        * from updaters.inc. Keep in mind this always returns a patch, as
+        * it fails back to MySQL if no DB-specific patch can be found
+        *
+        * @param IDatabase $db
+        * @param string $patch The name of the patch, like patch-something.sql
+        * @return string Full path to patch file
+        */
+       public function patchPath( IDatabase $db, $patch ) {
+               global $IP;
+
+               $dbType = $db->getType();
+               if ( file_exists( "$IP/maintenance/$dbType/archives/$patch" ) ) {
+                       return "$IP/maintenance/$dbType/archives/$patch";
+               } else {
+                       return "$IP/maintenance/archives/$patch";
+               }
+       }
+
        /**
         * Add a new table to the database
         *
@@ -1078,7 +1098,7 @@ abstract class DatabaseUpdater {
                global $wgProfiler;
 
                if ( !$this->doTable( 'profiling' ) ) {
-                       return true;
+                       return;
                }
 
                $profileToDb = false;
index 50727a2..856cdfd 100644 (file)
@@ -186,7 +186,8 @@ class JobQueueDB extends JobQueue {
                $dbw->onTransactionIdle(
                        function () use ( $dbw, $jobs, $flags, $method ) {
                                $this->doBatchPushInternal( $dbw, $jobs, $flags, $method );
-                       }
+                       },
+                       __METHOD__
                );
        }
 
@@ -494,15 +495,18 @@ class JobQueueDB extends JobQueue {
                // jobs to become no-ops without any actual jobs that made them redundant.
                $dbw = $this->getMasterDB();
                $cache = $this->dupCache;
-               $dbw->onTransactionIdle( function () use ( $cache, $params, $key, $dbw ) {
-                       $timestamp = $cache->get( $key ); // current last timestamp of this job
-                       if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
-                               return true; // a newer version of this root job was enqueued
-                       }
+               $dbw->onTransactionIdle(
+                       function () use ( $cache, $params, $key, $dbw ) {
+                               $timestamp = $cache->get( $key ); // current last timestamp of this job
+                               if ( $timestamp && $timestamp >= $params['rootJobTimestamp'] ) {
+                                       return true; // a newer version of this root job was enqueued
+                               }
 
-                       // Update the timestamp of the last root job started at the location...
-                       return $cache->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
-               } );
+                               // Update the timestamp of the last root job started at the location...
+                               return $cache->set( $key, $params['rootJobTimestamp'], JobQueueDB::ROOTJOB_TTL );
+                       },
+                       __METHOD__
+               );
 
                return true;
        }
index de5f410..71d68d9 100644 (file)
@@ -120,6 +120,8 @@ class JobQueueGroup {
         * @return void
         */
        public function push( $jobs ) {
+               global $wgJobTypesExcludedFromDefaultQueue;
+
                $jobs = is_array( $jobs ) ? $jobs : [ $jobs ];
                if ( !count( $jobs ) ) {
                        return;
@@ -149,7 +151,7 @@ class JobQueueGroup {
                        'true',
                        15
                );
-               if ( array_intersect( array_keys( $jobsByType ), $this->getDefaultQueueTypes() ) ) {
+               if ( array_diff( array_keys( $jobsByType ), $wgJobTypesExcludedFromDefaultQueue ) ) {
                        $cache->set(
                                $cache->makeGlobalKey( 'jobqueue', $this->wiki, 'hasjobs', self::TYPE_DEFAULT ),
                                'true',
index 809fb63..0e90674 100644 (file)
@@ -19,6 +19,7 @@
  * @author Aaron Schulz
  * @ingroup JobQueue
  */
+use MediaWiki\MediaWikiServices;
 
 /**
  * Job for pruning recent changes
@@ -81,7 +82,7 @@ class RecentChangesUpdateJob extends Job {
                        return; // already in progress
                }
 
-               $factory = wfGetLBFactory();
+               $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
                $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
                $cutoff = $dbw->timestamp( time() - $wgRCMaxAge );
                do {
@@ -119,109 +120,112 @@ class RecentChangesUpdateJob extends Job {
                $dbw = wfGetDB( DB_MASTER );
                // JobRunner uses DBO_TRX, but doesn't call begin/commit itself;
                // onTransactionIdle() will run immediately since there is no trx.
-               $dbw->onTransactionIdle( function() use ( $dbw, $days, $window ) {
-                       $factory = wfGetLBFactory();
-                       $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
-                       // Avoid disconnect/ping() cycle that makes locks fall off
-                       $dbw->setSessionOptions( [ 'connTimeout' => 900 ] );
-
-                       $lockKey = wfWikiID() . '-activeusers';
-                       if ( !$dbw->lock( $lockKey, __METHOD__, 1 ) ) {
-                               return; // exclusive update (avoids duplicate entries)
-                       }
-
-                       $nowUnix = time();
-                       // Get the last-updated timestamp for the cache
-                       $cTime = $dbw->selectField( 'querycache_info',
-                               'qci_timestamp',
-                               [ 'qci_type' => 'activeusers' ]
-                       );
-                       $cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
-
-                       // Pick the date range to fetch from. This is normally from the last
-                       // update to till the present time, but has a limited window for sanity.
-                       // If the window is limited, multiple runs are need to fully populate it.
-                       $sTimestamp = max( $cTimeUnix, $nowUnix - $days * 86400 );
-                       $eTimestamp = min( $sTimestamp + $window, $nowUnix );
-
-                       // Get all the users active since the last update
-                       $res = $dbw->select(
-                               [ 'recentchanges' ],
-                               [ 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ],
-                               [
-                                       'rc_user > 0', // actual accounts
-                                       'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata
-                                       'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ),
-                                       'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ),
-                                       'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) )
-                               ],
-                               __METHOD__,
-                               [
-                                       'GROUP BY' => [ 'rc_user_text' ],
-                                       'ORDER BY' => 'NULL' // avoid filesort
-                               ]
-                       );
-                       $names = [];
-                       foreach ( $res as $row ) {
-                               $names[$row->rc_user_text] = $row->lastedittime;
-                       }
-
-                       // Rotate out users that have not edited in too long (according to old data set)
-                       $dbw->delete( 'querycachetwo',
-                               [
-                                       'qcc_type' => 'activeusers',
-                                       'qcc_value < ' . $dbw->addQuotes( $nowUnix - $days * 86400 ) // TS_UNIX
-                               ],
-                               __METHOD__
-                       );
+               $dbw->onTransactionIdle(
+                       function () use ( $dbw, $days, $window ) {
+                               $factory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+                               $ticket = $factory->getEmptyTransactionTicket( __METHOD__ );
+                               // Avoid disconnect/ping() cycle that makes locks fall off
+                               $dbw->setSessionOptions( [ 'connTimeout' => 900 ] );
+
+                               $lockKey = wfWikiID() . '-activeusers';
+                               if ( !$dbw->lock( $lockKey, __METHOD__, 1 ) ) {
+                                       return; // exclusive update (avoids duplicate entries)
+                               }
 
-                       // Find which of the recently active users are already accounted for
-                       if ( count( $names ) ) {
-                               $res = $dbw->select( 'querycachetwo',
-                                       [ 'user_name' => 'qcc_title' ],
+                               $nowUnix = time();
+                               // Get the last-updated timestamp for the cache
+                               $cTime = $dbw->selectField( 'querycache_info',
+                                       'qci_timestamp',
+                                       [ 'qci_type' => 'activeusers' ]
+                               );
+                               $cTimeUnix = $cTime ? wfTimestamp( TS_UNIX, $cTime ) : 1;
+
+                               // Pick the date range to fetch from. This is normally from the last
+                               // update to till the present time, but has a limited window for sanity.
+                               // If the window is limited, multiple runs are need to fully populate it.
+                               $sTimestamp = max( $cTimeUnix, $nowUnix - $days * 86400 );
+                               $eTimestamp = min( $sTimestamp + $window, $nowUnix );
+
+                               // Get all the users active since the last update
+                               $res = $dbw->select(
+                                       [ 'recentchanges' ],
+                                       [ 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ],
                                        [
-                                               'qcc_type' => 'activeusers',
-                                               'qcc_namespace' => NS_USER,
-                                               'qcc_title' => array_keys( $names ) ],
-                                       __METHOD__
+                                               'rc_user > 0', // actual accounts
+                                               'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata
+                                               'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ),
+                                               'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ),
+                                               'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) )
+                                       ],
+                                       __METHOD__,
+                                       [
+                                               'GROUP BY' => [ 'rc_user_text' ],
+                                               'ORDER BY' => 'NULL' // avoid filesort
+                                       ]
                                );
+                               $names = [];
                                foreach ( $res as $row ) {
-                                       unset( $names[$row->user_name] );
+                                       $names[$row->rc_user_text] = $row->lastedittime;
                                }
-                       }
 
-                       // Insert the users that need to be added to the list
-                       if ( count( $names ) ) {
-                               $newRows = [];
-                               foreach ( $names as $name => $lastEditTime ) {
-                                       $newRows[] = [
+                               // Rotate out users that have not edited in too long (according to old data set)
+                               $dbw->delete( 'querycachetwo',
+                                       [
                                                'qcc_type' => 'activeusers',
-                                               'qcc_namespace' => NS_USER,
-                                               'qcc_title' => $name,
-                                               'qcc_value' => wfTimestamp( TS_UNIX, $lastEditTime ),
-                                               'qcc_namespacetwo' => 0, // unused
-                                               'qcc_titletwo' => '' // unused
-                                       ];
+                                               'qcc_value < ' . $dbw->addQuotes( $nowUnix - $days * 86400 ) // TS_UNIX
+                                       ],
+                                       __METHOD__
+                               );
+
+                               // Find which of the recently active users are already accounted for
+                               if ( count( $names ) ) {
+                                       $res = $dbw->select( 'querycachetwo',
+                                               [ 'user_name' => 'qcc_title' ],
+                                               [
+                                                       'qcc_type' => 'activeusers',
+                                                       'qcc_namespace' => NS_USER,
+                                                       'qcc_title' => array_keys( $names ) ],
+                                               __METHOD__
+                                       );
+                                       foreach ( $res as $row ) {
+                                               unset( $names[$row->user_name] );
+                                       }
                                }
-                               foreach ( array_chunk( $newRows, 500 ) as $rowBatch ) {
-                                       $dbw->insert( 'querycachetwo', $rowBatch, __METHOD__ );
-                                       $factory->commitAndWaitForReplication( __METHOD__, $ticket );
+
+                               // Insert the users that need to be added to the list
+                               if ( count( $names ) ) {
+                                       $newRows = [];
+                                       foreach ( $names as $name => $lastEditTime ) {
+                                               $newRows[] = [
+                                                       'qcc_type' => 'activeusers',
+                                                       'qcc_namespace' => NS_USER,
+                                                       'qcc_title' => $name,
+                                                       'qcc_value' => wfTimestamp( TS_UNIX, $lastEditTime ),
+                                                       'qcc_namespacetwo' => 0, // unused
+                                                       'qcc_titletwo' => '' // unused
+                                               ];
+                                       }
+                                       foreach ( array_chunk( $newRows, 500 ) as $rowBatch ) {
+                                               $dbw->insert( 'querycachetwo', $rowBatch, __METHOD__ );
+                                               $factory->commitAndWaitForReplication( __METHOD__, $ticket );
+                                       }
                                }
-                       }
 
-                       // If a transaction was already started, it might have an old
-                       // snapshot, so kludge the timestamp range back as needed.
-                       $asOfTimestamp = min( $eTimestamp, (int)$dbw->trxTimestamp() );
+                               // If a transaction was already started, it might have an old
+                               // snapshot, so kludge the timestamp range back as needed.
+                               $asOfTimestamp = min( $eTimestamp, (int)$dbw->trxTimestamp() );
 
-                       // Touch the data freshness timestamp
-                       $dbw->replace( 'querycache_info',
-                               [ 'qci_type' ],
-                               [ 'qci_type' => 'activeusers',
-                                       'qci_timestamp' => $dbw->timestamp( $asOfTimestamp ) ], // not always $now
-                               __METHOD__
-                       );
+                               // Touch the data freshness timestamp
+                               $dbw->replace( 'querycache_info',
+                                       [ 'qci_type' ],
+                                       [ 'qci_type' => 'activeusers',
+                                               'qci_timestamp' => $dbw->timestamp( $asOfTimestamp ) ], // not always $now
+                                       __METHOD__
+                               );
 
-                       $dbw->unlock( $lockKey, __METHOD__ );
-               } );
+                               $dbw->unlock( $lockKey, __METHOD__ );
+                       },
+                       __METHOD__
+               );
        }
 }
index 5eafcb3..d76d866 100644 (file)
@@ -36,42 +36,45 @@ class PurgeJobUtils {
                        return;
                }
 
-               $dbw->onTransactionIdle( function() use ( $dbw, $namespace, $dbkeys ) {
-                       $services = MediaWikiServices::getInstance();
-                       $lbFactory = $services->getDBLoadBalancerFactory();
-                       // Determine which pages need to be updated.
-                       // This is necessary to prevent the job queue from smashing the DB with
-                       // large numbers of concurrent invalidations of the same page.
-                       $now = $dbw->timestamp();
-                       $ids = $dbw->selectFieldValues(
-                               'page',
-                               'page_id',
-                               [
-                                       'page_namespace' => $namespace,
-                                       'page_title' => $dbkeys,
-                                       'page_touched < ' . $dbw->addQuotes( $now )
-                               ],
-                               __METHOD__
-                       );
-
-                       if ( !$ids ) {
-                               return;
-                       }
-
-                       $batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
-                       $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
-                       foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
-                               $dbw->update(
+               $dbw->onTransactionIdle(
+                       function () use ( $dbw, $namespace, $dbkeys ) {
+                               $services = MediaWikiServices::getInstance();
+                               $lbFactory = $services->getDBLoadBalancerFactory();
+                               // Determine which pages need to be updated.
+                               // This is necessary to prevent the job queue from smashing the DB with
+                               // large numbers of concurrent invalidations of the same page.
+                               $now = $dbw->timestamp();
+                               $ids = $dbw->selectFieldValues(
                                        'page',
-                                       [ 'page_touched' => $now ],
+                                       'page_id',
                                        [
-                                               'page_id' => $idBatch,
-                                               'page_touched < ' . $dbw->addQuotes( $now ) // handle races
+                                               'page_namespace' => $namespace,
+                                               'page_title' => $dbkeys,
+                                               'page_touched < ' . $dbw->addQuotes( $now )
                                        ],
                                        __METHOD__
                                );
-                               $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
-                       }
-               } );
+
+                               if ( !$ids ) {
+                                       return;
+                               }
+
+                               $batchSize = $services->getMainConfig()->get( 'UpdateRowsPerQuery' );
+                               $ticket = $lbFactory->getEmptyTransactionTicket( __METHOD__ );
+                               foreach ( array_chunk( $ids, $batchSize ) as $idBatch ) {
+                                       $dbw->update(
+                                               'page',
+                                               [ 'page_touched' => $now ],
+                                               [
+                                                       'page_id' => $idBatch,
+                                                       'page_touched < ' . $dbw->addQuotes( $now ) // handle races
+                                               ],
+                                               __METHOD__
+                                       );
+                                       $lbFactory->commitAndWaitForReplication( __METHOD__, $ticket );
+                               }
+                       },
+                       __METHOD__
+               );
        }
 }
index 1d23f9d..baa4e22 100644 (file)
@@ -246,8 +246,8 @@ class StatusValue {
         * Note, due to the lack of tools for comparing IStatusMessage objects, this
         * function will not work when using such an object as the search parameter.
         *
-        * @param IStatusMessage|string $source Message key or object to search for
-        * @param IStatusMessage|string $dest Replacement message key or object
+        * @param MessageSpecifier|string $source Message key or object to search for
+        * @param MessageSpecifier|string $dest Replacement message key or object
         * @return bool Return true if the replacement was done, false otherwise.
         */
        public function replaceMessage( $source, $dest ) {
index 19cc66a..6996ce5 100644 (file)
@@ -65,6 +65,13 @@ class WinCacheBagOStuff extends BagOStuff {
        }
 
        public function merge( $key, callable $callback, $exptime = 0, $attempts = 10, $flags = 0 ) {
-               return $this->mergeViaCas( $key, $callback, $exptime, $attempts );
+               if ( wincache_lock( $key ) ) { // optimize with FIFO lock
+                       $ok = $this->mergeViaLock( $key, $callback, $exptime, $attempts, $flags );
+                       wincache_unlock( $key );
+               } else {
+                       $ok = false;
+               }
+
+               return $ok;
        }
 }
index 09b820b..b102f0f 100644 (file)
@@ -96,17 +96,17 @@ class ChronologyProtector implements LoggerAwareInterface{
        }
 
        /**
-        * Initialise a LoadBalancer to give it appropriate chronology protection.
+        * Initialise a ILoadBalancer to give it appropriate chronology protection.
         *
         * If the stash has a previous master position recorded, this will try to
         * make sure that the next query to a replica DB of that master will see changes up
         * to that position by delaying execution. The delay may timeout and allow stale
         * data if no non-lagged replica DBs are available.
         *
-        * @param LoadBalancer $lb
+        * @param ILoadBalancer $lb
         * @return void
         */
-       public function initLB( LoadBalancer $lb ) {
+       public function initLB( ILoadBalancer $lb ) {
                if ( !$this->enabled || $lb->getServerCount() <= 1 ) {
                        return; // non-replicated setup or disabled
                }
@@ -122,13 +122,13 @@ class ChronologyProtector implements LoggerAwareInterface{
        }
 
        /**
-        * Notify the ChronologyProtector that the LoadBalancer is about to shut
+        * Notify the ChronologyProtector that the ILoadBalancer is about to shut
         * down. Saves replication positions.
         *
-        * @param LoadBalancer $lb
+        * @param ILoadBalancer $lb
         * @return void
         */
-       public function shutdownLB( LoadBalancer $lb ) {
+       public function shutdownLB( ILoadBalancer $lb ) {
                if ( !$this->enabled ) {
                        return; // not enabled
                } elseif ( !$lb->hasOrMadeRecentMasterChanges( INF ) ) {
index 9035bbd..f940580 100644 (file)
@@ -444,15 +444,15 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
-       public function onTransactionResolution( callable $callback ) {
+       public function onTransactionResolution( callable $callback, $fname = __METHOD__ ) {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
-       public function onTransactionIdle( callable $callback ) {
+       public function onTransactionIdle( callable $callback, $fname = __METHOD__ ) {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
-       public function onTransactionPreCommitOrIdle( callable $callback ) {
+       public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ ) {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
@@ -574,6 +574,10 @@ class DBConnRef implements IDatabase {
                return $this->__call( __FUNCTION__, func_get_args() );
        }
 
+       public function setTableAliases( array $aliases ) {
+               return $this->__call( __FUNCTION__, func_get_args() );
+       }
+
        /**
         * Clean up the connection when out of scope
         */
index 671ce99..9a0ffd5 100644 (file)
@@ -1284,10 +1284,11 @@ interface IDatabase {
         *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_ROLLBACK)
         *
         * @param callable $callback
+        * @param string $fname Caller name
         * @return mixed
         * @since 1.28
         */
-       public function onTransactionResolution( callable $callback );
+       public function onTransactionResolution( callable $callback, $fname = __METHOD__ );
 
        /**
         * Run a callback as soon as there is no transaction pending.
@@ -1306,9 +1307,10 @@ interface IDatabase {
         *   - How the transaction ended (IDatabase::TRIGGER_COMMIT or IDatabase::TRIGGER_IDLE)
         *
         * @param callable $callback
+        * @param string $fname Caller name
         * @since 1.20
         */
-       public function onTransactionIdle( callable $callback );
+       public function onTransactionIdle( callable $callback, $fname = __METHOD__ );
 
        /**
         * Run a callback before the current transaction commits or now if there is none.
@@ -1322,9 +1324,10 @@ interface IDatabase {
         * Updates will execute in the order they were enqueued.
         *
         * @param callable $callback
+        * @param string $fname Caller name
         * @since 1.22
         */
-       public function onTransactionPreCommitOrIdle( callable $callback );
+       public function onTransactionPreCommitOrIdle( callable $callback, $fname = __METHOD__ );
 
        /**
         * Run a callback each time any transaction commits or rolls back
@@ -1719,4 +1722,19 @@ interface IDatabase {
         * @since 1.27
         */
        public function isReadOnly();
+
+       /**
+        * Make certain table names use their own database, schema, and table prefix
+        * when passed into SQL queries pre-escaped and without a qualified database name
+        *
+        * For example, "user" can be converted to "myschema.mydbname.user" for convenience.
+        * Appearances like `user`, somedb.user, somedb.someschema.user will used literally.
+        *
+        * Calling this twice will completely clear any old table aliases. Also, note that
+        * callers are responsible for making sure the schemas and databases actually exist.
+        *
+        * @param array[] $aliases Map of (table => (dbname, schema, prefix) map)
+        * @since 1.28
+        */
+       public function setTableAliases( array $aliases );
 }
diff --git a/includes/libs/rdbms/defines.php b/includes/libs/rdbms/defines.php
new file mode 100644 (file)
index 0000000..48baa3c
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+/**@{
+ * Database related constants
+ */
+define( 'DBO_DEBUG', 1 );
+define( 'DBO_NOBUFFER', 2 );
+define( 'DBO_IGNORE', 4 );
+define( 'DBO_TRX', 8 ); // automatically start transaction on first query
+define( 'DBO_DEFAULT', 16 );
+define( 'DBO_PERSISTENT', 32 );
+define( 'DBO_SYSDBA', 64 ); // for oracle maintenance
+define( 'DBO_DDLMODE', 128 ); // when using schema files: mostly for Oracle
+define( 'DBO_SSL', 256 );
+define( 'DBO_COMPRESS', 512 );
+/**@}*/
+
+/**@{
+ * Valid database indexes
+ * Operation-based indexes
+ */
+define( 'DB_REPLICA', -1 );     # Read from a replica (or only server)
+define( 'DB_MASTER', -2 );    # Write to master (or only server)
+/**@}*/
+
+/**@{
+ * Flags for IDatabase::makeList()
+ * These are also available as Database class constants
+ */
+define( 'LIST_COMMA', 0 );
+define( 'LIST_AND', 1 );
+define( 'LIST_SET', 2 );
+define( 'LIST_NAMES', 3 );
+define( 'LIST_OR', 4 );
+/**@}*/
diff --git a/includes/libs/rdbms/lbfactory/LBFactory.php b/includes/libs/rdbms/lbfactory/LBFactory.php
new file mode 100644 (file)
index 0000000..e011ff0
--- /dev/null
@@ -0,0 +1,665 @@
+<?php
+/**
+ * Generator and manager of database load balancing objects
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+
+use Psr\Log\LoggerInterface;
+
+/**
+ * An interface for generating database load balancers
+ * @ingroup Database
+ */
+abstract class LBFactory {
+       /** @var ChronologyProtector */
+       protected $chronProt;
+       /** @var TransactionProfiler */
+       protected $trxProfiler;
+       /** @var LoggerInterface */
+       protected $replLogger;
+       /** @var LoggerInterface */
+       protected $connLogger;
+       /** @var LoggerInterface */
+       protected $queryLogger;
+       /** @var LoggerInterface */
+       protected $perfLogger;
+       /** @var callable Error logger */
+       protected $errorLogger;
+       /** @var BagOStuff */
+       protected $srvCache;
+       /** @var BagOStuff */
+       protected $memCache;
+       /** @var WANObjectCache */
+       protected $wanCache;
+
+       /** @var string Local domain */
+       protected $localDomain;
+       /** @var string Local hostname of the app server */
+       protected $hostname;
+       /** @var mixed */
+       protected $ticket;
+       /** @var string|bool String if a requested DBO_TRX transaction round is active */
+       protected $trxRoundId = false;
+       /** @var string|bool Reason all LBs are read-only or false if not */
+       protected $readOnlyReason = false;
+       /** @var callable[] */
+       protected $replicationWaitCallbacks = [];
+
+       /** @var bool Whether this PHP instance is for a CLI script */
+       protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
+
+       const SHUTDOWN_NO_CHRONPROT = 0; // don't save DB positions at all
+       const SHUTDOWN_CHRONPROT_ASYNC = 1; // save DB positions, but don't wait on remote DCs
+       const SHUTDOWN_CHRONPROT_SYNC = 2; // save DB positions, waiting on all DCs
+
+       private static $loggerFields =
+               [ 'replLogger', 'connLogger', 'queryLogger', 'perfLogger' ];
+
+       /**
+        * @TODO: document base params here
+        * @param array $conf
+        */
+       public function __construct( array $conf ) {
+               $this->localDomain = isset( $conf['localDomain'] ) ? $conf['localDomain'] : '';
+
+               if ( isset( $conf['readOnlyReason'] ) && is_string( $conf['readOnlyReason'] ) ) {
+                       $this->readOnlyReason = $conf['readOnlyReason'];
+               }
+
+               $this->srvCache = isset( $conf['srvCache'] ) ? $conf['srvCache'] : new EmptyBagOStuff();
+               $this->memCache = isset( $conf['memCache'] ) ? $conf['memCache'] : new EmptyBagOStuff();
+               $this->wanCache = isset( $conf['wanCache'] )
+                       ? $conf['wanCache']
+                       : WANObjectCache::newEmpty();
+
+               foreach ( self::$loggerFields as $key ) {
+                       $this->$key = isset( $conf[$key] ) ? $conf[$key] : new \Psr\Log\NullLogger();
+               }
+               $this->errorLogger = isset( $conf['errorLogger'] )
+                       ? $conf['errorLogger']
+                       : function ( Exception $e ) {
+                               trigger_error( E_WARNING, get_class( $e ) . ': ' . $e->getMessage() );
+                       };
+               $this->hostname = isset( $conf['hostname'] )
+                       ? $conf['hostname']
+                       : gethostname();
+
+               $this->chronProt = isset( $conf['chronProt'] )
+                       ? $conf['chronProt']
+                       : $this->newChronologyProtector();
+               $this->trxProfiler = isset( $conf['trxProfiler'] )
+                       ? $conf['trxProfiler']
+                       : new TransactionProfiler();
+
+               $this->ticket = mt_rand();
+               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
+       }
+
+       /**
+        * Disables all load balancers. All connections are closed, and any attempt to
+        * open a new connection will result in a DBAccessError.
+        * @see LoadBalancer::disable()
+        */
+       public function destroy() {
+               $this->shutdown( self::SHUTDOWN_NO_CHRONPROT );
+               $this->forEachLBCallMethod( 'disable' );
+       }
+
+       /**
+        * Create a new load balancer object. The resulting object will be untracked,
+        * not chronology-protected, and the caller is responsible for cleaning it up.
+        *
+        * @param bool|string $domain Wiki ID, or false for the current wiki
+        * @return ILoadBalancer
+        */
+       abstract public function newMainLB( $domain = false );
+
+       /**
+        * Get a cached (tracked) load balancer object.
+        *
+        * @param bool|string $domain Wiki ID, or false for the current wiki
+        * @return ILoadBalancer
+        */
+       abstract public function getMainLB( $domain = false );
+
+       /**
+        * Create a new load balancer for external storage. The resulting object will be
+        * untracked, not chronology-protected, and the caller is responsible for
+        * cleaning it up.
+        *
+        * @param string $cluster External storage cluster, or false for core
+        * @param bool|string $domain Wiki ID, or false for the current wiki
+        * @return ILoadBalancer
+        */
+       abstract protected function newExternalLB( $cluster, $domain = false );
+
+       /**
+        * Get a cached (tracked) load balancer for external storage
+        *
+        * @param string $cluster External storage cluster, or false for core
+        * @param bool|string $domain Wiki ID, or false for the current wiki
+        * @return ILoadBalancer
+        */
+       abstract public function getExternalLB( $cluster, $domain = false );
+
+       /**
+        * Execute a function for each tracked load balancer
+        * The callback is called with the load balancer as the first parameter,
+        * and $params passed as the subsequent parameters.
+        *
+        * @param callable $callback
+        * @param array $params
+        */
+       abstract public function forEachLB( $callback, array $params = [] );
+
+       /**
+        * Prepare all tracked load balancers for shutdown
+        * @param integer $mode One of the class SHUTDOWN_* constants
+        * @param callable|null $workCallback Work to mask ChronologyProtector writes
+        */
+       public function shutdown(
+               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null
+       ) {
+               if ( $mode === self::SHUTDOWN_CHRONPROT_SYNC ) {
+                       $this->shutdownChronologyProtector( $this->chronProt, $workCallback, 'sync' );
+               } elseif ( $mode === self::SHUTDOWN_CHRONPROT_ASYNC ) {
+                       $this->shutdownChronologyProtector( $this->chronProt, null, 'async' );
+               }
+
+               $this->commitMasterChanges( __METHOD__ ); // sanity
+       }
+
+       /**
+        * Call a method of each tracked load balancer
+        *
+        * @param string $methodName
+        * @param array $args
+        */
+       protected function forEachLBCallMethod( $methodName, array $args = [] ) {
+               $this->forEachLB(
+                       function ( ILoadBalancer $loadBalancer, $methodName, array $args ) {
+                               call_user_func_array( [ $loadBalancer, $methodName ], $args );
+                       },
+                       [ $methodName, $args ]
+               );
+       }
+
+       /**
+        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
+        *
+        * @param string $fname Caller name
+        * @since 1.28
+        */
+       public function flushReplicaSnapshots( $fname = __METHOD__ ) {
+               $this->forEachLBCallMethod( 'flushReplicaSnapshots', [ $fname ] );
+       }
+
+       /**
+        * Commit on all connections. Done for two reasons:
+        * 1. To commit changes to the masters.
+        * 2. To release the snapshot on all connections, master and replica DB.
+        * @param string $fname Caller name
+        * @param array $options Options map:
+        *   - maxWriteDuration: abort if more than this much time was spent in write queries
+        */
+       public function commitAll( $fname = __METHOD__, array $options = [] ) {
+               $this->commitMasterChanges( $fname, $options );
+               $this->forEachLBCallMethod( 'commitAll', [ $fname ] );
+       }
+
+       /**
+        * Flush any master transaction snapshots and set DBO_TRX (if DBO_DEFAULT is set)
+        *
+        * The DBO_TRX setting will be reverted to the default in each of these methods:
+        *   - commitMasterChanges()
+        *   - rollbackMasterChanges()
+        *   - commitAll()
+        *
+        * This allows for custom transaction rounds from any outer transaction scope.
+        *
+        * @param string $fname
+        * @throws DBTransactionError
+        * @since 1.28
+        */
+       public function beginMasterChanges( $fname = __METHOD__ ) {
+               if ( $this->trxRoundId !== false ) {
+                       throw new DBTransactionError(
+                               null,
+                               "$fname: transaction round '{$this->trxRoundId}' already started."
+                       );
+               }
+               $this->trxRoundId = $fname;
+               // Set DBO_TRX flags on all appropriate DBs
+               $this->forEachLBCallMethod( 'beginMasterChanges', [ $fname ] );
+       }
+
+       /**
+        * Commit changes on all master connections
+        * @param string $fname Caller name
+        * @param array $options Options map:
+        *   - maxWriteDuration: abort if more than this much time was spent in write queries
+        * @throws Exception
+        */
+       public function commitMasterChanges( $fname = __METHOD__, array $options = [] ) {
+               if ( $this->trxRoundId !== false && $this->trxRoundId !== $fname ) {
+                       throw new DBTransactionError(
+                               null,
+                               "$fname: transaction round '{$this->trxRoundId}' still running."
+                       );
+               }
+               // Run pre-commit callbacks and suppress post-commit callbacks, aborting on failure
+               $this->forEachLBCallMethod( 'finalizeMasterChanges' );
+               $this->trxRoundId = false;
+               // Perform pre-commit checks, aborting on failure
+               $this->forEachLBCallMethod( 'approveMasterChanges', [ $options ] );
+               // Log the DBs and methods involved in multi-DB transactions
+               $this->logIfMultiDbTransaction();
+               // Actually perform the commit on all master DB connections and revert DBO_TRX
+               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
+               // Run all post-commit callbacks
+               /** @var Exception $e */
+               $e = null; // first callback exception
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$e ) {
+                       $ex = $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_COMMIT );
+                       $e = $e ?: $ex;
+               } );
+               // Commit any dangling DBO_TRX transactions from callbacks on one DB to another DB
+               $this->forEachLBCallMethod( 'commitMasterChanges', [ $fname ] );
+               // Throw any last post-commit callback error
+               if ( $e instanceof Exception ) {
+                       throw $e;
+               }
+       }
+
+       /**
+        * Rollback changes on all master connections
+        * @param string $fname Caller name
+        * @since 1.23
+        */
+       public function rollbackMasterChanges( $fname = __METHOD__ ) {
+               $this->trxRoundId = false;
+               $this->forEachLBCallMethod( 'suppressTransactionEndCallbacks' );
+               $this->forEachLBCallMethod( 'rollbackMasterChanges', [ $fname ] );
+               // Run all post-rollback callbacks
+               $this->forEachLB( function ( ILoadBalancer $lb ) {
+                       $lb->runMasterPostTrxCallbacks( IDatabase::TRIGGER_ROLLBACK );
+               } );
+       }
+
+       /**
+        * Log query info if multi DB transactions are going to be committed now
+        */
+       private function logIfMultiDbTransaction() {
+               $callersByDB = [];
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$callersByDB ) {
+                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
+                       $callers = $lb->pendingMasterChangeCallers();
+                       if ( $callers ) {
+                               $callersByDB[$masterName] = $callers;
+                       }
+               } );
+
+               if ( count( $callersByDB ) >= 2 ) {
+                       $dbs = implode( ', ', array_keys( $callersByDB ) );
+                       $msg = "Multi-DB transaction [{$dbs}]:\n";
+                       foreach ( $callersByDB as $db => $callers ) {
+                               $msg .= "$db: " . implode( '; ', $callers ) . "\n";
+                       }
+                       $this->queryLogger->info( $msg );
+               }
+       }
+
+       /**
+        * Determine if any master connection has pending changes
+        * @return bool
+        * @since 1.23
+        */
+       public function hasMasterChanges() {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$ret ) {
+                       $ret = $ret || $lb->hasMasterChanges();
+               } );
+
+               return $ret;
+       }
+
+       /**
+        * Detemine if any lagged replica DB connection was used
+        * @return bool
+        * @since 1.28
+        */
+       public function laggedReplicaUsed() {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$ret ) {
+                       $ret = $ret || $lb->laggedReplicaUsed();
+               } );
+
+               return $ret;
+       }
+
+       /**
+        * Determine if any master connection has pending/written changes from this request
+        * @param float $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
+        * @return bool
+        * @since 1.27
+        */
+       public function hasOrMadeRecentMasterChanges( $age = null ) {
+               $ret = false;
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $age, &$ret ) {
+                       $ret = $ret || $lb->hasOrMadeRecentMasterChanges( $age );
+               } );
+               return $ret;
+       }
+
+       /**
+        * Waits for the replica DBs to catch up to the current master position
+        *
+        * Use this when updating very large numbers of rows, as in maintenance scripts,
+        * to avoid causing too much lag. Of course, this is a no-op if there are no replica DBs.
+        *
+        * By default this waits on all DB clusters actually used in this request.
+        * This makes sense when lag being waiting on is caused by the code that does this check.
+        * In that case, setting "ifWritesSince" can avoid the overhead of waiting for clusters
+        * that were not changed since the last wait check. To forcefully wait on a specific cluster
+        * for a given wiki, use the 'wiki' parameter. To forcefully wait on an "external" cluster,
+        * use the "cluster" parameter.
+        *
+        * Never call this function after a large DB write that is *still* in a transaction.
+        * It only makes sense to call this after the possible lag inducing changes were committed.
+        *
+        * @param array $opts Optional fields that include:
+        *   - wiki : wait on the load balancer DBs that handles the given wiki
+        *   - cluster : wait on the given external load balancer DBs
+        *   - timeout : Max wait time. Default: ~60 seconds
+        *   - ifWritesSince: Only wait if writes were done since this UNIX timestamp
+        * @throws DBReplicationWaitError If a timeout or error occured waiting on a DB cluster
+        * @since 1.27
+        */
+       public function waitForReplication( array $opts = [] ) {
+               $opts += [
+                       'wiki' => false,
+                       'cluster' => false,
+                       'timeout' => 60,
+                       'ifWritesSince' => null
+               ];
+
+               // Figure out which clusters need to be checked
+               /** @var ILoadBalancer[] $lbs */
+               $lbs = [];
+               if ( $opts['cluster'] !== false ) {
+                       $lbs[] = $this->getExternalLB( $opts['cluster'] );
+               } elseif ( $opts['wiki'] !== false ) {
+                       $lbs[] = $this->getMainLB( $opts['wiki'] );
+               } else {
+                       $this->forEachLB( function ( ILoadBalancer $lb ) use ( &$lbs ) {
+                               $lbs[] = $lb;
+                       } );
+                       if ( !$lbs ) {
+                               return; // nothing actually used
+                       }
+               }
+
+               // Get all the master positions of applicable DBs right now.
+               // This can be faster since waiting on one cluster reduces the
+               // time needed to wait on the next clusters.
+               $masterPositions = array_fill( 0, count( $lbs ), false );
+               foreach ( $lbs as $i => $lb ) {
+                       if ( $lb->getServerCount() <= 1 ) {
+                               // Bug 27975 - Don't try to wait for replica DBs if there are none
+                               // Prevents permission error when getting master position
+                               continue;
+                       } elseif ( $opts['ifWritesSince']
+                               && $lb->lastMasterChangeTimestamp() < $opts['ifWritesSince']
+                       ) {
+                               continue; // no writes since the last wait
+                       }
+                       $masterPositions[$i] = $lb->getMasterPos();
+               }
+
+               // Run any listener callbacks *after* getting the DB positions. The more
+               // time spent in the callbacks, the less time is spent in waitForAll().
+               foreach ( $this->replicationWaitCallbacks as $callback ) {
+                       $callback();
+               }
+
+               $failed = [];
+               foreach ( $lbs as $i => $lb ) {
+                       if ( $masterPositions[$i] ) {
+                               // The DBMS may not support getMasterPos() or the whole
+                               // load balancer might be fake (e.g. $wgAllDBsAreLocalhost).
+                               if ( !$lb->waitForAll( $masterPositions[$i], $opts['timeout'] ) ) {
+                                       $failed[] = $lb->getServerName( $lb->getWriterIndex() );
+                               }
+                       }
+               }
+
+               if ( $failed ) {
+                       throw new DBReplicationWaitError(
+                               "Could not wait for replica DBs to catch up to " .
+                               implode( ', ', $failed )
+                       );
+               }
+       }
+
+       /**
+        * Add a callback to be run in every call to waitForReplication() before waiting
+        *
+        * Callbacks must clear any transactions that they start
+        *
+        * @param string $name Callback name
+        * @param callable|null $callback Use null to unset a callback
+        * @since 1.28
+        */
+       public function setWaitForReplicationListener( $name, callable $callback = null ) {
+               if ( $callback ) {
+                       $this->replicationWaitCallbacks[$name] = $callback;
+               } else {
+                       unset( $this->replicationWaitCallbacks[$name] );
+               }
+       }
+
+       /**
+        * Get a token asserting that no transaction writes are active
+        *
+        * @param string $fname Caller name (e.g. __METHOD__)
+        * @return mixed A value to pass to commitAndWaitForReplication()
+        * @since 1.28
+        */
+       public function getEmptyTransactionTicket( $fname ) {
+               if ( $this->hasMasterChanges() ) {
+                       $this->queryLogger->error( __METHOD__ . ": $fname does not have outer scope." );
+                       return null;
+               }
+
+               return $this->ticket;
+       }
+
+       /**
+        * Convenience method for safely running commitMasterChanges()/waitForReplication()
+        *
+        * This will commit and wait unless $ticket indicates it is unsafe to do so
+        *
+        * @param string $fname Caller name (e.g. __METHOD__)
+        * @param mixed $ticket Result of getEmptyTransactionTicket()
+        * @param array $opts Options to waitForReplication()
+        * @throws DBReplicationWaitError
+        * @since 1.28
+        */
+       public function commitAndWaitForReplication( $fname, $ticket, array $opts = [] ) {
+               if ( $ticket !== $this->ticket ) {
+                       $this->perfLogger->error( __METHOD__ . ": $fname does not have outer scope." );
+                       return;
+               }
+
+               // The transaction owner and any caller with the empty transaction ticket can commit
+               // so that getEmptyTransactionTicket() callers don't risk seeing DBTransactionError.
+               if ( $this->trxRoundId !== false && $fname !== $this->trxRoundId ) {
+                       $this->queryLogger->info( "$fname: committing on behalf of {$this->trxRoundId}." );
+                       $fnameEffective = $this->trxRoundId;
+               } else {
+                       $fnameEffective = $fname;
+               }
+
+               $this->commitMasterChanges( $fnameEffective );
+               $this->waitForReplication( $opts );
+               // If a nested caller committed on behalf of $fname, start another empty $fname
+               // transaction, leaving the caller with the same empty transaction state as before.
+               if ( $fnameEffective !== $fname ) {
+                       $this->beginMasterChanges( $fnameEffective );
+               }
+       }
+
+       /**
+        * @param string $dbName DB master name (e.g. "db1052")
+        * @return float|bool UNIX timestamp when client last touched the DB or false if not recent
+        * @since 1.28
+        */
+       public function getChronologyProtectorTouched( $dbName ) {
+               return $this->chronProt->getTouched( $dbName );
+       }
+
+       /**
+        * Disable the ChronologyProtector for all load balancers
+        *
+        * This can be called at the start of special API entry points
+        *
+        * @since 1.27
+        */
+       public function disableChronologyProtection() {
+               $this->chronProt->setEnabled( false );
+       }
+
+       /**
+        * @return ChronologyProtector
+        */
+       protected function newChronologyProtector() {
+               $chronProt = new ChronologyProtector(
+                       $this->memCache,
+                       [
+                               'ip' => isset( $_SERVER[ 'REMOTE_ADDR' ] ) ? $_SERVER[ 'REMOTE_ADDR' ] : '',
+                               'agent' => isset( $_SERVER['HTTP_USER_AGENT'] ) ? $_SERVER['HTTP_USER_AGENT'] : ''
+                       ],
+                       isset( $_GET['cpPosTime'] ) ? $_GET['cpPosTime'] : null
+               );
+               $chronProt->setLogger( $this->replLogger );
+               if ( $this->cliMode ) {
+                       $chronProt->setEnabled( false );
+               }
+
+               return $chronProt;
+       }
+
+       /**
+        * Get and record all of the staged DB positions into persistent memory storage
+        *
+        * @param ChronologyProtector $cp
+        * @param callable|null $workCallback Work to do instead of waiting on syncing positions
+        * @param string $mode One of (sync, async); whether to wait on remote datacenters
+        */
+       protected function shutdownChronologyProtector(
+               ChronologyProtector $cp, $workCallback, $mode
+       ) {
+               // Record all the master positions needed
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $cp ) {
+                       $cp->shutdownLB( $lb );
+               } );
+               // Write them to the persistent stash. Try to do something useful by running $work
+               // while ChronologyProtector waits for the stash write to replicate to all DCs.
+               $unsavedPositions = $cp->shutdown( $workCallback, $mode );
+               if ( $unsavedPositions && $workCallback ) {
+                       // Invoke callback in case it did not cache the result yet
+                       $workCallback(); // work now to block for less time in waitForAll()
+               }
+               // If the positions failed to write to the stash, at least wait on local datacenter
+               // replica DBs to catch up before responding. Even if there are several DCs, this increases
+               // the chance that the user will see their own changes immediately afterwards. As long
+               // as the sticky DC cookie applies (same domain), this is not even an issue.
+               $this->forEachLB( function ( ILoadBalancer $lb ) use ( $unsavedPositions ) {
+                       $masterName = $lb->getServerName( $lb->getWriterIndex() );
+                       if ( isset( $unsavedPositions[$masterName] ) ) {
+                               $lb->waitForAll( $unsavedPositions[$masterName] );
+                       }
+               } );
+       }
+
+       /**
+        * Base parameters to LoadBalancer::__construct()
+        * @return array
+        */
+       final protected function baseLoadBalancerParams() {
+               return [
+                       'localDomain' => $this->localDomain,
+                       'readOnlyReason' => $this->readOnlyReason,
+                       'srvCache' => $this->srvCache,
+                       'wanCache' => $this->wanCache,
+                       'trxProfiler' => $this->trxProfiler,
+                       'queryLogger' => $this->queryLogger,
+                       'connLogger' => $this->connLogger,
+                       'replLogger' => $this->replLogger,
+                       'errorLogger' => $this->errorLogger,
+                       'hostname' => $this->hostname,
+                       'cliMode' => $this->cliMode,
+                       'agent' => $this->agent
+               ];
+       }
+
+       /**
+        * @param ILoadBalancer $lb
+        */
+       protected function initLoadBalancer( ILoadBalancer $lb ) {
+               if ( $this->trxRoundId !== false ) {
+                       $lb->beginMasterChanges( $this->trxRoundId ); // set DBO_TRX
+               }
+       }
+
+       /**
+        * Set a new table prefix for the existing local domain ID for testing
+        *
+        * @param string $prefix
+        * @since 1.28
+        */
+       public function setDomainPrefix( $prefix ) {
+               list( $dbName, ) = explode( '-', $this->localDomain, 2 );
+               $this->localDomain = "{$dbName}-{$prefix}";
+
+               $this->forEachLB( function( LoadBalancer $lb ) use ( $prefix ) {
+                       $lb->setDomainPrefix( $prefix );
+               } );
+       }
+
+       /**
+        * Close all open database connections on all open load balancers.
+        * @since 1.28
+        */
+       public function closeAll() {
+               $this->forEachLBCallMethod( 'closeAll', [] );
+       }
+
+       /**
+        * @param string $agent Agent name for query profiling
+        * @since 1.28
+        */
+       public function setAgentName( $agent ) {
+               $this->agent = $agent;
+       }
+}
index 903c160..57c905f 100644 (file)
@@ -42,8 +42,10 @@ class LoadBalancer implements ILoadBalancer {
        private $mWaitTimeout;
        /** @var string The LoadMonitor subclass name */
        private $mLoadMonitorClass;
+       /** @var array[] $aliases Map of (table => (dbname, schema, prefix) map) */
+       private $tableAliases = [];
 
-       /** @var LoadMonitor */
+       /** @var ILoadMonitor */
        private $mLoadMonitor;
        /** @var BagOStuff */
        private $srvCache;
@@ -86,6 +88,10 @@ class LoadBalancer implements ILoadBalancer {
        private $localDomain;
        /** @var string Current server name */
        private $host;
+       /** @var bool Whether this PHP instance is for a CLI script */
+       protected $cliMode;
+       /** @var string Agent name for query profiling */
+       protected $agent;
 
        /** @var callable Exception logger */
        private $errorLogger;
@@ -173,7 +179,7 @@ class LoadBalancer implements ILoadBalancer {
                $this->errorLogger = isset( $params['errorLogger'] )
                        ? $params['errorLogger']
                        : function ( Exception $e ) {
-                               trigger_error( E_WARNING, $e->getMessage() );
+                               trigger_error( get_class( $e ) . ': ' . $e->getMessage(), E_WARNING );
                        };
 
                foreach ( [ 'replLogger', 'connLogger', 'queryLogger', 'perfLogger' ] as $key ) {
@@ -183,12 +189,14 @@ class LoadBalancer implements ILoadBalancer {
                $this->host = isset( $params['hostname'] )
                        ? $params['hostname']
                        : ( gethostname() ?: 'unknown' );
+               $this->cliMode = isset( $params['cliMode'] ) ? $params['cliMode'] : PHP_SAPI === 'cli';
+               $this->agent = isset( $params['agent'] ) ? $params['agent'] : '';
        }
 
        /**
         * Get a LoadMonitor instance
         *
-        * @return LoadMonitor
+        * @return ILoadMonitor
         */
        private function getLoadMonitor() {
                if ( !isset( $this->mLoadMonitor ) ) {
@@ -507,7 +515,7 @@ class LoadBalancer implements ILoadBalancer {
                }
 
                if ( $domain === $this->localDomain ) {
-                       $domain = false;
+                       $domain = false; // local connection requested
                }
 
                $groups = ( $groups === false || $groups === [] )
@@ -619,6 +627,8 @@ class LoadBalancer implements ILoadBalancer {
         * @since 1.22
         */
        public function getConnectionRef( $db, $groups = [], $domain = false ) {
+               $domain = ( $domain !== false ) ? $domain : $this->localDomain;
+
                return new DBConnRef( $this, $this->getConnection( $db, $groups, $domain ) );
        }
 
@@ -642,6 +652,10 @@ class LoadBalancer implements ILoadBalancer {
        }
 
        public function openConnection( $i, $domain = false ) {
+               if ( $domain === $this->localDomain ) {
+                       $domain = false; // local connection requested
+               }
+
                if ( $domain !== false ) {
                        $conn = $this->openForeignConnection( $i, $domain );
                } elseif ( isset( $this->mConns['local'][$i][0] ) ) {
@@ -803,10 +817,14 @@ class LoadBalancer implements ILoadBalancer {
                                "{$this->connsOpened}+ connections made (master=$masterName)" );
                }
 
+               $server['srvCache'] = $this->srvCache;
                // Set loggers
                $server['connLogger'] = $this->connLogger;
                $server['queryLogger'] = $this->queryLogger;
                $server['trxProfiler'] = $this->trxProfiler;
+               $server['cliMode'] = $this->cliMode;
+               $server['errorLogger'] = $this->errorLogger;
+               $server['agent'] = $this->agent;
 
                // Create a live connection object
                try {
@@ -821,6 +839,7 @@ class LoadBalancer implements ILoadBalancer {
                $db->setLazyMasterHandle(
                        $this->getLazyConnectionRef( DB_MASTER, [], $db->getWikiID() )
                );
+               $db->setTableAliases( $this->tableAliases );
 
                if ( $server['serverIndex'] === $this->getWriterIndex() ) {
                        if ( $this->trxRoundId !== false ) {
@@ -1569,6 +1588,23 @@ class LoadBalancer implements ILoadBalancer {
                );
        }
 
+       /**
+        * Make certain table names use their own database, schema, and table prefix
+        * when passed into SQL queries pre-escaped and without a qualified database name
+        *
+        * For example, "user" can be converted to "myschema.mydbname.user" for convenience.
+        * Appearances like `user`, somedb.user, somedb.someschema.user will used literally.
+        *
+        * Calling this twice will completely clear any old table aliases. Also, note that
+        * callers are responsible for making sure the schemas and databases actually exist.
+        *
+        * @param array[] $aliases Map of (table => (dbname, schema, prefix) map)
+        * @since 1.28
+        */
+       public function setTableAliases( array $aliases ) {
+               $this->tableAliases = $aliases;
+       }
+
        /**
         * Set a new table prefix for the existing local domain ID for testing
         *
@@ -1577,7 +1613,10 @@ class LoadBalancer implements ILoadBalancer {
         */
        public function setDomainPrefix( $prefix ) {
                list( $dbName, ) = explode( '-', $this->localDomain, 2 );
-
                $this->localDomain = "{$dbName}-{$prefix}";
+
+               $this->forEachOpenConnection( function ( IDatabase $db ) use ( $prefix ) {
+                       $db->tablePrefix( $prefix );
+               } );
        }
 }
diff --git a/includes/libs/rdbms/loadmonitor/ILoadMonitor.php b/includes/libs/rdbms/loadmonitor/ILoadMonitor.php
new file mode 100644 (file)
index 0000000..e355c03
--- /dev/null
@@ -0,0 +1,65 @@
+<?php
+/**
+ * Database load monitoring interface
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Database
+ */
+use Psr\Log\LoggerAwareInterface;
+
+/**
+ * An interface for database load monitoring
+ *
+ * @ingroup Database
+ */
+interface ILoadMonitor extends LoggerAwareInterface {
+       /**
+        * Construct a new LoadMonitor with a given LoadBalancer parent
+        *
+        * @param ILoadBalancer $lb LoadBalancer this instance serves
+        * @param BagOStuff $sCache Local server memory cache
+        * @param BagOStuff $cCache Local cluster memory cache
+        */
+       public function __construct( ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache );
+
+       /**
+        * Perform pre-connection load ratio adjustment.
+        * @param int[] &$loads
+        * @param string|bool $group The selected query group. Default: false
+        * @param string|bool $domain Default: false
+        */
+       public function scaleLoads( &$loads, $group = false, $domain = false );
+
+       /**
+        * Get an estimate of replication lag (in seconds) for each server
+        *
+        * Values may be "false" if replication is too broken to estimate
+        *
+        * @param integer[] $serverIndexes
+        * @param string $domain
+        *
+        * @return array Map of (server index => float|int|bool)
+        */
+       public function getLagTimes( $serverIndexes, $domain );
+
+       /**
+        * Clear any process and persistent cache of lag times
+        * @since 1.27
+        */
+       public function clearCaches();
+}
index 460746b..1da8f4e 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * Database load monitoring.
- *
  * 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
  * @file
  * @ingroup Database
  */
-use Psr\Log\LoggerAwareInterface;
+
+use Psr\Log\LoggerInterface;
 
 /**
- * An interface for database load monitoring
+ * Basic DB load monitor with no external dependencies
+ * Uses memcached to cache the replication lag for a short time
  *
  * @ingroup Database
  */
-interface LoadMonitor extends LoggerAwareInterface {
-       /**
-        * Construct a new LoadMonitor with a given LoadBalancer parent
-        *
-        * @param ILoadBalancer $lb LoadBalancer this instance serves
-        * @param BagOStuff $sCache Local server memory cache
-        * @param BagOStuff $cCache Local cluster memory cache
-        */
-       public function __construct( ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache );
-
-       /**
-        * Perform pre-connection load ratio adjustment.
-        * @param int[] &$loads
-        * @param string|bool $group The selected query group. Default: false
-        * @param string|bool $domain Default: false
-        */
-       public function scaleLoads( &$loads, $group = false, $domain = false );
-
-       /**
-        * Get an estimate of replication lag (in seconds) for each server
-        *
-        * Values may be "false" if replication is too broken to estimate
-        *
-        * @param integer[] $serverIndexes
-        * @param string $domain
-        *
-        * @return array Map of (server index => float|int|bool)
-        */
-       public function getLagTimes( $serverIndexes, $domain );
-
-       /**
-        * Clear any process and persistent cache of lag times
-        * @since 1.27
-        */
-       public function clearCaches();
+class LoadMonitor implements ILoadMonitor {
+       /** @var ILoadBalancer */
+       protected $parent;
+       /** @var BagOStuff */
+       protected $srvCache;
+       /** @var BagOStuff */
+       protected $mainCache;
+       /** @var LoggerInterface */
+       protected $replLogger;
+
+       public function __construct( ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache ) {
+               $this->parent = $lb;
+               $this->srvCache = $srvCache;
+               $this->mainCache = $cache;
+               $this->replLogger = new \Psr\Log\NullLogger();
+       }
+
+       public function setLogger( LoggerInterface $logger ) {
+               $this->replLogger = $logger;
+       }
+
+       public function scaleLoads( &$loads, $group = false, $domain = false ) {
+       }
+
+       public function getLagTimes( $serverIndexes, $domain ) {
+               if ( count( $serverIndexes ) == 1 && reset( $serverIndexes ) == 0 ) {
+                       # Single server only, just return zero without caching
+                       return [ 0 => 0 ];
+               }
+
+               $key = $this->getLagTimeCacheKey();
+               # Randomize TTLs to reduce stampedes (4.0 - 5.0 sec)
+               $ttl = mt_rand( 4e6, 5e6 ) / 1e6;
+               # Keep keys around longer as fallbacks
+               $staleTTL = 60;
+
+               # (a) Check the local APC cache
+               $value = $this->srvCache->get( $key );
+               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
+                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from local cache" );
+                       return $value['lagTimes']; // cache hit
+               }
+               $staleValue = $value ?: false;
+
+               # (b) Check the shared cache and backfill APC
+               $value = $this->mainCache->get( $key );
+               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
+                       $this->srvCache->set( $key, $value, $staleTTL );
+                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from main cache" );
+
+                       return $value['lagTimes']; // cache hit
+               }
+               $staleValue = $value ?: $staleValue;
+
+               # (c) Cache key missing or expired; regenerate and backfill
+               if ( $this->mainCache->lock( $key, 0, 10 ) ) {
+                       # Let this process alone update the cache value
+                       $cache = $this->mainCache;
+                       /** @noinspection PhpUnusedLocalVariableInspection */
+                       $unlocker = new ScopedCallback( function () use ( $cache, $key ) {
+                               $cache->unlock( $key );
+                       } );
+               } elseif ( $staleValue ) {
+                       # Could not acquire lock but an old cache exists, so use it
+                       return $staleValue['lagTimes'];
+               }
+
+               $lagTimes = [];
+               foreach ( $serverIndexes as $i ) {
+                       if ( $i == $this->parent->getWriterIndex() ) {
+                               $lagTimes[$i] = 0; // master always has no lag
+                               continue;
+                       }
+
+                       $conn = $this->parent->getAnyOpenConnection( $i );
+                       if ( $conn ) {
+                               $close = false; // already open
+                       } else {
+                               $conn = $this->parent->openConnection( $i, $domain );
+                               $close = true; // new connection
+                       }
+
+                       if ( !$conn ) {
+                               $lagTimes[$i] = false;
+                               $host = $this->parent->getServerName( $i );
+                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is unreachable" );
+                               continue;
+                       }
+
+                       $lagTimes[$i] = $conn->getLag();
+                       if ( $lagTimes[$i] === false ) {
+                               $host = $this->parent->getServerName( $i );
+                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is not replicating?" );
+                       }
+
+                       if ( $close ) {
+                               # Close the connection to avoid sleeper connections piling up.
+                               # Note that the caller will pick one of these DBs and reconnect,
+                               # which is slightly inefficient, but this only matters for the lag
+                               # time cache miss cache, which is far less common that cache hits.
+                               $this->parent->closeConnection( $conn );
+                       }
+               }
+
+               # Add a timestamp key so we know when it was cached
+               $value = [ 'lagTimes' => $lagTimes, 'timestamp' => microtime( true ) ];
+               $this->mainCache->set( $key, $value, $staleTTL );
+               $this->srvCache->set( $key, $value, $staleTTL );
+               $this->replLogger->info( __METHOD__ . ": re-calculated lag times ($key)" );
+
+               return $value['lagTimes'];
+       }
+
+       public function clearCaches() {
+               $key = $this->getLagTimeCacheKey();
+               $this->srvCache->delete( $key );
+               $this->mainCache->delete( $key );
+       }
+
+       private function getLagTimeCacheKey() {
+               $writerIndex = $this->parent->getWriterIndex();
+               // Lag is per-server, not per-DB, so key on the master DB name
+               return $this->srvCache->makeGlobalKey(
+                       'lag-times',
+                       $this->parent->getServerName( $writerIndex )
+               );
+       }
 }
index 02babfe..7286417 100644 (file)
  * @ingroup Database
  */
 
-use Psr\Log\LoggerInterface;
-
 /**
  * Basic MySQL load monitor with no external dependencies
  * Uses memcached to cache the replication lag for a short time
  *
  * @ingroup Database
  */
-class LoadMonitorMySQL implements LoadMonitor {
-       /** @var ILoadBalancer */
-       protected $parent;
-       /** @var BagOStuff */
-       protected $srvCache;
-       /** @var BagOStuff */
-       protected $mainCache;
-       /** @var LoggerInterface */
-       protected $replLogger;
-
-       public function __construct( ILoadBalancer $lb, BagOStuff $srvCache, BagOStuff $cache ) {
-               $this->parent = $lb;
-               $this->srvCache = $srvCache;
-               $this->mainCache = $cache;
-               $this->replLogger = new \Psr\Log\NullLogger();
-       }
-
-       public function setLogger( LoggerInterface $logger ) {
-               $this->replLogger = $logger;
-       }
-
-       public function scaleLoads( &$loads, $group = false, $wiki = false ) {
-       }
-
-       public function getLagTimes( $serverIndexes, $wiki ) {
-               if ( count( $serverIndexes ) == 1 && reset( $serverIndexes ) == 0 ) {
-                       # Single server only, just return zero without caching
-                       return [ 0 => 0 ];
-               }
-
-               $key = $this->getLagTimeCacheKey();
-               # Randomize TTLs to reduce stampedes (4.0 - 5.0 sec)
-               $ttl = mt_rand( 4e6, 5e6 ) / 1e6;
-               # Keep keys around longer as fallbacks
-               $staleTTL = 60;
-
-               # (a) Check the local APC cache
-               $value = $this->srvCache->get( $key );
-               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
-                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from local cache" );
-                       return $value['lagTimes']; // cache hit
-               }
-               $staleValue = $value ?: false;
-
-               # (b) Check the shared cache and backfill APC
-               $value = $this->mainCache->get( $key );
-               if ( $value && $value['timestamp'] > ( microtime( true ) - $ttl ) ) {
-                       $this->srvCache->set( $key, $value, $staleTTL );
-                       $this->replLogger->debug( __METHOD__ . ": got lag times ($key) from main cache" );
-
-                       return $value['lagTimes']; // cache hit
-               }
-               $staleValue = $value ?: $staleValue;
-
-               # (c) Cache key missing or expired; regenerate and backfill
-               if ( $this->mainCache->lock( $key, 0, 10 ) ) {
-                       # Let this process alone update the cache value
-                       $cache = $this->mainCache;
-                       /** @noinspection PhpUnusedLocalVariableInspection */
-                       $unlocker = new ScopedCallback( function () use ( $cache, $key ) {
-                               $cache->unlock( $key );
-                       } );
-               } elseif ( $staleValue ) {
-                       # Could not acquire lock but an old cache exists, so use it
-                       return $staleValue['lagTimes'];
-               }
-
-               $lagTimes = [];
-               foreach ( $serverIndexes as $i ) {
-                       if ( $i == $this->parent->getWriterIndex() ) {
-                               $lagTimes[$i] = 0; // master always has no lag
-                               continue;
-                       }
-
-                       $conn = $this->parent->getAnyOpenConnection( $i );
-                       if ( $conn ) {
-                               $close = false; // already open
-                       } else {
-                               $conn = $this->parent->openConnection( $i, $wiki );
-                               $close = true; // new connection
-                       }
-
-                       if ( !$conn ) {
-                               $lagTimes[$i] = false;
-                               $host = $this->parent->getServerName( $i );
-                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is unreachable" );
-                               continue;
-                       }
-
-                       $lagTimes[$i] = $conn->getLag();
-                       if ( $lagTimes[$i] === false ) {
-                               $host = $this->parent->getServerName( $i );
-                               $this->replLogger->error( __METHOD__ . ": host $host (#$i) is not replicating?" );
-                       }
-
-                       if ( $close ) {
-                               # Close the connection to avoid sleeper connections piling up.
-                               # Note that the caller will pick one of these DBs and reconnect,
-                               # which is slightly inefficient, but this only matters for the lag
-                               # time cache miss cache, which is far less common that cache hits.
-                               $this->parent->closeConnection( $conn );
-                       }
-               }
-
-               # Add a timestamp key so we know when it was cached
-               $value = [ 'lagTimes' => $lagTimes, 'timestamp' => microtime( true ) ];
-               $this->mainCache->set( $key, $value, $staleTTL );
-               $this->srvCache->set( $key, $value, $staleTTL );
-               $this->replLogger->info( __METHOD__ . ": re-calculated lag times ($key)" );
-
-               return $value['lagTimes'];
-       }
-
-       public function clearCaches() {
-               $key = $this->getLagTimeCacheKey();
-               $this->srvCache->delete( $key );
-               $this->mainCache->delete( $key );
-       }
-
-       private function getLagTimeCacheKey() {
-               $writerIndex = $this->parent->getWriterIndex();
-               // Lag is per-server, not per-DB, so key on the master DB name
-               return $this->srvCache->makeGlobalKey(
-                       'lag-times',
-                       $this->parent->getServerName( $writerIndex )
-               );
+class LoadMonitorMySQL extends LoadMonitor {
+       public function scaleLoads( &$loads, $group = false, $domain = false ) {
+               // @TODO: maybe use Threads_running/Threads_created ratio to guess load
+               // and Queries/Uptime to guess if a server is warming up the buffer pool
        }
 }
index a5fc85d..8062001 100644 (file)
@@ -20,7 +20,7 @@
  */
 use Psr\Log\LoggerInterface;
 
-class LoadMonitorNull implements LoadMonitor {
+class LoadMonitorNull implements ILoadMonitor {
        public function __construct( ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache ) {
 
        }
@@ -28,11 +28,11 @@ class LoadMonitorNull implements LoadMonitor {
        public function setLogger( LoggerInterface $logger ) {
        }
 
-       public function scaleLoads( &$loads, $group = false, $wiki = false ) {
+       public function scaleLoads( &$loads, $group = false, $domain = false ) {
 
        }
 
-       public function getLagTimes( $serverIndexes, $wiki ) {
+       public function getLagTimes( $serverIndexes, $domain ) {
                return array_fill_keys( $serverIndexes, 0 );
        }
 
diff --git a/includes/libs/time/ConvertableTimestamp.php b/includes/libs/time/ConvertableTimestamp.php
new file mode 100644 (file)
index 0000000..af7eca6
--- /dev/null
@@ -0,0 +1,243 @@
+<?php
+/**
+ * Creation, parsing, and conversion of timestamps.
+ *
+ * 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
+ * @since 1.20
+ * @author Tyler Romeo, 2012
+ */
+
+/**
+ * Library for creating, parsing, and converting timestamps. Based on the JS
+ * library that does the same thing.
+ *
+ * @since 1.28
+ */
+class ConvertableTimestamp {
+       /**
+        * Standard gmdate() formats for the different timestamp types.
+        */
+       private static $formats = [
+               TS_UNIX => 'U',
+               TS_MW => 'YmdHis',
+               TS_DB => 'Y-m-d H:i:s',
+               TS_ISO_8601 => 'Y-m-d\TH:i:s\Z',
+               TS_ISO_8601_BASIC => 'Ymd\THis\Z',
+               TS_EXIF => 'Y:m:d H:i:s', // This shouldn't ever be used, but is included for completeness
+               TS_RFC2822 => 'D, d M Y H:i:s',
+               TS_ORACLE => 'd-m-Y H:i:s.000000', // Was 'd-M-y h.i.s A' . ' +00:00' before r51500
+               TS_POSTGRES => 'Y-m-d H:i:s',
+       ];
+
+       /**
+        * The actual timestamp being wrapped (DateTime object).
+        * @var DateTime
+        */
+       public $timestamp;
+
+       /**
+        * Make a new timestamp and set it to the specified time,
+        * or the current time if unspecified.
+        *
+        * @param bool|string|int|float|DateTime $timestamp Timestamp to set, or false for current time
+        */
+       public function __construct( $timestamp = false ) {
+               if ( $timestamp instanceof DateTime ) {
+                       $this->timestamp = $timestamp;
+               } else {
+                       $this->setTimestamp( $timestamp );
+               }
+       }
+
+       /**
+        * Set the timestamp to the specified time, or the current time if unspecified.
+        *
+        * Parse the given timestamp into either a DateTime object or a Unix timestamp,
+        * and then store it.
+        *
+        * @param string|bool $ts Timestamp to store, or false for now
+        * @throws TimestampException
+        */
+       public function setTimestamp( $ts = false ) {
+               $m = [];
+               $da = [];
+               $strtime = '';
+
+               // We want to catch 0, '', null... but not date strings starting with a letter.
+               if ( !$ts || $ts === "\0\0\0\0\0\0\0\0\0\0\0\0\0\0" ) {
+                       $uts = time();
+                       $strtime = "@$uts";
+               } elseif ( preg_match( '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
+                       # TS_DB
+               } elseif ( preg_match( '/^(\d{4}):(\d\d):(\d\d) (\d\d):(\d\d):(\d\d)$/D', $ts, $da ) ) {
+                       # TS_EXIF
+               } elseif ( preg_match( '/^(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)$/D', $ts, $da ) ) {
+                       # TS_MW
+               } elseif ( preg_match( '/^(-?\d{1,13})(\.\d+)?$/D', $ts, $m ) ) {
+                       # TS_UNIX
+                       $strtime = "@{$m[1]}"; // http://php.net/manual/en/datetime.formats.compound.php
+               } elseif ( preg_match( '/^\d{2}-\d{2}-\d{4} \d{2}:\d{2}:\d{2}.\d{6}$/', $ts ) ) {
+                       # TS_ORACLE // session altered to DD-MM-YYYY HH24:MI:SS.FF6
+                       $strtime = preg_replace( '/(\d\d)\.(\d\d)\.(\d\d)(\.(\d+))?/', "$1:$2:$3",
+                               str_replace( '+00:00', 'UTC', $ts ) );
+               } elseif ( preg_match(
+                       '/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.*\d*)?Z?$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_ISO_8601
+               } elseif ( preg_match(
+                       '/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(?:\.*\d*)?Z?$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_ISO_8601_BASIC
+               } elseif ( preg_match(
+                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d*[\+\- ](\d\d)$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_POSTGRES
+               } elseif ( preg_match(
+                       '/^(\d{4})\-(\d\d)\-(\d\d) (\d\d):(\d\d):(\d\d)\.*\d* GMT$/',
+                       $ts,
+                       $da
+               ) ) {
+                       # TS_POSTGRES
+               } elseif ( preg_match(
+               # Day of week
+                       '/^[ \t\r\n]*([A-Z][a-z]{2},[ \t\r\n]*)?' .
+                       # dd Mon yyyy
+                       '\d\d?[ \t\r\n]*[A-Z][a-z]{2}[ \t\r\n]*\d{2}(?:\d{2})?' .
+                       # hh:mm:ss
+                       '[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d[ \t\r\n]*:[ \t\r\n]*\d\d/S',
+                       $ts
+               ) ) {
+                       # TS_RFC2822, accepting a trailing comment.
+                       # See http://www.squid-cache.org/mail-archive/squid-users/200307/0122.html / r77171
+                       # The regex is a superset of rfc2822 for readability
+                       $strtime = strtok( $ts, ';' );
+               } elseif ( preg_match( '/^[A-Z][a-z]{5,8}, \d\d-[A-Z][a-z]{2}-\d{2} \d\d:\d\d:\d\d/', $ts ) ) {
+                       # TS_RFC850
+                       $strtime = $ts;
+               } elseif ( preg_match( '/^[A-Z][a-z]{2} [A-Z][a-z]{2} +\d{1,2} \d\d:\d\d:\d\d \d{4}/', $ts ) ) {
+                       # asctime
+                       $strtime = $ts;
+               } else {
+                       throw new TimestampException( __METHOD__ . ": Invalid timestamp - $ts" );
+               }
+
+               if ( !$strtime ) {
+                       $da = array_map( 'intval', $da );
+                       $da[0] = "%04d-%02d-%02dT%02d:%02d:%02d.00+00:00";
+                       $strtime = call_user_func_array( "sprintf", $da );
+               }
+
+               try {
+                       $final = new DateTime( $strtime, new DateTimeZone( 'GMT' ) );
+               } catch ( Exception $e ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.', $e->getCode(), $e );
+               }
+
+               if ( $final === false ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timestamp format.' );
+               }
+
+               $this->timestamp = $final;
+       }
+
+       /**
+        * Get the timestamp represented by this object in a certain form.
+        *
+        * Convert the internal timestamp to the specified format and then
+        * return it.
+        *
+        * @param int $style Constant Output format for timestamp
+        * @throws TimestampException
+        * @return string The formatted timestamp
+        */
+       public function getTimestamp( $style = TS_UNIX ) {
+               if ( !isset( self::$formats[$style] ) ) {
+                       throw new TimestampException( __METHOD__ . ': Illegal timestamp output type.' );
+               }
+
+               $output = $this->timestamp->format( self::$formats[$style] );
+
+               if ( ( $style == TS_RFC2822 ) || ( $style == TS_POSTGRES ) ) {
+                       $output .= ' GMT';
+               }
+
+               if ( $style == TS_MW && strlen( $output ) !== 14 ) {
+                       throw new TimestampException( __METHOD__ . ': The timestamp cannot be represented in ' .
+                               'the specified format' );
+               }
+
+               return $output;
+       }
+
+       /**
+        * @return string
+        */
+       public function __toString() {
+               return $this->getTimestamp();
+       }
+
+       /**
+        * Calculate the difference between two ConvertableTimestamp objects.
+        *
+        * @param ConvertableTimestamp $relativeTo Base time to calculate difference from
+        * @return DateInterval|bool The DateInterval object representing the
+        *   difference between the two dates or false on failure
+        */
+       public function diff( ConvertableTimestamp $relativeTo ) {
+               return $this->timestamp->diff( $relativeTo->timestamp );
+       }
+
+       /**
+        * Set the timezone of this timestamp to the specified timezone.
+        *
+        * @param string $timezone Timezone to set
+        * @throws TimestampException
+        */
+       public function setTimezone( $timezone ) {
+               try {
+                       $this->timestamp->setTimezone( new DateTimeZone( $timezone ) );
+               } catch ( Exception $e ) {
+                       throw new TimestampException( __METHOD__ . ': Invalid timezone.', $e->getCode(), $e );
+               }
+       }
+
+       /**
+        * Get the timezone of this timestamp.
+        *
+        * @return DateTimeZone The timezone
+        */
+       public function getTimezone() {
+               return $this->timestamp->getTimezone();
+       }
+
+       /**
+        * Format the timestamp in a given format.
+        *
+        * @param string $format Pattern to format in
+        * @return string The formatted timestamp
+        */
+       public function format( $format ) {
+               return $this->timestamp->format( $format );
+       }
+}
diff --git a/includes/libs/time/TimestampException.php b/includes/libs/time/TimestampException.php
new file mode 100644 (file)
index 0000000..36ffdee
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+/**
+ * @since 1.20
+ */
+class TimestampException extends Exception {
+}
diff --git a/includes/libs/time/defines.php b/includes/libs/time/defines.php
new file mode 100644 (file)
index 0000000..ff4dde8
--- /dev/null
@@ -0,0 +1,52 @@
+<?php
+
+/**
+ * Unix time - the number of seconds since 1970-01-01 00:00:00 UTC
+ */
+define( 'TS_UNIX', 0 );
+
+/**
+ * MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS)
+ */
+define( 'TS_MW', 1 );
+
+/**
+ * MySQL DATETIME (YYYY-MM-DD HH:MM:SS)
+ */
+define( 'TS_DB', 2 );
+
+/**
+ * RFC 2822 format, for E-mail and HTTP headers
+ */
+define( 'TS_RFC2822', 3 );
+
+/**
+ * ISO 8601 format with no timezone: 1986-02-09T20:00:00Z
+ *
+ * This is used by Special:Export
+ */
+define( 'TS_ISO_8601', 4 );
+
+/**
+ * An Exif timestamp (YYYY:MM:DD HH:MM:SS)
+ *
+ * @see http://exif.org/Exif2-2.PDF The Exif 2.2 spec, see page 28 for the
+ *       DateTime tag and page 36 for the DateTimeOriginal and
+ *       DateTimeDigitized tags.
+ */
+define( 'TS_EXIF', 5 );
+
+/**
+ * Oracle format time.
+ */
+define( 'TS_ORACLE', 6 );
+
+/**
+ * Postgres format time.
+ */
+define( 'TS_POSTGRES', 7 );
+
+/**
+ * ISO 8601 basic format with no timezone: 19860209T200000Z.  This is used by ResourceLoader
+ */
+define( 'TS_ISO_8601_BASIC', 9 );
index 80061d5..db6df86 100644 (file)
@@ -2333,9 +2333,10 @@ class Article implements Page {
        /**
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::getText
+        * @deprecated since 1.21 use WikiPage::getContent() instead
         */
        public function getText( $audience = Revision::FOR_PUBLIC, User $user = null ) {
-               ContentHandler::deprecated( __METHOD__, '1.21' );
+               wfDeprecated( __METHOD__, '1.21' );
                return $this->mPage->getText( $audience, $user );
        }
 
index 6c0c4a8..faac26d 100644 (file)
@@ -3031,10 +3031,13 @@ class WikiPage implements Page, IDBAccessObject {
                $logEntry->setComment( $reason );
                $logid = $logEntry->insert();
 
-               $dbw->onTransactionPreCommitOrIdle( function () use ( $dbw, $logEntry, $logid ) {
-                       // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
-                       $logEntry->publish( $logid );
-               } );
+               $dbw->onTransactionPreCommitOrIdle(
+                       function () use ( $dbw, $logEntry, $logid ) {
+                               // Bug 56776: avoid deadlocks (especially from FileDeleteForm)
+                               $logEntry->publish( $logid );
+                       },
+                       __METHOD__
+               );
 
                $dbw->endAtomic( __METHOD__ );
 
@@ -3672,7 +3675,8 @@ class WikiPage implements Page, IDBAccessObject {
                                                $cat->refreshCounts();
                                        }
                                }
-                       }
+                       },
+                       __METHOD__
                );
        }
 
index 97a86c3..34a0a99 100644 (file)
@@ -1031,9 +1031,23 @@ MESSAGE;
                                                $strContent = isset( $styles['css'] ) ? implode( '', $styles['css'] ) : '';
                                                break;
                                        default:
+                                               $scripts = isset( $content['scripts'] ) ? $content['scripts'] : '';
+                                               if ( is_string( $scripts ) ) {
+                                                       if ( $name === 'site' || $name === 'user' ) {
+                                                               // Legacy scripts that run in the global scope without a closure.
+                                                               // mw.loader.implement will use globalEval if scripts is a string.
+                                                               // Minify manually here, because general response minification is
+                                                               // not effective due it being a string literal, not a function.
+                                                               if ( !ResourceLoader::inDebugMode() ) {
+                                                                       $scripts = self::filter( 'minify-js', $scripts ); // T107377
+                                                               }
+                                                       } else {
+                                                               $scripts = new XmlJsCode( $scripts );
+                                                       }
+                                               }
                                                $strContent = self::makeLoaderImplementScript(
                                                        $name,
-                                                       isset( $content['scripts'] ) ? $content['scripts'] : '',
+                                                       $scripts,
                                                        isset( $content['styles'] ) ? $content['styles'] : [],
                                                        isset( $content['messagesBlob'] ) ? new XmlJsCode( $content['messagesBlob'] ) : [],
                                                        isset( $content['templates'] ) ? $content['templates'] : []
@@ -1112,7 +1126,8 @@ MESSAGE;
         * Return JS code that calls mw.loader.implement with given module properties.
         *
         * @param string $name Module name
-        * @param mixed $scripts List of URLs to JavaScript files or String of JavaScript code
+        * @param XmlJsCode|array|string $scripts Code as XmlJsCode (to be wrapped in a closure),
+        *  list of URLs to JavaScript files, or a string of JavaScript for `$.globalEval`.
         * @param mixed $styles Array of CSS strings keyed by media type, or an array of lists of URLs
         *   to CSS files keyed by media type
         * @param mixed $messages List of messages associated with this module. May either be an
@@ -1123,22 +1138,13 @@ MESSAGE;
         * @throws MWException
         * @return string
         */
-       public static function makeLoaderImplementScript(
+       protected static function makeLoaderImplementScript(
                $name, $scripts, $styles, $messages, $templates
        ) {
-               if ( is_string( $scripts ) ) {
-                       // Site and user module are a legacy scripts that run in the global scope (no closure).
-                       // Transportation as string instructs mw.loader.implement to use globalEval.
-                       if ( $name === 'site' || $name === 'user' ) {
-                               // Minify manually because the general makeModuleResponse() minification won't be
-                               // effective here due to the script being a string instead of a function. (T107377)
-                               if ( !ResourceLoader::inDebugMode() ) {
-                                       $scripts = self::filter( 'minify-js', $scripts );
-                               }
-                       } else {
-                               $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts}\n}" );
-                       }
-               } elseif ( !is_array( $scripts ) ) {
+
+               if ( $scripts instanceof XmlJsCode ) {
+                       $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts->value}\n}" );
+               } elseif ( !is_string( $scripts ) && !is_array( $scripts ) ) {
                        throw new MWException( 'Invalid scripts error. Array of URLs or string of code expected.' );
                }
                // mw.loader.implement requires 'styles', 'messages' and 'templates' to be objects (not
index 30fe3ae..4a2f759 100644 (file)
@@ -219,7 +219,11 @@ class ResourceLoaderContext {
         */
        public function msg() {
                return call_user_func_array( 'wfMessage', func_get_args() )
-                       ->inLanguage( $this->getLanguage() );
+                       ->inLanguage( $this->getLanguage() )
+                       // Use a dummy title because there is no real title
+                       // for this endpoint, and the cache won't vary on it
+                       // anyways.
+                       ->title( Title::newFromText( 'Dwimmerlaik' ) );
        }
 
        /**
index 2351efd..3e94460 100644 (file)
@@ -487,9 +487,12 @@ abstract class ResourceLoaderModule implements LoggerAwareInterface {
                                );
 
                                if ( $dbw->trxLevel() ) {
-                                       $dbw->onTransactionResolution( function () use ( &$scopeLock ) {
-                                               ScopedCallback::consume( $scopeLock ); // release after commit
-                                       } );
+                                       $dbw->onTransactionResolution(
+                                               function () use ( &$scopeLock ) {
+                                                       ScopedCallback::consume( $scopeLock ); // release after commit
+                                               },
+                                               __METHOD__
+                                       );
                                }
                        }
                } catch ( Exception $e ) {
index 48604e1..674846d 100644 (file)
@@ -120,10 +120,13 @@ abstract class RevDelList extends RevisionListBase {
                }
 
                $dbw->startAtomic( __METHOD__ );
-               $dbw->onTransactionResolution( function () {
-                       // Release locks on commit or error
-                       $this->releaseItemLocks();
-               } );
+               $dbw->onTransactionResolution(
+                       function () {
+                               // Release locks on commit or error
+                               $this->releaseItemLocks();
+                       },
+                       __METHOD__
+               );
 
                $missing = array_flip( $this->ids );
                $this->clearFileOps();
diff --git a/includes/search/AugmentPageProps.php b/includes/search/AugmentPageProps.php
new file mode 100644 (file)
index 0000000..29bd463
--- /dev/null
@@ -0,0 +1,20 @@
+<?php
+
+/**
+ * Augment search result set with values of certain page props.
+ */
+class AugmentPageProps implements ResultSetAugmentor {
+       /**
+        * @var array List of properties.
+        */
+       private $propnames;
+
+       public function __construct( $propnames ) {
+               $this->propnames = $propnames;
+       }
+
+       public function augmentAll( SearchResultSet $resultSet ) {
+               $titles = $resultSet->extractTitles();
+               return PageProps::getInstance()->getProperties( $titles, $this->propnames );
+       }
+}
diff --git a/includes/search/PerRowAugmentor.php b/includes/search/PerRowAugmentor.php
new file mode 100644 (file)
index 0000000..8eb8b17
--- /dev/null
@@ -0,0 +1,38 @@
+<?php
+
+/**
+ * Perform augmentation of each row and return composite result,
+ * indexed by ID.
+ */
+class PerRowAugmentor implements ResultSetAugmentor {
+
+       /**
+        * @var ResultAugmentor
+        */
+       private $rowAugmentor;
+
+       /**
+        * PerRowAugmentor constructor.
+        * @param ResultAugmentor $augmentor Per-result augmentor to use.
+        */
+       public function __construct( ResultAugmentor $augmentor ) {
+               $this->rowAugmentor = $augmentor;
+       }
+
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResultSet $resultSet
+        * @return array Data for all results
+        */
+       public function augmentAll( SearchResultSet $resultSet ) {
+               $data = [];
+               foreach ( $resultSet->extractResults() as $result ) {
+                       $id = $result->getTitle()->getArticleID();
+                       if ( !$id ) {
+                               continue;
+                       }
+                       $data[$id] = $this->rowAugmentor->augment( $result );
+               }
+               return $data;
+       }
+}
diff --git a/includes/search/ResultAugmentor.php b/includes/search/ResultAugmentor.php
new file mode 100644 (file)
index 0000000..350b780
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Augment search results.
+ *
+ */
+interface ResultAugmentor {
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResult $result
+        * @return mixed Data for this result
+        */
+       public function augment( SearchResult $result );
+}
diff --git a/includes/search/ResultSetAugmentor.php b/includes/search/ResultSetAugmentor.php
new file mode 100644 (file)
index 0000000..94710a8
--- /dev/null
@@ -0,0 +1,14 @@
+<?php
+
+/**
+ * Augment search results.
+ *
+ */
+interface ResultSetAugmentor {
+       /**
+        * Produce data to augment search result set.
+        * @param SearchResultSet $resultSet
+        * @return array Data for all results
+        */
+       public function augmentAll( SearchResultSet $resultSet );
+}
index c2ccca0..1eba141 100644 (file)
@@ -695,6 +695,37 @@ abstract class SearchEngine {
                Hooks::run( 'SearchIndexFields', [ &$fields, $this ] );
                return $fields;
        }
+
+       /**
+        * Augment search results with extra data.
+        *
+        * @param SearchResultSet $resultSet
+        */
+       public function augmentSearchResults( SearchResultSet $resultSet ) {
+               $setAugmentors = [];
+               $rowAugmentors = [];
+               Hooks::run( "SearchResultsAugment", [ &$setAugmentors, &$rowAugmentors ] );
+
+               if ( !$setAugmentors && !$rowAugmentors ) {
+                       // We're done here
+                       return;
+               }
+
+               // Convert row augmentors to set augmentor
+               foreach ( $rowAugmentors as $name => $row ) {
+                       if ( isset( $setAugmentors[$name] ) ) {
+                               throw new InvalidArgumentException( "Both row and set augmentors are defined for $name" );
+                       }
+                       $setAugmentors[$name] = new PerRowAugmentor( $row );
+               }
+
+               foreach ( $setAugmentors as $name => $augmentor ) {
+                       $data = $augmentor->augmentAll( $resultSet );
+                       if ( $data ) {
+                               $resultSet->setAugmentedData( $name, $data );
+                       }
+               }
+       }
 }
 
 /**
index e30869e..a767bc3 100644 (file)
@@ -5,7 +5,6 @@
  * Allows to create engine of the specific type.
  */
 class SearchEngineFactory {
-
        /**
         * Configuration for SearchEngine classes.
         * @var SearchEngineConfig
@@ -33,10 +32,32 @@ class SearchEngineFactory {
                        $class = $configType;
                } else {
                        $dbr = wfGetDB( DB_REPLICA );
-                       $class = $dbr->getSearchEngine();
+                       $class = self::getSearchEngineClass( $dbr );
                }
 
                $search = new $class( $dbr );
                return $search;
        }
+
+       /**
+        * @param IDatabase $db
+        * @return string SearchEngine subclass name
+        * @since 1.28
+        */
+       public static function getSearchEngineClass( IDatabase $db ) {
+               switch ( $db->getType() ) {
+                       case 'sqlite':
+                               return 'SearchSqlite';
+                       case 'mysql':
+                               return 'SearchMySQL';
+                       case 'postgres':
+                               return 'SearchPostgres';
+                       case 'mssql':
+                               return 'SearchMssql';
+                       case 'oracle':
+                               return 'SearchOracle';
+                       default:
+                               return 'SearchEngineDummy';
+               }
+       }
 }
index 6d66707..3141797 100644 (file)
@@ -21,7 +21,7 @@ class SearchNearMatchResultSet extends SearchResultSet {
                        return false;
                }
                $this->fetched = true;
-               return SearchResult::newFromTitle( $this->result );
+               return SearchResult::newFromTitle( $this->result, $this );
        }
 
        public function rewind() {
index 21effbb..50db84b 100644 (file)
@@ -56,15 +56,25 @@ class SearchResult {
         */
        protected $searchEngine;
 
+       /**
+        * A set of extension data.
+        * @var array[]
+        */
+       protected $extensionData;
+
        /**
         * Return a new SearchResult and initializes it with a title.
         *
-        * @param Title $title
+        * @param Title           $title
+        * @param SearchResultSet $parentSet
         * @return SearchResult
         */
-       public static function newFromTitle( $title ) {
+       public static function newFromTitle( $title, SearchResultSet $parentSet = null ) {
                $result = new static();
                $result->initFromTitle( $title );
+               if ( $parentSet ) {
+                       $parentSet->augmentResult( $result );
+               }
                return $result;
        }
 
@@ -250,4 +260,24 @@ class SearchResult {
        function isFileMatch() {
                return false;
        }
+
+       /**
+        * Get the extension data as:
+        * augmentor name => data
+        * @return array[]
+        */
+       public function getExtensionData() {
+               return $this->extensionData;
+       }
+
+       /**
+        * Set extension data for this result.
+        * The data is:
+        * augmentor name => data
+        * @param array[] $extensionData
+        */
+       public function setExtensionData( array $extensionData ) {
+               $this->extensionData = $extensionData;
+       }
+
 }
index 69795e7..978db27 100644 (file)
@@ -42,6 +42,29 @@ class SearchResultSet {
 
        protected $containedSyntax = false;
 
+       /**
+        * Cache of titles.
+        * Lists titles of the result set, in the same order as results.
+        * @var Title[]
+        */
+       private $titles;
+
+       /**
+        * Cache of results - serialization of the result iterator
+        * as an array.
+        * @var SearchResult[]
+        */
+       private $results;
+
+       /**
+        * Set of result's extra data, indexed per result id
+        * and then per data item name.
+        * The structure is:
+        * PAGE_ID => [ augmentor name => data, ... ]
+        * @var array[]
+        */
+       protected $extraData = [];
+
        public function __construct( $containedSyntax = false ) {
                $this->containedSyntax = $containedSyntax;
        }
@@ -147,15 +170,15 @@ class SearchResultSet {
        /**
         * Fetches next search result, or false.
         * STUB
-        *
-        * @return SearchResult
+        * FIXME: refactor as iterator, so we could use nicer interfaces.
+        * @return SearchResult|false
         */
        function next() {
                return false;
        }
 
        /**
-        * Rewind result set back to begining
+        * Rewind result set back to beginning
         */
        function rewind() {
        }
@@ -176,4 +199,69 @@ class SearchResultSet {
        public function searchContainedSyntax() {
                return $this->containedSyntax;
        }
+
+       /**
+        * Extract all the results in the result set as array.
+        * @return SearchResult[]
+        */
+       public function extractResults() {
+               if ( is_null( $this->results ) ) {
+                       $this->results = [];
+                       if ( $this->numRows() == 0 ) {
+                               // Don't bother if we've got empty result
+                               return $this->results;
+                       }
+                       $this->rewind();
+                       while ( ( $result = $this->next() ) != false ) {
+                               $this->results[] = $result;
+                       }
+                       $this->rewind();
+               }
+               return $this->results;
+       }
+
+       /**
+        * Extract all the titles in the result set.
+        * @return Title[]
+        */
+       public function extractTitles() {
+               if ( is_null( $this->titles ) ) {
+                       if ( $this->numRows() == 0 ) {
+                               // Don't bother if we've got empty result
+                               $this->titles = [];
+                       } else {
+                               $this->titles = array_map(
+                                       function ( SearchResult $result ) {
+                                               return $result->getTitle();
+                                       },
+                                       $this->extractResults() );
+                       }
+               }
+               return $this->titles;
+       }
+
+       /**
+        * Sets augmented data for result set.
+        * @param string $name Extra data item name
+        * @param array[] $data Extra data as PAGEID => data
+        */
+       public function setAugmentedData( $name, $data ) {
+               foreach ( $data as $id => $resultData ) {
+                       $this->extraData[$id][$name] = $resultData;
+               }
+       }
+
+       /**
+        * Returns extra data for specific result and store it in SearchResult object.
+        * @param SearchResult $result
+        * @return array|null List of data as name => value or null if none present.
+        */
+       public function augmentResult( SearchResult $result ) {
+               $id = $result->getTitle()->getArticleID();
+               if ( !$id || !isset( $this->extraData[$id] ) ) {
+                       return null;
+               }
+               $result->setExtensionData( $this->extraData[$id] );
+               return $this->extraData[$id];
+       }
 }
index 6b60899..c3985d1 100644 (file)
@@ -37,7 +37,7 @@ class SqlSearchResultSet extends SearchResultSet {
                }
 
                return SearchResult::newFromTitle(
-                       Title::makeTitle( $row->page_namespace, $row->page_title )
+                       Title::makeTitle( $row->page_namespace, $row->page_title ), $this
                );
        }
 
index 26b86f9..6daf19f 100644 (file)
@@ -403,6 +403,7 @@ class SpecialSearch extends SpecialPage {
 
                        // show results
                        if ( $numTextMatches > 0 ) {
+                               $search->augmentSearchResults( $textMatches );
                                $out->addHTML( $this->showMatches( $textMatches ) );
                        }
 
@@ -716,7 +717,7 @@ class SpecialSearch extends SpecialPage {
         *
         * @return string
         */
-       protected function showMatches( &$matches, $interwiki = null ) {
+       protected function showMatches( $matches, $interwiki = null ) {
                global $wgContLang;
 
                $terms = $wgContLang->convertForSearchResult( $matches->termMatches() );
@@ -725,7 +726,7 @@ class SpecialSearch extends SpecialPage {
                $pos = $this->offset;
 
                if ( $result && $interwiki ) {
-                       $out .= $this->interwikiHeader( $interwiki, $result );
+                       $out .= $this->interwikiHeader( $interwiki, $matches );
                }
 
                $out .= "<ul class='mw-search-results'>\n";
@@ -750,7 +751,7 @@ class SpecialSearch extends SpecialPage {
         *
         * @return string
         */
-       protected function showHit( $result, $terms, $position ) {
+       protected function showHit( SearchResult $result, $terms, $position ) {
 
                if ( $result->isBrokenTitle() ) {
                        return '';
index 2af0324..0d06c7b 100644 (file)
@@ -2358,7 +2358,8 @@ class User implements IDBAccessObject {
                        wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle(
                                function() use ( $cache, $key ) {
                                        $cache->delete( $key );
-                               }
+                               },
+                               __METHOD__
                        );
                }
        }
@@ -4927,9 +4928,12 @@ class User implements IDBAccessObject {
         * Deferred version of incEditCountImmediate()
         */
        public function incEditCount() {
-               wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle( function() {
-                       $this->incEditCountImmediate();
-               } );
+               wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle(
+                       function () {
+                               $this->incEditCountImmediate();
+                       },
+                       __METHOD__
+               );
        }
 
        /**
index 09244a4..69bc503 100644 (file)
@@ -273,15 +273,20 @@ class UserRightsProxy {
         * Replaces User::touchUser()
         */
        function invalidateCache() {
-               $this->db->update( 'user',
+               $this->db->update(
+                       'user',
                        [ 'user_touched' => $this->db->timestamp() ],
                        [ 'user_id' => $this->id ],
-                       __METHOD__ );
+                       __METHOD__
+               );
 
                $wikiId = $this->db->getWikiID();
                $userId = $this->id;
-               $this->db->onTransactionPreCommitOrIdle( function() use ( $wikiId, $userId ) {
-                       User::purge( $wikiId, $userId );
-               } );
+               $this->db->onTransactionPreCommitOrIdle(
+                       function () use ( $wikiId, $userId ) {
+                               User::purge( $wikiId, $userId );
+                       },
+                       __METHOD__
+               );
        }
 }
index ad95506..5b18365 100644 (file)
@@ -19,6 +19,7 @@
                "resources/src/mediawiki.toolbar",
                "resources/src/mediawiki.widgets",
                "resources/src/jquery/jquery.accessKeyLabel.js",
+               "resources/src/jquery/jquery.arrowSteps.js",
                "resources/src/jquery/jquery.autoEllipsis.js",
                "resources/src/jquery/jquery.badge.js",
                "resources/src/jquery/jquery.byteLength.js",
index 043d151..1492094 100644 (file)
@@ -95,7 +95,7 @@
        "tog-enotifminoredits": "أرسل إلي رسالة إلكترونية بشأن التعديلات الطفيفة للصفحات والملفات",
        "tog-enotifrevealaddr": "أظهر عنوان بريدي الإلكتروني في إشعارات البريد الإلكتروني",
        "tog-shownumberswatching": "اعرض عدد المستخدمين المراقبين",
-       "tog-oldsig": "اÙ\84تÙ\88Ù\82Ù\8aع الحالي:",
+       "tog-oldsig": "تÙ\88Ù\82Ù\8aعÙ\83 الحالي:",
        "tog-fancysig": "وضع الوصلة يدوياً واستعمال نص الويكي",
        "tog-uselivepreview": "استعمال المعاينة المباشرة",
        "tog-forceeditsummary": "نبهني عند عدم إدخال ملخص تعديل",
        "tog-showhiddencats": "أظهر التصنيفات المخفية",
        "tog-norollbackdiff": "عدم إظهار الاختلافات بعد تنفيذ التراجع",
        "tog-useeditwarning": "حذّرني عندما أغادر تحرير صفحة فيها تغييرات لم أحفظها",
-       "tog-prefershttps": "دائÙ\85ا Ø§Ø³ØªØ®Ø¯Ù\85 Ø§ØªØµØ§Ù\84ا Ø¢Ù\85Ù\86ا Ø¨Ø¹Ø¯ الدخول",
+       "tog-prefershttps": "دائÙ\85ا Ø§Ø³ØªØ®Ø¯Ù\85 Ø§ØªØµØ§Ù\84ا Ø¢Ù\85Ù\86ا Ø¹Ù\86د ØªØ³Ø¬Ù\8aÙ\84 الدخول",
        "underline-always": "دائما",
        "underline-never": "أبدا",
        "underline-default": "وفق المظهر أو المتصفح",
        "newwindow": "(تفتح في نافذة جديدة)",
        "cancel": "ألغِ",
        "moredotdotdot": "المزيد...",
-       "morenotlisted": "هذه القائمة غير مكتملة.",
+       "morenotlisted": "Ù\87Ø°Ù\87 Ø§Ù\84Ù\82ائÙ\85Ø© Ø±Ø¨Ù\85ا ØªÙ\83Ù\88Ù\86 ØºÙ\8aر Ù\85Ù\83تÙ\85Ù\84Ø©.",
        "mypage": "صفحة",
        "mytalk": "نقاش",
        "anontalk": "نقاش",
index 1d499fb..32ddf70 100644 (file)
@@ -43,7 +43,7 @@
        "tog-enotifminoredits": "Паведамляць праз электронную пошту таксама пра дробныя зьмены старонак і файлаў",
        "tog-enotifrevealaddr": "Не хаваць мой адрас электроннай пошты ў паведамленьнях",
        "tog-shownumberswatching": "Паказваць колькасьць назіральнікаў",
-       "tog-oldsig": "Цяперашні подпіс:",
+       "tog-oldsig": "Ð\92аÑ\88 Ñ\86яперашні подпіс:",
        "tog-fancysig": "Апрацоўваць подпіс як вікітэкст (без аўтаматычнай спасылкі)",
        "tog-uselivepreview": "Выкарыстоўваць хуткі папярэдні прагляд",
        "tog-forceeditsummary": "Папярэджваць пра адсутнасьць кароткага апісаньня зьменаў",
        "changeemail-throttled": "Вы зрабілі зашмат спробаў увайсьці ў сыстэму.\nКалі ласка, пачакайце $1 перад наступнай спробай.",
        "changeemail-nochange": "Калі ласка, увядзіце іншы новы адрас электроннай пошты",
        "resettokens": "Скіданьне токенаў",
-       "resettokens-text": "Тут вы можаце скінуць токены, якія даюць вамд доступ да пэўных прыватных зьвестак, асацыяваных з вашым рахункам.\n\nКалі вы выпадкова падзяліліся токенамі зь іншымі, або калі ваш рахунак быў скампрамэтаваны, скарыстайцеся гэтай магчымасьцю і скіньце токены.",
-       "resettokens-no-tokens": "Ð\9dÑ\8fма Ñ\88Ñ\82о Ñ\81кÑ\96даÑ\86Ñ\8c.",
+       "resettokens-text": "Тут вы можаце скінуць токены, якія даюць вам доступ да пэўных прыватных зьвестак, асацыяваных з вашым рахункам.\n\nКалі вы выпадкова падзяліліся токенамі зь іншымі, або калі ваш рахунак быў скампрамэтаваны, скарыстайцеся гэтай магчымасьцю і скіньце токены.",
+       "resettokens-no-tokens": "Ð\9dÑ\8fма Ñ\82окенаÑ\9e Ð´Ð»Ñ\8f Ñ\81кÑ\96данÑ\8cнÑ\8f.",
        "resettokens-tokens": "Токены:",
        "resettokens-token-label": "$1 (бягучае значэньне: $2)",
        "resettokens-watchlist-token": "Токен стужкі (Atom/RSS) [[Special:Watchlist|зьменаў у вашым сьпісе назіраньня]]",
        "notificationemail_subject_changed": "Адрас электроннай пошты на сайце {{SITENAME}} быў зьменены",
        "notificationemail_subject_removed": "Адрас электроннай пошты на сайце {{SITENAME}} быў выдалены",
        "notificationemail_body_changed": "Некім, магчыма вамі, з IP-адрасу $1,\nбыў зьменены адрас электроннай пошты «$2» на «$3» на сайце {{SITENAME}}.\n\nКалі гэта былі ня вы, неадкладна зьвяжыцеся з адміністратарам.",
+       "notificationemail_body_removed": "Некім, магчыма вамі, з IP-адрасу $1,\nбыў выдалены адрас электроннай пошты з рахунку «$2» на сайце {{SITENAME}}.\n\nКалі гэта былі ня вы, неадкладна зьвяжыцеся з адміністратарам.",
        "scarytranscludedisabled": "[Улучэньне інтэрвікі было адключанае]",
        "scarytranscludefailed": "[Памылка атрыманьня шаблёну $1]",
        "scarytranscludefailed-httpstatus": "[Памылка атрыманьня шаблёну $1: HTTP $2]",
        "tag-filter": "Фільтар [[Special:Tags|метак]]:",
        "tag-filter-submit": "Фільтар",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Меткі}}]]: $2)",
+       "tag-mw-contentmodelchange": "зьмена мадэлі зьместу",
        "tags-title": "Меткі",
        "tags-intro": "На гэтай старонцы знаходзіцца сьпіс метак, якімі праграмнае забесьпячэньне можа пазначыць рэдагаваньне, і іх значэньне.",
        "tags-tag": "Назва меткі",
index 55f2e8a..1ab171e 100644 (file)
@@ -56,7 +56,7 @@
        "tog-enotifminoredits": "Паведамяць мне на эл.пошту пра дробныя праўкі старонак і файлаў",
        "tog-enotifrevealaddr": "Паказваць мой адрас эл.пошты ў паведамленнях",
        "tog-shownumberswatching": "Паказваць колькасць назіральнікаў",
-       "tog-oldsig": "Ð\86Ñ\81нÑ\83Ñ\8eÑ\87Ñ\8b подпіс:",
+       "tog-oldsig": "Ð\92аÑ\88 Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 подпіс:",
        "tog-fancysig": "Апрацоўваць подпіс як вікі-тэкст (без аўтаматычнай спасылкі)",
        "tog-uselivepreview": "Жывы перадпаказ",
        "tog-forceeditsummary": "Папярэджваць пра пустое поле тлумачэння праўкі",
@@ -73,7 +73,7 @@
        "tog-showhiddencats": "Паказаць схаваныя катэгорыі",
        "tog-norollbackdiff": "Не паказваць розніцу ў выніку адкату",
        "tog-useeditwarning": "Папярэдзіць мяне, калі я пакідаю старонку з незахаванымі праўкамі",
-       "tog-prefershttps": "Ð\97аÑ\9eÑ\81Ñ\91дÑ\8b Ð²Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ð°Ð±Ð°Ñ\80оненае Ð·Ð»Ñ\83Ñ\87Ñ\8dнне Ð¿Ð°Ñ\81лÑ\8f Ñ\9eваÑ\85одÑ\83 ў сістэму",
+       "tog-prefershttps": "Ð\97аÑ\9eÑ\81Ñ\91дÑ\8b Ð²Ñ\8bкаÑ\80Ñ\8bÑ\81Ñ\82оÑ\9eваÑ\86Ñ\8c Ð±Ñ\8fÑ\81пеÑ\87нае Ð·Ð»Ñ\83Ñ\87Ñ\8dнне Ð¿Ð° Ñ\9eваÑ\85одзе ў сістэму",
        "underline-always": "Заўсёды",
        "underline-never": "Ніколі",
        "underline-default": "Як у браўзеры",
        "newwindow": "(адкрыецца ў новым акне)",
        "cancel": "Нічога",
        "moredotdotdot": "Яшчэ...",
-       "morenotlisted": "Гэты спіс не поўны.",
+       "morenotlisted": "Ð\93Ñ\8dÑ\82Ñ\8b Ñ\81пÑ\96Ñ\81 Ð¼Ð¾Ð¶Ð° Ð±Ñ\8bÑ\86Ñ\8c Ð½Ðµ Ð¿Ð¾Ñ\9eнÑ\8b.",
        "mypage": "Старонка",
        "mytalk": "Размовы",
        "anontalk": "Размовы",
        "botpasswords-updated-body": "Пароль для робата \"$1\" удзельніка \"$2\" паспяхова абноўлены.",
        "botpasswords-deleted-title": "Пароль робата сцёрты",
        "botpasswords-deleted-body": "Пароль для робата \"$1\" удзельніка \"$2\" паспяхова сцёрты.",
-       "botpasswords-newpassword": "Новы пароль для ўваходу пад <strong>$1</strong> — <strong>$2</strong>. <em>Калі ласка, запішыце яго для выкарыстання ў будучыні.</em>",
+       "botpasswords-newpassword": "Новы пароль для ўваходу пад <strong>$1</strong> — <strong>$2</strong>. <em>Калі ласка, запішыце яго для выкарыстання ў будучыні.</em> <br> (Для старых робатаў, якія патрабуюць, каб імя для ўваходу супадала з патэнцыяльным імем удзельніка, можаце таксама выкарыстоўваць <strong>$3</strong> як імя і <strong>$4</strong> у якасці пароля.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider недаступны.",
        "botpasswords-restriction-failed": "Уваход не выкананы з-за абмежаванняў на пароль робата.",
        "botpasswords-invalid-name": "Паказанае імя ўдзельніка не ўтрымлівае падзяляльнік паролю робата (\"$1\").",
        "invalid-content-data": "Недапушчальнае змесціва",
        "content-not-allowed-here": "\"$1\" не дазволены на старонцы [[$2]]",
        "editwarning-warning": "Пераход на іншую старонку можа прывесці да страты правак, зробленых Вамі. \nКалі Вы ўвайшлі ў сістэму, Вы можаце адключыць гэта папярэджанне ў раздзеле \"{{int:prefs-editing}}\" Вашых настроек.",
+       "editpage-invalidcontentmodel-title": "Мадэль змесціва не падтрымліваецца",
+       "editpage-invalidcontentmodel-text": "Мадэль змесціва \"$1\" не падтрымліваецца.",
        "editpage-notsupportedcontentformat-title": "Фармат змесціва не падтрымліваецца",
        "editpage-notsupportedcontentformat-text": "Фармат змесціва $1 не падтрымліваецца мадэллю змесціва $2.",
        "content-model-wikitext": "вікі-тэкст",
        "uploaded-animate-svg": "У ўкладзеным SVG файле знойдзены тэг \"animate\", здольны змяніць спасылку з дапамогай атрыбута \"from\" <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-setting-event-handler-svg": "Устаноўка атрыбутаў апрацоўкі падзей заблакавана, у ўкладзеным SVG-файле знойдзены код <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-setting-href-svg": "Выкарыстанне тэга \"set\" для дадання атрыбута \"href\" у бацькоўскі элемент заблакавана.",
+       "uploaded-wrong-setting-svg": "Ужыванне тэга \"set\" для задання ў якасці мэты аддаленага адраса/звестак/сцэнарыя для любога атрыбута заблакавана. У ўкладзеным SVG-файле знойдзены <code>&lt;set to=\"$1\"&gt;</code>.",
        "uploadscriptednamespace": "Гэты файл SVG утрымлівае недапушчальную прастору імёнаў \"$1\".",
        "uploadinvalidxml": "Немагчыма прааналізаваць XML ва ўкладзеным файле.",
        "uploadvirus": "Файл утрымлівае вірус! Падрабязнасці: $1",
        "apisandbox-dynamic-parameters-add-placeholder": "Назва параметра",
        "apisandbox-dynamic-error-exists": "Параметр з назвай \"$1\" ужо існуе.",
        "apisandbox-deprecated-parameters": "Састарэлыя параметры",
+       "apisandbox-fetch-token": "Аўтазапаўненне токена",
        "apisandbox-submit-invalid-fields-title": "Некаторыя палі недапушчальныя",
        "apisandbox-submit-invalid-fields-message": "Калі ласка, выпраўце адзначаныя палі і паспрабуйце ізноў.",
        "apisandbox-results": "Вынікі",
index 1cb20f4..159f7e7 100644 (file)
@@ -41,6 +41,7 @@
        "tog-watchdefault": "Dodaj stranice i datoteke koje uređujem na moj spisak praćenih članaka",
        "tog-watchmoves": "Dodaj stranice i datoteke koje premjestim na moj spisak praćenih članaka",
        "tog-watchdeletion": "Dodaj stranice i datoteke koje izbrišem na moj spisak praćenih članaka",
+       "tog-watchuploads": "Dodaj datoteke koje postavim na moj spisak praćenja",
        "tog-watchrollback": "Sve stranice za koje sam izvršio povrat izmjena stavi na spisak praćenja",
        "tog-minordefault": "Označi sve izmjene manjim isprva",
        "tog-previewontop": "Prikaži pregled iznad okvira za uređivanje",
index ac16a5e..d5f52f2 100644 (file)
        "tog-enotifminoredits": "Auch bei kleinen Änderungen an Seiten und Dateien E-Mails senden",
        "tog-enotifrevealaddr": "Meine E-Mail-Adresse in Benachrichtigungs-E-Mails anzeigen",
        "tog-shownumberswatching": "Anzahl der beobachtenden Benutzer anzeigen",
-       "tog-oldsig": "Vorhandene Signatur:",
+       "tog-oldsig": "Deine vorhandene Signatur:",
        "tog-fancysig": "Signatur als Wikitext behandeln (ohne automatische Verlinkung)",
        "tog-uselivepreview": "Vorschau sofort anzeigen",
        "tog-forceeditsummary": "Warnen, sofern beim Speichern die Zusammenfassung fehlt",
        "tog-showhiddencats": "Versteckte Kategorien anzeigen",
        "tog-norollbackdiff": "Unterschied nach dem Zurücksetzen nicht anzeigen",
        "tog-useeditwarning": "Warnen, sofern eine zur Bearbeitung geöffnete Seite verlassen wird, die nicht gespeicherte Änderungen enthält",
-       "tog-prefershttps": "Wenn angemeldet, immer eine sichere Verbindung benutzen.",
+       "tog-prefershttps": "Während angemeldet, immer eine sichere Verbindung benutzen.",
        "underline-always": "immer",
        "underline-never": "nie",
        "underline-default": "abhängig von der Benutzeroberfläche oder Browsereinstellung",
        "newwindow": "(wird in einem neuen Fenster geöffnet)",
        "cancel": "Abbrechen",
        "moredotdotdot": "Mehr …",
-       "morenotlisted": "Diese Liste ist nicht vollständig.",
+       "morenotlisted": "Diese Liste könnte nicht vollständig sein.",
        "mypage": "Eigene Seite",
        "mytalk": "Diskussion",
        "anontalk": "Diskussionsseite",
index 7c22017..fa0653f 100644 (file)
        "category-empty": "''Ena kategoriye de hewna qet nuştey ya zi medya çıniyê.''",
        "hidden-categories": "{{PLURAL:$1|Kategoriya nımıtiye|Kategoriyê nımıtey}}",
        "hidden-category-category": "Kategoriyê nımıtey",
-       "category-subcat-count": "{{PLURAL:$2|Na kategoriye de $1 bınkategoriy estê.|$2 kategoriyan ra $1 kategoriyê bınêni asenê.}} \n{| border=\"1\" cellpadding=\"2\" cellspacing=\"0\" align=\"left\" style=\"margin-left:1em; background:peru; border: 1px #aaa solid; border-collapse: collapse; font-size: 95%;\"\n| align=\"center\" |(K) Kategoriye (D) Dosya (P) Peli (M)  Medya\n|}",
+       "category-subcat-count": "{| border=\"1\" cellpadding=\"2\" cellspacing=\"0\" align=\"left\" style=\"margin-left:1em; background:khaki; border: 1px #aaa solid; border-collapse: collapse; font-size: 250%;\"\n| align=\"center\" |{{PLURAL:$2|Na kategori de $1 bınkategoriy est ê.|$2 kategoriyan ra $1 kategoriyê bınêni asenê.}} \n|-\n| align=\"center\" |(K) Kategoriye (D) Dosya (P) Peli (M)  Medya\n|}",
        "category-subcat-count-limited": "Na kategoriye de {{PLURAL:$1|na kategoriya bınêne esta|nê $1 kategoriyê bınêni estê}}.",
-       "category-article-count": "{{PLURAL:$2|Na kategoriye de teyna ena pele esta.|Ebe $2 ra pêro piya {{PLURAL:$1|ena pela na kategoriye dera|$1 enê peli na kategoriye derê.}}}}",
+       "category-article-count": "{| border=\"1\" cellpadding=\"2\" cellspacing=\"0\" align=\"left\" style=\"margin-left:1em; background:khaki; border: 1px #aaa solid; border-collapse: collapse; font-size: 250%;\"\n| align=\"center\" |{{PLURAL:$2|Na kategori de teyna ena perr esta.|pêro piya $2 ra  {{PLURAL:$1|ena perra na kategori de ya|$1 perri na kategori de yê.}}}}\n|}",
        "category-article-count-limited": "{{PLURAL:$1|Pela cêrêne|$1 Pelê cêrêni}} na kategoriye derê.",
        "category-file-count": "{{PLURAL:$2|Na kategori tenya dosya ya cêri muhtewa kena.|Na kategori de $2 ra pêro piya {{PLURAL:$1|1 dosya est a|$1 dosyey est ê}}.}}",
        "category-file-count-limited": "{{PLURAL:$1|Dosya cêrêne|$1 Dosyê cêrêni}} na kategoriye derê.",
        "qbedit": "Bıvurne",
        "qbpageoptions": "Ena pele",
        "qbmyoptions": "Pelê mı",
-       "faq": "PZP",
+       "faq": "PVP",
        "faqpage": "Project: PZP",
        "actions": "Hereketi",
        "namespaces": "Heruna nameyan",
        "createacct-another-continue-submit": "Hesab vıraştışi rê dewam ke",
        "createacct-benefit-heading": "{{SITENAME}} meş de merduman şi",
        "createacct-benefit-body1": "{{PLURAL:$1|vurnayış|vurnayışi}}",
-       "createacct-benefit-body2": "{{PLURAL:$1|wesiqe|wesiqey}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|pele|peli}}",
        "createacct-benefit-body3": "{{PLURAL:$1|iştıraqkerdoğo nıkayên|iştıraqkerdoğê nıkayêni}}",
        "badretype": "Parolayê ke şıma nuşti yewbini nêtepışneni.",
        "usernameinprogress": "Qandê nê karberi hesab vıraştışondewamnkeno.  Tay bıpawê",
        "rcnotefrom": "Cêr de <strong>$2</strong> ra nata {{PLURAL:$5|vurnayışiyê}} asenê (tewr vêşi <strong>$1</strong> asenê) <strong>$3, $4</strong>",
        "rclistfrom": "$3 $2 ra tepiya vurnayışanê neweyan bımocne",
        "rcshowhideminor": "vurriyayışê werdi $1",
-       "rcshowhideminor-show": "Bımusn",
+       "rcshowhideminor-show": "Bımocne",
        "rcshowhideminor-hide": "Bınımne",
        "rcshowhidebots": "botan $1",
        "rcshowhidebots-show": "Bımocne",
        "boteditletter": "b",
        "unpatrolledletter": "!",
        "number_of_watching_users_pageview": "[$1 ho seyr keno {{PLURAL:$1|karber|karberî}}]",
-       "rc_categories": "Pelê ke kategoriyan ra (be „|“ ciya biyê):",
+       "rc_categories": "Kategoriyan rêz kı ( \"|“ ya ciya yo):",
        "rc_categories_any": "Weçinayiyan ra her yew",
        "rc-change-size": "$1",
        "rc-change-size-new": "Vurnayışa dıma $1 {{PLURAL:$1|bayt|bayt}}",
        "cant-move-user-page": "desturê şıma çino, şıma pelanê karberani bıkırışi (bê pelê cerıni).",
        "cant-move-to-user-page": "desturê şıma çino, şıma yew peli bıkırışi pelê yew karberi.",
        "newtitle": "Sernameyo newe:",
-       "move-watch": "Na pele seyr ke",
+       "move-watch": "Pela çıme u meqsedi seyr ke",
        "movepagebtn": "Pele bere",
        "pagemovedsub": "Berdışi kerd temam",
        "movepage-moved": "'''\"$1\" berd \"$2\"'''",
index 8eacae0..e338987 100644 (file)
@@ -33,7 +33,7 @@
        "tog-enotifminoredits": "Mândom un avîş ânca p'r al mudéfichi céchi ed pàgini e file",
        "tog-enotifrevealaddr": "Fà vèder al mé indirés ed la pôsta eletrônica int i mesâg 'd avîş",
        "tog-shownumberswatching": "Fà vèder al nómer ed j utèint che gh'àn la pàgina sòta uservasiòun",
-       "tog-oldsig": "La fîrma 'd adèsa",
+       "tog-oldsig": "La tó fîrma 'd adèsa",
        "tog-fancysig": "Trâta la fîrma cme wikitèst (sèinsa colegamèint avtomâtich)",
        "tog-uselivepreview": "Permèt la funsiòun \"Live preview\" (guêrda préma 'd salvêr in dirèta)",
        "tog-forceeditsummary": "Dmânda s'l'è vèira che al câmp argumèint l' é vōd",
@@ -48,7 +48,7 @@
        "tog-showhiddencats": "Fà vèder al categoréi lughêdi",
        "tog-norollbackdiff": "An fêr mia vèder al cunfrûnt tr' al versiòun dôp avèir fât un \"rollback\"",
        "tog-useeditwarning": "Avîşom quând a vâgh fōra da 'na pàgina d' mudéfica e an n'ò mìa salvê al mudéfichi fâti",
-       "tog-prefershttps": "Drōva sèimper un colegamèint sicûr quând ét fê l'ingrès",
+       "tog-prefershttps": "Drōva sèimper un colegamèint sicûr mèinter té coleghê.",
        "underline-always": "Sèimper",
        "underline-never": "Mài",
        "underline-default": "Mantî al j impustasiòun dal navigadōr o 'd la skin",
        "category-file-count-limited": "In cla categoréia ché a gh'é {{PLURAL:$1|al file nutê|i $1 file nutê}} ché 'd sègvit.",
        "listingcontinuesabbrev": "cunt.",
        "index-category": "Pàgini gancêdi",
-       "noindex-category": "Pàgini mìa gancêdi",
+       "noindex-category": "Pàgini mìa coleghêdi.",
        "broken-file-category": "Pàgini cun dèinter di file ch' an gh'în mìa.",
        "about": "Infumasiòun",
        "article": "Còl che gh'é int la pàgina",
        "newwindow": "(a s'arvés 'na fnèstra nōva)",
        "cancel": "Scanşèla",
        "moredotdotdot": "Êter...",
-       "morenotlisted": "Cl'elèinch ché an n'é mìa finî.",
+       "morenotlisted": "Cl'elèinch ché 'l pré èser mìa finî.",
        "mypage": "Pàgina",
        "mytalk": "Al mē discusiòun",
        "anontalk": "Discusiòun",
        "copyrightwarning": "Per piaşèir tîn cûnt che tót al colaborasiòun a {{SITENAME}} a vînen cunsidrêdi publichêdi sòta la licèinsa $2 (per i particulêr guêrda $1). S' an 't vō mìa che i tō tèst a pôsen èser cambiê e turnê a publichêr da tót sèinsa lémit, an publichêri mìa ché.<br /> In pió, se 't  i póblich ché, a 't dichiâr, sòta la tó responsabilitê, che còl ch' è stê scrét a 't l'ê scrét té personalmèint opór l'é ste cupiê da documèint sèinsa ch' al sìa quacê da nisûn dirét 'd autōr. <strong> Ché insém an pubblichêr mìa materiêl quacê da dirét 'd autōr sèinsa autorişâsiòun! </strong>",
        "copyrightwarning2": "Per piaşèir tîn cûnt che tót al colaborasiòun a {{SITENAME}} a pōlen èser mudifichê, arversê o scanşlê da êtra gînta cla dà 'na mân. S' an 't vō mìa che i tō tèst a pôsen èser cambiê alōra an publichêri mìa ché.<br />In pió, se 't  i póblich ché, a 't dichiâr, sòta la tó responsabilitê, che còl ch' è stê scrét a 't l'ê scrét té personalmèint opór l'é ste cupiê da documèint sèinsa ch' al sìa quacê da nisûn dirét 'd autōr (per i particulêr guêrda $1). <strong> Ché insém an pubblichêr mìa materiêl quacê da dirét 'd autōr sèinsa autorişâsiòun! </strong>",
        "longpageerror": "<strong> Erōr: al tèst spidî l'é lòngh {{PLURAL:$1|1|$1}} kilobyte, ch'l'é pió grôs ed l'amzûra mâsima permésa ({{PLURAL:$2|1|$2}} kilobyte). </strong> Al tèst al pôl mìa èser salvê.",
-       "readonlywarning": "<strong>Atensiòun: al databêş l'é stê bluchê per justadûri e dòunca l'é impusébil salvê al mudéfichi in cól mumèint ché.</strong> P'r an pêrdi mìa, l'é pusébil cupiêri còl ch' é stê més dèinter fîn a dès int la caşèla di cambiamèint, incolêrel in un prugrâma tèst e salvêrel per spetêr al şblôch dal databêş. \n\nL'aministradōr ch' l'à bluchê al databêş l'à dê cla spiegasiòun ché: $1",
+       "readonlywarning": "<strong>Atensiòun</strong>: al databêş l'é l'é bluchê per justadûri e per adès l'é impusébil salvê al mudéfichi fâti. P'r an pêrdi mìa,  côpi in un file tèst e sêlvel mèinter té spèt al şblôch dal databêş. \n\nL'aministradōr ch' l'à bluchê al databêş l'à dê cla spiegasiòun ché: $1",
        "protectedpagewarning": "<strong> Atensiòun: cla pàgina ché l'é stêda bluchêda in môd che sōl j utèint cun i privilèg 'd aministradōr a pôsen cambiêrla.</strong> \nPer infurmasiòun ché 'd sègvit a vîn scrét l'ûltem elemèint dal regéster:",
        "semiprotectedpagewarning": "<strong>Nôta:</strong> cla pàgina ché l'é stêda bluchê in môd che sōl j utèint registrê a pôsen cambiêrla. \nPer infurmasiòun ché 'd sègvit è scrét l'ûltem elemèint dal regéster.",
        "cascadeprotectedwarning": "<strong> Atensiòun: </strong>cla pàgina ché l'é stêda bluchêda in môd che sōl j utèint cun i privilèg 'd aministradō a pôsen cambiêrla. Còst a sucēd perchè la pàgina l'é dèinter in cl'elèinch sòta protesiòun ché 'd sègvit {{PLURAL:$1|pàgina|pàgini}}",
        "revdelete-unsuppress": "Tó via i lémit al revisiòun armési",
        "revdelete-log": "Mutîv:",
        "revdelete-submit": "Drōva {{PLURAL:$1|int la revisiòun sernîda|int al revisiòun sernîdi}}",
-       "revdelete-success": "Vésta ed la revisòun arnuvêda int al môd gióst.",
+       "revdelete-success": "Vésta ed la revisòun arnuvêda.",
        "revdelete-failure": "La vésta 'd la versiòun l'an pōl mìa èser arnuvêda:\n$1",
-       "logdelete-success": "Vésta dal fât impustêda int al môd gióst.",
+       "logdelete-success": "Vésta impustêda dal fât .",
        "logdelete-failure": "La vésta dal fât l'an pōl mìa èser impustêda:\n$1",
        "revdel-restore": "Câmbia la vidûda.",
        "pagehist": "Stòria 'd la pàgina",
        "prefs-watchlist-token": "Token tgnî d'ôc specêl:",
        "prefs-misc": "Divêrs",
        "prefs-resetpass": "Câmbia la cêva 'd ingrès",
-       "prefs-changeemail": "Câmbia l'indirés ed la pôsta eletrônica",
+       "prefs-changeemail": "Câmbia o scanşèla l'indirés ed la pôsta eletrônica",
        "prefs-setemail": "Impôsta un indirés ed pôsta eletrônica",
        "prefs-email": "Siēlta pôsta eletrônica",
        "prefs-rendering": "Aspèt",
        "rows": "Rîghi",
        "columns": "Clòuni:",
        "searchresultshead": "Sērca",
-       "stub-threshold": "Valōr ménim per i <a href=\"#\" class=\"stub\">colegamèint a i stub</a>, in byte:",
+       "stub-threshold": "Pôrta per i colegamèint a j abòs ($1):",
        "stub-threshold-disabled": "Bluchê",
        "recentchangesdays": "Nómer di dé da fêr vèder int al j ûltmi mudéfichi:",
        "recentchangesdays-max": "Mâsim $1 {{PLURAL:$1|dé}}",
index fc5871b..a8dd103 100644 (file)
        "tooltip-watchlistedit-raw-submit": "Update watchlist",
        "tooltip-recreate": "Recreate the page even though it has been deleted",
        "tooltip-upload": "Start upload",
-       "tooltip-rollback": "\"Rollback\" reverts edit(s) to this page of the last contributor in one click",
+       "tooltip-rollback": "\"Rollback\" reverts the last contributor's edit(s) to this page in one click",
        "tooltip-undo": "\"Undo\" reverts this edit and opens the edit form in preview mode. It allows adding a reason in the summary.",
        "tooltip-preferences-save": "Save preferences",
        "tooltip-summary": "Enter a short summary",
index fc802fb..f0a61b3 100644 (file)
        "ok": "Bone",
        "retrievedfrom": "Elŝutita el  \"$1\"",
        "youhavenewmessages": "{{PLURAL:$3|Vi havas}} $1 ($2).",
-       "youhavenewmessagesfromusers": "Vi havas {{PLURAL:$1|mesaĝon|$1 mesaĝojn}} de {{PLURAL:$3|alia uzanto|$3 uzantoj}} ($2).",
+       "youhavenewmessagesfromusers": "{{PLURAL:$4|Vi havas}} $1 de {{PLURAL:$3|alia uzanto|$3 uzantoj}} ($2).",
        "youhavenewmessagesmanyusers": "Riceviĝis $1 de multaj uzantoj ($2).",
-       "newmessageslinkplural": "{{PLURAL:$1|nova mesaĝo|999=novaj mesaĝoj}}",
+       "newmessageslinkplural": "{{PLURAL:$1|novan mesaĝon|999=novajn mesaĝojn}}",
        "newmessagesdifflinkplural": "$1 {{PLURAL:$1|ŝanĝo|ŝanĝoj}}",
        "youhavenewmessagesmulti": "Vi havas novajn mesaĝojn ĉe $1",
        "editsection": "redakti",
        "exportcuronly": "Entenas nur la aktualan version, ne la malnovajn.",
        "exportnohistory": "----\n'''Notu:''' Eksportado de la plena historio de paĝoj per ĉi paĝo estis malebligita pro funkciigaj kialoj.",
        "exportlistauthors": "Inkluzivi plenan liston de kontribuantoj por ĉiu paĝo.",
-       "export-submit": "Eksporti",
+       "export-submit": "Elporti",
        "export-addcattext": "Aldoni paĝojn el kategorio:",
        "export-addcat": "Aldoni",
        "export-addnstext": "Aldoni paĝojn de nomspaco:",
        "import-interwiki-sourcepage": "Fonta paĝo:",
        "import-interwiki-history": "Kopiu ĉiujn historiajn versiojn por ĉi tiu pago.",
        "import-interwiki-templates": "Inkluzivi ĉiujn ŝablonojn",
-       "import-interwiki-submit": "Importi",
+       "import-interwiki-submit": "Enporti",
        "import-mapping-default": "Importi al defaŭltaj lokoj",
        "import-mapping-namespace": "Importi en nomspacon:",
        "import-mapping-subpage": "Importi kiel subpaĝojn de la jena paĝo:",
        "pageinfo-article-id": "Paĝa identigo",
        "pageinfo-language": "Lingvo de paĝa enhavo",
        "pageinfo-content-model": "Modelo de paĝoenhavo",
+       "pageinfo-content-model-change": "ŝanĝi",
        "pageinfo-robot-policy": "Indeksado per robotoj",
        "pageinfo-robot-index": "Permesata",
        "pageinfo-robot-noindex": "Malpermesata",
index d89aa20..74b31c0 100644 (file)
        "tog-enotifminoredits": "Notificarme también por correo electrónico los cambios menores de las páginas y archivos",
        "tog-enotifrevealaddr": "Revelar mi dirección de correo electrónico en los correos de notificación",
        "tog-shownumberswatching": "Mostrar el número de usuarios que la vigilan",
-       "tog-oldsig": "Firma actual:",
+       "tog-oldsig": "Tu firma actual:",
        "tog-fancysig": "Tratar la firma como wikitexto (sin un enlace automático)",
        "tog-uselivepreview": "Usar previsualización dinámica",
        "tog-forceeditsummary": "Avisarme cuando deje en blanco el resumen de la edición",
        "newwindow": "(se abre en una ventana nueva)",
        "cancel": "Cancelar",
        "moredotdotdot": "Más...",
-       "morenotlisted": "Esta lista no está completa.",
+       "morenotlisted": "Esta lista puede estar incompleta.",
        "mypage": "Página",
        "mytalk": "Discusión",
        "anontalk": "Discusión",
        "accmailtext": "Se ha enviado a $2 una contraseña generada aleatoriamente para [[User talk:$1|$1]]. Una vez iniciada la sesión, se puede cambiar en la página [[Special:ChangePassword|destinada para ello]].",
        "newarticle": "(Nuevo)",
        "newarticletext": "Has seguido un enlace a una página que aún no existe.\nPara crear esta página, escribe en el cuadro que aparece a continuación. Para más información, consulta la [$1 página de ayuda].\nSi llegaste aquí por error, vuelve a la página anterior.",
-       "anontalkpagetext": "----\n<em>Esta es la página de discusión de un usuario anónimo que aún no ha creado una cuenta, o no la usa.</em>\nPor lo tanto, tenemos que usar su dirección IP para identificarlo.\nPuede que varios usuarios compartan una misma dirección IP.\nSi eres un usuario anónimo y crees que se han dirigido a ti con comentarios improcedentes, [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|inicia sessión]] para evitar confusiones futuras con otros usuarios anónimos.",
+       "anontalkpagetext": "----\n<em>Esta es la página de discusión de un usuario anónimo que aún no ha creado una cuenta, o no la usa.</em>\nPor lo tanto, tenemos que usar su dirección IP para identificarlo.\nPuede que varios usuarios compartan una misma dirección IP.\nSi eres un usuario anónimo y crees que se han dirigido a ti con comentarios improcedentes, [[Special:CreateAccount|crea una cuenta]] o [[Special:UserLogin|inicia sesión]] para evitar confusiones futuras con otros usuarios anónimos.",
        "noarticletext": "En este momento no hay texto en esta página.\nPuedes [[Special:Search/{{PAGENAME}}|buscar el título de esta página]] en otras páginas,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar en los registros relacionados],\no [{{fullurl:{{FULLPAGENAME}}|action=edit}} crear esta página]</span>.",
        "noarticletext-nopermission": "Actualmente no hay texto en esta página.\nPuedes [[Special:Search/{{PAGENAME}}|buscar este título de página]] en otras páginas, o <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} buscar en los registros relacionados]</span>, pero no tienes permiso para crear esta página.",
        "missing-revision": "La revisión n.º $1 de la página «{{FULLPAGENAME}}» no existe.\n\nEsto suele ocurrir cuando se sigue un enlace de historial obsoleto que apunta a una página ya borrada.\nPuedes encontrar detalles en el [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registro de borrados].",
        "mergehistory": "Fusionar historiales",
        "mergehistory-header": "Esta página te permite fusionar revisiones del historial de una página origen con los de otra más reciente.\nAsegúrate de que los cambios mantendrán la continuidad histórica de la página.",
        "mergehistory-box": "Fusionar los historiales de dos páginas:",
-       "mergehistory-from": "Página origen:",
+       "mergehistory-from": "Página de origen:",
        "mergehistory-into": "Página destino:",
        "mergehistory-list": "Historial de ediciones fusionable",
        "mergehistory-merge": "Las siguientes revisiones de [[:$1]] pueden fusionarse con las de [[:$2]].\nUsa la columna de casillas para fusionar sólo las revisiones creadas en y antes de la fecha especificada.\nTen en cuenta que si cambias de página, se borrará la selección actual de esta columna.",
index dc60afe..e417ee4 100644 (file)
        "createacct-yourpasswordagain-ph": "Kirjoita salasana uudelleen",
        "userlogin-remembermypassword": "Pidä minut kirjautuneena",
        "userlogin-signwithsecure": "Käytä salattua yhteyttä",
+       "cannotlogin-title": "Kirjautuminen ei onnistu",
+       "cannotlogin-text": "Kirjautuminen ei ole mahdollista.",
        "cannotloginnow-title": "Nyt ei voi kirjautua sisään",
        "cannotloginnow-text": "Kirjautuminen sisään ei ole mahdollista käytettäessä $1.",
+       "cannotcreateaccount-title": "Tunnuksia ei voida luoda",
+       "cannotcreateaccount-text": "Suora tunnuksen luominen ei ole käytössä tässä wikissä.",
        "yourdomainname": "Verkkonimi:",
        "password-change-forbidden": "Et voi muuttaa salasanoja tässä wikissä.",
        "externaldberror": "Tapahtui virhe ulkoisen autentikointitietokannan käytössä tai sinulla ei ole lupaa päivittää tunnustasi.",
        "tags-actions-header": "Toiminnot",
        "tags-active-yes": "Kyllä",
        "tags-active-no": "Ei",
-       "tags-source-extension": "Laajennuksen määrittelemä",
+       "tags-source-extension": "Ohjelmiston määrittelemä",
        "tags-source-manual": "Käyttäjien ja bottien käsin asettama",
        "tags-source-none": "Ei enää käytössä",
        "tags-edit": "muokkaa",
index 4086700..21f2e7c 100644 (file)
        "botpasswords-updated-body": "Le mot de passe pour le robot « $1 » de l'utilisateur « $2 » a été mis à jour.",
        "botpasswords-deleted-title": "Mot de passe de robots supprimé",
        "botpasswords-deleted-body": "Le mot de passe pour le robot « $1 » de l'utilisateur « $2 » a été supprimé.",
-       "botpasswords-newpassword": "Le nouveau mot de passe pour se connecter avec <strong>$1</strong> est <strong>$2</strong>. <em>Veuillez l’enregistrer pour y faire référence ultérieurement.</em>",
+       "botpasswords-newpassword": "Le nouveau mot de passe pour se connecter à <strong>$1</strong> est <strong>$2</strong>. <em>Veuillez l’enregistrer pour y faire référence ultérieurement.</em><br> (Pour les anciens robots qui nécessitent que le nom fourni à la connexion soit le même que le nom d'utilisateur éventuel, vous pouvez aussi utiliser  <strong>$3</strong> comme nom d'utilisateur et <strong>$4</strong> comme mot de passe).",
        "botpasswords-no-provider": "BotPasswordsSessionProvider n’est pas disponible.",
        "botpasswords-restriction-failed": "Les restrictions de mot de passe de robots empêchent cette connexion.",
        "botpasswords-invalid-name": "Le nom d’utilisateur spécifié ne contient pas de séparateur de mot de passe de robots (« $1 »).",
        "invalid-content-data": "Données du contenu non valides",
        "content-not-allowed-here": "Le contenu « $1 » n’est pas autorisé sur la page [[$2]]",
        "editwarning-warning": "Quitter cette page vous fera perdre toutes les modifications que vous avez faites.\nSi vous êtes connecté{{GENDER:||e}}, vous pouvez désactiver cet avertissement dans la section « {{int:prefs-editing}} » de vos préférences.",
+       "editpage-invalidcontentmodel-title": "Modèle de contenu non pris en charge",
+       "editpage-invalidcontentmodel-text": "Le modèle de contenu \"$1\" n'est pas pris en charge.",
        "editpage-notsupportedcontentformat-title": "Format de contenu non pris en charge",
        "editpage-notsupportedcontentformat-text": "Le format de contenu $1 n'est pas pris en charge par le modèle de contenu $2 .",
        "content-model-wikitext": "wikitexte",
        "pageinfo-category-files": "Nombre de fichiers",
        "markaspatrolleddiff": "Marquer comme relue",
        "markaspatrolledtext": "Marquer cette page comme relue",
-       "markaspatrolledtext-file": "Marquer cette version de fichier comme patrouillée",
+       "markaspatrolledtext-file": "Marquer cette version de fichier comme relue",
        "markedaspatrolled": "Marquée comme relue",
        "markedaspatrolledtext": "La version sélectionnée de [[:$1]] a été marquée comme relue.",
        "rcpatroldisabled": "La fonction de relecture des modifications récentes n'est pas activée.",
        "variantname-shi-tfng": "shi-tfng",
        "variantname-shi-latn": "shi-latn",
        "metadata": "Métadonnées",
-       "metadata-help": "Ce fichier contient des informations supplémentaires, probablement ajoutées par l'appareil photo numérique ou le numériseur utilisé pour le créer. Si le fichier a été modifié depuis son état original, certains détails peuvent ne pas refléter entièrement l'image modifiée.",
+       "metadata-help": "Ce fichier contient des informations supplémentaires, probablement ajoutées par l'appareil photo numérique ou le numériseur utilisé pour le créer. \nSi le fichier a été modifié depuis son état original, certains détails peuvent ne pas refléter entièrement l'image modifiée.",
        "metadata-expand": "Afficher les informations détaillées",
        "metadata-collapse": "Masquer les informations détaillées",
        "metadata-fields": "Les champs de métadonnées d'image listés dans ce message seront inclus dans la page de description de l'image quand la table de métadonnées sera réduite. Les autres champs seront cachés par défaut.\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "tag-filter": "Filtrer les [[Special:Tags|balises]] :",
        "tag-filter-submit": "Filtrer",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Balise|Balises}}]] : $2)",
+       "tag-mw-contentmodelchange": "modification du modèle de contenu",
+       "tag-mw-contentmodelchange-description": "Modifications qui [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel changent le modèle de contenu] d'une page",
        "tags-title": "Balises",
        "tags-intro": "Cette page liste les balises que le logiciel peut utiliser pour marquer une modification et la signification de chacune.",
        "tags-tag": "Nom de la balise",
        "tags-actions-header": "Actions",
        "tags-active-yes": "Oui",
        "tags-active-no": "Non",
-       "tags-source-extension": "Définie par une extension",
+       "tags-source-extension": "Défini par le logiciel",
        "tags-source-manual": "Appliquée manuellement par les utilisateurs et les bots",
        "tags-source-none": "Obsolète",
        "tags-edit": "modifier",
index 8494c41..d28d4eb 100644 (file)
@@ -51,7 +51,7 @@
        "tog-enotifminoredits": "Enviádeme tamén unha mensaxe de correo electrónico cando se produzan edicións pequenas nas páxinas ou nos ficheiros",
        "tog-enotifrevealaddr": "Revelar o meu enderezo de correo electrónico nos correos de notificación",
        "tog-shownumberswatching": "Mostrar o número de usuarios que están a vixiar",
-       "tog-oldsig": "Sinatura actual:",
+       "tog-oldsig": "A súa sinatura actual:",
        "tog-fancysig": "Tratar a sinatura como se fose texto wiki (sen ligazón automática)",
        "tog-uselivepreview": "Usar a vista previa en tempo real",
        "tog-forceeditsummary": "Avisádeme cando o campo resumo estea baleiro",
@@ -68,7 +68,7 @@
        "tog-showhiddencats": "Mostrar as categorías ocultas",
        "tog-norollbackdiff": "Omitir as diferenzas despois de levar a cabo unha reversión de edicións",
        "tog-useeditwarning": "Avisádeme cando deixe unha páxina de edición cos cambios sen gardar",
-       "tog-prefershttps": "Utilizar unha conexión segura sempre que acceda ao sistema",
+       "tog-prefershttps": "Utilizar sempre unha conexión segura mentres acceda ao sistema",
        "underline-always": "Sempre",
        "underline-never": "Nunca",
        "underline-default": "Opción predeterminada da aparencia ou do navegador",
        "newwindow": "(abre unha ventá nova)",
        "cancel": "Cancelar",
        "moredotdotdot": "Máis...",
-       "morenotlisted": "Esta lista non está completa.",
+       "morenotlisted": "Esta lista pode estar incompleta.",
        "mypage": "Páxina",
        "mytalk": "Conversa",
        "anontalk": "Conversa",
        "createacct-yourpasswordagain-ph": "Insira o contrasinal outra vez",
        "userlogin-remembermypassword": "Manter a miña conexión",
        "userlogin-signwithsecure": "Utilizar a conexión segura",
+       "cannotlogin-title": "Non se pode acceder ó sistema",
+       "cannotlogin-text": "O acceso ó sistema non está dispoñible.",
        "cannotloginnow-title": "Non se pode iniciar a sesión agora mesmo",
        "cannotloginnow-text": "Non é posible iniciar a sesión cando se usa $1.",
+       "cannotcreateaccount-title": "Non se poden crear contas de usuario",
+       "cannotcreateaccount-text": "A creación directa de contas de usuario non está habilitada nesta wiki.",
        "yourdomainname": "O seu dominio:",
        "password-change-forbidden": "Non pode mudar os contrasinais neste wiki.",
        "externaldberror": "Ou ben se produciu un erro da base de datos na autenticación externa ou ben non se lle permite actualizar a súa conta externa.",
        "botpasswords-updated-body": "O contrasinal de bot do bot de nome \"$1\" do usuario \"$2\" foi actualizado.",
        "botpasswords-deleted-title": "Contrasinal de bot borrado",
        "botpasswords-deleted-body": "O contrasinal de bot do bot de nome \"$1\" do usuario \"$2\" foi borrado.",
-       "botpasswords-newpassword": "O novo contrasinal para acceder con strong>$1</strong> é <strong>$2</strong>. <em>Por favor, rexistra isto para referencia futura.</em>",
+       "botpasswords-newpassword": "O novo contrasinal para acceder con <strong>$1</strong> é <strong>$2</strong>. <em>Por favor, rexistre isto para referencias futuras.</em><br />(Para bots vellos que requiren que o nome de acceso sexa o mesmo que o nome de usuario eventual, pode usar tamén <strong>$3</strong> como nome de usuario e <strong>$4</strong>  como contrasinal.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider non está dispoñible.",
        "botpasswords-restriction-failed": "Restricións de contrasinal de bots evitaron esta conexión.",
        "botpasswords-invalid-name": "O nome de usuario especificado non contén o separador de contrasinal de bot (\"$1\").",
        "invalid-content-data": "Datos de contido inválidos",
        "content-not-allowed-here": "O contido \"$1\" non está permitido na páxina \"[[$2]]\"",
        "editwarning-warning": "Deixar esta páxina pode causar a perda de calquera cambio feito.\nSe accedeu ao sistema, pode desactivar esta mensaxe de advertencia na sección \"{{int:prefs-editing}}\" das súas preferencias.",
+       "editpage-invalidcontentmodel-title": "Modelo de contido non válido",
+       "editpage-invalidcontentmodel-text": "O modelo de contido \"$1\" non é válido.",
        "editpage-notsupportedcontentformat-title": "Formato de contido non admitido",
        "editpage-notsupportedcontentformat-text": "O formato de contido $1 non é compatible co modelo de contido $2.",
        "content-model-wikitext": "texto wiki",
        "file-thumbnail-no": "O nome do ficheiro comeza por <strong>$1</strong>.\nParece tratarse dunha imaxe de tamaño reducido ''(miniatura)''.\nSe dispón dunha versión desta imaxe de maior resolución cárguea; se non, múdelle o nome ao ficheiro.",
        "fileexists-forbidden": "Xa existe un ficheiro co mesmo nome e este non pode ser sobrescrito.\nSe aínda quere cargar o seu ficheiro, por favor, retroceda e use un novo nome. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Xa existe un ficheiro con este nome no repositorio de ficheiros compartidos.\nSe aínda quere cargar o seu ficheiro, volva atrás e use outro nome.\n[[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "O ficheiro cargado é un duplicado exacto da versión actual de <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "O ficheiro cargado é un duplicado exacto {{PLURAL:$2|dunha versión vella|de varias versións vellas}} de <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Este ficheiro é un duplicado {{PLURAL:$1|do seguinte|dos seguintes}}:",
        "file-deleted-duplicate": "Un ficheiro idéntico a este (\"[[:$1]]\") foi borrado previamente. Debería comprobar o historial de borrados do ficheiro antes de proceder a cargalo de novo.",
        "file-deleted-duplicate-notitle": "Un ficheiro idéntico a este foi borrado con anterioridade e o título foi suprimido.\nDebería contactar con alguén capaz de ver os datos de ficheiros borrados para que revise esta situación antes de subilo de novo.",
        "pageinfo-article-id": "ID da páxina",
        "pageinfo-language": "Lingua do contido da páxina",
        "pageinfo-content-model": "Modelo do contido da páxina",
+       "pageinfo-content-model-change": "cambiar",
        "pageinfo-robot-policy": "Indexación por robots",
        "pageinfo-robot-index": "Permitida",
        "pageinfo-robot-noindex": "Non permitida",
        "tag-filter": "Filtrar as [[Special:Tags|etiquetas]]:",
        "tag-filter-submit": "Filtro",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiqueta|Etiquetas}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambio de modelo de contido",
+       "tag-mw-contentmodelchange-description": "Edicións que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambian o modelo de contido] dunha páxina",
        "tags-title": "Etiquetas",
        "tags-intro": "Esta páxina lista as etiquetas coas que o software pode marcar unha edición, e mailos seus significados.",
        "tags-tag": "Nome da etiqueta",
        "tags-actions-header": "Accións",
        "tags-active-yes": "Si",
        "tags-active-no": "Non",
-       "tags-source-extension": "Definida por unha extensión",
+       "tags-source-extension": "Definida polo software",
        "tags-source-manual": "Aplicado manualmente por usuarios e bots",
        "tags-source-none": "Xa non está en uso",
        "tags-edit": "editar",
index d6fedba..8241917 100644 (file)
        "svg-long-desc": "SVG ફાઇલ, માત્ર $1 × $2 પીક્સલ, ફાઇલનું કદ: $3",
        "svg-long-error": "અયોગ્ય SVG ફાઇલ: $1",
        "show-big-image": "મૂળભુત ફાઇલ",
-       "show-big-image-preview": "àª\86 àª®àª¹àª¾àªµàª°àª¾ àª¦à«\8dરશà«\8dયનà«\81àª\82 àª®àª¾àªª: $1.",
+       "show-big-image-preview": "àª\86 àª\9dલàª\95àª\9aિતà«\8dરનà«\81àª\82 àª\95દ: $1.",
        "show-big-image-other": "અન્ય {{PLURAL:$2|આવર્તન|આવર્તનો}}: $1.",
        "show-big-image-size": "$1 × $2 પિક્સેલ",
        "file-info-gif-looped": "આવર્તન  (લુપ)",
        "htmlform-select-badoption": "તમે બતાવેલ વિકલ્પ અવૈધ છે",
        "htmlform-int-invalid": "તમે લખેલ વિકલ્પ અંક નથી",
        "htmlform-float-invalid": "તમે લખેલ વિકલ્પ અંક નથી",
-       "htmlform-int-toolow": "$1 આ કિંમત આ ન્યૂનતમ કિંમત છે",
+       "htmlform-int-toolow": "મુલ્ય જે તમે દર્શાવ્યું છે તે ન્યૂનતમ મુલ્ય $1 કરતાં ઓછું છે.",
        "htmlform-int-toohigh": "તમે પુરી પાડેલ માહિતી મહત્તમ $1થી વધુ છે",
        "htmlform-required": "આ કિઁમત જોઈએ છે",
        "htmlform-submit": "જમા કરો",
index 479ab41..e76347f 100644 (file)
@@ -63,7 +63,7 @@
        "tog-enotifminoredits": "לשלוח אליי דוא\"ל גם על עריכות משניות בדפים וקבצים",
        "tog-enotifrevealaddr": "חשיפת כתובת הדוא\"ל שלי בהתראות דוא\"ל",
        "tog-shownumberswatching": "הצגת מספר המשתמשים העוקבים",
-       "tog-oldsig": "החתימה הנוכחית:",
+       "tog-oldsig": "החתימה הנוכחית שלך:",
        "tog-fancysig": "התייחסות לחתימה כקוד ויקי (ללא קישור אוטומטי)",
        "tog-uselivepreview": "שימוש בתצוגה מקדימה מהירה",
        "tog-forceeditsummary": "הצגת אזהרה בעת הכנסת תקציר עריכה ריק",
        "newwindow": "(נפתח בחלון חדש)",
        "cancel": "ביטול",
        "moredotdotdot": "עוד...",
-       "morenotlisted": "רשימה זו אינה מלאה.",
+       "morenotlisted": "×\99×\99ת×\9b×\9f ×©×¨×©×\99×\9e×\94 ×\96×\95 ×\90×\99× ×\94 ×\9e×\9c×\90×\94.",
        "mypage": "דף משתמש",
        "mytalk": "שיחה",
        "anontalk": "שיחה",
index be5860c..fa83ac9 100644 (file)
        "botpasswords-updated-body": "Le contrasigno pro le robot \"$1\" del usator \"$2\" ha essite actualisate.",
        "botpasswords-deleted-title": "Contrasigno de robot delite",
        "botpasswords-deleted-body": "Le contrasigno pro le robot \"$1\" del usator \"$2\" ha essite delite.",
-       "botpasswords-newpassword": "Le nove contrasigno pro aperir session con <strong>$1</strong> es <strong>$2</strong>. <em>Per favor, conserva isto pro uso futur.</em>",
+       "botpasswords-newpassword": "Le nove contrasigno pro aperir session con <strong>$1</strong> es <strong>$2</strong>. <em>Per favor, conserva isto pro uso futur.</em> <br> (Pro vetule robots que require que le nomine usate pro aperir session sia le mesme que le nomine de usator final, tu pote etiam usar <strong>$3</strong> como nomine de usator <strong>$4</strong> como contrasigno.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider non es disponibile.",
        "botpasswords-restriction-failed": "Session impedite per restrictiones de contrasigno de robot.",
        "botpasswords-invalid-name": "Iste nomine de usator non contine le separator pro contrasigno de robot (\"$1\").",
        "invalid-content-data": "Datos de contento invalide",
        "content-not-allowed-here": "Le contento \"$1\" non es permittite in le pagina [[$2]]",
        "editwarning-warning": "Quitar iste pagina pote causar le perdita de omne modificationes que tu ha facite.\nSi tu ha aperite un session, tu pote disactivar iste aviso in le section \"{{int:prefs-editing}}\" de tu preferentias.",
+       "editpage-invalidcontentmodel-title": "Modello de contento non supportate",
+       "editpage-invalidcontentmodel-text": "Le modello de contento \"$1\" non es supportate.",
        "editpage-notsupportedcontentformat-title": "Formato de contento non supportate",
        "editpage-notsupportedcontentformat-text": "Le formato de contento $1 non es supportate per le modello de contento $2.",
        "content-model-wikitext": "wikitexto",
        "tag-filter": "Filtro de [[Special:Tags|etiquettas]]:",
        "tag-filter-submit": "Filtrar",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Etiquetta|Etiquettas}}]]: $2)",
+       "tag-mw-contentmodelchange": "cambiamento de modello de contento",
+       "tag-mw-contentmodelchange-description": "Modificationes que [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel cambia le modello de contento] de un pagina",
        "tags-title": "Etiquettas",
        "tags-intro": "Iste pagina lista le etiquettas con le quales le software pote marcar un modification, e lor significato.",
        "tags-tag": "Nomine del etiquetta",
        "tags-actions-header": "Actiones",
        "tags-active-yes": "Si",
        "tags-active-no": "No",
-       "tags-source-extension": "Definite per un extension",
+       "tags-source-extension": "Definite per le software",
        "tags-source-manual": "Applicate manualmente per usatores e robots",
        "tags-source-none": "Non plus in uso",
        "tags-edit": "modificar",
index 636cf1d..a752071 100644 (file)
@@ -99,7 +99,9 @@
                        "Urielejh",
                        "Matma Rex",
                        "Matteocng",
-                       "Einreiher"
+                       "Einreiher",
+                       "Anto",
+                       "Saracrovetto"
                ]
        },
        "tog-underline": "Sottolinea i collegamenti:",
        "tog-enotifminoredits": "Inviami una email anche per le modifiche minori di pagine e file",
        "tog-enotifrevealaddr": "Mostra il mio indirizzo nelle e-mail di notifica",
        "tog-shownumberswatching": "Mostra il numero di utenti che hanno la pagina in osservazione",
-       "tog-oldsig": "Firma attuale:",
+       "tog-oldsig": "La tua firma attuale:",
        "tog-fancysig": "Gestisci la firma come wikitesto (senza collegamento automatico)",
        "tog-uselivepreview": "Abilita la funzione ''Live preview'' (anteprima in diretta)",
        "tog-forceeditsummary": "Chiedi conferma se il campo oggetto è vuoto",
        "newwindow": "(si apre in una nuova finestra)",
        "cancel": "Annulla",
        "moredotdotdot": "Altro...",
-       "morenotlisted": "Questo elenco non è completo.",
+       "morenotlisted": "Questo elenco potrebbe essere incompleto.",
        "mypage": "Pagina",
        "mytalk": "discussioni",
        "anontalk": "discussioni",
        "createacct-yourpasswordagain-ph": "Inserisci nuovamente la password",
        "userlogin-remembermypassword": "Mantienimi collegato",
        "userlogin-signwithsecure": "Usa una connessione sicura",
+       "cannotlogin-text": "Accesso non è possibile.",
        "cannotloginnow-title": "Impossibile accedere ora",
        "cannotloginnow-text": "L'accesso non è possibile quando si sta usando $1.",
+       "cannotcreateaccount-title": "Impossibile creare l'utenza",
+       "cannotcreateaccount-text": "La creazione diretta dell'utenza non è attivata su questo wiki.",
        "yourdomainname": "Specificare il dominio",
        "password-change-forbidden": "Non è possibile modificare le password su questo wiki.",
        "externaldberror": "Si è verificato un errore con il server di autenticazione esterno, oppure non si dispone delle autorizzazioni necessarie per aggiornare il proprio accesso esterno.",
index 25a2036..0fa8f88 100644 (file)
@@ -85,7 +85,7 @@
        "fri": "Jum",
        "sat": "Set",
        "january": "Januari",
-       "february": "bruari",
+       "february": "bruari",
        "march": "Maret",
        "april": "April",
        "may_long": "Mèi",
        "august": "Agustus",
        "september": "Sèptèmber",
        "october": "Oktober",
-       "november": "Nopèmber",
+       "november": "Novèmber",
        "december": "Dhésèmber",
        "january-gen": "Januari",
-       "february-gen": "bruari",
+       "february-gen": "bruari",
        "march-gen": "Maret",
        "april-gen": "April",
        "may-gen": "Mèi",
        "august-gen": "Agustus",
        "september-gen": "Sèptèmber",
        "october-gen": "Oktober",
-       "november-gen": "Nopèmber",
+       "november-gen": "Novèmber",
        "december-gen": "Dhésèmber",
        "jan": "Jan",
-       "feb": "Pèb",
+       "feb": "Fèb",
        "mar": "Mar",
        "apr": "Apr",
        "may": "Mèi",
        "nov": "Nop",
        "dec": "Dhé",
        "january-date": "Januari $1",
-       "february-date": "Pèbruari $1",
+       "february-date": "Fèbruari $1",
        "march-date": "Maret $1",
        "april-date": "April $1",
        "may-date": "$1 Mèi",
        "august-date": "Agustus $1",
        "september-date": "$1 Sèptèmber",
        "october-date": "Oktober $1",
-       "november-date": "$1 Nopèmber",
+       "november-date": "$1 Novèmber",
        "december-date": "$1 Dhésèmber",
        "period-am": "Isuk-Awan",
        "period-pm": "Soré-Wengi",
        "subcategories": "Anak kategori",
        "category-media-header": "Médhia sajeroning kategori \"$1\"",
        "category-empty": "<em>Kategori iki lagi ora ngandhut artikel utawa médhia.</em>",
-       "hidden-categories": "{{PLURAL:$1|Kategori kadhelikan}}",
-       "hidden-category-category": "Kategori kadhelikan",
+       "hidden-categories": "{{PLURAL:$1|Kategori ndhelik}}",
+       "hidden-category-category": "Kategori ndhelik",
        "category-subcat-count": "{{PLURAL:$2|Kategori iki mung ngandhut saanak kategori ngisor iki.|Kategori iki ngandhut {{PLURAL:$1|anak kategori|$1 anak kategori}} ngisor iki saka gunggung $2 anak kategori.}}",
        "category-subcat-count-limited": "Kategori iki duwé {{PLURAL:$1|anak kategori|$1 anak kategori}} kaya ngisor iki.",
        "category-article-count": "{{PLURAL:$2|Kategori iki mung ngandhut kaca ngisor iki.|{{PLURAL:$1|Kaca|$1 kaca}} ngisor iki ana ing kategori iki saka gunggung $2 kaca.}}",
-       "category-article-count-limited": "Kategori iki ngandhut {{PLURAL:$1|kaca|$1 kaca-kaca}} sing kapacak ing ngisor iki.",
+       "category-article-count-limited": "Kategori iki ngandhut {{PLURAL:$1|kaca|$1 kaca}} sing kapacak ing ngisor iki.",
        "category-file-count": "{{PLURAL:$2|Kategori iki mung isi barkas iki.|{{PLURAL:$1|Barkas|$1 barkas}} iki ana sajeroning kategori iki saka $2 gunggungé.}}",
-       "category-file-count-limited": "Kategori iki ndarbèni {{PLURAL:$1|berkas|$1 berkas-berkas}} sing kapacak ing ngisor iki.",
+       "category-file-count-limited": "Kategori iki duwé {{PLURAL:$1|barkas|$1 barkas}} sing kapacak ing ngisor iki.",
        "listingcontinuesabbrev": "samb.",
-       "index-category": "Kaca kaindhèksan",
-       "noindex-category": "Kaca ora kaindhèksan",
+       "index-category": "Kaca kaindhèks",
+       "noindex-category": "Kaca ora kaindhèks",
        "broken-file-category": "Kaca mawa pranala barkas rusak",
        "about": "Bab",
        "article": "Kaca isi",
        "newwindow": "(buka mawa jendhéla anyar)",
        "cancel": "Wurung",
        "moredotdotdot": "Liyané...",
-       "morenotlisted": "Pratélan iki ora jangkep.",
+       "morenotlisted": "Pratélan iki ora wutuh.",
        "mypage": "Kaca",
        "mytalk": "Parembugan",
        "anontalk": "Parembugan",
-       "navigation": "Napigasi",
+       "navigation": "Navigasi",
        "and": "&#32;lan",
        "qbfind": "Golèk",
        "qbbrowse": "Luru",
        "qbmyoptions": "Kaca-kacaku",
        "faq": "Pitakon Kerep",
        "faqpage": "Project:Pitakon Kerep",
-       "actions": "Tumindak",
+       "actions": "Lelabuhan",
        "namespaces": "Jagat aran",
-       "variants": "Parian",
-       "navigation-heading": "Menu napigasi",
+       "variants": "Varian",
+       "navigation-heading": "Menu navigasi",
        "errorpagetitle": "Cacad",
        "returnto": "Bali nyang $1.",
        "tagline": "Saka {{SITENAME}}",
        "searchbutton": "Golèk",
        "go": "Menyang",
        "searcharticle": "Menyang",
-       "history": "Babading kaca",
+       "history": "Sujarah kaca",
        "history_short": "Sujarah",
-       "updatedmarker": "wis inganyaran kawit tekaku sing pungkasan",
-       "printableversion": "Cara cithakan",
+       "updatedmarker": "wis dianyari kawit tekaku mréné pungkasan",
+       "printableversion": "Vèrsi cithak",
        "permalink": "Pranala permanèn",
        "print": "Cithak",
        "view": "Deleng",
        "view-foreign": "Deleng nyang $1",
        "edit": "Besut",
-       "edit-local": "Besut panyandra enggon-enggonan",
+       "edit-local": "Besut andharan enggon-enggonan",
        "create": "Gawé",
        "create-local": "Tambah panyadra enggon-enggonan",
        "editthispage": "Besut kaca iki",
        "create-this-page": "Gawé kaca iki",
        "delete": "Busak",
        "deletethispage": "Busak kaca iki",
-       "undeletethispage": "Wurungaké pambusaking kaca iki",
-       "undelete_short": "Batal busak {{PLURAL:$1|sabesutan|$1 besutan}}",
-       "viewdeleted_short": "Deleng {{PLURAL:$1|sabesutan sing kabusak|$1 besutan sing kabusak}}",
+       "undeletethispage": "Wurung busak kaca iki",
+       "undelete_short": "Wurung busak {{PLURAL:$1|sabesutan|$1 besutan}}",
+       "viewdeleted_short": "Deleng {{PLURAL:$1|sabesutan kabusak|$1 besutan kabusak}}",
        "protect": "Reksa",
        "protect_change": "owah",
        "protectthispage": "Reksa kaca iki",
        "viewcount": "Kaca iki wis diaksès ping {{PLURAL:$1|siji|$1}}.",
        "protectedpage": "Kaca kareksa",
        "jumpto": "Jujug:",
-       "jumptonavigation": "napigasi",
+       "jumptonavigation": "navigasi",
        "jumptosearch": "golèk",
        "view-pool-error": "Nyuwun ngapuro, peladèn lagi sibuk wektu iki.\nKakèhan panganggo sing nyoba mbukak kaca iki.\nEntèni sedhéla sadurungé nyoba ngaksès kaca iki manèh .\n\n$1",
        "generic-pool-error": "Nyuwun pangapura, paladèn saiki nembé arungan.\nKakèhan panganggo sing péngin ndeleng sumber iki.\nEntèna sadhéla sadurungé sampéyan nekani sumber iki manèh.",
        "botpasswords-label-appid": "Jeneng bot:",
        "botpasswords-label-create": "Gawé",
        "botpasswords-label-update": "Anyari",
-       "botpasswords-label-cancel": "Batal",
+       "botpasswords-label-cancel": "Wurung",
        "botpasswords-label-delete": "Busak",
        "botpasswords-label-resetpassword": "Balèni gawé tembung wadi",
        "resetpass_forbidden": "Tembung wadi ora bisa diganti",
        "rev-suppressed-diff-view": "Sawiji benahan saka prabédan iki wis '''dibrèdèl'''.\nSampéyan isih bisa ndelok prabédan iki; rincian bisa ditemokaké nèng [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} log pambrèdèlan].",
        "rev-delundel": "Owah kasatmatan",
        "rev-showdeleted": "tuduhaké",
-       "revisiondelete": "Busak/batal busak revisi",
+       "revisiondelete": "Busak/wurung busak révisi",
        "revdelete-nooldid-title": "Rèvisi tujuan ora sah",
        "revdelete-nooldid-text": "Panjenengan durung mènèhi target revisi kanggo nglakoni fungsi iki.",
        "revdelete-no-file": "Berkas sing dituju ora ana.",
        "revdelete-show-file-confirm": "Apa panjenengan yakin arep mirsani révisi sing wis kabusak saka berkas \"<nowiki>$1</nowiki>\" ing $2, jam $3?",
        "revdelete-show-file-submit": "Iya",
        "logdelete-selected": "{{PLURAL:$1|Log kapilih|Log kapilih}} kanggo:",
+       "revdelete-text-others": "Administrator liya isih bisa ngaksès isian ndhelik lan mulihaké iku saka pambusakan, kajaba rereksan tambahan disetèl.",
        "revdelete-confirm": "Mangga pesthèkaké yèn Sampéyan pancèn kudu nglakoni iki, yèn Sampéyan ngerti akibaté, lan yèn Sampéyan ngakoni iki cocok karo [[{{MediaWiki:Policy-url}}|kawicakan]].",
        "revdelete-suppress-text": "Pandhelikan révisi '''mung''' bisa dipigunakaké kanggo kasus ing ngisor:\n* Informasi sing kagolong pitnah\n* Informasi pribadi sing kurang pantes\n*: ''alamat omah lan nomer telepon, nomer kartu idhèntitas, lsp..''",
        "revdelete-legend": "Atur watesan:",
        "right-writeapi": "Nganggo API tulis",
        "right-delete": "Busak kaca-kaca",
        "right-bigdelete": "Busak kaca-kaca mawa sajarah panyuntingan sing gedhé",
-       "right-deletelogentry": "Busak lan batalaké mbusak isi log spésipik",
+       "right-deletelogentry": "Busak lan wurung busak èntri log tartamtu",
        "right-deleterevision": "Busak lan batal busak révisi tartamtu kaca-kaca",
        "right-deletedhistory": "Ndeleng sajarah èntri-èntri kabusak, tanpa bisa ndeleng apa sing dibusak",
        "right-deletedtext": "Delok tèks kabusak lan panggantèn antara rèpisi kabusak",
        "right-browsearchive": "Golèk kaca-kaca sing wis dibusak",
-       "right-undelete": "Batal busak sawijining kaca",
+       "right-undelete": "Wurung busak kaca",
        "right-suppressrevision": "Ndeleng lan mbalèkaké révisi-révisi sing didelikaké saka para opsis",
        "right-suppressionlog": "Ndeleng log-log pribadi",
        "right-block": "Blokir panganggo-panganggo liya saka panyuntingan",
        "grant-createaccount": "Gawé akun",
        "grant-createeditmovepage": "Gawé, besut, lan lih kaca",
        "grant-delete": "Busak kaca, owahan, lan isian cathetan",
+       "grant-editinterface": "Besut jagad aran MediaWiki lan CSS/JavaScript panganggo",
+       "grant-editmycssjs": "Besut CSS/JavaScript panganggomu",
+       "grant-editmyoptions": "Besut préferènsi panganggomu",
        "newuserlogpage": "Log naraguna anyar",
        "newuserlogpagetext": "Ing ngisor iki kapacak log pandaftaran panganggo anyar.",
        "rightslog": "Log hak panganggo",
        "rightslogtext": "Ing ngisor iki kapacak log pangowahan marang hak-hak panganggo.",
-       "action-read": "maca kaca iki",
+       "action-read": "waca kaca iki",
        "action-edit": "besut kaca iki",
-       "action-createpage": "nggawé kaca-kaca",
+       "action-createpage": "gawé kaca iki",
        "action-createtalk": "gawé kaca parembugan iki",
        "action-createaccount": "gawé akun panganggo iki",
        "action-minoredit": "tandhani iki minangka besutan cilik",
-       "action-move": "alihna kaca iki",
+       "action-move": "alih kaca iki",
        "action-move-subpages": "mindahaké kaca iki, lan kabèh anak-kacané",
        "action-move-rootuserpages": "ngalih kaca panganggo oyod",
-       "action-movefile": "lih barkas iki",
-       "action-upload": "ngunggahaké berkas iki",
+       "action-move-categorypages": "alih kaca kategori",
+       "action-movefile": "alih barkas iki",
+       "action-upload": "unggah barkas iki",
        "action-reupload": "nindhih berkas sing wis ana",
        "action-reupload-shared": "nindhih berkas sing wis ana ing papan panyimpanan berkas sing dianggo bebarengan",
        "action-upload_by_url": "unggahna berkas iki saka sawijining alamat URL",
        "action-deleterevision": "busak revisi iki",
        "action-deletedhistory": "pirsani sajarah kaca sing wis dibusak iki",
        "action-browsearchive": "nggolèki kaca-kaca sing wis dibusak",
-       "action-undelete": "mbatalaké pambusakan kaca iki",
+       "action-undelete": "wurung busak kaca iki",
        "action-suppressrevision": "ninjo lan mbalèkaké revisi sing didhelikaké iki",
        "action-suppressionlog": "mirsani log pribadi iki",
        "action-block": "malang panganggo iki mbesut",
        "restriction-level-autoconfirmed": "pangreksan sémi",
        "restriction-level-all": "kabèh tingkatan",
        "undelete": "Kembalikan halaman yang telah dihapus",
-       "undeletepage": "Lihat dan kembalikan halaman yang telah dihapus",
+       "undeletepage": "Deleng lan pulihaké kaca kabusak",
        "undeletepagetitle": "'''Ing ngisor iki kapacak daftar révisi sing dibusak saka [[:$1]]'''.",
        "viewdeletedpage": "Deleng kaca sing wis dibusak",
        "undeletepagetext": "{{PLURAL:$1|kaca iki wis dibusak nanging isih|$1 kaca iki wis dibusak nanging isih}} ana ing arsip lan bisa dibalèkaké.\nArsip bisa diresiki sakala-kala.",
        "undelete-fieldset-title": "Mulihaké rèvisi",
-       "undeleteextrahelp": "Kanggo mbalèkaké kabèh sajarah kaca, kothongaké kabèh kothak-cèk lan klik '''''{{int:undeletebtn}}'''''.\nKanggo nglakoni pambalèkan pinilih, conthèngen kothak-cèk  sing magepokan karo révisi sing dipéngini lan klik '''''{{int:undeletebtn}}'''''.\nMencèt tombol '''''Reset''''' bakal ngosongaké isi komentar lan kabèh kothak-cèk.",
+       "undeleteextrahelp": "Saperlu mulihaké kabèh surajah kaca, jaraké kothak cèk kosong banjur klik <strong><em>{{int:undeletebtn}}</em></strong>.\nSaperlu ngayahi réstorasi sèlèktif, cèk kothak sing magepokan karo révisi sing arep dipulihaké, banjur klik <strong><em>{{int:undeletebtn}}</em></strong>.",
        "undeleterevisions": "$1 {{PLURAL:$1|révisi|révisi}} diarsipaké",
        "undeletehistory": "Yèn panjenengan mbalèkaké kaca, kabèh révisi bakal dibalèkaké jroning sajarah.\nYèn sawijining kaca anyar kanthi jeneng sing padha wis digawé wiwit nalika pambusakan, révisi sing wis dibalèkaké bakal katon jroning sajarah sadurungé.",
        "undeleterevdel": "Pambatalan pambusakan ora bakal dilakokaké yèn bab iku bakal ngakibataké révisi pungkasan kaca dadi sabagéyan kabusak.\nIng kasus kaya mengkono, panjenengan kudu ngilangaké cèk utawa mbusak pandelikan révisi kabusak sing anyar dhéwé.",
        "undelete-search-prefix": "Tuduhna kaca sing diwiwiti karo:",
        "undelete-search-submit": "Golèk",
        "undelete-no-results": "Ora ditemokaké kaca sing cocog ing arsip pambusakan.",
-       "undelete-filename-mismatch": "Ora bisa mbatalaké pambusakan révisi berkas mawa tandha wektu $1: jeneng berkas ora padha",
+       "undelete-filename-mismatch": "Ora bisa mulihaké révisi barkas mawa tandha wektu $1: Jeneng barkas ora padha",
        "undelete-bad-store-key": "Ora bisa mbatalaké pambusakan révisi berkas mawa tandha wektu $1: berkas ilang sadurungé dibusak.",
        "undelete-cleanup-error": "Ana kaluputan nalika mbusak arsip berkas \"$1\" sing ora dienggo.",
-       "undelete-missing-filearchive": "Ora bisa mbalèkaké arsip bekas mawa ID $1 amerga ora ana ing basis data.\nBerkas iku mbok-menawa wis dibusak.",
+       "undelete-missing-filearchive": "Ora bisa mulihaké arsip barkas ID $1 amarga ora ana ing basis data.\nBarkas iku bokmenawa wis dibusak.",
        "undelete-error": "Kasalahan mbalèkaké kaca",
        "undelete-error-short": "Kaluputan olèhé mbatalaké pambusakan: $1",
        "undelete-error-long": "Ana kaluputan nalika mbatalaké pambusakan berkas:\n\n$1",
        "infiniteblock": "salawasé",
        "expiringblock": "kadaluwarsa ing $1, $2",
        "anononlyblock": "namung anon",
-       "noautoblockblock": "pamblokiran otomatis dipatèni",
+       "noautoblockblock": "blokir otomatis dipatèni",
        "createaccountblock": "ndamelipun akun dipunblokir",
        "emailblock": "layang e-mail diblokir",
        "blocklist-nousertalk": "ora kena mbesut kaca guneman dhéwé",
-       "ipblocklist-empty": "Daftar pamblokiran kosong.",
+       "ipblocklist-empty": "Pratélan blokir kosong.",
        "ipblocklist-no-results": "alamat IP utawa panganggo sing disuwun ora diblokir.",
        "blocklink": "palang",
        "unblocklink": "jabel blokir",
        "contribslink": "sumbangan",
        "emaillink": "kirim layang èlèktronik",
        "autoblocker": "Panjenengan otomatis dipun-blok amargi nganggé alamat protokol internet (IP) ingkang sami kaliyan \"[[User:$1|$1]]\". Alesanipun $1 dipun blok inggih punika \"'''$2'''\"",
-       "blocklogpage": "Log pamblokiran",
+       "blocklogpage": "Log blokir",
        "blocklog-showlog": "Panganggo iki wis tau diblokir sakdurungé.\nLog blokiran sumadhiya nèng ngisor kanggo rujukan:",
        "blocklog-showsuppresslog": "Panganggo iki wis tau diblokir lan didhelikaké sakdurungé.\nLog brèdèlan sumadhiya nèng ngisor kanggo rujukan:",
        "blocklogentry": "mblokir [[$1]] kanthi wektu kadaluwarsa $2 $3",
index 5eda368..43dc0de 100644 (file)
@@ -7,7 +7,8 @@
                        "Mirzali",
                        "아라",
                        "Macofe",
-                       "Kumkumuk"
+                       "Kumkumuk",
+                       "Asmen"
                ]
        },
        "tog-underline": "Bınê gırey de xete bonce:",
        "specialpage": "Pela xısusiye",
        "personaltools": "Hacetê keşi",
        "articlepage": "Pela zerreki bıvêne",
-       "talk": "Hurênais",
+       "talk": "Hurênayis",
        "views": "Asaişi",
        "toolbox": "Qutiya hacetu",
        "userpage": "Pela karberi bıvêne",
index aa90652..50d114f 100644 (file)
        "tog-showhiddencats": "숨은 분류 보이기",
        "tog-norollbackdiff": "되돌리기 후 차이를 보지 않기",
        "tog-useeditwarning": "바꾼 내용을 저장하지 않고 편집 페이지를 벗어날 때 내게 경고하기",
-       "tog-prefershttps": "ë¡\9cê·¸ì\9d¸í\95  ë\95\8c 항상 보안 연결 사용",
+       "tog-prefershttps": "ë¡\9cê·¸ì\9d¸í\95\98ë\8a\94 ë\8f\99ì\95\88 항상 보안 연결 사용",
        "underline-always": "항상",
        "underline-never": "항상 치지 않기",
        "underline-default": "스킨 또는 브라우저 기본값",
        "newwindow": "(새 창에서 열림)",
        "cancel": "취소",
        "moredotdotdot": "더 보기...",
-       "morenotlisted": "ì\9d´ ëª©ë¡\9dì\9d\80 ì\99\84ì\84±ë\90\98ì§\80 ì\95\8aì\95\98습니다.",
+       "morenotlisted": "ì\9d´ ëª©ë¡\9dì\9d\80 ì\99\84ì \84í\95\98ì§\80 ì\95\8aì\9d\84 ì\88\98 ì\9e\88습니다.",
        "mypage": "문서",
        "mytalk": "토론",
        "anontalk": "토론",
index f0aca89..e04e424 100644 (file)
@@ -45,7 +45,7 @@
        "tog-enotifminoredits": "Schéckt mir och bei klengen Ännerungen op vu mir iwwerwaachte Säiten oder Fichieren eng E-Mail.",
        "tog-enotifrevealaddr": "Meng E-Mail-Adress an de Benoriichtegungsmaile weisen.",
        "tog-shownumberswatching": "D'Zuel vun de Benotzer déi dës Säit iwwerwaache weisen",
-       "tog-oldsig": "Aktuell Ënnerschrëft:",
+       "tog-oldsig": "Är Aktuell Ënnerschrëft:",
        "tog-fancysig": "Ënnerschrëft als Wiki-Text behandelen (Ouni automatesche Link)",
        "tog-uselivepreview": "Live-Preview benotzen",
        "tog-forceeditsummary": "Warnen, wa beim Späicheren de Resumé feelt",
@@ -62,7 +62,7 @@
        "tog-showhiddencats": "Verstoppt Kategorië weisen",
        "tog-norollbackdiff": "Ënnerscheed nom Zrécksetzen net weisen",
        "tog-useeditwarning": "Mech warne wann ech d'Ännerung vun enger Säit verloossen, ouni Ännerunge gespäichert ze hunn",
-       "tog-prefershttps": "Ëmmer eng sécher Verbindung benotze wann ageloggt",
+       "tog-prefershttps": "Benotzt ëmmer eng sécher Verbindung wann ageloggt",
        "underline-always": "Ëmmer",
        "underline-never": "Ni",
        "underline-default": "Skin oder Standard vum Browser",
        "newwindow": "(geet an enger neier Fënster op)",
        "cancel": "Zréck",
        "moredotdotdot": "Méi …",
-       "morenotlisted": "Dës Lëscht ass net komplett.",
+       "morenotlisted": "Dës Lëscht ass eventuell net komplett.",
        "mypage": "Säit",
        "mytalk": "Diskussioun",
        "anontalk": "Diskussioun",
        "botpasswords-updated-body": "D'Botpasswuert fir de Bot-Numm \"$1\" vum Benotzer ''$2'' gouf aktualiséiert.",
        "botpasswords-deleted-title": "Botpasswuert geläscht",
        "botpasswords-deleted-body": "D'Botpasswuert fir de Bot-Numm \"$1\" vum Benotzer ''$2'' gouf geläscht.",
-       "botpasswords-newpassword": "Dat neit Passwuert fir sech mat <strong>$1</strong> anzeloggen ass <strong>$2</strong>.\n<em>Versuergt dat fir sech spéider dorop ze referéieren.</em>",
+       "botpasswords-newpassword": "Dat neit Passwuert fir sech mat <strong>$1</strong> anzeloggen ass <strong>$2</strong>.\n<em>Versuergt dat fir sech spéider dorop ze referéieren.</em><br />(Fir al Botten déi verlaangen datt de Login-Numm d'selwecht ass wéi den spéidere Benotzernumm, kënnt Dir och <strong>$3</strong> als Benotzernumm benotzten a(n) <strong>$4</strong> als Passwuert.)",
        "botpasswords-not-exist": "De Benotzer \"$1\" huet kee Botpasswuert mam Numm \"$2\".",
        "resetpass_forbidden": "Passwierder kënnen net geännert ginn.",
        "resetpass_forbidden-reason": "Passwierder kënnen net geännert ginn: $1",
index e528dde..bc9db01 100644 (file)
@@ -51,7 +51,7 @@
        "tog-enotifminoredits": "Paziņot pa e-pastu arī par maznozīmīgiem labojumiem rakstos un failos",
        "tog-enotifrevealaddr": "Atklāt manu e-pasta adresi paziņojumu vēstulēs",
        "tog-shownumberswatching": "Rādīt uzraudzītāju skaitu",
-       "tog-oldsig": "Pašreizējais paraksts:",
+       "tog-oldsig": "Esošais paraksts:",
        "tog-fancysig": "Vienkāršs paraksts (bez automātiskās saites)",
        "tog-uselivepreview": "Lietot tūlītējo priekšskatījumu",
        "tog-forceeditsummary": "Atgādināt man, ja kopsavilkuma ailīte ir tukša",
        "newwindow": "(atveras jaunā logā)",
        "cancel": "Atcelt",
        "moredotdotdot": "Vairāk...",
-       "morenotlisted": "Šis saraksts nav pilnīgs.",
+       "morenotlisted": "Šis saraksts var nebūt pilnīgs.",
        "mypage": "Lapa",
        "mytalk": "Diskusijas",
        "anontalk": "Diskusijas",
index 0eb17e9..e5f3e01 100644 (file)
        "prefs-help-prefershttps": "Denne preferansen vil virke etter neste innlogging.",
        "prefswarning-warning": "Du har gjort endringer i dine innstillinger som ikke er lagret ennå.\nDersom du forlater denne siden utenk å klikke på \"$1\" blir ikke innstillingene dine oppdatert.",
        "prefs-tabs-navigation-hint": "Tips: Du kan bruke venstre- og høyrepiltastene for å navigere mellom fanene i fanelisten",
-       "userrights": "Rettighets&shy;kontroll",
+       "userrights": "Bruker&shy;rettighets&shy;kontroll",
        "userrights-lookup-user": "Ordne brukergrupper",
        "userrights-user-editname": "Fyll inn et brukernavn:",
        "editusergroup": "Endre {{GENDER:$1|brukergrupper}}",
index 0f214ff..c68b6f8 100644 (file)
        "tog-enotifminoredits": "Notificar-me por correio electrónico também sobre edições menores de páginas ou ficheiros",
        "tog-enotifrevealaddr": "Revelar o meu endereço de correio electrónico nas notificações",
        "tog-shownumberswatching": "Mostrar o número de utilizadores a vigiar",
-       "tog-oldsig": "Assinatura atual:",
+       "tog-oldsig": "A sua assinatura atual:",
        "tog-fancysig": "Tratar assinatura como texto wiki (sem hiperligações automáticas)",
        "tog-uselivepreview": "Usar a antevisão ao vivo",
        "tog-forceeditsummary": "Avisar-me se deixar o resumo da edição vazio",
        "newwindow": "(abre numa janela nova)",
        "cancel": "Cancelar",
        "moredotdotdot": "Mais...",
-       "morenotlisted": "Esta lista não está completa.",
+       "morenotlisted": "Esta lista pode estar incompleta.",
        "mypage": "Página",
        "mytalk": "Discussão",
        "anontalk": "Discussão",
        "createacct-yourpasswordagain-ph": "Digite a palavra-passe novamente",
        "userlogin-remembermypassword": "Manter-me autenticado",
        "userlogin-signwithsecure": "Usar uma ligação segura",
+       "cannotlogin-title": "Não é possível iniciar sessão",
+       "cannotlogin-text": "Não é possível iniciar sessão.",
        "cannotloginnow-title": "Não é possível iniciar sessão agora",
        "cannotloginnow-text": "Não pode iniciar a sessão quando utilizar $1.",
+       "cannotcreateaccount-title": "Não é possível criar contas",
        "yourdomainname": "O seu domínio:",
        "password-change-forbidden": "Não pode alterar palavras-passe nesta wiki.",
        "externaldberror": "Ocorreu um erro externo à base de dados durante a autenticação ou não lhe é permitido atualizar a sua conta externa.",
        "botpasswords-deleted-body": "O robô palavra-passe para o nome do robô \"$1\"do utilizador \"$2\" foi eliminado.",
        "botpasswords-newpassword": "A nova palavra-passe para iniciar sessão com <strong>$1</strong> é <strong>$2</strong>. Por favor, recorde-se dela para futura referência.</em>",
        "botpasswords-no-provider": "BotPasswordsSessionProvider não está disponível.",
-       "botpasswords-restriction-failed": "Restrições de senha de robô evitam esta autenticação.",
+       "botpasswords-restriction-failed": "Restrições de palavra-passe de robô evitam esta autenticação.",
        "botpasswords-invalid-name": "O nome de utilizador especificado não contém o separador de palavra-passe de robô (\"$1\").",
-       "botpasswords-not-exist": "O usuário \"$1\" não possui uma senha de robô \"$2\".",
+       "botpasswords-not-exist": "O utilizador \"$1\" não possui uma palavra-passe de robô \"$2\".",
        "resetpass_forbidden": "Não é possível alterar palavras-passe",
        "resetpass_forbidden-reason": "As palavras-passe não podem ser alteradas: $1",
        "resetpass-no-info": "Precisa de iniciar sessão para aceder diretamente a esta página.",
        "passwordreset-emailelement": "{{GENDER:$1|Utilizador|Utilizadora}}: \n$1\n\nPalavra-passe temporária: \n$2",
        "passwordreset-emailsentemail": "Se este é o endereço de correio eletrónico associado a esta conta, ser-lhe-á enviada uma palavra-passe de reposição.",
        "passwordreset-emailsentusername": "Se houver um endereço de correio eletrónico associado a esta conta, ser-lhe-á enviada uma mensagem para redefinir a sua palavra-passe.",
-       "passwordreset-emailsent-capture2": "A redefinição da senha {{PLURAL:$1|do e-mail|dos e-mails}} foi enviada. {{PLURAL:$1|O nome de usuário e senha|A lista de nomes de usuário e senhas}} encontram-se a seguir.",
-       "passwordreset-emailerror-capture2": "O envio do correio {{GENDER:$2|ao usuário|à usuária}} falhou: $1 {{PLURAL:$3|O nome de usuário e senha são mostradas abaixo|A lista de nomes de usuários e senhas é mostrada abaixo}}.",
+       "passwordreset-emailsent-capture2": "A redefinição da palavra-passe {{PLURAL:$1|do e-mail|dos e-mails}} foi enviada. {{PLURAL:$1|O nome de utilizador e palavra-passe|A lista de nomes de utilizador e palavras-passe}} encontram-se a seguir.",
+       "passwordreset-emailerror-capture2": "O envio do correio {{GENDER:$2|ao utilizador|à utilizadora|a(o) utilizador(a)}} falhou: $1 {{PLURAL:$3|O nome de utilizador e palavra-passe são mostradas abaixo|A lista de nomes de utilizadores e palavras-passe é mostrada abaixo}}.",
        "passwordreset-nocaller": "Um interlocutor deve ser fornecido",
        "passwordreset-nosuchcaller": "A pessoa que chama não existe: $1",
        "passwordreset-ignored": "A reposição de palavra-passe não foi realizada. Talvez não tenha sido configurado o provedor?",
        "pageinfo-article-id": "ID da página",
        "pageinfo-language": "Idioma do conteúdo da página",
        "pageinfo-content-model": "Modelo de conteúdo de página",
+       "pageinfo-content-model-change": "alterar",
        "pageinfo-robot-policy": "Indexação por robôs",
        "pageinfo-robot-index": "Permitida",
        "pageinfo-robot-noindex": "Não permitida",
        "tags-actions-header": "Ações",
        "tags-active-yes": "Sim",
        "tags-active-no": "Não",
-       "tags-source-extension": "Definida por uma extensão",
+       "tags-source-extension": "Definida pelo software",
        "tags-source-manual": "Aplicada manualmente pelos utilizadores e robôs",
        "tags-source-none": "Já não está em uso",
        "tags-edit": "editar",
index 7fe220b..fbf95cc 100644 (file)
        "undeletehistorynoadmin": "Used in [[Special:Undelete]].\n\nSee also:\n* {{msg-mw|Undeletehistory}}\n* {{msg-mw|Undeleterevdel}}",
        "undelete-revision": "Shown in \"View and restore deleted pages\" ([[Special:Undelete/$1]]).\nParameters:\n* $1 - deleted page name\n* $2 - (unused)\n* $3 - username (author of revision, not who deleted it)\n* $4 - date of the revision (localized)\n* $5 - time of the revision (localized)\nExample (in English):\n* Deleted revision of [[Main Page]] (as of 14 September 2013, at 08:17) by [[User:Username|Username]]:",
        "undeleterevision-missing": "Used as warning when undeleting the revision.",
-       "undeleterevision-duplicate-revid": "Used as warning when some revisions could not be undeleted due to <code>rev_id</code> collisions.  Parameters:\n* - Number of revisions that could not be restored for this reason.",
+       "undeleterevision-duplicate-revid": "Used as warning when some revisions could not be undeleted due to <code>rev_id</code> collisions.  Parameters:\n* $1 - Number of revisions that could not be restored for this reason.",
        "undelete-nodiff": "Used in [[Special:Undelete]].",
        "undeletebtn": "Shown on [[Special:Undelete]] as button caption and on [[Special:Log/delete|deletion log]] after each entry (for sysops).\n\n{{Identical|Restore}}",
        "undeletelink": "Display name of link to undelete a page used on [[Special:Log/delete]]\n\n{{Identical|View}}\n{{Identical|Restore}}",
index 0611d9e..7e6289d 100644 (file)
        "tag-filter": "Фильтр [[Special:Tags|меток]]:",
        "tag-filter-submit": "Отфильтровать",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|1=Метка|Метки}}]]: $2)",
+       "tag-mw-contentmodelchange": "изменение модели содержимого",
+       "tag-mw-contentmodelchange-description": "Правки, которые [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel изменяют модель содержимого] страницы",
        "tags-title": "Метки",
        "tags-intro": "На этой странице приведён список меток, которыми программное обеспечение отмечает правки, а также значения этих меток.",
        "tags-tag": "Имя метки",
index 066bcba..d17cdac 100644 (file)
@@ -52,6 +52,7 @@
        "tog-watchdefault": "Pridávať stránky a súbory, ktoré upravím medzi sledované",
        "tog-watchmoves": "Pridávať stránky a súbory, ktoré presuniem medzi sledované",
        "tog-watchdeletion": "Pridávať stránky a súbory, ktoré zmažem medzi sledované",
+       "tog-watchuploads": "Pridať nové súbory, ktoré nahrám, do môjho zoznamu sledovaných",
        "tog-watchrollback": "Pridať do môjho zoznamu sledovaných stránok stránky, na ktorých som použil vrátenie",
        "tog-minordefault": "Označovať všetky zmeny štandardne ako drobné",
        "tog-previewontop": "Zobrazovať náhľad pred textovým poľom úprav, nie až za ním",
        "tagline": "Z {{GRAMMAR:genitív|{{SITENAME}}}}",
        "help": "Pomoc",
        "search": "Hľadať",
+       "search-ignored-headings": " #<!-- tento riadok je nutné nechať bez zmeny --> <pre>\n# Nadpisy, ktoré bude vyhľadávanie ignorovať.\n# Tieto zmenu sa prejavia akonáhle bude stránka s nadpisom zaindexovaná.\n# Reindexovanie stránky môžete vynútiť uložením prázdnej úpravy.\n# Syntax je nasledovná:\n#   * Všetko počínajúc znakom „#“ do konca riadka je komentár.\n#   * Každý neprázdny riadok je presný názov, ktorý má byť ignorovaný, presne ako je napísaný, pričom na veľkosti písmen záleží.\nReferencie\nExterné odkazy\nPozri aj\n #</pre> <!-- tento riadok je nutné nechať bez zmeny -->",
        "searchbutton": "Hľadať",
        "go": "Vykonať",
        "searcharticle": "Ísť na",
        "databaseerror-query": "Požiadavka: $1",
        "databaseerror-function": "Funkcia: $1",
        "databaseerror-error": "Chyba: $1",
+       "transaction-duration-limit-exceeded": "Aby predišlo veľkému oneskoreniu pri replikácii, táto transakcia bola prerušená, pretože doba jej zápisu ($1) prekročila limit $2 sekúnd.\nAk robíte naraz veľa zmien, skúste radšej robiť viacero menších operácií.",
        "laggedslavemode": "Upozornenie: Je možné, že stránka neobsahuje posledné aktualizácie.",
        "readonly": "Databáza je zamknutá",
        "enterlockreason": "Zadajte dôvod požadovaného zamknutia vrátane odhadu, kedy očakávate odomknutie",
        "missingarticle-rev": "(č. revízie: $1)",
        "missingarticle-diff": "(rozdiel: $1, $2)",
        "readonly_lag": "Databáza bola automaticky zamknutá pokým záložné databázové servery nedoženú hlavný server",
+       "nonwrite-api-promise-error": "Bola odoslaná hlavička HTTP „Promise-Non-Write-API-Action“, ale požiadavka smerovala do modulu API na zápis.",
        "internalerror": "Vnútorná chyba",
        "internalerror_info": "Vnútorná chyba: $1",
        "internalerror-fatal-exception": "Kritická výnimka typu „$1“",
        "no-null-revision": "Nepodarilo sa vytvoriť novú prázdnu revíziu stránky „$1“",
        "badtitle": "Neplatný nadpis",
        "badtitletext": "Požadovaný nadpis bol neplatný, nezadaný, alebo nesprávne odkazovaný z inej jazykovej verzie {{GRAMMAR:genitív|{{SITENAME}}}}. Mohol tiež obsahovať jeden alebo viac znakov, ktoré nie je možné použiť v nadpisoch.",
+       "title-invalid-empty": "Požadovaný názov stránky je prázdny alebo obsahuje iba menný priestor.",
+       "title-invalid-utf8": "Požadovaný názov stránky obsahuje neplatnú postupnosť UTF-8.",
+       "title-invalid-interwiki": "Požadovaný názov stránky obsahuje odkaz interwiki, ktorý nie je možné používať v názvoch stránky.",
+       "title-invalid-talk-namespace": "Požadovaný názov stránky odkazuje na neexistujúcu diskusnú stránku.",
+       "title-invalid-characters": "Požadovaný názov stránky obsahuje neplatné znaky: „$1“.",
+       "title-invalid-relative": "Názov stránky má relatívnu cestu. Relatívne názvy stránky (./, ../) sú neplatné, pretože by často boli nedostupné, keď s nimi pracuje prehliadač používateľa.",
+       "title-invalid-magic-tilde": "Požadovaný názov stránky obsahuje neplatnú magickú postupnosť vlnoviek (<nowiki>~~~</nowiki>).",
+       "title-invalid-too-long": "Požadovaný názov stránky je príliš dlhý. Nesmie byť dlhšií ako $1 {{PLURAL:$1|bajt|bajty|bajtov}} v kódovaní UTF-8.",
+       "title-invalid-leading-colon": "Požadovaný názov stránky obsahuje na začiatku neplatnú dvojbodku.",
        "perfcached": "Nasledujúce údaje pochádzajú z vyrovnávacej pamäte a nemusia byť úplne aktuálne. Vo vyrovnávacej pamäti {{PLURAL:$1|je dostupný|sú dostupné|je dostupných}} najviac {{PLURAL:$1|jeden výsledok|$1 výsledky|$1 výsledkov}}.",
        "perfcachedts": "Nasledujúce údaje pochádzajú z vyrovnávacej pamäte a naposledy boli aktualizované $1. Vo vyrovnávacej pamäti {{PLURAL:$4|je dostupný|sú dostupné|je dostupných}} najviac {{PLURAL:$4|jeden výsledok|$4 výsledky|$4 výsledkov}}.",
        "querypage-no-updates": "Aktualizácie tejto stránky sú momentálne vypnuté. Tieto dáta sa v súčasnosti nebudú obnovovať.",
        "virus-scanfailed": "kontrola zlyhala (kód $1)",
        "virus-unknownscanner": "neznámy antivírus:",
        "logouttext": "<strong>Práve ste sa odhlásili.</strong>\n\nUvedomte si, že niektoré stránky sa môžu naďalej zobrazovať ako keby ste boli prihlásený, až kým nevymažete vyrovnávaciu pamäť vášho prehliadača.",
+       "cannotlogoutnow-title": "Teraz nie je možné odhlásiť sa",
+       "cannotlogoutnow-text": "Nie je možné odhlásiť sa, keď používate $1",
        "welcomeuser": "Vitajte,  $1 !",
        "welcomecreation-msg": "Váš účet bol vytvorený.\nNezabudnite zmeniť svoje [[Special:Preferences|Predvoľby {{GRAMMAR:genitív|{{SITENAME}}}}]].",
        "yourname": "Používateľské meno:",
        "createacct-yourpasswordagain-ph": "Zadajte heslo znova",
        "userlogin-remembermypassword": "Zapamätať si moje prihlásenie",
        "userlogin-signwithsecure": "Použiť zabezpečené pripojenie",
+       "cannotlogin-title": "Nie je možné prihlásiť sa",
+       "cannotlogin-text": "Prihlásenie nie je možné.",
+       "cannotloginnow-title": "Teraz nie je možné prihlásiť sa",
+       "cannotloginnow-text": "Nie je možné odhlásiť sa, keď používate $1.",
+       "cannotcreateaccount-title": "Nie je možné vytvárať účty",
+       "cannotcreateaccount-text": "Priame vytváranie účtu nie je na tejto wiki povolené.",
        "yourdomainname": "Vaša doména:",
        "password-change-forbidden": "Na tejto wiki si nemôžete zmeniť heslo.",
        "externaldberror": "Buď nastala chyba externej autentifikačnej databázy alebo vám nie je povolené aktualizovať váš externý účet.",
        "botpasswords-no-central-id": "Aby ste mohli použiť heslá pre botov musíte byť prihlásený k centrálnemu účtu.",
        "botpasswords-existing": "Jestvujúce heslá pre botov",
        "botpasswords-createnew": "Vytvoriť nové heslo pre botov",
+       "botpasswords-editexisting": "Zmeniť existujúce heslo bota",
        "botpasswords-label-appid": "Názov bota:",
        "botpasswords-label-create": "Vytvoriť",
        "botpasswords-label-update": "Aktualizovať",
        "botpasswords-label-cancel": "Zrušiť",
        "botpasswords-label-delete": "Vymazať",
        "botpasswords-label-resetpassword": "Obnoviť heslo",
+       "botpasswords-label-grants": "Príslušné oprávnenia:",
+       "botpasswords-help-grants": "Každé oprávnenie poskytuje prístup k uvedeným právam používateľa, ktoré už používateľský účet má. Ďalšie informácie nájdete v [[Special:ListGrants|tabuľke oprávnení]].",
+       "botpasswords-label-restrictions": "Obmedzenie použitia:",
+       "botpasswords-label-grants-column": "Udelené",
+       "botpasswords-bad-appid": "Názov bota „$1“ nie je platný.",
+       "botpasswords-insert-failed": "Nepodarilo sa pridať názov bota „$1“. Je už pridaný?",
+       "botpasswords-update-failed": "Nepodarilo sa aktualizovať názov bota „$1“. Bol zmazaný?",
+       "botpasswords-created-title": "Heslo bota bolo vytvorené",
+       "botpasswords-created-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo vytvorené.",
+       "botpasswords-updated-title": "Heslo bota bolo aktualizované",
+       "botpasswords-updated-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo aktualizované.",
+       "botpasswords-deleted-title": "Heslo bota bolo odstránené",
+       "botpasswords-deleted-body": "Heslo bota s názvom „$1“ patriaceho používateľovi „$2“ bolo odstránené.",
+       "botpasswords-newpassword": "Nové prihlasovacie heslo pre <strong>$1</strong> je <strong>$2</strong>. <em>Prosím, zaznačte si ho na použitie v budúcnosti.</em> <br> (Pre staré boty, ktoré vyžadujú, aby prihlasovacie meno bolo rovnaké ako prípadné používateľské meno môžu tiež použiť <strong>$3</strong> ako používateľské meno a <strong>$4</strong> ako heslo.)",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider nie je k dispozícii.",
+       "botpasswords-restriction-failed": "Obmedzenia hesla bota bránenia tomuto prihláseniu.",
+       "botpasswords-invalid-name": "Zadané používateľské meno neobsahuje oddeľovač hesla bota („$1“).",
+       "botpasswords-not-exist": "Používateľ „$1“ nemá heslo bota s názvom „$2“.",
        "resetpass_forbidden": "Heslá nie je možné zmeniť",
+       "resetpass_forbidden-reason": "Heslá nie je možné zmeniť: $1",
        "resetpass-no-info": "Aby ste mohli priamo pristupovať k tejto stránke, musíte sa prihlásiť.",
        "resetpass-submit-loggedin": "Zmeniť heslo",
        "resetpass-submit-cancel": "Zrušiť",
        "passwordreset-emailelement": "Používateľské meno: \n$1\n\nDočasné heslo:\n$2",
        "passwordreset-emailsentemail": "Pokiaľ je toto e-mailová adresa zaregistrovaná k vášmu účtu, bude na ňu zaslaný e-mail pre získanie nového hesla.",
        "passwordreset-emailsentusername": "Pokiaľ je príslušná mailová adresa zaregistrovaná, bude na ňu zaslaný e-mail s novým heslom.",
+       "passwordreset-emailsent-capture2": "{{PLURAL:$1|Email|Emaily}} na obnovenie hesla {{PLURAL:$1|bol odoslaný|boli odoslané}}. {{PLURAL:$1|Používateľské meno a heslo|Zoznam používateľských mien a hesiel}} je uvedený nižšie.",
        "changeemail": "Zmeniť alebo odstrániť e-mailovú adresu",
        "changeemail-header": "Vyplňte tento formulár, ak chcete zmeniť svoju emailovú adresu. Ak chcete odstrániť priradenie akejkoľvek emailovej adresy k vášmu účtu, nechajte pri odosielaní formulára emailovú adresu nevyplnenú",
        "changeemail-no-info": "Na prístup k tejto stránke musíte byť prihlásený.",
        "right-override-export-depth": "Exportovať stránky vrátane okdazovaných stránok do hĺbky 5 odkazov",
        "right-sendemail": "Posielať e-mail ostatným používateľom",
        "right-passwordreset": "Prezeranie e-mailov pre znovunastavovanie hesla",
+       "grant-generic": "balík práv „$1“",
+       "grant-group-page-interaction": "Interagovať so stránkami",
+       "grant-group-file-interaction": "Interagovať s multimédiami",
+       "grant-group-watchlist-interaction": "Interagovať s vašim zoznamom sledovaných stránok",
        "grant-group-email": "Poslať email",
+       "grant-group-high-volume": "Vykonávať činnosti vo veľkom objeme",
+       "grant-group-customization": "Nastavenie a prispôsobenie",
+       "grant-group-administration": "Vykonávať činnosti správcu",
+       "grant-group-private-information": "Pristupovať k osobným údajom o vás",
+       "grant-group-other": "Rozličné činnosti",
+       "grant-blockusers": "Blokovať a odblokovať používateľov",
+       "grant-createaccount": "Vytvárať účty",
+       "grant-createeditmovepage": "Vytvárať, upravovať a presúvať stránky",
+       "grant-delete": "Odstraňovať stránky, revízie a položky záznamu",
+       "grant-editinterface": "Upravovať menný priestor MediaWiki a používateľský CSS/JavaScript",
+       "grant-editmycssjs": "Upravovať váš používateľský CSS/JavaScript",
+       "grant-editmyoptions": "Upravovať nastavenia vášho používateľského účtu",
+       "grant-editmywatchlist": "Upravovať váš zoznam sledovaných stránok",
+       "grant-editpage": "Upravovať existujúce stránky",
+       "grant-editprotected": "Upravovať chránené stránky",
+       "grant-highvolume": "Úpravy vo veľkom objeme",
+       "grant-oversight": "Skrývať používateľov a potláčať revízie",
+       "grant-patrol": "Sledovať zmeny stránok",
+       "grant-privateinfo": "Pristupovať k súkromným informáciám",
+       "grant-protect": "Zapínať a vypínať ochranu stránok",
+       "grant-rollback": "Vracať zmeny stránok",
+       "grant-sendemail": "Posielať emaily ostatným používateľom",
+       "grant-uploadeditmovefile": "Nahrávať, nahradzovať a presúvať súbory",
+       "grant-uploadfile": "Nahrávať nové súbory",
+       "grant-basic": "Základné oprávnenia",
+       "grant-viewdeleted": "Zobrazovať vymazané súbory a stránky",
+       "grant-viewmywatchlist": "Zobrazovať váš zoznam sledovaných stránok",
        "newuserlogpage": "Záznam vytvorených používateľov",
        "newuserlogpagetext": "Toto je záznam naposledy vytvorených používateľských účtov.",
        "rightslog": "Záznam používateľských práv",
        "rightslogtext": "Toto je záznam zmien práv používateľa.",
        "action-read": "čítať túto stránku",
        "action-edit": "upravovať túto stránku",
-       "action-createpage": "vytvárať stránky",
+       "action-createpage": "vytvoriť túto stránku",
        "action-createtalk": "vytvoriť túto diskusnú stránku",
        "action-createaccount": "vytvoriť tento používateľský účet",
+       "action-autocreateaccount": "automaticky vytvoriť tento externý používateľský účet",
        "action-history": "zobraziť históriu tejto stránky",
        "action-minoredit": "označiť túto úpravu ako drobnú",
        "action-move": "presunúť túto stránku",
        "action-editmyprivateinfo": "upraviť vaše súkromné údaje",
        "action-editcontentmodel": "upraviť model obsahu stránky",
        "action-managechangetags": "vytvoriť a (de)aktivovať značky",
+       "action-applychangetags": "použiť značky spolu s vašimi zmenami",
+       "action-changetags": "pridávať a odstraňovať ľubovoľné značky na jednotlivé revízie a položky záznamu",
+       "action-deletechangetags": "odstraňovať značky z databázy",
+       "action-purge": "vyčistiť vyrovnávacou pamäť tejto stránky",
        "nchanges": "$1 {{PLURAL:$1|úprava|úpravy|úprav}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|od poslednej návštevy}}",
        "enhancedrc-history": "história",
        "recentchangeslinked-page": "Názov stránky:",
        "recentchangeslinked-to": "Zobraziť zmeny na stránkach, ''ktoré odkazujú na'' zadanú stránku",
        "recentchanges-page-added-to-category": "[[:$1]] zaradená do kategórie",
-       "recentchanges-page-added-to-category-bundled": "[[:$1]] a [[Special:WhatLinksHere/$1|{{PLURAL:$2|jedna ďalšia zaradené|$2 ďalšie zaradené|$2 ďalších zaradených}}]] do kategórie",
+       "recentchanges-page-added-to-category-bundled": "[[:$1]] zaradená do kategórie. [[Special:WhatLinksHere/$1|Táto stránka je vložená do iných stránok.]",
        "recentchanges-page-removed-from-category": "[[:$1]] vyradená z kategórie",
-       "recentchanges-page-removed-from-category-bundled": "[[:$1]] a {{PLURAL:$2|jedna ďalšia vyradené|$2 ďalšie vyradené|$2 ďalších vyradených}} z kategórie",
+       "recentchanges-page-removed-from-category-bundled": "[[:$1]] odstránená z kategórie. [[Special:WhatLinksHere/$1|Táto stránka je vložená do iných stránok.]",
        "autochange-username": "Automatická úprava MediaWiki",
        "upload": "Nahrať súbor",
        "uploadbtn": "Nahrať súbor",
        "file-thumbnail-no": "Názov súboru začína <strong>$1</strong>.\nZdá sa, že je to obrázok redukovanej veľkosti ''(náhľad)''.\nAk máte tento obrázok v plnom rozlíšení, nahrajte ho, inak prosím zmeňte názov.",
        "fileexists-forbidden": "Súbor s týmto názvom už existuje a nie je možné ho prepísať.\nAk si aj tak želáte nahrať svoj súbor, choďte prosím späť a nahrajte tento súbor pod iným názvom. [[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Súbor s týmto názvom už existuje v zdieľanom úložisku súborov.\nAk ho chcete aj napriek tomu nahrať, choďte prosím späť a použite iný názov. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Nahraný súbor je presný duplikát aktuálnej verzie súboru <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "Nahraný súbor je presný duplikát {{PLURAL:$2|staršej verzie|starších verzií}} súboru <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Tento súbor je duplikátom {{PLURAL:$1|nasledovného súboru|nasledovných súborov}}:",
        "file-deleted-duplicate": "Súbor zhodný s týmto súborom ([[:$1]]) už bol v minulosti zmazaný. Mali by ste skontrolovať históriu nahrávania tohto súboru predtým, než budete pokračovať v jeho nahrávaní.",
+       "file-deleted-duplicate-notitle": "Súbor rovnaký ako tento súbor už bol v minulosti odstránený a jeho názov bol potlačený.\nMali by ste sa spýtať niekoho s oprávnením prehliadať potlačené údaje súbor, aby preskúmal situáciu predtým, než ho nahráte.",
        "uploadwarning": "Varovanie pri nahrávaní",
        "uploadwarning-text": "Prosím, zmeňte popis súboru nižšie a skúste to znova.",
        "savefile": "Uložiť súbor",
        "uploaddisabledtext": "Nahrávanie súborov je vypnuté.",
        "php-uploaddisabledtext": "Nahrávanie PHP súborov je vypnuté. Prosím, skontrolujte nastavenie file_uploads.",
        "uploadscripted": "Tento súbor obsahuje kód HTML alebo skript, ktorý može byť chybne interpretovaný prehliadačom.",
+       "upload-scripted-pi-callback": "Nemožno nahrať súbor, ktorý obsahuje inštrukcie spracovania štýlu XML",
+       "uploaded-script-svg": "V nahranom súbore SVG bol nájdený skriptovateľný prvok „$1“.",
+       "uploaded-hostile-svg": "V elemente „style“ nahraného súboru SVG bolo nájdené nebezpečné CSS.",
+       "uploaded-event-handler-on-svg": "Nastavenie atribútov <code>$1=\"$2\"</code> na obsluhu udalostí v súboroch SVG nie je povolené.",
+       "uploaded-href-attribute-svg": "V súboroch SVG je pri atribútoch href povolené iba to, aby odkazovali na ciele http:// alebo https://, ale našiel sa odkaz <code>&lt;$1 $2=\"$3\"&gt;</code>.",
+       "uploaded-href-unsafe-target-svg": "Boli nájdené nebezpečné dáta: cieľ URI <code>&lt;$1 $2=\"$3\"&gt;</code> v nahranom súbore SVG",
        "uploadvirus": "Súbor obsahuje vírus! Podrobnosti: $1",
        "uploadjava": "Súbor je vo formáte ZIP, ktorý obsahuje Java súbor .class.\nNahrávanie súborov Java nie je povolené, pretože môžu spôsobiť obídenie bezpečnostných obmedzení.",
        "upload-source": "Zdrojový súbor",
        "upload-form-label-infoform-title": "Podrobnosti",
        "upload-form-label-infoform-name": "Meno",
        "upload-form-label-infoform-name-tooltip": "Jedinečný popis súboru, ktorý bude slúžiť ako názov súboru. Môžete použiť bežný jazyk s medzerami, ako aj znaky s diakritikou. Nezadávajte príponu súboru.",
+       "upload-form-label-infoform-description": "Popis",
+       "upload-form-label-usage-title": "Použitie",
+       "upload-form-label-usage-filename": "Názov súboru",
+       "upload-form-label-own-work": "Toto je moje vlastné dielo",
+       "upload-form-label-infoform-categories": "Kategórie",
+       "upload-form-label-infoform-date": "Dátum",
+       "upload-form-label-own-work-message-generic-local": "Potvrdzujem, že som nahrávam tento súbor v súlade s podmienkami služby a licenčnou politikou {{GRAMMAR:genitív|{{SITENAME}}}}.",
+       "upload-form-label-not-own-work-message-generic-local": "Ak tento súbor nie ste schopní nahrať v súlade s politikou {{GRAMMAR:genitív|{{SITENAME}}}}, prosím zatvorte toto dialógové okno a skúste použiť iný spôsob.",
+       "upload-form-label-not-own-work-local-generic-local": "Môžete tiež skúsiť [[Special:Upload|predvolenú nahrávaciu stránku]].",
+       "upload-form-label-own-work-message-generic-foreign": "Rozumiem, že nahrávam tento súbor do zdieľaného úložiska. Potvrdzujem, že pritom dodržiavam tamojšie podmienky služby a licenčné politiky.",
+       "upload-form-label-not-own-work-message-generic-foreign": "Ak tento súbor nie ste schopní nahrať v súlade s politikou zdieľaného úložiska, prosím zatvorte toto dialógové okno a skúste použiť iný spôsob.",
+       "upload-form-label-not-own-work-local-generic-foreign": "Môžete tiež skúsiť použiť [[Special:Upload|nahrávaciu stránku na {{GRAMMAR:genitív|{{SITENAME}}}}]] ak je v súlade s ich politikou možné tento súbor nahrať.",
        "backend-fail-stream": "$1 je názov súboru.",
        "backend-fail-backup": "Nebolo možné zálohovať súbor $1.",
        "backend-fail-notexists": "Súbor $1 neexistuje.",
        "backend-fail-read": "Nebolo možné prečítať súbor „$1“.",
        "backend-fail-create": "Nebolo možné zapísať súbor $1.",
        "backend-fail-maxsize": "Nie je možné zapísať súbor  $1  pretože je väčší ako  {{PLURAL:$2| jeden byte| $2  bajtov}}.",
-       "backend-fail-readonly": "Úložisko „$1“ je momentálne v režime len na čítanie. Udaný dôvod: „$2“",
+       "backend-fail-readonly": "Úložisko „$1“ je momentálne v režime len na čítanie. Udaný dôvod: „<em>$2</em>“",
        "backend-fail-synced": "Súbor „$1“ je v nekonzistentnom stave v rámci vnútorného úložiska",
        "backend-fail-connect": "Nepodarilo sa pripojiť k úložisku „$1“.",
        "backend-fail-internal": "Vyskytla sa neznáma chyba v úložisku „$1“.",
        "uploadstash-summary": "Táto stránka poskytuje prístup k súborom nahraným (alebo práve nahrávaným), ktoré zatiaľ nie sú zverejnené na wiki. Tieto súbory nevidí nikto iný okrem používateľa, ktorý ich nahral.",
        "uploadstash-clear": "Vymazať skrýšu nahraných súborov",
        "uploadstash-nofiles": "Nemáte žiadne súbory v skrýši nahraných súborov.",
-       "uploadstash-badtoken": "Vykonanie operácie sa nepodarilo, možno preto, že platnosť vašich prihlasovacích údajov vypršala. Skúste to znova.",
+       "uploadstash-badtoken": "Vykonanie operácie sa nepodarilo, možno preto, že platnosť vašich prihlasovacích údajov vypršala. Prosím, skúste to znova.",
        "uploadstash-errclear": "Vymazanie súborov bolo neúspešné.",
        "uploadstash-refresh": "Obnoviť zoznam súborov",
+       "uploadstash-thumbnail": "zobraziť náhľad",
+       "uploadstash-exception": "Načítaný súbor sa nepodarilo uložiť do skrýše ($1): „$2“.",
        "invalid-chunk-offset": "Neplatný posun bloku",
        "img-auth-accessdenied": "Prístup zamietnutý",
        "img-auth-nopathinfo": "Váš server nie je nastavený tak, aby poskytoval tieto informácie.\nMôže byť založený na CGI a nedokáže podporovať img_auth.\nPozri https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization.",
        "filerevert-submit": "Obnoviť",
        "filerevert-success": "'''[[Media:$1|$1]]''' bol obnovený na [$4 verziu z $2, $3].",
        "filerevert-badversion": "Neexistuje predchádzajúca lokálna verzia tohto súboru s požadovanou časovou značkou.",
+       "filerevert-identical": "Aktuálna verzia súboru už zodpovedá zadanej verzii.",
        "filedelete": "Zmazať $1",
        "filedelete-legend": "Zmazať súbor",
        "filedelete-intro": "Chystáte sa zmazať súbor '''[[Media:$1|$1]]''' spolu s celou jeho históriou.",
        "download": "stiahnuť",
        "unwatchedpages": "Nesledované stránky",
        "listredirects": "Zoznam presmerovaní",
+       "listduplicatedfiles": "Zoznam súborov s duplikátmi",
+       "listduplicatedfiles-summary": "Toto je zoznam súborov, u ktorých najnovšia verzia súboru je duplikát najnovšej verzie nejakého iného súboru. Berú sa do úvahy iba lokálne súbory.",
+       "listduplicatedfiles-entry": "[[:File:$1|$1]] má [[$3|{{PLURAL:$2|duplikát|$2 duplikáty|$2 duplikátov}}]].",
        "unusedtemplates": "Nepoužité šablóny",
        "unusedtemplatestext": "Táto stránka obsahuje zoznam všetkých stránok v mennom priestore {{ns:template}}:, ktoré nie sú vložené v žiadnej inej stránke. Pred zmazaním nezabudnite skontrolovať ostatné odkazy!",
        "unusedtemplateswlh": "iné odkazy",
        "doubleredirects": "Dvojité presmerovania",
        "doubleredirectstext": "Táto stránka obsahuje zoznam stránok, ktoré presmerovávajú na iné presmerovacie stránky.\nKaždý riadok obsahuje odkaz na prvé a druhé presmerovanie a tiež prvý riadok z textu na ktorý odkazuje druhé presmerovanie, ktoré zvyčajne odkazuje na „skutočný“ cieľ, na ktorý má odkazovať prvé presmerovanie.\n<del>Prečiarknuté</del> položky boli vyriešené.",
        "double-redirect-fixed-move": "Stránka [[$1]] bola presunutá.\nBola automaticky aktualizovaná a teraz presmerováva na [[$2]]",
-       "double-redirect-fixed-maintenance": "Opravuje sa dvojité presmerovanie z [[$1]] na [[$2]].",
+       "double-redirect-fixed-maintenance": "V rámci úlohy údržby sa automaticky sa opravuje dvojité presmerovanie z [[$1]] na [[$2]].",
        "double-redirect-fixer": "Korektor presmerovaní",
        "brokenredirects": "Pokazené presmerovania",
        "brokenredirectstext": "Nasledovné presmerovania odkazujú na neexistujúce stránky:",
        "wantedpages-badtitle": "Neplatný názov vo výsledkoch: $1",
        "wantedfiles": "Žiadané súbory",
        "wantedfiletext-cat": "Nasledovné súbory sa používajú, ale nie sú k dispozícii. Súbory z cudzích repozitárov môžu byť uvedené aj napriek tomu, že existujú. Takéto falošné poplachy budú <del>prečiarknuté</del>. Okrem toho stránky, ktoré obsahujú vložené súbory, ktoré nie sú k dispozícii sú uvedené na [[:$1]].",
+       "wantedfiletext-cat-noforeign": "Následujúce súbory sa používajú, ale neexistujú. Stránky, ktoré vkladajú neexistujúce súbory, sú naviac uvedené v [[:$1]].",
        "wantedfiletext-nocat": "Nasledovné súbory sa používajú, ale nie sú k dispozícii. Súbory z cudzích repozitárov môžu byť uvedené aj napriek tomu, že existujú. Takéto falošné poplachy budú <del>prečiarknuté</del>.",
+       "wantedfiletext-nocat-noforeign": "Následujúce súbory sa používajú, ale neexistujú.",
        "wantedtemplates": "Žiadané šablóny",
        "mostlinked": "Najčastejšie odkazované stránky",
        "mostlinkedcategories": "Najčastejšie odkazované kategórie",
        "nopagetext": "Cieľová stránka, ktorú ste uviedli neexistuje.",
        "pager-newer-n": "{{PLURAL:$1|1 novší|$1 novšie|$1 novších}}",
        "pager-older-n": "{{PLURAL:$1|1 starší|$1 staršie|$1 starších}}",
-       "suppress": "Dozor",
+       "suppress": "Potlačenie",
        "querypage-disabled": "Táto špeciálna stránka bola zakázaná z výkonnostných dôvodov.",
+       "apihelp": "Pomocník API",
+       "apihelp-no-such-module": "Modul „$1” nebol nájdený.",
        "apisandbox": "API pieskovisko",
+       "apisandbox-jsonly": "Na použitie pieskoviska API je nutný JavaScript.",
        "apisandbox-api-disabled": "API je na tejto stránke vypnuté.",
+       "apisandbox-intro": "Pomocou tejto stránky môžete experimentovať s <strong>API webovej služby MediaWiki</strong>.\nPodrobnosti využitia API nájdete v [[mw:API:Main page|jeho dokumentácii]]. Príklad: [https://www.mediawiki.org/wiki/API#A_simple_example získanie obsahu Hlavnej stránky]. Ďalšie príklady uvidíte vybraním operácie.\n\nUvedomte si, že napriek tomu, že ste na pieskovisku, môžu operácie vykonané na tejto stránke wiki zmeniť.",
        "apisandbox-fullscreen": "Rozbaliť panel",
        "apisandbox-unfullscreen": "Zobraziť stránku",
        "apisandbox-submit": "Odoslať dopyt",
        "apisandbox-reset": "Vyčistiť",
        "apisandbox-retry": "Skúsiť znova",
        "apisandbox-examples": "Príklady",
-       "apisandbox-results": "Výsledok",
+       "apisandbox-results": "Výsledky",
        "apisandbox-request-url-label": "URL požiadavky:",
        "booksources": "Knižné zdroje",
        "booksources-search-legend": "Vyhľadávať knižné zdroje",
        "booksources-text": "Nižšie je zoznam odkazov na iné stránky, ktoré predávajú nové a použité knihy a tiež môžu obsahovať ďalšie informácie o knihách, ktoré hľadáte:",
        "booksources-invalid-isbn": "Zdá sa, že dané ISBN nie je platné. Skontrolujte, či ste neurobili chybu pri kopírovaní z pôvodného zdroja.",
        "specialloguserlabel": "Pôvodca:",
-       "speciallogtitlelabel": "Cieľ (názov alebo používateľ):",
+       "speciallogtitlelabel": "Cieľ (názov alebo {{ns:user}}:Používateľské meno):",
        "log": "Záznamy",
        "logeventslist-submit": "Zobraziť",
        "all-logs-page": "Všetky verejné záznamy",
        "wlshowlast": "Zobraziť posledných $1 hodín $2 dní",
        "watchlist-hide": "Skryť",
        "watchlist-submit": "Zobraziť",
-       "wlshowtime": "Zobraziť posl.:",
+       "wlshowtime": "Zobrazené obdobie:",
        "wlshowhideminor": "drobné úpravy",
        "wlshowhidebots": "botov",
        "wlshowhideliu": "registrovaných",
        "exbeforeblank": "obsah pred vyčistením stránky bol: '$1'",
        "delete-confirm": "Zmazať „$1“",
        "delete-legend": "Zmazať",
-       "historywarning": "'''Upozornenie:''' Stránka, ktorú sa chystáte zmazať má históriu obsahujúcu približne $1 {{PLURAL:$1|revíziu|revízie|revízií}}:",
+       "historywarning": "<strong>Upozornenie:</strong> Stránka, ktorú sa chystáte zmazať má históriu obsahujúcu $1 {{PLURAL:$1|revíziu|revízie|revízií}}:",
        "historyaction-submit": "Zobraziť",
        "confirmdeletetext": "Chystáte sa trvalo zmazať z databázy stránku alebo obrázok spolu so všetkými jeho/jej predošlými verziami. Potvrďte, že máte v úmysle tak urobiť, že ste si vedomý následkov, a že to robíte v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].",
        "actioncomplete": "Úloha bola dokončená",
        "delete-toobig": "Táto stránka má veľkú históriu úprav, viac ako $1 {{PLURAL:$1|revíziu|revízie|revízií}}. Mazanie takýchto stránok bolo obmedzené, aby sa zabránilo náhodnému poškodeniu {{GRAMMAR:genitív|{{SITENAME}}}}.",
        "delete-warning-toobig": "Táto stránka má veľkú históriu úprav, viac ako $1 {{PLURAL:$1|revíziu|revízie|revízií}}. Jej zmazanie by mohlo narušiť databázové operácie {{GRAMMAR:genitív|{{SITENAME}}}}; postupujte opatrne.",
        "deleteprotected": "Túto stránku nemôžete vymazať, pretože je zamknutá.",
-       "deleting-backlinks-warning": "'''Upozornenie:''' Stránka, ktorú sa chystáte zmazať, je odkazovaná [[Special:WhatLinksHere/{{FULLPAGENAME}}|z iných stránok]], prípadne do nich vložená.",
+       "deleting-backlinks-warning": "<strong>Upozornenie:</strong> Na stránku, ktorú sa chystáte zmazať, odkazujú [[Special:WhatLinksHere/{{FULLPAGENAME}}|iné stránky]], prípadne je do nich vložená.",
        "rollback": "Vrátiť späť úpravy",
        "rollbacklink": "vrátiť",
        "rollbacklinkcount": "vrátenie $1 {{PLURAL:$1|úpravy|úprav}}",
        "rollback-success": "Úpravy $1 vrátené; obnovená posledná verzia od $2.",
        "sessionfailure-title": "Chyba relácie",
        "sessionfailure": "Zdá sa, že je problém s vašou prihlasovacou reláciou;\ntáto akcia bola zrušená ako prevencia proti zneužitiu relácie (session).\nProsím, stlačte \"naspäť\", obnovte stránku, z ktorej ste sa sem dostali, a skúste to znova.",
+       "changecontentmodel": "Zmeniť model obsahu stránky",
+       "changecontentmodel-legend": "Zmeniť model obsahu",
+       "changecontentmodel-title-label": "Názov stránky",
+       "changecontentmodel-model-label": "Nový model obsahu",
+       "changecontentmodel-reason-label": "Dôvod:",
+       "changecontentmodel-submit": "Zmeniť",
+       "changecontentmodel-success-title": "Model obsahu bol zmenený",
+       "changecontentmodel-success-text": "Typ obsahu [[:$1]] bol zmenený.",
+       "changecontentmodel-cannot-convert": "Obsah na [[:$1]] nie je možné konvertovať na typ $2.",
+       "changecontentmodel-nodirectediting": "Model obsahu $1 nepodporuje priame úpravy",
+       "changecontentmodel-emptymodels-title": "Žiadne modely obsahu nie sú k dispozícii",
+       "changecontentmodel-emptymodels-text": "Obsah na [[:$1]] nie je možné konvertovať na žiaden typ.",
        "log-name-contentmodel": "Záznam zmien modelov obsahu",
        "log-description-contentmodel": "Udalosti, týkajúce sa modelov obsahu stránok",
+       "logentry-contentmodel-new": "$1 {{GENDER:$2|vytvoril|vytvorila}} stránku $3 pomocou neštandardného modelu obsah „$5“",
+       "logentry-contentmodel-change": "$1 {{GENDER:$2|zmenil|zmenila}} model obsahu stránky $3 zo „$4“ na „$5“",
+       "logentry-contentmodel-change-revertlink": "vrátiť",
+       "logentry-contentmodel-change-revert": "vrátiť",
        "protectlogpage": "Záznam zamknutí",
        "protectlogtext": "Nižšie je zoznam zmien stavu ochrany stránok.\nMôžete si pozrieť aj [[Special:ProtectedPages|zoznam momentálne platných ochrán stránok]].",
        "protectedarticle": "zamyká „[[$1]]“",
        "protect-locked-blocked": "Nemôžete meniť úroveň ochrany, kým ste zablokovaný.\nTu sú aktuálne nastavenia stránky '''$1''':",
        "protect-locked-dblock": "Nie je možné zmeniť úroveň ochrany z dôvodu aktívneho zámku databázy.\nTu sú aktuálne nastavenia stránky '''$1''':",
        "protect-locked-access": "Váš účet nemá oprávnenie meniť úroveň ochrany stránky.\nTu sú aktuálne nastavenia stránky '''$1''':",
-       "protect-cascadeon": "Táto stránka je momentálne zamknutá, lebo je použitá na {{PLURAL:$1|nasledovnej stránke, ktorá má|nasledovných stránkach, ktoré majú}} zapnutú kaskádovú ochranu. Zmeny úrovne ochrany tejto stránky neovplyvnia kaskádovú ochranu.",
+       "protect-cascadeon": "Táto stránka je momentálne zamknutá, lebo je vložená v {{PLURAL:$1|nasledovnej stránke, ktorá má|nasledovných stránkach, ktoré majú}} zapnutú kaskádovú ochranu. Zmeny úrovne ochrany tejto stránky neovplyvnia kaskádovú ochranu.",
        "protect-default": "Povoliť všetkých používateľov",
        "protect-fallback": "Povoliť iba používateľov s oprávnením „$1“",
        "protect-level-autoconfirmed": "Povoliť iba používateľov s potvrdeným emailom",
        "undeletepagetext": "{{PLURAL:$1|Táto stránka bola zmazaná, ale je stále v archíve a\nmožno ju obnoviť|Tieto stránky boli zmazané, ale sú stále v archíve a\nmožno ich obnoviť}}. Archív môže byť pravidelne vyprázdnený.",
        "undelete-fieldset-title": "Obnoviť revízie",
        "undeleteextrahelp": "Ak chcete obnoviť celú stránku, nechajte všetky zaškrtávacie polia nezaškrtnuté a kliknite na '''''{{int:undeletebtn}}'''''.\nAk chcete vykonať selektívnu obnovu, zašktrnite polia zodpovedajúce revíziám, ktoré sa majú obnoviť a kliknite na '''''{{int:undeletebtn}}'''''.",
-       "undeleterevisions": "$1 {{PLURAL:verzia je archivovaná|verzie sú archivované|verzií je archivovaných}}",
+       "undeleterevisions": "$1 {{PLURAL:verzia je zmazaná|verzie sú zmazané|verzií je zmazaných}}",
        "undeletehistory": "Ak obnovíte túto stránku, obnovia sa aj všetky predchádzajúce verzie do histórie predchádzajúcich verzií.\nAk bola od zmazania vytvorená nová stránka s rovnakým názvom, obnovené revízie sa objavia v histórii stránky.",
        "undeleterevdel": "Obnovenie sa nevykoná, ak by malo mať za dôsledok čiastočné zmazanie poslednej revízie. V takých prípadoch musíte odznačiť alebo odkryť najnovšie zmazané revízie.",
        "undeletehistorynoadmin": "Táto stránka bola zmazaná. Dôvod zmazania je zobrazený dolu v zhrnutí spolu s podrobnosťami o používateľoch, ktorí túto stránku upravovali pred zmazaním. Samotný text týchto zmazaných revízií je prístupný iba správcom.",
        "undelete-revision": "Zmazaná revízia $1 ($4, $5) od $3:",
        "undeleterevision-missing": "Neplatná alebo chýbajúca revízia. Zrejme ste použili zlý odkaz alebo revízia bola obnovená alebo odstránená z histórie.",
+       "undeleterevision-duplicate-revid": "{{PLURAL:$1|Jednu revíziu|$1 revízií}} nebolo možné obnoviť, pretože {{PLURAL:$1|jej|ich}} <code>rev_id</code> sa už požíval.",
        "undelete-nodiff": "Nebola nájdená žiadna predošlá revízia.",
        "undeletebtn": "Obnoviť!",
        "undeletelink": "zobraziť/obnoviť",
        "undeletedrevisions": "{{PLURAL:$1|jedna verzia bola obnovená|$1 verzie boli obnovené|$1 verzií bolo obnovených}}",
        "undeletedrevisions-files": "{{PLURAL:$1|Jedna revízia|$1 revízie|$1 revízií}} a {{PLURAL:$2|jeden súbor bol obnovený|$2 súbory boli obnovené|$2 súborov bolo obnovených}}",
        "undeletedfiles": "{{PLURAL:$1|Jeden súbor bol obnovený|$1 súbory boli obnovené|$1 súborov bolo obnovených}}",
-       "cannotundelete": "Obnovenie sa nepodarilo:\n$1",
+       "cannotundelete": "Časť alebo celé obnovenie sa nepodarilo:\n$1",
        "undeletedpage": "'''$1 bol obnovený'''\n\nZoznam posledných mazaní a obnovení nájdete v [[Special:Log/delete|Zázname mazaní]].",
        "undelete-header": "Pozri nedávno zmazané stránky v [[Special:Log/delete|zázname mazaní]].",
        "undelete-search-title": "Hľadať zmazané stránky",
        "sp-contributions-newbies-sub": "Príspevky nováčikov",
        "sp-contributions-newbies-title": "Príspevky nových používateľov",
        "sp-contributions-blocklog": "záznam blokovaní",
-       "sp-contributions-suppresslog": "utajené príspevky redaktora",
-       "sp-contributions-deleted": "zmazané príspevky používateľa",
+       "sp-contributions-suppresslog": "utajené príspevky {{GENDER:$1|používateľa|používateľky}}",
+       "sp-contributions-deleted": "zmazané príspevky {{GENDER:$1|používateľa|používateľky}}",
        "sp-contributions-uploads": "nahrané súbory",
        "sp-contributions-logs": "záznamy",
        "sp-contributions-talk": "diskusia",
        "sp-contributions-username": "IP adresa alebo meno používateľa:",
        "sp-contributions-toponly": "Zobraziť len posledné revízie",
        "sp-contributions-newonly": "Zobraziť len založenia stránok",
+       "sp-contributions-hideminor": "Skryť drobné úpravy",
        "sp-contributions-submit": "Hľadať",
        "whatlinkshere": "Odkazy na túto stránku",
        "whatlinkshere-title": "Stránky odkazujúce na „$1“",
        "whatlinkshere-hideredirs": "$1 presmerovania",
        "whatlinkshere-hidetrans": "$1 transklúzie",
        "whatlinkshere-hidelinks": "$1 odkazy",
-       "whatlinkshere-hideimages": "$1 odkazov na súbor",
+       "whatlinkshere-hideimages": "$1 {{PLURAL:$1|odkaz|odkazy|odkazov}} na súbor",
        "whatlinkshere-filters": "Filtre",
        "whatlinkshere-submit": "Zobraziť",
        "autoblockid": "Autoblokovanie #$1",
        "block": "Zablokovať používateľa",
        "unblock": "Odblokovať používateľa",
-       "blockip": "Zablokovať používateľa",
+       "blockip": "Zablokovať {{GENDER:$1|používateľa|používateľku}}",
        "blockip-legend": "Zablokovať používateľa",
-       "blockiptext": "Použite tento formulár na zablokovanie možnosti zápisov uskutočnených z konkrétnej IP adresy alebo od používateľa.\nMali by ste to urobiť len v prípade bránenia vandalizmu a v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].\nNižšie uveďte konkrétny dôvod (napríklad uveďte konkrétne stránky, ktoré padli za obeť vandalizmu).",
+       "blockiptext": "Tento formulár použite na zablokovanie možnosti zápisu z konkrétnej IP adresy alebo od konkrétneho používateľa.\nMali by ste to urobiť len na zabránenie vandalizmu a v súlade so [[{{MediaWiki:Policy-url}}|zásadami a smernicami {{GRAMMAR:genitív|{{SITENAME}}}}]].\nNižšie uveďte konkrétny dôvod (napríklad uveďte konkrétne stránky, ktoré padli za obeť vandalizmu).\nRozsahy IP adreies môžete blokovať pomocou syntaxe [https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing CIDR]; najväčší povolený rozsah je /$1 v prípade IPv4 a /$2 v prípade IPv6.",
        "ipaddressorusername": "IP adresa/meno používateľa:",
        "ipbexpiry": "Ukončenie:",
        "ipbreason": "Dôvod:",
        "ipb-unblock": "Odblokovať používateľa alebo IP adresu",
        "ipb-blocklist": "Zobraziť existujúce blokovania",
        "ipb-blocklist-contribs": "Príspevky {{GENDER:redaktora|redaktorky}} $1",
+       "ipb-blocklist-duration-left": "zostáva $1",
        "unblockip": "Odblokovať používateľa",
        "unblockiptext": "Použite tento formulár na obnovenie možnosti zápisov\nz/od momentálne zablokovanej IP adresy/používateľa.",
        "ipusubmit": "Zrušiť toto blokovanie",
        "block-log-flags-hiddenname": "používateľské meno skryté",
        "range_block_disabled": "Možnosť správcov vytvárať rozsah zablokovaní je vypnutá.",
        "ipb_expiry_invalid": "Neplatný čas ukončenia.",
+       "ipb_expiry_old": "Čas uplynutia je v minulosti.",
        "ipb_expiry_temp": "Blokovania skrytých používateľských mien by mali byť trvalé.",
        "ipb_hide_invalid": "Nepodarilo sa potlačiť tento účet; má viac ako {{PLURAL:$1|jednu úpravu|$1 úpravy|$1 úprav}}.",
        "ipb_already_blocked": "„$1“ je už zablokovaný",
        "lockdbsuccesstext": "Databáza bola zamknutá.<br />\nNezabudnite po dokončení údržby [[Special:UnlockDB|odstrániť zámok]].",
        "unlockdbsuccesstext": "Databáza {{GRAMMAR:genitív|{{SITENAME}}}} bola odomknutá.",
        "lockfilenotwritable": "Súbor, ktorý zamyká databázu nie je zapisovateľný. Aby bolo možné zamknúť či odomknúť databázu, je potrebné, aby doňho mohol web server zapisovať.",
+       "databaselocked": "Databáza už je zamknutá.",
        "databasenotlocked": "Databáza nie je zamknutá.",
        "lockedbyandtime": "({{GENDER:$1|$1}}, $2 $3 )",
        "move-page": "Presunúť $1",
        "move-page-legend": "Presunúť stránku",
        "movepagetext": "Pomocou tohto formulára premenujete stránku a premiestnite všetky jej predchádzajúce verzie pod zadaný nový názov.\nStarý názov sa stane presmerovacou stránkou na nový názov.\nMôžete automaticky aktualizovať odkazy odkazujúce na pôvodný názov.\nAk sa rozhodnete túto možnosť nevyužiť, ubezpečte sa, že ste skontrolovali\nvýskyt [[Special:DoubleRedirects|dvojitých]] a [[Special:BrokenRedirects|pokazených]] presmerovaní.\nVy ste zodpovedný za to, aby odkazy naďalej ukazovali tam, kam majú.\n\nUvedomte si, že stránka sa <strong>nepremiestni</strong>, ak pod novým názvom už stránka existuje.\nToto neplatí iba ak je stránka prázdna alebo presmerovacia a nemá žiadne predchádzajúce verzie.\nTo znamená, že môžete premenovať stránku späť na názov, ktorý mala pred premenovaním, ak ste sa pomýlili, a že nemôžete prepísať\nexistujúcu stránku.\n\n<strong>UPOZORNENIE!</strong>\nToto môže byť drastická a nečakaná zmena pre populárnu stránku;\nubezpečte sa preto, skôr ako budete pokračovať, že chápete dôsledky svojho činu.",
        "movepagetext-noredirectfixer": "Pomocou tohto formulára premenujete stránku a premiestnite všetky jej predchádzajúce verzie pod zadaný nový názov.\nStarý názov sa stane presmerovacou stránkou na nový názov.\nUbezpečte sa, že ste skontrolovali výskyt [[Special:DoubleRedirects|dvojitých]] a [[Special:BrokenRedirects|pokazených]] presmerovaní.\nVy ste zodpovedný za to, aby odkazy naďalej ukazovali tam, kam majú.\n\nUvedomte si, že stránka sa <strong>nepremiestni</strong>, ak pod novým názvom už stránka existuje.\nToto neplatí iba ak je stránka prázdna alebo presmerovacia a nemá žiadne predchádzajúce verzie.\nTo znamená, že môžete premenovať stránku späť na názov, ktorý mala pred premenovaním, ak ste sa pomýlili, a že nemôžete prepísať\nexistujúcu stránku.\n\n<strong>UPOZORNENIE!</strong>\nToto môže byť drastická a nečakaná zmena pre populárnu stránku;\nubezpečte sa preto, skôr ako budete pokračovať, že chápete dôsledky svojho činu.",
-       "movepagetalktext": "Príslušná diskusná stránka (ak existuje) bude premiestnená spolu so samotnou stránkou; '''nestane sa tak, iba ak:'''\n*už existuje Diskusná stránka pod týmto novým menom, alebo\n*nezaškrtnete nižšie sa nachádzajúci textový rámček.\n\nV takých prípadoch budete musieť, ak si to želáte, premiestniť alebo zlúčiť stránku ručne.",
+       "movepagetalktext": "Ak zaškrtnete toto pole, príslušná diskusná stránka (ak existuje) bude automaticky premiestnená na nový názov; nestane sa tak iba ak už pod týmto novým menom existuje neprázdna Diskusná stránka.\n\nV takom prípade budete musieť, ak si to želáte, premiestniť alebo zlúčiť stránku ručne.",
        "moveuserpage-warning": "'''Upozornenie:''' Chystáte sa presunúť používateľskú stránku. Pamätajte, že týmto presuniete iba stránku a používateľ ''nebude'' premenovaný.",
        "movecategorypage-warning": "<strong>Upozornenie:</strong> Chystáte sa presunúť stránku kategórie. Uvedomte si, že presunutá bude iba táto stránka a že žiadne stránky v pôvodnej kategórii <em>nebudú</em> do novej kategórie automaticky preradené.",
        "movenologintext": "Musíte byť registrovaný používateľ a [[Special:UserLogin|prihlásený]], aby ste mohli presunúť stránku.",
        "cant-move-to-user-page": "Nemáte oprávnenie presunúť stránku na stránku používateľa (iba na podstránku používateľa).",
        "cant-move-category-page": "Nemáte oprávnenie presúvať stránky kategórií.",
        "cant-move-to-category-page": "Nemáte oprávnenie presunúť stránku na stránku kategórie.",
-       "newtitle": "Na nový názov:",
+       "newtitle": "Nový názov:",
        "move-watch": "Sledovať túto stránku",
        "movepagebtn": "Presunúť stránku",
        "pagemovedsub": "Presun bol úspešný",
        "movenosubpage": "Táto stránka nemá podstránky.",
        "movereason": "Dôvod:",
        "revertmove": "obnoviť",
-       "delete_and_move_text": "==Je potrebné zmazať stránku==\n\nCieľová stránka „[[:$1]]“ už existuje. Chcete ho vymazať a vytvoriť tak priestor pre presun?",
+       "delete_and_move_text": "Cieľová stránka „[[:$1]]“ už existuje.\nChcete ju vymazať a vytvoriť tak priestor na presun?",
        "delete_and_move_confirm": "Áno, zmaž stránku",
        "delete_and_move_reason": "Vymazané, aby sa umožnil presun z „[[$1]]“",
        "selfmove": "Zdrojový a cieľový názov sú rovnaké; nemožno presunúť stránku na seba samú.",
        "move-leave-redirect": "Zanechať presmerovanie",
        "protectedpagemovewarning": "'''Upozornenie:''' Táto stránka bola zamknutá, aby ju mohli presunúť iba používatelia s oprávnením správcu. Dolu je pre informáciu posledná položka zo záznamu:",
        "semiprotectedpagemovewarning": "'''Poznámka:''' Táto stránka bola zamknutá, aby ju mohli presunúť iba zaregistrovaní používatelia. Dolu je pre informáciu posledná položka zo záznamu:",
-       "move-over-sharedrepo": "== Súbor existuje ==\n[[:$1]] existuje v zdieľanom úložisku. Presunutím súboru na tento názov prekryjete zdieľaný súbor.",
+       "move-over-sharedrepo": "[[:$1]] existuje v zdieľanom úložisku. Presunutím súboru na tento názov prekryjete zdieľaný súbor.",
        "file-exists-sharedrepo": "Názov súboru, ktorý ste zvolili sa už používa na zdieľanom úložisku.\nProsím, zvoľte iný názov.",
        "export": "Exportovať stránky",
        "exporttext": "Môžete exportovať text a históriu úprav konkrétnej\nstránky alebo množiny stránok do XML; tieto môžu byť potom importované do inej\nwiki používajúceho MediaWiki softvér pomocou stránky Special:Import.\n\nPre export stránok zadajte názvy do tohto poľa, jeden názov na riadok, a zvoľte, či chcete iba súčasnú verziu s informáciou o poslednej úprave alebo aj všetky staršie verzie s históriou úprav.\n\nV druhom prípade môžete tiež použiť odkaz, napr. [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] pre stránku [[{{MediaWiki:Mainpage}}]].",
        "export-download": "Ponúknuť uloženie ako súbor",
        "export-templates": "Vrátane šablón",
        "export-pagelinks": "Vrátane odkazovaných stránok do hĺbky:",
+       "export-manual": "Pridať stránky ručne:",
        "allmessages": "Všetky systémové správy",
        "allmessagesname": "Názov",
        "allmessagesdefault": "štandardný text",
        "thumbnail_image-missing": "Zdá sa, že súbor chýba: $1",
        "thumbnail_image-failure-limit": "V poslednej dobe došlo k nejmenej $1 pokusom o vygenerovanie tohoto náhľadu. Skúste to prosím neskôr.",
        "import": "Import stránok",
-       "importinterwiki": "Transwiki import",
-       "import-interwiki-text": "Zvoľte wiki a názov stránky, ktorá sa má importovať.\nDátumy revízií a mená používateľov budú zachované.\nVšetky transwiki importy sa zaznamenávajú v [[Special:Log/import|Zázname importov]].",
+       "importinterwiki": "Importovať z inej wiki",
+       "import-interwiki-text": "Zvoľte wiki a názov stránky, ktorá sa má importovať.\nDátumy revízií a mená používateľov budú zachované.\nVšetky importy z iných sa zaznamenávajú v [[Special:Log/import|Zázname importov]].",
        "import-interwiki-sourcewiki": "Zdrojová wiki:",
        "import-interwiki-sourcepage": "Zdrojová stránka:",
        "import-interwiki-history": "Skopírovať všetky historické revízie tejto stránky",
        "import-interwiki-templates": "Vložiť všetky šablóny",
        "import-interwiki-submit": "Importovať",
+       "import-mapping-default": "Importovať na predvolené umiestnenia",
+       "import-mapping-namespace": "Importovať do menného priestoru:",
+       "import-mapping-subpage": "Importovať ako podstránky nasledujúcej stránky:",
        "import-upload-filename": "Názov súboru:",
        "import-comment": "komentár:",
        "importtext": "Prosím, exportujte súbor zo zdrojovej wiki použitím [[Special:Export|nástroja na export]].\nUložte ho na svoj disk a nahrajte sem.",
        "importcantopen": "Nedal sa otvoriť súbor importu",
        "importbadinterwiki": "Zlý interwiki odkaz",
        "importsuccess": "Import dokončený!",
-       "importnosources": "Neboli definované žiadne zdroje pre transwiki import a priame nahranie histórie je vypnuté.",
+       "importnosources": "Neboli definované žiadne wiki, z ktorých sa má importovať a priame nahranie histórie je vypnuté.",
        "importnofile": "Nebol nahraný import súbor.",
        "importuploaderrorsize": "Nahranie alebo import súboru zlyhal. Súbor je väčší ako maximálna povolená veľkosť.",
        "importuploaderrorpartial": "Nahranie alebo import súboru zlyhal. Súbor bol nahraný iba čiastočne.",
        "import-nonewrevisions": "Žiadne revízie neboli importované (buď už boli všetky  importované skôr, alebo boli preskočené kvôli chybám).",
        "xml-error-string": "$1 na riadku $2, stĺpec $3 (bajt $4): $5",
        "import-upload": "Nahrať XML údaje",
-       "import-token-mismatch": "Strata údajov relácie. Prosím, skúste to znova.",
+       "import-token-mismatch": "Strata údajov relácie.\n\nJe možné, že ste boli odhlásení. <strong>Prosím, overte, či ste ešte prihlásení a skúste to znova</strong>.\nAk to stále nefunguje, skúste [[Special:UserLogout|sa odhlásiť]] a opäť prihlásiť a skontrolujte, či váš prehliadač povoľuje cookies z týchto stránok.",
        "import-invalid-interwiki": "Nie je možné importovať zo zadanej wiki.",
        "import-error-edit": "Stránka „$1“ nebola importovaná, pretože nemáte oprávnenie na jej úpravu.",
        "import-error-create": "Stránka „$1“ nebola importovaná, pretože nemáte oprávnenie na jej vytvorenie.",
-       "import-error-interwiki": "Stránka „$1“ nie je importovaná, pretože jej názov je vyhradený pre externé odkazy (interwiki).",
-       "import-error-special": "Stránka „$1“ nie je importovaná, pretože patrí do špeciálneho menného priestoru, ktorý nepovoľuje stránky.",
-       "import-error-invalid": "Stránka „$1“ nie je importovaná, pretože jej názov je neplatný.",
+       "import-error-interwiki": "Stránka „$1“ nebola importovaná, pretože jej názov je vyhradený pre externé odkazy (interwiki).",
+       "import-error-special": "Stránka „$1“ nebola importovaná, pretože patrí do špeciálneho menného priestoru, ktorý nepovoľuje stránky.",
+       "import-error-invalid": "Stránka „$1“ nebola importovaná, pretože názov, na ktorý by bola importovaná je na tejto wiki neplatný.",
        "import-error-unserialize": "Nepodarilo sa deserializovať revíziu $2 stránky „$1“. Revízia mala používať model obsahu $3 serializovaný ako $4.",
        "import-error-bad-location": "Revíziu $2 s modelom obsahu $3 nie je možné uložiť na \"$1\" na tejto wiki. Takýto model obsahu tu nie je podporovaný.",
        "import-options-wrong": "{{PLURAL:$2|Nesprávna voľba|Nesprávne voľby}}: <nowiki>$1</nowiki>",
        "import-rootpage-nosubpage": "Menný priestor „$1“ koreňovej stránky nepodporuje podstránky.",
        "importlogpage": "Záznam importov",
        "importlogpagetext": "Administratívny import stránok vrátane histórie úprav z iných wiki.",
-       "import-logentry-upload-detail": "$1 {{PLURAL:$1|revízia|revízie|revízií}}",
-       "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|revízia|revízie|revízií}} z $2",
+       "import-logentry-upload-detail": "{{PLURAL:$1|importovaná $1 revízia|importované $1 revízie|importovaných $1 revízií}}",
+       "import-logentry-interwiki-detail": "{{PLURAL:$1|importovaná $1 revízia|importované $1 revízie|importovaných $1 revízií}} z $2",
        "javascripttest": "Testovanie JavaScriptu",
        "javascripttest-pagetext-unknownaction": "Neznáma akcia: „$1“.",
        "javascripttest-qunit-intro": "Pozri [$1 dokumentácia testovania] na mediawiki.org.",
        "tooltip-ca-nstab-category": "Zobraziť stránku s kategóriami",
        "tooltip-minoredit": "Označiť túto úpravu ako drobnú",
        "tooltip-save": "Uložiť vaše úpravy",
+       "tooltip-publish": "Zverejniť vaše zmeny",
        "tooltip-preview": "Náhľad úprav, prosím použite pred uložením!",
        "tooltip-diff": "Zobraziť, aké zmeny ste urobili v texte.",
        "tooltip-compareselectedversions": "Zobraziť rozdiely medzi dvomi zvolenými verziami tejto stránky.",
        "pageinfo-article-id": "ID stránky",
        "pageinfo-language": "Jazyk obsahu stránky",
        "pageinfo-content-model": "Model obsahu stránky",
+       "pageinfo-content-model-change": "zmeniť",
        "pageinfo-robot-policy": "Indexovanie robotmi",
        "pageinfo-robot-index": "Povolené",
        "pageinfo-robot-noindex": "Nepovolené",
        "exif-compression-4": "CCITT Group 4 faxové kódovanie",
        "exif-copyrighted-true": "Chránené autorským právom",
        "exif-copyrighted-false": "Príznak ochrany autorským právom nenastavený",
+       "exif-photometricinterpretation-1": "Čierna a biela (čierna je 0)",
        "exif-unknowndate": "Neznámy dátum",
        "exif-orientation-1": "Normálna",
        "exif-orientation-2": "Horizontálne prevrátená",
        "confirmemail_body_set": "Niekto, pravdepodobne vy, z IP adresy $1\nnastavil e-mailovú adresu účtu „$2“ na túto adresu na {{GRAMMAR:genitív|{{SITENAME}}}}.\n\nAk chcete potvrdiť, že tento účet skutočne patrí vám a aktivovať\ne-mailové funkcie na {{GRAMMAR:genitív|{{SITENAME}}}}, otvorte tento odkaz vo vašom prehliadači:\n\n$3\n\nAk účet nie je *nepatrí* patrí k vám, nasledujte tento odkaz,\nktorý zruší potvrdenie e-mailovej adresy:\n\n$5\n\nPlatnosť tohto potvrdzovacieho kódu vyprší $4.",
        "confirmemail_invalidated": "Potvrdenie emailovej adresy bolo zrušené",
        "invalidateemail": "Zrušiť potvrdenie emailovej adresy",
+       "notificationemail_subject_changed": "Email zaregistrovaný na {{GRAMMAR:lokál|{{SITENAME}}}} bol zmenený",
+       "notificationemail_subject_removed": "Email zaregistrovaný na {{GRAMMAR:lokál|{{SITENAME}}}} bol odstránený",
+       "notificationemail_body_changed": "Niekoho, pravdepodobne vy, z IP adresy $1, zmenil na {{GRAMMAR:lokál|{{SITENAME}}}} emailovú adresu účtu „$2“ na „$3“.\n\nAk ste to neboli vy, čo najskôr sa obráťte na správcu {{GRAMMAR:akuzatív|{{SITENAME}}}}.",
+       "notificationemail_body_removed": "Niekoho, pravdepodobne vy, z IP adresy $1, odstránil na {{GRAMMAR:lokál|{{SITENAME}}}} emailovú adresu účtu „$2“.\n\nAk ste to neboli vy, čo najskôr sa obráťte na správcu {{GRAMMAR:akuzatív|{{SITENAME}}}}.",
        "scarytranscludedisabled": "[Transklúzia interwiki je vypnutá]",
        "scarytranscludefailed": "[Nepodarilo sa priniesť šablónu pre $1]",
        "scarytranscludefailed-httpstatus": "[Stiahnutie šablóny zlyhalo pre $1: HTTP $2]",
        "scarytranscludetoolong": "[URL je príliš dlhé]",
        "deletedwhileediting": "'''Upozornenie''': Táto stránka bola zmazaná potom ako ste začali s jej úpravami!",
-       "confirmrecreate": "Používateľ [[User:$1|$1]] ([[User talk:$1|diskusia]]) zmazal túto stránku potom, ako ste ju začali upravovať, s odôvodnením:\n: ''$2''\nProsím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
-       "confirmrecreate-noreason": "Používateľ [[User:$1|$1]] ([[User talk:$1|diskusia]]) zmazal túto stránku potom, ako ste ju začali upravovať. Prosím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
+       "confirmrecreate": "{{GENDER:$1|Používateľ|Používateľka}} [[User:$1|$1]] ([[User talk:$1|diskusia]]) {{GENDER:$1|zmazal|zmazala}} túto stránku potom, ako ste ju začali upravovať, s odôvodnením:\n: <em>$2</em>\nProsím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
+       "confirmrecreate-noreason": "{{GENDER:$1|Používateľ|Používateľka}} [[User:$1|$1]] ([[User talk:$1|diskusia]]) {{GENDER:$1|zmazal|zmazala}} túto stránku potom, ako ste ju začali upravovať. Prosím, potvrďte, že túto stránku chcete skutočne znovu vytvoriť.",
        "recreate": "Znova vytvoriť",
        "confirm_purge_button": "OK",
        "confirm-purge-top": "Vyčistiť vyrovnávaciu pamäť (cache) tejto stránky?",
        "confirm-watch-top": "Pridať túto stránku do vášho zoznamu sledovaných?",
        "confirm-unwatch-button": "OK",
        "confirm-unwatch-top": "Odstrániť túto stránku z vášho zoznamu sledovaných?",
+       "confirm-rollback-button": "OK",
+       "confirm-rollback-top": "Vrátiť úpravy na tejto stránke?",
        "quotation-marks": "„$1“",
        "imgmultipageprev": "&larr; predošlá stránka",
        "imgmultipagenext": "ďalšia stránka &rarr;",
        "watchlistedit-raw-done": "Váš zoznam sledovaných stránok bol aktualizovaný.",
        "watchlistedit-raw-added": "{{PLURAL:$1|Jedna položka bola pridaná|$1 položky boli pridané|$1 položiek bolo pridaných}}:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|Jedna položka bola odstránená|$1 položky boli odstránené|$1 položiek bolo odstránených}}:",
-       "watchlistedit-clear-title": "Vyprázdnenie zoznamu sledovaných stránok",
+       "watchlistedit-clear-title": "Vyprázdniť zoznam sledovaných stránok",
        "watchlistedit-clear-legend": "Vyprázdniť zoznam sledovaných stránok",
        "watchlistedit-clear-explain": "Z vášho zoznamu sledovaných stránok budú odstránené všetky názvy",
        "watchlistedit-clear-titles": "Názvy:",
        "timezone-local": "miestny čas",
        "duplicate-defaultsort": "Upozornenie: DEFAULTSORT s triediacim kľúčom „$2“ prepisuje vyššie nastavenú hodnotu „$1“.",
        "duplicate-displaytitle": "<strong>Upozornenie:</strong> Predchádzajúci titulok (DISPLAYTITLE) „$1“ je nahradený titulkom „$2“.",
+       "restricted-displaytitle": "<strong>Upozornenie:</strong> Zobrazovaný názov „$1“ bol ignorovaný pretože sa nezhoduje so skutočným názvom stránky.",
        "invalid-indicator-name": "<strong>Chyba:</strong> Atribút <code>name</code> indikátoru stavu stránky nesmie byť prázdny.",
        "version": "Verzia",
        "version-extensions": "Nainštalované rozšírenia",
        "version-ext-colheader-description": "Popis",
        "version-ext-colheader-credits": "Autori",
        "version-license-title": "Licencia pre $1",
+       "version-license-not-found": "Nenašli sa žiadne podrobné licenčné informácie k tomuto rozšíreniu.",
        "version-poweredby-credits": "Táto wiki beží na '''[https://www.mediawiki.org/ MediaWiki]''', copyright © 2001-$1 $2.",
        "version-poweredby-others": "ďalší",
        "version-poweredby-translators": "prekladatelia na translatewiki.net",
        "redirect-page": "ID stránky",
        "redirect-revision": "Revíziu stránky",
        "redirect-file": "Názov súboru",
+       "redirect-logid": "ID záznamu",
        "redirect-not-exists": "Hodnota nebola nájdená",
        "fileduplicatesearch": "Hľadať duplicitné súbory",
        "fileduplicatesearch-summary": "Hľadanie duplicitných súborov na základe ich haš hodnôt.",
        "tag-filter": "Filter [[Special:Tags|značiek]]:",
        "tag-filter-submit": "Filter",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Značka|Značky}}]]: $2)",
+       "tag-mw-contentmodelchange": "zmena modelu obsahu",
+       "tag-mw-contentmodelchange-description": "Úpravy, ktoré [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel menia model obsahu] stránky",
        "tags-title": "Značky",
        "tags-intro": "Táto stránka obsahuje zoznam a význam značiek, ktorými môže softvér označovať jednotlivé úpravy.",
        "tags-tag": "Názov značky",
        "tags-actions-header": "Akcie",
        "tags-active-yes": "Áno",
        "tags-active-no": "Nie",
+       "tags-source-extension": "Definované softvérom",
+       "tags-source-none": "Už sa nepoužíva",
        "tags-edit": "upraviť",
+       "tags-delete": "zmazať",
+       "tags-activate": "aktivovať",
+       "tags-deactivate": "deaktivovať",
        "tags-hitcount": "$1 {{PLURAL:$1|úprava|úpravy|úprav}}",
+       "tags-manage-no-permission": "Nemáte oprávnenie spravovať značky zmien.",
+       "tags-manage-blocked": "Nemôžete spravovať značky, pokým ste {{GENDER:|zablokovaný|zablokovaná}}.",
+       "tags-create-heading": "Vytvoriť novú značku",
+       "tags-create-explanation": "Novo vytvorené značky sú implicitne k dispozícii používateľom a botom.",
+       "tags-create-tag-name": "Názov stránky:",
+       "tags-create-reason": "Dôvod:",
+       "tags-create-submit": "Vytvoriť",
+       "tags-create-no-name": "Musíte zadať názov značky.",
+       "tags-create-invalid-chars": "Názvy značiek nesmú obsahovať čiarky (<code>,</code>) ani lomky (<code>/</code>).",
+       "tags-create-invalid-title-chars": "Názvy značiek nesmú obsahovať znaky, ktoré nemožno použiť v názvoch stránok.",
+       "tags-create-already-exists": "Značka „$1“ už existuje",
+       "tags-create-warnings-above": "Pri pokuse vytvoriť značku „$1“ {{PLURAL:$2|bolo zistené následujúce upozornenie|boli zistené následujúce upozornenia}}:",
+       "tags-create-warnings-below": "Chcete napriek tomu značku vytvoriť?",
+       "tags-delete-title": "Zmazať značku",
+       "tags-delete-explanation-initial": "Chystáte sa zmazať značku „$1“ z databázy.",
+       "tags-delete-reason": "Dôvod:",
        "tags-deactivate-reason": "Dôvod:",
        "tags-edit-title": "Upraviť značky",
        "tags-edit-new-tags": "Nové značky:",
index 79748a6..221e53a 100644 (file)
@@ -40,7 +40,7 @@
        "tog-enotifminoredits": "Pošlji e-pošto tudi za manjše spremembe strani in datotek",
        "tog-enotifrevealaddr": "V sporočilih z obvestili o spremembah razkrij moj e-poštni naslov",
        "tog-shownumberswatching": "Prikaži število uporabnikov, ki spremljajo temo",
-       "tog-oldsig": "Trenutni podpis:",
+       "tog-oldsig": "Vaš trenutni podpis:",
        "tog-fancysig": "Obravnavaj podpis kot wikibesedilo (brez samodejne povezave)",
        "tog-uselivepreview": "Uporabi hitri predogled",
        "tog-forceeditsummary": "Ob vpisu praznega povzetka urejanja me opozori",
        "newwindow": "(odpre se novo okno)",
        "cancel": "Prekliči",
        "moredotdotdot": "Več ...",
-       "morenotlisted": "Seznam ni popoln.",
+       "morenotlisted": "Seznam morda ni popoln.",
        "mypage": "Stran",
        "mytalk": "Pogovor",
        "anontalk": "Pogovorna stran",
index 08aadbc..7c33f6a 100644 (file)
        "createacct-yourpasswordagain-ph": "கடவுச்சொல்லை மீளவும் இடுக",
        "userlogin-remembermypassword": "இடுபதிந்தே இருக்கவிடவும்",
        "userlogin-signwithsecure": "பாதுகாப்பான தொடர்பை உபயோகிக்கவும்",
+       "cannotlogin-title": "புகுபதிகை இயலாது",
+       "cannotlogin-text": "புகுபதிகை இயலாது.",
        "cannotloginnow-title": "இப்பொழுது விடுபதிகை செய்ய இயலாது.",
        "cannotloginnow-text": "$1-ஐ பயன்படுத்தும் பொழுது விடுபதிகை சாத்தியம் அல்ல.",
+       "cannotcreateaccount-title": "கணக்கைத் தொடங்க முடியாது",
        "yourdomainname": "உங்கள் உரிமைப்பரப்பு:",
        "password-change-forbidden": "நீங்கள் விக்கிகளில் கடவுச் சொற்களை மாற்ற முடியாது",
        "externaldberror": "வெளி உறுதிப்படுத்தலில் ஏற்பட்ட தவறு காரணமாக உங்கள் வெளி கணக்கை இற்றைப்படுத்த முடியாது.",
        "pageinfo-article-id": "பக்க அடையாள இலக்கம்",
        "pageinfo-language": "பக்க உள்ளடக்க மொழி",
        "pageinfo-content-model": "பக்கள உள்ளடக்க மாதிரி",
+       "pageinfo-content-model-change": "மாற்று",
        "pageinfo-robot-policy": "தானியங்கி மூலம் அட்டவணைப்படுத்தல்",
        "pageinfo-robot-index": "அனுமதிக்கப்படுகிறது",
        "pageinfo-robot-noindex": "அனுமதிக்கப்படாதது",
index 3fa93b8..1f7fa45 100644 (file)
@@ -38,7 +38,7 @@
        "tog-enotifminoredits": "ಎಲ್ಯೆಲ್ಯ ಬದಲಾವನೆ ಆಂಡಲ ಎಂಕ್ ಇ-ಅಂಚೆ ಕಡಪುಡ್ಲೆ",
        "tog-enotifrevealaddr": "ಪ್ರಕಟಣೆ ಇ-ಮೇಲ್‍ಡ್ ಎನ್ನ ಇ-ಮೇಲ್ ವಿಳಾಸನ್ ತೊಜ್ಪಾಲೆ",
        "tog-shownumberswatching": "ಪುಟೊನು ತೂವೊಂದುಪ್ಪುನಂಚಿನ ಸದಸ್ಯೆರ್‍ನ ಸಂಖ್ಯೆನ್ ತೊಜ್ಪಾಲೆ",
-       "tog-oldsig": "à²\87ತà³\8dತà³\86ದ à²¸à²¹à²¿",
+       "tog-oldsig": "à²\87ತà³\8dತà³\86ದ à²¸à³\88ನà³\8d.",
        "tog-fancysig": "ವಿಕಿಟೆಕ್ಸ್‌ಟ್‍ಗ್ ದಸ್ಕತ್ತ್‌ದ ಉಪಚಾರೊ(ಸ್ವಂತೊ ಚಾಲನೆದ ಕೊಂಡಿ ಇದ್ಯಂದಿಲೆಕ)",
        "tog-uselivepreview": "ನೇರೊ ಮುನ್ನೋಟೊನು ಉಪಯೋಗ ಮಲ್ಪುಲೆ",
        "tog-forceeditsummary": "ಸಂಪಾದನೆ ಸಾರಾಂಸೊನು ಕಾಲಿ ಬುಡ್‍ಂದ್ ಎಂಕ್ ನೆನಪು ಮಲ್ಪುಲೆ",
        "createacct-yourpasswordagain-ph": "ಪ್ರವೇಸೊ ಪದೊನು ನನ ಒರ ನಮೂದಿಸಲೆ",
        "userlogin-remembermypassword": "ಎನನ್ ಲಾಗಿನ್ ಆತೇ ದೀಡ್ಲೆ",
        "userlogin-signwithsecure": "ರಕ್ಷಣೆದ ಕನೆಕ್ಷನ್ ಉಪಯೋಗಿಸಲೆ.",
+       "cannotlogin-title": "ಇತ್ತೆ ಉಲಾಯಿ ಪೋಯರ್ ಸಾದ್ಯೊ ಅವೊಂತಿಜ್ಜಿ",
        "cannotloginnow-title": "ಇತ್ತೆ ಉಲಾಯಿ ಪೋಯರ್ ಸಾದ್ಯೊ ಇದ್ದಿ",
+       "cannotcreateaccount-title": "ಕಾತೆ ನಿರ್ಮಾಣೊ ಮಲ್ಪೆರೆ ಆವೊಂತಿಜ್ಜಿ",
        "yourdomainname": "ಈರೆನ ಕಾರ್ಯಕ್ಷೇತ್ರ",
        "password-change-forbidden": "ಈರ್ ಈ ವಿಕಿಡ್ ಪ್ರರವೇಸ ಪದೊನು ಬದಲ್ಪೆರೆ ಸಾದ್ಯೊ ಇದ್ದಿ.",
        "login": "ಲಾಗಿನ್ ಆಲೆ",
index a63aac3..7e167ac 100644 (file)
@@ -87,7 +87,8 @@
                        "Hbseren",
                        "Kumkumuk",
                        "Basak",
-                       "Ece Alpdeniz"
+                       "Ece Alpdeniz",
+                       "Superyetkin"
                ]
        },
        "tog-underline": "Bağlantıların altını çiz:",
        "spam_blanking": "Tüm revizyonlar $1 sayfasına bağlantı içeriyor, boşaltılıyor",
        "spam_deleting": "Tüm revizyonlar $1 sayfasına bağlantı içeriyor, siliniyor",
        "simpleantispam-label": "Anti-spam denetimi.\nBunu <strong>doldurmayın</strong>!",
-       "pageinfo-title": "Bilgi için \"$1\"",
+       "pageinfo-title": "\"$1\" sayfa bilgisi",
        "pageinfo-not-current": "Üzgünüz, eski sürümler için bu bilgileri sağlamamız mümkün değildir.",
        "pageinfo-header-basic": "Temel bilgiler",
        "pageinfo-header-edits": "Düzenleme geçmişi",
index 402a034..62dc255 100644 (file)
@@ -93,7 +93,7 @@
        "tog-enotifminoredits": "Надсилати мені електронного листа навіть при незначних редагуваннях сторінок та файлів",
        "tog-enotifrevealaddr": "Показувати мою поштову адресу в повідомленнях",
        "tog-shownumberswatching": "Показувати число користувачів, які додали сторінку до свого списку спостереження",
-       "tog-oldsig": "Ð\9fоточний підпис:",
+       "tog-oldsig": "Ð\92аÑ\88 Ð¿оточний підпис:",
        "tog-fancysig": "Сприймати підпис як вікітекст (без автоматичного посилання)",
        "tog-uselivepreview": "Використовувати швидкий попередній перегляд",
        "tog-forceeditsummary": "Попереджати, коли не зазначений короткий опис редагування",
        "tog-showhiddencats": "Показувати приховані категорії",
        "tog-norollbackdiff": "Не показувати різницю версій після виконання відкоту",
        "tog-useeditwarning": "Попереджати мене, якщо я залишаю сторінку редагування з незбереженими змінами",
-       "tog-prefershttps": "Завжди використовувати безпечне з'єднання при вході у систему",
+       "tog-prefershttps": "Завжди використовувати безпечне з'єднання при вході в систему",
        "underline-always": "Завжди",
        "underline-never": "Ніколи",
        "underline-default": "Використовувати налаштування браузера",
        "newwindow": "(відкривається в новому вікні)",
        "cancel": "Скасувати",
        "moredotdotdot": "Більше…",
-       "morenotlisted": "Цей Ñ\81пиÑ\81ок Ð½ÐµÐ¿Ð¾Ð²Ð½Ð¸Ð¹.",
+       "morenotlisted": "Цей Ñ\81пиÑ\81ок Ð¼Ð¾Ð¶Ðµ Ð±Ñ\83Ñ\82и Ð½ÐµÐ¿Ð¾Ð²Ð½Ð¸Ð¼.",
        "mypage": "Сторінка",
        "mytalk": "Обговорення",
        "anontalk": "Обговорення",
        "createacct-yourpasswordagain-ph": "Введіть пароль знову",
        "userlogin-remembermypassword": "Запам'ятати мене",
        "userlogin-signwithsecure": "Захищене з'єднання",
+       "cannotlogin-title": "Не вдалося увійти",
+       "cannotlogin-text": "Вхід у систему неможливий.",
        "cannotloginnow-title": "Неможливо увійти прямо зараз",
        "cannotloginnow-text": "Неможливо увійти під-час використання $1.",
+       "cannotcreateaccount-title": "Створення облікових записів неможливе",
+       "cannotcreateaccount-text": "Пряме створення облікових записів не увімкнене у цій вікі.",
        "yourdomainname": "Ваш домен:",
        "password-change-forbidden": "Ви не можна змінити пароль на цій вікі.",
        "externaldberror": "Сталася помилка при автентифікації за допомогою зовнішньої бази даних, або у вас недостатньо прав для внесення змін до свого зовнішнього облікового запису.",
        "botpasswords-updated-body": "Пароль бота з ім'ям «$1» користувача «$2» було оновлено.",
        "botpasswords-deleted-title": "Пароль бота видалено",
        "botpasswords-deleted-body": "Пароль бота з ім'ям «$1» користувача «$2» було видалено",
-       "botpasswords-newpassword": "Новий пароль для входу під <strong>$1</strong> — <strong>$2</strong>. <em>Запишіть його для подальшого використання.</em>",
+       "botpasswords-newpassword": "Новий пароль для входу під <strong>$1</strong> — <strong>$2</strong>. <em>Запишіть його для подальшого використання.</em> <br> (Для старих ботів, які вимагають, щоб логін був такий же, як і ім'я користувача, Ви також можете використовувати <strong>$3</strong> як ім'я користувача і <strong>$4</strong> як пароль.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider не доступний.",
        "botpasswords-restriction-failed": "Вхід не було здійснено через обмеження для паролю бота.",
        "botpasswords-invalid-name": "Вказане ім'я користувача не містить роздільник для пароля бота («$1»).",
        "invalid-content-data": "Неприпустимі дані",
        "content-not-allowed-here": "Вміст «$1» недопустимий на сторінці [[$2]]",
        "editwarning-warning": "Перехід на іншу сторінку призведе до втрати ваших змін.\nЯкщо ви ввійшли до системи, то ви можете відключити це попередження в розділі \"{{int:prefs-editing}}\" ваших налаштувань.",
+       "editpage-invalidcontentmodel-title": "Контентна модель не підтримується",
+       "editpage-invalidcontentmodel-text": "Контентна модель «$1» не підтримується.",
        "editpage-notsupportedcontentformat-title": "Формат вмісту не підтримується",
        "editpage-notsupportedcontentformat-text": "Формат вмісту $1 не підтримується моделлю вмісту $2.",
        "content-model-wikitext": "вікітекст",
        "file-thumbnail-no": "Назва файлу починається на <strong>$1</strong>.\nМожливо, це зменшена копія зображення ''(мініатюра)''.\nЯкщо у вас є це зображення в повному розмірі, завантажте його, інакше змініть назву файлу.",
        "fileexists-forbidden": "Файл з такою назвою вже існує і не може бути перезаписаний.\nЯкщо ви все одно хочете завантажити цей файл, будь ласка, поверніться назад і оберіть іншу назву.\n[[File:$1|thumb|center|$1]]",
        "fileexists-shared-forbidden": "Файл із такою назвою вже існує у спільному сховищі файлів.\nЯкщо ви все ж хочете завантажити цей файл, будь ласка, поверніться назад і змініть назву файлу. [[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "Це завантаження є точною копією поточної версії <strong>[[:$1]]</strong>.",
+       "fileexists-duplicate-version": "Це завантаження є точною копією {{PLURAL:$2|старішої версії|старіших версій}} <strong>[[:$1]]</strong>.",
        "file-exists-duplicate": "Цей файл є дублікатом {{PLURAL:$1|1=файлу|таких файлів}}:",
        "file-deleted-duplicate": "Такий самий файл ([[:$1]]) уже вилучався раніше. Будь ласка, ознайомтеся з історією вилучень файлу перед тим, як завантажити його знову.",
        "file-deleted-duplicate-notitle": "Файл, ідентичний до цього файлу, був раніше видалений, і назву було усунено.\nВам слід попросити кого-небудь з можливістю перегляду усуненого файлу даних, щоб проаналізувати ситуацію, перш ніж приступити до повторного завантаження.",
        "pageinfo-article-id": "ID сторінки",
        "pageinfo-language": "Мова вмісту сторінки",
        "pageinfo-content-model": "Модель вмісту сторінки",
+       "pageinfo-content-model-change": "змінити",
        "pageinfo-robot-policy": "Індексація пошуковими системами",
        "pageinfo-robot-index": "Індексується",
        "pageinfo-robot-noindex": "Не індексується",
        "tag-filter": "Фільтр&nbsp;[[Special:Tags|міток]]:",
        "tag-filter-submit": "Відфільтрувати",
        "tag-list-wrapper": "([[Special:Tags|{{PLURAL:$1|Мітка|Мітки|Міток}}]]: $2)",
+       "tag-mw-contentmodelchange": "зміна контентної моделі",
+       "tag-mw-contentmodelchange-description": "Редагування, якими була здійснена [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:ChangeContentModel зміна контентної моделі] сторінки",
        "tags-title": "Мітки",
        "tags-intro": "На цій сторінці наведений список міток, якими програмне забезпечення помічає редагування, а також значення цих міток.",
        "tags-tag": "Назва мітки",
        "tags-actions-header": "Дії",
        "tags-active-yes": "Так",
        "tags-active-no": "Ні",
-       "tags-source-extension": "Визначається розширенням",
+       "tags-source-extension": "Визначається програмним забезпеченням",
        "tags-source-manual": "Застосовується вручну користувачами і ботами",
        "tags-source-none": "Більше не використовується",
        "tags-edit": "редагувати",
index a8f6fd1..95d8031 100644 (file)
@@ -56,7 +56,7 @@
        "tog-enotifminoredits": "مجھے صفحات اور فائلوں میں کی جانے والی معمولی ترامیم کی خبر بھی بذریعہ برقی ڈاک بھیجیں",
        "tog-enotifrevealaddr": "اطلاعاتی برقی خطوط میں میرا برقی ڈاک پتہ ظاہر کریں",
        "tog-shownumberswatching": "دیکھنے والے صارفین کی تعداد دکھائیں",
-       "tog-oldsig": "موجودہ دستخط:",
+       "tog-oldsig": "آپ کے موجودہ دستخط:",
        "tog-fancysig": "سادہ دستخط (بلا خودکار ربط)",
        "tog-uselivepreview": "راست نمائش استعمال کریں",
        "tog-forceeditsummary": "خلاصہ ترمیم خالی چھوڑنے پر مجھے آگاہ کریں",
@@ -73,7 +73,7 @@
        "tog-showhiddencats": "پوشیدہ زمرہ جات دکھائیں",
        "tog-norollbackdiff": "استرجع کے بعد فرق نہ دکھائیں",
        "tog-useeditwarning": "غیر محفوظ تبدیلیاں چھوڑنے پر مجھے آگاہ کریں",
-       "tog-prefershttps": "لاگ ان رہنے کے دوران ہمیشہ محفوظ کنیکشن استعمال کریں",
+       "tog-prefershttps": "داخل رہنے کے دوران میں ہمیشہ محفوظ کنیکشن استعمال کریں",
        "underline-always": "ہمیشہ",
        "underline-never": "کبھی نہیں",
        "underline-default": "پوشاک یا براؤزر کا طے شدہ",
        "october-date": "$1 اکتوبر",
        "november-date": "$1 نومبر",
        "december-date": "$1 دسمبر",
+       "period-am": "صبح",
+       "period-pm": "شام",
        "pagecategories": "{{PLURAL:$1|زمرہ|زمرہ جات}}",
        "category_header": "زمرہ \"$1\" میں صفحات",
        "subcategories": "ذیلی زمرہ جات",
        "newwindow": "(نـئی ونـڈو میـں کھولیں)",
        "cancel": "منسوخ",
        "moredotdotdot": "مزید...",
-       "morenotlisted": "یہ فہرست مکمل نہیں ہے۔",
+       "morenotlisted": "شاید یہ فہرست مکمل نہیں۔",
        "mypage": "صفحہ",
        "mytalk": "تبادلۂ خیال",
        "anontalk": "اس آئی پی پتہ کا تبادلۂ خیال",
        "tagline": "{{SITENAME}} سے",
        "help": "معاونت",
        "search": "تلاش",
+       "search-ignored-headings": " #<!-- اس سطر کو ہو بہو اپنی حالت پر چھوڑ دیں --> <pre>\n# سرخیاں جو تلاش کے دوران میں نظر انداز کر دی جائیں گی۔\n# سرخی پر مشتمل صفحہ کی فہرست سازی مکمل ہوتے ہی تبدیلیاں نافذ ہو جائیں گی۔\n# ایک خالی ترمیم کر کے آپ صفحہ کی دوبارہ فہرست سازی کر سکتے ہیں۔\n# صیغہ حسب ذیل ہے:\n# * ہر چیز جو \"#\" علامت کے بعد آخری سطر تک ہو اسے تبصرہ سمجھا جائے گا۔\n#* ہر وہ سطر جو خالی نہ ہو عنوان ہوگا اور اسے نظر انداز کر دیا جائے گا (نیز جس طرح درج ہے اسی طرح استعمال کیا جائے گا)۔\nحوالہ جات\nبیرونی روابط\nمزید دیکھیے\n #<!-- اس سطر کو ہو بہو اپنی حالت پر چھوڑ دیں --> <pre>",
        "searchbutton": "تلاش",
        "go": "چلو",
        "searcharticle": "چلو",
        "jumptosearch": "تلاش",
        "view-pool-error": "معذرت کے ساتھ، تمام معیلات پر اِس وقت اِضافی بوجھ ہے.\nبہت زیادہ صارفین اِس وقت یہ صفحہ ملاحظہ کرنے کی کوشش کررہے ہیں.\nبرائے مہربانی! صفحہ دیکھنے کیلئے دوبارہ کوشش کرنے سے پہلے ذرا انتظار فرمالیجئے.\n\n$1",
        "generic-pool-error": "ہم معذرت خواہ ہیں! معیلات (سرورز) پر اِس وقت اِضافی بوجھ ہے.\nصارفین کی کثیر تعداد اِس وقت یہی صفحہ ملاحظہ کرنے کی کوشش کررہی ہے.\nبرائے مہربانی!دوبارہ کوشش کرنے سے پہلے ذرا انتظار فرمائیے.",
+       "pool-timeout": "مقفل کرنے کے لیے انتظار کی مہلت ختم",
+       "pool-queuefull": "قطار لگی ہوئی ہے",
        "pool-errorunknown": "نامعلوم خطا",
+       "pool-servererror": "پول شمار خدمت دستیاب نہیں ($1)۔",
        "poolcounter-usage-error": "استعمال میں خامی: $1",
        "aboutsite": "{{SITENAME}} کا تعارف",
        "aboutpage": "Project:تعارف",
        "pagetitle-view-mainpage": "{{SITENAME}}",
        "retrievedfrom": "‘‘$1’’ مستعادہ منجانب",
        "youhavenewmessages": "آپکے لیۓ ایک $1 ہے۔ ($2)",
+       "youhavenewmessagesfromusers": "{{PLURAL:$4|آپ کے لیے}} {{PLURAL:$3|کسی دوسرے صارف|$3 صارفین}} کی جانب سے $1 ($2)۔",
+       "youhavenewmessagesmanyusers": "آپ کے لیے متعدد صارفین کی جانب سے $1 ($2)۔",
        "newmessageslinkplural": "{{PLURAL:$1|نیا پیغام|999=نئے پیغاماتs}}",
        "newmessagesdifflinkplural": "آخری {{PLURAL:$1|تبدیلی|تبدیلیاں}}",
        "youhavenewmessagesmulti": "ء$1 پر آپ کیلئے نئے پیغامات ہیں",
        "databaseerror-query": "کیوری: $1",
        "databaseerror-function": "فنکشن: $ 1",
        "databaseerror-error": "خرابی: $ 1",
+       "transaction-duration-limit-exceeded": "زیادہ تاخیر سے بچنے کے لیے اس اقدام کو منسوخ کر دیا گیا ہے کیونکہ مدت تحریر ($1) اپنی حد $2 سیکنڈ سے تجاوز کر چکی ہے۔\nاگر آپ ایک ہی وقت میں کئی چیزیں تبدیل کر رہے ہیں تو بہتر ہوگا کہ اس تبدیلی کو متعدد قسطوں میں انجام دیں۔",
        "laggedslavemode": "انتباہ: ممکن ہے کہ صفحہ میں حالیہ بتاریخہ جات شامل نہ ہوں.\n\nWarning: Page may not contain recent updates.",
        "readonly": "ڈیٹابیس مقفل ہے",
        "enterlockreason": "قفل کیلئے کوئی وجہ درج کیجئے، بشمولِ تخمینہ کہ قفل کب کھولا جائے گا.",
        "missingarticle-rev": "(نظرثانی#: $1)",
        "missingarticle-diff": "(فرق: $1، $2)",
        "readonly_lag": "ڈیٹابیس خودکار طور پر مقفل ہوچکا ہے تاکہ ماتحت ڈیٹابیسی معیلات کا درجہ آقا کا ہوجائے.",
+       "nonwrite-api-promise-error": "ایچ ٹی ٹی پی سرنامہ 'Promise-Non-Write-API-Action' بھیجا گیا لیکن یہ ایک اے پی آئی نویس ماڈیول کو بھیجی گئی درخواست تھی۔",
        "internalerror": "خطائے اندرونی",
        "internalerror_info": "خطائے اندرونی: $1",
+       "internalerror-fatal-exception": "\"$1\" قسم کا تباہ کن استثنا",
        "filecopyerror": "\"$1\" مسل کو \"$2\" کی طرف نقل نہیں کیا جاسکا.",
        "filerenameerror": "مسل \"$1\" کو \"$2\" میں بازنام نہیں کیا جاسکا.",
        "filedeleteerror": "مسل \"$1\" کو حذف نہیں کیا جاسکا.",
        "cannotdelete": "صفحہ یا ملف $1 کو حذف نہیں کیا جاسکتا.\nہوسکتا ہے کہ اسے پہلے ہی کسی نے حذف کردیا ہو.",
        "cannotdelete-title": "صفحہ ھذف نہیں کیا جا سکتا \"$1\"",
        "delete-hook-aborted": "حذف شدگی روک دی گئی\nوضاحت نہیں کی گئی",
+       "no-null-revision": "صفحہ \"$1\" کے لیے نیا خالی نسخہ نہیں بنایا جا سکتا",
        "badtitle": "خراب عنوان",
        "badtitletext": "درخواست شدہ صفحہ کا عنوان ناقص، خالی، یا کوئی غلط ربط شدہ بین لسانی یا بین ویکی عنوان ہے.\nشاید اِس میں ایک یا زیادہ ایسے حروف موجود ہوں جو عنوانات میں استعمال نہیں ہوسکتے.",
+       "title-invalid-empty": "درخواست شدہ عنوان خالی ہے یا اس میں محض نام فضا کا نام ہے۔",
+       "title-invalid-utf8": "درخواست شدہ عنوان میں نادرست یونیکوڈ حروف موجود ہیں۔",
+       "title-invalid-interwiki": "درخواست شدہ عنوان میں ایسا بین الویکی ربط موجود ہے جسے عنوانات میں استعمال نہیں کیا جا سکتا۔",
+       "title-invalid-talk-namespace": "درخواست شدہ عنوان اس تبادلۂ خیال صفحہ کا ہے جو موجود نہیں۔",
+       "title-invalid-characters": "درخواست شدہ عنوان میں نادرست حروف «$1» موجود ہیں۔",
+       "title-invalid-relative": "عنوان میں علامت موجود ہے۔ علامتوں (./, ../) پر مشتمل عنوانات نادرست ہیں، اس لیے کہ یہ علامتیں صارف کے براؤزر کے لیے ناقابل رسائی ہوتی ہیں۔",
+       "title-invalid-magic-tilde": "درخواست شدہ عنوان میں نادرست جادوئی علامتیں مسلسل استعمال کی گئی ہیں (<nowiki>~~~</nowiki>)۔",
+       "title-invalid-too-long": "درخواست شدہ عنوان بے حد طویل ہے۔ عنوان کی طوالت یونیکوڈ کے $1 {{PLURAL:$1|بائٹ}} سے کم ہونی چاہیے۔",
+       "title-invalid-leading-colon": "درخواست شدہ عنوان کے شروع میں ایک نادرست رابطہ موجود ہے۔",
        "perfcached": "ذیلی ڈیٹا ابطن شدہ (cached) ہے اور اِس کے پُرانے ہونے کا امکان ہے. A maximum of {{PLURAL:$1|one result is|$1 results are}} available in the cache.",
        "perfcachedts": "ذیلی ڈیٹا ابطن شدہ ہے (cached) اور آخری بار اِس کی بتاریخیت $1 کو ہوئی. A maximum of {{PLURAL:$4|one result is|$4 results are}} available in the cache.",
        "querypage-no-updates": "اِس صفحہ کیلئے بتاریخات فی الحال ناقابل بنائی گئی ہیں.\nیہاں کا ڈیٹا ابھی تازہ نہیں کیا جائے گا.",
        "protectedpagetext": "اس صفحہ کو تدوین سے محفوظ رکھنے کیلیے مقفل کر دیا گیا ہے۔",
        "viewsourcetext": "آپ صرف مسودہ دیکھ سکتے ہیں اور اسکی نقل اتار سکتے ہیں۔",
        "viewyourtext": "آپ اس مواد کو دیکھ سکتے ہیں اور اٹھا (کاپی) سکتے ہیں <strong>آپ کی ترامیم</strong> اس صفحہ پر۔",
-       "protectedinterface": "{{fmbox \n| type = editnotice\n| image = [[File:Namespace MediaWiki.svg|45px]]\n| text = '''اس [[mw:Manual:System message|انٹرفیس پیغام]] یا [[ویکیپیڈیا:جلد|جلد]] کی دستاویز [[mw:Manual:Interface/{{PAGENAME}}|میڈیاویکی ڈاٹ آرگ]] یا [[translatewiki:MediaWiki:{{PAGENAME}}/qqq|ٹرانسلیٹ ویکی ڈاٹ نیٹ]] پر بنائی جا سکتی ہے۔''' <br /> چونکہ یہ صفحہ میڈیاویکی سوفٹویئر کے لیے انٹرفیس متن فراہم کرتا ہے، اس لیے اس میں محض [[ویکیپیڈیا:منتظمین|منتظمین]] ہی ترمیم کر سکتے ہیں۔ البتہ اگر آپ کو اس میں کسی قسم کی ترمیم مطلوب ہو تو ذیل میں موجود بٹن پر کلک کرکے اس پیغام میں ترمیم کی درخواست کر سکتے ہیں۔\n<div class=\"center\" style=\"margin-top: 4px;\">{{درخواست ترمیم روانہ کریں|type=full}}</div>\n}}{{editnotice load\n| notice action = view \n}}",
+       "protectedinterface": "یہ صفحہ سافٹ ویئر کا انٹرفیس متن فراہم کرتا ہے اور غلط استعمال سے بچنے کے لیے اسے محفوظ رکھا گیا ہے۔\nتمام ویکیوں میں ترجمہ شامل کرنے یا اس میں تبدیلی کرنے کے لیے میڈیاویکی دار الترجمہ [https://translatewiki.net/ translatewiki.net]کو استعمال کریں۔",
        "editinginterface": "<strong>انتباہ: </strong> آپ ایک ایسے صفحے میں ترمیم کر رہے ہیں جو سوفٹ ویئر کے لیے انٹرفیس متن فراہم کرتا ہے۔ اس صفحہ میں کی جانے والی تبدیلی سے اس ویکی پر دیگر صارفین کے لیے انٹرفیس متاثر ہوگی۔",
        "translateinterface": "تمام ویکیوں میں تبدیلی یا شامل کرنے کے لیے، [https://translatewiki.net/ translatewiki.net]کو استعمال کریں ، میڈیا ویکی دارالترجمہ.",
+       "cascadeprotected": "درج ذیل محفوظ کردہ {{PLURAL:$1|صفحہ|صفحات}} کی «آبشاری» حفاظت میں شامل ہونے کی وجہ سے یہ صفحہ بھی محفوظ ہے:\n$2",
        "namespaceprotected": "آپ کو '''$1''' فضائے نام میں صفحات تدوین کرنے کی اِجازت نہیں ہے.",
+       "customcssprotected": "آپ کو اس سی ایس ایس میں ترمیم کرنے کی اجازت نہیں کیونکہ اس میں کسی دوسرے صارف کی ذاتی ترتیبات موجود ہیں۔",
+       "customjsprotected": "آپ کو اس جاوا اسکرپٹ میں ترمیم کرنے کی اجازت نہیں کیونکہ اس میں کسی دوسرے صارف کی ذاتی ترتیبات موجود ہیں۔",
        "mycustomcssprotected": "آپ اس سی ایس ایس (CSS) صفحہ میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "mycustomjsprotected": "آپ اس جاوا اسکپرٹ (JavaScript) صفحہ میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "myprivateinfoprotected": "آپ ان ذاتی معلوات (private information) میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "mypreferencesprotected": "آپ اپنی ان ترجیحات (preferences) میں ترمیم کرنے کا اختیار نہیں رکھتے۔",
        "ns-specialprotected": "خاص صفحات کی تدوین نہیں کی جاسکتی.",
        "titleprotected": "اس عنوان کو [[User:$1|$1]] نے تخلیق سے محفوظ کیا ہے.\nوجہ یہ بتائی گئی ہے: <em>$2</em>.",
+       "filereadonlyerror": "فائل «$1» میں تبدیلی ممکن نہیں کیونکہ خزانہ فائل «$2» فقط خواندگی حالت میں ہے۔\n\nانتظامیہ کی جانب سے مقفل کرنے کی حسب ذیل توجیہ پیش کی گئی ہے:\n\n«$3»",
+       "invalidtitle-knownnamespace": "«$2» نام فضا میں «$3» متن پر مشتمل عنوان نادرست ہے",
+       "invalidtitle-unknownnamespace": "نامعلوم نام فضا عدد «$1» اور «$2» متن پر مشتمل عنوان نادرست ہے",
        "exception-nologin": "غیر داخل نوشتہ",
        "exception-nologin-text": "براہ مہربانی! اس صفحہ تک رسائی یا ترمیم کے لیے لاگ ان ہوں۔",
        "exception-nologin-text-manual": "$1 براہ مہربانی! اس صفحہ تک رسائی یا ترمیم کے لیے لاگ ان ہوں۔",
        "virus-scanfailed": "تفریس ناکام (رمز $1)",
        "virus-unknownscanner": "انجان ضدوائرس:",
        "logouttext": "<strong>اب آپ خارج ہوچکے ہیں۔</strong>\n\nیاد رکھیں! کچھ صفحات ایسے نظر آتے رہیں گے کہ جیسے ابھی آپ خارج نہیں ہوئے، جب تک آپ اپنے کیشے صاف نہیں کرتے۔",
+       "cannotlogoutnow-title": "ابھی خارج نہیں ہو سکتے",
+       "cannotlogoutnow-text": "$1 کے استعمال کے دوران میں خارج ہونا ممکن نہیں۔",
        "welcomeuser": "خوش آمدید، $1!",
+       "welcomecreation-msg": "آپ کا کھاتہ بن گیا۔\nاگر آپ چاہیں تو [[Special:Preferences|اپنی ترجیحات]] میں حسب منشا تبدیلی کر سکتے ہیں۔",
        "yourname": "اسمِ رکنیت",
        "userlogin-yourname": "صارف نام",
        "userlogin-yourname-ph": "اپنا صارف نام درج کریں",
        "createacct-yourpasswordagain-ph": "پاس ورڈ پھر داخل کریں",
        "userlogin-remembermypassword": "مجھے داخل رکھے",
        "userlogin-signwithsecure": "محفوظ رابطہ (کنکشن) استعمال کریں",
+       "cannotlogin-title": "داخل نہیں ہو سکتے",
+       "cannotlogin-text": "داخل ہونا ممکن نہیں۔",
+       "cannotloginnow-title": "ابھی داخل نہیں ہو سکتے",
+       "cannotloginnow-text": "$1 کے استعمال کے دوران میں داخل ہونا ممکن نہیں۔",
+       "cannotcreateaccount-title": "کھاتے نہیں بنائے جا سکتے",
+       "cannotcreateaccount-text": "اس ویکی پر براہ راست کھاتہ سازی فعال نہیں ہے۔",
        "yourdomainname": "آپکا ڈومین",
        "password-change-forbidden": "آپ اس ویکی پر پارلفظ (پاس روڈ) تبدیل نہیں کر سکتے",
        "externaldberror": "یا تو توثیقی ڈیٹابیس میں خطا واقع ہوئی اور یا آپ کو بیرونی کھاتہ بتاریخ کرنے کی اِجازت نہیں ہے.",
        "login": "داخل ہوں",
+       "login-security": "اپنی شناخت کی تصدیق کریں",
        "nav-login-createaccount": "کھاتہ کھولیں یا اندراج کریں",
        "userlogin": "کھاتہ کھولیں یا اندراج کریں",
        "userloginnocreate": "داخلِ نوشتہ ہوجائیے",
        "userlogin-resetpassword-link": "کلمہ شناخت بھول گئے؟",
        "userlogin-helplink2": "داخل نوشتگی میں معاونت درکار ہے؟",
        "userlogin-loggedin": "آپ ویکیپیڈیا میں بطور صارف {{GENDER:$1|$1}}  پہلے سے داخل نوشتہ (logged in) ہیں۔\nدوسرے کھاتہ سے داخل ہونے کے لیے درج ذیل خانے پر کریں۔",
+       "userlogin-reauth": "آپ {{GENDER:$1|$1}} ہیں، اس کی تصدیق کے لیے آپ کا داخل ہونا ناگزیر ہے۔",
        "userlogin-createanother": "دوسرا کھاتہ تخلیق کریں",
        "createacct-emailrequired": "ای میل پتہ",
        "createacct-emailoptional": "ای میل ایڈریس (اختیاری)",
        "createacct-email-ph": "اپنا برقی پتہ لکھیں",
        "createacct-another-email-ph": "برقی پتہ لکھیں",
        "createaccountmail": "عارضی پاسورڈ استعمال کریں اور اسے متعینہ برقی ڈاک پتہ پر ارسال کریں",
+       "createaccountmail-help": "پاس ورڈ معلوم کیے بغیر کسی دوسرے شخص کا کھاتہ بنانے کے لیے اسے استعمال کیا جا سکتا ہے۔",
        "createacct-realname": "اصلی نام (اختیاری)",
        "createaccountreason": "وجہ:",
        "createacct-reason": "وجہ",
        "createacct-reason-ph": "آپ دوسرا کھاتہ کیوں تخلیق کررہے ہیں",
+       "createacct-reason-help": "نوشتہ کھاتہ سازی میں نظر آنے والا پیغام",
        "createacct-submit": "آپ کا کھاتا بنائیں",
        "createacct-another-submit": "کھاتہ بنائیں",
+       "createacct-continue-submit": "کھاتہ سازی جاری رکھیں",
+       "createacct-another-continue-submit": "کھاتہ سازی جاری رکھیں",
        "createacct-benefit-heading": "{{SITENAME}} آپ جیسے لوگوں کی طرف سے بنایا گیا ہے ۔",
        "createacct-benefit-body1": "{{PLURAL:$1|ترمیم|ترامیم}}",
        "createacct-benefit-body2": "$1 {{PLURAL:$1|صفحہ|صفحات}}",
        "nocookiesnew": "کھاتۂ صارف بنادیا گیا ہے، لیکن آپ کا داخلہ نہیں ہوا.\nصارفین کے داخلہ کیلئے {{SITENAME}} کوکیز استعمال کرتا ہے.\nآپ کے ہاں کوکیز غیر فعال ہیں.\nبراہِ کرم، انہیں فعال کیجئے، اور پھر اپنے نئے اسمِ صارف اور کلمۂ شناخت کے ساتھ داخل ہوجائیے.",
        "nocookieslogin": "صارفین کے داخل ہونے کیلئے {{SITENAME}} کوکیز استعمال کرتا ہے.\nآپ کے ہاں کوکیز غیر فعال ہیں.\nانہیں فعال کرنے کے بعد پھر کوشش کیجئے.",
        "nocookiesfornew": "اس صارف نام کا کھاتہ نہیں بن سکا۔ہم اس بات کی وضاحت نہیں کر سکتے (کہ ایسا کیوں ہوا)، براہ مہربانی! آپ\nیقین کر لیں کہ آپ کی کوکیز فعال ہیں، صفحہ تازہ کریں اور پھر کوشش کریں۔",
+       "createacct-loginerror": "کھاتہ بن چکا ہے لیکن آپ اس میں خودکار طور پر داخل نہیں ہو سکے۔ براہ کرم [[Special:UserLogin|دستی طور پر داخل ہونے کی کوشش کریں]]۔",
        "noname": "آپ نے صحیح اسم صارف نہیں چنا.",
        "loginsuccesstitle": "داخلہ کامیاب",
        "loginsuccess": "'''اب آپ {{SITENAME}} میں بنام \"$1\" داخل ہوچکے ہیں۔'''",
-       "nosuchuser": "\"$1\" کے نام سے کوئی صارف موجود نہیں ہے.\nبرائے مہربانی! ہجوں کے درست اندراج کی تصدیق کرلیجئے.\nاگر آپ چاہیں تو [[Special:CreateAccount|نیا کھاتہ بھی بناسکتے ہیں]].",
+       "nosuchuser": "\"$1\" کے نام سے کوئی صارف موجود نہیں ہے۔\nبراہ کرم ہجوں کو جانچ لیں۔\nنیز اگر آپ چاہیں تو [[Special:CreateAccount|نیا کھاتہ بھی بنا سکتے ہیں]]۔",
        "nosuchusershort": "\"$1\" کے نام سے کوئی صارف موجود نہیں.\nاپنا ہجہ جانچئے.",
        "nouserspecified": "آپ کو ایک اسمِ صارف مخصوص کرنا ہے.",
        "login-userblocked": "اِس صارف پر پابندی ہے. داخلِ نوشتہ ہونے کی اجازت نہیں.",
        "noemail": "صارف \"$1\" کیلئے کوئی برقی پتہ درج نہیں کیا گیا.",
        "noemailcreate": "صحیح برقی پتہ مہیّا کریں",
        "passwordsent": "ایک نیا کلمۂ شناخت \"$1\" کے نام سے بننے والی برقی ڈاک کے پتے کیلیے بھیج دیا گیا ہے۔\nجب وہ موصول ہو جاۓ تو براہ کرم اسکے ذریعے دوبارہ داخل ہوں۔",
-       "blocked-mailpassword": "آپ کا آئی.پی پتہ تدوین سے روک لیا گیا ہے، سو، ناجائز استعمال کو روکنے کیلئے، آپ کے آئی.پی پتہ کو کلمۂ شناخت کی بحالی کا فعل استعمال کرنے کی اِجازت نہیں ہے.",
+       "blocked-mailpassword": "آپ کے آئی پی پتے کی ترمیم کاری پر پابندی لگا دی گئی ہے۔ غلط استعمال سے بچنے کے لیے اس آئی پی پتے سے پاس ورڈ کی بازیابی کی اجازت منسوخ کر دی گئی ہے۔",
        "eauthentsent": "ایک تصدیقی برقی خط نامزد کیے گئے برقی پتہ پر ارسال کردیا گیا ہے۔\nآپ کو موصول ہوئے برقی خط میں ہدایات پر عمل کرکے اس بات کی توثیق کرلیں کہ مذکورہ برقی پتہ آپ کا ہی ہے۔",
        "throttled-mailpassword": "گزشتہ {{PLURAL:$1|گھنٹے|$1 گھنٹوں}} کے دوران پہلے سے ہی پارلفظ (پاسورڈ) کی تبدیلی کے لیے برقی خط بھیجا گيا ہے۔\nناجائز استعمال کے سدّباب کیلئے، {{PLURAL:$1|گھنٹہ|$1 گھنٹوں}} کے دوران صرف ایک برقی خط بھیجا جاسکتا ہے۔",
        "mailerror": "مسلہ دوران ترسیل خط:$1",
        "createaccount-title": "کھاتہ سازی برائے {{SITENAME}}",
        "createaccount-text": "کسی نے {{SITENAME}} ($4) پر \"$2\" کے نام سے اور \"$3\" پارلفظ کے ساتھ آپ کا برقی پتہ استعمال کرتے ہوئے کھاتہ بنایا ہے.\nآپ کو چاہئے کہ ابھی داخلِ نوشتہ ہوکر اپنا پارلفظ تبدیل کردیں.\n\nاگر یہ کھاتہ غلطی سے بنا تھا تو آپ یہ پیغام نظرانداز کرسکتے ہیں.",
        "login-throttled": "آپ نے حال ہی میں متعدد مرتبہ لاگ ان ہونے کی کوشش کی ہے۔\nدوبارہ کوشش کرنے سے پہلے $1 انتظار فرمائیے۔",
-       "login-abort-generic": "آپ داخل (لاگ ان) نہیں ہو پائے - ساقط",
+       "login-abort-generic": "لاگ ان ناکام - منسوخ شد",
+       "login-migrated-generic": "آپ کا کھاتہ منتقل کر دیا گیا، اب اس ویکی پر آپ کا صارف نام موجود نہیں۔",
        "loginlanguagelabel": "زبان: $1",
+       "suspicious-userlogout": "کھاتے سے خارج ہونے کی درخواست رد کر دی گئی ہے کیونکہ ایسا معلوم ہوتا ہے یہ درخواست کسی شکستہ براؤزر یا کیشے کی حامل پراکسی سے بھیجی گئی تھی۔",
+       "createacct-another-realname-tip": "حقیقی نام اختیاری ہے۔\nاگر آپ اسے فراہم کریں تو آپ کے کاموں کو اس نام سے منسوب کرنے کے لیے استعمال کیا جائے گا۔",
        "pt-login": "داخل ہوجائیے",
        "pt-login-button": "داخل ہو",
+       "pt-login-continue-button": "داخل ہوں",
        "pt-createaccount": "کھاتا بنائیں",
        "pt-userlogout": "خارج ہوجائیں",
+       "php-mail-error-unknown": "پی ایچ پی کے mail() فنکشن میں نامعلوم نقص۔",
        "user-mail-no-addy": "برقی ڈاک بھیجنے کی کوشش بغیر برقی ڈاک پتہ",
        "user-mail-no-body": "خالی یا بہت ہی مختصر برقی خط بھیجنے کی کوشش",
        "changepassword": "کلمۂ شناخت تبدیل کریں",
        "newpassword": "نیا کلمۂ شناخت",
        "retypenew": "نیا کلمۂ شناخت دوبارہ درج کریں:",
        "resetpass_submit": "پارلفظ بناؤ اور داخل ہوجاؤ",
-       "changepassword-success": "آپ کا پارلفظ کامیابی سے تبدیل ہوگیا!",
+       "changepassword-success": "آپ کا پاس ورڈ تبدیل کر دیا گیا!",
+       "changepassword-throttled": "آپ نے حال ہی میں متعدد مرتبہ داخل ہونے کی کوشش کی ہے۔\nدوبارہ کوشش کرنے سے پہلے $1 انتظار کریں۔",
+       "botpasswords": "روبہ پاس ورڈ",
+       "botpasswords-disabled": "روبہ کے پاس ورڈ غیر فعال ہیں۔",
+       "botpasswords-no-central-id": "روبہ کے پاس ورڈ کو استعمال کرنے کے لیے آپ کا مرکزی کھاتے میں داخل رہنا ضروری ہے۔",
+       "botpasswords-existing": "روبہ کے موجودہ پاس ورڈ",
+       "botpasswords-createnew": "روبہ کا نیا پاس ورڈ بنائیں",
+       "botpasswords-editexisting": "روبہ کے موجودہ پاس ورڈ میں ترمیم کریں",
+       "botpasswords-label-appid": "روبہ کا نام:",
+       "botpasswords-label-create": "تخلیق کریں",
+       "botpasswords-label-update": "تجدید کریں",
+       "botpasswords-label-cancel": "منسوخ کریں",
+       "botpasswords-label-delete": "حذف کریں",
+       "botpasswords-label-resetpassword": "پاس ورڈ تبدیل کریں",
+       "botpasswords-label-grants": "قابل تطبیق عطیے:",
+       "botpasswords-label-restrictions": "استعمال کی پابندیاں:",
+       "botpasswords-label-grants-column": "دے دیا گیا",
+       "botpasswords-bad-appid": "روبہ نام \"$1\" درست نہیں۔",
+       "botpasswords-insert-failed": "روبہ نام \"$1\" کو شامل کرنے میں ناکامی۔ کیا اسے پہلے شامل کیا جا چکا ہے؟",
+       "botpasswords-update-failed": "روبہ نام \"$1\" کی تجدید میں ناکامی۔ کیا اسے حذف کر دیا گیا ہے؟",
+       "botpasswords-created-title": "روبہ کا پاس ورڈ تخلیق ہو چکا ہے",
+       "botpasswords-created-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ تخلیق ہو چکا ہے۔",
+       "botpasswords-updated-title": "روبہ کا پاس ورڈ تازہ کر دیا گیا",
+       "botpasswords-updated-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ تازہ کر دیا گیا۔",
+       "botpasswords-deleted-title": "روبہ کا پاس ورڈ حذف ہو چکا ہے",
+       "botpasswords-deleted-body": "صارف \"$2\" کے روبہ نام \"$1\" کا پاس ورڈ حذف کیا جا چکا ہے۔",
+       "botpasswords-no-provider": "BotPasswordsSessionProvider دستیاب نہیں۔",
+       "botpasswords-restriction-failed": "روبہ کے پاس ورڈ کی پابندیاں اس لاگ ان سے مانع ہیں۔",
+       "botpasswords-invalid-name": "درج کردہ صارف نام میں روبہ کے پاس ورڈ کا فاصل لفظ موجود نہیں ہے (\"$1\")۔",
+       "botpasswords-not-exist": "صارف \"$1\" کے پاس \"$2\" کے نام سے روبہ کا پاس ورڈ نہیں ہے۔",
        "resetpass_forbidden": "پارلفظ تبدیل نہیں ہوسکتا",
+       "resetpass_forbidden-reason": "پاس ورڈ تبدیل نہیں کیا جا سکتا: $1",
        "resetpass-no-info": "اِس صفحہ تک براہِ راست رسائی کیلئے آپ کو داخلِ نوشتہ ہونا پڑے گا.",
        "resetpass-submit-loggedin": "پارلفظ کی تبدیلی",
        "resetpass-submit-cancel": "منسوخ",
-       "resetpass-wrong-oldpass": "عارضÛ\8c Û\8cا Ù\85Ù\88جÙ\88دÛ\81 Ù¾Ø§Ø±Ù\84Ù\81ظ Ù\86اÙ\82ص Û\81Û\92.\nآپ Û\8cا ØªÙ\88 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ø³Û\92 Ø¢Ù¾Ù\86ا Ù¾Ø§Ø±Ù\84Ù\81ظ Ú©Ø§Ù\85Û\8cابÛ\8c Ø³Û\92 ØªØ¨Ø¯Û\8cÙ\84 Ú©Ø±Ú\86Ú©Û\92 Û\81Û\8cÚº Ø§Ù\88ر Û\8cا Ø¢Ù¾ Ù\86Û\92 Ù\86ئÛ\92 Ø¹Ø§Ø±Ø¶Û\8c Ù¾Ø§Ø±Ù\84Ù\81ظ Ú©Û\8c Ø¯Ø±Ø®Ù\88است Ú©Û\8c Û\81Û\92.",
+       "resetpass-wrong-oldpass": "عارضÛ\8c Û\8cا Ù\85Ù\88جÙ\88دÛ\81 Ù¾Ø§Ø³ Ù\88رÚ\88 Ù\86ادرست Û\81Û\92Û\94\nشاÛ\8cد Ø¢Ù¾ Ù\86Û\92 Ù¾Û\81Ù\84Û\92 Û\81Û\8c Ø§Ù¾Ù\86ا Ù¾Ø§Ø³ Ù\88رÚ\88 ØªØ¨Ø¯Û\8cÙ\84 Ú©Ø± Ù\84Û\8cا Û\81Û\92 Û\8cا Ù\86ئÛ\92 Ø¹Ø§Ø±Ø¶Û\8c Ù¾Ø§Ø³ Ù\88رÚ\88 Ú©Û\8c Ø¯Ø±Ø®Ù\88است Ú©Ø± Ú\86Ú©Û\92 Û\81Û\8cÚºÛ\94",
        "resetpass-recycled": "براہ کرم اپنے موجودہ کلمۂ شناخت (پاسورڈ) سے مختلف کلمۂ شناخت سے بازترتیب (ری‌سیٹ) کریں",
        "resetpass-temp-emailed": "آپ عارضی برقی خط سے بھیجے گئے کوڈ سے لاگ ان ہیں\nمکمل طور پر لاگ ان ہونے کے لیے آپ کو نیا پاسورڈ سیٹ کرنا پڑے گا",
        "resetpass-temp-password": "عارضی پارلفظ:",
+       "resetpass-abort-generic": "کسی توسیع نے پاس ورڈ کی تبدیلی کو منسوخ کر دیا ہے۔",
+       "resetpass-expired": "آپ کے پاس ورد کی مدت ختم ہو چکی ہے۔ داخل ہونے کے لیے براہ کرم نیا پاس ورڈ بنائیں۔",
+       "resetpass-expired-soft": "آپ کے پاس ورڈ کی مدت ختم ہو چکی ہے، لہذا اسے دوبارہ بنانے کی ضرورت ہے۔\nبراہ کرم نیا پاس ورڈ بنائیں، تاہم اگر مستقبل میں اس کی ترتیب نو مقصود ہو تو «{{int:authprovider-resetpass-skip-label}}» پر کلک کریں۔",
+       "resetpass-validity-soft": "آپ کا پاس ورڈ درست نہیں: $1\n\nبراہ کرم نیا پاس ورڈ بنائیں، تاہم اگر مستقبل میں اس کی ترتیب نو مقصود ہو تو «{{int:authprovider-resetpass-skip-label}}» پر کلک کریں۔",
        "passwordreset": "پارلفظ کی بازتعینی",
+       "passwordreset-text-one": "برقی خط کے ذریعہ عارضی پاس ورڈ حاصل کرنے کے لیے اس فارم کو پُر کریں۔",
+       "passwordreset-text-many": "{{PLURAL:$1|برقی خط کے ذریعہ عارضی پاس ورڈ حاصل کرنے کے لیے کسی ایک خانے کو پُر کریں۔}}",
+       "passwordreset-disabled": "اس ویکی پر پاس ورڈ کی ترتیب نو کی سہولت فعال نہیں ہے۔",
+       "passwordreset-emaildisabled": "اس ویکی پر برقی خط کی سہولت غیر فعال ہیں۔",
        "passwordreset-username": "اسمِ صارف:",
        "passwordreset-domain": "ساحہ:",
+       "passwordreset-capture": "برقی خط کی حتمی شکل دیکھیں؟",
+       "passwordreset-capture-help": "اس خانے کو نشان زد کرنے کی صورت میں (عارضی پاس ورڈ کا حامل) برقی خط آپ کو بھی نظر آئے گا اور صارف کو بھی روانہ کیا جائے گا۔",
        "passwordreset-email": "برقی ڈاک پتہ:",
+       "passwordreset-emailtitle": "{{SITENAME}} کھاتہ کی تفصیلات",
+       "passwordreset-emailelement": "صارف نام:\n$1\n\nعارضی پاس ورڈ: \n$2",
+       "passwordreset-emailsentemail": "اگر یہ برقی ڈاک پتا آپ کے کھاتے سے منسلک ہے تو پاس ورڈ کی ترتیب نو کا برقی خط بھیج دیا جائے گا۔",
+       "passwordreset-emailsentusername": "اگر کوئی برقی ڈاک پتا آپ کے کھاتے سے منسلک ہے تو پاس ورڈ کی ترتیب نو کا برقی خط بھیج دیا جائے گا۔",
+       "passwordreset-emailsent-capture2": "پاس ورڈ کی ترتیب نو {{PLURAL:$1|کا برقی خط بھیج دیا گیا ہے|کے برقی خطوط بھیج دیے گئے ہیں}}۔ {{PLURAL:$1|صارف نام اور پاس ورڈ|صارف ناموں اور ان کے پاس ورڈ کی فہرست}} ذیل میں ملاحظہ فرمائیں۔",
+       "passwordreset-emailerror-capture2": "{{GENDER:$2|صارف}} کو برقی خط بھیجنے میں ناکامی: $1\n{{PLURAL:$3|صارف نام اور پاس ورڈ|صارف ناموں کی فہرست اور ان کے پاس ورڈ}} ذیل میں ملاحظہ فرمائیں۔",
+       "passwordreset-nocaller": "کالر کا فراہم کیا جانا لازمی ہے",
+       "passwordreset-nosuchcaller": "کالر موجود نہیں: $1",
+       "passwordreset-invalideamil": "نادرست برقی ڈاک پتا",
+       "passwordreset-nodata": "کوئی صارف نام اور نہ کوئی برقی ڈاک پتا فراہم کیا گیا",
+       "changeemail": "برقی ڈاک پتا تبدیل یا حذف کریں",
+       "changeemail-header": "اپنے برقی ڈاک پتے کو تبدیل کرنے کے لیے اس فارم کو پُر کریں۔ اگر آپ اپنے کھاتے سے منسلک کسی برقی ڈاک پتے کو ختم کرنا چاہتے ہیں تو فارم پُر کرنے کے دوران میں نئے برقی ڈاک پتے کا خانہ خالی چھوڑ دیں۔",
+       "changeemail-no-info": "اِس صفحہ تک براہِ راست رسائی کیلئے آپ کو داخل ہونا پڑے گا۔",
        "changeemail-oldemail": "حالیہ برقی ڈاک پتہ:",
        "changeemail-newemail": "نیا برقی ڈاک پتہ:",
+       "changeemail-newemail-help": "اگر آپ اپنا برقی ڈاک پتہ حذف کرنا چاہتے ہیں تو اس خانے کو خالی چھوڑ دیں۔ تاہم اس صورت میں آپ کو ویکی کے برقی خطوط موصول نہیں ہونگے نیز فراموش شدہ پاس ورڈ کی ترتیب نو کا اختیار بھی ختم کر دیا جائے گا۔",
        "changeemail-none": "(کوئی نہیں)",
+       "changeemail-password": "آپ کا {{SITENAME}} پاس ورڈ:",
        "changeemail-submit": "برقی ڈاک تبدیل کریں",
+       "changeemail-throttled": "آپ نے متعدد مرتبہ داخل ہونے کی کوشش کی ہے۔\nدوبارہ کوشش کرنے سے پہلے $1 انتظار فرمائیں۔",
+       "changeemail-nochange": "براہ کرم کوئی دوسرا برقی ڈاک پتہ درج کریں۔",
+       "resettokens": "ٹوکنوں کو دوبارہ ترتیب دیں",
+       "resettokens-no-tokens": "ترتیب نو کے لیے کوئی ٹوکن موجود نہیں۔",
        "resettokens-tokens": "ٹوکن:",
        "resettokens-token-label": "$1 (موجودہ قدر: $2)",
+       "resettokens-watchlist-token": "[[Special:Watchlist|آپ کی زیرنظر فہرست میں موجود صفحات کی تبدیلیوں]] کی ویب فیڈ (آٹوم/آر ایس ایس) کا ٹوکن",
+       "resettokens-done": "ٹوکنوں کی ترتیب نو مکمل۔",
+       "resettokens-resetbutton": "منتخب ٹوکنوں کو دوبارہ مرتب کریں",
        "bold_sample": "دبیز متن",
        "bold_tip": "دبیز متن",
        "italic_sample": "ترچھا متن",
        "preview": "نمائش",
        "showpreview": "نمائش",
        "showdiff": "تبدیلیاں دکھائیں",
+       "blankarticle": "<strong>انتباہ:</strong> آپ خالی صفحہ تخلیق کر رہے ہیں۔\nاگر آپ «{{int:savearticle}}» پر دوبارہ کلک کریں تو یہ صفحہ بغیر کسی مواد کے محفوظ ہو جائے گا۔",
        "anoneditwarning": "<strong>انتباہ:</strong> آپ ویکیپیڈیا میں داخل نہیں ہوئے ہیں۔ لہذا اگر آپ اس صفحہ میں کوئی ترمیم کرتے ہیں تو آپکا آئی پی ایڈریس (IP) اس صفحہ کے تاریخچہ ترمیم میں محفوظ ہوجائے گا۔ اگر آپ  <strong>[$1 لاگ ان]</strong> ہوتے ہیں یا کھاتہ نہ ہونے کی صورت میں <strong>[$2 کھاتہ بنا لیتے ہیں]</strong> تو تو آپ کی ترامیم آپ کے صارف نام سے محفوظ ہوگی، جنھیں آپ کسی بھی وقت ملاحظہ کر سکتے ہیں۔",
+       "anonpreviewwarning": "<em>آپ داخل نہیں ہیں، چنانچہ تبدیلیاں محفوظ کرنے کی صورت میں اس صفحہ کا تاریخچہ آپ کا آئی پی پتا محفوظ کر لے گا۔</em>",
        "missingsummary": "'''انتباہ:''' آپ نے ترمیمی خلاصہ مہیّا نہیں کیا.\nاگر آپ نے محفوظ کا بٹن دوبارہ دبایا تو آپ کی ترمیم بغیر کسی خلاصہ کے محفوظ ہوجائے گی.",
+       "selfredirect": "<strong>انتباہ:</strong> آپ پیش نظر صفحہ کو خود اسی کی جانب رجوع مکرر کر رہے ہیں۔\nشاید آپ نے رجوع مکرر کا غلط ہدف درج کیا ہے یا غلط صفحہ میں ترمیم کر رہے ہیں۔\nتاہم اگر آپ «{{int:savearticle}}» پر دوبارہ کلک کریں تو بہرصورت اس رجوع مکرر کو بنا دیا جائے گا۔",
        "missingcommenttext": "براہِ کرم! تبصرہ نیچے درج کیجئے.",
        "missingcommentheader": "<strong>یاددہانی:</strong>  آپ نے اِس تبصرہ کیلئے عنوان یا شہ سرخی مہیّا نہیں کی ہے۔\nاگر آپ نے \"{{int:savearticle}}\" کا بٹن دوبارہ دبایا تو آپ کا تبصرہ بغیر کسی عنوان کے محفوظ ہوجائے گا۔",
        "summary-preview": "نمائش خلاصہ:",
        "subject-preview": "عنوان/شہ سرخی کی نمائش:",
+       "previewerrortext": "آپ کی تبدیلیوں کی نمائش دکھانے کے دوران میں کوئی نقص واقع ہو گیا ہے۔",
        "blockedtitle": "صارف مسدود ہے",
        "blockedtext": "'''آپکا اسمِ صارف یا آئی پی پتہ پر پابندی ہے.'''\n\n$1 نے پابندی لگائی تھی.\nوجہ یہ بتائی گئی کہ ''$2''.\n\n* پابندی کی ابتداء : $8\n* پابندی کا اختتام : $6\n* Intended blockee: $7\n\nآپ $1 یا کسی دوسرے [[{{MediaWiki:Grouppage-sysop}}|منتظم]] سے رابطہ کرکے پابندی پر بات چیت کرسکتے ہیں.\nآپ ‘صارف کو برقی خط ارسال کریں’ کی خاصیت اُس وقت تک استعمال نہیں کرسکتے جب تک آپ اپنے [[Special:Preferences|کھاتہ کے ترجیحات]] میں صحیح برقی پتہ معیّن نہ کریں، اور آپ کو اِسے استعمال کرنے سے پابند نہیں کیا گیا ہے.\nآپکا موجودہ آئی پی پتہ $3 ہے، اور پابندی کی شناخت #$5 ہے.\nبراہِ مہربانی کسی بھی قسم کے استفسار میں درج بالا تمام تفاصیل شامل کریں.",
        "blockednoreason": "کوئی وجہ نہیں دی گئی",
        "anontalkpagetext": "----''یہ صفحہ ایک ایسے صارف کا ہے جنہوں نے یا تو اب تک اپنا کھاتا نہیں بنایا یا پھر وہ اسے استعمال نہیں کر رہے/ رہی ہیں۔ لہٰذا ہمیں انکی شناخت کے لئے ایک عددی آئی پی پتہ استعمال کرنا پڑرہا ہے۔ اس قسم کا آئی پی پتہ ایک سے زائد صارفین کے لئے مشترک بھی ہوسکتا ہے۔ اگر آپکی موجودہ حیثیت ایک گمنام صارف کی ہے اور آپ محسوس کریں کہ اس صفحہ پر آپکی جانب منسوب یہ بیان غیرضروری ہے تو براہ کرم [[Special:CreateAccount|کھاتہ بنائیں]] یا [[Special:UserLogin|داخلِ نوشتہ]] ہوجائیے تاکہ مستقبل میں آپکو گمنام صارفین میں شمار کرنے سے پرہیز کیا جاسکے۔\"",
        "noarticletext": "اِس صفحہ میں فی الحال کوئی متن موجود نہیں ہے۔\nآپ دیگر صفحات میں [[Special:Search/{{PAGENAME}}|اِس صفحہ کے عنوان کو تلاش کر سکتے ہیں]]، <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} متعلقہ نوشتہ جات میں تلاش کر سکتے ہیں]،\nیا [{{fullurl:{{FULLPAGENAME}}|action=edit}} اِس صفحہ کو تخلیق کر سکتے ہیں]</span>۔",
        "noarticletext-nopermission": "اس صفحہ میں فی الحال کوئی متن موجود نہیں ہے۔\nآپ دیگر صفحات میں [[Special:Search/{{PAGENAME}}|اِس صفحہ کے عنوان کے لیے]] یا <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} متعلقہ نوشتہ جات تلاش کرسکتے ہیں]</span>",
+       "userpage-userdoesnotexist": "«$1» کے نام سے صارف کھاتہ موجود نہیں ہے۔\nاگر آپ اس صفحہ کو تخلیق یا اس میں ترمیم کرنا چاہتے ہیں تو براہ کرم پہلے جانچ لیں۔",
        "userpage-userdoesnotexist-view": "صارف کھاتہ \"$1\" مندرج نہیں ہے۔",
+       "blocked-notice-logextract": "یہ صارف معطل ہے۔\nحوالہ کے لیے نوشتہ پابندی کا تازہ ترین اندراج ذیل میں دستیاب ہے:",
+       "clearyourcache": "<strong>یاددہانی:</strong> محفوظ کرنے کے بعد ان تبدیلیوں کو دیکھنے کے لیے آپ کو اپنے براؤزر کا کیشے صاف کرنا ہوگا۔\n* '''فائرفاکس/ سفاری:''' جب ''Reload'' پر کلک کریں تو ''Shift'' دباکر رکھیں، یا ''Ctrl-F5'' یا ''Ctrl-R'' دبائیں (Mac پر ''R-⌘'')\n* '''گوگل کروم:''' ''Ctrl-Shift-R'' دبائیں (Mac پر ''Shift-R-⌘'')\n* '''انٹرنیٹ ایکسپلورر:''' جب ''Refresh'' پر کلک کریں تو ''Ctrl'' یا ''Ctrl-F5'' دبائیں\n* '''اوپیرا:'''  ''Tools → Preferences'' میں جائیں اور کیشے (cache) صاف کریں",
+       "usercssyoucanpreview": "<strong>نکتہ:</strong> اپنی نئی سی ایس ایس کو جانچنے کے لیے اسے محفوظ کرنے سے قبل «{{int:showpreview}}» کی بٹن استعمال کریں۔",
+       "userjsyoucanpreview": "<strong>نکتہ:</strong> اپنی نئی جاوا اسکرپٹ کو جانچنے کے لیے اسے محفوظ کرنے سے قبل «{{int:showpreview}}» کی بٹن استعمال کریں۔",
+       "usercsspreview": "<strong>یاد رہے کہ اس وقت آپ اپنی سی ایس کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "userjspreview": "<strong>یاد رہے کہ اس وقت آپ اپنی جاوا اسکرپٹ کی محض نمائش دیکھ/جانچ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "sitecsspreview": "<strong>یاد رہے کہ اس وقت آپ اس سی ایس کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "sitejspreview": "<strong>یاد رہے کہ اس وقت آپ اس جاوا اسکرپٹ کوڈ کی محض نمائش دیکھ رہے ہیں، یہ اب تک محفوظ نہیں ہوئی ہے!</strong>",
+       "userinvalidcssjstitle": "<strong>انتباہ:</strong> یہاں «$1» نام سے کوئی پوشاک موجود نہیں۔ شخصی .css اور .js کے صفحات اپنے عنوان میں چھوٹے حروف استعمال کرتے ہیں، مثلاً {{ns:user}}:Foo/Vector.css کی بجائے {{ns:user}}:Foo/vector.css",
        "updated": "(اپ ڈیٹڈ)",
        "note": "'''نوٹ:'''",
        "previewnote": "'''یاد رکھیں، یہ صرف نمائش ہے ۔آپ کی ترامیم ابھی محفوظ نہیں کی گئیں۔'''",
+       "continue-editing": "خانہ ترمیم میں جائیں",
+       "previewconflict": "اس نمائش میں خانہ ترمیم کے اوپر موجود متن جس انداز میں ظاہر ہو رہا ہے، محفوظ کرنے کے بعد اسی طرح نظر آئے گا۔",
        "session_fail_preview": "معاف کیجئے! نشست کے مواد میں خامی کی وجہ سے آپکی  ترمیم پر عمل نہیں کیا جاسکا.\nبرائے مہربانی دوبارہ کوشش کیجئے.\nاگر آپکو پھر بھی مشکل پیش آرہی ہے تو [[Special:UserLogout|خارجِ نوشتہ]] ہوکر واپس داخلِ نوشتہ ہوجایئے.",
        "editing": "آپ \"$1\" میں ترمیم کر رہے ہیں۔",
        "creating": "زیر تخلیق $1",
        "postedit-confirmation-saved": "آپ کی ترمیم محفوظ ہوگئی۔",
        "edit-already-exists": "نیا صفحہ تخلیق نہیں کیا جاسکتا.\nیہ پہلے سے موجود ہے.",
        "defaultmessagetext": "طے شدہ پیغام کا متن",
+       "invalid-content-data": "نادرست ڈیٹا مندرجات",
+       "content-model-wikitext": "ویکی متن",
        "content-model-text": "سادہ متن",
        "content-model-javascript": "جاوا اسکرپٹ",
+       "content-json-empty-object": "خالی آبجیکٹ",
+       "content-json-empty-array": "خالی ایرے",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|تبادلہ خیال]]) کی جانب سے کی گئی ترمیم $1 رد کردی گئی ہے۔",
        "viewpagelogs": "اس صفحہ کیلیے نوشتہ جات دیکھیے",
        "nohistory": "اِس صفحہ کیلئے کوئی تدوینی تاریخچہ موجود نہیں ہے.",
        "history-edit-tags": "منتخب نظرثانیوں کے ٹیگوں میں ترمیم کریں",
        "rev-deleted-comment": "(تبصرہ حذف کی گيا ہے)",
        "rev-deleted-user": "(صارف نام حذف کیا گيا ہے)",
+       "rev-deleted-event": "(نوشتہ کی تفصیلات ہٹا دی گئیں)",
        "rev-delundel": "دکھاؤ/چھپاؤ",
        "rev-showdeleted": "دکھاؤ",
        "revisiondelete": "نظرثانی حذف کریں/واپس لائیں",
        "revdelete-nooldid-title": "ناقص مقصود نظرثانی",
+       "revdelete-no-file": "درج کردہ فائل موجود نہیں ہے۔",
        "revdelete-show-file-submit": "ہاں",
        "logdelete-selected": "{{PLURAL:$1|منتخب واقعۂ نوشتہ|منتخب واقعاتِ نوشتہ}}:",
        "revdelete-confirm": "برائے مہربانی! یقین دِہانی کرلیجئے کہ آپ واقعی ایسا کرنا چاہتے ہیں، آپ اِس کے نتائج سے باخبر ہیں، اور آپ یہ [[{{MediaWiki:Policy-url}}|پالیسی]] کے مطابق کررہے ہیں.",
        "mergelog": "نوشتہ کا انضمام",
        "revertmerge": "غیر ضم",
        "history-title": "\"$1\" کا نظرثانی تاریخچہ",
-       "difference-title": "\"$1\" کے اعادوں کے درمیان فرق",
+       "difference-title": "\"$1\" کے نسخوں کے درمیان فرق",
        "difference-multipage": "(فرق مابین صفحات)",
        "lineno": "لکیر $1:",
        "compareselectedversions": "منتخب متـن کا موازنہ",
        "shortpages": "چھوٹے صفحات",
        "longpages": "طویل ترین صفحات",
        "deadendpages": "مردہ صفحات",
-       "protectedpages": "محفوظ کردہ صفحات",
+       "protectedpages": "محفوظ صفحات",
+       "protectedpages-summary": "ذیل میں ان صفحات کی فہرست موجود ہے جو ابھی محفوظ ہیں۔ محفوظ شدہ عنوانات جنہیں تخلیق نہیں کیا جا سکتا، ان کی فہرست کے لیے [[{{#special:ProtectedTitles}}|{{int:protectedtitles}}]] ملاحظہ فرمائیں۔",
        "protectedpages-noredirect": "رجوع مکررات چھپائیں",
        "protectedpages-timestamp": "وقت کی مہر",
        "protectedpages-page": "صفحہ",
        "protectedpages-expiry": "مدت محفوظ شدگی",
        "protectedpages-performer": "محفوظ کنندہ",
-       "protectedpages-params": "معیار حفاظت",
+       "protectedpages-params": "درجہ حفاظت",
        "protectedpages-reason": "وجہ",
        "protectedpages-submit": "صفحات دکھائیں",
        "protectedpages-unknown-timestamp": "نامعلوم",
        "protectedpages-unknown-performer": "نامعلوم صارف",
-       "protectedtitles": "Ù\85سدÙ\88د عنوانات",
-       "protectedtitles-summary": "یہ ان صفحات کی فہرست ہے جن کو تخلیق نہیں کیا جا سکتا۔ یہ عنوانات محفوظ شدہ ہیں، جن کو تخلیق نہیں کیا جا سکتا۔ دیکھیے [[{{#خاص:محفوظ صفحات}}|{{int:protectedpages}}]].",
+       "protectedtitles": "Ù\85Ø­Ù\81Ù\88ظ عنوانات",
+       "protectedtitles-summary": "ذیل میں ان عنوانات کی فہرست ہے جنہیں تخلیق نہیں کیا جا سکتا، یہ عنوانات محفوظ شدہ ہیں۔ ان صفحات کی فہرست کے لیے جو ابھی محفوظ ہیں [[{{#special:ProtectedPages}}|{{int:protectedpages}}]] ملاحظہ فرمائیں۔",
        "protectedtitles-submit": "دکھائیں",
        "listusers": "فہرست ارکان",
        "usereditcount": "$1 {{PLURAL:$1|ترمیم|ترامیم}}",
        "restriction-edit": "تحریر و ترمیم",
        "restriction-move": "منتقل",
        "restriction-create": "تخلیق",
-       "restriction-upload": "زبراثÙ\82اÙ\84",
+       "restriction-upload": "اپÙ\84Ù\88Ú\88",
        "restriction-level-sysop": "مکمل محفوظ",
        "restriction-level-autoconfirmed": "نیم محفوظ",
        "restriction-level-all": "کوئی بھی سطح",
        "delete_and_move_text": "==حذف شدگی لازم==\n\nمنتقلی کے سلسلے میں انتخاب کردہ مضمون \"[[:$1]]\" پہلے ہی موجود ہے۔ کیا آپ اسے حذف کرکے منتقلی کیلیۓ راستہ بنانا چاہتے ہیں؟",
        "delete_and_move_confirm": "ہاں، صفحہ حذف کر دیا جائے",
        "delete_and_move_reason": "[[$1]] سے منتقلی کے سلسلے میں حذف",
+       "protectedpagemovewarning": "<strong>انتباہ:</strong> اس صفحہ کو محفوظ کر دیا گیا ہے اور اب محض منتظمین ہی اسے منتقل کر سکتے ہیں۔\nحوالہ کے لیے نوشتہ کا جدید اندراج ذیل میں درج ہے:",
        "export": "برآمد صفحات",
        "allmessages": "نظامی پیغامات",
        "allmessagesname": "نام",
index 27b2c14..45f0721 100644 (file)
        "tog-enotifminoredits": "当我的监视列表中的页面和文件有小编辑时也发送电子邮件通知我",
        "tog-enotifrevealaddr": "在通知电子邮件中显示我的电子邮件地址",
        "tog-shownumberswatching": "显示监视用户数",
-       "tog-oldsig": "当前签名:",
+       "tog-oldsig": "您现有的签名:",
        "tog-fancysig": "将签名视为维基文本(不自动生成链接)",
        "tog-uselivepreview": "使用实时预览",
        "tog-forceeditsummary": "未输入编辑摘要时提醒我",
        "tog-showhiddencats": "显示隐藏分类",
        "tog-norollbackdiff": "执行回退后不显示差异",
        "tog-useeditwarning": "当我离开编辑页面时,如果有尚未保存的更改,请提醒我",
-       "tog-prefershttps": "登录时始终使用安全连接",
+       "tog-prefershttps": "在登录时总是使用安全连接",
        "underline-always": "始终",
        "underline-never": "从不",
        "underline-default": "皮肤或浏览器默认设置",
        "newwindow": "(在新窗口中打开)",
        "cancel": "取消",
        "moredotdotdot": "更多...",
-       "morenotlisted": "æ\9c¬å\88\97表不完整。",
+       "morenotlisted": "æ­¤å\88\97表å\8f¯è\83½不完整。",
        "mypage": "页面",
        "mytalk": "讨论",
        "anontalk": "讨论",
index 6f91f1e..d9ef8bc 100644 (file)
@@ -18,6 +18,8 @@
  * @author Yanteng3
  */
 
+$fallback = 'zh-hant'; // T125373
+
 $specialPageAliases = [
        'Activeusers'               => [ '躍簿' ],
        'Allmessages'               => [ '官話' ],
index 2216de1..7e0fb45 100644 (file)
@@ -553,8 +553,19 @@ abstract class Maintenance {
         * Set triggers like when to try to run deferred updates
         * @since 1.28
         */
-       public function setTriggers() {
+       public function setAgentAndTriggers() {
+               if ( function_exists( 'posix_getpwuid' ) ) {
+                       $agent = posix_getpwuid( posix_geteuid() )['name'];
+               } else {
+                       $agent = 'sysadmin';
+               }
+               $agent .= '@' . wfHostname();
+
                $lbFactory = MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+               // Add a comment for easy SHOW PROCESSLIST interpretation
+               $lbFactory->setAgentName(
+                       mb_strlen( $agent ) > 15 ? mb_substr( $agent, 0, 15 ) . '...' : $agent
+               );
                self::setLBFactoryTriggers( $lbFactory );
        }
 
@@ -1091,7 +1102,7 @@ abstract class Maintenance {
                                $wgLBFactoryConf['serverTemplate']['user'] = $wgDBuser;
                                $wgLBFactoryConf['serverTemplate']['password'] = $wgDBpassword;
                        }
-                       LBFactory::destroyInstance();
+                       MediaWikiServices::getInstance()->getDBLoadBalancerFactory()->destroy();
                }
 
                // Per-script profiling; useful for debugging
index 884e307..1753250 100644 (file)
@@ -24,6 +24,8 @@
 
 require __DIR__ . '/../Maintenance.php';
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Maintenance script to benchmark how long it takes to parse a given title at an optionally
  * specified timestamp
@@ -34,6 +36,13 @@ class BenchmarkParse extends Maintenance {
        /** @var string MediaWiki concatenated string timestamp (YYYYMMDDHHMMSS) */
        private $templateTimestamp = null;
 
+       private $clearLinkCache = false;
+
+       /**
+        * @var LinkCache
+        */
+       private $linkCache;
+
        /** @var array Cache that maps a Title DB key to revision ID for the requested timestamp */
        private $idCache = [];
 
@@ -52,6 +61,8 @@ class BenchmarkParse extends Maintenance {
                        'Use templates which were current at the given time (except that moves and ' .
                        'deletes are not handled properly)',
                        false, true );
+               $this->addOption( 'reset-linkcache', 'Reset the LinkCache after every parse.',
+                       false, false );
        }
 
        function execute() {
@@ -60,6 +71,10 @@ class BenchmarkParse extends Maintenance {
                        Hooks::register( 'BeforeParserFetchTemplateAndtitle', [ $this, 'onFetchTemplate' ] );
                }
 
+               $this->clearLinkCache = $this->hasOption( 'reset-linkcache' );
+               // Set as a member variable to avoid function calls when we're timing the parse
+               $this->linkCache = MediaWikiServices::getInstance()->getLinkCache();
+
                $title = Title::newFromText( $this->getArg() );
                if ( !$title ) {
                        $this->error( "Invalid title" );
@@ -144,6 +159,9 @@ class BenchmarkParse extends Maintenance {
        function runParser( Revision $revision ) {
                $content = $revision->getContent();
                $content->getParserOutput( $revision->getTitle(), $revision->getId() );
+               if ( $this->clearLinkCache ) {
+                       $this->linkCache->clear();
+               }
        }
 
        /**
index 890fe45..60b24a2 100644 (file)
@@ -104,7 +104,7 @@ $maintenance->checkRequiredExtensions();
 
 // A good time when no DBs have writes pending is around lag checks.
 // This avoids having long running scripts just OOM and lose all the updates.
-$maintenance->setTriggers();
+$maintenance->setAgentAndTriggers();
 
 // Do the work
 $maintenance->execute();
index ff39537..89168db 100644 (file)
@@ -165,6 +165,12 @@ return [
                ],
                'scripts' => 'resources/lib/jquery/jquery.appear.js',
        ],
+       'jquery.arrowSteps' => [
+               'deprecated' => true,
+               'scripts' => 'resources/src/jquery/jquery.arrowSteps.js',
+               'styles' => 'resources/src/jquery/jquery.arrowSteps.css',
+               'targets' => [ 'desktop', 'mobile' ],
+       ],
        'jquery.async' => [
                'scripts' => 'resources/lib/jquery/jquery.async.js',
        ],
diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png
new file mode 100644 (file)
index 0000000..84ed2a2
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.divider-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png
new file mode 100644 (file)
index 0000000..c212aeb
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.divider-rtl.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png
new file mode 100644 (file)
index 0000000..e6546bf
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.head-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png
new file mode 100644 (file)
index 0000000..2af30b9
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.head-rtl.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png b/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png
new file mode 100644 (file)
index 0000000..3ad990b
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.tail-ltr.png differ
diff --git a/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png b/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png
new file mode 100644 (file)
index 0000000..1d3048e
Binary files /dev/null and b/resources/src/jquery/images/jquery.arrowSteps.tail-rtl.png differ
diff --git a/resources/src/jquery/jquery.arrowSteps.css b/resources/src/jquery/jquery.arrowSteps.css
new file mode 100644 (file)
index 0000000..d24fcc9
--- /dev/null
@@ -0,0 +1,45 @@
+.arrowSteps {
+       list-style-type: none;
+       list-style-image: none;
+       border: 1px solid #666;
+       position: relative;
+}
+
+.arrowSteps li {
+       float: left;
+       padding: 0px;
+       margin: 0px;
+       border: 0 none;
+}
+
+.arrowSteps li div {
+       padding: 0.5em;
+       text-align: center;
+       white-space: nowrap;
+       overflow: hidden;
+}
+
+.arrowSteps li.arrow div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.divider-ltr.png ) no-repeat right center;
+}
+
+/* applied to the element preceding the highlighted step */
+.arrowSteps li.arrow.tail div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.tail-ltr.png ) no-repeat right center;
+}
+
+/* this applies to all highlighted, including the last */
+.arrowSteps li.head div {
+       /* @embed */
+       background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat left center;
+       font-weight: bold;
+}
+
+/* this applies to all highlighted arrows except the last */
+.arrowSteps li.arrow.head div {
+       /* TODO: eliminate duplication of jquery.arrowSteps.head.png embedding */
+       /* @embed */
+       background: url( images/jquery.arrowSteps.head-ltr.png ) no-repeat right center;
+}
diff --git a/resources/src/jquery/jquery.arrowSteps.js b/resources/src/jquery/jquery.arrowSteps.js
new file mode 100644 (file)
index 0000000..b0c36c6
--- /dev/null
@@ -0,0 +1,98 @@
+/*!
+ * jQuery arrowSteps plugin
+ * Copyright Neil Kandalgaonkar, 2010
+ *
+ * This work is licensed under the terms of the GNU General Public License,
+ * version 2 or later.
+ * (see http://www.fsf.org/licensing/licenses/gpl.html).
+ * Derivative works and later versions of the code must be free software
+ * licensed under the same or a compatible license.
+ */
+
+/**
+ * @class jQuery.plugin.arrowSteps
+ */
+( function ( $ ) {
+       /**
+        * Show users their progress through a series of steps, via a row of items that fit
+        * together like arrows. One item can be highlighted at a time.
+        *
+        *     <ul id="robin-hood-daffy">
+        *       <li id="guard"><div>Guard!</div></li>
+        *       <li id="turn"><div>Turn!</div></li>
+        *       <li id="parry"><div>Parry!</div></li>
+        *       <li id="dodge"><div>Dodge!</div></li>
+        *       <li id="spin"><div>Spin!</div></li>
+        *       <li id="ha"><div>Ha!</div></li>
+        *       <li id="thrust"><div>Thrust!</div></li>
+        *     </ul>
+        *
+        *     <script>
+        *       $( '#robin-hood-daffy' ).arrowSteps();
+        *     </script>
+        *
+        * @return {jQuery}
+        * @chainable
+        */
+       $.fn.arrowSteps = function () {
+               var $steps, width, arrowWidth, $stepDiv,
+                       $el = this,
+                       paddingSide = $( 'body' ).hasClass( 'rtl' ) ? 'padding-left' : 'padding-right';
+
+               $el.addClass( 'arrowSteps' );
+               $steps = $el.find( 'li' );
+
+               width = parseInt( 100 / $steps.length, 10 );
+               $steps.css( 'width', width + '%' );
+
+               // Every step except the last one has an arrow pointing forward:
+               // at the right hand side in LTR languages, and at the left hand side in RTL.
+               // Also add in the padding for the calculated arrow width.
+               $stepDiv = $steps.filter( ':not(:last-child)' ).addClass( 'arrow' ).find( 'div' );
+
+               // Execute when complete page is fully loaded, including all frames, objects and images
+               $( window ).on( 'load', function () {
+                       arrowWidth = parseInt( $el.outerHeight(), 10 );
+                       $stepDiv.css( paddingSide, arrowWidth.toString() + 'px' );
+               } );
+
+               $el.data( 'arrowSteps', $steps );
+
+               return this;
+       };
+
+       /**
+        * Highlights the element selected by the selector.
+        *
+        *       $( '#robin-hood-daffy' ).arrowStepsHighlight( '#guard' );
+        *       // 'Guard!' is highlighted.
+        *
+        *       // ... user completes the 'guard' step ...
+        *
+        *       $( '#robin-hood-daffy' ).arrowStepsHighlight( '#turn' );
+        *       // 'Turn!' is highlighted.
+        *
+        * @param {string} selector
+        */
+       $.fn.arrowStepsHighlight = function ( selector ) {
+               var $previous,
+                       $steps = this.data( 'arrowSteps' );
+               $.each( $steps, function ( i, step ) {
+                       var $step = $( step );
+                       if ( $step.is( selector ) ) {
+                               if ( $previous ) {
+                                       $previous.addClass( 'tail' );
+                               }
+                               $step.addClass( 'head' );
+                       } else {
+                               $step.removeClass( 'head tail lasthead' );
+                       }
+                       $previous = $step;
+               } );
+       };
+
+       /**
+        * @class jQuery
+        * @mixins jQuery.plugin.arrowSteps
+        */
+}( jQuery ) );
index ffb7736..7fdef25 100644 (file)
         * Category selector widget. Displays an OO.ui.CapsuleMultiselectWidget
         * and autocompletes with available categories.
         *
-        *     var selector = new mw.widgets.CategorySelector( {
-        *       searchTypes: [
-        *         mw.widgets.CategorySelector.SearchType.OpenSearch,
-        *         mw.widgets.CategorySelector.SearchType.InternalSearch
-        *       ]
-        *     } );
+        *     mw.loader.using( 'mediawiki.widgets.CategorySelector', function () {
+        *       var selector = new mw.widgets.CategorySelector( {
+        *         searchTypes: [
+        *           mw.widgets.CategorySelector.SearchType.OpenSearch,
+        *           mw.widgets.CategorySelector.SearchType.InternalSearch
+        *         ]
+        *       } );
         *
-        *     $( '#content' ).append( selector.$element );
+        *       $( 'body' ).append( selector.$element );
         *
-        *     selector.setSearchTypes( [ mw.widgets.CategorySelector.SearchType.SubCategories ] );
+        *       selector.setSearchTypes( [ mw.widgets.CategorySelector.SearchType.SubCategories ] );
+        *     } );
         *
         * @class mw.widgets.CategorySelector
         * @uses mw.Api
index db5a4fb..04807f4 100644 (file)
                                 * response contain calls to this function.
                                 *
                                 * @param {string} module Name of module
-                                * @param {Function|Array} [script] Function with module code or Array of URLs to
-                                *  be used as the src attribute of a new `<script>` tag.
+                                * @param {Function|Array|string} [script] Function with module code, list of URLs
+                                *  to load via `<script src>`, or string of module code for `$.globalEval()`.
                                 * @param {Object} [style] Should follow one of the following patterns:
                                 *
                                 *     { "css": [css, ..] }
index 7df778f..52a1efb 100644 (file)
                /**
                 * Get date user registered, if available
                 *
-                * @return {Date|boolean|null} Date user registered, or false for anonymous users, or
-                *  null when data is not available
+                * @return {boolean|null|Date} False for anonymous users, null if data is
+                *  unavailable, or Date for when the user registered.
                 */
                getRegistration: function () {
-                       var registration = mw.config.get( 'wgUserRegistration' );
                        if ( mw.user.isAnon() ) {
                                return false;
                        }
-                       if ( registration === null ) {
-                               // Information may not be available if they signed up before
-                               // MW began storing this.
-                               return null;
-                       }
-                       return new Date( registration );
+                       var registration = mw.config.get( 'wgUserRegistration' );
+                       // Registration may be unavailable if the user signed up before MediaWiki
+                       // began tracking this.
+                       return !registration ? null : new Date( registration );
                },
 
                /**
index 70e4aea..4bca478 100644 (file)
@@ -4,7 +4,6 @@
  * Tests timestamp parsing and output.
  */
 class MWTimestampTest extends MediaWikiLangTestCase {
-
        protected function setUp() {
                parent::setUp();
 
@@ -12,128 +11,6 @@ class MWTimestampTest extends MediaWikiLangTestCase {
                $this->setMwGlobals( 'wgHooks', [] );
        }
 
-       /**
-        * @covers MWTimestamp::__construct
-        */
-       public function testConstructWithNoTimestamp() {
-               $timestamp = new MWTimestamp();
-               $this->assertInternalType( 'string', $timestamp->getTimestamp() );
-               $this->assertNotEmpty( $timestamp->getTimestamp() );
-               $this->assertNotEquals( false, strtotime( $timestamp->getTimestamp( TS_MW ) ) );
-       }
-
-       /**
-        * @covers MWTimestamp::__toString
-        */
-       public function testToString() {
-               $timestamp = new MWTimestamp( '1406833268' ); // Equivalent to 20140731190108
-               $this->assertEquals( '1406833268', $timestamp->__toString() );
-       }
-
-       public static function provideValidTimestampDifferences() {
-               return [
-                       [ '1406833268', '1406833269', '00 00 00 01' ],
-                       [ '1406833268', '1406833329', '00 00 01 01' ],
-                       [ '1406833268', '1406836929', '00 01 01 01' ],
-                       [ '1406833268', '1406923329', '01 01 01 01' ],
-               ];
-       }
-
-       /**
-        * @dataProvider provideValidTimestampDifferences
-        * @covers MWTimestamp::diff
-        */
-       public function testDiff( $timestamp1, $timestamp2, $expected ) {
-               $timestamp1 = new MWTimestamp( $timestamp1 );
-               $timestamp2 = new MWTimestamp( $timestamp2 );
-               $diff = $timestamp1->diff( $timestamp2 );
-               $this->assertEquals( $expected, $diff->format( '%D %H %I %S' ) );
-       }
-
-       /**
-        * Test parsing of valid timestamps and outputing to MW format.
-        * @dataProvider provideValidTimestamps
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testValidParse( $format, $original, $expected ) {
-               $timestamp = new MWTimestamp( $original );
-               $this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW ) );
-       }
-
-       /**
-        * Test outputting valid timestamps to different formats.
-        * @dataProvider provideValidTimestamps
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testValidOutput( $format, $expected, $original ) {
-               $timestamp = new MWTimestamp( $original );
-               $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
-       }
-
-       /**
-        * Test an invalid timestamp.
-        * @expectedException TimestampException
-        * @covers MWTimestamp
-        */
-       public function testInvalidParse() {
-               new MWTimestamp( "This is not a timestamp." );
-       }
-
-       /**
-        * Test an out of range timestamp
-        * @dataProvider provideOutOfRangeTimestamps
-        * @expectedException TimestampException
-        * @covers MWTimestamp
-        */
-       public function testOutOfRangeTimestamps( $format, $input ) {
-               $timestamp = new MWTimestamp( $input );
-               $timestamp->getTimestamp( $format );
-       }
-
-       /**
-        * Test requesting an invalid output format.
-        * @expectedException TimestampException
-        * @covers MWTimestamp::getTimestamp
-        */
-       public function testInvalidOutput() {
-               $timestamp = new MWTimestamp( '1343761268' );
-               $timestamp->getTimestamp( 98 );
-       }
-
-       /**
-        * Returns a list of valid timestamps in the format:
-        * [ type, timestamp_of_type, timestamp_in_MW ]
-        */
-       public static function provideValidTimestamps() {
-               return [
-                       // Various formats
-                       [ TS_UNIX, '1343761268', '20120731190108' ],
-                       [ TS_MW, '20120731190108', '20120731190108' ],
-                       [ TS_DB, '2012-07-31 19:01:08', '20120731190108' ],
-                       [ TS_ISO_8601, '2012-07-31T19:01:08Z', '20120731190108' ],
-                       [ TS_ISO_8601_BASIC, '20120731T190108Z', '20120731190108' ],
-                       [ TS_EXIF, '2012:07:31 19:01:08', '20120731190108' ],
-                       [ TS_RFC2822, 'Tue, 31 Jul 2012 19:01:08 GMT', '20120731190108' ],
-                       [ TS_ORACLE, '31-07-2012 19:01:08.000000', '20120731190108' ],
-                       [ TS_POSTGRES, '2012-07-31 19:01:08 GMT', '20120731190108' ],
-                       // Some extremes and weird values
-                       [ TS_ISO_8601, '9999-12-31T23:59:59Z', '99991231235959' ],
-                       [ TS_UNIX, '-62135596801', '00001231235959' ]
-               ];
-       }
-
-       /**
-        * Returns a list of out of range timestamps in the format:
-        * [ type, timestamp_of_type ]
-        */
-       public static function provideOutOfRangeTimestamps() {
-               return [
-                       // Various formats
-                       [ TS_MW, '-62167219201' ], // -0001-12-31T23:59:59Z
-                       [ TS_MW, '253402300800' ], // 10000-01-01T00:00:00Z
-               ];
-       }
-
        /**
         * @dataProvider provideHumanTimestampTests
         * @covers MWTimestamp::getHumanTimestamp
index 3b21ff8..7687236 100644 (file)
@@ -20,7 +20,11 @@ class ApiQueryAllPagesTest extends ApiTestCase {
        public function testPrefixNormalizationSearchBug() {
                $title = Title::newFromText( 'Category:Template:xyz' );
                $page = WikiPage::factory( $title );
-               $page->doEdit( 'Some text', 'inserting content' );
+
+               $page->doEditContent(
+                       ContentHandler::makeContent( 'Some text', $page->getTitle() ),
+                       'inserting content'
+               );
 
                $result = $this->doApiRequest( [
                        'action' => 'query',
index a6f22b1..38a1d68 100644 (file)
@@ -15,7 +15,11 @@ class ApiQueryRevisionsTest extends ApiTestCase {
                $pageName = 'Help:' . __METHOD__;
                $title = Title::newFromText( $pageName );
                $page = WikiPage::factory( $title );
-               $page->doEdit( 'Some text', 'inserting content' );
+
+               $page->doEditContent(
+                       ContentHandler::makeContent( 'Some text', $page->getTitle() ),
+                       'inserting content'
+               );
 
                $apiResult = $this->doApiRequest( [
                        'action' => 'query',
index 0f9a401..134caf4 100644 (file)
@@ -25,6 +25,7 @@ class DatabaseTest extends MediaWikiTestCase {
                }
                $this->db->restoreFlags( IDatabase::RESTORE_INITIAL );
        }
+
        /**
         * @covers DatabaseBase::dropTable
         */
@@ -68,21 +69,26 @@ class DatabaseTest extends MediaWikiTestCase {
        }
 
        private function getSharedTableName( $table, $database, $prefix, $format = 'quoted' ) {
-               global $wgSharedDB, $wgSharedTables, $wgSharedPrefix;
-
-               $oldName = $wgSharedDB;
-               $oldTables = $wgSharedTables;
-               $oldPrefix = $wgSharedPrefix;
+               global $wgSharedDB, $wgSharedTables, $wgSharedPrefix, $wgSharedSchema;
 
-               $wgSharedDB = $database;
-               $wgSharedTables = [ $table ];
-               $wgSharedPrefix = $prefix;
+               $this->db->setTableAliases( [
+                       $table => [
+                               'dbname' => $database,
+                               'schema' => null,
+                               'prefix' => $prefix
+                       ]
+               ] );
 
                $ret = $this->db->tableName( $table, $format );
 
-               $wgSharedDB = $oldName;
-               $wgSharedTables = $oldTables;
-               $wgSharedPrefix = $oldPrefix;
+               $this->db->setTableAliases( array_fill_keys(
+                       $wgSharedDB ? $wgSharedTables : [],
+                       [
+                               'dbname' => $wgSharedDB,
+                               'schema' => $wgSharedSchema,
+                               'prefix' => $wgSharedPrefix
+                       ]
+               ) );
 
                return $ret;
        }
@@ -226,7 +232,7 @@ class DatabaseTest extends MediaWikiTestCase {
 
        private function dropFunctions() {
                $this->db->query( 'DROP FUNCTION IF EXISTS mw_test_function'
-                               . ( $this->db->getType() == 'postgres' ? '()' : '' )
+                       . ( $this->db->getType() == 'postgres' ? '()' : '' )
                );
        }
 
@@ -242,26 +248,35 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->setFlag( DBO_TRX );
                $called = false;
                $flagSet = null;
-               $db->onTransactionIdle( function() use ( $db, &$flagSet, &$called ) {
-                       $called = true;
-                       $flagSet = $db->getFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db, &$flagSet, &$called ) {
+                               $called = true;
+                               $flagSet = $db->getFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $flagSet, 'DBO_TRX off in callback' );
                $this->assertTrue( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
                $this->assertTrue( $called, 'Callback reached' );
 
                $db->clearFlag( DBO_TRX );
                $flagSet = null;
-               $db->onTransactionIdle( function() use ( $db, &$flagSet ) {
-                       $flagSet = $db->getFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db, &$flagSet ) {
+                               $flagSet = $db->getFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $flagSet, 'DBO_TRX off in callback' );
                $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
 
                $db->clearFlag( DBO_TRX );
-               $db->onTransactionIdle( function() use ( $db ) {
-                       $db->setFlag( DBO_TRX );
-               } );
+               $db->onTransactionIdle(
+                       function () use ( $db ) {
+                               $db->setFlag( DBO_TRX );
+                       },
+                       __METHOD__
+               );
                $this->assertFalse( $db->getFlag( DBO_TRX ), 'DBO_TRX restored to default' );
        }
 
@@ -271,7 +286,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->clearFlag( DBO_TRX );
                $db->begin( __METHOD__ );
                $called = false;
-               $db->onTransactionResolution( function() use ( $db, &$called ) {
+               $db->onTransactionResolution( function () use ( $db, &$called ) {
                        $called = true;
                        $db->setFlag( DBO_TRX );
                } );
@@ -282,7 +297,7 @@ class DatabaseTest extends MediaWikiTestCase {
                $db->clearFlag( DBO_TRX );
                $db->begin( __METHOD__ );
                $called = false;
-               $db->onTransactionResolution( function() use ( $db, &$called ) {
+               $db->onTransactionResolution( function () use ( $db, &$called ) {
                        $called = true;
                        $db->setFlag( DBO_TRX );
                } );
@@ -297,7 +312,7 @@ class DatabaseTest extends MediaWikiTestCase {
        public function testTransactionListener() {
                $db = $this->db;
 
-               $db->setTransactionListener( 'ping', function() use ( $db, &$called ) {
+               $db->setTransactionListener( 'ping', function () use ( $db, &$called ) {
                        $called = true;
                } );
 
@@ -412,4 +427,26 @@ class DatabaseTest extends MediaWikiTestCase {
                $this->assertEquals( $origSsl, $db->getFlag( DBO_SSL ) );
                $this->assertEquals( $origTrx, $db->getFlag( DBO_TRX ) );
        }
+
+       /**
+        * @covers DatabaseBase::tablePrefix()
+        * @covers DatabaseBase::dbSchema()
+        */
+       public function testMutators() {
+               $old = $this->db->tablePrefix();
+               $this->assertType( 'string', $old, 'Prefix is string' );
+               $this->assertEquals( $old, $this->db->tablePrefix(), "Prefix unchanged" );
+               $this->assertEquals( $old, $this->db->tablePrefix( 'xxx' ) );
+               $this->assertEquals( 'xxx', $this->db->tablePrefix(), "Prefix set" );
+               $this->db->tablePrefix( $old );
+               $this->assertNotEquals( 'xxx', $this->db->tablePrefix() );
+
+               $old = $this->db->dbSchema();
+               $this->assertType( 'string', $old, 'Schema is string' );
+               $this->assertEquals( $old, $this->db->dbSchema(), "Schema unchanged" );
+               $this->assertEquals( $old, $this->db->dbSchema( 'xxx' ) );
+               $this->assertEquals( 'xxx', $this->db->dbSchema(), "Schema set" );
+               $this->db->dbSchema( $old );
+               $this->assertNotEquals( 'xxx', $this->db->dbSchema() );
+       }
 }
index 364a6c2..5affa9c 100644 (file)
@@ -43,7 +43,7 @@ class LBFactoryTest extends MediaWikiTestCase {
                ];
 
                $this->hideDeprecated( '$wgLBFactoryConf must be updated. See RELEASE-NOTES for details' );
-               $result = LBFactory::getLBFactoryClass( $config );
+               $result = LBFactoryMW::getLBFactoryClass( $config );
 
                $this->assertEquals( $expected, $result );
        }
diff --git a/tests/phpunit/includes/libs/time/ConvertableTimestampTest.php b/tests/phpunit/includes/libs/time/ConvertableTimestampTest.php
new file mode 100644 (file)
index 0000000..88c2989
--- /dev/null
@@ -0,0 +1,128 @@
+<?php
+
+/**
+ * Tests timestamp parsing and output.
+ */
+class ConvertableTimestampTest extends PHPUnit_Framework_TestCase {
+       /**
+        * @covers ConvertableTimestamp::__construct
+        */
+       public function testConstructWithNoTimestamp() {
+               $timestamp = new ConvertableTimestamp();
+               $this->assertInternalType( 'string', $timestamp->getTimestamp() );
+               $this->assertNotEmpty( $timestamp->getTimestamp() );
+               $this->assertNotEquals( false, strtotime( $timestamp->getTimestamp( TS_MW ) ) );
+       }
+
+       /**
+        * @covers ConvertableTimestamp::__toString
+        */
+       public function testToString() {
+               $timestamp = new ConvertableTimestamp( '1406833268' ); // Equivalent to 20140731190108
+               $this->assertEquals( '1406833268', $timestamp->__toString() );
+       }
+
+       public static function provideValidTimestampDifferences() {
+               return [
+                       [ '1406833268', '1406833269', '00 00 00 01' ],
+                       [ '1406833268', '1406833329', '00 00 01 01' ],
+                       [ '1406833268', '1406836929', '00 01 01 01' ],
+                       [ '1406833268', '1406923329', '01 01 01 01' ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideValidTimestampDifferences
+        * @covers ConvertableTimestamp::diff
+        */
+       public function testDiff( $timestamp1, $timestamp2, $expected ) {
+               $timestamp1 = new ConvertableTimestamp( $timestamp1 );
+               $timestamp2 = new ConvertableTimestamp( $timestamp2 );
+               $diff = $timestamp1->diff( $timestamp2 );
+               $this->assertEquals( $expected, $diff->format( '%D %H %I %S' ) );
+       }
+
+       /**
+        * Test parsing of valid timestamps and outputing to MW format.
+        * @dataProvider provideValidTimestamps
+        * @covers ConvertableTimestamp::getTimestamp
+        */
+       public function testValidParse( $format, $original, $expected ) {
+               $timestamp = new ConvertableTimestamp( $original );
+               $this->assertEquals( $expected, $timestamp->getTimestamp( TS_MW ) );
+       }
+
+       /**
+        * Test outputting valid timestamps to different formats.
+        * @dataProvider provideValidTimestamps
+        * @covers ConvertableTimestamp::getTimestamp
+        */
+       public function testValidOutput( $format, $expected, $original ) {
+               $timestamp = new ConvertableTimestamp( $original );
+               $this->assertEquals( $expected, (string)$timestamp->getTimestamp( $format ) );
+       }
+
+       /**
+        * Test an invalid timestamp.
+        * @expectedException TimestampException
+        * @covers ConvertableTimestamp
+        */
+       public function testInvalidParse() {
+               new ConvertableTimestamp( "This is not a timestamp." );
+       }
+
+       /**
+        * Test an out of range timestamp
+        * @dataProvider provideOutOfRangeTimestamps
+        * @expectedException TimestampException
+        * @covers ConvertableTimestamp
+        */
+       public function testOutOfRangeTimestamps( $format, $input ) {
+               $timestamp = new ConvertableTimestamp( $input );
+               $timestamp->getTimestamp( $format );
+       }
+
+       /**
+        * Test requesting an invalid output format.
+        * @expectedException TimestampException
+        * @covers ConvertableTimestamp::getTimestamp
+        */
+       public function testInvalidOutput() {
+               $timestamp = new ConvertableTimestamp( '1343761268' );
+               $timestamp->getTimestamp( 98 );
+       }
+
+       /**
+        * Returns a list of valid timestamps in the format:
+        * [ type, timestamp_of_type, timestamp_in_MW ]
+        */
+       public static function provideValidTimestamps() {
+               return [
+                       // Various formats
+                       [ TS_UNIX, '1343761268', '20120731190108' ],
+                       [ TS_MW, '20120731190108', '20120731190108' ],
+                       [ TS_DB, '2012-07-31 19:01:08', '20120731190108' ],
+                       [ TS_ISO_8601, '2012-07-31T19:01:08Z', '20120731190108' ],
+                       [ TS_ISO_8601_BASIC, '20120731T190108Z', '20120731190108' ],
+                       [ TS_EXIF, '2012:07:31 19:01:08', '20120731190108' ],
+                       [ TS_RFC2822, 'Tue, 31 Jul 2012 19:01:08 GMT', '20120731190108' ],
+                       [ TS_ORACLE, '31-07-2012 19:01:08.000000', '20120731190108' ],
+                       [ TS_POSTGRES, '2012-07-31 19:01:08 GMT', '20120731190108' ],
+                       // Some extremes and weird values
+                       [ TS_ISO_8601, '9999-12-31T23:59:59Z', '99991231235959' ],
+                       [ TS_UNIX, '-62135596801', '00001231235959' ]
+               ];
+       }
+
+       /**
+        * Returns a list of out of range timestamps in the format:
+        * [ type, timestamp_of_type ]
+        */
+       public static function provideOutOfRangeTimestamps() {
+               return [
+                       // Various formats
+                       [ TS_MW, '-62167219201' ], // -0001-12-31T23:59:59Z
+                       [ TS_MW, '253402300800' ], // 10000-01-01T00:00:00Z
+               ];
+       }
+}
index 10e0f59..e55efee 100644 (file)
@@ -154,6 +154,7 @@ class WikiPageTest extends MediaWikiLangTestCase {
 
        /**
         * @covers WikiPage::doEdit
+        * @deprecated since 1.21. Should be removed when WikiPage::doEdit() gets removed
         */
        public function testDoEdit() {
                $this->hideDeprecated( "WikiPage::doEdit" );
index 9a3e222..c24a321 100644 (file)
@@ -281,7 +281,6 @@ mw.example();
                                'name' => 'test.example',
                                'scripts' => [],
                                'styles' => [ 'css' => [ '.mw-example {}' ] ],
-                               'messages' => new XmlJsCode( '{}' ),
 
                                'expected' => 'mw.loader.implement( "test.example", [], {
     "css": [
@@ -320,18 +319,10 @@ mw.example();
 
                                'name' => 'user',
                                'scripts' => 'mw.example( 1 );',
+                               'wrap' => false,
 
                                'expected' => 'mw.loader.implement( "user", "mw.example( 1 );" );',
                        ] ],
-                       [ [
-                               'title' => 'Implement unwrapped user script',
-                               'debug' => false,
-
-                               'name' => 'user',
-                               'scripts' => 'mw.example( 1 );',
-
-                               'expected' => 'mw.loader.implement("user","mw.example(1);");',
-                       ] ],
                ];
        }
 
@@ -342,17 +333,20 @@ mw.example();
         */
        public function testMakeLoaderImplementScript( $case ) {
                $case += [
-                       'styles' => [], 'templates' => [], 'messages' => new XmlJsCode( '{}' ),
-                       'debug' => true
+                       'wrap' => true,
+                       'styles' => [], 'templates' => [], 'messages' => new XmlJsCode( '{}' )
                ];
                ResourceLoader::clearCache();
-               $this->setMwGlobals( 'wgResourceLoaderDebug', $case['debug'] );
+               $this->setMwGlobals( 'wgResourceLoaderDebug', true );
 
+               $rl = TestingAccessWrapper::newFromClass( 'ResourceLoader' );
                $this->assertEquals(
                        $case['expected'],
-                       ResourceLoader::makeLoaderImplementScript(
+                       $rl->makeLoaderImplementScript(
                                $case['name'],
-                               $case['scripts'],
+                               ( $case['wrap'] && is_string( $case['scripts'] ) )
+                                       ? new XmlJsCode( $case['scripts'] )
+                                       : $case['scripts'],
                                $case['styles'],
                                $case['messages'],
                                $case['templates']
@@ -365,7 +359,8 @@ mw.example();
         */
        public function testMakeLoaderImplementScriptInvalid() {
                $this->setExpectedException( 'MWException', 'Invalid scripts error' );
-               ResourceLoader::makeLoaderImplementScript(
+               $rl = TestingAccessWrapper::newFromClass( 'ResourceLoader' );
+               $rl->makeLoaderImplementScript(
                        'test', // name
                        123, // scripts
                        null, // styles
index 0b34b6f..3fb4bbb 100644 (file)
@@ -30,7 +30,7 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                        $this->markTestSkipped( "MySQL or SQLite with FTS3 only" );
                }
 
-               $searchType = $this->db->getSearchEngine();
+               $searchType = SearchEngineFactory::getSearchEngineClass( $this->db );
                $this->setMwGlobals( [
                        'wgSearchType' => $searchType
                ] );
@@ -207,4 +207,50 @@ class SearchEngineTest extends MediaWikiLangTestCase {
                $this->assertArrayHasKey( 'testData', $mapping );
                $this->assertEquals( 'test', $mapping['testData'] );
        }
+
+       public function hookSearchIndexFields( $mockFieldBuilder, &$fields, SearchEngine $engine ) {
+               $fields['testField'] = $mockFieldBuilder( "testField", SearchIndexField::INDEX_TYPE_TEXT );
+               return true;
+       }
+
+       public function testAugmentorSearch() {
+               $this->search->setNamespaces( [ 0, 1, 4 ] );
+               $resultSet = $this->search->searchText( 'smithee' );
+               // Not using mock since PHPUnit mocks do not work properly with references in params
+               $this->mergeMwGlobalArrayValue( 'wgHooks',
+                       [ 'SearchResultsAugment' => [ [ $this, 'addAugmentors' ] ] ] );
+               $this->search->augmentSearchResults( $resultSet );
+               for ( $result = $resultSet->next(); $result; $result = $resultSet->next() ) {
+                       $id = $result->getTitle()->getArticleID();
+                       $augmentData = "Result:$id:" . $result->getTitle()->getText();
+                       $augmentData2 = "Result2:$id:" . $result->getTitle()->getText();
+                       $this->assertEquals( [ 'testSet' => $augmentData, 'testRow' => $augmentData2 ],
+                               $result->getExtensionData() );
+               }
+       }
+
+       public function addAugmentors( &$setAugmentors, &$rowAugmentors ) {
+               $setAugmentor = $this->getMock( 'ResultSetAugmentor' );
+               $setAugmentor->expects( $this->once() )
+                       ->method( 'augmentAll' )
+                       ->willReturnCallback( function ( SearchResultSet $resultSet ) {
+                               $data = [];
+                               for ( $result = $resultSet->next(); $result; $result = $resultSet->next() ) {
+                                       $id = $result->getTitle()->getArticleID();
+                                       $data[$id] = "Result:$id:" . $result->getTitle()->getText();
+                               }
+                               $resultSet->rewind();
+                               return $data;
+                       } );
+               $setAugmentors['testSet'] = $setAugmentor;
+
+               $rowAugmentor = $this->getMock( 'ResultAugmentor' );
+               $rowAugmentor->expects( $this->exactly( 2 ) )
+                       ->method( 'augment' )
+                       ->willReturnCallback( function ( SearchResult $result ) {
+                               $id = $result->getTitle()->getArticleID();
+                               return "Result2:$id:" . $result->getTitle()->getText();
+                       } );
+               $rowAugmentors['testRow'] = $rowAugmentor;
+       }
 }
index 985554b..34548c0 100644 (file)
@@ -269,7 +269,14 @@ class UserTest extends MediaWikiTestCase {
                // let the user have a few (3) edits
                $page = WikiPage::factory( Title::newFromText( 'Help:UserTest_EditCount' ) );
                for ( $i = 0; $i < 3; $i++ ) {
-                       $page->doEdit( (string)$i, 'test', 0, false, $user );
+
+                       $page->doEditContent(
+                               ContentHandler::makeContent( (string)$i, $page->getTitle() ),
+                               'test',
+                               0,
+                               false,
+                               $user
+                       );
                }
 
                $this->assertEquals(
index 3332c08..5122dcd 100644 (file)
                }
        } ) );
 
-       QUnit.test( 'options', 1, function ( assert ) {
+       QUnit.test( 'options', function ( assert ) {
                assert.ok( mw.user.options instanceof mw.Map, 'options instance of mw.Map' );
        } );
 
-       QUnit.test( 'user status', 7, function ( assert ) {
-
+       QUnit.test( 'getters (anonymous)', function ( assert ) {
                // Forge an anonymous user
                mw.config.set( 'wgUserName', null );
                delete mw.config.values.wgUserId;
 
-               assert.strictEqual( mw.user.getName(), null, 'user.getName() returns null when anonymous' );
-               assert.assertTrue( mw.user.isAnon(), 'user.isAnon() returns true when anonymous' );
-               assert.strictEqual( mw.user.getId(), 0, 'user.getId() returns 0 when anonymous' );
+               assert.strictEqual( mw.user.getName(), null, 'getName()' );
+               assert.strictEqual( mw.user.isAnon(), true, 'isAnon()' );
+               assert.strictEqual( mw.user.getId(), 0, 'getId()' );
+       } );
 
-               // Not part of startUp module
+       QUnit.test( 'getters (logged-in)', function ( assert ) {
                mw.config.set( 'wgUserName', 'John' );
                mw.config.set( 'wgUserId', 123 );
 
-               assert.equal( mw.user.getName(), 'John', 'user.getName() returns username when logged-in' );
-               assert.assertFalse( mw.user.isAnon(), 'user.isAnon() returns false when logged-in' );
-               assert.strictEqual( mw.user.getId(), 123, 'user.getId() returns correct ID when logged-in' );
+               assert.equal( mw.user.getName(), 'John', 'getName()' );
+               assert.strictEqual( mw.user.isAnon(), false, 'isAnon()' );
+               assert.strictEqual( mw.user.getId(), 123, 'getId()' );
 
-               assert.equal( mw.user.id(), 'John', 'user.id Returns username when logged-in' );
+               assert.equal( mw.user.id(), 'John', 'user.id()' );
        } );
 
-       QUnit.test( 'getUserInfos', 3, function ( assert ) {
+       QUnit.test( 'getUserInfo', function ( assert ) {
                mw.config.set( 'wgUserGroups', [ '*', 'user' ] );
 
                mw.user.getGroups( function ( groups ) {
@@ -64,7 +64,7 @@
                this.server.respond();
        } );
 
-       QUnit.test( 'generateRandomSessionId', 4, function ( assert ) {
+       QUnit.test( 'generateRandomSessionId', function ( assert ) {
                var result, result2;
 
                result = mw.user.generateRandomSessionId();
@@ -77,7 +77,7 @@
 
        } );
 
-       QUnit.test( 'generateRandomSessionId (fallback)', 4, function ( assert ) {
+       QUnit.test( 'generateRandomSessionId (fallback)', function ( assert ) {
                var result, result2;
 
                // Pretend crypto API is not there to test the Math.random fallback