Merge "shell: annotate return types"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 1 May 2019 19:16:37 +0000 (19:16 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 1 May 2019 19:16:37 +0000 (19:16 +0000)
153 files changed:
.phpcs.xml
RELEASE-NOTES-1.34
autoload.php
includes/Autopromote.php
includes/Block.php
includes/DefaultSettings.php
includes/GlobalFunctions.php
includes/MediaWikiServices.php
includes/ServiceWiring.php
includes/api/ApiBlock.php
includes/api/ApiQueryUserContribs.php
includes/api/ApiQueryUserInfo.php
includes/api/ApiRevisionDelete.php
includes/api/ApiTag.php
includes/api/ApiUnblock.php
includes/api/ApiUserrights.php
includes/api/i18n/ar.json
includes/api/i18n/de.json
includes/api/i18n/en.json
includes/api/i18n/fr.json
includes/api/i18n/it.json
includes/api/i18n/pt-br.json
includes/auth/AuthManager.php
includes/auth/CheckBlocksSecondaryAuthenticationProvider.php
includes/block/BlockManager.php [new file with mode: 0644]
includes/changetags/ChangeTags.php
includes/editpage/TextConflictHelper.php
includes/htmlform/fields/HTMLFormFieldWithButton.php
includes/jobqueue/Job.php
includes/jobqueue/JobQueueDB.php
includes/jobqueue/JobQueueRedis.php
includes/libs/objectcache/MemcachedBagOStuff.php
includes/libs/objectcache/MemcachedPeclBagOStuff.php
includes/libs/objectcache/WANObjectCache.php
includes/mail/EmailNotification.php
includes/page/WikiPage.php
includes/parser/PPCustomFrame_DOM.php [new file with mode: 0644]
includes/parser/PPCustomFrame_Hash.php [new file with mode: 0644]
includes/parser/PPDPart.php [new file with mode: 0644]
includes/parser/PPDPart_Hash.php [new file with mode: 0644]
includes/parser/PPDStack.php [new file with mode: 0644]
includes/parser/PPDStackElement.php [new file with mode: 0644]
includes/parser/PPDStackElement_Hash.php [new file with mode: 0644]
includes/parser/PPDStack_Hash.php [new file with mode: 0644]
includes/parser/PPFrame.php [new file with mode: 0644]
includes/parser/PPFrame_DOM.php [new file with mode: 0644]
includes/parser/PPFrame_Hash.php [new file with mode: 0644]
includes/parser/PPNode.php [new file with mode: 0644]
includes/parser/PPNode_DOM.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Array.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Attr.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Text.php [new file with mode: 0644]
includes/parser/PPNode_Hash_Tree.php [new file with mode: 0644]
includes/parser/PPTemplateFrame_DOM.php [new file with mode: 0644]
includes/parser/PPTemplateFrame_Hash.php [new file with mode: 0644]
includes/parser/Preprocessor.php
includes/parser/Preprocessor_DOM.php
includes/parser/Preprocessor_Hash.php
includes/specials/SpecialBlock.php
includes/specials/SpecialContributions.php
includes/specials/SpecialEditTags.php
includes/specials/SpecialRevisionDelete.php
includes/specials/SpecialUserrights.php
includes/specials/pagers/ContribsPager.php
includes/user/User.php
languages/data/Names.php
languages/data/ZhConversion.php
languages/i18n/ban.json
languages/i18n/be-tarask.json
languages/i18n/bg.json
languages/i18n/bjn.json
languages/i18n/bn.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/ee.json
languages/i18n/el.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/fy.json
languages/i18n/hr.json
languages/i18n/io.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/ko.json
languages/i18n/li.json
languages/i18n/lv.json
languages/i18n/lzh.json
languages/i18n/mk.json
languages/i18n/nds-nl.json
languages/i18n/nds.json
languages/i18n/nl.json
languages/i18n/nn.json
languages/i18n/nqo.json
languages/i18n/pl.json
languages/i18n/ru.json
languages/i18n/sat.json
languages/i18n/sh.json
languages/i18n/skr-arab.json
languages/i18n/sli.json
languages/i18n/sr-ec.json
languages/i18n/stq.json
languages/i18n/sv.json
languages/i18n/tyv.json
languages/i18n/uk.json
languages/i18n/yue.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
maintenance/importImages.php
maintenance/language/zhtable/simp2trad.manual
maintenance/language/zhtable/toCN.manual
maintenance/language/zhtable/toHK.manual
maintenance/language/zhtable/toSimp.manual
maintenance/language/zhtable/toTW.manual
maintenance/language/zhtable/toTrad.manual
maintenance/language/zhtable/trad2simp.manual
maintenance/language/zhtable/tradphrases.manual
maintenance/language/zhtable/tradphrases_exclude.manual
maintenance/populateArchiveRevId.php
resources/Resources.php
resources/src/mediawiki.api/parse.js
resources/src/mediawiki.widgets/images/page-disambiguation-ltr.svg
resources/src/mediawiki.widgets/images/page-disambiguation-rtl.svg
resources/src/mediawiki.widgets/images/page-existing-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-existing-rtl.svg [deleted file]
resources/src/mediawiki.widgets/images/page-not-found-he-yi.svg
resources/src/mediawiki.widgets/images/page-not-found-ltr.svg
resources/src/mediawiki.widgets/images/page-not-found-rtl.svg
resources/src/mediawiki.widgets/images/page-redirect-ltr.svg [deleted file]
resources/src/mediawiki.widgets/images/page-redirect-rtl.svg [deleted file]
resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/ActorMigrationTest.php
tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php [deleted file]
tests/phpunit/includes/Revision/RevisionStoreDbTestBase.php
tests/phpunit/includes/RevisionDbTestBase.php
tests/phpunit/includes/RevisionTest.php
tests/phpunit/includes/api/query/ApiQueryUserContribsTest.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/block/BlockManagerTest.php [new file with mode: 0644]
tests/phpunit/includes/jobqueue/JobTest.php
tests/phpunit/includes/page/PageArchiveMcrTest.php
tests/phpunit/includes/page/PageArchivePreMcrTest.php
tests/phpunit/includes/page/PageArchiveTestBase.php
tests/phpunit/includes/site/CachingSiteStoreTest.php
tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
tests/phpunit/includes/specials/ContribsPagerTest.php
tests/phpunit/includes/user/UserTest.php
tests/phpunit/suites/UploadFromUrlTestSuite.php
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js
tests/selenium/specs/rollback.js
tests/selenium/wdio-mediawiki/LoginPage.js
tests/selenium/wdio-mediawiki/Util.js

index b60a3af..a9c658a 100644 (file)
                        Whitelist existing violations, but enable the sniff to prevent
                        any new occurrences.
                -->
-               <exclude-pattern>*/includes/parser/Preprocessor_DOM\.php</exclude-pattern>
-               <exclude-pattern>*/includes/parser/Preprocessor_Hash\.php</exclude-pattern>
-               <exclude-pattern>*/includes/parser/Preprocessor\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/dumpIterator\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/Maintenance\.php</exclude-pattern>
                <exclude-pattern>*/maintenance/findDeprecated\.php</exclude-pattern>
index 1775645..3a9ea7c 100644 (file)
@@ -67,7 +67,7 @@ MediaWiki supports over 350 languages. Many localisations are updated regularly.
 Below only new and removed languages are listed, as well as changes to languages
 because of Phabricator reports.
 
-* 
+* (T152908) Added language support for N'Ko (nqo).
 
 === Breaking changes in 1.34 ===
 * Preferences class, deprecated in 1.31, has been removed.
@@ -104,12 +104,26 @@ because of Phabricator reports.
 * User::randomPassword() method, deprecated in 1.27, have been removed.
 * MWNamespace::canTalk(), deprecated in 1.30, have been removed.
 * Parser class property $mUniqPrefix, deprecated in 1.26, has been removed.
+* wfArrayFilter() and wfArrayFilterByKey(), deprecated in 1.32, have been
+  removed.
+* wfMakeUrlIndexes() function, deprecated in 1.33, have been removed.
+* User::getGroupPage() and ::makeGroupLinkHTML(), deprecated in 1.29, have been
+  removed. Use UserGroupMembership::getGroupPage and ::getLink instead.
+* User::makeGroupLinkWiki(), deprecated in 1.29, has been removed. Use
+  UserGroupMembership::getLink() instead.
 * …
 
 === Deprecations in 1.34 ===
 * The MWNamespace class is deprecated. Use MediaWikiServices::getNamespaceInfo.
 * ExtensionRegistry->load() is deprecated, as it breaks dependency checking.
   Instead, use ->queue().
+* User::isBlocked() is deprecated since it does not tell you if the user is
+  blocked from editing a particular page. Use User::getBlock() or
+  PermissionManager::isBlockedFrom() or PermissionManager::userCan() instead.
+* User::isLocallyBlockedProxy and User::inDnsBlacklist are deprecated and moved
+  to the BlockManager as private helper methods.
+* User::isDnsBlacklisted is deprecated. Use BlockManager::isDnsBlacklisted
+  instead.
 * …
 
 === Other changes in 1.34 ===
index 35137ab..13037ff 100644 (file)
@@ -1050,28 +1050,28 @@ $wgAutoloadLocalClasses = [
        'PHPVersionCheck' => __DIR__ . '/includes/PHPVersionCheck.php',
        'PNGHandler' => __DIR__ . '/includes/media/PNGHandler.php',
        'PNGMetadataExtractor' => __DIR__ . '/includes/media/PNGMetadataExtractor.php',
-       'PPCustomFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPCustomFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDPart' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDPart_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDStack' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDStackElement' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPDStackElement_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPDStack_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPFrame' => __DIR__ . '/includes/parser/Preprocessor.php',
-       'PPFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
+       'PPCustomFrame_DOM' => __DIR__ . '/includes/parser/PPCustomFrame_DOM.php',
+       'PPCustomFrame_Hash' => __DIR__ . '/includes/parser/PPCustomFrame_Hash.php',
+       'PPDPart' => __DIR__ . '/includes/parser/PPDPart.php',
+       'PPDPart_Hash' => __DIR__ . '/includes/parser/PPDPart_Hash.php',
+       'PPDStack' => __DIR__ . '/includes/parser/PPDStack.php',
+       'PPDStackElement' => __DIR__ . '/includes/parser/PPDStackElement.php',
+       'PPDStackElement_Hash' => __DIR__ . '/includes/parser/PPDStackElement_Hash.php',
+       'PPDStack_Hash' => __DIR__ . '/includes/parser/PPDStack_Hash.php',
+       'PPFrame' => __DIR__ . '/includes/parser/PPFrame.php',
+       'PPFrame_DOM' => __DIR__ . '/includes/parser/PPFrame_DOM.php',
+       'PPFrame_Hash' => __DIR__ . '/includes/parser/PPFrame_Hash.php',
        'PPFuzzTest' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
        'PPFuzzTester' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
        'PPFuzzUser' => __DIR__ . '/maintenance/preprocessorFuzzTest.php',
-       'PPNode' => __DIR__ . '/includes/parser/Preprocessor.php',
-       'PPNode_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPNode_Hash_Array' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Attr' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Text' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPNode_Hash_Tree' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
-       'PPTemplateFrame_DOM' => __DIR__ . '/includes/parser/Preprocessor_DOM.php',
-       'PPTemplateFrame_Hash' => __DIR__ . '/includes/parser/Preprocessor_Hash.php',
+       'PPNode' => __DIR__ . '/includes/parser/PPNode.php',
+       'PPNode_DOM' => __DIR__ . '/includes/parser/PPNode_DOM.php',
+       'PPNode_Hash_Array' => __DIR__ . '/includes/parser/PPNode_Hash_Array.php',
+       'PPNode_Hash_Attr' => __DIR__ . '/includes/parser/PPNode_Hash_Attr.php',
+       'PPNode_Hash_Text' => __DIR__ . '/includes/parser/PPNode_Hash_Text.php',
+       'PPNode_Hash_Tree' => __DIR__ . '/includes/parser/PPNode_Hash_Tree.php',
+       'PPTemplateFrame_DOM' => __DIR__ . '/includes/parser/PPTemplateFrame_DOM.php',
+       'PPTemplateFrame_Hash' => __DIR__ . '/includes/parser/PPTemplateFrame_Hash.php',
        'PackedHoverImageGallery' => __DIR__ . '/includes/gallery/PackedHoverImageGallery.php',
        'PackedImageGallery' => __DIR__ . '/includes/gallery/PackedImageGallery.php',
        'PackedOverlayImageGallery' => __DIR__ . '/includes/gallery/PackedOverlayImageGallery.php',
index a01465e..02c9d01 100644 (file)
@@ -198,7 +198,8 @@ class Autopromote {
                        case APCOND_IPINRANGE:
                                return IP::isInRange( $user->getRequest()->getIP(), $cond[1] );
                        case APCOND_BLOCKED:
-                               return $user->isBlocked();
+                               // @TODO Should partial blocks prevent auto promote?
+                               return (bool)$user->getBlock();
                        case APCOND_ISBOT:
                                return in_array( 'bot', User::getGroupPermissions( $user->getGroups() ) );
                        default:
index 37b9ce5..0d13f7d 100644 (file)
@@ -100,7 +100,7 @@ class Block {
        const TYPE_ID = 5;
 
        /**
-        * Create a new block with specified parameters on a user, IP or IP range.
+        * Create a new block with specified option parameters on a user, IP or IP range.
         *
         * @param array $options Parameters of the block:
         *     address string|User  Target user name, User object, IP address or IP range
@@ -125,10 +125,9 @@ class Block {
         *                          actions, except those specifically allowed by
         *                          other block flags
         *
-        * @since 1.26 accepts $options array instead of individual parameters; order
-        * of parameters above reflects the original order
+        * @since 1.26 $options array
         */
-       function __construct( $options = [] ) {
+       public function __construct( array $options = [] ) {
                $defaults = [
                        'address'         => '',
                        'user'            => null,
@@ -392,8 +391,7 @@ class Block {
                                $start = Wikimedia\base_convert( $block->getRangeStart(), 16, 10 );
                                $size = log( $end - $start + 1, 2 );
 
-                               # This has the nice property that a /32 block is ranked equally with a
-                               # single-IP block, which is exactly what it is...
+                               # Rank a range block covering a single IP equally with a single-IP block
                                $score = self::TYPE_RANGE - 1 + ( $size / 128 );
 
                        } else {
@@ -2132,17 +2130,17 @@ class Block {
         * Check if the block should be tracked with a cookie.
         *
         * @since 1.33
-        * @param bool $isIpUser The user is logged out
+        * @param bool $isAnon The user is logged out
         * @return bool The block should be tracked with a cookie
         */
-       public function shouldTrackWithCookie( $isIpUser ) {
+       public function shouldTrackWithCookie( $isAnon ) {
                $config = RequestContext::getMain()->getConfig();
                switch ( $this->getType() ) {
                        case self::TYPE_IP:
                        case self::TYPE_RANGE:
-                               return $isIpUser && $config->get( 'CookieSetOnIpBlock' );
+                               return $isAnon && $config->get( 'CookieSetOnIpBlock' );
                        case self::TYPE_USER:
-                               return !$isIpUser && $config->get( 'CookieSetOnAutoblock' ) && $this->isAutoblocking();
+                               return !$isAnon && $config->get( 'CookieSetOnAutoblock' ) && $this->isAutoblocking();
                        default:
                                return false;
                }
index 1c76121..b40d33b 100644 (file)
@@ -8984,7 +8984,7 @@ $wgXmlDumpSchemaVersion = XML_DUMP_SCHEMA_VERSION_10;
  * @since 1.32 changed allowed flags
  * @var int An appropriate combination of SCHEMA_COMPAT_XXX flags.
  */
-$wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
+$wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_NEW;
 
 /**
  * Flag to enable Partial Blocks. This allows an admin to prevent a user from editing specific pages
index 2497b0f..c7a45c7 100644 (file)
@@ -140,32 +140,6 @@ function wfArrayDiff2_cmp( $a, $b ) {
        }
 }
 
-/**
- * @deprecated since 1.32, use array_filter() with ARRAY_FILTER_USE_BOTH directly
- *
- * @param array $arr
- * @param callable $callback Will be called with the array value and key (in that order) and
- *   should return a bool which will determine whether the array element is kept.
- * @return array
- */
-function wfArrayFilter( array $arr, callable $callback ) {
-       wfDeprecated( __FUNCTION__, '1.32' );
-       return array_filter( $arr, $callback, ARRAY_FILTER_USE_BOTH );
-}
-
-/**
- * @deprecated since 1.32, use array_filter() with ARRAY_FILTER_USE_KEY directly
- *
- * @param array $arr
- * @param callable $callback Will be called with the array key and should return a bool which
- *   will determine whether the array element is kept.
- * @return array
- */
-function wfArrayFilterByKey( array $arr, callable $callback ) {
-       wfDeprecated( __FUNCTION__, '1.32' );
-       return array_filter( $arr, $callback, ARRAY_FILTER_USE_KEY );
-}
-
 /**
  * Appends to second array if $value differs from that in $default
  *
@@ -895,18 +869,6 @@ function wfExpandIRI( $url ) {
        );
 }
 
-/**
- * Make URL indexes, appropriate for the el_index field of externallinks.
- *
- * @deprecated since 1.33, use LinkFilter::makeIndexes() instead
- * @param string $url
- * @return array
- */
-function wfMakeUrlIndexes( $url ) {
-       wfDeprecated( __FUNCTION__, '1.33' );
-       return LinkFilter::makeIndexes( $url );
-}
-
 /**
  * Check whether a given URL has a domain that occurs in a given set of domains
  * @param string $url
index 3590633..c374a62 100644 (file)
@@ -13,6 +13,7 @@ use GlobalVarConfig;
 use Hooks;
 use IBufferingStatsdDataFactory;
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
+use MediaWiki\Block\BlockManager;
 use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Http\HttpRequestFactory;
 use MediaWiki\Permissions\PermissionManager;
@@ -437,6 +438,14 @@ class MediaWikiServices extends ServiceContainer {
                return $this->getService( 'BlobStoreFactory' );
        }
 
+       /**
+        * @since 1.34
+        * @return BlockManager
+        */
+       public function getBlockManager() : BlockManager {
+               return $this->getService( 'BlockManager' );
+       }
+
        /**
         * @since 1.33
         * @return BlockRestrictionStore
index 832cee8..93ddee9 100644 (file)
@@ -39,6 +39,7 @@
 
 use Liuggio\StatsdClient\Factory\StatsdDataFactoryInterface;
 use MediaWiki\Auth\AuthManager;
+use MediaWiki\Block\BlockManager;
 use MediaWiki\Block\BlockRestrictionStore;
 use MediaWiki\Config\ConfigRepository;
 use MediaWiki\Interwiki\ClassicInterwikiLookup;
@@ -85,6 +86,23 @@ return [
                );
        },
 
+       'BlockManager' => function ( MediaWikiServices $services ) : BlockManager {
+               $config = $services->getMainConfig();
+               $context = RequestContext::getMain();
+               return new BlockManager(
+                       $context->getUser(),
+                       $context->getRequest(),
+                       $config->get( 'ApplyIpBlocksToXff' ),
+                       $config->get( 'CookieSetOnAutoblock' ),
+                       $config->get( 'CookieSetOnIpBlock' ),
+                       $config->get( 'DnsBlacklistUrls' ),
+                       $config->get( 'EnableDnsBlacklist' ),
+                       $config->get( 'ProxyList' ),
+                       $config->get( 'ProxyWhitelist' ),
+                       $config->get( 'SoftBlockRanges' )
+               );
+       },
+
        'BlockRestrictionStore' => function ( MediaWikiServices $services ) : BlockRestrictionStore {
                return new BlockRestrictionStore(
                        $services->getDBLoadBalancer()
index 673fc6b..b5d51aa 100644 (file)
@@ -43,13 +43,14 @@ class ApiBlock extends ApiBase {
                $this->requireOnlyOneParameter( $params, 'user', 'userid' );
 
                # T17810: blocked admins should have limited access here
-               if ( $user->isBlocked() ) {
+               $block = $user->getBlock();
+               if ( $block ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
                                $this->dieWithError(
                                        $status,
                                        null,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ]
                                );
                        }
                }
index 5b178b7..379f1af 100644 (file)
@@ -331,9 +331,6 @@ class ApiQueryUserContribs extends ApiQueryBase {
                $db = $this->getDB();
 
                $revQuery = MediaWikiServices::getInstance()->getRevisionStore()->getQueryInfo( [ 'page' ] );
-               $this->addTables( $revQuery['tables'] );
-               $this->addJoinConds( $revQuery['joins'] );
-               $this->addFields( $revQuery['fields'] );
 
                if ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) {
                        $revWhere = ActorMigration::newMigration()->getWhere( $db, 'rev_user', $users );
@@ -341,6 +338,24 @@ class ApiQueryUserContribs extends ApiQueryBase {
                        $userField = $this->orderBy === 'actor' ? 'revactor_actor' : 'actor_name';
                        $tsField = 'revactor_timestamp';
                        $idField = 'revactor_rev';
+
+                       // T221511: MySQL/MariaDB (10.1.37) can sometimes irrationally decide that querying `actor`
+                       // before `revision_actor_temp` and filesorting is somehow better than querying $limit+1 rows
+                       // from `revision_actor_temp`. Tell it not to reorder the query (and also reorder it ourselves
+                       // because as generated by RevisionStore it'll have `revision` first rather than
+                       // `revision_actor_temp`). But not when uctag is used, as it seems as likely to be harmed as
+                       // helped in that case, and not when there's only one User because in that case it fetches
+                       // the one `actor` row as a constant and doesn't filesort.
+                       if ( count( $users ) > 1 && !isset( $this->params['tag'] ) ) {
+                               $revQuery['joins']['revision'] = $revQuery['joins']['temp_rev_user'];
+                               unset( $revQuery['joins']['temp_rev_user'] );
+                               $this->addOption( 'STRAIGHT_JOIN' );
+                               // It isn't actually necesssary to reorder $revQuery['tables'] as Database does the right thing
+                               // when join conditions are given for all joins, but Gergő is wary of relying on that so pull
+                               // `revision_actor_temp` to the start.
+                               $revQuery['tables'] =
+                                       [ 'temp_rev_user' => $revQuery['tables']['temp_rev_user'] ] + $revQuery['tables'];
+                       }
                } else {
                        // If we're dealing with user names (rather than IDs) in read-old mode,
                        // pass false for ActorMigration::getWhere()'s $useId parameter so
@@ -353,6 +368,9 @@ class ApiQueryUserContribs extends ApiQueryBase {
                        $idField = 'rev_id';
                }
 
+               $this->addTables( $revQuery['tables'] );
+               $this->addJoinConds( $revQuery['joins'] );
+               $this->addFields( $revQuery['fields'] );
                $this->addWhere( $revWhere['conds'] );
 
                // Handle continue parameter
index 59e0524..00d7d84 100644 (file)
@@ -126,8 +126,11 @@ class ApiQueryUserInfo extends ApiQueryBase {
                        $vals['anon'] = true;
                }
 
-               if ( isset( $this->prop['blockinfo'] ) && $user->isBlocked() ) {
-                       $vals = array_merge( $vals, self::getBlockInfo( $user->getBlock() ) );
+               if ( isset( $this->prop['blockinfo'] ) ) {
+                       $block = $user->getBlock();
+                       if ( $block ) {
+                               $vals = array_merge( $vals, self::getBlockInfo( $block ) );
+                       }
                }
 
                if ( isset( $this->prop['hasmsg'] ) ) {
index 6e37774..1ee91c2 100644 (file)
@@ -38,8 +38,10 @@ class ApiRevisionDelete extends ApiBase {
                $user = $this->getUser();
                $this->checkUserRightsAny( RevisionDeleter::getRestriction( $params['type'] ) );
 
-               if ( $user->isBlocked() ) {
-                       $this->dieBlocked( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       $this->dieBlocked( $block );
                }
 
                if ( !$params['ids'] ) {
index 82cf986..aff0183 100644 (file)
@@ -40,8 +40,10 @@ class ApiTag extends ApiBase {
                // make sure the user is allowed
                $this->checkUserRightsAny( 'changetags' );
 
-               if ( $user->isBlocked() ) {
-                       $this->dieBlocked( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       $this->dieBlocked( $block );
                }
 
                // Check if user can add tags
index b748cb3..3aad8f4 100644 (file)
@@ -41,13 +41,14 @@ class ApiUnblock extends ApiBase {
                        $this->dieWithError( 'apierror-permissiondenied-unblock', 'permissiondenied' );
                }
                # T17810: blocked admins should have limited access here
-               if ( $user->isBlocked() ) {
+               $block = $user->getBlock();
+               if ( $block ) {
                        $status = SpecialBlock::checkUnblockSelf( $params['user'], $user );
                        if ( $status !== true ) {
                                $this->dieWithError(
                                        $status,
                                        null,
-                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $user->getBlock() ) ]
+                                       [ 'blockinfo' => ApiQueryUserInfo::getBlockInfo( $block ) ]
                                );
                        }
                }
index e251fe6..acb3da8 100644 (file)
@@ -51,8 +51,13 @@ class ApiUserrights extends ApiBase {
 
                // Deny if the user is blocked and doesn't have the full 'userrights' permission.
                // This matches what Special:UserRights does for the web UI.
-               if ( $pUser->isBlocked() && !$pUser->isAllowed( 'userrights' ) ) {
-                       $this->dieBlocked( $pUser->getBlock() );
+               if ( !$pUser->isAllowed( 'userrights' ) ) {
+                       // @TODO Should the user be blocked from changing user rights if they
+                       //       are partially blocked?
+                       $block = $pUser->getBlock();
+                       if ( $block ) {
+                               $this->dieBlocked( $block );
+                       }
                }
 
                $params = $this->extractRequestParams();
index cf9785e..45573e6 100644 (file)
        "apihelp-edit-param-text": "محتوى الصفحة",
        "apihelp-edit-param-summary": "ملخص التعديل. أيضا عنوان القسم عند عدم تعيين $1section=new and $1sectiontitle.",
        "apihelp-edit-param-tags": "عدل الوسوم لتطبيق المراجعة.",
-       "apihelp-edit-param-minor": "تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81",
-       "apihelp-edit-param-notminor": "تعدÙ\8aÙ\84 ØºÙ\8aر Ø·Ù\81Ù\8aÙ\81.",
+       "apihelp-edit-param-minor": "اÙ\84تعÙ\84Ù\8aÙ\85 Ø¹Ù\84Ù\89 Ù\87ذا Ø§Ù\84تعدÙ\8aÙ\84 Ù\83تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81.",
+       "apihelp-edit-param-notminor": "عدÙ\85 Ø§Ù\84تعÙ\84Ù\8aÙ\85 Ø¹Ù\84Ù\89 Ù\87ذا Ø§Ù\84تعدÙ\8aÙ\84 Ù\83تعدÙ\8aÙ\84 Ø·Ù\81Ù\8aÙ\81 Ø­ØªÙ\89 Ø¥Ø°Ø§ ØªÙ\85 ØªØ¹Ù\8aÙ\8aÙ\86 ØªÙ\81ضÙ\8aÙ\84 Ø§Ù\84Ù\85ستخدÙ\85 \"{{int:tog-minordefault}}\".",
        "apihelp-edit-param-bot": "علم على هذا التعديل كتعديل بوت.",
        "apihelp-edit-param-basetimestamp": "الطابع الزمني للمراجعة الأساسية، ويُستخدَم للكشف عن الحروب التحريرية، ويمكن الحصول عليها من خلال [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "الطابع الزمني عند بدء عملية التحرير، ويُستخدَم للكشف عن الحروب التحريرية، ويمكن الحصول عليها من خلال <var>[[Special:ApiHelp/main|curtimestamp]]</var> when beginning the edit process (e.g. when loading the page content to edit).",
index 992b777..c594cb3 100644 (file)
        "apihelp-edit-param-text": "Seiteninhalt.",
        "apihelp-edit-param-summary": "Bearbeitungszusammenfassung. Auch Abschnittsüberschrift, wenn $1section=new und $1sectiontitle nicht festgelegt ist.",
        "apihelp-edit-param-tags": "Auf die Version anzuwendende Änderungsmarkierungen.",
-       "apihelp-edit-param-minor": "Kleine Bearbeitung.",
-       "apihelp-edit-param-notminor": "Nicht-kleine Bearbeitung.",
+       "apihelp-edit-param-minor": "Markiert diese Bearbeitung als geringfügig.",
+       "apihelp-edit-param-notminor": "Diese Bearbeitung nicht als geringfügig markieren, auch wenn die Benutzereinstellung „{{int:tog-minordefault}}“ festgelegt ist.",
        "apihelp-edit-param-bot": "Diese Bearbeitung als Bot-Bearbeitung markieren.",
        "apihelp-edit-param-basetimestamp": "Zeitstempel der Basisversion, wird verwendet zum Aufspüren von Bearbeitungskonflikten. Kann abgerufen werden durch [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Zeitstempel, an dem der Bearbeitungsprozess begonnen wurde. Er wird zum Aufspüren von Bearbeitungskonflikten verwendet. Ein geeigneter Wert kann mithilfe von <var>[[Special:ApiHelp/main|curtimestamp]]</var> beim Beginn des Bearbeitungsprozesses (z.&nbsp;B. beim Laden des Seiteninhalts zum Bearbeiten) abgerufen werden.",
index 0d4874c..164d5e9 100644 (file)
        "apihelp-edit-param-text": "Page content.",
        "apihelp-edit-param-summary": "Edit summary. Also section title when $1section=new and $1sectiontitle is not set.",
        "apihelp-edit-param-tags": "Change tags to apply to the revision.",
-       "apihelp-edit-param-minor": "Minor edit.",
-       "apihelp-edit-param-notminor": "Non-minor edit.",
+       "apihelp-edit-param-minor": "Mark this edit as a minor edit.",
+       "apihelp-edit-param-notminor": "Do not mark this edit as a minor edit even if the \"{{int:tog-minordefault}}\" user preference is set.",
        "apihelp-edit-param-bot": "Mark this edit as a bot edit.",
        "apihelp-edit-param-basetimestamp": "Timestamp of the base revision, used to detect edit conflicts. May be obtained through [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Timestamp when the editing process began, used to detect edit conflicts. An appropriate value may be obtained using <var>[[Special:ApiHelp/main|curtimestamp]]</var> when beginning the edit process (e.g. when loading the page content to edit).",
index 9ae584b..f0c6eec 100644 (file)
        "apihelp-edit-param-text": "Contenu de la page.",
        "apihelp-edit-param-summary": "Modifier le résumé. Également le titre de la section quand $1section=new et $1sectiontitle n’est pas défini.",
        "apihelp-edit-param-tags": "Modifier les balises à appliquer à la version.",
-       "apihelp-edit-param-minor": "Modification mineure.",
-       "apihelp-edit-param-notminor": "Modification non mineure.",
+       "apihelp-edit-param-minor": "Marquer cette modification comme étant mineure.",
+       "apihelp-edit-param-notminor": "Ne pas marquer cette modification comme mineure, même si la préférence utilisateur « {{int:tog-minordefault}} » est positionnée.",
        "apihelp-edit-param-bot": "Marquer cette modification comme effectuée par un robot.",
        "apihelp-edit-param-basetimestamp": "Horodatage de la révision de base, utilisé pour détecter les conflits de modification. Peut être obtenu via [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "L'horodatage, lorsque le processus d'édition est démarré, est utilisé pour détecter les conflits de modification. Une valeur appropriée peut être obtenue en utilisant <var>[[Special:ApiHelp/main|curtimestamp]]</var> lors du démarrage du processus d'édition (par ex. en chargeant le contenu de la page à modifier).",
index 721cd0b..c960aee 100644 (file)
@@ -82,8 +82,8 @@
        "apihelp-edit-param-text": "Contenuto della pagina.",
        "apihelp-edit-param-summary": "Oggetto della modifica. Anche titolo della sezione se $1sezione=new e $1sectiontitle non è impostato.",
        "apihelp-edit-param-tags": "Cambia i tag da applicare alla revisione.",
-       "apihelp-edit-param-minor": "Modifica minore.",
-       "apihelp-edit-param-notminor": "Modifica non minore.",
+       "apihelp-edit-param-minor": "Contrassegna questa modifica come minore.",
+       "apihelp-edit-param-notminor": "Non contrassegnare questa modifica come minore anche se la preferenza \"{{int:tog-minordefault}}\" è impostata.",
        "apihelp-edit-param-bot": "Contrassegna questa modifica come eseguita da un bot.",
        "apihelp-edit-param-createonly": "Non modificare la pagina se già esiste.",
        "apihelp-edit-param-nocreate": "Genera un errore se la pagina non esiste.",
index 27b4d79..c4d24c4 100644 (file)
        "apihelp-edit-param-text": "Conteúdo da página.",
        "apihelp-edit-param-summary": "Edit o resumo. Também o título da seção quando $1section=new e $1sectiontitle não está definido.",
        "apihelp-edit-param-tags": "Alterar as tags para aplicar à revisão.",
-       "apihelp-edit-param-minor": "Edição menor.",
-       "apihelp-edit-param-notminor": "Edição não-menor.",
+       "apihelp-edit-param-minor": "Marque esta edição como uma edição menor.",
+       "apihelp-edit-param-notminor": "Não marque esta edição como uma edição menor, mesmo se a preferência do usuário \"{{int:tog-minordefault}}\" é definida.",
        "apihelp-edit-param-bot": "Marcar esta edição como uma edição de bot.",
        "apihelp-edit-param-basetimestamp": "Timestamp da revisão base, usada para detectar conflitos de edição. Pode ser obtido através de [[Special:ApiHelp/query+revisions|action=query&prop=revisions&rvprop=timestamp]].",
        "apihelp-edit-param-starttimestamp": "Timestamp quando o processo de edição começou, usado para detectar conflitos de edição. Um valor apropriado pode ser obtido usando <var>[[Special:ApiHelp/main|curtimestamp]]</var> ao iniciar o processo de edição (por exemplo, ao carregar o conteúdo da página a editar).",
index 3515a70..5915d35 100644 (file)
@@ -1021,7 +1021,10 @@ class AuthManager implements LoggerAwareInterface {
                }
 
                $ip = $this->getRequest()->getIP();
-               if ( $creator->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ ) ) {
+               if (
+                       MediaWikiServices::getInstance()->getBlockManager()
+                               ->isDnsBlacklisted( $ip, true /* check $wgProxyWhitelist */ )
+               ) {
                        return Status::newFatal( 'sorbs_create_account_reason' );
                }
 
index 10925b5..3e26097 100644 (file)
@@ -59,9 +59,11 @@ class CheckBlocksSecondaryAuthenticationProvider extends AbstractSecondaryAuthen
        }
 
        public function beginSecondaryAuthentication( $user, array $reqs ) {
+               // @TODO Partial blocks should not prevent the user from logging in.
+               //       see: https://phabricator.wikimedia.org/T208895
                if ( !$this->blockDisablesLogin ) {
                        return AuthenticationResponse::newAbstain();
-               } elseif ( $user->isBlocked() ) {
+               } elseif ( $user->getBlock() ) {
                        return AuthenticationResponse::newFail(
                                new \Message( 'login-userblocked', [ $user->getName() ] )
                        );
diff --git a/includes/block/BlockManager.php b/includes/block/BlockManager.php
new file mode 100644 (file)
index 0000000..3ef35d7
--- /dev/null
@@ -0,0 +1,370 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Block;
+
+use Block;
+use IP;
+use User;
+use WebRequest;
+use Wikimedia\IPSet;
+use MediaWiki\User\UserIdentity;
+
+/**
+ * A service class for checking blocks.
+ * To obtain an instance, use MediaWikiServices::getInstance()->getBlockManager().
+ *
+ * @since 1.34 Refactored from User and Block.
+ */
+class BlockManager {
+       // TODO: This should be UserIdentity instead of User
+       /** @var User */
+       private $currentUser;
+
+       /** @var WebRequest */
+       private $currentRequest;
+
+       /** @var bool */
+       private $applyIpBlocksToXff;
+
+       /** @var bool */
+       private $cookieSetOnAutoblock;
+
+       /** @var bool */
+       private $cookieSetOnIpBlock;
+
+       /** @var array */
+       private $dnsBlacklistUrls;
+
+       /** @var bool */
+       private $enableDnsBlacklist;
+
+       /** @var array */
+       private $proxyList;
+
+       /** @var array */
+       private $proxyWhitelist;
+
+       /** @var array */
+       private $softBlockRanges;
+
+       /**
+        * @param User $currentUser
+        * @param WebRequest $currentRequest
+        * @param bool $applyIpBlocksToXff
+        * @param bool $cookieSetOnAutoblock
+        * @param bool $cookieSetOnIpBlock
+        * @param array $dnsBlacklistUrls
+        * @param bool $enableDnsBlacklist
+        * @param array $proxyList
+        * @param array $proxyWhitelist
+        * @param array $softBlockRanges
+        */
+       public function __construct(
+               $currentUser,
+               $currentRequest,
+               $applyIpBlocksToXff,
+               $cookieSetOnAutoblock,
+               $cookieSetOnIpBlock,
+               $dnsBlacklistUrls,
+               $enableDnsBlacklist,
+               $proxyList,
+               $proxyWhitelist,
+               $softBlockRanges
+       ) {
+               $this->currentUser = $currentUser;
+               $this->currentRequest = $currentRequest;
+               $this->applyIpBlocksToXff = $applyIpBlocksToXff;
+               $this->cookieSetOnAutoblock = $cookieSetOnAutoblock;
+               $this->cookieSetOnIpBlock = $cookieSetOnIpBlock;
+               $this->dnsBlacklistUrls = $dnsBlacklistUrls;
+               $this->enableDnsBlacklist = $enableDnsBlacklist;
+               $this->proxyList = $proxyList;
+               $this->proxyWhitelist = $proxyWhitelist;
+               $this->softBlockRanges = $softBlockRanges;
+       }
+
+       /**
+        * Get the blocks that apply to a user and return the most relevant one.
+        *
+        * TODO: $user should be UserIdentity instead of User
+        *
+        * @internal This should only be called by User::getBlockedStatus
+        * @param User $user
+        * @param bool $fromReplica Whether to check the replica DB first.
+        *  To improve performance, non-critical checks are done against replica DBs.
+        *  Check when actually saving should be done against master.
+        * @return Block|null The most relevant block, or null if there is no block.
+        */
+       public function getUserBlock( User $user, $fromReplica ) {
+               $isAnon = $user->getId() === 0;
+
+               // TODO: If $user is the current user, we should use the current request. Otherwise,
+               // we should not look for XFF or cookie blocks.
+               $request = $user->getRequest();
+
+               # We only need to worry about passing the IP address to the Block generator if the
+               # user is not immune to autoblocks/hardblocks, and they are the current user so we
+               # know which IP address they're actually coming from
+               $ip = null;
+               $sessionUser = $this->currentUser;
+               // the session user is set up towards the end of Setup.php. Until then,
+               // assume it's a logged-out user.
+               $globalUserName = $sessionUser->isSafeToLoad()
+                       ? $sessionUser->getName()
+                       : IP::sanitizeIP( $this->currentRequest->getIP() );
+               if ( $user->getName() === $globalUserName && !$user->isAllowed( 'ipblock-exempt' ) ) {
+                       $ip = $this->currentRequest->getIP();
+               }
+
+               // User/IP blocking
+               // TODO: remove dependency on Block
+               $block = Block::newFromTarget( $user, $ip, !$fromReplica );
+
+               // Cookie blocking
+               if ( !$block instanceof Block ) {
+                       $block = $this->getBlockFromCookieValue( $user, $request );
+               }
+
+               // Proxy blocking
+               if ( !$block instanceof Block && $ip !== null && !in_array( $ip, $this->proxyWhitelist ) ) {
+                       // Local list
+                       if ( $this->isLocallyBlockedProxy( $ip ) ) {
+                               $block = new Block( [
+                                       'byText' => wfMessage( 'proxyblocker' )->text(),
+                                       'reason' => wfMessage( 'proxyblockreason' )->plain(),
+                                       'address' => $ip,
+                                       'systemBlock' => 'proxy',
+                               ] );
+                       } elseif ( $isAnon && $this->isDnsBlacklisted( $ip ) ) {
+                               $block = new Block( [
+                                       'byText' => wfMessage( 'sorbs' )->text(),
+                                       'reason' => wfMessage( 'sorbsreason' )->plain(),
+                                       'address' => $ip,
+                                       'systemBlock' => 'dnsbl',
+                               ] );
+                       }
+               }
+
+               // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
+               if ( !$block instanceof Block
+                       && $this->applyIpBlocksToXff
+                       && $ip !== null
+                       && !in_array( $ip, $this->proxyWhitelist )
+               ) {
+                       $xff = $request->getHeader( 'X-Forwarded-For' );
+                       $xff = array_map( 'trim', explode( ',', $xff ) );
+                       $xff = array_diff( $xff, [ $ip ] );
+                       // TODO: remove dependency on Block
+                       $xffblocks = Block::getBlocksForIPList( $xff, $isAnon, !$fromReplica );
+                       // TODO: remove dependency on Block
+                       $block = Block::chooseBlock( $xffblocks, $xff );
+                       if ( $block instanceof Block ) {
+                               # Mangle the reason to alert the user that the block
+                               # originated from matching the X-Forwarded-For header.
+                               $block->setReason( wfMessage( 'xffblockreason', $block->getReason() )->plain() );
+                       }
+               }
+
+               if ( !$block instanceof Block
+                       && $ip !== null
+                       && $isAnon
+                       && IP::isInRanges( $ip, $this->softBlockRanges )
+               ) {
+                       $block = new Block( [
+                               'address' => $ip,
+                               'byText' => 'MediaWiki default',
+                               'reason' => wfMessage( 'softblockrangesreason', $ip )->plain(),
+                               'anonOnly' => true,
+                               'systemBlock' => 'wgSoftBlockRanges',
+                       ] );
+               }
+
+               return $block;
+       }
+
+       /**
+        * Try to load a Block from an ID given in a cookie value.
+        *
+        * @param UserIdentity $user
+        * @param WebRequest $request
+        * @return Block|bool The Block object, or false if none could be loaded.
+        */
+       private function getBlockFromCookieValue(
+               UserIdentity $user,
+               WebRequest $request
+       ) {
+               $blockCookieVal = $request->getCookie( 'BlockID' );
+               $response = $request->response();
+
+               // Make sure there's something to check. The cookie value must start with a number.
+               if ( strlen( $blockCookieVal ) < 1 || !is_numeric( substr( $blockCookieVal, 0, 1 ) ) ) {
+                       return false;
+               }
+               // Load the Block from the ID in the cookie.
+               // TODO: remove dependency on Block
+               $blockCookieId = Block::getIdFromCookieValue( $blockCookieVal );
+               if ( $blockCookieId !== null ) {
+                       // An ID was found in the cookie.
+                       // TODO: remove dependency on Block
+                       $tmpBlock = Block::newFromID( $blockCookieId );
+                       if ( $tmpBlock instanceof Block ) {
+                               switch ( $tmpBlock->getType() ) {
+                                       case Block::TYPE_USER:
+                                               $blockIsValid = !$tmpBlock->isExpired() && $tmpBlock->isAutoblocking();
+                                               $useBlockCookie = ( $this->cookieSetOnAutoblock === true );
+                                               break;
+                                       case Block::TYPE_IP:
+                                       case Block::TYPE_RANGE:
+                                               // If block is type IP or IP range, load only if user is not logged in (T152462)
+                                               $blockIsValid = !$tmpBlock->isExpired() && $user->getId() === 0;
+                                               $useBlockCookie = ( $this->cookieSetOnIpBlock === true );
+                                               break;
+                                       default:
+                                               $blockIsValid = false;
+                                               $useBlockCookie = false;
+                               }
+
+                               if ( $blockIsValid && $useBlockCookie ) {
+                                       // Use the block.
+                                       return $tmpBlock;
+                               }
+
+                               // If the block is not valid, remove the cookie.
+                               // TODO: remove dependency on Block
+                               Block::clearCookie( $response );
+                       } else {
+                               // If the block doesn't exist, remove the cookie.
+                               // TODO: remove dependency on Block
+                               Block::clearCookie( $response );
+                       }
+               }
+               return false;
+       }
+
+       /**
+        * Check if an IP address is in the local proxy list
+        *
+        * @param string $ip
+        * @return bool
+        */
+       private function isLocallyBlockedProxy( $ip ) {
+               if ( !$this->proxyList ) {
+                       return false;
+               }
+
+               if ( !is_array( $this->proxyList ) ) {
+                       // Load values from the specified file
+                       $this->proxyList = array_map( 'trim', file( $this->proxyList ) );
+               }
+
+               $resultProxyList = [];
+               $deprecatedIPEntries = [];
+
+               // backward compatibility: move all ip addresses in keys to values
+               foreach ( $this->proxyList as $key => $value ) {
+                       $keyIsIP = IP::isIPAddress( $key );
+                       $valueIsIP = IP::isIPAddress( $value );
+                       if ( $keyIsIP && !$valueIsIP ) {
+                               $deprecatedIPEntries[] = $key;
+                               $resultProxyList[] = $key;
+                       } elseif ( $keyIsIP && $valueIsIP ) {
+                               $deprecatedIPEntries[] = $key;
+                               $resultProxyList[] = $key;
+                               $resultProxyList[] = $value;
+                       } else {
+                               $resultProxyList[] = $value;
+                       }
+               }
+
+               if ( $deprecatedIPEntries ) {
+                       wfDeprecated(
+                               'IP addresses in the keys of $wgProxyList (found the following IP addresses in keys: ' .
+                               implode( ', ', $deprecatedIPEntries ) . ', please move them to values)', '1.30' );
+               }
+
+               $proxyListIPSet = new IPSet( $resultProxyList );
+               return $proxyListIPSet->match( $ip );
+       }
+
+       /**
+        * Whether the given IP is in a DNS blacklist.
+        *
+        * @param string $ip IP to check
+        * @param bool $checkWhitelist Whether to check the whitelist first
+        * @return bool True if blacklisted.
+        */
+       public function isDnsBlacklisted( $ip, $checkWhitelist = false ) {
+               if ( !$this->enableDnsBlacklist ||
+                       ( $checkWhitelist && in_array( $ip, $this->proxyWhitelist ) )
+               ) {
+                       return false;
+               }
+
+               return $this->inDnsBlacklist( $ip, $this->dnsBlacklistUrls );
+       }
+
+       /**
+        * Whether the given IP is in a given DNS blacklist.
+        *
+        * @param string $ip IP to check
+        * @param array $bases Array of Strings: URL of the DNS blacklist
+        * @return bool True if blacklisted.
+        */
+       private function inDnsBlacklist( $ip, array $bases ) {
+               $found = false;
+               // @todo FIXME: IPv6 ???  (https://bugs.php.net/bug.php?id=33170)
+               if ( IP::isIPv4( $ip ) ) {
+                       // Reverse IP, T23255
+                       $ipReversed = implode( '.', array_reverse( explode( '.', $ip ) ) );
+
+                       foreach ( $bases as $base ) {
+                               // Make hostname
+                               // If we have an access key, use that too (ProjectHoneypot, etc.)
+                               $basename = $base;
+                               if ( is_array( $base ) ) {
+                                       if ( count( $base ) >= 2 ) {
+                                               // Access key is 1, base URL is 0
+                                               $host = "{$base[1]}.$ipReversed.{$base[0]}";
+                                       } else {
+                                               $host = "$ipReversed.{$base[0]}";
+                                       }
+                                       $basename = $base[0];
+                               } else {
+                                       $host = "$ipReversed.$base";
+                               }
+
+                               // Send query
+                               $ipList = gethostbynamel( $host );
+
+                               if ( $ipList ) {
+                                       wfDebugLog( 'dnsblacklist', "Hostname $host is {$ipList[0]}, it's a proxy says $basename!" );
+                                       $found = true;
+                                       break;
+                               }
+
+                               wfDebugLog( 'dnsblacklist', "Requested $host, not found in $basename." );
+                       }
+               }
+
+               return $found;
+       }
+
+}
index 2169a4d..0601397 100644 (file)
@@ -482,7 +482,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'applychangetags' ) ) {
                                return Status::newFatal( 'tags-apply-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `applychangetags`
+                               //       right.
                                return Status::newFatal( 'tags-apply-blocked', $user->getName() );
                        }
                }
@@ -555,7 +557,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'changetags' ) ) {
                                return Status::newFatal( 'tags-update-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `changetags`
+                               //       right.
                                return Status::newFatal( 'tags-update-blocked', $user->getName() );
                        }
                }
@@ -973,7 +977,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1045,7 +1051,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1142,7 +1150,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'managechangetags' ) ) {
                                return Status::newFatal( 'tags-manage-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `managechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
@@ -1258,7 +1268,9 @@ class ChangeTags {
                if ( !is_null( $user ) ) {
                        if ( !$user->isAllowed( 'deletechangetags' ) ) {
                                return Status::newFatal( 'tags-delete-no-permission' );
-                       } elseif ( $user->isBlocked() ) {
+                       } elseif ( $user->getBlock() ) {
+                               // @TODO Ensure that the block does not apply to the `deletechangetags`
+                               //       right.
                                return Status::newFatal( 'tags-manage-blocked', $user->getName() );
                        }
                }
index 2471b52..b5b74fb 100644 (file)
@@ -245,7 +245,7 @@ class TextConflictHelper {
         * @param string $text
         * @return Content
         */
-       public function toEditContent( $text ) {
+       private function toEditContent( $text ) {
                return ContentHandler::makeContent(
                        $text,
                        $this->title,
index 93f5363..be8f7d8 100644 (file)
@@ -59,7 +59,7 @@ class HTMLFormFieldWithButton extends HTMLFormField {
                        'type' => $this->mButtonType,
                        'label' => $this->mButtonValue,
                        'flags' => $this->mButtonFlags,
-                       'id' => $this->mButtonId,
+                       'id' => $this->mButtonId ?: null,
                ] + OOUI\Element::configFromHtmlAttributes(
                        $this->getAttributes( [ 'disabled', 'tabindex' ] )
                ) );
index 6054e35..d2f1dbc 100644 (file)
@@ -70,14 +70,19 @@ abstract class Job implements RunnableJob {
                        // Backwards compatibility for old signature ($command, $title, $params)
                        $title = $params;
                        $params = func_num_args() >= 3 ? func_get_arg( 2 ) : [];
+               } elseif ( isset( $params['namespace'] ) && isset( $params['title'] ) ) {
+                       // Handle job classes that take title as constructor parameter.
+                       // If a newer classes like GenericParameterJob uses these parameters,
+                       // then this happens in Job::__construct instead.
+                       $title = Title::makeTitle( $params['namespace'], $params['title'] );
                } else {
-                       $title = ( isset( $params['namespace'] ) && isset( $params['title'] ) )
-                               ? Title::makeTitle( $params['namespace'], $params['title'] )
-                               : Title::makeTitle( NS_SPECIAL, '' );
+                       // Default title for job classes not implementing GenericParameterJob.
+                       // This must be a valid title because it not directly passed to
+                       // our Job constructor, but rather it's subclasses which may expect
+                       // to be able to use it.
+                       $title = Title::makeTitle( NS_SPECIAL, 'Blankpage' );
                }
 
-               $params = is_array( $params ) ? $params : []; // sanity
-
                if ( isset( $wgJobClasses[$command] ) ) {
                        $handler = $wgJobClasses[$command];
 
@@ -114,25 +119,35 @@ abstract class Job implements RunnableJob {
                        // Backwards compatibility for old signature ($command, $title, $params)
                        $title = $params;
                        $params = func_num_args() >= 3 ? func_get_arg( 2 ) : [];
-                       $params = is_array( $params ) ? $params : []; // sanity
-                       // Set namespace/title params if both are missing and this is not a dummy title
-                       if (
-                               $title->getDBkey() !== '' &&
-                               !isset( $params['namespace'] ) &&
-                               !isset( $params['title'] )
-                       ) {
-                               $params['namespace'] = $title->getNamespace();
-                               $params['title'] = $title->getDBKey();
-                               // Note that JobQueue classes will prefer the parameters over getTitle()
-                               $this->title = $title;
-                       }
+               } else {
+                       // Newer jobs may choose to not have a top-level title (e.g. GenericParameterJob)
+                       $title = null;
+               }
+
+               if ( !is_array( $params ) ) {
+                       throw new InvalidArgumentException( '$params must be an array' );
+               }
+
+               if (
+                       $title &&
+                       !isset( $params['namespace'] ) &&
+                       !isset( $params['title'] )
+               ) {
+                       // When constructing this class for submitting to the queue,
+                       // normalise the $title arg of old job classes as part of $params.
+                       $params['namespace'] = $title->getNamespace();
+                       $params['title'] = $title->getDBKey();
                }
 
                $this->command = $command;
                $this->params = $params + [ 'requestId' => WebRequest::getRequestId() ];
+
                if ( $this->title === null ) {
+                       // Set this field for access via getTitle().
                        $this->title = ( isset( $params['namespace'] ) && isset( $params['title'] ) )
                                ? Title::makeTitle( $params['namespace'], $params['title'] )
+                               // GenericParameterJob classes without namespace/title params
+                               // should not use getTitle(). Set an invalid title as placeholder.
                                : Title::makeTitle( NS_SPECIAL, '' );
                }
        }
index 47ee588..7c78f40 100644 (file)
@@ -91,7 +91,7 @@ class JobQueueDB extends JobQueue {
                                'job', '1', [ 'job_cmd' => $this->type, 'job_token' => '' ], __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return !$found;
@@ -118,7 +118,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                $this->cache->set( $key, $size, self::CACHE_TTL_SHORT );
 
@@ -150,7 +150,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                $this->cache->set( $key, $count, self::CACHE_TTL_SHORT );
 
@@ -187,7 +187,7 @@ class JobQueueDB extends JobQueue {
                                __METHOD__
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                $this->cache->set( $key, $count, self::CACHE_TTL_SHORT );
@@ -281,7 +281,7 @@ class JobQueueDB extends JobQueue {
                                count( $rowSet ) + count( $rowList ) - count( $rows )
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
                if ( $flags & self::QOS_ATOMIC ) {
                        $dbw->endAtomic( $method );
@@ -316,12 +316,7 @@ class JobQueueDB extends JobQueue {
                                $this->incrStats( 'pops', $this->type );
 
                                // Get the job object from the row...
-                               $params = self::extractBlob( $row->job_params );
-                               $params = is_array( $params ) ? $params : []; // sanity
-                               $params += [ 'namespace' => $row->job_namespace, 'title' => $row->job_title ];
-                               $job = $this->factoryJob( $row->job_cmd, $params );
-                               $job->setMetadata( 'id', $row->job_id );
-                               $job->setMetadata( 'timestamp', $row->job_timestamp );
+                               $job = $this->jobFromRow( $row );
                                break; // done
                        } while ( true );
 
@@ -331,7 +326,7 @@ class JobQueueDB extends JobQueue {
                                $this->recycleAndDeleteStaleJobs();
                        }
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return $job;
@@ -352,7 +347,6 @@ class JobQueueDB extends JobQueue {
                // Check cache to see if the queue has <= OFFSET items
                $tinyQueue = $this->cache->get( $this->getCacheKey( 'small' ) );
 
-               $row = false; // the row acquired
                $invertedDirection = false; // whether one job_random direction was already scanned
                // This uses a replication safe method for acquiring jobs. One could use UPDATE+LIMIT
                // instead, but that either uses ORDER BY (in which case it deadlocks in MySQL) or is
@@ -505,7 +499,7 @@ class JobQueueDB extends JobQueue {
 
                        $this->incrStats( 'acks', $this->type );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
        }
 
@@ -560,7 +554,7 @@ class JobQueueDB extends JobQueue {
                try {
                        $dbw->delete( 'job', [ 'job_cmd' => $this->type ] );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return true;
@@ -619,22 +613,11 @@ class JobQueueDB extends JobQueue {
                        return new MappedIterator(
                                $dbr->select( 'job', self::selectFields(), $conds ),
                                function ( $row ) {
-                                       $params = strlen( $row->job_params ) ? unserialize( $row->job_params ) : [];
-                                       $params = is_array( $params ) ? $params : []; // sanity
-                                       $params += [
-                                               'namespace' => $row->job_namespace,
-                                               'title' => $row->job_title
-                                       ];
-
-                                       $job = $this->factoryJob( $row->job_cmd, $params );
-                                       $job->setMetadata( 'id', $row->job_id );
-                                       $job->setMetadata( 'timestamp', $row->job_timestamp );
-
-                                       return $job;
+                                       return $this->jobFromRow( $row );
                                }
                        );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
        }
 
@@ -764,7 +747,7 @@ class JobQueueDB extends JobQueue {
 
                        $dbw->unlock( "jobqueue-recycle-{$this->type}", __METHOD__ );
                } catch ( DBError $e ) {
-                       $this->throwDBException( $e );
+                       throw $this->getDBException( $e );
                }
 
                return $count;
@@ -895,23 +878,30 @@ class JobQueueDB extends JobQueue {
        }
 
        /**
-        * @param string $blob
-        * @return bool|mixed
+        * @param stdClass $row
+        * @return RunnableJob|null
         */
-       protected static function extractBlob( $blob ) {
-               if ( (string)$blob !== '' ) {
-                       return unserialize( $blob );
-               } else {
-                       return false;
+       protected function jobFromRow( $row ) {
+               $params = ( (string)$row->job_params !== '' ) ? unserialize( $row->job_params ) : [];
+               if ( !is_array( $params ) ) { // this shouldn't happen
+                       throw new UnexpectedValueException(
+                               "Could not unserialize job with ID '{$row->job_id}'." );
                }
+
+               $params += [ 'namespace' => $row->job_namespace, 'title' => $row->job_title ];
+               $job = $this->factoryJob( $row->job_cmd, $params );
+               $job->setMetadata( 'id', $row->job_id );
+               $job->setMetadata( 'timestamp', $row->job_timestamp );
+
+               return $job;
        }
 
        /**
         * @param DBError $e
-        * @throws JobQueueError
+        * @return JobQueueError
         */
-       protected function throwDBException( DBError $e ) {
-               throw new JobQueueError( get_class( $e ) . ": " . $e->getMessage() );
+       protected function getDBException( DBError $e ) {
+               return new JobQueueError( get_class( $e ) . ": " . $e->getMessage() );
        }
 
        /**
index 8864688..2140043 100644 (file)
@@ -639,7 +639,7 @@ LUA;
                        }
                        $item = $this->unserialize( $data );
                        if ( !is_array( $item ) ) { // this shouldn't happen
-                               throw new UnexpectedValueException( "Could not find job with ID '$uid'." );
+                               throw new UnexpectedValueException( "Could not unserialize job with ID '$uid'." );
                        }
 
                        $params = $item['params'];
index 71e3331..3d6bd16 100644 (file)
@@ -175,12 +175,4 @@ class MemcachedBagOStuff extends BagOStuff {
                }
                return (int)$expiry;
        }
-
-       /**
-        * Send a debug message to the log
-        * @param string $text
-        */
-       protected function debugLog( $text ) {
-               $this->logger->debug( $text );
-       }
 }
index 692771d..db94503 100644 (file)
@@ -142,7 +142,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
         * @suppress PhanTypeNonVarPassByRef
         */
        protected function doGet( $key, $flags = 0, &$casToken = null ) {
-               $this->debugLog( "get($key)" );
+               $this->debug( "get($key)" );
                if ( defined( Memcached::class . '::GET_EXTENDED' ) ) { // v3.0.0
                        $flags = Memcached::GET_EXTENDED;
                        $res = $this->client->get( $this->validateKeyEncoding( $key ), null, $flags );
@@ -161,7 +161,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function set( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "set($key)" );
+               $this->debug( "set($key)" );
                $result = parent::set( $key, $value, $exptime, $flags = 0 );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTSTORED ) {
                        // "Not stored" is always used as the mcrouter response with AllAsyncRoute
@@ -171,12 +171,12 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        protected function cas( $casToken, $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "cas($key)" );
+               $this->debug( "cas($key)" );
                return $this->checkResult( $key, parent::cas( $casToken, $key, $value, $exptime, $flags ) );
        }
 
        public function delete( $key, $flags = 0 ) {
-               $this->debugLog( "delete($key)" );
+               $this->debug( "delete($key)" );
                $result = parent::delete( $key );
                if ( $result === false && $this->client->getResultCode() === Memcached::RES_NOTFOUND ) {
                        // "Not found" is counted as success in our interface
@@ -186,18 +186,18 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function add( $key, $value, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( "add($key)" );
+               $this->debug( "add($key)" );
                return $this->checkResult( $key, parent::add( $key, $value, $exptime ) );
        }
 
        public function incr( $key, $value = 1 ) {
-               $this->debugLog( "incr($key)" );
+               $this->debug( "incr($key)" );
                $result = $this->client->increment( $key, $value );
                return $this->checkResult( $key, $result );
        }
 
        public function decr( $key, $value = 1 ) {
-               $this->debugLog( "decr($key)" );
+               $this->debug( "decr($key)" );
                $result = $this->client->decrement( $key, $value );
                return $this->checkResult( $key, $result );
        }
@@ -223,7 +223,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
                        case Memcached::RES_DATA_EXISTS:
                        case Memcached::RES_NOTSTORED:
                        case Memcached::RES_NOTFOUND:
-                               $this->debugLog( "result: " . $this->client->getResultMessage() );
+                               $this->debug( "result: " . $this->client->getResultMessage() );
                                break;
                        default:
                                $msg = $this->client->getResultMessage();
@@ -243,7 +243,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function getMulti( array $keys, $flags = 0 ) {
-               $this->debugLog( 'getMulti(' . implode( ', ', $keys ) . ')' );
+               $this->debug( 'getMulti(' . implode( ', ', $keys ) . ')' );
                foreach ( $keys as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -252,7 +252,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function setMulti( array $data, $exptime = 0, $flags = 0 ) {
-               $this->debugLog( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
+               $this->debug( 'setMulti(' . implode( ', ', array_keys( $data ) ) . ')' );
                foreach ( array_keys( $data ) as $key ) {
                        $this->validateKeyEncoding( $key );
                }
@@ -261,7 +261,7 @@ class MemcachedPeclBagOStuff extends MemcachedBagOStuff {
        }
 
        public function changeTTL( $key, $expiry = 0, $flags = 0 ) {
-               $this->debugLog( "touch($key)" );
+               $this->debug( "touch($key)" );
                $result = $this->client->touch( $key, $expiry );
                return $this->checkResult( $key, $result );
        }
index 8f0b539..dac3421 100644 (file)
@@ -2325,7 +2325,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @return string A collection name to describe this class of key
         */
        protected function determineKeyClassForStats( $key ) {
-               $parts = explode( ':', $key );
+               $parts = explode( ':', $key, 3 );
 
                return $parts[1] ?? $parts[0]; // sanity
        }
index acf2c2e..0b77651 100644 (file)
@@ -224,7 +224,9 @@ class EmailNotification {
                                                && $watchingUser->isEmailConfirmed()
                                                && $watchingUser->getId() != $userTalkId
                                                && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges )
-                                               && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() )
+                                               // @TODO Partial blocks should not prevent the user from logging in.
+                                               //       see: https://phabricator.wikimedia.org/T208895
+                                               && !( $wgBlockDisablesLogin && $watchingUser->getBlock() )
                                                && Hooks::run( 'SendWatchlistEmailNotification', [ $watchingUser, $title, $this ] )
                                        ) {
                                                $this->compose( $watchingUser, self::WATCHLIST );
@@ -262,7 +264,9 @@ class EmailNotification {
                                wfDebug( __METHOD__ . ": user talk page edited, but user does not exist\n" );
                        } elseif ( $targetUser->getId() == $editor->getId() ) {
                                wfDebug( __METHOD__ . ": user edited their own talk page, no notification sent\n" );
-                       } elseif ( $wgBlockDisablesLogin && $targetUser->isBlocked() ) {
+                       } elseif ( $wgBlockDisablesLogin && $targetUser->getBlock() ) {
+                               // @TODO Partial blocks should not prevent the user from logging in.
+                               //       see: https://phabricator.wikimedia.org/T208895
                                wfDebug( __METHOD__ . ": talk page owner is blocked and cannot login, no notification sent\n" );
                        } elseif ( $targetUser->getOption( 'enotifusertalkpages' )
                                && ( !$minorEdit || $targetUser->getOption( 'enotifminoredits' ) )
index 931740c..8f39650 100644 (file)
@@ -3327,7 +3327,7 @@ class WikiPage implements Page, IDBAccessObject {
                        return [ [ 'alreadyrolled',
                                        htmlspecialchars( $this->mTitle->getPrefixedText() ),
                                        htmlspecialchars( $fromP ),
-                                       htmlspecialchars( $targetEditorForPublic ? $targetEditorForPublic->getName() : '' )
+                                       htmlspecialchars( $currentEditorForPublic ? $currentEditorForPublic->getName() : '' )
                        ] ];
                }
 
diff --git a/includes/parser/PPCustomFrame_DOM.php b/includes/parser/PPCustomFrame_DOM.php
new file mode 100644 (file)
index 0000000..70663a0
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with custom arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPCustomFrame_DOM extends PPFrame_DOM {
+
+       public $args;
+
+       public function __construct( $preprocessor, $args ) {
+               parent::__construct( $preprocessor );
+               $this->args = $args;
+       }
+
+       public function __toString() {
+               $s = 'cstmframe{';
+               $first = true;
+               foreach ( $this->args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->args );
+       }
+
+       /**
+        * @param int|string $index
+        * @return string|bool
+        */
+       public function getArgument( $index ) {
+               return $this->args[$index] ?? false;
+       }
+
+       public function getArguments() {
+               return $this->args;
+       }
+}
diff --git a/includes/parser/PPCustomFrame_Hash.php b/includes/parser/PPCustomFrame_Hash.php
new file mode 100644 (file)
index 0000000..a92b104
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with custom arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPCustomFrame_Hash extends PPFrame_Hash {
+
+       public $args;
+
+       public function __construct( $preprocessor, $args ) {
+               parent::__construct( $preprocessor );
+               $this->args = $args;
+       }
+
+       public function __toString() {
+               $s = 'cstmframe{';
+               $first = true;
+               foreach ( $this->args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->args );
+       }
+
+       /**
+        * @param int|string $index
+        * @return string|bool
+        */
+       public function getArgument( $index ) {
+               return $this->args[$index] ?? false;
+       }
+
+       public function getArguments() {
+               return $this->args;
+       }
+}
diff --git a/includes/parser/PPDPart.php b/includes/parser/PPDPart.php
new file mode 100644 (file)
index 0000000..1873730
--- /dev/null
@@ -0,0 +1,39 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+class PPDPart {
+       /**
+        * @var string Output accumulator string
+        */
+       public $out;
+
+       // Optional member variables:
+       //   eqpos        Position of equals sign in output accumulator
+       //   commentEnd   Past-the-end input pointer for the last comment encountered
+       //   visualEnd    Past-the-end input pointer for the end of the accumulator minus comments
+
+       public function __construct( $out = '' ) {
+               $this->out = $out;
+       }
+}
diff --git a/includes/parser/PPDPart_Hash.php b/includes/parser/PPDPart_Hash.php
new file mode 100644 (file)
index 0000000..7507f06
--- /dev/null
@@ -0,0 +1,36 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDPart_Hash extends PPDPart {
+
+       public function __construct( $out = '' ) {
+               if ( $out !== '' ) {
+                       $accum = [ $out ];
+               } else {
+                       $accum = [];
+               }
+               parent::__construct( $accum );
+       }
+}
diff --git a/includes/parser/PPDStack.php b/includes/parser/PPDStack.php
new file mode 100644 (file)
index 0000000..4108bd7
--- /dev/null
@@ -0,0 +1,113 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Stack class to help Preprocessor::preprocessToObj()
+ * @ingroup Parser
+ */
+class PPDStack {
+       public $stack, $rootAccum;
+
+       /**
+        * @var PPDStack
+        */
+       public $top;
+       public $out;
+       public $elementClass = PPDStackElement::class;
+
+       public static $false = false;
+
+       public function __construct() {
+               $this->stack = [];
+               $this->top = false;
+               $this->rootAccum = '';
+               $this->accum =& $this->rootAccum;
+       }
+
+       /**
+        * @return int
+        */
+       public function count() {
+               return count( $this->stack );
+       }
+
+       public function &getAccum() {
+               return $this->accum;
+       }
+
+       /**
+        * @return bool|PPDPart
+        */
+       public function getCurrentPart() {
+               if ( $this->top === false ) {
+                       return false;
+               } else {
+                       return $this->top->getCurrentPart();
+               }
+       }
+
+       public function push( $data ) {
+               if ( $data instanceof $this->elementClass ) {
+                       $this->stack[] = $data;
+               } else {
+                       $class = $this->elementClass;
+                       $this->stack[] = new $class( $data );
+               }
+               $this->top = $this->stack[count( $this->stack ) - 1];
+               $this->accum =& $this->top->getAccum();
+       }
+
+       public function pop() {
+               if ( $this->stack === [] ) {
+                       throw new MWException( __METHOD__ . ': no elements remaining' );
+               }
+               $temp = array_pop( $this->stack );
+
+               if ( count( $this->stack ) ) {
+                       $this->top = $this->stack[count( $this->stack ) - 1];
+                       $this->accum =& $this->top->getAccum();
+               } else {
+                       $this->top = self::$false;
+                       $this->accum =& $this->rootAccum;
+               }
+               return $temp;
+       }
+
+       public function addPart( $s = '' ) {
+               $this->top->addPart( $s );
+               $this->accum =& $this->top->getAccum();
+       }
+
+       /**
+        * @return array
+        */
+       public function getFlags() {
+               if ( $this->stack === [] ) {
+                       return [
+                               'findEquals' => false,
+                               'findPipe' => false,
+                               'inHeading' => false,
+                       ];
+               } else {
+                       return $this->top->getFlags();
+               }
+       }
+}
diff --git a/includes/parser/PPDStackElement.php b/includes/parser/PPDStackElement.php
new file mode 100644 (file)
index 0000000..116244d
--- /dev/null
@@ -0,0 +1,129 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+class PPDStackElement {
+       /**
+        * @var string Opening character (\n for heading)
+        */
+       public $open;
+
+       /**
+        * @var string Matching closing character
+        */
+       public $close;
+
+       /**
+        * @var string Saved prefix that may affect later processing,
+        *  e.g. to differentiate `-{{{{` and `{{{{` after later seeing `}}}`.
+        */
+       public $savedPrefix = '';
+
+       /**
+        * @var int Number of opening characters found (number of "=" for heading)
+        */
+       public $count;
+
+       /**
+        * @var PPDPart[] Array of PPDPart objects describing pipe-separated parts.
+        */
+       public $parts;
+
+       /**
+        * @var bool True if the open char appeared at the start of the input line.
+        *  Not set for headings.
+        */
+       public $lineStart;
+
+       public $partClass = PPDPart::class;
+
+       public function __construct( $data = [] ) {
+               $class = $this->partClass;
+               $this->parts = [ new $class ];
+
+               foreach ( $data as $name => $value ) {
+                       $this->$name = $value;
+               }
+       }
+
+       public function &getAccum() {
+               return $this->parts[count( $this->parts ) - 1]->out;
+       }
+
+       public function addPart( $s = '' ) {
+               $class = $this->partClass;
+               $this->parts[] = new $class( $s );
+       }
+
+       /**
+        * @return PPDPart
+        */
+       public function getCurrentPart() {
+               return $this->parts[count( $this->parts ) - 1];
+       }
+
+       /**
+        * @return array
+        */
+       public function getFlags() {
+               $partCount = count( $this->parts );
+               $findPipe = $this->open != "\n" && $this->open != '[';
+               return [
+                       'findPipe' => $findPipe,
+                       'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
+                       'inHeading' => $this->open == "\n",
+               ];
+       }
+
+       /**
+        * Get the output string that would result if the close is not found.
+        *
+        * @param bool|int $openingCount
+        * @return string
+        */
+       public function breakSyntax( $openingCount = false ) {
+               if ( $this->open == "\n" ) {
+                       $s = $this->savedPrefix . $this->parts[0]->out;
+               } else {
+                       if ( $openingCount === false ) {
+                               $openingCount = $this->count;
+                       }
+                       $s = substr( $this->open, 0, -1 );
+                       $s .= str_repeat(
+                               substr( $this->open, -1 ),
+                               $openingCount - strlen( $s )
+                       );
+                       $s = $this->savedPrefix . $s;
+                       $first = true;
+                       foreach ( $this->parts as $part ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= '|';
+                               }
+                               $s .= $part->out;
+                       }
+               }
+               return $s;
+       }
+}
diff --git a/includes/parser/PPDStackElement_Hash.php b/includes/parser/PPDStackElement_Hash.php
new file mode 100644 (file)
index 0000000..26351b2
--- /dev/null
@@ -0,0 +1,73 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDStackElement_Hash extends PPDStackElement {
+
+       public function __construct( $data = [] ) {
+               $this->partClass = PPDPart_Hash::class;
+               parent::__construct( $data );
+       }
+
+       /**
+        * Get the accumulator that would result if the close is not found.
+        *
+        * @param int|bool $openingCount
+        * @return array
+        */
+       public function breakSyntax( $openingCount = false ) {
+               if ( $this->open == "\n" ) {
+                       $accum = array_merge( [ $this->savedPrefix ], $this->parts[0]->out );
+               } else {
+                       if ( $openingCount === false ) {
+                               $openingCount = $this->count;
+                       }
+                       $s = substr( $this->open, 0, -1 );
+                       $s .= str_repeat(
+                               substr( $this->open, -1 ),
+                               $openingCount - strlen( $s )
+                       );
+                       $accum = [ $this->savedPrefix . $s ];
+                       $lastIndex = 0;
+                       $first = true;
+                       foreach ( $this->parts as $part ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } elseif ( is_string( $accum[$lastIndex] ) ) {
+                                       $accum[$lastIndex] .= '|';
+                               } else {
+                                       $accum[++$lastIndex] = '|';
+                               }
+                               foreach ( $part->out as $node ) {
+                                       if ( is_string( $node ) && is_string( $accum[$lastIndex] ) ) {
+                                               $accum[$lastIndex] .= $node;
+                                       } else {
+                                               $accum[++$lastIndex] = $node;
+                                       }
+                               }
+                       }
+               }
+               return $accum;
+       }
+}
diff --git a/includes/parser/PPDStack_Hash.php b/includes/parser/PPDStack_Hash.php
new file mode 100644 (file)
index 0000000..1e50b1c
--- /dev/null
@@ -0,0 +1,34 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Stack class to help Preprocessor::preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPDStack_Hash extends PPDStack {
+
+       public function __construct() {
+               $this->elementClass = PPDStackElement_Hash::class;
+               parent::__construct();
+               $this->rootAccum = [];
+       }
+}
diff --git a/includes/parser/PPFrame.php b/includes/parser/PPFrame.php
new file mode 100644 (file)
index 0000000..79c7c3b
--- /dev/null
@@ -0,0 +1,204 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+interface PPFrame {
+       const NO_ARGS = 1;
+       const NO_TEMPLATES = 2;
+       const STRIP_COMMENTS = 4;
+       const NO_IGNORE = 8;
+       const RECOVER_COMMENTS = 16;
+       const NO_TAGS = 32;
+
+       const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
+               self::RECOVER_COMMENTS | self::NO_TAGS;
+
+       /** This constant exists when $indexOffset is supported in newChild() */
+       const SUPPORTS_INDEX_OFFSET = 1;
+
+       /**
+        * Create a child frame
+        *
+        * @param array|bool $args
+        * @param bool|Title $title
+        * @param int $indexOffset A number subtracted from the index attributes of the arguments
+        *
+        * @return PPFrame
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 );
+
+       /**
+        * Expand a document tree node, caching the result on its parent with the given key
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 );
+
+       /**
+        * Expand a document tree node
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 );
+
+       /**
+        * Implode with flags for expand()
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode $args,...
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags /*, ... */ );
+
+       /**
+        * Implode with no flags specified
+        * @param string $sep
+        * @param string|PPNode $args,...
+        * @return string
+        */
+       public function implode( $sep /*, ... */ );
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        * @param string $sep
+        * @param string|PPNode $args,...
+        * @return PPNode
+        */
+       public function virtualImplode( $sep /*, ... */ );
+
+       /**
+        * Virtual implode with brackets
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode $args,...
+        * @return PPNode
+        */
+       public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty();
+
+       /**
+        * Returns all arguments of this frame
+        * @return array
+        */
+       public function getArguments();
+
+       /**
+        * Returns all numbered arguments of this frame
+        * @return array
+        */
+       public function getNumberedArguments();
+
+       /**
+        * Returns all named arguments of this frame
+        * @return array
+        */
+       public function getNamedArguments();
+
+       /**
+        * Get an argument to this frame by name
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name );
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        * @return bool
+        */
+       public function loopCheck( $title );
+
+       /**
+        * Return true if the frame is a template frame
+        * @return bool
+        */
+       public function isTemplate();
+
+       /**
+        * Set the "volatile" flag.
+        *
+        * Note that this is somewhat of a "hack" in order to make extensions
+        * with side effects (such as Cite) work with the PHP parser. New
+        * extensions should be written in a way that they do not need this
+        * function, because other parsers (such as Parsoid) are not guaranteed
+        * to respect it, and it may be removed in the future.
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true );
+
+       /**
+        * Get the "volatile" flag.
+        *
+        * Callers should avoid caching the result of an expansion if it has the
+        * volatile flag set.
+        *
+        * @see self::setVolatile()
+        * @return bool
+        */
+       public function isVolatile();
+
+       /**
+        * Get the TTL of the frame's output.
+        *
+        * This is the maximum amount of time, in seconds, that this frame's
+        * output should be cached for. A value of null indicates that no
+        * maximum has been specified.
+        *
+        * Note that this TTL only applies to caching frames as parts of pages.
+        * It is not relevant to caching the entire rendered output of a page.
+        *
+        * @return int|null
+        */
+       public function getTTL();
+
+       /**
+        * Set the TTL of the output of this frame and all of its ancestors.
+        * Has no effect if the new TTL is greater than the one already set.
+        * Note that it is the caller's responsibility to change the cache
+        * expiry of the page as a whole, if such behavior is desired.
+        *
+        * @see self::getTTL()
+        * @param int $ttl
+        */
+       public function setTTL( $ttl );
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle();
+}
diff --git a/includes/parser/PPFrame_DOM.php b/includes/parser/PPFrame_DOM.php
new file mode 100644 (file)
index 0000000..a7fea00
--- /dev/null
@@ -0,0 +1,631 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * An expansion frame, used as a context to expand the result of preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPFrame_DOM implements PPFrame {
+
+       /**
+        * @var Preprocessor
+        */
+       public $preprocessor;
+
+       /**
+        * @var Parser
+        */
+       public $parser;
+
+       /**
+        * @var Title
+        */
+       public $title;
+       public $titleCache;
+
+       /**
+        * Hashtable listing templates which are disallowed for expansion in this frame,
+        * having been encountered previously in parent frames.
+        */
+       public $loopCheckHash;
+
+       /**
+        * Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
+        */
+       public $depth;
+
+       private $volatile = false;
+       private $ttl = null;
+
+       /**
+        * @var array
+        */
+       protected $childExpansionCache;
+
+       /**
+        * Construct a new preprocessor frame.
+        * @param Preprocessor $preprocessor The parent preprocessor
+        */
+       public function __construct( $preprocessor ) {
+               $this->preprocessor = $preprocessor;
+               $this->parser = $preprocessor->parser;
+               $this->title = $this->parser->mTitle;
+               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
+               $this->loopCheckHash = [];
+               $this->depth = 0;
+               $this->childExpansionCache = [];
+       }
+
+       /**
+        * Create a new child frame
+        * $args is optionally a multi-root PPNode or array containing the template arguments
+        *
+        * @param bool|array $args
+        * @param Title|bool $title
+        * @param int $indexOffset
+        * @return PPTemplateFrame_DOM
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
+               $namedArgs = [];
+               $numberedArgs = [];
+               if ( $title === false ) {
+                       $title = $this->title;
+               }
+               if ( $args !== false ) {
+                       $xpath = false;
+                       if ( $args instanceof PPNode ) {
+                               $args = $args->node;
+                       }
+                       foreach ( $args as $arg ) {
+                               if ( $arg instanceof PPNode ) {
+                                       $arg = $arg->node;
+                               }
+                               if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
+                                       $xpath = new DOMXPath( $arg->ownerDocument );
+                               }
+
+                               $nameNodes = $xpath->query( 'name', $arg );
+                               $value = $xpath->query( 'value', $arg );
+                               if ( $nameNodes->item( 0 )->hasAttributes() ) {
+                                       // Numbered parameter
+                                       $index = $nameNodes->item( 0 )->attributes->getNamedItem( 'index' )->textContent;
+                                       $index = $index - $indexOffset;
+                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $index ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $numberedArgs[$index] = $value->item( 0 );
+                                       unset( $namedArgs[$index] );
+                               } else {
+                                       // Named parameter
+                                       $name = trim( $this->expand( $nameNodes->item( 0 ), PPFrame::STRIP_COMMENTS ) );
+                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $name ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $namedArgs[$name] = $value->item( 0 );
+                                       unset( $numberedArgs[$name] );
+                               }
+                       }
+               }
+               return new PPTemplateFrame_DOM( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               // we don't have a parent, so we don't have a cache
+               return $this->expand( $root, $flags );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 ) {
+               static $expansionDepth = 0;
+               if ( is_string( $root ) ) {
+                       return $root;
+               }
+
+               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
+                       $this->parser->limitationWarn( 'node-count-exceeded',
+                               $this->parser->mPPNodeCount,
+                               $this->parser->mOptions->getMaxPPNodeCount()
+                       );
+                       return '<span class="error">Node-count limit exceeded</span>';
+               }
+
+               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
+                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
+                               $expansionDepth,
+                               $this->parser->mOptions->getMaxPPExpandDepth()
+                       );
+                       return '<span class="error">Expansion depth limit exceeded</span>';
+               }
+               ++$expansionDepth;
+               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+                       $this->parser->mHighestExpansionDepth = $expansionDepth;
+               }
+
+               if ( $root instanceof PPNode_DOM ) {
+                       $root = $root->node;
+               }
+               if ( $root instanceof DOMDocument ) {
+                       $root = $root->documentElement;
+               }
+
+               $outStack = [ '', '' ];
+               $iteratorStack = [ false, $root ];
+               $indexStack = [ 0, 0 ];
+
+               while ( count( $iteratorStack ) > 1 ) {
+                       $level = count( $outStack ) - 1;
+                       $iteratorNode =& $iteratorStack[$level];
+                       $out =& $outStack[$level];
+                       $index =& $indexStack[$level];
+
+                       if ( $iteratorNode instanceof PPNode_DOM ) {
+                               $iteratorNode = $iteratorNode->node;
+                       }
+
+                       if ( is_array( $iteratorNode ) ) {
+                               if ( $index >= count( $iteratorNode ) ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode[$index];
+                                       $index++;
+                               }
+                       } elseif ( $iteratorNode instanceof DOMNodeList ) {
+                               if ( $index >= $iteratorNode->length ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode->item( $index );
+                                       $index++;
+                               }
+                       } else {
+                               // Copy to $contextNode and then delete from iterator stack,
+                               // because this is not an iterator but we do have to execute it once
+                               $contextNode = $iteratorStack[$level];
+                               $iteratorStack[$level] = false;
+                       }
+
+                       if ( $contextNode instanceof PPNode_DOM ) {
+                               $contextNode = $contextNode->node;
+                       }
+
+                       $newIterator = false;
+
+                       if ( $contextNode === false ) {
+                               // nothing to do
+                       } elseif ( is_string( $contextNode ) ) {
+                               $out .= $contextNode;
+                       } elseif ( is_array( $contextNode ) || $contextNode instanceof DOMNodeList ) {
+                               $newIterator = $contextNode;
+                       } elseif ( $contextNode instanceof DOMNode ) {
+                               if ( $contextNode->nodeType == XML_TEXT_NODE ) {
+                                       $out .= $contextNode->nodeValue;
+                               } elseif ( $contextNode->nodeName == 'template' ) {
+                                       # Double-brace expansion
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $titles = $xpath->query( 'title', $contextNode );
+                                       $title = $titles->item( 0 );
+                                       $parts = $xpath->query( 'part', $contextNode );
+                                       if ( $flags & PPFrame::NO_TEMPLATES ) {
+                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $title, $parts );
+                                       } else {
+                                               $lineStart = $contextNode->getAttribute( 'lineStart' );
+                                               $params = [
+                                                       'title' => new PPNode_DOM( $title ),
+                                                       'parts' => new PPNode_DOM( $parts ),
+                                                       'lineStart' => $lineStart ];
+                                               $ret = $this->parser->braceSubstitution( $params, $this );
+                                               if ( isset( $ret['object'] ) ) {
+                                                       $newIterator = $ret['object'];
+                                               } else {
+                                                       $out .= $ret['text'];
+                                               }
+                                       }
+                               } elseif ( $contextNode->nodeName == 'tplarg' ) {
+                                       # Triple-brace expansion
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $titles = $xpath->query( 'title', $contextNode );
+                                       $title = $titles->item( 0 );
+                                       $parts = $xpath->query( 'part', $contextNode );
+                                       if ( $flags & PPFrame::NO_ARGS ) {
+                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $title, $parts );
+                                       } else {
+                                               $params = [
+                                                       'title' => new PPNode_DOM( $title ),
+                                                       'parts' => new PPNode_DOM( $parts ) ];
+                                               $ret = $this->parser->argSubstitution( $params, $this );
+                                               if ( isset( $ret['object'] ) ) {
+                                                       $newIterator = $ret['object'];
+                                               } else {
+                                                       $out .= $ret['text'];
+                                               }
+                                       }
+                               } elseif ( $contextNode->nodeName == 'comment' ) {
+                                       # HTML-style comment
+                                       # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
+                                       # Not in RECOVER_COMMENTS mode (msgnw) though.
+                                       if ( ( $this->parser->ot['html']
+                                               || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
+                                               || ( $flags & PPFrame::STRIP_COMMENTS )
+                                               ) && !( $flags & PPFrame::RECOVER_COMMENTS )
+                                       ) {
+                                               $out .= '';
+                                       } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                               # Add a strip marker in PST mode so that pstPass2() can
+                                               # run some old-fashioned regexes on the result.
+                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
+                                               $out .= $this->parser->insertStripItem( $contextNode->textContent );
+                                       } else {
+                                               # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
+                                               $out .= $contextNode->textContent;
+                                       }
+                               } elseif ( $contextNode->nodeName == 'ignore' ) {
+                                       # Output suppression used by <includeonly> etc.
+                                       # OT_WIKI will only respect <ignore> in substed templates.
+                                       # The other output types respect it unless NO_IGNORE is set.
+                                       # extractSections() sets NO_IGNORE and so never respects it.
+                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                               || ( $flags & PPFrame::NO_IGNORE )
+                                       ) {
+                                               $out .= $contextNode->textContent;
+                                       } else {
+                                               $out .= '';
+                                       }
+                               } elseif ( $contextNode->nodeName == 'ext' ) {
+                                       # Extension tag
+                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
+                                       $names = $xpath->query( 'name', $contextNode );
+                                       $attrs = $xpath->query( 'attr', $contextNode );
+                                       $inners = $xpath->query( 'inner', $contextNode );
+                                       $closes = $xpath->query( 'close', $contextNode );
+                                       if ( $flags & PPFrame::NO_TAGS ) {
+                                               $s = '<' . $this->expand( $names->item( 0 ), $flags );
+                                               if ( $attrs->length > 0 ) {
+                                                       $s .= $this->expand( $attrs->item( 0 ), $flags );
+                                               }
+                                               if ( $inners->length > 0 ) {
+                                                       $s .= '>' . $this->expand( $inners->item( 0 ), $flags );
+                                                       if ( $closes->length > 0 ) {
+                                                               $s .= $this->expand( $closes->item( 0 ), $flags );
+                                                       }
+                                               } else {
+                                                       $s .= '/>';
+                                               }
+                                               $out .= $s;
+                                       } else {
+                                               $params = [
+                                                       'name' => new PPNode_DOM( $names->item( 0 ) ),
+                                                       'attr' => $attrs->length > 0 ? new PPNode_DOM( $attrs->item( 0 ) ) : null,
+                                                       'inner' => $inners->length > 0 ? new PPNode_DOM( $inners->item( 0 ) ) : null,
+                                                       'close' => $closes->length > 0 ? new PPNode_DOM( $closes->item( 0 ) ) : null,
+                                               ];
+                                               $out .= $this->parser->extensionSubstitution( $params, $this );
+                                       }
+                               } elseif ( $contextNode->nodeName == 'h' ) {
+                                       # Heading
+                                       $s = $this->expand( $contextNode->childNodes, $flags );
+
+                                       # Insert a heading marker only for <h> children of <root>
+                                       # This is to stop extractSections from going over multiple tree levels
+                                       if ( $contextNode->parentNode->nodeName == 'root' && $this->parser->ot['html'] ) {
+                                               # Insert heading index marker
+                                               $headingIndex = $contextNode->getAttribute( 'i' );
+                                               $titleText = $this->title->getPrefixedDBkey();
+                                               $this->parser->mHeadings[] = [ $titleText, $headingIndex ];
+                                               $serial = count( $this->parser->mHeadings ) - 1;
+                                               $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
+                                               $count = $contextNode->getAttribute( 'level' );
+                                               $s = substr( $s, 0, $count ) . $marker . substr( $s, $count );
+                                               $this->parser->mStripState->addGeneral( $marker, '' );
+                                       }
+                                       $out .= $s;
+                               } else {
+                                       # Generic recursive expansion
+                                       $newIterator = $contextNode->childNodes;
+                               }
+                       } else {
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
+                       }
+
+                       if ( $newIterator !== false ) {
+                               if ( $newIterator instanceof PPNode_DOM ) {
+                                       $newIterator = $newIterator->node;
+                               }
+                               $outStack[] = '';
+                               $iteratorStack[] = $newIterator;
+                               $indexStack[] = 0;
+                       } elseif ( $iteratorStack[$level] === false ) {
+                               // Return accumulated value to parent
+                               // With tail recursion
+                               while ( $iteratorStack[$level] === false && $level > 0 ) {
+                                       $outStack[$level - 1] .= $out;
+                                       array_pop( $outStack );
+                                       array_pop( $iteratorStack );
+                                       array_pop( $indexStack );
+                                       $level--;
+                               }
+                       }
+               }
+               --$expansionDepth;
+               return $outStack[0];
+       }
+
+       /**
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node, $flags );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Implode with no flags specified
+        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        *
+        * @param string $sep
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return string
+        */
+       public function implode( $sep, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        *
+        * @param string $sep
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return array
+        */
+       public function virtualImplode( $sep, ...$args ) {
+               $out = [];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               return $out;
+       }
+
+       /**
+        * Virtual implode with brackets
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode_DOM|DOMDocument ...$args
+        * @return array
+        */
+       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
+               $out = [ $start ];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_DOM ) {
+                               $root = $root->node;
+                       }
+                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               $out[] = $end;
+               return $out;
+       }
+
+       public function __toString() {
+               return 'frame{}';
+       }
+
+       public function getPDBK( $level = false ) {
+               if ( $level === false ) {
+                       return $this->title->getPrefixedDBkey();
+               } else {
+                       return $this->titleCache[$level] ?? false;
+               }
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               return [];
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return true;
+       }
+
+       /**
+        * @param int|string $name
+        * @return bool Always false in this implementation.
+        */
+       public function getArgument( $name ) {
+               return false;
+       }
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        * @return bool
+        */
+       public function loopCheck( $title ) {
+               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return false;
+       }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Set the volatile flag
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true ) {
+               $this->volatile = $flag;
+       }
+
+       /**
+        * Get the volatile flag
+        *
+        * @return bool
+        */
+       public function isVolatile() {
+               return $this->volatile;
+       }
+
+       /**
+        * Set the TTL
+        *
+        * @param int $ttl
+        */
+       public function setTTL( $ttl ) {
+               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
+                       $this->ttl = $ttl;
+               }
+       }
+
+       /**
+        * Get the TTL
+        *
+        * @return int|null
+        */
+       public function getTTL() {
+               return $this->ttl;
+       }
+}
diff --git a/includes/parser/PPFrame_Hash.php b/includes/parser/PPFrame_Hash.php
new file mode 100644 (file)
index 0000000..845ec73
--- /dev/null
@@ -0,0 +1,613 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * An expansion frame, used as a context to expand the result of preprocessToObj()
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPFrame_Hash implements PPFrame {
+
+       /**
+        * @var Parser
+        */
+       public $parser;
+
+       /**
+        * @var Preprocessor
+        */
+       public $preprocessor;
+
+       /**
+        * @var Title
+        */
+       public $title;
+       public $titleCache;
+
+       /**
+        * Hashtable listing templates which are disallowed for expansion in this frame,
+        * having been encountered previously in parent frames.
+        */
+       public $loopCheckHash;
+
+       /**
+        * Recursion depth of this frame, top = 0
+        * Note that this is NOT the same as expansion depth in expand()
+        */
+       public $depth;
+
+       private $volatile = false;
+       private $ttl = null;
+
+       /**
+        * @var array
+        */
+       protected $childExpansionCache;
+
+       /**
+        * Construct a new preprocessor frame.
+        * @param Preprocessor $preprocessor The parent preprocessor
+        */
+       public function __construct( $preprocessor ) {
+               $this->preprocessor = $preprocessor;
+               $this->parser = $preprocessor->parser;
+               $this->title = $this->parser->mTitle;
+               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
+               $this->loopCheckHash = [];
+               $this->depth = 0;
+               $this->childExpansionCache = [];
+       }
+
+       /**
+        * Create a new child frame
+        * $args is optionally a multi-root PPNode or array containing the template arguments
+        *
+        * @param array|bool|PPNode_Hash_Array $args
+        * @param Title|bool $title
+        * @param int $indexOffset
+        * @throws MWException
+        * @return PPTemplateFrame_Hash
+        */
+       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
+               $namedArgs = [];
+               $numberedArgs = [];
+               if ( $title === false ) {
+                       $title = $this->title;
+               }
+               if ( $args !== false ) {
+                       if ( $args instanceof PPNode_Hash_Array ) {
+                               $args = $args->value;
+                       } elseif ( !is_array( $args ) ) {
+                               throw new MWException( __METHOD__ . ': $args must be array or PPNode_Hash_Array' );
+                       }
+                       foreach ( $args as $arg ) {
+                               $bits = $arg->splitArg();
+                               if ( $bits['index'] !== '' ) {
+                                       // Numbered parameter
+                                       $index = $bits['index'] - $indexOffset;
+                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $index ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $numberedArgs[$index] = $bits['value'];
+                                       unset( $namedArgs[$index] );
+                               } else {
+                                       // Named parameter
+                                       $name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
+                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
+                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
+                                                       wfEscapeWikiText( $this->title ),
+                                                       wfEscapeWikiText( $title ),
+                                                       wfEscapeWikiText( $name ) )->text() );
+                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
+                                       }
+                                       $namedArgs[$name] = $bits['value'];
+                                       unset( $numberedArgs[$name] );
+                               }
+                       }
+               }
+               return new PPTemplateFrame_Hash( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               // we don't have a parent, so we don't have a cache
+               return $this->expand( $root, $flags );
+       }
+
+       /**
+        * @throws MWException
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function expand( $root, $flags = 0 ) {
+               static $expansionDepth = 0;
+               if ( is_string( $root ) ) {
+                       return $root;
+               }
+
+               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
+                       $this->parser->limitationWarn( 'node-count-exceeded',
+                                       $this->parser->mPPNodeCount,
+                                       $this->parser->mOptions->getMaxPPNodeCount()
+                       );
+                       return '<span class="error">Node-count limit exceeded</span>';
+               }
+               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
+                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
+                                       $expansionDepth,
+                                       $this->parser->mOptions->getMaxPPExpandDepth()
+                       );
+                       return '<span class="error">Expansion depth limit exceeded</span>';
+               }
+               ++$expansionDepth;
+               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+                       $this->parser->mHighestExpansionDepth = $expansionDepth;
+               }
+
+               $outStack = [ '', '' ];
+               $iteratorStack = [ false, $root ];
+               $indexStack = [ 0, 0 ];
+
+               while ( count( $iteratorStack ) > 1 ) {
+                       $level = count( $outStack ) - 1;
+                       $iteratorNode =& $iteratorStack[$level];
+                       $out =& $outStack[$level];
+                       $index =& $indexStack[$level];
+
+                       if ( is_array( $iteratorNode ) ) {
+                               if ( $index >= count( $iteratorNode ) ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode[$index];
+                                       $index++;
+                               }
+                       } elseif ( $iteratorNode instanceof PPNode_Hash_Array ) {
+                               if ( $index >= $iteratorNode->getLength() ) {
+                                       // All done with this iterator
+                                       $iteratorStack[$level] = false;
+                                       $contextNode = false;
+                               } else {
+                                       $contextNode = $iteratorNode->item( $index );
+                                       $index++;
+                               }
+                       } else {
+                               // Copy to $contextNode and then delete from iterator stack,
+                               // because this is not an iterator but we do have to execute it once
+                               $contextNode = $iteratorStack[$level];
+                               $iteratorStack[$level] = false;
+                       }
+
+                       $newIterator = false;
+                       $contextName = false;
+                       $contextChildren = false;
+
+                       if ( $contextNode === false ) {
+                               // nothing to do
+                       } elseif ( is_string( $contextNode ) ) {
+                               $out .= $contextNode;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Array ) {
+                               $newIterator = $contextNode;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Attr ) {
+                               // No output
+                       } elseif ( $contextNode instanceof PPNode_Hash_Text ) {
+                               $out .= $contextNode->value;
+                       } elseif ( $contextNode instanceof PPNode_Hash_Tree ) {
+                               $contextName = $contextNode->name;
+                               $contextChildren = $contextNode->getRawChildren();
+                       } elseif ( is_array( $contextNode ) ) {
+                               // Node descriptor array
+                               if ( count( $contextNode ) !== 2 ) {
+                                       throw new MWException( __METHOD__ .
+                                               ': found an array where a node descriptor should be' );
+                               }
+                               list( $contextName, $contextChildren ) = $contextNode;
+                       } else {
+                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
+                       }
+
+                       // Handle node descriptor array or tree object
+                       if ( $contextName === false ) {
+                               // Not a node, already handled above
+                       } elseif ( $contextName[0] === '@' ) {
+                               // Attribute: no output
+                       } elseif ( $contextName === 'template' ) {
+                               # Double-brace expansion
+                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
+                               if ( $flags & PPFrame::NO_TEMPLATES ) {
+                                       $newIterator = $this->virtualBracketedImplode(
+                                               '{{', '|', '}}',
+                                               $bits['title'],
+                                               $bits['parts']
+                                       );
+                               } else {
+                                       $ret = $this->parser->braceSubstitution( $bits, $this );
+                                       if ( isset( $ret['object'] ) ) {
+                                               $newIterator = $ret['object'];
+                                       } else {
+                                               $out .= $ret['text'];
+                                       }
+                               }
+                       } elseif ( $contextName === 'tplarg' ) {
+                               # Triple-brace expansion
+                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
+                               if ( $flags & PPFrame::NO_ARGS ) {
+                                       $newIterator = $this->virtualBracketedImplode(
+                                               '{{{', '|', '}}}',
+                                               $bits['title'],
+                                               $bits['parts']
+                                       );
+                               } else {
+                                       $ret = $this->parser->argSubstitution( $bits, $this );
+                                       if ( isset( $ret['object'] ) ) {
+                                               $newIterator = $ret['object'];
+                                       } else {
+                                               $out .= $ret['text'];
+                                       }
+                               }
+                       } elseif ( $contextName === 'comment' ) {
+                               # HTML-style comment
+                               # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
+                               # Not in RECOVER_COMMENTS mode (msgnw) though.
+                               if ( ( $this->parser->ot['html']
+                                       || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
+                                       || ( $flags & PPFrame::STRIP_COMMENTS )
+                                       ) && !( $flags & PPFrame::RECOVER_COMMENTS )
+                               ) {
+                                       $out .= '';
+                               } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
+                                       # Add a strip marker in PST mode so that pstPass2() can
+                                       # run some old-fashioned regexes on the result.
+                                       # Not in RECOVER_COMMENTS mode (extractSections) though.
+                                       $out .= $this->parser->insertStripItem( $contextChildren[0] );
+                               } else {
+                                       # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
+                                       $out .= $contextChildren[0];
+                               }
+                       } elseif ( $contextName === 'ignore' ) {
+                               # Output suppression used by <includeonly> etc.
+                               # OT_WIKI will only respect <ignore> in substed templates.
+                               # The other output types respect it unless NO_IGNORE is set.
+                               # extractSections() sets NO_IGNORE and so never respects it.
+                               if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
+                                       || ( $flags & PPFrame::NO_IGNORE )
+                               ) {
+                                       $out .= $contextChildren[0];
+                               } else {
+                                       // $out .= '';
+                               }
+                       } elseif ( $contextName === 'ext' ) {
+                               # Extension tag
+                               $bits = PPNode_Hash_Tree::splitRawExt( $contextChildren ) +
+                                       [ 'attr' => null, 'inner' => null, 'close' => null ];
+                               if ( $flags & PPFrame::NO_TAGS ) {
+                                       $s = '<' . $bits['name']->getFirstChild()->value;
+                                       if ( $bits['attr'] ) {
+                                               $s .= $bits['attr']->getFirstChild()->value;
+                                       }
+                                       if ( $bits['inner'] ) {
+                                               $s .= '>' . $bits['inner']->getFirstChild()->value;
+                                               if ( $bits['close'] ) {
+                                                       $s .= $bits['close']->getFirstChild()->value;
+                                               }
+                                       } else {
+                                               $s .= '/>';
+                                       }
+                                       $out .= $s;
+                               } else {
+                                       $out .= $this->parser->extensionSubstitution( $bits, $this );
+                               }
+                       } elseif ( $contextName === 'h' ) {
+                               # Heading
+                               if ( $this->parser->ot['html'] ) {
+                                       # Expand immediately and insert heading index marker
+                                       $s = $this->expand( $contextChildren, $flags );
+                                       $bits = PPNode_Hash_Tree::splitRawHeading( $contextChildren );
+                                       $titleText = $this->title->getPrefixedDBkey();
+                                       $this->parser->mHeadings[] = [ $titleText, $bits['i'] ];
+                                       $serial = count( $this->parser->mHeadings ) - 1;
+                                       $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
+                                       $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
+                                       $this->parser->mStripState->addGeneral( $marker, '' );
+                                       $out .= $s;
+                               } else {
+                                       # Expand in virtual stack
+                                       $newIterator = $contextChildren;
+                               }
+                       } else {
+                               # Generic recursive expansion
+                               $newIterator = $contextChildren;
+                       }
+
+                       if ( $newIterator !== false ) {
+                               $outStack[] = '';
+                               $iteratorStack[] = $newIterator;
+                               $indexStack[] = 0;
+                       } elseif ( $iteratorStack[$level] === false ) {
+                               // Return accumulated value to parent
+                               // With tail recursion
+                               while ( $iteratorStack[$level] === false && $level > 0 ) {
+                                       $outStack[$level - 1] .= $out;
+                                       array_pop( $outStack );
+                                       array_pop( $iteratorStack );
+                                       array_pop( $indexStack );
+                                       $level--;
+                               }
+                       }
+               }
+               --$expansionDepth;
+               return $outStack[0];
+       }
+
+       /**
+        * @param string $sep
+        * @param int $flags
+        * @param string|PPNode ...$args
+        * @return string
+        */
+       public function implodeWithFlags( $sep, $flags, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node, $flags );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Implode with no flags specified
+        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
+        * @param string $sep
+        * @param string|PPNode ...$args
+        * @return string
+        */
+       public function implode( $sep, ...$args ) {
+               $first = true;
+               $s = '';
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $s .= $sep;
+                               }
+                               $s .= $this->expand( $node );
+                       }
+               }
+               return $s;
+       }
+
+       /**
+        * Makes an object that, when expand()ed, will be the same as one obtained
+        * with implode()
+        *
+        * @param string $sep
+        * @param string|PPNode ...$args
+        * @return PPNode_Hash_Array
+        */
+       public function virtualImplode( $sep, ...$args ) {
+               $out = [];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               return new PPNode_Hash_Array( $out );
+       }
+
+       /**
+        * Virtual implode with brackets
+        *
+        * @param string $start
+        * @param string $sep
+        * @param string $end
+        * @param string|PPNode ...$args
+        * @return PPNode_Hash_Array
+        */
+       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
+               $out = [ $start ];
+               $first = true;
+
+               foreach ( $args as $root ) {
+                       if ( $root instanceof PPNode_Hash_Array ) {
+                               $root = $root->value;
+                       }
+                       if ( !is_array( $root ) ) {
+                               $root = [ $root ];
+                       }
+                       foreach ( $root as $node ) {
+                               if ( $first ) {
+                                       $first = false;
+                               } else {
+                                       $out[] = $sep;
+                               }
+                               $out[] = $node;
+                       }
+               }
+               $out[] = $end;
+               return new PPNode_Hash_Array( $out );
+       }
+
+       public function __toString() {
+               return 'frame{}';
+       }
+
+       /**
+        * @param bool $level
+        * @return array|bool|string
+        */
+       public function getPDBK( $level = false ) {
+               if ( $level === false ) {
+                       return $this->title->getPrefixedDBkey();
+               } else {
+                       return $this->titleCache[$level] ?? false;
+               }
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               return [];
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               return [];
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return true;
+       }
+
+       /**
+        * @param int|string $name
+        * @return bool Always false in this implementation.
+        */
+       public function getArgument( $name ) {
+               return false;
+       }
+
+       /**
+        * Returns true if the infinite loop check is OK, false if a loop is detected
+        *
+        * @param Title $title
+        *
+        * @return bool
+        */
+       public function loopCheck( $title ) {
+               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return false;
+       }
+
+       /**
+        * Get a title of frame
+        *
+        * @return Title
+        */
+       public function getTitle() {
+               return $this->title;
+       }
+
+       /**
+        * Set the volatile flag
+        *
+        * @param bool $flag
+        */
+       public function setVolatile( $flag = true ) {
+               $this->volatile = $flag;
+       }
+
+       /**
+        * Get the volatile flag
+        *
+        * @return bool
+        */
+       public function isVolatile() {
+               return $this->volatile;
+       }
+
+       /**
+        * Set the TTL
+        *
+        * @param int $ttl
+        */
+       public function setTTL( $ttl ) {
+               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
+                       $this->ttl = $ttl;
+               }
+       }
+
+       /**
+        * Get the TTL
+        *
+        * @return int|null
+        */
+       public function getTTL() {
+               return $this->ttl;
+       }
+}
diff --git a/includes/parser/PPNode.php b/includes/parser/PPNode.php
new file mode 100644 (file)
index 0000000..2b6cf7c
--- /dev/null
@@ -0,0 +1,112 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * There are three types of nodes:
+ *     * Tree nodes, which have a name and contain other nodes as children
+ *     * Array nodes, which also contain other nodes but aren't considered part of a tree
+ *     * Leaf nodes, which contain the actual data
+ *
+ * This interface provides access to the tree structure and to the contents of array nodes,
+ * but it does not provide access to the internal structure of leaf nodes. Access to leaf
+ * data is provided via two means:
+ *     * PPFrame::expand(), which provides expanded text
+ *     * The PPNode::split*() functions, which provide metadata about certain types of tree node
+ * @ingroup Parser
+ */
+interface PPNode {
+       /**
+        * Get an array-type node containing the children of this node.
+        * Returns false if this is not a tree node.
+        * @return PPNode
+        */
+       public function getChildren();
+
+       /**
+        * Get the first child of a tree node. False if there isn't one.
+        *
+        * @return PPNode
+        */
+       public function getFirstChild();
+
+       /**
+        * Get the next sibling of any node. False if there isn't one
+        * @return PPNode
+        */
+       public function getNextSibling();
+
+       /**
+        * Get all children of this tree node which have a given name.
+        * Returns an array-type node, or false if this is not a tree node.
+        * @param string $type
+        * @return bool|PPNode
+        */
+       public function getChildrenOfType( $type );
+
+       /**
+        * Returns the length of the array, or false if this is not an array-type node
+        */
+       public function getLength();
+
+       /**
+        * Returns an item of an array-type node
+        * @param int $i
+        * @return bool|PPNode
+        */
+       public function item( $i );
+
+       /**
+        * Get the name of this node. The following names are defined here:
+        *
+        *    h             A heading node.
+        *    template      A double-brace node.
+        *    tplarg        A triple-brace node.
+        *    title         The first argument to a template or tplarg node.
+        *    part          Subsequent arguments to a template or tplarg node.
+        *    #nodelist     An array-type node
+        *
+        * The subclass may define various other names for tree and leaf nodes.
+        * @return string
+        */
+       public function getName();
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *    name          PPNode name
+        *    index         String index
+        *    value         PPNode value
+        * @return array
+        */
+       public function splitArg();
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        * @return array
+        */
+       public function splitExt();
+
+       /**
+        * Split an "<h>" node
+        * @return array
+        */
+       public function splitHeading();
+}
diff --git a/includes/parser/PPNode_DOM.php b/includes/parser/PPNode_DOM.php
new file mode 100644 (file)
index 0000000..8a435ba
--- /dev/null
@@ -0,0 +1,188 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_DOM implements PPNode {
+
+       /**
+        * @var DOMElement
+        */
+       public $node;
+       public $xpath;
+
+       public function __construct( $node, $xpath = false ) {
+               $this->node = $node;
+       }
+
+       /**
+        * @return DOMXPath
+        */
+       public function getXPath() {
+               if ( $this->xpath === null ) {
+                       $this->xpath = new DOMXPath( $this->node->ownerDocument );
+               }
+               return $this->xpath;
+       }
+
+       public function __toString() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       $s = '';
+                       foreach ( $this->node as $node ) {
+                               $s .= $node->ownerDocument->saveXML( $node );
+                       }
+               } else {
+                       $s = $this->node->ownerDocument->saveXML( $this->node );
+               }
+               return $s;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getChildren() {
+               return $this->node->childNodes ? new self( $this->node->childNodes ) : false;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getFirstChild() {
+               return $this->node->firstChild ? new self( $this->node->firstChild ) : false;
+       }
+
+       /**
+        * @return bool|PPNode_DOM
+        */
+       public function getNextSibling() {
+               return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false;
+       }
+
+       /**
+        * @param string $type
+        *
+        * @return bool|PPNode_DOM
+        */
+       public function getChildrenOfType( $type ) {
+               return new self( $this->getXPath()->query( $type, $this->node ) );
+       }
+
+       /**
+        * @return int
+        */
+       public function getLength() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       return $this->node->length;
+               } else {
+                       return false;
+               }
+       }
+
+       /**
+        * @param int $i
+        * @return bool|PPNode_DOM
+        */
+       public function item( $i ) {
+               $item = $this->node->item( $i );
+               return $item ? new self( $item ) : false;
+       }
+
+       /**
+        * @return string
+        */
+       public function getName() {
+               if ( $this->node instanceof DOMNodeList ) {
+                       return '#nodelist';
+               } else {
+                       return $this->node->nodeName;
+               }
+       }
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *  - name          PPNode name
+        *  - index         String index
+        *  - value         PPNode value
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitArg() {
+               $xpath = $this->getXPath();
+               $names = $xpath->query( 'name', $this->node );
+               $values = $xpath->query( 'value', $this->node );
+               if ( !$names->length || !$values->length ) {
+                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
+               }
+               $name = $names->item( 0 );
+               $index = $name->getAttribute( 'index' );
+               return [
+                       'name' => new self( $name ),
+                       'index' => $index,
+                       'value' => new self( $values->item( 0 ) ) ];
+       }
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitExt() {
+               $xpath = $this->getXPath();
+               $names = $xpath->query( 'name', $this->node );
+               $attrs = $xpath->query( 'attr', $this->node );
+               $inners = $xpath->query( 'inner', $this->node );
+               $closes = $xpath->query( 'close', $this->node );
+               if ( !$names->length || !$attrs->length ) {
+                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
+               }
+               $parts = [
+                       'name' => new self( $names->item( 0 ) ),
+                       'attr' => new self( $attrs->item( 0 ) ) ];
+               if ( $inners->length ) {
+                       $parts['inner'] = new self( $inners->item( 0 ) );
+               }
+               if ( $closes->length ) {
+                       $parts['close'] = new self( $closes->item( 0 ) );
+               }
+               return $parts;
+       }
+
+       /**
+        * Split a "<h>" node
+        * @throws MWException
+        * @return array
+        */
+       public function splitHeading() {
+               if ( $this->getName() !== 'h' ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return [
+                       'i' => $this->node->getAttribute( 'i' ),
+                       'level' => $this->node->getAttribute( 'level' ),
+                       'contents' => $this->getChildren()
+               ];
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Array.php b/includes/parser/PPNode_Hash_Array.php
new file mode 100644 (file)
index 0000000..3892616
--- /dev/null
@@ -0,0 +1,77 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Array implements PPNode {
+
+       public $value;
+
+       public function __construct( $value ) {
+               $this->value = $value;
+       }
+
+       public function __toString() {
+               return var_export( $this, true );
+       }
+
+       public function getLength() {
+               return count( $this->value );
+       }
+
+       public function item( $i ) {
+               return $this->value[$i];
+       }
+
+       public function getName() {
+               return '#nodelist';
+       }
+
+       public function getNextSibling() {
+               return false;
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Attr.php b/includes/parser/PPNode_Hash_Attr.php
new file mode 100644 (file)
index 0000000..91ba69d
--- /dev/null
@@ -0,0 +1,92 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Attr implements PPNode {
+
+       public $name, $value;
+       private $store, $index;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $descriptor = $store[$index];
+               if ( $descriptor[PPNode_Hash_Tree::NAME][0] !== '@' ) {
+                       throw new MWException( __METHOD__ . ': invalid name in attribute descriptor' );
+               }
+               $this->name = substr( $descriptor[PPNode_Hash_Tree::NAME], 1 );
+               $this->value = $descriptor[PPNode_Hash_Tree::CHILDREN][0];
+               $this->store = $store;
+               $this->index = $index;
+       }
+
+       public function __toString() {
+               return "<@{$this->name}>" . htmlspecialchars( $this->value ) . "</@{$this->name}>";
+       }
+
+       public function getName() {
+               return $this->name;
+       }
+
+       public function getNextSibling() {
+               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function getLength() {
+               return false;
+       }
+
+       public function item( $i ) {
+               return false;
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Text.php b/includes/parser/PPNode_Hash_Text.php
new file mode 100644 (file)
index 0000000..182982f
--- /dev/null
@@ -0,0 +1,90 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Text implements PPNode {
+
+       public $value;
+       private $store, $index;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $this->value = $store[$index];
+               if ( !is_scalar( $this->value ) ) {
+                       throw new MWException( __CLASS__ . ' given object instead of string' );
+               }
+               $this->store = $store;
+               $this->index = $index;
+       }
+
+       public function __toString() {
+               return htmlspecialchars( $this->value );
+       }
+
+       public function getNextSibling() {
+               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
+       }
+
+       public function getChildren() {
+               return false;
+       }
+
+       public function getFirstChild() {
+               return false;
+       }
+
+       public function getChildrenOfType( $name ) {
+               return false;
+       }
+
+       public function getLength() {
+               return false;
+       }
+
+       public function item( $i ) {
+               return false;
+       }
+
+       public function getName() {
+               return '#text';
+       }
+
+       public function splitArg() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitExt() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+
+       public function splitHeading() {
+               throw new MWException( __METHOD__ . ': not supported' );
+       }
+}
diff --git a/includes/parser/PPNode_Hash_Tree.php b/includes/parser/PPNode_Hash_Tree.php
new file mode 100644 (file)
index 0000000..e6cabf8
--- /dev/null
@@ -0,0 +1,369 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPNode_Hash_Tree implements PPNode {
+
+       public $name;
+
+       /**
+        * The store array for children of this node. It is "raw" in the sense that
+        * nodes are two-element arrays ("descriptors") rather than PPNode_Hash_*
+        * objects.
+        */
+       private $rawChildren;
+
+       /**
+        * The store array for the siblings of this node, including this node itself.
+        */
+       private $store;
+
+       /**
+        * The index into $this->store which contains the descriptor of this node.
+        */
+       private $index;
+
+       /**
+        * The offset of the name within descriptors, used in some places for
+        * readability.
+        */
+       const NAME = 0;
+
+       /**
+        * The offset of the child list within descriptors, used in some places for
+        * readability.
+        */
+       const CHILDREN = 1;
+
+       /**
+        * Construct an object using the data from $store[$index]. The rest of the
+        * store array can be accessed via getNextSibling().
+        *
+        * @param array $store
+        * @param int $index
+        */
+       public function __construct( array $store, $index ) {
+               $this->store = $store;
+               $this->index = $index;
+               list( $this->name, $this->rawChildren ) = $this->store[$index];
+       }
+
+       /**
+        * Construct an appropriate PPNode_Hash_* object with a class that depends
+        * on what is at the relevant store index.
+        *
+        * @param array $store
+        * @param int $index
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|false
+        * @throws MWException
+        */
+       public static function factory( array $store, $index ) {
+               if ( !isset( $store[$index] ) ) {
+                       return false;
+               }
+
+               $descriptor = $store[$index];
+               if ( is_string( $descriptor ) ) {
+                       $class = PPNode_Hash_Text::class;
+               } elseif ( is_array( $descriptor ) ) {
+                       if ( $descriptor[self::NAME][0] === '@' ) {
+                               $class = PPNode_Hash_Attr::class;
+                       } else {
+                               $class = self::class;
+                       }
+               } else {
+                       throw new MWException( __METHOD__ . ': invalid node descriptor' );
+               }
+               return new $class( $store, $index );
+       }
+
+       /**
+        * Convert a node to XML, for debugging
+        * @return string
+        */
+       public function __toString() {
+               $inner = '';
+               $attribs = '';
+               for ( $node = $this->getFirstChild(); $node; $node = $node->getNextSibling() ) {
+                       if ( $node instanceof PPNode_Hash_Attr ) {
+                               $attribs .= ' ' . $node->name . '="' . htmlspecialchars( $node->value ) . '"';
+                       } else {
+                               $inner .= $node->__toString();
+                       }
+               }
+               if ( $inner === '' ) {
+                       return "<{$this->name}$attribs/>";
+               } else {
+                       return "<{$this->name}$attribs>$inner</{$this->name}>";
+               }
+       }
+
+       /**
+        * @return PPNode_Hash_Array
+        */
+       public function getChildren() {
+               $children = [];
+               foreach ( $this->rawChildren as $i => $child ) {
+                       $children[] = self::factory( $this->rawChildren, $i );
+               }
+               return new PPNode_Hash_Array( $children );
+       }
+
+       /**
+        * Get the first child, or false if there is none. Note that this will
+        * return a temporary proxy object: different instances will be returned
+        * if this is called more than once on the same node.
+        *
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
+        */
+       public function getFirstChild() {
+               if ( !isset( $this->rawChildren[0] ) ) {
+                       return false;
+               } else {
+                       return self::factory( $this->rawChildren, 0 );
+               }
+       }
+
+       /**
+        * Get the next sibling, or false if there is none. Note that this will
+        * return a temporary proxy object: different instances will be returned
+        * if this is called more than once on the same node.
+        *
+        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
+        */
+       public function getNextSibling() {
+               return self::factory( $this->store, $this->index + 1 );
+       }
+
+       /**
+        * Get an array of the children with a given node name
+        *
+        * @param string $name
+        * @return PPNode_Hash_Array
+        */
+       public function getChildrenOfType( $name ) {
+               $children = [];
+               foreach ( $this->rawChildren as $i => $child ) {
+                       if ( is_array( $child ) && $child[self::NAME] === $name ) {
+                               $children[] = self::factory( $this->rawChildren, $i );
+                       }
+               }
+               return new PPNode_Hash_Array( $children );
+       }
+
+       /**
+        * Get the raw child array. For internal use.
+        * @return array
+        */
+       public function getRawChildren() {
+               return $this->rawChildren;
+       }
+
+       /**
+        * @return bool
+        */
+       public function getLength() {
+               return false;
+       }
+
+       /**
+        * @param int $i
+        * @return bool
+        */
+       public function item( $i ) {
+               return false;
+       }
+
+       /**
+        * @return string
+        */
+       public function getName() {
+               return $this->name;
+       }
+
+       /**
+        * Split a "<part>" node into an associative array containing:
+        *  - name          PPNode name
+        *  - index         String index
+        *  - value         PPNode value
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitArg() {
+               return self::splitRawArg( $this->rawChildren );
+       }
+
+       /**
+        * Like splitArg() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawArg( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       if ( $child[self::NAME] === 'name' ) {
+                               $bits['name'] = new self( $children, $i );
+                               if ( isset( $child[self::CHILDREN][0][self::NAME] )
+                                       && $child[self::CHILDREN][0][self::NAME] === '@index'
+                               ) {
+                                       $bits['index'] = $child[self::CHILDREN][0][self::CHILDREN][0];
+                               }
+                       } elseif ( $child[self::NAME] === 'value' ) {
+                               $bits['value'] = new self( $children, $i );
+                       }
+               }
+
+               if ( !isset( $bits['name'] ) ) {
+                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
+               }
+               if ( !isset( $bits['index'] ) ) {
+                       $bits['index'] = '';
+               }
+               return $bits;
+       }
+
+       /**
+        * Split an "<ext>" node into an associative array containing name, attr, inner and close
+        * All values in the resulting array are PPNodes. Inner and close are optional.
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitExt() {
+               return self::splitRawExt( $this->rawChildren );
+       }
+
+       /**
+        * Like splitExt() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawExt( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       switch ( $child[self::NAME] ) {
+                               case 'name':
+                                       $bits['name'] = new self( $children, $i );
+                                       break;
+                               case 'attr':
+                                       $bits['attr'] = new self( $children, $i );
+                                       break;
+                               case 'inner':
+                                       $bits['inner'] = new self( $children, $i );
+                                       break;
+                               case 'close':
+                                       $bits['close'] = new self( $children, $i );
+                                       break;
+                       }
+               }
+               if ( !isset( $bits['name'] ) ) {
+                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
+               }
+               return $bits;
+       }
+
+       /**
+        * Split an "<h>" node
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitHeading() {
+               if ( $this->name !== 'h' ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return self::splitRawHeading( $this->rawChildren );
+       }
+
+       /**
+        * Like splitHeading() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawHeading( array $children ) {
+               $bits = [];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       if ( $child[self::NAME] === '@i' ) {
+                               $bits['i'] = $child[self::CHILDREN][0];
+                       } elseif ( $child[self::NAME] === '@level' ) {
+                               $bits['level'] = $child[self::CHILDREN][0];
+                       }
+               }
+               if ( !isset( $bits['i'] ) ) {
+                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
+               }
+               return $bits;
+       }
+
+       /**
+        * Split a "<template>" or "<tplarg>" node
+        *
+        * @throws MWException
+        * @return array
+        */
+       public function splitTemplate() {
+               return self::splitRawTemplate( $this->rawChildren );
+       }
+
+       /**
+        * Like splitTemplate() but for a raw child array. For internal use only.
+        * @param array $children
+        * @return array
+        */
+       public static function splitRawTemplate( array $children ) {
+               $parts = [];
+               $bits = [ 'lineStart' => '' ];
+               foreach ( $children as $i => $child ) {
+                       if ( !is_array( $child ) ) {
+                               continue;
+                       }
+                       switch ( $child[self::NAME] ) {
+                               case 'title':
+                                       $bits['title'] = new self( $children, $i );
+                                       break;
+                               case 'part':
+                                       $parts[] = new self( $children, $i );
+                                       break;
+                               case '@lineStart':
+                                       $bits['lineStart'] = '1';
+                                       break;
+                       }
+               }
+               if ( !isset( $bits['title'] ) ) {
+                       throw new MWException( 'Invalid node passed to ' . __METHOD__ );
+               }
+               $bits['parts'] = new PPNode_Hash_Array( $parts );
+               return $bits;
+       }
+}
diff --git a/includes/parser/PPTemplateFrame_DOM.php b/includes/parser/PPTemplateFrame_DOM.php
new file mode 100644 (file)
index 0000000..52cb9cb
--- /dev/null
@@ -0,0 +1,198 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with template arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPTemplateFrame_DOM extends PPFrame_DOM {
+
+       public $numberedArgs, $namedArgs;
+
+       /**
+        * @var PPFrame_DOM
+        */
+       public $parent;
+       public $numberedExpansionCache, $namedExpansionCache;
+
+       /**
+        * @param Preprocessor $preprocessor
+        * @param bool|PPFrame_DOM $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param bool|Title $title
+        */
+       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
+               $namedArgs = [], $title = false
+       ) {
+               parent::__construct( $preprocessor );
+
+               $this->parent = $parent;
+               $this->numberedArgs = $numberedArgs;
+               $this->namedArgs = $namedArgs;
+               $this->title = $title;
+               $pdbk = $title ? $title->getPrefixedDBkey() : false;
+               $this->titleCache = $parent->titleCache;
+               $this->titleCache[] = $pdbk;
+               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
+               if ( $pdbk !== false ) {
+                       $this->loopCheckHash[$pdbk] = true;
+               }
+               $this->depth = $parent->depth + 1;
+               $this->numberedExpansionCache = $this->namedExpansionCache = [];
+       }
+
+       public function __toString() {
+               $s = 'tplframe{';
+               $first = true;
+               $args = $this->numberedArgs + $this->namedArgs;
+               foreach ( $args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->ownerDocument->saveXML( $value ) ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode_DOM|DOMDocument $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
+                       return $this->parent->childExpansionCache[$key];
+               }
+               $retval = $this->expand( $root, $flags );
+               if ( !$this->isVolatile() ) {
+                       $this->parent->childExpansionCache[$key] = $retval;
+               }
+               return $retval;
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
+       }
+
+       public function getArguments() {
+               $arguments = [];
+               foreach ( array_merge(
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       public function getNumberedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       public function getNamedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @param int $index
+        * @return string|bool
+        */
+       public function getNumberedArgument( $index ) {
+               if ( !isset( $this->numberedArgs[$index] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
+                       # No trimming for unnamed arguments
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
+               }
+               return $this->numberedExpansionCache[$index];
+       }
+
+       /**
+        * @param string $name
+        * @return string|bool
+        */
+       public function getNamedArgument( $name ) {
+               if ( !isset( $this->namedArgs[$name] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->namedExpansionCache[$name] ) ) {
+                       # Trim named arguments post-expand, for backwards compatibility
+                       $this->namedExpansionCache[$name] = trim(
+                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
+               }
+               return $this->namedExpansionCache[$name];
+       }
+
+       /**
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name ) {
+               $text = $this->getNumberedArgument( $name );
+               if ( $text === false ) {
+                       $text = $this->getNamedArgument( $name );
+               }
+               return $text;
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return true;
+       }
+
+       public function setVolatile( $flag = true ) {
+               parent::setVolatile( $flag );
+               $this->parent->setVolatile( $flag );
+       }
+
+       public function setTTL( $ttl ) {
+               parent::setTTL( $ttl );
+               $this->parent->setTTL( $ttl );
+       }
+}
diff --git a/includes/parser/PPTemplateFrame_Hash.php b/includes/parser/PPTemplateFrame_Hash.php
new file mode 100644 (file)
index 0000000..df740cf
--- /dev/null
@@ -0,0 +1,202 @@
+<?php
+/**
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @ingroup Parser
+ */
+
+/**
+ * Expansion frame with template arguments
+ * @ingroup Parser
+ */
+// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
+class PPTemplateFrame_Hash extends PPFrame_Hash {
+
+       public $numberedArgs, $namedArgs, $parent;
+       public $numberedExpansionCache, $namedExpansionCache;
+
+       /**
+        * @param Preprocessor $preprocessor
+        * @param bool|PPFrame $parent
+        * @param array $numberedArgs
+        * @param array $namedArgs
+        * @param bool|Title $title
+        */
+       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
+               $namedArgs = [], $title = false
+       ) {
+               parent::__construct( $preprocessor );
+
+               $this->parent = $parent;
+               $this->numberedArgs = $numberedArgs;
+               $this->namedArgs = $namedArgs;
+               $this->title = $title;
+               $pdbk = $title ? $title->getPrefixedDBkey() : false;
+               $this->titleCache = $parent->titleCache;
+               $this->titleCache[] = $pdbk;
+               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
+               if ( $pdbk !== false ) {
+                       $this->loopCheckHash[$pdbk] = true;
+               }
+               $this->depth = $parent->depth + 1;
+               $this->numberedExpansionCache = $this->namedExpansionCache = [];
+       }
+
+       public function __toString() {
+               $s = 'tplframe{';
+               $first = true;
+               $args = $this->numberedArgs + $this->namedArgs;
+               foreach ( $args as $name => $value ) {
+                       if ( $first ) {
+                               $first = false;
+                       } else {
+                               $s .= ', ';
+                       }
+                       $s .= "\"$name\":\"" .
+                               str_replace( '"', '\\"', $value->__toString() ) . '"';
+               }
+               $s .= '}';
+               return $s;
+       }
+
+       /**
+        * @throws MWException
+        * @param string|int $key
+        * @param string|PPNode $root
+        * @param int $flags
+        * @return string
+        */
+       public function cachedExpand( $key, $root, $flags = 0 ) {
+               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
+                       return $this->parent->childExpansionCache[$key];
+               }
+               $retval = $this->expand( $root, $flags );
+               if ( !$this->isVolatile() ) {
+                       $this->parent->childExpansionCache[$key] = $retval;
+               }
+               return $retval;
+       }
+
+       /**
+        * Returns true if there are no arguments in this frame
+        *
+        * @return bool
+        */
+       public function isEmpty() {
+               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
+       }
+
+       /**
+        * @return array
+        */
+       public function getArguments() {
+               $arguments = [];
+               foreach ( array_merge(
+                               array_keys( $this->numberedArgs ),
+                               array_keys( $this->namedArgs ) ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @return array
+        */
+       public function getNumberedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->numberedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @return array
+        */
+       public function getNamedArguments() {
+               $arguments = [];
+               foreach ( array_keys( $this->namedArgs ) as $key ) {
+                       $arguments[$key] = $this->getArgument( $key );
+               }
+               return $arguments;
+       }
+
+       /**
+        * @param int $index
+        * @return string|bool
+        */
+       public function getNumberedArgument( $index ) {
+               if ( !isset( $this->numberedArgs[$index] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
+                       # No trimming for unnamed arguments
+                       $this->numberedExpansionCache[$index] = $this->parent->expand(
+                               $this->numberedArgs[$index],
+                               PPFrame::STRIP_COMMENTS
+                       );
+               }
+               return $this->numberedExpansionCache[$index];
+       }
+
+       /**
+        * @param string $name
+        * @return string|bool
+        */
+       public function getNamedArgument( $name ) {
+               if ( !isset( $this->namedArgs[$name] ) ) {
+                       return false;
+               }
+               if ( !isset( $this->namedExpansionCache[$name] ) ) {
+                       # Trim named arguments post-expand, for backwards compatibility
+                       $this->namedExpansionCache[$name] = trim(
+                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
+               }
+               return $this->namedExpansionCache[$name];
+       }
+
+       /**
+        * @param int|string $name
+        * @return string|bool
+        */
+       public function getArgument( $name ) {
+               $text = $this->getNumberedArgument( $name );
+               if ( $text === false ) {
+                       $text = $this->getNamedArgument( $name );
+               }
+               return $text;
+       }
+
+       /**
+        * Return true if the frame is a template frame
+        *
+        * @return bool
+        */
+       public function isTemplate() {
+               return true;
+       }
+
+       public function setVolatile( $flag = true ) {
+               parent::setVolatile( $flag );
+               $this->parent->setVolatile( $flag );
+       }
+
+       public function setTTL( $ttl ) {
+               parent::setTTL( $ttl );
+               $this->parent->setTTL( $ttl );
+       }
+}
index bdfedd6..b321078 100644 (file)
@@ -164,279 +164,3 @@ abstract class Preprocessor {
         */
        abstract public function preprocessToObj( $text, $flags = 0 );
 }
-
-/**
- * @ingroup Parser
- */
-interface PPFrame {
-       const NO_ARGS = 1;
-       const NO_TEMPLATES = 2;
-       const STRIP_COMMENTS = 4;
-       const NO_IGNORE = 8;
-       const RECOVER_COMMENTS = 16;
-       const NO_TAGS = 32;
-
-       const RECOVER_ORIG = self::NO_ARGS | self::NO_TEMPLATES | self::NO_IGNORE |
-               self::RECOVER_COMMENTS | self::NO_TAGS;
-
-       /** This constant exists when $indexOffset is supported in newChild() */
-       const SUPPORTS_INDEX_OFFSET = 1;
-
-       /**
-        * Create a child frame
-        *
-        * @param array|bool $args
-        * @param bool|Title $title
-        * @param int $indexOffset A number subtracted from the index attributes of the arguments
-        *
-        * @return PPFrame
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 );
-
-       /**
-        * Expand a document tree node, caching the result on its parent with the given key
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 );
-
-       /**
-        * Expand a document tree node
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 );
-
-       /**
-        * Implode with flags for expand()
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode $args,...
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags /*, ... */ );
-
-       /**
-        * Implode with no flags specified
-        * @param string $sep
-        * @param string|PPNode $args,...
-        * @return string
-        */
-       public function implode( $sep /*, ... */ );
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        * @param string $sep
-        * @param string|PPNode $args,...
-        * @return PPNode
-        */
-       public function virtualImplode( $sep /*, ... */ );
-
-       /**
-        * Virtual implode with brackets
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode $args,...
-        * @return PPNode
-        */
-       public function virtualBracketedImplode( $start, $sep, $end /*, ... */ );
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty();
-
-       /**
-        * Returns all arguments of this frame
-        * @return array
-        */
-       public function getArguments();
-
-       /**
-        * Returns all numbered arguments of this frame
-        * @return array
-        */
-       public function getNumberedArguments();
-
-       /**
-        * Returns all named arguments of this frame
-        * @return array
-        */
-       public function getNamedArguments();
-
-       /**
-        * Get an argument to this frame by name
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name );
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        * @return bool
-        */
-       public function loopCheck( $title );
-
-       /**
-        * Return true if the frame is a template frame
-        * @return bool
-        */
-       public function isTemplate();
-
-       /**
-        * Set the "volatile" flag.
-        *
-        * Note that this is somewhat of a "hack" in order to make extensions
-        * with side effects (such as Cite) work with the PHP parser. New
-        * extensions should be written in a way that they do not need this
-        * function, because other parsers (such as Parsoid) are not guaranteed
-        * to respect it, and it may be removed in the future.
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true );
-
-       /**
-        * Get the "volatile" flag.
-        *
-        * Callers should avoid caching the result of an expansion if it has the
-        * volatile flag set.
-        *
-        * @see self::setVolatile()
-        * @return bool
-        */
-       public function isVolatile();
-
-       /**
-        * Get the TTL of the frame's output.
-        *
-        * This is the maximum amount of time, in seconds, that this frame's
-        * output should be cached for. A value of null indicates that no
-        * maximum has been specified.
-        *
-        * Note that this TTL only applies to caching frames as parts of pages.
-        * It is not relevant to caching the entire rendered output of a page.
-        *
-        * @return int|null
-        */
-       public function getTTL();
-
-       /**
-        * Set the TTL of the output of this frame and all of its ancestors.
-        * Has no effect if the new TTL is greater than the one already set.
-        * Note that it is the caller's responsibility to change the cache
-        * expiry of the page as a whole, if such behavior is desired.
-        *
-        * @see self::getTTL()
-        * @param int $ttl
-        */
-       public function setTTL( $ttl );
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle();
-}
-
-/**
- * There are three types of nodes:
- *     * Tree nodes, which have a name and contain other nodes as children
- *     * Array nodes, which also contain other nodes but aren't considered part of a tree
- *     * Leaf nodes, which contain the actual data
- *
- * This interface provides access to the tree structure and to the contents of array nodes,
- * but it does not provide access to the internal structure of leaf nodes. Access to leaf
- * data is provided via two means:
- *     * PPFrame::expand(), which provides expanded text
- *     * The PPNode::split*() functions, which provide metadata about certain types of tree node
- * @ingroup Parser
- */
-interface PPNode {
-       /**
-        * Get an array-type node containing the children of this node.
-        * Returns false if this is not a tree node.
-        * @return PPNode
-        */
-       public function getChildren();
-
-       /**
-        * Get the first child of a tree node. False if there isn't one.
-        *
-        * @return PPNode
-        */
-       public function getFirstChild();
-
-       /**
-        * Get the next sibling of any node. False if there isn't one
-        * @return PPNode
-        */
-       public function getNextSibling();
-
-       /**
-        * Get all children of this tree node which have a given name.
-        * Returns an array-type node, or false if this is not a tree node.
-        * @param string $type
-        * @return bool|PPNode
-        */
-       public function getChildrenOfType( $type );
-
-       /**
-        * Returns the length of the array, or false if this is not an array-type node
-        */
-       public function getLength();
-
-       /**
-        * Returns an item of an array-type node
-        * @param int $i
-        * @return bool|PPNode
-        */
-       public function item( $i );
-
-       /**
-        * Get the name of this node. The following names are defined here:
-        *
-        *    h             A heading node.
-        *    template      A double-brace node.
-        *    tplarg        A triple-brace node.
-        *    title         The first argument to a template or tplarg node.
-        *    part          Subsequent arguments to a template or tplarg node.
-        *    #nodelist     An array-type node
-        *
-        * The subclass may define various other names for tree and leaf nodes.
-        * @return string
-        */
-       public function getName();
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *    name          PPNode name
-        *    index         String index
-        *    value         PPNode value
-        * @return array
-        */
-       public function splitArg();
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        * @return array
-        */
-       public function splitExt();
-
-       /**
-        * Split an "<h>" node
-        * @return array
-        */
-       public function splitHeading();
-}
index c27a635..0f0496b 100644 (file)
@@ -823,1231 +823,3 @@ class Preprocessor_DOM extends Preprocessor {
                return $xml;
        }
 }
-
-/**
- * Stack class to help Preprocessor::preprocessToObj()
- * @ingroup Parser
- */
-class PPDStack {
-       public $stack, $rootAccum;
-
-       /**
-        * @var PPDStack
-        */
-       public $top;
-       public $out;
-       public $elementClass = PPDStackElement::class;
-
-       public static $false = false;
-
-       public function __construct() {
-               $this->stack = [];
-               $this->top = false;
-               $this->rootAccum = '';
-               $this->accum =& $this->rootAccum;
-       }
-
-       /**
-        * @return int
-        */
-       public function count() {
-               return count( $this->stack );
-       }
-
-       public function &getAccum() {
-               return $this->accum;
-       }
-
-       /**
-        * @return bool|PPDPart
-        */
-       public function getCurrentPart() {
-               if ( $this->top === false ) {
-                       return false;
-               } else {
-                       return $this->top->getCurrentPart();
-               }
-       }
-
-       public function push( $data ) {
-               if ( $data instanceof $this->elementClass ) {
-                       $this->stack[] = $data;
-               } else {
-                       $class = $this->elementClass;
-                       $this->stack[] = new $class( $data );
-               }
-               $this->top = $this->stack[count( $this->stack ) - 1];
-               $this->accum =& $this->top->getAccum();
-       }
-
-       public function pop() {
-               if ( $this->stack === [] ) {
-                       throw new MWException( __METHOD__ . ': no elements remaining' );
-               }
-               $temp = array_pop( $this->stack );
-
-               if ( count( $this->stack ) ) {
-                       $this->top = $this->stack[count( $this->stack ) - 1];
-                       $this->accum =& $this->top->getAccum();
-               } else {
-                       $this->top = self::$false;
-                       $this->accum =& $this->rootAccum;
-               }
-               return $temp;
-       }
-
-       public function addPart( $s = '' ) {
-               $this->top->addPart( $s );
-               $this->accum =& $this->top->getAccum();
-       }
-
-       /**
-        * @return array
-        */
-       public function getFlags() {
-               if ( $this->stack === [] ) {
-                       return [
-                               'findEquals' => false,
-                               'findPipe' => false,
-                               'inHeading' => false,
-                       ];
-               } else {
-                       return $this->top->getFlags();
-               }
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDStackElement {
-       /**
-        * @var string Opening character (\n for heading)
-        */
-       public $open;
-
-       /**
-        * @var string Matching closing character
-        */
-       public $close;
-
-       /**
-        * @var string Saved prefix that may affect later processing,
-        *  e.g. to differentiate `-{{{{` and `{{{{` after later seeing `}}}`.
-        */
-       public $savedPrefix = '';
-
-       /**
-        * @var int Number of opening characters found (number of "=" for heading)
-        */
-       public $count;
-
-       /**
-        * @var PPDPart[] Array of PPDPart objects describing pipe-separated parts.
-        */
-       public $parts;
-
-       /**
-        * @var bool True if the open char appeared at the start of the input line.
-        *  Not set for headings.
-        */
-       public $lineStart;
-
-       public $partClass = PPDPart::class;
-
-       public function __construct( $data = [] ) {
-               $class = $this->partClass;
-               $this->parts = [ new $class ];
-
-               foreach ( $data as $name => $value ) {
-                       $this->$name = $value;
-               }
-       }
-
-       public function &getAccum() {
-               return $this->parts[count( $this->parts ) - 1]->out;
-       }
-
-       public function addPart( $s = '' ) {
-               $class = $this->partClass;
-               $this->parts[] = new $class( $s );
-       }
-
-       /**
-        * @return PPDPart
-        */
-       public function getCurrentPart() {
-               return $this->parts[count( $this->parts ) - 1];
-       }
-
-       /**
-        * @return array
-        */
-       public function getFlags() {
-               $partCount = count( $this->parts );
-               $findPipe = $this->open != "\n" && $this->open != '[';
-               return [
-                       'findPipe' => $findPipe,
-                       'findEquals' => $findPipe && $partCount > 1 && !isset( $this->parts[$partCount - 1]->eqpos ),
-                       'inHeading' => $this->open == "\n",
-               ];
-       }
-
-       /**
-        * Get the output string that would result if the close is not found.
-        *
-        * @param bool|int $openingCount
-        * @return string
-        */
-       public function breakSyntax( $openingCount = false ) {
-               if ( $this->open == "\n" ) {
-                       $s = $this->savedPrefix . $this->parts[0]->out;
-               } else {
-                       if ( $openingCount === false ) {
-                               $openingCount = $this->count;
-                       }
-                       $s = substr( $this->open, 0, -1 );
-                       $s .= str_repeat(
-                               substr( $this->open, -1 ),
-                               $openingCount - strlen( $s )
-                       );
-                       $s = $this->savedPrefix . $s;
-                       $first = true;
-                       foreach ( $this->parts as $part ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= '|';
-                               }
-                               $s .= $part->out;
-                       }
-               }
-               return $s;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-class PPDPart {
-       /**
-        * @var string Output accumulator string
-        */
-       public $out;
-
-       // Optional member variables:
-       //   eqpos        Position of equals sign in output accumulator
-       //   commentEnd   Past-the-end input pointer for the last comment encountered
-       //   visualEnd    Past-the-end input pointer for the end of the accumulator minus comments
-
-       public function __construct( $out = '' ) {
-               $this->out = $out;
-       }
-}
-
-/**
- * An expansion frame, used as a context to expand the result of preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPFrame_DOM implements PPFrame {
-
-       /**
-        * @var Preprocessor
-        */
-       public $preprocessor;
-
-       /**
-        * @var Parser
-        */
-       public $parser;
-
-       /**
-        * @var Title
-        */
-       public $title;
-       public $titleCache;
-
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       public $loopCheckHash;
-
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       public $depth;
-
-       private $volatile = false;
-       private $ttl = null;
-
-       /**
-        * @var array
-        */
-       protected $childExpansionCache;
-
-       /**
-        * Construct a new preprocessor frame.
-        * @param Preprocessor $preprocessor The parent preprocessor
-        */
-       public function __construct( $preprocessor ) {
-               $this->preprocessor = $preprocessor;
-               $this->parser = $preprocessor->parser;
-               $this->title = $this->parser->mTitle;
-               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
-               $this->loopCheckHash = [];
-               $this->depth = 0;
-               $this->childExpansionCache = [];
-       }
-
-       /**
-        * Create a new child frame
-        * $args is optionally a multi-root PPNode or array containing the template arguments
-        *
-        * @param bool|array $args
-        * @param Title|bool $title
-        * @param int $indexOffset
-        * @return PPTemplateFrame_DOM
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
-               $namedArgs = [];
-               $numberedArgs = [];
-               if ( $title === false ) {
-                       $title = $this->title;
-               }
-               if ( $args !== false ) {
-                       $xpath = false;
-                       if ( $args instanceof PPNode ) {
-                               $args = $args->node;
-                       }
-                       foreach ( $args as $arg ) {
-                               if ( $arg instanceof PPNode ) {
-                                       $arg = $arg->node;
-                               }
-                               if ( !$xpath || $xpath->document !== $arg->ownerDocument ) {
-                                       $xpath = new DOMXPath( $arg->ownerDocument );
-                               }
-
-                               $nameNodes = $xpath->query( 'name', $arg );
-                               $value = $xpath->query( 'value', $arg );
-                               if ( $nameNodes->item( 0 )->hasAttributes() ) {
-                                       // Numbered parameter
-                                       $index = $nameNodes->item( 0 )->attributes->getNamedItem( 'index' )->textContent;
-                                       $index = $index - $indexOffset;
-                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $index ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $numberedArgs[$index] = $value->item( 0 );
-                                       unset( $namedArgs[$index] );
-                               } else {
-                                       // Named parameter
-                                       $name = trim( $this->expand( $nameNodes->item( 0 ), PPFrame::STRIP_COMMENTS ) );
-                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $name ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $namedArgs[$name] = $value->item( 0 );
-                                       unset( $numberedArgs[$name] );
-                               }
-                       }
-               }
-               return new PPTemplateFrame_DOM( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               // we don't have a parent, so we don't have a cache
-               return $this->expand( $root, $flags );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 ) {
-               static $expansionDepth = 0;
-               if ( is_string( $root ) ) {
-                       return $root;
-               }
-
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
-                       $this->parser->limitationWarn( 'node-count-exceeded',
-                               $this->parser->mPPNodeCount,
-                               $this->parser->mOptions->getMaxPPNodeCount()
-                       );
-                       return '<span class="error">Node-count limit exceeded</span>';
-               }
-
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
-                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
-                               $expansionDepth,
-                               $this->parser->mOptions->getMaxPPExpandDepth()
-                       );
-                       return '<span class="error">Expansion depth limit exceeded</span>';
-               }
-               ++$expansionDepth;
-               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
-                       $this->parser->mHighestExpansionDepth = $expansionDepth;
-               }
-
-               if ( $root instanceof PPNode_DOM ) {
-                       $root = $root->node;
-               }
-               if ( $root instanceof DOMDocument ) {
-                       $root = $root->documentElement;
-               }
-
-               $outStack = [ '', '' ];
-               $iteratorStack = [ false, $root ];
-               $indexStack = [ 0, 0 ];
-
-               while ( count( $iteratorStack ) > 1 ) {
-                       $level = count( $outStack ) - 1;
-                       $iteratorNode =& $iteratorStack[$level];
-                       $out =& $outStack[$level];
-                       $index =& $indexStack[$level];
-
-                       if ( $iteratorNode instanceof PPNode_DOM ) {
-                               $iteratorNode = $iteratorNode->node;
-                       }
-
-                       if ( is_array( $iteratorNode ) ) {
-                               if ( $index >= count( $iteratorNode ) ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode[$index];
-                                       $index++;
-                               }
-                       } elseif ( $iteratorNode instanceof DOMNodeList ) {
-                               if ( $index >= $iteratorNode->length ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode->item( $index );
-                                       $index++;
-                               }
-                       } else {
-                               // Copy to $contextNode and then delete from iterator stack,
-                               // because this is not an iterator but we do have to execute it once
-                               $contextNode = $iteratorStack[$level];
-                               $iteratorStack[$level] = false;
-                       }
-
-                       if ( $contextNode instanceof PPNode_DOM ) {
-                               $contextNode = $contextNode->node;
-                       }
-
-                       $newIterator = false;
-
-                       if ( $contextNode === false ) {
-                               // nothing to do
-                       } elseif ( is_string( $contextNode ) ) {
-                               $out .= $contextNode;
-                       } elseif ( is_array( $contextNode ) || $contextNode instanceof DOMNodeList ) {
-                               $newIterator = $contextNode;
-                       } elseif ( $contextNode instanceof DOMNode ) {
-                               if ( $contextNode->nodeType == XML_TEXT_NODE ) {
-                                       $out .= $contextNode->nodeValue;
-                               } elseif ( $contextNode->nodeName == 'template' ) {
-                                       # Double-brace expansion
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $titles = $xpath->query( 'title', $contextNode );
-                                       $title = $titles->item( 0 );
-                                       $parts = $xpath->query( 'part', $contextNode );
-                                       if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{', '|', '}}', $title, $parts );
-                                       } else {
-                                               $lineStart = $contextNode->getAttribute( 'lineStart' );
-                                               $params = [
-                                                       'title' => new PPNode_DOM( $title ),
-                                                       'parts' => new PPNode_DOM( $parts ),
-                                                       'lineStart' => $lineStart ];
-                                               $ret = $this->parser->braceSubstitution( $params, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->nodeName == 'tplarg' ) {
-                                       # Triple-brace expansion
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $titles = $xpath->query( 'title', $contextNode );
-                                       $title = $titles->item( 0 );
-                                       $parts = $xpath->query( 'part', $contextNode );
-                                       if ( $flags & PPFrame::NO_ARGS ) {
-                                               $newIterator = $this->virtualBracketedImplode( '{{{', '|', '}}}', $title, $parts );
-                                       } else {
-                                               $params = [
-                                                       'title' => new PPNode_DOM( $title ),
-                                                       'parts' => new PPNode_DOM( $parts ) ];
-                                               $ret = $this->parser->argSubstitution( $params, $this );
-                                               if ( isset( $ret['object'] ) ) {
-                                                       $newIterator = $ret['object'];
-                                               } else {
-                                                       $out .= $ret['text'];
-                                               }
-                                       }
-                               } elseif ( $contextNode->nodeName == 'comment' ) {
-                                       # HTML-style comment
-                                       # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
-                                       # Not in RECOVER_COMMENTS mode (msgnw) though.
-                                       if ( ( $this->parser->ot['html']
-                                               || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
-                                               || ( $flags & PPFrame::STRIP_COMMENTS )
-                                               ) && !( $flags & PPFrame::RECOVER_COMMENTS )
-                                       ) {
-                                               $out .= '';
-                                       } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                               # Add a strip marker in PST mode so that pstPass2() can
-                                               # run some old-fashioned regexes on the result.
-                                               # Not in RECOVER_COMMENTS mode (extractSections) though.
-                                               $out .= $this->parser->insertStripItem( $contextNode->textContent );
-                                       } else {
-                                               # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
-                                               $out .= $contextNode->textContent;
-                                       }
-                               } elseif ( $contextNode->nodeName == 'ignore' ) {
-                                       # Output suppression used by <includeonly> etc.
-                                       # OT_WIKI will only respect <ignore> in substed templates.
-                                       # The other output types respect it unless NO_IGNORE is set.
-                                       # extractSections() sets NO_IGNORE and so never respects it.
-                                       if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
-                                               || ( $flags & PPFrame::NO_IGNORE )
-                                       ) {
-                                               $out .= $contextNode->textContent;
-                                       } else {
-                                               $out .= '';
-                                       }
-                               } elseif ( $contextNode->nodeName == 'ext' ) {
-                                       # Extension tag
-                                       $xpath = new DOMXPath( $contextNode->ownerDocument );
-                                       $names = $xpath->query( 'name', $contextNode );
-                                       $attrs = $xpath->query( 'attr', $contextNode );
-                                       $inners = $xpath->query( 'inner', $contextNode );
-                                       $closes = $xpath->query( 'close', $contextNode );
-                                       if ( $flags & PPFrame::NO_TAGS ) {
-                                               $s = '<' . $this->expand( $names->item( 0 ), $flags );
-                                               if ( $attrs->length > 0 ) {
-                                                       $s .= $this->expand( $attrs->item( 0 ), $flags );
-                                               }
-                                               if ( $inners->length > 0 ) {
-                                                       $s .= '>' . $this->expand( $inners->item( 0 ), $flags );
-                                                       if ( $closes->length > 0 ) {
-                                                               $s .= $this->expand( $closes->item( 0 ), $flags );
-                                                       }
-                                               } else {
-                                                       $s .= '/>';
-                                               }
-                                               $out .= $s;
-                                       } else {
-                                               $params = [
-                                                       'name' => new PPNode_DOM( $names->item( 0 ) ),
-                                                       'attr' => $attrs->length > 0 ? new PPNode_DOM( $attrs->item( 0 ) ) : null,
-                                                       'inner' => $inners->length > 0 ? new PPNode_DOM( $inners->item( 0 ) ) : null,
-                                                       'close' => $closes->length > 0 ? new PPNode_DOM( $closes->item( 0 ) ) : null,
-                                               ];
-                                               $out .= $this->parser->extensionSubstitution( $params, $this );
-                                       }
-                               } elseif ( $contextNode->nodeName == 'h' ) {
-                                       # Heading
-                                       $s = $this->expand( $contextNode->childNodes, $flags );
-
-                                       # Insert a heading marker only for <h> children of <root>
-                                       # This is to stop extractSections from going over multiple tree levels
-                                       if ( $contextNode->parentNode->nodeName == 'root' && $this->parser->ot['html'] ) {
-                                               # Insert heading index marker
-                                               $headingIndex = $contextNode->getAttribute( 'i' );
-                                               $titleText = $this->title->getPrefixedDBkey();
-                                               $this->parser->mHeadings[] = [ $titleText, $headingIndex ];
-                                               $serial = count( $this->parser->mHeadings ) - 1;
-                                               $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
-                                               $count = $contextNode->getAttribute( 'level' );
-                                               $s = substr( $s, 0, $count ) . $marker . substr( $s, $count );
-                                               $this->parser->mStripState->addGeneral( $marker, '' );
-                                       }
-                                       $out .= $s;
-                               } else {
-                                       # Generic recursive expansion
-                                       $newIterator = $contextNode->childNodes;
-                               }
-                       } else {
-                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
-                       }
-
-                       if ( $newIterator !== false ) {
-                               if ( $newIterator instanceof PPNode_DOM ) {
-                                       $newIterator = $newIterator->node;
-                               }
-                               $outStack[] = '';
-                               $iteratorStack[] = $newIterator;
-                               $indexStack[] = 0;
-                       } elseif ( $iteratorStack[$level] === false ) {
-                               // Return accumulated value to parent
-                               // With tail recursion
-                               while ( $iteratorStack[$level] === false && $level > 0 ) {
-                                       $outStack[$level - 1] .= $out;
-                                       array_pop( $outStack );
-                                       array_pop( $iteratorStack );
-                                       array_pop( $indexStack );
-                                       $level--;
-                               }
-                       }
-               }
-               --$expansionDepth;
-               return $outStack[0];
-       }
-
-       /**
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node, $flags );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Implode with no flags specified
-        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
-        *
-        * @param string $sep
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return string
-        */
-       public function implode( $sep, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        *
-        * @param string $sep
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return array
-        */
-       public function virtualImplode( $sep, ...$args ) {
-               $out = [];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               return $out;
-       }
-
-       /**
-        * Virtual implode with brackets
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode_DOM|DOMDocument ...$args
-        * @return array
-        */
-       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
-               $out = [ $start ];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_DOM ) {
-                               $root = $root->node;
-                       }
-                       if ( !is_array( $root ) && !( $root instanceof DOMNodeList ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               $out[] = $end;
-               return $out;
-       }
-
-       public function __toString() {
-               return 'frame{}';
-       }
-
-       public function getPDBK( $level = false ) {
-               if ( $level === false ) {
-                       return $this->title->getPrefixedDBkey();
-               } else {
-                       return $this->titleCache[$level] ?? false;
-               }
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               return [];
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return true;
-       }
-
-       /**
-        * @param int|string $name
-        * @return bool Always false in this implementation.
-        */
-       public function getArgument( $name ) {
-               return false;
-       }
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        * @return bool
-        */
-       public function loopCheck( $title ) {
-               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return false;
-       }
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle() {
-               return $this->title;
-       }
-
-       /**
-        * Set the volatile flag
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true ) {
-               $this->volatile = $flag;
-       }
-
-       /**
-        * Get the volatile flag
-        *
-        * @return bool
-        */
-       public function isVolatile() {
-               return $this->volatile;
-       }
-
-       /**
-        * Set the TTL
-        *
-        * @param int $ttl
-        */
-       public function setTTL( $ttl ) {
-               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
-                       $this->ttl = $ttl;
-               }
-       }
-
-       /**
-        * Get the TTL
-        *
-        * @return int|null
-        */
-       public function getTTL() {
-               return $this->ttl;
-       }
-}
-
-/**
- * Expansion frame with template arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPTemplateFrame_DOM extends PPFrame_DOM {
-
-       public $numberedArgs, $namedArgs;
-
-       /**
-        * @var PPFrame_DOM
-        */
-       public $parent;
-       public $numberedExpansionCache, $namedExpansionCache;
-
-       /**
-        * @param Preprocessor $preprocessor
-        * @param bool|PPFrame_DOM $parent
-        * @param array $numberedArgs
-        * @param array $namedArgs
-        * @param bool|Title $title
-        */
-       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
-               $namedArgs = [], $title = false
-       ) {
-               parent::__construct( $preprocessor );
-
-               $this->parent = $parent;
-               $this->numberedArgs = $numberedArgs;
-               $this->namedArgs = $namedArgs;
-               $this->title = $title;
-               $pdbk = $title ? $title->getPrefixedDBkey() : false;
-               $this->titleCache = $parent->titleCache;
-               $this->titleCache[] = $pdbk;
-               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
-               if ( $pdbk !== false ) {
-                       $this->loopCheckHash[$pdbk] = true;
-               }
-               $this->depth = $parent->depth + 1;
-               $this->numberedExpansionCache = $this->namedExpansionCache = [];
-       }
-
-       public function __toString() {
-               $s = 'tplframe{';
-               $first = true;
-               $args = $this->numberedArgs + $this->namedArgs;
-               foreach ( $args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->ownerDocument->saveXML( $value ) ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode_DOM|DOMDocument $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
-                       return $this->parent->childExpansionCache[$key];
-               }
-               $retval = $this->expand( $root, $flags );
-               if ( !$this->isVolatile() ) {
-                       $this->parent->childExpansionCache[$key] = $retval;
-               }
-               return $retval;
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
-       }
-
-       public function getArguments() {
-               $arguments = [];
-               foreach ( array_merge(
-                               array_keys( $this->numberedArgs ),
-                               array_keys( $this->namedArgs ) ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       public function getNumberedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->numberedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       public function getNamedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->namedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @param int $index
-        * @return string|bool
-        */
-       public function getNumberedArgument( $index ) {
-               if ( !isset( $this->numberedArgs[$index] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
-                       # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand(
-                               $this->numberedArgs[$index],
-                               PPFrame::STRIP_COMMENTS
-                       );
-               }
-               return $this->numberedExpansionCache[$index];
-       }
-
-       /**
-        * @param string $name
-        * @return string|bool
-        */
-       public function getNamedArgument( $name ) {
-               if ( !isset( $this->namedArgs[$name] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->namedExpansionCache[$name] ) ) {
-                       # Trim named arguments post-expand, for backwards compatibility
-                       $this->namedExpansionCache[$name] = trim(
-                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
-               }
-               return $this->namedExpansionCache[$name];
-       }
-
-       /**
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name ) {
-               $text = $this->getNumberedArgument( $name );
-               if ( $text === false ) {
-                       $text = $this->getNamedArgument( $name );
-               }
-               return $text;
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return true;
-       }
-
-       public function setVolatile( $flag = true ) {
-               parent::setVolatile( $flag );
-               $this->parent->setVolatile( $flag );
-       }
-
-       public function setTTL( $ttl ) {
-               parent::setTTL( $ttl );
-               $this->parent->setTTL( $ttl );
-       }
-}
-
-/**
- * Expansion frame with custom arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPCustomFrame_DOM extends PPFrame_DOM {
-
-       public $args;
-
-       public function __construct( $preprocessor, $args ) {
-               parent::__construct( $preprocessor );
-               $this->args = $args;
-       }
-
-       public function __toString() {
-               $s = 'cstmframe{';
-               $first = true;
-               foreach ( $this->args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->args );
-       }
-
-       /**
-        * @param int|string $index
-        * @return string|bool
-        */
-       public function getArgument( $index ) {
-               return $this->args[$index] ?? false;
-       }
-
-       public function getArguments() {
-               return $this->args;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_DOM implements PPNode {
-
-       /**
-        * @var DOMElement
-        */
-       public $node;
-       public $xpath;
-
-       public function __construct( $node, $xpath = false ) {
-               $this->node = $node;
-       }
-
-       /**
-        * @return DOMXPath
-        */
-       public function getXPath() {
-               if ( $this->xpath === null ) {
-                       $this->xpath = new DOMXPath( $this->node->ownerDocument );
-               }
-               return $this->xpath;
-       }
-
-       public function __toString() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       $s = '';
-                       foreach ( $this->node as $node ) {
-                               $s .= $node->ownerDocument->saveXML( $node );
-                       }
-               } else {
-                       $s = $this->node->ownerDocument->saveXML( $this->node );
-               }
-               return $s;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getChildren() {
-               return $this->node->childNodes ? new self( $this->node->childNodes ) : false;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getFirstChild() {
-               return $this->node->firstChild ? new self( $this->node->firstChild ) : false;
-       }
-
-       /**
-        * @return bool|PPNode_DOM
-        */
-       public function getNextSibling() {
-               return $this->node->nextSibling ? new self( $this->node->nextSibling ) : false;
-       }
-
-       /**
-        * @param string $type
-        *
-        * @return bool|PPNode_DOM
-        */
-       public function getChildrenOfType( $type ) {
-               return new self( $this->getXPath()->query( $type, $this->node ) );
-       }
-
-       /**
-        * @return int
-        */
-       public function getLength() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       return $this->node->length;
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * @param int $i
-        * @return bool|PPNode_DOM
-        */
-       public function item( $i ) {
-               $item = $this->node->item( $i );
-               return $item ? new self( $item ) : false;
-       }
-
-       /**
-        * @return string
-        */
-       public function getName() {
-               if ( $this->node instanceof DOMNodeList ) {
-                       return '#nodelist';
-               } else {
-                       return $this->node->nodeName;
-               }
-       }
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *  - name          PPNode name
-        *  - index         String index
-        *  - value         PPNode value
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitArg() {
-               $xpath = $this->getXPath();
-               $names = $xpath->query( 'name', $this->node );
-               $values = $xpath->query( 'value', $this->node );
-               if ( !$names->length || !$values->length ) {
-                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
-               }
-               $name = $names->item( 0 );
-               $index = $name->getAttribute( 'index' );
-               return [
-                       'name' => new self( $name ),
-                       'index' => $index,
-                       'value' => new self( $values->item( 0 ) ) ];
-       }
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitExt() {
-               $xpath = $this->getXPath();
-               $names = $xpath->query( 'name', $this->node );
-               $attrs = $xpath->query( 'attr', $this->node );
-               $inners = $xpath->query( 'inner', $this->node );
-               $closes = $xpath->query( 'close', $this->node );
-               if ( !$names->length || !$attrs->length ) {
-                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
-               }
-               $parts = [
-                       'name' => new self( $names->item( 0 ) ),
-                       'attr' => new self( $attrs->item( 0 ) ) ];
-               if ( $inners->length ) {
-                       $parts['inner'] = new self( $inners->item( 0 ) );
-               }
-               if ( $closes->length ) {
-                       $parts['close'] = new self( $closes->item( 0 ) );
-               }
-               return $parts;
-       }
-
-       /**
-        * Split a "<h>" node
-        * @throws MWException
-        * @return array
-        */
-       public function splitHeading() {
-               if ( $this->getName() !== 'h' ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return [
-                       'i' => $this->node->getAttribute( 'i' ),
-                       'level' => $this->node->getAttribute( 'level' ),
-                       'contents' => $this->getChildren()
-               ];
-       }
-}
index a845047..66f081f 100644 (file)
@@ -795,1459 +795,3 @@ class Preprocessor_Hash extends Preprocessor {
                }
        }
 }
-
-/**
- * Stack class to help Preprocessor::preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDStack_Hash extends PPDStack {
-
-       public function __construct() {
-               $this->elementClass = PPDStackElement_Hash::class;
-               parent::__construct();
-               $this->rootAccum = [];
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDStackElement_Hash extends PPDStackElement {
-
-       public function __construct( $data = [] ) {
-               $this->partClass = PPDPart_Hash::class;
-               parent::__construct( $data );
-       }
-
-       /**
-        * Get the accumulator that would result if the close is not found.
-        *
-        * @param int|bool $openingCount
-        * @return array
-        */
-       public function breakSyntax( $openingCount = false ) {
-               if ( $this->open == "\n" ) {
-                       $accum = array_merge( [ $this->savedPrefix ], $this->parts[0]->out );
-               } else {
-                       if ( $openingCount === false ) {
-                               $openingCount = $this->count;
-                       }
-                       $s = substr( $this->open, 0, -1 );
-                       $s .= str_repeat(
-                               substr( $this->open, -1 ),
-                               $openingCount - strlen( $s )
-                       );
-                       $accum = [ $this->savedPrefix . $s ];
-                       $lastIndex = 0;
-                       $first = true;
-                       foreach ( $this->parts as $part ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } elseif ( is_string( $accum[$lastIndex] ) ) {
-                                       $accum[$lastIndex] .= '|';
-                               } else {
-                                       $accum[++$lastIndex] = '|';
-                               }
-                               foreach ( $part->out as $node ) {
-                                       if ( is_string( $node ) && is_string( $accum[$lastIndex] ) ) {
-                                               $accum[$lastIndex] .= $node;
-                                       } else {
-                                               $accum[++$lastIndex] = $node;
-                                       }
-                               }
-                       }
-               }
-               return $accum;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPDPart_Hash extends PPDPart {
-
-       public function __construct( $out = '' ) {
-               if ( $out !== '' ) {
-                       $accum = [ $out ];
-               } else {
-                       $accum = [];
-               }
-               parent::__construct( $accum );
-       }
-}
-
-/**
- * An expansion frame, used as a context to expand the result of preprocessToObj()
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPFrame_Hash implements PPFrame {
-
-       /**
-        * @var Parser
-        */
-       public $parser;
-
-       /**
-        * @var Preprocessor
-        */
-       public $preprocessor;
-
-       /**
-        * @var Title
-        */
-       public $title;
-       public $titleCache;
-
-       /**
-        * Hashtable listing templates which are disallowed for expansion in this frame,
-        * having been encountered previously in parent frames.
-        */
-       public $loopCheckHash;
-
-       /**
-        * Recursion depth of this frame, top = 0
-        * Note that this is NOT the same as expansion depth in expand()
-        */
-       public $depth;
-
-       private $volatile = false;
-       private $ttl = null;
-
-       /**
-        * @var array
-        */
-       protected $childExpansionCache;
-
-       /**
-        * Construct a new preprocessor frame.
-        * @param Preprocessor $preprocessor The parent preprocessor
-        */
-       public function __construct( $preprocessor ) {
-               $this->preprocessor = $preprocessor;
-               $this->parser = $preprocessor->parser;
-               $this->title = $this->parser->mTitle;
-               $this->titleCache = [ $this->title ? $this->title->getPrefixedDBkey() : false ];
-               $this->loopCheckHash = [];
-               $this->depth = 0;
-               $this->childExpansionCache = [];
-       }
-
-       /**
-        * Create a new child frame
-        * $args is optionally a multi-root PPNode or array containing the template arguments
-        *
-        * @param array|bool|PPNode_Hash_Array $args
-        * @param Title|bool $title
-        * @param int $indexOffset
-        * @throws MWException
-        * @return PPTemplateFrame_Hash
-        */
-       public function newChild( $args = false, $title = false, $indexOffset = 0 ) {
-               $namedArgs = [];
-               $numberedArgs = [];
-               if ( $title === false ) {
-                       $title = $this->title;
-               }
-               if ( $args !== false ) {
-                       if ( $args instanceof PPNode_Hash_Array ) {
-                               $args = $args->value;
-                       } elseif ( !is_array( $args ) ) {
-                               throw new MWException( __METHOD__ . ': $args must be array or PPNode_Hash_Array' );
-                       }
-                       foreach ( $args as $arg ) {
-                               $bits = $arg->splitArg();
-                               if ( $bits['index'] !== '' ) {
-                                       // Numbered parameter
-                                       $index = $bits['index'] - $indexOffset;
-                                       if ( isset( $namedArgs[$index] ) || isset( $numberedArgs[$index] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $index ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $numberedArgs[$index] = $bits['value'];
-                                       unset( $namedArgs[$index] );
-                               } else {
-                                       // Named parameter
-                                       $name = trim( $this->expand( $bits['name'], PPFrame::STRIP_COMMENTS ) );
-                                       if ( isset( $namedArgs[$name] ) || isset( $numberedArgs[$name] ) ) {
-                                               $this->parser->getOutput()->addWarning( wfMessage( 'duplicate-args-warning',
-                                                       wfEscapeWikiText( $this->title ),
-                                                       wfEscapeWikiText( $title ),
-                                                       wfEscapeWikiText( $name ) )->text() );
-                                               $this->parser->addTrackingCategory( 'duplicate-args-category' );
-                                       }
-                                       $namedArgs[$name] = $bits['value'];
-                                       unset( $numberedArgs[$name] );
-                               }
-                       }
-               }
-               return new PPTemplateFrame_Hash( $this->preprocessor, $this, $numberedArgs, $namedArgs, $title );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               // we don't have a parent, so we don't have a cache
-               return $this->expand( $root, $flags );
-       }
-
-       /**
-        * @throws MWException
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function expand( $root, $flags = 0 ) {
-               static $expansionDepth = 0;
-               if ( is_string( $root ) ) {
-                       return $root;
-               }
-
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) {
-                       $this->parser->limitationWarn( 'node-count-exceeded',
-                                       $this->parser->mPPNodeCount,
-                                       $this->parser->mOptions->getMaxPPNodeCount()
-                       );
-                       return '<span class="error">Node-count limit exceeded</span>';
-               }
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
-                       $this->parser->limitationWarn( 'expansion-depth-exceeded',
-                                       $expansionDepth,
-                                       $this->parser->mOptions->getMaxPPExpandDepth()
-                       );
-                       return '<span class="error">Expansion depth limit exceeded</span>';
-               }
-               ++$expansionDepth;
-               if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
-                       $this->parser->mHighestExpansionDepth = $expansionDepth;
-               }
-
-               $outStack = [ '', '' ];
-               $iteratorStack = [ false, $root ];
-               $indexStack = [ 0, 0 ];
-
-               while ( count( $iteratorStack ) > 1 ) {
-                       $level = count( $outStack ) - 1;
-                       $iteratorNode =& $iteratorStack[$level];
-                       $out =& $outStack[$level];
-                       $index =& $indexStack[$level];
-
-                       if ( is_array( $iteratorNode ) ) {
-                               if ( $index >= count( $iteratorNode ) ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode[$index];
-                                       $index++;
-                               }
-                       } elseif ( $iteratorNode instanceof PPNode_Hash_Array ) {
-                               if ( $index >= $iteratorNode->getLength() ) {
-                                       // All done with this iterator
-                                       $iteratorStack[$level] = false;
-                                       $contextNode = false;
-                               } else {
-                                       $contextNode = $iteratorNode->item( $index );
-                                       $index++;
-                               }
-                       } else {
-                               // Copy to $contextNode and then delete from iterator stack,
-                               // because this is not an iterator but we do have to execute it once
-                               $contextNode = $iteratorStack[$level];
-                               $iteratorStack[$level] = false;
-                       }
-
-                       $newIterator = false;
-                       $contextName = false;
-                       $contextChildren = false;
-
-                       if ( $contextNode === false ) {
-                               // nothing to do
-                       } elseif ( is_string( $contextNode ) ) {
-                               $out .= $contextNode;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Array ) {
-                               $newIterator = $contextNode;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Attr ) {
-                               // No output
-                       } elseif ( $contextNode instanceof PPNode_Hash_Text ) {
-                               $out .= $contextNode->value;
-                       } elseif ( $contextNode instanceof PPNode_Hash_Tree ) {
-                               $contextName = $contextNode->name;
-                               $contextChildren = $contextNode->getRawChildren();
-                       } elseif ( is_array( $contextNode ) ) {
-                               // Node descriptor array
-                               if ( count( $contextNode ) !== 2 ) {
-                                       throw new MWException( __METHOD__ .
-                                               ': found an array where a node descriptor should be' );
-                               }
-                               list( $contextName, $contextChildren ) = $contextNode;
-                       } else {
-                               throw new MWException( __METHOD__ . ': Invalid parameter type' );
-                       }
-
-                       // Handle node descriptor array or tree object
-                       if ( $contextName === false ) {
-                               // Not a node, already handled above
-                       } elseif ( $contextName[0] === '@' ) {
-                               // Attribute: no output
-                       } elseif ( $contextName === 'template' ) {
-                               # Double-brace expansion
-                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
-                               if ( $flags & PPFrame::NO_TEMPLATES ) {
-                                       $newIterator = $this->virtualBracketedImplode(
-                                               '{{', '|', '}}',
-                                               $bits['title'],
-                                               $bits['parts']
-                                       );
-                               } else {
-                                       $ret = $this->parser->braceSubstitution( $bits, $this );
-                                       if ( isset( $ret['object'] ) ) {
-                                               $newIterator = $ret['object'];
-                                       } else {
-                                               $out .= $ret['text'];
-                                       }
-                               }
-                       } elseif ( $contextName === 'tplarg' ) {
-                               # Triple-brace expansion
-                               $bits = PPNode_Hash_Tree::splitRawTemplate( $contextChildren );
-                               if ( $flags & PPFrame::NO_ARGS ) {
-                                       $newIterator = $this->virtualBracketedImplode(
-                                               '{{{', '|', '}}}',
-                                               $bits['title'],
-                                               $bits['parts']
-                                       );
-                               } else {
-                                       $ret = $this->parser->argSubstitution( $bits, $this );
-                                       if ( isset( $ret['object'] ) ) {
-                                               $newIterator = $ret['object'];
-                                       } else {
-                                               $out .= $ret['text'];
-                                       }
-                               }
-                       } elseif ( $contextName === 'comment' ) {
-                               # HTML-style comment
-                               # Remove it in HTML, pre+remove and STRIP_COMMENTS modes
-                               # Not in RECOVER_COMMENTS mode (msgnw) though.
-                               if ( ( $this->parser->ot['html']
-                                       || ( $this->parser->ot['pre'] && $this->parser->mOptions->getRemoveComments() )
-                                       || ( $flags & PPFrame::STRIP_COMMENTS )
-                                       ) && !( $flags & PPFrame::RECOVER_COMMENTS )
-                               ) {
-                                       $out .= '';
-                               } elseif ( $this->parser->ot['wiki'] && !( $flags & PPFrame::RECOVER_COMMENTS ) ) {
-                                       # Add a strip marker in PST mode so that pstPass2() can
-                                       # run some old-fashioned regexes on the result.
-                                       # Not in RECOVER_COMMENTS mode (extractSections) though.
-                                       $out .= $this->parser->insertStripItem( $contextChildren[0] );
-                               } else {
-                                       # Recover the literal comment in RECOVER_COMMENTS and pre+no-remove
-                                       $out .= $contextChildren[0];
-                               }
-                       } elseif ( $contextName === 'ignore' ) {
-                               # Output suppression used by <includeonly> etc.
-                               # OT_WIKI will only respect <ignore> in substed templates.
-                               # The other output types respect it unless NO_IGNORE is set.
-                               # extractSections() sets NO_IGNORE and so never respects it.
-                               if ( ( !isset( $this->parent ) && $this->parser->ot['wiki'] )
-                                       || ( $flags & PPFrame::NO_IGNORE )
-                               ) {
-                                       $out .= $contextChildren[0];
-                               } else {
-                                       // $out .= '';
-                               }
-                       } elseif ( $contextName === 'ext' ) {
-                               # Extension tag
-                               $bits = PPNode_Hash_Tree::splitRawExt( $contextChildren ) +
-                                       [ 'attr' => null, 'inner' => null, 'close' => null ];
-                               if ( $flags & PPFrame::NO_TAGS ) {
-                                       $s = '<' . $bits['name']->getFirstChild()->value;
-                                       if ( $bits['attr'] ) {
-                                               $s .= $bits['attr']->getFirstChild()->value;
-                                       }
-                                       if ( $bits['inner'] ) {
-                                               $s .= '>' . $bits['inner']->getFirstChild()->value;
-                                               if ( $bits['close'] ) {
-                                                       $s .= $bits['close']->getFirstChild()->value;
-                                               }
-                                       } else {
-                                               $s .= '/>';
-                                       }
-                                       $out .= $s;
-                               } else {
-                                       $out .= $this->parser->extensionSubstitution( $bits, $this );
-                               }
-                       } elseif ( $contextName === 'h' ) {
-                               # Heading
-                               if ( $this->parser->ot['html'] ) {
-                                       # Expand immediately and insert heading index marker
-                                       $s = $this->expand( $contextChildren, $flags );
-                                       $bits = PPNode_Hash_Tree::splitRawHeading( $contextChildren );
-                                       $titleText = $this->title->getPrefixedDBkey();
-                                       $this->parser->mHeadings[] = [ $titleText, $bits['i'] ];
-                                       $serial = count( $this->parser->mHeadings ) - 1;
-                                       $marker = Parser::MARKER_PREFIX . "-h-$serial-" . Parser::MARKER_SUFFIX;
-                                       $s = substr( $s, 0, $bits['level'] ) . $marker . substr( $s, $bits['level'] );
-                                       $this->parser->mStripState->addGeneral( $marker, '' );
-                                       $out .= $s;
-                               } else {
-                                       # Expand in virtual stack
-                                       $newIterator = $contextChildren;
-                               }
-                       } else {
-                               # Generic recursive expansion
-                               $newIterator = $contextChildren;
-                       }
-
-                       if ( $newIterator !== false ) {
-                               $outStack[] = '';
-                               $iteratorStack[] = $newIterator;
-                               $indexStack[] = 0;
-                       } elseif ( $iteratorStack[$level] === false ) {
-                               // Return accumulated value to parent
-                               // With tail recursion
-                               while ( $iteratorStack[$level] === false && $level > 0 ) {
-                                       $outStack[$level - 1] .= $out;
-                                       array_pop( $outStack );
-                                       array_pop( $iteratorStack );
-                                       array_pop( $indexStack );
-                                       $level--;
-                               }
-                       }
-               }
-               --$expansionDepth;
-               return $outStack[0];
-       }
-
-       /**
-        * @param string $sep
-        * @param int $flags
-        * @param string|PPNode ...$args
-        * @return string
-        */
-       public function implodeWithFlags( $sep, $flags, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node, $flags );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Implode with no flags specified
-        * This previously called implodeWithFlags but has now been inlined to reduce stack depth
-        * @param string $sep
-        * @param string|PPNode ...$args
-        * @return string
-        */
-       public function implode( $sep, ...$args ) {
-               $first = true;
-               $s = '';
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $s .= $sep;
-                               }
-                               $s .= $this->expand( $node );
-                       }
-               }
-               return $s;
-       }
-
-       /**
-        * Makes an object that, when expand()ed, will be the same as one obtained
-        * with implode()
-        *
-        * @param string $sep
-        * @param string|PPNode ...$args
-        * @return PPNode_Hash_Array
-        */
-       public function virtualImplode( $sep, ...$args ) {
-               $out = [];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               return new PPNode_Hash_Array( $out );
-       }
-
-       /**
-        * Virtual implode with brackets
-        *
-        * @param string $start
-        * @param string $sep
-        * @param string $end
-        * @param string|PPNode ...$args
-        * @return PPNode_Hash_Array
-        */
-       public function virtualBracketedImplode( $start, $sep, $end, ...$args ) {
-               $out = [ $start ];
-               $first = true;
-
-               foreach ( $args as $root ) {
-                       if ( $root instanceof PPNode_Hash_Array ) {
-                               $root = $root->value;
-                       }
-                       if ( !is_array( $root ) ) {
-                               $root = [ $root ];
-                       }
-                       foreach ( $root as $node ) {
-                               if ( $first ) {
-                                       $first = false;
-                               } else {
-                                       $out[] = $sep;
-                               }
-                               $out[] = $node;
-                       }
-               }
-               $out[] = $end;
-               return new PPNode_Hash_Array( $out );
-       }
-
-       public function __toString() {
-               return 'frame{}';
-       }
-
-       /**
-        * @param bool $level
-        * @return array|bool|string
-        */
-       public function getPDBK( $level = false ) {
-               if ( $level === false ) {
-                       return $this->title->getPrefixedDBkey();
-               } else {
-                       return $this->titleCache[$level] ?? false;
-               }
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               return [];
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               return [];
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return true;
-       }
-
-       /**
-        * @param int|string $name
-        * @return bool Always false in this implementation.
-        */
-       public function getArgument( $name ) {
-               return false;
-       }
-
-       /**
-        * Returns true if the infinite loop check is OK, false if a loop is detected
-        *
-        * @param Title $title
-        *
-        * @return bool
-        */
-       public function loopCheck( $title ) {
-               return !isset( $this->loopCheckHash[$title->getPrefixedDBkey()] );
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return false;
-       }
-
-       /**
-        * Get a title of frame
-        *
-        * @return Title
-        */
-       public function getTitle() {
-               return $this->title;
-       }
-
-       /**
-        * Set the volatile flag
-        *
-        * @param bool $flag
-        */
-       public function setVolatile( $flag = true ) {
-               $this->volatile = $flag;
-       }
-
-       /**
-        * Get the volatile flag
-        *
-        * @return bool
-        */
-       public function isVolatile() {
-               return $this->volatile;
-       }
-
-       /**
-        * Set the TTL
-        *
-        * @param int $ttl
-        */
-       public function setTTL( $ttl ) {
-               if ( $ttl !== null && ( $this->ttl === null || $ttl < $this->ttl ) ) {
-                       $this->ttl = $ttl;
-               }
-       }
-
-       /**
-        * Get the TTL
-        *
-        * @return int|null
-        */
-       public function getTTL() {
-               return $this->ttl;
-       }
-}
-
-/**
- * Expansion frame with template arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPTemplateFrame_Hash extends PPFrame_Hash {
-
-       public $numberedArgs, $namedArgs, $parent;
-       public $numberedExpansionCache, $namedExpansionCache;
-
-       /**
-        * @param Preprocessor $preprocessor
-        * @param bool|PPFrame $parent
-        * @param array $numberedArgs
-        * @param array $namedArgs
-        * @param bool|Title $title
-        */
-       public function __construct( $preprocessor, $parent = false, $numberedArgs = [],
-               $namedArgs = [], $title = false
-       ) {
-               parent::__construct( $preprocessor );
-
-               $this->parent = $parent;
-               $this->numberedArgs = $numberedArgs;
-               $this->namedArgs = $namedArgs;
-               $this->title = $title;
-               $pdbk = $title ? $title->getPrefixedDBkey() : false;
-               $this->titleCache = $parent->titleCache;
-               $this->titleCache[] = $pdbk;
-               $this->loopCheckHash = /*clone*/ $parent->loopCheckHash;
-               if ( $pdbk !== false ) {
-                       $this->loopCheckHash[$pdbk] = true;
-               }
-               $this->depth = $parent->depth + 1;
-               $this->numberedExpansionCache = $this->namedExpansionCache = [];
-       }
-
-       public function __toString() {
-               $s = 'tplframe{';
-               $first = true;
-               $args = $this->numberedArgs + $this->namedArgs;
-               foreach ( $args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @throws MWException
-        * @param string|int $key
-        * @param string|PPNode $root
-        * @param int $flags
-        * @return string
-        */
-       public function cachedExpand( $key, $root, $flags = 0 ) {
-               if ( isset( $this->parent->childExpansionCache[$key] ) ) {
-                       return $this->parent->childExpansionCache[$key];
-               }
-               $retval = $this->expand( $root, $flags );
-               if ( !$this->isVolatile() ) {
-                       $this->parent->childExpansionCache[$key] = $retval;
-               }
-               return $retval;
-       }
-
-       /**
-        * Returns true if there are no arguments in this frame
-        *
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->numberedArgs ) && !count( $this->namedArgs );
-       }
-
-       /**
-        * @return array
-        */
-       public function getArguments() {
-               $arguments = [];
-               foreach ( array_merge(
-                               array_keys( $this->numberedArgs ),
-                               array_keys( $this->namedArgs ) ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       public function getNumberedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->numberedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @return array
-        */
-       public function getNamedArguments() {
-               $arguments = [];
-               foreach ( array_keys( $this->namedArgs ) as $key ) {
-                       $arguments[$key] = $this->getArgument( $key );
-               }
-               return $arguments;
-       }
-
-       /**
-        * @param int $index
-        * @return string|bool
-        */
-       public function getNumberedArgument( $index ) {
-               if ( !isset( $this->numberedArgs[$index] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->numberedExpansionCache[$index] ) ) {
-                       # No trimming for unnamed arguments
-                       $this->numberedExpansionCache[$index] = $this->parent->expand(
-                               $this->numberedArgs[$index],
-                               PPFrame::STRIP_COMMENTS
-                       );
-               }
-               return $this->numberedExpansionCache[$index];
-       }
-
-       /**
-        * @param string $name
-        * @return string|bool
-        */
-       public function getNamedArgument( $name ) {
-               if ( !isset( $this->namedArgs[$name] ) ) {
-                       return false;
-               }
-               if ( !isset( $this->namedExpansionCache[$name] ) ) {
-                       # Trim named arguments post-expand, for backwards compatibility
-                       $this->namedExpansionCache[$name] = trim(
-                               $this->parent->expand( $this->namedArgs[$name], PPFrame::STRIP_COMMENTS ) );
-               }
-               return $this->namedExpansionCache[$name];
-       }
-
-       /**
-        * @param int|string $name
-        * @return string|bool
-        */
-       public function getArgument( $name ) {
-               $text = $this->getNumberedArgument( $name );
-               if ( $text === false ) {
-                       $text = $this->getNamedArgument( $name );
-               }
-               return $text;
-       }
-
-       /**
-        * Return true if the frame is a template frame
-        *
-        * @return bool
-        */
-       public function isTemplate() {
-               return true;
-       }
-
-       public function setVolatile( $flag = true ) {
-               parent::setVolatile( $flag );
-               $this->parent->setVolatile( $flag );
-       }
-
-       public function setTTL( $ttl ) {
-               parent::setTTL( $ttl );
-               $this->parent->setTTL( $ttl );
-       }
-}
-
-/**
- * Expansion frame with custom arguments
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPCustomFrame_Hash extends PPFrame_Hash {
-
-       public $args;
-
-       public function __construct( $preprocessor, $args ) {
-               parent::__construct( $preprocessor );
-               $this->args = $args;
-       }
-
-       public function __toString() {
-               $s = 'cstmframe{';
-               $first = true;
-               foreach ( $this->args as $name => $value ) {
-                       if ( $first ) {
-                               $first = false;
-                       } else {
-                               $s .= ', ';
-                       }
-                       $s .= "\"$name\":\"" .
-                               str_replace( '"', '\\"', $value->__toString() ) . '"';
-               }
-               $s .= '}';
-               return $s;
-       }
-
-       /**
-        * @return bool
-        */
-       public function isEmpty() {
-               return !count( $this->args );
-       }
-
-       /**
-        * @param int|string $index
-        * @return string|bool
-        */
-       public function getArgument( $index ) {
-               return $this->args[$index] ?? false;
-       }
-
-       public function getArguments() {
-               return $this->args;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Tree implements PPNode {
-
-       public $name;
-
-       /**
-        * The store array for children of this node. It is "raw" in the sense that
-        * nodes are two-element arrays ("descriptors") rather than PPNode_Hash_*
-        * objects.
-        */
-       private $rawChildren;
-
-       /**
-        * The store array for the siblings of this node, including this node itself.
-        */
-       private $store;
-
-       /**
-        * The index into $this->store which contains the descriptor of this node.
-        */
-       private $index;
-
-       /**
-        * The offset of the name within descriptors, used in some places for
-        * readability.
-        */
-       const NAME = 0;
-
-       /**
-        * The offset of the child list within descriptors, used in some places for
-        * readability.
-        */
-       const CHILDREN = 1;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $this->store = $store;
-               $this->index = $index;
-               list( $this->name, $this->rawChildren ) = $this->store[$index];
-       }
-
-       /**
-        * Construct an appropriate PPNode_Hash_* object with a class that depends
-        * on what is at the relevant store index.
-        *
-        * @param array $store
-        * @param int $index
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|false
-        * @throws MWException
-        */
-       public static function factory( array $store, $index ) {
-               if ( !isset( $store[$index] ) ) {
-                       return false;
-               }
-
-               $descriptor = $store[$index];
-               if ( is_string( $descriptor ) ) {
-                       $class = PPNode_Hash_Text::class;
-               } elseif ( is_array( $descriptor ) ) {
-                       if ( $descriptor[self::NAME][0] === '@' ) {
-                               $class = PPNode_Hash_Attr::class;
-                       } else {
-                               $class = self::class;
-                       }
-               } else {
-                       throw new MWException( __METHOD__ . ': invalid node descriptor' );
-               }
-               return new $class( $store, $index );
-       }
-
-       /**
-        * Convert a node to XML, for debugging
-        * @return string
-        */
-       public function __toString() {
-               $inner = '';
-               $attribs = '';
-               for ( $node = $this->getFirstChild(); $node; $node = $node->getNextSibling() ) {
-                       if ( $node instanceof PPNode_Hash_Attr ) {
-                               $attribs .= ' ' . $node->name . '="' . htmlspecialchars( $node->value ) . '"';
-                       } else {
-                               $inner .= $node->__toString();
-                       }
-               }
-               if ( $inner === '' ) {
-                       return "<{$this->name}$attribs/>";
-               } else {
-                       return "<{$this->name}$attribs>$inner</{$this->name}>";
-               }
-       }
-
-       /**
-        * @return PPNode_Hash_Array
-        */
-       public function getChildren() {
-               $children = [];
-               foreach ( $this->rawChildren as $i => $child ) {
-                       $children[] = self::factory( $this->rawChildren, $i );
-               }
-               return new PPNode_Hash_Array( $children );
-       }
-
-       /**
-        * Get the first child, or false if there is none. Note that this will
-        * return a temporary proxy object: different instances will be returned
-        * if this is called more than once on the same node.
-        *
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
-        */
-       public function getFirstChild() {
-               if ( !isset( $this->rawChildren[0] ) ) {
-                       return false;
-               } else {
-                       return self::factory( $this->rawChildren, 0 );
-               }
-       }
-
-       /**
-        * Get the next sibling, or false if there is none. Note that this will
-        * return a temporary proxy object: different instances will be returned
-        * if this is called more than once on the same node.
-        *
-        * @return PPNode_Hash_Tree|PPNode_Hash_Attr|PPNode_Hash_Text|bool
-        */
-       public function getNextSibling() {
-               return self::factory( $this->store, $this->index + 1 );
-       }
-
-       /**
-        * Get an array of the children with a given node name
-        *
-        * @param string $name
-        * @return PPNode_Hash_Array
-        */
-       public function getChildrenOfType( $name ) {
-               $children = [];
-               foreach ( $this->rawChildren as $i => $child ) {
-                       if ( is_array( $child ) && $child[self::NAME] === $name ) {
-                               $children[] = self::factory( $this->rawChildren, $i );
-                       }
-               }
-               return new PPNode_Hash_Array( $children );
-       }
-
-       /**
-        * Get the raw child array. For internal use.
-        * @return array
-        */
-       public function getRawChildren() {
-               return $this->rawChildren;
-       }
-
-       /**
-        * @return bool
-        */
-       public function getLength() {
-               return false;
-       }
-
-       /**
-        * @param int $i
-        * @return bool
-        */
-       public function item( $i ) {
-               return false;
-       }
-
-       /**
-        * @return string
-        */
-       public function getName() {
-               return $this->name;
-       }
-
-       /**
-        * Split a "<part>" node into an associative array containing:
-        *  - name          PPNode name
-        *  - index         String index
-        *  - value         PPNode value
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitArg() {
-               return self::splitRawArg( $this->rawChildren );
-       }
-
-       /**
-        * Like splitArg() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawArg( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       if ( $child[self::NAME] === 'name' ) {
-                               $bits['name'] = new self( $children, $i );
-                               if ( isset( $child[self::CHILDREN][0][self::NAME] )
-                                       && $child[self::CHILDREN][0][self::NAME] === '@index'
-                               ) {
-                                       $bits['index'] = $child[self::CHILDREN][0][self::CHILDREN][0];
-                               }
-                       } elseif ( $child[self::NAME] === 'value' ) {
-                               $bits['value'] = new self( $children, $i );
-                       }
-               }
-
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid brace node passed to ' . __METHOD__ );
-               }
-               if ( !isset( $bits['index'] ) ) {
-                       $bits['index'] = '';
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an "<ext>" node into an associative array containing name, attr, inner and close
-        * All values in the resulting array are PPNodes. Inner and close are optional.
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitExt() {
-               return self::splitRawExt( $this->rawChildren );
-       }
-
-       /**
-        * Like splitExt() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawExt( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       switch ( $child[self::NAME] ) {
-                               case 'name':
-                                       $bits['name'] = new self( $children, $i );
-                                       break;
-                               case 'attr':
-                                       $bits['attr'] = new self( $children, $i );
-                                       break;
-                               case 'inner':
-                                       $bits['inner'] = new self( $children, $i );
-                                       break;
-                               case 'close':
-                                       $bits['close'] = new self( $children, $i );
-                                       break;
-                       }
-               }
-               if ( !isset( $bits['name'] ) ) {
-                       throw new MWException( 'Invalid ext node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split an "<h>" node
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitHeading() {
-               if ( $this->name !== 'h' ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return self::splitRawHeading( $this->rawChildren );
-       }
-
-       /**
-        * Like splitHeading() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawHeading( array $children ) {
-               $bits = [];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       if ( $child[self::NAME] === '@i' ) {
-                               $bits['i'] = $child[self::CHILDREN][0];
-                       } elseif ( $child[self::NAME] === '@level' ) {
-                               $bits['level'] = $child[self::CHILDREN][0];
-                       }
-               }
-               if ( !isset( $bits['i'] ) ) {
-                       throw new MWException( 'Invalid h node passed to ' . __METHOD__ );
-               }
-               return $bits;
-       }
-
-       /**
-        * Split a "<template>" or "<tplarg>" node
-        *
-        * @throws MWException
-        * @return array
-        */
-       public function splitTemplate() {
-               return self::splitRawTemplate( $this->rawChildren );
-       }
-
-       /**
-        * Like splitTemplate() but for a raw child array. For internal use only.
-        * @param array $children
-        * @return array
-        */
-       public static function splitRawTemplate( array $children ) {
-               $parts = [];
-               $bits = [ 'lineStart' => '' ];
-               foreach ( $children as $i => $child ) {
-                       if ( !is_array( $child ) ) {
-                               continue;
-                       }
-                       switch ( $child[self::NAME] ) {
-                               case 'title':
-                                       $bits['title'] = new self( $children, $i );
-                                       break;
-                               case 'part':
-                                       $parts[] = new self( $children, $i );
-                                       break;
-                               case '@lineStart':
-                                       $bits['lineStart'] = '1';
-                                       break;
-                       }
-               }
-               if ( !isset( $bits['title'] ) ) {
-                       throw new MWException( 'Invalid node passed to ' . __METHOD__ );
-               }
-               $bits['parts'] = new PPNode_Hash_Array( $parts );
-               return $bits;
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Text implements PPNode {
-
-       public $value;
-       private $store, $index;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $this->value = $store[$index];
-               if ( !is_scalar( $this->value ) ) {
-                       throw new MWException( __CLASS__ . ' given object instead of string' );
-               }
-               $this->store = $store;
-               $this->index = $index;
-       }
-
-       public function __toString() {
-               return htmlspecialchars( $this->value );
-       }
-
-       public function getNextSibling() {
-               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function getLength() {
-               return false;
-       }
-
-       public function item( $i ) {
-               return false;
-       }
-
-       public function getName() {
-               return '#text';
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Array implements PPNode {
-
-       public $value;
-
-       public function __construct( $value ) {
-               $this->value = $value;
-       }
-
-       public function __toString() {
-               return var_export( $this, true );
-       }
-
-       public function getLength() {
-               return count( $this->value );
-       }
-
-       public function item( $i ) {
-               return $this->value[$i];
-       }
-
-       public function getName() {
-               return '#nodelist';
-       }
-
-       public function getNextSibling() {
-               return false;
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
-
-/**
- * @ingroup Parser
- */
-// phpcs:ignore Squiz.Classes.ValidClassName.NotCamelCaps
-class PPNode_Hash_Attr implements PPNode {
-
-       public $name, $value;
-       private $store, $index;
-
-       /**
-        * Construct an object using the data from $store[$index]. The rest of the
-        * store array can be accessed via getNextSibling().
-        *
-        * @param array $store
-        * @param int $index
-        */
-       public function __construct( array $store, $index ) {
-               $descriptor = $store[$index];
-               if ( $descriptor[PPNode_Hash_Tree::NAME][0] !== '@' ) {
-                       throw new MWException( __METHOD__ . ': invalid name in attribute descriptor' );
-               }
-               $this->name = substr( $descriptor[PPNode_Hash_Tree::NAME], 1 );
-               $this->value = $descriptor[PPNode_Hash_Tree::CHILDREN][0];
-               $this->store = $store;
-               $this->index = $index;
-       }
-
-       public function __toString() {
-               return "<@{$this->name}>" . htmlspecialchars( $this->value ) . "</@{$this->name}>";
-       }
-
-       public function getName() {
-               return $this->name;
-       }
-
-       public function getNextSibling() {
-               return PPNode_Hash_Tree::factory( $this->store, $this->index + 1 );
-       }
-
-       public function getChildren() {
-               return false;
-       }
-
-       public function getFirstChild() {
-               return false;
-       }
-
-       public function getChildrenOfType( $name ) {
-               return false;
-       }
-
-       public function getLength() {
-               return false;
-       }
-
-       public function item( $i ) {
-               return false;
-       }
-
-       public function splitArg() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitExt() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-
-       public function splitHeading() {
-               throw new MWException( __METHOD__ . ': not supported' );
-       }
-}
index 6156766..b79a482 100644 (file)
@@ -1126,9 +1126,11 @@ class SpecialBlock extends FormSpecialPage {
                } elseif ( is_string( $target ) ) {
                        $target = User::newFromName( $target );
                }
-               if ( $performer->isBlocked() ) {
+               if ( $performer->getBlock() ) {
                        if ( $target instanceof User && $target->getId() == $performer->getId() ) {
                                # User is trying to unblock themselves
+                               // @TODO Ensure that the block does not apply to the `unblockself`
+                               //       right.
                                if ( $performer->isAllowed( 'unblockself' ) ) {
                                        return true;
                                        # User blocked themselves and is now trying to reverse it
index 08a7fde..99eefdd 100644 (file)
@@ -385,7 +385,7 @@ class SpecialContributions extends IncludableSpecialPage {
 
                if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( $username ) ) ) {
                        if ( $sp->getUser()->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
-                               if ( $target->isBlocked() && $target->getBlock()->getType() != Block::TYPE_AUTO ) {
+                               if ( $target->getBlock() && $target->getBlock()->getType() != Block::TYPE_AUTO ) {
                                        $tools['block'] = $linkRenderer->makeKnownLink( # Change block link
                                                SpecialPage::getTitleFor( 'Block', $username ),
                                                $sp->msg( 'change-blocklink' )->text()
index 5203807..ed398de 100644 (file)
@@ -68,8 +68,10 @@ class SpecialEditTags extends UnlistedSpecialPage {
                $request = $this->getRequest();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
index dd6fea7..682bceb 100644 (file)
@@ -123,8 +123,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage {
                $user = $this->getUser();
 
                // Check blocks
-               if ( $user->isBlocked() ) {
-                       throw new UserBlockedError( $user->getBlock() );
+               // @TODO Use PermissionManager::isBlockedFrom() instead.
+               $block = $user->getBlock();
+               if ( $block ) {
+                       throw new UserBlockedError( $block );
                }
 
                $this->setHeaders();
index 540754f..8655b1c 100644 (file)
@@ -61,15 +61,23 @@ class UserrightsPage extends SpecialPage {
                $isself = $this->getUser()->equals( $targetUser );
 
                $available = $this->changeableGroups();
-               if ( $targetUser->getId() == 0 ) {
+               if ( $targetUser->getId() === 0 ) {
                        return false;
                }
 
-               return !empty( $available['add'] )
-                       || !empty( $available['remove'] )
-                       || ( ( $isself || !$checkIfSelf ) &&
-                               ( !empty( $available['add-self'] )
-                                       || !empty( $available['remove-self'] ) ) );
+               if ( $available['add'] || $available['remove'] ) {
+                       // can change some rights for any user
+                       return true;
+               }
+
+               if ( ( $available['add-self'] || $available['remove-self'] )
+                       && ( $isself || !$checkIfSelf )
+               ) {
+                       // can change some rights for self
+                       return true;
+               }
+
+               return false;
        }
 
        /**
@@ -152,8 +160,13 @@ class UserrightsPage extends SpecialPage {
                        * (e.g. they don't have the userrights permission), then don't
                        * allow them to change any user rights.
                        */
-                       if ( $user->isBlocked() && !$user->isAllowed( 'userrights' ) ) {
-                               throw new UserBlockedError( $user->getBlock() );
+                       if ( !$user->isAllowed( 'userrights' ) ) {
+                               // @TODO Should the user be blocked from changing user rights if they
+                               //       are partially blocked?
+                               $block = $user->getBlock();
+                               if ( $block ) {
+                                       throw new UserBlockedError( $user->getBlock() );
+                               }
                        }
 
                        $this->checkReadOnly();
index 44ecb6f..a187a44 100644 (file)
@@ -103,6 +103,21 @@ class ContribsPager extends RangeChronologicalPager {
        private $templateParser;
 
        public function __construct( IContextSource $context, array $options ) {
+               // Set ->target and ->contribs before calling parent::__construct() so
+               // parent can call $this->getIndexField() and get the right result. Set
+               // the rest too just to keep things simple.
+               $this->target = $options['target'] ?? '';
+               $this->contribs = $options['contribs'] ?? 'users';
+               $this->namespace = $options['namespace'] ?? '';
+               $this->tagFilter = $options['tagfilter'] ?? false;
+               $this->nsInvert = $options['nsInvert'] ?? false;
+               $this->associated = $options['associated'] ?? false;
+
+               $this->deletedOnly = !empty( $options['deletedOnly'] );
+               $this->topOnly = !empty( $options['topOnly'] );
+               $this->newOnly = !empty( $options['newOnly'] );
+               $this->hideMinor = !empty( $options['hideMinor'] );
+
                parent::__construct( $context );
 
                $msgs = [
@@ -116,18 +131,6 @@ class ContribsPager extends RangeChronologicalPager {
                        $this->messages[$msg] = $this->msg( $msg )->escaped();
                }
 
-               $this->target = $options['target'] ?? '';
-               $this->contribs = $options['contribs'] ?? 'users';
-               $this->namespace = $options['namespace'] ?? '';
-               $this->tagFilter = $options['tagfilter'] ?? false;
-               $this->nsInvert = $options['nsInvert'] ?? false;
-               $this->associated = $options['associated'] ?? false;
-
-               $this->deletedOnly = !empty( $options['deletedOnly'] );
-               $this->topOnly = !empty( $options['topOnly'] );
-               $this->newOnly = !empty( $options['newOnly'] );
-               $this->hideMinor = !empty( $options['hideMinor'] );
-
                // Date filtering: use timestamp if available
                $startTimestamp = '';
                $endTimestamp = '';
@@ -235,6 +238,35 @@ class ContribsPager extends RangeChronologicalPager {
                return new FakeResultWrapper( $result );
        }
 
+       /**
+        * Return the table targeted for ordering and continuation
+        *
+        * See T200259 and T221380.
+        *
+        * @warning Keep this in sync with self::getQueryInfo()!
+        *
+        * @return string
+        */
+       private function getTargetTable() {
+               if ( $this->contribs == 'newbie' ) {
+                       return 'revision';
+               }
+
+               $user = User::newFromName( $this->target, false );
+               $ipRangeConds = $user->isAnon() ? $this->getIpRangeConds( $this->mDb, $this->target ) : null;
+               if ( $ipRangeConds ) {
+                       return 'ip_changes';
+               } else {
+                       $conds = ActorMigration::newMigration()->getWhere( $this->mDb, 'rev_user', $user );
+                       if ( isset( $conds['orconds']['actor'] ) ) {
+                               // @todo: This will need changing when revision_actor_temp goes away
+                               return 'revision_actor_temp';
+                       }
+               }
+
+               return 'revision';
+       }
+
        function getQueryInfo() {
                $revQuery = Revision::getQueryInfo( [ 'page', 'user' ] );
                $queryInfo = [
@@ -245,6 +277,8 @@ class ContribsPager extends RangeChronologicalPager {
                        'join_conds' => $revQuery['joins'],
                ];
 
+               // WARNING: Keep this in sync with getTargetTable()!
+
                if ( $this->contribs == 'newbie' ) {
                        $max = $this->mDb->selectField( 'user', 'max(user_id)', '', __METHOD__ );
                        $queryInfo['conds'][] = $revQuery['fields']['rev_user'] . ' >' . (int)( $max - $max / 100 );
@@ -273,22 +307,6 @@ class ContribsPager extends RangeChronologicalPager {
                        $ipRangeConds = $user->isAnon() ? $this->getIpRangeConds( $this->mDb, $this->target ) : null;
                        if ( $ipRangeConds ) {
                                $queryInfo['tables'][] = 'ip_changes';
-                               /**
-                                * These aliases make `ORDER BY rev_timestamp, rev_id` from {@see getIndexField} and
-                                * {@see getExtraSortFields} use the replicated `ipc_rev_timestamp` and `ipc_rev_id`
-                                * columns from the `ip_changes` table, for more efficient queries.
-                                * @see https://phabricator.wikimedia.org/T200259#4832318
-                                */
-                               $queryInfo['fields'] = array_merge(
-                                       [
-                                               'rev_timestamp' => 'ipc_rev_timestamp',
-                                               'rev_id' => 'ipc_rev_id',
-                                       ],
-                                       array_diff( $queryInfo['fields'], [
-                                               'rev_timestamp',
-                                               'rev_id',
-                                       ] )
-                               );
                                $queryInfo['join_conds']['ip_changes'] = [
                                        'LEFT JOIN', [ 'ipc_rev_id = rev_id' ]
                                ];
@@ -299,15 +317,8 @@ class ContribsPager extends RangeChronologicalPager {
                                $queryInfo['conds'][] = $conds['conds'];
                                // Force the appropriate index to avoid bad query plans (T189026)
                                if ( isset( $conds['orconds']['actor'] ) ) {
-                                       // @todo: This will need changing when revision_comment_temp goes away
+                                       // @todo: This will need changing when revision_actor_temp goes away
                                        $queryInfo['options']['USE INDEX']['temp_rev_user'] = 'actor_timestamp';
-                                       // Alias 'rev_timestamp' => 'revactor_timestamp' and 'rev_id' => 'revactor_rev' so
-                                       // "ORDER BY rev_timestamp, rev_id" is interpreted to use denormalized revision_actor_temp
-                                       // fields instead.
-                                       $queryInfo['fields'] = array_merge(
-                                               array_diff( $queryInfo['fields'], [ 'rev_timestamp', 'rev_id' ] ),
-                                               [ 'rev_timestamp' => 'revactor_timestamp', 'rev_id' => 'revactor_rev' ]
-                                       );
                                } else {
                                        $queryInfo['options']['USE INDEX']['revision'] =
                                                isset( $conds['orconds']['userid'] ) ? 'user_timestamp' : 'usertext_timestamp';
@@ -342,10 +353,10 @@ class ContribsPager extends RangeChronologicalPager {
                                ' != ' . Revision::SUPPRESSED_USER;
                }
 
-               // For IPv6, we use ipc_rev_timestamp on ip_changes as the index field,
-               // which will be referenced when parsing the results of a query.
-               if ( self::isQueryableRange( $this->target ) ) {
-                       $queryInfo['fields'][] = 'ipc_rev_timestamp';
+               // $this->getIndexField() must be in the result rows, as reallyDoQuery() tries to access it.
+               $indexField = $this->getIndexField();
+               if ( $indexField !== 'rev_timestamp' ) {
+                       $queryInfo['fields'][] = $indexField;
                }
 
                ChangeTags::modifyDisplayQuery(
@@ -431,8 +442,24 @@ class ContribsPager extends RangeChronologicalPager {
         * @return string
         */
        public function getIndexField() {
-               // Note this is run via parent::__construct() *before* $this->target is set!
-               return 'rev_timestamp';
+               // The returned column is used for sorting and continuation, so we need to
+               // make sure to use the right denormalized column depending on which table is
+               // being targeted by the query to avoid bad query plans.
+               // See T200259, T204669, T220991, and T221380.
+               $target = $this->getTargetTable();
+               switch ( $target ) {
+                       case 'revision':
+                               return 'rev_timestamp';
+                       case 'ip_changes':
+                               return 'ipc_rev_timestamp';
+                       case 'revision_actor_temp':
+                               return 'revactor_timestamp';
+                       default:
+                               wfWarn(
+                                       __METHOD__ . ": Unknown value '$target' from " . static::class . '::getTargetTable()', 0
+                               );
+                               return 'rev_timestamp';
+               }
        }
 
        /**
@@ -474,8 +501,24 @@ class ContribsPager extends RangeChronologicalPager {
         * @return string[]
         */
        protected function getExtraSortFields() {
-               // Note this is run via parent::__construct() *before* $this->target is set!
-               return [ 'rev_id' ];
+               // The returned columns are used for sorting, so we need to make sure
+               // to use the right denormalized column depending on which table is
+               // being targeted by the query to avoid bad query plans.
+               // See T200259, T204669, T220991, and T221380.
+               $target = $this->getTargetTable();
+               switch ( $target ) {
+                       case 'revision':
+                               return [ 'rev_id' ];
+                       case 'ip_changes':
+                               return [ 'ipc_rev_id' ];
+                       case 'revision_actor_temp':
+                               return [ 'revactor_rev' ];
+                       default:
+                               wfWarn(
+                                       __METHOD__ . ": Unknown value '$target' from " . static::class . '::getTargetTable()', 0
+                               );
+                               return [ 'rev_id' ];
+               }
        }
 
        protected function doBatchLookups() {
index ba6bb08..cdbbcc5 100644 (file)
@@ -1372,7 +1372,7 @@ class User implements IDBAccessObject, UserIdentity {
                $user = $session->getUser();
                if ( $user->isLoggedIn() ) {
                        $this->loadFromUserObject( $user );
-                       if ( $user->isBlocked() ) {
+                       if ( $user->getBlock() ) {
                                // If this user is autoblocked, set a cookie to track the Block. This has to be done on
                                // every session load, because an autoblocked editor might not edit again from the same
                                // IP address after being blocked.
@@ -1813,13 +1813,14 @@ class User implements IDBAccessObject, UserIdentity {
 
        /**
         * Get blocking information
+        *
+        * TODO: Move this into the BlockManager, along with block-related properties.
+        *
         * @param bool $fromReplica Whether to check the replica DB first.
         *   To improve performance, non-critical checks are done against replica DBs.
         *   Check when actually saving should be done against master.
         */
        private function getBlockedStatus( $fromReplica = true ) {
-               global $wgProxyWhitelist, $wgApplyIpBlocksToXff, $wgSoftBlockRanges;
-
                if ( $this->mBlockedby != -1 ) {
                        return;
                }
@@ -1833,79 +1834,10 @@ class User implements IDBAccessObject, UserIdentity {
                // overwriting mBlockedby, surely?
                $this->load();
 
-               # We only need to worry about passing the IP address to the Block generator if the
-               # user is not immune to autoblocks/hardblocks, and they are the current user so we
-               # know which IP address they're actually coming from
-               $ip = null;
-               $sessionUser = RequestContext::getMain()->getUser();
-               // the session user is set up towards the end of Setup.php. Until then,
-               // assume it's a logged-out user.
-               $globalUserName = $sessionUser->isSafeToLoad()
-                       ? $sessionUser->getName()
-                       : IP::sanitizeIP( $sessionUser->getRequest()->getIP() );
-               if ( $this->getName() === $globalUserName && !$this->isAllowed( 'ipblock-exempt' ) ) {
-                       $ip = $this->getRequest()->getIP();
-               }
-
-               // User/IP blocking
-               $block = Block::newFromTarget( $this, $ip, !$fromReplica );
-
-               // Cookie blocking
-               if ( !$block instanceof Block ) {
-                       $block = $this->getBlockFromCookieValue( $this->getRequest()->getCookie( 'BlockID' ) );
-               }
-
-               // Proxy blocking
-               if ( !$block instanceof Block && $ip !== null && !in_array( $ip, $wgProxyWhitelist ) ) {
-                       // Local list
-                       if ( self::isLocallyBlockedProxy( $ip ) ) {
-                               $block = new Block( [
-                                       'byText' => wfMessage( 'proxyblocker' )->text(),
-                                       'reason' => wfMessage( 'proxyblockreason' )->plain(),
-                                       'address' => $ip,
-                                       'systemBlock' => 'proxy',
-                               ] );
-                       } elseif ( $this->isAnon() && $this->isDnsBlacklisted( $ip ) ) {
-                               $block = new Block( [
-                                       'byText' => wfMessage( 'sorbs' )->text(),
-                                       'reason' => wfMessage( 'sorbsreason' )->plain(),
-                                       'address' => $ip,
-                                       'systemBlock' => 'dnsbl',
-                               ] );
-                       }
-               }
-
-               // (T25343) Apply IP blocks to the contents of XFF headers, if enabled
-               if ( !$block instanceof Block
-                       && $wgApplyIpBlocksToXff
-                       && $ip !== null
-                       && !in_array( $ip, $wgProxyWhitelist )
-               ) {
-                       $xff = $this->getRequest()->getHeader( 'X-Forwarded-For' );
-                       $xff = array_map( 'trim', explode( ',', $xff ) );
-                       $xff = array_diff( $xff, [ $ip ] );
-                       $xffblocks = Block::getBlocksForIPList( $xff, $this->isAnon(), !$fromReplica );
-                       $block = Block::chooseBlock( $xffblocks, $xff );
-                       if ( $block instanceof Block ) {
-                               # Mangle the reason to alert the user that the block
-                               # originated from matching the X-Forwarded-For header.
-                               $block->setReason( wfMessage( 'xffblockreason', $block->getReason() )->plain() );
-                       }
-               }
-
-               if ( !$block instanceof Block
-                       && $ip !== null
-                       && $this->isAnon()
-                       && IP::isInRanges( $ip, $wgSoftBlockRanges )
-               ) {
-                       $block = new Block( [
-                               'address' => $ip,
-                               'byText' => 'MediaWiki default',
-                               'reason' => wfMessage( 'softblockrangesreason', $ip )->plain(),
-                               'anonOnly' => true,
-                               'systemBlock' => 'wgSoftBlockRanges',
-                       ] );
-               }
+               $block = MediaWikiServices::getInstance()->getBlockManager()->getUserBlock(
+                       $this,
+                       $fromReplica
+               );
 
                if ( $block instanceof Block ) {
                        wfDebug( __METHOD__ . ": Found block.\n" );
@@ -1928,82 +1860,30 @@ class User implements IDBAccessObject, UserIdentity {
                Hooks::run( 'GetBlockedStatus', [ &$thisUser ] );
        }
 
-       /**
-        * Try to load a Block from an ID given in a cookie value.
-        * @param string|null $blockCookieVal The cookie value to check.
-        * @return Block|bool The Block object, or false if none could be loaded.
-        */
-       protected function getBlockFromCookieValue( $blockCookieVal ) {
-               // Make sure there's something to check. The cookie value must start with a number.
-               if ( strlen( $blockCookieVal ) < 1 || !is_numeric( substr( $blockCookieVal, 0, 1 ) ) ) {
-                       return false;
-               }
-               // Load the Block from the ID in the cookie.
-               $blockCookieId = Block::getIdFromCookieValue( $blockCookieVal );
-               if ( $blockCookieId !== null ) {
-                       // An ID was found in the cookie.
-                       $tmpBlock = Block::newFromID( $blockCookieId );
-                       if ( $tmpBlock instanceof Block ) {
-                               $config = RequestContext::getMain()->getConfig();
-
-                               switch ( $tmpBlock->getType() ) {
-                                       case Block::TYPE_USER:
-                                               $blockIsValid = !$tmpBlock->isExpired() && $tmpBlock->isAutoblocking();
-                                               $useBlockCookie = ( $config->get( 'CookieSetOnAutoblock' ) === true );
-                                               break;
-                                       case Block::TYPE_IP:
-                                       case Block::TYPE_RANGE:
-                                               // If block is type IP or IP range, load only if user is not logged in (T152462)
-                                               $blockIsValid = !$tmpBlock->isExpired() && !$this->isLoggedIn();
-                                               $useBlockCookie = ( $config->get( 'CookieSetOnIpBlock' ) === true );
-                                               break;
-                                       default:
-                                               $blockIsValid = false;
-                                               $useBlockCookie = false;
-                               }
-
-                               if ( $blockIsValid && $useBlockCookie ) {
-                                       // Use the block.
-                                       return $tmpBlock;
-                               }
-
-                               // If the block is not valid, remove the cookie.
-                               Block::clearCookie( $this->getRequest()->response() );
-                       } else {
-                               // If the block doesn't exist, remove the cookie.
-                               Block::clearCookie( $this->getRequest()->response() );
-                       }
-               }
-               return false;
-       }
-
        /**
         * Whether the given IP is in a DNS blacklist.
         *
+        * @deprecated since 1.34 Use BlockManager::isDnsBlacklisted.
         * @param string $ip IP to check
         * @param bool $checkWhitelist Whether to check the whitelist first
         * @return bool True if blacklisted.
         */
        public function isDnsBlacklisted( $ip, $checkWhitelist = false ) {
-               global $wgEnableDnsBlacklist, $wgDnsBlacklistUrls, $wgProxyWhitelist;
-
-               if ( !$wgEnableDnsBlacklist ||
-                       ( $checkWhitelist && in_array( $ip, $wgProxyWhitelist ) )
-               ) {
-                       return false;
-               }
-
-               return $this->inDnsBlacklist( $ip, $wgDnsBlacklistUrls );
+               return MediaWikiServices::getInstance()->getBlockManager()
+                       ->isDnsBlacklisted( $ip, $checkWhitelist );
        }
 
        /**
         * Whether the given IP is in a given DNS blacklist.
         *
+        * @deprecated since 1.34 Check via BlockManager::isDnsBlacklisted instead.
         * @param string $ip IP to check
         * @param string|array $bases Array of Strings: URL of the DNS blacklist
         * @return bool True if blacklisted.
         */
        public function inDnsBlacklist( $ip, $bases ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
                $found = false;
                // @todo FIXME: IPv6 ???  (https://bugs.php.net/bug.php?id=33170)
                if ( IP::isIPv4( $ip ) ) {
@@ -2045,11 +1925,13 @@ class User implements IDBAccessObject, UserIdentity {
        /**
         * Check if an IP address is in the local proxy list
         *
+        * @deprecated since 1.34 Use BlockManager::getUserBlock instead.
         * @param string $ip
-        *
         * @return bool
         */
        public static function isLocallyBlockedProxy( $ip ) {
+               wfDeprecated( __METHOD__, '1.34' );
+
                global $wgProxyList;
 
                if ( !$wgProxyList ) {
@@ -2262,6 +2144,10 @@ class User implements IDBAccessObject, UserIdentity {
        /**
         * Check if user is blocked
         *
+        * @deprecated since 1.34, use User::getBlock() or
+        *             PermissionManager::isBlockedFrom() or
+        *             PermissionManager::userCan() instead.
+        *
         * @param bool $fromReplica Whether to check the replica DB instead of
         *   the master. Hacked from false due to horrible probs on site.
         * @return bool True if blocked, false otherwise
@@ -3560,10 +3446,12 @@ class User implements IDBAccessObject, UserIdentity {
                        // $user->isAllowed(). It is also checked in Title::checkUserBlock()
                        // to give a better error message in the common case.
                        $config = RequestContext::getMain()->getConfig();
+                       // @TODO Partial blocks should not prevent the user from logging in.
+                       //       see: https://phabricator.wikimedia.org/T208895
                        if (
                                $this->isLoggedIn() &&
                                $config->get( 'BlockDisablesLogin' ) &&
-                               $this->isBlocked()
+                               $this->getBlock()
                        ) {
                                $anon = new User;
                                $this->mRights = array_intersect( $this->mRights, $anon->getRights() );
@@ -4197,7 +4085,7 @@ class User implements IDBAccessObject, UserIdentity {
                $newTouched = $this->newTouchedTimestamp();
 
                $dbw = wfGetDB( DB_MASTER );
-               $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $newTouched ) {
+               $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $newTouched ) {
                        global $wgActorTableSchemaMigrationStage;
 
                        $dbw->update( 'user',
@@ -4323,7 +4211,7 @@ class User implements IDBAccessObject, UserIdentity {
                        $fields["user_$name"] = $value;
                }
 
-               return $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $fields ) {
+               return $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $fields ) {
                        $dbw->insert( 'user', $fields, $fname, [ 'IGNORE' ] );
                        if ( $dbw->affectedRows() ) {
                                $newUser = self::newFromId( $dbw->insertId() );
@@ -4377,7 +4265,7 @@ class User implements IDBAccessObject, UserIdentity {
                $this->mTouched = $this->newTouchedTimestamp();
 
                $dbw = wfGetDB( DB_MASTER );
-               $status = $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) {
+               $status = $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) {
                        $noPass = PasswordFactory::newInvalidPassword()->toString();
                        $dbw->insert( 'user',
                                [
@@ -4453,7 +4341,7 @@ class User implements IDBAccessObject, UserIdentity {
         * @return bool A block was spread
         */
        public function spreadAnyEditBlock() {
-               if ( $this->isLoggedIn() && $this->isBlocked() ) {
+               if ( $this->isLoggedIn() && $this->getBlock() ) {
                        return $this->spreadBlock();
                }
 
@@ -5155,68 +5043,6 @@ class User implements IDBAccessObject, UserIdentity {
                return $wgImplicitGroups;
        }
 
-       /**
-        * Get the title of a page describing a particular group
-        * @deprecated since 1.29 Use UserGroupMembership::getGroupPage instead
-        *
-        * @param string $group Internal group name
-        * @return Title|bool Title of the page if it exists, false otherwise
-        */
-       public static function getGroupPage( $group ) {
-               wfDeprecated( __METHOD__, '1.29' );
-               return UserGroupMembership::getGroupPage( $group );
-       }
-
-       /**
-        * Create a link to the group in HTML, if available;
-        * else return the group name.
-        * @deprecated since 1.29 Use UserGroupMembership::getLink instead, or
-        * make the link yourself if you need custom text
-        *
-        * @param string $group Internal name of the group
-        * @param string $text The text of the link
-        * @return string HTML link to the group
-        */
-       public static function makeGroupLinkHTML( $group, $text = '' ) {
-               wfDeprecated( __METHOD__, '1.29' );
-
-               if ( $text == '' ) {
-                       $text = UserGroupMembership::getGroupName( $group );
-               }
-               $title = UserGroupMembership::getGroupPage( $group );
-               if ( $title ) {
-                       return MediaWikiServices::getInstance()
-                               ->getLinkRenderer()->makeLink( $title, $text );
-               }
-
-               return htmlspecialchars( $text );
-       }
-
-       /**
-        * Create a link to the group in Wikitext, if available;
-        * else return the group name.
-        * @deprecated since 1.29 Use UserGroupMembership::getLink instead, or
-        * make the link yourself if you need custom text
-        *
-        * @param string $group Internal name of the group
-        * @param string $text The text of the link
-        * @return string Wikilink to the group
-        */
-       public static function makeGroupLinkWiki( $group, $text = '' ) {
-               wfDeprecated( __METHOD__, '1.29' );
-
-               if ( $text == '' ) {
-                       $text = UserGroupMembership::getGroupName( $group );
-               }
-               $title = UserGroupMembership::getGroupPage( $group );
-               if ( $title ) {
-                       $page = $title->getFullText();
-                       return "[[$page|$text]]";
-               }
-
-               return $text;
-       }
-
        /**
         * Returns an array of the groups that a particular group can add/remove.
         *
index c0da2d1..e44d766 100644 (file)
@@ -327,6 +327,7 @@ class Names {
                'nn' => 'norsk nynorsk', # Norwegian (Nynorsk)
                'no' => 'norsk', # Norwegian macro language (falls back to nb).
                'nov' => 'Novial', # Novial
+               'nqo' => 'ߒߞߏ', # N'Ko
                'nrm' => 'Nouormand', # Norman (invalid code; 'nrf' in ISO 639 since 2014)
                'nso' => 'Sesotho sa Leboa', # Northern Sotho
                'nv' => 'Diné bizaad', # Navajo
index 0240f85..e05b7a7 100644 (file)
@@ -2681,6 +2681,7 @@ public static $zh2Hant = [
 '𡭜' => '𡮉',
 '𡭬' => '𡮣',
 '𡶴' => '嵼',
+'𢀖' => '巠',
 '𢋈' => '㢝',
 '𢘝' => '𢣚',
 '𢘞' => '𢣭',
@@ -3703,7 +3704,6 @@ public static $zh2Hant = [
 '于小彤' => '于小彤',
 '于小惠' => '于小惠',
 '于少保' => '于少保',
-'于山' => '于山',
 '于山国' => '于山國',
 '于山國' => '于山國',
 '于帅' => '于帥',
@@ -3769,7 +3769,6 @@ public static $zh2Hant = [
 '于洪区' => '于洪區',
 '于洪區' => '于洪區',
 '于浩威' => '于浩威',
-'于海' => '于海',
 '于湘兰' => '于湘蘭',
 '于湘蘭' => '于湘蘭',
 '于汉超' => '于漢超',
@@ -3833,8 +3832,6 @@ public static $zh2Hant = [
 '于韦斯屈莱' => '于韋斯屈萊',
 '于風政' => '于風政',
 '于风政' => '于風政',
-'于飛' => '于飛',
-'于飞' => '于飛',
 '于余曲折' => '于餘曲折',
 '于鬯' => '于鬯',
 '于魁智' => '于魁智',
@@ -4267,7 +4264,6 @@ public static $zh2Hant = [
 '刮胡' => '刮鬍',
 '到山里' => '到山裡',
 '制冷机' => '制冷機',
-'制签' => '制籤',
 '制钟' => '制鐘',
 '刻半钟' => '刻半鐘',
 '刻多钟' => '刻多鐘',
@@ -4322,7 +4318,6 @@ public static $zh2Hant = [
 '勾心斗角' => '勾心鬥角',
 '勾魂荡魄' => '勾魂蕩魄',
 '包干' => '包幹',
-'包括' => '包括',
 '包准' => '包準',
 '包谷' => '包穀',
 '包扎' => '包紮',
@@ -4880,7 +4875,6 @@ public static $zh2Hant = [
 '好斗膽' => '好斗膽',
 '好斗蓬' => '好斗蓬',
 '好困' => '好睏',
-'好签' => '好籤',
 '好丑' => '好醜',
 '好斗' => '好鬥',
 '如果干' => '如果幹',
@@ -5656,7 +5650,7 @@ public static $zh2Hant = [
 '抑制' => '抑制',
 '抑郁' => '抑鬱',
 '抓奸' => '抓姦',
-'抓斗' => '抓',
+'抓斗' => '抓',
 '抗御' => '抗禦',
 '折子戏' => '折子戲',
 '折子戲' => '折子戲',
@@ -5828,9 +5822,9 @@ public static $zh2Hant = [
 '采种' => '採種',
 '采空区' => '採空區',
 '采空采穗' => '採空採穗',
-'采納' => '採納',
 '采纳' => '採納',
 '采给' => '採給',
+'采编' => '採編',
 '采花' => '採花',
 '采芹人' => '採芹人',
 '采茶' => '採茶',
@@ -5867,7 +5861,6 @@ public static $zh2Hant = [
 '提心吊胆' => '提心弔膽',
 '提摩太后书' => '提摩太後書',
 '提高后' => '提高後',
-'换签' => '換籤',
 '换只' => '換隻',
 '握发' => '握髮',
 '揩干' => '揩乾',
@@ -5996,13 +5989,6 @@ public static $zh2Hant = [
 '方便面' => '方便麵',
 '方向' => '方向',
 '方法里' => '方法裡',
-'于山东' => '於山東',
-'于山西' => '於山西',
-'于海上' => '於海上',
-'于海平面' => '於海平面',
-'于海拔' => '於海拔',
-'于海洋' => '於海洋',
-'于海边' => '於海邊',
 '于震中' => '於震中',
 '于震前' => '於震前',
 '于震后' => '於震後',
@@ -6071,7 +6057,9 @@ public static $zh2Hant = [
 '晒谷' => '曬穀',
 '曰云' => '曰云',
 '更仆难数' => '更僕難數',
-'更签' => '更籤',
+'更钟情' => '更鍾情',
+'更钟意' => '更鍾意',
+'更钟爱' => '更鍾愛',
 '更钟' => '更鐘',
 '书签' => '書籤',
 '书面' => '書面',
@@ -6135,6 +6123,7 @@ public static $zh2Hant = [
 '本庄' => '本庄',
 '本征' => '本徵',
 '本出戏' => '本齣戲',
+'术忽' => '朮忽',
 '术虎高' => '朮虎高',
 '术赤' => '朮赤',
 '朱庆余' => '朱慶餘',
@@ -6786,7 +6775,6 @@ public static $zh2Hant = [
 '田里' => '田裡',
 '田里穗' => '田里穗',
 '由余' => '由余',
-'由于' => '由於',
 '甲胄' => '甲冑',
 '甲后路' => '甲后路',
 '男仆' => '男僕',
@@ -6903,8 +6891,6 @@ public static $zh2Hant = [
 '盼复' => '盼覆',
 '看法里' => '看法裡',
 '看准' => '看準',
-'看表面' => '看表面',
-'看表' => '看錶',
 '看钟' => '看鐘',
 '真凶' => '真兇',
 '真个' => '真箇',
@@ -7164,7 +7150,6 @@ public static $zh2Hant = [
 '米团' => '米糰',
 '米余' => '米餘',
 '米面' => '米麵',
-'粉签子' => '粉籤子',
 '粗制' => '粗製',
 '精制伏' => '精制伏',
 '精制住' => '精制住',
@@ -8391,6 +8376,7 @@ public static $zh2Hant = [
 '鄉愿' => '鄉愿',
 '郑凯云' => '鄭凱云',
 '鄭凱云' => '鄭凱云',
+'郑苹如' => '鄭蘋如',
 '配制饲料' => '配制飼料',
 '配图里' => '配圖裡',
 '配制' => '配製',
@@ -8875,8 +8861,6 @@ public static $zh2Hant = [
 '风范' => '風範',
 '风里' => '風裡',
 '风起云涌' => '風起雲湧',
-'風采' => '風采',
-'风采' => '風采',
 '风刮' => '風颳',
 '台风' => '颱風',
 '台风后' => '颱風後',
@@ -9306,6 +9290,8 @@ public static $zh2Hant = [
 '鳥栖' => '鳥栖',
 '鳥栖市' => '鳥栖市',
 '鸟栖市' => '鳥栖市',
+'凤凰于飞' => '鳳凰于飛',
+'鳳凰于飛' => '鳳凰于飛',
 '凤梨干' => '鳳梨乾',
 '鸣钟' => '鳴鐘',
 '鸿范' => '鴻範',
@@ -10083,6 +10069,7 @@ public static $zh2Hans = [
 '巖' => '岩',
 '巗' => '岩',
 '巘' => '𪩘',
+'巠' => '𢀖',
 '巰' => '巯',
 '巵' => '卮',
 '帀' => '匝',
@@ -13981,6 +13968,7 @@ public static $zh2Hans = [
 '近角聪信' => '近角聪信',
 '造麴' => '造曲',
 '遺著' => '遗著',
+'鄭蘋如' => '郑苹如',
 '郭子乾' => '郭子乾',
 '酒麴' => '酒曲',
 '醉瀋' => '醉渖',
@@ -14299,7 +14287,6 @@ public static $zh2TW = [
 '机床' => '工具機',
 '機床' => '工具機',
 '珍寶客機' => '巨無霸客機',
-'发达国家' => '已開發國家',
 '巴塞罗那' => '巴塞隆納',
 '巴塞隆拿' => '巴塞隆納',
 '巴士拉' => '巴斯拉',
@@ -14402,6 +14389,7 @@ public static $zh2TW = [
 '旱烟' => '旱菸',
 '旱煙' => '旱菸',
 '普利策' => '普利茲',
+'普利策奖' => '普立茲獎',
 '芯片' => '晶片',
 '智能卡' => '智慧卡',
 '智能手机' => '智慧型手機',
@@ -14456,7 +14444,7 @@ public static $zh2TW = [
 '毛里裘斯' => '模里西斯',
 '樸茨茅夫' => '樸茨茅斯',
 '機械人' => '機器人',
-'率' => '機率',
+'率' => '機率',
 '電單車' => '機車',
 '枱' => '檯',
 '字段' => '欄位',
@@ -14498,7 +14486,8 @@ public static $zh2TW = [
 '熏肉' => '燻肉',
 '熏黑' => '燻黑',
 '版权信息' => '版權資訊',
-'疯牛症' => '狂牛症',
+'疯牛病' => '狂牛症',
+'瘋牛症' => '狂牛症',
 '鐵托' => '狄托',
 '铁托' => '狄托',
 '塞拉利昂' => '獅子山',
@@ -14550,6 +14539,7 @@ public static $zh2TW = [
 '私煙' => '私菸',
 '程序员' => '程式設計師',
 '编程语言' => '程式語言',
+'空中客车' => '空中巴士',
 '空气质量' => '空氣品質',
 '空氣質素' => '空氣品質',
 '突尼斯' => '突尼西亞',
@@ -14938,6 +14928,7 @@ public static $zh2HK = [
 '網際網路' => '互聯網',
 '井里' => '井裏',
 '亮著' => '亮着',
+'亮著《' => '亮著《',
 '亮著作' => '亮著作',
 '亮著名' => '亮著名',
 '亮著書' => '亮著書',
@@ -15235,6 +15226,7 @@ public static $zh2HK = [
 '保障著述' => '保障著述',
 '保障著錄' => '保障著錄',
 '信著' => '信着',
+'信著《' => '信著《',
 '信著作' => '信著作',
 '信著名' => '信著名',
 '信著書' => '信著書',
@@ -15305,6 +15297,7 @@ public static $zh2HK = [
 '凶殺' => '兇殺',
 '先占' => '先佔',
 '光著' => '光着',
+'光著《' => '光著《',
 '光著作' => '光著作',
 '光著名' => '光著名',
 '光著書' => '光著書',
@@ -15406,6 +15399,7 @@ public static $zh2HK = [
 '喀拉蚩' => '卡拉奇',
 '卡斯楚' => '卡斯特羅',
 '印著' => '印着',
+'印著《' => '印著《',
 '印著作' => '印著作',
 '印著名' => '印著名',
 '印著書' => '印著書',
@@ -15629,6 +15623,7 @@ public static $zh2HK = [
 '夢有五不占' => '夢有五不占',
 '梦有五不占' => '夢有五不占',
 '夢著' => '夢着',
+'夢著《' => '夢著《',
 '夢著作' => '夢著作',
 '夢著名' => '夢著名',
 '夢著書' => '夢著書',
@@ -15684,6 +15679,7 @@ public static $zh2HK = [
 '安地卡' => '安提瓜',
 '安地卡及巴布達' => '安提瓜和巴布達',
 '定著' => '定着',
+'定著《' => '定著《',
 '定著作' => '定著作',
 '定著名' => '定著名',
 '定著書' => '定著書',
@@ -15739,6 +15735,7 @@ public static $zh2HK = [
 '局里' => '局裏',
 '屋里' => '屋裏',
 '展著' => '展着',
+'展著《' => '展著《',
 '展著作' => '展著作',
 '展著名' => '展著名',
 '展著書' => '展著書',
@@ -15850,6 +15847,7 @@ public static $zh2HK = [
 '德勒斯登' => '德累斯頓',
 '澈底' => '徹底',
 '心著' => '心着',
+'心著《' => '心著《',
 '心著作' => '心著作',
 '心著名' => '心著名',
 '心著書' => '心著書',
@@ -15942,6 +15940,7 @@ public static $zh2HK = [
 '應著述' => '應著述',
 '應著錄' => '應著錄',
 '懷著' => '懷着',
+'懷著《' => '懷著《',
 '懷著作' => '懷著作',
 '懷著名' => '懷著名',
 '懷著書' => '懷著書',
@@ -16281,6 +16280,7 @@ public static $zh2HK = [
 '晃著者' => '晃著者',
 '晃著述' => '晃著述',
 '晃著錄' => '晃著錄',
+'普利策奖' => '普立茲獎',
 '晶元' => '晶片',
 '芯片' => '晶片',
 '智慧型' => '智能',
@@ -16395,6 +16395,7 @@ public static $zh2HK = [
 '榴莲' => '榴槤',
 '榴蓮' => '榴槤',
 '樂著' => '樂着',
+'樂著《' => '樂著《',
 '樂著作' => '樂著作',
 '樂著名' => '樂著名',
 '樂著書' => '樂著書',
@@ -16736,6 +16737,7 @@ public static $zh2HK = [
 '疑著述' => '疑著述',
 '疑著錄' => '疑著錄',
 '狂牛症' => '瘋牛症',
+'疯牛病' => '瘋牛症',
 '丹帕沙' => '登巴薩',
 '发布' => '發佈',
 '發布' => '發佈',
@@ -16747,6 +16749,7 @@ public static $zh2HK = [
 '發著者' => '發著者',
 '白里透红' => '白裏透紅',
 '戈登·布朗' => '白高敦',
+'百慕大' => '百慕達',
 '百科里' => '百科裏',
 '的图里' => '的圖裏',
 '的山里' => '的山裏',
@@ -16893,6 +16896,7 @@ public static $zh2HK = [
 '穩占' => '穩佔',
 '穫著' => '穫着',
 '空中布雷' => '空中佈雷',
+'空中客车' => '空中巴士',
 '空投布雷' => '空投佈雷',
 '空气质量' => '空氣質素',
 '空氣品質' => '空氣質素',
@@ -17902,14 +17906,6 @@ public static $zh2HK = [
 '牛轧' => '鳥結',
 '鳩占' => '鳩佔',
 '鸠占' => '鳩佔',
-'麗著' => '麗着',
-'麗著作' => '麗著作',
-'麗著名' => '麗著名',
-'麗著書' => '麗著書',
-'麗著稱' => '麗著稱',
-'麗著者' => '麗著者',
-'麗著述' => '麗著述',
-'麗著錄' => '麗著錄',
 '麼著' => '麼着',
 '芮氏0' => '黎克特制0',
 '里氏0' => '黎克特制0',
@@ -17962,7 +17958,10 @@ public static $zh2CN = [
 '16進位制' => '16进位制',
 '16進位' => '16进制',
 'IP位址' => 'IP地址',
+'乙個' => '一个',
+'乙份' => '一份',
 '一份子' => '一分子',
+'乙隻' => '一只',
 '全球資訊網' => '万维网',
 '三十六著' => '三十六着',
 '三極體' => '三极管',
@@ -18026,17 +18025,10 @@ public static $zh2CN = [
 '為著者' => '为著者',
 '為著述' => '为著述',
 '主機板' => '主板',
-'麗著' => '丽着',
-'麗著書' => '丽著书',
-'麗著作' => '丽著作',
-'麗著名' => '丽著名',
-'麗著錄' => '丽著录',
-'麗著稱' => '丽著称',
-'麗著者' => '丽著者',
-'麗著述' => '丽著述',
 '麼著' => '么着',
 '烏龍麵' => '乌冬面',
 '樂著' => '乐着',
+'樂著《' => '乐著《',
 '樂著書' => '乐著书',
 '樂著作' => '乐著作',
 '樂著名' => '乐著名',
@@ -18078,6 +18070,7 @@ public static $zh2CN = [
 '雅穆索戈' => '亚穆苏克罗',
 '交帳' => '交账',
 '亮著' => '亮着',
+'亮著《' => '亮著《',
 '亮著書' => '亮著书',
 '亮著作' => '亮著作',
 '亮著名' => '亮著名',
@@ -18108,6 +18101,8 @@ public static $zh2CN = [
 '代表著者' => '代表著者',
 '代表著述' => '代表著述',
 '乙太網' => '以太网',
+'份外卖' => '份外卖',
+'份外,' => '份外,',
 '伊莉莎白' => '伊丽莎白',
 '伊利諾' => '伊利诺伊',
 '伊利諾伊' => '伊利诺伊',
@@ -18181,6 +18176,7 @@ public static $zh2CN = [
 '資訊時代' => '信息时代',
 '資訊理論' => '信息论',
 '信著' => '信着',
+'信著《' => '信著《',
 '信著書' => '信著书',
 '信著作' => '信著作',
 '信著名' => '信著名',
@@ -18228,6 +18224,7 @@ public static $zh2CN = [
 '偷著述' => '偷著述',
 '傅利葉' => '傅里叶',
 '光著' => '光着',
+'光著《' => '光著《',
 '光著書' => '光著书',
 '光著作' => '光著作',
 '光著名' => '光著名',
@@ -18303,6 +18300,7 @@ public static $zh2CN = [
 '涼著述' => '凉著述',
 '湊合著' => '凑合着',
 '幾內亞比索' => '几内亚比绍',
+'機率' => '几率',
 '憑著' => '凭着',
 '憑著作' => '凭著作',
 '憑著名' => '凭著名',
@@ -18395,6 +18393,7 @@ public static $zh2CN = [
 '羅浮宮' => '卢浮宫',
 '羅亞爾' => '卢瓦尔',
 '印著' => '印着',
+'印著《' => '印著《',
 '印著書' => '印著书',
 '印著作' => '印著作',
 '印著名' => '印著名',
@@ -18423,7 +18422,6 @@ public static $zh2CN = [
 '發著名' => '发著名',
 '發著稱' => '发著称',
 '發著者' => '发著者',
-'已開發國家' => '发达国家',
 '受著' => '受着',
 '受著書' => '受著书',
 '受著作' => '受著作',
@@ -18697,6 +18695,7 @@ public static $zh2CN = [
 '安地卡及巴布達' => '安提瓜和巴布达',
 '巨集' => '宏',
 '定著' => '定着',
+'定著《' => '定著《',
 '定著書' => '定著书',
 '定著作' => '定著作',
 '定著名' => '定著名',
@@ -18732,6 +18731,7 @@ public static $zh2CN = [
 '區域網' => '局域网',
 '區域網路' => '局域网络',
 '展著' => '展着',
+'展著《' => '展著《',
 '展著書' => '展著书',
 '展著作' => '展著作',
 '展著名' => '展著名',
@@ -18855,6 +18855,7 @@ public static $zh2CN = [
 '德勒斯登' => '德累斯顿',
 '德希達' => '德里达',
 '心著' => '心着',
+'心著《' => '心著《',
 '心著書' => '心著书',
 '心著作' => '心著作',
 '心著名' => '心著名',
@@ -18881,6 +18882,7 @@ public static $zh2CN = [
 '忙著述' => '忙著述',
 '忠貞著' => '忠贞着',
 '懷著' => '怀着',
+'懷著《' => '怀著《',
 '懷著書' => '怀著书',
 '懷著作' => '怀著作',
 '懷著名' => '怀著名',
@@ -19271,6 +19273,7 @@ public static $zh2CN = [
 '晃著者' => '晃著者',
 '晃著述' => '晃著述',
 '普利茲' => '普利策',
+'普立茲獎' => '普利策奖',
 '蒲美蓬' => '普密蓬',
 '蒲朗克' => '普朗克',
 '電晶體' => '晶体管',
@@ -19372,6 +19375,7 @@ public static $zh2CN = [
 '森巴舞' => '桑巴舞',
 '梅赫西迪' => '梅赛德斯',
 '夢著' => '梦着',
+'夢著《' => '梦著《',
 '夢著書' => '梦著书',
 '夢著作' => '梦著作',
 '夢著名' => '梦著名',
@@ -19631,6 +19635,7 @@ public static $zh2CN = [
 '疑著者' => '疑著者',
 '疑著述' => '疑著述',
 '狂牛症' => '疯牛病',
+'瘋牛症' => '疯牛病',
 '徵狀' => '症状',
 '丹帕沙' => '登巴萨',
 '百慕達' => '百慕大',
@@ -19825,6 +19830,7 @@ public static $zh2CN = [
 '磁碟' => '磁盘',
 '磁軌' => '磁道',
 '福馬林' => '福尔马林',
+'富比士' => '福布斯',
 '福著' => '福着',
 '福著書' => '福著书',
 '福著作' => '福著作',
index 50165f4..2995d00 100644 (file)
        "category-article-count": "{{PLURAL:$2|golongan puniki madue{{PLURAL:$1|$1 lembar}}, saking total $2.}}",
        "category-file-count": "{{PLURAL:$2|golongan puniki madue{{PLURAL:$1|$1 lembar}}, saking total $2.}}",
        "listingcontinuesabbrev": "samb.",
-       "noindex-category": "lembar sane nenten maindeks",
+       "noindex-category": "Lembar sane nenten maindeks",
+       "broken-file-category": "Suratan sane ngelah pranala usak",
        "about": "Indik",
        "newwindow": "(bukak ring jendela anyar)",
        "cancel": "Buwung",
        "nstab-help": "lembar pamitutlung",
        "nstab-category": "golongan",
        "mainpage-nstab": "Kaca Utama",
+       "nosuchspecialpage": "Ten wenten lembar spesial",
        "missing-article": "data utama nenten prasida nemu tulisan saking lembar sane sepatutne wenten, inggih punika  $1, $2\n\nindike puniki biasane keranayang olih pranala kaon nuju pabenahan sane dumun lembar sane sampun kaicalang\n\nyening nenten puniki sane ngranayang, ida dane minab sampun manggihin kaiwangang ring sajeroning piranti lunak.\nDurus sadokang indik puniki rin silih sinunggil anak \n\n[[Special:ListUsers/sysop|Pengurus]], antuk ngetik alamat URL sane katuju",
        "missingarticle-rev": "(pabenahan#:$1)",
        "badtitle": "murda sane nenten manut",
        "badtitletext": "Judul halaman sane katagih nenten patut, kosong, atau judul antarbahasa atau antarwiki yang salah sambung.\n\nmurda lembar sane kaarsa nenten sida kaedengang, kosong, utawi murda murda antarbasa utawi antarwiki sane iwang",
        "viewsource": "cingak witnyane",
+       "viewsourcetext": "Ida dane dados ningalin lan kopi sumber saking suratan puniki",
        "yourname": "pesengan penganggen",
+       "userlogin-yourname": "Penganggen",
+       "userlogin-yourname-ph": "Isi Kruna sandi ida dane",
        "yourpassword": "kruna sandi",
+       "userlogin-yourpassword": "Kruna sandi",
        "yourpasswordagain": "jumunin kruna sandi",
        "login": "Ngranjing log",
        "nav-login-createaccount": "malebu log / ngawe pepalihan",
        "createaccount": "ngajuang akun anyar",
        "mailmypassword": "nyumu ngaryanin kruna sandi",
        "loginlanguagelabel": "Basa: $1",
+       "pt-login": "Ngranjing log",
+       "pt-createaccount": "Ngajuang akun anyar",
+       "pt-userlogout": "Medal Log",
+       "passwordreset": "Nyumu kruna sandi",
        "bold_sample": "teks puniki mesurat tebel",
        "bold_tip": "teks puniki mesurat tebel",
        "italic_sample": "teks puniki masurat sendeh",
        "preview": "tayangan sadurungnyane",
        "showpreview": "cingak sane lintang",
        "showdiff": "cingak pagentosan",
-       "anoneditwarning": "\"Pingetan\" ida dané nénten kacatet ngranjing. Alamat IP ida dané jagi kacatet ring sejarah (indik sané dumunan) ring lembar puniki.",
+       "anoneditwarning": "<strong>Pingetan:</strong> Ida dané nénten kacatet ngranjing. Alamat IP ida dané jagi kacatet ring sejarah (indik sané dumunan) ring lembar puniki. Yening ida dane <strong>[$1 log in]</strong> utawi <strong>[$2 create an account]</strong>, your edits will be attributed to your username, along with other benefits.",
        "newarticle": "(Anyar)",
        "newarticletext": "ida dane ngiring pranala nuju lembar sane durung wenten. yening jagi ngaryanang lembar punika, ketik daging lembar ring kotak sane wenten ring beten puniki. (cingak [$1 lembar wantuan] anggen wacana salanturnyane). yening ida dane nenten nyelapang neked ring lembar puniki, klik tombol \"back\" ring \"penjelajah web\" ida dane.",
        "noarticletext": "mangkin nenten wenten teks ring lembar puniki. ida dane prasida [[Special:Search/{{PAGENAME}}|ngrereh murda nganggen lembar puniki]] ring lembar-lembar sane lianan, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} ngrereh log sane mapaiketan], utawi [{{fullurl:{{FULLPAGENAME}}|action=edit}} nguwah lembar puniki]</span>.",
        "permissionserrorstext-withaction": "ida dané nénten madué kuasa ngranjing anggén $2, riantukan {{PLURAL:$1|alasan}} ring sor puniki:",
        "recreate-moveddeleted-warn": "\"pingetan\" ida dane ngawe malih lembar sane naenin maapus.'''\n\nmangda kayunin malih napike pantes lanturang suntingan ida dane. puniki log pengapusan lan pangisidan saking lembar puniki:",
        "moveddeleted-notice": "lembar puniki sampun kaapus. anggen pewarah, puniki log pangapus lan pengisidan lembar puniki",
+       "content-model-wikitext": "tulisan wiki",
        "post-expand-template-inclusion-warning": "pinget: ukuran templat sane keanggen kalangkung ageng. wenten templat sane kacampahang",
        "post-expand-template-inclusion-category": "lembar sane maukuran templat sane nglangkungin wates",
        "post-expand-template-argument-warning": "\"peminget\" lembar puniki madaging kiranglangkungnyane siki argumen templat anggen ukuran ekspansi sane kaliwat ageng. argumen-argumen punika sampun kacampahang.",
        "viewpagelogs": "cingak log ring lembar puniki",
        "currentrev-asof": "pabecikan sane anyar ring pinanggal$1",
        "revisionasof": "ngabecikang per $1",
-       "revision-info": "panguwahan per $1;$2",
+       "revision-info": "Panguwahan per $1 olih {{GENDER:$6|$2}}$7",
        "previousrevision": "← pabenahan sane dumun",
        "nextrevision": "panguwahan salanturnyane→",
        "currentrevisionlink": "panguwahan mangkin",
        "cur": "mangkin",
        "last": "sadurung",
        "histlegend": "pilih kalih tombol radio lantur pecik tombol \"bandingang\" anggen ngebandingang indik lianan. klik siki tanggal anggen nyingak indik lianan lembar ring pinanggal punika.<br />(skr)= binanne saking indik lianan sane mangkin, (untat) = binanne saking indik lianan sane dumunan, '''k''' = panguwahan alit, '''b''' = panguwahan bot, → = panguwahan kepahan, ← = reringkesan otomatis",
-       "history-fieldset-title": "napakin versi sane dumunan",
+       "history-fieldset-title": "Nyaringin révisi",
        "history-show-deleted": "wantah sane kaapus",
        "histfirst": "pinih suwe",
        "histlast": "pinih anyar",
        "newuserlogpage": "log penganggo anyar",
        "action-edit": "benahang lembar puniki",
        "nchanges": "$1{{PLURAL:$1|panguwahan|uwah-uwahan}}",
+       "enhancedrc-history": "babad",
        "recentchanges": "pagentosan sane anyar",
        "recentchanges-legend": "pilihan panguwahan sane anyar",
        "recentchanges-feed-description": "molihang pagentosan anyar ring wiki ring \"umpan\" puniki",
        "recentchanges-label-minor": "niki panguwahan kidik",
        "recentchanges-label-bot": "penguwahan puniki kalaksanayang antuk bot",
        "recentchanges-label-unpatrolled": "panguwahan puniki durung kapatroli",
-       "rcnotefrom": "ring beten puniki inggih punika panguwahan saking <strong>$2</strong> (kaedengang ngantos <strong>$1</strong> panguwahan).",
+       "rcnotefrom": "Ring beten puniki inggih punika {{PLURAL:$5|panguwahan|panguwahan}} saking <strong>$3, $4</strong> (kaedengang ngantos <strong>$1</strong> panguwahan).",
        "rclistfrom": "edengang  penguwahan sane anyar wit saking $3 $2",
        "rcshowhideminor": "$1 uwahan kidik",
+       "rcshowhideminor-show": "Edengang",
+       "rcshowhideminor-hide": "Engkebang",
        "rcshowhidebots": "$1 bot",
+       "rcshowhidebots-show": "Edengang",
+       "rcshowhidebots-hide": "Engkebang",
        "rcshowhideliu": "$1 penganggo - penganggo terdaftar",
+       "rcshowhideliu-show": "Edengang",
+       "rcshowhideliu-hide": "engkebang",
        "rcshowhideanons": "$1 penganggo tan meadan",
+       "rcshowhideanons-show": "Edengang",
+       "rcshowhideanons-hide": "Engkebang",
        "rcshowhidepatr": "$1 suntingan sane kapatroli",
        "rcshowhidemine": "$1 uwahan titiang",
-       "rclinks": "edengang sane untat $1 gentosan anyar $2 dina kaping untat",
+       "rcshowhidemine-show": "Edengang",
+       "rcshowhidemine-hide": "Engkebang",
+       "rclinks": "Edengang untat $1 gentosan anyar $2 dina kaping untat",
        "diff": "bina",
        "hist": "kawentenan sane lian",
        "hide": "engkebang",
        "filedesc": "pacutetan",
        "license": "kepahan lugra",
        "license-header": "kepahan lugra",
+       "imgfile": "pupulan",
        "file-anchor-link": "pupulan",
        "filehist": "sejarah pupulan",
        "filehist-help": "klik ring pinanggal/galah anggen nyingakin pupulan niki rikala punika",
        "filehist-comment": "tureksa",
        "imagelinks": "penganggen berkas",
        "linkstoimage": "nyarengin {{PLURAL:$1|pranala|$1pranala}} ring pupulan puniki",
-       "nolinkstoimage": "nenten wenten lembar sane medue pranala ring pupulan puniki",
+       "nolinkstoimage": "Nenten wenten lembar sane medue pranala ring pupulan puniki",
        "sharedupload-desc-here": "pupulan puniki mawit saking $1 lan minab kaanggen olih proyek-proyek sane lianan. Deskripsi saking [$2 lebar deskripsinyane] kaarahin ring ungkur puniki",
        "randompage": "lembar acak",
        "statistics": "Statistik",
        "pager-older-n": "{{PLURAL:$1|1 lewih suwe|$1 lewih anyar}}",
        "booksources": "pawiwitan buku",
        "booksources-search-legend": "rereh ring sumber buku",
+       "booksources-search": "Rereh",
        "log": "log",
        "allpages": "samian lembar",
        "allarticles": "samian lembar",
        "rollbacklink": "mabalik",
        "protectlogpage": "log penyaga",
        "protectedarticle": "nyaga \"[[$1]]\"",
+       "protect-default": "Izinkan mekejang",
+       "restriction-edit": "Becikang",
        "undeletelink": "cingak/uliang",
        "undeleteviewlink": "cingak",
        "namespace": "Genah pesengan",
        "contributions": "kawigunan {{GENDER:$1|penganggo}}",
        "contributions-title": "Kontribusi pangangge anggen $1",
        "mycontris": "kawigunan",
+       "anoncontribs": "Kawigunan",
        "contribsub2": "antuk {{GENDER:$3|$1}} ($2)",
        "uctop": "sane mangkin",
        "month": "mawit saking sasih (lan sadurungnyane)",
        "sp-contributions-search": "rereh anggen kawigunanne",
        "sp-contributions-username": "Alamat IP utawi pesengan panganggo:",
        "sp-contributions-toponly": "tampilang wantah panguwahan sane anyar",
+       "sp-contributions-newonly": "Tampilang wantah panguwahan sane anyar",
        "sp-contributions-submit": "rereh",
        "whatlinkshere": "Pranala balik",
        "whatlinkshere-title": "lembar-lembar sane maduwe pranala kaping \"$1\"",
        "whatlinkshere-links": "← pranala",
        "whatlinkshere-hideredirs": "$1 pangalihan",
        "whatlinkshere-hidetrans": "$1 transklusi",
-       "whatlinkshere-hidelinks": "$1 Pranala",
+       "whatlinkshere-hidelinks": "$1 pranala",
        "whatlinkshere-hideimages": "$1 pranala pupulan",
        "whatlinkshere-filters": "Panyaring",
        "ipboptions": "2 jam:2 hours,1 dina:1 day,3 dina:3 days,1 minggu:1 week,2 minggu:2 weeks,1 sasih:1 month,3 sasih:3 months,6 sasih:6 months,1 taun:1 year,tanpa wates:infinite",
        "allmessagesdefault": "teks lingga",
        "thumbnail-more": "ngedenang",
        "thumbnail_error": "luput ngaryanin bentuk cenik $1",
-       "tooltip-pt-userpage": "lembar sane kaanggen ida dane",
-       "tooltip-pt-mytalk": "lembar wicara ida dane",
-       "tooltip-pt-preferences": "Preferensi titiang",
+       "tooltip-pt-userpage": "Lembar sane {{GENDER:|kaanggen ida dane}}",
+       "tooltip-pt-mytalk": "lembar wicara {{GENDER:|Ida dane}}",
+       "tooltip-pt-preferences": "Preferensi {{GENDER:|Ida dane}}",
        "tooltip-pt-watchlist": "kepahan-kepahan lembar sane katinjo titiang",
-       "tooltip-pt-mycontris": "kepahan-kepahan kawigunan ida dane",
+       "tooltip-pt-mycontris": "Kepahan-kepahan kawigunan {{GENDER:|Ida dane}}",
        "tooltip-pt-login": "ida dané kaaturang ngranjing log, nanging nénten kaswadarmayang",
        "tooltip-pt-logout": "medal saking Log",
        "tooltip-pt-createaccount": "ragané mangda makarya akun miwah ngranjing log: yadiastun nénten kawajibang",
        "tooltip-t-whatlinkshere": "kepahan sami lembar wiki sane maduwe pranala nuju lembar puniki",
        "tooltip-t-recentchangeslinked": "pagentosan sane anyar lembar-lembar sane maduwe pranala nuju lembar puniki",
        "tooltip-feed-atom": "\"atom feed\" anggen lembar puniki",
-       "tooltip-t-contributions": "cingak kepahan kawigunan penganggo niki",
-       "tooltip-t-emailuser": "kirim email majeng ring penganggo puniki",
+       "tooltip-t-contributions": "Daptar kepahan kawigunan {{GENDER:$1|penganggo niki}",
+       "tooltip-t-emailuser": "Ngirim surel majeng ring {{GENDER:$1|penganggo puniki}}",
        "tooltip-t-upload": "ngunggahang file",
        "tooltip-t-specialpages": "kepahan sami lembar istimewa",
        "tooltip-t-print": "kawentenan lian sane macetak ring lembar puniki",
        "tooltip-rollback": "\"nguliang\" muwungan jagi ngabecikang ring lembar puniki nuju haturan sane untat ngangge apisan klik",
        "tooltip-undo": "\"nguliang\" ngabuwungin jagi ngabecikang niki lan ngagah kotak mecikang ngangge mode pratayang. dasar ipun prasida kaimbuhin ring kotak pamicutet",
        "tooltip-summary": "ngalebuang silih sinunggil ringkesan",
+       "simpleantispam-label": "Pamariksa anti-spam.\nPuniki <strong>wenten</strong> kaisi!",
+       "pageinfo-header-edits": "Babad becikang",
+       "pageinfo-display-title": "Edengang judul",
+       "pageinfo-article-id": "ID Halaman",
+       "pageinfo-toolboxlink": "Katérangan lembar",
        "previousdiff": "← Benahin sadurungnyane",
        "nextdiff": "panguwahan sane pinih anyar →",
        "file-info-size": "$1x$2 piksel, ukuran pupulan: $3, tipe MIME:$4",
        "watchlisttools-view": "edengang panguwahan sane mapaiket",
        "watchlisttools-edit": "edengang lan uwahin kepangan paninjo",
        "watchlisttools-raw": "uwah kepahan paninjo mentah",
+       "signature": "[[{{ns:user}}:$1|$2]] ([[{{ns:user_talk}}:$1|wicara]])",
        "duplicate-defaultsort": "pingetan: sereg pangurutan lingga \"$2\" nyampahang sereg pangurutan lingga sadurunge \"$1\"",
        "specialpages": "lembar melulu",
        "external_image_whitelist": "#banggiang baris niki sapunapi kawentenanne<pre>\n#anggen fragmen akspresi reguler (wantah kepahan ring kekelaih//) ring sor puniki\n#fragmen-fragmen puniki jagi kaadungang sareng URL saking gambar-gambar eksternal (sane kasambungang langsung)\n#fragmen sane adung jagi katampilang dados gambar, sisanne wantah dados pranala kewanten\n#baris sane kakawitin antuk # jagi kadadosang baris komentar\n#niki nenten ngabinayang aksara ageng lan alit\n#genahang samian fragmen ekspresi reguler ring sor baris puniki. banggiang baris niki sapunapi kawentennane</pre>",
        "tag-filter": "filter [[Special:Tags|tag]]:",
        "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag}}]]: $2",
-       "logentry-newusers-create": "$1 {{GENDER:$2|makarya}} akun sané nuénang"
+       "tags-active-yes": "Inggih",
+       "logentry-newusers-create": "$1 {{GENDER:$2|makarya}} akun sané nuénang",
+       "searchsuggest-search": "Rereh ring {{SITENAME}}"
 }
index e9ee02a..1be4f19 100644 (file)
        "action-editsitecss": "рэдагаваньне агульнасайтавага CSS",
        "action-editsitejson": "рэдагаваньне агульнасайтавага JSON",
        "action-editsitejs": "рэдагаваньне агульнасайтавага JavaScript",
+       "action-editmyusercss": "рэдагаваньне вашых уласных CSS-файлаў",
+       "action-editmyuserjson": "рэдагаваньне вашых уласных JSON-файлаў",
+       "action-editmyuserjs": "рэдагаваньне вашых уласных JavaScript-файлаў",
+       "action-viewsuppressed": "прагляд вэрсіяў, схаваных ад усіх удзельнікаў",
        "nchanges": "$1 {{PLURAL:$1|зьмена|зьмены|зьменаў}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|з апошняга візыту}}",
        "enhancedrc-history": "гісторыя",
        "activeusers": "Сьпіс актыўных удзельнікаў",
        "activeusers-intro": "Гэта сьпіс удзельнікаў, якія былі актыўнымі на працягу $1 {{PLURAL:$1|апошняга дня|апошніх дзён|апошніх дзён}}.",
        "activeusers-count": "$1 {{PLURAL:$1|дзеяньне|дзеяньні|дзеяньняў}} за $3 {{PLURAL:$3|апошні дзень|апошнія дні|апошніх дзён}}",
-       "activeusers-from": "Ð\9fаказваÑ\86Ñ\8c Ñ\9eдзелÑ\8cнÑ\96каÑ\9e, Ð¿Ð°Ñ\87Ñ\8bнаÑ\8eÑ\87Ñ\8b Ð·:",
+       "activeusers-from": "Ð\9fаказваÑ\86Ñ\8c Ñ\83дзелÑ\8cнÑ\96каÑ\9e Ð°Ð´:",
        "activeusers-groups": "Паказаць удзельнікаў, якія належаць да групаў:",
        "activeusers-excludegroups": "Выключыць удзельнікаў, якія належаць да групаў:",
        "activeusers-noresult": "Удзельнікі ня знойдзеныя.",
index eed8e68..880db61 100644 (file)
@@ -90,6 +90,7 @@
        "tog-norollbackdiff": "Да не се показва разликата между редакциите след отмяна на редакции",
        "tog-useeditwarning": "Предупреждаване при опит за напускане на страница, отворена в режим на редактиране, без да са запазени промените",
        "tog-prefershttps": "Да се използва винаги защитена връзка при влизане",
+       "tog-showrollbackconfirmation": "Показване на диалогов прозорец за потвърждение при кликване върху препратката „Отмяна“",
        "underline-always": "Винаги",
        "underline-never": "Никога",
        "underline-default": "Според настройките на облика или браузъра",
        "histfirst": "най-стари",
        "histlast": "най-нови",
        "historysize": "({{PLURAL:$1|1 байт|$1 байта}})",
-       "historyempty": "(празна)",
+       "historyempty": "празнo",
        "history-feed-title": "Редакционна история",
        "history-feed-description": "Редакционна история на страницата в уикито",
        "history-feed-item-nocomment": "$1 в $2",
        "right-reupload-own": "Препокриване на съществуващ файл, качен от същия потребител",
        "right-reupload-shared": "Препокриване на едноименните файлове от общото мултимедийно хранилище с локални",
        "right-upload_by_url": "Качване на файл от URL адрес",
-       "right-purge": "Ð\98зÑ\87иÑ\81Ñ\82ване Ð½Ð° Ñ\81кладиÑ\80аноÑ\82о Ñ\81Ñ\8aдÑ\8aÑ\80жание Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86иÑ\82е Ð±ÐµÐ· Ð¿Ð¾ÐºÐ°Ð·Ð²Ð°Ð½Ðµ Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86а Ð·Ð° Ð¿Ð¾Ñ\82вÑ\8aÑ\80ждение",
+       "right-purge": "Ð\98зÑ\87иÑ\81Ñ\82ване Ð½Ð° Ñ\81кладиÑ\80аноÑ\82о Ñ\81Ñ\8aдÑ\8aÑ\80жание Ð½Ð° Ñ\81Ñ\82Ñ\80аниÑ\86аÑ\82а",
        "right-autoconfirmed": "Редактиране на полузащитени страници",
        "right-bot": "Третиране като автоматизиран процес",
        "right-nominornewtalk": "Малките промени по дискусионните страници не предизвикват известието за ново съобщение",
        "rcfilters-savedqueries-already-saved": "Тези филтри вече са съхранени. Променете настройките си, за да създадете нов Запазен филтър.",
        "rcfilters-restore-default-filters": "Възстановяване на филтрите по подразбиране",
        "rcfilters-clear-all-filters": "Изчистване на всички филтри",
-       "rcfilters-show-new-changes": "Преглед на най-новите промени",
+       "rcfilters-show-new-changes": "Преглед на най-новите промени от $1",
        "rcfilters-search-placeholder": "Филтриране на промените (използвайте менюто или търсете по име на филтър)",
        "rcfilters-invalid-filter": "Невалиден филтър",
        "rcfilters-empty-filter": "Няма активни филтри. Показани са всички редакции.",
        "delete-confirm": "Изтриване на „$1“",
        "delete-legend": "Изтриване",
        "historywarning": "<strong>Внимание:</strong> Страницата, която възнамерявате да изтриете, има история с приблизително $1 {{PLURAL:$1|редакция|редакции}}:",
-       "historyaction-submit": "Показване",
+       "historyaction-submit": "Показване на версии",
        "confirmdeletetext": "На път сте да изтриете страница заедно с цялата ѝ редакционна история.\nПотвърдете, че искате това, разбирате последствията и правите това в съответствие с [[{{MediaWiki:Policy-url}}|политиката]].",
        "actioncomplete": "Действието беше изпълнено",
        "actionfailed": "Действието не сполучи",
        "blocklist-editing-page": "страници",
        "blocklist-editing-ns": "именни пространства",
        "ipblocklist-empty": "Списъкът на блокиранията е празен.",
-       "ipblocklist-no-results": "УказаниÑ\8fÑ\82 IP-адÑ\80еÑ\81 Ð¸Ð»Ð¸ Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82ел Ð½Ðµ Ðµ Ð±Ð»Ð¾ÐºÐ¸Ñ\80ан.",
+       "ipblocklist-no-results": "Ð\9dе Ñ\81а Ð¾Ñ\82кÑ\80иÑ\82и Ñ\81Ñ\8aвпадаÑ\89и Ð±Ð»Ð¾ÐºÐ¸Ñ\80аниÑ\8f Ð·Ð° Ð¸Ð·Ð±Ñ\80аниÑ\8f IP-адÑ\80еÑ\81 Ð¸Ð»Ð¸ Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82ел.",
        "blocklink": "блокиране",
        "unblocklink": "отблокиране",
        "change-blocklink": "промяна на параметрите на блокирането",
index e8566f0..eaddbea 100644 (file)
        "moredotdotdot": "Lainnya...",
        "morenotlisted": "Salanjutnya...",
        "mypage": "Tungkaran ulun",
-       "mytalk": "Pamandiran ulun",
+       "mytalk": "Pamandiran",
        "anontalk": "Pamandiran hagan alamat IP ini",
        "navigation": "Napigasi",
        "and": "&#32;wan",
        "permalink": "Tautan tatap",
        "print": "Citak",
        "view": "Tiringi",
+       "view-foreign": "Lihat di $1",
        "edit": "Babak",
        "create": "Ulah",
+       "create-local": "Tambah pamaparan lukal",
        "delete": "Hapus",
        "undelete_short": "Walang mahapus {{PLURAL:$1|asa babakan|$1 bababakan}}",
        "viewdeleted_short": "Tiringi {{PLURAL:$1|asa babakan tahapus|$1 bababakan tahapus}}",
        "otherlanguages": "Dalam basa lain",
        "redirectedfrom": "(Diugahakan matan $1)",
        "redirectpagesub": "Tungkaran paugahan",
+       "redirectto": "Maugahakan ka:",
        "lastmodifiedat": "Tungkaran ngini pahabisnya diubah wayah $1, pukul $2.",
        "viewcount": "Tungkaran ini sudah diungkai {{PLURAL:$1|kali|$1 kali}}.",
        "protectedpage": "Tungkaran nang dilindungi",
        "nstab-template": "Citakan",
        "nstab-help": "Patulung",
        "nstab-category": "Tumbung",
+       "mainpage-nstab": "Tungkaran Tatambaian",
        "nosuchaction": "Kadada palakuan nangkaitu",
        "nosuchactiontext": "Tindakan nang diminta URL kada sah.\nPian tagasnya salah katik URL, atawa maumpati sabuting tautan nang kada bujur.\nNgini jua bisa ai ada bug di parangkat lunak nang dipuruk {{SITENAME}}.",
        "nosuchspecialpage": "Kadada tungkaran istimiwa nangitu",
        "welcomeuser": "Salamat datang,  $1 !",
        "welcomecreation-msg": "==Salamat datang, $1!==\nAkun Pian sudah diulah.\nJangan kada ingat hagan maubah [[Special:Preferences|kakatujuan {{SITENAME}}]] Pian.",
        "yourname": "Ngaran pamakai:",
+       "userlogin-yourname": "Ngaran pamakai",
+       "userlogin-yourname-ph": "Masukakan ngaran pamakai Pian",
        "yourpassword": "Katasunduk:",
+       "userlogin-yourpassword": "Kata sandi",
+       "createacct-yourpassword-ph": "Masukakan kata sandi",
        "yourpasswordagain": "Katik pulang katasunduk:",
+       "createacct-yourpasswordagain": "Konfirmasi kata sandi",
+       "createacct-yourpasswordagain-ph": "Masukakan pulang kata sandi",
        "yourdomainname": "Domain Pian:",
        "password-change-forbidden": "Pian kada kawa ma-ubah kata sunduk pada wiki ngini.",
        "externaldberror": "Ada kasalahan apakah kacucukan basis data atawa Pian kada bulih mamutakhirakan akun luar.",
        "userlogout": "Kaluar",
        "notloggedin": "Balum babuat log",
        "createaccount": "Ulah akun",
+       "createacct-emailoptional": "Alamat surél/email (bagusnya diisi)",
+       "createacct-email-ph": "Masukakan alamat email Pian",
        "createaccountmail": "Malalui suril",
+       "createacct-submit": "Ulah akun Pian",
+       "createacct-benefit-heading": "{{SITENAME}} diulah ulih urang-urang nangkaya Pian.",
+       "createacct-benefit-body1": "{{PLURAL:$1|babakan}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|tungkaran}}",
+       "createacct-benefit-body3": "{{PLURAL:$1|sumbangan}} pahabisnya",
        "badretype": "Katasunduk nang Pian buati kada pas.",
        "userexists": "Ngaran pamakai nang dibuati hudah dipuruk urang lain.\nMuhun pilih sabuting ngaran lain.",
        "loginerror": "Kasalahan babuat log",
        "suspicious-userlogout": "Pamintaan Pian hagan kaluar log kada ditarima marga nangkaya dikirim matan panjalajah web rakai atawa tatangkap proxy.",
        "pt-login": "Babuat log",
        "pt-createaccount": "Ulah akun",
+       "pt-userlogout": "Kaluar",
        "php-mail-error-unknown": "Kasalahan kada dipinandui dalam pungsi surat () PHP",
        "user-mail-no-addy": "Mancuba mangirim suril kada baalamat suril.",
        "user-mail-no-body": "Manarai hagan mangirim suril puang atawa talalu handap.",
        "preview": "Tilik",
        "showpreview": "Tampaiakan titilikan",
        "showdiff": "Tampaiakan paubahan",
-       "anoneditwarning": "'''Paringatan:''' Pian baluman babuat log.\nAlamat IP Pian akan dirakam dalam tungkaran babakan halam",
+       "anoneditwarning": "<strong>Paringatan:</strong> Pian kada masuk log. Alamat IP Pian akan talihat wan urang lain amun Pian handak maubah sasuatu. Amun Pian <strong>[$1 babuat log]</strong> atawa <strong>[$2 maulah akun]</strong>, babakan Pian akan diatribusiakan ka ngaran pamakai Pian, taumpat lawan babagai kauntungan lainnya.",
        "anonpreviewwarning": "''Pian baluman babuat log. Manyimpan akan tarakam alamat IP Pian pada sajarah bahari tungkaran ngini.''",
        "missingsummary": "'''Pangingat:''' Pian kada manyadiakan sabuting kasimpulan babakan.\nAmun Pian klik \"$1\" pulang, babakan Pian tasimpan kada bakasimpulan.",
        "missingcommenttext": "Muhun buati sabuting kumintar di bawah ngini.",
        "newarticle": "(Hanyar)",
        "newarticletext": "Pian maumpati sabuah tautan ka tungkaran nang baluman ada lagi. Gasan maulah tungkaran, mulai ja mangatik pada kutak di bawah (lihati [$1 tungkaran patulung] gasan panjalasan labih). Amun Pian ka sia cagaran tasalah, klik picikan '''back''' di panjalajah web Pian.",
        "anontalkpagetext": "----''Ngini adalah tungkaran pamandiran gasan pamakai kada bangaran nang baluman ma-ulah akun pulang, atawa  kada mamakainya. Kami tapaksa mamakai numurik alamat IP hagan maminanduinya.\nAlamat IP nangkaini kawaai dipuruk ulih babarapa pamakai.\nAmun Pian adalah pamuruk kada bangaran wan marasa kumin nang kada pas ta ka Pian, muhun [[Special:CreateAccount|ulah sabuah akun]] or [[Special:UserLogin|babuat log]] hagan mahindari kabingungan awan pamuruk kada bangaran lain kaina.",
-       "noarticletext": "Parhatan ni kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul ngini]] pintang tungkaran lain,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log barait].</span>,\natawa [{{fullurl:{{FULLPAGENAME}}|action=edit}} mambabak tungkaran ngini]</span>.",
-       "noarticletext-nopermission": "Parhatan ni kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul ngini]] pintang tungkaran lain,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log barait].</span>.",
+       "noarticletext": "Damini kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul tungkaran ngini]] di tutungkaran lain, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} mancari log tarait], atawa [{{fullurl:{{FULLPAGENAME}}|action=edit}} maulah tungkaran ngini]</span>.",
+       "noarticletext-nopermission": "!Damini kadada naskah di tungkaran ngini.\nPian kawa [[Special:Search/{{PAGENAME}}|manggagai gasan judul tungkaran ngini]] di tutungkaran lain, atawa <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} manggagai log tarait]</span>, tagal Pian kada baisi ijin gasan maulah tungkaran ngini",
        "userpage-userdoesnotexist": "Akun pamakai \"<nowiki>$1</nowiki>\" kada tadaptar.\nMuhun pariksa/ditukui amun Pian handak maulah/mambabak tungkaran ngini.",
        "userpage-userdoesnotexist-view": "Akun pamakai \"$1\" kada tadaptar.",
        "blocked-notice-logextract": "Pamakai nangini parhatan diblukir.\nLog blukir pahabisannya tasadia di bawah ngini gasan rujukan:",
        "revertmerge": "Walang panggabungan",
        "mergelogpagetext": "Di bawah adalah daptar nang paling hanyar panggabungan matan sabuah tungkaran halam ka dalam nang lain.",
        "history-title": "Ralatan halam matan ''$1''",
+       "difference-title": "$1: Pabidaan ralatan",
        "difference-multipage": "(Nang balain antar tungkaran-tungkaran)",
        "lineno": "Baris $1:",
        "compareselectedversions": "Tandingakan ralatan nang dipilih",
        "showhideselectedversions": "Tampaiakan/sungkupakan ralatan-ralatan",
        "editundo": "walangi",
+       "diff-empty": "(Kadada bida)",
        "diff-multi-manyusers": "({{PLURAL:$1|Asa ralatan tangah|$1 raralatan tangah}} ulih labih pada $2 {{PLURAL:$2|pamuruk|papamuruk}} kada ditampaiakan)",
        "searchresults": "Kulihan panggagaian",
        "searchresults-title": "Kulihan gagai gasan \"$1\"",
        "shown-title": "Tampaiakan $1 {{PLURAL:$1|kulihan|kukulihan}} par tungkatan",
        "viewprevnext": "Tiringi ($1 {{int:pipe-separator}} $2) ($3)",
        "searchmenu-exists": "'''Ada tungkaran bangaran \"[[:$1]]\" dalam wiki ini.'''",
-       "searchmenu-new": "'''Maulah tungkaran \"[[:$1]]\" dalam wiki ngini!'''",
+       "searchmenu-new": "<strong>Ulah tungkaran \"[[:$1]]\" di wiki ini!</strong> {{PLURAL:$2|0=|Tiringi jua tungkaran nang didapatakan matan panggagaian Pian.|Tiringi jua hasil panggagaian nang didapatakan.}}",
        "searchprofile-articles": "Tungkaran isi",
        "searchprofile-images": "Multimadia",
        "searchprofile-everything": "Samunyaan",
        "searchprofile-advanced-tooltip": "Panggagaian pada ragam ngaran kakamar",
        "search-result-size": "$1 ({{PLURAL:$2|1 ujar|$2 uujar}})",
        "search-result-category-size": "{{PLURAL:$1|1 angguta|$1 aangguta}} ({{PLURAL:$2|1 subtumbung|$2 subtutumbung}}, {{PLURAL:$3|1 barakas|$3 babarakas}})",
-       "search-redirect": "(Paugahan $1)",
+       "search-redirect": "(Diugahakan matan $1)",
        "search-section": "(hagian $1)",
        "search-suggest": "Nginikah maksud Pian: $1",
        "search-interwiki-caption": "Dingsanak rangka gawian",
        "searchrelated": "bakulaan",
        "searchall": "samunyaan",
        "showingresults": "Di bawah ngini ditampaiakan hingga {{PLURAL:$1|'''1''' kulihan|'''$1''' kukulihan}}, dimulai matan #'''$2'''.",
+       "search-showingresults": "{{PLURAL:$4|Hasil <strong>$1</strong> matan <strong>$3</strong>|Hasil <strong>$1 - $2</strong> matan <strong>$3</strong>}}",
        "search-nonefound": "Kadada kulihan nang pas awan parmintaan.",
        "powersearch-legend": "Panggagaian mahir",
        "powersearch-ns": "Manggagai di ngaran kamar:",
        "search-external": "Panggagaian luar",
        "searchdisabled": "{{SITENAME}} panggagaian kada kawa\nPian kawa manggagai lung Google parhatan ini.\nCatatan nang dihaharnya matan isi {{SITENAME}} kawa-ai sudah kadaluarsa.",
        "preferences": "Kakatujuan",
-       "mypreferences": "Nang ulun katuju",
+       "mypreferences": "Kakatujuan",
        "prefs-edits": "Rikinan babakan-babakan:",
        "prefs-skin": "Kulimbit",
        "skin-preview": "Titilikan",
        "action-siteadmin": "sunduk atawa bukasunduk basisdata",
        "action-sendemail": "Kirim suril",
        "nchanges": "$1 {{PLURAL:$1|paubahan|paubahan}}",
+       "enhancedrc-history": "sajarah",
        "recentchanges": "Paubahan pahanyarnya",
        "recentchanges-legend": "Pilihan paubahan pahanyarnya",
        "recentchanges-summary": "Jajak paubahan wiki pahanyarnya pada tungkaran ngini",
        "recentchanges-label-minor": "Ngini sabuting babakan sapalih",
        "recentchanges-label-bot": "Babakan ngini digawi ulih saikung bot",
        "recentchanges-label-unpatrolled": "Babakan ngini baluman ta'awasi",
-       "recentchanges-legend-newpage": "$1 - tungkaran puga",
+       "recentchanges-label-plusminus": "Paubahan ukuran tungkaran dalam bita",
+       "recentchanges-legend-heading": "<strong>Katarangan:</strong>",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (tiringi jua [[Special:NewPages|daptar tungkaran hanyar]])",
        "rcnotefrom": "Di bawah ngini paubahan tumatan '''$2''' (ditampaiakan sampai '''$1''' paubahan)",
        "rclistfrom": "Tampaiakan paubahan pahanyarnya matan $3 $2",
        "rcshowhideminor": "$1 pambabakan sapalih",
+       "rcshowhideminor-hide": "Sungkupakan",
        "rcshowhidebots": "$1 bot",
-       "rcshowhideliu": "$1 pamakai nang babuat di log",
+       "rcshowhidebots-show": "Tampaiakan",
+       "rcshowhideliu": "$1 pamakai tadaptar",
+       "rcshowhideliu-hide": "Sungkupakan",
        "rcshowhideanons": "$1 pamakai kada bangaran",
+       "rcshowhideanons-hide": "Sungkupakan",
        "rcshowhidepatr": "$1 babakan ta'awasi",
        "rcshowhidemine": "$1 babakan ulun",
+       "rcshowhidemine-hide": "Sungkupakan",
        "rclinks": "Tampaiakan $1 paubahan pahanyarnya dalam $2 hari tauncit",
        "diff": "bida",
        "hist": "halam",
        "recentchangeslinked-feed": "Paubahan tarait",
        "recentchangeslinked-toolbox": "Paubahan tarait",
        "recentchangeslinked-title": "Paubahan nang tarait lawan \"$1\"",
-       "recentchangeslinked-summary": "Ngini sabuting daptar paubahan nang diulah hahanyar ngini pada tungkaran batautan matan sabuting tungkaran tartantu (atawa ka angguta matan sabuah tumbung tartantu).\nTutungkaran dalam [[Special:Watchlist|daptar itihan Pian]] ditandai '''kandal'''.",
+       "recentchangeslinked-summary": "Masukakan ngaran tungkaran gasan malihat paubahan pada halaman tapaut matan atawa ka tungkaran itu (amun handak malihat angguta sabuting tumbung, masukakan Tumbung:Ngaran tumbung). Paubahan pada [[Special:Watchlist|daptar itihan Pian]] talihat <strong>dicitak kandal</strong>.",
        "recentchangeslinked-page": "Ngaran tungkaran:",
        "recentchangeslinked-to": "Tampaiakan paubahan matan tutungkaran nang bataut lawan tungkaran nang disurungakan",
        "upload": "Hunggahakan barakas",
        "filehist-filesize": "Ukuran barakas",
        "filehist-comment": "Ulasan",
        "imagelinks": "Tautan barakas",
-       "linkstoimage": "{{PLURAL:$1|tautan tungkaran|$1 tautan tungkaran}} dudi ka barakas ngini:",
+       "linkstoimage": "{{PLURAL:$1|Tungkaran|$1 tungkaran}} nangini mamakai barakas ngini:",
        "linkstoimage-more": "Labihan pada $1 {{PLURAL:$1|tatautan tungkaran|tautan tutungkaran}} ka barakas ngini.\nDaptar barikut manampaiakan {{PLURAL:$1|tautan panambaian tungkaran|$1 panambaian tatautan tungkaran}} ka barakas ngini haja.\nSabuah [[Special:WhatLinksHere/$2|daptar hibak]] tasadia.",
-       "nolinkstoimage": "Kadada tutungkaran nang bataut ka barakas ngini.",
+       "nolinkstoimage": "Kadada tutungkaran nang mamakai barakas ngini.",
        "morelinkstoimage": "Tiringi [[Special:WhatLinksHere/$1|tautan lagi]] ka barakas ngini.",
        "linkstoimage-redirect": "$1 (barakas paugahan) $2",
        "duplicatesoffile": "Barikut {{PLURAL:$1|barakas panggandaan|$1 babarakas panggandaan}} matan barakas ngini ([[Special:FileDuplicateSearch/$2|rarincian labih]]):",
        "uploadnewversion-linktext": "Buatakan bantuk nang labih hanyar matan barakas ini",
        "shared-repo-from": "matan $1",
        "shared-repo": "suatu repositori basama",
+       "upload-disallowed-here": "Pian kada kawa manimpa barakas ngini.",
        "filerevert": "Bulikakan $1",
        "filerevert-legend": "Bulikakan barakas",
        "filerevert-intro": "Pian mambulikakan '''[[Media:$1|$1]]''' ka macam [$4 pada $3, $2].",
        "usermessage-summary": "Tinggalakan sistim pasan.",
        "usermessage-editor": " Sistim panyampai pasan",
        "watchlist": "Daptar itihan ulun",
-       "mywatchlist": "Daptar itihan ulun",
+       "mywatchlist": "Daptar itihan",
        "watchlistfor2": "Gasan $1 $2",
        "nowatchlist": "Pian kada baisi apa pun pada daptar itihan Pian.",
        "watchlistanontext": "Muhun $1 hagan maniringi atawa mambabak nang dalam daptar itihan Pian.",
        "namespace_association": "Ruang-ngaran tarait",
        "tooltip-namespace_association": "Pariksa kutak ngini hagan maumpatakan jua ruang-ngaran pamandiran atawa judul tarait awan ruang-ngaran tapilih",
        "blanknamespace": "(Tatambaian)",
-       "contributions": "Sumbangan pamakai",
+       "contributions": "Sumbangan {{GENDER:$1|pamakai}}",
        "contributions-title": "Sumbangan pamakai gasan $1",
-       "mycontris": "Sumbangan ulun",
+       "mycontris": "Sumbangan",
+       "anoncontribs": "Sumbangan",
        "contribsub2": "Gasan $1 ($2)",
        "nocontribs": "Kadada paubahan nang rasuk lawan syarat itu.",
        "uctop": " atas",
        "import-logentry-upload-detail": "$1 {{PLURAL:$1|ralatan|raralatan}}",
        "import-logentry-interwiki-detail": "$1 {{PLURAL:$1|ralatan|raralatan}} matan $2",
        "javascripttest": "Mantis JavaScript",
-       "tooltip-pt-userpage": "Tungkaran pamakai Pian",
+       "tooltip-pt-userpage": "Tungkaran {{GENDER:|pamakai Pian}}",
        "tooltip-pt-anonuserpage": "Tungkaran pamuruk matan alamat IP Pian mambabak sawagai",
-       "tooltip-pt-mytalk": "Tungkaran pamandiran Pian",
+       "tooltip-pt-mytalk": "Tungkaran {{GENDER:|pamandiran Pian}}",
        "tooltip-pt-anontalk": "Pamandiran pasal bababakan matan alamat IP ngini",
-       "tooltip-pt-preferences": "Nang Pian katuju",
+       "tooltip-pt-preferences": "Kakatujuan {{GENDER:|Pian}}",
        "tooltip-pt-watchlist": "Daptar tungkaran-tungkaran nang Pian itihi paubahannya",
-       "tooltip-pt-mycontris": "Daptar sumbangan Pian",
+       "tooltip-pt-mycontris": "Daptar sumbangan {{GENDER:|Pian}}",
        "tooltip-pt-login": "Pian sabaiknya babuat ka dalam log; tagal ngini kada kawajiban pang",
        "tooltip-pt-logout": "Kaluar",
        "tooltip-pt-createaccount": "Pian dianjurakan gasan maulah akun wan babuat log; walau, hal itu kada wajib",
        "tooltip-t-recentchangeslinked": "Paubahan pahanyarnya dalam tutungkaran tataut matan tungkaran ngini",
        "tooltip-feed-rss": "Kitihan RSS gasan tungkaran ini",
        "tooltip-feed-atom": "Kitihan Atum gasan tungkaran ngini",
-       "tooltip-t-contributions": "Sabuah daptar sumbangan pamakai ngini",
+       "tooltip-t-contributions": "Daptar sumbangan {{GENDER:$1|pamakai ngini}}",
        "tooltip-t-emailuser": "Kirimi surel ka pamakai ini",
        "tooltip-t-upload": "Hunggahakan babarakas",
        "tooltip-t-specialpages": "Daptar samunyaan tungkaran istimiwa",
        "spam_reverting": "Mambulikakan ka ralatan tauncit nang kada mangandung tatautan ka $1",
        "spam_blanking": "Samunyaan raralatan mangandung tatautan ka $1, dikusungakan",
        "spam_deleting": "Samunyaan raralatan nang isinya tatautan ka $1, dipuangakan",
+       "simpleantispam-label": "Pamariksaan anti-spam.\n<strong>Jangan</strong> diisi!",
        "pageinfo-title": "Panjalasan gasan ''$1''",
        "pageinfo-not-current": "Maaf, kada mungkin mambariakan maklumat ngini ka ralatan lawas.",
        "pageinfo-header-basic": "Maklumat pandal",
        "file-info-size-pages": "$1 × $2 piksal, takaran barakas: $3, macam MIME: $4, $5 {{PLURAL:$5|tungkaran|tutungkaran}}",
        "file-nohires": "Kadada tasadia resolusi tapancau.",
        "svg-long-desc": "Barakas SVG, nominal $1 × $2 piksel, basar barakas: $3",
-       "show-big-image": "Ukuran hibak",
+       "show-big-image": "Ukuran asli",
        "show-big-image-preview": "Takaran tilikan ngini: $1.",
        "show-big-image-other": "{{PLURAL:$2|Risulusi|Risulusi}} lain: $1.",
        "show-big-image-size": "$1 × $2 piksal",
        "version-software-product": "Produk",
        "version-software-version": "Virsi",
        "version-entrypoints-header-url": "URL",
+       "redirect-submit": "Lanjut",
+       "redirect-lookup": "Panggagaian:",
+       "redirect-value": "Nilai:",
+       "redirect-user": "ID pamakai",
+       "redirect-page": "ID Tungkaran",
+       "redirect-revision": "Ralatan tungkaran",
+       "redirect-file": "Ngaran barakas",
        "fileduplicatesearch": "Gagai gasan babarakas baganda",
        "fileduplicatesearch-summary": "Gagai gasan babarakas baganda bapandal nilai hash.",
        "fileduplicatesearch-filename": "Ngaran barakas:",
        "tags": "Tag paubahan sah",
        "tag-filter": "Saringan [[Special:Tags|Tag]]:",
        "tag-filter-submit": "Saringan",
+       "tag-list-wrapper": "[[Special:Tags|{{PLURAL:$1|Tag}}]]: $2",
        "tags-title": "Gantungan",
        "tags-intro": "Tungkaran ngini mandaptar gantungan nang diciri-i parangkat lunak sabuah babakan, wan artinya.",
        "tags-tag": "Gantungan ngaran",
        "htmlform-submit": "Kirim",
        "htmlform-reset": "Walangi paubahan",
        "htmlform-selectorother-other": "Lain-lain",
-       "logentry-delete-delete": "$1 mahapus tungkaran $3",
+       "logentry-delete-delete": "$1 {{GENDER:$2|mahapus}} tungkaran $3",
        "logentry-delete-restore": "$1 dibulikakan tungkaran $3",
        "logentry-delete-event": "$1 mangganti kakawaan dijanaki {{PLURAL:$5|sabuah log kajadian|$5 log kajadian}} pintangan $3: $4",
        "logentry-delete-revision": "$1 mangganti kakawaan dijanaki {{PLURAL:$5|sabuah ralatan|$5 ralatan}} pintangan tungkaran $3: $4",
index 46e79de..751c80c 100644 (file)
@@ -82,7 +82,7 @@
        "tog-watchlisthidecategorization": "পাতার শ্রেণীবদ্ধকরণ লুকিয়ে রাখা হোক",
        "tog-ccmeonemails": "অন্য ব্যবহারকারীর কাছে আমার পাঠানো ইমেইলের একটি প্রতিলিপি আমাকে পাঠানো হোক",
        "tog-diffonly": "পার্থক্যের নিচে পাতার বিষয়বস্তু না দেখানো হোক",
-       "tog-showhiddencats": "লà§\81à¦\95ায়িত à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80সমà§\82হ à¦¦à§\87à¦\96ানà§\8b à¦¹à§\8bà¦\95",
+       "tog-showhiddencats": "লà§\81à¦\95ানà§\8b à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80সমà§\82হ à¦¦à§\87à¦\96ান",
        "tog-norollbackdiff": "রোলব্যাকের পরে সংস্করণগুলির পার্থক্য না দেখানো হোক",
        "tog-useeditwarning": "কোনো সম্পাদনা পাতা ত্যাগের সময় পরিবর্তনগুলি সংরক্ষিত না হয়ে থাকলে আমাকে সাবধান করা হোক",
        "tog-prefershttps": "অ্যাকাউন্টে প্রবেশ করার সময় সবসময় নিরাপদ সংযোগ ব্যবহার করুন",
        "subcategories": "উপবিষয়শ্রেণীসমূহ",
        "category-media-header": "\"$1\" বিষয়শ্রেণীতে অন্তর্ভুক্ত মিডিয়া ফাইলগুলি",
        "category-empty": "<em>এই বিষয়শ্রণীতে বর্তমানে কোন পাতা বা মিডিয়া ফাইল নেই।</em>",
-       "hidden-categories": "{{PLURAL:$1|লà§\81à¦\95ায়িত বিষয়শ্রেণী}}",
-       "hidden-category-category": "লà§\81à¦\95ায়িত বিষয়শ্রেণীসমূহ",
+       "hidden-categories": "{{PLURAL:$1|লà§\81à¦\95ানà§\8b বিষয়শ্রেণী}}",
+       "hidden-category-category": "লà§\81à¦\95ানà§\8b বিষয়শ্রেণীসমূহ",
        "category-subcat-count": "{{PLURAL:$2|এই বিষয়শ্রেণীতে কেবলমাত্র নিচের উপবিষয়শ্রেণীটি আছে।|এই বিষয়শ্রেণীতে অন্তর্ভুক্ত মোট $2টি উপবিষয়শ্রেণীর মধ্যে {{PLURAL:$1|$1টি উপবিষয়শ্রেণী}} নিচে দেখানো হয়েছে।}}",
        "category-subcat-count-limited": "এই বিষয়শ্রেণীতে নিচের {{PLURAL:$1|উপবিষয়শ্রেণী|$1টি উপবিষয়শ্রেণী}} আছে।",
        "category-article-count": "{{PLURAL:$2|এই বিষয়শ্রেণীতে কেবল নিচের পাতাটি আছে।|এই বিষয়শ্রেণীতে অন্তর্ভুক্ত মোট $2টি পাতার মধ্যে {{PLURAL:$1|$1টি পাতা}} নিচে দেখানো হল।}}",
        "templatesusedsection": "এই অনুচ্ছেদে ব্যবহৃত {{PLURAL:$1|টেমপ্লেট|টেমপ্লেটসমূহ}}:",
        "template-protected": "(সুরক্ষিত)",
        "template-semiprotected": "(অর্ধ-সুরক্ষিত)",
-       "hiddencategories": "à¦\8fà¦\87 à¦ªà¦¾à¦¤à¦¾à¦\9fি {{PLURAL:$1|১à¦\9fি à¦²à§\81à¦\95ায়িত à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80র|$1à¦\9fি à¦²à§\81à¦\95ায়িত বিষয়শ্রেণীর}} সদস্য:",
+       "hiddencategories": "à¦\8fà¦\87 à¦ªà¦¾à¦¤à¦¾à¦\9fি {{PLURAL:$1|১à¦\9fি à¦²à§\81à¦\95ানà§\8b à¦¬à¦¿à¦·à¦¯à¦¼à¦¶à§\8dরà§\87ণà§\80র|$1à¦\9fি à¦²à§\81à¦\95ানà§\8b বিষয়শ্রেণীর}} সদস্য:",
        "edittools": "<!-- সম্পাদনা এবং আপলোড ফরমের নীচে এখানের লেখা দেখানো হবে। -->",
        "edittools-upload": "-",
        "nocreatetext": "{{SITENAME}}-এ নতুন পাতা সৃষ্টি করার ক্ষমতা সীমাবদ্ধ করা হয়েছে।\nআপনি ফিরে গিয়ে ইতিমধ্যে বিদ্যমান কোন পাতা সম্পাদনা করতে পারেন, অথবা [[Special:UserLogin|অ্যাকাউন্টে প্রবেশ কিংবা অ্যাকাউন্ট সৃষ্টি করতে পারেন]]।",
        "undo-norev": "সম্পাদনাটি বাতিল করা যাচ্ছেনা কারণ এটি আর নেই বা মুছে ফেলা হয়েছে।",
        "undo-nochange": "সম্পাদনাটি পূর্বেই বাতিল করা হয়েছে।",
        "undo-summary": "[[Special:Contributions/$2|$2]] ([[User talk:$2|আলাপ]])-এর সম্পাদিত $1 নম্বর সংশোধনটি বাতিল করা হয়েছে",
-       "undo-summary-username-hidden": "à¦\8fà¦\95à¦\9cন à¦²à§\81à¦\95ায়িত ব্যবহারকারীর করা $1 নং সংশোধনটি বাতিল করা হয়েছে",
+       "undo-summary-username-hidden": "à¦\8fà¦\95à¦\9cন à¦²à§\81à¦\95ানà§\8b ব্যবহারকারীর করা $1 নং সংশোধনটি বাতিল করা হয়েছে",
        "cantcreateaccount-text": "[[User:$3|$3]] এই আইপি ঠিকানা('''$1''') থেকে অ্যাকাউন্ট সৃষ্টিতে বাধা দিয়েছেন।\n\n$3-এর দেয়া কারণ হল ''$2''",
        "cantcreateaccount-range-text": "[[User:$3|$3]] কর্তৃক আইপি ঠিকানার ব্যাপ্তি <strong>$1</strong>-এর মধ্যে অ্যাকাউন্ট তৈরি করা অবরুদ্ধ করা হয়েছে। যাতে আপনার আইপি ঠিকানাও (<strong>$4</strong>) রয়েছে। \n\n$3 কর্তৃক <em>$2</em> কারণ দেখানো হয়েছে।",
        "viewpagelogs": "এই পাতার জন্য লগগুলো দেখুন",
        "revdelete-hide-user": "সম্পাদকের ব্যবহারকারী নাম/আইপি ঠিকানা",
        "revdelete-hide-restricted": "প্রশাসকবৃন্দ এবং অন্যদের ক্ষেত্রে এই ডাটা রোধ করো",
        "revdelete-radio-same": "(পরিবর্তন করবেন না)",
-       "revdelete-radio-set": "লà§\81à¦\95ায়িত",
+       "revdelete-radio-set": "লà§\81à¦\95ানà§\8b",
        "revdelete-radio-unset": "দৃশ্যমান",
        "revdelete-suppress": "সব প্রশাসক ও অন্যান্যদের কাছ থেকে উপাত্ত লুকিয়ে রাখা হোক।",
        "revdelete-unsuppress": "সংশোধন পুনঃস্থাপনের উপর সীমাবদ্ধতা দূর করো",
        "right-browsearchive": "অপসারিত পাতা অনুসন্ধান করো",
        "right-undelete": "পাতাটি পুনরুদ্ধার করুন",
        "right-suppressrevision": "যেকোন ব্যবহারকারী থেকে পাতার নির্দিষ্ট সংশোধন দেখুন, লুকিয়ে  রাখুন এবং প্রকাশ্যে আনুন",
-       "right-viewsuppressed": "যà§\87à¦\95à§\8bন à¦¬à§\8dযবহারà¦\95ারà§\80র à¦\95াà¦\9b à¦¥à§\87à¦\95à§\87 à¦²à§\81à¦\95ায়িত সংস্করণগুলি দেখুন",
+       "right-viewsuppressed": "যà§\87à¦\95à§\8bন à¦¬à§\8dযবহারà¦\95ারà§\80র à¦\95াà¦\9b à¦¥à§\87à¦\95à§\87 à¦²à§\81à¦\95ানà§\8b সংস্করণগুলি দেখুন",
        "right-suppressionlog": "ব্যক্তিগত লগ দেখাও",
        "right-block": "সম্পাদনা করতে কোনো ব্যবহারকারীকে বাঁধা দাও",
        "right-blockemail": "ই-মেইল পাঠাতে কোনো ব্যবহারকারীকে বাঁধা দাও",
        "action-changetags": "নির্দিষ্ট সংস্করণ এবং লগ ভুক্তিগুলিতে যথেচ্ছভাবে ট্যাগ সংযোজন ও অপসারণ করা",
        "action-deletechangetags": "ডাটাবেজ থেকে ট্যাগ অপসরণ করার",
        "action-purge": "এই পাতাটি শোধন করুন",
+       "action-editprotected": "\"{{int:protect-level-sysop}}\" হিসেবে সুরক্ষিত পাতা সম্পাদনা করার",
+       "action-editsemiprotected": "\"{{int:protect-level-autoconfirmed}}\" হিসেবে সুরক্ষিত পাতা সম্পাদনা করার",
+       "action-editsitecss": "সাইটব্যাপী CSS সম্পাদনা করার",
+       "action-editsitejson": "সাইটব্যাপী JSON সম্পাদনা করার",
+       "action-editsitejs": "সাইটব্যাপী জাভাস্ক্রিপ্ট সম্পাদনা করার",
+       "action-editmyusercss": "স্ব ব্যবহারকারীর CSS ফাইল সম্পাদনা করার",
+       "action-unblockself": "নিজেকে বাধামুক্ত করার",
        "nchanges": "$1টি {{PLURAL:$1|পরিবর্তন}}",
        "enhancedrc-since-last-visit": "{{PLURAL:$1|সর্বশেষ প্রদর্শনের পর}} $1টি",
        "enhancedrc-history": "ইতিহাস",
        "block-log-flags-noemail": "ই-মেইলে বাধা আছে",
        "block-log-flags-nousertalk": "নিজের আলাপের পাতা সম্পাদনা করতে পারবে না",
        "block-log-flags-angry-autoblock": "উন্নত অটোব্লক সক্রিয়",
-       "block-log-flags-hiddenname": "ব্যবহারকারীনাম লুকায়িত",
+       "block-log-flags-hiddenname": "ব্যবহারকারী নাম লুক্কায়িত",
        "range_block_disabled": "প্রশাসকের পক্ষে আইপি ঠিকানার শ্রেণী বাধাদানের ক্ষমতা নিষ্ক্রিয় আছে।",
        "ipb_expiry_invalid": "মেয়াদোত্তীর্ণকাল অবৈধ।",
        "ipb_expiry_old": "মেয়াদোত্তীর্ণের সময় অতীত হয়েছে।",
        "metadata-help": "এই ফাইলে অতিরিক্ত কিছু তথ্য আছে। সম্ভবত যে ডিজিটাল ক্যামেরা বা স্ক্যানারের মাধ্যমে এটি তৈরি বা ডিজিটায়িত করা হয়েছিল, সেটি কর্তৃক তথ্যগুলি যুক্ত হয়েছে। যদি ফাইলটি তার আদি অবস্থা থেকে পরিবর্তিত হয়ে থাকে, কিছু কিছু বিবরণ পরিবর্তিত ফাইলটির জন্য প্রযোজ্য না-ও হতে পারে।",
        "metadata-expand": "সম্প্রসারিত সবিস্তারে দেখাও",
        "metadata-collapse": "সম্প্রসারিত বিবরণ দেখান",
-       "metadata-fields": "à¦\8fà¦\87 à¦¬à¦¾à¦°à§\8dতায় à¦¤à¦¾à¦²à¦¿à¦\95াভà§\81à¦\95à§\8dত à¦\9aিতà§\8dর à¦®à§\87à¦\9fাডাà¦\9fা à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦\9bবির à¦ªà¦¾à¦¤à¦¾à¦¯à¦¼ à¦ªà§\8dরদরà§\8dশন à¦\95রা à¦¹à¦¬à§\87, à¦¯à¦\96ন à¦®à§\87à¦\9fাডাà¦\9fা à¦¸à¦¾à¦°à¦£à¦¿à¦\9fি à¦¸à¦\82à¦\95à§\81à¦\9aিত à¦\95রা à¦¹à¦¬à§\87। à¦\85নà§\8dয à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦¸à§\8dবাভাবিà¦\95 à¦\85বসà§\8dথায় à¦²à§\81à¦\95ায়িত থাকবে।\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
+       "metadata-fields": "à¦\8fà¦\87 à¦¬à¦¾à¦°à§\8dতায় à¦¤à¦¾à¦²à¦¿à¦\95াভà§\81à¦\95à§\8dত à¦\9aিতà§\8dর à¦®à§\87à¦\9fাডাà¦\9fা à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦\9bবির à¦ªà¦¾à¦¤à¦¾à¦¯à¦¼ à¦ªà§\8dরদরà§\8dশন à¦\95রা à¦¹à¦¬à§\87, à¦¯à¦\96ন à¦®à§\87à¦\9fাডাà¦\9fা à¦¸à¦¾à¦°à¦£à¦¿à¦\9fি à¦¸à¦\82à¦\95à§\81à¦\9aিত à¦\95রা à¦¹à¦¬à§\87। à¦\85নà§\8dয à¦\95à§\8dষà§\87তà§\8dরà¦\97à§\81লি à¦¸à§\8dবাভাবিà¦\95 à¦\85বসà§\8dথায় à¦²à§\81à¦\95ানà§\8b থাকবে।\n* make\n* model\n* datetimeoriginal\n* exposuretime\n* fnumber\n* isospeedratings\n* focallength\n* artist\n* copyright\n* imagedescription\n* gpslatitude\n* gpslongitude\n* gpsaltitude",
        "namespacesall": "সমস্ত",
        "monthsall": "সমস্ত",
        "confirmemail": "ই-মেইলের ঠিকানা নিশ্চিত করুন",
        "logentry-suppress-revision": "$1 গোপনে {{PLURAL:$5|একটি সংস্করণের|$5টি সংস্করণের}} দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন $3: $4",
        "logentry-suppress-event-legacy": "$1 গোপনে $3টায় লগ ইভেন্টসমূহের দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন",
        "logentry-suppress-revision-legacy": "$1 গোপনে $3টায় সংস্করণসমূহের দৃশ্যমানতা {{GENDER:$2|পরিবর্তন}} করেছেন",
-       "revdelete-content-hid": "বিষয়বস্তু লুকায়িত",
-       "revdelete-summary-hid": "সম্পাদনা সারাংশ লুকায়িত",
-       "revdelete-uname-hid": "ব্যবহারকারী নাম লুকায়িত",
+       "revdelete-content-hid": "বিষয়বসà§\8dতà§\81 à¦²à§\81à¦\95à§\8dà¦\95ায়িত",
+       "revdelete-summary-hid": "সম্পাদনার সারাংশ লুকানো",
+       "revdelete-uname-hid": "বà§\8dযবহারà¦\95ারà§\80 à¦¨à¦¾à¦® à¦²à§\81à¦\95à§\8dà¦\95ায়িত",
        "revdelete-content-unhid": "বিষয়বস্তু প্রদর্শিত",
        "revdelete-summary-unhid": "সম্পাদনা সারাংশ প্রদর্শিত",
        "revdelete-uname-unhid": "ব্যবহারকারী নাম প্রদর্শিত",
        "expand_templates_generate_xml": "XML পার্স বৃক্ষ দেখাও",
        "expand_templates_generate_rawhtml": "এইচটিএমএল দেখাও",
        "expand_templates_preview": "প্রাকদর্শন",
-       "expand_templates_preview_fail_html": "<em>{{SITENAME}}-এ raw HTML সক্রিয় আছে ও সেশন উপাত্ত হারিয়ে গিয়েছে, জাভাস্ক্রিপ্ট ভিত্তিক আক্রমণ থেকে প্রতিরক্ষার জন্য প্রাকদর্শনটি লুকায়িত আছে।</em>\n\n<strong>যদি এটি সম্পাদনার একটি বৈধ প্রচেষ্টা হয়, তবে অনুগ্রহ করে আবার চেষ্টা করুন।</strong>\nযদি তারপরেও কাজ না হয়, তবে অ্যাকাউন্ট থেকে [[Special:UserLogout|বেরিয়ে গিয়ে]] আবার প্রবেশ করুন, এবং পরীক্ষা করে দেখুন যে আপনার ব্রাউজারে এই সাইট থেকে কুকি অনুমতি দেয়।",
-       "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}}-à¦\8f raw HTML à¦¸à¦\95à§\8dরিয় à¦\86à¦\9bà§\87 à¦\93 à¦\86পনি à¦ªà§\8dরবà§\87শ à¦\95রà§\87ন à¦¨à¦¿, à¦\9cাভাসà§\8dà¦\95à§\8dরিপà§\8dà¦\9f à¦­à¦¿à¦¤à§\8dতিà¦\95 à¦\86à¦\95à§\8dরমণ à¦¥à§\87à¦\95à§\87 à¦ªà§\8dরতিরà¦\95à§\8dষার à¦\9cনà§\8dয à¦ªà§\8dরাà¦\95দরà§\8dশনà¦\9fি à¦²à§\81à¦\95ায়িত à¦\86à¦\9bà§\87।</em>\n\n<strong>যদি à¦\8fà¦\9fি à¦¸à¦®à§\8dপাদনার à¦\8fà¦\95à¦\9fি à¦¬à§\88ধ à¦ªà§\8dরà¦\9aà§\87ষà§\8dà¦\9fা à¦¹à¦¯à¦¼, à¦¤à¦¬à§\87 à¦\85নà§\81à¦\97à§\8dরহ à¦\95রà§\87  [[Special:UserLogin|প্রবেশ করুন]] ও আবার চেষ্টা করুন।</strong>",
+       "expand_templates_preview_fail_html": "<em>যেহেতু {{SITENAME}}-এ raw HTML সক্রিয় আছে ও সেশন উপাত্ত হারিয়ে গিয়েছে, জাভাস্ক্রিপ্ট ভিত্তিক আক্রমণ থেকে প্রতিরক্ষার জন্য প্রাকদর্শনটি লুকানো আছে।</em>\n\n<strong>যদি এটি সম্পাদনার একটি বৈধ প্রচেষ্টা হয়, তবে অনুগ্রহ করে আবার চেষ্টা করুন।</strong>\nযদি তারপরেও কাজ না হয়, তবে অ্যাকাউন্ট থেকে [[Special:UserLogout|বেরিয়ে গিয়ে]] আবার প্রবেশ করুন, এবং পরীক্ষা করে দেখুন যে আপনার ব্রাউজারে এই সাইট থেকে কুকি অনুমতি দেয়।",
+       "expand_templates_preview_fail_html_anon": "<em>{{SITENAME}}-à¦\8f raw HTML à¦¸à¦\95à§\8dরিয় à¦\86à¦\9bà§\87 à¦\93 à¦\86পনি à¦ªà§\8dরবà§\87শ à¦\95রà§\87ন à¦¨à¦¿, à¦¤à¦¾à¦\87 à¦\9cাভাসà§\8dà¦\95à§\8dরিপà§\8dà¦\9f à¦­à¦¿à¦¤à§\8dতিà¦\95 à¦\86à¦\95à§\8dরমণ à¦¥à§\87à¦\95à§\87 à¦ªà§\8dরতিরà¦\95à§\8dষার à¦\9cনà§\8dয à¦ªà§\8dরাà¦\95দরà§\8dশনà¦\9fি à¦²à§\81à¦\95ানà§\8b à¦\86à¦\9bà§\87।</em>\n\n<strong>যদি à¦\8fà¦\9fি à¦¸à¦®à§\8dপাদনার à¦\8fà¦\95à¦\9fি à¦¬à§\88ধ à¦ªà§\8dরà¦\9aà§\87ষà§\8dà¦\9fা à¦¹à¦¯à¦¼, à¦¤à¦¬à§\87 à¦\85নà§\81à¦\97à§\8dরহ à¦\95রà§\87 [[Special:UserLogin|প্রবেশ করুন]] ও আবার চেষ্টা করুন।</strong>",
        "expand_templates_input_missing": "আপনাকে অন্তত কিছু ইনপুট লেখা প্রদান করতে হবে।",
        "pagelanguage": "পাতার ভাষা পরিবর্তন করুন",
        "pagelang-name": "পাতা",
        "passwordpolicies-policy-passwordcannotmatchblacklist": "পাসওয়ার্ড বিশেষত কালো তালিকাভুক্ত পাসওয়ার্ডের সাথে মিলতে পারবে না",
        "passwordpolicies-policy-maximalpasswordlength": "পাসওয়ার্ড $1 {{PLURAL:$1|অক্ষরের}} চেয়ে কম দীর্ঘ হতে হবে",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "পাসওয়ার্ড ১,০০,০০০ সর্বাধিক ব্যবহৃত পাসওয়ার্ডের তালিকায় থাকতে পারবে না।",
-       "unprotected-js": "নিরাপত্তার কারণে জাভাস্ক্রিপ্ট অনিরাপদ পৃষ্ঠা থেকে লোড করা যাবে না। শুধুমাত্র মিডিয়াউইকি: নামস্থান বা ব্যবহারকারী উপপাতায় জাভাস্ক্রিপ্ট তৈরি করুন"
+       "unprotected-js": "নিরাপত্তার কারণে জাভাস্ক্রিপ্ট অনিরাপদ পৃষ্ঠা থেকে লোড করা যাবে না। শুধুমাত্র মিডিয়াউইকি: নামস্থান বা ব্যবহারকারী উপপাতায় জাভাস্ক্রিপ্ট তৈরি করুন",
+       "userlogout-continue": "আপনি যদি প্রস্থান করতে চান দয়া করে [$1 প্রস্থান পাতায় যান]।"
 }
index d3b3b52..f529959 100644 (file)
                        "Fnielsen",
                        "Weblars",
                        "Kranix",
-                       "Psl85"
+                       "Psl85",
+                       "Dipsacus fullonum"
                ]
        },
        "tog-underline": "Understreg link:",
        "tog-hideminor": "Skjul mindre ændringer i listen over seneste ændringer",
-       "tog-hidepatrolled": "Skjul overvågede redigeringer i seneste ændringer",
-       "tog-newpageshidepatrolled": "Skjul overvågede sider på listen over nye sider",
+       "tog-hidepatrolled": "Skjul patruljerede redigeringer i seneste ændringer",
+       "tog-newpageshidepatrolled": "Skjul patruljerede sider på listen over nye sider",
        "tog-hidecategorization": "Skjul kategorisering af sider",
        "tog-extendwatchlist": "Udvid overvågningslisten til at vise alle ændringer og ikke kun den nyeste",
        "tog-usenewrc": "Gruppér ændringer efter side i listen over seneste ændringer og i overvågningslisten",
        "blocklist-userblocks": "Skjul blokeringer af kontoer",
        "blocklist-tempblocks": "Skjul midlertidige blokeringer",
        "blocklist-addressblocks": "Skjul enkel IP blokeringer",
+       "blocklist-type": "Type:",
        "blocklist-type-opt-partial": "Delvis",
        "blocklist-rangeblocks": "Skjul blokeringsklasser",
        "blocklist-timestamp": "Tidsstempel",
        "autosumm-replace": "Erstatter sidens indhold med \"$1\"",
        "autoredircomment": "Omdirigering til [[$1]] oprettet",
        "autosumm-removed-redirect": "Fjernede omdirigering til [[$1]]",
+       "autosumm-changed-redirect-target": "Ændrede omdirigeringsmål fra [[$1]] til [[$2]]",
        "autosumm-new": "Oprettede siden med \"$1\"",
        "autosumm-newblank": "Oprettede tom side",
        "lag-warn-normal": "Ændringer som er nyere end {{PLURAL:$1|et sekund|$1 sekunder}}, vises muligvis ikke i denne liste.",
index 98d0e9d..656d41b 100644 (file)
        "tooltip-watchlistedit-raw-submit": "Beobachtungsliste aktualisieren",
        "tooltip-recreate": "Seite neu erstellen, obwohl sie gelöscht wurde",
        "tooltip-upload": "Hochladen starten",
-       "tooltip-rollback": "Macht alle letzten Änderungen der Seite, die vom gleichen Benutzer vorgenommen worden sind, durch nur einen Klick rückgängig.",
+       "tooltip-rollback": "Macht alle letzten Änderungen der Seite, die vom selben Benutzer vorgenommen worden sind, durch nur einen Klick rückgängig.",
        "tooltip-undo": "Macht lediglich diese eine Änderung rückgängig und zeigt das Resultat in der Vorschau an, damit in der Zusammenfassungszeile eine Begründung angegeben werden kann.",
        "tooltip-preferences-save": "Einstellungen speichern",
        "tooltip-summary": "Gib eine kurze Zusammenfassung ein.",
index 3aa87ee..99de6b9 100644 (file)
        "tog-hidepatrolled": "Ɣla asitɔtrɔ siwo wowɔ la le tɔtrɔ yeyewo me",
        "tog-newpageshidepatrolled": "Ɣla axa siwo wowɔ tɔtrɔwo la le axa yeyewo me",
        "tog-hidecategorization": "Ɣla axawo mama ɖe hatsotsowo me",
-       "tog-extendwatchlist": "Keke tɔtrɔkpɔƒea ne nàkpɔ tɔtrɔwo katã, ke menye yeyetɔwo ko o",
+       "tog-extendwatchlist": "Keke Tɔtrɔkpɔƒe la ne nàkpɔ tɔtrɔwo katã, ke menye yeyetɔwo ko o",
        "tog-usenewrc": "Ƒo tɔtrɔwo nu ƒu le woƒe axawo nu le tɔtrɔ yeyewo kple tɔtrɔkpɔƒea",
        "tog-numberheadings": "Xexlẽdzesinana tanyawo",
        "tog-editondblclick": "Netrɔ asi le axawo ŋu ne wozi edzi zi eve",
        "tog-editsectiononrightclick": "Tiae be woate ŋu atrɔ akpa ne wozi eƒe tanyawo dzi",
-       "tog-watchcreations": "Tsɔ axa siwo gɔme medze kpakple axa siwo meda ɖe afisia la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
+       "tog-watchcreations": "Tsɔ axa siwo mewɔ kple nyatagba siwo meda ɖe nye tɔtrɔkpɔƒe",
        "tog-watchdefault": "Tsɔ axawo kpakple nutatawo siwo ŋu metrɔ asi le la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
        "tog-watchmoves": "Tsɔ  axawo kpakple nutatawo siwo ƒe nɔƒe meɖɔli la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
        "tog-watchdeletion": "Tsɔ  axawo kpakple nutatawo siwo metutu la kpe ɖe axa siwo ŋu nyeƒe ŋku le la ŋu",
-       "tog-watchuploads": "Da nyatakagba yeye siwo medana ɖi ɖe nye nukpɔƒe",
-       "tog-watchrollback": "Tsɔ axawo ɖɔlii tɔtrɔ siwo me mete fli ɖo le nye nukpɔƒea.",
+       "tog-watchuploads": "Da nyatakagba yeye siwo medana ɖi ɖe nye tɔtrɔkpɔƒe",
+       "tog-watchrollback": "Tsɔ axawo ɖɔlii tɔtrɔ siwo me mete fli ɖo le nye tɔtrɔkpɔƒea.",
        "tog-minordefault": "Nede dzesi tɔtrɔwo katã be wonye tɔtrɔ suewo ɣesiaɣi.",
        "tog-previewontop": "Aɖaka ƒe nɔnɔme nedze gbã hafi woatrɔ emenuwo",
        "tog-previewonfirst": "Eƒe nɔnɔme nedze ne wowɔ tɔtrɔ gbãtɔ",
-       "tog-enotifwatchlistpages": "Ɖo du nam ne axa aɖe alo nutata aɖe si ŋu nyeƒe ŋku le la trɔ",
+       "tog-enotifwatchlistpages": "Ɖo email ɖem ne axa alo nyatakagba siwo le tɔtrɔkpɔƒe la trɔ",
        "tog-enotifusertalkpages": "Ɖo Email ɖem ne nane trɔ le nye dzeɖoƒea",
        "tog-enotifminoredits": "Ɖo Email ɖem ne nu sue aɖe trɔ le nye axawo alo nyatagbawo hã ŋu",
        "tog-enotifrevealaddr": "Nye email adrɛs la nedze le nyanyanana ƒe emailwo me.",
        "tog-fancysig": "Bu asidenude abe wikinuŋɔŋlɔ ene (menye kadodo leɖokuisi o)",
        "tog-uselivepreview": "Vayiawo nedze evɔ megagbugbɔ axaawo ʋu o",
        "tog-forceeditsummary": "Na manya ne mele nuŋɔŋlɔʋuƒo gbɔlo ɖom ɖa",
-       "tog-watchlisthideown": "Nye tɔtrɔwo megadze le nukpɔƒea o",
+       "tog-watchlisthideown": "Nye tɔtrɔwo megadze le tɔtrɔkpɔƒe la o",
        "tog-watchlisthidebots": " Robot-tɔtrɔwo megadze le nukpɔƒea o",
-       "tog-watchlisthideminor": "Tɔtrɔ suewo megadze le nukpɔƒea o",
-       "tog-watchlisthideliu": "Ezãla siwo ge ɖe eme ƒe tɔtrɔwo megadze le nukpɔƒea o",
+       "tog-watchlisthideminor": "Tɔtrɔ suewo megadze le tɔtrɔkpɔƒe o",
+       "tog-watchlisthideliu": "Ezãla siwo ge ɖe eme ƒe tɔtrɔwo megadze le tɔtrɔkpɔƒe la o",
        "tog-watchlistreloadautomatically": "Nukpɔƒea neʋu le eɖokui si ne wotrɔ sranui aɖe (JavaSkript hã)",
        "tog-useeditwarning": "Na nyanyam ne mele asiɖem le axa si ŋu wome dzra tɔtrɔwo ɖo vɔ la o.",
        "underline-always": "Ɣesiaɣi",
        "underline-never": "Gbeɖe",
+       "editfont-style": "Trɔ akpa la ƒe nuŋlɔtsyã",
+       "editfont-sansserif": "Sans-serif nuŋlɔtsyã",
+       "editfont-serif": "Serif Nuŋlɔtsyã",
        "sunday": "Kwasiɖa",
        "monday": "Dzoɖa",
        "tuesday": "Braɖa",
        "about": "Eŋunya",
        "newwindow": "(eʋua fesre yeye)",
        "cancel": "Tasii",
+       "moredotdotdot": "Bubuwo",
+       "morenotlisted": "Anɔ eme be menye wo katãe nye esia o.",
        "mypage": "Axa",
        "mytalk": "Dzeɖoƒe",
        "anontalk": "Dzeɖoƒe",
        "returnto": "Trɔ yi $1.",
        "tagline": "Tso {{SITENAME}}",
        "help": "Kpekpeɖeŋu",
+       "help-mediawiki": "Kpekpeɖeŋu tso MediaWiki ŋu",
        "search": "Dii",
        "searchbutton": "Dii",
        "go": "Yi",
        "ok": "YOO",
        "retrievedfrom": "Woɖee tso \"$1\"",
        "youhavenewmessages": "$1 va ɖo ($2).",
+       "newmessageslinkplural": "{{PLURAL:$1|gbedeasiɖoɖa yeye|999=gbedeasiɖoɖa yeyewo}}",
        "youhavenewmessagesmulti": "Du yeyewo vaɖo na wò $1",
        "editsection": "trɔ asi le eŋu",
        "editold": "trɔ asi le eŋu",
        "thisisdeleted": "Kpɔ $1 alo woa gbugbɔ ɖe tsa͂tɔa ɖe go?",
        "viewdeleted": "Kpɔ $1?",
        "restorelink": "{{PLURAL:$1|ekpɔ tɔtrɔ ɖeka |ekpɔ tɔtrɔ $1}}",
+       "feedlinks": "Nukakala:",
+       "feed-invalid": "Nukakala ƒomevi sia mede o.",
+       "site-rss-feed": "RSS Nukakala $1",
        "site-atom-feed": "Atom nubiabia $1",
+       "page-atom-feed": "\"$1\" Atom Nukakala",
        "red-link-title": "$1 (womeŋlɔ axa sia haɖeke o)",
        "nstab-main": "Axa",
        "nstab-user": "Ezãla ƒe axa",
        "nosuchspecialpage": "Axa tɔxɛ sia meli o",
        "nospecialpagetext": "<strong>Èbia be neʋu axa tɔxɛ aɖe si meli o.</strong>\n\nÀte ŋu akpɔ axa tɔxɛ siwo li la le [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Kuxi",
+       "databaseerror-query": "Gbeɖeɖe: $1",
+       "databaseerror-function": "Dɔwɔɖoɖo: $1",
+       "databaseerror-error": "Kuxi: $1",
        "internalerror": "Ememekuxi",
        "internalerror_info": "Ememekuxi: $1",
        "internalerror-fatal-exception": "Kuxi sesẽ ƒomevi si nye \"$1\"",
        "createacct-email-ph": "Ŋlɔ wò email adrɛs",
        "createacct-submit": "Kpe wò ezazãŋkɔŋɔŋlɔ ɖo",
        "createacct-benefit-heading": "Ame siwo le abe wò ene koe trɔ asi le {{SITENAME}} la ŋu.",
-       "createacct-benefit-body1": "{{AGBƆSƆSƆTƆ:$1|edit|edits}}",
-       "createacct-benefit-body2": "{{AGBƆSƆSƆTƆ:$1|page|pages}}",
+       "createacct-benefit-body1": "{{PLURAL:$1|nugbugbɔŋlɔ|nugbugbɔŋlɔwo}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|axa|axawo}}",
        "createacct-benefit-body3": "yeyetɔ {{PLURAL:$1|contributor|contributors}}",
-       "loginsuccesstitle": "Ege ɖe eme azɔ̃.",
+       "loginsuccesstitle": "Ège ɖe eme.",
        "loginsuccess": "'''Ele {{SITENAME}} me fifia abe \"$1\" ene.'''",
        "nouserspecified": "Elebe na ŋlɔ wò dzesideŋkɔ",
-       "passwordtoolong": "Mɔʋunyawo mate ŋu adidi wu {{AGBƆSƆSƆ:$1|nuŋlɔdzesi 1|$1 nuŋlɔdzesiwo}}.",
-       "acct_creation_throttle_hit": "Wiki sia zãla aɖe tso wò ''IP address'' ŋlɔ {{PLURAL:$1|1 ŋkɔ|$1 ŋkɔwo}} le ŋkeke si vayi me xoxo. Mɔɖeɖe le na ŋkɔ  ɖeka ko ŋɔŋlɔ le ŋkeke ɖeka me.<br />\nLe esiata la, ''IP address'' sia zãlawo mekpɔ mɔ aŋlɔ ŋkɔ bubuwo fifia o.",
+       "passwordtoolong": "Mɔʋunyawo mate ŋu adidi wu {{PLURAL:nuŋlɔdzesi $1|nuŋlɔdzesi 1|nuŋlɔdzesi $1}}.",
+       "acct_creation_throttle_hit": "Wiki sia zãla siwo zã wò IP adrɛs la wɔ {{PLURAL:ŋkɔŋlɔɖi $1|ŋkɔŋlɔɖi 1|ŋkɔŋlɔɖi $1}} xoxo le ŋkeke $2 va yi me, esiae nye gbogbotɔ si woɖe mɔ be woawɔ le ɣeyiɣi ƒe didime ma me. Eya ta ame aɖeke magate ŋu azã IP adrɛs sia fifia aŋlɔ ŋkɔ ɖi o.",
+       "emailauthenticated": "Woɖo kpe wò email adrɛs la dzi le $2 le ga $3.",
        "loginlanguagelabel": "Gbe: $1",
        "pt-login": "Ge ɖe eme",
        "pt-login-button": "Ge Ɖe Eme",
        "pt-createaccount": "Kpe ezazãŋkɔŋɔŋlɔ ɖo",
        "pt-userlogout": "Do Le Eme",
+       "oldpassword": "Mɔʋunya xoxo:",
+       "newpassword": "Mɔʋunya yeye:",
+       "retypenew": "Gbugbɔ ŋlɔ mɔʋunyaa:",
+       "resetpass_submit": "Tia mɔʋunya eye nàge ɖe eme",
+       "changepassword-success": "Wò mɔʋunya la trɔ!",
+       "changepassword-throttled": "Ètee kpɔ be yeage ɖe eme hedo kpoe zi geɖe akpa le ɣeyiɣi kpui siawo me. Taflatsɛ lala $1 hafi nàgatee kpɔ.",
+       "botpasswords": "Mɔʋunya mɔ̀kpakpatɔwo",
+       "botpasswords-label-appid": "Ŋkɔ mɔ̀kpakpatɔ",
+       "botpasswords-label-create": "Wɔe",
+       "botpasswords-label-update": "Yeyetɔ Neɖɔlii",
+       "botpasswords-label-cancel": "Tasii",
+       "botpasswords-label-delete": "Tutui",
+       "botpasswords-label-resetpassword": "Trɔ mɔʋunyaa",
+       "resetpass-submit-loggedin": "Trɔ mɔʋunya",
+       "resetpass-submit-cancel": "Tasii",
+       "resetpass-wrong-oldpass": "Mɔʋunya si wona wò gbɔ alo wò mɔʋunya mede o.\n\nƉewohĩ ètrɔ wò mɔʋunya alo nèbia be woana bubu ye.",
+       "resetpass-recycled": "Taflatsɛ trɔ wò mɔʋunya wòato vovo na esi zãm nèle fifia.",
+       "resetpass-temp-emailed": "Èzã mɔʋunya si wona gbɔ la tsɔ le gegem ɖe eme.\nHafi nàte ŋu age ɖe eme keŋkeŋ la, ŋlɔ mɔʋunya yeye ɖe afi sia:",
        "passwordreset": "Trɔ mɔʋunyaa",
+       "passwordreset-username": "Ezazãŋkɔ:",
+       "passwordreset-domain": "Nuwɔƒe:",
+       "passwordreset-email": "Email adrɛs:",
+       "passwordreset-emailtitle": "Ŋkɔŋlɔɖi ŋuti nyatakaka le {{ƉƆTEƑEŊKƆ}}",
+       "passwordreset-invalidemail": "Email adrɛs la mede o",
+       "passwordreset-nodata": "Mèŋlɔ ezazãŋkɔ alo email adrɛs aɖeke o",
+       "changeemail": "Trɔ email adrɛs alo ɖee ɖa",
+       "changeemail-header": "Kpe nyatakaka sia ɖo ne èdi be yeatrɔ wò email adrɛs la. Ke ne èdi be yeaɖe email ɖe sia ɖe si le wò ŋkɔŋlɔɖia me ɖa la, ke gblẽ afi si woɖo be woaŋlɔ email yeye ɖo la ɖi ƒuƒlu ne èle nyatakaka sia ɖom ɖa.",
+       "changeemail-no-info": "Ele be nàge ɖe eme hafi ate ŋu aʋu axa sia tẽe.",
+       "changeemail-oldemail": "Email adrɛs fifitɔ:",
+       "changeemail-newemail": "Email adrɛs yeye:",
+       "changeemail-none": "(ɖeke o)",
+       "changeemail-password": "Wò {{SITENAME}} ƒe mɔʋunya:",
+       "changeemail-submit": "Trɔ email la",
+       "changeemail-throttled": "Ètee kpɔ be yeage ɖe eme hedo kpoe zi geɖe akpa le ɣeyiɣi kpui siawo me. Taflatsɛ lala $1 hafi nàgatee kpɔ.",
+       "changeemail-nochange": "Taflatsɛ ŋlɔ email adrɛs yeye.",
+       "resettokens-watchlist-token": "Ɖɔɖeɖɔdzi nukakala (Atom/RSS) ƒe mɔfiadzesi nyaŋui ƒe [[Special:Tɔtrɔkpɔƒe|tɔtrɔ siwo wowɔ le axa siwo le wò tɔtrɔkpɔƒe ŋu]]",
+       "bold_sample": "Nuŋɔŋlɔ toto",
+       "bold_tip": "Nuŋɔŋlɔ toto",
+       "italic_sample": "Nuŋɔŋlɔ biɖeŋgɔ",
+       "italic_tip": "Nuŋɔŋlɔ biɖeŋgɔ",
        "sig_tip": "Wò asidenute kple gaƒoƒoa",
        "subject": "Tanya:",
        "minoredit": "Esia nye tɔtrɔ sue aɖe ko",
        "preview": "Kpɔe do ŋgɔ",
        "showpreview": "Fiae do ŋgɔ",
        "showdiff": "Fia tɔtrɔawo",
+       "loginreqlink": "ge ɖe eme",
+       "loginreqpagetext": "Taflatsɛ $1 ne nàkpɔ axa bubuwo.",
        "newarticle": "(Yeye)",
        "newarticletext": "Eva ɖo axa si gɔme womedze haɖeke o. Ne Nedi be yeadze egɔme la, dze nuŋɔŋlɔ͂ ɖe go sia me le afii (kpɔ [$1 kpekpeɖeŋu nyawo] na kpekpeɖeŋu bubuwo). Ne meɖoe be yeava afisia hafi o la, ekema tia '''megbe''' eye nagbugbɔ ayi afisi netso va.",
-       "previewnote": "'''Ɖo ŋku edzi be wole afii fiam do ŋgɔ, wome dzrae ɖo haɖeke o!'''",
+       "previewnote": "<strong>Ɖo ŋkui be nua ƒe dzedzeme koe nye esia.</strong>\nWomekpɔ dzra tɔtrɔ siwo nèwɔ la ɖo haɖe o!",
        "editing": "$1 na etɔtrɔ",
        "editingsection": "Nele $1 (ƒe akpa aɖe) trɔm",
        "yourtext": "Wò nuŋɔŋlɔ",
        "templatesused": "wozã {{PLURAL:$1|Template|Templates}} le axa sia:",
        "permissionserrorstext-withaction": "Se meɖe mɔ bena na $2 o, le {{PLURAL:$1|ta|ta}}:",
        "edit-already-exists": "Mateŋu adze axa sia gɔme o.<br />\nWoli xoxo.",
+       "currentrev": "Asitɔtrɔ yeyetɔ",
        "currentrev-asof": "Asitɔtrɔ mamlea le $1 dzi",
        "revisionasof": "Tataa le $1",
-       "revision-info": "Tataa le $1 si $2 wɔ",
+       "revision-info": "Asitɔtrɔ si wowɔ le $1 eye ame si wɔe nye {{GENDER:$6|$2}}$7",
        "previousrevision": "← Tata xoxoa",
        "nextrevision": "Tata yeyea →",
        "currentrevisionlink": "Tata yeyetɔ",
        "page_first": "gbãtɔ",
        "page_last": "mamlɛ",
        "histlegend": "Titia vovo: de dzesi tata siwo ƒe vovototowo nedi be yea kpɔ ɖa, eye na tia 'enter' alo kpe si le eɖome.<br />\nGɔmeɖeɖe: '''({{int:cur}})''' = vovototo tso tata mamlea gbɔ, '''({{int:last}})''' = vovototo tso tata si do ŋgɔ gbɔ, '''{{int:minoreditletter}}''' = tɔtrɔ suɛ.",
-       "history-show-deleted": "Esiwo wotutu ɖa ko",
-       "histfirst": "Xoxoɔwu",
-       "histlast": "Yeyeɛwu",
+       "history-fieldset-title": "Sra asitɔtrɔawo me",
+       "history-show-deleted": "Asitɔtrɔ siwo wotutu ko",
+       "histfirst": "Xoxotɔ",
+       "histlast": "Yeyetɔ",
+       "historysize": "({{PLURAL:$1|bite 1|bite $1}})",
+       "historyempty": "ƒuƒlu",
+       "history-feed-title": "Asitɔtrɔ vayiawo",
+       "history-feed-description": "Wiki ƒe axa sia ƒe asitɔtrɔ vayiawo",
        "history-feed-item-nocomment": "$1 le $2",
        "history-feed-empty": "Axa si dim nele meli o.\nDewomahĩ, wotutui ɖa le wiki sia dzi alo wotrɔ eƒe ŋkɔ.\nZã [[Special:Search|nuwo didi le wiki sia dzi]] kpɔ na axa yeyeawo.",
        "rev-delundel": "fia/ɣla",
        "rev-showdeleted": "fia",
        "revdelete-radio-same": "(megatrɔe o)",
-       "revdelete-radio-set": "Yo",
-       "revdelete-radio-unset": "Kpao",
-       "history-title": "\"$1\" ƒe tata xoxoawo",
+       "revdelete-radio-set": "Ɣaɣla",
+       "revdelete-radio-unset": "Dzedze",
+       "history-title": "Asitɔtrɔ vayi si wowɔ le \"$1\"",
        "difference-title": "Vovototo siwo le numetoto \"$1\" me",
        "lineno": "Fli $1:",
        "compareselectedversions": "Tsɔ esiwo netia la tsɔ kpli wonɔewo",
        "searchall": "wo katã",
        "powersearch-toggleall": "Wo katã",
        "preferences": "Didiwo",
-       "mypreferences": "Nyeƒe didiwo",
+       "mypreferences": "Tiatiawɔƒe",
        "skin-preview": "Kpɔe do ŋgɔ",
-       "prefs-watchlist-days-max": "Maximum $1 {{PLURAL:$1|day|days}}",
+       "prefs-watchlist-days-max": "{{PLURAL:$1|Ŋkeke|Ŋkeke}} agbɔsɔsɔ gbogbotɔe nye $1",
+       "prefs-misc": "Nu Kpotokpotoewo",
+       "prefs-resetpass": "Trɔ mɔʋunyaa",
        "timezoneregion-africa": "Afrika",
        "timezoneregion-america": "Amerika",
        "timezoneregion-antarctica": "Antarktika",
index f8acd19..1ff0110 100644 (file)
        "expand_templates_generate_xml": "Εμφάνιση δέντρου συντακτικής ανάλυσης XML",
        "expand_templates_generate_rawhtml": "Εμφάνιση ανεπεξέργαστης HTML",
        "expand_templates_preview": "Προεπισκόπηση",
-       "expand_templates_preview_fail_html": "<em>Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML και υπήρξε μια απώλεια των δεδομένων συνόδου, η προεπισκόπηση είναι κρυμμένη ως ένα προληπτικό μέτρο κατά επιθέσεων JavaScript.</em>\n\n<strong>Αν αυτή είναι μια θεμιτή προσπάθεια προεπισκόπησης, παρακαλούμε δοκιμάστε ξανά.</strong>\nΑν εξακολουθεί να μην λειτουργεί, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε ξανά και βεβαιωθείτε ότι το πρόγραμμα περιήγησής σας επιτρέπει cookies από αυτόν τον ιστότοπο.",
+       "expand_templates_preview_fail_html": "<em>Επειδή το {{SITENAME}} επιτρέπει την εισαγωγή ακατέργαστου HTML και υπήρξε μια απώλεια των δεδομένων συνόδου, η προεπισκόπηση είναι κρυμμένη ως προληπτικό μέτρο κατά επιθέσεων JavaScript.</em>\n\n<strong>Αν αυτή είναι μια θεμιτή απόπειρα προεπισκόπησης, παρακαλούμε δοκιμάστε ξανά.</strong>\nΑν εξακολουθεί να μην λειτουργεί, δοκιμάστε να [[Special:UserLogout|αποσυνδεθείτε]] και να συνδεθείτε ξανά και βεβαιωθείτε ότι το πρόγραμμα περιήγησής σας επιτρέπει cookies από αυτόν τον ιστότοπο.",
        "expand_templates_preview_fail_html_anon": "<em>Επειδή το {{SITENAME}} έχει ενεργοποιημένη raw HTML και δεν είστε συνδεδεμένοι, η προεπισκόπηση είναι κρυμμένη ως ένα προληπτικό μέτρο ενάντια σε επιθέσεις JavaScript.</em>\n\n<strong>Αν αυτό είναι δικαιολογημένη απόπειρα προεπισκόπησης, παρακαλούμε να [[Special:UserLogin|συνδεθείτε]] και δοκιμάστε πάλι.</strong>",
        "pagelanguage": "Αλλαγή γλώσσας σελίδας",
        "pagelang-name": "Σελίδα",
index dd215af..9dfb19b 100644 (file)
        "delete-confirm": "Poista ”$1”",
        "delete-legend": "Sivun poisto",
        "historywarning": "<strong>Varoitus:</strong> Sivulla, jota olet poistamassa, on muokkaushistoriaa ja sitä on muokattu $1 {{PLURAL:$1|kerran|kertaa}}:",
-       "historyaction-submit": "Näytä muokkaushistoria",
+       "historyaction-submit": "Näytä versiot",
        "confirmdeletetext": "Olet poistamassa sivun ja kaiken sen historian.\nVahvista, että olet aikeissa tehdä tämän ja että ymmärrät teon seuraukset ja teet poiston [[{{MediaWiki:Policy-url}}|käytäntöjen]] mukaisesti.",
        "actioncomplete": "Toiminto suoritettu",
        "actionfailed": "Toiminto epäonnistui",
index 6b30bb8..521819b 100644 (file)
        "prefs-emailconfirm-label": "Confirmation du courriel :",
        "youremail": "Courriel :",
        "username": "{{GENDER:$1|Nom d'utilisateur|Nom d'utilisatrice}} :",
-       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}} :",
+       "prefs-memberingroups": "{{GENDER:$2|Membre}} {{PLURAL:$1|du groupe|des groupes}}:",
        "prefs-memberingroups-type": "$1",
        "group-membership-link-with-expiry": "$1 (jusqu'à $2)",
        "prefs-registration": "Date d'inscription :",
index 7f97d48..c5bb5a2 100644 (file)
        "talk": "Oerlis",
        "views": "Werjeften",
        "toolbox": "Ark",
+       "tool-link-userrights": "{{GENDER:$1|Meidochgroepen}} feroarje",
+       "tool-link-userrights-readonly": "{{GENDER:$1|Meidochgroepen}} besjen",
        "imagepage": "Besjoch bestânsside",
        "mediawikipage": "Berjochtside sjen litte",
        "templatepage": "Berjochtside lêze",
        "yourname": "Meidochnamme:",
        "userlogin-yourname": "Meidochnamme",
        "userlogin-yourname-ph": "Jou jo meidochnamme",
-       "createacct-another-username-ph": "Jou jo meidochnamme",
+       "createacct-another-username-ph": "Jou de meidochnamme",
        "yourpassword": "Wachtwurd:",
        "userlogin-yourpassword": "Wachtwurd",
        "userlogin-yourpassword-ph": "Jou jo wachtwurd",
        "userrights-user-editname": "Jou in meidochnamme:",
        "editusergroup": "Wizigje meidoggerrjochten",
        "editinguser": "Bewurkje meidoggerrjochten fan <strong>[[User:$1|$1]]</strong> $2",
-       "userrights-editusergroup": "Wizigje meidoggerrjochten",
+       "userrights-editusergroup": "{{GENDER:$1|Meidochgroepen}} bewurkje",
+       "userrights-viewusergroup": "{{GENDER:$1|Meidochgroepen}} besjen",
        "saveusergroups": "Meidoggerrjochten bewarje",
        "userrights-groupsmember": "Sit yn group:",
        "userrights-groupsmember-type": "$1",
        "recentchanges-legend": "Opsjes foar resinte feroarings",
        "recentchanges-summary": "Folgje de lêste feroarings oan 'e wiki op dizze side.",
        "recentchanges-noresult": "Gjin feroaring yn 'e opjûne perioade foldocht oan dizze kritearia.",
+       "recentchanges-notargetpage": "Jou hjirboppe in sidenamme, en besjoch feroarings foar dy side.",
        "recentchanges-feed-description": "Mei dizze feed kinne jo de nijste feroarings yn dizze wiki besjen.",
        "recentchanges-label-newpage": "Mei dizze wiziging is in nije side makke",
        "recentchanges-label-minor": "Dizze feroaring is fan lytse betsjutting",
        "rcfilters-savedqueries-already-saved": "Dizze filters wurde al bewarre. Feroarje jo ynstellings om in nij filter bewarje te kinnen.",
        "rcfilters-restore-default-filters": "Standertfilters werombringe",
        "rcfilters-clear-all-filters": "Alle filters wiskje",
+       "rcfilters-show-new-changes": "Nijste feroarings besjen",
        "rcfilters-search-placeholder": "Feroarings filterje (brûk it menu of sykje op filternamme)",
        "rcfilters-empty-filter": "Gjin aktive filters. Alle bydragen wurde werjûn.",
        "rcfilters-filterlist-feedbacklink": "Lit ús hearre wat jo fan dit filterark fine",
        "rcfilters-watchlist-markseen-button": "Alle wizigings as sjoen markearje",
        "rcfilters-watchlist-edit-watchlist-button": "Jo list mei folchsiden bewurkje",
        "rcfilters-watchlist-showupdated": "Wizigings oan siden dy't jo dêrnei noch net besocht hawwe, wurde <strong>fet</strong>, mei opfolle rûntsjes markearre.",
+       "rcfilters-filter-showlinkedfrom-label": "Feroarings werjaan op siden ferwiisd fan",
+       "rcfilters-filter-showlinkedfrom-option-label": "<strong>Siden ferwiisd fan</strong> de opjûne side",
+       "rcfilters-filter-showlinkedto-label": "Feroarings werjaan op siden ferwizend nei",
+       "rcfilters-filter-showlinkedto-option-label": "<strong>Siden ferwizend nei</strong> de opjûne side",
+       "rcfilters-target-page-placeholder": "Jou in sidenamme (of kategory)",
        "rcnotefrom": "Hjirûnder {{PLURAL:$5|stiet de feroaring|steane de feroarings}} sûnt <strong>$3, $4</strong> (maksimaal <strong>$1</strong> werjûn).",
        "rclistfromreset": "Datumseleksje werynstelle",
        "rclistfrom": "Jou nije feroarings, begjinnend op $3, $2",
        "recentchangeslinked-feed": "Folgje keppelings",
        "recentchangeslinked-toolbox": "Folgje keppelings",
        "recentchangeslinked-title": "Feroarings yn ferbân mei \"$1\"",
-       "recentchangeslinked-summary": "Dizze spesjale side lit de lêste bewurkings sjen op siden dy't keppele wurde fan in spesifisearre side ôf (of fan in spesifisearre Kategory ôf). Siden dy't op [[Special:Watchlist|jo folchlist]] steane, wurde '''tsjûk''' werjûn.",
+       "recentchangeslinked-summary": "Jou in sidenamme, en besjoch de feroarings op siden dy't keppele binne fan as nei dy side. (Jou {{ns:category}}:Kategorynamme om de leden fan in kategory te besjen). Wizigings oan siden op [[Special:Watchlist|jo Folchlist]] wurde <strong>fet</strong> werjûn.",
        "recentchangeslinked-page": "Sidenamme:",
        "recentchangeslinked-to": "Feroarings oan siden mei ferwizings nei dizze side besjen",
        "recentchanges-page-added-to-category": "[[:$1]] oan kategory taheakke",
        "dellogpage": "Wiskloch",
        "dellogpagetext": "Dit is wat der resint wiske is.\n(Tiden oanjûn as UTC).",
        "deletionlog": "wiskloch",
+       "log-name-create": "Side-oanmeitsingsloch",
        "logentry-create-create": "$1 {{GENDER:$2|hat}} de side $3 makke",
        "reverted": "Weromset nei eardere ferzje",
        "deletecomment": "Reden:",
        "editcomment": "De gearfetting wie: <em>$1</em>.",
        "revertpage": "Bewurkings fan [[Special:Contributions/$2|$2]] ([[User talk:$2|oerlis]]) weromset ta de lêste ferzje fan [[User:$1|$1]]",
        "rollback-success": "Wizigings fan {{GENDER:$3|$1}} weromdraaid;\nde lêste ferzje fan {{GENDER:$4|$2}} weromset.",
+       "log-name-contentmodel": "Ynhâldsmodelloch",
        "protectlogpage": "Skoattelloch",
        "protectlogtext": "Hjirûnder wurdt it skoateljen en frijjaan fan siden oanjûn.\nSjoch [[Special:ProtectedPages|Skoattele side]] foar mear ynformaasje.",
        "protectedarticle": "\"[[$1]]\" skoattele",
index 4a110b0..ae3645a 100644 (file)
        "grant-editpage": "Uređivanje postojećih stranica",
        "grant-editprotected": "Uređivanje zaštićenih stranica",
        "grant-highvolume": "Uređivanja velikog opsega",
+       "grant-patrol": "Ophodnja izmjena stranica",
        "grant-rollback": "Brzo uklanjanje izmjena stranica",
        "grant-sendemail": "Slanje e-poruka drugim suradnicima",
        "grant-uploadeditmovefile": "Postavljanje, zamjena i premještanje datoteka",
index 623c04a..5d5ebc7 100644 (file)
@@ -63,6 +63,7 @@
        "tog-norollbackdiff": "Omisar difero-komparo pos retrorulo",
        "tog-useeditwarning": "Avertez se me probos klozar ula pagino sen sparar mea modifiki ed edituri",
        "tog-prefershttps": "Sempre uzar sekura konekto kande facar log in",
+       "tog-showrollbackconfirmation": "Demandez konfirmo, se ligilo por retromodifikar kliktesos",
        "underline-always": "Sempre",
        "underline-never": "Nulatempe",
        "underline-default": "Pre-ajustaji pri sub-strekizar ligili",
        "title-invalid-interwiki": "La demandita pagino-titulo kontenas inter-wiki-ala ligilo, olqua ne povas uzesar en tituli.",
        "title-invalid-talk-namespace": "La demandita pagino-titulo referas a diskuto-pagino, qua ne existas.",
        "title-invalid-characters": "La demandita pagino-titulo kontenas ne-valida literi: \"$1\".",
+       "title-invalid-relative": "La titulo di la pagino havas la nomizita \"relativi\". Tituli di pagini kun \"relativi\" (./, ../) esas nevalida, pro freque la retonavigilo dil uzero ne povas trovar li.",
        "title-invalid-magic-tilde": "La pagino demandata kontenas nevalida 'magiala' intersequo di tildi =>(<nowiki>~~~</nowiki>).",
        "title-invalid-too-long": "La pagino demandata esas tre longa. Ol mustas esar min longa kam $1 {{PLURAL:$1|byte|bytes}} segun la kodexado UTF-8.",
        "title-invalid-leading-colon": "La pagino demandata kontenas nevalida bi-punto en lua komenco.",
        "badretype": "La pasovorti vu donis ne esas sama.",
        "usernameinprogress": "Kontokreado por ita uzero duras. Voluntez vartar.",
        "userexists": "La uzeronomo ja selektesis antee.\nVoluntez elektar diferanta uzeronomo.",
+       "createacct-normalization": "Vua uzero-nomo adaptesos a $2, pro teknikala motivi.",
        "loginerror": "Eroro enirante",
        "createacct-error": "Eroro pri kontokreado",
        "createaccounterror": "Ne povis krear konto: $1",
        "passwordtooshort": "Pasovorti mustas kontenar adminime {{PLURAL:$1|1 signo|$1 signi}}.",
        "passwordtoolong": "Pasovorti ne mustas esar plu longa kam {{PLURAL:$1|1 litero|$1 literi}}.",
        "passwordtoopopular": "Pasovorti tre facila ne povas uzesar. Voluntez selektar pasovorto nefacila por divinar.",
+       "passwordinlargeblacklist": "La pasovorto quon vu selektis esas tre ordinare uzata e/o facila por deskovrar. Voluntez selektar plu bona pasovorto.",
        "password-name-match": "Pasovorto mustas diferar de vua uzeronomo.",
        "password-login-forbidden": "La uzo di ita uzeronomo e pasovorto es interdiktita.",
        "mailmypassword": "Sendez nova pasovorto per e-posto",
        "botpasswords-updated-body": "La pasovorto por la 'bot' nomizita \"$1\" del {{GENDER:$2|uzero}} \"$2\" kreesis.",
        "botpasswords-deleted-title": "La pasovorto por la 'bot' efacesis",
        "botpasswords-deleted-body": "La pasovorto por la 'bot' nomizita \"$1\" del {{GENDER:$2|uzero}} \"$2\" kreesis.",
+       "botpasswords-newpassword": "La nova pasovorto por enirar <strong>$1</strong> esas <strong>$2</strong>.\n<em>Voluntez memorigar to por futura refero.</em> <br> (Por anciena ''bot-''i, qui bezonas la nomo di 'login' esar la sama kam l'eventuala nomo dil uzero, vu anke povas uzar <strong>$3</strong> kom uzero-nomo, e <strong>$4</strong> kom pasovorto.)",
+       "botpasswords-no-provider": "\"BotPasswordsSessionProvider\" ne esas disponebla.",
+       "botpasswords-restriction-failed": "Restrikti pri pasovorti koncerne ''bot''-i impedas vua 'log in'.",
        "botpasswords-not-exist": "L'uzero \"$1\" ne havas pasovorto nomizita \"$2\" por lua 'bot'.",
        "botpasswords-needs-reset": "La pasovorto por la 'bot' nomizita \"$1\" dal {{GENDER:$2|uzero}} \"$2\" mustas rikreesar.",
        "botpasswords-locked": "Vu ne povas facar 'login' per robotala pasovorto (bot password), pro ke vua konto blokusesis.",
        "resetpass-abort-generic": "La modifiko dil pasovorto interuptesis per ula 'extension'.",
        "resetpass-expired": "Vua pasovorto perdis la valideso. Voluntez krear nova pasovorto por facar 'log in'.",
        "resetpass-expired-soft": "Vua pasovorto perdis la valideso e mustas modifikesar. Voluntez selektar nova pasovorto, o kliktez \"{{int:authprovider-resetpass-skip-label}}\" por modifikar ol pose.",
+       "resetpass-validity": "Vua pasovorto \"$1\" esas nevalida. Voluntez krear nova pasovorto por facar 'log in'.",
        "resetpass-validity-soft": "Vua pasovorto esas nevalida: $1\n\nVoluntez selektar nova pasovorto, o kliktez \"{{int:authprovider-resetpass-skip-label}}\" por modifikar ol pose.",
        "passwordreset": "Sendez nova pasovorto per e-posto",
        "passwordreset-text-one": "Garnisez ica formulario por recevar provizora pasovorto per vua e-posto.",
        "subject-preview": "Previdado di la temo:",
        "previewerrortext": "Eventis eroro kande on probis krear previdado pri vua modifikuri.",
        "blockedtitle": "La uzero esas blokusita",
+       "blockedtext-partial": "<strong>Vua uzero-nomo od IP-adreso blokusesis koncerne modifikuri en ca pagino. Vu ankore povas redaktar altra pagini en ca Wiki.</strong> Vu povas vidar omna detali pri la blokuso en [[Special:MyContributions|account contributions]].\n\n$1 blokusis vu. La motivo esis <em>$2</em>.\n\n* Komenco dil blokuso: $8\n* Fino dil blokuso: $6\n* Motivo dil blokuso: $7\n* Blokuso #$5",
        "blockedtext": "<strong>Vua uzantonomo od IP-adreso blokusesis.</strong>\n\n$1 blokusis vu.\nLa motivo esis <em>$2</em>.\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Motivo dil blokuso: $7\n\nVu povas kontaktar $1 od altra [[{{MediaWiki:Grouppage-sysop}}|administrero]] por diskutar la blokuso.\nVu ne povas uzar \"email this user\" por sendar e-posto ecepte se valida email indikesis en tua [[Special:Preferences|preferaji dil uzanto]], e se vu ne blokusesis por uzar ol.\nVua nuna IP-adreso esas $3, e la ID dil blokuso esas #$5.\nVoluntez inkluzor omna detali adsupre en omna demandi quin vu facos.",
        "autoblockedtext": "<strong>Vua uzantonomo od IP-adreso blokusesis.</strong>\n\n$1 blokusis vu.\nLa motivo esis <em>$2</em>.\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Persono blokusata: $7\n\nVu povas kontaktar $1 od altra [[{{MediaWiki:Grouppage-sysop}}|administrero]] por diskutar pri la blokuso.\nVu ne povas uzar \"email this user\" por sendar e-posto, ecepte se valida email indikesis en tua [[Special:Preferences|preferaji dil uzero]], e se vu ne blokusesis por uzar ol.\nVua nuna IP-adreso esas $3, e la ID dil blokuso esas #$5.\nVoluntez inkluzor omna detali adsupre en omna demandi quin vu facos.",
        "systemblockedtext": "Vua uzero-nomo od IP-adreso blokusabis automatale da MediaWiki.\nLa motivo esas:\n\n:<em>$2</em>\n\n* Komenco di la blokuso: $8\n* Fino di la blokuso: $6\n* Persono blokuzata: $7\n\nVua nuna IP-adreso esas $3.\nVoluntez inkluzar omna detalii furnisita adsupre, en irga demandi quin vu facos.",
        "blockednoreason": "nula motivo donesis",
        "whitelistedittext": "Vu mustas $1 por redaktar pagini.",
+       "confirmedittext": "Vu mustas konfirmar vua adreso di e-posto ante ke vu povas redaktar pagini. Voluntez informar e validigar vua e-posto adreso tra vua [[Special:Preferences|preferaji di uzero]].",
        "nosuchsectiontitle": "On ne povis trovar la seciono",
        "nosuchsectiontext": "Vu probis redaktar seciono qua na existas.\nOl posible movesis od efacesis dum ke vu vidabis la pagino.",
        "loginreqtitle": "Eniro esas postulata",
        "anontalkpagetext": "----\n<em>Yen la diskuto-pagino por anonima uzero, qua ankore ne kreis konto, o se kreis, ne uzas ol.</em>\nDo, ni mustas uzar la IP-adreso por identifikar li.\nCa IP-adreso povas uzesar da multa uzeri.\nSe vu esas anonima uzero e kreas ke nerelevanta komenti sendesis a vu, voluntez [[Special:CreateAccount|krear konto]], o [[Special:UserLogin|facar 'log in']] por preventar futura konfundo kun altra anonima uzeri.",
        "noarticletext": "Til nun ne existas texto en ica pagino.\nVu povas [[Special:Search/{{PAGENAME}}|serchar ica titulo]] en altra pagini, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} serchar en la relata registri], o [{{fullurl:{{FULLPAGENAME}}|action=edit}} redaktar ica pagino]</span>.",
        "noarticletext-nopermission": "Til nun ne existas texto en ica pagino.\nVu povas [[Special:Search/{{PAGENAME}}|serchar ica titulo]] en altra pagini, <span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} serchar en la relata registri], o [{{fullurl:{{FULLPAGENAME}}|action=edit}} redaktar ica pagino]</span>, tamen vu ne havas permiso por krear ica pagino.",
+       "missing-revision": "La revizo $1 de la pagino \"{{FULLPAGENAME}}\" ne existas.\n\nLa frequa kauzo di ta mesajo esas existar ligilo por ula pagino qua efacesis antee.\nDetali pri to esas lektebla en la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
        "userpage-userdoesnotexist": "Uzeronomo \"$1\" ne registragesis.\nVoluntez konfirmar se vu volas krear/redaktar ica pagino.",
        "userpage-userdoesnotexist-view": "L'uzeronomo \"$1\" ne enrejistresis.",
        "blocked-notice-logextract": "Ica uzero nun esas blokusita.\nLa lasta protokolo pri blokuso esas videbla adinfre, por refero:",
        "note": "'''Noto:'''",
        "previewnote": "<strong>Atencez ke ico esas nur prevido.</strong> Ol ne registragesis ankore!",
        "continue-editing": "Irez a la redakto-areo",
-       "session_fail_preview": "'''Pardonez! Ni ne povis traktar vua redakto pro perdo di sesiono donaji.'''\nVoluntez probar itere.\nSe ol ankore nefuncionas, probez [[Special:UserLogout|ekirar]] e pose enirar.",
+       "session_fail_preview": "Pardonez! Ni ne povis traktar vua redakto pro perdo di informi de la sesiono.\n\nPosible vua sesiono finis. <strong>Voluntez verifikar se vu duras esar konektata, e probez itere.</strong>\n\nSe to ankore nefuncionar, probez [[Special:UserLogout|ekirar]] e seque rienirar.",
        "session_fail_preview_html": "Pardonez! Ni ne povis recevar vua redakto pro perdajo di dati.\n\n<em>Pro ke la wiki {{SITENAME}} permisas uzar bruta HTML, la previdado celesas por preventar ataki uzante JavaScript.</em>\n\n<strong>Se la probo di redakto esas legitima, voluntez itere sendar ol.</strong>\nSe duros ne funcionar, facez [[Special:UserLogout|logout]] ed itere facez login. Videz se vua retonavigilo (browser) permisas uzar 'cookies' de ica retosituo.",
+       "edit_form_incomplete": "<strong>Kelka parti de la redakto-formulario ne sendesis a la centrala komputero. Verifikez du foyi se vua redakti esas integra, e probez itere sendar li.</strong>",
        "editing": "Vu redaktas $1",
        "creating": "Vu kreas $1",
        "editingsection": "Vu redaktas $1 (seciono)",
        "unicode-support-fail": "Semblas ke vua retnavigilo ne suportas Unicode. To bezonesas por redaktar ica pagino e, pro to, vua redakto ne konservesis.",
        "yourdiff": "Diferi",
        "copyrightwarning": "Voluntez memorar ke omna kontributi a {{SITENAME}} esas sub la $2 (Videz $1 por detali).\nSe vu ne deziras ke altri modifikez vua artikli od oli distributesez libere, lore voluntez ne skribar oli hike.<br />\nPublikigante vua skribajo hike, vu asertas ke olu skribesis da vu ipsa o kopiesis de libera fonto.\n'''NE SENDEZ ARTIKLI KUN ''COPYRIGHT'' SEN PERMISO!'''",
+       "editpage-cannot-use-custom-model": "La modelo pri kontenajo di ca pagino ne povas modifikesar.",
+       "longpageerror": "<strong>Eroro: La texto quon vu sendis esas granda de {{PLURAL:$1|1 bicoko* (kbyte)|$1 bicoki* (kbytes)}}, e to esas plu granda kam {{PLURAL:$2|1 kbyte|$2 kbytes}}.</strong>\nLa texto ne povis prezervesar.",
        "protectedpagewarning": "<strong>Averto: Ica pagino esas protektita por ke nur uzeri kun administero-yuri povas redaktar ol.</strong>\nLa maxim recenta en-registrago provizesas:",
        "semiprotectedpagewarning": "<strong>Noto:</strong> Ica pagino protektesis, do nur enrejistrita uzeri povos modifikar ol.\nLa lasta modifiko en lua stando ('log') montresas adinfre, quale refero:",
        "cascadeprotectedwarning": "<strong>Noto:</strong> Ica pagino protektesis, do nur uzeri kun [[Special:ListGroupRights|specifika yuri]] povas redaktar ol, pro ol interpozesas en la sequanta {{PLURAL:$1|pagino|pagini}}, protektita en kaskado:",
        "template-protected": "(protektita)",
        "template-semiprotected": "(mi-protektita)",
        "hiddencategories": "Ca pagino esas membro di {{PLURAL:$1|1 celita kategorio|$1 celita kategorii}}:",
+       "nocreate-loggedin": "Vu ne povas krear nova pagini.",
        "permissionserrors": "Eroro permisal",
        "permissionserrorstext-withaction": "Vu ne darfas $2, pro la {{PLURAL:$1|kauzo|kauzi}} sequanta:",
        "recreate-moveddeleted-warn": "<strong>Atencez: Vu rikreos pagino qua antee efacesis.</strong>\n\nVu mustas konsiderar se esos konvenanta o ne riskribor ol.\nPor vua konoco, la motivo dil antea efaco montresas hike:",
        "moveddeleted-notice": "Ica pagino efacesis.\nL'efaco-registraro e la movo-registraro di la pagino povas videsar sequante, por konsulto.",
        "moveddeleted-notice-recent": "Pardonez, ica pagino efacesis recente (dum la lasta 24 hori).\nL'informo (log) pri l'efaco, la protektado e/o movo di la pagino povas videsar adinfre, por konsulto.",
        "log-fulllog": "Videz kompleta protokolo ('log')",
+       "edit-gone-missing": "Ne povis aktualigar la pagino.\nSemblas ke ol efacesis.",
        "edit-conflict": "Konflikto di editi.",
+       "edit-no-change": "Vua redakto ignoresis, pro nula modifikuro facesis en la texto.",
+       "edit-slots-cannot-add": "La sequanta {{{{PLURAL:$1|parto|parti}} ne suportesas hike: $2.",
        "postedit-confirmation-created": "La pagino kreesis.",
+       "postedit-confirmation-restored": "La pagino itere kreesis.",
        "postedit-confirmation-saved": "Vua redakto konservesis",
        "postedit-confirmation-published": "Vua redakturo publikigesis.",
        "edit-already-exists": "Ne povis krear nova pagino.\nOl ja existas.",
        "defaultmessagetext": "Ordinara mesajo-texto",
        "invalid-content-data": "Nevalida kontenajo",
+       "slot-name-main": "Precipua",
        "content-model-wikitext": "texto Wiki",
        "content-model-text": "simpla texto",
        "content-model-javascript": "JavaScript",
        "page_first": "unesma",
        "page_last": "finala",
        "histlegend": "Selektado por diferi: markizez la versioni por komparar e presez 'Enter' o la butono adinfre.<br />\nSurskriburo: '''({{int:cur}})''' = diferi kun la nuna versiono,\n'''({{int:last}})''' = diferi kun l'antea versiono,\n'''{{int:minoreditletter}}''' = mikra redakturo.",
-       "history-fieldset-title": "Serchar revizi",
+       "history-fieldset-title": "Serchar revizuri",
        "history-show-deleted": "Revizo nure efacita",
        "histfirst": "Maxim anciena",
        "histlast": "Maxim nova",
        "historysize": "({{PLURAL:$1|1 bicoko|$1 bicoki}})",
-       "historyempty": "(vakua)",
+       "historyempty": "vakua",
        "history-feed-title": "Historio di redakti",
        "history-feed-description": "Historio di redakti por ta pagino en la wikio",
        "history-feed-item-nocomment": "$1 ye $2",
+       "history-feed-empty": "La pagino demandata ne existas.\nPosible ol efacesis de la Wiki, o lua nomo modifikesis.\nVoluntez [[Special:Search|serchar en la Wiki]] pri nova pagini relevanta.",
        "history-edit-tags": "Redaktar etiketi de la versioni/revizi selektita",
        "rev-deleted-comment": "(rezumo di redakti forigesis)",
        "rev-deleted-user": "(uzantonomo forigita)",
        "rev-deleted-event": "(detali dil registro forigesis)",
        "rev-deleted-user-contribs": "[Uzero od IP-adreso eliminita - la redakto celesis de la kontributaji]",
+       "rev-deleted-text-permission": "La revizo de ca pagino <strong>efacesis</strong>.\nDetali pri to povas videsar en la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} deletion log].",
        "rev-deleted-unhide-diff": "Un ek la revizuri de ica difero <strong>efacesis</strong>.\nVu povas lektar la detali che la [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} protokolo pri efacado].\nVu ankore povas [$1 vidar la difero], se vu deziros kontinuar.",
        "rev-delundel": "montrar/celar",
        "rev-showdeleted": "montrar",
        "revisiondelete": "Efacar/Restaurar revizi",
+       "revdelete-no-file": "L'arkivo mencionata ne existas.",
        "revdelete-show-file-submit": "Yes",
        "revdelete-text-text": "Versioni efacata duros aparar en la pagino-historio, tamen parto ek lia kontenaji ne restos publike videbla.",
+       "revdelete-hide-text": "Revizata texto",
        "revdelete-hide-image": "Celar kontenajo dil arkivo",
+       "revdelete-hide-name": "Celez emo e parametri",
        "revdelete-hide-comment": "Rezumo di redakto",
        "revdelete-hide-user": "uzeronomo di redaktanto/IP-adreso",
        "revdelete-radio-same": "(ne modifikez)",
        "savedprefs": "Vua preferaji registragesis.",
        "timezonelegend": "Tempala zono:",
        "localtime": "Lokala tempo:",
-       "timezoneuseoffset": "Altra (definez precize)",
+       "timezoneuseoffset": "Altra (informez precize la tempo-difero)",
+       "timezone-useoffset-placeholder": "Exemple pri valori: \"-07:00\" o \"01:00\"",
        "servertime": "Kloko en la servanto:",
        "guesstimezone": "Obtenar la kloko dil \"browser\"",
        "timezoneregion-africa": "Afrika",
        "prefs-custom-json": "Ordinara JSON",
        "prefs-custom-js": "Ordinara JavaScript",
        "prefs-common-config": "CSS/JSON/JavaScript partigita da omna 'skins':",
+       "prefs-reset-intro": "Vu povas uzar ca pagino por riinformar vua preferaji kom 'default'.\nVu ne povas desfacar ta modifiko.",
        "prefs-emailconfirm-label": "Konfirmado dil e-posto (e-mail):",
        "youremail": "Vua e-adreso:",
        "username": "{{GENDER:$1|Uzeronomo}}:",
        "prefs-advancedwatchlist": "Progresiva selektaji (advanced options)",
        "prefs-displayrc": "Montrez selektebli",
        "prefs-displaywatchlist": "Montrez selektebli",
+       "prefs-changesrc": "Modifikuri montrata",
+       "prefs-changeswatchlist": "Modifikuri montrata",
+       "prefs-pageswatchlist": "Pagini surveyata",
        "prefs-tokenwatchlist": "Token",
        "prefs-diffs": "Diferi",
        "prefs-help-prefershttps": "Ica preferajo efektigesos dum vua sequanta 'login'.",
        "recentchanges": "Recenta chanji",
        "recentchanges-legend": "Recenta chanji preferaji",
        "recentchanges-summary": "Regardez la maxim recenta chanji en Wiki per ica pagino.",
-       "recentchanges-noresult": "Ne eventis modifiki segun ci kriterii, dum la periodo mencionita.",
+       "recentchanges-noresult": "Ne eventis modifikuri segun ca kriterii, dum la periodo mencionata.",
        "recentchanges-feed-description": "Regardez la maxim recenta chanji en la Wiki por ica pagino.",
        "recentchanges-label-newpage": "Ca redaktajo kreis nova pagino",
        "recentchanges-label-minor": "Ica es mikra redaktajo",
index 3263720..b8d3b69 100644 (file)
        "blocklog-showlog": "Questo utente è stato bloccato in precedenza. Il registro dei blocchi è riportato di seguito per informazione:",
        "blocklog-showsuppresslog": "Questo utente è stato bloccato e nascosto in precedenza. Il registro delle rimozioni è riportato di seguito per informazione:",
        "blocklogentry": "ha bloccato [[$1]] per un periodo di $2 $3",
-       "reblock-logentry": "ha cambiato le impostazioni del blocco per [[$1]] con una scadenza di $2 $3",
+       "reblock-logentry": "ha modificato le impostazioni del blocco per [[$1]] con una scadenza di $2 $3",
        "blocklogtext": "Di seguito sono elencate le azioni di blocco e sblocco utenti.\nGli indirizzi IP bloccati automaticamente non sono elencati.\nConsultare l'[[Special:BlockList|elenco dei blocchi]] per l'elenco dei bandi o blocchi attualmente operativi.",
        "unblocklogentry": "ha sbloccato $1",
        "block-log-flags-anononly": "solo utenti anonimi",
        "logentry-partialblock-block-page": "{{PLURAL:$1|della pagina|delle pagine}} $2",
        "logentry-partialblock-block-ns": "{{PLURAL:$1|del|dei}} namespace $2",
        "logentry-partialblock-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} alla modifica $7 con una scadenza di $5 $6",
-       "logentry-partialblock-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} bloccando la modifica $7 con una scadenza di $5 $6",
+       "logentry-partialblock-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} precludendo{{GENDER:$4|gli|le|gli}} la modifica $7 con una scadenza di $5 $6",
        "logentry-non-editing-block-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} in specifiche azioni non di modifica con una scadenza di $5 $6",
+       "logentry-non-editing-block-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} precludendo{{GENDER:$4|gli|le|gli}} specifiche azioni non di modifica con una scadenza di $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|ha bloccato}} {{GENDER:$4|$3}} con una scadenza di $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|ha modificato}} le impostazioni del blocco per {{GENDER:$4|$3}} con una scadenza di $5 $6",
        "logentry-import-upload": "$1 {{GENDER:$2|ha importato}} $3 tramite caricamento",
        "passwordpolicies-policy-passwordcannotbepopular": "La password non può essere {{PLURAL:$1|la password più popolare|nell'elenco delle $1 password più popolari}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "La password non può essere nell'elenco delle 100 000 password utilizzate più comunemente.",
        "easydeflate-invaliddeflate": "Il contenuto fornito non è compresso correttamente",
-       "unprotected-js": "Per motivi di sicurezza, non è possibile caricare JavaScript da pagine non protette. Crea javascript solo nel namespace MediaWiki o come sottopagina Utente"
+       "unprotected-js": "Per motivi di sicurezza, non è possibile caricare JavaScript da pagine non protette. Crea javascript solo nel namespace MediaWiki o come sottopagina Utente",
+       "userlogout-continue": "Se vuoi uscire [$1 vai alla pagina di logout].",
+       "userlogout-sessionerror": "Logout non riuscito per un errore nella sessione. [$1 Riprova]."
 }
index 7d58f19..287b3f4 100644 (file)
        "mycontris": "投稿記録",
        "anoncontribs": "投稿記録",
        "contribsub2": "利用者: {{GENDER:$3|$1}} ($2)",
+       "contributions-subtitle": "{{GENDER:$3|$1}}",
        "contributions-userdoesnotexist": "利用者アカウント「$1」は登録されていません。",
        "negative-namespace-not-supported": "負の値で指定される名前空間はサポートされていません。",
        "nocontribs": "これらの条件に一致する変更は見つかりませんでした。",
index 953f3ec..a2697e0 100644 (file)
        "tog-norollbackdiff": "되돌리기 후 차이를 보지 않기",
        "tog-useeditwarning": "바꾼 내용을 저장하지 않고 편집 페이지를 벗어날 때 내게 알리기",
        "tog-prefershttps": "로그인하는 동안 항상 보안 연결 사용",
-       "tog-showrollbackconfirmation": "롤백 링크를 클릭할 때 확인창을 띄웁니다",
+       "tog-showrollbackconfirmation": "롤백 링크를 클릭할 때 확인창을 표시합니다",
        "underline-always": "항상",
        "underline-never": "항상 긋지 않기",
        "underline-default": "스킨 또는 브라우저 기본값",
index 8475cbd..4c3d295 100644 (file)
@@ -19,7 +19,8 @@
                        "Macofe",
                        "Matma Rex",
                        "Robin van der Vliet",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Links óngersjtriepe",
        "recentchanges-label-unpatrolled": "Dees bewirking is nog neet gekónterleerd",
        "recentchanges-label-plusminus": "Dees paginagruuedje is verangerdj mit dit aantaal aan bytes",
        "recentchanges-legend-heading": "<strong>Legenda:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (zuuch ouch [[Special:NewPages|de nuuj pagina's]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(zuuch ouch [[Special:NewPages|de nuuj pagina's]])",
        "recentchanges-submit": "Tuin",
        "rcfilters-tag-remove": "Sjaf '$1' weg",
        "rcfilters-legend-heading": "<strong>Lies mit aafkórtinge:</strong>",
index e92e1f0..c53fb2e 100644 (file)
        "protect-cascadeon": "Šī lapa pašlaik ir aizsargāta, jo tā ir iekļauta {{PLURAL:$1|šajās lapās|šajā lapā|šajās lapās}} (mainot šīs lapas aizsardzības līmeni aizsardzība netiks noņemta):",
        "protect-default": "Atļaut visiem lietotājiem",
        "protect-fallback": "Atļaut tikai lietotājiem ar \"$1\" atļauju",
-       "protect-level-autoconfirmed": "Atļaut tikai pašpārbaudītajiem",
+       "protect-level-autoconfirmed": "Atļaut tikai reģistrētiem dalībniekiem",
        "protect-level-sysop": "Atļaut tikai administratoriem",
        "protect-summary-cascade": "kaskāde",
        "protect-expiring": "līdz $1 (UTC)",
index 547af26..cf7491e 100644 (file)
        "blocked-notice-logextract": "該簿現鎖也。\n下列之記鎖,以察之:",
        "clearyourcache": "'''註:'''重取頁面,文方新焉。\n'''Mozilla / Firefox / Safari:'''押''Shift''並點''重新載入'',或合鍵''Ctrl-F5''或''Ctrl-R''(Mac為''Command-R'')。\n'''Konqueror:'''點''Reload'',或押''F5''。\n:''Opera:'''須至''Tools→Preferences''清謄本。\n'''Internet Explorer:'''押''Ctrl''並點''重新整理'',或合鍵''Ctrl-F5''。",
        "usercssyoucanpreview": "'''訣:'''CSS應先「{{int:showpreview}}」而後存。",
-       "userjsyoucanpreview": "'''訣:'''JavaScript應先「{{int:showpreview}}」而後存。",
+       "userjsyoucanpreview": "<strong>訣:</strong>JavaScript應先「{{int:showpreview}}」而後存。",
        "usercsspreview": "'''預覽簿CSS。'''\n'''尚未儲焉!'''",
        "userjspreview": "'''預覽簿JavaScript。'''\n'''尚未儲焉!'''",
        "sitecsspreview": "'''預覽此CSS。'''\n'''尚未儲焉!'''",
index 14498ca..de3a8ec 100644 (file)
        "diff-multi-manyusers": "({{PLURAL:$1|Не е прикажана една меѓувремена преработка направена|Не се прикажани $1 меѓувремени преработки направени}} од повеќе од $2 {{PLURAL:$2|корисник|корисници}})",
        "diff-paragraph-moved-tonew": "Пасусот е преместен. Стиснете за да прејдете на новото место.",
        "diff-paragraph-moved-toold": "Пасусот е преместен. Стиснете за да прејдете на старото место.",
-       "difference-missing-revision": "Не пронајдов {{PLURAL:$2|една преработка|$2 преработки}} од оваа разлика ($1).\n\nОва обично се должи на застарена врска за разлики што води кон избришана страница.\nПовеќе подробности ќе најдете во [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневникот на бришења].",
+       "difference-missing-revision": "{{PLURAL:$2|Не е пронајдена|Не се пронајдени}} {{PLURAL:$2|една преработка|$2 преработки}} од оваа разлика ($1).\n\nОва обично се должи на застарена врска за разлики што води кон избришана страница.\nПовеќе подробности ќе најдете во [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневникот на бришења].",
        "searchresults": "Исход од пребарувањето",
        "search-filter-title-prefix": "Пребарување по страници чиј наслов почнува со „$1“",
        "search-filter-title-prefix-reset": "Пребарај по сите страници",
        "apisandbox-dynamic-parameters": "Дополнителни параметри",
        "apisandbox-dynamic-parameters-add-label": "Додај параметар:",
        "apisandbox-dynamic-parameters-add-placeholder": "Назив на параметарот",
-       "apisandbox-dynamic-error-exists": "Праметарот по име „$1“ веќе постои.",
+       "apisandbox-dynamic-error-exists": "Параметар по име „$1“ веќе постои.",
        "apisandbox-templated-parameter-reason": "Овој [[Special:ApiHelp/main#main/templatedparams|шаблонизиран параметар]] се нуди според {{PLURAL:$1|вредноста|вредностите}} на $2.",
        "apisandbox-deprecated-parameters": "Застарени параметри",
        "apisandbox-fetch-token": "Самопополни ја шифрата",
        "authprovider-confirmlink-request-label": "Сметки кои треба да се поврзат",
        "authprovider-confirmlink-success-line": "$1: Успешно поврзано.",
        "authprovider-confirmlink-failed": "Поврзувањето на сметката не е целосно успешно: $1",
-       "authprovider-confirmlink-ok-help": "Ð\9fÑ\80одолжи Ð´Ð° Ð¿Ñ\80икажÑ\83ваÑ\88 пораки за неуспешно поврзување.",
+       "authprovider-confirmlink-ok-help": "Ð\9fÑ\80одолжи Ð¿Ð¾Ñ\81ле Ð¿Ñ\80икажÑ\83ваÑ\9aеÑ\82о пораки за неуспешно поврзување.",
        "authprovider-resetpass-skip-label": "Прескокни",
        "authprovider-resetpass-skip-help": "Прескокни го задавањето на нова лозинка.",
        "authform-nosession-login": "Заверката е успешна, но вашиот прелистувач не може да „запомни“ дека сте најавени.\n\n$1",
index 69d91ae..e985b67 100644 (file)
@@ -19,7 +19,8 @@
                        "Macofe",
                        "Matma Rex",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Verwiezingen onderstrepen",
        "recentchanges-summary": "Up disse syde kün jy de lätste wysigingen van disse wiki bekyken.",
        "recentchanges-noresult": "Der waren in disse periode gien wiezigingen die an de kriteria voldoon.",
        "recentchanges-feed-description": "Zeuk naor de alderleste wiezingen op disse wiki in disse voer.",
-       "recentchanges-label-newpage": "Mid disse bewarking is een nye syde an-emaked",
+       "recentchanges-label-newpage": "Mid disse bewarking is een nye syde anemaked",
        "recentchanges-label-minor": "Dit is een kleine wysiging",
        "recentchanges-label-bot": "Disse bewarking is uutevoord döär een bot",
        "recentchanges-label-unpatrolled": "Disse bewarking is noch neet nå-ekeaken",
        "recentchanges-label-plusminus": "Disse sydegroutte is mid dit antal bytes ewysigd",
        "recentchanges-legend-heading": "<strong>Legenda:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (see ouk de [[Special:NewPages|lyste mid nye syden]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(see ouk de [[Special:NewPages|lyste mid nye syden]])",
        "recentchanges-submit": "Bekiek",
        "rcfilters-legend-heading": "<strong>Lyste mid ofkortingen:</strong>",
        "rcfilters-group-results-by-page": "Resultaoten per zied groeperen",
index 76a4237..0d8b6e7 100644 (file)
@@ -15,7 +15,8 @@
                        "Servien",
                        "Macofe",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Verwies ünnerstrieken",
        "recentchanges-label-bot": "Düsse Ännern worr maakt vun en Bot",
        "recentchanges-label-unpatrolled": "Düsse Ännern is noch nich kontrolleert worrn",
        "recentchanges-label-plusminus": "Disse Siedengrött is mit dit Antall Bytes ännert",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (süh ok de [[Special:NewPages|List mit ne'e Sieden]])",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(süh ok de [[Special:NewPages|List mit ne'e Sieden]])",
        "rcnotefrom": "Dit sünd de Ännern siet <b>$2</b> (bet to <b>$1</b> wiest).",
        "rclistfrom": "Wies ne’e Ännern siet $3 $2",
        "rcshowhideminor": "lütte Ännern $1",
index 787cff2..06941e6 100644 (file)
        "rcfilters-savedqueries-already-saved": "Deze filters zijn al opgeslagen. Wijzig uw instellingen om een nieuw Filter op te slaan.",
        "rcfilters-restore-default-filters": "Standaard filters terugzetten",
        "rcfilters-clear-all-filters": "Alle filters verwijderen",
-       "rcfilters-show-new-changes": "Toon nieuwste wijzigingen sinds $1",
+       "rcfilters-show-new-changes": "Toon nieuwste wijzigingen",
        "rcfilters-search-placeholder": "Filter wijzigingen (gebruik het menu of zoek op filternaam)",
        "rcfilters-invalid-filter": "Ongeldig filter",
        "rcfilters-empty-filter": "Geen actieve filters. Alle bijdragen worden weergegeven.",
index 6e14ad1..b8857e6 100644 (file)
        "speciallogtitlelabel": "Mål (tittel eller {{ns:user}}:brukarnamn for brukar):",
        "log": "Loggar",
        "logeventslist-submit": "Vis",
+       "logeventslist-more-filters": "Vis fleire loggar:",
        "all-logs-page": "Alle offentlege loggar",
        "alllogstext": "Kombinert vising av alle loggane på {{SITENAME}}. Du kan avgrense resultatet ved å velje loggtype, brukarnamn eller den sida som er påverka (hugs å skilje mellom store og små bokstavar)",
        "logempty": "Ingen element i loggen passar.",
        "logentry-rights-autopromote": "$1 vart automatisk {{GENDER:$2|forfremja}} frå $4 til $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|lasta opp}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|lasta opp}} ein ny versjon av $3",
+       "log-name-managetags": "Merkehandsamingslogg",
        "log-name-tag": "Merkelogg",
        "rightsnone": "(ingen)",
        "rightslogentry-temporary-group": "$1 (mellombels, fram til $2)",
index 9ab8dae..176a3bb 100644 (file)
        "randompage": "ߓߍ߲߬ߛߋ߲߬ߡߊ߬ ߞߐߜߍ",
        "statistics": "ߖߊ߬ߕߋ߬ߛߎ߬ߓߐ ߟߎ߬",
        "nbytes": "$1 {{PLURAL:$1|byte|bytes}}",
+       "prefixindex": "ߞߐߜߍ߫ ߡߍ߲ ߠߎ߬ ߓߍ߯ ߟߊߝߟߐߣߍ߲߫...",
        "listusers": "ߟߊ߬ߓߊ߰ߙߊ߬ߟߊ ߛߙߍߘߍ",
        "newpages": "ߘߐߜߍ߫ ߞߎߘߊ",
        "move": "ߊ߬ ߛߋ߲߬ߓߐ߫",
        "tooltip-ca-nstab-mediawiki": "ߞߊ߲ߞߋ ߗߋߛߓߍ ߘߐߜߍ߫",
        "tooltip-ca-nstab-template": "ߞߙߊߞߏ ߦߋ߫",
        "tooltip-ca-nstab-category": "ߦߌߟߡߊ߫ ߞߐߜߍ ߟߎ߬ ߦߌ߬ߘߊ߬",
+       "tooltip-minoredit": "ߣߌ߲߬ ߞߍ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ߲߬ ߘߏ߫ ߘߌ߫",
        "tooltip-save": "ߌ ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߠߊߞߎ߲߬ߘߎ߬",
        "tooltip-preview": "ߌ ߟߊ߫ ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߣߍ߲ ߘߐߜߍ߫ ߡߎߣߎ߲߬. ߏ߬ ߞߴߊ߬ ߟߊߞߎ߲߬ߘߎ ߢߍ߫ ߖߊ߰ߣߌ߲߫.",
        "tooltip-diff": "ߌ ߟߊ߫ ߛߓߍߟߌ߫ ߡߊߦߟߍ߬ߣߍ߲ ߦߌ߬ߘߊ߬",
+       "tooltip-watch": "ߞߐߜߍ ߣߌ߲߬ ߓߌ߬ߟߊ߬ ߌ ߟߊ߫ ߜߋ߬ߟߎ߬ߠߌ߲߬ ߛߙߍߘߍ ߘߐ߫",
        "tooltip-summary": "ߟߊ߬ߘߛߏ߬ߣߍ߲߬ ߛߎ߬ߘߎ߲߬ߣߍ߲ ߘߏ߫ ߟߊߘߏ߲߬",
        "simpleantispam-label": "ߊ߬ ߞߍ߫ <strong>not</strong> ߣߌ߲߬ ߠߝߊ߫߹",
+       "pageinfo-header-basic": "ߞߎ߲߬ߠߊ߬ߝߎ߬ߟߋ߲߬ ߓߊߖߎ ߟߎ߬",
        "pageinfo-header-edits": "ߡߊ߬ߦߟߍ߬ߡߊ߲߬ߠߌ ߘߐ߬ߝߐ",
        "pageinfo-header-restrictions": "ߞߐߜߍ ߟߊ߬ߞߊ߲߬ߘߊ߬ߟߌ",
        "pageinfo-display-title": "ߞߎ߲߬ߕߐ߰ ߦߋߕߊ",
        "redirect-file": "ߞߐߕߐ߯ ߕߐ߮",
        "specialpages": "ߘߎ߲߬ߘߎ߬ߡߊ߬ ߘߐߜߍ",
        "tag-filter": "[[Special:Tags|Tag]] ߢߡߊߘߏ߲߰ߣߍ߲",
+       "tag-list-wrapper": "[[ߛߐ߲߬ߞߌ߲߬ߠߌ߲߬: ߓߟߏߡߊߞߊ߬ߣߍ߲|{{PLURAL:$1|ߛߐ߲߬ߞߌ߲߬ߠߌ߲|ߛߐ߲߬ߞߌ߲߬ߠߌ߲ ߠߎ߬}}]]: $2",
        "tags-active-yes": "ߐ߲߬ߐ߲߬ߐ߲߫",
        "tags-active-no": "ߍ߲߬ߍ߲ߍ߲߬",
        "tags-hitcount": "$1{{PLURAL:$1|ߦߟߍ߬ߡߊ߲߬ߠߌ|ߦߟߍ߬ߡߊ߲߬ߠߌ ߠߎ߬ }}",
index dec8fbb..d59f154 100644 (file)
                        "DeRudySoulStorm",
                        "Railfail536",
                        "Vlad5250",
-                       "CiaPan"
+                       "CiaPan",
+                       "BadDog"
                ]
        },
        "tog-underline": "Podkreślenie linków:",
index cdaafe2..a6fa97c 100644 (file)
        "easydeflate-invaliddeflate": "Предоставленное содержимое не спущено надлежащим образом",
        "unprotected-js": "По соображениям безопасности JavaScript нельзя загружать с незащищённых страниц. Пожалуйста, создавайте скрипты только в пространстве имён MediaWiki: или как подстраницы участника.",
        "userlogout-continue": "Если вы хотите выйти, [$1 перейдите на страницу выхода].",
-       "userlogout-sessionerror": "Выход из системы не удался из-за ошибки сеанса. Пожалуйста, [$ 1 попробуйте ещё раз]."
+       "userlogout-sessionerror": "Выход из системы не удался из-за ошибки сеанса. Пожалуйста, [$1 попробуйте ещё раз]."
 }
index f6a73cc..4a743c5 100644 (file)
        "page_first": "ᱯᱟᱹᱦᱤᱞ",
        "page_last": "ᱢᱩᱪᱟᱹᱫ",
        "histlegend": "ᱮᱴᱟᱜ ᱵᱟᱪᱷᱟᱣ: ᱱᱟᱣᱟ ᱵᱚᱫᱚᱞᱠᱚ ᱛᱩᱞᱟᱹᱣ ᱢᱮᱱᱠᱷᱟᱱ, ᱨᱮᱰᱤᱭᱳ ᱵᱟᱠᱥᱚᱨᱮ ᱪᱤᱱ ᱮᱢ ᱠᱟᱛᱮ ᱵᱚᱞᱚᱜ ᱥᱮ ᱞᱟᱛᱟᱨ ᱨᱮᱱᱟᱜ ᱵᱟᱴᱚᱱ ᱞᱤᱱᱢᱮ᱾<br />\nᱩᱱᱩᱫᱩᱜ: <strong>({{int:cur}})</strong> = ᱱᱮᱛᱟᱨ ᱥᱩᱫᱷᱨᱟᱹᱣ ᱥᱟᱶᱛᱮ ᱥᱚᱝ, <strong>({{int:last}})</strong> = ᱞᱟᱦᱟ ᱨᱮᱭᱟᱜ ᱱᱟᱣᱟ ᱥᱩᱫᱷᱨᱟᱹᱣ ᱥᱟᱶᱛᱮ ᱥᱚᱝ, <strong>{{int:minoreditletter}}</strong> = ᱦᱩᱰᱤᱧ ᱥᱟᱯᱲᱟᱣ ᱾",
-       "history-fieldset-title": "ᱧᱮá±\9e á±\9fᱹᱨᱩ á±\9eá±\9fá±¹á±\9cᱤᱫ á±¥á±®á±¸á±«á±½á±¨á±\9f",
+       "history-fieldset-title": "ᱧᱮá±\9e á±\9fᱹᱨᱩ á±ªá±·á±\9fᱹᱱᱤ",
        "history-show-deleted": "ᱠᱷᱟᱹᱞᱤ ᱜᱮᱫ ᱜᱤᱰᱤᱭᱟᱜ ᱠᱚᱜᱮ",
        "histfirst": "ᱢᱟᱨᱮᱱᱟᱜ",
        "histlast": "ᱱᱟᱣᱟᱱᱟᱜ",
index aaaa803..711f0f3 100644 (file)
        "querypage-disabled": "Ova posebna stranica je onemogućena jer smanjuje performanse.",
        "apihelp": "Pomoć s prilogom",
        "apihelp-no-such-module": "Modul \"$1\" nije pronađen.",
+       "apisandbox": "Izvršnički pješčanik",
+       "apisandbox-jsonly": "Upotreba ovoga izvršničkog pješčanika zahtijeva JavaScript.",
+       "apisandbox-api-disabled": "Izvršnik je onemogućen na ovom sajtu.",
        "apisandbox-intro": "Stranica služi za eksperimentiranje s <strong>API-jem MediaWiki</strong>.\n\nViše o korištenju ovog API-ja možete pronaći na [[mw:API:Main page|njegovoj dokumentaciji]]. Primjer: [https://www.mediawiki.org/wiki/API#A_simple_example preuzimanje sadržaja glavne stranice]. Odaberite radnju da biste vidjeli više primjera.\n\nImajte na umu da se ono što radite na ovoj stranici može odraziti na wikiju, iako je to pješčanik.",
        "apisandbox-submit": "Napravi zahtjev",
        "apisandbox-reset": "Očisti",
        "apisandbox-retry": "Pokušaj ponovo",
+       "apisandbox-loading": "Učitavam informacije o izvršničkom modulu \"$1\"...",
+       "apisandbox-load-error": "Došlo je do greške pri učitavanju informacija o izvršničkom modulu \"$1\": $2",
+       "apisandbox-no-parameters": "Izvršnički modul nema parametara.",
+       "apisandbox-helpurls": "Linkovi za pomoć",
+       "apisandbox-examples": "Primjeri",
+       "apisandbox-dynamic-parameters": "Dodatni parametri",
+       "apisandbox-dynamic-parameters-add-label": "Dodaj parametar:",
+       "apisandbox-dynamic-parameters-add-placeholder": "Naziv parametra",
+       "apisandbox-dynamic-error-exists": "Parametar pod nazivom \"$1\" već postoji.",
+       "apisandbox-templated-parameter-reason": "Ovaj [[Special:ApiHelp/main#main/templatedparams|šabloniziran parametar]] nudi se u {{PLURAL:$1|vrijednosti|vrijednostima}} $2.",
+       "apisandbox-deprecated-parameters": "Zastarjeli parametri",
+       "apisandbox-fetch-token": "Samoispuni žeton",
+       "apisandbox-add-multi": "Dodaj",
+       "apisandbox-submit-invalid-fields-title": "Neka polja nisu ispravna",
+       "apisandbox-submit-invalid-fields-message": "Ispravite naznačena polja i pokušajte ponovo.",
+       "apisandbox-results": "Ishod",
+       "apisandbox-sending-request": "Šaljem zahtjev izvršniku...",
+       "apisandbox-loading-results": "Prijem ishod izvršnika...",
+       "apisandbox-results-error": "Došlo je do greške prilikom učitavanja odgovora upita izvršniku: $1.",
+       "apisandbox-results-login-suppressed": "Zahtjev je obrađen kao prijavljeni korisnik jer se može koristiti za zaobilaženje istoizvorne mjere sigurnosti. Imajte na umu da automatski rad s izvršničkim tokenima ne radi ispravno s tim zahtjevima, pa ćete ga morati ispuniti ručno.",
+       "apisandbox-request-selectformat-label": "Prikaži zahtijevane podatke kao:",
+       "apisandbox-request-format-url-label": "URL nizka upita",
+       "apisandbox-request-url-label": "URL zahtjeva:",
+       "apisandbox-request-json-label": "Zatraži JSON:",
+       "apisandbox-request-time": "Vreme zahtjeva: {{PLURAL:$1|$1 milisekunda|$1 milisekunde|$1 milisekundi}}",
+       "apisandbox-results-fixtoken": "Ispravi žeton i pošalji ponovo",
+       "apisandbox-results-fixtoken-fail": "Nisam uspio dobiti žeton \"$1\".",
+       "apisandbox-alert-page": "Polja na ovoj stranici su nevažeća.",
+       "apisandbox-alert-field": "Vrijednost ovog polja je nevažeća.",
+       "apisandbox-continue": "Nastavi",
+       "apisandbox-continue-clear": "Očisti",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} će [https://www.mediawiki.org/wiki/API:Query#Continuing_queries nastaviti] s posljednjim zahtjevom; \"{{int:apisandbox-continue-clear}}\" će izbrisati parametre vezane uz nastavljenje.",
+       "apisandbox-param-limit": "Unesite <kbd>max</kbd> da bi ste koristili najgornju granicu.",
+       "apisandbox-multivalue-all-namespaces": "$1 (svi imenski prostori)",
+       "apisandbox-multivalue-all-values": "$1 (sve vrijednosti)",
        "booksources": "Književni izvori",
        "booksources-search-legend": "Traži književne izvore",
        "booksources-search": "Traži",
        "authmanager-autocreate-noperm": "Automatsko pravljenje računa nije dozvoljeno.",
        "authmanager-autocreate-exception": "Automatsko pravljenje računa privremeno je onemogućeno zbog prijašnjih greški.",
        "authmanager-userdoesnotexist": "Korisnički račun \"$1\" nije registrovan.",
+       "authmanager-userlogin-remembermypassword-help": "Je li zaporka pohranjena dulje od trajanja sesije.",
+       "authmanager-username-help": "Korisničko ime za verifikaciju.",
+       "authmanager-password-help": "Lozinka za verifikaciju.",
+       "authmanager-domain-help": "Domen za vanjsku verifikaciju.",
+       "authmanager-retype-help": "Ponovite lozinku (za potvrdu).",
+       "authmanager-email-label": "E-pošta",
+       "authmanager-email-help": "Adresa e-pošte",
+       "authmanager-realname-label": "Pravo ime",
+       "authmanager-realname-help": "Pravo ime korisnika",
+       "authmanager-provider-password": "Verifikacija lozinkom",
+       "authmanager-provider-password-domain": "Verifikacija lozinkom i domenom",
+       "authmanager-provider-temporarypassword": "Privremena lozinka",
+       "authprovider-confirmlink-request-label": "Računi koji se trebaju povezati",
+       "authprovider-confirmlink-success-line": "$1: Uspješno povezano.",
+       "authprovider-confirmlink-failed": "Povezivanje računa nije uspjelo u potpunosti: $1",
+       "authprovider-confirmlink-ok-help": "Nastavi nakon prikazivanja poruka za neuspješno povezivanje.",
+       "authprovider-resetpass-skip-label": "Preskoči",
+       "authprovider-resetpass-skip-help": "Preskoči zadavanje nove lozinke.",
+       "authform-nosession-login": "Verifikacija je uspješna, ali vaš preglednik ne može \"zapamtiti\" da ste prijavljeni.\n\n$1",
+       "authform-nosession-signup": "Račun je napravljen, ali vaš preglednik ne može \"zapamtiti\" da ste prijavljeni.\n\n$1",
+       "authform-newtoken": "Nedostaje token. $1",
+       "authform-notoken": "Nedostaje token",
+       "authform-wrongtoken": "Pogrešan token",
+       "specialpage-securitylevel-not-allowed-title": "Nije dozvoljeno",
+       "specialpage-securitylevel-not-allowed": "Žao nam je, nije Vam dozvoljeno korištenje ove stranice jer nije moguće potvrditi vaš identitet.",
+       "authpage-cannot-login": "Ne mogu započeti prijavu.",
+       "authpage-cannot-login-continue": "Ne mogu nastaviti s prijavom. Najvjerovatnije vaša sesija je istekla.",
+       "authpage-cannot-create": "Ne mogu započeti stvaranje računa.",
+       "authpage-cannot-create-continue": "Ne mogu nastaviti s stvaranjem računa. Najvjerovatnije vaša sesija je istekla.",
+       "authpage-cannot-link": "Ne mogu započeti spajanje računa.",
+       "authpage-cannot-link-continue": "Ne mogu nastaviti sa spajanjem računa. Najvjerovatnije vaša sesija je istekla.",
+       "cannotauth-not-allowed-title": "Pristup je odbijen",
+       "cannotauth-not-allowed": "Nije vam dozvoljeno da koristite ovu stranicu",
        "userjsispublic": "Napomena: podstranice s JavaScriptom ne bi trebale sadržavati povjerljive podatke budući da ih drugi korisnici mogu vidjeti.",
        "userjsonispublic": "Imajte na umu: Podstranice s JSONom ne bi trebale sadržavati povjerljive podatke budući da su vidljive drugim korisnicima.",
        "usercssispublic": "Napomena: podstranice s CSS-om ne bi trebale sadržavati povjerljive podatke budući da ih drugi korisnici mogu vidjeti.",
        "passwordpolicies-policyflag-forcechange": "mora se promjeniti pri prijavi",
        "passwordpolicies-policyflag-suggestchangeonlogin": "predloži izmjenu pri prijavi",
        "easydeflate-invaliddeflate": "Sadržaj nije ispravno pročišćen",
-       "unprotected-js": "JavaScript ne može da se učita sa nezaštićenih stranica iz bezbednosnih razloga. Samo napravite JavaScript u imenskom prostoru MediaWiki: ili kao korisničku podstranicu"
+       "unprotected-js": "JavaScript ne može da se učita sa nezaštićenih stranica iz bezbednosnih razloga. Samo napravite JavaScript u imenskom prostoru MediaWiki: ili kao korisničku podstranicu",
+       "userlogout-continue": "Ako se želite odjaviti, [$1 nastavite na odjavnoj strnaici].",
+       "userlogout-sessionerror": "Odjava nije uspjela zbog sesijske pogreške. [$1 Pokušajte ponovo]."
 }
index 1adcdf5..ff96bae 100644 (file)
        "ipb-pages-label": "ورقے",
        "block-reason": "سبب:",
        "autoblocklist-submit": "ڳولو",
+       "blocklist-type": "قسم:",
+       "blocklist-type-opt-all": "یکے",
        "blocklist-reason": "سبب:",
        "infiniteblock": "بے انت",
        "blocklist-editing": "زیر ترمیم",
index d1e509f..615a609 100644 (file)
@@ -17,7 +17,8 @@
                        "아라",
                        "Macofe",
                        "Fitoschido",
-                       "Ghiutun"
+                       "Ghiutun",
+                       "ToBeFree"
                ]
        },
        "tog-underline": "Verknipfonga unterstreeicha:",
        "tooltip-watch": "Fiege diese Seite denner Beobachtungsliste hinzu",
        "tooltip-recreate": "Seite neu erstella, obwohl se geläscht wurde.",
        "tooltip-upload": "Huchloada starta",
-       "tooltip-rollback": "Moacht olle letzta Änderunga dar Seite, de vum gleichen Benutzer vurgenumma waan sein, dorch ocke eenen Klick rieckgängig.",
+       "tooltip-rollback": "Moacht olle letzta Änderunga dar Seite, de vum selben Benutzer vurgenumma waan sein, dorch ocke eenen Klick rieckgängig.",
        "tooltip-undo": "Moacht lediglich diese eene Änderung rieckgängig on zeigt doas Resultat ei dar Vorschau oa, damit ei dar Zusommafassungszeile eene Begründung angegeba waan koan.",
        "tooltip-summary": "Gib eine kurze Zusammenfassung ein",
        "anonymous": "{{PLURAL:$1|Anonymer Nutzer|Anonyme Nutzer}} uff {{SITENAME}}",
index 6e1cd3a..1f58441 100644 (file)
        "blockedtext-partial": "<strong>Вашем корисничком имену или IP адреси је блокирано прављење промена на овој страници. Још увек можете да уређујете друге странице на овом викију.</strong> Можете да видите потпуне детаље блокаде на [[Special:MyContributions|доприносима налога]].\n\nБлокаду је извршио/ла $1.\n\nНаведен је следећи разлог: <em>$2</em>.\n\n* Почетак блокаде: $8\n* Истек блокаде: $6\n* Намењена кориснику/ци или IP адреси: $7\n* ID блокаде #$5",
        "blockedtext": "<strong>Ваше корисничко име или IP адреса је блокирана.</strong>\n\nБлокирање је {{GENDER:$4|извршио|извршила}} $1.\nРазлог је <em>$2</em>.\n\n* Почетак блокирања: $8\n* Истек блокирања: $6\n* Блокирани: $7\n\nМожете да се обратите {{GENDER:$4|кориснику|корисници}} $1 или [[{{MediaWiki:Grouppage-sysop}}|администратору]] ради дискусије о блокирању.\nНе можете да користите функцију „{{int:emailuser}}” осим ако сте унели важећу е-адресу у својим [[Special:Preferences|подешавањима]] налога и нисте блокирани од коришћења исте.\nВаша тренутна IP адреса је $3, а ID блокирања #$5.\nНаведите све информације одозго при стварању било каквих упита.",
        "autoblockedtext": "Ваша IP адреса је аутоматски блокирана јер ју је користио други корисник, кога је {{GENDER:$4|блокирао|блокирала|блокирао/ла}} $1.\nРазлог:\n\n:<em>$2</em>\n\n* Почетак блокаде: $8\n* Крај блокаде: $6\n* Име корисника: $7\n\nМожете да контактирате {{GENDER:$4|корисника|корисницу|корисника/цу}} $1 или другог [[{{MediaWiki:Grouppage-sysop}}|администратора]] да бисте расправљали о блокади.\n\nЗапамтите да не можете да користите функцију „{{int:emailuser}}“ осим ако сте навели важећу е-адресу у [[Special:Preferences|подешавањима]].\n\nВаша тренутна IP адреса је $3, а ID блокаде $5.\nУкључите све горње детаље при прављењу било каквих упита.",
+       "systemblockedtext": "Медијавики је аутоматски блокирао ваше корисничко име или IP адресу.\nНаведен је следећи разлог:\n\n:<em>$2</em>\n\n* Почетак блокирања: $8\n* Истек блокирања: $6\n* Блокирање је намењено за: $7\n\nВаша тренурна IP адреса $3.\nУкључите све горенаведене детаље при прављењу било којих упита.",
        "blockednoreason": "разлог није наведен",
        "whitelistedittext": "$1 да бисте уређивали странице.",
        "confirmedittext": "Морате да потврдите е-адресу пре уређивања страница.\nПоставите и проверите ваљаност адресе преко [[Special:Preferences|подешавања]].",
        "page_first": "прва",
        "page_last": "последња",
        "histlegend": "Избор разлика: означите кутијице измена за упоређивање и притисните enter или дугме на дну.<br />\nОбјашњење: <strong>({{int:cur}})</strong> = разлика са најновијом изменом, <strong>({{int:last}})</strong> = разлика са претходном изменом, <strong>{{int:minoreditletter}}</strong> = мања измена.",
-       "history-fieldset-title": "Ð\9fÑ\80еÑ\82Ñ\80ага измена",
+       "history-fieldset-title": "ФилÑ\82Ñ\80иÑ\80аÑ\9aе измена",
        "history-show-deleted": "Само избрисане измене",
        "histfirst": "најстарије",
        "histlast": "најновије",
        "right-reupload-own": "замењивање сопствених датотека",
        "right-reupload-shared": "локално замењивање датотека на дељеном спремишту медија",
        "right-upload_by_url": "отпремање датотека са УРЛ-а",
-       "right-purge": "чишћење кеш меморије странице без потврде",
+       "right-purge": "чишћење кеш меморије странице",
        "right-autoconfirmed": "без ограничавања ставки за IP адресе",
        "right-bot": "сматрање измена као аутоматски процес",
        "right-nominornewtalk": "непоседовање мањих измена на страницама за разговор отвара прозор за нове поруке",
        "action-changetags": "додате и уклоните разне ознаке на појединачним изменама и уносима у дневницима",
        "action-deletechangetags": "бришете ознаке из базе података",
        "action-purge": "освежите ову страницу",
+       "action-blockemail": "блокирате кориснику слање е-порука",
+       "action-hideuser": "блокирате корисничко име, сакривајући га од јавности",
        "nchanges": "$1 {{PLURAL:$1|промена|промене|промена}}",
        "ntimes": "$1×",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|измена од ваше последње посете}}",
        "recentchanges-network": "Због техничког проблема, није могуће учитати резултате. Покушајте да освежите страницу.",
        "recentchanges-notargetpage": "Унесите име странице изнад да бисте видели промене сродне с овом страницом",
        "recentchanges-feed-description": "Пратите недавне промене на викију у овом фиду.",
-       "recentchanges-label-newpage": "Ð\9dова Ñ\81Ñ\82Ñ\80аниÑ\86а",
-       "recentchanges-label-minor": "Ð\9cања измена",
-       "recentchanges-label-bot": "Ð\91оÑ\82овÑ\81ка Ð¸Ð·Ð¼ÐµÐ½Ð°",
-       "recentchanges-label-unpatrolled": "Ð\9dепаÑ\82Ñ\80олиÑ\80ана Ð¸Ð·Ð¼Ðµна",
+       "recentchanges-label-newpage": "Ð\9eвом Ð¸Ð·Ð¼ÐµÐ½Ð¾Ð¼ Ð½Ð°Ð¿Ñ\80авÑ\99ена Ñ\98е Ð½Ð¾Ð²Ð° Ñ\81Ñ\82Ñ\80аниÑ\86а.",
+       "recentchanges-label-minor": "Ð\9eво Ñ\98е Ð¼ања измена",
+       "recentchanges-label-bot": "Ð\9eвÑ\83 Ð¸Ð·Ð¼ÐµÐ½Ñ\83 Ñ\98е Ð½Ð°Ð¿Ñ\80авио Ð±Ð¾Ñ\82",
+       "recentchanges-label-unpatrolled": "Ð\9eва Ð¸Ð·Ð¼ÐµÐ½Ð° Ñ\98оÑ\88 Ð½Ð¸Ñ\98е Ð¿Ð°Ñ\82Ñ\80олиÑ\80ана",
        "recentchanges-label-plusminus": "Промена величине странице у бајтовима",
        "recentchanges-legend-heading": "<strong>Легенда:</strong>",
-       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} ([[Special:NewPages|списак нових страница]])",
+       "recentchanges-legend-newpage": "Нова страница ([[Special:NewPages|списак]])",
        "recentchanges-legend-plusminus": "(<em>±123</em>)",
        "recentchanges-submit": "Прикажи",
        "rcfilters-tag-remove": "Уклоните филтер „$1“",
        "rcfilters-savedqueries-already-saved": "Ови филтери су већ сачувани. Промените своја подешавања да бисте направили нове сачуване филтере.",
        "rcfilters-restore-default-filters": "Врати подразумеване филтере",
        "rcfilters-clear-all-filters": "Обришите све филтере",
-       "rcfilters-show-new-changes": "Ð\9dаÑ\98новиÑ\98е Ð¿Ñ\80омене",
+       "rcfilters-show-new-changes": "Ð\9fогледаÑ\98 Ð½Ð¾Ð²Ðµ Ð¸Ð·Ð¼ÐµÐ½Ðµ Ð¾Ð´ $1",
        "rcfilters-search-placeholder": "Филтрирајте промене (користите мени или претрагу за име филтера)",
        "rcfilters-invalid-filter": "Неважећи филтер",
        "rcfilters-empty-filter": "Нема активних филтера. Сви доприноси су приказани.",
        "delete-confirm": "Брисање странице „$1“",
        "delete-legend": "Брисање",
        "historywarning": "<strong>Упозорење:</strong> Страница коју желите да избришете има историју са $1 {{PLURAL:$1|ревизијом|измене|измена}}:",
-       "historyaction-submit": "Прикажи",
+       "historyaction-submit": "Прикажи измене",
        "confirmdeletetext": "Управо ћете избрисати страницу, укључујући и њену историју.\nПотврдите своју намеру, да разумете последице и да ово радите у складу са [[{{MediaWiki:Policy-url}}|правилима]].",
        "actioncomplete": "Радња је завршена",
        "actionfailed": "Радња није успела",
        "blocklist-editing-page": "странице",
        "blocklist-editing-ns": "именски простори",
        "ipblocklist-empty": "Списак блокирања је празан.",
-       "ipblocklist-no-results": "ТÑ\80ажена IP Ð°Ð´Ñ\80еÑ\81а Ð¸Ð»Ð¸ ÐºÐ¾Ñ\80иÑ\81ниÑ\87ко Ð¸Ð¼Ðµ Ð½Ð¸Ñ\98е Ð±Ð»Ð¾ÐºÐ¸Ñ\80ано.",
+       "ipblocklist-no-results": "Ð\9dиÑ\81Ñ\83 Ð¿Ñ\80онаÑ\92ене Ð¾Ð´Ð³Ð¾Ð²Ð°Ñ\80аÑ\98Ñ\83Ñ\9bе Ð±Ð»Ð¾ÐºÐ°Ð´Ðµ Ð·Ð° Ñ\82Ñ\80аженÑ\83 Ð\98Ð\9f Ð°Ð´Ñ\80еÑ\81Ñ\83 Ð¸Ð»Ð¸ ÐºÐ¾Ñ\80иÑ\81ниÑ\87ко Ð¸Ð¼Ðµ.",
        "blocklink": "блокирај",
        "unblocklink": "деблокирај",
        "change-blocklink": "промени блокаду",
        "ipb_expiry_old": "Време истека је у прошлости.",
        "ipb_expiry_temp": "Сакривене блокаде корисника морају бити трајне.",
        "ipb_hide_invalid": "Не могу да потиснем овај налог; има више од {{PLURAL:$1|једне измене|$1 измена}}.",
+       "ipb_hide_partial": "Блокирања сакривених корисничких имена морају бити на нивоу сајта.",
        "ipb_already_blocked": "„$1“ је већ блокиран.",
        "ipb-needreblock": "$1 је већ блокиран. Желите ли да промените подешавања?",
        "ipb-otherblocks-header": "{{PLURAL:$1|Друга блокада|Друге блокаде}}",
index 5cf1a0f..4016fb8 100644 (file)
@@ -12,7 +12,8 @@
                        "아라",
                        "Macofe",
                        "Fitoschido",
-                       "Vlad5250"
+                       "Vlad5250",
+                       "PiefPafPier"
                ]
        },
        "tog-underline": "Ferwiese unnerstriekje:",
        "recentchanges-label-minor": "Litje Annerenge",
        "recentchanges-label-bot": "Annerenge truch n Bot",
        "recentchanges-label-unpatrolled": "Nit-kontrollierde Annerenge",
-       "recentchanges-legend-newpage": "$1 - näie Siede",
+       "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}}<br />(Sjuch uk ju [[Special:NewPages|Lieste mäd näie Sieden]])",
        "rcnotefrom": "Anwiesd wäide do Annerengen siet '''$2''' (max. '''$1''' Iendraage).",
        "rclistfrom": "Bloot näie Annerengen siet $3 $2 wiese.",
        "rcshowhideminor": "Litje Annerengen $1",
index fc0dd42..4f5202d 100644 (file)
        "passwordpolicies-policyflag-forcechange": "måste ändras vid inloggning",
        "passwordpolicies-policyflag-suggestchangeonlogin": "föreslå ändring vid inloggning",
        "easydeflate-invaliddeflate": "Innehåll som tillhandahålls är inte helt komprimerat",
-       "unprotected-js": "Av säkerhetsskäl kan inte JavaScript läsas in från oskyddade sidor. Skapa endast JavaScript i namnrymden MediaWiki: eller som en användarundersida."
+       "unprotected-js": "Av säkerhetsskäl kan inte JavaScript läsas in från oskyddade sidor. Skapa endast JavaScript i namnrymden MediaWiki: eller som en användarundersida.",
+       "userlogout-continue": "Om du vill logga ut, var god [$1 fortsätt till utloggningssidan].",
+       "userlogout-sessionerror": "Utloggning misslyckades p.g.a. sessionsfel. Var god [$1 försök igen]."
 }
index 5617165..a1aac61 100644 (file)
@@ -89,7 +89,7 @@
        "subcategories": "Адаккы бөлүктер",
        "category-media-header": "«$1» деп бөлүкте файлдар",
        "category-empty": "''Амгы бо бөлүкте медиа база арыннар чок.''",
-       "hidden-categories": "{{PLURAL:$1|1=Ð\9aөзүлбеÑ\81 Ð°Ò£Ð³Ñ\8bлал|Ð\9aөзүлбеÑ\81 аңгылалдар}}",
+       "hidden-categories": "{{PLURAL:$1|1=ЧажÑ\8bÑ\80ган Ð°Ò£Ð³Ñ\8bлал|ЧажÑ\8bÑ\80ган аңгылалдар}}",
        "hidden-category-category": "Чажыт бөлүктер",
        "category-subcat-count": "{{PLURAL:$2|1=Ук аңгылал чүгле дараазында иштики аңгылалдыг.|Ук аңгылалда бар-ла $2 иштики аңгылалдарның $1 иштики аңгылалы көстүп турар.}}",
        "category-subcat-count-limited": "Ук аңгылалда {{PLURAL:$1|1=бир|$1}} иштики аңгылал бар.",
        "categorypage": "Бөлүктүң арынын көөрү",
        "viewtalkpage": "Чугааны көөрү",
        "otherlanguages": "Өске дылдарга",
-       "redirectedfrom": "($1 ÐºÐ°Ñ\82ап Ñ\87оÑ\80Ñ\83Ñ\82кан)",
+       "redirectedfrom": "($1 Ð°Ñ\80Ñ\8bндан Ñ\88илÑ\87Ñ\8dÑ\8dн)",
        "redirectpagesub": "шигледир арын",
-       "lastmodifiedat": "Бо арын сөөлгү катап $1-ның хүнүнде, $2 турда өскерилген.",
+       "lastmodifiedat": "Бо арын сөөлгү катап $1 хүнде, $2 турда эдиттинген.",
        "protectedpage": "Камгалаган арын",
        "jumpto": "Шилчиир:",
        "jumptonavigation": "навигация",
        "badaccess": "Алдаг:Эргеңер чок.",
        "versionrequired": "МедиаВикиниң $1 үндүреризи херек",
        "ok": "Чөп",
-       "retrievedfrom": "Дөзү - «$1»",
+       "retrievedfrom": "Дөзү  «$1»",
        "youhavenewmessages": "Силерде $1 ($2) бар.",
        "youhavenewmessagesmulti": "«$1» деп арында силерге чаа чагаалар бар.",
        "editsection": "эдер",
        "editlink": "эдер",
        "viewsourcelink": "Үндезин кодту көөр",
        "editsectionhint": "«$1» салбырны эдер",
-       "toc": "Ð\94опÑ\87Ñ\83зÑ\83",
+       "toc": "Ð\94олÑ\83 Ñ\83Ñ\82казÑ\8b",
        "showtoc": "көргүзери",
        "hidetoc": "чажырары",
        "collapsible-collapse": "Кызырар",
        "userlogin-yourname-ph": "Бүрүткедир адыңар киириңер",
        "yourpassword": "Чажыт сөс",
        "userlogin-yourpassword": "Пароль",
+       "createacct-yourpassword-ph": "Уруңну (парольду) киириңер",
        "yourpasswordagain": "Чажыт сөзүңерни катап бижиңер:",
+       "createacct-yourpasswordagain": "Уруңну (парольду) бадыткаңар",
+       "createacct-yourpasswordagain-ph": "Уруңну (парольду) ам база киириңер",
        "login": "Кирери",
        "nav-login-createaccount": "Кирери / бүрүткел бижикти чогаадыры",
        "logout": "Үнери",
        "login-abort-generic": "Системаже таптыг эвес кирип тур силер",
        "loginlanguagelabel": "Дыл: $1",
        "pt-login": "Кирер",
-       "pt-createaccount": "Ð\91Ò¯Ñ\80Ò¯Ñ\82кел Ð±Ð¸Ð¶Ð¸Ðº ÐºÑ\8bлÑ\8bр",
+       "pt-createaccount": "Ð\91Ò¯Ñ\80Ò¯Ñ\82кенир",
        "pt-userlogout": "Үнер",
        "php-mail-error-unknown": "PHP-ниң mail() ажыл-чорудулгазында билбес алдаг бар.",
        "changepassword": "Чажыт сөстү өскертири",
        "nohistory": "Бо арынның өскерлиишкин төөгүзү чок.",
        "currentrev": "Амгы үе үндүрери",
        "currentrev-asof": "Амгы $1 үениң бижээни",
-       "revisionasof": "$1 версиязы",
+       "revisionasof": "$1 янзы-хевири",
        "revision-info": "$2 киржикчиниң $1 хүнүнде киирилдези",
-       "previousrevision": "←Амдыы арын",
-       "nextrevision": "Ð\90Ñ\80Ñ\82Ñ\8bк Ñ\87аа Ò¯Ð½Ð´Ò¯Ñ\80еÑ\80и→",
+       "previousrevision": "← Эрги арын",
+       "nextrevision": "Чаа Ð°Ñ\80Ñ\8bн →",
        "currentrevisionlink": "Амгы үе үндүрери",
        "cur": "амгы",
        "next": "дараазында",
        "unwatchedpages": "Хайгаарабас арыннар",
        "unusedtemplates": "Ажыглаан эвес майыктар",
        "unusedtemplateswlh": "өске холбаалар",
-       "randompage": "Душ бооп таваржып келген арын",
+       "randompage": "Дужар арын",
        "statistics": "Статистика",
        "statistics-pages": "Арыннар",
        "brokenredirects-edit": "өскертири",
        "newpages": "Чаа арыннар",
        "newpages-username": "Ажыглакчының ады:",
        "ancientpages": "Эң эрги арыннар",
-       "move": "Шимчээри",
+       "move": "Өскээр адаар",
        "movethispage": "Бо арынны шимчээри",
        "pager-newer-n": "{{PLURAL:$1|артык чаа}}",
        "pager-older-n": "{{PLURAL:$1|артык эрги}}",
        "newtitle": "Чаа ат:",
        "move-watch": "Бо арынны хайгаараары",
        "movepagebtn": "Арынны шимчээри",
-       "movelogpage": "ШимÑ\87Ñ\8dÑ\8dÑ\80инге Ð¶Ñ\83Ñ\80нал",
+       "movelogpage": "Ð\90Ñ\82 Ó©Ñ\81кеÑ\80илгелеÑ\80иниң Ð¶Ñ\83Ñ\80налÑ\8b",
        "movereason": "Чылдагаан:",
        "revertmove": "эгидип тургузары",
        "export": "Арынар үндүр дамчыдары",
        "tooltip-pt-logout": "Үнери",
        "tooltip-pt-createaccount": "Албан эвес-даа болза, бүрүткел бижикти кылгаш, системаже кирерин силерге саналдап тур бис.",
        "tooltip-ca-talk": "Кол арынны сайгарары",
-       "tooltip-ca-edit": "Ð\91о арынны эдер",
-       "tooltip-ca-addsection": "Чаа салбыр кылыр",
+       "tooltip-ca-edit": "Ук арынны эдер",
+       "tooltip-ca-addsection": "Чаа салбыр тургузуп кылыр",
        "tooltip-ca-viewsource": "Бо арынны өскертилгелерден камгалап каан, чогум ону көрүп, ооң үндезин кодун хоолгалап ап болур силер.",
        "tooltip-ca-history": "Арынның өскерлиишкиннериниң дептери",
        "tooltip-ca-protect": "Бо арынны камгалаары",
        "tooltip-ca-delete": "Бо арынны ырадыры",
-       "tooltip-ca-move": "Ð\91о Ð°Ñ\80Ñ\8bннÑ\8b Ñ\88имÑ\87Ñ\8dÑ\8dÑ\80и",
+       "tooltip-ca-move": "Ð\90Ñ\80Ñ\8bннÑ\8b Ó©Ñ\81кÑ\8dÑ\8dÑ\80 Ð°Ð´Ð°Ð°Ñ\80",
        "tooltip-ca-watch": "Бо арынны хайгааралыңар даңзызынче немээр",
        "tooltip-ca-unwatch": "Силерниң хайгаарал даңзызындан бо арынны ырадыры",
-       "tooltip-search": "{{grammar:locative|{{SITENAME}}}} дилээр",
+       "tooltip-search": "{{grammar:locative|{{SITENAME}}}} Ð¸Ñ\88Ñ\82инден Ð´Ð¸Ð»Ñ\8dÑ\8dÑ\80",
        "tooltip-search-go": "Шак ындыг аттыг арынче шилчиир",
-       "tooltip-search-fulltext": "Ð\90йÑ\8bÑ\82Ñ\82Ñ\8bнган сөзүглелдиг арыннарны дилээр",
+       "tooltip-search-fulltext": "Ук сөзүглелдиг арыннарны дилээр",
        "tooltip-p-logo": "Кол арынче кирер",
        "tooltip-n-mainpage": "Кол арынче шилчиир",
        "tooltip-n-mainpage-description": "Кол арынче кирер",
        "confirm-unwatch-button": "Чөп",
        "imgmultipageprev": "← эрткен арын",
        "imgmultipagenext": "дараазында арын →",
-       "imgmultigo": "Go!",
+       "imgmultigo": "Шилчиир!",
        "table_pager_next": "Дараазында арын",
        "table_pager_prev": "Эрткен арын",
        "table_pager_first": "Бирги арын",
index 39f7f80..fac3da1 100644 (file)
        "passwordpolicies-policyflag-forcechange": "має бути змінено при вході",
        "passwordpolicies-policyflag-suggestchangeonlogin": "запропонувати зміну при вході",
        "easydeflate-invaliddeflate": "Наданий вміст не стиснений належним чином",
-       "unprotected-js": "З міркувань безпеки JavaScript не можна запускати з незахищених сторінок. Будь ласка, створюйте javascript лише в просторі MediaWiki, або як особисту підсторінку користувача."
+       "unprotected-js": "З міркувань безпеки JavaScript не можна запускати з незахищених сторінок. Будь ласка, створюйте javascript лише в просторі MediaWiki, або як особисту підсторінку користувача.",
+       "userlogout-continue": "Якщо Ви хочете вийти із системи, [$1 перейдіть на сторінку виходу].",
+       "userlogout-sessionerror": "Вихід із системи не відбувся через помилку сесії. Будь ласка, [$1 спробуйте знову]."
 }
index 2ab144f..e40a5f9 100644 (file)
        "undo-failure": "呢個編輯唔能夠取消,由於同途中嘅編輯有衝突。",
        "undo-norev": "呢個編輯唔能夠取消,由於佢唔存在或者刪除咗。",
        "undo-nochange": "呢個編輯睇嚟經已一早取消咗。",
-       "undo-summary": "取消由[[Special:Contributions/$2|$2]] ([[User talk:$2|對話]])所做嘅修訂 $1",
+       "undo-summary": "取消由[[Special:Contributions/$2|$2]]([[User talk:$2|傾偈]])所做嘅修訂 $1",
        "undo-summary-username-hidden": "取消匿埋咗嘅用戶嘅修改版本 $1",
        "cantcreateaccount-text": "由呢個IP地址 ('''$1''') 開嘅新戶口已經被[[User:$3|$3]]封鎖。\n\n當中俾$3封鎖嘅原因係''$2''",
        "cantcreateaccount-range-text": "由呢個IP地址範圍<strong>$1</strong>(包括你個IP <strong>$4</strong>)開嘅新戶口已經畀[[User:$3|$3]]封鎖咗。\n\n$3畀嘅理由係<em>$2</em>",
index 829f802..2213192 100644 (file)
                        "Ff98sha",
                        "VulpesVulpes825",
                        "佛壁灯",
-                       "94rain"
+                       "94rain",
+                       "Viztor"
                ]
        },
        "tog-underline": "链接下划线:",
        "blocklist-tempblocks": "隐藏临时封禁",
        "blocklist-addressblocks": "隐藏单个IP封禁",
        "blocklist-type": "类型:",
+       "blocklist-type-opt-all": "全部",
+       "blocklist-type-opt-sitewide": "全站",
+       "blocklist-type-opt-partial": "部分的",
        "blocklist-rangeblocks": "隐藏IP段封禁",
        "blocklist-timestamp": "时间",
        "blocklist-target": "目标",
        "blocklist-editing-page": "页面",
        "blocklist-editing-ns": "名字空间",
        "ipblocklist-empty": "封禁列表为空。",
-       "ipblocklist-no-results": "请æ±\82ç\9a\84IPå\9c°å\9d\80æ\88\96ç\94¨æ\88·å\90\8d没æ\9c\89被封禁。",
+       "ipblocklist-no-results": "请æ±\82ç\9a\84IPå\9c°å\9d\80æ\88\96ç\94¨æ\88·å\90\8dæ\9cª被封禁。",
        "blocklink": "封禁",
        "unblocklink": "解封",
        "change-blocklink": "更改封禁",
        "passwordpolicies-policyflag-forcechange": "必须在登录时更改",
        "passwordpolicies-policyflag-suggestchangeonlogin": "建议在登录时更改",
        "easydeflate-invaliddeflate": "提供的内容未被适当缩小",
-       "unprotected-js": "基于安全原因,JavaScript不能在未保护页面中载入。请在 MediaWiki : 命名空间或者用户子页面中添加JavaScript。"
+       "unprotected-js": "基于安全原因,JavaScript不能在未保护页面中载入。请在 MediaWiki : 命名空间或者用户子页面中添加JavaScript。",
+       "userlogout-continue": "如果你希望登出请[$1 点这里]。",
+       "userlogout-sessionerror": "登出失败,会话错误。请[$1 重试]"
 }
index a88940b..1eab155 100644 (file)
        "clearyourcache": "<strong>注意:</strong>在您儲存之後您必須清除瀏覽器快取才可看到最新的變更。\n* <strong>Firefox / Safari:</strong>按住 <em>Shift</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em> 或 <em>Ctrl-R</em> (Mac 則為 <em>⌘-R</em>) \n* <strong>Google Chrome:</strong>按 <em>Ctrl-Shift-R</em> (Mac 則為 <em>⌘-Shift-R</em>) \n* <strong>Internet Explorer:</strong>按住 <em>Ctrl</em> 時點選 <em>重新整理</em>,或按 <em>Ctrl-F5</em>\n* <strong>Opera:</strong>前往 <em>選單 → 設定</em> (在 Mac 為 <em>Opera → 偏好設定</em>) 然後再到 <em>隱私 & 安全性 → 清除瀏覽資料 → 已快取的圖片與檔案</em>。",
        "usercssyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 CSS 。",
        "userjsonyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 JSON。",
-       "userjsyoucanpreview": "<strong>提示:</strong>在儲存之前使用 \"{{int:showpreview}}\" 按鈕來測試您的新 JavaScript 。",
+       "userjsyoucanpreview": "<strong>提示:</strong>在儲存之前使用「{{int:showpreview}}」按鈕來測試您的新 JavaScript。",
        "usercsspreview": "<strong>您目前正預覽您的使用者 CSS,CSS 還尚未儲存!</strong>",
        "userjsonpreview": "<strong>請注意您僅是在測試/預覽您的使用者 JSON 設定,內容還尚未儲存!</strong>",
        "userjspreview": "<strong>您目前正預覽您的使用者 JavaScript,JavaScript 還尚未儲存!</strong>",
        "version-libraries-description": "描述",
        "version-libraries-authors": "作者",
        "redirect": "依檔案、使用者、頁面、修訂或日誌 ID 來重新導向",
-       "redirect-summary": "此特殊頁面可用來重新導向至檔案 (指定檔案名稱)、頁面 (指定修訂 ID 或頁面 ID)、使用者頁面 (指定使用者 ID)、或者日誌項目 (指定日誌 ID)。用法:[[{{#Special:Redirect}}/file/Example.jpg]]、[[{{#Special:Redirect}}/page/64308]]、[[{{#Special:Redirect}}/revision/328429]]、[[{{#Special:Redirect}}/user/101]] 或 [[{{#Special:Redirect}}/logid/186]]。",
+       "redirect-summary": "此特殊頁面可用來重新導向至檔案(指定檔案名稱)、頁面(指定修訂 ID 或頁面 ID)、使用者頁面(指定使用者 ID)、或者日誌項目(指定日誌 ID)。用法:[[{{#Special:Redirect}}/file/Example.jpg]]、[[{{#Special:Redirect}}/page/64308]]、[[{{#Special:Redirect}}/revision/328429]]、[[{{#Special:Redirect}}/user/101]] 或 [[{{#Special:Redirect}}/logid/186]]。",
        "redirect-submit": "執行",
        "redirect-lookup": "查詢:",
        "redirect-value": "值:",
index 1728695..f27ea2f 100644 (file)
@@ -211,7 +211,8 @@ class ImportImages extends Maintenance {
 
                                if ( $checkUserBlock && ( ( $processed % $checkUserBlock ) == 0 ) ) {
                                        $user->clearInstanceCache( 'name' ); // reload from DB!
-                                       if ( $user->isBlocked() ) {
+                                       // @TODO Use PermissionManager::isBlockedFrom() instead.
+                                       if ( $user->getBlock() ) {
                                                $this->output( $user->getName() . " was blocked! Aborting.\n" );
                                                break;
                                        }
index cb85a53..7a5e93e 100644 (file)
@@ -242,6 +242,7 @@ U+09FCE鿎|U+040EE䃮|
 U+09FCF鿏|U+04951䥑|
 U+09FD2鿒|U+09FD3鿓|
 U+09FD4鿔|U+093B6鎶|
+U+22016𢀖|U+05DE0巠|
 U+235CB𣗋|U+06B13欓|
 U+23C97𣲗|U+06E4B湋|
 U+23C98𣲘|U+06F55潕|
index 6c34e0b..1613b83 100644 (file)
@@ -26,6 +26,8 @@
 名份 名分
 職份 职分
 份外 分外
+份外,      份外,
+份外卖      份外卖
 份內 分内
 部份 部分
 知識份子   知识分子
 臨著稱      临著称
 臨著者      临著者
 臨著述      临著述
-麗著 丽着
-麗著書      丽著书
-麗著作      丽著作
-麗著名      丽著名
-麗著錄      丽著录
-麗著稱      丽著称
-麗著者      丽著者
-麗著述      丽著述
 樂著 乐着
 樂著書      乐著书
 樂著作      乐著作
 樂著稱      乐著称
 樂著者      乐著者
 樂著述      乐著述
+樂著《      乐著《
 乘著 乘着
 乘著書      乘著书
 乘著作      乘著作
 亮著称      亮著称
 亮著者      亮著者
 亮著述      亮著述
+亮著《      亮著《
 仗著 仗着
 仗著書      仗著书
 仗著作      仗著作
 信著称      信著称
 信著者      信著者
 信著述      信著述
+信著《      信著《
 候著 候着
 候著書      候著书
 候著作      候著作
 光著称      光著称
 光著者      光著者
 光著述      光著述
+光著《      光著《
 關著 关着
 關著書      关著书
 關著作      关著作
 印著稱      印著称
 印著者      印著者
 印著述      印著述
+印著《      印著《
 壓著 压着
 壓著書      压著书
 壓著作      压著作
 定著称      定著称
 定著者      定著者
 定著述      定著述
+定著《      定著《
 對著 对着
 對著書      对著书
 對著作      对著作
 展著稱      展著称
 展著者      展著者
 展著述      展著述
+展著《      展著《
 帶著 带着
 帶著書      带著书
 帶著作      带著作
 心著称      心著称
 心著者      心著者
 心著述      心著述
+心著《      心著《
 忍著 忍着
 忍著書      忍著书
 忍著作      忍著作
 懷著稱      怀著称
 懷著者      怀著者
 懷著述      怀著述
+懷著《      怀著《
 急著 急着
 急著書      急著书
 急著作      急著作
 夢著稱      梦著称
 夢著者      梦著者
 夢著述      梦著述
+夢著《      梦著《
 梳著 梳着
 梳著作      梳著作
 梳著名      梳著名
 憑著者      凭著者
 三十六著   三十六着
 走為上著   走为上着
+機率 几率
+乙個 一个
+乙隻 一只
+乙份 一份
 記憶體      内存
 乙太網      以太网
 點陣圖      位图
@@ -2551,11 +2559,11 @@ IP位址        IP地址
 空中巴士   空中客车
 電視劇集   电视剧
 狂牛症      疯牛病
+瘋牛症      疯牛病
 結他 吉他
 了結他      了结他
 連結他      连结他
 鏈結 链接
-已開發國家        发达国家
 太空飛行員        宇航员
 太空衣      宇航服
 外部連結   外部链接
@@ -2715,3 +2723,5 @@ A型肝炎        甲型肝炎
 道瓊 道琼斯
 聖佐治      圣乔治
 格瑞那丁   格林纳丁斯
+普立茲獎   普利策奖
+富比士      福布斯
index 93acb33..4bc445b 100644 (file)
 來著 來着
 樂著 樂着
 努力著      努力着
-麗著 麗着
 連著 連着
 戀著 戀着
 涼著 涼着
 定著称      定著稱
 定著錄      定著錄
 定著書      定著書
+定著《      定著《
 動著作      動著作
 動著者      動著者
 動著名      動著名
 光著称      光著稱
 光著錄      光著錄
 光著書      光著書
+光著《      光著《
 跪著作      跪著作
 跪著者      跪著者
 跪著名      跪著名
 懷著稱      懷著稱
 懷著錄      懷著錄
 懷著書      懷著書
+懷著《      懷著《
 晃著作      晃著作
 晃著者      晃著者
 晃著名      晃著名
 樂著稱      樂著稱
 樂著錄      樂著錄
 樂著書      樂著書
+樂著《      樂著《
 努力著作   努力著作
 努力著者   努力著者
 努力著名   努力著名
 努力著称   努力著稱
 努力著錄   努力著錄
 努力著書   努力著書
-麗著作      麗著作
-麗著者      麗著者
-麗著名      麗著名
-麗著述      麗著述
-麗著稱      麗著稱
-麗著錄      麗著錄
-麗著書      麗著書
 連著作      連著作
 連著者      連著者
 連著名      連著名
 亮著称      亮著稱
 亮著錄      亮著錄
 亮著書      亮著書
+亮著《      亮著《
 臨著作      臨著作
 臨著者      臨著者
 臨著名      臨著名
 夢著稱      夢著稱
 夢著錄      夢著錄
 夢著書      夢著書
+夢著《      夢著《
 蒙著作      蒙著作
 蒙著者      蒙著者
 蒙著名      蒙著名
 心著称      心著稱
 心著錄      心著錄
 心著書      心著書
+心著《      心著《
 信著作      信著作
 信著者      信著者
 信著名      信著名
 信著称      信著稱
 信著錄      信著錄
 信著書      信著書
+信著《      信著《
 行著作      行著作
 行著者      行著者
 行著名      行著名
 印著稱      印著稱
 印著錄      印著錄
 印著書      印著書
+印著《      印著《
 應著作      應著作
 應著者      應著者
 應著名      應著名
 展著稱      展著稱
 展著錄      展著錄
 展著書      展著書
+展著《      展著《
 站著作      站著作
 站著者      站著者
 站著名      站著名
 厄瓜多尔   厄瓜多爾
 厄瓜多爾   厄瓜多爾
 厄瓜多      厄瓜多爾
+百慕大      百慕達
 厄利垂亞   厄立特里亞
 吉布地      吉布堤
 哥斯大黎加        哥斯達黎加
@@ -3078,3 +3081,7 @@ IP地址  IP位址
 圣乔治      聖佐治
 聖喬治      聖佐治
 格瑞那丁   格林納丁斯
+空中客车   空中巴士
+疯牛病      瘋牛症
+狂牛症      瘋牛症
+普利策奖   普立茲獎
index aacec98..4adbbcf 100644 (file)
 情蒐 情搜
 蘋果 苹果
 蘋婆 苹婆
+鄭蘋如      郑苹如
 於之莹      於之莹
 陆徵祥      陆徵祥
 瞭臺 瞭台
index dd8e5d0..bf24176 100644 (file)
 着眼于      著眼於
 桃金娘      桃金孃
 粘膜 黏膜
+几率 機率
 缺省 預設
 以太网      乙太網
 光盘 光碟
 唐纳德·特朗普   唐納·川普
 當勞·特朗普      唐納·川普
 當奴·特朗普      唐納·川普
-æ¦\82ç\8e\87 æ©\9fç\8e\87
\96¯牛症      狂牛症
+ç\96¯ç\89\9bç\97\85      ç\8b\82ç\89\9bç\97\87
\98\8b牛症      狂牛症
 甲肝 A肝
 甲型肝炎   A型肝炎
 乙肝 B肝
@@ -661,7 +662,6 @@ IP地址    IP位址
 獨立國家聯合體  獨立國家國協
 东南亚国家联盟  東南亞國家協會
 東南亞國家聯盟  東南亞國家協會
-发达国家   已開發國家
 哥特式      哥德式
 落車 下車
 上落客      上下客
@@ -821,3 +821,5 @@ IP地址    IP位址
 聖佐治      聖喬治
 格林纳丁斯        格瑞那丁
 格林納丁斯        格瑞那丁
+空中客车   空中巴士
+普利策奖   普立茲獎
index a3565b8..871f1ef 100644 (file)
@@ -91,8 +91,6 @@
 古語云      古語云
 經有云      經有云
 語有云      語有云
-采納 採納
-風采 風采
 于樂 于樂
 于軍 于軍
 于堅 于堅
 于國治      于國治
 于楓 于楓
 黎吉雲      黎吉雲
-于飛 于飛
+鳳凰于飛   鳳凰于飛
 鄉愿 鄉愿
 愿樸 愿樸
 謹愿 謹愿
 苹果 蘋果
 苹果干      蘋果乾
 苹婆 蘋婆
+郑苹如      鄭蘋如
 昵称 暱稱
 單于 單于
 鮮于 鮮于
 單向 單向
 轉向 轉向 #分詞用
 十出頭      十出頭
+更钟情      更鍾情
+更钟爱      更鍾愛
+更钟意      更鍾意
index 8d09901..5ff1d63 100644 (file)
@@ -206,6 +206,7 @@ U+05DBD嶽|U+05CB3岳|
 U+05DD6巖|U+05CA9岩|
 U+05DD7巗|U+05CA9岩|
 U+05DD8巘|U+2AA58𪩘|
+U+05DE0巠|U+22016𢀖|
 U+05DF5巵|U+0536E卮|
 U+05E00帀|U+0531D匝|
 U+05E0B帋|U+07EB8纸|
index 24d8a42..4a480ab 100644 (file)
 採運
 採風
 採血
+採編
 花不要採
 官地為寀
 寮寀
 標籤
 書籤
 發籤
-粉籤子
 路籤
-更籤
-好籤
 火籤
 籤幐
 籤押
 照入籤
-制籤
 抽公籤
 瑤籤
 藥籤
 巴而朮
 朮虎高
 耶律朮烈
+朮忽
 髼鬆
 皮鬆
 濛鬆雨
 石英鐘錶
 鐘律
 看鐘
-看錶
-看表面
 鐵鐘
 鐘不敲不響
 對準鐘
 科斗
 斗牛星
 斗法會
+抓斗
 小几
 尸利
 尸祿
 裏白 #植物常用名
 烏蘇里 #分詞用
 夸脫
-風采
 代碼表
 編碼表
 字碼表
 葉叶琹
 胡子昂
 胡子嬰
-包括
 特别致
 分别致
 韶山沖
 于氏
 于娜
 于娟
-于山
 于帥
 于慧
 于振
 于靖
 于勒
 于格
-于飛
+鳳凰于飛
 于仁泰
 于會泳
 于偉國
 李志喜
 于欣
 于少保
-于海
-於海洋
-於海邊
-於海上
-於海拔
-於海平面
-於山東
-於山西
 于凌辰
 于魁智
 于鬯
 於震前
 於震後
 於震中
-由於 #分詞用
 固定制
 划船
 划不來
index ec2eff4..96fcebf 100644 (file)
@@ -110,7 +110,7 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance {
                $ok = false;
                while ( !$ok ) {
                        try {
-                               $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) {
+                               $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) {
                                        $dbw->insert( 'revision', self::$dummyRev, $fname );
                                        $id = $dbw->insertId();
                                        $toDelete[] = $id;
@@ -147,7 +147,7 @@ class PopulateArchiveRevId extends LoggedUpdateMaintenance {
                        self::$dummyRev = self::makeDummyRevisionRow( $dbw );
                }
 
-               $updates = $dbw->doAtomicSection( __METHOD__, function ( $dbw, $fname ) use ( $arIds ) {
+               $updates = $dbw->doAtomicSection( __METHOD__, function ( IDatabase $dbw, $fname ) use ( $arIds ) {
                        // Create new rev_ids by inserting dummy rows into revision and then deleting them.
                        $dbw->insert( 'revision', array_fill( 0, count( $arIds ), self::$dummyRev ), $fname );
                        $revIds = $dbw->selectFieldValues(
index b923832..469f78e 100644 (file)
@@ -2514,6 +2514,7 @@ return [
                        'oojs-ui-widgets',
                        'mediawiki.widgets.styles',
                        // TitleInputWidget
+                       'oojs-ui.styles.icons-content',
                        'mediawiki.Title',
                        'mediawiki.api',
                        'mediawiki.String',
index 42b0771..447b936 100644 (file)
                        if ( mw.Title && content instanceof mw.Title ) {
                                // Parse existing page
                                config.page = content.getPrefixedDb();
+                               apiPromise = this.get( config );
                        } else {
                                // Parse wikitext from input
                                config.text = String( content );
+                               apiPromise = this.post( config );
                        }
 
-                       apiPromise = this.get( config );
-
                        return apiPromise
                                .then( function ( data ) {
                                        return data.parse.text;
index 0786048..005f66e 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14.25C5 19.208 6.582 21 8.502 21H19V3zm8.002 3h4v4l-1.281-1.281L12.44 12l3.281 3.281L17.002 14v4h-4l1.313-1.313L10.596 13H7.002v-2h3.594l3.688-3.719z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm6.002 3h4v4l-1.2812-1.2812-3.2812 3.2812 3.2812 3.2812 1.2812-1.2812v4h-4l1.3125-1.3125-3.7187-3.6875h-3.5938v-2h3.5938l3.6875-3.7188-1.2812-1.2812z"/>
 </svg>
index 753c9d5..7e56a70 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14.25c0 1.958-1.582 3.75-3.502 3.75H5V3zm-8.002 3h-4v4l1.281-1.281L11.56 12l-3.28 3.281L6.998 14v4h4l-1.313-1.313L13.404 13h3.594v-2h-3.594L9.716 7.281z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-6.002 3h-4v4l1.2812-1.2812 3.2812 3.2812-3.2812 3.2812-1.2812-1.2812v4h4l-1.3125-1.3125 3.7188-3.6875h3.5938v-2h-3.5938l-3.6875-3.7188z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-ltr.svg b/resources/src/mediawiki.widgets/images/page-existing-ltr.svg
deleted file mode 100644 (file)
index 011a171..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12h5V5h-5zm-5 3v1h10v-1m0-1v-1H7v1m0 4h10v-1H7zm4-11H7v1h4zm0 3V9H7v1m0 1v1h4v-1m0-6H7v1h4zM5 3h14v18H8.692C6.602 21 5 19.373 5 17.25z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-existing-rtl.svg b/resources/src/mediawiki.widgets/images/page-existing-rtl.svg
deleted file mode 100644 (file)
index db4ad43..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M12 12H7V5h5zm5 3v1H7v-1m0-1v-1h10v1m0 4H7v-1h10zM13 7h4v1h-4zm0 3V9h4v1m0 1v1h-4v-1m0-6h4v1h-4zm6-2H5v18h10.308C17.398 21 19 19.373 19 17.25z"/>
-</svg>
index d8c68a9..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v18h10c2 0 4-2 4-4V3zm7.644 13.572h-1.687v-1.6h1.687zm1.982-6a2.144 2.144 0 0 1-.25.563c-.104.16-.225.3-.36.423l-.402.364-.438.396c-.134.127-.25.273-.353.428-.103.16-.18.346-.233.555-.054.215-.08.474-.08.784h-1.36c0-.378.017-.696.057-.955.036-.26.098-.488.183-.688.085-.196.188-.37.31-.52.12-.15.267-.295.433-.44l.385-.332c.12-.105.233-.214.327-.34.098-.124.17-.265.228-.42a1.67 1.67 0 0 0 .08-.55c0-.256-.044-.48-.133-.66a1.397 1.397 0 0 0-.322-.442 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.52 0-.905.173-1.15.52-.247.345-.372.81-.372 1.39H8.962c0-.468.067-.895.206-1.282a2.641 2.641 0 0 1 1.561-1.619c.37-.15.79-.223 1.252-.223.385 0 .743.06 1.078.174.33.114.622.282.868.5.246.218.443.487.586.814.143.323.215.692.215 1.1-.01.306-.04.565-.104.784z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bea394a..e1f19d2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.125 1.911 4 4 4h10V3zm7.644 13.572h-1.687v-1.601h1.687zm1.982-6.001a2.106 2.106 0 0 1-.609.987l-.403.364-.438.396a2.422 2.422 0 0 0-.353.428 1.881 1.881 0 0 0-.233.555 3.236 3.236 0 0 0-.081.783h-1.36c0-.378.018-.696.058-.955a2.7 2.7 0 0 1 .183-.687c.085-.196.188-.369.309-.519a3.59 3.59 0 0 1 .434-.441l.385-.332a2.15 2.15 0 0 0 .327-.341c.098-.123.17-.264.228-.419.054-.155.081-.337.081-.551a1.5 1.5 0 0 0-.134-.66 1.388 1.388 0 0 0-.322-.441 1.35 1.35 0 0 0-.403-.246 1.17 1.17 0 0 0-.376-.077c-.519 0-.904.173-1.15.519-.246.346-.371.81-.371 1.392H8.962c0-.469.067-.896.206-1.283a2.641 2.641 0 0 1 1.561-1.619 3.33 3.33 0 0 1 1.253-.223c.385 0 .743.059 1.078.173.331.114.622.282.868.5.246.218.443.487.586.814a2.7 2.7 0 0 1 .215 1.101c-.009.305-.04.564-.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m5 1c-1.1 0-2 0.9-2 2v14c0 1.1 0.9 2 2 2h10c1.1 0 2-0.9 2-2v-14c0-1.1-0.9-2-2-2h-10zm4.9805 4.2012c0.385 0 0.74313 0.059828 1.0781 0.17383 0.33 0.114 0.62314 0.282 0.86914 0.5s0.44294 0.48745 0.58594 0.81445c0.143 0.323 0.21484 0.69161 0.21484 1.0996-0.009999 0.306-0.041469 0.5642-0.10547 0.7832h0.003906a2.144 2.144 0 0 1-0.25 0.5625c-0.104 0.16-0.22633 0.30083-0.36133 0.42383l-0.40234 0.36328-0.4375 0.39648c-0.134 0.127-0.25052 0.27274-0.35352 0.42774-0.103 0.16-0.17942 0.34569-0.23242 0.55469-0.054 0.215-0.080078 0.47516-0.080078 0.78516h-1.3594c0-0.378 0.016641-0.69608 0.056641-0.95508 0.036-0.26 0.098594-0.48945 0.18359-0.68945 0.085-0.196 0.18659-0.36953 0.30859-0.51953 0.12-0.15 0.26759-0.29445 0.43359-0.43945l0.38477-0.33203c0.12-0.105 0.23412-0.21384 0.32812-0.33984 0.098-0.124 0.16856-0.26492 0.22656-0.41992a1.67 1.67 0 0 0 0.080078-0.55078c0-0.256-0.043813-0.48016-0.13281-0.66016a1.397 1.397 0 0 0-0.32226-0.44141 1.35 1.35 0 0 0-0.40234-0.24609 1.17 1.17 0 0 0-0.375-0.078125c-0.52 0-0.90539 0.17448-1.1504 0.52148-0.247 0.345-0.37305 0.80867-0.37305 1.3887h-1.4336c0-0.468 0.066078-0.89425 0.20508-1.2812a2.641 2.641 0 0 1 1.5605-1.6191c0.37-0.15 0.78995-0.22266 1.252-0.22266zm-1.0234 7.7715h1.6875v1.5996h-1.6875v-1.5996z"/>
 </svg>
index bb6f316..75b310c 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.125-1.911 4-4 4H5V3zm-7.644 13.572h1.687v-1.601h-1.687zm-1.982-6.001a2.106 2.106 0 0 0 .609.987l.403.364.438.396c.134.127.251.273.353.428.103.159.179.346.233.555.054.214.081.473.081.783h1.36c0-.378-.018-.696-.058-.955a2.7 2.7 0 0 0-.183-.687 2.242 2.242 0 0 0-.309-.519 3.59 3.59 0 0 0-.434-.441l-.385-.332a2.15 2.15 0 0 1-.327-.341 1.513 1.513 0 0 1-.228-.419 1.671 1.671 0 0 1-.081-.551 1.5 1.5 0 0 1 .134-.66c.089-.182.197-.332.322-.441a1.35 1.35 0 0 1 .403-.246 1.17 1.17 0 0 1 .376-.077c.519 0 .904.173 1.15.519.246.346.371.81.371 1.392h1.436a3.77 3.77 0 0 0-.206-1.283 2.641 2.641 0 0 0-1.561-1.619 3.33 3.33 0 0 0-1.253-.223c-.385 0-.743.059-1.078.173a2.548 2.548 0 0 0-.868.5 2.304 2.304 0 0 0-.586.814 2.7 2.7 0 0 0-.215 1.101c.009.305.04.564.103.783z"/>
+<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20">
+       <path d="m15 1c1.1 0 2 0.9 2 2v14c0 1.1-0.9 2-2 2h-10c-1.1 0-2-0.9-2-2v-14c0-1.1 0.9-2 2-2zm-4.9805 4.2012c-0.385 0-0.74312 0.059828-1.0781 0.17383-0.33 0.114-0.62314 0.282-0.86914 0.5s-0.44294 0.48745-0.58594 0.81445c-0.143 0.323-0.21484 0.69161-0.21484 1.0996 0.01 0.306 0.041469 0.5642 0.10547 0.7832h-0.00391a2.144 2.144 0 0 0 0.25 0.5625c0.104 0.16 0.22633 0.30083 0.36133 0.42383l0.40234 0.36328 0.4375 0.39648c0.134 0.127 0.25052 0.27274 0.35352 0.42774 0.103 0.16 0.17942 0.34569 0.23242 0.55469 0.054 0.215 0.080078 0.47516 0.080078 0.78516h1.3594c0-0.378-0.01664-0.69608-0.05664-0.95508-0.036-0.26-0.09859-0.48945-0.18359-0.68945-0.085-0.196-0.18659-0.36953-0.30859-0.51953-0.12-0.15-0.26759-0.29445-0.43359-0.43945l-0.38476-0.33203c-0.12-0.105-0.23412-0.21384-0.32812-0.33984-0.098-0.124-0.16856-0.26492-0.22656-0.41992a1.67 1.67 0 0 1-0.080078-0.55078c0-0.256 0.043813-0.48016 0.13281-0.66016a1.397 1.397 0 0 1 0.32226-0.44141 1.35 1.35 0 0 1 0.40234-0.24609 1.17 1.17 0 0 1 0.375-0.078125c0.52 0 0.90539 0.17448 1.1504 0.52148 0.247 0.345 0.37305 0.80867 0.37305 1.3887h1.4336c0-0.468-0.06608-0.89425-0.20508-1.2812a2.641 2.641 0 0 0-1.5605-1.6191c-0.37-0.15-0.78995-0.22266-1.252-0.22266zm1.0234 7.7715h-1.6875v1.5996h1.6875z"/>
 </svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg b/resources/src/mediawiki.widgets/images/page-redirect-ltr.svg
deleted file mode 100644 (file)
index f296ac5..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M5 3v14c0 2.552 1.516 4 4 4h10V3H5zm9.375 3.781c1.384 0 2.655 1.208 2.781 2.625 0 .838-.373 1.546-.937 2.125l-1.657 1.688c-.438.517-1.12.812-1.874.812-1.133 0-1.903-.69-2.407-1.656l.813-.844c.312.709.776 1.281 1.656 1.281.378 0 .873-.178 1.125-.437l1.656-1.688a1.65 1.65 0 0 0 0-2.312c-.312-.258-.778-.469-1.156-.469-.755 0-1.247.577-1.75 1.094-.312-.13-.625-.156-.938-.156-.186 0-.374.031-.5.031.942-.905 1.869-2.094 3.188-2.094zm-3.281 2.782c1.132 0 1.903.72 2.406 1.687l-.813.813c-.312-.647-.744-1.282-1.624-1.282-.378 0-.874.21-1.126.469l-1.656 1.656c-.629.58-.629 1.666 0 2.313.312.258.748.469 1.125.469.378 0 .874-.21 1.125-.47l.563-.593c.251.13.5.156.812.156.187 0 .376 0 .563-.062l-1.156 1.219c-.942 1.096-2.712 1.033-3.72 0-1.067-1.034-1.067-2.775 0-3.876l1.626-1.656a2.454 2.454 0 0 1 1.875-.844z"/>
-</svg>
diff --git a/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg b/resources/src/mediawiki.widgets/images/page-redirect-rtl.svg
deleted file mode 100644 (file)
index 6c753d6..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">
-       <path d="M19 3v14c0 2.552-1.516 4-4 4H5V3h14zM9.625 6.781c-1.384 0-2.655 1.208-2.781 2.625 0 .838.373 1.546.937 2.125l1.657 1.688c.438.517 1.12.812 1.874.812 1.133 0 1.903-.69 2.407-1.656l-.813-.844c-.312.709-.776 1.281-1.656 1.281-.378 0-.873-.178-1.125-.437l-1.656-1.688a1.652 1.652 0 0 1 0-2.312c.312-.258.778-.469 1.156-.469.755 0 1.247.577 1.75 1.094.312-.13.625-.156.938-.156.186 0 .374.031.5.031-.942-.905-1.869-2.094-3.188-2.094zm3.281 2.782c-1.132 0-1.903.72-2.406 1.687l.813.813c.312-.647.744-1.282 1.624-1.282.378 0 .874.21 1.126.469l1.656 1.656c.629.58.629 1.666 0 2.313-.312.258-.748.469-1.125.469-.378 0-.874-.21-1.125-.47l-.563-.593c-.251.13-.5.156-.812.156-.187 0-.376 0-.563-.062l1.156 1.219c.942 1.096 2.712 1.033 3.72 0 1.067-1.034 1.067-2.775 0-3.876l-1.626-1.656a2.454 2.454 0 0 0-1.875-.844z"/>
-</svg>
index 661f9ae..dc702c8 100644 (file)
                } else if ( config.missing ) {
                        icon = 'page-not-found';
                } else if ( config.redirect ) {
-                       icon = 'page-redirect';
+                       icon = 'articleRedirect';
                } else if ( config.disambiguation ) {
                        icon = 'page-disambiguation';
                } else {
-                       icon = 'page-existing';
+                       icon = 'article';
                }
 
                // Config initialization
index e52d0cd..9830c10 100644 (file)
@@ -39,6 +39,7 @@
                                        left: 0;
 
                                        &:not( .mw-widget-titleOptionWidget-hasImage ) {
+                                               background-size: 80%;
                                                background-color: #c8ccd1;
                                                opacity: 0.4;
                                        }
        background-image: url( images/page-disambiguation-ltr.svg );
 }
 
-.oo-ui-icon-page-existing {
-       /* @embed */
-       background-image: url( images/page-existing-ltr.svg );
-}
-
 .oo-ui-icon-page-not-found {
        /* @embed */
        background-image: url( images/page-not-found-ltr.svg );
 }
 
-.oo-ui-icon-page-not-found:lang( he ) {
+.oo-ui-icon-page-not-found:lang( he ),
+.oo-ui-icon-page-not-found:lang( yi ) {
        /* @embed */
        background-image: url( images/page-not-found-he-yi.svg );
 }
-
-.oo-ui-icon-page-redirect {
-       /* @embed */
-       background-image: url( images/page-redirect-ltr.svg );
-}
index fd0cea1..ebc3b79 100644 (file)
@@ -2369,7 +2369,7 @@ abstract class MediaWikiTestCase extends PHPUnit\Framework\TestCase {
         * @param string $text Content of the page
         * @param string $summary Optional summary string for the revision
         * @param int $defaultNs Optional namespace id
-        * @return array Array as returned by WikiPage::doEditContent()
+        * @return Status Object as returned by WikiPage::doEditContent()
         * @throws MWException If this test cases's needsDB() method doesn't return true.
         *         Test cases can use "@group Database" to enable database test support,
         *         or list the tables under testing in $this->tablesUsed, or override the
index 1f2b13c..de70f26 100644 (file)
@@ -658,14 +658,18 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
                $callback( 1, [] );
        }
 
-       public function testInsertUserIdentity() {
+       /**
+        * @dataProvider provideStages
+        * @param int $stage
+        */
+       public function testInsertUserIdentity( $stage ) {
                $this->setMwGlobals( [
                        // for User::getActorId()
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
+                       'wgActorTableSchemaMigrationStage' => $stage
                ] );
                $this->overrideMwServices();
 
-               $user = $this->getTestUser()->getUser();
+               $user = $this->getMutableTestUser()->getUser();
                $userIdentity = $this->getMock( UserIdentity::class );
                $userIdentity->method( 'getId' )->willReturn( $user->getId() );
                $userIdentity->method( 'getName' )->willReturn( $user->getName() );
@@ -673,7 +677,7 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
 
                list( $cFields, $cCallback ) = MediaWikiServices::getInstance()->getCommentStore()
                        ->insertWithTempTable( $this->db, 'rev_comment', '' );
-               $m = $this->makeMigration( SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW );
+               $m = $this->makeMigration( $stage );
                list( $fields, $callback ) =
                        $m->getInsertValuesWithTempTable( $this->db, 'rev_user', $userIdentity );
                $extraFields = [
@@ -692,13 +696,25 @@ class ActorMigrationTest extends MediaWikiLangTestCase {
                );
                $this->assertSame( $user->getId(), (int)$row->rev_user );
                $this->assertSame( $user->getName(), $row->rev_user_text );
-               $this->assertSame( $user->getActorId(), (int)$row->rev_actor );
+               $this->assertSame(
+                       ( $stage & SCHEMA_COMPAT_READ_NEW ) ? $user->getActorId() : 0,
+                       (int)$row->rev_actor
+               );
 
-               $m = $this->makeMigration( SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW );
+               $m = $this->makeMigration( $stage );
                $fields = $m->getInsertValues( $this->db, 'dummy_user', $userIdentity );
-               $this->assertSame( $user->getId(), $fields['dummy_user'] );
-               $this->assertSame( $user->getName(), $fields['dummy_user_text'] );
-               $this->assertSame( $user->getActorId(), $fields['dummy_actor'] );
+               if ( $stage & SCHEMA_COMPAT_WRITE_OLD ) {
+                       $this->assertSame( $user->getId(), $fields['dummy_user'] );
+                       $this->assertSame( $user->getName(), $fields['dummy_user_text'] );
+               } else {
+                       $this->assertArrayNotHasKey( 'dummy_user', $fields );
+                       $this->assertArrayNotHasKey( 'dummy_user_text', $fields );
+               }
+               if ( $stage & SCHEMA_COMPAT_WRITE_NEW ) {
+                       $this->assertSame( $user->getActorId(), $fields['dummy_actor'] );
+               } else {
+                       $this->assertArrayNotHasKey( 'dummy_actor', $fields );
+               }
        }
 
        public function testNewMigration() {
diff --git a/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php b/tests/phpunit/includes/GlobalFunctions/wfArrayFilterTest.php
deleted file mode 100644 (file)
index bc930be..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-<?php
-
-/**
- * @group GlobalFunctions
- * @covers ::wfArrayFilter
- * @covers ::wfArrayFilterByKey
- */
-class WfArrayFilterTest extends MediaWikiTestCase {
-       public function testWfArrayFilter() {
-               $this->hideDeprecated( 'wfArrayFilter' );
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $key !== 'b';
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $val !== 2;
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilter( $arr, function ( $val, $key ) {
-                       return $key !== 0;
-               } );
-               $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );
-       }
-
-       public function testWfArrayFilterByKey() {
-               $this->hideDeprecated( 'wfArrayFilterByKey' );
-               $arr = [ 'a' => 1, 'b' => 2, 'c' => 3 ];
-               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
-                       return $key !== 'b';
-               } );
-               $this->assertSame( [ 'a' => 1, 'c' => 3 ], $filtered );
-
-               $arr = [ 'a', 'b', 'c' ];
-               $filtered = wfArrayFilterByKey( $arr, function ( $key ) {
-                       return $key !== 0;
-               } );
-               $this->assertSame( [ 1 => 'b',  2 => 'c' ], $filtered );
-       }
-}
index 51c483d..b183fca 100644 (file)
@@ -81,7 +81,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
                        'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
 
                $this->overrideMwServices();
@@ -438,9 +438,19 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                $queryInfo = $store->getQueryInfo( [ 'user' ] );
 
                $row = get_object_vars( $row );
+
+               // Use aliased fields from $queryInfo, e.g. rev_user
+               $keys = array_keys( $row );
+               $keys = array_combine( $keys, $keys );
+               $fields = array_intersect_key( $queryInfo['fields'], $keys ) + $keys;
+
+               // assertSelect() fails unless the orders match.
+               ksort( $fields );
+               ksort( $row );
+
                $this->assertSelect(
                        $queryInfo['tables'],
-                       array_keys( $row ),
+                       $fields,
                        [ 'rev_id' => $rev->getId() ],
                        [ array_values( $row ) ],
                        [],
@@ -800,7 +810,7 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                        'rev_page' => (string)$rev->getPage(),
                        'rev_timestamp' => $this->db->timestamp( $rev->getTimestamp() ),
                        'rev_user_text' => (string)$rev->getUserText(),
-                       'rev_user' => (string)$rev->getUser(),
+                       'rev_user' => (string)$rev->getUser() ?: null,
                        'rev_minor_edit' => $rev->isMinor() ? '1' : '0',
                        'rev_deleted' => (string)$rev->getVisibility(),
                        'rev_len' => (string)$rev->getSize(),
@@ -1808,7 +1818,10 @@ abstract class RevisionStoreDbTestBase extends MediaWikiTestCase {
                /** @var Revision $rev */
                $rev = $page->doEditContent(
                        new WikitextContent( $text ),
-                       __METHOD__
+                       __METHOD__,
+                       0,
+                       false,
+                       $this->getMutableTestUser()->getUser()
                )->value['revision'];
 
                $store = MediaWikiServices::getInstance()->getRevisionStore();
index 983b701..13ddffa 100644 (file)
@@ -91,7 +91,7 @@ abstract class RevisionDbTestBase extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgMultiContentRevisionSchemaMigrationStage' => $this->getMcrMigrationStage(),
                        'wgContentHandlerUseDB' => $this->getContentHandlerUseDB(),
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
 
                $this->overrideMwServices();
index 02a6c19..98f2980 100644 (file)
@@ -601,7 +601,7 @@ class RevisionTest extends MediaWikiTestCase {
         * @covers Revision::loadFromTitle
         */
        public function testLoadFromTitle() {
-               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_OLD );
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
                $this->overrideMwServices();
                $title = $this->getMockTitle();
 
@@ -640,6 +640,7 @@ class RevisionTest extends MediaWikiTestCase {
                                $this->equalTo( [
                                        'revision', 'page', 'user',
                                        'temp_rev_comment' => 'revision_comment_temp', 'comment_rev_comment' => 'comment',
+                                       'temp_rev_user' => 'revision_actor_temp', 'actor_rev_user' => 'actor',
                                ] ),
                                // We don't really care about the fields are they come from the selectField methods
                                $this->isType( 'array' ),
index 924a1a5..92c71bd 100644 (file)
@@ -15,7 +15,8 @@ class ApiQueryUserContribsTest extends ApiTestCase {
                        $wgActorTableSchemaMigrationStage = $v;
                        $this->overrideMwServices();
                }, [ $wgActorTableSchemaMigrationStage ] );
-               $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD;
+               // Needs to WRITE_BOTH so READ_OLD tests below work. READ mode here doesn't really matter.
+               $wgActorTableSchemaMigrationStage = SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_NEW;
                $this->overrideMwServices();
 
                $users = [
index d5e1879..209ed55 100644 (file)
@@ -1471,10 +1471,12 @@ class AuthManagerTest extends \MediaWikiTestCase {
                        ],
                        'wgProxyWhitelist' => [],
                ] );
+               $this->overrideMwServices();
                $status = $this->manager->checkAccountCreatePermissions( new \User );
                $this->assertFalse( $status->isOK() );
                $this->assertTrue( $status->hasMessage( 'sorbs_create_account_reason' ) );
                $this->setMwGlobals( 'wgProxyWhitelist', [ '127.0.0.1' ] );
+               $this->overrideMwServices();
                $status = $this->manager->checkAccountCreatePermissions( new \User );
                $this->assertTrue( $status->isGood() );
        }
diff --git a/tests/phpunit/includes/block/BlockManagerTest.php b/tests/phpunit/includes/block/BlockManagerTest.php
new file mode 100644 (file)
index 0000000..4145665
--- /dev/null
@@ -0,0 +1,226 @@
+<?php
+
+use MediaWiki\Block\BlockManager;
+
+/**
+ * @group Blocking
+ * @group Database
+ * @coversDefaultClass \MediaWiki\Block\BlockManager
+ */
+class BlockManagerTest extends MediaWikiTestCase {
+
+       /** @var User */
+       protected $user;
+
+       /** @var int */
+       protected $sysopId;
+
+       protected function setUp() {
+               parent::setUp();
+
+               $this->user = $this->getTestUser()->getUser();
+               $this->sysopId = $this->getTestSysop()->getUser()->getId();
+       }
+
+       private function getBlockManager( $overrideConfig ) {
+               $blockManagerConfig = array_merge( [
+                       'wgApplyIpBlocksToXff' => true,
+                       'wgCookieSetOnAutoblock' => true,
+                       'wgCookieSetOnIpBlock' => true,
+                       'wgDnsBlacklistUrls' => [],
+                       'wgEnableDnsBlacklist' => true,
+                       'wgProxyList' => [],
+                       'wgProxyWhitelist' => [],
+                       'wgSoftBlockRanges' => [],
+               ], $overrideConfig );
+               return new BlockManager(
+                       $this->user,
+                       $this->user->getRequest(),
+                       ...array_values( $blockManagerConfig )
+               );
+       }
+
+       /**
+        * @dataProvider provideGetBlockFromCookieValue
+        * @covers ::getBlockFromCookieValue
+        */
+       public function testGetBlockFromCookieValue( $options, $expected ) {
+               $blockManager = $this->getBlockManager( [
+                       'wgCookieSetOnAutoblock' => true,
+                       'wgCookieSetOnIpBlock' => true,
+               ] );
+
+               $block = new Block( array_merge( [
+                       'address' => $options[ 'target' ] ?: $this->user,
+                       'by' => $this->sysopId,
+               ], $options[ 'blockOptions' ] ) );
+               $block->insert();
+
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'getBlockFromCookieValue' );
+               $method->setAccessible( true );
+
+               $user = $options[ 'loggedIn' ] ? $this->user : new User();
+               $user->getRequest()->setCookie( 'BlockID', $block->getCookieValue() );
+
+               $this->assertSame( $expected, (bool)$method->invoke(
+                       $blockManager,
+                       $user,
+                       $user->getRequest()
+               ) );
+
+               $block->delete();
+       }
+
+       public static function provideGetBlockFromCookieValue() {
+               return [
+                       'Autoblocking user block' => [
+                               [
+                                       'target' => '',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [
+                                               'enableAutoblock' => true
+                                       ],
+                               ],
+                               true,
+                       ],
+                       'Non-autoblocking user block' => [
+                               [
+                                       'target' => '',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [],
+                               ],
+                               false,
+                       ],
+                       'IP block for anonymous user' => [
+                               [
+                                       'target' => '127.0.0.1',
+                                       'loggedIn' => false,
+                                       'blockOptions' => [],
+                               ],
+                               true,
+                       ],
+                       'IP block for logged in user' => [
+                               [
+                                       'target' => '127.0.0.1',
+                                       'loggedIn' => true,
+                                       'blockOptions' => [],
+                               ],
+                               false,
+                       ],
+                       'IP range block for anonymous user' => [
+                               [
+                                       'target' => '127.0.0.0/8',
+                                       'loggedIn' => false,
+                                       'blockOptions' => [],
+                               ],
+                               true,
+                       ],
+               ];
+       }
+
+       /**
+        * @dataProvider provideIsLocallyBlockedProxy
+        * @covers ::isLocallyBlockedProxy
+        */
+       public function testIsLocallyBlockedProxy( $proxyList, $expected ) {
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'isLocallyBlockedProxy' );
+               $method->setAccessible( true );
+
+               $blockManager = $this->getBlockManager( [
+                       'wgProxyList' => $proxyList
+               ] );
+
+               $ip = '1.2.3.4';
+               $this->assertSame( $expected, $method->invoke( $blockManager, $ip ) );
+       }
+
+       public static function provideIsLocallyBlockedProxy() {
+               return [
+                       'Proxy list is empty' => [ [], false ],
+                       'Proxy list contains IP' => [ [ '1.2.3.4' ], true ],
+                       'Proxy list contains IP as value' => [ [ 'test' => '1.2.3.4' ], true ],
+                       'Proxy list contains range that covers IP' => [ [ '1.2.3.0/16' ], true ],
+               ];
+       }
+
+       /**
+        * @covers ::isLocallyBlockedProxy
+        */
+       public function testIsLocallyBlockedProxyDeprecated() {
+               $proxy = '1.2.3.4';
+
+               $this->hideDeprecated(
+                       'IP addresses in the keys of $wgProxyList (found the following IP ' .
+                       'addresses in keys: ' . $proxy . ', please move them to values)'
+               );
+
+               $class = new ReflectionClass( BlockManager::class );
+               $method = $class->getMethod( 'isLocallyBlockedProxy' );
+               $method->setAccessible( true );
+
+               $blockManager = $this->getBlockManager( [
+                       'wgProxyList' => [ $proxy => 'test' ]
+               ] );
+
+               $ip = '1.2.3.4';
+               $this->assertSame( true, $method->invoke( $blockManager, $ip ) );
+       }
+
+       /**
+        * @dataProvider provideIsDnsBlacklisted
+        * @covers ::isDnsBlacklisted
+        * @covers ::inDnsBlacklist
+        */
+       public function testIsDnsBlacklisted( $options, $expected ) {
+               $blockManager = $this->getBlockManager( [
+                       'wgEnableDnsBlacklist' => true,
+                       'wgDnsBlacklistUrls' => $options[ 'inBlacklist' ] ? [ 'local.wmftest.net' ] : [],
+                       'wgProxyWhitelist' => $options[ 'inWhitelist' ] ? [ '127.0.0.1' ] : [],
+               ] );
+
+               $ip = '127.0.0.1';
+               $this->assertSame(
+                       $expected,
+                       $blockManager->isDnsBlacklisted( $ip, $options[ 'check' ] )
+               );
+       }
+
+       public static function provideIsDnsBlacklisted() {
+               return [
+                       'IP is blacklisted' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => false,
+                                       'check' => false,
+                               ],
+                               true,
+                       ],
+                       'IP is not blacklisted' => [
+                               [
+                                       'inBlacklist' => false,
+                                       'inWhitelist' => false,
+                                       'check' => false,
+                               ],
+                               false,
+                       ],
+                       'IP is blacklisted and whitelisted; whitelist is checked' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => true,
+                                       'check' => false,
+                               ],
+                               true,
+                       ],
+                       'IP is blacklisted and whitelisted; whitelist is not checked' => [
+                               [
+                                       'inBlacklist' => true,
+                                       'inWhitelist' => true,
+                                       'check' => true,
+                               ],
+                               false,
+                       ],
+               ];
+       }
+}
index 9fe3e3d..878b895 100644 (file)
@@ -27,10 +27,6 @@ class JobTest extends MediaWikiTestCase {
                $requestId = 'requestId=' . WebRequest::getRequestId();
 
                return [
-                       [
-                               $this->getMockJob( false ),
-                               'someCommand Special: ' . $requestId
-                       ],
                        [
                                $this->getMockJob( [ 'key' => 'val' ] ),
                                'someCommand Special: key=val ' . $requestId
@@ -85,16 +81,24 @@ class JobTest extends MediaWikiTestCase {
        }
 
        public function getMockJob( $params ) {
-               $title = new Title();
                $mock = $this->getMockForAbstractClass(
                        Job::class,
-                       [ 'someCommand', $title, $params ],
+                       [ 'someCommand', $params ],
                        'SomeJob'
                );
 
                return $mock;
        }
 
+       /**
+        * @covers Job::__construct()
+        */
+       public function testInvalidParamsArgument() {
+               $params = false;
+               $this->setExpectedException( InvalidArgumentException::class, '$params must be an array' );
+               $job = $this->getMockJob( $params );
+       }
+
        /**
         * @dataProvider provideTestJobFactory
         *
@@ -165,15 +169,15 @@ class JobTest extends MediaWikiTestCase {
         */
        public function testJobSignatureTitleBased() {
                $testPage = Title::makeTitle( NS_PROJECT, 'x' );
-               $blankTitle = Title::makeTitle( NS_SPECIAL, '' );
+               $blankPage = Title::makeTitle( NS_SPECIAL, 'Blankpage' );
                $params = [ 'z' => 1, 'causeAction' => 'unknown', 'causeAgent' => 'unknown' ];
                $paramsWithTitle = $params + [ 'namespace' => NS_PROJECT, 'title' => 'x' ];
+               $paramsWithBlankpage = $params + [ 'namespace' => NS_SPECIAL, 'title' => 'Blankpage' ];
 
                $job = new RefreshLinksJob( $testPage, $params );
                $this->assertEquals( $testPage->getPrefixedText(), $job->getTitle()->getPrefixedText() );
-               $this->assertSame( $testPage, $job->getTitle() );
+               $this->assertTrue( $testPage->equals( $job->getTitle() ) );
                $this->assertJobParamsMatch( $job, $paramsWithTitle );
-               $this->assertSame( $testPage, $job->getTitle() );
 
                $job = Job::factory( 'refreshLinks', $testPage, $params );
                $this->assertEquals( $testPage->getPrefixedText(), $job->getTitle()->getPrefixedText() );
@@ -184,8 +188,8 @@ class JobTest extends MediaWikiTestCase {
                $this->assertJobParamsMatch( $job, $paramsWithTitle );
 
                $job = Job::factory( 'refreshLinks', $params );
-               $this->assertTrue( $blankTitle->equals( $job->getTitle() ) );
-               $this->assertJobParamsMatch( $job, $params );
+               $this->assertTrue( $blankPage->equals( $job->getTitle() ) );
+               $this->assertJobParamsMatch( $job, $paramsWithBlankpage );
        }
 
        /**
index ba4b2e2..3ff677e 100644 (file)
@@ -41,9 +41,9 @@ class PageArchiveMcrTest extends PageArchiveTestBase {
                return [
                        [
                                'ar_minor_edit' => '0',
-                               'ar_user' => '0',
+                               'ar_user' => null,
                                'ar_user_text' => $this->ipEditor,
-                               'ar_actor' => null,
+                               'ar_actor' => (string)User::newFromName( $this->ipEditor, false )->getActorId( $this->db ),
                                'ar_len' => '11',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->ipRev->getId() ),
@@ -63,7 +63,7 @@ class PageArchiveMcrTest extends PageArchiveTestBase {
                                'ar_minor_edit' => '0',
                                'ar_user' => (string)$this->getTestUser()->getUser()->getId(),
                                'ar_user_text' => $this->getTestUser()->getUser()->getName(),
-                               'ar_actor' => null,
+                               'ar_actor' => (string)$this->getTestUser()->getUser()->getActorId(),
                                'ar_len' => '7',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->firstRev->getId() ),
index f8d4ef9..8d7ed61 100644 (file)
@@ -43,9 +43,9 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                return [
                        [
                                'ar_minor_edit' => '0',
-                               'ar_user' => '0',
+                               'ar_user' => null,
                                'ar_user_text' => $this->ipEditor,
-                               'ar_actor' => null,
+                               'ar_actor' => (string)User::newFromName( $this->ipEditor, false )->getActorId( $this->db ),
                                'ar_len' => '11',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->ipRev->getId() ),
@@ -70,7 +70,7 @@ class PageArchivePreMcrTest extends PageArchiveTestBase {
                                'ar_minor_edit' => '0',
                                'ar_user' => (string)$this->getTestUser()->getUser()->getId(),
                                'ar_user_text' => $this->getTestUser()->getUser()->getName(),
-                               'ar_actor' => null,
+                               'ar_actor' => (string)$this->getTestUser()->getUser()->getActorId(),
                                'ar_len' => '7',
                                'ar_deleted' => '0',
                                'ar_rev_id' => strval( $this->firstRev->getId() ),
index 06c0456..218d4ce 100644 (file)
@@ -82,7 +82,7 @@ abstract class PageArchiveTestBase extends MediaWikiTestCase {
 
                $this->tablesUsed += $this->getMcrTablesToReset();
 
-               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_OLD );
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
                $this->setMwGlobals( 'wgContentHandlerUseDB', $this->getContentHandlerUseDB() );
                $this->setMwGlobals(
                        'wgMultiContentRevisionSchemaMigrationStage',
index 0fdcf6d..f04d35c 100644 (file)
@@ -37,7 +37,7 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
 
                $store = new CachingSiteStore(
                        $this->getHashSiteStore( $testSites ),
-                       wfGetMainCache()
+                       ObjectCache::getLocalClusterInstance()
                );
 
                $sites = $store->getSites();
@@ -62,7 +62,9 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
         * @covers CachingSiteStore::saveSites
         */
        public function testSaveSites() {
-               $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+               $store = new CachingSiteStore(
+                       new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+               );
 
                $sites = [];
 
@@ -108,7 +110,7 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
                                return $siteList;
                        } ) );
 
-               $store = new CachingSiteStore( $dbSiteStore, wfGetMainCache() );
+               $store = new CachingSiteStore( $dbSiteStore, ObjectCache::getLocalClusterInstance() );
 
                // initialize internal cache
                $this->assertGreaterThan( 0, $store->getSites()->count(), 'count sites' );
@@ -138,7 +140,9 @@ class CachingSiteStoreTest extends MediaWikiTestCase {
         * @covers CachingSiteStore::clear
         */
        public function testClear() {
-               $store = new CachingSiteStore( new HashSiteStore(), wfGetMainCache() );
+               $store = new CachingSiteStore(
+                       new HashSiteStore(), ObjectCache::getLocalClusterInstance()
+               );
                $this->assertTrue( $store->clear() );
 
                $site = $store->getSite( 'enwiki' );
index 2ce097b..f545948 100644 (file)
@@ -197,6 +197,37 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testRcHidemyselfFilter() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $user = $this->getTestUser()->getUser();
+               $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "NOT((rc_actor = '{$user->getActorId()}'))",
+                       ],
+                       [
+                               'hidemyself' => 1,
+                       ],
+                       "rc conditions: hidemyself=1 (logged in)",
+                       $user
+               );
+
+               $user = User::newFromName( '10.11.12.13', false );
+               $id = $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "NOT((rc_actor = '{$user->getActorId()}'))",
+                       ],
+                       [
+                               'hidemyself' => 1,
+                       ],
+                       "rc conditions: hidemyself=1 (anon)",
+                       $user
+               );
+       }
+
+       public function testRcHidemyselfFilter_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -230,6 +261,37 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testRcHidebyothersFilter() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $user = $this->getTestUser()->getUser();
+               $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "(rc_actor = '{$user->getActorId()}')",
+                       ],
+                       [
+                               'hidebyothers' => 1,
+                       ],
+                       "rc conditions: hidebyothers=1 (logged in)",
+                       $user
+               );
+
+               $user = User::newFromName( '10.11.12.13', false );
+               $id = $user->getActorId( wfGetDB( DB_MASTER ) );
+               $this->assertConditions(
+                       [ # expected
+                               "(rc_actor = '{$user->getActorId()}')",
+                       ],
+                       [
+                               'hidebyothers' => 1,
+                       ],
+                       "rc conditions: hidebyothers=1 (anon)",
+                       $user
+               );
+       }
+
+       public function testRcHidebyothersFilter_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -464,6 +526,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelAllExperienceLevels() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'newcomer;learner;experienced',
+                       ],
+                       "rc conditions: userExpLevel=newcomer;learner;experienced"
+               );
+       }
+
+       public function testFilterUserExpLevelAllExperienceLevels_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -482,6 +560,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelRegistrered() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'registered',
+                       ],
+                       "rc conditions: userExpLevel=registered"
+               );
+       }
+
+       public function testFilterUserExpLevelRegistrered_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -500,6 +594,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelUnregistrered() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'unregistered',
+                       ],
+                       "rc conditions: userExpLevel=unregistered"
+               );
+       }
+
+       public function testFilterUserExpLevelUnregistrered_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -518,6 +628,22 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelRegistreredOrLearner() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $this->assertConditions(
+                       [
+                               # expected
+                               'actor_rc_user.actor_user IS NOT NULL',
+                       ],
+                       [
+                               'userExpLevel' => 'registered;learner',
+                       ],
+                       "rc conditions: userExpLevel=registered;learner"
+               );
+       }
+
+       public function testFilterUserExpLevelRegistreredOrLearner_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
@@ -536,6 +662,20 @@ class ChangesListSpecialPageTest extends AbstractChangesListSpecialPageTestCase
        }
 
        public function testFilterUserExpLevelUnregistreredOrExperienced() {
+               $this->setMwGlobals( 'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_NEW );
+               $this->overrideMwServices();
+
+               $conds = $this->buildQuery( [ 'userExpLevel' => 'unregistered;experienced' ] );
+
+               $this->assertRegExp(
+                       '/\(actor_rc_user\.actor_user IS NULL\) OR '
+                               . '\(\(user_editcount >= 500\) AND \(user_registration <= \'[^\']+\'\)\)/',
+                       reset( $conds ),
+                       "rc conditions: userExpLevel=unregistered;experienced"
+               );
+       }
+
+       public function testFilterUserExpLevelUnregistreredOrExperienced_old() {
                $this->setMwGlobals(
                        'wgActorTableSchemaMigrationStage', SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD
                );
index dc02922..e881611 100644 (file)
@@ -158,9 +158,7 @@ class ContribsPagerTest extends MediaWikiTestCase {
 
                $this->assertContains( 'ip_changes', $queryInfo[0] );
                $this->assertArrayHasKey( 'ip_changes', $queryInfo[5] );
-               $this->assertSame( 'ipc_rev_timestamp', $queryInfo[1]['rev_timestamp'] );
-               $this->assertSame( 'ipc_rev_id', $queryInfo[1]['rev_id'] );
-               $this->assertSame( [ 'rev_timestamp DESC', 'rev_id DESC' ], $queryInfo[4]['ORDER BY'] );
+               $this->assertSame( [ 'ipc_rev_timestamp DESC', 'ipc_rev_id DESC' ], $queryInfo[4]['ORDER BY'] );
        }
 
 }
index f84be3f..481da75 100644 (file)
@@ -28,7 +28,7 @@ class UserTest extends MediaWikiTestCase {
                $this->setMwGlobals( [
                        'wgGroupPermissions' => [],
                        'wgRevokePermissions' => [],
-                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD,
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_NEW,
                ] );
                $this->overrideMwServices();
 
@@ -617,7 +617,7 @@ class UserTest extends MediaWikiTestCase {
 
                // Confirm that the block has been applied as required.
                $this->assertTrue( $user1->isLoggedIn() );
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $block->getId() );
@@ -638,7 +638,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertNotEquals( $user1->getToken(), $user2->getToken() );
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertTrue( $user2->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user2->getBlock() );
                // Non-strict type-check.
                $this->assertEquals( true, $user2->getBlock()->isAutoblocking(), 'Autoblock does not work' );
                // Can't directly compare the objects because of member type differences.
@@ -654,7 +654,7 @@ class UserTest extends MediaWikiTestCase {
                $user3 = User::newFromSession( $request3 );
                $user3->load();
                $this->assertTrue( $user3->isLoggedIn() );
-               $this->assertTrue( $user3->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user3->getBlock() );
                $this->assertEquals( true, $user3->getBlock()->isAutoblocking() ); // Non-strict type-check.
 
                // Clean up.
@@ -694,7 +694,7 @@ class UserTest extends MediaWikiTestCase {
 
                // 2. Test that the cookie IS NOT present.
                $this->assertTrue( $user->isLoggedIn() );
-               $this->assertTrue( $user->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $user->getBlockId() );
@@ -739,7 +739,7 @@ class UserTest extends MediaWikiTestCase {
 
                // 2. Test the cookie's expiry timestamp.
                $this->assertTrue( $user1->isLoggedIn() );
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
                $this->assertEquals( Block::TYPE_USER, $block->getType() );
                $this->assertTrue( $block->isAutoblocking() );
                $this->assertGreaterThanOrEqual( 1, $user1->getBlockId() );
@@ -783,6 +783,7 @@ class UserTest extends MediaWikiTestCase {
                        RequestContext::getMain()->setRequest( $request );
                        TestingAccessWrapper::newFromObject( $user )->mRequest = $request;
                        $request->getSession()->setUser( $user );
+                       $this->overrideMwServices();
                };
                $this->setMwGlobals( 'wgSoftBlockRanges', [ '10.0.0.0/8' ] );
 
@@ -849,7 +850,7 @@ class UserTest extends MediaWikiTestCase {
                $user2->load();
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertFalse( $user2->isBlocked() );
+               $this->assertNull( $user2->getBlock() );
 
                // Clean up.
                $block->delete();
@@ -885,7 +886,7 @@ class UserTest extends MediaWikiTestCase {
                $user1 = User::newFromSession( $request1 );
                $user1->mBlock = $block;
                $user1->load();
-               $this->assertTrue( $user1->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user1->getBlock() );
 
                // 2. Create a new request, set the cookie to just the block ID, and the user should
                // still get blocked when they log in again.
@@ -897,7 +898,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertNotEquals( $user1->getToken(), $user2->getToken() );
                $this->assertTrue( $user2->isAnon() );
                $this->assertFalse( $user2->isLoggedIn() );
-               $this->assertTrue( $user2->isBlocked() );
+               $this->assertInstanceOf( Block::class, $user2->getBlock() );
                $this->assertEquals( true, $user2->getBlock()->isAutoblocking() ); // Non-strict type-check.
 
                // Clean up.
@@ -980,7 +981,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertFalse( $user->getExperienceLevel() );
        }
 
-       public static function provideIsLocallBlockedProxy() {
+       public static function provideIsLocallyBlockedProxy() {
                return [
                        [ '1.2.3.4', '1.2.3.4' ],
                        [ '1.2.3.4', '1.2.3.0/16' ],
@@ -988,10 +989,12 @@ class UserTest extends MediaWikiTestCase {
        }
 
        /**
-        * @dataProvider provideIsLocallBlockedProxy
+        * @dataProvider provideIsLocallyBlockedProxy
         * @covers User::isLocallyBlockedProxy
         */
        public function testIsLocallyBlockedProxy( $ip, $blockListEntry ) {
+               $this->hideDeprecated( 'User::isLocallyBlockedProxy' );
+
                $this->setMwGlobals(
                        'wgProxyList', []
                );
@@ -1048,6 +1051,75 @@ class UserTest extends MediaWikiTestCase {
                $user = User::newFromId( $id );
                $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by ID' );
 
+               $user2 = User::newFromActorId( $user->getActorId() );
+               $this->assertEquals( $user->getId(), $user2->getId(),
+                       'User::newFromActorId works for an existing user' );
+
+               $row = $this->db->selectRow( 'user', User::selectFields(), [ 'user_id' => $id ], __METHOD__ );
+               $user = User::newFromRow( $row );
+               $this->assertTrue( $user->getActorId() > 0,
+                       'Actor ID can be retrieved for user loaded with User::selectFields()' );
+
+               $user = User::newFromId( $id );
+               $user->setName( 'UserTestActorId4-renamed' );
+               $user->saveSettings();
+               $this->assertEquals(
+                       $user->getName(),
+                       $this->db->selectField(
+                               'actor', 'actor_name', [ 'actor_id' => $user->getActorId() ], __METHOD__
+                       ),
+                       'User::saveSettings updates actor table for name change'
+               );
+
+               // For sanity
+               $ip = '192.168.12.34';
+               $this->db->delete( 'actor', [ 'actor_name' => $ip ], __METHOD__ );
+
+               $user = User::newFromName( $ip, false );
+               $this->assertFalse( $user->getActorId() > 0, 'Anonymous user has no actor ID by default' );
+               $this->assertTrue( $user->getActorId( $this->db ) > 0,
+                       'Actor ID can be created for an anonymous user' );
+
+               $user = User::newFromName( $ip, false );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be loaded for an anonymous user' );
+               $user2 = User::newFromActorId( $user->getActorId() );
+               $this->assertEquals( $user->getName(), $user2->getName(),
+                       'User::newFromActorId works for an anonymous user' );
+       }
+
+       /**
+        * Actor tests with SCHEMA_COMPAT_READ_OLD
+        *
+        * The only thing different from testActorId() is the behavior if the actor
+        * row doesn't exist in the DB, since with SCHEMA_COMPAT_READ_NEW that
+        * situation can't happen. But we copy all the other tests too just for good measure.
+        *
+        * @covers User::newFromActorId
+        */
+       public function testActorId_old() {
+               $this->setMwGlobals( [
+                       'wgActorTableSchemaMigrationStage' => SCHEMA_COMPAT_WRITE_BOTH | SCHEMA_COMPAT_READ_OLD,
+               ] );
+               $this->overrideMwServices();
+
+               $domain = MediaWikiServices::getInstance()->getDBLoadBalancer()->getLocalDomainID();
+               $this->hideDeprecated( 'User::selectFields' );
+
+               // Newly-created user has an actor ID
+               $user = User::createNew( 'UserTestActorIdOld1' );
+               $id = $user->getId();
+               $this->assertTrue( $user->getActorId() > 0, 'User::createNew sets an actor ID' );
+
+               $user = User::newFromName( 'UserTestActorIdOld2' );
+               $user->addToDatabase();
+               $this->assertTrue( $user->getActorId() > 0, 'User::addToDatabase sets an actor ID' );
+
+               $user = User::newFromName( 'UserTestActorIdOld1' );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by name' );
+
+               $user = User::newFromId( $id );
+               $this->assertTrue( $user->getActorId() > 0, 'Actor ID can be retrieved for user loaded by ID' );
+
                $user2 = User::newFromActorId( $user->getActorId() );
                $this->assertEquals( $user->getId(), $user2->getId(),
                        'User::newFromActorId works for an existing user' );
@@ -1066,7 +1138,7 @@ class UserTest extends MediaWikiTestCase {
                $this->assertFalse( $user->getActorId() > 0, 'No Actor ID by default if none in database' );
                $this->assertTrue( $user->getActorId( $this->db ) > 0, 'Actor ID can be created if none in db' );
 
-               $user->setName( 'UserTestActorId4-renamed' );
+               $user->setName( 'UserTestActorIdOld4-renamed' );
                $user->saveSettings();
                $this->assertEquals(
                        $user->getName(),
@@ -1459,7 +1531,7 @@ class UserTest extends MediaWikiTestCase {
                $user = User::newFromSession( $request );
 
                // logged in users should be inmune to cookie block of type ip/range
-               $this->assertFalse( $user->isBlocked() );
+               $this->assertNull( $user->getBlock() );
 
                // cookie is being cleared
                $cookies = $request->response()->getCookies();
index 00d607f..3b6d6f2 100644 (file)
@@ -57,7 +57,7 @@ class UploadFromUrlTestSuite extends PHPUnit_Framework_TestSuite {
 
                $wgParserCacheType = CACHE_NONE;
                DeferredUpdates::clearPendingUpdates();
-               $wgMemc = wfGetMainCache();
+               $wgMemc = ObjectCache::getLocalClusterInstance();
                $messageMemc = wfGetMessageCacheStorage();
 
                RequestContext::resetMain();
index 0bcce12..29cffaf 100644 (file)
@@ -7,7 +7,7 @@
        } ) );
 
        QUnit.test( '.parse( string )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+               this.server.respondWith( 'POST', /api.php/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
                ] );
@@ -18,7 +18,7 @@
        } );
 
        QUnit.test( '.parse( Object.toString )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+               this.server.respondWith( 'POST', /api.php/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
                ] );
@@ -33,7 +33,7 @@
        } );
 
        QUnit.test( '.parse( mw.Title )', function ( assert ) {
-               this.server.respondWith( /action=parse.*&page=Earth/, [ 200,
+               this.server.respondWith( 'GET', /action=parse.*&page=Earth/, [ 200,
                        { 'Content-Type': 'application/json' },
                        '{ "parse": { "text": "<p><b>Earth</b> is a planet.</p>" } }'
                ] );
index 970fb9e..51a1fc6 100644 (file)
@@ -17,7 +17,7 @@ describe( 'Rollback with confirmation', function () {
                // Requires user to log in again, handled by deleteCookie() call in beforeEach function
                UserLoginPage.loginAdmin();
 
-               browser.pause( 300 );
+               UserLoginPage.waitForScriptsToBeReady();
                browser.execute( function () {
                        return ( new mw.Api() ).saveOption(
                                'showrollbackconfirmation',
@@ -48,22 +48,22 @@ describe( 'Rollback with confirmation', function () {
                assert.strictEqual( HistoryPage.rollbackConfirmableNo.getText(), 'Cancel' );
        } );
 
-       it.skip( 'should offer a way to cancel rollbacks', function () {
+       it( 'should offer a way to cancel rollbacks', function () {
                HistoryPage.rollback.click();
 
-               browser.pause( 300 );
+               HistoryPage.rollbackConfirmableNo.waitForVisible( 5000 );
 
                HistoryPage.rollbackConfirmableNo.click();
 
-               browser.pause( 500 );
+               browser.pause( 1000 ); // Waiting to ensure we are NOT redirected and stay on the same page
 
                assert.strictEqual( HistoryPage.heading.getText(), 'Revision history of "' + name + '"' );
        } );
 
-       it.skip( 'should perform rollbacks after confirming intention', function () {
+       it( 'should perform rollbacks after confirming intention', function () {
                HistoryPage.rollback.click();
 
-               browser.pause( 300 );
+               HistoryPage.rollbackConfirmableYes.waitForVisible( 5000 );
 
                HistoryPage.rollbackConfirmableYes.click();
 
@@ -104,7 +104,7 @@ describe( 'Rollback without confirmation', function () {
                // Requires user to log in again, handled by deleteCookie() call in beforeEach function
                UserLoginPage.loginAdmin();
 
-               browser.pause( 300 );
+               UserLoginPage.waitForScriptsToBeReady();
                browser.execute( function () {
                        return ( new mw.Api() ).saveOption(
                                'showrollbackconfirmation',
index 8838530..60855f8 100644 (file)
@@ -1,4 +1,5 @@
-const Page = require( './Page' );
+const Page = require( './Page' ),
+       Util = require( 'wdio-mediawiki/Util' );
 
 class LoginPage extends Page {
        get username() { return browser.element( '#wpName1' ); }
@@ -20,6 +21,10 @@ class LoginPage extends Page {
        loginAdmin() {
                this.login( browser.options.username, browser.options.password );
        }
+
+       waitForScriptsToBeReady() {
+               Util.waitForModuleState( 'mediawiki.api' );
+       }
 }
 
 module.exports = new LoginPage();
index 247c958..dd08ee9 100644 (file)
@@ -1,5 +1,21 @@
 module.exports = {
        getTestString( prefix = '' ) {
                return prefix + Math.random().toString() + '-Iñtërnâtiônàlizætiøn';
+       },
+
+       /**
+        * Wait for a given module to reach a specific state
+        * @param {string} moduleName The name of the module to wait for
+        * @param {string} moduleStatus 'registered', 'loaded', 'loading', 'ready', 'error', 'missing'
+        * @param {int} timeout The wait time in milliseconds before the wait fails
+        */
+       waitForModuleState( moduleName, moduleStatus = 'ready', timeout = 2000 ) {
+               browser.waitUntil( () => {
+                       const result = browser.execute( ( module ) => {
+                               return typeof mw !== 'undefined' &&
+                                       mw.loader.getState( module.name ) === module.status;
+                       }, { status: moduleStatus, name: moduleName } );
+                       return result.value;
+               }, timeout, 'Failed to wait for ' + moduleName + ' to be ' + moduleStatus + ' after ' + timeout + ' ms.' );
        }
 };