Merge "Clear cached HTML artifacts"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 5 Mar 2019 20:34:53 +0000 (20:34 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 5 Mar 2019 20:34:53 +0000 (20:34 +0000)
81 files changed:
.phpcs.xml
RELEASE-NOTES-1.33
autoload.php
docs/hooks.txt
docs/ontology.owl
includes/AuthPlugin.php [deleted file]
includes/DefaultSettings.php
includes/OutputPage.php
includes/Setup.php
includes/api/ApiExpandTemplates.php
includes/api/ApiFormatBase.php
includes/api/ApiMain.php
includes/api/ApiParse.php
includes/auth/AuthManager.php
includes/auth/AuthManagerAuthPlugin.php [deleted file]
includes/auth/AuthManagerAuthPluginUser.php [deleted file]
includes/auth/AuthPluginPrimaryAuthenticationProvider.php [deleted file]
includes/installer/i18n/id.json
includes/libs/MultiHttpClient.php
includes/libs/objectcache/WANObjectCache.php
includes/logging/LogEntry.php
includes/page/Article.php
includes/pager/IndexPager.php
includes/parser/ParserOutput.php
includes/preferences/DefaultPreferencesFactory.php
includes/resourceloader/ResourceLoaderClientHtml.php
includes/session/SessionManager.php
includes/specials/SpecialChangeEmail.php
includes/specials/SpecialRecentchanges.php
includes/specials/SpecialUserrights.php
includes/user/User.php
languages/i18n/ace.json
languages/i18n/ar.json
languages/i18n/ba.json
languages/i18n/bcc.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bg.json
languages/i18n/bn.json
languages/i18n/cs.json
languages/i18n/da.json
languages/i18n/en.json
languages/i18n/eu.json
languages/i18n/exif/bg.json
languages/i18n/exif/eu.json
languages/i18n/ia.json
languages/i18n/id.json
languages/i18n/io.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/lv.json
languages/i18n/mhr.json
languages/i18n/mk.json
languages/i18n/pt-br.json
languages/i18n/qqq.json
languages/i18n/roa-tara.json
languages/i18n/sh.json
languages/i18n/sv.json
languages/i18n/tcy.json
languages/i18n/uk.json
maintenance/dictionary/mediawiki.dic
resources/Resources.php
resources/src/jquery/jquery.hidpi.js [deleted file]
resources/src/mediawiki.action/mediawiki.action.edit.preview.js
resources/src/mediawiki.special.changeslist.less
resources/src/mediawiki.special.recentchanges.js
tests/common/TestSetup.php
tests/phpunit/includes/MultiHttpClientTest.php [deleted file]
tests/phpunit/includes/OutputPageTest.php
tests/phpunit/includes/Storage/NameTableStoreTest.php
tests/phpunit/includes/api/ApiParseTest.php
tests/phpunit/includes/api/ApiTestCase.php
tests/phpunit/includes/auth/AuthManagerTest.php
tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php [deleted file]
tests/phpunit/includes/libs/MultiHttpClientTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/objectcache/WANObjectCacheTest.php
tests/phpunit/includes/parser/ParserOutputTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/qunit/QUnitTestResources.php
tests/qunit/suites/resources/jquery/jquery.hidpi.test.js [deleted file]
tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js

index 784fefc..b877c96 100644 (file)
@@ -13,7 +13,6 @@
                <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
                <exclude name="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName" />
                <exclude name="MediaWiki.Usage.DbrQueryUsage.DbrQueryFound" />
-               <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgAuth" />
                <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgContLang" />
                <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgParser" />
                <exclude name="MediaWiki.Usage.DeprecatedGlobalVariables.Deprecated$wgTitle" />
                <exclude-pattern>*/includes/api/ApiMessage\.php</exclude-pattern>
                <exclude-pattern>*/includes/api/ApiOpenSearch\.php</exclude-pattern>
                <exclude-pattern>*/includes/api/ApiRsd\.php</exclude-pattern>
-               <exclude-pattern>*/includes/AuthPlugin\.php</exclude-pattern>
                <exclude-pattern>*/includes/cache/CacheDependency\.php</exclude-pattern>
                <exclude-pattern>*/includes/compat/XMPReader\.php</exclude-pattern>
                <exclude-pattern>*/includes/diff/DairikiDiff\.php</exclude-pattern>
index c3edc60..3fd9520 100644 (file)
@@ -41,6 +41,8 @@ production.
   set `$wgParserCacheType = CACHE_NONE;` instead.
 * $wgCommentTableSchemaMigrationStage has been removed. Extension code finding
   it unset should treat it as being MIGRATION_NEW.
+* $wgAuth – This old setting, deprecated in 1.27, has been removed as part of
+  the removal of AuthPlugin.
 
 === New features in 1.33 ===
 * (T96041) __EXPECTUNUSEDCATEGORY__ on a category page causes the category
@@ -269,6 +271,14 @@ because of Phabricator reports.
   has been removed.
 * The 'jquery.xmldom' module has been removed.
 * The 'jquery.mockjax' module has been removed.
+* The 'jquery.hidpi' module, deprecated in 1.32, has been removed.
+* AuthPlugin and related code, deprecated in 1.27, has been removed. Extensions
+  should instead use AuthManager. The following no longer exist:
+  * The AuthPlugin class itself and the related AuthPluginUser class and i18n
+  * The AuthPluginSetup and AuthPluginAutoCreate hooks
+  * The transitional wrapper classes AuthPluginPrimaryAuthenticationProvider,
+    AuthManagerAuthPlugin, and AuthManagerAuthPluginUser.
+  * The $wgAuth configuration setting and its use in Setup.php and unit tests
 
 === Deprecations in 1.33 ===
 * The configuration option $wgUseESI has been deprecated, and is expected
@@ -327,6 +337,8 @@ because of Phabricator reports.
   check block behaviour.
 * The api-feature-usage log channel now has log context. The text message is
   deprecated and will be removed in the future.
+* The "stream" request option in MultiHttpClient has been deprecated.
+  Use the new "sink" option instead.
 
 === Other changes in 1.33 ===
 * (T201747) Html::openElement() warns if given an element name with a space
index 405d35e..fab10fe 100644 (file)
@@ -166,8 +166,6 @@ $wgAutoloadLocalClasses = [
        'AttachLatest' => __DIR__ . '/maintenance/attachLatest.php',
        'AugmentPageProps' => __DIR__ . '/includes/search/AugmentPageProps.php',
        'AuthManagerSpecialPage' => __DIR__ . '/includes/specialpage/AuthManagerSpecialPage.php',
-       'AuthPlugin' => __DIR__ . '/includes/AuthPlugin.php',
-       'AuthPluginUser' => __DIR__ . '/includes/AuthPlugin.php',
        'AutoCommitUpdate' => __DIR__ . '/includes/deferred/AutoCommitUpdate.php',
        'AutoLoader' => __DIR__ . '/includes/AutoLoader.php',
        'AutoloadGenerator' => __DIR__ . '/includes/utils/AutoloadGenerator.php',
index e52914d..ae4a4dc 100644 (file)
@@ -787,16 +787,6 @@ $extraData: An array (string => string) with extra information, intended to be
   added to log contexts. Fields it might include:
   - appId: the application ID, only if the login was with a bot password
 
-'AuthPluginAutoCreate': DEPRECATED since 1.27! Use the 'LocalUserCreated' hook
-instead. Called when creating a local account for an user logged in from an
-external authentication method.
-$user: User object created locally
-
-'AuthPluginSetup': DEPRECATED since 1.27! Extensions should be updated to use
-AuthManager. Update or replace authentication plugin object ($wgAuth). Gives a
-chance for an extension to set it programmatically to a variable class.
-&$auth: the $wgAuth object, probably a stub
-
 'AutopromoteCondition': Check autopromote condition for user.
 $type: condition type
 $args: arguments
index 19476a3..998292c 100644 (file)
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 
 <!DOCTYPE rdf:RDF [
+  <!ENTITY cc "http://creativecommons.org/ns#">
   <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
   <!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
   <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
   xmlns:rdf="&rdf;"
   xmlns:rdfs="&rdfs;"
   xmlns:owl="&owl;"
+  xmlns:cc="&cc;"
 >
 
   <owl:Ontology rdf:about="&mediawiki;">
     <rdfs:label>MediaWiki ontology</rdfs:label>
     <rdfs:comment>The ontology of MediaWiki</rdfs:comment>
+    <cc:licence rdf:resource="http://creativecommons.org/publicdomain/zero/1.0/" />
   </owl:Ontology>
 
   <!--
diff --git a/includes/AuthPlugin.php b/includes/AuthPlugin.php
deleted file mode 100644 (file)
index e12db24..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-<?php
-/**
- * Authentication plugin interface
- *
- * Copyright © 2004 Brion Vibber <brion@pobox.com>
- * https://www.mediawiki.org/
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
-
-/**
- * Authentication plugin interface. Instantiate a subclass of AuthPlugin
- * and set $wgAuth to it to authenticate against some external tool.
- *
- * The default behavior is not to do anything, and use the local user
- * database for all authentication. A subclass can require that all
- * accounts authenticate externally, or use it only as a fallback; also
- * you can transparently create internal wiki accounts the first time
- * someone logs in who can be authenticated externally.
- *
- * @deprecated since 1.27
- */
-class AuthPlugin {
-       /**
-        * @var string
-        */
-       protected $domain;
-
-       /**
-        * Check whether there exists a user account with the given name.
-        * The name will be normalized to MediaWiki's requirements, so
-        * you might need to munge it (for instance, for lowercase initial
-        * letters).
-        *
-        * @param string $username Username.
-        * @return bool
-        */
-       public function userExists( $username ) {
-               # Override this!
-               return false;
-       }
-
-       /**
-        * Check if a username+password pair is a valid login.
-        * The name will be normalized to MediaWiki's requirements, so
-        * you might need to munge it (for instance, for lowercase initial
-        * letters).
-        *
-        * @param string $username Username.
-        * @param string $password User password.
-        * @return bool
-        */
-       public function authenticate( $username, $password ) {
-               # Override this!
-               return false;
-       }
-
-       /**
-        * Modify options in the login template.
-        *
-        * @param BaseTemplate &$template
-        * @param string &$type 'signup' or 'login'. Added in 1.16.
-        */
-       public function modifyUITemplate( &$template, &$type ) {
-               # Override this!
-               $template->set( 'usedomain', false );
-       }
-
-       /**
-        * Set the domain this plugin is supposed to use when authenticating.
-        *
-        * @param string $domain Authentication domain.
-        */
-       public function setDomain( $domain ) {
-               $this->domain = $domain;
-       }
-
-       /**
-        * Get the user's domain
-        *
-        * @return string
-        */
-       public function getDomain() {
-               return $this->domain ?? 'invaliddomain';
-       }
-
-       /**
-        * Check to see if the specific domain is a valid domain.
-        *
-        * @param string $domain Authentication domain.
-        * @return bool
-        */
-       public function validDomain( $domain ) {
-               # Override this!
-               return true;
-       }
-
-       /**
-        * When a user logs in, optionally fill in preferences and such.
-        * For instance, you might pull the email address or real name from the
-        * external user database.
-        *
-        * The User object is passed by reference so it can be modified; don't
-        * forget the & on your function declaration.
-        *
-        * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning
-        *  a different User object to $user is no longer supported.
-        * @param User &$user
-        * @return bool
-        */
-       public function updateUser( &$user ) {
-               # Override this and do something
-               return true;
-       }
-
-       /**
-        * Return true if the wiki should create a new local account automatically
-        * when asked to login a user who doesn't exist locally but does in the
-        * external auth database.
-        *
-        * If you don't automatically create accounts, you must still create
-        * accounts in some way. It's not possible to authenticate without
-        * a local account.
-        *
-        * This is just a question, and shouldn't perform any actions.
-        *
-        * @return bool
-        */
-       public function autoCreate() {
-               return false;
-       }
-
-       /**
-        * Allow a property change? Properties are the same as preferences
-        * and use the same keys. 'Realname' 'Emailaddress' and 'Nickname'
-        * all reference this.
-        *
-        * @param string $prop
-        *
-        * @return bool
-        */
-       public function allowPropChange( $prop = '' ) {
-               if ( $prop == 'realname' && is_callable( [ $this, 'allowRealNameChange' ] ) ) {
-                       return $this->allowRealNameChange();
-               } elseif ( $prop == 'emailaddress' && is_callable( [ $this, 'allowEmailChange' ] ) ) {
-                       return $this->allowEmailChange();
-               } elseif ( $prop == 'nickname' && is_callable( [ $this, 'allowNickChange' ] ) ) {
-                       return $this->allowNickChange();
-               } else {
-                       return true;
-               }
-       }
-
-       /**
-        * Can users change their passwords?
-        *
-        * @return bool
-        */
-       public function allowPasswordChange() {
-               return true;
-       }
-
-       /**
-        * Should MediaWiki store passwords in its local database?
-        *
-        * @return bool
-        */
-       public function allowSetLocalPassword() {
-               return true;
-       }
-
-       /**
-        * Set the given password in the authentication database.
-        * As a special case, the password may be set to null to request
-        * locking the password to an unusable value, with the expectation
-        * that it will be set later through a mail reset or other method.
-        *
-        * Return true if successful.
-        *
-        * @param User $user
-        * @param string $password Password.
-        * @return bool
-        */
-       public function setPassword( $user, $password ) {
-               return true;
-       }
-
-       /**
-        * Update user information in the external authentication database.
-        * Return true if successful.
-        *
-        * @deprecated since 1.26, use the UserSaveSettings hook instead.
-        * @param User $user
-        * @return bool
-        */
-       public function updateExternalDB( $user ) {
-               return true;
-       }
-
-       /**
-        * Update user groups in the external authentication database.
-        * Return true if successful.
-        *
-        * @deprecated since 1.26, use the UserGroupsChanged hook instead.
-        * @param User $user
-        * @param array $addgroups Groups to add.
-        * @param array $delgroups Groups to remove.
-        * @return bool
-        */
-       public function updateExternalDBGroups( $user, $addgroups, $delgroups = [] ) {
-               return true;
-       }
-
-       /**
-        * Check to see if external accounts can be created.
-        * Return true if external accounts can be created.
-        * @return bool
-        */
-       public function canCreateAccounts() {
-               return false;
-       }
-
-       /**
-        * Add a user to the external authentication database.
-        * Return true if successful.
-        *
-        * @param User $user Only the name should be assumed valid at this point
-        * @param string $password
-        * @param string $email
-        * @param string $realname
-        * @return bool
-        */
-       public function addUser( $user, $password, $email = '', $realname = '' ) {
-               return true;
-       }
-
-       /**
-        * Return true to prevent logins that don't authenticate here from being
-        * checked against the local database's password fields.
-        *
-        * This is just a question, and shouldn't perform any actions.
-        *
-        * @return bool
-        */
-       public function strict() {
-               return false;
-       }
-
-       /**
-        * Check if a user should authenticate locally if the global authentication fails.
-        * If either this or strict() returns true, local authentication is not used.
-        *
-        * @param string $username Username.
-        * @return bool
-        */
-       public function strictUserAuth( $username ) {
-               return false;
-       }
-
-       /**
-        * When creating a user account, optionally fill in preferences and such.
-        * For instance, you might pull the email address or real name from the
-        * external user database.
-        *
-        * The User object is passed by reference so it can be modified; don't
-        * forget the & on your function declaration.
-        *
-        * @deprecated since 1.26, use the UserLoggedIn hook instead. And assigning
-        *  a different User object to $user is no longer supported.
-        * @param User &$user
-        * @param bool $autocreate True if user is being autocreated on login
-        */
-       public function initUser( &$user, $autocreate = false ) {
-               # Override this to do something.
-       }
-
-       /**
-        * If you want to munge the case of an account name before the final
-        * check, now is your chance.
-        * @param string $username
-        * @return string
-        */
-       public function getCanonicalName( $username ) {
-               return $username;
-       }
-
-       /**
-        * Get an instance of a User object
-        *
-        * @param User &$user
-        *
-        * @return AuthPluginUser
-        */
-       public function getUserInstance( User &$user ) {
-               return new AuthPluginUser( $user );
-       }
-
-       /**
-        * Get a list of domains (in HTMLForm options format) used.
-        *
-        * @return array
-        */
-       public function domainList() {
-               return [];
-       }
-}
-
-/**
- * @deprecated since 1.27
- */
-class AuthPluginUser {
-       function __construct( $user ) {
-               # Override this!
-       }
-
-       public function getId() {
-               # Override this!
-               return -1;
-       }
-
-       /**
-        * Indicate whether the user is locked
-        * @deprecated since 1.26, use the UserIsLocked hook instead.
-        * @return bool
-        */
-       public function isLocked() {
-               # Override this!
-               return false;
-       }
-
-       /**
-        * Indicate whether the user is hidden
-        * @deprecated since 1.26, use the UserIsHidden hook instead.
-        * @return bool
-        */
-       public function isHidden() {
-               # Override this!
-               return false;
-       }
-
-       /**
-        * @deprecated since 1.28, use SessionManager::invalidateSessionForUser() instead.
-        * @return bool
-        */
-       public function resetAuthToken() {
-               # Override this!
-               return true;
-       }
-}
index fb31249..7d0f108 100644 (file)
@@ -7471,13 +7471,6 @@ $wgAutoloadAttemptLowercase = true;
  */
 $wgExtensionCredits = [];
 
-/**
- * Authentication plugin.
- * @var $wgAuth AuthPlugin
- * @deprecated since 1.27 use $wgAuthManagerConfig instead
- */
-$wgAuth = null;
-
 /**
  * Global list of hooks.
  *
index 0695443..9b7d9a0 100644 (file)
@@ -152,9 +152,6 @@ class OutputPage extends ContextSource {
        /** @var array */
        protected $mModules = [];
 
-       /** @var array */
-       protected $mModuleScripts = [];
-
        /** @var array */
        protected $mModuleStyles = [];
 
@@ -552,30 +549,12 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Get the list of script-only modules to load on this page.
-        *
-        * @param bool $filter
-        * @param string|null $position Unused
-        * @return array Array of module names
-        */
-       public function getModuleScripts( $filter = false, $position = null ) {
-               return $this->getModules( $filter, null, 'mModuleScripts',
-                       ResourceLoaderModule::TYPE_SCRIPTS
-               );
-       }
-
-       /**
-        * Load the scripts of one or more ResourceLoader modules, on this page.
-        *
-        * This method exists purely to provide the legacy behaviour of loading
-        * a module's scripts in the global scope, and without dependency resolution.
-        * See <https://phabricator.wikimedia.org/T188689>.
-        *
-        * @deprecated since 1.31 Use addModules() instead.
-        * @param string|array $modules Module name (string) or array of module names
+        * @deprecated since 1.33 Use getModules() instead.
+        * @return array
         */
-       public function addModuleScripts( $modules ) {
-               $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules );
+       public function getModuleScripts() {
+               wfDeprecated( __METHOD__, '1.33' );
+               return [];
        }
 
        /**
@@ -1972,7 +1951,6 @@ class OutputPage extends ContextSource {
                $this->mNoGallery = $parserOutput->getNoGallery();
                $this->mHeadItems = array_merge( $this->mHeadItems, $parserOutput->getHeadItems() );
                $this->addModules( $parserOutput->getModules() );
-               $this->addModuleScripts( $parserOutput->getModuleScripts() );
                $this->addModuleStyles( $parserOutput->getModuleStyles() );
                $this->addJsConfigVars( $parserOutput->getJsConfigVars() );
                $this->mPreventClickjacking = $this->mPreventClickjacking
@@ -2039,7 +2017,6 @@ class OutputPage extends ContextSource {
                $this->addParserOutputText( $parserOutput, $poOptions );
 
                $this->addModules( $parserOutput->getModules() );
-               $this->addModuleScripts( $parserOutput->getModuleScripts() );
                $this->addModuleStyles( $parserOutput->getModuleStyles() );
 
                $this->addJsConfigVars( $parserOutput->getJsConfigVars() );
@@ -3185,7 +3162,6 @@ class OutputPage extends ContextSource {
                        $rlClient->setConfig( $this->getJSVars() );
                        $rlClient->setModules( $this->getModules( /*filter*/ true ) );
                        $rlClient->setModuleStyles( $moduleStyles );
-                       $rlClient->setModuleScripts( $this->getModuleScripts( /*filter*/ true ) );
                        $rlClient->setExemptStates( $exemptStates );
                        $this->rlClient = $rlClient;
                }
index 0cf8b51..3f6a5b4 100644 (file)
@@ -792,22 +792,6 @@ $wgContLang = MediaWikiServices::getInstance()->getContentLanguage();
 // Now that variant lists may be available...
 $wgRequest->interpolateTitle();
 
-if ( !is_object( $wgAuth ) ) {
-       $wgAuth = new MediaWiki\Auth\AuthManagerAuthPlugin;
-       Hooks::run( 'AuthPluginSetup', [ &$wgAuth ] );
-}
-if ( $wgAuth && !$wgAuth instanceof MediaWiki\Auth\AuthManagerAuthPlugin ) {
-       MediaWiki\Auth\AuthManager::singleton()->forcePrimaryAuthenticationProviders( [
-               new MediaWiki\Auth\TemporaryPasswordPrimaryAuthenticationProvider( [
-                       'authoritative' => false,
-               ] ),
-               new MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider( $wgAuth ),
-               new MediaWiki\Auth\LocalPasswordPrimaryAuthenticationProvider( [
-                       'authoritative' => true,
-               ] ),
-       ], '$wgAuth is ' . get_class( $wgAuth ) );
-}
-
 /**
  * @var MediaWiki\Session\SessionId|null $wgInitialSessionId The persistent
  * session ID (if any) loaded at startup
index 562bcdf..22f5235 100644 (file)
@@ -162,7 +162,8 @@ class ApiExpandTemplates extends ApiBase {
                                }
                                if ( isset( $prop['modules'] ) ) {
                                        $retval['modules'] = array_values( array_unique( $p_output->getModules() ) );
-                                       $retval['modulescripts'] = array_values( array_unique( $p_output->getModuleScripts() ) );
+                                       // Deprecated since 1.32 (T188689)
+                                       $retval['modulescripts'] = [];
                                        $retval['modulestyles'] = array_values( array_unique( $p_output->getModuleStyles() ) );
                                }
                                if ( isset( $prop['jsconfigvars'] ) ) {
index 9d69145..e033525 100644 (file)
@@ -307,7 +307,6 @@ abstract class ApiFormatBase extends ApiBase {
                                                'html' => $out->getHTML(),
                                                'modules' => array_values( array_unique( array_merge(
                                                        $out->getModules(),
-                                                       $out->getModuleScripts(),
                                                        $out->getModuleStyles()
                                                ) ) ),
                                                'continue' => $this->getResult()->getResultData( 'continue' ),
index 680e7dc..a233368 100644 (file)
@@ -1651,16 +1651,22 @@ class ApiMain extends ApiBase {
                        'http' => [
                                'method' => $request->getMethod(),
                                'client_ip' => $request->getIP(),
-                               'request_headers' => [
-                                       'user-agent' => $request->getHeader( 'User-agent' ),
-                                       'api-user-agent' => $request->getHeader( 'Api-user-agent' )
-                               ],
+                               'request_headers' => []
                        ],
                        'database' => wfWikiID(),
                        'backend_time_ms' => (int)round( $time * 1000 ),
                        'params' => []
                ];
 
+               // If set, these headers will be logged in http.request_headers.
+               // A http.request_headers entry should not be set if the header was not provided.
+               if ( $request->getHeader( 'User-agent' ) ) {
+                       $logCtx['http']['request_headers']['user-agent'] = $request->getHeader( 'User-agent' );
+               }
+               if ( $request->getHeader( 'Api-user-agent' ) ) {
+                       $logCtx['http']['request_headers']['api-user-agent'] = $request->getHeader( 'Api-user-agent' );
+               }
+
                $logCtx['meta']['request_id'] =
                        $logCtx['http']['request_headers']['x-request-id'] = WebRequest::getRequestId();
 
index 855b73d..fc730e3 100644 (file)
@@ -417,11 +417,13 @@ class ApiParse extends ApiBase {
                if ( isset( $prop['modules'] ) ) {
                        if ( $skin ) {
                                $result_array['modules'] = $outputPage->getModules();
-                               $result_array['modulescripts'] = $outputPage->getModuleScripts();
+                               // Deprecated since 1.32 (T188689)
+                               $result_array['modulescripts'] = [];
                                $result_array['modulestyles'] = $outputPage->getModuleStyles();
                        } else {
                                $result_array['modules'] = array_values( array_unique( $p_result->getModules() ) );
-                               $result_array['modulescripts'] = array_values( array_unique( $p_result->getModuleScripts() ) );
+                               // Deprecated since 1.32 (T188689)
+                               $result_array['modulescripts'] = [];
                                $result_array['modulestyles'] = array_values( array_unique( $p_result->getModuleStyles() ) );
                        }
                }
index f9174a7..946decf 100644 (file)
@@ -232,7 +232,9 @@ class AuthManager implements LoggerAwareInterface {
        }
 
        /**
-        * Call a legacy AuthPlugin method, if necessary
+        * This used to call a legacy AuthPlugin method, if necessary. Since that code has
+        * been removed, it now just returns the $return parameter.
+        *
         * @codeCoverageIgnore
         * @deprecated For backwards compatibility only, should be avoided in new code
         * @param string $method AuthPlugin method to call
@@ -241,13 +243,8 @@ class AuthManager implements LoggerAwareInterface {
         * @return mixed Return value from the AuthPlugin method, or $return
         */
        public static function callLegacyAuthPlugin( $method, array $params, $return = null ) {
-               global $wgAuth;
-
-               if ( $wgAuth && !$wgAuth instanceof AuthManagerAuthPlugin ) {
-                       return $wgAuth->$method( ...$params );
-               } else {
-                       return $return;
-               }
+               wfDeprecated( __METHOD__, '1.33' );
+               return $return;
        }
 
        /**
@@ -1745,7 +1742,6 @@ class AuthManager implements LoggerAwareInterface {
                // Inform the providers
                $this->callMethodOnProviders( 6, 'autoCreatedAccount', [ $user, $source ] );
 
-               \Hooks::run( 'AuthPluginAutoCreate', [ $user ], '1.27' );
                \Hooks::run( 'LocalUserCreated', [ $user, true ] );
                $user->saveSettings();
 
diff --git a/includes/auth/AuthManagerAuthPlugin.php b/includes/auth/AuthManagerAuthPlugin.php
deleted file mode 100644 (file)
index 008639c..0000000
+++ /dev/null
@@ -1,197 +0,0 @@
-<?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\Auth;
-
-use Psr\Log\LoggerInterface;
-use User;
-
-/**
- * Backwards-compatibility wrapper for AuthManager via $wgAuth
- * @since 1.27
- * @deprecated since 1.27
- */
-class AuthManagerAuthPlugin extends \AuthPlugin {
-       /** @var string|null */
-       protected $domain = null;
-
-       /** @var LoggerInterface */
-       protected $logger = null;
-
-       public function __construct() {
-               $this->logger = \MediaWiki\Logger\LoggerFactory::getInstance( 'authentication' );
-       }
-
-       public function userExists( $name ) {
-               return AuthManager::singleton()->userExists( $name );
-       }
-
-       public function authenticate( $username, $password ) {
-               $data = [
-                       'username' => $username,
-                       'password' => $password,
-               ];
-               if ( $this->domain !== null && $this->domain !== '' ) {
-                       $data['domain'] = $this->domain;
-               }
-               $reqs = AuthManager::singleton()->getAuthenticationRequests( AuthManager::ACTION_LOGIN );
-               $reqs = AuthenticationRequest::loadRequestsFromSubmission( $reqs, $data );
-
-               $res = AuthManager::singleton()->beginAuthentication( $reqs, 'null:' );
-               switch ( $res->status ) {
-                       case AuthenticationResponse::PASS:
-                               return true;
-                       case AuthenticationResponse::FAIL:
-                               // Hope it's not a PreAuthenticationProvider that failed...
-                               $msg = $res->message instanceof \Message ? $res->message : new \Message( $res->message );
-                               $this->logger->info( __METHOD__ . ': Authentication failed: ' . $msg->plain() );
-                               return false;
-                       default:
-                               throw new \BadMethodCallException(
-                                       'AuthManager does not support such simplified authentication'
-                               );
-               }
-       }
-
-       public function modifyUITemplate( &$template, &$type ) {
-               // AuthManager does not support direct UI screwing-around-with
-       }
-
-       public function setDomain( $domain ) {
-               $this->domain = $domain;
-       }
-
-       public function getDomain() {
-               return $this->domain ?? 'invaliddomain';
-       }
-
-       public function validDomain( $domain ) {
-               $domainList = $this->domainList();
-               return $domainList ? in_array( $domain, $domainList, true ) : $domain === '';
-       }
-
-       public function updateUser( &$user ) {
-               \Hooks::run( 'UserLoggedIn', [ $user ] );
-               return true;
-       }
-
-       public function autoCreate() {
-               return true;
-       }
-
-       public function allowPropChange( $prop = '' ) {
-               return AuthManager::singleton()->allowsPropertyChange( $prop );
-       }
-
-       public function allowPasswordChange() {
-               $reqs = AuthManager::singleton()->getAuthenticationRequests( AuthManager::ACTION_CHANGE );
-               foreach ( $reqs as $req ) {
-                       if ( $req instanceof PasswordAuthenticationRequest ) {
-                               return true;
-                       }
-               }
-
-               return false;
-       }
-
-       public function allowSetLocalPassword() {
-               // There should be a PrimaryAuthenticationProvider that does this, if necessary
-               return false;
-       }
-
-       public function setPassword( $user, $password ) {
-               $data = [
-                       'username' => $user->getName(),
-                       'password' => $password,
-               ];
-               if ( $this->domain !== null && $this->domain !== '' ) {
-                       $data['domain'] = $this->domain;
-               }
-               $reqs = AuthManager::singleton()->getAuthenticationRequests( AuthManager::ACTION_CHANGE );
-               $reqs = AuthenticationRequest::loadRequestsFromSubmission( $reqs, $data );
-               foreach ( $reqs as $req ) {
-                       $status = AuthManager::singleton()->allowsAuthenticationDataChange( $req );
-                       if ( !$status->isGood() ) {
-                               $this->logger->info( __METHOD__ . ': Password change rejected: {reason}', [
-                                       'username' => $data['username'],
-                                       'reason' => $status->getWikiText( null, null, 'en' ),
-                               ] );
-                               return false;
-                       }
-               }
-               foreach ( $reqs as $req ) {
-                       AuthManager::singleton()->changeAuthenticationData( $req );
-               }
-               return true;
-       }
-
-       public function updateExternalDB( $user ) {
-               // This fires the necessary hook
-               $user->saveSettings();
-               return true;
-       }
-
-       public function updateExternalDBGroups( $user, $addgroups, $delgroups = [] ) {
-               throw new \BadMethodCallException(
-                       'Update of user groups via AuthPlugin is not supported with AuthManager.'
-               );
-       }
-
-       public function canCreateAccounts() {
-               return AuthManager::singleton()->canCreateAccounts();
-       }
-
-       public function addUser( $user, $password, $email = '', $realname = '' ) {
-               throw new \BadMethodCallException(
-                       'Creation of users via AuthPlugin is not supported with '
-                       . 'AuthManager. Generally, user creation should be left to either '
-                       . 'Special:CreateAccount, auto-creation when triggered by a '
-                       . 'SessionProvider or PrimaryAuthenticationProvider, or '
-                       . 'User::newSystemUser().'
-               );
-       }
-
-       public function strict() {
-               // There should be a PrimaryAuthenticationProvider that does this, if necessary
-               return true;
-       }
-
-       public function strictUserAuth( $username ) {
-               // There should be a PrimaryAuthenticationProvider that does this, if necessary
-               return true;
-       }
-
-       public function initUser( &$user, $autocreate = false ) {
-               \Hooks::run( 'LocalUserCreated', [ $user, $autocreate ] );
-       }
-
-       public function getCanonicalName( $username ) {
-               // AuthManager doesn't support restrictions beyond MediaWiki's
-               return $username;
-       }
-
-       public function getUserInstance( User &$user ) {
-               return new AuthManagerAuthPluginUser( $user );
-       }
-
-       public function domainList() {
-               return [];
-       }
-}
diff --git a/includes/auth/AuthManagerAuthPluginUser.php b/includes/auth/AuthManagerAuthPluginUser.php
deleted file mode 100644 (file)
index e31be60..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-<?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\Auth;
-
-use User;
-
-/**
- * @since 1.27
- * @deprecated since 1.27
- */
-class AuthManagerAuthPluginUser extends \AuthPluginUser {
-       /** @var User */
-       private $user;
-
-       function __construct( $user ) {
-               $this->user = $user;
-       }
-
-       public function getId() {
-               return $this->user->getId();
-       }
-
-       public function isLocked() {
-               return $this->user->isLocked();
-       }
-
-       public function isHidden() {
-               return $this->user->isHidden();
-       }
-
-       public function resetAuthToken() {
-               \MediaWiki\Session\SessionManager::singleton()->invalidateSessionsForUser( $this->user );
-               return true;
-       }
-}
diff --git a/includes/auth/AuthPluginPrimaryAuthenticationProvider.php b/includes/auth/AuthPluginPrimaryAuthenticationProvider.php
deleted file mode 100644 (file)
index cd0734d..0000000
+++ /dev/null
@@ -1,429 +0,0 @@
-<?php
-/**
- * Primary authentication provider wrapper for AuthPlugin
- *
- * 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 Auth
- */
-
-namespace MediaWiki\Auth;
-
-use AuthPlugin;
-use User;
-
-/**
- * Primary authentication provider wrapper for AuthPlugin
- * @warning If anything depends on the wrapped AuthPlugin being $wgAuth, it won't work with this!
- * @ingroup Auth
- * @since 1.27
- * @deprecated since 1.27
- */
-class AuthPluginPrimaryAuthenticationProvider
-       extends AbstractPasswordPrimaryAuthenticationProvider
-{
-       private $auth;
-       private $hasDomain;
-       private $requestType = null;
-
-       /**
-        * @param AuthPlugin $auth AuthPlugin to wrap
-        * @param string|null $requestType Class name of the
-        *  PasswordAuthenticationRequest to use. If $auth->domainList() returns
-        *  more than one domain, this must be a PasswordDomainAuthenticationRequest.
-        */
-       public function __construct( AuthPlugin $auth, $requestType = null ) {
-               parent::__construct();
-
-               if ( $auth instanceof AuthManagerAuthPlugin ) {
-                       throw new \InvalidArgumentException(
-                               'Trying to wrap AuthManagerAuthPlugin in AuthPluginPrimaryAuthenticationProvider ' .
-                                       'makes no sense.'
-                       );
-               }
-
-               $need = count( $auth->domainList() ) > 1
-                       ? PasswordDomainAuthenticationRequest::class
-                       : PasswordAuthenticationRequest::class;
-               if ( $requestType === null ) {
-                       $requestType = $need;
-               } elseif ( $requestType !== $need && !is_subclass_of( $requestType, $need ) ) {
-                       throw new \InvalidArgumentException( "$requestType is not a $need" );
-               }
-
-               $this->auth = $auth;
-               $this->requestType = $requestType;
-               $this->hasDomain = (
-                       $requestType === PasswordDomainAuthenticationRequest::class ||
-                       is_subclass_of( $requestType, PasswordDomainAuthenticationRequest::class )
-               );
-               $this->authoritative = $auth->strict();
-
-               // Registering hooks from core is unusual, but is needed here to be
-               // able to call the AuthPlugin methods those hooks replace.
-               \Hooks::register( 'UserSaveSettings', [ $this, 'onUserSaveSettings' ] );
-               \Hooks::register( 'UserGroupsChanged', [ $this, 'onUserGroupsChanged' ] );
-               \Hooks::register( 'UserLoggedIn', [ $this, 'onUserLoggedIn' ] );
-               \Hooks::register( 'LocalUserCreated', [ $this, 'onLocalUserCreated' ] );
-       }
-
-       /**
-        * Create an appropriate AuthenticationRequest
-        * @return PasswordAuthenticationRequest
-        */
-       protected function makeAuthReq() {
-               $class = $this->requestType;
-               if ( $this->hasDomain ) {
-                       return new $class( $this->auth->domainList() );
-               } else {
-                       return new $class();
-               }
-       }
-
-       /**
-        * Call $this->auth->setDomain()
-        * @param PasswordAuthenticationRequest $req
-        */
-       protected function setDomain( $req ) {
-               if ( $this->hasDomain ) {
-                       $domain = $req->domain;
-               } else {
-                       // Just grab the first one.
-                       $domainList = $this->auth->domainList();
-                       $domain = reset( $domainList );
-               }
-
-               // Special:UserLogin does this. Strange.
-               if ( !$this->auth->validDomain( $domain ) ) {
-                       $domain = $this->auth->getDomain();
-               }
-               $this->auth->setDomain( $domain );
-       }
-
-       /**
-        * Hook function to call AuthPlugin::updateExternalDB()
-        * @param User $user
-        * @codeCoverageIgnore
-        */
-       public function onUserSaveSettings( $user ) {
-               // No way to know the domain, just hope the provider handles that.
-               $this->auth->updateExternalDB( $user );
-       }
-
-       /**
-        * Hook function to call AuthPlugin::updateExternalDBGroups()
-        * @param User $user
-        * @param array $added
-        * @param array $removed
-        */
-       public function onUserGroupsChanged( $user, $added, $removed ) {
-               // No way to know the domain, just hope the provider handles that.
-               $this->auth->updateExternalDBGroups( $user, $added, $removed );
-       }
-
-       /**
-        * Hook function to call AuthPlugin::updateUser()
-        * @param User $user
-        */
-       public function onUserLoggedIn( $user ) {
-               $hookUser = $user;
-               // No way to know the domain, just hope the provider handles that.
-               $this->auth->updateUser( $hookUser );
-               if ( $hookUser !== $user ) {
-                       throw new \UnexpectedValueException(
-                               get_class( $this->auth ) . '::updateUser() tried to replace $user!'
-                       );
-               }
-       }
-
-       /**
-        * Hook function to call AuthPlugin::initUser()
-        * @param User $user
-        * @param bool $autocreated
-        */
-       public function onLocalUserCreated( $user, $autocreated ) {
-               // For $autocreated, see self::autoCreatedAccount()
-               if ( !$autocreated ) {
-                       $hookUser = $user;
-                       // No way to know the domain, just hope the provider handles that.
-                       $this->auth->initUser( $hookUser, $autocreated );
-                       if ( $hookUser !== $user ) {
-                               throw new \UnexpectedValueException(
-                                       get_class( $this->auth ) . '::initUser() tried to replace $user!'
-                               );
-                       }
-               }
-       }
-
-       public function getUniqueId() {
-               return parent::getUniqueId() . ':' . get_class( $this->auth );
-       }
-
-       public function getAuthenticationRequests( $action, array $options ) {
-               switch ( $action ) {
-                       case AuthManager::ACTION_LOGIN:
-                       case AuthManager::ACTION_CREATE:
-                               return [ $this->makeAuthReq() ];
-
-                       case AuthManager::ACTION_CHANGE:
-                       case AuthManager::ACTION_REMOVE:
-                               // No way to know the domain, just hope the provider handles that.
-                               return $this->auth->allowPasswordChange() ? [ $this->makeAuthReq() ] : [];
-
-                       default:
-                               return [];
-               }
-       }
-
-       public function beginPrimaryAuthentication( array $reqs ) {
-               $req = AuthenticationRequest::getRequestByClass( $reqs, $this->requestType );
-               if ( !$req || $req->username === null || $req->password === null ||
-                       ( $this->hasDomain && $req->domain === null )
-               ) {
-                       return AuthenticationResponse::newAbstain();
-               }
-
-               $username = User::getCanonicalName( $req->username, 'usable' );
-               if ( $username === false ) {
-                       return AuthenticationResponse::newAbstain();
-               }
-
-               $this->setDomain( $req );
-               if ( $this->testUserCanAuthenticateInternal( User::newFromName( $username ) ) &&
-                       $this->auth->authenticate( $username, $req->password )
-               ) {
-                       return AuthenticationResponse::newPass( $username );
-               } else {
-                       $this->authoritative = $this->auth->strict() || $this->auth->strictUserAuth( $username );
-                       return $this->failResponse( $req );
-               }
-       }
-
-       public function testUserCanAuthenticate( $username ) {
-               $username = User::getCanonicalName( $username, 'usable' );
-               if ( $username === false ) {
-                       return false;
-               }
-
-               // We have to check every domain, because at least LdapAuthentication
-               // interprets AuthPlugin::userExists() as applying only to the current
-               // domain.
-               $curDomain = $this->auth->getDomain();
-               $domains = $this->auth->domainList() ?: [ '' ];
-               foreach ( $domains as $domain ) {
-                       $this->auth->setDomain( $domain );
-                       if ( $this->testUserCanAuthenticateInternal( User::newFromName( $username ) ) ) {
-                               $this->auth->setDomain( $curDomain );
-                               return true;
-                       }
-               }
-               $this->auth->setDomain( $curDomain );
-               return false;
-       }
-
-       /**
-        * @see self::testUserCanAuthenticate
-        * @note The caller is responsible for calling $this->auth->setDomain()
-        * @param User $user
-        * @return bool
-        */
-       private function testUserCanAuthenticateInternal( $user ) {
-               if ( $this->auth->userExists( $user->getName() ) ) {
-                       return !$this->auth->getUserInstance( $user )->isLocked();
-               } else {
-                       return false;
-               }
-       }
-
-       public function providerRevokeAccessForUser( $username ) {
-               $username = User::getCanonicalName( $username, 'usable' );
-               if ( $username === false ) {
-                       return;
-               }
-               $user = User::newFromName( $username );
-               if ( $user ) {
-                       // Reset the password on every domain.
-                       $curDomain = $this->auth->getDomain();
-                       $domains = $this->auth->domainList() ?: [ '' ];
-                       $failed = [];
-                       foreach ( $domains as $domain ) {
-                               $this->auth->setDomain( $domain );
-                               if ( $this->testUserCanAuthenticateInternal( $user ) &&
-                                       !$this->auth->setPassword( $user, null )
-                               ) {
-                                       $failed[] = $domain === '' ? '(default)' : $domain;
-                               }
-                       }
-                       $this->auth->setDomain( $curDomain );
-                       if ( $failed ) {
-                               throw new \UnexpectedValueException(
-                                       "AuthPlugin failed to reset password for $username in the following domains: "
-                                               . implode( ' ', $failed )
-                               );
-                       }
-               }
-       }
-
-       public function testUserExists( $username, $flags = User::READ_NORMAL ) {
-               $username = User::getCanonicalName( $username, 'usable' );
-               if ( $username === false ) {
-                       return false;
-               }
-
-               // We have to check every domain, because at least LdapAuthentication
-               // interprets AuthPlugin::userExists() as applying only to the current
-               // domain.
-               $curDomain = $this->auth->getDomain();
-               $domains = $this->auth->domainList() ?: [ '' ];
-               foreach ( $domains as $domain ) {
-                       $this->auth->setDomain( $domain );
-                       if ( $this->auth->userExists( $username ) ) {
-                               $this->auth->setDomain( $curDomain );
-                               return true;
-                       }
-               }
-               $this->auth->setDomain( $curDomain );
-               return false;
-       }
-
-       public function providerAllowsPropertyChange( $property ) {
-               // No way to know the domain, just hope the provider handles that.
-               return $this->auth->allowPropChange( $property );
-       }
-
-       public function providerAllowsAuthenticationDataChange(
-               AuthenticationRequest $req, $checkData = true
-       ) {
-               if ( get_class( $req ) !== $this->requestType ) {
-                       return \StatusValue::newGood( 'ignored' );
-               }
-
-               // Hope it works, AuthPlugin gives us no way to do this.
-               $curDomain = $this->auth->getDomain();
-               $this->setDomain( $req );
-               try {
-                       // If !$checkData the domain might be wrong. Nothing we can do about that.
-                       if ( !$this->auth->allowPasswordChange() ) {
-                               return \StatusValue::newFatal( 'authmanager-authplugin-setpass-denied' );
-                       }
-
-                       if ( !$checkData ) {
-                               return \StatusValue::newGood();
-                       }
-
-                       if ( $this->hasDomain ) {
-                               if ( $req->domain === null ) {
-                                       return \StatusValue::newGood( 'ignored' );
-                               }
-                               if ( !$this->auth->validDomain( $req->domain ) ) {
-                                       return \StatusValue::newFatal( 'authmanager-authplugin-setpass-bad-domain' );
-                               }
-                       }
-
-                       $username = User::getCanonicalName( $req->username, 'usable' );
-                       if ( $username !== false ) {
-                               $sv = \StatusValue::newGood();
-                               if ( $req->password !== null ) {
-                                       if ( $req->password !== $req->retype ) {
-                                               $sv->fatal( 'badretype' );
-                                       } else {
-                                               $sv->merge( $this->checkPasswordValidity( $username, $req->password ) );
-                                       }
-                               }
-                               return $sv;
-                       } else {
-                               return \StatusValue::newGood( 'ignored' );
-                       }
-               } finally {
-                       $this->auth->setDomain( $curDomain );
-               }
-       }
-
-       public function providerChangeAuthenticationData( AuthenticationRequest $req ) {
-               if ( get_class( $req ) === $this->requestType ) {
-                       $username = $req->username !== null ? User::getCanonicalName( $req->username, 'usable' ) : false;
-                       if ( $username === false ) {
-                               return;
-                       }
-
-                       if ( $this->hasDomain && $req->domain === null ) {
-                               return;
-                       }
-
-                       $this->setDomain( $req );
-                       $user = User::newFromName( $username );
-                       if ( !$this->auth->setPassword( $user, $req->password ) ) {
-                               // This is totally unfriendly and leaves other
-                               // AuthenticationProviders in an uncertain state, but what else
-                               // can we do?
-                               throw new \ErrorPageError(
-                                       'authmanager-authplugin-setpass-failed-title',
-                                       'authmanager-authplugin-setpass-failed-message'
-                               );
-                       }
-               }
-       }
-
-       public function accountCreationType() {
-               // No way to know the domain, just hope the provider handles that.
-               return $this->auth->canCreateAccounts() ? self::TYPE_CREATE : self::TYPE_NONE;
-       }
-
-       public function testForAccountCreation( $user, $creator, array $reqs ) {
-               return \StatusValue::newGood();
-       }
-
-       public function beginPrimaryAccountCreation( $user, $creator, array $reqs ) {
-               if ( $this->accountCreationType() === self::TYPE_NONE ) {
-                       throw new \BadMethodCallException( 'Shouldn\'t call this when accountCreationType() is NONE' );
-               }
-
-               $req = AuthenticationRequest::getRequestByClass( $reqs, $this->requestType );
-               if ( !$req || $req->username === null || $req->password === null ||
-                       ( $this->hasDomain && $req->domain === null )
-               ) {
-                       return AuthenticationResponse::newAbstain();
-               }
-
-               $username = User::getCanonicalName( $req->username, 'usable' );
-               if ( $username === false ) {
-                       return AuthenticationResponse::newAbstain();
-               }
-
-               $this->setDomain( $req );
-               if ( $this->auth->addUser(
-                       $user, $req->password, $user->getEmail(), $user->getRealName()
-               ) ) {
-                       return AuthenticationResponse::newPass();
-               } else {
-                       return AuthenticationResponse::newFail(
-                               new \Message( 'authmanager-authplugin-create-fail' )
-                       );
-               }
-       }
-
-       public function autoCreatedAccount( $user, $source ) {
-               $hookUser = $user;
-               // No way to know the domain, just hope the provider handles that.
-               $this->auth->initUser( $hookUser, true );
-               if ( $hookUser !== $user ) {
-                       throw new \UnexpectedValueException(
-                               get_class( $this->auth ) . '::initUser() tried to replace $user!'
-                       );
-               }
-       }
-}
index 87fc27b..7d8ce34 100644 (file)
@@ -71,7 +71,8 @@
        "config-pcre-no-utf8": "'''Fatal''': Modul PCRE PHP tampaknya dikompilasi tanpa dukungan PCRE_UTF8.\nMediaWiki memerlukan dukungan UTF-8 untuk berfungsi dengan benar.",
        "config-memory-raised": "<code>memory_limit</code> PHP adalah $1, dinaikkan ke $2.",
        "config-memory-bad": "'''Peringatan:''' <code>memory_limit</code> PHP adalah $1.\nIni terlalu rendah.\nInstalasi terancam gagal!",
-       "config-apc": "[https://secure.php.net/apc APC] telah diinstal",
+       "config-apc": "[https://secure.php.net/apc APC] telah dipasang",
+       "config-apcu": "[https://secure.php.net/apcu APCu] telah dipasang",
        "config-wincache": "[https://www.iis.net/downloads/microsoft/wincache-extension WinCache] telah diinstal",
        "config-no-cache-apcu": "<strong>Peringatan:</strong> Tidak dapat menemukan [https://secure.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] atau [https://www.iis.net/downloads/microsoft/wincache-extension WinCache]. Singgahan obyek tidak diaktifkan.",
        "config-mod-security": "<strong>Peringatan:</strong> Server web Anda memiliki [https://modsecurity.org/ mod_security] yang diaktifkan. Jika salah dalam mengkonfigurasi, ini dapat menyebabkan masalah untuk MediaWiki atau perangkat lunak lain yang memungkinkan pengguna untuk mengirim sembarang konten.\nLihat [https://modsecurity.org/documentation/ dokumentasi mod_security] atau hubungi layanan host Anda jika Anda mengalami kesalahan acak.",
        "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite] adalah sistem basis data yang ringan yang sangat baik dukungannya. ([http://www.php.net/manual/en/pdo.installation.php cara mengompilasi PHP dengan dukungan SQLite], menggunakan PDO)",
        "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] adalah basis data komersial untuk perusahaan. ([http://www.php.net/manual/en/oci8.installation.php cara mengompilasi PHP dengan dukungan OCI8])",
        "config-dbsupport-mssql": "[{{int:version-db-mssql-url}} Microsoft SQL Server] adalah database perusahaan komersial untuk Windows. ([https://secure.php.net/manual/en/sqlsrv.installation.php Bagaimana cara mengkompilasi PHP dengan dukungan SQLSRV])",
-       "config-header-mysql": "Pengaturan MySQL",
+       "config-header-mysql": "Pengaturan MariaDB/MySQL",
        "config-header-postgres": "Pengaturan PostgreSQL",
        "config-header-sqlite": "Pengaturan SQLite",
        "config-header-oracle": "Pengaturan Oracle",
        "config-help-tooltip": "klik untuk memperluas",
        "config-nofile": "Berkas \"$1\" tidak dapat ditemukan. Mungkin sudah dihapus?",
        "config-extension-link": "Tahukah Anda bahwa wiki Anda mendukung [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions ekstensi]?\n\nAnda dapat menjelajahi [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category ekstensi menurut kategori] atau [https://www.mediawiki.org/wiki/Extension_Matrix Ekstensi Matriks] untuk melihat daftar lengkap ekstensi.",
+       "config-skins-screenshots": "$1 (tangkapan layar: $2)",
+       "config-extensions-requires": "$1 (memerlukan $2)",
+       "config-screenshot": "tangkapan layar",
        "mainpagetext": "<strong>MediaWiki telah terpasang dengan sukses.</strong>",
        "mainpagedocfooter": "Konsultasikan [https://www.mediawiki.org/wiki/Help:Contents Panduan Pengguna] untuk cara penggunaan perangkat lunak wiki ini.\n\n== Memulai ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Daftar pengaturan konfigurasi]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ Pertanyaan yang sering diajukan mengenai MediaWiki]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Milis rilis MediaWiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Pelokalan MediaWiki untuk bahasa Anda]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Belajar bagaimana menghadapi spam di wiki lokal]"
 }
index 536177e..a383390 100644 (file)
@@ -23,7 +23,8 @@
 use Psr\Log\LoggerAwareInterface;
 use Psr\Log\LoggerInterface;
 use Psr\Log\NullLogger;
-use MediaWiki\MediaWikiServices;
+use Psr\Http\Message\ResponseInterface;
+use GuzzleHttp\Client;
 
 /**
  * Class to handle multiple HTTP requests
@@ -41,7 +42,10 @@ use MediaWiki\MediaWikiServices;
  *                PUT requests, and a field/value array for POST request;
  *                array bodies are encoded as multipart/form-data and strings
  *                use application/x-www-form-urlencoded (headers sent automatically)
+ *   - sink     : resource to receive the HTTP response body (preferred over stream)
+ *                @since 1.33
  *   - stream   : resource to stream the HTTP response body to
+ *                @deprecated since 1.33, use sink instead
  *   - proxy    : HTTP proxy to use
  *   - flags    : map of boolean flags which supports:
  *                  - relayResponseHeaders : write out header via header()
@@ -50,58 +54,62 @@ use MediaWiki\MediaWikiServices;
  * @since 1.23
  */
 class MultiHttpClient implements LoggerAwareInterface {
-       /** @var resource */
-       protected $multiHandle = null; // curl_multi handle
-       /** @var string|null SSL certificates path */
-       protected $caBundlePath;
-       /** @var float */
+       /** @var float connection timeout in seconds, zero to wait indefinitely*/
        protected $connTimeout = 10;
-       /** @var float */
+       /** @var float request timeout in seconds, zero to wait indefinitely*/
        protected $reqTimeout = 300;
-       /** @var bool */
-       protected $usePipelining = false;
-       /** @var int */
-       protected $maxConnsPerHost = 50;
        /** @var string|null proxy */
        protected $proxy;
+       /** @var int CURLMOPT_PIPELINING value, only effective if curl is available */
+       protected $pipeliningMode = 0;
+       /** @var int CURLMOPT_MAXCONNECTS value, only effective if curl is available */
+       protected $maxConnsPerHost = 50;
        /** @var string */
        protected $userAgent = 'wikimedia/multi-http-client v1.0';
        /** @var LoggerInterface */
        protected $logger;
-
-       // In PHP 7 due to https://bugs.php.net/bug.php?id=76480 the request/connect
-       // timeouts are periodically polled instead of being accurately respected.
-       // The select timeout is set to the minimum timeout multiplied by this factor.
-       const TIMEOUT_ACCURACY_FACTOR = 0.1;
+       /** @var string|null SSL certificates path */
+       protected $caBundlePath;
 
        /**
         * @param array $options
         *   - connTimeout     : default connection timeout (seconds)
         *   - reqTimeout      : default request timeout (seconds)
         *   - proxy           : HTTP proxy to use
-        *   - usePipelining   : whether to use HTTP pipelining if possible (for all hosts)
+        *   - pipeliningMode  : whether to use HTTP pipelining/multiplexing if possible (for all
+        *                       hosts).  The exact behavior is dependent on curl version.
         *   - maxConnsPerHost : maximum number of concurrent connections (per host)
         *   - userAgent       : The User-Agent header value to send
         *   - logger          : a \Psr\Log\LoggerInterface instance for debug logging
         *   - caBundlePath    : path to specific Certificate Authority bundle (if any)
         * @throws Exception
+        *
+        * usePipelining is an alias for pipelining mode, retained for backward compatibility.
+        * If both usePipelining and pipeliningMode are specified, pipeliningMode wins.
         */
        public function __construct( array $options ) {
                if ( isset( $options['caBundlePath'] ) ) {
                        $this->caBundlePath = $options['caBundlePath'];
                        if ( !file_exists( $this->caBundlePath ) ) {
-                               throw new Exception( "Cannot find CA bundle: " . $this->caBundlePath );
+                               throw new Exception( "Cannot find CA bundle: {$this->caBundlePath}" );
                        }
                }
+
+               // Backward compatibility.  Defers to newer option naming if both are specified.
+               if ( isset( $options['usePipelining'] ) ) {
+                       $this->pipeliningMode = $options['usePipelining'];
+               }
+
                static $opts = [
-                       'connTimeout', 'reqTimeout', 'usePipelining', 'maxConnsPerHost',
-                       'proxy', 'userAgent', 'logger'
+                       'connTimeout', 'reqTimeout', 'proxy', 'pipeliningMode', 'maxConnsPerHost',
+                       'userAgent', 'logger'
                ];
                foreach ( $opts as $key ) {
                        if ( isset( $options[$key] ) ) {
                                $this->$key = $options[$key];
                        }
                }
+
                if ( $this->logger === null ) {
                        $this->logger = new NullLogger;
                }
@@ -114,17 +122,20 @@ class MultiHttpClient implements LoggerAwareInterface {
         *   - code    : HTTP response code or 0 if there was a serious error
         *   - reason  : HTTP response reason (empty if there was a serious error)
         *   - headers : <header name/value associative array>
-        *   - body    : HTTP response body or resource (if "stream" was set)
-        *   - error     : Any error string
+        *   - body    : HTTP response body
+        *   - error   : Any error string
         * The map also stores integer-indexed copies of these values. This lets callers do:
         * @code
-        *              list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req );
+        *        list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $http->run( $req );
         * @endcode
         * @param array $req HTTP request array
         * @param array $opts
         *   - connTimeout    : connection timeout per request (seconds)
         *   - reqTimeout     : post-connection timeout per request (seconds)
+        *   - handler        : optional custom handler
+        *                      See http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html
         * @return array Response array for request
+        * @throws Exception
         */
        public function run( array $req, array $opts = [] ) {
                return $this->runMulti( [ $req ], $opts )[0]['response'];
@@ -140,7 +151,7 @@ class MultiHttpClient implements LoggerAwareInterface {
         *   - code    : HTTP response code or 0 if there was a serious error
         *   - reason  : HTTP response reason (empty if there was a serious error)
         *   - headers : <header name/value associative array>
-        *   - body    : HTTP response body or resource (if "stream" was set)
+        *   - body    : HTTP response body
         *   - error   : Any error string
         * The map also stores integer-indexed copies of these values. This lets callers do:
         * @code
@@ -154,18 +165,20 @@ class MultiHttpClient implements LoggerAwareInterface {
         * @param array $opts
         *   - connTimeout     : connection timeout per request (seconds)
         *   - reqTimeout      : post-connection timeout per request (seconds)
-        *   - usePipelining   : whether to use HTTP pipelining if possible
+        *   - pipeliningMode  : whether to use HTTP pipelining/multiplexing if possible (for all
+        *                       hosts). The exact behavior is dependent on curl version.
         *   - maxConnsPerHost : maximum number of concurrent connections (per host)
+        *   - handler         : optional custom handler.
+        *                       See http://docs.guzzlephp.org/en/stable/handlers-and-middleware.html
         * @return array $reqs With response array populated for each
         * @throws Exception
+        *
+        * usePipelining is an alias for pipelining mode, retained for backward compatibility.
+        * If both usePipelining and pipeliningMode are specified, pipeliningMode wins.
         */
        public function runMulti( array $reqs, array $opts = [] ) {
                $this->normalizeRequests( $reqs );
-               if ( $this->isCurlEnabled() ) {
-                       return $this->runMultiCurl( $reqs, $opts );
-               } else {
-                       return $this->runMultiHttp( $reqs, $opts );
-               }
+               return $this->runMultiGuzzle( $reqs, $opts );
        }
 
        /**
@@ -184,354 +197,178 @@ class MultiHttpClient implements LoggerAwareInterface {
         *
         * @param array $reqs Map of HTTP request arrays
         * @param array $opts
-        *   - connTimeout     : connection timeout per request (seconds)
-        *   - reqTimeout      : post-connection timeout per request (seconds)
-        *   - usePipelining   : whether to use HTTP pipelining if possible
-        *   - maxConnsPerHost : maximum number of concurrent connections (per host)
         * @return array $reqs With response array populated for each
         * @throws Exception
         */
-       private function runMultiCurl( array $reqs, array $opts = [] ) {
-               $chm = $this->getCurlMulti();
-
-               $selectTimeout = $this->getSelectTimeout( $opts );
-
-               // Add all of the required cURL handles...
-               $handles = [];
-               foreach ( $reqs as $index => &$req ) {
-                       $handles[$index] = $this->getCurlHandle( $req, $opts );
-                       if ( count( $reqs ) > 1 ) {
-                               // https://github.com/guzzle/guzzle/issues/349
-                               curl_setopt( $handles[$index], CURLOPT_FORBID_REUSE, true );
-                       }
-               }
-               unset( $req ); // don't assign over this by accident
+       private function runMultiGuzzle( array $reqs, array $opts = [] ) {
+               $guzzleOptions = [
+                       'timeout' => $opts['reqTimeout'] ?? $this->reqTimeout,
+                       'connect_timeout' => $opts['connTimeout'] ?? $this->connTimeout,
+                       'allow_redirects' => [
+                               'max' => 4,
+                       ],
+               ];
 
-               $indexes = array_keys( $reqs );
-               if ( isset( $opts['usePipelining'] ) ) {
-                       curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$opts['usePipelining'] );
-               }
-               if ( isset( $opts['maxConnsPerHost'] ) ) {
-                       // Keep these sockets around as they may be needed later in the request
-                       curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$opts['maxConnsPerHost'] );
+               if ( !is_null( $this->caBundlePath ) ) {
+                       $guzzleOptions['verify'] = $this->caBundlePath;
                }
 
-               // @TODO: use a per-host rolling handle window (e.g. CURLMOPT_MAX_HOST_CONNECTIONS)
-               $batches = array_chunk( $indexes, $this->maxConnsPerHost );
-               $infos = [];
+               // Include curl-specific option section only if curl is available.
+               // Our defaults may differ from curl's defaults, depending on curl version.
+               if ( $this->isCurlEnabled() ) {
+                       // Backward compatibility
+                       $optsPipeliningMode = $opts['pipeliningMode'] ?? ( $opts['usePipelining'] ?? null );
 
-               foreach ( $batches as $batch ) {
-                       // Attach all cURL handles for this batch
-                       foreach ( $batch as $index ) {
-                               curl_multi_add_handle( $chm, $handles[$index] );
-                       }
-                       // Execute the cURL handles concurrently...
-                       $active = null; // handles still being processed
-                       do {
-                               // Do any available work...
-                               do {
-                                       $mrc = curl_multi_exec( $chm, $active );
-                                       $info = curl_multi_info_read( $chm );
-                                       if ( $info !== false ) {
-                                               $infos[(int)$info['handle']] = $info;
-                                       }
-                               } while ( $mrc == CURLM_CALL_MULTI_PERFORM );
-                               // Wait (if possible) for available work...
-                               if ( $active > 0 && $mrc == CURLM_OK ) {
-                                       if ( curl_multi_select( $chm, $selectTimeout ) == -1 ) {
-                                               // PHP bug 63411; https://curl.haxx.se/libcurl/c/curl_multi_fdset.html
-                                               usleep( 5000 ); // 5ms
-                                       }
-                               }
-                       } while ( $active > 0 && $mrc == CURLM_OK );
-               }
+                       // Per-request options override class-level options
+                       $pipeliningMode = $optsPipeliningMode ?? $this->pipeliningMode;
+                       $maxConnsPerHost = $opts['maxConnsPerHost'] ?? $this->maxConnsPerHost;
 
-               // Remove all of the added cURL handles and check for errors...
-               foreach ( $reqs as $index => &$req ) {
-                       $ch = $handles[$index];
-                       curl_multi_remove_handle( $chm, $ch );
-
-                       if ( isset( $infos[(int)$ch] ) ) {
-                               $info = $infos[(int)$ch];
-                               $errno = $info['result'];
-                               if ( $errno !== 0 ) {
-                                       $req['response']['error'] = "(curl error: $errno)";
-                                       if ( function_exists( 'curl_strerror' ) ) {
-                                               $req['response']['error'] .= " " . curl_strerror( $errno );
-                                       }
-                                       $this->logger->warning( "Error fetching URL \"{$req['url']}\": " .
-                                               $req['response']['error'] );
-                               }
-                       } else {
-                               $req['response']['error'] = "(curl error: no status set)";
-                       }
+                       $guzzleOptions['curl'][CURLMOPT_PIPELINING] = (int)$pipeliningMode;
+                       $guzzleOptions['curl'][CURLMOPT_MAXCONNECTS] = (int)$maxConnsPerHost;
+               }
 
-                       // For convenience with the list() operator
-                       $req['response'][0] = $req['response']['code'];
-                       $req['response'][1] = $req['response']['reason'];
-                       $req['response'][2] = $req['response']['headers'];
-                       $req['response'][3] = $req['response']['body'];
-                       $req['response'][4] = $req['response']['error'];
-                       curl_close( $ch );
-                       // Close any string wrapper file handles
-                       if ( isset( $req['_closeHandle'] ) ) {
-                               fclose( $req['_closeHandle'] );
-                               unset( $req['_closeHandle'] );
-                       }
+               if ( isset( $opts['handler'] ) ) {
+                       $guzzleOptions['handler'] = $opts['handler'];
                }
-               unset( $req ); // don't assign over this by accident
 
-               // Restore the default settings
-               curl_multi_setopt( $chm, CURLMOPT_PIPELINING, (int)$this->usePipelining );
-               curl_multi_setopt( $chm, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
+               $guzzleOptions['headers']['user-agent'] = $this->userAgent;
 
-               return $reqs;
-       }
+               $client = new Client( $guzzleOptions );
+               $promises = [];
+               foreach ( $reqs as $index => $req ) {
+                       $reqOptions = [
+                               'proxy' => $req['proxy'] ?? $this->proxy,
+                       ];
 
-       /**
-        * @param array &$req HTTP request map
-        * @param array $opts
-        *   - connTimeout    : default connection timeout
-        *   - reqTimeout     : default request timeout
-        * @return resource
-        * @throws Exception
-        */
-       protected function getCurlHandle( array &$req, array $opts = [] ) {
-               $ch = curl_init();
-
-               curl_setopt( $ch, CURLOPT_CONNECTTIMEOUT_MS,
-                       ( $opts['connTimeout'] ?? $this->connTimeout ) * 1000 );
-               curl_setopt( $ch, CURLOPT_PROXY, $req['proxy'] ?? $this->proxy );
-               curl_setopt( $ch, CURLOPT_TIMEOUT_MS,
-                       ( $opts['reqTimeout'] ?? $this->reqTimeout ) * 1000 );
-               curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1 );
-               curl_setopt( $ch, CURLOPT_MAXREDIRS, 4 );
-               curl_setopt( $ch, CURLOPT_HEADER, 0 );
-               if ( !is_null( $this->caBundlePath ) ) {
-                       curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, true );
-                       curl_setopt( $ch, CURLOPT_CAINFO, $this->caBundlePath );
-               }
-               curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
+                       if ( $req['method'] == 'POST' ) {
+                               $reqOptions['form_params'] = $req['body'];
 
-               $url = $req['url'];
-               $query = http_build_query( $req['query'], '', '&', PHP_QUERY_RFC3986 );
-               if ( $query != '' ) {
-                       $url .= strpos( $req['url'], '?' ) === false ? "?$query" : "&$query";
-               }
-               curl_setopt( $ch, CURLOPT_URL, $url );
+                               // Suppress 'Expect: 100-continue' header, as some servers
+                               // will reject it with a 417 and Curl won't auto retry
+                               // with HTTP 1.0 fallback
+                               $reqOptions['expect'] = false;
+                       }
 
-               curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, $req['method'] );
-               if ( $req['method'] === 'HEAD' ) {
-                       curl_setopt( $ch, CURLOPT_NOBODY, 1 );
-               }
+                       if ( isset( $req['headers']['user-agent'] ) ) {
+                               $reqOptions['headers']['user-agent'] = $req['headers']['user-agent'];
+                       }
 
-               if ( $req['method'] === 'PUT' ) {
-                       curl_setopt( $ch, CURLOPT_PUT, 1 );
-                       if ( is_resource( $req['body'] ) ) {
-                               curl_setopt( $ch, CURLOPT_INFILE, $req['body'] );
-                               if ( isset( $req['headers']['content-length'] ) ) {
-                                       curl_setopt( $ch, CURLOPT_INFILESIZE, $req['headers']['content-length'] );
-                               } elseif ( isset( $req['headers']['transfer-encoding'] ) &&
-                                       $req['headers']['transfer-encoding'] === 'chunks'
-                               ) {
-                                       curl_setopt( $ch, CURLOPT_UPLOAD, true );
-                               } else {
-                                       throw new Exception( "Missing 'Content-Length' or 'Transfer-Encoding' header." );
-                               }
-                       } elseif ( $req['body'] !== '' ) {
-                               $fp = fopen( "php://temp", "wb+" );
-                               fwrite( $fp, $req['body'], strlen( $req['body'] ) );
-                               rewind( $fp );
-                               curl_setopt( $ch, CURLOPT_INFILE, $fp );
-                               curl_setopt( $ch, CURLOPT_INFILESIZE, strlen( $req['body'] ) );
-                               $req['_closeHandle'] = $fp; // remember to close this later
-                       } else {
-                               curl_setopt( $ch, CURLOPT_INFILESIZE, 0 );
+                       // Backward compatibility for pre-Guzzle naming
+                       if ( isset( $req['sink'] ) ) {
+                               $reqOptions['sink'] = $req['sink'];
+                       } elseif ( isset( $req['stream'] ) ) {
+                               $reqOptions['sink'] = $req['stream'];
                        }
-                       curl_setopt( $ch, CURLOPT_READFUNCTION,
-                               function ( $ch, $fd, $length ) {
-                                       $data = fread( $fd, $length );
-                                       $len = strlen( $data );
-                                       return $data;
-                               }
-                       );
-               } elseif ( $req['method'] === 'POST' ) {
-                       curl_setopt( $ch, CURLOPT_POST, 1 );
-                       // Don't interpret POST parameters starting with '@' as file uploads, because this
-                       // makes it impossible to POST plain values starting with '@' (and causes security
-                       // issues potentially exposing the contents of local files).
-                       curl_setopt( $ch, CURLOPT_SAFE_UPLOAD, true );
-                       curl_setopt( $ch, CURLOPT_POSTFIELDS, $req['body'] );
-               } else {
-                       if ( is_resource( $req['body'] ) || $req['body'] !== '' ) {
-                               throw new Exception( "HTTP body specified for a non PUT/POST request." );
+
+                       if ( !empty( $req['flags']['relayResponseHeaders'] ) ) {
+                               $reqOptions['on_headers'] = function ( ResponseInterface $response ) {
+                                       foreach ( $response->getHeaders() as $name => $values ) {
+                                               foreach ( $values as $value ) {
+                                                       header( $name . ': ' . $value . "\r\n" );
+                                               }
+                                       }
+                               };
                        }
-                       $req['headers']['content-length'] = 0;
-               }
 
-               if ( !isset( $req['headers']['user-agent'] ) ) {
-                       $req['headers']['user-agent'] = $this->userAgent;
+                       $url = $req['url'];
+                       $query = http_build_query( $req['query'], '', '&', PHP_QUERY_RFC3986 );
+                       if ( $query != '' ) {
+                               $url .= strpos( $req['url'], '?' ) === false ? "?$query" : "&$query";
+                       }
+                       $promises[$index] = $client->requestAsync( $req['method'], $url, $reqOptions );
                }
 
-               $headers = [];
-               foreach ( $req['headers'] as $name => $value ) {
-                       if ( strpos( $name, ': ' ) ) {
-                               throw new Exception( "Headers cannot have ':' in the name." );
+               $results = GuzzleHttp\Promise\settle( $promises )->wait();
+
+               foreach ( $results as $index => $result ) {
+                       if ( $result['state'] === 'fulfilled' ) {
+                               $this->guzzleHandleSuccess( $reqs[$index], $result['value'] );
+                       } elseif ( $result['state'] === 'rejected' ) {
+                               $this->guzzleHandleFailure( $reqs[$index], $result['reason'] );
+                       } else {
+                               // This should never happen, and exists only in case of changes to guzzle
+                               throw new UnexpectedValueException(
+                                       "Unrecognized result state: {$result['state']}" );
                        }
-                       $headers[] = $name . ': ' . trim( $value );
                }
-               curl_setopt( $ch, CURLOPT_HTTPHEADER, $headers );
 
-               curl_setopt( $ch, CURLOPT_HEADERFUNCTION,
-                       function ( $ch, $header ) use ( &$req ) {
-                               if ( !empty( $req['flags']['relayResponseHeaders'] ) && trim( $header ) !== '' ) {
-                                       header( $header );
-                               }
-                               $length = strlen( $header );
-                               $matches = [];
-                               if ( preg_match( "/^(HTTP\/1\.[01]) (\d{3}) (.*)/", $header, $matches ) ) {
-                                       $req['response']['code'] = (int)$matches[2];
-                                       $req['response']['reason'] = trim( $matches[3] );
-                                       return $length;
-                               }
-                               if ( strpos( $header, ":" ) === false ) {
-                                       return $length;
-                               }
-                               list( $name, $value ) = explode( ":", $header, 2 );
-                               $name = strtolower( $name );
-                               $value = trim( $value );
-                               if ( isset( $req['response']['headers'][$name] ) ) {
-                                       $req['response']['headers'][$name] .= ', ' . $value;
-                               } else {
-                                       $req['response']['headers'][$name] = $value;
-                               }
-                               return $length;
-                       }
-               );
-
-               if ( isset( $req['stream'] ) ) {
-                       // Don't just use CURLOPT_FILE as that might give:
-                       // curl_setopt(): cannot represent a stream of type Output as a STDIO FILE*
-                       // The callback here handles both normal files and php://temp handles.
-                       curl_setopt( $ch, CURLOPT_WRITEFUNCTION,
-                               function ( $ch, $data ) use ( &$req ) {
-                                       return fwrite( $req['stream'], $data );
-                               }
-                       );
-               } else {
-                       curl_setopt( $ch, CURLOPT_WRITEFUNCTION,
-                               function ( $ch, $data ) use ( &$req ) {
-                                       $req['response']['body'] .= $data;
-                                       return strlen( $data );
-                               }
-                       );
+               foreach ( $reqs as &$req ) {
+                       $req['response'][0] = $req['response']['code'];
+                       $req['response'][1] = $req['response']['reason'];
+                       $req['response'][2] = $req['response']['headers'];
+                       $req['response'][3] = $req['response']['body'];
+                       $req['response'][4] = $req['response']['error'];
                }
 
-               return $ch;
+               return $reqs;
        }
 
        /**
-        * @return resource
-        * @throws Exception
+        * Called for successful requests
+        *
+        * @param array $req the original request
+        * @param ResponseInterface $response
         */
-       protected function getCurlMulti() {
-               if ( !$this->multiHandle ) {
-                       if ( !function_exists( 'curl_multi_init' ) ) {
-                               throw new Exception( "PHP cURL function curl_multi_init missing. " .
-                                       "Check https://www.mediawiki.org/wiki/Manual:CURL" );
-                       }
-                       $cmh = curl_multi_init();
-                       curl_multi_setopt( $cmh, CURLMOPT_PIPELINING, (int)$this->usePipelining );
-                       curl_multi_setopt( $cmh, CURLMOPT_MAXCONNECTS, (int)$this->maxConnsPerHost );
-                       $this->multiHandle = $cmh;
-               }
-               return $this->multiHandle;
+       private function guzzleHandleSuccess( &$req, $response ) {
+               $req['response'] = [
+                       'code' => $response->getStatusCode(),
+                       'reason' => $response->getReasonPhrase(),
+                       'headers' => $this->parseHeaders( $response->getHeaders() ),
+                       'body' => isset( $req['sink'] ) ? '' : $response->getBody()->getContents(),
+                       'error' => '',
+               ];
        }
 
        /**
-        * Execute a set of HTTP(S) requests sequentially.
+        * Called for failed requests
         *
-        * @see MultiHttpClient::runMulti()
-        * @todo Remove dependency on MediaWikiServices: use a separate HTTP client
-        *  library or copy code from PhpHttpRequest
-        * @param array $reqs Map of HTTP request arrays
-        * @param array $opts
-        *   - connTimeout     : connection timeout per request (seconds)
-        *   - reqTimeout      : post-connection timeout per request (seconds)
-        * @return array $reqs With response array populated for each
-        * @throws Exception
+        * @param array $req the original request
+        * @param Exception $reason
         */
-       private function runMultiHttp( array $reqs, array $opts = [] ) {
-               $httpOptions = [
-                       'timeout' => $opts['reqTimeout'] ?? $this->reqTimeout,
-                       'connectTimeout' => $opts['connTimeout'] ?? $this->connTimeout,
-                       'logger' => $this->logger,
-                       'caInfo' => $this->caBundlePath,
+       private function guzzleHandleFailure( &$req, $reason ) {
+               $req['response'] = [
+                       'code' => $reason->getCode(),
+                       'reason' => '',
+                       'headers' => [],
+                       'body' => '',
+                       'error' => $reason->getMessage(),
                ];
-               foreach ( $reqs as &$req ) {
-                       $reqOptions = $httpOptions + [
-                               'method' => $req['method'],
-                               'proxy' => $req['proxy'] ?? $this->proxy,
-                               'userAgent' => $req['headers']['user-agent'] ?? $this->userAgent,
-                               'postData' => $req['body'],
-                       ];
 
-                       $url = $req['url'];
-                       $query = http_build_query( $req['query'], '', '&', PHP_QUERY_RFC3986 );
-                       if ( $query != '' ) {
-                               $url .= strpos( $req['url'], '?' ) === false ? "?$query" : "&$query";
+               if (
+                       $reason instanceof GuzzleHttp\Exception\RequestException &&
+                       $reason->hasResponse()
+               ) {
+                       $response = $reason->getResponse();
+                       if ( $response ) {
+                               $req['response']['reason'] = $response->getReasonPhrase();
+                               $req['response']['headers'] = $this->parseHeaders( $response->getHeaders() );
+                               $req['response']['body'] = $response->getBody()->getContents();
                        }
+               }
 
-                       $httpRequest = MediaWikiServices::getInstance()->getHttpRequestFactory()->create(
-                               $url, $reqOptions );
-                       $sv = $httpRequest->execute()->getStatusValue();
-
-                       $respHeaders = array_map(
-                               function ( $v ) {
-                                       return implode( ', ', $v );
-                               },
-                               $httpRequest->getResponseHeaders() );
-
-                       $req['response'] = [
-                               'code' => $httpRequest->getStatus(),
-                               'reason' => '',
-                               'headers' => $respHeaders,
-                               'body' => $httpRequest->getContent(),
-                               'error' => '',
-                       ];
-
-                       if ( !$sv->isOk() ) {
-                               $svErrors = $sv->getErrors();
-                               if ( isset( $svErrors[0] ) ) {
-                                       $req['response']['error'] = $svErrors[0]['message'];
-
-                                       // param values vary per failure type (ex. unknown host vs unknown page)
-                                       if ( isset( $svErrors[0]['params'][0] ) ) {
-                                               if ( is_numeric( $svErrors[0]['params'][0] ) ) {
-                                                       if ( isset( $svErrors[0]['params'][1] ) ) {
-                                                               $req['response']['reason'] = $svErrors[0]['params'][1];
-                                                       }
-                                               } else {
-                                                       $req['response']['reason'] = $svErrors[0]['params'][0];
-                                               }
-                                       }
-                               }
-                       }
+               $this->logger->warning( "Error fetching URL \"{$req['url']}\": " .
+                       $req['response']['error'] );
+       }
 
-                       $req['response'][0] = $req['response']['code'];
-                       $req['response'][1] = $req['response']['reason'];
-                       $req['response'][2] = $req['response']['headers'];
-                       $req['response'][3] = $req['response']['body'];
-                       $req['response'][4] = $req['response']['error'];
+       /**
+        * Parses response headers.
+        *
+        * @param string[][] $guzzleHeaders
+        * @return array
+        */
+       private function parseHeaders( $guzzleHeaders ) {
+               $headers = [];
+               foreach ( $guzzleHeaders as $name => $values ) {
+                       $headers[strtolower( $name )] = implode( ', ', $values );
                }
-
-               return $reqs;
+               return $headers;
        }
 
        /**
         * Normalize request information
         *
         * @param array $reqs the requests to normalize
+        * @throws Exception
         */
        private function normalizeRequests( array &$reqs ) {
                foreach ( $reqs as &$req ) {
@@ -572,28 +409,6 @@ class MultiHttpClient implements LoggerAwareInterface {
                }
        }
 
-       /**
-        * Get a suitable select timeout for the given options.
-        *
-        * @param array $opts
-        * @return float
-        */
-       private function getSelectTimeout( $opts ) {
-               $connTimeout = $opts['connTimeout'] ?? $this->connTimeout;
-               $reqTimeout = $opts['reqTimeout'] ?? $this->reqTimeout;
-               $timeouts = array_filter( [ $connTimeout, $reqTimeout ] );
-               if ( count( $timeouts ) === 0 ) {
-                       return 1;
-               }
-
-               $selectTimeout = min( $timeouts ) * self::TIMEOUT_ACCURACY_FACTOR;
-               // Minimum 10us for sanity
-               if ( $selectTimeout < 10e-6 ) {
-                       $selectTimeout = 10e-6;
-               }
-               return $selectTimeout;
-       }
-
        /**
         * Register a logger
         *
@@ -602,10 +417,4 @@ class MultiHttpClient implements LoggerAwareInterface {
        public function setLogger( LoggerInterface $logger ) {
                $this->logger = $logger;
        }
-
-       function __destruct() {
-               if ( $this->multiHandle ) {
-                       curl_multi_close( $this->multiHandle );
-               }
-       }
 }
index 0480d71..bed7965 100644 (file)
@@ -94,8 +94,8 @@ use Psr\Log\NullLogger;
  *        not just purges, which can be useful for cache warming. Writes are eventually
  *        consistent via the Dynamo replication model. See https://github.com/Netflix/dynomite.
  *
- * Broadcasted operations like delete() and touchCheckKey() are done asynchronously
- * in all datacenters this way, though the local one should likely be near immediate.
+ * Broadcasted operations like delete() and touchCheckKey() are intended to run
+ * immediately in the local datacenter and asynchronously in remote datacenters.
  *
  * This means that callers in all datacenters may see older values for however many
  * milliseconds that the purge took to reach that datacenter. As with any cache, this
@@ -191,9 +191,18 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
        /** Tiny negative float to use when CTL comes up >= 0 due to clock skew */
        const TINY_NEGATIVE = -0.000001;
+       /** Tiny positive float to use when using "minTime" to assert an inequality */
+       const TINY_POSTIVE = 0.000001;
 
        /** Seconds of delay after get() where set() storms are a consideration with 'lockTSE' */
        const SET_DELAY_HIGH_SEC = 0.1;
+       /** Min millisecond set() backoff for keys in hold-off (far less than INTERIM_KEY_TTL) */
+       const RECENT_SET_LOW_MS = 50;
+       /** Max millisecond set() backoff for keys in hold-off (far less than INTERIM_KEY_TTL) */
+       const RECENT_SET_HIGH_MS = 100;
+
+       /** Parameter to get()/getMulti() to return extra information by reference */
+       const PASS_BY_REF = -1;
 
        /** Cache format version number */
        const VERSION = 1;
@@ -273,9 +282,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @return WANObjectCache
         */
        public static function newEmpty() {
-               return new static( [
-                       'cache'   => new EmptyBagOStuff()
-               ] );
+               return new static( [ 'cache' => new EmptyBagOStuff() ] );
        }
 
        /**
@@ -313,18 +320,36 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * Consider using getWithSetCallback() instead of get() and set() cycles.
         * That method has cache slam avoiding features for hot/expensive keys.
         *
+        * Pass $info as WANObjectCache::PASS_BY_REF to transform it into a cache key info map.
+        * This map includes the following metadata:
+        *   - asOf: UNIX timestamp of the value or null if the key is nonexistant
+        *   - tombAsOf: UNIX timestamp of the tombstone or null if the key is not tombstoned
+        *   - lastCKPurge: UNIX timestamp of the highest check key or null if none provided
+        *
+        * Othwerwise, $info will transform into the cached value timestamp.
+        *
         * @param string $key Cache key made from makeKey() or makeGlobalKey()
         * @param mixed|null &$curTTL Approximate TTL left on the key if present/tombstoned [returned]
         * @param array $checkKeys List of "check" keys
-        * @param float|null &$asOf UNIX timestamp of cached value; null on failure [returned]
+        * @param mixed|null &$info Key info if WANObjectCache::PASS_BY_REF [returned]
         * @return mixed Value of cache key or false on failure
         */
-       final public function get( $key, &$curTTL = null, array $checkKeys = [], &$asOf = null ) {
-               $curTTLs = [];
-               $asOfs = [];
-               $values = $this->getMulti( [ $key ], $curTTLs, $checkKeys, $asOfs );
+       final public function get(
+               $key, &$curTTL = null, array $checkKeys = [], &$info = null
+       ) {
+               $curTTLs = self::PASS_BY_REF;
+               $infoByKey = self::PASS_BY_REF;
+               $values = $this->getMulti( [ $key ], $curTTLs, $checkKeys, $infoByKey );
                $curTTL = $curTTLs[$key] ?? null;
-               $asOf = $asOfs[$key] ?? null;
+               if ( $info === self::PASS_BY_REF ) {
+                       $info = [
+                               'asOf' => $infoByKey[$key]['asOf'] ?? null,
+                               'tombAsOf' => $infoByKey[$key]['tombAsOf'] ?? null,
+                               'lastCKPurge' => $infoByKey[$key]['lastCKPurge'] ?? null
+                       ];
+               } else {
+                       $info = $infoByKey[$key]['asOf'] ?? null; // b/c
+               }
 
                return $values[$key] ?? false;
        }
@@ -332,21 +357,31 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        /**
         * Fetch the value of several keys from cache
         *
+        * Pass $info as WANObjectCache::PASS_BY_REF to transform it into a map of cache keys
+        * to cache key info maps, each having the same style as those of WANObjectCache::get().
+        * All the cache keys listed in $keys will have an entry.
+        *
+        * Othwerwise, $info will transform into a map of (cache key => cached value timestamp).
+        * Only the cache keys listed in $keys that exists or are tombstoned will have an entry.
+        *
         * @see WANObjectCache::get()
         *
         * @param array $keys List of cache keys made from makeKey() or makeGlobalKey()
-        * @param array &$curTTLs Map of (key => approximate TTL left) for existing keys [returned]
+        * @param mixed|null &$curTTLs Map of (key => TTL left) for existing/tombstoned keys [returned]
         * @param array $checkKeys List of check keys to apply to all $keys. May also apply "check"
         *  keys to specific cache keys only by using cache keys as keys in the $checkKeys array.
-        * @param float[] &$asOfs Map of (key =>  UNIX timestamp of cached value; null on failure)
+        * @param mixed|null &$info Map of (key => info) if WANObjectCache::PASS_BY_REF [returned]
         * @return array Map of (key => value) for keys that exist and are not tombstoned
         */
        final public function getMulti(
-               array $keys, &$curTTLs = [], array $checkKeys = [], array &$asOfs = []
+               array $keys,
+               &$curTTLs = [],
+               array $checkKeys = [],
+               &$info = null
        ) {
                $result = [];
                $curTTLs = [];
-               $asOfs = [];
+               $infoByKey = [];
 
                $vPrefixLen = strlen( self::VALUE_KEY_PREFIX );
                $valueKeys = self::prefixCacheKeys( $keys, self::VALUE_KEY_PREFIX );
@@ -357,13 +392,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                foreach ( $checkKeys as $i => $checkKeyGroup ) {
                        $prefixed = self::prefixCacheKeys( (array)$checkKeyGroup, self::TIME_KEY_PREFIX );
                        $checkKeysFlat = array_merge( $checkKeysFlat, $prefixed );
-                       // Is this check keys for a specific cache key, or for all keys being fetched?
+                       // Are these check keys for a specific cache key, or for all keys being fetched?
                        if ( is_int( $i ) ) {
                                $checkKeysForAll = array_merge( $checkKeysForAll, $prefixed );
                        } else {
-                               $checkKeysByKey[$i] = isset( $checkKeysByKey[$i] )
-                                       ? array_merge( $checkKeysByKey[$i], $prefixed )
-                                       : $prefixed;
+                               $checkKeysByKey[$i] = $prefixed;
                        }
                }
 
@@ -392,35 +425,43 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
                // Get the main cache value for each key and validate them
                foreach ( $valueKeys as $vKey ) {
-                       if ( !isset( $wrappedValues[$vKey] ) ) {
-                               continue; // not found
+                       $key = substr( $vKey, $vPrefixLen ); // unprefix
+                       list( $value, $curTTL, $asOf, $tombAsOf ) = isset( $wrappedValues[$vKey] )
+                               ? $this->unwrap( $wrappedValues[$vKey], $now )
+                               : [ false, null, null, null ]; // not found
+                       // Force dependent keys to be seen as stale for a while after purging
+                       // to reduce race conditions involving stale data getting cached
+                       $purgeValues = $purgeValuesForAll;
+                       if ( isset( $purgeValuesByKey[$key] ) ) {
+                               $purgeValues = array_merge( $purgeValues, $purgeValuesByKey[$key] );
                        }
 
-                       $key = substr( $vKey, $vPrefixLen ); // unprefix
+                       $lastCKPurge = null; // timestamp of the highest check key
+                       foreach ( $purgeValues as $purge ) {
+                               $lastCKPurge = max( $purge[self::FLD_TIME], $lastCKPurge );
+                               $safeTimestamp = $purge[self::FLD_TIME] + $purge[self::FLD_HOLDOFF];
+                               if ( $value !== false && $safeTimestamp >= $asOf ) {
+                                       // How long ago this value was invalidated by *this* check key
+                                       $ago = min( $purge[self::FLD_TIME] - $now, self::TINY_NEGATIVE );
+                                       // How long ago this value was invalidated by *any* known check key
+                                       $curTTL = min( $curTTL, $ago );
+                               }
+                       }
 
-                       list( $value, $curTTL ) = $this->unwrap( $wrappedValues[$vKey], $now );
                        if ( $value !== false ) {
                                $result[$key] = $value;
-                               // Force dependent keys to be seen as stale for a while after purging
-                               // to reduce race conditions involving stale data getting cached
-                               $purgeValues = $purgeValuesForAll;
-                               if ( isset( $purgeValuesByKey[$key] ) ) {
-                                       $purgeValues = array_merge( $purgeValues, $purgeValuesByKey[$key] );
-                               }
-                               foreach ( $purgeValues as $purge ) {
-                                       $safeTimestamp = $purge[self::FLD_TIME] + $purge[self::FLD_HOLDOFF];
-                                       if ( $safeTimestamp >= $wrappedValues[$vKey][self::FLD_TIME] ) {
-                                               // How long ago this value was invalidated by *this* check key
-                                               $ago = min( $purge[self::FLD_TIME] - $now, self::TINY_NEGATIVE );
-                                               // How long ago this value was invalidated by *any* known check key
-                                               $curTTL = min( $curTTL, $ago );
-                                       }
-                               }
                        }
-                       $curTTLs[$key] = $curTTL;
-                       $asOfs[$key] = ( $value !== false ) ? $wrappedValues[$vKey][self::FLD_TIME] : null;
+                       if ( $curTTL !== null ) {
+                               $curTTLs[$key] = $curTTL;
+                       }
+
+                       $infoByKey[$key] = ( $info === self::PASS_BY_REF )
+                               ? [ 'asOf' => $asOf, 'tombAsOf' => $tombAsOf, 'lastCKPurge' => $lastCKPurge ]
+                               : $asOf; // b/c
                }
 
+               $info = $infoByKey;
+
                return $result;
        }
 
@@ -1243,23 +1284,26 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                $popWindow = $opts['hotTTR'] ?? self::HOT_TTR;
                $ageNew = $opts['ageNew'] ?? self::AGE_NEW;
                $minTime = $opts['minAsOf'] ?? self::MIN_TIMESTAMP_NONE;
-               $versioned = isset( $opts['version'] );
-               $touchedCallback = $opts['touchedCallback'] ?? null;
+               $needsVersion = isset( $opts['version'] );
+               $touchedCb = $opts['touchedCallback'] ?? null;
                $initialTime = $this->getCurrentTime();
 
                // Get a collection name to describe this class of key
                $kClass = $this->determineKeyClass( $key );
 
-               // Get the current key value and populate $curTTL and $asOf accordingly
-               $curTTL = null;
-               $cValue = $this->get( $key, $curTTL, $checkKeys, $asOf ); // current value
-               $value = $cValue; // return value
-               // Apply additional dynamic expiration logic if supplied
-               $curTTL = $this->applyTouchedCallback( $value, $asOf, $curTTL, $touchedCallback );
+               // Get the current key value
+               $curTTL = self::PASS_BY_REF;
+               $curInfo = self::PASS_BY_REF; /** @var array $curInfo */
+               $curValue = $this->get( $key, $curTTL, $checkKeys, $curInfo );
+               // Apply any $touchedCb invalidation timestamp to get the "last purge timestamp"
+               list( $curTTL, $LPT ) = $this->resolveCTL( $curValue, $curTTL, $curInfo, $touchedCb );
+               // Keep track of the best candidate value and its timestamp
+               $value = $curValue; // return value
+               $asOf = $curInfo['asOf']; // return value timestamp
 
                // Determine if a cached value regeneration is needed or desired
                if (
-                       $this->isValid( $value, $versioned, $asOf, $minTime ) &&
+                       $this->isValid( $value, $needsVersion, $asOf, $minTime ) &&
                        $this->isAliveOrInGracePeriod( $curTTL, $graceTTL )
                ) {
                        $preemptiveRefresh = (
@@ -1278,8 +1322,25 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                        }
                }
 
-               // Only a tombstoned key yields no value yet has a (negative) "current time left"
-               $isKeyTombstoned = ( $curTTL !== null && $value === false );
+               $isKeyTombstoned = ( $curInfo['tombAsOf'] !== null );
+               if ( $isKeyTombstoned ) {
+                       // Get the interim key value since the key is tombstoned (write-holed)
+                       list( $value, $asOf ) = $this->getInterimValue( $key, $needsVersion, $minTime );
+                       // Update the "last purge time" since the $touchedCb timestamp depends on $value
+                       $LPT = $this->resolveTouched( $value, $LPT, $touchedCb );
+               }
+
+               // Reduce mutex and cache set spam while keys are in the tombstone/holdoff period by
+               // checking if $value was genereated by a recent thread much less than a second ago.
+               if (
+                       $this->isValid( $value, $needsVersion, $asOf, $minTime, $LPT ) &&
+                       $this->isVolatileValueAgeNegligible( $initialTime - $asOf )
+               ) {
+                       $this->stats->increment( "wanobjectcache.$kClass.hit.volatile" );
+
+                       return $value;
+               }
+
                // Decide if only one thread should handle regeneration at a time
                $useMutex =
                        // Note that since tombstones no-op set(), $lockTSE and $curTTL cannot be used to
@@ -1290,7 +1351,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                        // the risk of high regeneration load after the delete() method is called.
                        $isKeyTombstoned ||
                        // Assume a key is hot if requested soon ($lockTSE seconds) after invalidation.
-                       // This avoids stampedes when timestamps from $checkKeys/$touchedCallback bump.
+                       // This avoids stampedes when timestamps from $checkKeys/$touchedCb bump.
                        ( $curTTL !== null && $curTTL <= 0 && abs( $curTTL ) <= $lockTSE ) ||
                        // Assume a key is hot if there is no value and a busy fallback is given.
                        // This avoids stampedes on eviction or preemptive regeneration taking too long.
@@ -1302,23 +1363,13 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                        if ( $this->cache->add( self::MUTEX_KEY_PREFIX . $key, 1, self::LOCK_TTL ) ) {
                                // Lock acquired; this thread will recompute the value and update cache
                                $hasLock = true;
-                       } elseif ( $this->isValid( $value, $versioned, $asOf, $minTime ) ) {
+                       } elseif ( $this->isValid( $value, $needsVersion, $asOf, $minTime ) ) {
                                // Lock not acquired and a stale value exists; use the stale value
                                $this->stats->increment( "wanobjectcache.$kClass.hit.stale" );
 
                                return $value;
                        } else {
                                // Lock not acquired and no stale value exists
-                               if ( $isKeyTombstoned ) {
-                                       // Use the INTERIM value from the last thread that regenerated it if possible
-                                       $value = $this->getInterimValue( $key, $versioned, $minTime, $asOf );
-                                       if ( $value !== false ) {
-                                               $this->stats->increment( "wanobjectcache.$kClass.hit.volatile" );
-
-                                               return $value;
-                                       }
-                               }
-
                                if ( $busyValue !== null ) {
                                        // Use the busy fallback value if nothing else
                                        $miss = is_infinite( $minTime ) ? 'renew' : 'miss';
@@ -1338,7 +1389,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                $setOpts = [];
                ++$this->callbackDepth;
                try {
-                       $value = call_user_func_array( $callback, [ $cValue, &$ttl, &$setOpts, $asOf ] );
+                       $value = call_user_func_array( $callback, [ $curValue, &$ttl, &$setOpts, $asOf ] );
                } finally {
                        --$this->callbackDepth;
                }
@@ -1350,13 +1401,9 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
                        if ( $isKeyTombstoned ) {
                                if ( $this->checkAndSetCooloff( $key, $kClass, $ago, $lockTSE, $hasLock ) ) {
-                                       // When delete() is called, writes are write-holed by the tombstone,
-                                       // so use a special INTERIM key to pass the new value among threads.
-                                       $tempTTL = max( self::INTERIM_KEY_TTL, (int)$lockTSE ); // set() expects seconds
-                                       $newAsOf = $this->getCurrentTime();
-                                       $wrapped = $this->wrap( $value, $tempTTL, $newAsOf );
-                                       // Avoid using set() to avoid pointless mcrouter broadcasting
-                                       $this->setInterimValue( $key, $wrapped, $tempTTL );
+                                       // Use the interim key value since the key is tombstoned (write-holed)
+                                       $tempTTL = max( self::INTERIM_KEY_TTL, (int)$lockTSE );
+                                       $this->setInterimValue( $key, $value, $tempTTL, $this->getCurrentTime() );
                                }
                        } elseif ( !$useMutex || $hasLock ) {
                                if ( $this->checkAndSetCooloff( $key, $kClass, $ago, $lockTSE, $hasLock ) ) {
@@ -1372,7 +1419,6 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                }
 
                if ( $hasLock ) {
-                       // Avoid using delete() to avoid pointless mcrouter broadcasting
                        $this->cache->changeTTL( self::MUTEX_KEY_PREFIX . $key, (int)$initialTime - 60 );
                }
 
@@ -1382,6 +1428,14 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                return $value;
        }
 
+       /**
+        * @param float $age Age of volatile/interim key in seconds
+        * @return bool Whether the age of a volatile value is negligible
+        */
+       private function isVolatileValueAgeNegligible( $age ) {
+               return ( $age < mt_rand( self::RECENT_SET_LOW_MS, self::RECENT_SET_HIGH_MS ) / 1e3 );
+       }
+
        /**
         * @param string $key
         * @param string $kClass
@@ -1419,59 +1473,78 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
        /**
         * @param mixed $value
-        * @param float $asOf
-        * @param float $curTTL
-        * @param callable|null $callback
-        * @return float
+        * @param float|null $curTTL
+        * @param array $curInfo
+        * @param callable|null $touchedCallback
+        * @return array (current time left or null, UNIX timestamp of last purge or null)
+        * @note Callable type hints are not used to avoid class-autoloading
         */
-       protected function applyTouchedCallback( $value, $asOf, $curTTL, $callback ) {
-               if ( $callback === null ) {
-                       return $curTTL;
+       protected function resolveCTL( $value, $curTTL, $curInfo, $touchedCallback ) {
+               if ( $touchedCallback === null || $value === false ) {
+                       return [ $curTTL, max( $curInfo['tombAsOf'], $curInfo['lastCKPurge'] ) ];
                }
 
-               if ( !is_callable( $callback ) ) {
+               if ( !is_callable( $touchedCallback ) ) {
                        throw new InvalidArgumentException( "Invalid expiration callback provided." );
                }
 
-               if ( $value !== false ) {
-                       $touched = $callback( $value );
-                       if ( $touched !== null && $touched >= $asOf ) {
-                               $curTTL = min( $curTTL, self::TINY_NEGATIVE, $asOf - $touched );
-                       }
+               $touched = $touchedCallback( $value );
+               if ( $touched !== null && $touched >= $curInfo['asOf'] ) {
+                       $curTTL = min( $curTTL, self::TINY_NEGATIVE, $curInfo['asOf'] - $touched );
+               }
+
+               return [ $curTTL, max( $curInfo['tombAsOf'], $curInfo['lastCKPurge'], $touched ) ];
+       }
+
+       /**
+        * @param mixed $value
+        * @param float|null $lastPurge
+        * @param callable|null $touchedCallback
+        * @return float|null UNIX timestamp of last purge or null
+        * @note Callable type hints are not used to avoid class-autoloading
+        */
+       protected function resolveTouched( $value, $lastPurge, $touchedCallback ) {
+               if ( $touchedCallback === null || $value === false ) {
+                       return $lastPurge;
                }
 
-               return $curTTL;
+               if ( !is_callable( $touchedCallback ) ) {
+                       throw new InvalidArgumentException( "Invalid expiration callback provided." );
+               }
+
+               return max( $touchedCallback( $value ), $lastPurge );
        }
 
        /**
         * @param string $key
         * @param bool $versioned
         * @param float $minTime
-        * @param mixed &$asOf
-        * @return mixed
+        * @return array (cached value or false, cached value timestamp or null)
         */
-       protected function getInterimValue( $key, $versioned, $minTime, &$asOf ) {
+       protected function getInterimValue( $key, $versioned, $minTime ) {
                if ( !$this->useInterimHoldOffCaching ) {
-                       return false; // disabled
+                       return [ false, null ]; // disabled
                }
 
                $wrapped = $this->cache->get( self::INTERIM_KEY_PREFIX . $key );
                list( $value ) = $this->unwrap( $wrapped, $this->getCurrentTime() );
-               if ( $this->isValid( $value, $versioned, $asOf, $minTime ) ) {
-                       $asOf = $wrapped[self::FLD_TIME];
-
-                       return $value;
+               $valueAsOf = $wrapped[self::FLD_TIME] ?? null;
+               if ( $this->isValid( $value, $versioned, $valueAsOf, $minTime ) ) {
+                       return [ $value, $valueAsOf ];
                }
 
-               return false;
+               return [ false, null ];
        }
 
        /**
         * @param string $key
-        * @param array $wrapped
+        * @param mixed $value
         * @param int $tempTTL
+        * @param float $newAsOf
         */
-       protected function setInterimValue( $key, $wrapped, $tempTTL ) {
+       protected function setInterimValue( $key, $value, $tempTTL, $newAsOf ) {
+               $wrapped = $this->wrap( $value, $tempTTL, $newAsOf );
+
                $this->cache->merge(
                        self::INTERIM_KEY_PREFIX . $key,
                        function () use ( $wrapped ) {
@@ -2133,14 +2206,18 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
         * @param bool $versioned
         * @param float $asOf The time $value was generated
         * @param float $minTime The last time the main value was generated (0.0 if unknown)
+        * @param float|null $purgeTime The last time the value was invalidated
         * @return bool
         */
-       protected function isValid( $value, $versioned, $asOf, $minTime ) {
+       protected function isValid( $value, $versioned, $asOf, $minTime, $purgeTime = null ) {
+               // Avoid reading any key not generated after the latest delete() or touch
+               $safeMinTime = max( $minTime, $purgeTime + self::TINY_POSTIVE );
+
                if ( $value === false ) {
                        return false;
                } elseif ( $versioned && !isset( $value[self::VFLD_VERSION] ) ) {
                        return false;
-               } elseif ( $minTime > 0 && $asOf < $minTime ) {
+               } elseif ( $safeMinTime > 0 && $asOf < $minTime ) {
                        return false;
                }
 
@@ -2167,9 +2244,11 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
        /**
         * Do not use this method outside WANObjectCache
         *
+        * The cached value will be false if absent/tombstoned/malformed
+        *
         * @param array|string|bool $wrapped
         * @param float $now Unix Current timestamp (preferrably pre-query)
-        * @return array (mixed; false if absent/tombstoned/malformed, current time left)
+        * @return array (cached value or false, current TTL, value timestamp, tombstone timestamp)
         */
        protected function unwrap( $wrapped, $now ) {
                // Check if the value is a tombstone
@@ -2177,14 +2256,14 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
                if ( $purge !== false ) {
                        // Purged values should always have a negative current $ttl
                        $curTTL = min( $purge[self::FLD_TIME] - $now, self::TINY_NEGATIVE );
-                       return [ false, $curTTL ];
+                       return [ false, $curTTL, null, $purge[self::FLD_TIME] ];
                }
 
                if ( !is_array( $wrapped ) // not found
                        || !isset( $wrapped[self::FLD_VERSION] ) // wrong format
                        || $wrapped[self::FLD_VERSION] !== self::VERSION // wrong version
                ) {
-                       return [ false, null ];
+                       return [ false, null, null, null ];
                }
 
                if ( $wrapped[self::FLD_TTL] > 0 ) {
@@ -2198,10 +2277,10 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface {
 
                if ( $wrapped[self::FLD_TIME] < $this->epoch ) {
                        // Values this old are ignored
-                       return [ false, null ];
+                       return [ false, null, null, null ];
                }
 
-               return [ $wrapped[self::FLD_VALUE], $curTTL ];
+               return [ $wrapped[self::FLD_VALUE], $curTTL, $wrapped[self::FLD_TIME], null ];
        }
 
        /**
index 937fa37..c35bd99 100644 (file)
@@ -462,8 +462,8 @@ class ManualLogEntry extends LogEntryBase {
        /** @var int A rev id associated to the log entry */
        protected $revId = 0;
 
-       /** @var array Change tags add to the log entry */
-       protected $tags = null;
+       /** @var string[] Change tags add to the log entry */
+       protected $tags = [];
 
        /** @var int Deletion state of the log entry */
        protected $deleted;
@@ -579,11 +579,16 @@ class ManualLogEntry extends LogEntryBase {
        /**
         * Set change tags for the log entry.
         *
+        * Passing `null` means the same as empty array,
+        * for compatibility with WikiPage::doUpdateRestrictions().
+        *
         * @since 1.27
-        * @param string|string[] $tags
+        * @param string|string[]|null $tags
         */
        public function setTags( $tags ) {
-               if ( is_string( $tags ) ) {
+               if ( $tags === null ) {
+                       $tags = [];
+               } elseif ( is_string( $tags ) ) {
                        $tags = [ $tags ];
                }
                $this->tags = $tags;
@@ -776,7 +781,7 @@ class ManualLogEntry extends LogEntryBase {
 
                                        if ( $to === 'rc' || $to === 'rcandudp' ) {
                                                // save RC, passing tags so they are applied there
-                                               $rc->addTags( $this->getTags() ?? [] );
+                                               $rc->addTags( $this->getTags() );
                                                $rc->save( $rc::SEND_NONE );
                                        }
 
@@ -836,7 +841,7 @@ class ManualLogEntry extends LogEntryBase {
 
        /**
         * @since 1.27
-        * @return array
+        * @return string[]
         */
        public function getTags() {
                return $this->tags;
index 983f069..6f3162d 100644 (file)
@@ -31,7 +31,6 @@ use MediaWiki\Revision\SlotRecord;
  *
  * @todo Move and rewrite code to an Action class
  *
- * See design.txt for an overview.
  * Note: edit user interface and cache support functions have been
  * moved to separate EditPage and HTMLFileCache classes.
  */
index e9cadf3..ce1d2d0 100644 (file)
@@ -75,13 +75,21 @@ abstract class IndexPager extends ContextSource implements Pager {
        const DIR_ASCENDING = false;
        const DIR_DESCENDING = true;
 
+       /** @var WebRequest */
        public $mRequest;
+       /** @var int[] List of default entry limit options to be presented to clients */
        public $mLimitsShown = [ 20, 50, 100, 250, 500 ];
+       /** @var int The default entry limit choosen for clients */
        public $mDefaultLimit = 50;
-       public $mOffset, $mLimit;
+       /** @var string|int The starting point to enumerate entries */
+       public $mOffset;
+       /** @var int The maximum number of entries to show */
+       public $mLimit;
+       /** @var bool Whether the listing query completed */
        public $mQueryDone = false;
        /** @var IDatabase */
        public $mDb;
+       /** @var stdClass|null Extra row fetched at the end to see if the end was reached */
        public $mPastTheEndRow;
 
        /**
@@ -99,11 +107,11 @@ abstract class IndexPager extends ContextSource implements Pager {
        protected $mOrderType;
        /**
         * $mDefaultDirection gives the direction to use when sorting results:
-        * DIR_ASCENDING or DIR_DESCENDING.  If $mIsBackwards is set, we
-        * start from the opposite end, but we still sort the page itself according
-        * to $mDefaultDirection.  E.g., if $mDefaultDirection is false but we're
-        * going backwards, we'll display the last page of results, but the last
-        * result will be at the bottom, not the top.
+        * DIR_ASCENDING or DIR_DESCENDING. If $mIsBackwards is set, we start from
+        * the opposite end, but we still sort the page itself according to
+        * $mDefaultDirection. For example, if $mDefaultDirection is DIR_ASCENDING
+        * but we're going backwards, we'll display the last page of results, but
+        * the last result will be at the bottom, not the top.
         *
         * Like $mIndexField, $mDefaultDirection will be a single value even if the
         * class supports multiple default directions for different order types.
@@ -202,8 +210,10 @@ abstract class IndexPager extends ContextSource implements Pager {
                $fname = __METHOD__ . ' (' . static::class . ')';
                $section = Profiler::instance()->scopedProfileIn( $fname );
 
-               // @todo This should probably compare to DIR_DESCENDING and DIR_ASCENDING constants
-               $descending = ( $this->mIsBackwards == $this->mDefaultDirection );
+               $descending = $this->mIsBackwards
+                       ? ( $this->mDefaultDirection === self::DIR_DESCENDING )
+                       : ( $this->mDefaultDirection === self::DIR_ASCENDING );
+
                # Plus an extra row so that we can tell the "next" link should be shown
                $queryLimit = $this->mLimit + 1;
 
index 6260de6..e0e5d75 100644 (file)
@@ -120,11 +120,6 @@ class ParserOutput extends CacheTime {
         */
        public $mModules = [];
 
-       /**
-        * @var array $mModuleScripts Modules of which only the JS will be loaded by ResourceLoader.
-        */
-       public $mModuleScripts = [];
-
        /**
         * @var array $mModuleStyles Modules of which only the CSSS will be loaded by ResourceLoader.
         */
@@ -524,7 +519,8 @@ class ParserOutput extends CacheTime {
        }
 
        public function getModuleScripts() {
-               return $this->mModuleScripts;
+               wfDeprecated( __METHOD__, '1.33' );
+               return [];
        }
 
        public function getModuleStyles() {
@@ -817,14 +813,6 @@ class ParserOutput extends CacheTime {
                $this->mModules = array_merge( $this->mModules, (array)$modules );
        }
 
-       /**
-        * @deprecated since 1.31 Use addModules() instead.
-        * @see OutputPage::addModuleScripts
-        */
-       public function addModuleScripts( $modules ) {
-               $this->mModuleScripts = array_merge( $this->mModuleScripts, (array)$modules );
-       }
-
        /**
         * @see OutputPage::addModuleStyles
         */
@@ -857,7 +845,6 @@ class ParserOutput extends CacheTime {
         */
        public function addOutputPageMetadata( OutputPage $out ) {
                $this->addModules( $out->getModules() );
-               $this->addModuleScripts( $out->getModuleScripts() );
                $this->addModuleStyles( $out->getModuleStyles() );
                $this->addJsConfigVars( $out->getJsConfigVars() );
 
@@ -1338,7 +1325,6 @@ class ParserOutput extends CacheTime {
                // HTML and HTTP
                $this->mHeadItems = self::mergeMixedList( $this->mHeadItems, $source->getHeadItems() );
                $this->mModules = self::mergeList( $this->mModules, $source->getModules() );
-               $this->mModuleScripts = self::mergeList( $this->mModuleScripts, $source->getModuleScripts() );
                $this->mModuleStyles = self::mergeList( $this->mModuleStyles, $source->getModuleStyles() );
                $this->mJsConfigVars = self::mergeMap( $this->mJsConfigVars, $source->getJsConfigVars() );
                $this->mMaxAdaptiveExpiry = min( $this->mMaxAdaptiveExpiry, $source->mMaxAdaptiveExpiry );
index e012c71..4f50330 100644 (file)
@@ -1571,7 +1571,6 @@ class DefaultPreferencesFactory implements PreferencesFactory {
                        );
                }
 
-               AuthManager::callLegacyAuthPlugin( 'updateExternalDB', [ $user ] );
                $user->saveSettings();
 
                return $result;
index 5c072bf..2b3db22 100644 (file)
@@ -46,9 +46,6 @@ class ResourceLoaderClientHtml {
        /** @var array */
        private $moduleStyles = [];
 
-       /** @var array */
-       private $moduleScripts = [];
-
        /** @var array */
        private $exemptStates = [];
 
@@ -101,16 +98,6 @@ class ResourceLoaderClientHtml {
                $this->moduleStyles = $modules;
        }
 
-       /**
-        * Ensure the scripts of one or more modules are loaded.
-        *
-        * @deprecated since 1.28
-        * @param array $modules Array of module names
-        */
-       public function setModuleScripts( array $modules ) {
-               $this->moduleScripts = $modules;
-       }
-
        /**
         * Set state of special modules that are handled by the caller manually.
         *
@@ -139,7 +126,6 @@ class ResourceLoaderClientHtml {
                        ],
                        'general' => [],
                        'styles' => [],
-                       'scripts' => [],
                        // Embedding for private modules
                        'embed' => [
                                'styles' => [],
@@ -217,26 +203,6 @@ class ResourceLoaderClientHtml {
                        }
                }
 
-               foreach ( $this->moduleScripts as $name ) {
-                       $module = $rl->getModule( $name );
-                       if ( !$module ) {
-                               continue;
-                       }
-
-                       $group = $module->getGroup();
-                       $context = $this->getContext( $group, ResourceLoaderModule::TYPE_SCRIPTS );
-                       if ( $module->isKnownEmpty( $context ) ) {
-                               // Avoid needless request for empty module
-                               $data['states'][$name] = 'ready';
-                       } else {
-                               // Load from load.php?only=scripts via <script src></script>
-                               $data['scripts'][] = $name;
-
-                               // Avoid duplicate request from mw.loader
-                               $data['states'][$name] = 'loading';
-                       }
-               }
-
                return $data;
        }
 
@@ -312,15 +278,6 @@ class ResourceLoaderClientHtml {
                        );
                }
 
-               // Inline RLQ: Load only=scripts
-               if ( $data['scripts'] ) {
-                       $chunks[] = $this->getLoad(
-                               $data['scripts'],
-                               ResourceLoaderModule::TYPE_SCRIPTS,
-                               $nonce
-                       );
-               }
-
                // External stylesheets (only=styles)
                if ( $data['styles'] ) {
                        $chunks[] = $this->getLoad(
index 385cc35..98c0499 100644 (file)
@@ -314,11 +314,6 @@ final class SessionManager implements SessionManagerInterface {
                $user->setToken();
                $user->saveSettings();
 
-               $authUser = \MediaWiki\Auth\AuthManager::callLegacyAuthPlugin( 'getUserInstance', [ &$user ] );
-               if ( $authUser ) {
-                       $authUser->resetAuthToken();
-               }
-
                foreach ( $this->getProviders() as $provider ) {
                        $provider->invalidateSessionsForUser( $user );
                }
index 8cf64b1..8d5cf85 100644 (file)
@@ -177,7 +177,6 @@ class SpecialChangeEmail extends FormSpecialPage {
                Hooks::run( 'PrefsEmailAudit', [ $user, $oldaddr, $newaddr ] );
 
                $user->saveSettings();
-               MediaWiki\Auth\AuthManager::callLegacyAuthPlugin( 'updateExternalDB', [ $user ] );
 
                return $status;
        }
index d274c88..46b5520 100644 (file)
@@ -682,16 +682,21 @@ class SpecialRecentChanges extends ChangesListSpecialPage {
                        [ 'name' => 'namespace', 'id' => 'namespace' ]
                );
                $nsLabel = Xml::label( $this->msg( 'namespace' )->text(), 'namespace' );
-               $invert = Xml::checkLabel(
+               $attribs = [ 'class' => [ 'mw-input-with-label' ] ];
+               // Hide the checkboxes when the namespace filter is set to 'all'.
+               if ( $opts['namespace'] === '' ) {
+                       $attribs['class'][] = 'mw-input-hidden';
+               }
+               $invert = Html::rawElement( 'span', $attribs, Xml::checkLabel(
                        $this->msg( 'invert' )->text(), 'invert', 'nsinvert',
                        $opts['invert'],
                        [ 'title' => $this->msg( 'tooltip-invert' )->text() ]
-               );
-               $associated = Xml::checkLabel(
+               ) );
+               $associated = Html::rawElement( 'span', $attribs, Xml::checkLabel(
                        $this->msg( 'namespace_association' )->text(), 'associated', 'nsassociated',
                        $opts['associated'],
                        [ 'title' => $this->msg( 'tooltip-namespace_association' )->text() ]
-               );
+               ) );
 
                return [ $nsLabel, "$nsSelect $invert $associated" ];
        }
index 6e6d905..540754f 100644 (file)
@@ -387,9 +387,6 @@ class UserrightsPage extends SpecialPage {
                // update groups in external authentication database
                Hooks::run( 'UserGroupsChanged', [ $user, $add, $remove, $this->getUser(),
                        $reason, $oldUGMs, $newUGMs ] );
-               MediaWiki\Auth\AuthManager::callLegacyAuthPlugin(
-                       'updateExternalDBGroups', [ $user, $add, $remove ]
-               );
 
                wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) . "\n" );
                wfDebug( 'newGroups: ' . print_r( $newGroups, true ) . "\n" );
index 904a934..1e3ecf2 100644 (file)
@@ -1258,10 +1258,7 @@ class User implements IDBAccessObject, UserIdentity {
                        return false;
                }
 
-               // Reject various classes of invalid names
-               $name = AuthManager::callLegacyAuthPlugin(
-                       'getCanonicalName', [ $t->getText() ], $t->getText()
-               );
+               $name = $t->getText();
 
                switch ( $validate ) {
                        case false:
@@ -1667,7 +1664,6 @@ class User implements IDBAccessObject, UserIdentity {
 
                // update groups in external authentication database
                Hooks::run( 'UserGroupsChanged', [ $this, $toPromote, [], false, false, $oldUGMs, $newUGMs ] );
-               AuthManager::callLegacyAuthPlugin( 'updateExternalDBGroups', [ $this, $toPromote ] );
 
                $logEntry = new ManualLogEntry( 'rights', 'autopromote' );
                $logEntry->setPerformer( $this );
@@ -2407,10 +2403,8 @@ class User implements IDBAccessObject, UserIdentity {
                if ( $this->mLocked !== null ) {
                        return $this->mLocked;
                }
-               // Avoid PHP 7.1 warning of passing $this by reference
-               $user = $this;
-               $authUser = AuthManager::callLegacyAuthPlugin( 'getUserInstance', [ &$user ], null );
-               $this->mLocked = $authUser && $authUser->isLocked();
+               // Reset for hook
+               $this->mLocked = false;
                Hooks::run( 'UserIsLocked', [ $this, &$this->mLocked ] );
                return $this->mLocked;
        }
@@ -2426,10 +2420,8 @@ class User implements IDBAccessObject, UserIdentity {
                }
                $this->getBlockedStatus();
                if ( !$this->mHideName ) {
-                       // Avoid PHP 7.1 warning of passing $this by reference
-                       $user = $this;
-                       $authUser = AuthManager::callLegacyAuthPlugin( 'getUserInstance', [ &$user ], null );
-                       $this->mHideName = $authUser && $authUser->isHidden();
+                       // Reset for hook
+                       $this->mHideName = false;
                        Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName ] );
                }
                return (bool)$this->mHideName;
index e97e792..946b3ed 100644 (file)
        "sat": "Sab",
        "january": "Buleuen Sa",
        "february": "Buleuen Duwa",
-       "march": "Buleuën Lhèë",
-       "april": "Buleuën Peuët",
-       "may_long": "Buleuën Limöng",
-       "june": "Buleuën Nam",
-       "july": "Buleuën Tujôh",
-       "august": "Buleuën Lapan",
-       "september": "Buleuën Sikureuëng",
-       "october": "Buleuën Siplôh",
-       "november": "Buleuën Siblaih",
+       "march": "Buleuen Lhèe",
+       "april": "Buleuen Peuet",
+       "may_long": "Buleuen Limöng",
+       "june": "Buleuen Nam",
+       "july": "Buleuen Tujôh",
+       "august": "Buleuen Lapan",
+       "september": "Buleuen Sikureueng",
+       "october": "Buleuen Siplôh",
+       "november": "Buleuen Siblaih",
        "december": "Buleuen Duwa Blaih",
-       "january-gen": "Buleuën Sa",
-       "february-gen": "Buleuën Duwa",
-       "march-gen": "Buleuën Lhèë",
-       "april-gen": "Buleuën Peuët",
-       "may-gen": "Buleuën Limöng",
-       "june-gen": "Buleuën Nam",
-       "july-gen": "Buleuën Tujôh",
-       "august-gen": "Buleuën Lapan",
-       "september-gen": "Buleuën Sikureuëng",
-       "october-gen": "Buleuën Siplôh",
-       "november-gen": "Buleuën Siblaih",
-       "december-gen": "Buleuën Duwa Blaih",
+       "january-gen": "Buleuen Sa",
+       "february-gen": "Buleuen Duwa",
+       "march-gen": "Buleuen Lhèe",
+       "april-gen": "Buleuen Peuet",
+       "may-gen": "Buleuen Limöng",
+       "june-gen": "Buleuen Nam",
+       "july-gen": "Buleuen Tujôh",
+       "august-gen": "Buleuen Lapan",
+       "september-gen": "Buleuen Sikureueng",
+       "october-gen": "Buleuen Siplôh",
+       "november-gen": "Buleuen Siblaih",
+       "december-gen": "Buleuen Duwa Blaih",
        "jan": "Sa",
        "feb": "Duwa",
-       "mar": "Lhèë",
-       "apr": "Peuët",
+       "mar": "Lhèe",
+       "apr": "Peuet",
        "may": "Limöng",
        "jun": "Nam",
        "jul": "Tujôh",
        "oct": "Siplôh",
        "nov": "Siblaih",
        "dec": "Duwa Blaih",
-       "january-date": "$1 Buleuën Sa",
-       "february-date": "$1 Buleuën Duwa",
-       "march-date": "$1 Buleuën Lhèë",
-       "april-date": "$1 Buleuën Peuët",
-       "may-date": "$1 Buleuën Limong",
-       "june-date": "$1 Buleuën Nam",
-       "july-date": "$1 Buleuën Tujôh",
-       "august-date": "$1 Buleuën Lapan",
-       "september-date": "$1 Buleuën Sikureuëng",
-       "october-date": "$1 Buleuën Siplôh",
-       "november-date": "$1 Buleuën Siblaih",
-       "december-date": "$1 Buleuën Duwa Blaih",
+       "january-date": "$1 Buleuen Sa",
+       "february-date": "$1 Buleuen Duwa",
+       "march-date": "$1 Buleuen Lhèe",
+       "april-date": "$1 Buleuen Peuet",
+       "may-date": "$1 Buleuen Limöng",
+       "june-date": "$1 Buleuen Nam",
+       "july-date": "$1 Buleuen Tujôh",
+       "august-date": "$1 Buleuen Lapan",
+       "september-date": "$1 Buleuen Sikureueng",
+       "october-date": "$1 Buleuen Siplôh",
+       "november-date": "$1 Buleuen Siblaih",
+       "december-date": "$1 Buleuen Duwa Blaih",
        "pagecategories": "{{PLURAL:$1|Kawan}}",
        "category_header": "Seunurat lam kawan \"$1\"",
        "subcategories": "Aneuk kawan",
        "edithelp": "Bantu peusaneut",
        "helppage-top-gethelp": "Beunantu",
        "mainpage": "Ôn Keue",
-       "mainpage-description": "Ôn Keuë",
+       "mainpage-description": "Ôn Keue",
        "policy-url": "Project:Neuatô",
        "portal": "Meusapat",
        "portal-url": "Project:Meusapat",
        "listfiles-latestversion-no": "Kön",
        "file-anchor-link": "Beureukaih",
        "filehist": "Riwayat beureukaih",
-       "filehist-help": "Neuteugon bak uroë buleuën/watèë keu neu'eu beureukaih nyoë ‘oh watèë nyan.",
+       "filehist-help": "Neuteugon bak uroe buleuen/watèe keu neu-eu beureukaih nyoe ‘oh watèe nyan.",
        "filehist-deleteall": "sampôh ban dum",
        "filehist-deleteone": "sampôh",
        "filehist-revert": "peuriwang",
        "filehist-current": "jinoë hat",
-       "filehist-datetime": "Uroë buleuën/Watèë",
+       "filehist-datetime": "Uroe buleuen/Watèe",
        "filehist-thumb": "Beuntuk ubeut",
        "filehist-thumbtext": "Beuntuk ubeut keu seunalén tiëp $1",
        "filehist-nothumb": "Hana beuntuk ubeut",
        "protect-cascade": "Peulindông ban mandum ôn nyang rôh lam ôn nyoë (lindông meuturôt).",
        "protect-cantedit": "Droëneuh h‘an jeuët neu’ubah tingkat lindông ôn nyoë kareuna Droëneuh hana hak keu neupeulaku nyan.",
        "protect-otherreason": "Alasan laén/teunamah:",
-       "protect-expiry-options": "1 jeum:1 hour,1 uroë:1 day,1 minggu:1 week,2 minggu:2 weeks,1 buleuën:1 month,3 buleuën:3 months,6 buleuën:6 months,1 thôn:1 year,sabé:infinite",
+       "protect-expiry-options": "1 jeum:1 hour,1 uroe:1 day,1 minggu:1 week,2 minggu:2 weeks,1 buleuen:1 month,3 buleuen:3 months,6 buleuen:6 months,1 thôn:1 year,sabé:infinite",
        "restriction-type": "Lindông:",
        "restriction-level": "Tingkat:",
        "restriction-edit": "Peusaneut",
        "anoncontribs": "Beuneuri",
        "contribsub2": "Keu {{GENDER:$3|$1}} ($2)",
        "uctop": "jinoë",
-       "month": "Mula phôn buleuën (ngön sigohlomjih)",
+       "month": "Mula phôn buleuen (ngön sigohlomjih)",
        "year": "Mula phôn thôn (ngön sigohlomjih)",
        "sp-contributions-newbies": "Peuleumah beuneuri atra ureuëng ban dapeuta mantöng",
        "sp-contributions-newbies-sub": "Keu ureuëng nguy barô",
        "whatlinkshere-filters": "Saréng",
        "blockip": "Theun ureuëng ngui",
        "ipbreason": "Alasan:",
-       "ipboptions": "2 jeum:2 hours,1 uroë:1 day,3 uroë:3 days,1 minggu:1 week,2 minggu:2 weeks,1 buleuën:1 month,3 buleuën:3 months,6 buleuën:6 months,1 thôn:1 year,sabé:infinite",
+       "ipboptions": "2 jeum:2 hours,1 uroe:1 day,3 uroe:3 days,1 minggu:1 week,2 minggu:2 weeks,1 buleuen:1 month,3 buleuen:3 months,6 buleuen:6 months,1 thôn:1 year,sabé:infinite",
        "ipbhidename": "Peusom nan ureueng ngui nibak hasé peusaneut ngön dapeuta",
        "ipblocklist": "Ureuëng ngui teutheun",
        "blocklist-reason": "Alasan",
        "tooltip-search": "Mita lam {{SITENAME}}",
        "tooltip-search-go": "Mita saboh ôn ngon nan nyang paih lagèe nyoe meunyo na",
        "tooltip-search-fulltext": "Mita ôn nyang na asoe lagèe nyoe",
-       "tooltip-p-logo": "Saweuë ôn keuë",
-       "tooltip-n-mainpage": "Saweuë ôn keuë",
-       "tooltip-n-mainpage-description": "Saweuë ôn keuë",
+       "tooltip-p-logo": "Saweue ôn keue",
+       "tooltip-n-mainpage": "Saweue ôn keue",
+       "tooltip-n-mainpage-description": "Saweue ôn keue",
        "tooltip-n-portal": "Bhaih buët, peuë nyang jeuët neupubuët, pat keu mita sipeuë hai",
        "tooltip-n-currentevents": "Mita haba barô",
        "tooltip-n-recentchanges": "Dapeuta neuubah barô lam wiki.",
index 7ef5285..2d7d362 100644 (file)
        "view": "مطالعة",
        "view-foreign": "اعرض في $1",
        "edit": "عدل",
-       "edit-local": "تعدÙ\8aل الوصف المحلي",
+       "edit-local": "عدل الوصف المحلي",
        "create": "أنشئ",
        "create-local": "أضف وصفا محليا",
        "delete": "حذف",
index 4653868..9c137b1 100644 (file)
        "grant-group-high-volume": "Юғары әүҙемлекле алым эшләргә",
        "grant-group-customization": "Көйләүҙәр һәм өҫтөнлөк биргән көйләүҙәр",
        "grant-group-administration": "Административ алымдар ҡулланыу",
-       "grant-group-private-information": "Доступ к конфиденциальным данным о вас\nҺеҙҙең туралағы йәшерелгән белешмәләргә инеү",
+       "grant-group-private-information": "Һеҙҙең туралағы йәшерелгән белешмәләргә инеү",
        "grant-group-other": "Әүҙемлек төрлө",
        "grant-blockusers": "Иҫәп яҙмаларын блоклау һәм блоклауҙы асыу",
        "grant-createaccount": "Иҫәп яҙмаһын булдырырға",
index f5aedb0..00e65d3 100644 (file)
@@ -14,7 +14,8 @@
                        "Mjbmr",
                        "Macofe",
                        "Matěj Suchánek",
-                       "Rachitrali"
+                       "Rachitrali",
+                       "Sultanselim baloch"
                ]
        },
        "tog-underline": ":لینکانآ خط کش",
        "special-characters-group-devanagari": "دیواناگرى",
        "special-characters-group-thai": "تایلندی",
        "special-characters-group-lao": "لائو",
-       "special-characters-group-khmer": "خمر"
+       "special-characters-group-khmer": "خمر",
+       "log-action-filter-upload-revert": "Cahr Dayag"
 }
index 510b1ff..01c4ecc 100644 (file)
        "log-action-filter-suppress-reblock": "Утойваньне ўдзельніка праз паўторнае блякаваньне",
        "log-action-filter-upload-upload": "Новая загрузка",
        "log-action-filter-upload-overwrite": "Паўторная загрузка",
+       "log-action-filter-upload-revert": "Адкат",
        "authmanager-authn-not-in-progress": "Аўтэнтыфікацыя не выконваецца або страчаныя зьвесткі пра сэсію. Калі ласка, пачніце зноў з самага пачатку.",
        "authmanager-authn-no-primary": "Пададзеныя ўліковыя зьвесткі ня могуць быць правераныя на сапраўднасьць.",
        "authmanager-authn-no-local-user": "Пададзеныя ўліковыя зьвесткі не зьвязаныя зь ніводным удзельнікам гэтай вікі.",
index be1b221..3bdf68e 100644 (file)
        "saveusergroups": "Захаваць групы {{GENDER:$1|ўдзельнікаў|ўдзельніц}}",
        "userrights-groupsmember": "У групе:",
        "userrights-groupsmember-auto": "Няяўны член:",
-       "userrights-groups-help": "Тут можна мяняць групы, да якіх належыць гэты ўдзельнік.\n* Адзначанае поле выбару азначае ўваходжанне ўдзельніка ў пэўную групу.\n* Чыстае поле выбару азначае неўваходжанне.\n* Знак * азначае, што нельга выняць удзельніка з групы, калі ён ужо там, або наадварот.адкласці час \n* Знак # азначае, што Вы можаце толькі адкласці час выдалення з групы; Вы не можаце перанесці яго на больш ранні тэрмін.",
+       "userrights-groups-help": "Тут можна мяняць групы, да якіх належыць гэты ўдзельнік.\n* Адзначанае поле выбару азначае ўваходжанне ўдзельніка ў пэўную групу.\n* Чыстае поле выбару азначае неўваходжанне.\n* Знак * азначае, што нельга выняць удзельніка з групы, калі ён ужо там, або наадварот.\n* Знак # азначае, што Вы можаце толькі адкласці час выдалення з групы; Вы не можаце перанесці яго на больш ранні тэрмін.",
        "userrights-reason": "Прычына:",
        "userrights-no-interwiki": "Вам не дазволена мяняць дазволаў карыстальнікам на іншых Вікі-ах.",
        "userrights-nodatabase": "Не знойдзена тут, або не існуе база даных $1.",
index 446614d..902a396 100644 (file)
        "permissionserrorstext-withaction": "Нямате разрешение за $2 поради {{PLURAL:$1|следната причина|следните причини}}:",
        "recreate-moveddeleted-warn": "<strong>Внимание: Създавате страница, която по-рано вече е била изтрита.</strong>\n\nОбмислете добре дали е уместно повторното създаване на страницата.\nЗа ваша информация по-долу е посочена причината за предишното изтриване на страницата:",
        "moveddeleted-notice": "Тази страница е изтрита.\nДневниците на изтриванията, защитите и преместванията е показан по-долу.",
-       "moveddeleted-notice-recent": "За съжаление, страницата скоро е била изтрита (в последните 24 часа).\nПо-долу можете да погледнете дневника на изтривания, защити и премествания.",
+       "moveddeleted-notice-recent": "За съжаление, страницата наскоро е била изтрита (в последните 24 часа).\nПо-долу можете да видите дневник на изтриванията, защитите и преместванията.",
        "log-fulllog": "Преглеждане на пълния дневник",
        "edit-hook-aborted": "Редакцията беше прекъсната от кука.\nНе беше посочена причина за това.",
        "edit-gone-missing": "Страницата не можа да се обнови.\nВероятно междувременно е била изтрита.",
        "defaultmessagetext": "Текст на съобщението по подразбиране",
        "content-failed-to-parse": "Неуспех при анализиране на съдържанието от тип $2 за модела $1: $3",
        "invalid-content-data": "Невалидни данни за съдържание",
-       "content-not-allowed-here": "На страницата [[:$2]] не е позволено използването на $1",
+       "content-not-allowed-here": "На страницата [[:$2]] не е позволено използването на „$1“ на позиция „$3“",
        "editwarning-warning": "Ако излезете от тази страница, може да загубите всички несъхранени промени, които сте направили.\nАко сте влезли в системата, можете да изключите това предупреждение чрез менюто „{{int:prefs-editing}}“ в личните ви настройки.",
        "editpage-invalidcontentmodel-title": "Форматът на съдържанието не се поддържа",
        "editpage-invalidcontentmodel-text": "Модел на съдържание „$1“ не се поддържа.",
        "userrights-expiry-current": "Изтича на $1",
        "userrights-expiry-none": "Не изтича",
        "userrights-expiry": "Изтича на:",
-       "userrights-expiry-existing": "Ð\9eÑ\81Ñ\82аваÑ\89о Ð²Ñ\80еме: $2, $3",
+       "userrights-expiry-existing": "ТекÑ\83Ñ\89оÑ\82о Ð²Ñ\80еме Ð½Ð° Ð¸Ð·Ñ\82иÑ\87ане: $3, $2",
        "userrights-expiry-othertime": "Друго време:",
        "userrights-expiry-options": "1 ден:1 day,1 седмица:1 week,1 месец:1 month,3 месеца:3 months,6 месеца:6 months,1 година:1 year",
        "userrights-invalid-expiry": "Изтичане за групата „$1“ е невалидно.",
        "rcfilters-watchlist-edit-watchlist-button": "Редактиране на списъка за наблюдение",
        "rcfilters-watchlist-showupdated": "Промени по страници, които не сте посетили откакто са внесени промените, са в <strong>получер</strong>, с удебелени маркери.",
        "rcfilters-preference-label": "Използване на интерфейс без JavaScript",
-       "rcfilters-preference-help": "Ð\9eÑ\82менÑ\8f Ð¿Ñ\80еÑ\80абоÑ\82каÑ\82а Ð½Ð° Ð¸Ð½Ñ\82еÑ\80Ñ\84ейÑ\81а Ð½Ð°Ð¿Ñ\80авена Ð¿Ñ\80ез 2017 Ð³Ð¾Ð´Ð¸Ð½Ð°, ÐºÐ°ÐºÑ\82о Ð¸ Ð²Ñ\81иÑ\87ки Ð¸Ð½Ñ\81Ñ\82Ñ\80Ñ\83менÑ\82и Ð´Ð¾Ð±Ð°Ð²ÐµÐ½Ð¸ Ð¾Ñ\82 Ñ\82огава Ð´Ð¾ Ñ\81ега.",
+       "rcfilters-preference-help": "Ð\97аÑ\80ежда Ð¿Ð¾Ñ\81ледниÑ\82е Ð¿Ñ\80омени Ð±ÐµÐ· Ñ\84илÑ\82Ñ\80и Ð·Ð° Ñ\82Ñ\8aÑ\80Ñ\81ене Ð¸ Ñ\84Ñ\83нкÑ\86ионалноÑ\81Ñ\82 Ð·Ð° Ð¾Ñ\86веÑ\82Ñ\8fване.",
        "rcfilters-watchlist-preference-label": "Използване на интерфейс без JavaScript",
-       "rcfilters-watchlist-preference-help": "Ð\9eÑ\82менÑ\8f Ð¿Ñ\80еÑ\80абоÑ\82каÑ\82а Ð½Ð° Ð¸Ð½Ñ\82еÑ\80Ñ\84ейÑ\81а Ð½Ð°Ð¿Ñ\80авена Ð¿Ñ\80ез 2017 Ð³Ð¾Ð´Ð¸Ð½Ð°, ÐºÐ°ÐºÑ\82о Ð¸ Ð²Ñ\81иÑ\87ки Ð¸Ð½Ñ\81Ñ\82Ñ\80Ñ\83менÑ\82и Ð´Ð¾Ð±Ð°Ð²ÐµÐ½Ð¸ Ð¾Ñ\82 Ñ\82огава Ð´Ð¾ Ñ\81ега.",
+       "rcfilters-watchlist-preference-help": "Ð\97аÑ\80ежда Ñ\81пиÑ\81Ñ\8aка Ð·Ð° Ð½Ð°Ð±Ð»Ñ\8eдение Ð±ÐµÐ· Ñ\84илÑ\82Ñ\80и Ð·Ð° Ñ\82Ñ\8aÑ\80Ñ\81ене Ð¸ Ñ\84Ñ\83нкÑ\86ионалноÑ\81Ñ\82 Ð·Ð° Ð¾Ñ\86веÑ\82Ñ\8fване.",
        "rcfilters-filter-showlinkedfrom-label": "Показване на промени на страници, към които има връзка от",
        "rcfilters-filter-showlinkedfrom-option-label": "<strong>Страници, към които има връзка от</strong> избраната страница",
        "rcfilters-filter-showlinkedto-label": "Показване на промени на страници, сочещи към",
        "uploadbtn": "Качване на файл",
        "reuploaddesc": "Връщане към формуляра за качване",
        "upload-tryagain": "Съхраняване на промененото описание на файла",
-       "upload-tryagain-nostash": "Съхраняване на прекачения файл и промененото описание",
+       "upload-tryagain-nostash": "Съхраняване на повторно качения файл и промененото описание",
        "uploadnologin": "Не сте влезли",
        "uploadnologintext": "За да могат да бъдат качвани файлове е необходимо $1 в системата.",
        "upload_directory_missing": "Директорията за качване ($1) липсва и не може да бъде създадена на сървъра.",
        "file-deleted-duplicate": "Идентичен с този файл ([[:$1]]) вече е бил изтриван.\nИсторията на изтриването на файла следва да се провери, преди да се пристъпи към повторното му качване.",
        "uploadwarning": "Предупреждение при качване",
        "uploadwarning-text": "Необходимо е да промените описанието на файла по-долу и да опитате отново.",
-       "uploadwarning-text-nostash": "Ð\9dеобÑ\85одимо Ðµ Ð´Ð° Ð¿Ñ\80екаÑ\87еÑ\82е Ñ\84айла, промените описанието по-долу и да опитате отново.",
+       "uploadwarning-text-nostash": "Ð\9dеобÑ\85одимо Ðµ Ð´Ð° ÐºÐ°Ñ\87иÑ\82е Ð¿Ð¾Ð²Ñ\82оÑ\80но Ñ\84айла, Ð´Ð° промените описанието по-долу и да опитате отново.",
        "savefile": "Съхраняване на файл",
        "uploaddisabled": "Качванията са забранени.",
        "copyuploaddisabled": "Спряно е качването на файлове чрез URL.",
        "ipb-disableusertalk": "Редактиране на собствената дискусионна страница",
        "ipb-change-block": "Повторно блокиране на потребителя с тези настройки",
        "ipb-confirm": "Потвърждаване на блокирането",
+       "ipb-pages-label": "Страници",
        "ipb-namespaces-label": "Именни пространства",
        "badipaddress": "Невалиден IP-адрес",
        "blockipsuccesssub": "Блокирането беше успешно",
        "createaccountblock": "създаването на сметки е блокирано",
        "emailblock": "е-пощенската услуга е блокирана",
        "blocklist-nousertalk": "забрана за редактиране на личната беседа",
+       "blocklist-editing": "Редактиране",
+       "blocklist-editing-sitewide": "Редактиране (за всички уики)",
        "blocklist-editing-page": "страници",
        "blocklist-editing-ns": "именни пространства",
        "ipblocklist-empty": "Списъкът на блокиранията е празен.",
        "ip_range_invalid": "Невалиден диапазон на IP-адреси.",
        "ip_range_toolarge": "Забранено е блокиране на диапазони от IP адреси по-големи от /$1.",
        "ip_range_exceeded": "IP диапазонът превишава максималния диапазон. Позволен диапазон: /$1.",
+       "ip_range_toolow": "IP диапазоните не са поозволени.",
        "proxyblocker": "Блокировач на проксита",
        "proxyblockreason": "IP-адресът Ви беше блокиран, тъй като представлява анонимно достъпен междинен сървър.\nСвържете се с доставчика си на Интернет и го информирайте за този сериозен проблем в сигурността.",
        "sorbs": "DNSBL",
        "djvu_no_xml": "Не е възможно вземането на XML за DjVu-файла",
        "thumbnail-temp-create": "Временния файл с миникартинка не може да бъде създаден.",
        "thumbnail_invalid_params": "Параметрите за миникартинка са невалидни",
+       "thumbnail_toobigimagearea": "Файл с размери по-големи от $1",
        "thumbnail_dest_directory": "Целевата директория не може да бъде създадена",
        "thumbnail_image-type": "Типът картинка не се поддържа",
        "thumbnail_gd-library": "Непълна конфугурация на библиотеката GD: липсва функцията $1",
        "import-interwiki-history": "Копиране на всички версии на страницата",
        "import-interwiki-templates": "Включване на всички шаблони",
        "import-interwiki-submit": "Внасяне",
+       "import-mapping-default": "Внасяне в стандартни места",
        "import-mapping-namespace": "Импортиране в именно пространство:",
        "import-mapping-subpage": "Импортиране като подстраници на следната страница:",
        "import-upload-filename": "Име на файл:",
+       "import-upload-username-prefix": "Междууики представка:",
        "import-comment": "Коментар:",
        "importtext": "Изнесете файла от изходното уики чрез „[[Special:Export|инструмента за изнасяне]]“. Съхранете го на твърдия диск на компютъра си и го качете тук.",
        "importstart": "Внасяне на страници…",
        "imported-log-entries": "{{PLURAL:$1|Внесен е $1 запис|Внесени са $1 записа}} в дневника.",
        "importfailed": "Внасянето беше неуспешно: nowiki>$1</nowiki>",
        "importunknownsource": "Непознат тип файл",
+       "importnoprefix": "Не е указана междууики представка",
        "importcantopen": "Не е възможно да се отвори файла за внасяне",
        "importbadinterwiki": "Невалидна уики препратка",
        "importsuccess": "Внасянето беше успешно!",
        "confirmemail_body_set": "Някой, вероятно Вие, от IP адрес $1,\nе посочил този адрес за електронната поща, свързан с потребителска сметка „$2“ в {{SITENAME}}.\n\nЗа потвърждаване, че тази потребителска сметка наистина Ви принадлежи и за да активирате отново функциите, свързани с електронна поща в {{SITENAME}}, необходимо е да отворите във вашия браузър следната препратка:\n\n$3\n\nАко потребителската сметка *не* Ви принадлежи, можете да откажете потвърждението, като последвате следната препратка:\n\n$5\n\nВалидността на този код за потвърждение изтича на $4.",
        "confirmemail_invalidated": "Отменено потвърждение за електронна поща",
        "invalidateemail": "Отмяна на потвърждението за електронна поща",
+       "notificationemail_body_changed": "Някой, вероятно вие, от IP-адрес $1,\nе сменил електронната поща на сметката „$2“ на „$3“ в {{SITENAME}}.\n\nАко не сте вие, веднага се свържете с администратор.",
        "scarytranscludedisabled": "[Включването между уикита е деактивирано]",
        "scarytranscludefailed": "[Зареждането на шаблона за $1 не сполучи]",
        "scarytranscludetoolong": "[Адресът е твърде дълъг]",
        "confirm-unwatch-top": "Премахване на страницата от списъка Ви за наблюдение?",
        "confirm-rollback-button": "OK",
        "confirm-rollback-top": "Отменяне на редакции по тази страница?",
+       "confirm-mcrrestore-title": "Възстановяване на версия",
+       "confirm-mcrundo-title": "Връщане на промяна",
+       "mcrundofailed": "Неуспех при връщане",
+       "mcrundo-missingparam": "Липсващи задължителни параметри на заявката",
        "semicolon-separator": ";&#32;",
        "comma-separator": ",&#32;",
        "colon-separator": ":&#32;",
        "logentry-rights-autopromote": "$1 е автоматично {{GENDER:$2|повишен|повишена}} от $4 до $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|качи}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|качи}} нова версия на $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|каÑ\87и}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|вÑ\8aÑ\80на}} $3 ÐºÑ\8aм Ð¿Ð¾-Ñ\81Ñ\82аÑ\80а Ð²ÐµÑ\80Ñ\81иÑ\8f",
        "log-name-managetags": "Дневник на управлението на етикети",
        "log-description-managetags": "На тази страница са изброени задачи, свързани с управлението на [[Special:Tags|етикети]]. Дневникът съдържа само действия, извършвани ръчно от администратор. Етикети могат да бъдат създавани или изтривани от уики софтуера без това да бъде отразено в този дневник.",
        "logentry-managetags-create": "$1 {{GENDER:$2|създаде}} етикета „$4“",
        "special-characters-title-endash": "средно тире",
        "special-characters-title-emdash": "дълго тире",
        "special-characters-title-minus": "знак минус",
-       "mw-widgets-abandonedit": "Сигурни ли сте, че искате да напуснете режима за редактиране без да запишете статията преди това?",
+       "mw-widgets-abandonedit": "Сигурни ли сте, че искате да напуснете режима за редактиране без да съхраните промените?",
        "mw-widgets-abandonedit-discard": "Отказване на редакциите",
        "mw-widgets-abandonedit-keep": "Продължаване на редактирането",
        "mw-widgets-abandonedit-title": "Сигурни ли сте?",
        "gotointerwiki-invalid": "Указаното заглавие е невалидно.",
        "pagedata-title": "Данни за страницата",
        "pagedata-bad-title": "Невалидно заглавие: $1.",
+       "unregistered-user-config": "От съображения за сигурност, потребителските подстраници с JavaScript, CSS и JSON не се зареждат за нерегистрирани потребители.",
        "passwordpolicies": "Правила за паролите",
        "passwordpolicies-summary": "Това е списъкът на действащите правила за паролите на потребителските групи дефинирани в това уики.",
        "passwordpolicies-group": "Група",
index 4c5b57b..19b0848 100644 (file)
@@ -39,7 +39,8 @@
                        "Shahadat1971",
                        "Rasal Lia",
                        "আফতাবুজ্জামান",
-                       "Tahmid02016"
+                       "Tahmid02016",
+                       "Ifsad"
                ]
        },
        "tog-underline": "সংযোগের নিচে দাগ দেখানো হোক:",
        "logentry-rights-autopromote": "$1 স্বয়ংক্রিয়ভাবে $4 থেকে $5-এ {{GENDER:$2|উন্নীত}} হয়েছেন",
        "logentry-upload-upload": "$1 $3 {{GENDER:$2|আপলোড করেছেন}}",
        "logentry-upload-overwrite": "$1 $3-এর একটি নতুন সংস্করণ {{GENDER:$2|আপলোড করেছেন}}",
-       "logentry-upload-revert": "$1 $3 {{GENDER:$2|আপলোড করেছেন}}",
+       "logentry-upload-revert": "$1 $3 একটি পুরাতন সংস্করণে {{GENDER:$2|প্রত্যাবর্তন করেছেন}}",
        "log-name-managetags": "ট্যাগ ব্যবস্থাপনা লগ",
        "log-description-managetags": "এই পাতাতে [[Special:Tags|ট্যাগ]] ব্যবস্থাপনা কার্যাবলির একটি তালিকা আছে। এই লগে কেবলমাত্র সেইসব কর্মের তালিকা আছে, যেগুলি একজন প্রশাসক নিজ হাতে সম্পাদন করেছেন; উইকি সফটওয়্যার দিয়ে ট্যাগ সৃষ্টি বা অপসারণ করা সম্ভব, যার কোন ভুক্তি এই লগে সংরক্ষিত হবে না।",
        "logentry-managetags-create": "$1 \"$4\" ট্যাগটি {{GENDER:$2|তৈরি করেছেন}}",
        "log-action-filter-suppress-reblock": "পুনরায় বাধাদানের মাধ্যমে ব্যবহারকারী দমন",
        "log-action-filter-upload-upload": "নতুন আপলোড",
        "log-action-filter-upload-overwrite": "পুনঃআপলোড",
+       "log-action-filter-upload-revert": "প্রত্যাবর্তন",
        "authmanager-authn-not-in-progress": "শনাক্তকরণ প্রক্রিয়াটি আর অগ্রসর হচ্ছে না কিংবা সেশনের উপাত্ত হারিয়ে গেছে। অনুগ্রহ করে আবার শুরু থেকে শুরু করুন।",
        "authmanager-authn-no-primary": "সরবরাহকৃত পরিচয়পত্রের অনুমোদন যাচাই করা যায়নি।",
        "authmanager-authn-no-local-user": "সরবরাহকৃত পরিচয়জ্ঞাপক তথ্যগুলি এই উইকির কোনও ব্যবহারকারীর সাথে সংশ্লিষ্ট নয়।",
index 443db62..0f7a2b0 100644 (file)
        "logentry-rights-autopromote": "$1 {{GENDER:$2|byl automaticky povýšen|byla automaticky povýšena}} z $4 na $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|načetl|načetla}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|načetl|načetla}} novou verzi $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|načetl|načetla}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|vrátil|vrátila}} $3 na starou verzi",
        "log-name-managetags": "Kniha správy značek",
        "log-description-managetags": "Tato stránka obsahuje seznam správcovských úkonů týkajících se [[Special:Tags|značek]]. Protokol obsahuje pouze akce, které provedl ručně správce; značky může vytvářet či mazat přímo software wiki, aniž by v tomto protokolu vznikl záznam.",
        "logentry-managetags-create": "$1 {{GENDER:$2|vytvořil|vytvořila}} značku „$4“",
        "log-action-filter-suppress-reblock": "Utajení uživatele novým zablokováním",
        "log-action-filter-upload-upload": "Nové načtení",
        "log-action-filter-upload-overwrite": "Znovunačtení",
+       "log-action-filter-upload-revert": "Vrácení zpět",
        "authmanager-authn-not-in-progress": "Autentizace neprobíhá nebo se ztratila data relace. Začněte, prosíme, znovu od začátku.",
        "authmanager-authn-no-primary": "Uvedené přihlašovací údaje se nepodařilo autentizovat.",
        "authmanager-authn-no-local-user": "Uvedené přihlašovací údaje neodpovídají žádnému uživateli této wiki.",
index 2660f72..dc258bd 100644 (file)
        "logentry-rights-autopromote": "$1 blev automatisk {{GENDER:$2|forfremmet}} fra $4 til $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|lagde}} $3 op",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|lagde}} en ny udgave af $3 op",
-       "logentry-upload-revert": "$1 {{GENDER:$2|lagde}} $3 op",
+       "logentry-upload-revert": "$1 {{GENDER:$2|gendannede}} $3 til en gammel version",
        "logentry-managetags-create": "$1 {{GENDER:$2|oprettede}} tagget \"$4\"",
        "rightsnone": "(-)",
        "rightslogentry-temporary-group": "$1 (midlertidig, indtil $2)",
        "log-action-filter-rights-rights": "Manuel ændring",
        "log-action-filter-rights-autopromote": "Automatisk ændring",
        "log-action-filter-upload-upload": "Ny overførsel",
+       "log-action-filter-upload-revert": "Gendan",
        "authmanager-create-disabled": "Kontooprettelse deaktiveret",
        "authmanager-create-from-login": "For at oprette din konto, så udfyld venligst felterne.",
        "authmanager-authplugin-setpass-failed-title": "Ændring af adgangskode mislykkedes",
index 8700cec..68fce22 100644 (file)
        "authmanager-create-no-primary": "The supplied credentials could not be used for account creation.",
        "authmanager-link-no-primary": "The supplied credentials could not be used for account linking.",
        "authmanager-link-not-in-progress": "Account linking is not in progress or session data has been lost. Please start again from the beginning.",
-       "authmanager-authplugin-setpass-failed-title": "Password change failed",
-       "authmanager-authplugin-setpass-failed-message": "The authentication plugin denied the password change.",
-       "authmanager-authplugin-create-fail": "The authentication plugin denied the account creation.",
-       "authmanager-authplugin-setpass-denied": "The authentication plugin does not allow changing passwords.",
-       "authmanager-authplugin-setpass-bad-domain": "Invalid domain.",
        "authmanager-autocreate-noperm": "Automatic account creation is not allowed.",
        "authmanager-autocreate-exception": "Automatic account creation temporarily disabled due to prior errors.",
        "authmanager-userdoesnotexist": "User account \"$1\" is not registered.",
index 69fba10..d30f3f1 100644 (file)
        "returnto": "$1(e)ra itzuli.",
        "tagline": "{{SITENAME}}tik",
        "help": "Laguntza",
+       "help-mediawiki": "MediaWikiri buruzko laguntza",
        "search": "Bilatu",
        "search-ignored-headings": " #<!-- utzi marra hau den bezala --> <pre>\n# Bilaketan ez ikusi egingo diren izenburuak.\n# Honetarako aldaketek eragina izango dute goiburua indexatuta dagoen orrialdean.\n# Orriaren birdefinizioa behartu dezakezu edizio nulua egiteaz.\n# Sintaxia horrela da:\n#   * \"#\" karakteretik marraren bukaerararte dagoen guztia iruzkina da.\n#   * Hutsunezko lerroa ez den bakoitza kontuan ez hartzeko izenburu zehatza da, kasu eta guzti.\nErreferentziak\nKanpoko linkak\nIkusi ere\n #</pre> <!-- utzi marra hau den bezala -->",
        "searchbutton": "Bilatu",
        "passwordtooshort": "Pasahitzek {{PLURAL:$1|karaktere 1|$1 karaktere}} gutxienez eduki behar dituzte.",
        "passwordtoolong": "Pasahitzak ezin dira {{PLURAL:$1|karaktere bat|$1 karaktere}} baino luzeagoak izan.",
        "passwordtoopopular": "Ezin dira pasahitz ohikoenak erabili. Aukera ezazu asmatzeko zailagoa den pasahitz bat.",
+       "passwordinlargeblacklist": "Sartu duzun pasahitza pasahitza oso erabilien zerrenda batean dago. Mesedez, erabili ezazu hain ohikoa ez den bat.",
        "password-name-match": "Zure pasahitza ezin da zure erabiltzaile-izen bera izan.",
        "password-login-forbidden": "Erabiltzaile izen eta pasahitz hau erabiltzea debekaturik dago.",
        "mailmypassword": "Pasahitza berrezarri",
        "botpasswords-invalid-name": "Zehaztutako erabiltzaileak ez du bot pasahitzaren ($1) bereizlea.",
        "botpasswords-not-exist": "$1 erabiltzaileak ez du $2 izeneko pasahitza.",
        "botpasswords-needs-reset": "\"$1\"{{GENDER:$1|erabiltzailearen}} \"$2\" robotaren pasahitza berrezarri behar da.",
+       "botpasswords-locked": "Ezin zara sartu bot pasahitz batekin zure kontua blokeatua dagoelako.",
        "resetpass_forbidden": "Ezin dira pasahitzak aldatu",
        "resetpass_forbidden-reason": "Ezin dira pasahitzak aldatu: $1",
        "resetpass-no-info": "Orrialde honetara zuzenean sartzeko izena eman behar duzu.",
        "resetpass-abort-generic": "Estentsio batek pasahitza aldatzea ekidin du.",
        "resetpass-expired": "Zure pasahitza iraungitu da. Sartzeko, pasahitz berria ezarri, mesedez.",
        "resetpass-expired-soft": "Zure pasahitza iraungi egin da eta aldatu beharra dago. Mesedez, aukeratu orain pasahitz berria edo egin klik \"{{int:authprovider-resetpass-skip-label}}\"-n geroago aldatzeko.",
+       "resetpass-validity": "Zure pasahitza ez da baliagarria: $1\n\nMesedez, aukera ezazu beste pasahitz bat sartzeko.",
        "resetpass-validity-soft": "Zure pasahitzak ez du balio: $1\n\nMesedez, aukeratu orain pasahitz berri bat, edo \"{{int:authprovider-resetpass-skip-label}}\" klikatu geroago berrezartzeko.",
        "passwordreset": "Pasahitzaren berrezarpena",
        "passwordreset-text-one": "Bete formulario hau zure pasahitza berrezartzeko.",
        "editpage-invalidcontentmodel-text": "$1 eduki eredua ezin da erabili.",
        "editpage-notsupportedcontentformat-title": "Eduki formatu hori ez da onartzen",
        "editpage-notsupportedcontentformat-text": "$2 eduki ereduak ezin da erabili $1 eduki formatuarekin.",
+       "slot-name-main": "Nagusia",
        "content-model-wikitext": "wikitestua",
        "content-model-text": "testu laua",
        "content-model-javascript": "JavaScript",
        "localtime": "Ordu lokala:",
        "timezoneuseserverdefault": "Erabili lehenetsitako wikia ($1)",
        "timezoneuseoffset": "Beste bat (diferentzia ezarri)",
+       "timezone-useoffset-placeholder": "Adibideak: \"-07:00\" edo \"01:00\"",
        "servertime": "Zerbitzariko ordua:",
        "guesstimezone": "Nabigatzailetik jaso",
        "timezoneregion-africa": "Afrika",
        "prefs-advancedwatchlist": "Aukera aurreratuak",
        "prefs-displayrc": "Aukerak erakutsi",
        "prefs-displaywatchlist": "Aukerak erakutsi",
+       "prefs-changesrc": "Erakusten diren aldaketak",
+       "prefs-changeswatchlist": "Erakusten diren aldaketak",
+       "prefs-pageswatchlist": "Jarraitutako orrialdeak",
        "prefs-tokenwatchlist": "Token",
        "prefs-diffs": "Ezberdintasunak",
        "prefs-help-prefershttps": "Hobespen hauek eragina izango dute sartzen zaren hurrengoan.",
        "ipb-disableusertalk": "Galarazi erabiltzaile honi bere eztabaida orria editatzea, blokeatuta dagoen aldian",
        "ipb-change-block": "Berriz blokeatu erabiltzailea, parametro hauekin",
        "ipb-confirm": "Blokeoa baieztatu",
+       "ipb-pages-label": "Orrialdeak",
+       "ipb-namespaces-label": "Izen-tarteak",
        "badipaddress": "Baliogabeko IP helbidea",
        "blockipsuccesssub": "Blokeoa burutu da",
        "blockipsuccesstext": "[[Special:Contributions/$1|$1]] blokeatua izan da.<br />\nIkus [[Special:BlockList|blokeoen zerrenda]] blokeoak aztertzeko.",
        "ipb-blocklist-duration-left": "gainerako $1",
        "block-actions": "Blokeatuko diren ekintzak:",
        "block-expiry": "Iraungipena",
+       "block-options": "Aukera gehigarriak:",
+       "block-prevent-edit": "Aldatzen",
+       "block-reason": "Arrazoia:",
+       "block-target": "Erabiltzaile izena edo IP helbidea:",
        "unblockip": "Erabiltzailea desblokeatu",
        "unblockiptext": "Erabili beheko formularioa lehenago blokeatutako IP helbide edo erabiltzaile baten idazketa baimenak leheneratzeko.",
        "ipusubmit": "Blokeoa ezabatu",
        "blocklist-nousertalk": "zure buruaren eztabaida orrialdea ezin duzu aldatu",
        "blocklist-editing": "aldatzen",
        "blocklist-editing-sitewide": "editatzea (gune osoan)",
+       "blocklist-editing-page": "orrialdeak",
+       "blocklist-editing-ns": "izen-tarteak",
        "ipblocklist-empty": "Blokeaketa zerrenda hutsik dago.",
        "ipblocklist-no-results": "Zehaztutako IP helbide edo erabiltzaile izena ez dago blokeatuta.",
        "blocklink": "blokeatu",
        "pageinfo-display-title": "Ageri den izenburua",
        "pageinfo-default-sort": "Ordenatze irizpide lehenetsia",
        "pageinfo-length": "Orriaren neurria (byteak)",
+       "pageinfo-namespace": "Izen-tartea",
        "pageinfo-article-id": "Orriaren identifikazio zenbakia",
        "pageinfo-language": "Orriaren edukiaren hizkuntza",
        "pageinfo-language-change": "aldatu",
        "log-action-filter-suppress-reblock": "Birblokoz kendutako erabiltzailea",
        "log-action-filter-upload-upload": "Igoera berria",
        "log-action-filter-upload-overwrite": "Birkargatu",
+       "log-action-filter-upload-revert": "Leheneratu",
        "authmanager-authn-not-in-progress": "Egiaztatzea ez dago prozesuan edo saioaren datuak galdu egin dira. Hasi berriro hasieratik mesedez.",
        "authmanager-authn-no-primary": "Emandako kredentzialak ezin izan dira egiaztatu.",
        "authmanager-authn-no-local-user": "Emandako kredentzialak ez dute lotura wiki honetako erabiltzaileekin.",
index 5372a88..92c83d9 100644 (file)
        "exif-countrycodecreated": "Код на държавата, в която е направена снимката",
        "exif-provinceorstatecreated": "Област или щат, в който е направена снимката",
        "exif-citycreated": "Град, в който е направена снимката",
+       "exif-sublocationcreated": "Район на града в който е направена снимката",
        "exif-worldregiondest": "Показан регион на света",
        "exif-countrydest": "Показана държава",
        "exif-countrycodedest": "Код на показаната държава",
        "exif-objectname": "Кратко заглавие",
        "exif-specialinstructions": "Специални инструкции",
        "exif-headline": "Заглавие",
+       "exif-credit": "Субект, предоставил изображението",
        "exif-source": "Източник",
+       "exif-editstatus": "Редакционен статус на изображението",
        "exif-urgency": "Спешност",
+       "exif-locationdest": "Показано място",
+       "exif-locationdestcode": "Код на показаното място",
+       "exif-objectcycle": "Време от деня за което е предназначена снимката",
        "exif-contact": "Информация за контакти",
        "exif-writer": "Автор на текста",
        "exif-languagecode": "Език",
        "exif-iimcategory": "Категория",
        "exif-iimsupplementalcategory": "Допълнителни категории",
        "exif-datetimeexpires": "Да не се използва след",
+       "exif-datetimereleased": "Издадена на",
+       "exif-originaltransmissionref": "Код на мястото от което е изпратена снимката",
        "exif-identifier": "Идентификатор",
        "exif-lens": "Използвана оптична леща",
        "exif-serialnumber": "Сериен номер на фотоапарата",
        "exif-originaldocumentid": "Уникален номер на оригиналния документ",
        "exif-licenseurl": "Адрес с информация за авторски права",
        "exif-morepermissionsurl": "Алтернативна информация за лиценза",
+       "exif-attributionurl": "При използване на творбата, моля поставете връзка до",
+       "exif-preferredattributionname": "При използване на творбата, моля укажете автора",
        "exif-pngfilecomment": "Kоментар на PNG файл",
        "exif-disclaimer": "Уточнение",
        "exif-contentwarning": "Предупреждение за съдържанието",
        "exif-giffilecomment": "Kоментар на GIF файл",
        "exif-intellectualgenre": "Тип елемент",
+       "exif-subjectnewscode": "Код на темата",
        "exif-event": "Изобразено събитие",
        "exif-organisationinimage": "Изобразена организация",
        "exif-personinimage": "Изобразена личност",
        "exif-compression-7": "JPEG",
        "exif-copyrighted-true": "Заштитено с авторски права",
        "exif-copyrighted-false": "Статутът на авторските права не е указан",
+       "exif-photometricinterpretation-0": "Чернобяло (Бялото е 0)",
+       "exif-photometricinterpretation-1": "Чернобяло (Черното е 0)",
        "exif-photometricinterpretation-2": "RGB",
+       "exif-photometricinterpretation-3": "Цветова палитра",
+       "exif-photometricinterpretation-4": "Маска на прозрачност",
+       "exif-photometricinterpretation-5": "Разделено (Вероятно CMYK)",
+       "exif-photometricinterpretation-8": "CIE L*a*b*",
+       "exif-photometricinterpretation-9": "CIE L*a*b* (ICC-кодиране)",
+       "exif-photometricinterpretation-10": "CIE L*a*b* (ITU-кодиране)",
        "exif-unknowndate": "Неизвестна дата",
        "exif-orientation-1": "Нормално",
        "exif-orientation-2": "Отражение по хоризонталата",
        "exif-gpsdop-poor": "Лошо ($1)",
        "exif-objectcycle-a": "Само сутрин",
        "exif-objectcycle-p": "Само вечер",
+       "exif-objectcycle-b": "Сутрин и вечер",
        "exif-gpsdirection-t": "Истинска",
        "exif-gpsdirection-m": "Магнитна",
        "exif-ycbcrpositioning-1": "Центрирани",
index 5831e69..d266bea 100644 (file)
        "exif-compression-6": "JPEG",
        "exif-copyrighted-true": "Copyrightduna",
        "exif-copyrighted-false": "Copyright egoera ez da ezarri",
+       "exif-photometricinterpretation-0": "Zuri-beltza (beltza 0 da)",
        "exif-photometricinterpretation-1": "Zuri-beltza (beltza 0 da)",
        "exif-photometricinterpretation-2": "GBU (RGB)",
+       "exif-photometricinterpretation-3": "Kolore-paleta",
+       "exif-photometricinterpretation-4": "Gardentasun maskara",
+       "exif-photometricinterpretation-5": "Bereiztuak (ziurrenik CMYK)",
        "exif-photometricinterpretation-6": "YCbCr",
+       "exif-photometricinterpretation-8": "CIE L*a*b*",
+       "exif-photometricinterpretation-9": "CIE L*a*b* (ICC kodeketa)",
+       "exif-photometricinterpretation-10": "CIE L*a*b* (ITU kodeketa)",
        "exif-unknowndate": "Data ezezaguna",
        "exif-orientation-1": "Arrunta",
        "exif-orientation-2": "Horizontalki buelta emana",
index 4ad1d0b..6a10d76 100644 (file)
        "logentry-rights-autopromote": "$1 ha essite automaticamente {{GENDER:$2|promovite}} de $4 a $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|ha incargate}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|ha incargate}} un nove version de $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|ha incargate}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|ha revertite}} $3 a un version ancian",
        "log-name-managetags": "Registro de gestion de etiquettas",
        "log-description-managetags": "Iste pagina lista le cargas de gestion relative a [[Special:Tags|etiquettas]]. Le registro contine solmente le actiones exequite manualmente per un administrator; etiquettas pote esser create o delite per le software wiki sin insertion de un entrata in iste registro.",
        "logentry-managetags-create": "$1 {{GENDER:$2|creava}} le etiquetta \"$4\"",
index 2e61ac9..5f0e3e8 100644 (file)
        "sitejspreview": "'''Ingatlah bahwa Anda hanya menampilkan pratayang dari kode JavaScript ini.'''\n'''Perubahan belum disimpan!'''",
        "userinvalidconfigtitle": "<strong>Peringatan:</strong> Kulit \"$1\" tidak ditemukan. Harap diingat bahwa halaman .css, .json, dan .js menggunakan huruf kecil, contoh {{ns:user}}:Foo/vector.css dan bukannya {{ns:user}}:Foo/Vector.css.",
        "updated": "(Diperbarui)",
-       "note": "'''Catatan:'''",
+       "note": "<strong>Catatan:</strong>",
        "previewnote": "'''Ingatlah bahwa ini hanya pratayang.'''\nPerubahan Anda belum disimpan!",
        "continue-editing": "Lanjutkan penyuntingan",
        "previewconflict": "Pratayang ini mencerminkan teks pada bagian atas kotak suntingan teks sebagaimana akan terlihat bila Anda menyimpannya.",
        "rcfilters-noresults-conflict": "Hasil tidak ditemukan karena kriteria pencariannya bertentangan",
        "rcfilters-state-message-subset": "Filter ini tidak akan berpengaruh karena hasilnya disertakan oleh {{PLURAL:$2|filter}} berikut yang lebih luas (coba soroti untuk membedakannya): $1",
        "rcfilters-state-message-fullcoverage": "Memilih semua penyaringan dalam kelompok ini sama dengan tidak memilih apapun, sehingga penyaringan ini tidak memberikan hasil. Kelompok termasuk: $1",
-       "rcfilters-filtergroup-authorship": "Kontribusi pengarang",
+       "rcfilters-filtergroup-authorship": "Kontribusi penulis",
        "rcfilters-filter-editsbyself-label": "Suntingan Anda",
        "rcfilters-filter-editsbyself-description": "Kontribusi saya",
        "rcfilters-filter-editsbyother-label": "Suntingan orang lain",
        "magiclink-tracking-isbn-desc": "Halaman ini menggunakan pranala magis ISBN. Lihat [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Magic_links mediawiki.org] bagaimana melakukan migrasi.",
        "specialloguserlabel": "Pengguna:",
        "speciallogtitlelabel": "Target (judul atau {{ns:user}}:nama pengguna untuk pengguna)",
-       "log": "Catatan (Log)",
+       "log": "Log",
        "logeventslist-submit": "Tampilkan",
        "logeventslist-more-filters": "Tampilkan log tambahan:",
        "logeventslist-patrol-log": "Log patroli",
        "anoncontribs": "Kontribusi",
        "contribsub2": "Untuk {{GENDER:$3|$1}} ($2)",
        "contributions-userdoesnotexist": "Pengguna \"$1\" tidak terdaftar.",
+       "negative-namespace-not-supported": "Ruangnama dengan nilai negatif tidak didukung.",
        "nocontribs": "Tidak ada perubahan yang sesuai dengan kriteria tersebut.",
        "uctop": "saat ini",
        "month": "Sejak bulan (dan sebelumnya):",
        "logentry-block-block": "$1 {{GENDER:$2|memblokir}} {{GENDER:$4|$3}} dengan waktu kedaluwarsa $5 $6",
        "logentry-block-unblock": "$1 telah {{GENDER:$2|mencabut pemblokiran}} atas {{GENDER:$4|$3}}",
        "logentry-block-reblock": "$1 {{GENDER:$2|mengubah}} pemblokiran {{GENDER:$4|$3}} dengan waktu kedaluwarsa $5 $6",
+       "logentry-partialblock-block-page": "{{PLURAL:$1|halaman|halaman}} $2",
+       "logentry-partialblock-block-ns": "{{PLURAL:$1|ruangnama|ruangnama}} $2",
        "logentry-partialblock-block": "$1 {{GENDER:$2|memblokir}} {{GENDER:$4|$3}} dari penyuntingan $7 dengan waktu kedaluwarsa $5 $6",
+       "logentry-partialblock-reblock": "$1 {{GENDER:$2|mengubah}} pengaturan blokir pada {{GENDER:$4|$3}} untuk mencegah penyuntingan pada $7 dengan masa pemblokiran $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|memblokir}} {{GENDER:$4|$3}} dengan waktu kedaluwarsa $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|mengubah}} pemblokiran {{GENDER:$4|$3}} dengan waktu kedaluwarsa $5 $6",
        "logentry-import-upload": "$1 {{GENDER:$2|mengimpor}} $3 melalui pemuatan berkas",
        "logentry-rights-autopromote": "$1 secara otomatis {{GENDER:$2|dipromosikan}} dari $4 menjadi $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|mengunggah}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|mengunggah}} versi baru dari $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|mengunggah}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|mengembalikan}} $3 ke versi lama",
        "log-name-managetags": "Log pengelolaan tag",
        "log-description-managetags": "Daftar halaman ini mencantumkan tugas-tugas yang terkait dengan [[Special:Tags|tag]]. Lognya hanya mengandung tindakan-tindakan yang dijalankan secara manual oleh pengurus; tag-tag bisa dibuat atau dihapus oleh perangkat lunak wiki tanpa tercatat entrinya dalam log ini.",
        "logentry-managetags-create": "$1 {{GENDER:$2|membuat}} tag \"$4\"",
        "log-action-filter-suppress-reblock": "Penyembunyian oleh pengguna menurut pemblokiran",
        "log-action-filter-upload-upload": "Unggahan baru",
        "log-action-filter-upload-overwrite": "Unggah kembali",
+       "log-action-filter-upload-revert": "Batalkan",
        "authmanager-authn-not-in-progress": "Otentikasi tidak dilanjutkan atau data sesi telah hilang. Ulang kembali dari awal.",
        "authmanager-authn-no-primary": "Kredensial yang diberikan tidak dapat diotentikasi.",
        "authmanager-authn-no-local-user": "Kredensial yang diberikan tidak terkait dengan satu orang pun pengguna di wiki ini.",
        "passwordpolicies-policy-maximalpasswordlength": "Kata sandi tidak boleh kurang dari {{PLURAL:$1|karakter|karakter}}.",
        "passwordpolicies-policy-passwordcannotbepopular": "Kata sandi tidak boleh {{PLURAL:$1|kata sandi populer|dalam senarai $1 kata sandi populer}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Kata sandi tidak boleh termasuk dalam daftar 100.000 kata sandi yang paling umum digunakan.",
+       "passwordpolicies-policyflag-forcechange": "wajib diganti ketika masuk log",
        "unprotected-js": "Karena alasan keamanan Javascript tidak dapat dimuat dari halaman yang tidak dilindungi. Mohon hanya buat javascript di ruangnama MediaWiki: atau sebagai subhalaman  Pengguna"
 }
index 99d48b8..b031c8e 100644 (file)
        "defaultmessagetext": "Ordinara mesajo-texto",
        "invalid-content-data": "Nevalida kontenajo",
        "content-model-wikitext": "texto Wiki",
+       "content-model-text": "simpla texto",
        "content-model-javascript": "JavaScript",
        "content-json-empty-object": "vakua objekto",
        "content-json-empty-array": "vakua tabelo",
        "undo-failure": "Ne povis nuligar la redakto pro konflikti kun intermeza redakti.",
        "undo-summary-username-hidden": "Desfacar revizo $1 facita da celita uzero",
        "cantcreateaccount-text": "La kreo di konto de ica adreso IP (<strong>$1</strong>) blokusesis da [[User:$3|$3]].\n\nLa motivo, segun $3, esas <em>$2</em>",
+       "cantcreateaccount-range-text": "La kreo di konti de IP-adresi de <strong>$1</strong>, qua inkluzas vua IP-adreso (<strong>$4</strong>), blokusesis dal uzero [[User:$3|$3]].\n\nLa motivo quon $3 informis por la blokuso esis <em>$2</em>",
        "viewpagelogs": "Videz registrari por ca pagino",
        "nohistory": "Ne esas redakto-historio por ica pagino.",
        "currentrev": "Nuna versiono",
        "rev-showdeleted": "montrar",
        "revisiondelete": "Efacar/Restaurar revizi",
        "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-image": "Celar kontenajo dil arkivo",
        "revdelete-hide-comment": "Rezumo di redakto",
        "revdelete-hide-user": "uzeronomo di redaktanto/IP-adreso",
        "revertpage": "Desfacita redakti da [[Special:Contributions/$2|$2]] ([[User talk:$2|Debato]]) e rekuperita la lasta redakto da [[User:$1|$1]]",
        "rollback-success": "Desfacis redakti da $1;\nrestauris ad lasta versiono da $2.",
        "sessionfailure": "Semblas ke eventis problemo kun vua sesiono di 'login';\nta agado abrogesis, quale presorgo kontre sequestro di sesiono ('hijacking').\nVoluntez risendar la formulario, plenigita.",
+       "changecontentmodel": "Chanjar la konteno-modelo di (u)la pagino",
+       "changecontentmodel-title-label": "Titulo di la pagino",
+       "log-name-contentmodel": "Registro di la modifikuri en la modelo pri kontenajo",
        "logentry-contentmodel-change-revertlink": "restaurar",
        "logentry-contentmodel-change-revert": "restaurar",
        "protectlogpage": "Protekto-registraro",
        "block-log-flags-noautoblock": "automatala blokuso nekapabligata",
        "block-log-flags-noemail": "e-posto blokusita",
        "block-log-flags-nousertalk": "ne povas redaktar lua propra diskuto-pagino",
+       "range_block_disabled": "Ne permisesas al administrero blokusar grupi di IP.",
        "ipb_expiry_invalid": "Nevalida expiro-tempo.",
        "ipb-needreblock": "$1 ja esas blokusata. Ka vu deziras modifikar la selekti?",
        "ipb-otherblocks-header": "Altra {{PLURAL:$1|blokuso|blokusi}}",
        "allmessagescurrent": "Nuna texti di mesajo",
        "allmessagestext": "Yen listo pri omna sistemo-mesaji disponebla en la MediaWiki nomaro.\nVizitez [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation MediaWiki Lokizado] e [https://translatewiki.net translatewiki.net] se vu volos kontributar ad generala MediaWiki lokizado.",
        "allmessages-language": "Linguo:",
-       "thumbnail-more": "Grandigar",
+       "thumbnail-more": "Plugrandigar",
        "thumbnail_error": "Ne sucesas krear imajeto: $1",
        "import": "Importacar pagini",
        "import-comment": "Komento:",
index d614642..0e9ee2e 100644 (file)
        "logentry-rights-autopromote": "$1 è {{GENDER:$2|stato promosso|stata promossa|stato/a promosso/a}} automaticamente da $4 a $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|ha caricato}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|ha caricato}} una nuova versione di $3.",
-       "logentry-upload-revert": "$1 {{GENDER:$2|ha caricato}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|ha ripristinato}} $3 ad una vecchia versione",
        "log-name-managetags": "Gestione etichette",
        "log-description-managetags": "Questa pagina elenca le azioni di gestione relative alle [[Special:Tags|etichette]]. Il registro contiene solo le azioni effettuate manualmente da un amministratore; le etichette potrebbero essere create o cancellate dal programma wiki senza che ciò venga registrato qui.",
        "logentry-managetags-create": "$1 {{GENERE:$2|ha creato}} il tag \"$4\"",
        "log-action-filter-suppress-reblock": "Soppressione utente da ri-blocco",
        "log-action-filter-upload-upload": "Nuovo caricamento",
        "log-action-filter-upload-overwrite": "Ricaricamento",
+       "log-action-filter-upload-revert": "Ripristina",
        "authmanager-authn-not-in-progress": "L'autenticazione non è in corso o i dati della sessione sono andati persi. Si prega di ricominciare dall'inizio.",
        "authmanager-authn-no-primary": "Le credenziali fornite non possono essere autenticate.",
        "authmanager-authn-no-local-user": "Le credenziali fornite non sono associate a nessun utente di questo wiki.",
index eff8648..942b7e1 100644 (file)
        "right-override-export-depth": "リンク先ページを5階層まで含めて書き出す",
        "right-sendemail": "他の利用者にメールを送信",
        "right-managechangetags": "[[Special:Tags|タグ]]の作成、有効化および無効化",
-       "right-applychangetags": "自分の編集に[[Special:Tags|タグ]]を適用する",
+       "right-applychangetags": "自身の編集に[[Special:Tags|タグ]]を適用",
        "right-changetags": "個々の版と記録項目の任意の[[Special:Tags|タグ]]の追加と削除",
        "right-deletechangetags": "データベースから[[Special:Tags|タグ]]を削除",
        "grant-generic": "「$1」の権限バンドル",
        "action-userrights-interwiki": "他のウィキの利用者の利用者権限変更",
        "action-siteadmin": "データベースのロックまたはロック解除",
        "action-sendemail": "メールの送信",
-       "action-editmyoptions": "あなたの個人設定を編集",
+       "action-editmyoptions": "自分のの個人設定の編集",
        "action-editmywatchlist": "自身のウォッチリストの編集",
        "action-viewmywatchlist": "自身のウォッチリストの閲覧",
        "action-viewmyprivateinfo": "自分の非公開情報の閲覧",
        "action-editmyprivateinfo": "自分の非公開情報の編集",
-       "action-editcontentmodel": "ã\83\9aã\83¼ã\82¸ã\81®ã\82³ã\83³ã\83\86ã\83³ã\83\84ã\83¢ã\83\87ã\83«ã\82\92編集",
+       "action-editcontentmodel": "ã\83\9aã\83¼ã\82¸ã\81®ã\82³ã\83³ã\83\86ã\83³ã\83\84ã\83¢ã\83\87ã\83«ã\81®編集",
        "action-managechangetags": "タグの作成、有効化および無効化",
-       "action-applychangetags": "è\87ªå\88\86ã\81®ç·¨é\9b\86ã\81«ã\82¿ã\82°ã\82\92é\81©ç\94¨ã\81\99ã\82\8b",
+       "action-applychangetags": "è\87ªå\88\86ã\81®ç·¨é\9b\86ã\81¸ã\81®ã\82¿ã\82°ã\81®é\81©ç\94¨",
        "action-changetags": "個々の版および記録項目への任意のタグの追加と除去",
        "action-deletechangetags": "データベースからタグの削除",
        "action-purge": "このページのキャッシュ破棄",
index 73ff960..47b6c01 100644 (file)
        "changeemail-none": "(nav)",
        "changeemail-password": "Jūsu {{SITENAME}} parole:",
        "changeemail-submit": "Mainīt e-pastu",
+       "changeemail-throttled": "Tu esi veicis pārāk daudz pieslēgšanās mēģinājumus.\nLūdzu, uzgaidi $1, pirms mēģini vēlreiz.",
        "changeemail-nochange": "Lūdzu, ievadi atšķirīgu jauno e-pasta adresi.",
        "resettokens-tokens": "Marķieri:",
        "resettokens-token-label": "$1 (šībrīža vērtība: $2)",
        "localtime": "Vietējais laiks:",
        "timezoneuseserverdefault": "Lietot viki noklusēto ($1)",
        "timezoneuseoffset": "Cita (norādi starpību zemāk)",
+       "timezone-useoffset-placeholder": "Vērtības piemēri: \"-07:00\" vai \"01:00\"",
        "servertime": "Servera laiks šobrīd:",
        "guesstimezone": "Izmantot datora sistēmas laiku",
        "timezoneregion-africa": "Āfrika",
        "logentry-protect-protect": "$1 {{GENDER:$2|aizsargāja}} $3 $4",
        "logentry-upload-upload": "$1 {{GENDER:$2|augšupielādēja}} $3",
        "logentry-upload-overwrite": "$1 augšupielādēja jaunu $3 versiju",
-       "logentry-upload-revert": "$1 {{GENDER:$2|augšupielādēja}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|atjaunoja}} $3 uz vecāku versiju",
        "logentry-managetags-create": "$1 {{GENDER:$2|izveidoja}} iezīmi \"$4\"",
        "log-name-tag": "Iezīmju žurnāls",
        "rightsnone": "(nav)",
index e011257..5aca054 100644 (file)
        "newpages": "У лаштык-влак",
        "newpages-username": "Пайдаланышын лӱмжӧ:",
        "ancientpages": "Пытартыш тӧрталтымаш-влак почеш ойырымо статья-влак",
-       "move": "Лӱмым вашталташ",
+       "move": "Лаштык лӱмым вашталташ",
        "movethispage": "Тиде лаштыкын лӱмжым вашталташ",
        "pager-newer-n": "{{PLURAL:$1|1=вес|вес}}",
        "pager-older-n": "{{PLURAL:$1|1=ончычсо|ончычсо}}",
index 74ddf83..3a55cce 100644 (file)
        "history-feed-description": "Историја на измените на оваа страница на викито",
        "history-feed-item-nocomment": "$1 на $2",
        "history-feed-empty": "Бараната страница не постои.\nМоже била избришана од викито или преименувана.\nОбидете се да [[Special:Search|пребарате низ викито]] за релевантни нови страници.",
-       "history-edit-tags": "Ð\98змени Ð¾Ð·Ð½Ð°ÐºÐ¸ Ð½Ð° Ð¾Ð´Ñ\80едени преработки",
+       "history-edit-tags": "Ð\98змени Ð¾Ð·Ð½Ð°ÐºÐ¸ Ð½Ð° Ð¸Ð·Ð±Ñ\80аниÑ\82е преработки",
        "rev-deleted-comment": "(избришан опис на промени)",
        "rev-deleted-user": "(избришано корисничко име)",
        "rev-deleted-event": "(избришани податоци од дневникот)",
        "rev-suppressed-unhide-diff": "Една од преработките на оваа разлика е '''притаена'''.\nПовеќе подробности ќе најдете во [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} дневникот на скривања].\nМожете да [$1 ја видите оваа разлика] ако сакате да продолжите.",
        "rev-deleted-diff-view": "Една од преработките на оваа разлика е '''избришана'''.\nМожете да ја погледате оваа разлика; подробности ќе најдете во [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} дневникот на бришење].",
        "rev-suppressed-diff-view": "Една од преработките на оваа разлика е '''притаена'''.\nМожете да ја погледате оваа разлика; подробности ќе најдете во [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} дневникот на скривања].",
-       "rev-delundel": "пÑ\80икажи/Ñ\81кÑ\80иÑ\98",
+       "rev-delundel": "измени Ð²Ð¸Ð´Ð»Ð¸Ð²Ð¾Ñ\81Ñ\82",
        "rev-showdeleted": "прикажи",
        "revisiondelete": "Избриши/врати преработки",
-       "revdelete-nooldid-title": "Ð\91аÑ\80анаÑ\82а Ð¸Ð·Ð¼ÐµÐ½Ð° Ð½Ðµ Ð¿Ð¾Ñ\81Ñ\82ои",
-       "revdelete-nooldid-text": "Немате укажано ниедна целна преработка врз која треба да се изврши оваа функикја, сте укажале преработка која не постои, или пак се обидувате да ја скриете тековната преработка.",
+       "revdelete-nooldid-title": "Ð\9dеважеÑ\87ка Ñ\86елна Ð¸Ð·Ð¼ÐµÐ½Ð°",
+       "revdelete-nooldid-text": "Немате укажано ниедна целна преработка врз која треба да се изврши оваа функција, сте укажале преработка која не постои, или пак се обидувате да ја скриете тековната преработка.",
        "revdelete-no-file": "Наведената податотека не постои.",
        "revdelete-show-file-confirm": "Дали сакате да ја погледнете избришаната преработка на податотеката „<nowiki>$1</nowiki>“ од $2 во $3?",
        "revdelete-show-file-submit": "Да",
        "difference-multipage": "(Разлики помеѓу страници)",
        "lineno": "Ред $1:",
        "compareselectedversions": "Спореди ги избраните преработки",
-       "showhideselectedversions": "Ð\9fÑ\80икажи/Ñ\81кÑ\80иÑ\98 Ð³Ð¸ избраните преработки",
+       "showhideselectedversions": "Ð\98змени Ð²Ð¸Ð´Ð»Ð¸Ð²Ð¾Ñ\81Ñ\82 Ð½Ð° избраните преработки",
        "editundo": "откажи",
        "diff-empty": "(нема разлика)",
        "diff-multi-sameuser": "({{PLURAL:$1|Не е прикажана една меѓувремена преработка|Не се прикажани $1 меѓувремени преработки}} од истиот корисник)",
        "recentchangescount": "Бројот на уредувања за приказ во скорешните промени, историите на страниците и во дневници. По основно:",
        "prefs-help-recentchangescount": "Највеќе: 1000",
        "prefs-help-watchlist-token2": "Ова е тајна шифра за тековникот на вашите набљудувања.\nСекој што ја знае ќе може да ја чита, па затоа ви препорачуваме да не ја кажувате никому.\nАко е потребно, [[Special:ResetTokens|можете да ставите нова]].",
-       "prefs-help-tokenmanagement": "Можете да го погледате и одново зададете тајниот клуч з авашата сметка со кој се пристапува до семрежниот тековник на вашите набљудувани. Секој еден што го знае клучот може да ви ги ги чита набљудуваните — затоа не го кажувајте никому.",
+       "prefs-help-tokenmanagement": "Можете да го погледате и одново зададете тајниот клуч за вашата сметка со кој се пристапува до семрежниот тековник на вашите набљудувани. Секој еден што го знае клучот може да ви ги чита набљудуваните — затоа не го кажувајте никому.",
        "savedprefs": "Вашите нагодувања се зачувани.",
        "savedrights": "Корисничките групи на {{GENDER:$1|$1}} се зачувани.",
        "timezonelegend": "Часовен појас:",
        "saveusergroups": "Зачувај ги {{GENDER:$1|корисничките}} групи",
        "userrights-groupsmember": "Член на:",
        "userrights-groupsmember-auto": "Подразбран член на:",
-       "userrights-groups-help": "Можете да измените на кои групи припаѓа корисник:\n* Штиклирано — корисникот е во таа група.\n* Нештиклирано — корисникот не припаѓа на групата.\n* Ѕвездичка (*) — не можете да ја отстраните групата откако сте ја додале (и обратно).\n* Тараба (#) — можете само да го вратите истекот на членството во групава, но не можете да го поместите нанапред.",
+       "userrights-groups-help": "Можете да измените на кои групи припаѓа корисник:\n* Штиклирано — корисникот е во таа група.\n* Нештиклирано — корисникот не припаѓа на групата.\n* Ѕвездичка (*) — не можете да ја отстраните групата откако сте ја додале (и обратно).\n* Тараба (#) — можете само да го вратите истекот на членството во групата, но не можете да го поместите нанапред.",
        "userrights-reason": "Причина:",
        "userrights-no-interwiki": "Немате дозвола за уредување на кориснички права на други викија.",
        "userrights-nodatabase": "Базата на податоци $1 не постои или не е месна.",
        "rightslogtext": "Ова е дневник на промени на кориснички права.",
        "action-read": "читање на оваа страница",
        "action-edit": "уредување на оваа страница",
-       "action-createpage": "создавање страници",
+       "action-createpage": "создавање на оваа страница",
        "action-createtalk": "создавање на оваа разговорна страница",
-       "action-createaccount": "создај ја оваа корисничка сметка",
+       "action-createaccount": "создавање на оваа корисничка сметка",
        "action-autocreateaccount": "автоматско создавање на оваа надворешна корисничка сметка",
        "action-history": "преглед на историјата на оваа страница",
        "action-minoredit": "означување на ова уредување како ситно",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (погл. и [[Special:NewPages|списокот на нови страници]])",
        "recentchanges-legend-plusminus": "(''±123'')",
        "recentchanges-submit": "Прикажи",
-       "rcfilters-tag-remove": "Отстрани го „$1“",
+       "rcfilters-tag-remove": "Отстрани „$1“",
        "rcfilters-legend-heading": "<strong>Список на кратенки:</strong>",
        "rcfilters-other-review-tools": "Други алатки за проверка",
        "rcfilters-group-results-by-page": "Групен исход по страница",
        "logentry-rights-autopromote": "$1 автоматски {{GENDER:$2|унапреден|унапредена}} од $4 во $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|ја подигна}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|подигна}} нова верзија на $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|Ñ\98а Ð¿Ð¾Ð´Ð¸Ð³Ð½Ð°}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|Ñ\98а Ð²Ñ\80аÑ\82и}} $3 Ð½Ð° Ð¿Ð¾Ñ\81Ñ\82аÑ\80а Ð²ÐµÑ\80зиÑ\98а",
        "log-name-managetags": "Дневник на раководство со ознаки",
        "log-description-managetags": "На страницава се наведени раководните задачи што се однесуваат на [[Special:Tags|ознаки]]. Дневникот содржи само дејства извршени рачно од администратор; ознаките можат да се создаваат и бришат од википрограмот без да се заведуваат во дневников.",
        "logentry-managetags-create": "$1 {{GENDER:$2|ја создаде}} ознаката „$4“",
        "log-action-filter-suppress-reblock": "Притајување на корисникот преку преблокирање",
        "log-action-filter-upload-upload": "Ново подигање",
        "log-action-filter-upload-overwrite": "Преподигање",
+       "log-action-filter-upload-revert": "Отповикај",
        "authmanager-authn-not-in-progress": "Заверката не е во тек, или има губиток на седничките податоци. Почнете одново.",
        "authmanager-authn-no-primary": "Укажаните најавни податоци не можат да се заверат.",
        "authmanager-authn-no-local-user": "Укажаните најавни податоци не се поврзани со ниеден корисник на ова вики.",
index 285b515..8ef917b 100644 (file)
        "logentry-rights-autopromote": "$1 foi promovido automaticamente de $4 para $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|carregou}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|carregada}} uma nova versão de $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|carregado}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|revertido}} $3 para uma versão antiga",
        "log-name-managetags": "Registo de gestão de etiquetas",
        "log-description-managetags": "Esta página lista as tarefas de gestão relacionadas a [[Special:Tags|etiquetas]]. O registro contém apenas ações realizadas manualmente por um administrador; etiquetas podem ser criadas ou apagadas pelo software da wiki sem uma entrada a ser gravada neste registro.",
        "logentry-managetags-create": "$1 {{GENDER:$2|criada}} a etiqueta \"$4\"",
        "log-action-filter-suppress-reblock": "Supressão de usuário por rebloqueio",
        "log-action-filter-upload-upload": "Novo Upload",
        "log-action-filter-upload-overwrite": "Recarregar",
+       "log-action-filter-upload-revert": "Reverter",
        "authmanager-authn-not-in-progress": "A autenticação não está em andamento ou os dados da sessão foram perdidos. Por favor, comece novamente desde o início.",
        "authmanager-authn-no-primary": "As credenciais fornecidas não puderam ser autenticadas.",
        "authmanager-authn-no-local-user": "As credenciais fornecidas não estão associadas a nenhum usuário neste wiki.",
index fab3ddc..7807d55 100644 (file)
        "site-rss-feed": "Used in the HTML header of a wiki's RSS feed.\nHTML markup cannot be used.\n\nParameters:\n* $1 - <nowiki>{{SITENAME}}</nowiki>\n{{Identical|S1 RSS/Atom feed}}",
        "site-atom-feed": "Used in the HTML header of a wiki's Atom feed.\nHTML markup cannot be used.\n\nParameters:\n* $1 - <nowiki>{{SITENAME}}</nowiki>\n{{Identical|S1 RSS/Atom feed}}",
        "page-rss-feed": "Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Page-atom-feed}}\n{{Identical|S1 RSS/Atom feed}}",
-       "page-atom-feed": "Parameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Page-rss-feed}}\n{{Identical|S1 RSS/Atom feed}}",
+       "page-atom-feed": "Used as the \"title\" attribute in the <link rel=\"alternate\" type=\"application/atom+xml\"> element of the HTML source of the page. Not rendered in the web page.\n\nParameters:\n* $1 - page title\nSee also:\n* {{msg-mw|Page-rss-feed}}\n{{Identical|S1 RSS/Atom feed}}",
        "feed-atom": "{{optional}}\nSee also:\n* {{msg-mw|Feed-atom}}\n* {{msg-mw|Accesskey-feed-atom}}\n* {{msg-mw|Tooltip-feed-atom}}",
        "feed-rss": "{{optional}}\nSee also:\n* {{msg-mw|Feed-rss}}\n* {{msg-mw|Accesskey-feed-rss}}\n* {{msg-mw|Tooltip-feed-rss}}",
        "sitenotice": "{{Notranslate}}\n\nMediaWiki:Sitenotice is displayed above the page title for all users if it is defined, unless it is superseded by another notice. 'Defined' means it exists and has content other than the single character '-'.\n\nManual: [[mw:Manual:Interface/Sitenotice]]",
        "ip_range_toolarge": "Used as error message in [[Special:Block]]. Parameters:\n* $1 - a number from 0 to 32 for IPv4 (from 0 to 128 for IPv6); a part of CIDR (Classless Inter-Domain Routing) notation.\nSee also:\n* {{msg-mw|Range block disabled}}\n* {{msg-mw|Ip range invalid}}\n* {{msg-mw|Ip range toolarge}}",
        "ip_range_exceeded": "Used as error message in HTMLUserTextField when an IP range exceeds its maximum amount. See {{msg-mw|ip_range_toolarge}} for parameter.\n/$1 is the width as a number of bits.",
        "ip_range_toolow": "Used as error message in HTMLUserTextField, if effectively no IP ranges are interpreted as valid (IPv4 CIDR range /32 or IPv6 /128).",
-       "proxyblocker": "Used in [[Special:BlockMe]].\n\nSee also:\n* {{msg-mw|proxyblocker-disabled}}\n* {{msg-mw|proxyblockreason}}\n* {{msg-mw|proxyblocksuccess}}",
-       "proxyblockreason": "Used as explanation of the reason in [[Special:BlockMe]].\n\nSee also:\n* {{msg-mw|proxyblocker-disabled}}\n* {{msg-mw|proxyblocker}}\n* {{msg-mw|proxyblocksuccess}}",
+       "proxyblocker": "Username for blocking IP addresses listed in [[mw:Manual:$wgProxyList|$wgProxyList]].\n\nSee also:\n* {{msg-mw|proxyblockreason}}",
+       "proxyblockreason": "Reason for blocking IP addresses listed in [[mw:Manual:$wgProxyList|$wgProxyList]].\n\nSee also:\n* {{msg-mw|proxyblocker}}",
        "sorbs": "{{optional}}",
        "sorbsreason": "See also:\n* {{msg-mw|Sorbsreason}}\n* {{msg-mw|Sorbs create account_reason}}",
        "sorbs_create_account_reason": "Used in [[Special:UserLogin]] when creating an account.\n\nSee also:\n* {{msg-mw|Sorbsreason}}\n* {{msg-mw|Sorbs create account_reason}}",
        "authmanager-create-no-primary": "Error message when no AuthenticationProvider handles the AuthenticationRequests for account creation. This might mean the user needs to fill out all the form fields.",
        "authmanager-link-no-primary": "Error message when no AuthenticationProvider handles the AuthenticationRequests for account linking. This might mean the user needs to fill out all the form fields.",
        "authmanager-link-not-in-progress": "Error message when AuthManager session data is lost during account linking, or the user hits the \"continue\" endpoint without an active account link attempt.",
-       "authmanager-authplugin-setpass-failed-title": "Title of error page from AuthManager if AuthPlugin returns false from its setPassword() method.",
-       "authmanager-authplugin-setpass-failed-message": "Text of error page from AuthManager if AuthPlugin returns false from its setPassword() method.",
-       "authmanager-authplugin-create-fail": "Error message from AuthManager if the AuthPlugin returns false from its addUser() method.",
-       "authmanager-authplugin-setpass-denied": "Error message from AuthManager if the AuthPlugin returns false from its allowPasswordChange() method.",
-       "authmanager-authplugin-setpass-bad-domain": "Error message from AuthManager if the AuthPlugin rejects the passed domain.",
        "authmanager-autocreate-noperm": "Error message when auto-creation fails due to lack of permission.",
        "authmanager-autocreate-exception": "Error message when auto-creation fails because we tried recently and an exception was thrown, so we're not going to try again yet.",
        "authmanager-userdoesnotexist": "Error message when a user account does not exist. Parameters:\n* $1 - User name.",
index 24ef596..174e40d 100644 (file)
        "logentry-rights-autopromote": "$1 ha state {{GENDER:$2|promosse}} automaticamende da $4 a $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|carecate}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|carecate}} 'na versiona nove de $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|carecate}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|turnate}} $3 a 'na versiona vecchie",
        "log-name-managetags": "Archivije d'a gestione de le tag",
        "log-description-managetags": "Sta pàgene elenghe le combite de gestione collegate a le [[Special:Tags|tags]]. L'archivije téne sulamende aziune fatte a màne da 'n'amministratore; le tag ponne essere ccrejate o scangellate da software de uicchi senze ca 'na vôsce avène scritte jndr'à l'archivije.",
        "logentry-managetags-create": "$1 {{GENDER:$2|ccrejate}} 'u tag \"$4\"",
        "log-action-filter-suppress-reblock": "Soppressione de l'utende da ri-blocche",
        "log-action-filter-upload-upload": "Carecamende nuève",
        "log-action-filter-upload-overwrite": "Recareche",
+       "log-action-filter-upload-revert": "Turnate",
        "authmanager-authplugin-setpass-failed-title": "Cangiamende d'a passuord fallite",
        "authmanager-authplugin-setpass-bad-domain": "Dominie invalide.",
        "authmanager-email-label": "Email",
index e54a4fa..6487bed 100644 (file)
        "rev-suppressed-unhide-diff": "Jedna od izmjena ove razlike je '''sakrivena'''.\nDetalji se nalaze u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} registru sakrivanja].\nIpak možete [$1 vidjeti ovu razliku] ako želite nastaviti.",
        "rev-deleted-diff-view": "Izmjena ove stranice je '''obrisana'''.\nMožete je pogledati; više detalja možete naći u [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} registru brisanja].",
        "rev-suppressed-diff-view": "Izmena ove stranice je '''sakrivena'''.\nMožete je pogledati; više detalja možete naći u [{{fullurl:{{#Special:Log}}/suppress|page={{FULLPAGENAMEE}}}} registru sakrivanja].",
-       "rev-delundel": "pokaži/sakrij",
+       "rev-delundel": "promijeni vidljivost",
        "rev-showdeleted": "Pokaži",
        "revisiondelete": "Obriši/vrati revizije",
-       "revdelete-nooldid-title": "Nije unesena tačna revizija",
+       "revdelete-nooldid-title": "Nevažeća odredišna izmjena",
        "revdelete-nooldid-text": "Niste odredili odredišnu verziju da se izvrši ova funkcija, ili ta verzija ne postoji, ili pokušavate sakriti trenutnu verziju.",
        "revdelete-no-file": "Navedena datoteka ne postoji.",
        "revdelete-show-file-confirm": "Da li ste sigurni da želite pogledati obrisanu reviziju datoteke \"<nowiki>$1</nowiki>\" od $2 u $3?",
        "difference-multipage": "(Razlika između stranica)",
        "lineno": "Linija $1:",
        "compareselectedversions": "Uporedi označene verzije",
-       "showhideselectedversions": "Pokaži/sakrij odabrane verzije",
+       "showhideselectedversions": "Promijeni vidljivost izabranih izmjena",
        "editundo": "ukloni ovu izmjenu - уклони ову измену",
        "diff-empty": "(nema razlike)",
        "diff-multi-sameuser": "({{PLURAL:$1|Nije prikazana jedna međuverzija|Nisu prikazane $1 međuverzije|Nije prikazano $1 međuverzija}} istog korisnika)",
        "prefs-watchlist-edits": "Najviše prikazanih izmjena na spisku praćenja:",
        "prefs-watchlist-edits-max": "Maksimalni broj: 1000",
        "prefs-watchlist-token": "Token spiska za praćenje:",
+       "prefs-watchlist-managetokens": "Upravljanje tokenima",
        "prefs-misc": "Razno / Разно",
        "prefs-resetpass": "Promijeni lozinku",
        "prefs-changeemail": "Promijeni ili ukloni adresu e-pošte",
        "stub-threshold-disabled": "Isključen/a",
        "recentchangesdays": "Broj dana za prikaz u nedavnim izmjenama:",
        "recentchangesdays-max": "(najviše $1 {{PLURAL:$1|dan|dana}})",
-       "recentchangescount": "Broj uređivanja za prikaz po pretpostavkama:",
-       "prefs-help-recentchangescount": "Ovo uključuje nedavne izmjene, historije stranice i registre.",
+       "recentchangescount": "Podrazumevani broj izmjena za prikaz u skorašnjim izmjenama, istorijama stranica i dnevnicima:",
+       "prefs-help-recentchangescount": "Najveći broj: 1000",
        "prefs-help-watchlist-token2": "Ovo je tajni ključ prema sažetku Vašeg popisa praćenja. Svaki suradnik kojem je poznat, moći će čitati Vaš popis praćenih stranica. Ne dijelite ga ni s kim. [[Special:ResetTokens|Kliknite ovdje ako ga želite ponovo postaviti]].",
        "savedprefs": "Vaša postavke su snimljene.",
-       "savedrights": "Korisnička prava {{GENDER:$1|korisnika|korisnice}} su snimljena.",
+       "savedrights": "Korisnička prava {{GENDER:$1|$1}} su snimljena.",
        "timezonelegend": "Vremenska zona / Временска зона",
        "localtime": "Lokalno vrijeme:",
        "timezoneuseserverdefault": "Koristi postavke wikija ($1)",
-       "timezoneuseoffset": "Ostalo (odredi odstupanje)",
+       "timezoneuseoffset": "Ostalo (odredi odstupanje ispod)",
+       "timezone-useoffset-placeholder": "Primjerne vrednosti: „-07:00” ili „01:00”",
        "servertime": "Vrijeme na serveru:",
        "guesstimezone": "Popuni iz preglednika",
        "timezoneregion-africa": "Afrika",
        "timezoneregion-indian": "Indijski okean",
        "timezoneregion-pacific": "Tihi okean",
        "allowemail": "Dozvoli e-mail od ostalih korisnika",
+       "email-allow-new-users-label": "Dozvoli e-mail od potpuno novih korisnika",
+       "email-blacklist-label": "Zabrani e-mail od sljedećih korisnika:",
        "prefs-searchoptions": "Pretraga",
        "prefs-namespaces": "Imenski prostori",
        "default": "standardno",
        "prefs-files": "Datoteke",
        "prefs-custom-css": "Prilagođeni CSS",
+       "prefs-custom-json": "Prilagođeni JSON",
        "prefs-custom-js": "Prilagođeni JS",
-       "prefs-common-config": "Zajednički CSS/JS za sve izglede (skinove):",
-       "prefs-reset-intro": "Možete koristiti ovu stranicu da poništite Vaše postavke na ovom sajtu na pretpostavljene vrijednosti.\nOvo se ne može vratiti unazad.",
+       "prefs-common-config": "Zajednički CSS/JSON/JavaScript za sve izglede (skinove):",
+       "prefs-reset-intro": "Možete koristiti ovu stranicu da poništite Vaše postavke na ovom wikiju na pretpostavljene vrijednosti.\nOvo se ne može vratiti unazad.",
        "prefs-emailconfirm-label": "E-mail potvrda:",
        "youremail": "Vaša e-pošta / Ваша е-пошта*",
        "username": "Ime {{GENDER:$1|korisnika|korisnice}}:",
        "prefs-memberingroups": "{{GENDER:$2|Korisnik|Korisnica}} je član {{PLURAL:$1|grupe|grupâ}}:",
+       "group-membership-link-with-expiry": "$1 (do $2)",
        "prefs-registration": "Vrijeme registracije:",
        "yourrealname": "Vaše ime / Ваше име*",
        "yourlanguage": "Jezik interfejsa / Језик интерфејса",
        "prefs-help-email-others": "Također možete da odaberete da vas drugi kontaktiraju putem vaše korisničke stranice ili stranice za razgovor bez otkrivanja vašeg identiteta.",
        "prefs-help-email-required": "Neophodno je navesti e-mail adresu.",
        "prefs-info": "Osnovne informacije",
-       "prefs-i18n": "Internacionalizacije",
+       "prefs-i18n": "Internacionalizacija",
        "prefs-signature": "Potpis",
        "prefs-dateformat": "Format datuma",
        "prefs-timeoffset": "Vremenska razlika",
        "prefs-advancedediting": "Opće opcije",
+       "prefs-developertools": "Razvojni alati",
        "prefs-editor": "Uređivač",
        "prefs-preview": "Pregled",
        "prefs-advancedrc": "Napredne opcije",
        "prefs-advancedwatchlist": "Napredne opcije",
        "prefs-displayrc": "Postavke displeja",
        "prefs-displaywatchlist": "Postavke prikaza",
+       "prefs-changesrc": "Prikazivanje izmjena",
+       "prefs-changeswatchlist": "Prikazivanje izmjena",
+       "prefs-pageswatchlist": "Praćene stranice",
        "prefs-tokenwatchlist": "Žeton",
        "prefs-diffs": "Razlike",
        "prefs-help-prefershttps": "Ova mogućnost će stupiti na snagu kod vaše sljedeće prijave.",
        "prefswarning-warning": "Napravili ste promjene u vašim postavkama koje još uvijek nisu sačuvane. Ako napustite ovu stranicu bez da pritisnete na \"$1\", postavke neće biti ažurirane.",
        "prefs-tabs-navigation-hint": "Savjet: Možete koristi lijevu i desnu navigacijsku tipku kako biste se kretali između tabova u popisu tabova.",
-       "userrights": "Postavke korisničkih prava",
-       "userrights-lookup-user": "Menadžment korisničkih prava",
+       "userrights": "Korisnička prava",
+       "userrights-lookup-user": "Izaberite korisnika",
        "userrights-user-editname": "Unesi korisničko ime:",
        "editusergroup": "Učitaj korisničke grupe",
        "editinguser": "Mijenjate korisnička prava {{GENDER:$1|korisnika|korisnice}} <strong>[[User:$1|$1]]</strong> $2",
-       "userrights-editusergroup": "Uredi korisničke grupe",
-       "saveusergroups": "Snimi korisničke grupe",
+       "viewinguserrights": "Pogled korisničkih prava {{GENDER:$1|korisnika|korisnice}} <strong>[[User:$1|$1]]</strong> $2",
+       "userrights-editusergroup": "Uredi {{GENDER:$1|korisničke}} grupe",
+       "userrights-viewusergroup": "Pregled {{GENDER:$1|korisničkih}} grupa",
+       "saveusergroups": "Snimi {{GENDER:$1|korisničke}} grupe",
        "userrights-groupsmember": "Član:",
-       "userrights-groupsmember-auto": "Uključeni član od:",
-       "userrights-groups-help": "Možete promijeniti grupe kojima ovaj korisnik pripada:\n* Označeni kvadratić znači da je korisnik u toj grupi.\n* Neoznačen kvadratić znači da korisnik nije u toj grupi.\n* Oznaka * (zvjezdica) označava da Vi ne možete izbrisati ovu grupu ako je dodate i obrnutno.",
+       "userrights-groupsmember-auto": "Implicitan član od:",
+       "userrights-groups-help": "Možete promijeniti grupe kojima ovaj korisnik pripada:\n* Označeni kvadratić znači da je korisnik u toj grupi.\n* Neoznačen kvadratić znači da korisnik nije u toj grupi.\n* Zvjezdica (*) označava da ne možete izbrisati ovu grupu ako je dodate i obrnutno.\n* Taraba (#) označava da jedino možete odložiti vrijeme isteka članstva u ovoj grupi, ali ne možete ga ubrzati.",
        "userrights-reason": "Razlog:",
        "userrights-no-interwiki": "Nemate dopuštenja da uređujete korisnička prava na drugim wikijima.",
        "userrights-nodatabase": "Baza podataka $1 ne postoji ili nije lokalna baza.",
        "userrights-changeable-col": "Grupe koje možete mijenjati",
        "userrights-unchangeable-col": "Grupe koje ne možete mijenjati",
+       "userrights-expiry-current": "Ističe $1",
+       "userrights-expiry-none": "Ne ističe",
+       "userrights-expiry": "Ističe:",
+       "userrights-expiry-existing": "Postojeće vrijeme isticanja: $3, $2",
+       "userrights-expiry-othertime": "Drugo vrijeme:",
+       "userrights-invalid-expiry": "Vrijeme isticanja grupe \"$1\" nije ispravno.",
+       "userrights-expiry-in-past": "Vrijeme isticanja grupe \"$1\" je u prošlosti.",
+       "userrights-cannot-shorten-expiry": "Ne možete ubrzati istek članstva u grupi \"$1\". To mogu učiniti samo korisnici s dozvolom za dodavanje ili uklanjanje ove grupe.",
        "userrights-conflict": "Sukob u izmjeni korisničkih prava! Molimo da razmotrite i potvrdite Vaše promjene.",
        "group": "Grupa:",
        "group-user": "Korisnici",
        "group-autoconfirmed": "Potvrđeni korisnici",
        "group-bot": "Botovi",
        "group-sysop": "Administratori",
+       "group-interface-admin": "Administratori interfejsa",
        "group-bureaucrat": "Birokrati",
        "group-suppress": "Skrivači",
        "group-all": "(svi)",
        "group-autoconfirmed-member": "{{GENDER:$1|automatski potvrđen korisnik|automatski potvrđena korisnica|automatski potvrđen korisnik}}",
        "group-bot-member": "{{GENDER:$1|bot}}",
        "group-sysop-member": "{{GENDER:$1|administrator|administratorka|administrator}}",
+       "group-interface-admin-member": "{{GENDER:$1|administrator interfejsa|administratorica interfejsa}}",
        "group-bureaucrat-member": "{{GENDER:$1|birokrat|birokratica|birokrat}}",
        "group-suppress-member": "{{GENDER:$1|skrivač|skrivačica}}",
        "grouppage-user": "{{ns:project}}:Korisnici",
        "grouppage-autoconfirmed": "{{ns:project}}:Potvrđeni korisnici",
        "grouppage-bot": "{{ns:project}}:Botovi",
        "grouppage-sysop": "{{ns:project}}:Administratori",
+       "grouppage-interface-admin": "{{ns:project}}:Administratori interfejsa",
        "grouppage-bureaucrat": "{{ns:project}}:Birokrati",
        "grouppage-suppress": "{{ns:project}}:Skrivač",
        "right-read": "Čitanje stranica",
        "right-createpage": "Pravljenje stranica (ne uključujući stranice za razgovor)",
        "right-createtalk": "Pravljenje stranica za razgovor",
        "right-createaccount": "Pravljenje korisničkog računa",
+       "right-autocreateaccount": "Automatska prijava s vanjskim korisničkim računom",
        "right-minoredit": "Označavanje izmjena kao malih",
        "right-move": "Premještanje stranica",
        "right-move-subpages": "Premještanje stranica sa svim podstranicama",
-       "right-move-rootuserpages": "Premještanje stranica osnovnih korisnika",
+       "right-move-rootuserpages": "Premještanje osnovnih korisničkih stranica",
        "right-move-categorypages": "Premještanje stranica kategorija",
        "right-movefile": "Premještanje datoteka",
-       "right-suppressredirect": "Ne pravi preusmjeravanje sa starog imena pri preusmjeravanju stranica",
+       "right-suppressredirect": "Ne pravi preusmjeravanje sa starog imena pri premještanju stranica",
        "right-upload": "Postavljanje datoteka",
        "right-reupload": "Postavljanje nove verzije datoteke",
        "right-reupload-own": "Postavljanje nove verzije datoteke koju je postavio korisnik",
        "right-editmyusercss": "Uredite svoje vlastite CSS datoteke",
        "right-editmyuserjs": "Uredite vlastite korisničke JavaScript datoteke",
        "right-viewmywatchlist": "Pregled vlastitog popisa praćenih stranica",
-       "right-editmywatchlist": "Uredite vlastiti spisak praćenja. Obratite pažnju da će neke akcije dodati stranice čak bez ovog prava.",
-       "right-viewmyprivateinfo": "Vidite svoje privatne podatke (npr. adresu e-pošte, stvarno ime)",
-       "right-editmyprivateinfo": "Uredite svoje privatne podatke (npr. adresa e-pošte, stvarno ime)",
-       "right-editmyoptions": "Uredite svoje postavke",
-       "right-rollback": "Brzo vraćanje izmjena na zadnjeg korisnika koji je uređivao određenu stranicu",
+       "right-editmywatchlist": "Uređivanje vlastitih praćenih. Obratite pažnju da će neke akcije dodati stranice čak bez ovog prava.",
+       "right-viewmyprivateinfo": "Pregledanje vlastitih ličnih podataka (npr. adresa e-pošte, stvarno ime)",
+       "right-editmyprivateinfo": "Uređivanje vlastitih ličnih podataka (npr. adresa e-pošte, stvarno ime)",
+       "right-editmyoptions": "Uređivanje vlastitih postavki",
+       "right-rollback": "Brzo vraćanje izmjena posljednjeg korisnika koji je uređivao određenu stranicu",
        "right-markbotedits": "Označavanje vraćenih izmjena kao izmjene bota",
        "right-noratelimit": "Izbjegavanje ograničenja uzrokovanih brzinom",
        "right-import": "Uvoz stranica iz drugih wikija",
        "right-override-export-depth": "Izvoz stranica uključujući povezane stranice do dubine od 5 linkova",
        "right-sendemail": "Slanje e-maila drugim korisnicima",
        "right-managechangetags": "Pravljenje i (de)aktiviranje [[Special:Tags|oznaka]]",
-       "right-applychangetags": "Primijeni [[Special:Tags|oznake]] na nečije izmjene",
+       "right-applychangetags": "Primjenjivanje [[Special:Tags|oznaka]] na nečije izmjene",
        "right-changetags": "Dodavanje ili uklanjanje raznih [[Special:Tags|oznaka]] na pojedinačnim verzijama i unosima zapisnika",
+       "right-deletechangetags": "Brisanje [[Special:Tags|oznaka]] iz baze podataka",
+       "grant-generic": "Zbir prava \"$1\"",
+       "grant-group-page-interaction": "Interakcija sa stranicama",
+       "grant-group-file-interaction": "Interakcija sa slikama i snimkama",
+       "grant-group-watchlist-interaction": "Interakcija s praćenima",
+       "grant-group-email": "Slanje e-pošte",
+       "grant-group-high-volume": "Izvršavanje velikog broja radnji",
+       "grant-group-customization": "Prilagodbe i postavke",
+       "grant-group-administration": "Izvršavanje administrativnih radnji",
+       "grant-group-private-information": "Pristupanje vašim ličnim podacima",
+       "grant-group-other": "Razne aktivnosti",
+       "grant-blockusers": "Blokiranje i deblokiranje korisnika",
+       "grant-createaccount": "Stvaranje računa",
+       "grant-createeditmovepage": "Pravljenje, uređivanje i premještanje stranica",
+       "grant-delete": "Brisanje stranica, izmjena i unosa u zapisnicima",
        "grant-editinterface": "Uređivanje imenskog prostora \"MediaWiki\" i JSON za cijelo wiki/za korisnika",
        "grant-editmycssjs": "Uređivanje Vašeg korisničkog CSS/JSON/JavaScripta",
+       "grant-editmyoptions": "Uređivanje vaših korisničkih podešavanja i postavljenosti JSON-a",
+       "grant-editmywatchlist": "Uređivanje Vaših praćenih",
        "grant-editsiteconfig": "Uređivanje CSS/JS za cijelo wiki i za korisnika",
+       "grant-editpage": "Uređivanje postojećih stranica",
+       "grant-editprotected": "Uređivanje zaštićenih stranica",
+       "grant-highvolume": "Veliki broj izmjena",
+       "grant-oversight": "Skrivanje korisnika i izmjena",
+       "grant-patrol": "Patroliranje izmjena stranica",
+       "grant-privateinfo": "Pristupanje ličnim podacima",
+       "grant-protect": "Dodavanje i uklanjanje zaštita sa stranica",
+       "grant-rollback": "Vraćanje izmjena na stranicama",
+       "grant-sendemail": "Slanje e-maila drugim korisnicima",
+       "grant-uploadeditmovefile": "Postavljanje, zamjena i premještanje datoteka",
+       "grant-uploadfile": "Postavljanje novih datoteka",
+       "grant-basic": "Osnovna prava",
+       "grant-viewdeleted": "Pregled obrisanih datoteka i stranica",
+       "grant-viewmywatchlist": "Pregled vaših praćenja",
+       "grant-viewrestrictedlogs": "Pregledanje ograničenih unosa u zapisniku",
        "newuserlogpage": "Registar novih korisnika",
        "newuserlogpagetext": "Ovo je evidencija registracije novih korisnika.",
        "rightslog": "Evidencija korisničkih prava",
        "rightslogtext": "Ovo je evidencija izmjene korisničkih prava.",
        "action-read": "čitanje ove stranice",
        "action-edit": "uređujete ovu stranicu",
-       "action-createpage": "stvaranje stranica",
-       "action-createtalk": "stvaranje stranica za razgovor",
+       "action-createpage": "stvaranje ove stranice",
+       "action-createtalk": "stvaranje ove stranice za razgovor",
        "action-createaccount": "stvaranje ovog korisničkog računa",
+       "action-autocreateaccount": "automatski napravite ovaj vanjski korisnički račun",
        "action-history": "gledate historiju ove stranice",
        "action-minoredit": "označavanje ove izmjene kao manje",
        "action-move": "premještanje ove stranice",
        "action-move-subpages": "premještanje ove stranice, i njenih podstranica",
        "action-move-rootuserpages": "premještanje osnovne stranice korisnika",
-       "action-move-categorypages": "pomakni stranice kategorije",
+       "action-move-categorypages": "premještanje kategorije",
        "action-movefile": "premjesti ovu datoteku",
        "action-upload": "postavljate ovu datoteku",
        "action-reupload": "postavljanje nove verzije datoteke",
        "action-upload_by_url": "postavljanje ove datoteke preko URL adrese",
        "action-writeapi": "korištenje ''write API'' opcije",
        "action-delete": "brisanje ove stranice",
-       "action-deleterevision": "brisanje ove izmjene",
+       "action-deleterevision": "brisanje izmjena",
+       "action-deletelogentry": "brisanje dnevničkih unosa",
        "action-deletedhistory": "gledanje obrisane historije ove stranice",
+       "action-deletedtext": "pregled teksta obrisanih izmjena",
        "action-browsearchive": "pretraživanje obrisanih stranica",
-       "action-undelete": "vraćanje ove stranice",
-       "action-suppressrevision": "pregledavanje i vraćanje ove skrivene izmjene",
+       "action-undelete": "vraćanje stranica",
+       "action-suppressrevision": "pregledavanje i vraćanje sakrivenih izmjena",
        "action-suppressionlog": "gledanje ove privatne evidencije",
        "action-block": "blokiranje uređivanja ovog korisnika",
        "action-protect": "promijeniti nivo zaštite ove stranice",
        "action-userrights-interwiki": "uređivanje korisničkih prava na drugim wikijima",
        "action-siteadmin": "zaključavanje i otključavanje baze podataka",
        "action-sendemail": "pošalji e-poštu",
-       "action-editmywatchlist": "uredite svoj spisak praćenja",
-       "action-viewmywatchlist": "pogledajte svoj spisak praćenja",
-       "action-viewmyprivateinfo": "pogledajte svoje privatne informacije",
-       "action-editmyprivateinfo": "uredite svoje privatne informacije",
-       "action-editcontentmodel": "uredi model sadržaja stranice",
-       "action-managechangetags": "napravite i uklonite oznake iz baze podataka",
+       "action-editmyoptions": "uređivanje vlastitih podešavanja",
+       "action-editmywatchlist": "uređivanje mojih praćenih",
+       "action-viewmywatchlist": "pregled vašeg spiska praćenja",
+       "action-viewmyprivateinfo": "pregled vaših ličnih podataka",
+       "action-editmyprivateinfo": "uređivanje vaših ličnih podataka",
+       "action-editcontentmodel": "uređivanje modela sadržaja stranice",
+       "action-managechangetags": "pravljenje ili (de)aktiviranje oznaka",
        "action-applychangetags": "dodajte oznake uz vaše izmjene",
        "action-changetags": "dodajte ili uklonite razne oznake na pojedinačnim verzijama i unosima u zapisnicima",
+       "action-deletechangetags": "brišete oznake iz baze podataka",
+       "action-purge": "preučitavanje ove stranice",
        "nchanges": "$1 {{PLURAL:$1|izmjena|izmjene|izmjena}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|izmjena od Vaše posljedne posjete}}",
        "enhancedrc-history": "historija",
        "recentchanges-legend": "Postavke za Nedavne promjene",
        "recentchanges-summary": "Na ovoj stranici možete pratiti nedavne izmjene.",
        "recentchanges-noresult": "Bez promjena tokom cijelog perioda koji ispunjava ove kriterije.",
+       "recentchanges-timeout": "Ovo pretraživanje je isteklo. Probajte s drugačijm parametrima.",
+       "recentchanges-network": "Zbog tehničke greške nisam mogao učitati ishod. Ponovo učitajte stranicu.",
+       "recentchanges-notargetpage": "Iznad unesite stranicu da biste vidjeli promjene povezane s njom.",
        "recentchanges-feed-description": "Praćenje nedavnih izmjena na ovom wikiju u ovom feedu.",
        "recentchanges-label-newpage": "Ovom izmjenom je stvorena nova stranica",
        "recentchanges-label-minor": "Ovo je manja izmjena",
        "recentchanges-label-bot": "Ovu je izmjenu učinio bot",
-       "recentchanges-label-unpatrolled": "Ova izmjena još nije patrolirana",
-       "recentchanges-label-plusminus": "Veličina stranice promijenila se za ovoliko bajtova",
+       "recentchanges-label-unpatrolled": "Ova izmjena još nije ispatrolirana",
+       "recentchanges-label-plusminus": "Promjena veličine stranice u bajtovima",
        "recentchanges-legend-heading": "<strong>Legenda:</strong>",
        "recentchanges-legend-newpage": "{{int:recentchanges-label-newpage}} (također pogledajte [[Special:NewPages|spisak novih stranica]])",
+       "recentchanges-submit": "Prikaži",
+       "rcfilters-tag-remove": "Ukloni '$1'",
+       "rcfilters-legend-heading": "<strong>Spisak skraćenica:</strong>",
+       "rcfilters-other-review-tools": "Drugi alati za pregled",
+       "rcfilters-group-results-by-page": "Grupni ishod po stranicama",
+       "rcfilters-activefilters": "Aktivni filteri",
+       "rcfilters-activefilters-hide": "Sakrij",
+       "rcfilters-activefilters-show": "Prikaži",
+       "rcfilters-activefilters-hide-tooltip": "Sakrij područje aktivnih filtara",
+       "rcfilters-activefilters-show-tooltip": "Prikaži područje aktivnih filtara",
+       "rcfilters-advancedfilters": "Napredni filteri",
+       "rcfilters-limit-title": "Stavki za prikaz",
+       "rcfilters-limit-and-date-label": "$1 {{PLURAL:$1|izmjena|izmjene|izmjena}}, $2",
+       "rcfilters-date-popup-title": "Vremenski period za pretragu",
+       "rcfilters-days-title": "Nedavni dani",
+       "rcfilters-hours-title": "Nedavni sati",
+       "rcfilters-days-show-days": "{{PLURAL:$1|jedan dan|$1 dana}}",
+       "rcfilters-days-show-hours": "{{PLURAL:$1|jedan sat|$1 sata|$1 sati}}",
+       "rcfilters-highlighted-filters-list": "Istaknuto: $1",
+       "rcfilters-quickfilters": "Sačuvani filteri",
+       "rcfilters-quickfilters-placeholder-title": "Još nema sačuvanih filtera",
+       "rcfilters-quickfilters-placeholder-description": "Da biste sačuvali filterske psotavke kako biste ih koristili ponovo, kliknite ikonu notepad u području \"Aktivni filteri\" ispod.",
+       "rcfilters-savedqueries-defaultlabel": "Sačuvani filteri",
+       "rcfilters-savedqueries-rename": "Preimenuj",
+       "rcfilters-savedqueries-setdefault": "Postavi kao podrazumevano",
+       "rcfilters-savedqueries-unsetdefault": "Ukloni od podrazumevano",
+       "rcfilters-savedqueries-remove": "Izbriši",
+       "rcfilters-savedqueries-new-name-label": "Naziv",
+       "rcfilters-savedqueries-new-name-placeholder": "Opišite svrhu filtera",
+       "rcfilters-savedqueries-apply-label": "Napravi filter",
+       "rcfilters-savedqueries-apply-and-setdefault-label": "Napravi podrazumevani filter",
+       "rcfilters-savedqueries-cancel-label": "Otkaži",
+       "rcfilters-savedqueries-add-new-title": "Sačuvaj trenutne filterske postavke",
+       "rcfilters-savedqueries-already-saved": "Ovi filteri su već sačuvani. Promenite postavke da biste napravili novi sačuvan filter.",
+       "rcfilters-restore-default-filters": "Vrati podrazumevane filtere",
+       "rcfilters-clear-all-filters": "Očisti sve filtre",
+       "rcfilters-show-new-changes": "Pogl. najnovije izmjene",
+       "rcfilters-search-placeholder": "Filtriranje promene (koristite meni ili potražite za naziv filtera)",
+       "rcfilters-invalid-filter": "Nevažeći filter",
+       "rcfilters-empty-filter": "Nema aktivnih filtera. Prikazani su svi doprinosi.",
+       "rcfilters-filterlist-title": "Filteri",
+       "rcfilters-filterlist-whatsthis": "Kako ovo radi?",
+       "rcfilters-filterlist-feedbacklink": "Recite nam Vaše mišljenje o ovim filterskim alatkama",
+       "rcfilters-highlightbutton-title": "Istaćavanje ishoda",
+       "rcfilters-highlightmenu-title": "Izaberite boju",
+       "rcfilters-highlightmenu-help": "Izaberite boju da biste istaknuli ovo svojstvo",
+       "rcfilters-filterlist-noresults": "Nije pronađen nijedan filtar",
+       "rcfilters-noresults-conflict": "Nisam ništa našao jer su kriteriji pretrage sukobljeni.",
+       "rcfilters-state-message-subset": "Filter ne radi jer je njegov ishod već sadržan u {{PLURAL:$2|slijedećim sveobuhvatnijim filteru|slijedećim sveobuhvatnijim filterima}} (istaknite ga da biste ih raspoznali): $1",
+       "rcfilters-state-message-fullcoverage": "Odabir svih filtera u grupi isti je kao da niste odabrali nijedan, tako da ovaj filtar ne radi. Grupa uključuje: $1",
+       "rcfilters-filtergroup-authorship": "Autorstvo doprinosa",
+       "rcfilters-filter-editsbyself-label": "Vaše promjene",
+       "rcfilters-filter-editsbyself-description": "Vaši vlastiti doprinosi.",
+       "rcfilters-filter-editsbyother-label": "Tuđe promjene",
+       "rcfilters-filter-editsbyother-description": "Sve promjene osim Vaših.",
+       "rcfilters-filtergroup-userExpLevel": "Korisnička registracija i iskustvo",
+       "rcfilters-filter-user-experience-level-registered-label": "Registrirani",
+       "rcfilters-filter-user-experience-level-registered-description": "Prijavljeni urednici.",
+       "rcfilters-filter-user-experience-level-unregistered-label": "Neregistrirani",
+       "rcfilters-filter-user-experience-level-unregistered-description": "Urednici koji nisu prijavljeni.",
+       "rcfilters-filter-user-experience-level-newcomer-label": "Novajlije",
+       "rcfilters-filter-user-experience-level-newcomer-description": "Registrovani urednici koji imaju manje od 10 izmjena ili 4 dana aktivnosti.",
        "rcnotefrom": "Ispod {{PLURAL:$5|je izmjena|su izmjene}} od <strong>$3, $4</strong> (do <strong>$1</strong> prikazano).",
        "rclistfrom": "Prikaži nove poruke od / Прикажи нове поруке од $3 $2",
        "rcshowhideminor": "$1 male izmjene / мале измене",
index 8e808d4..dd9c211 100644 (file)
        "logentry-rights-autopromote": "$1 {{GENDER:$2|befordrades}} automatiskt från $4 till $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|laddade upp}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|laddade upp}} en ny version av $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|laddade upp}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|återställde}} $3 till en gammal version",
        "log-name-managetags": "Märkeshanteringslogg",
        "log-description-managetags": "Denna sida innehåller administrativa [[Special:Tags|märke]]srelaterade uppgifter. Loggen innehåller bara åtgärder som utförts manuellt av en administratör; märken kan skapas eller raderas av wikins mjukvara utan att en post registreras i loggen.",
        "logentry-managetags-create": "$1 {{GENDER:$2|skapade}} märket \"$4\"",
        "log-action-filter-suppress-reblock": "Användarcensur efter återblockering",
        "log-action-filter-upload-upload": "Ny uppladdning",
        "log-action-filter-upload-overwrite": "Återuppladdning",
+       "log-action-filter-upload-revert": "Återställ",
        "authmanager-authn-not-in-progress": "Autentiseringen pågår inte eller så har sessionsdata förlorats. Var god börja om från början igen.",
        "authmanager-authn-no-primary": "De angivna inloggningsuppgifterna kunde inte autentiseras.",
        "authmanager-authn-no-local-user": "De angivna inloggningsuppgifterna är inte associerade med någon användare på denna wiki.",
        "passwordpolicies-policy-maximalpasswordlength": "Lösenordet måste vara högst $1 {{PLURAL:$1|tecken}} långt",
        "passwordpolicies-policy-passwordcannotbepopular": "Lösenordet kan inte vara {{PLURAL:$1|det populäraste lösenordet|i listan över de $1 populäraste lösenorden}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Lösenordet kan inte vara med i listan över de 100 000 vanligaste lösenorden.",
+       "passwordpolicies-policyflag-forcechange": "måste ändras 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."
 }
index 7b16f66..3c2d8cc 100644 (file)
        "emptyfile": "ಈರ್ ಮಿತೇರಾಯಿನ ಕಡತ ಖಾಲಿ ಇಂದ್ ತೋಜುಂಡು.\nಉಂದು ಕಡತಪುರುಡು ಇತ್ತಿನ ಬರೆಪಿದೋಷದ ಕಾರಣ ಆದಿಪ್ಪು.\nಈರ್ ದಯಮಲ್ತ್ ಈ ಕಡತೊನು  ನಿಜವಾದ್ಲಾ  ಮಿತೇರಾವೊಡೆ ಇಂದ್ ಸಮಾತೂಲೆ.",
        "windows-nonascii-filename": "ಈ ವಿಕಿ ವಿಶೇಷ ಅಕ್ಷರೊಲು ಉಪ್ಪುನ ಕಡತಪುರುಲೆಗ್ ಬೆರಿಬಲ ಕೊರ್ಪುಜಿ.",
        "fileexists": "ಈ ಪುದರುದ ಒಂಜಿ ಕಡತ ಇದಗನೆ ಉಂಡು, ದಯಮಲ್ತ್ ಸಮಾತೂಲೆ <strong>[[:$1]]</strong> ಒಂಜಿ ವೇಳೆ {{GENDER:|ಈರ್}} ನಿಜವಾದ್ಲಾ ಅವೆನ್ ಬದಲಾವರೆ ದೃಡ ಮಲ್ದರ್ಡ.\n[[$1|thumb]]",
+       "filepageexists": "ಈ ಕಡತದ ವಿವರಣ ಪುಟ ಅದಗನೆ <strong>[[:$1]]</strong> ಡು  ರಚನೆ ಆತ್ಂಡ್ , ಆಂಡ ಈ ಪುದರುದ ಒವ್ವೆ ಕಡತ  ಇತ್ತೆ  ಅಸ್ತಿತ್ವೊಡು ಇಜ್ಜಿ.\nಈರ್ ಸೇರಾಯಿನ ಸಾರಾಂಶ ವಿವರಣ ಪುಟೊಟು ತೋಜಂದ್.\nಇರೆನ ಸಾರಾಂಶ ಮುಲ್ಪ ತೋಜರೆ ಈರ್ ಅವೆನ್ ಅಂಗಿಕವಾದ್ ಸಂಪಾದಿಸೊಡು.\n[[$1|thumb]]",
+       "fileexists-extension": "ಒಂಜಿ ಸಮಾನ ಪುದರುದ ಕಡತ ಉಂಡು:[[$2|thumb]]\n* ಮಿತೇರಾವುನ ಕಡತದ ಪುದರು: <strong>[[:$1]]</strong>\n* ಉಪ್ಪುನ ಕಡತದ ಪುದರು: <strong>[[:$2]]</strong>\nಈರ್ ಬಹುಶಃ ಒಂಜಿ ಹೆಚ್ಚ ಸ್ಪುಟವಾಯಿನ ಪುದರುನು ಬಳಸರೆ ಬಯಸುವರಾ?",
+       "fileexists-thumbnail-yes": "ಕಡತ ಒಂಜಿ ಕುಗ್ಗಾಯಿನ ಗಾತ್ರದ ಆಕೃತಿದ ಲೆಕ್ಕ ತೋಜುಂಡು  <em>(thumbnail)</em>.\n[[$1|thumb]]\nದಯಮಲ್ತ್ ಕಡತೊನು ಸಮಾತೂಲೆ <strong>[[:$1]]</strong>.\nಸಮಾತೂಯಿನ ಕಡತ ಮೂಲಗಾತ್ರದ ಅವೇ ಆಕೃತಿ ಆಂಡ, ನನ ಒಂಜಿ  (ಕೊಂಬಿರೆಲ್ ಚಿತ್ರ)  ಕಿರ್ಚಿತ್ರ ಮಿತೇರಾವುನ ಅಗತ್ಯ ಇಜ್ಜಿ.",
+       "file-thumbnail-no": "ಕಡತದ ಪುದ <strong>$1</strong>.ರು  ಸುರುವಾಪುಂಡು\nಕಡತ ಒಂಜಿ ಕುಗ್ಗಾಯಿನ ಗಾತ್ರದ ಆಕೃತಿದ ಲೆಕ್ಕ ತೋಜುಂಡು  <em>(thumbnail)</em>.\nಇರೆಡ ಈ ಆಕೃತಿದ ಪೂರ್ಣ ಸಂಕಲ್ಪದ ಪ್ರತಿ ಇತ್ತಿನಾಂಡ ಅವೆನ್ ಮಿತೇರಾಲೆ, ಇಜ್ಜಾಂಡ ದಯಮಲ್ತ್ ಕಡತಪುದರು ಬದಲಾಲೆ.",
+       "fileexists-forbidden": "ಈ ಪುದರುದ ಒಂಜಿ ಕಡತ ಅದಗನೆ ಉಂಡು, ಬೊಕ ಅಯಿತ ಮೇಲ್'ಬರೆವರೆ ಆಪುಜಿ.\nಈರ್ ನನಲಾ ಇರೆನ ಕಡತೊನು ಮಿತೇರಾವರೆ ಬಯಕುವರ್ಡ, ದಯಮಲ್ತ್ ಪಿರ ಪೋಲೆ ಬೊಕ ಒಂಜಿ ಪೊಸ ಪುದರು ಬಳಸಿಲೆ.\n[[File:$1|thumb|center|$1]]",
+       "fileexists-shared-forbidden": "ಈ ಪುದರುದ ಒಂಜಿ ಕಡತ ಅದಗನೆ ಉಂಡು, ಪಟೊಂದಿನ ಕಡತ ಸಂಚಯನೊಡು.\nಈರ್ ನನಲಾ ಇರೆನ ಕಡತೊನು ಮಿತೇರಾವರೆ ಬಯಕುವರ್ಡ, ದಯಮಲ್ತ್ ಪಿರ ಪೋಲೆ ಬೊಕ ಒಂಜಿ ಪೊಸ ಪುದರು ಬಳಸಿಲೆ.\n[[File:$1|thumb|center|$1]]",
+       "fileexists-no-change": "ಮಿತೇರಿಕೆ ಆಯಿನವು <strong>[[:$1]]</strong> ಇತ್ತೆದ ಆವೃತ್ತಿದ ಒಂಜಿ ಯಥಾರ್ಥ ಇರ್ಪಡಿ ಆದುಂಡು.",
+       "fileexists-duplicate-version": "ಮಿತೇರಿಕೆ ಆಯಿನವು <strong>[[:$1]]</strong> {{PLURAL:$2|ಒಂಜಿ ಪರ ಆವೃತ್ತಿ|ಪರ ಆವೃತ್ತಿಲೆನ}}  ಒಂಜಿ ಯಥಾರ್ಥ ಇರ್ಪಡಿ ಆದುಂಡು.",
+       "file-exists-duplicate": "ಈ ಕಡತ  ಬೆರಿಟೆಬರ್ಪಿನ {{PLURAL:$1|ಕಡತ|ಕಡತೊಲು}} ದ ಒಂಜಿ ಇರ್ಪಡಿ ಆದುಂಡು:",
+       "file-deleted-duplicate": " ಈ ಕಡತದ ಒಂಜಿ ಸರ್ವಸಮ ಕಡತೊನು ([[:$1]]) ನೆಡ್ದ್ ದುಂಬು ಮಾಜಾದುಂಡು.\nಪಿರ ಮಿತೇರಾವರೆ ಪೋಪಿನೆರ್ದ್ ಸುರುಟು ಈರ್, ಆ ಕಡತದ ಮಾಜಿಕೆ ಚರಿತ್ರೆನ್ ಸಮಾತೂವೊಡು.",
+       "file-deleted-duplicate-notitle": "ಈ ಕಡತದ ಒಂಜಿ ಸರ್ವಸಮ ಕಡತೊನು  ನೆಡ್ದ್ ದುಂಬು ಮಾಜಾದುಂಡು ಬೊಕ ತರೆಬರವುನು ದಮನಿಸಾದುಂಡು.\nಕಡತೊನು ಪಿರ-ಮಿತೇರಾವರೆ ಪೋಪಿನೆರ್ದ್ ಸುರುಟು ಈರ್, ಸನ್ನಿವೇಶೊನು ಪರಿಶೀಲಿಸಾವರೆ,ದಮನಿತ ಕಡತ ದತ್ತಾಂಶ ತೂವರೆ ಶಕ್ತವಾಯಿನ ಏರೆನಾಂಡಲಾ ಈರ್ ಕೇಣೊಡು",
+       "uploadwarning": "ಮಿತೇರಿಕೆ ಎಚ್ಚರಿಗೆ",
+       "uploadwarning-text": "ದಯಮಲ್ತ್  ತಿರ್ತ್'ದ  ಕಡತ ವಿವರಣೆನ್  ತಿದ್ದುಪಾಟ  ಮಲ್ತ್'ದ್ ಬೊಕ ಕುಡಾ ಯತ್ನ ಮಲ್ಪುಲೆ.",
+       "uploadwarning-text-nostash": "ದಯಮಲ್ತ್  ಕಡತೊನು ಪಿರ ಮಿತೇರಾಲೆ, ತಿರ್ತ್'ದ  ಕಡತ ವಿವರಣೆನ್  ತಿದ್ದುಪಾಟ  ಮಲ್ತ್'ದ್  ಬೊಕ ಕುಡಾ ಯತ್ನ ಮಲ್ಪುಲೆ.",
        "savefile": "ಕಡತನ್ ಒರಿಪಾಲೆ",
+       "uploaddisabled": "ಮಿತೇರಿಕೆಲೆನ್ ನಿಷ್ಕ್ರಿಯ ಮಲ್ದ್ಂಡ್.",
+       "copyuploaddisabled": "ಯುಆರ್'ಎಲ್ ಮಿತೇರಿಕೆ ನಿಷ್ಕ್ರಿಯ ಮಲ್ದ್ಂಡ್.",
+       "uploaddisabledtext": "ಕಡತ ಮಿತೇರಿಕೆಲೆನ್  ನಿಷ್ಕ್ರಿಯ ಮಲ್ದ್ಂಡ್",
+       "php-uploaddisabledtext": "ಪಿಎಚ್'ಪಿ. ಡ್  ಕಡತ  ಮಿತೇರಿಕೆಲೆನ್  ನಿಷ್ಕ್ರಿಯ  ಮಲ್ದ್ಂಡ್.\nದಯಮಲ್ತ್  ಕಡತ_ಮಿತೇರಿಕೆ  ಅಟ್ಟಣೆಲೆನ್  ಸಮಾತೂಲೆ.",
+       "uploadscripted": "ಕಡತೊಡು ಎಚ್'ಟಿಎಂಎಲ್ ಇಜಿಂಡ ಸ್ಕ್ರಿಪ್ಟ್ ಅಂಕೇತ ಉಂಡು, ಅವೆನ್ ಜಾಲದರ್ಶಿಲು ದೋಷಪೂರ್ಣವಾದ್ ವ್ಯಾಖ್ಯಾನ ಮಲ್ಪರೆ ಯಾವು.",
+       "upload-scripted-pi-callback": "ಎಕ್ಸ್'ಎಂಎಲ್ - ಶೈಲಿಪತ್ರ  ಪ್ರಕ್ರಿಯೆಕಾರಕ ಸೂಚನೆ ಉಪ್ಪುನ ಕಡತೊನು ಮಿತೇರಿಸಾವರೆ ಆಪುಜಿ.",
        "upload-source": "ಮೂಲ ಕಡತ",
        "upload-options": "ಅಪ್ಲೋಡ್ ಆಯ್ಕೆಲು",
        "watchthisupload": "ಈ ಪುಟೊನು ತೂಲೆ",
index f69d3e4..68ae7f0 100644 (file)
        "upload-scripted-pi-callback": "Неможливо завантажити файл, що містить інструкції опрацювання таблиці стилів XML.",
        "upload-scripted-dtd": "Неможливо завантажувати SVG-файли, які містять нестандартну декларацію DTD.",
        "uploaded-script-svg": " \t\t\nЗнайдений небезпечний елемент з підтримкою сценаріїв «$1» в завантаженому файлі SVG.",
-       "uploaded-hostile-svg": " \t\nЗнайдений небезпечний CSS-код в елементі стилю завантаженого файлу SVG.",
+       "uploaded-hostile-svg": "Знайдений небезпечний CSS-код в елементі стилю завантаженого файлу SVG.",
        "uploaded-event-handler-on-svg": " \t\nУстановка атрибутів обробника подій <code>$1=\"$2\"</code> не дозволено для SVG-файлів.",
        "uploaded-href-attribute-svg": "<a> елементи можуть лише посилатися (href) на цілі типу data: (вбудований файл), http:// або https://, або ж fragment (#, same-document). Для інших елементів, таких як <image>, дозволені лише data: і fragment. Спробуйте вбудовувати зображення при експортуванні Вашого файлу SVG. Знайдено <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-href-unsafe-target-svg": "У завантаженому SVG-файлі знайдено href на небезпечні дані: ціль URI <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "logentry-rights-autopromote": "$1 було автоматично переведено із $4 в $5",
        "logentry-upload-upload": "$1 {{GENDER:$2|завантажив|завантажила}} $3",
        "logentry-upload-overwrite": "$1 {{GENDER:$2|завантажив|завантажила}} нову версію $3",
-       "logentry-upload-revert": "$1 {{GENDER:$2|заванÑ\82ажив|заванÑ\82ажила}} $3",
+       "logentry-upload-revert": "$1 {{GENDER:$2|повеÑ\80нÑ\83в|повеÑ\80нÑ\83ла}} $3 Ð´Ð¾ Ñ\81Ñ\82аÑ\80оÑ\97 Ð²ÐµÑ\80Ñ\81Ñ\96Ñ\97",
        "log-name-managetags": "Журнал управління мітками",
        "log-description-managetags": "На цій сторінці перераховані завдання управління, пов'язані з [[Special:Tags|мітками]]. Журнал містить тільки дії, виконані вручну адміністратором; мітки можуть бути створені або видалені програмним забезпеченням вікі без запису в цей журнал.",
        "logentry-managetags-create": "$1 {{GENDER:$2|створив|створила}} мітку «$4»",
        "log-action-filter-suppress-reblock": "Приховування користувача через повторне блокування",
        "log-action-filter-upload-upload": "Нове завантаження",
        "log-action-filter-upload-overwrite": "Повторне завантаження",
+       "log-action-filter-upload-revert": "Відкотити",
        "authmanager-authn-not-in-progress": "Автентифікація не виконується або втрачено дані сесії. Будь ласка, почніть знову з самого початку.",
        "authmanager-authn-no-primary": "Надані облікові дані не можуть бути завірені.",
        "authmanager-authn-no-local-user": "Надані облікові дані не пов'язані з жодним користувачем у цій вікі.",
        "passwordpolicies-policy-maximalpasswordlength": "Пароль повинен бути коротшим $1 {{PLURAL:$1|символа|символів}}",
        "passwordpolicies-policy-passwordcannotbepopular": "Пароль не може бути {{PLURAL:$1|часто вживаним|будь-яким з $1 часто вживаних паролів}}",
        "passwordpolicies-policy-passwordnotinlargeblacklist": "Пароль не може перебувати у списку 100 000 найчастіше вживаних паролів.",
+       "passwordpolicies-policyflag-forcechange": "має бути змінено при вході",
        "easydeflate-invaliddeflate": "Наданий вміст не стиснений належним чином",
        "unprotected-js": "З міркувань безпеки JavaScript не можна запускати з незахищених сторінок. Будь ласка, створюйте javascript лише в просторі MediaWiki, або як особисту підсторінку користувача."
 }
index eca58cd..fc17a3d 100644 (file)
@@ -1792,7 +1792,6 @@ hidepatrolled
 hideredirects
 hiderevision
 hideuser
-hidpi
 highlimit
 highmax
 highuse
index dfebaba..f114572 100644 (file)
@@ -232,11 +232,6 @@ return [
                'scripts' => 'resources/src/jquery/jquery.getAttrs.js',
                'targets' => [ 'desktop', 'mobile' ],
        ],
-       'jquery.hidpi' => [
-               'deprecated' => 'Use of the srcset polyfill is deprecated since MediaWiki 1.32.0',
-               'scripts' => 'resources/src/jquery/jquery.hidpi.js',
-               'targets' => [ 'desktop', 'mobile' ],
-       ],
        'jquery.highlightText' => [
                'scripts' => 'resources/src/jquery/jquery.highlightText.js',
                'dependencies' => [
@@ -757,6 +752,7 @@ return [
                        'fy' => 'resources/lib/moment/locale/fy.js',
                        'gd' => 'resources/lib/moment/locale/gd.js',
                        'gl' => 'resources/lib/moment/locale/gl.js',
+                       'gom' => 'resources/lib/moment/locale/gom-latn.js',
                        'gom-latn' => 'resources/lib/moment/locale/gom-latn.js',
                        'gu' => 'resources/lib/moment/locale/gu.js',
                        'he' => 'resources/lib/moment/locale/he.js',
diff --git a/resources/src/jquery/jquery.hidpi.js b/resources/src/jquery/jquery.hidpi.js
deleted file mode 100644 (file)
index 025e6c2..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/**
- * Responsive images based on `srcset` and `window.devicePixelRatio` emulation where needed.
- *
- * Call `.hidpi()` on a document or part of a document to proces image srcsets within that section.
- *
- * `$.devicePixelRatio()` can be used as a substitute for `window.devicePixelRatio`.
- * It provides a familiar interface to retrieve the pixel ratio for browsers that don't
- * implement `window.devicePixelRatio` but do have a different way of getting it.
- *
- * @class jQuery.plugin.hidpi
- */
-( function () {
-
-       /**
-        * Get reported or approximate device pixel ratio.
-        *
-        * - 1.0 means 1 CSS pixel is 1 hardware pixel
-        * - 2.0 means 1 CSS pixel is 2 hardware pixels
-        * - etc.
-        *
-        * Uses `window.devicePixelRatio` if available, or CSS media queries on IE.
-        *
-        * @static
-        * @inheritable
-        * @return {number} Device pixel ratio
-        */
-       $.devicePixelRatio = function () {
-               if ( window.devicePixelRatio !== undefined ) {
-                       // Most web browsers:
-                       // * WebKit/Blink (Safari, Chrome, Android browser, etc)
-                       // * Opera
-                       // * Firefox 18+
-                       // * Microsoft Edge (Windows 10)
-                       return window.devicePixelRatio;
-               } else if ( window.msMatchMedia !== undefined ) {
-                       // Windows 8 desktops / tablets, probably Windows Phone 8
-                       //
-                       // IE 10/11 doesn't report pixel ratio directly, but we can get the
-                       // screen DPI and divide by 96. We'll bracket to [1, 1.5, 2.0] for
-                       // simplicity, but you may get different values depending on zoom
-                       // factor, size of screen and orientation in Metro IE.
-                       if ( window.msMatchMedia( '(min-resolution: 192dpi)' ).matches ) {
-                               return 2;
-                       } else if ( window.msMatchMedia( '(min-resolution: 144dpi)' ).matches ) {
-                               return 1.5;
-                       } else {
-                               return 1;
-                       }
-               } else {
-                       // Legacy browsers...
-                       // Assume 1 if unknown.
-                       return 1;
-               }
-       };
-
-       /**
-        * Bracket a given device pixel ratio to one of [1, 1.5, 2].
-        *
-        * This is useful for grabbing images on the fly with sizes based on the display
-        * density, without causing slowdown and extra thumbnail renderings on devices
-        * that are slightly different from the most common sizes.
-        *
-        * The bracketed ratios match the default 'srcset' output on MediaWiki thumbnails,
-        * so will be consistent with default renderings.
-        *
-        * @static
-        * @inheritable
-        * @param {number} baseRatio Base ratio
-        * @return {number} Device pixel ratio
-        */
-       $.bracketDevicePixelRatio = function ( baseRatio ) {
-               if ( baseRatio > 1.5 ) {
-                       return 2;
-               } else if ( baseRatio > 1 ) {
-                       return 1.5;
-               } else {
-                       return 1;
-               }
-       };
-
-       /**
-        * Get reported or approximate device pixel ratio, bracketed to [1, 1.5, 2].
-        *
-        * This is useful for grabbing images on the fly with sizes based on the display
-        * density, without causing slowdown and extra thumbnail renderings on devices
-        * that are slightly different from the most common sizes.
-        *
-        * The bracketed ratios match the default 'srcset' output on MediaWiki thumbnails,
-        * so will be consistent with default renderings.
-        *
-        * - 1.0 means 1 CSS pixel is 1 hardware pixel
-        * - 1.5 means 1 CSS pixel is 1.5 hardware pixels
-        * - 2.0 means 1 CSS pixel is 2 hardware pixels
-        *
-        * @static
-        * @inheritable
-        * @return {number} Device pixel ratio
-        */
-       $.bracketedDevicePixelRatio = function () {
-               return $.bracketDevicePixelRatio( $.devicePixelRatio() );
-       };
-
-       /**
-        * Implement responsive images based on srcset attributes, if browser has no
-        * native srcset support.
-        *
-        * @return {jQuery} This selection
-        * @chainable
-        */
-       $.fn.hidpi = function () {
-               var $target = this,
-                       // TODO add support for dpi media query checks on Firefox, IE
-                       devicePixelRatio = $.devicePixelRatio(),
-                       testImage = new Image();
-
-               if ( devicePixelRatio > 1 && testImage.srcset === undefined ) {
-                       // No native srcset support.
-                       $target.find( 'img' ).each( function () {
-                               var $img = $( this ),
-                                       srcset = $img.attr( 'srcset' ),
-                                       match;
-                               if ( typeof srcset === 'string' && srcset !== '' ) {
-                                       match = $.matchSrcSet( devicePixelRatio, srcset );
-                                       if ( match !== null ) {
-                                               $img.attr( 'src', match );
-                                       }
-                               }
-                       } );
-               }
-
-               return $target;
-       };
-
-       /**
-        * Match a srcset entry for the given device pixel ratio
-        *
-        * Exposed for testing.
-        *
-        * @private
-        * @static
-        * @param {number} devicePixelRatio
-        * @param {string} srcset
-        * @return {Mixed} null or the matching src string
-        */
-       $.matchSrcSet = function ( devicePixelRatio, srcset ) {
-               var candidates,
-                       candidate,
-                       bits,
-                       src,
-                       i,
-                       ratioStr,
-                       ratio,
-                       selectedRatio = 1,
-                       selectedSrc = null;
-               candidates = srcset.split( / *, */ );
-               for ( i = 0; i < candidates.length; i++ ) {
-                       candidate = candidates[ i ];
-                       bits = candidate.split( / +/ );
-                       src = bits[ 0 ];
-                       if ( bits.length > 1 && bits[ 1 ].charAt( bits[ 1 ].length - 1 ) === 'x' ) {
-                               ratioStr = bits[ 1 ].slice( 0, -1 );
-                               ratio = parseFloat( ratioStr );
-                               if ( ratio <= devicePixelRatio && ratio > selectedRatio ) {
-                                       selectedRatio = ratio;
-                                       selectedSrc = src;
-                               }
-                       }
-               }
-               return selectedSrc;
-       };
-
-       /**
-        * @class jQuery
-        * @mixins jQuery.plugin.hidpi
-        */
-
-}() );
index a370881..af4b897 100644 (file)
                                }
                                if ( response.parse.modules ) {
                                        mw.loader.load( response.parse.modules.concat(
-                                               response.parse.modulescripts,
                                                response.parse.modulestyles
                                        ) );
                                }
index ce43855..c78354b 100644 (file)
@@ -2,6 +2,15 @@
  * Styling for Special:Watchlist and Special:RecentChanges
  */
 
+.client-js .mw-input-hidden {
+       display: none;
+}
+
+/* Make sure namespace label is aligned correctly on mobile when checkboxes are displayed */
+.mw-label.mw-namespace-label {
+       vertical-align: top;
+}
+
 .mw-changeslist-line-watched .mw-title {
        font-weight: bold;
 }
index 8885883..310832d 100644 (file)
@@ -10,7 +10,7 @@
         */
        rc = {
                /**
-                * Handler to disable/enable the namespace selector checkboxes when the
+                * Handler to hide/show the namespace selector checkboxes when the
                 * special 'all' namespace is selected/unselected respectively.
                 */
                updateCheckboxes: function () {
                        var isAllNS = $select.val() === '';
 
                        // Iterates over checkboxes and propagate the selected option
-                       $checkboxes.prop( 'disabled', isAllNS );
+                       $checkboxes.toggleClass( 'mw-input-hidden', isAllNS );
                },
 
                init: function () {
                        $select = $( '#namespace' );
-                       $checkboxes = $( '#nsassociated, #nsinvert' );
+                       $checkboxes = $( '#nsassociated, #nsinvert' ).closest( '.mw-input-with-label' );
 
-                       // Bind to change event, and trigger once to set the initial state of the checkboxes.
-                       rc.updateCheckboxes();
+                       // Bind to change event of the checkboxes.
+                       // The initial state is already set in HTML.
                        $select.on( 'change', rc.updateCheckboxes );
                }
        };
index 2feb438..e24c4c5 100644 (file)
@@ -17,7 +17,7 @@ class TestSetup {
                global $wgDevelopmentWarnings;
                global $wgSessionProviders, $wgSessionPbkdf2Iterations;
                global $wgJobTypeConf;
-               global $wgAuthManagerConfig, $wgAuth;
+               global $wgAuthManagerConfig;
 
                // wfWarn should cause tests to fail
                $wgDevelopmentWarnings = true;
@@ -87,7 +87,6 @@ class TestSetup {
                        ],
                        'secondaryauth' => [],
                ];
-               $wgAuth = new MediaWiki\Auth\AuthManagerAuthPlugin();
 
                // T46192 Do not attempt to send a real e-mail
                Hooks::clear( 'AlternateUserMailer' );
diff --git a/tests/phpunit/includes/MultiHttpClientTest.php b/tests/phpunit/includes/MultiHttpClientTest.php
deleted file mode 100644 (file)
index 1c7e62d..0000000
+++ /dev/null
@@ -1,166 +0,0 @@
-<?php
-
-/**
- * The urls herein are not actually called, because we mock the return results.
- *
- * @covers MultiHttpClient
- */
-class MultiHttpClientTest extends MediaWikiTestCase {
-       protected $client;
-
-       protected function setUp() {
-               parent::setUp();
-               $client = $this->getMockBuilder( MultiHttpClient::class )
-                       ->setConstructorArgs( [ [] ] )
-                       ->setMethods( [ 'isCurlEnabled' ] )->getMock();
-               $client->method( 'isCurlEnabled' )->willReturn( false );
-               $this->client = $client;
-       }
-
-       private function getHttpRequest( $statusValue, $statusCode, $headers = [] ) {
-               $httpRequest = $this->getMockBuilder( PhpHttpRequest::class )
-                       ->setConstructorArgs( [ '', [] ] )
-                       ->getMock();
-               $httpRequest->expects( $this->any() )
-                       ->method( 'execute' )
-                       ->willReturn( Status::wrap( $statusValue ) );
-               $httpRequest->expects( $this->any() )
-                       ->method( 'getResponseHeaders' )
-                       ->willReturn( $headers );
-               $httpRequest->expects( $this->any() )
-                               ->method( 'getStatus' )
-                               ->willReturn( $statusCode );
-               return $httpRequest;
-       }
-
-       private function mockHttpRequestFactory( $httpRequest ) {
-               $factory = $this->getMockBuilder( MediaWiki\Http\HttpRequestFactory::class )
-                       ->getMock();
-               $factory->expects( $this->any() )
-                       ->method( 'create' )
-                       ->willReturn( $httpRequest );
-               return $factory;
-       }
-
-       /**
-        * Test call of a single url that should succeed
-        */
-       public function testMultiHttpClientSingleSuccess() {
-               // Mock success
-               $httpRequest = $this->getHttpRequest( StatusValue::newGood( 200 ), 200 );
-               $this->setService( 'HttpRequestFactory', $this->mockHttpRequestFactory( $httpRequest ) );
-
-               list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $this->client->run( [
-                       'method' => 'GET',
-                       'url' => "http://example.test",
-               ] );
-
-               $this->assertEquals( 200, $rcode );
-       }
-
-       /**
-        * Test call of a single url that should not exist, and therefore fail
-        */
-       public function testMultiHttpClientSingleFailure() {
-               // Mock an invalid tld
-               $httpRequest = $this->getHttpRequest(
-                       StatusValue::newFatal( 'http-invalid-url', 'http://www.example.test' ), 0 );
-               $this->setService( 'HttpRequestFactory', $this->mockHttpRequestFactory( $httpRequest ) );
-
-               list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $this->client->run( [
-                       'method' => 'GET',
-                       'url' => "http://www.example.test",
-               ] );
-
-               $failure = $rcode < 200 || $rcode >= 400;
-               $this->assertTrue( $failure );
-       }
-
-       /**
-        * Test call of multiple urls that should all succeed
-        */
-       public function testMultiHttpClientMultipleSuccess() {
-               // Mock success
-               $httpRequest = $this->getHttpRequest( StatusValue::newGood( 200 ), 200 );
-               $this->setService( 'HttpRequestFactory', $this->mockHttpRequestFactory( $httpRequest ) );
-
-               $reqs = [
-                       [
-                               'method' => 'GET',
-                               'url' => 'http://example.test',
-                       ],
-                       [
-                               'method' => 'GET',
-                               'url' => 'https://get.test',
-                       ],
-               ];
-               $responses = $this->client->runMulti( $reqs );
-               foreach ( $responses as $response ) {
-                       list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $response['response'];
-                       $this->assertEquals( 200, $rcode );
-               }
-       }
-
-       /**
-        * Test call of multiple urls that should all fail
-        */
-       public function testMultiHttpClientMultipleFailure() {
-               // Mock page not found
-               $httpRequest = $this->getHttpRequest(
-                       StatusValue::newFatal( "http-bad-status", 404, 'Not Found' ), 404 );
-               $this->setService( 'HttpRequestFactory', $this->mockHttpRequestFactory( $httpRequest ) );
-
-               $reqs = [
-                       [
-                               'method' => 'GET',
-                               'url' => 'http://example.test/12345',
-                       ],
-                       [
-                               'method' => 'GET',
-                               'url' => 'http://example.test/67890' ,
-                       ]
-               ];
-               $responses = $this->client->runMulti( $reqs );
-               foreach ( $responses as $response ) {
-                       list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $response['response'];
-                       $failure = $rcode < 200 || $rcode >= 400;
-                       $this->assertTrue( $failure );
-               }
-       }
-
-       /**
-        * Test of response header handling
-        */
-       public function testMultiHttpClientHeaders() {
-               // Represenative headers for typical requests, per MWHttpRequest::getResponseHeaders()
-               $headers = [
-                       'content-type' => [
-                               'text/html; charset=utf-8',
-                       ],
-                       'date' => [
-                               'Wed, 18 Jul 2018 14:52:41 GMT',
-                       ],
-                       'set-cookie' => [
-                               'COUNTRY=NAe6; expires=Wed, 25-Jul-2018 14:52:41 GMT; path=/; domain=.example.test',
-                               'LAST_NEWS=1531925562; expires=Thu, 18-Jul-2019 14:52:41 GMT; path=/; domain=.example.test',
-                       ]
-               ];
-
-               // Mock success with specific headers
-               $httpRequest = $this->getHttpRequest( StatusValue::newGood( 200 ), 200, $headers );
-               $this->setService( 'HttpRequestFactory', $this->mockHttpRequestFactory( $httpRequest ) );
-
-               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $this->client->run( [
-                       'method' => 'GET',
-                       'url' => 'http://example.test',
-               ] );
-
-               $this->assertEquals( 200, $rcode );
-               $this->assertEquals( count( $headers ), count( $rhdrs ) );
-               foreach ( $headers as $name => $values ) {
-                       $value = implode( ', ', $values );
-                       $this->assertArrayHasKey( $name, $rhdrs );
-                       $this->assertEquals( $value, $rhdrs[$name] );
-               }
-       }
-}
index 7bb5c38..abc7c43 100644 (file)
@@ -1744,7 +1744,6 @@ class OutputPageTest extends MediaWikiTestCase {
        // @todo Make sure to test the following in addParserOutputMetadata() as well when we add tests
        // for them:
        //   * addModules()
-       //   * addModuleScripts()
        //   * addModuleStyles()
        //   * addJsConfigVars()
        //   * enableOOUI()
index 1517964..4c2494a 100644 (file)
@@ -208,7 +208,7 @@ class NameTableStoreTest extends MediaWikiTestCase {
 
        public function provideGetName() {
                return [
-                       [ new HashBagOStuff(), 3, 3 ],
+                       [ new HashBagOStuff(), 3, 2 ],
                        [ new EmptyBagOStuff(), 3, 3 ],
                ];
        }
@@ -217,26 +217,27 @@ class NameTableStoreTest extends MediaWikiTestCase {
         * @dataProvider provideGetName
         */
        public function testGetName( $cacheBag, $insertCalls, $selectCalls ) {
+               // Check for operations to in-memory cache (IMC) and persistent cache (PC)
                $store = $this->getNameTableSqlStore( $cacheBag, $insertCalls, $selectCalls );
 
                // Get 1 ID and make sure getName returns correctly
-               $fooId = $store->acquireId( 'foo' );
-               $this->assertSame( 'foo', $store->getName( $fooId ) );
+               $fooId = $store->acquireId( 'foo' ); // regen PC, set IMC, update IMC, tombstone PC
+               $this->assertSame( 'foo', $store->getName( $fooId ) ); // use IMC
 
                // Get another ID and make sure getName returns correctly
-               $barId = $store->acquireId( 'bar' );
-               $this->assertSame( 'bar', $store->getName( $barId ) );
+               $barId = $store->acquireId( 'bar' ); // update IMC, tombstone PC
+               $this->assertSame( 'bar', $store->getName( $barId ) ); // use IMC
 
                // Blitz the cache and make sure it still returns
-               TestingAccessWrapper::newFromObject( $store )->tableCache = null;
-               $this->assertSame( 'foo', $store->getName( $fooId ) );
-               $this->assertSame( 'bar', $store->getName( $barId ) );
+               TestingAccessWrapper::newFromObject( $store )->tableCache = null; // clear IMC
+               $this->assertSame( 'foo', $store->getName( $fooId ) ); // regen interim PC, set IMC
+               $this->assertSame( 'bar', $store->getName( $barId ) ); // use IMC
 
                // Blitz the cache again and get another ID and make sure getName returns correctly
-               TestingAccessWrapper::newFromObject( $store )->tableCache = null;
-               $bazId = $store->acquireId( 'baz' );
-               $this->assertSame( 'baz', $store->getName( $bazId ) );
-               $this->assertSame( 'baz', $store->getName( $bazId ) );
+               TestingAccessWrapper::newFromObject( $store )->tableCache = null; // clear IMC
+               $bazId = $store->acquireId( 'baz' ); // set IMC using interim PC, update IMC, tombstone PC
+               $this->assertSame( 'baz', $store->getName( $bazId ) ); // uses IMC
+               $this->assertSame( 'baz', $store->getName( $bazId ) ); // uses IMC
        }
 
        public function testGetName_masterFallback() {
index b20d43e..f8399a3 100644 (file)
@@ -650,7 +650,6 @@ class ApiParseTest extends ApiTestCase {
                        function ( $parser ) {
                                $output = $parser->getOutput();
                                $output->addModules( [ 'foo', 'bar' ] );
-                               $output->addModuleScripts( [ 'baz', 'quuz' ] );
                                $output->addModuleStyles( [ 'aaa', 'zzz' ] );
                                $output->addJsConfigVars( [ 'x' => 'y', 'z' => -3 ] );
                        }
@@ -663,7 +662,7 @@ class ApiParseTest extends ApiTestCase {
                ] );
 
                $this->assertSame( [ 'foo', 'bar' ], $res[0]['parse']['modules'] );
-               $this->assertSame( [ 'baz', 'quuz' ], $res[0]['parse']['modulescripts'] );
+               $this->assertSame( [], $res[0]['parse']['modulescripts'] );
                $this->assertSame( [ 'aaa', 'zzz' ], $res[0]['parse']['modulestyles'] );
                $this->assertSame( [ 'x' => 'y', 'z' => -3 ], $res[0]['parse']['jsconfigvars'] );
                $this->assertSame( '{"x":"y","z":-3}', $res[0]['parse']['encodedjsconfigvars'] );
index 9a27cf1..4377207 100644 (file)
@@ -26,7 +26,6 @@ abstract class ApiTestCase extends MediaWikiLangTestCase {
                ];
 
                $this->setMwGlobals( [
-                       'wgAuth' => new MediaWiki\Auth\AuthManagerAuthPlugin,
                        'wgRequest' => new FauxRequest( [] ),
                        'wgUser' => self::$users['sysop']->getUser(),
                ] );
index e8981ec..d5e1879 100644 (file)
@@ -34,12 +34,6 @@ class AuthManagerTest extends \MediaWikiTestCase {
        /** @var TestingAccessWrapper */
        protected $managerPriv;
 
-       protected function setUp() {
-               parent::setUp();
-
-               $this->setMwGlobals( [ 'wgAuth' => null ] );
-       }
-
        /**
         * Sets a mock on a hook
         * @param string $hook
@@ -2352,8 +2346,6 @@ class AuthManagerTest extends \MediaWikiTestCase {
        }
 
        public function testAutoAccountCreation() {
-               global $wgHooks;
-
                // PHPUnit seems to have a bug where it will call the ->with()
                // callbacks for our hooks again after the test is run (WTF?), which
                // breaks here because $username no longer matches $user by the end of
@@ -2771,15 +2763,10 @@ class AuthManagerTest extends \MediaWikiTestCase {
                $session->clear();
                $username = self::usernameForCreation();
                $user = \User::newFromName( $username );
-               $this->hook( 'AuthPluginAutoCreate', $this->once() )
-                       ->with( $callback );
-               $this->hideDeprecated( 'AuthPluginAutoCreate hook (used in ' .
-                               get_class( $wgHooks['AuthPluginAutoCreate'][0] ) . '::onAuthPluginAutoCreate)' );
                $this->hook( 'LocalUserCreated', $this->once() )
                        ->with( $callback, $this->equalTo( true ) );
                $ret = $this->manager->autoCreateUser( $user, AuthManager::AUTOCREATE_SOURCE_SESSION, true );
                $this->unhook( 'LocalUserCreated' );
-               $this->unhook( 'AuthPluginAutoCreate' );
                $this->assertEquals( \Status::newGood(), $ret );
                $this->assertNotEquals( 0, $user->getId() );
                $this->assertEquals( $username, $user->getName() );
diff --git a/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php b/tests/phpunit/includes/auth/AuthPluginPrimaryAuthenticationProviderTest.php
deleted file mode 100644 (file)
index 44e9799..0000000
+++ /dev/null
@@ -1,716 +0,0 @@
-<?php
-
-namespace MediaWiki\Auth;
-
-/**
- * @group AuthManager
- * @covers \MediaWiki\Auth\AuthPluginPrimaryAuthenticationProvider
- */
-class AuthPluginPrimaryAuthenticationProviderTest extends \MediaWikiTestCase {
-       public function testConstruction() {
-               $plugin = new AuthManagerAuthPlugin();
-               try {
-                       $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \InvalidArgumentException $ex ) {
-                       $this->assertSame(
-                               'Trying to wrap AuthManagerAuthPlugin in AuthPluginPrimaryAuthenticationProvider ' .
-                                       'makes no sense.',
-                               $ex->getMessage()
-                       );
-               }
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       [ new PasswordAuthenticationRequest ],
-                       $provider->getAuthenticationRequests( AuthManager::ACTION_LOGIN, [] )
-               );
-
-               $req = $this->createMock( PasswordAuthenticationRequest::class );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin, get_class( $req ) );
-               $this->assertEquals(
-                       [ $req ],
-                       $provider->getAuthenticationRequests( AuthManager::ACTION_LOGIN, [] )
-               );
-
-               $reqType = get_class( $this->createMock( AuthenticationRequest::class ) );
-               try {
-                       $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin, $reqType );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \InvalidArgumentException $ex ) {
-                       $this->assertSame(
-                               "$reqType is not a MediaWiki\\Auth\\PasswordAuthenticationRequest",
-                               $ex->getMessage()
-                       );
-               }
-       }
-
-       public function testOnUserSaveSettings() {
-               $user = \User::newFromName( 'UTSysop' );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'updateExternalDB' )
-                       ->with( $this->identicalTo( $user ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               \Hooks::run( 'UserSaveSettings', [ $user ] );
-       }
-
-       public function testOnUserGroupsChanged() {
-               $user = \User::newFromName( 'UTSysop' );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'updateExternalDBGroups' )
-                       ->with(
-                               $this->identicalTo( $user ),
-                               $this->identicalTo( [ 'added' ] ),
-                               $this->identicalTo( [ 'removed' ] )
-                       );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               \Hooks::run( 'UserGroupsChanged', [ $user, [ 'added' ], [ 'removed' ], false, false, [], [] ] );
-       }
-
-       public function testOnUserLoggedIn() {
-               $user = \User::newFromName( 'UTSysop' );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->exactly( 2 ) )->method( 'updateUser' )
-                       ->with( $this->identicalTo( $user ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               \Hooks::run( 'UserLoggedIn', [ $user ] );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'updateUser' )
-                       ->will( $this->returnCallback( function ( &$user ) {
-                               $user = \User::newFromName( 'UTSysop' );
-                       } ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               try {
-                       \Hooks::run( 'UserLoggedIn', [ $user ] );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \UnexpectedValueException $ex ) {
-                       $this->assertSame(
-                               get_class( $plugin ) . '::updateUser() tried to replace $user!',
-                               $ex->getMessage()
-                       );
-               }
-       }
-
-       public function testOnLocalUserCreated() {
-               $user = \User::newFromName( 'UTSysop' );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->exactly( 2 ) )->method( 'initUser' )
-                       ->with( $this->identicalTo( $user ), $this->identicalTo( false ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               \Hooks::run( 'LocalUserCreated', [ $user, false ] );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'initUser' )
-                       ->will( $this->returnCallback( function ( &$user ) {
-                               $user = \User::newFromName( 'UTSysop' );
-                       } ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               try {
-                       \Hooks::run( 'LocalUserCreated', [ $user, false ] );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \UnexpectedValueException $ex ) {
-                       $this->assertSame(
-                               get_class( $plugin ) . '::initUser() tried to replace $user!',
-                               $ex->getMessage()
-                       );
-               }
-       }
-
-       public function testGetUniqueId() {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertSame(
-                       'MediaWiki\\Auth\\AuthPluginPrimaryAuthenticationProvider:' . get_class( $plugin ),
-                       $provider->getUniqueId()
-               );
-       }
-
-       /**
-        * @dataProvider provideGetAuthenticationRequests
-        * @param string $action
-        * @param array $response
-        * @param bool $allowPasswordChange
-        */
-       public function testGetAuthenticationRequests( $action, $response, $allowPasswordChange ) {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'allowPasswordChange' )
-                       ->will( $this->returnValue( $allowPasswordChange ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals( $response, $provider->getAuthenticationRequests( $action, [] ) );
-       }
-
-       public static function provideGetAuthenticationRequests() {
-               $arr = [ new PasswordAuthenticationRequest() ];
-               return [
-                       [ AuthManager::ACTION_LOGIN, $arr, true ],
-                       [ AuthManager::ACTION_LOGIN, $arr, false ],
-                       [ AuthManager::ACTION_CREATE, $arr, true ],
-                       [ AuthManager::ACTION_CREATE, $arr, false ],
-                       [ AuthManager::ACTION_LINK, [], true ],
-                       [ AuthManager::ACTION_LINK, [], false ],
-                       [ AuthManager::ACTION_CHANGE, $arr, true ],
-                       [ AuthManager::ACTION_CHANGE, [], false ],
-                       [ AuthManager::ACTION_REMOVE, $arr, true ],
-                       [ AuthManager::ACTION_REMOVE, [], false ],
-               ];
-       }
-
-       public function testAuthentication() {
-               $req = new PasswordAuthenticationRequest();
-               $req->action = AuthManager::ACTION_LOGIN;
-               $reqs = [ PasswordAuthenticationRequest::class => $req ];
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->never() )->method( 'authenticate' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( [] )
-               );
-
-               $req->username = 'foo';
-               $req->password = null;
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $req->username = null;
-               $req->password = 'bar';
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $req->username = 'foo';
-               $req->password = 'bar';
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'authenticate' )
-                       ->with( $this->equalTo( 'Foo' ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       AuthenticationResponse::newPass( 'Foo', $req ),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( false ) );
-               $plugin->expects( $this->never() )->method( 'authenticate' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $pluginUser = $this->getMockBuilder( \AuthPluginUser::class )
-                       ->setMethods( [ 'isLocked' ] )
-                       ->disableOriginalConstructor()
-                       ->getMock();
-               $pluginUser->expects( $this->once() )->method( 'isLocked' )
-                       ->will( $this->returnValue( true ) );
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'getUserInstance', 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'getUserInstance' )
-                       ->will( $this->returnValue( $pluginUser ) );
-               $plugin->expects( $this->never() )->method( 'authenticate' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'authenticate' )
-                       ->with( $this->equalTo( 'Foo' ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( false ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAuthentication( $reqs )
-               );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'authenticate', 'strict' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'authenticate' )
-                       ->with( $this->equalTo( 'Foo' ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( false ) );
-               $plugin->expects( $this->any() )->method( 'strict' )->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $ret = $provider->beginPrimaryAuthentication( $reqs );
-               $this->assertSame( AuthenticationResponse::FAIL, $ret->status );
-               $this->assertSame( 'wrongpassword', $ret->message->getKey() );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'authenticate', 'strictUserAuth' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'authenticate' )
-                       ->with( $this->equalTo( 'Foo' ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( false ) );
-               $plugin->expects( $this->any() )->method( 'strictUserAuth' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $ret = $provider->beginPrimaryAuthentication( $reqs );
-               $this->assertSame( AuthenticationResponse::FAIL, $ret->status );
-               $this->assertSame( 'wrongpassword', $ret->message->getKey() );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'domainList', 'validDomain', 'setDomain', 'userExists', 'authenticate' ] )
-                       ->getMock();
-               $plugin->expects( $this->any() )->method( 'domainList' )
-                       ->will( $this->returnValue( [ 'Domain1', 'Domain2' ] ) );
-               $plugin->expects( $this->any() )->method( 'validDomain' )
-                       ->will( $this->returnCallback( function ( $domain ) {
-                               return in_array( $domain, [ 'Domain1', 'Domain2' ] );
-                       } ) );
-               $plugin->expects( $this->once() )->method( 'setDomain' )
-                       ->with( $this->equalTo( 'Domain2' ) );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'authenticate' )
-                       ->with( $this->equalTo( 'Foo' ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               list( $req ) = $provider->getAuthenticationRequests( AuthManager::ACTION_LOGIN, [] );
-               $req->username = 'foo';
-               $req->password = 'bar';
-               $req->domain = 'Domain2';
-               $provider->beginPrimaryAuthentication( [ $req ] );
-       }
-
-       public function testTestUserExists() {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertTrue( $provider->testUserExists( 'foo' ) );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( false ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertFalse( $provider->testUserExists( 'foo' ) );
-       }
-
-       public function testTestUserCanAuthenticate() {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( false ) );
-               $plugin->expects( $this->never() )->method( 'getUserInstance' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertFalse( $provider->testUserCanAuthenticate( 'foo' ) );
-
-               $pluginUser = $this->getMockBuilder( \AuthPluginUser::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
-               $pluginUser->expects( $this->once() )->method( 'isLocked' )
-                       ->will( $this->returnValue( true ) );
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'getUserInstance' )
-                       ->with( $this->callback( function ( $user ) {
-                               $this->assertInstanceOf( \User::class, $user );
-                               $this->assertEquals( 'Foo', $user->getName() );
-                               return true;
-                       } ) )
-                       ->will( $this->returnValue( $pluginUser ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertFalse( $provider->testUserCanAuthenticate( 'foo' ) );
-
-               $pluginUser = $this->getMockBuilder( \AuthPluginUser::class )
-                       ->disableOriginalConstructor()
-                       ->getMock();
-               $pluginUser->expects( $this->once() )->method( 'isLocked' )
-                       ->will( $this->returnValue( false ) );
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'userExists' )
-                       ->with( $this->equalTo( 'Foo' ) )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'getUserInstance' )
-                       ->with( $this->callback( function ( $user ) {
-                               $this->assertInstanceOf( \User::class, $user );
-                               $this->assertEquals( 'Foo', $user->getName() );
-                               return true;
-                       } ) )
-                       ->will( $this->returnValue( $pluginUser ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertTrue( $provider->testUserCanAuthenticate( 'foo' ) );
-       }
-
-       public function testProviderRevokeAccessForUser() {
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'userExists', 'setPassword' ] )
-                       ->getMock();
-               $plugin->expects( $this->once() )->method( 'userExists' )->willReturn( true );
-               $plugin->expects( $this->once() )->method( 'setPassword' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->identicalTo( null ) )
-                       ->willReturn( true );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $provider->providerRevokeAccessForUser( 'foo' );
-
-               $plugin = $this->getMockBuilder( \AuthPlugin::class )
-                       ->setMethods( [ 'domainList', 'userExists', 'setPassword' ] )
-                       ->getMock();
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [ 'D1', 'D2', 'D3' ] );
-               $plugin->expects( $this->exactly( 3 ) )->method( 'userExists' )
-                       ->willReturnCallback( function () use ( $plugin ) {
-                               return $plugin->getDomain() !== 'D2';
-                       } );
-               $plugin->expects( $this->exactly( 2 ) )->method( 'setPassword' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->identicalTo( null ) )
-                       ->willReturnCallback( function () use ( $plugin ) {
-                               $this->assertNotEquals( 'D2', $plugin->getDomain() );
-                               return $plugin->getDomain() !== 'D1';
-                       } );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               try {
-                       $provider->providerRevokeAccessForUser( 'foo' );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \UnexpectedValueException $ex ) {
-                       $this->assertSame(
-                               'AuthPlugin failed to reset password for Foo in the following domains: D1',
-                               $ex->getMessage()
-                       );
-               }
-       }
-
-       public function testProviderAllowsPropertyChange() {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'allowPropChange' )
-                       ->will( $this->returnCallback( function ( $prop ) {
-                               return $prop === 'allow';
-                       } ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertTrue( $provider->providerAllowsPropertyChange( 'allow' ) );
-               $this->assertFalse( $provider->providerAllowsPropertyChange( 'deny' ) );
-       }
-
-       /**
-        * @dataProvider provideProviderAllowsAuthenticationDataChange
-        * @param string $type
-        * @param bool|null $allow
-        * @param StatusValue $expect
-        */
-       public function testProviderAllowsAuthenticationDataChange( $type, $allow, $expect ) {
-               $domains = $type instanceof PasswordDomainAuthenticationRequest ? [ 'foo', 'bar' ] : [];
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( $domains );
-               $plugin->expects( $allow === null ? $this->never() : $this->once() )
-                       ->method( 'allowPasswordChange' )->will( $this->returnValue( $allow ) );
-               $plugin->expects( $this->any() )->method( 'validDomain' )
-                       ->willReturnCallback( function ( $d ) use ( $domains ) {
-                               return in_array( $d, $domains, true );
-                       } );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               if ( is_object( $type ) ) {
-                       $req = $type;
-               } else {
-                       $req = $this->createMock( $type );
-               }
-               $req->action = AuthManager::ACTION_CHANGE;
-               $req->username = 'UTSysop';
-               $req->password = 'Pa$$w0Rd!!!';
-               $req->retype = 'Pa$$w0Rd!!!';
-               $this->assertEquals( $expect, $provider->providerAllowsAuthenticationDataChange( $req ) );
-       }
-
-       public static function provideProviderAllowsAuthenticationDataChange() {
-               $domains = [ 'foo', 'bar' ];
-               $reqNoDomain = new PasswordDomainAuthenticationRequest( $domains );
-               $reqValidDomain = new PasswordDomainAuthenticationRequest( $domains );
-               $reqValidDomain->domain = 'foo';
-               $reqInvalidDomain = new PasswordDomainAuthenticationRequest( $domains );
-               $reqInvalidDomain->domain = 'invalid';
-
-               return [
-                       [ AuthenticationRequest::class, null, \StatusValue::newGood( 'ignored' ) ],
-                       [ new PasswordAuthenticationRequest, true, \StatusValue::newGood() ],
-                       [
-                               new PasswordAuthenticationRequest,
-                               false,
-                               \StatusValue::newFatal( 'authmanager-authplugin-setpass-denied' )
-                       ],
-                       [ $reqNoDomain, true, \StatusValue::newGood( 'ignored' ) ],
-                       [ $reqValidDomain, true, \StatusValue::newGood() ],
-                       [
-                               $reqInvalidDomain,
-                               true,
-                               \StatusValue::newFatal( 'authmanager-authplugin-setpass-bad-domain' )
-                       ],
-               ];
-       }
-
-       public function testProviderChangeAuthenticationData() {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->never() )->method( 'setPassword' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $provider->providerChangeAuthenticationData(
-                       $this->createMock( AuthenticationRequest::class )
-               );
-
-               $req = new PasswordAuthenticationRequest();
-               $req->action = AuthManager::ACTION_CHANGE;
-               $req->username = 'foo';
-               $req->password = 'bar';
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'setPassword' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $provider->providerChangeAuthenticationData( $req );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )->method( 'setPassword' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( false ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               try {
-                       $provider->providerChangeAuthenticationData( $req );
-                       $this->fail( 'Expected exception not thrown' );
-               } catch ( \ErrorPageError $e ) {
-                       $this->assertSame( 'authmanager-authplugin-setpass-failed-title', $e->title );
-                       $this->assertSame( 'authmanager-authplugin-setpass-failed-message', $e->msg );
-               }
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )
-                       ->will( $this->returnValue( [ 'Domain1', 'Domain2' ] ) );
-               $plugin->expects( $this->any() )->method( 'validDomain' )
-                       ->will( $this->returnCallback( function ( $domain ) {
-                               return in_array( $domain, [ 'Domain1', 'Domain2' ] );
-                       } ) );
-               $plugin->expects( $this->once() )->method( 'setDomain' )
-                       ->with( $this->equalTo( 'Domain2' ) );
-               $plugin->expects( $this->once() )->method( 'setPassword' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               list( $req ) = $provider->getAuthenticationRequests( AuthManager::ACTION_CREATE, [] );
-               $req->username = 'foo';
-               $req->password = 'bar';
-               $req->domain = 'Domain2';
-               $provider->providerChangeAuthenticationData( $req );
-       }
-
-       /**
-        * @dataProvider provideAccountCreationType
-        * @param bool $can
-        * @param string $expect
-        */
-       public function testAccountCreationType( $can, $expect ) {
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->once() )
-                       ->method( 'canCreateAccounts' )->will( $this->returnValue( $can ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertSame( $expect, $provider->accountCreationType() );
-       }
-
-       public static function provideAccountCreationType() {
-               return [
-                       [ true, PrimaryAuthenticationProvider::TYPE_CREATE ],
-                       [ false, PrimaryAuthenticationProvider::TYPE_NONE ],
-               ];
-       }
-
-       public function testTestForAccountCreation() {
-               $user = \User::newFromName( 'foo' );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       \StatusValue::newGood(),
-                       $provider->testForAccountCreation( $user, $user, [] )
-               );
-       }
-
-       public function testAccountCreation() {
-               $user = \User::newFromName( 'foo' );
-               $user->setEmail( 'email' );
-               $user->setRealName( 'realname' );
-
-               $req = new PasswordAuthenticationRequest();
-               $req->action = AuthManager::ACTION_CREATE;
-               $reqs = [ PasswordAuthenticationRequest::class => $req ];
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'canCreateAccounts' )
-                       ->will( $this->returnValue( false ) );
-               $plugin->expects( $this->never() )->method( 'addUser' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               try {
-                       $provider->beginPrimaryAccountCreation( $user, $user, [] );
-                       $this->fail( 'Expected exception was not thrown' );
-               } catch ( \BadMethodCallException $ex ) {
-                       $this->assertSame(
-                               'Shouldn\'t call this when accountCreationType() is NONE', $ex->getMessage()
-                       );
-               }
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'canCreateAccounts' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->never() )->method( 'addUser' );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAccountCreation( $user, $user, [] )
-               );
-
-               $req->username = 'foo';
-               $req->password = null;
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAccountCreation( $user, $user, $reqs )
-               );
-
-               $req->username = null;
-               $req->password = 'bar';
-               $this->assertEquals(
-                       AuthenticationResponse::newAbstain(),
-                       $provider->beginPrimaryAccountCreation( $user, $user, $reqs )
-               );
-
-               $req->username = 'foo';
-               $req->password = 'bar';
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'canCreateAccounts' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'addUser' )
-                       ->with(
-                               $this->callback( function ( $u ) {
-                                       return $u instanceof \User && $u->getName() === 'Foo';
-                               } ),
-                               $this->equalTo( 'bar' ),
-                               $this->equalTo( 'email' ),
-                               $this->equalTo( 'realname' )
-                       )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $this->assertEquals(
-                       AuthenticationResponse::newPass(),
-                       $provider->beginPrimaryAccountCreation( $user, $user, $reqs )
-               );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'domainList' )->willReturn( [] );
-               $plugin->expects( $this->any() )->method( 'canCreateAccounts' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->once() )->method( 'addUser' )
-                       ->with(
-                               $this->callback( function ( $u ) {
-                                       return $u instanceof \User && $u->getName() === 'Foo';
-                               } ),
-                               $this->equalTo( 'bar' ),
-                               $this->equalTo( 'email' ),
-                               $this->equalTo( 'realname' )
-                       )
-                       ->will( $this->returnValue( false ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               $ret = $provider->beginPrimaryAccountCreation( $user, $user, $reqs );
-               $this->assertSame( AuthenticationResponse::FAIL, $ret->status );
-               $this->assertSame( 'authmanager-authplugin-create-fail', $ret->message->getKey() );
-
-               $plugin = $this->createMock( \AuthPlugin::class );
-               $plugin->expects( $this->any() )->method( 'canCreateAccounts' )
-                       ->will( $this->returnValue( true ) );
-               $plugin->expects( $this->any() )->method( 'domainList' )
-                       ->will( $this->returnValue( [ 'Domain1', 'Domain2' ] ) );
-               $plugin->expects( $this->any() )->method( 'validDomain' )
-                       ->will( $this->returnCallback( function ( $domain ) {
-                               return in_array( $domain, [ 'Domain1', 'Domain2' ] );
-                       } ) );
-               $plugin->expects( $this->once() )->method( 'setDomain' )
-                       ->with( $this->equalTo( 'Domain2' ) );
-               $plugin->expects( $this->once() )->method( 'addUser' )
-                       ->with( $this->callback( function ( $u ) {
-                               return $u instanceof \User && $u->getName() === 'Foo';
-                       } ), $this->equalTo( 'bar' ) )
-                       ->will( $this->returnValue( true ) );
-               $provider = new AuthPluginPrimaryAuthenticationProvider( $plugin );
-               list( $req ) = $provider->getAuthenticationRequests( AuthManager::ACTION_CREATE, [] );
-               $req->username = 'foo';
-               $req->password = 'bar';
-               $req->domain = 'Domain2';
-               $provider->beginPrimaryAccountCreation( $user, $user, [ $req ] );
-       }
-
-}
diff --git a/tests/phpunit/includes/libs/MultiHttpClientTest.php b/tests/phpunit/includes/libs/MultiHttpClientTest.php
new file mode 100644 (file)
index 0000000..8372f51
--- /dev/null
@@ -0,0 +1,169 @@
+<?php
+
+use GuzzleHttp\Handler\MockHandler;
+use GuzzleHttp\HandlerStack;
+use GuzzleHttp\Psr7\Response;
+
+/**
+ * Tests for MultiHttpClient
+ *
+ * The urls herein are not actually called, because we mock the return results.
+ *
+ * @covers MultiHttpClient
+ */
+class MultiHttpClientTest extends MediaWikiTestCase {
+       private $successReqs = [
+               [
+                       'method' => 'GET',
+                       'url' => 'http://example.test',
+               ],
+               [
+                       'method' => 'GET',
+                       'url' => 'https://get.test',
+               ],
+               [
+                       'method' => 'POST',
+                       'url' => 'http://example.test',
+                       'body' => [ 'field' => 'value' ],
+               ],
+       ];
+
+       private $failureReqs = [
+               [
+                       'method' => 'GET',
+                       'url' => 'http://example.test',
+               ],
+               [
+                       'method' => 'GET',
+                       'url' => 'http://example.test/12345',
+               ],
+               [
+                       'method' => 'POST',
+                       'url' => 'http://example.test',
+                       'body' => [ 'field' => 'value' ],
+               ],
+       ];
+
+       private function makeHandler( array $rCodes ) {
+               $queue = [];
+               foreach ( $rCodes as $rCode ) {
+                       $queue[] = new Response( $rCode );
+               }
+               return HandlerStack::create( new MockHandler( $queue ) );
+       }
+
+       /**
+        * Test call of a single url that should succeed
+        */
+       public function testSingleSuccess() {
+               $handler = $this->makeHandler( [ 200 ] );
+               $client = new MultiHttpClient( [] );
+
+               list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $client->run(
+                       $this->successReqs[0],
+                       [ 'handler' => $handler ] );
+
+               $this->assertEquals( 200, $rcode );
+       }
+
+       /**
+        * Test call of a single url that should not exist, and therefore fail
+        */
+       public function testSingleFailure() {
+               $handler = $this->makeHandler( [ 404 ] );
+               $client = new MultiHttpClient( [] );
+
+               list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $client->run(
+                       $this->failureReqs[0],
+                       [ 'handler' => $handler ] );
+
+               $failure = $rcode < 200 || $rcode >= 400;
+               $this->assertTrue( $failure );
+       }
+
+       /**
+        * Test call of multiple urls that should all succeed
+        */
+       public function testMultipleSuccess() {
+               $handler = $this->makeHandler( [ 200, 200, 200 ] );
+               $client = new MultiHttpClient( [] );
+               $responses = $client->runMulti( $this->successReqs, [ 'handler' => $handler ] );
+
+               foreach ( $responses as $response ) {
+                       list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $response['response'];
+                       $this->assertEquals( 200, $rcode );
+               }
+       }
+
+       /**
+        * Test call of multiple urls that should all fail
+        */
+       public function testMultipleFailure() {
+               $handler = $this->makeHandler( [ 404, 404, 404 ] );
+               $client = new MultiHttpClient( [] );
+               $responses = $client->runMulti( $this->failureReqs, [ 'handler' => $handler ] );
+
+               foreach ( $responses as $response ) {
+                       list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $response['response'];
+                       $failure = $rcode < 200 || $rcode >= 400;
+                       $this->assertTrue( $failure );
+               }
+       }
+
+       /**
+        * Test call of multiple urls, some of which should succeed and some of which should fail
+        */
+       public function testMixedSuccessAndFailure() {
+               $responseCodes = [ 200, 200, 200, 404, 404, 404 ];
+               $handler = $this->makeHandler( $responseCodes );
+               $client = new MultiHttpClient( [] );
+
+               $responses = $client->runMulti(
+                       array_merge( $this->successReqs, $this->failureReqs ),
+                       [ 'handler' => $handler ] );
+
+               foreach ( $responses as $index => $response ) {
+                       list( $rcode, $rdesc, /* $rhdrs */, $rbody, $rerr ) = $response['response'];
+                       $this->assertEquals( $responseCodes[$index], $rcode );
+               }
+       }
+
+       /**
+        * Test of response header handling
+        */
+       public function testHeaders() {
+               // Representative headers for typical requests, per MWHttpRequest::getResponseHeaders()
+               $headers = [
+                       'content-type' => [
+                               'text/html; charset=utf-8',
+                       ],
+                       'date' => [
+                               'Wed, 18 Jul 2018 14:52:41 GMT',
+                       ],
+                       'set-cookie' => [
+                               'COUNTRY=NAe6; expires=Wed, 25-Jul-2018 14:52:41 GMT; path=/; domain=.example.test',
+                               'LAST_NEWS=1531925562; expires=Thu, 18-Jul-2019 14:52:41 GMT; path=/; domain=.example.test',
+                       ]
+               ];
+
+               $handler = HandlerStack::create( new MockHandler( [
+                       new Response( 200, $headers ),
+               ] ) );
+
+               $client = new MultiHttpClient( [] );
+
+               list( $rcode, $rdesc, $rhdrs, $rbody, $rerr ) = $client->run( [
+                       'method' => 'GET',
+                       'url' => "http://example.test",
+                       ],
+                       [ 'handler' => $handler ] );
+               $this->assertEquals( 200, $rcode );
+
+               $this->assertEquals( count( $headers ), count( $rhdrs ) );
+               foreach ( $headers as $name => $values ) {
+                       $value = implode( ', ', $values );
+                       $this->assertArrayHasKey( $name, $rhdrs );
+                       $this->assertEquals( $value, $rhdrs[$name] );
+               }
+       }
+}
index a044372..87c1d1e 100644 (file)
@@ -121,6 +121,9 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
        }
 
        public function testProcessCache() {
+               $mockWallClock = 1549343530.2053;
+               $this->cache->setMockTime( $mockWallClock );
+
                $hit = 0;
                $callback = function () use ( &$hit ) {
                        ++$hit;
@@ -154,18 +157,28 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $this->assertEquals( 6, $hit, "New values cached" );
 
                foreach ( $keys as $i => $key ) {
+                       // Should evict from process cache
                        $this->cache->delete( $key );
+                       $mockWallClock += 0.001; // cached values will be newer than tombstone
+                       // Get into cache (specific process cache group)
                        $this->cache->getWithSetCallback(
                                $key, 100, $callback, [ 'pcTTL' => 5, 'pcGroup' => $groups[$i] ] );
                }
-               $this->assertEquals( 9, $hit, "Values evicted" );
+               $this->assertEquals( 9, $hit, "Values evicted by delete()" );
 
-               $key = reset( $keys );
                // Get into cache (default process cache group)
+               $key = reset( $keys );
                $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
-               $this->assertEquals( 10, $hit, "Value calculated" );
+               $this->assertEquals( 9, $hit, "Value recently interim-cached" );
+
+               $mockWallClock += 0.2; // interim key not brand new
+               $this->cache->clearProcessCache();
+               $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
+               $this->assertEquals( 10, $hit, "Value calculated (interim key not recent and reset)" );
                $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
-               $this->assertEquals( 10, $hit, "Value cached" );
+               $this->assertEquals( 10, $hit, "Value process cached" );
+
+               $mockWallClock += 0.2; // interim key not brand new
                $outerCallback = function () use ( &$callback, $key ) {
                        $v = $this->cache->getWithSetCallback( $key, 100, $callback, [ 'pcTTL' => 5 ] );
 
@@ -240,7 +253,7 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $t2 = $cache->getCheckKeyTime( $cKey2 );
                $this->assertGreaterThanOrEqual( $priorTime, $t2, 'Check keys generated on miss' );
 
-               $mockWallClock += 0.01;
+               $mockWallClock += 0.2; // interim key is not brand new and check keys have past values
                $priorTime = $mockWallClock; // reference time
                $wasSet = 0;
                $v = $cache->getWithSetCallback(
@@ -437,9 +450,9 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                        return $value;
                };
 
-               $cache = new NearExpiringWANObjectCache( [
-                       'cache'        => new HashBagOStuff()
-               ] );
+               $cache = new NearExpiringWANObjectCache( [ 'cache' => new HashBagOStuff() ] );
+               $mockWallClock = 1549343530.2053;
+               $cache->setMockTime( $mockWallClock );
 
                $wasSet = 0;
                $key = wfRandomString();
@@ -447,6 +460,8 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $v = $cache->getWithSetCallback( $key, 20, $func, $opts );
                $this->assertEquals( $value, $v, "Value returned" );
                $this->assertEquals( 1, $wasSet, "Value calculated" );
+
+               $mockWallClock += 0.2; // interim key is not brand new
                $v = $cache->getWithSetCallback( $key, 20, $func, $opts );
                $this->assertEquals( 2, $wasSet, "Value re-calculated" );
 
@@ -872,6 +887,9 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $key = wfRandomString();
                $value = wfRandomString();
 
+               $mockWallClock = 1549343530.2053;
+               $cache->setMockTime( $mockWallClock );
+
                $calls = 0;
                $func = function () use ( &$calls, $value, $cache, $key ) {
                        ++$calls;
@@ -892,6 +910,7 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $this->assertEquals( 1, $calls, 'Callback was not used' );
 
                $cache->delete( $key );
+               $mockWallClock += 0.001; // cached values will be newer than tombstone
                $ret = $cache->getWithSetCallback( $key, 30, $func,
                        [ 'lockTSE' => 5, 'checkKeys' => $checkKeys ] );
                $this->assertEquals( $value, $ret, 'Callback was used; interim saved' );
@@ -915,13 +934,12 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $value = wfRandomString();
 
                $mockWallClock = 1549343530.2053;
-               $priorTime = $mockWallClock;
                $cache->setMockTime( $mockWallClock );
 
                $calls = 0;
-               $func = function ( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value, $priorTime ) {
+               $func = function ( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value, &$mockWallClock ) {
                        ++$calls;
-                       $setOpts['since'] = $priorTime - 10;
+                       $setOpts['since'] = $mockWallClock - 10;
                        return $value;
                };
 
@@ -933,21 +951,34 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $this->assertEquals( 1, $curTTL, 'Value has reduced logical TTL', 0.01 );
                $this->assertEquals( 1, $calls, 'Value was generated' );
 
-               $mockWallClock += 2;
+               $mockWallClock += 2; // low logical TTL expired
 
                $ret = $cache->getWithSetCallback( $key, 300, $func, [ 'lockTSE' => 5 ] );
                $this->assertEquals( $value, $ret );
                $this->assertEquals( 2, $calls, 'Callback used (mutex acquired)' );
 
+               $ret = $cache->getWithSetCallback( $key, 300, $func, [ 'lockTSE' => 5 ] );
+               $this->assertEquals( $value, $ret );
+               $this->assertEquals( 2, $calls, 'Callback was not used (interim value used)' );
+
+               $mockWallClock += 2; // low logical TTL expired
                // Acquire a lock to verify that getWithSetCallback uses lockTSE properly
                $this->internalCache->add( $cache::MUTEX_KEY_PREFIX . $key, 1, 0 );
 
                $ret = $cache->getWithSetCallback( $key, 300, $func, [ 'lockTSE' => 5 ] );
                $this->assertEquals( $value, $ret );
-               $this->assertEquals( 3, $calls, 'Callback was not used (mutex not acquired)' );
+               $this->assertEquals( 2, $calls, 'Callback was not used (mutex not acquired)' );
+
+               $mockWallClock += 301; // physical TTL expired
+               // Acquire a lock to verify that getWithSetCallback uses lockTSE properly
+               $this->internalCache->add( $cache::MUTEX_KEY_PREFIX . $key, 1, 0 );
+
+               $ret = $cache->getWithSetCallback( $key, 300, $func, [ 'lockTSE' => 5 ] );
+               $this->assertEquals( $value, $ret );
+               $this->assertEquals( 3, $calls, 'Callback was used (mutex not acquired, not in cache)' );
 
                $calls = 0;
-               $func2 = function ( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value, $priorTime ) {
+               $func2 = function ( $oldValue, &$ttl, &$setOpts ) use ( &$calls, $value ) {
                        ++$calls;
                        $setOpts['lag'] = 15;
                        return $value;
@@ -982,6 +1013,9 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $value = wfRandomString();
                $busyValue = wfRandomString();
 
+               $mockWallClock = 1549343530.2053;
+               $cache->setMockTime( $mockWallClock );
+
                $calls = 0;
                $func = function () use ( &$calls, $value, $cache, $key ) {
                        ++$calls;
@@ -992,6 +1026,8 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $this->assertEquals( $value, $ret );
                $this->assertEquals( 1, $calls, 'Value was populated' );
 
+               $mockWallClock += 0.2; // interim keys not brand new
+
                // Acquire a lock to verify that getWithSetCallback uses busyValue properly
                $this->internalCache->add( $cache::MUTEX_KEY_PREFIX . $key, 1, 0 );
 
@@ -1013,6 +1049,7 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $this->assertEquals( 2, $calls, 'Callback was not used; used busy value' );
 
                $this->internalCache->delete( $cache::MUTEX_KEY_PREFIX . $key );
+               $mockWallClock += 0.001; // cached values will be newer than tombstone
                $ret = $cache->getWithSetCallback( $key, 30, $func,
                        [ 'lockTSE' => 30, 'busyValue' => $busyValue, 'checkKeys' => $checkKeys ] );
                $this->assertEquals( $value, $ret, 'Callback was used; saved interim' );
@@ -1333,6 +1370,9 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
        public function testInterimHoldOffCaching() {
                $cache = $this->cache;
 
+               $mockWallClock = 1549343530.2053;
+               $cache->setMockTime( $mockWallClock );
+
                $value = 'CRL-40-940';
                $wasCalled = 0;
                $func = function () use ( &$wasCalled, $value ) {
@@ -1347,10 +1387,16 @@ class WANObjectCacheTest extends PHPUnit\Framework\TestCase {
                $v = $cache->getWithSetCallback( $key, 60, $func );
                $v = $cache->getWithSetCallback( $key, 60, $func );
                $this->assertEquals( 1, $wasCalled, 'Value cached' );
+
                $cache->delete( $key );
+               $mockWallClock += 0.001; // cached values will be newer than tombstone
                $v = $cache->getWithSetCallback( $key, 60, $func );
                $this->assertEquals( 2, $wasCalled, 'Value regenerated (got mutex)' ); // sets interim
                $v = $cache->getWithSetCallback( $key, 60, $func );
+               $this->assertEquals( 2, $wasCalled, 'Value interim cached' ); // reuses interim
+
+               $mockWallClock += 0.2; // interim key not brand new
+               $v = $cache->getWithSetCallback( $key, 60, $func );
                $this->assertEquals( 3, $wasCalled, 'Value regenerated (got mutex)' ); // sets interim
                // Lock up the mutex so interim cache is used
                $this->internalCache->add( $cache::MUTEX_KEY_PREFIX . $key, 1, 0 );
index cb8257c..af2b9b7 100644 (file)
@@ -397,7 +397,6 @@ EOF
                $a->addHeadItem( '<foo1>' );
                $a->addHeadItem( '<bar1>', 'bar' );
                $a->addModules( 'test-module-a' );
-               $a->addModuleScripts( 'test-module-script-a' );
                $a->addModuleStyles( 'test-module-styles-a' );
                $b->addJsConfigVars( 'test-config-var-a', 'a' );
 
@@ -406,7 +405,6 @@ EOF
                $b->addHeadItem( '<foo2>' );
                $b->addHeadItem( '<bar2>', 'bar' );
                $b->addModules( 'test-module-b' );
-               $b->addModuleScripts( 'test-module-script-b' );
                $b->addModuleStyles( 'test-module-styles-b' );
                $b->addJsConfigVars( 'test-config-var-b', 'b' );
                $b->addJsConfigVars( 'test-config-var-a', 'X' );
@@ -421,10 +419,6 @@ EOF
                                'test-module-a',
                                'test-module-b',
                        ],
-                       'getModuleScripts' => [
-                               'test-module-script-a',
-                               'test-module-script-b',
-                       ],
                        'getModuleStyles' => [
                                'test-module-styles-a',
                                'test-module-styles-b',
index 70056ba..8fdf5dd 100644 (file)
@@ -106,7 +106,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
         * @covers ResourceLoaderClientHtml::__construct
         * @covers ResourceLoaderClientHtml::setModules
         * @covers ResourceLoaderClientHtml::setModuleStyles
-        * @covers ResourceLoaderClientHtml::setModuleScripts
         * @covers ResourceLoaderClientHtml::getData
         * @covers ResourceLoaderClientHtml::getContext
         */
@@ -132,13 +131,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
                        'test.styles.deprecated',
                        'test.unregistered.styles',
                ] );
-               $client->setModuleScripts( [
-                       'test.scripts',
-                       'test.scripts.user',
-                       'test.scripts.user.empty',
-                       'test.scripts.shouldembed',
-                       'test.unregistered.scripts',
-               ] );
 
                $expected = [
                        'states' => [
@@ -151,10 +143,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
                                'test.styles.private' => 'ready',
                                'test.styles.shouldembed' => 'ready',
                                'test.styles.deprecated' => 'ready',
-                               'test.scripts' => 'loading',
-                               'test.scripts.user' => 'loading',
-                               'test.scripts.user.empty' => 'ready',
-                               'test.scripts.shouldembed' => 'loading',
                        ],
                        'general' => [
                                'test',
@@ -163,11 +151,6 @@ class ResourceLoaderClientHtmlTest extends PHPUnit\Framework\TestCase {
                                'test.styles.pure',
                                'test.styles.deprecated',
                        ],
-                       'scripts' => [
-                               'test.scripts',
-                               'test.scripts.user',
-                               'test.scripts.shouldembed',
-                       ],
                        'embed' => [
                                'styles' => [ 'test.styles.private', 'test.styles.shouldembed' ],
                                'general' => [
@@ -213,9 +196,6 @@ Deprecation message.' ]
                        'test.styles.private',
                        'test.styles.deprecated',
                ] );
-               $client->setModuleScripts( [
-                       'test.scripts',
-               ] );
                $client->setExemptStates( [
                        'test.exempt' => 'ready',
                ] );
@@ -224,10 +204,9 @@ Deprecation message.' ]
                $expected = '<script>document.documentElement.className = document.documentElement.className.replace( /(^|\s)client-nojs(\s|$)/, "$1client-js$2" );</script>' . "\n"
                        . '<script>(window.RLQ=window.RLQ||[]).push(function(){'
                        . 'mw.config.set({"key":"value"});'
-                       . 'mw.loader.state({"test.exempt":"ready","test.private":"loading","test.styles.pure":"ready","test.styles.private":"ready","test.styles.deprecated":"ready","test.scripts":"loading"});'
+                       . 'mw.loader.state({"test.exempt":"ready","test.private":"loading","test.styles.pure":"ready","test.styles.private":"ready","test.styles.deprecated":"ready"});'
                        . 'mw.loader.implement("test.private@{blankVer}",null,{"css":[]});'
                        . 'RLPAGEMODULES=["test"];mw.loader.load(RLPAGEMODULES);'
-                       . 'mw.loader.load("/w/load.php?debug=false\u0026lang=nl\u0026modules=test.scripts\u0026only=scripts\u0026skin=fallback");'
                        . '});</script>' . "\n"
                        . '<link rel="stylesheet" href="/w/load.php?debug=false&amp;lang=nl&amp;modules=test.styles.deprecated%2Cpure&amp;only=styles&amp;skin=fallback"/>' . "\n"
                        . '<style>.private{}</style>' . "\n"
@@ -312,9 +291,6 @@ Deprecation message.' ]
                $client->setModuleStyles( [
                        'test.styles.deprecated',
                ] );
-               $client->setModuleScripts( [
-                       'test.scripts',
-               ] );
                // phpcs:disable Generic.Files.LineLength
                $expected = '<script>(window.RLQ=window.RLQ||[]).push(function(){'
                        . 'mw.log.warn("This page is using the deprecated ResourceLoader module \"test.styles.deprecated\".\nDeprecation message.");'
index d6ede4f..4969a8b 100644 (file)
@@ -41,7 +41,6 @@ return [
                        'tests/qunit/suites/resources/jquery/jquery.color.test.js',
                        'tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js',
                        'tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js',
-                       'tests/qunit/suites/resources/jquery/jquery.hidpi.test.js',
                        'tests/qunit/suites/resources/jquery/jquery.highlightText.test.js',
                        'tests/qunit/suites/resources/jquery/jquery.lengthLimit.test.js',
                        'tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js',
@@ -101,7 +100,6 @@ return [
                        'jquery.color',
                        'jquery.colorUtil',
                        'jquery.getAttrs',
-                       'jquery.hidpi',
                        'jquery.highlightText',
                        'jquery.lengthLimit',
                        'jquery.makeCollapsible',
diff --git a/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js b/tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
deleted file mode 100644 (file)
index cb09180..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-( function () {
-       QUnit.module( 'jquery.hidpi', QUnit.newMwEnvironment() );
-
-       QUnit.test( 'devicePixelRatio', function ( assert ) {
-               var devicePixelRatio = $.devicePixelRatio();
-               assert.strictEqual( typeof devicePixelRatio, 'number', '$.devicePixelRatio() returns a number' );
-       } );
-
-       QUnit.test( 'bracketedDevicePixelRatio', function ( assert ) {
-               var ratio = $.bracketedDevicePixelRatio();
-               assert.strictEqual( typeof ratio, 'number', '$.bracketedDevicePixelRatio() returns a number' );
-       } );
-
-       QUnit.test( 'bracketDevicePixelRatio', function ( assert ) {
-               assert.strictEqual( $.bracketDevicePixelRatio( 0.75 ), 1, '0.75 gives 1' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 1 ), 1, '1 gives 1' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 1.25 ), 1.5, '1.25 gives 1.5' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 1.5 ), 1.5, '1.5 gives 1.5' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 1.75 ), 2, '1.75 gives 2' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 2 ), 2, '2 gives 2' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 2.5 ), 2, '2.5 gives 2' );
-               assert.strictEqual( $.bracketDevicePixelRatio( 3 ), 2, '3 gives 2' );
-       } );
-
-       QUnit.test( 'matchSrcSet', function ( assert ) {
-               var srcset = 'onefive.png 1.5x, two.png 2x';
-
-               // Nice exact matches
-               assert.strictEqual( $.matchSrcSet( 1, srcset ), null, '1.0 gives no match' );
-               assert.strictEqual( $.matchSrcSet( 1.5, srcset ), 'onefive.png', '1.5 gives match' );
-               assert.strictEqual( $.matchSrcSet( 2, srcset ), 'two.png', '2 gives match' );
-
-               // Non-exact matches; should return the next-biggest specified
-               assert.strictEqual( $.matchSrcSet( 1.25, srcset ), null, '1.25 gives no match' );
-               assert.strictEqual( $.matchSrcSet( 1.75, srcset ), 'onefive.png', '1.75 gives match to 1.5' );
-               assert.strictEqual( $.matchSrcSet( 2.25, srcset ), 'two.png', '2.25 gives match to 2' );
-       } );
-}() );
index 458df92..aafcd5b 100644 (file)
@@ -3,7 +3,7 @@
 
        // TODO: verify checkboxes == [ 'nsassociated', 'nsinvert' ]
 
-       QUnit.test( '"all" namespace disable checkboxes', function ( assert ) {
+       QUnit.test( '"all" namespace hides checkboxes', function ( assert ) {
                var selectHtml, $env, $options,
                        rc = require( 'mediawiki.special.recentchanges' );
 
                        + '<option value="4">ProjectName</option>'
                        + '<option value="5">ProjectName talk</option>'
                        + '</select>'
+                       + '<span class="mw-input-with-label mw-input-hidden">'
                        + '<input name="invert" type="checkbox" value="1" id="nsinvert" title="no title" />'
                        + '<label for="nsinvert" title="no title">Invert selection</label>'
+                       + '</span>'
+                       + '<span class="mw-input-with-label mw-input-hidden">'
                        + '<input name="associated" type="checkbox" value="1" id="nsassociated" title="no title" />'
                        + '<label for="nsassociated" title="no title">Associated namespace</label>'
+                       + '</span>'
                        + '<input type="submit" value="Go" />'
                        + '<input type="hidden" value="Special:RecentChanges" name="title" />';
 
 
                // TODO abstract the double strictEquals
 
-               // At first checkboxes are enabled
-               assert.strictEqual( $( '#nsinvert' ).prop( 'disabled' ), false );
-               assert.strictEqual( $( '#nsassociated' ).prop( 'disabled' ), false );
+               // At first checkboxes are hidden
+               assert.strictEqual( $( '#nsinvert' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
+               assert.strictEqual( $( '#nsassociated' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
 
                // Initiate the recentchanges module
                rc.init();
 
                // By default
-               assert.strictEqual( $( '#nsinvert' ).prop( 'disabled' ), true );
-               assert.strictEqual( $( '#nsassociated' ).prop( 'disabled' ), true );
+               assert.strictEqual( $( '#nsinvert' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
+               assert.strictEqual( $( '#nsassociated' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
 
                // select second option...
                $options = $( '#namespace' ).find( 'option' );
                $options.eq( 1 ).prop( 'selected', true );
                $( '#namespace' ).trigger( 'change' );
 
-               // ... and checkboxes should be enabled again
-               assert.strictEqual( $( '#nsinvert' ).prop( 'disabled' ), false );
-               assert.strictEqual( $( '#nsassociated' ).prop( 'disabled' ), false );
+               // ... and checkboxes should be visible again
+               assert.strictEqual( $( '#nsinvert' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), false );
+               assert.strictEqual( $( '#nsassociated' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), false );
 
                // select first option ( 'all' namespace)...
                $options.eq( 1 ).removeProp( 'selected' );
                $options.eq( 0 ).prop( 'selected', true );
                $( '#namespace' ).trigger( 'change' );
 
-               // ... and checkboxes should now be disabled
-               assert.strictEqual( $( '#nsinvert' ).prop( 'disabled' ), true );
-               assert.strictEqual( $( '#nsassociated' ).prop( 'disabled' ), true );
+               // ... and checkboxes should now be hidden
+               assert.strictEqual( $( '#nsinvert' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
+               assert.strictEqual( $( '#nsassociated' ).closest( '.mw-input-with-label' ).hasClass( 'mw-input-hidden' ), true );
 
                // DOM cleanup
                $env.remove();