Merge "ApiSandbox: Better handling of parsed messages"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 1 Dec 2016 22:17:02 +0000 (22:17 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 1 Dec 2016 22:17:02 +0000 (22:17 +0000)
224 files changed:
HISTORY
RELEASE-NOTES-1.28 [deleted file]
RELEASE-NOTES-1.29
autoload.php
composer.json
includes/CategoryViewer.php
includes/DefaultSettings.php
includes/Message.php
includes/OutputPage.php
includes/Preferences.php
includes/PrefixSearch.php
includes/Setup.php
includes/actions/CreditsAction.php
includes/actions/HistoryAction.php
includes/actions/InfoAction.php
includes/actions/MarkpatrolledAction.php
includes/api/ApiCheckToken.php
includes/api/ApiClearHasMsg.php
includes/api/ApiPageSet.php
includes/api/ApiQuerySearch.php
includes/api/i18n/fr.json
includes/auth/LocalPasswordPrimaryAuthenticationProvider.php
includes/cache/CacheHelper.php
includes/cache/MessageCache.php
includes/changetags/ChangeTagsLogItem.php
includes/debug/logger/monolog/LogstashFormatter.php [new file with mode: 0644]
includes/debug/logger/monolog/WikiProcessor.php
includes/filerepo/file/File.php
includes/http/CurlHttpRequest.php
includes/http/Http.php
includes/http/MWHttpRequest.php
includes/http/PhpHttpRequest.php
includes/installer/DatabaseUpdater.php
includes/libs/CookieJar.php
includes/libs/rdbms/connectionmanager/ConnectionManager.php [new file with mode: 0644]
includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php [new file with mode: 0644]
includes/libs/rdbms/database/IDatabase.php
includes/logging/BlockLogFormatter.php
includes/logging/ContentModelLogFormatter.php
includes/logging/DeleteLogFormatter.php
includes/logging/LogEventsList.php
includes/media/Bitmap.php
includes/media/DjVu.php
includes/media/Jpeg.php
includes/media/MediaTransformOutput.php
includes/media/SVG.php
includes/media/TransformationalImageHandler.php
includes/page/ImageHistoryPseudoPager.php
includes/page/WikiPage.php
includes/password/ParameterizedPassword.php
includes/password/Password.php
includes/specialpage/LoginSignupSpecialPage.php
includes/specials/SpecialAllPages.php
includes/specials/SpecialAncientpages.php
includes/specials/SpecialBlock.php
includes/specials/SpecialBrokenRedirects.php
includes/specials/SpecialDoubleRedirects.php
includes/specials/SpecialEditTags.php
includes/specials/SpecialEmailuser.php
includes/specials/SpecialFewestrevisions.php
includes/specials/SpecialFileDuplicateSearch.php
includes/specials/SpecialImport.php
includes/specials/SpecialListgrants.php
includes/specials/SpecialListgrouprights.php
includes/specials/SpecialMIMEsearch.php
includes/specials/SpecialMediaStatistics.php
includes/specials/SpecialMergeHistory.php
includes/specials/SpecialMostcategories.php
includes/specials/SpecialMostinterwikis.php
includes/specials/SpecialMostlinked.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUserrights.php
includes/specials/pagers/CategoryPager.php
includes/user/User.php
languages/i18n/af.json
languages/i18n/ast.json
languages/i18n/azb.json
languages/i18n/ba.json
languages/i18n/be-tarask.json
languages/i18n/be.json
languages/i18n/bn.json
languages/i18n/ce.json
languages/i18n/cs.json
languages/i18n/da.json
languages/i18n/diq.json
languages/i18n/dty.json
languages/i18n/en.json
languages/i18n/es.json
languages/i18n/et.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/hy.json
languages/i18n/it.json
languages/i18n/kk-cyrl.json
languages/i18n/ko.json
languages/i18n/mr.json
languages/i18n/nah.json
languages/i18n/pl.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/roa-tara.json
languages/i18n/sah.json
languages/i18n/sl.json
languages/i18n/te.json
languages/i18n/tr.json
languages/i18n/udm.json
languages/i18n/uk.json
languages/i18n/vi.json
languages/i18n/yo.json
languages/messages/MessagesMdf.php
languages/messages/MessagesRoa_tara.php
languages/messages/MessagesUk.php
maintenance/jsduck/categories.json
maintenance/populateContentModel.php
maintenance/protect.php
resources/Resources.php
resources/lib/oojs-ui/i18n/el.json
resources/lib/oojs-ui/oojs-ui-apex.js
resources/lib/oojs-ui/oojs-ui-core-apex.css
resources/lib/oojs-ui/oojs-ui-core-mediawiki.css
resources/lib/oojs-ui/oojs-ui-core.js
resources/lib/oojs-ui/oojs-ui-mediawiki.js
resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
resources/lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
resources/lib/oojs-ui/oojs-ui-toolbars.js
resources/lib/oojs-ui/oojs-ui-widgets-apex.css
resources/lib/oojs-ui/oojs-ui-widgets-mediawiki.css
resources/lib/oojs-ui/oojs-ui-widgets.js
resources/lib/oojs-ui/oojs-ui-windows-apex.css
resources/lib/oojs-ui/oojs-ui-windows-mediawiki.css
resources/lib/oojs-ui/oojs-ui-windows.js
resources/lib/oojs-ui/themes/mediawiki/icons-alerts.json
resources/lib/oojs-ui/themes/mediawiki/icons-content.json
resources/lib/oojs-ui/themes/mediawiki/icons-editing-advanced.json
resources/lib/oojs-ui/themes/mediawiki/icons-editing-core.json
resources/lib/oojs-ui/themes/mediawiki/icons-editing-list.json
resources/lib/oojs-ui/themes/mediawiki/icons-editing-styling.json
resources/lib/oojs-ui/themes/mediawiki/icons-interactions.json
resources/lib/oojs-ui/themes/mediawiki/icons-layout.json
resources/lib/oojs-ui/themes/mediawiki/icons-location.json
resources/lib/oojs-ui/themes/mediawiki/icons-media.json
resources/lib/oojs-ui/themes/mediawiki/icons-moderation.json
resources/lib/oojs-ui/themes/mediawiki/icons-movement.json
resources/lib/oojs-ui/themes/mediawiki/icons-user.json
resources/lib/oojs-ui/themes/mediawiki/icons-wikimedia.json
resources/lib/oojs-ui/themes/mediawiki/icons.json
resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.png
resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.svg
resources/lib/oojs-ui/themes/mediawiki/indicators.json
resources/lib/qunitjs/qunit.css
resources/lib/qunitjs/qunit.js
resources/src/mediawiki.action/mediawiki.action.history.styles.css
resources/src/mediawiki.action/mediawiki.action.view.filepage.css
resources/src/mediawiki.language/mediawiki.language.numbers.js
resources/src/mediawiki.legacy/shared.css
resources/src/mediawiki.less/mediawiki.ui/variables.less
resources/src/mediawiki.skinning/content.css
resources/src/mediawiki.skinning/elements.css
resources/src/mediawiki.skinning/interface.css
resources/src/mediawiki.special/mediawiki.special.search.styles.css
resources/src/mediawiki.widgets/MediaSearch/broken-image.png [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.css [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.css [new file with mode: 0644]
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js [new file with mode: 0644]
resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
resources/src/mediawiki/api.js
resources/src/mediawiki/mediawiki.storage.js
resources/src/mediawiki/page/gallery.css
tests/common/TestsAutoLoader.php
tests/integration/includes/http/CurlHttpRequestTest.php [new file with mode: 0644]
tests/integration/includes/http/MWHttpRequestTestCase.php [new file with mode: 0644]
tests/integration/includes/http/PhpHttpRequestTest.php [new file with mode: 0644]
tests/phpunit/data/localisationcache/ba.json [new file with mode: 0644]
tests/phpunit/data/localisationcache/en.json
tests/phpunit/data/localisationcache/ru.json
tests/phpunit/data/localisationcache/uk.json [deleted file]
tests/phpunit/includes/HttpTest.php [deleted file]
tests/phpunit/includes/MessageTest.php
tests/phpunit/includes/PrefixSearchTest.php
tests/phpunit/includes/auth/LocalPasswordPrimaryAuthenticationProviderTest.php
tests/phpunit/includes/cache/LocalisationCacheTest.php
tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php [new file with mode: 0644]
tests/phpunit/includes/http/HttpTest.php [new file with mode: 0644]
tests/phpunit/includes/installer/DatabaseUpdaterTest.php [deleted file]
tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php [new file with mode: 0644]
tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php [new file with mode: 0644]
tests/phpunit/includes/registration/ExtensionRegistryTest.php
tests/phpunit/includes/search/SearchEnginePrefixTest.php
tests/qunit/suites/resources/mediawiki.api/mediawiki.ForeignApi.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.category.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.messages.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.options.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.parse.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.upload.test.js
tests/qunit/suites/resources/mediawiki.api/mediawiki.api.watch.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.language.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.storage.test.js
thumb.php

diff --git a/HISTORY b/HISTORY
index 6de7de4..28a9b86 100644 (file)
--- a/HISTORY
+++ b/HISTORY
@@ -1,4 +1,328 @@
-Change notes from older releases. For current info see RELEASE-NOTES-1.28.
+Change notes from older releases. For current info see RELEASE-NOTES-1.29.
+
+== MediaWiki 1.28 ==
+
+=== Changes since 1.28.0-rc1 ===
+* (T148957) Replace wgShowExceptionDetails with wgShowDBErrorBacktrace on db
+  errors.
+* (T148956) Only apply wgDBschema to postgres/mssql.
+* (T145991) Introduce separate log action for deleting pages on move.
+* (T141474) (T110464) Bypass login page if no user input is required.
+
+=== Changes since 1.28.0-rc0 ===
+* (T142210) The changes to move the parser "NewPP limit report" from a HTML
+  comment to a machine-readable JavaScript config option 'wgPageParseReport'
+  have been undone. They caused the human-readable limit report to be shown
+  incompletely or not at all. ParserOutput::setLimitReportData() and
+  getLimitReportData() behave as they did in MediaWiki 1.27 again.
+* (T149510) Value of {{DISPLAYTITLE:}} parser function will not be used for
+  the text of subheadings on a category page when creating it. This wasn't
+  working correctly.
+* (T106793) MediaWiki will no longer try to perform a HTTP redirect to the
+  canonical pretty URL when a non-pretty URL is used. It resulted in redirect
+  loops in some clients and in some server configurations. This undoes a change
+  made in MediaWiki 1.26.
+* (T149759) manifest_version: 2 was removed.
+
+=== Configuration changes in 1.28 ===
+* $wgSend404Code now affects status code of action=history if the page is not there.
+* BREAKING CHANGE: $wgHTTPProxy is now *required* for all external requests
+  made by MediaWiki via a proxy. Relying on the http_proxy environment
+  variable is no longer supported.
+* The load.php entry point now enforces the existing policy of not allowing
+  access to session data, which includes the session user and the session
+  user's language. If such access is attempted, an exception will be thrown.
+* The number of internal PBKDF2 iterations used to derive the session secret
+  is configurable via $wgSessionPbkdf2Iterations.
+* Upload dialog's file upload log comment can now be configured separately for
+  local and foreign uploads.
+* $wgForeignUploadTargets now defaults to `[ 'local' ]`, where `'local'`
+  signifies local uploads. A value of `[]` (empty array) now means that
+  no upload targets are allowed, effectively disabling the upload dialog.
+* The deprecated $wgEditEncoding variable has been removed; it was only used
+  for Esperanto language character conversion. You are now recommended to use
+  input methods provided by the UniversalLanguageSelector extension.
+* When $wgPingback is true, MediaWiki will periodically ping
+  https://www.mediawiki.org/beacon with basic information about the local
+  MediaWiki installation. This data includes, for example, the type of system,
+  PHP version, and chosen database backend. This behavior is off by default.
+* When $wgEditSubmitButtonLabelPublish is true, MediaWiki will label the button
+  to store-to-database-and-show-to-others as "Publish page"/"Publish changes";
+  if false, the default, they will be "Save page"/"Save changes".
+* The 'editcontentmodel' permission is now granted to all logged-in users ('user').
+  instead of just administrators ('sysop'). Documentation for this feature is
+  available at <https://www.mediawiki.org/wiki/Help:ChangeContentModel>.
+* $wgRevisionCacheExpiry is now set to one week by default instead of being disabled.
+* Magic links are now disabled by default, and can be re-enabled by modifying the value
+  of $wgEnableMagicLinks. Their usage is discouraged, but if they are manually enabled,
+  a tracking category will be added to help identify usage and make it easier to migrate
+  away from. If you depend upon magic link functionality, it is requested that you comment
+  on <https://www.mediawiki.org/wiki/Requests_for_comment/Future_of_magic_links> and
+  explain your use case(s).
+* New config variable $wgCSPFalsePositiveUrls to control what URLs to ignore
+  in upcoming Content-Security-Policy feature's reporting.
+
+=== New features in 1.28 ===
+* User::isBot() method for checking if an account is a bot role account.
+* Added a new 'slideshow' mode for galleries.
+* Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with API parsing.
+* Added a new hook, 'UploadVerifyUpload', which can be used to reject a file
+  upload. Unlike 'UploadVerifyFile' it provides information about upload comment
+  and the file description page, but does not run for uploads to stash.
+* (T141604) Extensions can now provide a better error message when their
+  maintenance scripts are run without the extension being installed.
+* (T8948) Numeric sorting in categories is now supported by setting $wgCategoryCollation
+  to 'uca-default-u-kn' or 'uca-<langcode>-u-kn'. If you can't use UCA collations,
+  a 'numeric' collation is also available. If migrating from another
+  collation, you will need to run the updateCollation.php maintenance script.
+* Two new codes have been added to #time parser function: "xit" for days in current
+  month, and "xiz" for days passed in the year, both in Iranian calendar.
+* mw.Api has a new option, useUS, to use U+001F (Unit Separator) when
+  appropriate for sending multi-valued parameters. This defaults to true when
+  the mw.Api instance seems to be for the local wiki.
+* After a client performs an action which alters a database that has replica databases,
+  MediaWiki will wait for the replica databases to synchronize with the master database
+  while it renders the HTML output. However, if the output is a redirect to another wiki
+  on the wiki farm with a different domain, MediaWiki will instead alter the redirect
+  URL to include a ?cpPosTime parameter that triggers the database synchronization when
+  the URL is followed by the client. The same-domain case uses a new cpPosTime cookie.
+* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
+  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
+  'show' parameters to existing API query modules.
+
+=== External library changes in 1.28 ===
+
+==== Upgraded external libraries ====
+* Updated es5-shim from v4.1.5 to v4.5.8
+* Updated composer/semver from v1.4.1 to v1.4.2
+* Updated wikimedia/php-session-serializer from v1.0.3 to v1.0.4
+
+==== New external libraries ====
+* Added wikimedia/scoped-callback v1.0.0
+* Added wikimedia/wait-condition-loop v1.0.1
+
+=== Bug fixes in 1.28 ===
+* (T146496) action=history pages should return 404 HTTP error code if the page does not exist
+* (T137264) SECURITY: XSS in unclosed internal links
+* (T133147) SECURITY: Escape '<' and ']]>' in inline <style> blocks
+* (T133147) SECURITY: Require login to preview user CSS pages
+* (T132926) SECURITY: Do not allow undeleting a revision deleted file if it is
+  the top file
+* (T129738) SECURITY: Make $wgBlockDisablesLogin also restrict logged in
+  permissions
+* (T129738) SECURITY: Make blocks log users out if $wgBlockDisablesLogin is true
+* (T139670) Move 'UserGetRights' call before application of
+  Session::getAllowedUserRights()
+
+=== Action API changes in 1.28 ===
+* Added 'maxarticlesize' property to action=query&meta=siteinfo which contains
+  the value of $wgMaxArticleSize.
+* Property 'modulemessages' from action=parse&prop=modules was removed
+  (deprecated since 1.26).
+* The following response properties from action=login, deprecated in 1.27, are
+  now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies
+  to properly manage session state.
+* Submitting the lgtoken and lgpassword parameters in the query string to
+  action=login is now deprecated and outputs a warning. They should be submitted
+  in the POST body instead.
+* Submitting sensitive authentication request parameters to action=clientlogin,
+  action=createaccount, action=linkaccount, and action=changeauthenticationdata
+  in the query string is now deprecated and outputs a warning. They should be
+  submitted in the POST body instead.
+* (T141960) Multi-valued parameters may now be separated using U+001F (Unit Separator)
+  instead of the pipe character. This will be useful if some of the multiple
+  values need to contain pipes, e.g. for action=options.
+* The API will now warn if input is not NFC-normalized Unicode or if it
+  contains invalid characters.
+* The 'normalized' list output by action=query and other modules that use
+  ApiPageSet may contain entries where the 'from' value is percent-encoded as
+  the raw value cannot be represented in a valid API response. These are
+  indicated by a 'fromencoded' boolean alongside the existing 'from' parameter.
+* (T28680) action=paraminfo can now return info about all submodules of a
+  module without listing them all explicitly.
+* (T146770) It is now possible to assert that the current user is a specific
+  named user, using the 'assertuser' parameter.
+* (T141963) Added a 'known' property when missing-but-known titles (e.g. from
+  the 'TitleIsAlwaysKnown' hook) are output in various modules.
+
+=== Action API internal changes in 1.28 ===
+* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
+  interact with ApiParse and ApiExpandTemplates.
+* (T139565) SECURITY: API: Generate head items in the context of the given title
+* (T115333) SECURITY: Check read permission when loading page content in ApiParse
+* ApiBase::getResultData() was removed (deprecated since 1.25)
+* ApiBase::makeHelpArrayToString() was removed (deprecated since 1.25)
+* ApiBase::makeHelpMsgParameters() was removed (deprecated since 1.25)
+* ApiBase::makeHelpMsg() was removed (deprecated since 1.25)
+* ApiFormatBase::formatHTML() was removed (deprecated since 1.25)
+* ApiFormatBase::getNeedsRawData() was removed (deprecated since 1.25)
+* ApiFormatBase::getWantsHelp() was removed (deprecated since 1.25)
+* ApiFormatBase::setBufferResult() was removed (deprecated since 1.25)
+* ApiFormatBase::setHelp() was removed (deprecated since 1.25)
+* ApiFormatBase::setUnescapeAmps() was removed (deprecated since 1.25)
+* ApiMain::makeHelpMsgHeader() was removed (deprecated since 1.25)
+* ApiMain::reallyMakeHelpMsg() was removed (deprecated since 1.25)
+* ApiMain::setHelp() was removed (deprecated since 1.25)
+* ApiResult::beginContinuation() was removed (deprecated since 1.25)
+* ApiResult::cleanUpUTF8() was removed (deprecated since 1.25)
+* ApiResult::convertStatusToArray() was removed (deprecated since 1.25)
+* ApiResult::disableSizeCheck() was removed (deprecated since 1.24)
+* ApiResult::enableSizeCheck() was removed (deprecated since 1.24)
+* ApiResult::endContinuation() was removed (deprecated since 1.25)
+* ApiResult::getData() was removed (deprecated since 1.25)
+* ApiResult::getIsRawMode() was removed (deprecated since 1.25)
+* ApiResult::setContent() was removed (deprecated since 1.25)
+* ApiResult::setContinueParam() was removed (deprecated since 1.25)
+* ApiResult::setElement() was removed (deprecated since 1.25)
+* ApiResult::setGeneratorContinueParam() was removed (deprecated since 1.25)
+* ApiResult::setIndexedTagName_internal() was removed (deprecated since 1.25)
+* ApiResult::setIndexedTagName_recursive() was removed (deprecated since 1.25)
+* ApiResult::setMainForContinuation() was removed (deprecated since 1.25)
+* ApiResult::setParsedLimit() was removed (deprecated since 1.25)
+* ApiResult::setRawMode() was removed (deprecated since 1.25)
+* ApiResult::size() was removed (deprecated since 1.25)
+* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
+  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
+  'show' parameters to existing API query modules. A query module can enable
+  these hooks by passing an array for $hookData to ApiQueryBase::select() and
+  by calling ApiQueryBase->processRow() before adding a row's data to the
+  result.
+
+=== Languages updated in 1.28 ===
+
+MediaWiki supports over 375 languages. Many localisations are updated
+regularly. Below only new and removed languages are listed, as well as
+changes to languages because of Phabricator reports.
+
+* (T137411) ban (Balinese), thanks to translators Adi Mayndra, Andru,
+  BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라.
+* (T135867) shn (Shan), thanks to translators Khun Sar, Piangpha,
+  Saiddzone Saimawnkham, Saosukham, and Sengwan.
+* Czech (cs) and Slovak (sk) set as reciprocal fallbacks.
+* (T146744) Livvi-Karelian (olo) namespace messages created thanks to translator Ilja.mos.
+
+=== Other changes in 1.28 ===
+* (T128697) Improved handling of large diffs.
+* [BREAKING CHANGE] $wgExtendedLoginCookies has been removed. You can
+  use or update a custom session provider if needed.
+* Deprecated APIEditBeforeSave hook in favor of EditFilterMergedContent.
+* The 'UploadVerification' hook is deprecated. Use 'UploadVerifyFile' instead.
+* SiteConfiguration::isLocalVHost() was removed (deprecated since 1.25).
+* The 'UserLoginComplete' hook has a new parameter to differentiate between actual
+  login and visiting the login page while already logged in.
+* ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24).
+* $.fn.liveAndTestAtStart was removed (deprecated since 1.24).
+* mw.util.tooltipAccessKeyPrefix was removed (deprecated since 1.24).
+* mw.util.tooltipAccessKeyRegexp was removed (deprecated since 1.24).
+* Linker::link() and Linker::linkKnown() were deprecated; please instead use
+  MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
+  were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
+  respectively. See docs/hooks.txt for the specific changes needed for those hooks.
+* Linker::formatSize() was deprecated. Use Language::formatSize() directly.
+* Aliases for Linker methods, deprecated since 1.21, were removed from Skin:
+  * Skin::commentBlock() (use Linker::commentBlock() instead)
+  * Skin::generateRollback() (use Linker::generateRollback() instead)
+  * Skin::link() (use MediaWiki\Linker\LinkRenderer instead)
+  * Skin::linkKnown() (use MediaWiki\Linker\LinkRenderer instead)
+  * Skin::userLink() (use Linker::userLink() instead)
+  * Skin::userToolLinks() (use Linker::userToolLinks() instead)
+* Disabled "bug 2702" HTML tidying of parsed UI messages on wikis where Tidy is
+  disabled.
+* DifferenceEngine::generateDiffBody() was removed (deprecated since 1.21).
+* UploadBase::stashFileGetKey() and UploadBase::stashSession() were deprecated.
+  Use ...->stashFile()->getFileKey() instead.
+* "Public domain" was removed as a wiki license option from the installer, in
+  favour of CC-0.
+* AuthenticationRequest::$required is now changed from REQUIRED to PRIMARY_REQUIRED
+  on requests needed by primary providers even if all primaries need them.
+  Primary providers are discouraged from returning multiple REQUIRED requests.
+* OOjs UI PHP widgets constructed with the `'infusable' => true` config option
+  will no longer be automatically infused. You should call `OO.ui.infuse()`
+  on them yourself from your JavaScript code.
+* parserTests.php has moved to tests/parser/parserTests.php
+* The command line options specific to parser tests have been removed from
+  phpunit.php: --regex and --keep-uploads. Instead of --regex, use --filter.
+  Instead of --keep-uploads, use the same option to parserTests.php, but you
+  must specify a directory with --upload-dir.
+* The 'jquery.arrowSteps' ResourceLoader module is now deprecated.
+* IP::isConfiguredProxy() and IP::isTrustedProxy() were removed. Callers should
+  migrate to using the same functions on a ProxyLookup instance, obtainable from
+  MediaWikiServices.
+* The ArticleAfterFetchContent, ArticleInsertComplete, ArticleSave, ArticleSaveComplete,
+  ArticleViewCustom, EditFilterMerged, EditPageGetDiffText, EditPageGetPreviewText and
+  ShowRawCssJs hooks will now emit deprecation warnings if used.
+* (T68404) CSS3 attr() function with url type is no longer allowed
+  in inline styles.
+* Database::getSearchEngine() is deprecated, use SearchEngineFactory::getSearchEngineClass
+  instead.
+
+== Compatibility ==
+
+MediaWiki 1.28 requires PHP 5.5.9 or later. There is experimental support for
+HHVM 3.6.5 or later.
+
+MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
+support for them is somewhat less mature. There is experimental support for
+Oracle and Microsoft SQL Server.
+
+The supported versions are:
+
+* MySQL 5.0.3 or later
+* PostgreSQL 8.3 or later
+* SQLite 3.3.7 or later
+* Oracle 9.0.1 or later
+* Microsoft SQL Server 2005 (9.00.1399)
+
+== Upgrading ==
+
+1.28 has several database changes since 1.27, and will not work without schema
+updates. Note that due to changes to some very large tables like the revision
+table, the schema update may take quite long (minutes on a medium sized site,
+many hours on a large site).
+
+If upgrading from before 1.11, and you are using a wiki as a commons
+repository, make sure that it is updated as well. Otherwise, errors may arise
+due to database schema changes.
+
+If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
+new database fields are filled with data.
+
+If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
+1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
+with MediaWiki 1.21.
+
+Don't forget to always back up your database before upgrading!
+
+See the file UPGRADE for more detailed upgrade instructions.
+
+For notes on 1.27.x and older releases, see HISTORY.
+
+== Online documentation ==
+
+Documentation for both end-users and site administrators is available on
+MediaWiki.org, and is covered under the GNU Free Documentation License (except
+for pages that explicitly state that their contents are in the public domain):
+
+       https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
+
+== Mailing list ==
+
+A mailing list is available for MediaWiki user support and discussion:
+
+       https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
+
+A low-traffic announcements-only list is also available:
+
+       https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
+
+It's highly recommended that you sign up for one of these lists if you're
+going to run a public MediaWiki, so you can be notified of security fixes.
+
+== IRC help ==
+
+There's usually someone online in #mediawiki on irc.freenode.net.
 
 = MediaWiki 1.27 =
 
diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
deleted file mode 100644 (file)
index 58ae23b..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-== MediaWiki 1.28 ==
-
-THIS IS NOT A RELEASE YET
-
-MediaWiki 1.28 is an alpha-quality branch and is not recommended for use in
-production.
-
-=== Changes since 1.28.0rc0 ===
-* (T142210) The changes to move the parser "NewPP limit report" from a HTML
-  comment to a machine-readable JavaScript config option 'wgPageParseReport'
-  have been undone. They caused the human-readable limit report to be shown
-  incompletely or not at all. ParserOutput::setLimitReportData() and
-  getLimitReportData() behave as they did in MediaWiki 1.27 again.
-* (T149510) Value of {{DISPLAYTITLE:}} parser function will not be used for
-  the text of subheadings on a category page when creating it. This wasn't
-  working correctly.
-* (T106793) MediaWiki will no longer try to perform a HTTP redirect to the
-  canonical pretty URL when a non-pretty URL is used. It resulted in redirect
-  loops in some clients and in some server configurations. This undoes a change
-  made in MediaWiki 1.26.
-
-=== Configuration changes in 1.28 ===
-* $wgSend404Code now affects status code of action=history if the page is not there.
-* BREAKING CHANGE: $wgHTTPProxy is now *required* for all external requests
-  made by MediaWiki via a proxy. Relying on the http_proxy environment
-  variable is no longer supported.
-* The load.php entry point now enforces the existing policy of not allowing
-  access to session data, which includes the session user and the session
-  user's language. If such access is attempted, an exception will be thrown.
-* The number of internal PBKDF2 iterations used to derive the session secret
-  is configurable via $wgSessionPbkdf2Iterations.
-* Upload dialog's file upload log comment can now be configured separately for
-  local and foreign uploads.
-* $wgForeignUploadTargets now defaults to `[ 'local' ]`, where `'local'`
-  signifies local uploads. A value of `[]` (empty array) now means that
-  no upload targets are allowed, effectively disabling the upload dialog.
-* The deprecated $wgEditEncoding variable has been removed; it was only used
-  for Esperanto language character conversion. You are now recommended to use
-  input methods provided by the UniversalLanguageSelector extension.
-* When $wgPingback is true, MediaWiki will periodically ping
-  https://www.mediawiki.org/beacon with basic information about the local
-  MediaWiki installation. This data includes, for example, the type of system,
-  PHP version, and chosen database backend. This behavior is off by default.
-* When $wgEditSubmitButtonLabelPublish is true, MediaWiki will label the button
-  to store-to-database-and-show-to-others as "Publish page"/"Publish changes";
-  if false, the default, they will be "Save page"/"Save changes".
-* The 'editcontentmodel' permission is now granted to all logged-in users ('user').
-  instead of just administrators ('sysop'). Documentation for this feature is
-  available at <https://www.mediawiki.org/wiki/Help:ChangeContentModel>.
-* $wgRevisionCacheExpiry is now set to one week by default instead of being disabled.
-* Magic links are now disabled by default, and can be re-enabled by modifying the value
-  of $wgEnableMagicLinks. Their usage is discouraged, but if they are manually enabled,
-  a tracking category will be added to help identify usage and make it easier to migrate
-  away from. If you depend upon magic link functionality, it is requested that you comment
-  on <https://www.mediawiki.org/wiki/Requests_for_comment/Future_of_magic_links> and
-  explain your use case(s).
-* New config variable $wgCSPFalsePositiveUrls to control what URLs to ignore
-  in upcoming Content-Security-Policy feature's reporting.
-
-=== New features in 1.28 ===
-* User::isBot() method for checking if an account is a bot role account.
-* Added a new 'slideshow' mode for galleries.
-* Added a new hook, 'UserIsBot', to aid in determining if a user is a bot.
-* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
-  interact with API parsing.
-* Added a new hook, 'UploadVerifyUpload', which can be used to reject a file
-  upload. Unlike 'UploadVerifyFile' it provides information about upload comment
-  and the file description page, but does not run for uploads to stash.
-* (T141604) Extensions can now provide a better error message when their
-  maintenance scripts are run without the extension being installed.
-* (T8948) Numeric sorting in categories is now supported by setting $wgCategoryCollation
-  to 'uca-default-u-kn' or 'uca-<langcode>-u-kn'. If you can't use UCA collations,
-  a 'numeric' collation is also available. If migrating from another
-  collation, you will need to run the updateCollation.php maintenance script.
-* Two new codes have been added to #time parser function: "xit" for days in current
-  month, and "xiz" for days passed in the year, both in Iranian calendar.
-* mw.Api has a new option, useUS, to use U+001F (Unit Separator) when
-  appropriate for sending multi-valued parameters. This defaults to true when
-  the mw.Api instance seems to be for the local wiki.
-* After a client performs an action which alters a database that has replica databases,
-  MediaWiki will wait for the replica databases to synchronize with the master database
-  while it renders the HTML output. However, if the output is a redirect to another wiki
-  on the wiki farm with a different domain, MediaWiki will instead alter the redirect
-  URL to include a ?cpPosTime parameter that triggers the database synchronization when
-  the URL is followed by the client. The same-domain case uses a new cpPosTime cookie.
-* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
-  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
-  'show' parameters to existing API query modules.
-
-=== External library changes in 1.28 ===
-
-==== Upgraded external libraries ====
-* Updated es5-shim from v4.1.5 to v4.5.8
-* Updated composer/semver from v1.4.1 to v1.4.2
-* Updated wikimedia/php-session-serializer from v1.0.3 to v1.0.4
-
-==== New external libraries ====
-* Added wikimedia/scoped-callback v1.0.0
-* Added wikimedia/wait-condition-loop v1.0.1
-
-==== Removed and replaced external libraries ====
-
-=== Bug fixes in 1.28 ===
-* (T146496) action=history pages should return 404 HTTP error code if the page does not exist
-* (T137264) SECURITY: XSS in unclosed internal links
-* (T133147) SECURITY: Escape '<' and ']]>' in inline <style> blocks
-* (T133147) SECURITY: Require login to preview user CSS pages
-* (T132926) SECURITY: Do not allow undeleting a revision deleted file if it is
-  the top file
-* (T129738) SECURITY: Make $wgBlockDisablesLogin also restrict logged in
-  permissions
-* (T129738) SECURITY: Make blocks log users out if $wgBlockDisablesLogin is true
-* (T139670) Move 'UserGetRights' call before application of
-  Session::getAllowedUserRights()
-
-=== Action API changes in 1.28 ===
-* Added 'maxarticlesize' property to action=query&meta=siteinfo which contains
-  the value of $wgMaxArticleSize.
-* Property 'modulemessages' from action=parse&prop=modules was removed
-  (deprecated since 1.26).
-* The following response properties from action=login, deprecated in 1.27, are
-  now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies
-  to properly manage session state.
-* Submitting the lgtoken and lgpassword parameters in the query string to
-  action=login is now deprecated and outputs a warning. They should be submitted
-  in the POST body instead.
-* Submitting sensitive authentication request parameters to action=clientlogin,
-  action=createaccount, action=linkaccount, and action=changeauthenticationdata
-  in the query string is now deprecated and outputs a warning. They should be
-  submitted in the POST body instead.
-* (T141960) Multi-valued parameters may now be separated using U+001F (Unit Separator)
-  instead of the pipe character. This will be useful if some of the multiple
-  values need to contain pipes, e.g. for action=options.
-* The API will now warn if input is not NFC-normalized Unicode or if it
-  contains invalid characters.
-* The 'normalized' list output by action=query and other modules that use
-  ApiPageSet may contain entries where the 'from' value is percent-encoded as
-  the raw value cannot be represented in a valid API response. These are
-  indicated by a 'fromencoded' boolean alongside the existing 'from' parameter.
-* (T28680) action=paraminfo can now return info about all submodules of a
-  module without listing them all explicitly.
-* (T146770) It is now possible to assert that the current user is a specific
-  named user, using the 'assertuser' parameter.
-* (T141963) Added a 'known' property when missing-but-known titles (e.g. from
-  the 'TitleIsAlwaysKnown' hook) are output in various modules.
-
-=== Action API internal changes in 1.28 ===
-* Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
-  interact with ApiParse and ApiExpandTemplates.
-* (T139565) SECURITY: API: Generate head items in the context of the given title
-* (T115333) SECURITY: Check read permission when loading page content in ApiParse
-* ApiBase::getResultData() was removed (deprecated since 1.25)
-* ApiBase::makeHelpArrayToString() was removed (deprecated since 1.25)
-* ApiBase::makeHelpMsgParameters() was removed (deprecated since 1.25)
-* ApiBase::makeHelpMsg() was removed (deprecated since 1.25)
-* ApiFormatBase::formatHTML() was removed (deprecated since 1.25)
-* ApiFormatBase::getNeedsRawData() was removed (deprecated since 1.25)
-* ApiFormatBase::getWantsHelp() was removed (deprecated since 1.25)
-* ApiFormatBase::setBufferResult() was removed (deprecated since 1.25)
-* ApiFormatBase::setHelp() was removed (deprecated since 1.25)
-* ApiFormatBase::setUnescapeAmps() was removed (deprecated since 1.25)
-* ApiMain::makeHelpMsgHeader() was removed (deprecated since 1.25)
-* ApiMain::reallyMakeHelpMsg() was removed (deprecated since 1.25)
-* ApiMain::setHelp() was removed (deprecated since 1.25)
-* ApiResult::beginContinuation() was removed (deprecated since 1.25)
-* ApiResult::cleanUpUTF8() was removed (deprecated since 1.25)
-* ApiResult::convertStatusToArray() was removed (deprecated since 1.25)
-* ApiResult::disableSizeCheck() was removed (deprecated since 1.24)
-* ApiResult::enableSizeCheck() was removed (deprecated since 1.24)
-* ApiResult::endContinuation() was removed (deprecated since 1.25)
-* ApiResult::getData() was removed (deprecated since 1.25)
-* ApiResult::getIsRawMode() was removed (deprecated since 1.25)
-* ApiResult::setContent() was removed (deprecated since 1.25)
-* ApiResult::setContinueParam() was removed (deprecated since 1.25)
-* ApiResult::setElement() was removed (deprecated since 1.25)
-* ApiResult::setGeneratorContinueParam() was removed (deprecated since 1.25)
-* ApiResult::setIndexedTagName_internal() was removed (deprecated since 1.25)
-* ApiResult::setIndexedTagName_recursive() was removed (deprecated since 1.25)
-* ApiResult::setMainForContinuation() was removed (deprecated since 1.25)
-* ApiResult::setParsedLimit() was removed (deprecated since 1.25)
-* ApiResult::setRawMode() was removed (deprecated since 1.25)
-* ApiResult::size() was removed (deprecated since 1.25)
-* Added new hooks, 'ApiQueryBaseBeforeQuery', 'ApiQueryBaseAfterQuery', and
-  'ApiQueryBaseProcessRow', to make it easier for extensions to add 'prop' and
-  'show' parameters to existing API query modules. A query module can enable
-  these hooks by passing an array for $hookData to ApiQueryBase::select() and
-  by calling ApiQueryBase->processRow() before adding a row's data to the
-  result.
-
-=== Languages updated in 1.28 ===
-
-MediaWiki supports over 350 languages. Many localisations are updated
-regularly. Below only new and removed languages are listed, as well as
-changes to languages because of Phabricator reports.
-
-* (T137411) ban (Balinese), thanks to translators Adi Mayndra, Andru,
-  BASAbali, M. Adiputra, Naval Scene, Nemo bis, NoiX180, and 아라.
-* (T135867) shn (Shan), thanks to translators Khun Sar, Piangpha,
-  Saiddzone Saimawnkham, Saosukham, and Sengwan.
-* Czech (cs) and Slovak (sk) set as reciprocal fallbacks.
-* (T146744) Livvi-Karelian (olo) namespace messages created thanks to translator Ilja.mos.
-* Karelian (krl), thanks to translators Flrn, Ilja.mos, Likopiän tyttö, Mashoi7, Matma Rex,
-  Ontoi, Theunitedstatesofme, and Varvana.
-* Gorontalo (gor), thanks to translators Ilham, Lukman Tomayahu, Marwan Mohamad, Matma Rex,
-  NoiX180, and Zhoelyakin.
-
-=== Other changes in 1.28 ===
-* (T128697) Improved handling of large diffs.
-* [BREAKING CHANGE] $wgExtendedLoginCookies has been removed. You can
-  use or update a custom session provider if needed.
-* Deprecated APIEditBeforeSave hook in favor of EditFilterMergedContent.
-* The 'UploadVerification' hook is deprecated. Use 'UploadVerifyFile' instead.
-* SiteConfiguration::isLocalVHost() was removed (deprecated since 1.25).
-* The 'UserLoginComplete' hook has a new parameter to differentiate between actual
-  login and visiting the login page while already logged in.
-* ResourceLoader::makeLoaderURL() was removed (deprecated since 1.24).
-* $.fn.liveAndTestAtStart was removed (deprecated since 1.24).
-* mw.util.tooltipAccessKeyPrefix was removed (deprecated since 1.24).
-* mw.util.tooltipAccessKeyRegexp was removed (deprecated since 1.24).
-* Linker::link() and Linker::linkKnown() were deprecated; please instead use
-  MediaWiki\Linker\LinkRenderer. In addition, the LinkBegin and LinkEnd hooks
-  were replaced by HtmlPageLinkRendererBegin and HtmlPageLinkRendererEnd
-  respectively. See docs/hooks.txt for the specific changes needed for those hooks.
-* Linker::formatSize() was deprecated. Use Language::formatSize() directly.
-* Aliases for Linker methods, deprecated since 1.21, were removed from Skin:
-  * Skin::commentBlock() (use Linker::commentBlock() instead)
-  * Skin::generateRollback() (use Linker::generateRollback() instead)
-  * Skin::link() (use MediaWiki\Linker\LinkRenderer instead)
-  * Skin::linkKnown() (use MediaWiki\Linker\LinkRenderer instead)
-  * Skin::userLink() (use Linker::userLink() instead)
-  * Skin::userToolLinks() (use Linker::userToolLinks() instead)
-* Disabled "bug 2702" HTML tidying of parsed UI messages on wikis where Tidy is
-  disabled.
-* DifferenceEngine::generateDiffBody() was removed (deprecated since 1.21).
-* UploadBase::stashFileGetKey() and UploadBase::stashSession() were deprecated.
-  Use ...->stashFile()->getFileKey() instead.
-* "Public domain" was removed as a wiki license option from the installer, in
-  favour of CC-0.
-* AuthenticationRequest::$required is now changed from REQUIRED to PRIMARY_REQUIRED
-  on requests needed by primary providers even if all primaries need them.
-  Primary providers are discouraged from returning multiple REQUIRED requests.
-* OOjs UI PHP widgets constructed with the `'infusable' => true` config option
-  will no longer be automatically infused. You should call `OO.ui.infuse()`
-  on them yourself from your JavaScript code.
-* parserTests.php has moved to tests/parser/parserTests.php
-* The command line options specific to parser tests have been removed from
-  phpunit.php: --regex and --keep-uploads. Instead of --regex, use --filter.
-  Instead of --keep-uploads, use the same option to parserTests.php, but you
-  must specify a directory with --upload-dir.
-* The 'jquery.arrowSteps' ResourceLoader module is now deprecated.
-* IP::isConfiguredProxy() and IP::isTrustedProxy() were removed. Callers should
-  migrate to using the same functions on a ProxyLookup instance, obtainable from
-  MediaWikiServices.
-* The ArticleAfterFetchContent, ArticleInsertComplete, ArticleSave, ArticleSaveComplete,
-  ArticleViewCustom, EditFilterMerged, EditPageGetDiffText, EditPageGetPreviewText and
-  ShowRawCssJs hooks will now emit deprecation warnings if used.
-* (T68404) CSS3 attr() function with url type is no longer allowed
-  in inline styles.
-
-== Compatibility ==
-
-MediaWiki 1.28 requires PHP 5.5.9 or later. There is experimental support for
-HHVM 3.6.5 or later.
-
-MySQL is the recommended DBMS. PostgreSQL or SQLite can also be used, but
-support for them is somewhat less mature. There is experimental support for
-Oracle and Microsoft SQL Server.
-
-The supported versions are:
-
-* MySQL 5.0.3 or later
-* PostgreSQL 8.3 or later
-* SQLite 3.3.7 or later
-* Oracle 9.0.1 or later
-* Microsoft SQL Server 2005 (9.00.1399)
-
-== Upgrading ==
-
-1.28 has several database changes since 1.27, and will not work without schema
-updates. Note that due to changes to some very large tables like the revision
-table, the schema update may take quite long (minutes on a medium sized site,
-many hours on a large site).
-
-If upgrading from before 1.11, and you are using a wiki as a commons
-repository, make sure that it is updated as well. Otherwise, errors may arise
-due to database schema changes.
-
-If upgrading from before 1.7, you may want to run refreshLinks.php to ensure
-new database fields are filled with data.
-
-If you are upgrading from MediaWiki 1.4.x or earlier, you should upgrade to
-1.5 first. The upgrade script maintenance/upgrade1_5.php has been removed
-with MediaWiki 1.21.
-
-Don't forget to always back up your database before upgrading!
-
-See the file UPGRADE for more detailed upgrade instructions.
-
-For notes on 1.27.x and older releases, see HISTORY.
-
-== Online documentation ==
-
-Documentation for both end-users and site administrators is available on
-MediaWiki.org, and is covered under the GNU Free Documentation License (except
-for pages that explicitly state that their contents are in the public domain):
-
-       https://www.mediawiki.org/wiki/Special:MyLanguage/Documentation
-
-== Mailing list ==
-
-A mailing list is available for MediaWiki user support and discussion:
-
-       https://lists.wikimedia.org/mailman/listinfo/mediawiki-l
-
-A low-traffic announcements-only list is also available:
-
-       https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce
-
-It's highly recommended that you sign up for one of these lists if you're
-going to run a public MediaWiki, so you can be notified of security fixes.
-
-== IRC help ==
-
-There's usually someone online in #mediawiki on irc.freenode.net.
index 23c34df..21a94c5 100644 (file)
@@ -22,6 +22,7 @@ production.
 === External library changes in 1.29 ===
 
 ==== Upgraded external libraries ====
+* Updated QUnit from v1.22.0 to v1.23.1.
 
 ==== New external libraries ====
 
@@ -35,6 +36,7 @@ production.
   in the query string is now an error. They should be submitted in the POST
   body instead.
 * The capture option for action=resetpassword has been removed
+* action=clearhasmsg now requires a POST.
 
 === Action API internal changes in 1.29 ===
 
@@ -44,9 +46,18 @@ MediaWiki supports over 350 languages. Many localisations are updated
 regularly. Below only new and removed languages are listed, as well as
 changes to languages because of Phabricator reports.
 
+==== No fallback for Ukrainian ====
+* (T39314) The fallback from Ukrainian to Russian was removed. The Ukrainian
+  language will now use the default fallback language: English. When a translation
+  to Ukrainian is not available, an English string will be shown.
+
 === Other changes in 1.29 ===
 * Database::getSearchEngine() (deprecated in 1.28) was removed. Use
   SearchEngineFactory::getSearchEngineClass() instead.
+* $wgSessionsInMemcached (deprecated in 1.20) was removed. No replacement is
+  required as all sessions are stored in Object Cache now.
+* MWHttpRequest::execute() should be considered to return a StatusValue; the
+  Status return type is deprecated.
 
 == Compatibility ==
 
index 30ef985..0d6407b 100644 (file)
@@ -875,6 +875,7 @@ $wgAutoloadLocalClasses = [
        'MediaWiki\\Logger\\Monolog\\LegacyFormatter' => __DIR__ . '/includes/debug/logger/monolog/LegacyFormatter.php',
        'MediaWiki\\Logger\\Monolog\\LegacyHandler' => __DIR__ . '/includes/debug/logger/monolog/LegacyHandler.php',
        'MediaWiki\\Logger\\Monolog\\LineFormatter' => __DIR__ . '/includes/debug/logger/monolog/LineFormatter.php',
+       'MediaWiki\\Logger\\Monolog\\LogstashFormatter' => __DIR__ . '/includes/debug/logger/monolog/LogstashFormatter.php',
        'MediaWiki\\Logger\\Monolog\\SyslogHandler' => __DIR__ . '/includes/debug/logger/monolog/SyslogHandler.php',
        'MediaWiki\\Logger\\Monolog\\WikiProcessor' => __DIR__ . '/includes/debug/logger/monolog/WikiProcessor.php',
        'MediaWiki\\Logger\\NullSpi' => __DIR__ . '/includes/debug/logger/NullSpi.php',
@@ -1569,6 +1570,8 @@ $wgAutoloadLocalClasses = [
        'WikiRevision' => __DIR__ . '/includes/import/WikiRevision.php',
        'WikiStatsOutput' => __DIR__ . '/maintenance/language/StatOutputs.php',
        'WikiTextStructure' => __DIR__ . '/includes/content/WikiTextStructure.php',
+       'Wikimedia\\Rdbms\\ConnectionManager' => __DIR__ . '/includes/libs/rdbms/connectionmanager/ConnectionManager.php',
+       'Wikimedia\\Rdbms\\SessionConsistentConnectionManager' => __DIR__ . '/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php',
        'WikitextContent' => __DIR__ . '/includes/content/WikitextContent.php',
        'WikitextContentHandler' => __DIR__ . '/includes/content/WikitextContentHandler.php',
        'WinCacheBagOStuff' => __DIR__ . '/includes/libs/objectcache/WinCacheBagOStuff.php',
index e1d9f47..19ca238 100644 (file)
@@ -25,7 +25,7 @@
                "ext-xml": "*",
                "liuggio/statsd-php-client": "1.0.18",
                "mediawiki/at-ease": "1.1.0",
-               "oojs/oojs-ui": "0.18.0",
+               "oojs/oojs-ui": "0.18.1",
                "oyejorge/less.php": "1.7.0.10",
                "php": ">=5.5.9",
                "psr/log": "1.0.0",
index b95f274..4c4b8bb 100644 (file)
@@ -197,7 +197,11 @@ class CategoryViewer extends ContextSource {
                $link = null;
                Hooks::run( 'CategoryViewer::generateLink', [ $type, $title, $html, &$link ] );
                if ( $link === null ) {
-                       $link = Linker::link( $title, $html );
+                       $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+                       if ( $html !== null ) {
+                               $html = new HtmlArmor( $html );
+                       }
+                       $link = $linkRenderer->makeLink( $title, $html );
                }
                if ( $isRedirect ) {
                        $link = '<span class="redirect-in-category">' . $link . '</span>';
index eb778b5..5557dca 100644 (file)
@@ -2365,13 +2365,6 @@ $wgMainStash = 'db-replicated';
  */
 $wgParserCacheExpireTime = 86400;
 
-/**
- * Deprecated alias for $wgSessionsInObjectCache.
- *
- * @deprecated since 1.20; Use $wgSessionsInObjectCache
- */
-$wgSessionsInMemcached = true;
-
 /**
  * @deprecated since 1.27, session data is always stored in object cache.
  */
index 85c78d6..7e5cc7d 100644 (file)
@@ -168,6 +168,17 @@ class Message implements MessageSpecifier, Serializable {
        /** Transform {{..}} constructs, HTML-escape the result */
        const FORMAT_ESCAPED = 'escaped';
 
+       /**
+        * Mapping from Message::listParam() types to Language methods.
+        * @var array
+        */
+       protected static $listTypeMap = [
+               'comma' => 'commaList',
+               'semicolon' => 'semicolonList',
+               'pipe' => 'pipeList',
+               'text' => 'listToText',
+       ];
+
        /**
         * In which language to get this message. True, which is the default,
         * means the current user language, false content language.
@@ -1070,6 +1081,22 @@ class Message implements MessageSpecifier, Serializable {
                return [ 'plaintext' => $plaintext ];
        }
 
+       /**
+        * @since 1.29
+        *
+        * @param array $list
+        * @param string $type 'comma', 'semicolon', 'pipe', 'text'
+        * @return array Array with "list" and "type" keys.
+        */
+       public static function listParam( array $list, $type = 'text' ) {
+               if ( !isset( self::$listTypeMap[$type] ) ) {
+                       throw new InvalidArgumentException(
+                               "Invalid type '$type'. Known types are: " . join( ', ', array_keys( self::$listTypeMap ) )
+                       );
+               }
+               return [ 'list' => $list, 'type' => $type ];
+       }
+
        /**
         * Substitutes any parameters into the message text.
         *
@@ -1123,6 +1150,8 @@ class Message implements MessageSpecifier, Serializable {
                                return [ 'before', $this->getLanguage()->formatBitrate( $param['bitrate'] ) ];
                        } elseif ( isset( $param['plaintext'] ) ) {
                                return [ 'after', $this->formatPlaintext( $param['plaintext'], $format ) ];
+                       } elseif ( isset( $param['list'] ) ) {
+                               return $this->formatListParam( $param['list'], $param['type'], $format );
                        } else {
                                $warning = 'Invalid parameter for message "' . $this->getKey() . '": ' .
                                        htmlspecialchars( serialize( $param ) );
@@ -1251,6 +1280,54 @@ class Message implements MessageSpecifier, Serializable {
 
                }
        }
+
+       /**
+        * Formats a list of parameters as a concatenated string.
+        * @since 1.29
+        * @param array $params
+        * @param string $listType
+        * @param string $format One of the FORMAT_* constants.
+        * @return array Array with the parameter type (either "before" or "after") and the value.
+        */
+       protected function formatListParam( array $params, $listType, $format ) {
+               if ( !isset( self::$listTypeMap[$listType] ) ) {
+                       $warning = 'Invalid list type for message "' . $this->getKey() . '": ' .
+                               htmlspecialchars( serialize( $param ) );
+                       trigger_error( $warning, E_USER_WARNING );
+                       $e = new Exception;
+                       wfDebugLog( 'Bug58676', $warning . "\n" . $e->getTraceAsString() );
+                       return [ 'before', '[INVALID]' ];
+               }
+               $func = self::$listTypeMap[$listType];
+
+               // Handle an empty list sensibly
+               if ( !$params ) {
+                       return [ 'before', $this->getLanguage()->$func( [] ) ];
+               }
+
+               // First, determine what kinds of list items we have
+               $types = [];
+               $vars = [];
+               $list = [];
+               foreach ( $params as $n => $p ) {
+                       list( $type, $value ) = $this->extractParam( $p, $format );
+                       $types[$type] = true;
+                       $list[] = $value;
+                       $vars[] = '$' . ( $n + 1 );
+               }
+
+               // Easy case: all are 'before' or 'after', so just join the
+               // values and use the same type.
+               if ( count( $types ) === 1 ) {
+                       return [ key( $types ), $this->getLanguage()->$func( $list ) ];
+               }
+
+               // Hard case: We need to process each value per its type, then
+               // return the concatenated values as 'after'. We handle this by turning
+               // the list into a RawMessage and processing that as a parameter.
+               $vars = $this->getLanguage()->$func( $vars );
+               return $this->extractParam( new RawMessage( $vars, $params ), $format );
+       }
 }
 
 /**
index 43d71ab..6070114 100644 (file)
@@ -21,6 +21,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 use MediaWiki\Session\SessionManager;
 use WrappedString\WrappedString;
 use WrappedString\WrappedStringList;
@@ -1010,8 +1011,9 @@ class OutputPage extends ContextSource {
                if ( $title->isRedirect() ) {
                        $query['redirect'] = 'no';
                }
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                return wfMessage( 'backlinksubtitle' )
-                       ->rawParams( Linker::link( $title, null, [], $query ) );
+                       ->rawParams( $linkRenderer->makeLink( $title, null, [], $query ) );
        }
 
        /**
@@ -1269,6 +1271,7 @@ class OutputPage extends ContextSource {
                        'OutputPageMakeCategoryLinks',
                        [ &$this, $categories, &$this->mCategoryLinks ] )
                ) {
+                       $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                        foreach ( $categories as $category => $type ) {
                                // array keys will cast numeric category names to ints, so cast back to string
                                $category = (string)$category;
@@ -1283,7 +1286,7 @@ class OutputPage extends ContextSource {
                                }
                                $text = $wgContLang->convertHtml( $title->getText() );
                                $this->mCategories[$type][] = $title->getText();
-                               $this->mCategoryLinks[$type][] = Linker::link( $title, $text );
+                               $this->mCategoryLinks[$type][] = $linkRenderer->makeLink( $title, new HtmlArmor( $text ) );
                        }
                }
        }
@@ -2653,8 +2656,10 @@ class OutputPage extends ContextSource {
         * @param array $options Options array to pass to Linker
         */
        public function addReturnTo( $title, array $query = [], $text = null, $options = [] ) {
+               $linkRenderer = MediaWikiServices::getInstance()
+                       ->getLinkRendererFactory()->createFromLegacyOptions( $options );
                $link = $this->msg( 'returnto' )->rawParams(
-                       Linker::link( $title, $text, [], $query, $options ) )->escaped();
+                       $linkRenderer->makeLink( $title, $text, [], $query ) )->escaped();
                $this->addHTML( "<p id=\"mw-returnto\">{$link}</p>\n" );
        }
 
index d86b19a..d40e0c1 100644 (file)
@@ -21,6 +21,7 @@
  */
 use MediaWiki\Auth\AuthManager;
 use MediaWiki\Auth\PasswordAuthenticationRequest;
+use MediaWiki\MediaWikiServices;
 
 /**
  * We're now using the HTMLForm object with some customisation to generate the
@@ -253,7 +254,9 @@ class Preferences {
                        'section' => 'personal/info',
                ];
 
-               $editCount = Linker::link( SpecialPage::getTitleFor( "Contributions", $userName ),
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+
+               $editCount = $linkRenderer->makeLink( SpecialPage::getTitleFor( "Contributions", $userName ),
                        $lang->formatNum( $user->getEditCount() ) );
 
                $defaultPreferences['editcount'] = [
@@ -297,8 +300,8 @@ class Preferences {
                if ( $canEditPrivateInfo && $authManager->allowsAuthenticationDataChange(
                        new PasswordAuthenticationRequest(), false )->isGood()
                ) {
-                       $link = Linker::link( SpecialPage::getTitleFor( 'ChangePassword' ),
-                               $context->msg( 'prefs-resetpass' )->escaped(), [],
+                       $link = $linkRenderer->makeLink( SpecialPage::getTitleFor( 'ChangePassword' ),
+                               $context->msg( 'prefs-resetpass' )->text(), [],
                                [ 'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText() ] );
 
                        $defaultPreferences['password'] = [
@@ -448,9 +451,9 @@ class Preferences {
 
                                $emailAddress = $user->getEmail() ? htmlspecialchars( $user->getEmail() ) : '';
                                if ( $canEditPrivateInfo && $authManager->allowsPropertyChange( 'emailaddress' ) ) {
-                                       $link = Linker::link(
+                                       $link = $linkRenderer->makeLink(
                                                SpecialPage::getTitleFor( 'ChangeEmail' ),
-                                               $context->msg( $user->getEmail() ? 'prefs-changeemail' : 'prefs-setemail' )->escaped(),
+                                               $context->msg( $user->getEmail() ? 'prefs-changeemail' : 'prefs-setemail' )->text(),
                                                [],
                                                [ 'returnto' => SpecialPage::getTitleFor( 'Preferences' )->getPrefixedText() ] );
 
@@ -601,14 +604,15 @@ class Preferences {
                        $linkTools = [];
                        $userName = $user->getName();
 
+                       $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                        if ( $allowUserCss ) {
                                $cssPage = Title::makeTitleSafe( NS_USER, $userName . '/common.css' );
-                               $linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
+                               $linkTools[] = $linkRenderer->makeLink( $cssPage, $context->msg( 'prefs-custom-css' )->text() );
                        }
 
                        if ( $allowUserJs ) {
                                $jsPage = Title::makeTitleSafe( NS_USER, $userName . '/common.js' );
-                               $linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
+                               $linkTools[] = $linkRenderer->makeLink( $jsPage, $context->msg( 'prefs-custom-js' )->text() );
                        }
 
                        $defaultPreferences['commoncssjs'] = [
@@ -1110,6 +1114,8 @@ class Preferences {
                $mptitle = Title::newMainPage();
                $previewtext = $context->msg( 'skin-preview' )->escaped();
 
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+
                # Only show skins that aren't disabled in $wgSkipSkins
                $validSkinNames = Skin::getAllowedSkins();
 
@@ -1145,12 +1151,12 @@ class Preferences {
                        # Create links to user CSS/JS pages
                        if ( $allowUserCss ) {
                                $cssPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.css' );
-                               $linkTools[] = Linker::link( $cssPage, $context->msg( 'prefs-custom-css' )->escaped() );
+                               $linkTools[] = $linkRenderer->makeLink( $cssPage, $context->msg( 'prefs-custom-css' )->text() );
                        }
 
                        if ( $allowUserJs ) {
                                $jsPage = Title::makeTitleSafe( NS_USER, $user->getName() . '/' . $skinkey . '.js' );
-                               $linkTools[] = Linker::link( $jsPage, $context->msg( 'prefs-custom-js' )->escaped() );
+                               $linkTools[] = $linkRenderer->makeLink( $jsPage, $context->msg( 'prefs-custom-js' )->text() );
                        }
 
                        $display = $sn . ' ' . $context->msg( 'parentheses' )
@@ -1624,7 +1630,8 @@ class PreferencesForm extends HTMLForm {
                if ( $this->getModifiedUser()->isAllowed( 'editmyoptions' ) ) {
                        $t = SpecialPage::getTitleFor( 'Preferences', 'reset' );
 
-                       $html .= "\n" . Linker::link( $t, $this->msg( 'restoreprefs' )->escaped(),
+                       $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
+                       $html .= "\n" . $linkRenderer->makeLink( $t, $this->msg( 'restoreprefs' )->text(),
                                Html::buttonAttributes( $attrs, [ 'mw-ui-quiet' ] ) );
 
                        $html = Xml::tags( 'div', [ 'class' => 'mw-prefs-buttons' ], $html );
index f6c4147..04c17e4 100644 (file)
@@ -239,7 +239,7 @@ abstract class PrefixSearch {
                // canonical and alias title forms...
                $keys = [];
                foreach ( SpecialPageFactory::getNames() as $page ) {
-                       $keys[$wgContLang->caseFold( $page )] = $page;
+                       $keys[$wgContLang->caseFold( $page )] = [ 'page' => $page, 'rank' => 0 ];
                }
 
                foreach ( $wgContLang->getSpecialPageAliases() as $page => $aliases ) {
@@ -247,33 +247,35 @@ abstract class PrefixSearch {
                                continue;
                        }
 
-                       foreach ( $aliases as $alias ) {
-                               $keys[$wgContLang->caseFold( $alias )] = $alias;
+                       foreach ( $aliases as $key => $alias ) {
+                               $keys[$wgContLang->caseFold( $alias )] = [ 'page' => $alias, 'rank' => $key ];
                        }
                }
                ksort( $keys );
 
-               $srchres = [];
-               $skipped = 0;
+               $matches = [];
                foreach ( $keys as $pageKey => $page ) {
                        if ( $searchKey === '' || strpos( $pageKey, $searchKey ) === 0 ) {
                                // bug 27671: Don't use SpecialPage::getTitleFor() here because it
                                // localizes its input leading to searches for e.g. Special:All
                                // returning Spezial:MediaWiki-Systemnachrichten and returning
                                // Spezial:Alle_Seiten twice when $wgLanguageCode == 'de'
-                               if ( $offset > 0 && $skipped < $offset ) {
-                                       $skipped++;
-                                       continue;
+                               $matches[$page['rank']][] = Title::makeTitleSafe( NS_SPECIAL, $page['page'] );
+
+                               if ( isset( $matches[0] ) && count( $matches[0] ) >= $limit + $offset ) {
+                                       // We have enough items in primary rank, no use to continue
+                                       break;
                                }
-                               $srchres[] = Title::makeTitleSafe( NS_SPECIAL, $page );
                        }
 
-                       if ( count( $srchres ) >= $limit ) {
-                               break;
-                       }
                }
 
-               return $srchres;
+               // Ensure keys are in order
+               ksort( $matches );
+               // Flatten the array
+               $matches = array_reduce( $matches, 'array_merge', [] );
+
+               return array_slice( $matches, $offset, $limit );
        }
 
        /**
index 357c76d..9f722af 100644 (file)
@@ -462,7 +462,7 @@ if ( $wgMaximalPasswordLength !== false ) {
 }
 
 // Backwards compatibility warning
-if ( !$wgSessionsInObjectCache && !$wgSessionsInMemcached ) {
+if ( !$wgSessionsInObjectCache ) {
        wfDeprecated( '$wgSessionsInObjectCache = false', '1.27' );
        if ( $wgSessionHandler ) {
                wfDeprecated( '$wgSessionsHandler', '1.27' );
index 1332ab4..803695a 100644 (file)
@@ -23,6 +23,8 @@
  * @author <evan@wikitravel.org>
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * @ingroup Actions
  */
@@ -198,14 +200,15 @@ class CreditsAction extends FormlessAction {
                if ( $this->canShowRealUserName() && !$user->isAnon() ) {
                        $real = $user->getRealName();
                } else {
-                       $real = false;
+                       $real = $user->getName();
                }
 
                $page = $user->isAnon()
                        ? SpecialPage::getTitleFor( 'Contributions', $user->getName() )
                        : $user->getUserPage();
 
-               return Linker::link( $page, htmlspecialchars( $real ? $real : $user->getName() ) );
+               return MediaWikiServices::getInstance()
+                       ->getLinkRenderer()->makeLink( $page, $real );
        }
 
        /**
@@ -231,9 +234,9 @@ class CreditsAction extends FormlessAction {
         * @return string HTML link
         */
        protected function othersLink() {
-               return Linker::linkKnown(
+               return MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                        $this->getTitle(),
-                       $this->msg( 'others' )->escaped(),
+                       $this->msg( 'others' )->text(),
                        [],
                        [ 'action' => 'credits' ]
                );
index c1763fa..9573cac 100644 (file)
@@ -23,6 +23,8 @@
  * @ingroup Actions
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * This class handles printing the history page for an article. In order to
  * be efficient, it uses timestamps rather than offsets for paging, to avoid
@@ -58,9 +60,9 @@ class HistoryAction extends FormlessAction {
 
        protected function getDescription() {
                // Creation of a subtitle link pointing to [[Special:Log]]
-               return Linker::linkKnown(
+               return MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                        SpecialPage::getTitleFor( 'Log' ),
-                       $this->msg( 'viewpagelogs' )->escaped(),
+                       $this->msg( 'viewpagelogs' )->text(),
                        [],
                        [ 'page' => $this->getTitle()->getPrefixedText() ]
                );
@@ -734,9 +736,9 @@ class HistoryPager extends ReverseChronologicalPager {
                                $undoTooltip = $latest
                                        ? [ 'title' => $this->msg( 'tooltip-undo' )->text() ]
                                        : [];
-                               $undolink = Linker::linkKnown(
+                               $undolink = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                                        $this->getTitle(),
-                                       $this->msg( 'editundo' )->escaped(),
+                                       $this->msg( 'editundo' )->text(),
                                        $undoTooltip,
                                        [
                                                'action' => 'edit',
@@ -788,16 +790,15 @@ class HistoryPager extends ReverseChronologicalPager {
         */
        function revLink( $rev ) {
                $date = $this->getLanguage()->userTimeAndDate( $rev->getTimestamp(), $this->getUser() );
-               $date = htmlspecialchars( $date );
                if ( $rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
-                       $link = Linker::linkKnown(
+                       $link = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                                $this->getTitle(),
                                $date,
                                [ 'class' => 'mw-changeslist-date' ],
                                [ 'oldid' => $rev->getId() ]
                        );
                } else {
-                       $link = $date;
+                       $link = htmlspecialchars( $date );
                }
                if ( $rev->isDeleted( Revision::DELETED_TEXT ) ) {
                        $link = "<span class=\"history-deleted\">$link</span>";
@@ -818,7 +819,7 @@ class HistoryPager extends ReverseChronologicalPager {
                if ( $latest || !$rev->userCan( Revision::DELETED_TEXT, $this->getUser() ) ) {
                        return $cur;
                } else {
-                       return Linker::linkKnown(
+                       return MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                                $this->getTitle(),
                                $cur,
                                [],
@@ -847,9 +848,10 @@ class HistoryPager extends ReverseChronologicalPager {
                        return $last;
                }
 
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                if ( $next === 'unknown' ) {
                        # Next row probably exists but is unknown, use an oldid=prev link
-                       return Linker::linkKnown(
+                       return $linkRenderer->makeKnownLink(
                                $this->getTitle(),
                                $last,
                                [],
@@ -868,7 +870,7 @@ class HistoryPager extends ReverseChronologicalPager {
                        return $last;
                }
 
-               return Linker::linkKnown(
+               return $linkRenderer->makeKnownLink(
                        $this->getTitle(),
                        $last,
                        [],
index be3be85..49b9ab7 100644 (file)
@@ -230,11 +230,11 @@ class InfoAction extends FormlessAction {
                if ( $title->isRedirect() ) {
                        $pageInfo['header-basic'][] = [
                                $this->msg( 'pageinfo-redirectsto' ),
-                               Linker::link( $this->page->getRedirectTarget() ) .
+                               $linkRenderer->makeLink( $this->page->getRedirectTarget() ) .
                                $this->msg( 'word-separator' )->escaped() .
-                               $this->msg( 'parentheses' )->rawParams( Linker::link(
+                               $this->msg( 'parentheses' )->rawParams( $linkRenderer->makeLink(
                                        $this->page->getRedirectTarget(),
-                                       $this->msg( 'pageinfo-redirectsto-info' )->escaped(),
+                                       $this->msg( 'pageinfo-redirectsto-info' )->text(),
                                        [],
                                        [ 'action' => 'info' ]
                                ) )->escaped()
@@ -266,9 +266,9 @@ class InfoAction extends FormlessAction {
                ) {
                        // Link to Special:PageLanguage with pre-filled page title if user has permissions
                        $titleObj = SpecialPage::getTitleFor( 'PageLanguage', $title->getPrefixedText() );
-                       $langDisp = Linker::link(
+                       $langDisp = $linkRenderer->makeLink(
                                $titleObj,
-                               $this->msg( 'pageinfo-language' )->escaped()
+                               $this->msg( 'pageinfo-language' )->text()
                        );
                } else {
                        // Display just the message
@@ -360,9 +360,9 @@ class InfoAction extends FormlessAction {
                // Redirects to this page
                $whatLinksHere = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedText() );
                $pageInfo['header-basic'][] = [
-                       Linker::link(
+                       $linkRenderer->makeLink(
                                $whatLinksHere,
-                               $this->msg( 'pageinfo-redirects-name' )->escaped(),
+                               $this->msg( 'pageinfo-redirects-name' )->text(),
                                [],
                                [
                                        'hidelinks' => 1,
@@ -436,7 +436,7 @@ class InfoAction extends FormlessAction {
 
                        foreach ( $sources as $sourceTitle ) {
                                $cascadingFrom .= Html::rawElement(
-                                       'li', [], Linker::linkKnown( $sourceTitle ) );
+                                       'li', [], $linkRenderer->makeKnownLink( $sourceTitle ) );
                        }
 
                        $cascadingFrom = Html::rawElement( 'ul', [], $cascadingFrom );
@@ -525,9 +525,9 @@ class InfoAction extends FormlessAction {
                        // Date of page creation
                        $pageInfo['header-edits'][] = [
                                $this->msg( 'pageinfo-firsttime' ),
-                               Linker::linkKnown(
+                               $linkRenderer->makeKnownLink(
                                        $title,
-                                       htmlspecialchars( $lang->userTimeAndDate( $firstRev->getTimestamp(), $user ) ),
+                                       $lang->userTimeAndDate( $firstRev->getTimestamp(), $user ),
                                        [],
                                        [ 'oldid' => $firstRev->getId() ]
                                )
@@ -544,11 +544,9 @@ class InfoAction extends FormlessAction {
                        // Date of latest edit
                        $pageInfo['header-edits'][] = [
                                $this->msg( 'pageinfo-lasttime' ),
-                               Linker::linkKnown(
+                               $linkRenderer->makeKnownLink(
                                        $title,
-                                       htmlspecialchars(
-                                               $lang->userTimeAndDate( $this->page->getTimestamp(), $user )
-                                       ),
+                                       $lang->userTimeAndDate( $this->page->getTimestamp(), $user ),
                                        [],
                                        [ 'oldid' => $this->page->getLatest() ]
                                )
@@ -655,9 +653,9 @@ class InfoAction extends FormlessAction {
 
                        if ( !$config->get( 'MiserMode' ) && $pageCounts['transclusion']['to'] > 0 ) {
                                if ( $pageCounts['transclusion']['to'] > count( $transcludedTargets ) ) {
-                                       $more = Linker::link(
+                                       $more = $linkRenderer->makeLink(
                                                $whatLinksHere,
-                                               $this->msg( 'moredotdotdot' )->escaped(),
+                                               $this->msg( 'moredotdotdot' )->text(),
                                                [],
                                                [ 'hidelinks' => 1, 'hideredirs' => 1 ]
                                        );
@@ -836,6 +834,7 @@ class InfoAction extends FormlessAction {
                $real_names = [];
                $user_names = [];
                $anon_ips = [];
+               $linkRenderer = MediaWikiServices::getLinkRenderer();
 
                # Sift for real versus user names
                /** @var $user User */
@@ -846,11 +845,11 @@ class InfoAction extends FormlessAction {
 
                        $hiddenPrefs = $this->context->getConfig()->get( 'HiddenPrefs' );
                        if ( $user->getId() == 0 ) {
-                               $anon_ips[] = Linker::link( $page, htmlspecialchars( $user->getName() ) );
+                               $anon_ips[] = $linkRenderer->makeLink( $page, $user->getName() );
                        } elseif ( !in_array( 'realname', $hiddenPrefs ) && $user->getRealName() ) {
-                               $real_names[] = Linker::link( $page, htmlspecialchars( $user->getRealName() ) );
+                               $real_names[] = $linkRenderer->makeLink( $page, $user->getRealName() );
                        } else {
-                               $user_names[] = Linker::link( $page, htmlspecialchars( $user->getName() ) );
+                               $user_names[] = $linkRenderer->makeLink( $page, $user->getName() );
                        }
                }
 
index 8df6044..611e683 100644 (file)
@@ -20,6 +20,8 @@
  * @ingroup Actions
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Mark a revision as patrolled on a page
  *
@@ -56,6 +58,7 @@ class MarkpatrolledAction extends FormAction {
        protected function preText() {
                $rc = $this->getRecentChange();
                $title = $rc->getTitle();
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
 
                // Based on logentry-patrol-patrol (see PatrolLogFormatter)
                $revId = $rc->getAttribute( 'rc_this_oldid' );
@@ -64,8 +67,8 @@ class MarkpatrolledAction extends FormAction {
                        'diff' => $revId,
                        'oldid' => $rc->getAttribute( 'rc_last_oldid' )
                ];
-               $revlink = Linker::link( $title, htmlspecialchars( $revId ), [], $query );
-               $pagelink = Linker::link( $title, htmlspecialchars( $title->getPrefixedText() ) );
+               $revlink = $linkRenderer->makeLink( $title, $revId, [], $query );
+               $pagelink = $linkRenderer->makeLink( $title, $title->getPrefixedText() );
 
                return $this->msg( 'confirm-markpatrolled-top' )->params(
                        $title->getPrefixedText(),
index 3d2159c..dd88b5f 100644 (file)
@@ -22,6 +22,8 @@
  * @file
  */
 
+use MediaWiki\Session\Token;
+
 /**
  * @since 1.25
  * @ingroup API
@@ -39,6 +41,13 @@ class ApiCheckToken extends ApiBase {
                $tokenObj = ApiQueryTokens::getToken(
                        $this->getUser(), $this->getRequest()->getSession(), $salts[$params['type']]
                );
+
+               if ( substr( $token, -strlen( urldecode( Token::SUFFIX ) ) ) === urldecode( Token::SUFFIX ) ) {
+                       $this->setWarning(
+                               "Check that symbols such as \"+\" in the token are properly percent-encoded in the URL."
+                       );
+               }
+
                if ( $tokenObj->match( $token, $maxage ) ) {
                        $res['result'] = 'valid';
                } elseif ( $maxage !== null && $tokenObj->match( $token ) ) {
@@ -47,7 +56,7 @@ class ApiCheckToken extends ApiBase {
                        $res['result'] = 'invalid';
                }
 
-               $ts = MediaWiki\Session\Token::getTimestamp( $token );
+               $ts = Token::getTimestamp( $token );
                if ( $ts !== null ) {
                        $mwts = new MWTimestamp();
                        $mwts->timestamp->setTimestamp( $ts );
index 13b3577..99242a8 100644 (file)
@@ -45,7 +45,7 @@ class ApiClearHasMsg extends ApiBase {
        }
 
        public function mustBePosted() {
-               return false;
+               return true;
        }
 
        protected function getExamplesMessages() {
index 1a509c5..853a805 100644 (file)
@@ -1412,13 +1412,7 @@ class ApiPageSet extends ApiBase {
                                ApiBase::PARAM_DFLT => false,
                                ApiBase::PARAM_HELP_MSG => [
                                        'api-pageset-param-converttitles',
-                                       new DeferredStringifier(
-                                               function ( IContextSource $context ) {
-                                                       return $context->getLanguage()
-                                                               ->commaList( LanguageConverter::$languagesWithVariants );
-                                               },
-                                               $this
-                                       )
+                                       [ Message::listParam( LanguageConverter::$languagesWithVariants, 'text' ) ],
                                ],
                        ],
                ];
index 6be5198..9962d5e 100644 (file)
@@ -107,10 +107,25 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                $matches = $search->searchText( $query );
                        }
                }
-               if ( is_null( $matches ) ) {
+
+               if ( $matches instanceof Status ) {
+                       $status = $matches;
+                       $matches = $status->getValue();
+               } else {
+                       $status = null;
+               }
+
+               if ( $status ) {
+                       if ( $status->isOK() ) {
+                               $this->getMain()->getErrorFormatter()->addMessagesFromStatus(
+                                       $this->getModuleName(),
+                                       $status
+                               );
+                       } else {
+                               $this->dieUsage( $status->getWikiText( false, false, 'en' ), 'search-error' );
+                       }
+               } elseif ( is_null( $matches ) ) {
                        $this->dieUsage( "{$what} search is disabled", "search-{$what}-disabled" );
-               } elseif ( $matches instanceof Status && !$matches->isGood() ) {
-                       $this->dieUsage( $matches->getWikiText( false, false, 'en' ), 'search-error' );
                }
 
                if ( $resultPageSet === null ) {
index 77fa924..9a923c7 100644 (file)
        "apihelp-expandtemplates-paramvalue-prop-ttl": "Le délai maximum après lequel la mise en cache de ce résultat doit être invalidée.",
        "apihelp-expandtemplates-paramvalue-prop-modules": "Tous les modules ResourceLoader que les fonctions d’analyse ont demandé d’ajouter à la sortie. Soit <kbd>jsconfigvars</kbd> soit <kbd>encodedjsconfigvars</kbd> doit être demandé avec <kbd>modules</kbd>.",
        "apihelp-expandtemplates-paramvalue-prop-jsconfigvars": "Donne les variables de configuration JavaScript spécifiques à la page.",
-       "apihelp-expandtemplates-paramvalue-prop-encodedjsconfigvars": "Donne les variables de configuration JavaScript spécifiques à la page sous forme de chaîne JSON.",
+       "apihelp-expandtemplates-paramvalue-prop-encodedjsconfigvars": "Donne les variables de configuration JavaScript spécifiques à la page sous la forme d'une chaîne JSON.",
        "apihelp-expandtemplates-paramvalue-prop-parsetree": "L’arbre d’analyse XML de l’entrée.",
        "apihelp-expandtemplates-param-includecomments": "S’il faut inclure les commentaires HTML dans la sortie.",
        "apihelp-expandtemplates-param-generatexml": "Générer l’arbre d’analyse XML (remplacé par $1prop=parsetree).",
        "apihelp-feedcontributions-param-feedformat": "Le format du flux.",
        "apihelp-feedcontributions-param-user": "Pour quels utilisateurs récupérer les contributions.",
        "apihelp-feedcontributions-param-namespace": "Par quels espaces de nom filtrer les contributions.",
-       "apihelp-feedcontributions-param-year": "Depuis l’année (et plus récent).",
+       "apihelp-feedcontributions-param-year": "De l’année (et antérieur).",
        "apihelp-feedcontributions-param-month": "Depuis le mois (et plus récent).",
        "apihelp-feedcontributions-param-tagfilter": "Filtrer les contributions qui ont ces balises.",
        "apihelp-feedcontributions-param-deletedonly": "Afficher uniquement les contributions supprimées.",
index 859fd0c..fd36887 100644 (file)
@@ -242,14 +242,14 @@ class LocalPasswordPrimaryAuthenticationProvider
 
                $pwhash = null;
 
-               if ( $this->loginOnly ) {
-                       $pwhash = $this->getPasswordFactory()->newFromCiphertext( null );
-                       $expiry = null;
-                       // @codeCoverageIgnoreStart
-               } elseif ( get_class( $req ) === PasswordAuthenticationRequest::class ) {
-                       // @codeCoverageIgnoreEnd
-                       $pwhash = $this->getPasswordFactory()->newFromPlaintext( $req->password );
-                       $expiry = $this->getNewPasswordExpiry( $username );
+               if ( get_class( $req ) === PasswordAuthenticationRequest::class ) {
+                       if ( $this->loginOnly ) {
+                               $pwhash = $this->getPasswordFactory()->newFromCiphertext( null );
+                               $expiry = null;
+                       } else {
+                               $pwhash = $this->getPasswordFactory()->newFromPlaintext( $req->password );
+                               $expiry = $this->getNewPasswordExpiry( $username );
+                       }
                }
 
                if ( $pwhash ) {
index fb461b7..8c70be2 100644 (file)
@@ -82,6 +82,8 @@ interface ICacheHelper {
        function setExpiry( $cacheExpiry );
 }
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Helper class for caching various elements in a single cache entry.
  *
@@ -217,9 +219,9 @@ class CacheHelper implements ICacheHelper {
                        $subPage = explode( '/', $subPage, 2 );
                        $subPage = count( $subPage ) > 1 ? $subPage[1] : false;
 
-                       $message .= ' ' . Linker::link(
+                       $message .= ' ' . MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
                                $context->getTitle( $subPage ),
-                               $context->msg( 'cachedspecial-refresh-now' )->escaped(),
+                               $context->msg( 'cachedspecial-refresh-now' )->text(),
                                [],
                                $refreshArgs
                        );
index 3f78d9a..4e6b2fd 100644 (file)
@@ -22,7 +22,6 @@
  */
 use MediaWiki\MediaWikiServices;
 use Wikimedia\ScopedCallback;
-use MediaWiki\Logger\LoggerFactory;
 
 /**
  * MediaWiki message cache structure version.
@@ -53,11 +52,6 @@ class MessageCache {
         */
        protected $mCache;
 
-       /**
-        * @var bool[] Map of (language code => boolean)
-        */
-       protected $mCacheVolatile = [];
-
        /**
         * Should mean that database cannot be used, but check
         * @var bool $mDisable
@@ -71,12 +65,10 @@ class MessageCache {
        protected $mExpiry;
 
        /**
-        * Message cache has its own parser which it uses to transform messages
-        * @var ParserOptions
+        * Message cache has its own parser which it uses to transform
+        * messages.
         */
-       protected $mParserOptions;
-       /** @var Parser */
-       protected $mParser;
+       protected $mParserOptions, $mParser;
 
        /**
         * Variable for tracking which variables are already loaded
@@ -137,7 +129,6 @@ class MessageCache {
         */
        public static function normalizeKey( $key ) {
                global $wgContLang;
-
                $lckey = strtr( $key, ' ', '_' );
                if ( ord( $lckey ) < 128 ) {
                        $lckey[0] = strtolower( $lckey[0] );
@@ -267,7 +258,6 @@ class MessageCache {
                # Hash of the contents is stored in memcache, to detect if data-center cache
                # or local cache goes out of date (e.g. due to replace() on some other server)
                list( $hash, $hashVolatile ) = $this->getValidationHash( $code );
-               $this->mCacheVolatile[$code] = $hashVolatile;
 
                # Try the local cache and check against the cluster hash key...
                $cache = $this->getLocalCache( $code );
@@ -483,16 +473,9 @@ class MessageCache {
                $bigConds[] = 'page_len > ' . intval( $wgMaxMsgCacheEntrySize );
 
                # Load titles for all oversized pages in the MediaWiki namespace
-               $res = $dbr->select(
-                       'page',
-                       [ 'page_title', 'page_latest' ],
-                       $bigConds,
-                       __METHOD__ . "($code)-big"
-               );
+               $res = $dbr->select( 'page', 'page_title', $bigConds, __METHOD__ . "($code)-big" );
                foreach ( $res as $row ) {
                        $cache[$row->page_title] = '!TOO BIG';
-                       // At least include revision ID so page changes are reflected in the hash
-                       $cache['EXCESSIVE'][$row->page_title] = $row->page_latest;
                }
 
                # Conditions to load the remaining pages with their contents
@@ -513,6 +496,7 @@ class MessageCache {
                        if ( $text === false ) {
                                // Failed to fetch data; possible ES errors?
                                // Store a marker to fetch on-demand as a workaround...
+                               // TODO Use a differnt marker
                                $entry = '!TOO BIG';
                                wfDebugLog(
                                        'MessageCache',
@@ -527,6 +511,10 @@ class MessageCache {
 
                $cache['VERSION'] = MSG_CACHE_VERSION;
                ksort( $cache );
+
+               # Hash for validating local cache (APC). No need to take into account
+               # messages larger than $wgMaxMsgCacheEntrySize, since those are only
+               # stored and fetched from memcache.
                $cache['HASH'] = md5( serialize( $cache ) );
                $cache['EXPIRY'] = wfTimestamp( TS_MW, time() + $this->mExpiry );
 
@@ -537,7 +525,7 @@ class MessageCache {
         * Updates cache as necessary when message page is changed
         *
         * @param string|bool $title Name of the page changed (false if deleted)
-        * @param string|bool $text New contents of the page (false if deleted)
+        * @param mixed $text New contents of the page.
         */
        public function replace( $title, $text ) {
                global $wgMaxMsgCacheEntrySize, $wgContLang, $wgLanguageCode;
@@ -557,36 +545,36 @@ class MessageCache {
                // a self-deadlock. This is safe as no reads happen *directly* in this
                // method between getReentrantScopedLock() and load() below. There is
                // no risk of data "changing under our feet" for replace().
-               $scopedLock = $this->getReentrantScopedLock( wfMemcKey( 'messages', $code ) );
-               // Load the messages from the master DB to avoid race conditions
+               $cacheKey = wfMemcKey( 'messages', $code );
+               $scopedLock = $this->getReentrantScopedLock( $cacheKey );
                $this->load( $code, self::FOR_UPDATE );
 
-               // Load the new value into the process cache...
+               $titleKey = wfMemcKey( 'messages', 'individual', $title );
                if ( $text === false ) {
+                       // Article was deleted
                        $this->mCache[$code][$title] = '!NONEXISTENT';
+                       $this->wanCache->delete( $titleKey );
                } elseif ( strlen( $text ) > $wgMaxMsgCacheEntrySize ) {
+                       // Check for size
                        $this->mCache[$code][$title] = '!TOO BIG';
-                       // Pre-fill the individual key cache with the known latest message text
-                       $key = $this->wanCache->makeKey( 'messages-big', $this->mCache[$code]['HASH'], $title );
-                       $this->wanCache->set( $key, " $text", $this->mExpiry );
+                       $this->wanCache->set( $titleKey, ' ' . $text, $this->mExpiry );
                } else {
                        $this->mCache[$code][$title] = ' ' . $text;
+                       $this->wanCache->delete( $titleKey );
                }
-               // Mark this cache as definitely being "latest" (non-volatile) so
-               // load() calls do not try to refresh the cache with replica DB data
+
+               // Mark this cache as definitely "latest" (non-volatile) so
+               // load() calls do try to refresh the cache with replica DB data
                $this->mCache[$code]['LATEST'] = time();
 
                // Update caches if the lock was acquired
                if ( $scopedLock ) {
                        $this->saveToCaches( $this->mCache[$code], 'all', $code );
-               } else {
-                       LoggerFactory::getInstance( 'MessageCache' )->error(
-                               __METHOD__ . ': could not acquire lock to update {title} ({code})',
-                               [ 'title' => $title, 'code' => $code ] );
                }
 
                ScopedCallback::consume( $scopedLock );
-               // Relay the purge to APC and other DCs
+               // Relay the purge. Touching this check key expires cache contents
+               // and local cache (APC) validation hash across all datacenters.
                $this->wanCache->touchCheckKey( wfMemcKey( 'messages', $code ) );
 
                // Also delete cached sidebar... just in case it is affected
@@ -662,26 +650,24 @@ class MessageCache {
        protected function getValidationHash( $code ) {
                $curTTL = null;
                $value = $this->wanCache->get(
-                       $this->wanCache->makeKey( 'messages', $code, 'hash', 'v1' ),
+                       wfMemcKey( 'messages', $code, 'hash', 'v1' ),
                        $curTTL,
                        [ wfMemcKey( 'messages', $code ) ]
                );
 
-               if ( $value ) {
+               if ( !$value ) {
+                       // No hash found at all; cache must regenerate to be safe
+                       $hash = false;
+                       $expired = true;
+               } else {
                        $hash = $value['hash'];
-                       if ( ( time() - $value['latest'] ) < WANObjectCache::TTL_MINUTE ) {
-                               // Cache was recently updated via replace() and should be up-to-date.
-                               // That method is only called in the primary datacenter and uses FOR_UPDATE.
-                               // Also, it is unlikely that the current datacenter is *now* secondary one.
+                       if ( ( time() - $value['latest'] ) < WANObjectCache::HOLDOFF_TTL ) {
+                               // Cache was recently updated via replace() and should be up-to-date
                                $expired = false;
                        } else {
                                // See if the "check" key was bumped after the hash was generated
                                $expired = ( $curTTL < 0 );
                        }
-               } else {
-                       // No hash found at all; cache must regenerate to be safe
-                       $hash = false;
-                       $expired = true;
                }
 
                return [ $hash, $expired ];
@@ -691,15 +677,14 @@ class MessageCache {
         * Set the md5 used to validate the local disk cache
         *
         * If $cache has a 'LATEST' UNIX timestamp key, then the hash will not
-        * be treated as "volatile" by getValidationHash() for the next few seconds.
-        * This is triggered when $cache is generated using FOR_UPDATE mode.
+        * be treated as "volatile" by getValidationHash() for the next few seconds
         *
         * @param string $code
         * @param array $cache Cached messages with a version
         */
        protected function setValidationHash( $code, array $cache ) {
                $this->wanCache->set(
-                       $this->wanCache->makeKey( 'messages', $code, 'hash', 'v1' ),
+                       wfMemcKey( 'messages', $code, 'hash', 'v1' ),
                        [
                                'hash' => $cache['HASH'],
                                'latest' => isset( $cache['LATEST'] ) ? $cache['LATEST'] : 0
@@ -862,7 +847,6 @@ class MessageCache {
         */
        private function getMessageForLang( $lang, $lckey, $useDB, &$alreadyTried ) {
                global $wgContLang;
-
                $langcode = $lang->getCode();
 
                // Try checking the database for the requested language
@@ -921,7 +905,6 @@ class MessageCache {
         */
        private function getMessagePageName( $langcode, $uckey ) {
                global $wgLanguageCode;
-
                if ( $langcode === $wgLanguageCode ) {
                        // Messages created in the content language will not have the /lang extension
                        return $uckey;
@@ -947,7 +930,8 @@ class MessageCache {
                if ( isset( $this->mCache[$code][$title] ) ) {
                        $entry = $this->mCache[$code][$title];
                        if ( substr( $entry, 0, 1 ) === ' ' ) {
-                               // The message exists, so make sure a string is returned.
+                               // The message exists, so make sure a string
+                               // is returned.
                                return (string)substr( $entry, 1 );
                        } elseif ( $entry === '!NONEXISTENT' ) {
                                return false;
@@ -966,19 +950,17 @@ class MessageCache {
                }
 
                // Try the individual message cache
-               $titleKey = $this->wanCache->makeKey( 'messages-big', $this->mCache[$code]['HASH'], $title );
-
-               if ( $this->mCacheVolatile[$code] ) {
-                       $entry = false;
-                       // Make sure that individual keys respect the WAN cache holdoff period too
-                       LoggerFactory::getInstance( 'MessageCache' )->debug(
-                               __METHOD__ . ': loading volatile key \'{titleKey}\'',
-                               [ 'titleKey' => $titleKey, 'code' => $code ] );
-               } else {
-                       $entry = $this->wanCache->get( $titleKey );
-               }
+               $titleKey = wfMemcKey( 'messages', 'individual', $title );
 
-               if ( $entry !== false ) {
+               $curTTL = null;
+               $entry = $this->wanCache->get(
+                       $titleKey,
+                       $curTTL,
+                       [ wfMemcKey( 'messages', $code ) ]
+               );
+               $entry = ( $curTTL >= 0 ) ? $entry : false;
+
+               if ( $entry ) {
                        if ( substr( $entry, 0, 1 ) === ' ' ) {
                                $this->mCache[$code][$title] = $entry;
                                // The message exists, so make sure a string is returned
@@ -993,7 +975,7 @@ class MessageCache {
                        }
                }
 
-               // Try loading the message from the database
+               // Try loading it from the database
                $dbr = wfGetDB( DB_REPLICA );
                $cacheOpts = Database::getCacheSetOptions( $dbr );
                // Use newKnownCurrent() to avoid querying revision/user tables
@@ -1010,18 +992,32 @@ class MessageCache {
 
                if ( $revision ) {
                        $content = $revision->getContent();
-                       if ( $content ) {
-                               $message = $this->getMessageTextFromContent( $content );
-                               if ( is_string( $message ) ) {
+                       if ( !$content ) {
+                               // A possibly temporary loading failure.
+                               wfDebugLog(
+                                       'MessageCache',
+                                       __METHOD__ . ": failed to load message page text for {$title} ($code)"
+                               );
+                               $message = null; // no negative caching
+                       } else {
+                               // XXX: Is this the right way to turn a Content object into a message?
+                               // NOTE: $content is typically either WikitextContent, JavaScriptContent or
+                               //       CssContent. MessageContent is *not* used for storing messages, it's
+                               //       only used for wrapping them when needed.
+                               $message = $content->getWikitextForTransclusion();
+
+                               if ( $message === false || $message === null ) {
+                                       wfDebugLog(
+                                               'MessageCache',
+                                               __METHOD__ . ": message content doesn't provide wikitext "
+                                                       . "(content model: " . $content->getModel() . ")"
+                                       );
+
+                                       $message = false; // negative caching
+                               } else {
                                        $this->mCache[$code][$title] = ' ' . $message;
                                        $this->wanCache->set( $titleKey, ' ' . $message, $this->mExpiry, $cacheOpts );
                                }
-                       } else {
-                               // A possibly temporary loading failure
-                               LoggerFactory::getInstance( 'MessageCache' )->warning(
-                                       __METHOD__ . ': failed to load message page text for \'{titleKey}\'',
-                                       [ 'titleKey' => $titleKey, 'code' => $code ] );
-                               $message = null; // no negative caching
                        }
                } else {
                        $message = false; // negative caching
@@ -1073,7 +1069,6 @@ class MessageCache {
         */
        function getParser() {
                global $wgParser, $wgParserConf;
-
                if ( !$this->mParser && isset( $wgParser ) ) {
                        # Do some initialisation so that we don't have to do it twice
                        $wgParser->firstCallInit();
@@ -1101,8 +1096,6 @@ class MessageCache {
        public function parse( $text, $title = null, $linestart = true,
                $interface = false, $language = null
        ) {
-               global $wgTitle;
-
                if ( $this->mInParser ) {
                        return htmlspecialchars( $text );
                }
@@ -1117,6 +1110,7 @@ class MessageCache {
                $popts->setTargetLanguage( $language );
 
                if ( !$title || !$title instanceof Title ) {
+                       global $wgTitle;
                        wfDebugLog( 'GlobalTitleFail', __METHOD__ . ' called by ' .
                                wfGetAllCallers( 6 ) . ' with no title set.' );
                        $title = $wgTitle;
@@ -1204,7 +1198,6 @@ class MessageCache {
         */
        public function getAllMessageKeys( $code ) {
                global $wgContLang;
-
                $this->load( $code );
                if ( !isset( $this->mCache[$code] ) ) {
                        // Apparently load() failed
@@ -1214,61 +1207,10 @@ class MessageCache {
                $cache = $this->mCache[$code];
                unset( $cache['VERSION'] );
                unset( $cache['EXPIRY'] );
-               unset( $cache['EXCESSIVE'] );
                // Remove any !NONEXISTENT keys
                $cache = array_diff( $cache, [ '!NONEXISTENT' ] );
 
                // Keys may appear with a capital first letter. lcfirst them.
                return array_map( [ $wgContLang, 'lcfirst' ], array_keys( $cache ) );
        }
-
-       /**
-        * Purge message caches when a MediaWiki: page is created, updated, or deleted
-        *
-        * @param Title $title Message page title
-        * @param Content|null $content New content for edit/create, null on deletion
-        * @since 1.29
-        */
-       public function updateMessageOverride( Title $title, Content $content = null ) {
-               global $wgContLang;
-
-               $msgText = $this->getMessageTextFromContent( $content );
-               if ( $msgText === null ) {
-                       $msgText = false; // treat as not existing
-               }
-
-               $this->replace( $title->getDBkey(), $msgText );
-
-               if ( $wgContLang->hasVariants() ) {
-                       $wgContLang->updateConversionTable( $title );
-               }
-       }
-
-       /**
-        * @param Content|null $content Content or null if the message page does not exist
-        * @return string|bool|null Returns false if $content is null and null on error
-        */
-       private function getMessageTextFromContent( Content $content = null ) {
-               // @TODO: could skip pseudo-messages like js/css here, based on content model
-               if ( $content ) {
-                       // Message page exists...
-                       // XXX: Is this the right way to turn a Content object into a message?
-                       // NOTE: $content is typically either WikitextContent, JavaScriptContent or
-                       //       CssContent. MessageContent is *not* used for storing messages, it's
-                       //       only used for wrapping them when needed.
-                       $msgText = $content->getWikitextForTransclusion();
-                       if ( $msgText === false || $msgText === null ) {
-                               // This might be due to some kind of misconfiguration...
-                               $msgText = null;
-                               LoggerFactory::getInstance( 'MessageCache' )->warning(
-                                       __METHOD__ . ": message content doesn't provide wikitext "
-                                       . "(content model: " . $content->getModel() . ")" );
-                       }
-               } else {
-                       // Message page does not exist...
-                       $msgText = false;
-               }
-
-               return $msgText;
-       }
 }
index 2dc953c..b78efaf 100644 (file)
@@ -19,6 +19,8 @@
  * @ingroup Change tagging
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * Item class for a logging table row with its associated change tags.
  * @todo Abstract out a base class for this and RevDelLogItem, similar to the
@@ -70,9 +72,9 @@ class ChangeTagsLogItem extends RevisionItemBase {
                $formatter->setAudience( LogFormatter::FOR_THIS_USER );
 
                // Log link for this page
-               $loglink = Linker::link(
+               $loglink = MediaWikiServices::getInstance()->getLinkRenderer()->makeLink(
                        SpecialPage::getTitleFor( 'Log' ),
-                       $this->list->msg( 'log' )->escaped(),
+                       $this->list->msg( 'log' )->text(),
                        [],
                        [ 'page' => $title->getPrefixedText() ]
                );
diff --git a/includes/debug/logger/monolog/LogstashFormatter.php b/includes/debug/logger/monolog/LogstashFormatter.php
new file mode 100644 (file)
index 0000000..553cbf6
--- /dev/null
@@ -0,0 +1,83 @@
+<?php
+
+namespace MediaWiki\Logger\Monolog;
+
+/**
+ * LogstashFormatter squashes the base message array and the context and extras subarrays into one.
+ * This can result in unfortunately named context fields overwriting other data (T145133).
+ * This class modifies the standard LogstashFormatter to rename such fields and flag the message.
+ *
+ * Compatible with Monolog 1.x only.
+ *
+ * @since 1.29
+ */
+class LogstashFormatter extends \Monolog\Formatter\LogstashFormatter {
+       /** @var array Keys which should not be used in log context */
+       protected $reservedKeys = [
+               // from LogstashFormatter
+               'message', 'channel', 'level', 'type',
+               // from WebProcessor
+               'url', 'ip', 'http_method', 'server', 'referrer',
+               // from WikiProcessor
+               'host', 'wiki', 'reqId', 'mwversion',
+               // from config magic
+               'normalized_message',
+       ];
+
+       /**
+        * Prevent key conflicts
+        * @param array $record
+        * @return array
+        */
+       protected function formatV0( array $record ) {
+               if ( $this->contextPrefix ) {
+                       return parent::formatV0( $record );
+               }
+
+               $context = !empty( $record['context'] ) ? $record['context'] : [];
+               $record['context'] = [];
+               $formatted = parent::formatV0( $record );
+
+               $formatted['@fields'] = $this->fixKeyConflicts( $formatted['@fields'], $context );
+               return $formatted;
+       }
+
+       /**
+        * Prevent key conflicts
+        * @param array $record
+        * @return array
+        */
+       protected function formatV1( array $record ) {
+               if ( $this->contextPrefix ) {
+                       return parent::formatV1( $record );
+               }
+
+               $context = !empty( $record['context'] ) ? $record['context'] : [];
+               $record['context'] = [];
+               $formatted = parent::formatV1( $record );
+
+               $formatted = $this->fixKeyConflicts( $formatted, $context );
+               return $formatted;
+       }
+
+       /**
+        * Check whether some context field would overwrite another message key. If so, rename
+        * and flag.
+        * @param array $fields Fields to be sent to logstash
+        * @param array $context Copy of the original $record['context']
+        * @return array Updated version of $fields
+        */
+       protected function fixKeyConflicts( array $fields, array $context ) {
+               foreach ( $context as $key => $val ) {
+                       if (
+                               in_array( $key, $this->reservedKeys, true ) &&
+                               isset( $fields[$key] ) && $fields[$key] !== $val
+                       ) {
+                               $fields['logstash_formatter_key_conflict'][] = $key;
+                               $key = 'c_' . $key;
+                       }
+                       $fields[$key] = $val;
+               }
+               return $fields;
+       }
+}
index 81e1e14..ad939a0 100644 (file)
@@ -29,17 +29,6 @@ namespace MediaWiki\Logger\Monolog;
  * @copyright © 2013 Bryan Davis and Wikimedia Foundation.
  */
 class WikiProcessor {
-       /** @var array Keys which should not be used in log context */
-       protected $reservedKeys = [
-               // from monolog:src/Monolog/Formatter/LogstashFormatter.php#L71-L88
-               'message', 'channel', 'level', 'type',
-               // from WebProcessor
-               'url', 'ip', 'http_method', 'server', 'referrer',
-               // from WikiProcessor
-               'host', 'wiki', 'reqId', 'mwversion',
-               // from config magic
-               'normalized_message',
-       ];
 
        /**
         * @param array $record
@@ -47,15 +36,6 @@ class WikiProcessor {
         */
        public function __invoke( array $record ) {
                global $wgVersion;
-
-               // some log aggregators such as Logstash will merge the log context into the main
-               // metadata and end up overwriting the data coming from processors
-               foreach ( $this->reservedKeys as $key ) {
-                       if ( isset( $record['context'][$key] ) ) {
-                               wfLogWarning( __METHOD__ . ": '$key' key overwritten in log context." );
-                       }
-               }
-
                $record['extra'] = array_merge(
                        $record['extra'],
                        [
@@ -67,4 +47,5 @@ class WikiProcessor {
                );
                return $record;
        }
+
 }
index c1d5573..9188cd9 100644 (file)
@@ -1018,7 +1018,7 @@ abstract class File implements IDBAccessObject {
                        return $handler->getTransform( $this, $thumbPath, $thumbUrl, $params );
                } else {
                        return new MediaTransformError( 'thumbnail_error',
-                               $params['width'], 0, wfMessage( 'thumbnail-dest-create' )->text() );
+                               $params['width'], 0, wfMessage( 'thumbnail-dest-create' ) );
                }
        }
 
index f58c3a9..7fd3e83 100644 (file)
@@ -38,11 +38,10 @@ class CurlHttpRequest extends MWHttpRequest {
        }
 
        public function execute() {
-
-               parent::execute();
+               $this->prepare();
 
                if ( !$this->status->isOK() ) {
-                       return $this->status;
+                       return Status::wrap( $this->status ); // TODO B/C; move this to callers
                }
 
                $this->curlOptions[CURLOPT_PROXY] = $this->proxy;
@@ -102,7 +101,7 @@ class CurlHttpRequest extends MWHttpRequest {
                $curlHandle = curl_init( $this->url );
 
                if ( !curl_setopt_array( $curlHandle, $this->curlOptions ) ) {
-                       throw new MWException( "Error setting curl options." );
+                       throw new InvalidArgumentException( "Error setting curl options." );
                }
 
                if ( $this->followRedirects && $this->canFollowRedirects() ) {
@@ -140,7 +139,7 @@ class CurlHttpRequest extends MWHttpRequest {
                $this->parseHeader();
                $this->setStatus();
 
-               return $this->status;
+               return Status::wrap( $this->status );  // TODO B/C; move this to callers
        }
 
        /**
index 43ae2d0..8255bb3 100644 (file)
@@ -51,6 +51,8 @@ class Http {
         *    - userAgent           A user agent, if you want to override the default
         *                          MediaWiki/$wgVersion
         *    - logger              A \Psr\Logger\LoggerInterface instance for debug logging
+        *    - username            Username for HTTP Basic Authentication
+        *    - password            Password for HTTP Basic Authentication
         * @param string $caller The method making this request, for profiling
         * @return string|bool (bool)false on failure or a string on success
         */
@@ -74,7 +76,7 @@ class Http {
                } else {
                        $errors = $status->getErrorsByType( 'error' );
                        $logger = LoggerFactory::getInstance( 'http' );
-                       $logger->warning( $status->getWikiText( false, false, 'en' ),
+                       $logger->warning( Status::wrap( $status )->getWikiText( false, false, 'en' ),
                                [ 'error' => $errors, 'caller' => $caller, 'content' => $req->getContent() ] );
                        return false;
                }
index 08883ae..fac052f 100644 (file)
@@ -46,9 +46,11 @@ class MWHttpRequest implements LoggerAwareInterface {
        protected $reqHeaders = [];
        protected $url;
        protected $parsedUrl;
+       /** @var callable  */
        protected $callback;
        protected $maxRedirects = 5;
        protected $followRedirects = false;
+       protected $connectTimeout;
 
        /**
         * @var CookieJar
@@ -60,7 +62,8 @@ class MWHttpRequest implements LoggerAwareInterface {
        protected $respStatus = "200 Ok";
        protected $respHeaders = [];
 
-       public $status;
+       /** @var StatusValue */
+       protected $status;
 
        /**
         * @var Profiler
@@ -98,9 +101,9 @@ class MWHttpRequest implements LoggerAwareInterface {
                }
 
                if ( !$this->parsedUrl || !Http::isValidURI( $this->url ) ) {
-                       $this->status = Status::newFatal( 'http-invalid-url', $url );
+                       $this->status = StatusValue::newFatal( 'http-invalid-url', $url );
                } else {
-                       $this->status = Status::newGood( 100 ); // continue
+                       $this->status = StatusValue::newGood( 100 ); // continue
                }
 
                if ( isset( $options['timeout'] ) && $options['timeout'] != 'default' ) {
@@ -116,6 +119,12 @@ class MWHttpRequest implements LoggerAwareInterface {
                if ( isset( $options['userAgent'] ) ) {
                        $this->setUserAgent( $options['userAgent'] );
                }
+               if ( isset( $options['username'] ) && isset( $options['password'] ) ) {
+                       $this->setHeader(
+                               'Authorization',
+                               'Basic ' . base64_encode( $options['username'] . ':' . $options['password'] )
+                       );
+               }
 
                $members = [ "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
                                "method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" ];
@@ -161,7 +170,7 @@ class MWHttpRequest implements LoggerAwareInterface {
         * @param string $url Url to use
         * @param array $options (optional) extra params to pass (see Http::request())
         * @param string $caller The method making this request, for profiling
-        * @throws MWException
+        * @throws DomainException
         * @return CurlHttpRequest|PhpHttpRequest
         * @see MWHttpRequest::__construct
         */
@@ -169,7 +178,7 @@ class MWHttpRequest implements LoggerAwareInterface {
                if ( !Http::$httpEngine ) {
                        Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
                } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
-                       throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
+                       throw new DomainException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
                                ' Http::$httpEngine is set to "curl"' );
                }
 
@@ -186,7 +195,7 @@ class MWHttpRequest implements LoggerAwareInterface {
                                return new CurlHttpRequest( $url, $options, $caller, Profiler::instance() );
                        case 'php':
                                if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
-                                       throw new MWException( __METHOD__ . ': allow_url_fopen ' .
+                                       throw new DomainException( __METHOD__ . ': allow_url_fopen ' .
                                                'needs to be enabled for pure PHP http requests to ' .
                                                'work. If possible, curl should be used instead. See ' .
                                                'http://php.net/curl.'
@@ -194,7 +203,7 @@ class MWHttpRequest implements LoggerAwareInterface {
                                }
                                return new PhpHttpRequest( $url, $options, $caller, Profiler::instance() );
                        default:
-                               throw new MWException( __METHOD__ . ': The setting of Http::$httpEngine is not valid.' );
+                               throw new DomainException( __METHOD__ . ': The setting of Http::$httpEngine is not valid.' );
                }
        }
 
@@ -222,7 +231,7 @@ class MWHttpRequest implements LoggerAwareInterface {
         *
         * @return void
         */
-       public function proxySetup() {
+       protected function proxySetup() {
                // If there is an explicit proxy set and proxies are not disabled, then use it
                if ( $this->proxy && !$this->noProxy ) {
                        return;
@@ -300,7 +309,7 @@ class MWHttpRequest implements LoggerAwareInterface {
         * Get an array of the headers
         * @return array
         */
-       public function getHeaderList() {
+       protected function getHeaderList() {
                $list = [];
 
                if ( $this->cookieJar ) {
@@ -333,12 +342,14 @@ class MWHttpRequest implements LoggerAwareInterface {
         * bytes are reported handled than were passed to you, the HTTP fetch
         * will be aborted.
         *
-        * @param callable $callback
-        * @throws MWException
+        * @param callable|null $callback
+        * @throws InvalidArgumentException
         */
        public function setCallback( $callback ) {
-               if ( !is_callable( $callback ) ) {
-                       throw new MWException( 'Invalid MwHttpRequest callback' );
+               if ( is_null( $callback ) ) {
+                       $callback = [ $this, 'read' ];
+               } elseif ( !is_callable( $callback ) ) {
+                       throw new InvalidArgumentException( __METHOD__ . ': invalid callback' );
                }
                $this->callback = $callback;
        }
@@ -350,6 +361,7 @@ class MWHttpRequest implements LoggerAwareInterface {
         * @param resource $fh
         * @param string $content
         * @return int
+        * @internal
         */
        public function read( $fh, $content ) {
                $this->content .= $content;
@@ -359,9 +371,14 @@ class MWHttpRequest implements LoggerAwareInterface {
        /**
         * Take care of whatever is necessary to perform the URI request.
         *
-        * @return Status
+        * @return StatusValue
+        * @note currently returns Status for B/C
         */
        public function execute() {
+               throw new LogicException( 'children must override this' );
+       }
+
+       protected function prepare() {
                $this->content = "";
 
                if ( strtoupper( $this->method ) == "HEAD" ) {
@@ -371,7 +388,7 @@ class MWHttpRequest implements LoggerAwareInterface {
                $this->proxySetup(); // set up any proxy as needed
 
                if ( !$this->callback ) {
-                       $this->setCallback( [ $this, 'read' ] );
+                       $this->setCallback( null );
                }
 
                if ( !isset( $this->reqHeaders['User-Agent'] ) ) {
@@ -494,6 +511,8 @@ class MWHttpRequest implements LoggerAwareInterface {
        /**
         * Tells the MWHttpRequest object to use this pre-loaded CookieJar.
         *
+        * To read response cookies from the jar, getCookieJar must be called first.
+        *
         * @param CookieJar $jar
         */
        public function setCookieJar( $jar ) {
@@ -519,14 +538,18 @@ class MWHttpRequest implements LoggerAwareInterface {
         * Set-Cookie headers.
         * @see Cookie::set
         * @param string $name
-        * @param mixed $value
+        * @param string $value
         * @param array $attr
         */
-       public function setCookie( $name, $value = null, $attr = null ) {
+       public function setCookie( $name, $value, $attr = [] ) {
                if ( !$this->cookieJar ) {
                        $this->cookieJar = new CookieJar;
                }
 
+               if ( $this->parsedUrl && !isset( $attr['domain'] ) ) {
+                       $attr['domain'] = $this->parsedUrl['host'];
+               }
+
                $this->cookieJar->setCookie( $name, $value, $attr );
        }
 
index 2af000f..d8a9949 100644 (file)
@@ -87,6 +87,7 @@ class PhpHttpRequest extends MWHttpRequest {
         * is completely useless (something like "fopen: failed to open stream")
         * so normal methods of handling errors programmatically
         * like get_last_error() don't work.
+        * @internal
         */
        public function errorHandler( $errno, $errstr ) {
                $n = count( $this->fopenErrors ) + 1;
@@ -94,8 +95,7 @@ class PhpHttpRequest extends MWHttpRequest {
        }
 
        public function execute() {
-
-               parent::execute();
+               $this->prepare();
 
                if ( is_array( $this->postData ) ) {
                        $this->postData = wfArrayToCgi( $this->postData );
@@ -227,12 +227,12 @@ class PhpHttpRequest extends MWHttpRequest {
                                        . ': error opening connection: {errstr1}', $this->fopenErrors );
                        }
                        $this->status->fatal( 'http-request-error' );
-                       return $this->status;
+                       return Status::wrap( $this->status ); // TODO B/C; move this to callers
                }
 
                if ( $result['timed_out'] ) {
                        $this->status->fatal( 'http-timed-out', $this->url );
-                       return $this->status;
+                       return Status::wrap( $this->status ); // TODO B/C; move this to callers
                }
 
                // If everything went OK, or we received some error code
@@ -253,6 +253,6 @@ class PhpHttpRequest extends MWHttpRequest {
                }
                fclose( $fh );
 
-               return $this->status;
+               return Status::wrap( $this->status ); // TODO B/C; move this to callers
        }
 }
index 6a702e9..6a8a99f 100644 (file)
@@ -32,8 +32,6 @@ require_once __DIR__ . '/../../maintenance/Maintenance.php';
  * @since 1.17
  */
 abstract class DatabaseUpdater {
-       protected static $updateCounter = 0;
-
        /**
         * Array of updates to perform on the database
         *
@@ -423,8 +421,6 @@ abstract class DatabaseUpdater {
         * @param array $what What updates to perform
         */
        public function doUpdates( $what = [ 'core', 'extensions', 'stats' ] ) {
-               global $wgVersion;
-
                $this->db->setSchemaVars( $this->getSchemaVars() );
 
                $what = array_flip( $what );
@@ -441,12 +437,9 @@ abstract class DatabaseUpdater {
                        $this->checkStats();
                }
 
-               $this->setAppliedUpdates( $wgVersion, $this->updates );
-
                if ( $this->fileHandle ) {
                        $this->skipSchema = false;
                        $this->writeSchemaUpdateFile();
-                       $this->setAppliedUpdates( "$wgVersion-schema", $this->updatesSkipped );
                }
        }
 
@@ -482,23 +475,6 @@ abstract class DatabaseUpdater {
                $this->updates = array_merge( $this->updates, $updatesDone );
        }
 
-       /**
-        * @param string $version
-        * @param array $updates
-        */
-       protected function setAppliedUpdates( $version, $updates = [] ) {
-               $this->db->clearFlag( DBO_DDLMODE );
-               if ( !$this->canUseNewUpdatelog() ) {
-                       return;
-               }
-               $key = "updatelist-$version-" . time() . self::$updateCounter;
-               self::$updateCounter++;
-               $this->db->insert( 'updatelog',
-                       [ 'ul_key' => $key, 'ul_value' => serialize( $updates ) ],
-                       __METHOD__ );
-               $this->db->setFlag( DBO_DDLMODE );
-       }
-
        /**
         * Helper function: check if the given key is present in the updatelog table.
         * Obviously, only use this for updates that occur after the updatelog table was
index 910a7ca..8f5700a 100644 (file)
  * @ingroup HTTP
  */
 
+/**
+ * Cookie jar to use with MWHttpRequest. Does not handle cookie unsetting.
+ */
 class CookieJar {
+       /** @var Cookie[] */
        private $cookie = [];
 
        /**
diff --git a/includes/libs/rdbms/connectionmanager/ConnectionManager.php b/includes/libs/rdbms/connectionmanager/ConnectionManager.php
new file mode 100644 (file)
index 0000000..6d5d8ab
--- /dev/null
@@ -0,0 +1,180 @@
+<?php
+
+namespace Wikimedia\Rdbms;
+
+use Database;
+use DBConnRef;
+use IDatabase;
+use InvalidArgumentException;
+use LoadBalancer;
+
+/**
+ * Database connection manager.
+ *
+ * This manages access to master and replica databases.
+ *
+ * @since 1.29
+ *
+ * @license GPL-2.0+
+ * @author Addshore
+ */
+class ConnectionManager {
+
+       /**
+        * @var LoadBalancer
+        */
+       private $loadBalancer;
+
+       /**
+        * The symbolic name of the target database, or false for the local wiki's database.
+        *
+        * @var string|false
+        */
+       private $domain;
+
+       /**
+        * @var string[]
+        */
+       private $groups = [];
+
+       /**
+        * @param LoadBalancer $loadBalancer
+        * @param string|bool $domain Optional logical DB name, defaults to current wiki.
+        *        This follows the convention for database names used by $loadBalancer.
+        * @param string[] $groups see LoadBalancer::getConnection
+        *
+        * @throws InvalidArgumentException
+        */
+       public function __construct( LoadBalancer $loadBalancer, $domain = false, array $groups = [] ) {
+               if ( !is_string( $domain ) && $domain !== false ) {
+                       throw new InvalidArgumentException( '$dbName must be a string, or false.' );
+               }
+
+               $this->loadBalancer = $loadBalancer;
+               $this->domain = $domain;
+               $this->groups = $groups;
+       }
+
+       /**
+        * @param int $i
+        * @param string[]|null $groups
+        *
+        * @return Database
+        */
+       private function getConnection( $i, array $groups = null ) {
+               $groups = $groups === null ? $this->groups : $groups;
+               return $this->loadBalancer->getConnection( $i, $groups, $this->domain );
+       }
+
+       /**
+        * @param int $i
+        * @param string[]|null $groups
+        *
+        * @return DBConnRef
+        */
+       private function getConnectionRef( $i, array $groups = null ) {
+               $groups = $groups === null ? $this->groups : $groups;
+               return $this->loadBalancer->getConnectionRef( $i, $groups, $this->domain );
+       }
+
+       /**
+        * Returns a connection to the master DB, for updating. The connection should later be released
+        * by calling releaseConnection().
+        *
+        * @since 1.29
+        *
+        * @return Database
+        */
+       public function getWriteConnection() {
+               return $this->getConnection( DB_MASTER );
+       }
+
+       /**
+        * Returns a database connection for reading. The connection should later be released by
+        * calling releaseConnection().
+        *
+        * @since 1.29
+        *
+        * @param string[]|null $groups
+        *
+        * @return Database
+        */
+       public function getReadConnection( array $groups = null ) {
+               $groups = $groups === null ? $this->groups : $groups;
+               return $this->getConnection( DB_REPLICA, $groups );
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @param IDatabase $db
+        */
+       public function releaseConnection( IDatabase $db ) {
+               $this->loadBalancer->reuseConnection( $db );
+       }
+
+       /**
+        * Returns a connection ref to the master DB, for updating.
+        *
+        * @since 1.29
+        *
+        * @return DBConnRef
+        */
+       public function getWriteConnectionRef() {
+               return $this->getConnectionRef( DB_MASTER );
+       }
+
+       /**
+        * Returns a database connection ref for reading.
+        *
+        * @since 1.29
+        *
+        * @param string[]|null $groups
+        *
+        * @return DBConnRef
+        */
+       public function getReadConnectionRef( array $groups = null ) {
+               $groups = $groups === null ? $this->groups : $groups;
+               return $this->getConnectionRef( DB_REPLICA, $groups );
+       }
+
+       /**
+        * Begins an atomic section and returns a database connection to the master DB, for updating.
+        *
+        * @since 1.29
+        *
+        * @param string $fname
+        *
+        * @return Database
+        */
+       public function beginAtomicSection( $fname ) {
+               $db = $this->getWriteConnection();
+               $db->startAtomic( $fname );
+
+               return $db;
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @param IDatabase $db
+        * @param string $fname
+        */
+       public function commitAtomicSection( IDatabase $db, $fname ) {
+               $db->endAtomic( $fname );
+               $this->releaseConnection( $db );
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @param IDatabase $db
+        * @param string $fname
+        */
+       public function rollbackAtomicSection( IDatabase $db, $fname ) {
+               // FIXME: there does not seem to be a clean way to roll back an atomic section?!
+               $db->rollback( $fname, 'flush' );
+               $this->releaseConnection( $db );
+       }
+
+}
diff --git a/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php b/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManager.php
new file mode 100644 (file)
index 0000000..02972e5
--- /dev/null
@@ -0,0 +1,118 @@
+<?php
+
+namespace Wikimedia\Rdbms;
+
+use Database;
+use DBConnRef;
+
+/**
+ * Database connection manager.
+ *
+ * This manages access to master and slave databases. It also manages state that indicates whether
+ * the slave databases are possibly outdated after a write operation, and thus the master database
+ * should be used for subsequent read operations.
+ *
+ * @note: Services that access overlapping sets of database tables, or interact with logically
+ * related sets of data in the database, should share a SessionConsistentConnectionManager.
+ * Services accessing unrelated sets of information may prefer to not share a
+ * SessionConsistentConnectionManager, so they can still perform read operations against slave
+ * databases after a (unrelated, per the assumption) write operation to the master database.
+ * Generally, sharing a SessionConsistentConnectionManager improves consistency (by avoiding race
+ * conditions due to replication lag), but can reduce performance (by directing more read
+ * operations to the master database server).
+ *
+ * @since 1.29
+ *
+ * @license GPL-2.0+
+ * @author Daniel Kinzler
+ * @author Addshore
+ */
+class SessionConsistentConnectionManager extends ConnectionManager {
+
+       /**
+        * @var bool
+        */
+       private $forceWriteConnection = false;
+
+       /**
+        * Forces all future calls to getReadConnection() to return a write connection.
+        * Use this before performing read operations that are critical for a future update.
+        * Calling beginAtomicSection() implies a call to prepareForUpdates().
+        *
+        * @since 1.29
+        */
+       public function prepareForUpdates() {
+               $this->forceWriteConnection = true;
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @param string[]|null $groups
+        *
+        * @return Database
+        */
+       public function getReadConnection( array $groups = null ) {
+               if ( $this->forceWriteConnection ) {
+                       return parent::getWriteConnection();
+               }
+
+               return parent::getReadConnection( $groups );
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @return Database
+        */
+       public function getWriteConnection() {
+               $this->prepareForUpdates();
+               return parent::getWriteConnection();
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @param string[]|null $groups
+        *
+        * @return DBConnRef
+        */
+       public function getReadConnectionRef( array $groups = null ) {
+               if ( $this->forceWriteConnection ) {
+                       return parent::getWriteConnectionRef();
+               }
+
+               return parent::getReadConnectionRef( $groups );
+       }
+
+       /**
+        * @since 1.29
+        *
+        * @return DBConnRef
+        */
+       public function getWriteConnectionRef() {
+               $this->prepareForUpdates();
+               return parent::getWriteConnectionRef();
+       }
+
+       /**
+        * Begins an atomic section and returns a database connection to the master DB, for updating.
+        *
+        * @since 1.29
+        *
+        * @note: This causes all future calls to getReadConnection() to return a connection
+        * to the master DB, even after commitAtomicSection() or rollbackAtomicSection() have
+        * been called.
+        *
+        * @param string $fname
+        *
+        * @return Database
+        */
+       public function beginAtomicSection( $fname ) {
+               // Once we have written to master, do not read from replica.
+               $this->prepareForUpdates();
+
+               return parent::beginAtomicSection( $fname );
+       }
+
+}
index 48d76c4..c6055db 100644 (file)
@@ -1183,7 +1183,7 @@ interface IDatabase {
        /**
         * DELETE query wrapper.
         *
-        * @param array $table Table name
+        * @param string $table Table name
         * @param string|array $conds Array of conditions. See $conds in IDatabase::select()
         *   for the format. Use $conds == "*" to delete all rows
         * @param string $fname Name of the calling function
index 21e40ec..c390232 100644 (file)
@@ -22,6 +22,8 @@
  * @since 1.25
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * This class formats block log entries.
  *
@@ -91,6 +93,7 @@ class BlockLogFormatter extends LogFormatter {
 
        public function getActionLinks() {
                $subtype = $this->entry->getSubtype();
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                if ( $this->entry->isDeleted( LogPage::DELETED_ACTION ) // Action is hidden
                        || !( $subtype === 'block' || $subtype === 'reblock' )
                        || !$this->context->getUser()->isAllowed( 'block' )
@@ -101,13 +104,13 @@ class BlockLogFormatter extends LogFormatter {
                // Show unblock/change block link
                $title = $this->entry->getTarget();
                $links = [
-                       Linker::linkKnown(
+                       $linkRenderer->makeKnownLink(
                                SpecialPage::getTitleFor( 'Unblock', $title->getDBkey() ),
-                               $this->msg( 'unblocklink' )->escaped()
+                               $this->msg( 'unblocklink' )->text()
                        ),
-                       Linker::linkKnown(
+                       $linkRenderer->makeKnownLink(
                                SpecialPage::getTitleFor( 'Block', $title->getDBkey() ),
-                               $this->msg( 'change-blocklink' )->escaped()
+                               $this->msg( 'change-blocklink' )->text()
                        )
                ];
 
index f130740..861ea30 100644 (file)
@@ -1,5 +1,7 @@
 <?php
 
+use MediaWiki\MediaWikiServices;
+
 class ContentModelLogFormatter extends LogFormatter {
        protected function getMessageParameters() {
                $lang = $this->context->getLanguage();
@@ -18,9 +20,9 @@ class ContentModelLogFormatter extends LogFormatter {
                }
 
                $params = $this->extractParameters();
-               $revert = Linker::linkKnown(
+               $revert = MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                        SpecialPage::getTitleFor( 'ChangeContentModel' ),
-                       $this->msg( 'logentry-contentmodel-change-revertlink' )->escaped(),
+                       $this->msg( 'logentry-contentmodel-change-revertlink' )->text(),
                        [],
                        [
                                'pagetitle' => $this->entry->getTarget()->getPrefixedText(),
index dc9378f..05973df 100644 (file)
@@ -23,6 +23,8 @@
  * @since 1.22
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * This class formats delete log entries.
  *
@@ -114,6 +116,7 @@ class DeleteLogFormatter extends LogFormatter {
 
        public function getActionLinks() {
                $user = $this->context->getUser();
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                if ( !$user->isAllowed( 'deletedhistory' )
                        || $this->entry->isDeleted( LogPage::DELETED_ACTION )
                ) {
@@ -128,9 +131,9 @@ class DeleteLogFormatter extends LogFormatter {
                                } else {
                                        $message = 'undeleteviewlink';
                                }
-                               $revert = Linker::linkKnown(
+                               $revert = $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Undelete' ),
-                                       $this->msg( $message )->escaped(),
+                                       $this->msg( $message )->text(),
                                        [],
                                        [ 'target' => $this->entry->getTarget()->getPrefixedDBkey() ]
                                );
@@ -156,9 +159,9 @@ class DeleteLogFormatter extends LogFormatter {
                                if ( count( $ids ) == 1 ) {
                                        // Live revision diffs...
                                        if ( $key == 'oldid' || $key == 'revision' ) {
-                                               $links[] = Linker::linkKnown(
+                                               $links[] = $linkRenderer->makeKnownLink(
                                                        $this->entry->getTarget(),
-                                                       $this->msg( 'diff' )->escaped(),
+                                                       $this->msg( 'diff' )->text(),
                                                        [],
                                                        [
                                                                'diff' => intval( $ids[0] ),
@@ -167,9 +170,9 @@ class DeleteLogFormatter extends LogFormatter {
                                                );
                                                // Deleted revision diffs...
                                        } elseif ( $key == 'artimestamp' || $key == 'archive' ) {
-                                               $links[] = Linker::linkKnown(
+                                               $links[] = $linkRenderer->makeKnownLink(
                                                        SpecialPage::getTitleFor( 'Undelete' ),
-                                                       $this->msg( 'diff' )->escaped(),
+                                                       $this->msg( 'diff' )->text(),
                                                        [],
                                                        [
                                                                'target' => $this->entry->getTarget()->getPrefixedDBkey(),
@@ -181,9 +184,9 @@ class DeleteLogFormatter extends LogFormatter {
                                }
 
                                // View/modify link...
-                               $links[] = Linker::linkKnown(
+                               $links[] = $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Revisiondelete' ),
-                                       $this->msg( 'revdel-restore' )->escaped(),
+                                       $this->msg( 'revdel-restore' )->text(),
                                        [],
                                        [
                                                'target' => $this->entry->getTarget()->getPrefixedText(),
@@ -206,9 +209,9 @@ class DeleteLogFormatter extends LogFormatter {
                                        $query = implode( ',', $query );
                                }
                                // Link to each hidden object ID, $params[1] is the url param
-                               $revert = Linker::linkKnown(
+                               $revert = $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Revisiondelete' ),
-                                       $this->msg( 'revdel-restore' )->escaped(),
+                                       $this->msg( 'revdel-restore' )->text(),
                                        [],
                                        [
                                                'target' => $this->entry->getTarget()->getPrefixedText(),
index 0cf584b..57a7597 100644 (file)
@@ -23,6 +23,8 @@
  * @file
  */
 
+use MediaWiki\MediaWikiServices;
+
 class LogEventsList extends ContextSource {
        const NO_ACTION_LINK = 1;
        const NO_EXTRA_USER_LINKS = 2;
@@ -142,10 +144,11 @@ class LogEventsList extends ContextSource {
         */
        private function getFilterLinks( $filter ) {
                // show/hide links
-               $messages = [ $this->msg( 'show' )->escaped(), $this->msg( 'hide' )->escaped() ];
+               $messages = [ $this->msg( 'show' )->text(), $this->msg( 'hide' )->text() ];
                // Option value -> message mapping
                $links = [];
                $hiddens = ''; // keep track for "go" button
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                foreach ( $filter as $type => $val ) {
                        // Should the below assignment be outside the foreach?
                        // Then it would have to be copied. Not certain what is more expensive.
@@ -155,7 +158,7 @@ class LogEventsList extends ContextSource {
                        $hideVal = 1 - intval( $val );
                        $query[$queryKey] = $hideVal;
 
-                       $link = Linker::linkKnown(
+                       $link = $linkRenderer->makeKnownLink(
                                $this->getTitle(),
                                $messages[$hideVal],
                                [],
@@ -672,9 +675,9 @@ class LogEventsList extends ContextSource {
                                $urlParam = array_merge( $urlParam, $extraUrlParams );
                        }
 
-                       $s .= Linker::linkKnown(
+                       $s .= MediaWikiServices::getInstance()->getLinkRenderer()->makeKnownLink(
                                SpecialPage::getTitleFor( 'Log' ),
-                               $context->msg( 'log-fulllog' )->escaped(),
+                               $context->msg( 'log-fulllog' )->text(),
                                [],
                                $urlParam
                        );
index c86eabd..ac0564d 100644 (file)
@@ -541,7 +541,7 @@ class BitmapHandler extends TransformationalImageHandler {
         * @param array $params Rotate parameters.
         *   'rotation' clockwise rotation in degrees, allowed are multiples of 90
         * @since 1.21
-        * @return bool
+        * @return bool|MediaTransformError
         */
        public function rotate( $file, $params ) {
                global $wgImageMagickConvertCommand;
index 18f75ec..a852215 100644 (file)
@@ -170,7 +170,7 @@ class DjVuHandler extends ImageHandler {
                                'thumbnail_error',
                                $width,
                                $height,
-                               wfMessage( 'thumbnail_dest_directory' )->text()
+                               wfMessage( 'thumbnail_dest_directory' )
                        );
                }
 
@@ -197,7 +197,7 @@ class DjVuHandler extends ImageHandler {
 
                        return new MediaTransformError( 'thumbnail_error',
                                $params['width'], $params['height'],
-                               wfMessage( 'filemissing' )->text()
+                               wfMessage( 'filemissing' )
                        );
                }
 
index b8b6f6c..6c857a8 100644 (file)
@@ -130,7 +130,7 @@ class JpegHandler extends ExifBitmapHandler {
         * @param array $params Rotate parameters.
         *    'rotation' clockwise rotation in degrees, allowed are multiples of 90
         * @since 1.21
-        * @return bool
+        * @return bool|MediaTransformError
         */
        public function rotate( $file, $params ) {
                global $wgJpegTran;
index b3a555a..5366c4f 100644 (file)
@@ -439,19 +439,12 @@ class ThumbnailImage extends MediaTransformOutput {
  * @ingroup Media
  */
 class MediaTransformError extends MediaTransformOutput {
-       /** @var string HTML formatted version of the error */
-       private $htmlMsg;
-
-       /** @var string Plain text formatted version of the error */
-       private $textMsg;
+       /** @var Message */
+       private $msg;
 
        function __construct( $msg, $width, $height /*, ... */ ) {
                $args = array_slice( func_get_args(), 3 );
-               $htmlArgs = array_map( 'htmlspecialchars', $args );
-               $htmlArgs = array_map( 'nl2br', $htmlArgs );
-
-               $this->htmlMsg = wfMessage( $msg )->rawParams( $htmlArgs )->escaped();
-               $this->textMsg = wfMessage( $msg )->rawParams( $htmlArgs )->text();
+               $this->msg = wfMessage( $msg )->params( $args );
                $this->width = intval( $width );
                $this->height = intval( $height );
                $this->url = false;
@@ -461,21 +454,29 @@ class MediaTransformError extends MediaTransformOutput {
        function toHtml( $options = [] ) {
                return "<div class=\"MediaTransformError\" style=\"" .
                        "width: {$this->width}px; height: {$this->height}px; display:inline-block;\">" .
-                       $this->htmlMsg .
+                       $this->getHtmlMsg() .
                        "</div>";
        }
 
        function toText() {
-               return $this->textMsg;
+               return $this->msg->text();
        }
 
        function getHtmlMsg() {
-               return $this->htmlMsg;
+               return $this->msg->escaped();
+       }
+
+       function getMsg() {
+               return $this->msg;
        }
 
        function isError() {
                return true;
        }
+
+       function getHttpStatusCode() {
+               return 500;
+       }
 }
 
 /**
@@ -488,7 +489,12 @@ class TransformParameterError extends MediaTransformError {
                parent::__construct( 'thumbnail_error',
                        max( isset( $params['width'] ) ? $params['width'] : 0, 120 ),
                        max( isset( $params['height'] ) ? $params['height'] : 0, 120 ),
-                       wfMessage( 'thumbnail_invalid_params' )->text() );
+                       wfMessage( 'thumbnail_invalid_params' )
+               );
+       }
+
+       function getHttpStatusCode() {
+               return 400;
        }
 }
 
@@ -501,14 +507,18 @@ class TransformParameterError extends MediaTransformError {
 class TransformTooBigImageAreaError extends MediaTransformError {
        function __construct( $params, $maxImageArea ) {
                $msg = wfMessage( 'thumbnail_toobigimagearea' );
+               $msg->rawParams(
+                       $msg->getLanguage()->formatComputingNumbers( $maxImageArea, 1000, "size-$1pixel" )
+               );
 
                parent::__construct( 'thumbnail_error',
                        max( isset( $params['width'] ) ? $params['width'] : 0, 120 ),
                        max( isset( $params['height'] ) ? $params['height'] : 0, 120 ),
-                       $msg->rawParams(
-                               $msg->getLanguage()->formatComputingNumbers(
-                                       $maxImageArea, 1000, "size-$1pixel" )
-                               )->text()
-                       );
+                       $msg
+               );
+       }
+
+       function getHttpStatusCode() {
+               return 400;
        }
 }
index f3b33ac..0cea6d8 100644 (file)
@@ -178,14 +178,14 @@ class SvgHandler extends ImageHandler {
 
                $metadata = $this->unpackMetadata( $image->getMetadata() );
                if ( isset( $metadata['error'] ) ) { // sanity check
-                       $err = wfMessage( 'svg-long-error', $metadata['error']['message'] )->text();
+                       $err = wfMessage( 'svg-long-error', $metadata['error']['message'] );
 
                        return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight, $err );
                }
 
                if ( !wfMkdirParents( dirname( $dstPath ), null, __METHOD__ ) ) {
                        return new MediaTransformError( 'thumbnail_error', $clientWidth, $clientHeight,
-                               wfMessage( 'thumbnail_dest_directory' )->text() );
+                               wfMessage( 'thumbnail_dest_directory' ) );
                }
 
                $srcPath = $image->getLocalRefPath();
@@ -196,7 +196,7 @@ class SvgHandler extends ImageHandler {
 
                        return new MediaTransformError( 'thumbnail_error',
                                $params['width'], $params['height'],
-                               wfMessage( 'filemissing' )->text()
+                               wfMessage( 'filemissing' )
                        );
                }
 
@@ -219,7 +219,7 @@ class SvgHandler extends ImageHandler {
                                        wfHostname(), $lnPath, $srcPath ) );
                        return new MediaTransformError( 'thumbnail_error',
                                $params['width'], $params['height'],
-                               wfMessage( 'thumbnail-temp-create' )->text()
+                               wfMessage( 'thumbnail-temp-create' )
                        );
                }
 
index e33c27e..60aec45 100644 (file)
@@ -217,7 +217,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
 
                        return new MediaTransformError( 'thumbnail_error',
                                $scalerParams['clientWidth'], $scalerParams['clientHeight'],
-                               wfMessage( 'filemissing' )->text()
+                               wfMessage( 'filemissing' )
                        );
                }
 
@@ -267,7 +267,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
                        # Thumbnail was zero-byte and had to be removed
                        return new MediaTransformError( 'thumbnail_error',
                                $scalerParams['clientWidth'], $scalerParams['clientHeight'],
-                               wfMessage( 'unknown-error' )->text()
+                               wfMessage( 'unknown-error' )
                        );
                } elseif ( $mto ) {
                        return $mto;
@@ -565,7 +565,7 @@ abstract class TransformationalImageHandler extends ImageHandler {
         * @param array $params Rotate parameters.
         *   'rotation' clockwise rotation in degrees, allowed are multiples of 90
         * @since 1.24 Is non-static. From 1.21 it was static
-        * @return bool
+        * @return bool|MediaTransformError
         */
        public function rotate( $file, $params ) {
                return new MediaTransformError( 'thumbnail_error', 0, 0,
index 6ab3ffc..f4880d1 100644 (file)
@@ -42,6 +42,10 @@ class ImageHistoryPseudoPager extends ReverseChronologicalPager {
                $this->mImg = null;
                $this->mHist = [];
                $this->mRange = [ 0, 0 ]; // display range
+
+               // Only display 10 revisions at once by default, otherwise the list is overwhelming
+               $this->mLimitsShown = array_merge( [ 10 ], $this->mLimitsShown );
+               $this->setLimit( 10 );
        }
 
        /**
index dc65549..f016494 100644 (file)
@@ -1173,8 +1173,22 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
-                       $messageCache = MessageCache::singleton();
-                       $messageCache->updateMessageOverride( $this->mTitle, $this->getContent() );
+                       // @todo move this logic to MessageCache
+                       if ( $this->exists() ) {
+                               // NOTE: use transclusion text for messages.
+                               //       This is consistent with  MessageCache::getMsgFromNamespace()
+
+                               $content = $this->getContent();
+                               $text = $content === null ? null : $content->getWikitextForTransclusion();
+
+                               if ( $text === null ) {
+                                       $text = false;
+                               }
+                       } else {
+                               $text = false;
+                       }
+
+                       MessageCache::singleton()->replace( $this->mTitle->getDBkey(), $text );
                }
 
                return true;
@@ -2236,7 +2250,7 @@ class WikiPage implements Page, IDBAccessObject {
         *   - 'no-change': don't update the article count, ever
         */
        public function doEditUpdates( Revision $revision, User $user, array $options = [] ) {
-               global $wgRCWatchCategoryMembership;
+               global $wgRCWatchCategoryMembership, $wgContLang;
 
                $options += [
                        'changed' => true,
@@ -2374,7 +2388,17 @@ class WikiPage implements Page, IDBAccessObject {
                }
 
                if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
-                       MessageCache::singleton()->updateMessageOverride( $this->mTitle, $content );
+                       // XXX: could skip pseudo-messages like js/css here, based on content model.
+                       $msgtext = $content ? $content->getWikitextForTransclusion() : null;
+                       if ( $msgtext === false || $msgtext === null ) {
+                               $msgtext = '';
+                       }
+
+                       MessageCache::singleton()->replace( $shortTitle, $msgtext );
+
+                       if ( $wgContLang->hasVariants() ) {
+                               $wgContLang->updateConversionTable( $this->mTitle );
+                       }
                }
 
                if ( $options['created'] ) {
@@ -3372,6 +3396,8 @@ class WikiPage implements Page, IDBAccessObject {
         * @param Title $title
         */
        public static function onArticleDelete( Title $title ) {
+               global $wgContLang;
+
                // Update existence markers on article/talk tabs...
                $other = $title->getOtherPage();
 
@@ -3388,7 +3414,11 @@ class WikiPage implements Page, IDBAccessObject {
 
                // Messages
                if ( $title->getNamespace() == NS_MEDIAWIKI ) {
-                       MessageCache::singleton()->updateMessageOverride( $title, null );
+                       MessageCache::singleton()->replace( $title->getDBkey(), false );
+
+                       if ( $wgContLang->hasVariants() ) {
+                               $wgContLang->updateConversionTable( $title );
+                       }
                }
 
                // Images
index 954d403..c929797 100644 (file)
@@ -90,7 +90,9 @@ abstract class ParameterizedPassword extends Password {
                        $str .= $this->getDelimiter();
                }
 
-               return $str . $this->hash;
+               $res = $str . $this->hash;
+               $this->assertIsSafeSize( $res );
+               return $res;
        }
 
        /**
index 4e395b5..13d1e6d 100644 (file)
@@ -81,6 +81,11 @@ abstract class Password {
         */
        protected $config;
 
+       /**
+        * Hash must fit in user_password, which is a tinyblob
+        */
+       const MAX_HASH_SIZE = 255;
+
        /**
         * Construct the Password object using a string hash
         *
@@ -168,9 +173,28 @@ abstract class Password {
         * are considered equivalent.
         *
         * @return string
+        * @throws PasswordError if password cannot be serialized to fit a tinyblob.
         */
        public function toString() {
-               return ':' . $this->config['type'] . ':' . $this->hash;
+               $result = ':' . $this->config['type'] . ':' . $this->hash;
+               $this->assertIsSafeSize( $result );
+               return $result;
+       }
+
+       /**
+        * Assert that hash will fit in a tinyblob field.
+        *
+        * This prevents MW from inserting it into the DB
+        * and having MySQL silently truncating it, locking
+        * the user out of their account.
+        *
+        * @param string $hash The hash in question.
+        * @throws PasswordError If hash does not fit in DB.
+        */
+       final protected function assertIsSafeSize( $hash ) {
+               if ( strlen( $hash ) > self::MAX_HASH_SIZE ) {
+                       throw new PasswordError( "Password hash is too big" );
+               }
        }
 
        /**
index a95716a..73a1bdd 100644 (file)
@@ -641,7 +641,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
         * @return HTMLForm
         */
        protected function getAuthForm( array $requests, $action, $msg = '', $msgType = 'error' ) {
-               global $wgSecureLogin, $wgLoginLanguageSelector;
+               global $wgSecureLogin;
                // FIXME merge this with parent
 
                if ( isset( $this->authForm ) ) {
@@ -667,7 +667,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                $form = HTMLForm::factory( 'vform', $formDescriptor, $context );
 
                $form->addHiddenField( 'authAction', $this->authAction );
-               if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+               if ( $this->mLanguage ) {
                        $form->addHiddenField( 'uselang', $this->mLanguage );
                }
                $form->addHiddenField( 'force', $this->securityLevel );
@@ -702,7 +702,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
         */
        protected function getFakeTemplate( $msg, $msgType ) {
                global $wgAuth, $wgEnableEmail, $wgHiddenPrefs, $wgEmailConfirmToEdit, $wgEnableUserEmail,
-                          $wgSecureLogin, $wgLoginLanguageSelector, $wgPasswordResetRoutes;
+                          $wgSecureLogin, $wgPasswordResetRoutes;
 
                // make a best effort to get the value of fields which used to be fixed in the old login
                // template but now might or might not exist depending on what providers are used
@@ -760,7 +760,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                # Don't show a "create account" link if the user can't.
                if ( $this->showCreateAccountLink() ) {
                        # Pass any language selection on to the mode switch link
-                       if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+                       if ( $this->mLanguage ) {
                                $linkq .= '&uselang=' . $this->mLanguage;
                        }
                        // Supply URL, login template creates the button.
@@ -892,7 +892,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
         * @return array
         */
        protected function getFieldDefinitions( $template ) {
-               global $wgEmailConfirmToEdit, $wgLoginLanguageSelector;
+               global $wgEmailConfirmToEdit;
 
                $isLoggedIn = $this->getUser()->isLoggedIn();
                $continuePart = $this->isContinued() ? 'continue-' : '';
@@ -1148,7 +1148,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                                $linkTitle = $this->getTitleFor( $this->isSignup() ? 'Userlogin' :'CreateAccount' );
                                $linkq = $this->getReturnToQueryStringFragment();
                                // Pass any language selection on to the mode switch link
-                               if ( $wgLoginLanguageSelector && $this->mLanguage ) {
+                               if ( $this->mLanguage ) {
                                        $linkq .= '&uselang=' . $this->mLanguage;
                                }
                                $loggedIn = $this->getUser()->isLoggedIn();
index 4a2a619..4b8446a 100644 (file)
@@ -204,6 +204,7 @@ class SpecialAllPages extends IncludableSpecialPage {
                                ]
                        );
 
+                       $linkRenderer = $this->getLinkRenderer();
                        if ( $res->numRows() > 0 ) {
                                $out = Html::openElement( 'ul', [ 'class' => 'mw-allpages-chunk' ] );
 
@@ -213,7 +214,7 @@ class SpecialAllPages extends IncludableSpecialPage {
                                                $out .= '<li' .
                                                        ( $s->page_is_redirect ? ' class="allpagesredirect"' : '' ) .
                                                        '>' .
-                                                       Linker::link( $t ) .
+                                                       $linkRenderer->makeLink( $t ) .
                                                        "</li>\n";
                                        } else {
                                                $out .= '<li>[[' . htmlspecialchars( $s->page_title ) . "]]</li>\n";
@@ -269,6 +270,7 @@ class SpecialAllPages extends IncludableSpecialPage {
                $navLinks = [];
                $self = $this->getPageTitle();
 
+               $linkRenderer = $this->getLinkRenderer();
                // Generate a "previous page" link if needed
                if ( $prevTitle ) {
                        $query = [ 'from' => $prevTitle->getText() ];
@@ -281,9 +283,9 @@ class SpecialAllPages extends IncludableSpecialPage {
                                $query['hideredirects'] = $hideredirects;
                        }
 
-                       $navLinks[] = Linker::linkKnown(
+                       $navLinks[] = $linkRenderer->makeKnownLink(
                                $self,
-                               $this->msg( 'prevpage', $prevTitle->getText() )->escaped(),
+                               $this->msg( 'prevpage', $prevTitle->getText() )->text(),
                                [],
                                $query
                        );
@@ -304,9 +306,9 @@ class SpecialAllPages extends IncludableSpecialPage {
                                $query['hideredirects'] = $hideredirects;
                        }
 
-                       $navLinks[] = Linker::linkKnown(
+                       $navLinks[] = $linkRenderer->makeKnownLink(
                                $self,
-                               $this->msg( 'nextpage', $t->getText() )->escaped(),
+                               $this->msg( 'nextpage', $t->getText() )->text(),
                                [],
                                $query
                        );
index 9ee1b75..ecc030e 100644 (file)
@@ -78,9 +78,10 @@ class AncientPagesPage extends QueryPage {
 
                $d = $this->getLanguage()->userTimeAndDate( $result->value, $this->getUser() );
                $title = Title::makeTitle( $result->namespace, $result->title );
-               $link = Linker::linkKnown(
+               $linkRenderer = $this->getLinkRenderer();
+               $link = $linkRenderer->makeKnownLink(
                        $title,
-                       htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
+                       $wgContLang->convert( $title->getPrefixedText() )
                );
 
                return $this->getLanguage()->specialList( $link, htmlspecialchars( $d ) );
index ce7d24e..585f70b 100644 (file)
@@ -372,12 +372,13 @@ class SpecialBlock extends FormSpecialPage {
 
                $this->getOutput()->addModuleStyles( 'mediawiki.special' );
 
+               $linkRenderer = $this->getLinkRenderer();
                # Link to the user's contributions, if applicable
                if ( $this->target instanceof User ) {
                        $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->target->getName() );
-                       $links[] = Linker::link(
+                       $links[] = $linkRenderer->makeLink(
                                $contribsPage,
-                               $this->msg( 'ipb-blocklist-contribs', $this->target->getName() )->escaped()
+                               $this->msg( 'ipb-blocklist-contribs', $this->target->getName() )->text()
                        );
                }
 
@@ -392,21 +393,24 @@ class SpecialBlock extends FormSpecialPage {
                        $message = $this->msg( 'ipb-unblock' )->parse();
                        $list = SpecialPage::getTitleFor( 'Unblock' );
                }
-               $links[] = Linker::linkKnown( $list, $message, [] );
+               $links[] = $linkRenderer->makeKnownLink(
+                       $list,
+                       new HtmlArmor( $message )
+               );
 
                # Link to the block list
-               $links[] = Linker::linkKnown(
+               $links[] = $linkRenderer->makeKnownLink(
                        SpecialPage::getTitleFor( 'BlockList' ),
-                       $this->msg( 'ipb-blocklist' )->escaped()
+                       $this->msg( 'ipb-blocklist' )->text()
                );
 
                $user = $this->getUser();
 
                # Link to edit the block dropdown reasons, if applicable
                if ( $user->isAllowed( 'editinterface' ) ) {
-                       $links[] = Linker::linkKnown(
+                       $links[] = $linkRenderer->makeKnownLink(
                                $this->msg( 'ipbreason-dropdown' )->inContentLanguage()->getTitle(),
-                               $this->msg( 'ipb-edit-dropdown' )->escaped(),
+                               $this->msg( 'ipb-edit-dropdown' )->text(),
                                [],
                                [ 'action' => 'edit' ]
                        );
index 1753396..b730ecd 100644 (file)
@@ -109,12 +109,13 @@ class BrokenRedirectsPage extends QueryPage {
                        }
                }
 
+               $linkRenderer = $this->getLinkRenderer();
                // $toObj may very easily be false if the $result list is cached
                if ( !is_object( $toObj ) ) {
-                       return '<del>' . Linker::link( $fromObj ) . '</del>';
+                       return '<del>' . $linkRenderer->makeLink( $fromObj ) . '</del>';
                }
 
-               $from = Linker::linkKnown(
+               $from = $linkRenderer->makeKnownLink(
                        $fromObj,
                        null,
                        [],
@@ -128,28 +129,22 @@ class BrokenRedirectsPage extends QueryPage {
                        // check, if the content model is editable through action=edit
                        ContentHandler::getForTitle( $fromObj )->supportsDirectEditing()
                ) {
-                       $links[] = Linker::linkKnown(
+                       $links[] = $linkRenderer->makeKnownLink(
                                $fromObj,
-                               $this->msg( 'brokenredirects-edit' )->escaped(),
+                               $this->msg( 'brokenredirects-edit' )->text(),
                                [],
                                [ 'action' => 'edit' ]
                        );
                }
-               $to = Linker::link(
-                       $toObj,
-                       null,
-                       [],
-                       [],
-                       [ 'broken' ]
-               );
+               $to = $linkRenderer->makeBrokenLink( $toObj );
                $arr = $this->getLanguage()->getArrow();
 
                $out = $from . $this->msg( 'word-separator' )->escaped();
 
                if ( $this->getUser()->isAllowed( 'delete' ) ) {
-                       $links[] = Linker::linkKnown(
+                       $links[] = $linkRenderer->makeKnownLink(
                                $fromObj,
-                               $this->msg( 'brokenredirects-delete' )->escaped(),
+                               $this->msg( 'brokenredirects-delete' )->text(),
                                [],
                                [ 'action' => 'delete' ]
                        );
index 0cec9d0..9140bf1 100644 (file)
@@ -137,14 +137,15 @@ class DoubleRedirectsPage extends QueryPage {
                                $result = $dbr->fetchObject( $res );
                        }
                }
+               $linkRenderer = $this->getLinkRenderer();
                if ( !$result ) {
-                       return '<del>' . Linker::link( $titleA, null, [], [ 'redirect' => 'no' ] ) . '</del>';
+                       return '<del>' . $linkRenderer->makeLink( $titleA, null, [], [ 'redirect' => 'no' ] ) . '</del>';
                }
 
                $titleB = Title::makeTitle( $result->nsb, $result->tb );
                $titleC = Title::makeTitle( $result->nsc, $result->tc, '', $result->iwc );
 
-               $linkA = Linker::linkKnown(
+               $linkA = $linkRenderer->makeKnownLink(
                        $titleA,
                        null,
                        [],
@@ -158,26 +159,24 @@ class DoubleRedirectsPage extends QueryPage {
                        // check, if the content model is editable through action=edit
                        ContentHandler::getForTitle( $titleA )->supportsDirectEditing()
                ) {
-                       $edit = Linker::linkKnown(
+                       $edit = $linkRenderer->makeKnownLink(
                                $titleA,
-                               $this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->escaped(),
+                               $this->msg( 'parentheses', $this->msg( 'editlink' )->text() )->text(),
                                [],
-                               [
-                                       'action' => 'edit'
-                               ]
+                               [ 'action' => 'edit' ]
                        );
                } else {
                        $edit = '';
                }
 
-               $linkB = Linker::linkKnown(
+               $linkB = $linkRenderer->makeKnownLink(
                        $titleB,
                        null,
                        [],
                        [ 'redirect' => 'no' ]
                );
 
-               $linkC = Linker::linkKnown( $titleC );
+               $linkC = $linkRenderer->makeKnownLink( $titleC );
 
                $lang = $this->getLanguage();
                $arr = $lang->getArrow() . $lang->getDirMark();
index 252d076..476c452 100644 (file)
@@ -158,10 +158,11 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        // Also set header tabs to be for the target.
                        $this->getSkin()->setRelevantTitle( $this->targetObj );
 
+                       $linkRenderer = $this->getLinkRenderer();
                        $links = [];
-                       $links[] = Linker::linkKnown(
+                       $links[] = $linkRenderer->makeKnownLink(
                                SpecialPage::getTitleFor( 'Log' ),
-                               $this->msg( 'viewpagelogs' )->escaped(),
+                               $this->msg( 'viewpagelogs' )->text(),
                                [],
                                [
                                        'page' => $this->targetObj->getPrefixedText(),
@@ -170,17 +171,17 @@ class SpecialEditTags extends UnlistedSpecialPage {
                        );
                        if ( !$this->targetObj->isSpecialPage() ) {
                                // Give a link to the page history
-                               $links[] = Linker::linkKnown(
+                               $links[] = $linkRenderer->makeKnownLink(
                                        $this->targetObj,
-                                       $this->msg( 'pagehist' )->escaped(),
+                                       $this->msg( 'pagehist' )->text(),
                                        [],
                                        [ 'action' => 'history' ]
                                );
                        }
                        // Link to Special:Tags
-                       $links[] = Linker::linkKnown(
+                       $links[] = $linkRenderer->makeKnownLink(
                                SpecialPage::getTitleFor( 'Tags' ),
-                               $this->msg( 'tags-edit-manage-link' )->escaped()
+                               $this->msg( 'tags-edit-manage-link' )->text()
                        );
                        // Logs themselves don't have histories or archived revisions
                        $this->getOutput()->addSubtitle( $this->getLanguage()->pipeList( $links ) );
index a550e88..9692dd0 100644 (file)
@@ -53,13 +53,14 @@ class SpecialEmailUser extends UnlistedSpecialPage {
        }
 
        protected function getFormFields() {
+               $linkRenderer = $this->getLinkRenderer();
                return [
                        'From' => [
                                'type' => 'info',
                                'raw' => 1,
-                               'default' => Linker::link(
+                               'default' => $linkRenderer->makeLink(
                                        $this->getUser()->getUserPage(),
-                                       htmlspecialchars( $this->getUser()->getName() )
+                                       $this->getUser()->getName()
                                ),
                                'label-message' => 'emailfrom',
                                'id' => 'mw-emailuser-sender',
@@ -67,9 +68,9 @@ class SpecialEmailUser extends UnlistedSpecialPage {
                        'To' => [
                                'type' => 'info',
                                'raw' => 1,
-                               'default' => Linker::link(
+                               'default' => $linkRenderer->makeLink(
                                        $this->mTargetObj->getUserPage(),
-                                       htmlspecialchars( $this->mTargetObj->getName() )
+                                       $this->mTargetObj->getName()
                                ),
                                'label-message' => 'emailto',
                                'id' => 'mw-emailuser-recipient',
index b86a95e..d7879ff 100644 (file)
@@ -88,14 +88,14 @@ class FewestrevisionsPage extends QueryPage {
                                )
                        );
                }
+               $linkRenderer = $this->getLinkRenderer();
+               $text = $wgContLang->convert( $nt->getPrefixedText() );
+               $plink = $linkRenderer->makeLink( $nt, $text );
 
-               $text = htmlspecialchars( $wgContLang->convert( $nt->getPrefixedText() ) );
-               $plink = Linker::linkKnown( $nt, $text );
-
-               $nl = $this->msg( 'nrevisions' )->numParams( $result->value )->escaped();
+               $nl = $this->msg( 'nrevisions' )->numParams( $result->value )->text();
                $redirect = isset( $result->redirect ) && $result->redirect ?
                        ' - ' . $this->msg( 'isredirect' )->escaped() : '';
-               $nlink = Linker::linkKnown(
+               $nlink = $linkRenderer->makeKnownLink(
                        $nt,
                        $nl,
                        [],
index 6de127d..8021bc2 100644 (file)
@@ -208,11 +208,12 @@ class FileDuplicateSearchPage extends QueryPage {
        function formatResult( $skin, $result ) {
                global $wgContLang;
 
+               $linkRenderer = $this->getLinkRenderer();
                $nt = $result->getTitle();
                $text = $wgContLang->convert( $nt->getText() );
-               $plink = Linker::link(
+               $plink = $linkRenderer->makeLink(
                        $nt,
-                       htmlspecialchars( $text )
+                       $text
                );
 
                $userText = $result->getUser( 'text' );
index c58af60..ce88624 100644 (file)
@@ -24,6 +24,8 @@
  * @ingroup SpecialPage
  */
 
+use MediaWiki\MediaWikiServices;
+
 /**
  * MediaWiki page data importer
  *
@@ -592,12 +594,12 @@ class ImportReporter extends ContextSource {
                }
 
                $this->mPageCount++;
-
+               $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
                if ( $successCount > 0 ) {
                        // <bdi> prevents jumbling of the versions count
                        // in RTL wikis in case the page title is LTR
                        $this->getOutput()->addHTML(
-                               "<li>" . Linker::linkKnown( $title ) . " " .
+                               "<li>" . $linkRenderer->makeLink( $title ) . " " .
                                        "<bdi>" .
                                        $this->msg( 'import-revision-count' )->numParams( $successCount )->escaped() .
                                        "</bdi>" .
@@ -656,7 +658,7 @@ class ImportReporter extends ContextSource {
                                );
                        }
                } else {
-                       $this->getOutput()->addHTML( "<li>" . Linker::linkKnown( $title ) . " " .
+                       $this->getOutput()->addHTML( "<li>" . $linkRenderer->makeKnownLink( $title ) . " " .
                                $this->msg( 'import-nonewrevisions' )->escaped() . "</li>\n" );
                }
        }
index 39c8ae8..2c92410 100644 (file)
@@ -71,8 +71,14 @@ class SpecialListGrants extends SpecialPage {
 
                        $id = \Sanitizer::escapeId( $grant );
                        $out->addHTML( \Html::rawElement( 'tr', [ 'id' => $id ],
-                               "<td>" . $this->msg( "grant-$grant" )->escaped() . "</td>" .
-                               "<td>" . $grantCellHtml . '</td>'
+                               "<td>" .
+                               $this->msg(
+                                       "listgrants-grant-display",
+                                       \User::getGrantName( $grant ),
+                                       "<span class='mw-listgrants-grant-name'>" . $id . "</span>"
+                               )->parse() .
+                               "</td>" .
+                               "<td>" . $grantCellHtml . "</td>"
                        ) );
                }
 
index d64306b..f3d3a77 100644 (file)
@@ -71,6 +71,8 @@ class SpecialListGroupRights extends SpecialPage {
                ) );
                asort( $allGroups );
 
+               $linkRenderer = $this->getLinkRenderer();
+
                foreach ( $allGroups as $group ) {
                        $permissions = isset( $groupPermissions[$group] )
                                ? $groupPermissions[$group]
@@ -92,22 +94,22 @@ class SpecialListGroupRights extends SpecialPage {
                                // Do not make a link for the generic * group or group with invalid group page
                                $grouppage = htmlspecialchars( $groupnameLocalized );
                        } else {
-                               $grouppage = Linker::link(
+                               $grouppage = $linkRenderer->makeLink(
                                        $grouppageLocalizedTitle,
-                                       htmlspecialchars( $groupnameLocalized )
+                                       $groupnameLocalized
                                );
                        }
 
                        if ( $group === 'user' ) {
                                // Link to Special:listusers for implicit group 'user'
-                               $grouplink = '<br />' . Linker::linkKnown(
+                               $grouplink = '<br />' . $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Listusers' ),
-                                       $this->msg( 'listgrouprights-members' )->escaped()
+                                       $this->msg( 'listgrouprights-members' )->text()
                                );
                        } elseif ( !in_array( $group, $config->get( 'ImplicitGroups' ) ) ) {
-                               $grouplink = '<br />' . Linker::linkKnown(
+                               $grouplink = '<br />' . $linkRenderer->makeKnownLink(
                                        SpecialPage::getTitleFor( 'Listusers' ),
-                                       $this->msg( 'listgrouprights-members' )->escaped(),
+                                       $this->msg( 'listgrouprights-members' )->text(),
                                        [],
                                        [ 'group' => $group ]
                                );
@@ -165,7 +167,7 @@ class SpecialListGroupRights extends SpecialPage {
                                $this->msg( 'listgrouprights-namespaceprotection-restrictedto' )->text()
                        )
                );
-
+               $linkRenderer = $this->getLinkRenderer();
                ksort( $namespaceProtection );
                foreach ( $namespaceProtection as $namespace => $rights ) {
                        if ( !in_array( $namespace, MWNamespace::getValidNamespaces() ) ) {
@@ -183,9 +185,9 @@ class SpecialListGroupRights extends SpecialPage {
                                Html::rawElement(
                                        'td',
                                        [],
-                                       Linker::link(
+                                       $linkRenderer->makeLink(
                                                SpecialPage::getTitleFor( 'Allpages' ),
-                                               htmlspecialchars( $namespaceText ),
+                                               $namespaceText,
                                                [],
                                                [ 'namespace' => $namespace ]
                                        )
index 1d02a4f..c61609d 100644 (file)
@@ -153,11 +153,12 @@ class MIMEsearchPage extends QueryPage {
        function formatResult( $skin, $result ) {
                global $wgContLang;
 
+               $linkRenderer = $this->getLinkRenderer();
                $nt = Title::makeTitle( $result->namespace, $result->title );
                $text = $wgContLang->convert( $nt->getText() );
-               $plink = Linker::link(
+               $plink = $linkRenderer->makeLink(
                        Title::newFromText( $nt->getPrefixedText() ),
-                       htmlspecialchars( $text )
+                       $text
                );
 
                $download = Linker::makeMediaLinkObj( $nt, $this->msg( 'download' )->escaped() );
@@ -166,9 +167,9 @@ class MIMEsearchPage extends QueryPage {
                $bytes = htmlspecialchars( $lang->formatSize( $result->img_size ) );
                $dimensions = $this->msg( 'widthheight' )->numParams( $result->img_width,
                        $result->img_height )->escaped();
-               $user = Linker::link(
+               $user = $linkRenderer->makeLink(
                        Title::makeTitle( NS_USER, $result->img_user_text ),
-                       htmlspecialchars( $result->img_user_text )
+                       $result->img_user_text
                );
 
                $time = $lang->userTimeAndDate( $result->img_timestamp, $this->getUser() );
index 7683ad8..e11977f 100644 (file)
@@ -174,10 +174,11 @@ class MediaStatisticsPage extends QueryPage {
         */
        protected function outputTableRow( $mime, $count, $bytes ) {
                $mimeSearch = SpecialPage::getTitleFor( 'MIMEsearch', $mime );
+               $linkRenderer = $this->getLinkRenderer();
                $row = Html::rawElement(
                        'td',
                        [],
-                       Linker::link( $mimeSearch, htmlspecialchars( $mime ) )
+                       $linkRenderer->makeLink( $mimeSearch, $mime )
                );
                $row .= Html::element(
                        'td',
index b916c1f..f122db8 100644 (file)
@@ -277,6 +277,8 @@ class SpecialMergeHistory extends SpecialPage {
        function formatRevisionRow( $row ) {
                $rev = new Revision( $row );
 
+               $linkRenderer = $this->getLinkRenderer();
+
                $stxt = '';
                $last = $this->msg( 'last' )->escaped();
 
@@ -285,9 +287,9 @@ class SpecialMergeHistory extends SpecialPage {
 
                $user = $this->getUser();
 
-               $pageLink = Linker::linkKnown(
+               $pageLink = $linkRenderer->makeKnownLink(
                        $rev->getTitle(),
-                       htmlspecialchars( $this->getLanguage()->userTimeAndDate( $ts, $user ) ),
+                       $this->getLanguage()->userTimeAndDate( $ts, $user ),
                        [],
                        [ 'oldid' => $rev->getId() ]
                );
@@ -299,9 +301,9 @@ class SpecialMergeHistory extends SpecialPage {
                if ( !$rev->userCan( Revision::DELETED_TEXT, $user ) ) {
                        $last = $this->msg( 'last' )->escaped();
                } elseif ( isset( $this->prevId[$row->rev_id] ) ) {
-                       $last = Linker::linkKnown(
+                       $last = $linkRenderer->makeKnownLink(
                                $rev->getTitle(),
-                               $this->msg( 'last' )->escaped(),
+                               $this->msg( 'last' )->text(),
                                [],
                                [
                                        'diff' => $row->rev_id,
@@ -359,7 +361,9 @@ class SpecialMergeHistory extends SpecialPage {
                        return false;
                }
 
-               $targetLink = Linker::link(
+               $linkRenderer = $this->getLinkRenderer();
+
+               $targetLink = $linkRenderer->makeLink(
                        $targetTitle,
                        null,
                        [],
index 015701d..6095412 100644 (file)
@@ -91,10 +91,11 @@ class MostcategoriesPage extends QueryPage {
                        );
                }
 
+               $linkRenderer = $this->getLinkRenderer();
                if ( $this->isCached() ) {
-                       $link = Linker::link( $title );
+                       $link = $linkRenderer->makeLink( $title );
                } else {
-                       $link = Linker::linkKnown( $title );
+                       $link = $linkRenderer->makeKnownLink( $title );
                }
 
                $count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
index 3e78352..210c4a2 100644 (file)
@@ -97,10 +97,11 @@ class MostinterwikisPage extends QueryPage {
                        );
                }
 
+               $linkRenderer = $this->getLinkRenderer();
                if ( $this->isCached() ) {
-                       $link = Linker::link( $title );
+                       $link = $linkRenderer->makeLink( $title );
                } else {
-                       $link = Linker::linkKnown( $title );
+                       $link = $linkRenderer->makeKnownLink( $title );
                }
 
                $count = $this->msg( 'ninterwikis' )->numParams( $result->value )->escaped();
index 01eb39e..712574c 100644 (file)
@@ -91,7 +91,8 @@ class MostlinkedPage extends QueryPage {
        function makeWlhLink( $title, $caption ) {
                $wlh = SpecialPage::getTitleFor( 'Whatlinkshere', $title->getPrefixedDBkey() );
 
-               return Linker::linkKnown( $wlh, $caption );
+               $linkRenderer = $this->getLinkRenderer();
+               return $linkRenderer->makeKnownLink( $wlh, $caption );
        }
 
        /**
@@ -115,10 +116,11 @@ class MostlinkedPage extends QueryPage {
                        );
                }
 
-               $link = Linker::link( $title );
+               $linkRenderer = $this->getLinkRenderer();
+               $link = $linkRenderer->makeLink( $title );
                $wlh = $this->makeWlhLink(
                        $title,
-                       $this->msg( 'nlinks' )->numParams( $result->value )->escaped()
+                       $this->msg( 'nlinks' )->numParams( $result->value )->text()
                );
 
                return $this->getLanguage()->specialList( $link, $wlh );
index 9280b04..9f83832 100644 (file)
@@ -295,12 +295,12 @@ class SpecialSearch extends SpecialPage {
                $textStatus = null;
                if ( $textMatches instanceof Status ) {
                        $textStatus = $textMatches;
-                       $textMatches = null;
+                       $textMatches = $textStatus->getValue();
                }
 
                // did you mean... suggestions
                $didYouMeanHtml = '';
-               if ( $showSuggestion && $textMatches && !$textStatus ) {
+               if ( $showSuggestion && $textMatches ) {
                        if ( $textMatches->hasRewrittenQuery() ) {
                                $didYouMeanHtml = $this->getDidYouMeanRewrittenHtml( $term, $textMatches );
                        } elseif ( $textMatches->hasSuggestion() ) {
@@ -360,6 +360,25 @@ class SpecialSearch extends SpecialPage {
 
                $out->addHTML( "<div class='searchresults'>" );
 
+               $hasErrors = $textStatus && $textStatus->getErrors();
+               if ( $hasErrors ) {
+                       list( $error, $warning ) = $textStatus->splitByErrorType();
+                       if ( $error->getErrors() ) {
+                               $out->addHTML( Html::rawElement(
+                                       'div',
+                                       [ 'class' => 'errorbox' ],
+                                       $error->getHTML( 'search-error' )
+                               ) );
+                       }
+                       if ( $warning->getErrors() ) {
+                               $out->addHTML( Html::rawElement(
+                                       'div',
+                                       [ 'class' => 'warningbox' ],
+                                       $warning->getHTML( 'search-warning' )
+                               ) );
+                       }
+               }
+
                // prev/next links
                $prevnext = null;
                if ( $num || $this->offset ) {
@@ -388,7 +407,8 @@ class SpecialSearch extends SpecialPage {
                        }
                        $titleMatches->free();
                }
-               if ( $textMatches && !$textStatus ) {
+
+               if ( $textMatches ) {
                        // output appropriate heading
                        if ( $numTextMatches > 0 && $numTitleMatches > 0 ) {
                                $out->addHTML( '<div class="mw-search-visualclear"></div>' );
@@ -412,22 +432,18 @@ class SpecialSearch extends SpecialPage {
                $hasOtherResults = $textMatches &&
                        $textMatches->hasInterwikiResults( SearchResultSet::INLINE_RESULTS );
 
-               if ( $num === 0 ) {
-                       if ( $textStatus ) {
-                               $out->addHTML( '<div class="error">' .
-                                       $textStatus->getMessage( 'search-error' ) . '</div>' );
-                       } else {
-                               if ( !$this->offset ) {
-                                       // If we have an offset the create link was rendered earlier in this function.
-                                       // This class needs a good de-spaghettification, but for now this will
-                                       // do the job.
-                                       $this->showCreateLink( $title, $num, $titleMatches, $textMatches );
-                               }
-                               $out->wrapWikiMsg( "<p class=\"mw-search-nonefound\">\n$1</p>",
-                                       [ $hasOtherResults ? 'search-nonefound-thiswiki' : 'search-nonefound',
-                                                       wfEscapeWikiText( $term )
-                                       ] );
+               // If we have no results and we have not already displayed an error message
+               if ( $num === 0 && !$hasErrors ) {
+                       if ( !$this->offset ) {
+                               // If we have an offset the create link was rendered earlier in this function.
+                               // This class needs a good de-spaghettification, but for now this will
+                               // do the job.
+                               $this->showCreateLink( $title, $num, $titleMatches, $textMatches );
                        }
+                       $out->wrapWikiMsg( "<p class=\"mw-search-nonefound\">\n$1</p>", [
+                               $hasOtherResults ? 'search-nonefound-thiswiki' : 'search-nonefound',
+                               wfEscapeWikiText( $term )
+                       ] );
                }
 
                if ( $hasOtherResults ) {
index 6ded6d9..5b4f1f8 100644 (file)
@@ -331,7 +331,7 @@ class UserrightsPage extends SpecialPage {
         * @param bool $writing
         * @return Status
         */
-       public function fetchUser( $username, $writing ) {
+       public function fetchUser( $username, $writing = true ) {
                $parts = explode( $this->getConfig()->get( 'UserrightsInterwikiDelimiter' ), $username );
                if ( count( $parts ) < 2 ) {
                        $name = trim( $username );
index b78fed8..345577d 100644 (file)
@@ -52,7 +52,6 @@ class CategoryPager extends AlphabeticPager {
                return [
                        'tables' => [ 'category' ],
                        'fields' => [ 'cat_title', 'cat_pages' ],
-                       'conds' => [ 'cat_pages > 0' ],
                        'options' => [ 'USE INDEX' => 'cat_title' ],
                ];
        }
index 789c55c..f07db0e 100644 (file)
@@ -1649,7 +1649,7 @@ class User implements IDBAccessObject {
                                        // If the block is not valid, clear the block cookie (but don't delete it,
                                        // because it needs to be cleared from LocalStorage as well and an empty string
                                        // value is checked for in the mediawiki.user.blockcookie module).
-                                       $block->setCookie( $this->getRequest()->response(), true );
+                                       $tmpBlock->setCookie( $this->getRequest()->response(), true );
                                }
                        }
                }
@@ -5066,13 +5066,27 @@ class User implements IDBAccessObject {
        /**
         * Get the description of a given right
         *
+        * @since 1.29
         * @param string $right Right to query
         * @return string Localized description of the right
         */
        public static function getRightDescription( $right ) {
                $key = "right-$right";
                $msg = wfMessage( $key );
-               return $msg->isBlank() ? $right : $msg->text();
+               return $msg->isDisabled() ? $right : $msg->text();
+       }
+
+       /**
+        * Get the name of a given grant
+        *
+        * @since 1.29
+        * @param string $grant Grant to query
+        * @return string Localized name of the grant
+        */
+       public static function getGrantName( $grant ) {
+               $key = "grant-$grant";
+               $msg = wfMessage( $key );
+               return $msg->isDisabled() ? $grant : $msg->text();
        }
 
        /**
index a905b3c..d435dbb 100644 (file)
        "passwordreset-emaildisabled": "E-posfunksies is afgeskakel op hierdie wiki.",
        "passwordreset-username": "Gebruiker:",
        "passwordreset-domain": "Domein:",
-       "passwordreset-capture": "Wys resulterende e-pos?",
-       "passwordreset-capture-help": "As u die boks merk, word die e-pos (met die tydelike wagwoord) aan u getoon en aan die gebruiker gestuur.",
        "passwordreset-email": "E-posadres:",
        "passwordreset-emailtitle": "Gebruiker se details op {{site name}}",
        "passwordreset-emailtext-ip": "Iemand, waarskynlik u vanaf die IP-adres $1, het u gebruikersgegewens vir {{SITENAME}} ($4) opgevra.\nDie volgende {{PLURAL:$3|gebruiker is|gebruikers is}} aan die e-posadres gekoppel:\n\n$2\n\n{{PLURAL:$3|Die tydelike wagwoord verval|Hierdie tydelike wagwoorde verval}} oor {{PLURAL:$5|een dag|$5 dae}}.\nMeld asseblief nou aan en wysig u wagwoord. As u dit nie versoek het nie, of as u die oorspronklike wagwoord nog ken en dit nie wil verander nie, ignoreer die berig en hou aan om u ou wagwoord te gebruik.",
        "userrights-reason": "Rede:",
        "userrights-no-interwiki": "U het nie toestemming om gebruikersregte op ander wiki's te verander nie.",
        "userrights-nodatabase": "Databasis $1 bestaan nie of is nie hier beskikbaar nie.",
-       "userrights-nologin": "U moet as 'n administrateur [[Special:UserLogin|aanmeld]] om gebruikersregte te kan toeken.",
-       "userrights-notallowed": "U het nie magtiging om gebruikersregte by te sit of weg te neem nie.",
        "userrights-changeable-col": "Groepe wat u kan verander",
        "userrights-unchangeable-col": "Groepe wat u nie kan verander nie",
        "userrights-conflict": "Konflik met gebruikersregte! Pas asseblief weer u wysigings toe.",
-       "userrights-removed-self": "U het u eie regte suksesvol verwyder. Gevolglik het u nie meer toegang tot hierdie bladsy nie.",
        "group": "Groep:",
        "group-user": "Gebruikers",
        "group-autoconfirmed": "Bevestigde gebruikers",
        "right-siteadmin": "Sluit en ontsluit die datbasis",
        "right-override-export-depth": "Eksporteer bladsye insluitend geskakelde bladsye tot 'n diepte van 5",
        "right-sendemail": "Stuur e-pos aan ander gebruikers",
-       "right-passwordreset": "Wys e-posse vir herstel van wagwoord",
        "newuserlogpage": "Logboek van nuwe gebruikers",
        "newuserlogpagetext": "Dit is 'n logboek van gebruikers wat onlangs ingeteken het.",
        "rightslog": "Gebruikersregtelogboek",
        "trackingcategories-disabled": "Kategorie is gedeaktiveer",
        "mailnologin": "Geen versendadres beskikbaar",
        "mailnologintext": "U moet [[Special:UserLogin|ingeteken]] wees en 'n geldige e-posadres in u [[Special:Preferences|voorkeure]] hê om e-pos aan ander gebruikers te kan stuur.",
-       "emailuser": "Stuur e-pos na hierdie gebruiker",
+       "emailuser": "Stuur e-pos na dié gebruiker",
        "emailuser-title-target": "E-pos die {{GENDER:$1|gebruiker}}",
        "emailuser-title-notarget": "E-pos gebruiker",
        "emailpagetext": "As {{GENDER:$1|dié gebruiker}} 'n geldige e-posadres in sy/haar gebruikersvoorkeure het, sal hierdie vorm 'n enkele boodskap stuur. Die e-posadres in u [[Special:Preferences|gebruikersvoorkeure]] sal verskyn as die \"Van\"-adres van die pos. Dus sal die ontvanger kan terug antwoord.",
        "namespace_association": "Gekoppelde naamruimte",
        "tooltip-namespace_association": "Merk die boks om die besprekings- en onderwerpnaamruimte die by die geselekteerde naamruimte in te sluit",
        "blanknamespace": "(Hoof)",
-       "contributions": "{{GENDER:$1|Gebruikersbydraes}}",
+       "contributions": "{{GENDER:$1|Gebruikers­bydraes}}",
        "contributions-title": "$1 se bydraes",
        "mycontris": "Bydraes",
        "anoncontribs": "Bydraes",
        "specialpage-securitylevel-not-allowed-title": "Nie toegestaan",
        "cannotauth-not-allowed-title": "Geen toegang",
        "cannotauth-not-allowed": "U word nie toegelaat om die bladsy te gebruik nie",
-       "credentialsform-account": "Gebruikersnaam:",
-       "edit-error-short": "Fout: $1",
-       "edit-error-long": "Foute:\n\n$1"
+       "credentialsform-account": "Gebruikersnaam:"
 }
index 7ce095c..621aea0 100644 (file)
        "pageinfo-few-visiting-watchers": "Puede haber, o non, un usuariu que vixila páxines que visita les ediciones recientes",
        "pageinfo-redirects-name": "Númberu de redireiciones a esta páxina",
        "pageinfo-subpages-name": "Subpáxines d'esta páxina",
-       "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|redireición|redireiciones}}; $3 {{PLURAL:$3|non-redireición|non-redireiciones}})",
+       "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|redireición|redireiciones}}; $3 {{PLURAL:$3|non redireición|non redireiciones}})",
        "pageinfo-firstuser": "Creador de la páxina",
        "pageinfo-firsttime": "Data de creación de la páxina",
        "pageinfo-lastuser": "Caberu editor",
index 9900ad9..f3bbf83 100644 (file)
        "userinvalidcssjstitle": "خاتیرلادیرق:' '\"$1\" آدییلا بیر پوشه یوخ‌دور. پوشه-آدی.css و. js فایل‌لارینین آدلاری کیچیک حرف ایله یازماسی لازیم‌دیر، یعنی {{ns:user}}: تمل / vector.css دئییل، {{ns:user}}: تمل / Vector.css.",
        "updated": "(گونجل‌لندی)",
        "note": "'''دیقت:'''",
-       "previewnote": "'''بونون ساده‌جه بیر سیناق گؤستریشی اولدوغونو نظرده آلین.'''\nسیزین دییشیکلرینیز هله قئید اولونماییب!",
+       "previewnote": "<strong>بونون تکجه بیر سیناق گؤستریشی اولدوغونو نظرده آلین.</strong>\nسیزین دییشیکلرینیز هله ذخیره اولونماییب!",
        "continue-editing": "دَییشدیرمه یئرینه گئت",
        "previewconflict": "بو سیناق گؤستریشی‌دیر و یادداشدا ساخلایاجاغینیز تق‌دیرده متنین دییشدیر صحیفه‌سی‌نین یوخاری حیسه‌سینده نتیجه‌نین نئجه اولاجاغینی گؤستریر.",
        "session_fail_preview": "'''عۆذر ایسته‌ییریک! سیزین دییشدیرمه‌نیز یازدیریلمادی. \nسیستمدن چیخمیش اوْلدوغونوز مؤحتمل‌دیر. لۆطفاً سیستمه گیرمیش اوْلدوغونوزدان آرخایین اوْلوب بیر داها تکرار ائدین. \nمۆشکول حل اوْلونماسا حسابینیزدان [[Special:UserLogout|چیخیب]] یئنی‌دن گیریش ائدین٬ براوزرینیزین بۇ سایتا کوکی وئرمه ایجازه‌سینی وئردیگیندن ده آرخایین اوْلون.'''",
        "content-failed-to-parse": "تجزیه محتوای $2  مدل اوچون $1: $3 موفقیت اله گلمه دی",
        "invalid-content-data": "اعتبارسیز مضمون معلوماتی",
        "content-not-allowed-here": "\"$1\" مقاله‌سینه، [[$2]] صحیفه‌سینده ایجازه وئریلممیش دیر.",
-       "editwarning-warning": "بو صحیفه‌نی ترک ائتمک، دَییشدیرمه‌لرینیزی الدن وئرمگه سبب اولا بیلر. اگر گیریش ائتمیسینیز بو ایخطاری، ترجیحلرینیزین «دَییشدیرمک» بؤلوموندن، \"{{int:prefs-editing}}\"ایشدن سالا بیلرسینیز.",
+       "editwarning-warning": "بو صفحه‌دن چیخماق، دَییشدیرمه‌لرینیزی الدن وئرمگه سبب اولا بیلر. اگر گیریش ائتمیسینیز بو ایخطاری، ترجیحلرینیزین «دَییشدیرمک» بؤلوموندن، \"{{int:prefs-editing}}\"ایشدن سالا بیلرسینیز.",
        "editpage-notsupportedcontentformat-title": "فایلین فرمتی دستکلنمیر.",
        "editpage-notsupportedcontentformat-text": "$1 فایلین فرمتی  $2 فایل مدلی ایله دستکلنمیر.",
        "content-model-wikitext": "ویکی‌یازی",
        "whatlinkshere-hidelinks": "$1 باغلانتیلاری",
        "whatlinkshere-hideimages": "فایل باغلانتیلارینی $1",
        "whatlinkshere-filters": "سۆزگَجلر",
+       "whatlinkshere-submit": "گئت",
        "autoblockid": "اوتوماتیک باغلانما #$1",
        "block": "ایستیفادچینی باغلاما",
        "unblock": "ایستیفاده‌چی‌نین باغلانماسین گؤتور",
index 4129d96..e21ef13 100644 (file)
@@ -27,7 +27,8 @@
                        "Кутлубаева Кунсулу Закиевна",
                        "Вильданова Гюзель",
                        "Ilmira",
-                       "Irus"
+                       "Irus",
+                       "Khanmarat"
                ]
        },
        "tog-underline": "Һылтанмалар аҫтына һыҙыу:",
        "searchprofile-advanced-tooltip": "Махсус исем арауыҡтарында эҙләргә",
        "search-result-size": "$1 ({{PLURAL:$2|1=$2 һүҙ|$2 һүҙ}})",
        "search-result-category-size": "{{PLURAL:$1|1=$1 ағза}} ({{PLURAL:$2|$2 эске категория}}, {{PLURAL:$3|$3 файл}})",
-       "search-redirect": "(йүнәлтеү $1)",
+       "search-redirect": "($1 битенән йүнәлтеү)",
        "search-section": "($1 бүлеге)",
        "search-category": "(категория $1)",
        "search-file-match": "(файл эстәлеге менән тура килә)",
        "userrights-reason": "Сәбәп:",
        "userrights-no-interwiki": "Һеҙҙең башҡа вики-проекттарҙа ҡатнашыусыларҙың хоҡуҡтарын үҙгәртергә хоҡуҡтарығыҙ юҡ.",
        "userrights-nodatabase": "$1 базаһы юҡ йәки урындағы (локаль) база түгел.",
-       "userrights-nologin": "Ҡатнашыусыларҙың хоҡуҡтарын билдәләр өсөн, һеҙ хаким хоҡуҡтары менән [[Special:UserLogin|танылырға]] тейешһегеҙ.",
-       "userrights-notallowed": "Һеҙгә ҡатнашыусыларҙың хоҡуҡтарын өҫтәргә йәки юҡ итергә рөхсәт ителмәгән.",
        "userrights-changeable-col": "Һеҙ үҙгәртә алған төркөмдәр",
        "userrights-unchangeable-col": "Һеҙ үҙгәртә алмаған төркөмдәр",
        "userrights-conflict": "Ҡатнашыусының хоҡуҡтарын үҙгәртеү яраманы! Зинһар, үҙгәрештәрҙе тикшерегеҙ һәм яңынан индерегеҙ.",
-       "userrights-removed-self": "Һеҙ үҙ хоҡуҡтарығыҙҙы уңышлы юҡ иттегеҙ. Шулай итеп, был биткә башҡаса инә алмаясаҡһығыҙ.",
        "group": "Төркөм:",
        "group-user": "Ҡулланыусылар",
        "group-autoconfirmed": "Автоматик раҫланған ҡулланыусылар",
        "feedback-thanks": "Рәхмәт! Һеҙҙең фекерегеҙ «[$2 $1]» битенә өҫтәлде.",
        "feedback-thanks-title": "Рәхмәт!",
        "feedback-useragent": "Браузер:",
-       "searchsuggest-search": "Эҙләү",
+       "searchsuggest-search": "{{SITENAME}} эсендә эҙләү",
        "searchsuggest-containing": "эстәлегендә...",
        "api-error-badaccess-groups": "Һеҙгә был викиға файлдар күсереү рөхсәт ителмәй",
        "api-error-badtoken": "Эске хата: дөрөҫ булмаған токен",
        "changecredentials-submit": "Иҫәп мәғлүмәттәрен үҙгәртеү",
        "removecredentials": "Иҫәп мәғлүмәттәрен юйырға",
        "removecredentials-submit": "Иҫәп мәғлүмәттәрен юйырға",
-       "credentialsform-account": "Иҫәп яҙмаһы исеме:",
-       "edit-error-short": "Хата: $1"
+       "credentialsform-account": "Иҫәп яҙмаһы исеме:"
 }
index 334af52..ba40fdf 100644 (file)
        "editingsection": "Рэдагаваньне $1 (разьдзел)",
        "editingcomment": "Рэдагаваньне $1 (новы разьдзел)",
        "editconflict": "Канфлікт рэдагаваньняў: $1",
-       "explainconflict": "Ð\9dеÑ\85Ñ\82а Ð·Ñ\8cмÑ\8fнÑ\96Ñ\9e Ñ\81Ñ\82аÑ\80онкÑ\83 Ð¿Ð°Ð´Ñ\87аÑ\81 Ð\92аÑ\88ага Ñ\80Ñ\8dдагаванÑ\8cнÑ\8f.\nУ Ð²ÐµÑ\80Ñ\85нÑ\96м Ñ\82Ñ\8dкÑ\81Ñ\82авÑ\8bм Ð°ÐºÐ½Ðµ Ð·Ð½Ð°Ñ\85одзÑ\96Ñ\86Ñ\86а Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 Ð·Ñ\8cмеÑ\81Ñ\82 Ñ\81Ñ\82аÑ\80онкÑ\96.\nÐ\92аÑ\88Ñ\8bÑ\8f Ð·Ñ\8cменÑ\8b Ð¿Ð°ÐºÐ°Ð·Ð°Ð½Ñ\8bÑ\8f Ñ\9e Ð½Ñ\96жнÑ\96м Ð°ÐºÐ½Ðµ.\nÐ\92ам Ñ\82Ñ\80Ñ\8dба Ð¿ÐµÑ\80анеÑ\81Ñ\8cÑ\86Ñ\96 Ð\92аÑ\88Ñ\8bÑ\8f Ð·Ñ\8cменÑ\8b Ñ\9e Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 Ñ\82Ñ\8dкÑ\81Ñ\82.\nÐ\9aалÑ\96 Ð\92Ñ\8b Ð½Ð°Ñ\86Ñ\96Ñ\81Ñ\8cнÑ\96Ñ\86е Â«{{int:savearticle}}», Ð±Ñ\83дзе Ð·Ð°Ñ\85аванÑ\8b '''Ñ\82олÑ\8cкÑ\96''' тэкст верхняга вакна.",
+       "explainconflict": "Ð\9dеÑ\85Ñ\82а Ð·Ñ\8cмÑ\8fнÑ\96Ñ\9e Ñ\81Ñ\82аÑ\80онкÑ\83 Ð¿Ð°Ð´Ñ\87аÑ\81 Ð²Ð°Ñ\88ага Ñ\80Ñ\8dдагаванÑ\8cнÑ\8f.\nУ Ð²ÐµÑ\80Ñ\85нÑ\96м Ñ\82Ñ\8dкÑ\81Ñ\82авÑ\8bм Ð°ÐºÐ½Ðµ Ð·Ð½Ð°Ñ\85одзÑ\96Ñ\86Ñ\86а Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 Ð·Ñ\8cмеÑ\81Ñ\82 Ñ\81Ñ\82аÑ\80онкÑ\96.\nÐ\92аÑ\88Ñ\8bÑ\8f Ð·Ñ\8cменÑ\8b Ð¿Ð°ÐºÐ°Ð·Ð°Ð½Ñ\8bÑ\8f Ñ\9e Ð½Ñ\96жнÑ\96м Ð°ÐºÐ½Ðµ.\nÐ\92ам Ñ\82Ñ\80Ñ\8dба Ð¿ÐµÑ\80анеÑ\81Ñ\8cÑ\86Ñ\96 Ð²Ð°Ñ\88Ñ\8bÑ\8f Ð·Ñ\8cменÑ\8b Ñ\9e Ñ\86Ñ\8fпеÑ\80аÑ\88нÑ\96 Ñ\82Ñ\8dкÑ\81Ñ\82.\nÐ\9aалÑ\96 Ð²Ñ\8b Ð½Ð°Ñ\86Ñ\96Ñ\81Ñ\8cнÑ\96Ñ\86е Â«{{int:savearticle}}», Ð±Ñ\83дзе Ð·Ð°Ñ\85аванÑ\8b <strong>Ñ\82олÑ\8cкÑ\96</strong> тэкст верхняга вакна.",
        "yourtext": "Ваш тэкст",
        "storedversion": "Захаваная вэрсія",
        "nonunicodebrowser": "'''ПАПЯРЭДЖАНЬНЕ: Ваш браўзэр не працуе з кадаваньнем UTF-8 (Unicode).\nУ выніку гэтага ўсе сымбалі ня ўключаныя ў ASCII будуць замененыя на іх шаснаццаткавыя коды.'''",
        "prefswarning-warning": "Вы зрабілі зьмены ў вашых наладах, якія яшчэ не былі захаваныя.\nКалі вы закрыеце гэтую старонку і не націсьніце «$1», вашыя налады ня будуць абноўленыя.",
        "prefs-tabs-navigation-hint": "Падказка: вы можаце пераходзіць паміж укладкамі ў сьпісе ўкладак з дапамогай клявішаў налева і направа.",
        "userrights": "Кіраваньне правамі ўдзельнікаў і ўдзельніц",
-       "userrights-lookup-user": "Ð\9aÑ\96Ñ\80аванÑ\8cне Ð³Ñ\80Ñ\83памÑ\96 Ñ\9eдзелÑ\8cнÑ\96каÑ\9e Ñ\96 Ñ\9eдзелÑ\8cнÑ\96Ñ\86",
+       "userrights-lookup-user": "Ð\92Ñ\8bбаÑ\80 Ñ\83дзелÑ\8cнÑ\96ка",
        "userrights-user-editname": "Увядзіце імя ўдзельніка:",
-       "editusergroup": "РÑ\8dдагаваÑ\86Ñ\8c Ð³Ñ\80Ñ\83пÑ\8b {{GENDER:$1|Ñ\9eдзелÑ\8cнÑ\96каÑ\9e Ñ\96 Ñ\9eдзелÑ\8cнÑ\96Ñ\86}}",
+       "editusergroup": "Ð\97агÑ\80Ñ\83зÑ\96Ñ\86Ñ\8c Ð³Ñ\80Ñ\83пÑ\8b Ñ\9eдзелÑ\8cнÑ\96ка",
        "editinguser": "Зьмена правоў {{GENDER:$1|удзельніка|удзельніцы}} <strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "Рэдагаваць групы ўдзельнікаў і ўдзельніц",
        "saveusergroups": "Захаваць групы {{GENDER:$1|ўдзельнікаў і ўдзельніц}}",
        "movelogpagetext": "Ніжэй пададзены сьпіс перанесеных старонак.",
        "movesubpage": "{{PLURAL:$1|1=Падстаронка|Падстаронкі}}",
        "movesubpagetext": "Гэтая старонка мае $1 {{PLURAL:$1|падстаронку|падстаронкі|падстаронак}}, {{PLURAL:$1|1=якая паказаная ніжэй|якія паказаныя ніжэй}}.",
+       "movesubpagetalktext": "Адпаведная старонка абмеркаваньня мае $1 {{PLURAL:$1|падстаронку, паказаную|падстаронкі, паказаныя|падстаронак, паказаныя}} ніжэй.",
        "movenosubpage": "Гэтая старонка ня мае падстаронак.",
        "movereason": "Прычына:",
        "revertmove": "адкат",
        "pageinfo-category-pages": "Колькасьць старонак",
        "pageinfo-category-subcats": "Колькасьць падкатэгорыяў",
        "pageinfo-category-files": "Колькасьць файлаў",
+       "pageinfo-user-id": "Ідэнтыфікатар удзельніка",
        "markaspatrolleddiff": "Пазначыць як «патруляваную»",
        "markaspatrolledtext": "Пазначыць гэтую старонку як «патруляваную»",
        "markaspatrolledtext-file": "Пазначыць гэтую вэрсію файлу як патруляваную",
index 26175b3..734d773 100644 (file)
        "feedback-submit": "Даслаць",
        "feedback-thanks": "Дзякуй! Ваш водгук размешчаны на старонцы «[$2 $1]».",
        "feedback-thanks-title": "Дзякуем!",
-       "searchsuggest-search": "Шукаць у {{SITENAME}}",
+       "searchsuggest-search": "Шукаць у {{GRAMMAR:месны|{{SITENAME}}}}",
        "searchsuggest-containing": "змяшчае...",
        "api-error-badaccess-groups": "У Вас няма дазволу загружаць файлы ў гэтую вікі.",
        "api-error-badtoken": "Унутраная памылка: няслушны ключ.",
index dbf7814..8b22db4 100644 (file)
        "pageinfo-header-restrictions": "পাতা সুরক্ষা",
        "pageinfo-header-properties": "পাতা বৈশিষ্টসমূহ",
        "pageinfo-display-title": "শিরনাম প্রদর্শন",
-       "pageinfo-default-sort": "ডিফলà§\8dà¦\9f à¦¸à¦°à§\8dà¦\9f à¦\95ি",
+       "pageinfo-default-sort": "পà§\82রà§\8dবনিরà§\8dধারিত à¦¬à¦¾à¦\9bাà¦\87য়à§\87র à¦\9aাবি",
        "pageinfo-length": "পাতার দৈর্ঘ্য (বাইটে)",
        "pageinfo-article-id": "পাতার আইডি",
        "pageinfo-language": "পাতার তথ্যের ভাষা",
index c5df957..c61e871 100644 (file)
        "passwordreset-emaildisabled": "Электронан поштан функцеш хӀокху вики чохь дӀаяйина ю.",
        "passwordreset-username": "Декъашхочун цӀе:",
        "passwordreset-domain": "Домен:",
-       "passwordreset-capture": "Хьажа беанчу хааме?",
-       "passwordreset-capture-help": "Ахьа хӀара билгало хӀотта яхь хьона гур бу декъашхочо баийта чохь хана пароль йолу хаам.",
        "passwordreset-email": "Электронан поштан адрес:",
        "passwordreset-emailtitle": "{{SITENAME}}: декъашхочун дӀаяздарх лаьцна хаам",
        "passwordreset-emailtext-ip": "{{SITENAME}} ($4) проектехь цхьам я ахьа хӀокху IP-адрес $1 тӀера хьа декъашхочун пароль кхоссар дехна,\nоьцу электронан адресца дихкина ду {{PLURAL:$3|1хӀара декъашхочун дӀаяздар|хӀара декъашхочун дӀаяздар}}:\n\n$2\n\n{{PLURAL:$3|ХӀара хана пароль|ХӀара хана паролаш}} лелар ю {{PLURAL:$5|$5 дийнахь}}.\nСистемин чугӀой харжа керла пароль. \nХьой пароль кхоссар дехна дацахь я хьалхалера пароль дага еънехь хӀума цадеш Ӏад битта хӀара хаам хьа йиш ю шира пароль лелаян.",
        "userrights-groups-help": "Хьоьга хийцалун хӀокху декъашхочун бакъонаш.\n* Бакъона цӀера юххехь билгало елахь, цуна и бакъо йолуш ю.\n* Билгало яцахь — декъашхочун и бакъо яц.\n* Хьаьрко * билгала до ахьа бакъо еллачул тӀаьхьа хьуна и дӀаяккха цалуш хилар.",
        "userrights-reason": "Бахьана:",
        "userrights-no-interwiki": "Хьан бакъо яц декъашхой бакъо хийца кхечу википеди чохь.",
-       "userrights-nologin": "Куьйгалхочунна бакъо йолу [[Special:UserLogin|дӀаяздарца]] ло декъашхочун бакъо.",
-       "userrights-notallowed": "Хьан дӀаяздарца магийна дац декъашхошна бакъо яла а дӀаяккха а.",
        "userrights-changeable-col": "Хьоьга хийцалун бакъонаш",
        "userrights-unchangeable-col": "Хьоьга хийцалун бакъонаш",
        "group": "Тоба:",
        "right-siteadmin": "хаамийн гуламан блоктохар а, блокдӀаяккхар а",
        "right-override-export-depth": "агӀонаш экспорт ян, 5 кхаччалц къорга агӀонаш цхьан",
        "right-sendemail": "кхечу декъашхошка электронан хаамаш кхехьийта",
-       "right-passwordreset": "пароль хийцарца электроннан хаамашка хьажар",
        "right-managechangetags": "Хаамийн базан чохь [[Special:Tags|билгалонаш]] кхолла а, дӀаяха а",
        "grant-generic": "Бакъонийн гулам «$1»",
        "grant-group-page-interaction": "АгӀонашца зӀе",
        "revdelete-unrestricted": "куьйгалхойн доза тохар дӀаяьккхина",
        "logentry-block-block": "$1 {{GENDER:$2|блоктоьхна}} {{GENDER:$4|$3}} $5 $6 хан чекхйолу",
        "logentry-block-unblock": "$1 {{GENDER:$2|блокдаяьккхина}} {{GENDER:$4|$3}}",
+       "logentry-block-reblock": "$1 {{GENDER:$2|хийцина}} блоктоьхна хан {{GENDER:$4|$3}} → $5 $6",
        "logentry-suppress-block": "$1 {{GENDER:$2|блоктоьхна}} {{GENDER:$4|$3}} $5 $6 хан чекхйолу",
+       "logentry-suppress-reblock": "$1 {{GENDER:$2|хийцина}} блоктоьхна хан {{GENDER:$4|$3}} → $5 $6",
        "logentry-merge-merge": "$1 {{GENDER:$2|вовшахтоьхна}} $3 $4 чохь ($5 кхаччалц версеш)",
        "logentry-move-move": "$1 {{GENDER:$2|цӀе хийцина}} $3 → $4",
        "logentry-move-move-noredirect": "$1 {{GENDER:$2|цӀе хийцина}} $3 → $4 дӀасахьажорг цаюьтуш",
index d9bc4a6..10f39b4 100644 (file)
        "apisandbox-continue-clear": "Vymazat",
        "apisandbox-continue-help": "{{int:apisandbox-continue}} bude [https://www.mediawiki.org/wiki/API:Query#Continuing_queries pokračovat] v posledním požadavku; {{int:apisandbox-continue-clear}} vymaže parametry související s pokračováním.",
        "apisandbox-param-limit": "Pro použití maximálního limitu zadejte <kbd>max</kbd>.",
+       "apisandbox-multivalue-all-namespaces": "$1 (všechny jmenné prostory)",
+       "apisandbox-multivalue-all-values": "$1 (všechny hodnoty)",
        "booksources": "Zdroje knih",
        "booksources-search-legend": "Vyhledat knižní zdroje",
        "booksources-search": "Hledat",
        "mw-widgets-dateinput-placeholder-month": "RRRR-MM",
        "mw-widgets-titleinput-description-new-page": "stránka zatím neexistuje",
        "mw-widgets-titleinput-description-redirect": "přesměrování na $1",
+       "mw-widgets-categoryselector-add-category-placeholder": "Přidat kategorii…",
        "sessionmanager-tie": "Nelze kombinovat několik typů autentizace požadavků: $1.",
        "sessionprovider-generic": "relace pomocí $1",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "relace pomocí cookies",
index 19a946e..5b56d6d 100644 (file)
        "talk": "Diskussion",
        "views": "Visninger",
        "toolbox": "Værktøjer",
+       "tool-link-userrights": "Ændre {{GENDER:$1|bruger}}grupper",
+       "tool-link-userrights-readonly": "Se {{GENDER:$1|bruger}}grupper",
+       "tool-link-emailuser": "Send e-mail til denne {{GENDER:$1|bruger}}",
        "userpage": "Se brugersiden",
        "projectpage": "Se projektsiden",
        "imagepage": "Se filside",
        "createacct-yourpasswordagain-ph": "Indtast adgangskode igen",
        "userlogin-remembermypassword": "Husk mig",
        "userlogin-signwithsecure": "Brug sikker forbindelse",
+       "cannotlogin-title": "Kan ikke logge ind",
+       "cannotlogin-text": "Det er ikke muligt at logge ind.",
        "cannotloginnow-title": "Kan ikke logge ind på nuværende tidspunkt",
        "cannotloginnow-text": "Det er ikke muligt at logge på når du bruger $1.",
+       "cannotcreateaccount-title": "Kan ikke oprette konti",
+       "cannotcreateaccount-text": "Direkte kontooprettelse er ikke aktiveret på denne wiki.",
        "yourdomainname": "Dit domænenavn:",
        "password-change-forbidden": "Du kan ikke ændre adgangskoder på denne wiki.",
        "externaldberror": "Der er opstået en fejl i en ekstern adgangsdatabase, eller du har ikke rettigheder til at opdatere denne.",
        "createaccountreason": "Begrundelse:",
        "createacct-reason": "Årsag",
        "createacct-reason-ph": "Hvorfor du vil oprette endnu en konto",
+       "createacct-reason-help": "Besked vist i kontooprettelsesloggen.",
        "createacct-submit": "Opret din konto",
        "createacct-another-submit": "Opret konto",
+       "createacct-continue-submit": "Fortsæt kontooprettelse",
+       "createacct-another-continue-submit": "Fortsæt kontooprettelse",
        "createacct-benefit-heading": "{{SITENAME}} laves af mennesker som dig.",
        "createacct-benefit-body1": "{{PLURAL:$1|redigering|redigeringer}}",
        "createacct-benefit-body2": "{{PLURAL:$1|side|sider}}",
        "nocookiesnew": "Din brugerkonto er nu oprettet, men du er ikke logget på. {{SITENAME}} bruger cookies til at logge brugere på.\nDu har slået cookies fra. \nVær venlig at slå cookies til og log derefter på med dit nye brugernavn og adgangskode.",
        "nocookieslogin": "{{SITENAME}} bruger cookies til at logge brugere på. Du har slået cookies fra. Slå dem venligst til og prøv igen.",
        "nocookiesfornew": "Denne brugerkonto er ikke oprettet, da vi ikke kunne bekræfte dens kilde.\nSørg for, at du har aktivereret cookies, genindlæs siden og prøv igen.",
+       "createacct-loginerror": "Kontoen blev oprettet, men du kunne ikke blive logget ind automatisk. Fortsæt venligst til [[Special:UserLogin|manuel log ind]].",
        "noname": "Du har ikke angivet et gyldigt brugernavn.",
-       "loginsuccesstitle": "Du er nu logget på",
+       "loginsuccesstitle": "Logget ind",
        "loginsuccess": "'''Du er nu logget på {{SITENAME}} som \"$1\".'''",
        "nosuchuser": "Der er ingen bruger med navnet \"$1\".\nDer skelnes mellem store og bogstaver i brugernavne.\nKontrollér stavemåden, eller [[Special:CreateAccount|opret en ny konto]].",
        "nosuchusershort": "Der er ingen bruger ved navn \"$1\". Tjek din stavning.",
index ea4c3fc..fe9e024 100644 (file)
@@ -85,7 +85,7 @@
        "tuesday": "Sêşeme",
        "wednesday": "Çarşeme",
        "thursday": "Pancşeme",
-       "friday": "Yene",
+       "friday": "Êne",
        "saturday": "Şeme",
        "sun": "Krê",
        "mon": "Dış",
        "morenotlisted": "Na lista qay kemi ya.",
        "mypage": "Pele",
        "mytalk": "Mesac",
-       "anontalk": "Werênayış",
+       "anontalk": "Vaten",
        "navigation": "Pusula",
        "and": "&#32;u",
        "qbfind": "Bıvêne",
        "history_short": "Tarix",
        "updatedmarker": "cıkewtena mına peyêne ra dıme biyo rocane",
        "printableversion": "Asayışê çapkerdışi",
-       "permalink": "Gıreyo daimi",
+       "permalink": "Gıreyo bêpeyni",
        "print": "Çap ke",
        "view": "Bıvêne",
        "view-foreign": "$1 de bıvêne",
        "pool-servererror": "Amordoğa xızmeti ya istifade nëbena $1",
        "poolcounter-usage-error": "Xırab karyayış:$1",
        "aboutsite": "Heqa {{SITENAME}} de",
-       "aboutpage": "Project:Heqa",
+       "aboutpage": "Proce:Heqa",
        "copyright": "Zerrekacı $1 bındı not biya.",
        "copyrightpage": "{{ns:project}}:Heqa telifi",
        "currentevents": "Hediseyê rocaneyi",
        "currentevents-url": "Project:Hediseyê rocaneyi",
        "disclaimers": "Redê mesuliyeti",
-       "disclaimerpage": "Project:Reddê mesuliyetê bıngey",
+       "disclaimerpage": "Project:Redê mesulêtê pêroyi",
        "edithelp": "Peştdariya vurnayışi",
        "helppage-top-gethelp": "Peşti",
        "mainpage": "Pela Seri",
        "editlink": "bıvurne",
        "viewsourcelink": "çımey bıvêne",
        "editsectionhint": "Leteyo ke bıvuriyo: $1",
-       "toc": "Sernameyê meselan",
+       "toc": "Tedeestey",
        "showtoc": "bımocne",
        "hidetoc": "bınımne",
        "collapsible-collapse": "Teng kı",
        "sort-descending": "Rêzkerdışo kêmbiyaye",
        "sort-ascending": "Rêzkerdışo zêdiyaye",
        "nstab-main": "Pele",
-       "nstab-user": "Pela karberi",
+       "nstab-user": "Pella karberi",
        "nstab-media": "Pela medya",
-       "nstab-special": "Pella xısusi",
+       "nstab-special": "Pela xısusiye",
        "nstab-project": "Pela proceyi",
        "nstab-image": "Dosya",
        "nstab-mediawiki": "Mesac",
        "nstab-template": "Şablon",
        "nstab-help": "Pela peşti",
        "nstab-category": "Kategoriye",
-       "mainpage-nstab": "Pera esas",
+       "mainpage-nstab": "Pela seri",
        "nosuchaction": "Fealiyeto wınasi çıniyo",
        "nosuchactiontext": "URL ra kar qebul nêbı.\nŞıma belka URL şaş nuşt, ya zi gıreyi şaş ra ameyi.\nKeyepelê {{SITENAME}} eşkeno xeta eşkera bıkero.",
-       "nosuchspecialpage": "Pela xasa wınasiye çıniya",
+       "nosuchspecialpage": "Pella xısusi ya unasin çınya",
        "nospecialpagetext": "<strong>To yew pela xasa nêvêrdiye waşte.</strong>\n\nSeba lista pelanê xasanê vêrdeyan reca kena: [[Special:SpecialPages|{{int:specialpages}}]].",
        "error": "Xeta",
        "databaseerror": "Ğetay ardoği",
        "perfcached": "Datay cı ver hazır biye. No semedê ra nıkayin niyo! tewr zaf {{PLURAL:$1|netice|$1 netice}} debêno de",
        "perfcachedts": "Cêr de malumatê nımıteyi esti, demdê newe kerdışo peyın: $1. Tewr zaf {{PLURAL:$4|netice|$4 neticey cı}} debyayo de",
        "querypage-no-updates": "Rocanebiyayışê na pele nıka cadayiyê.\nDayiyi tiya nıka newe nêbenê.",
-       "viewsource": "Çemi bıvin",
+       "viewsource": "Çımey bıvêne",
        "viewsource-title": "Cı geyrayışê $1'i bıvin",
        "actionthrottled": "Kerden peysnaya",
        "actionthrottledtext": "Riyê tedbirê anti-spami ra,  wextê do kılmek de şıma nê fealiyeti nêşkenê zaf zêde bıkerê, şıma ki no hedi viyarna ra.\nÇend deqey ra tepeya reyna bıcerrebnên.",
        "summary": "Xulasa:",
        "subject": "Mewzu:",
        "minoredit": "No yew vurnayışo werdiyo",
-       "watchthis": "Na pele seyr ke",
-       "savearticle": "Peller qeyd kı",
+       "watchthis": "Bıewni ena perrer",
+       "savearticle": "Perrer qeyd kı",
        "savechanges": "Vuryayışa qeyd kerê",
        "publishpage": "Perer bıhesırne",
        "publishchanges": "Vurnayışa vıla ke",
        "preview": "Verqayt",
-       "showpreview": "Var asani bıvinê",
+       "showpreview": "Ver asayışi bıvinê",
        "showdiff": "Vurriyayışa bıasne",
        "anoneditwarning": "<strong>İqaz:</strong> Şıma be hesabê xo nêkewtê cı. \nAdresê şımayê IP tarixê vırnayışê na pele de do qeyd bo. Eke şıma <strong>[$1 cıkewê]</strong> ya zi <strong>[$2 hesab vırazê]</strong>, vurnayışê şıma be zewbina kare ra nameyê şıma rê bar beno.",
        "anonpreviewwarning": "\"Şıma be hesabê xo nêkewtê cı. Eke qeyd kerê, adresê şımaê IP tarixê vırnayışê na pele de do qeyd bo.\"",
        "nohistory": "Verê vurnayışanê na pele çıniyo.",
        "currentrev": "Çımraviyarnayışo rocane",
        "currentrev-asof": "$1 ra tepya mewcud weziyeta pela",
-       "revisionasof": "Verziyonê roca $1ine",
+       "revisionasof": "Çımraviyarnayışê $1",
        "revision-info": "Vurnayışo ke $1 de terefê {{GENDER:$6|$2}}$7 ra biyo",
        "previousrevision": "← Çımraviyarnayışo kıhanêr",
        "nextrevision": "Rewizyono newên →",
        "lineno": "Xeta $1:",
        "compareselectedversions": "Rewizyonanê weçineyan pêver ke",
        "showhideselectedversions": "Revizyonanê weçinıtan bımocne/bınımne",
-       "editundo": "peyser biya",
+       "editundo": "Peyser bıgêre",
        "diff-empty": "(Babetna niyo)",
        "diff-multi-sameuser": "(Terefê eyni karberi ra {{PLURAL:$1|yew revizyono miyanên nêmocno|$1 revizyonê miyanêni nêmocnê}})",
        "diff-multi-otherusers": "(Terefê {{PLURAL:$2|yew karberi|$2 karberan}} ra {{PLURAL:$1|yew revizyono miyanên nêmocno|$1 revizyonê miyanêni nêmocnê}})",
        "diff-multi-manyusers": "({{PLURAL:$1|jew timar kerdışo qıckeko|$1 timar kerdışo qıckeko}} timar kerdo, $2 {{PLURAL:$2|Karber|karberi}} memocne)",
        "difference-missing-revision": "Ferqê {{PLURAL:$2|Yew rewizyonê|$2 rewizyonê}} {{PLURAL:$2|dı|dı}} ($1) sero çıniyo.\n\nNo normal de werênayış dê pelanê besterneyan dı ena xırabin asena.\nDetayê besternayışi [{{fullurl:{{#Special:Log}}/delete|page={{FULLPAGENAMEE}}}} tiya dı] aseno.",
-       "searchresults": "Neticeyê geyrayışi",
+       "searchresults": "Peyniyê cıgeyrayışi",
        "searchresults-title": "Qandê \"$1\" neticeyê geyrayışi",
        "titlematches": "Tekê (zewcê) sernameyê pele",
        "textmatches": "Tekê (zewcê) nuştey pele",
        "next-page": "Pela peyên",
        "prevn-title": "$1o verên  {{PLURAL:$1|netice|neticeyan}}",
        "nextn-title": "$1o ke yeno {{PLURAL:$1|netice|neticey}}",
-       "shown-title": "Herg per sero $1 {{PLURAL:$1|netici|netica}} bıasne",
+       "shown-title": "Her pele sero $1 {{PLURAL:$1|netici|netica}} bımocne",
        "viewprevnext": "($1 {{int:pipe-separator}} $2) ($3) bıvênên",
        "searchmenu-exists": "''Ena 'Wikipediya de ser \"[[:$1]]\" yew pel esto'''",
        "searchmenu-new": "<strong>Na wiki de pela \"[[:$1]]\" vıraze!</strong> {{PLURAL:$2|0=|Sewbina pela ke şıma geyrayê cı aye bıvênê.|Yew zi neticanê cıgeyrayışê xo bıvênê.}}",
-       "searchprofile-articles": "Perrê muhteway",
+       "searchprofile-articles": "Pelê zerreki",
        "searchprofile-images": "Zafınmedya",
        "searchprofile-everything": "Pêro çi",
        "searchprofile-advanced": "Herayen",
        "searchprofile-articles-tooltip": "$1 de cı geyre",
        "searchprofile-images-tooltip": "Dosya cı geyre",
-       "searchprofile-everything-tooltip": "Tedeesteyan hemine cı geyre (pelanê mınaqeşeyi zi tey)",
+       "searchprofile-everything-tooltip": "Tedeesteyan hemine cı geyre (pelanê werênayışi zi tey)",
        "searchprofile-advanced-tooltip": "Cayê nameyanê xısusiyan de cı geyre",
        "search-result-size": "$1 ({{PLURAL:$2|1 çeku|$2 çekuy}})",
        "search-result-category-size": "{{PLURAL:$1|1 eza|$1 ezayan}} ({{PLURAL:$2|1 kategoriyê bini|$2 kategirayanê binan}}, {{PLURAL:$3|1 dosya|$3 dosyayan}})",
        "datedefault": "Tercih çıniyo",
        "prefs-labs": "Xacetê labs",
        "prefs-user-pages": "Pelê karberi",
-       "prefs-personal": "Pela karberi",
+       "prefs-personal": "Profilê karberi",
        "prefs-rc": "Vurriyayışê peyêni",
        "prefs-watchlist": "Lista seyrkerdışi",
        "prefs-editwatchlist": "Lista seyrkerdışi bıvurne",
        "grouppage-autoconfirmed": "{{ns:project}}:Karberê ke otomatikmen biyê araşt",
        "grouppage-bot": "{{ns:project}}:Boti",
        "grouppage-sysop": "{{ns:project}}:İdarekeri",
-       "grouppage-bureaucrat": "{{ns:project}}:Burokrati",
+       "grouppage-bureaucrat": "{{ns:project}}:Buroqrati",
        "grouppage-suppress": "{{ns:project}}:Teftişkar",
        "right-read": "Pera bıwané",
        "right-edit": "Pele bıvurne",
        "right-bot": "Zey yew kardê otomotiki kar bıvin",
        "right-nominornewtalk": "Pelanê werênayışan rê vurnayışê qıckeki çıniyê, qutiya mesacanê newiyan bıgurene",
        "right-apihighlimits": "Persanê API de sinoranê berzêran bıgurene",
-       "right-writeapi": "İstıfadey APIyê nuştey",
+       "right-writeapi": "Gurenayışê nuştey API",
        "right-delete": "Pele bestere",
        "right-bigdelete": "Pelanê be tarixanê dergan bestere",
        "right-deletelogentry": "Qeydanê cıkewtışanê xısusiyan bestere û peyser biya",
        "nchanges": "$1 {{PLURAL:$1|vurnayış|vurnayışi}}",
        "enhancedrc-since-last-visit": "$1 {{PLURAL:$1|ziyaretê peyêni ra nata}}",
        "enhancedrc-history": "tarix",
-       "recentchanges": "Vurriyayışê peyêni",
+       "recentchanges": "Vuriyayışê peyêni",
        "recentchanges-legend": "Tercihê vurnayışanê peyênan",
        "recentchanges-summary": "Wiki sero vurriyayışê peyêni asenê.",
        "recentchanges-noresult": "Goreyê kriteranê kıfşkerdeyan ra qet yew vurnayış nêvêniya.",
        "recentchanges-feed-description": "Ena feed dı vurnayişanê tewr peniyan teqip bık.",
-       "recentchanges-label-newpage": "Enê vurnayışi ra yu pera newi vıraziya ya",
+       "recentchanges-label-newpage": "Enê vurnayışi yew pela newiye vıraşta.",
        "recentchanges-label-minor": "No yew vurnayışo werdiyo",
        "recentchanges-label-bot": "Eno vurnayış terefê yew boti ra vıraziyo",
        "recentchanges-label-unpatrolled": "Eno vurnayış hewna dewriya nêbiyo",
        "rcshowhidepatr": "$1 vurnayışê ke dewriya geyrayê",
        "rcshowhidepatr-show": "Bımocne",
        "rcshowhidepatr-hide": "Bınımne",
-       "rcshowhidemine": "vurnayışanê mı $1",
+       "rcshowhidemine": "vurnayışê mı $1",
        "rcshowhidemine-show": "Bımocne",
        "rcshowhidemine-hide": "Bınımne",
        "rcshowhidecategorization": "kategorizasyonê pele $1",
        "rc_categories": "Kategoriyan rêz kı ( \"|“ ya ciya yo):",
        "rc_categories_any": "Weçinayiyan ra her yew",
        "rc-change-size": "$1",
-       "rc-change-size-new": "Vurnayışa dıma $1 {{PLURAL:$1|bayt|bayt}}",
+       "rc-change-size-new": "$1 {{PLURAL:$1|bayt|bayt}} ra dıma vurnayış",
        "newsectionsummary": "/* $1 */ qısımo newe",
        "rc-enhanced-expand": "Detaya bıvin (JavaScript lazımo)",
        "rc-enhanced-hide": "Melumat bınımne",
        "uncategorizedcategories": "Kategoriyê ke kategorize nêbiyê",
        "uncategorizedimages": "Dosye yê  bêkategori",
        "uncategorizedtemplates": "Şablonê ke bêkategoriyê",
-       "unusedcategories": "Kategoriyê ke nêgureniyê",
+       "unusedcategories": "Kategoriyê ke nêkarênê",
        "unusedimages": "Dosyeyê ke nêguriyenê",
        "wantedcategories": "Kategoriyê ke waziyayê",
        "wantedpages": "Pelê ke waziyayê",
        "mostimages": "Dosyayan ke tewr zaf link estê.",
        "mostinterwikis": "Pelan ke tewr zaf interwiki biyê.",
        "mostrevisions": "Pelan ke tewr zaf revizyonî biyê.",
-       "prefixindex": "Veroleya peley pêro",
+       "prefixindex": "Verbenda pelli heme",
        "prefixindex-namespace": "Peleyê Veroleyıni ($1 cay nami)",
        "prefixindex-submit": "Bımocne",
        "prefixindex-strip": "Listeya réz bıyayışi",
        "longpages": "Perrê  dergeki",
        "deadendpages": "Perrê kı perranê binan rê grey c çıni yo",
        "deadendpagestext": "Ena pelan ke {{SITENAME}} de zerrî ey de link çini yo.",
-       "protectedpages": "Pelê pawıteyi",
+       "protectedpages": "Pellê kı pawıyayeyè",
        "protectedpages-indef": "têna pawıteyê bêmuddeti",
        "protectedpages-summary": "Listeya ena peler newke pawıtiya.Sername de  ena lista rê pawıte vıraştışi rê [[{{#special:ProtectedTitles}}|{{int:protectedtitles}}]] bıvinê.",
        "protectedpages-cascade": "Kilit biyaye ke teyna cascadiye",
        "listusers-desc": "Kemeyen rézed ratn",
        "usereditcount": "$1 {{PLURAL:$1|vurnayîş|vurnayîşî}}",
        "usercreated": "$2 de $1 {{GENDER:$3|viraziya}}",
-       "newpages": "Perrê newey",
+       "newpages": "Pelê newey",
        "newpages-submit": "Bımocne",
        "newpages-username": "Nameyê karberi:",
        "ancientpages": "Perrê kı rewnayo kı nêvuriya yê",
        "checkbox-all": "Pêro",
        "checkbox-none": "Temam",
        "checkbox-invert": "Rageyre",
-       "allpages": "Peli pêro",
+       "allpages": "Pelli pêro",
        "nextpage": "Pela badê cû ($1)",
        "prevpage": "Pela verêne ($1)",
        "allpagesfrom": "Pera liste kerdışi bıasne:",
        "removedwatchtext": "Ena pela \"[[:$1]]\" biya wedariya [[Special:Watchlist|listeyê seyr-kerdışi şıma]].",
        "removedwatchtext-short": "Pera $1`i listeya seyran de şıma ra wedari yê",
        "watch": "Seyr ke",
-       "watchthispage": "Na pele seyr ke",
+       "watchthispage": "Peller seyr kı",
        "unwatch": "Teqib meke",
        "unwatchthispage": "temaşa kerdışê peli vındarn.",
        "notanarticle": "mebhesê peli niyo",
        "delete-warning-toobig": "no pel wayirê tarixê vurnayiş ê derg o, $1 {{PLURAL:$1|revizyonê|revizyonê}} seri de.\nhewn a kerdışê ıney {{SITENAME}} şuxul bıne gırano;\nbı diqqet dewam kerê.",
        "deleteprotected": "Şıma nêşenê ena perer esternê,  çıkı per starya ya.",
        "rollback": "vurnayişan tepiya bıger",
-       "rollbacklink": "peyser biya",
+       "rollbacklink": "peyser biyare",
        "rollbacklinkcount": "$1 {{PLURAL:$1|vurnayış|vurnayışi}} peyd gıroti",
        "rollbacklinkcount-morethan": "$1 {{PLURAL:$1|vurnayış|vuranyışi}} tewr peyd gırot",
        "rollbackfailed": "Peyserardış nêbi",
        "rollback-success": "vurnayişê no kesi $1 tepiya geriyayo u hetê no\n$2 kesi ra cıwa ver o ke revizyon biyo no revizyon tepiya anciyayo.",
        "sessionfailure-title": "Seans xeripiya",
        "sessionfailure": "cıkewtışê hesabê şıma de yew problem aseno;\nno kar semedê dızdiyê hesabi ibtal biyo.\nkerem kerê \"tepiya\" şiyerê u pel o ke şıma tera ameyî u o pel newe ra bar kerê , newe ra tesel/cereb kerê.",
+       "changecontentmodel": "Modelê zerrekê pele bıvurne",
        "changecontentmodel-title-label": "Sernameyê pele",
        "changecontentmodel-model-label": "Modelê zerrekiyo newe",
        "changecontentmodel-reason-label": "Sebeb:",
        "sp-contributions-deleted": "iştırakê {{GENDER:$1|karberi}} esterdi",
        "sp-contributions-uploads": "Barkerdışi",
        "sp-contributions-logs": "qeydi",
-       "sp-contributions-talk": "werênayış",
+       "sp-contributions-talk": "vaten",
        "sp-contributions-userrights": "idareyê heqanê karberan",
        "sp-contributions-blocked-notice": "verniyê no/na karber/e geriyayo/a\nqê referansi qeydê vernigrewtışi cêr de eşkera biyo:",
        "sp-contributions-blocked-notice-anon": "Eno adresê IPi bloke biyo.\nCıkewtışo tewr peyêno ke bloke biyo, cêr seba referansi belikerdeyo:",
        "tooltip-pt-createaccount": "Şıma rê tewsiyey ma xorê jew hesab akerê. Fına zi hesab akerdış mecburi niyo.",
        "tooltip-ca-talk": "Heqa zerrekê pele de werênayış",
        "tooltip-ca-edit": "Ena pele bıvurne",
-       "tooltip-ca-addsection": "Zu bınnusteya newi ak",
+       "tooltip-ca-addsection": "Yew leteyo newe a ke",
        "tooltip-ca-viewsource": "Ena pele kılit biya.\nŞıma şenê çımeyê aye bıvênê",
        "tooltip-ca-history": "Versiyonê verênê ena pele",
        "tooltip-ca-protect": "Ena pele bışevekne",
        "tooltip-ca-nstab-media": "Pela medya bıvêne",
        "tooltip-ca-nstab-special": "Na yew pela xasa, şıma nêşenê sero vurnayış bıkerê",
        "tooltip-ca-nstab-project": "Pela proceyi bıvêne",
-       "tooltip-ca-nstab-image": "Pera dosyayer bıvin",
+       "tooltip-ca-nstab-image": "Pela dosya bıvêne",
        "tooltip-ca-nstab-mediawiki": "Mesacê sistemi bımocne",
        "tooltip-ca-nstab-template": "Şabloni bıvêne",
        "tooltip-ca-nstab-help": "Pela peşti bıvêne",
        "tooltip-minoredit": "Nay vırnayışa werdi nışan bıkeré",
        "tooltip-save": "Vurnayışanê xo qeyd ke",
        "tooltip-publish": "Vurnayışê xo vıla kı",
-       "tooltip-preview": "Vuryayışané xo çım ra ravyarné. Verdé qeyd kerdışi eneri bıkarné!",
+       "tooltip-preview": "Vurnayışanê xo çım ra bıviyarnê. Qeydkerdış ra ver bıgurê cı!",
        "tooltip-diff": "Metni sero vurnayışan mocneno",
        "tooltip-compareselectedversions": "Ena per de ferqê rewziyonan de dı weçinaya bıvinê",
        "tooltip-watch": "Ena pele lista xoya seyrkerdışi ke",
        "tooltip-rollback": "\"Peyser biya\" be yew tık pela iştıraqanê peyênan peyser ano",
        "tooltip-undo": "\"Undo\" ena vurnayışê newi iptal kena u vurnayışê verni a kena.\nTı eşkeno yew sebeb bınus.",
        "tooltip-preferences-save": "Terciha qeyd ke",
-       "tooltip-summary": "Yew xulasaya kilm binuse",
+       "tooltip-summary": "Yew xulasa kılmeke bınuse",
        "interlanguage-link-title": "$1 - $2",
        "common.css": "/************************************************\n * COMMON CSS\n *\n * Any CSS placed in this page will be used on \n * all skins, please think carefully about if it\n * belongs here (and not in one of the skin CSS\n * pages) before adding it. Thanks.\n ************************************************/\n\n/* <table class=\"highlighthovertable\"> */\ntable.highlighthovertable tr:hover,\ntable.highlighthovertable tr:hover td,\ntable.mw-ext-translate-groupstatistics tr:hover,\ntable.mw-ext-translate-groupstatistics tr:hover td {\n background-color: white;\n}\n\n\n/* Babel wrapper layout. */\n/* XXX: This is either redundant or should be in-core */\n/* @noflip */table.mw-babel-wrapper {\n\twidth:        238px;\n\tfloat:        right;\n\tclear:        right;\n\tmargin:       1em;\n\tborder-style: solid;\n\tborder-width: 1px;\n\tborder-color: #99B3FF;\n}\n\n/* Babel box layout. */\n/* @noflip */div.mw-babel-box {\n\tfloat:  left;\n\tclear:  left;\n\tmargin: 1px;\n}\n\ndiv.mw-babel-box table {\n\twidth: 238px;\n}\n\ndiv.mw-babel-box table th {\n\twidth:       238px;\n\twidth:       45px;\n\theight:      45px;\n\tfont-size:   14pt;\n\tfont-family: monospace;\n}\n\ndiv.mw-babel-box table td {\n\tfont-size:   8pt;\n\tpadding:     4pt;\n\tline-height: 1.25em;\n}\n\n/* Babel box colours. */\ndiv.mw-babel-box-0 {\n\tborder: solid #B7B7B7 1px;\n}\n\ndiv.mw-babel-box-1 {\n\tborder: solid #C0C8FF 1px;\n}\n\ndiv.mw-babel-box-2 {\n\tborder: solid #77E0E8 1px;\n}\n\ndiv.mw-babel-box-3 {\n\tborder: solid #99B3FF 1px;\n}\n\ndiv.mw-babel-box-4 {\n\tborder: solid #CCCC00 1px;\n}\n\ndiv.mw-babel-box-5 {\n\tborder: solid #F99C99 1px;\n}\n\ndiv.mw-babel-box-N {\n\tborder: solid #6EF7A7 1px;\n}\n\ndiv.mw-babel-box-0 table th {\n\tbackground-color: #B7B7B7;\n}\n\ndiv.mw-babel-box-1 table th {\n\tbackground-color: #C0C8FF;\n}\n\ndiv.mw-babel-box-2 table th {\n\tbackground-color: #77E0E8;\n}\n\ndiv.mw-babel-box-3 table th {\n\tbackground-color: #99B3FF;\n}\n\ndiv.mw-babel-box-4 table th {\n\tbackground-color: #CCCC00;\n}\n\ndiv.mw-babel-box-5 table th {\n\tbackground-color: #F99C99;\n}\n\ndiv.mw-babel-box-N table th{\n\tbackground-color: #6EF7A7;\n}\n\ndiv.mw-babel-box-0 table {\n\tbackground-color: #E8E8E8;\n}\n\ndiv.mw-babel-box-1 table {\n\tbackground-color: #F0F8FF;\n}\n\ndiv.mw-babel-box-2 table {\n\tbackground-color: #D0F8FF;\n}\n\ndiv.mw-babel-box-3 table {\n\tbackground-color: #E0E8FF;\n}\n\ndiv.mw-babel-box-4 table {\n\tbackground-color: #FFFF99;\n}\n\ndiv.mw-babel-box-5 table {\n\tbackground-color: #F9CBC9;\n}\n\ndiv.mw-babel-box-N table {\n\tbackground-color: #C5FCDC;\n}\n\n.babel-box td.babel-footer {\n\ttext-align: center;\n}\n\n/* Styling for portals. */\ndiv.table {\n    display:        table;\n    vertical-align: top;\n    width:          100%;\n}\n\ndiv.table-row {\n    display:        table-row;\n    vertical-align: top;\n}\n\ndiv.table-cell {\n    display:        table-cell;\n    vertical-align: top;\n}\n\nbody.ns-100 table.mw-babel-wrapper {\n    border:           solid 1px #bbbbbb;\n    background-color: #f0f0f0;\n    margin-left:      1em;\n}\n\n.graytext {\n    color: #aaa;\n}\n\n/* On [[Special:RecentChanges]] and [[Special:Watchlist]] make the new pages symbol bold green and the minor edit symbol gray. */\n.newpage {\n    color:       green;\n    font-weight: bold\n}\n\n.minoredit,\n.minor {\n    color: gray;\n}\n\n/* Monospace diffs, this makes more sense since diffs show what would be seen in the edit box. */\n/* Note: Anno 2012 many browsers don't use monospace in the textarea anymore by default, notably Chrome and Safari don't (unless the user overrides this in the preferences) */\n.diff-context,\n.diff-deletedline,\n.diff-addedline {\n    font-family: monospace, \"Courier New\";\n/* Just guess does the stupid wikidiff2 extensions add extra whitespace around..... */\n    white-space: -moz-pre-wrap;\n    white-space: pre-wrap;\n}\n \n.diffchange {\n    border: 1px dotted rgb( 170, 170, 170 );\n}\n\n/* It is unclear what the following CSS does, please add comments if you can clarify. */\n/* The box which is 400px high and if its content is longer, it gets the scrollbar */\n.scrollme {\n    overflow: scroll;\n    width:    100%;\n    height:   400px;\n}\n\n/* Standard Navigationsleisten, aka box hiding thingy from .de.  Documentation at [[Wikipedia:NavFrame]]. */\ndiv.Boxmerge, div.NavFrame { margin: 0; padding: 4px; border-collapse: collapse;}\ndiv.Boxmerge div.NavFrame { border-style: none; border-style: hidden; }\ndiv.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; }\ndiv.NavFrame div.NavHead { height: 1.6em; position:relative; }\ndiv.NavEnd { margin: 0; padding: 0; line-height: 1px; clear: both; }\na.NavToggle { position: absolute; top: 0; right: 5px; }\n.note-flaggedrevs * a.NavToggle { right: 12px; } /* For [[Template:Flagged Revs]] */\n\n/* Template:Languages */\n.bw-languages {\n    border:          1px solid #aaaaaa;\n    padding:         0.2em;\n    border-collapse: collapse;\n    line-height:     1.2;\n    font-size:       95%;\n    margin:          1px 1px;\n}\n.bw-languages-title {\n    width:        180px;\n    border:       1px solid #aaaaaa;\n    background:   #EEF3E2;\n    padding:      0.5em;\n    font-weight:  bold;\n}\n.bw-languages-links { padding:0.5em; background:#F6F9ED; }\n\n/* Senseless in this project */\n#editpage-copywarn { display: none; }\n\n/* Hide warnings about bad links on MediaWiki:Common.css */\n.page-MediaWiki_Common_css .mw-translate-messagechecks { display: none; }\n\n/*******************\n** Faciliate RTL translation\n*******************/\n/* @noflip */\n#bodyContent .arabic a {\n\tpadding-right:0;\n\tbackground:none;\n}\n\n.vatop tr, tr.vatop, .vatop td, .vatop th {\n vertical-align: top;\n}\n\n.bw-languages {\n direction: ltr;\n}\n\n/* prevent wrapping of lines in LQT TOC if not necessary */\ntable.lqt_toc {\n\twidth: auto;\n}\n\n/* [[m:MediaZilla:35337]] */\n@media (-webkit-min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) {\n        #p-logo a {\n                background-image: url(\"//translatewiki.net/images/thumb/7/7c/Translatewiki-logo-bare.svg/152px-Translatewiki-logo-bare.svg.png\") !important;\n                background-size: auto 135px;\n        }\n}\n@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {\n        #p-logo a {\n                background-image: url(\"//translatewiki.net/images/thumb/7/7c/Translatewiki-logo-bare.svg/202px-Translatewiki-logo-bare.svg.png\") !important;\n                background-size: auto 135px;\n        }\n}\n\n/* qqq visibility, [[Thread:Support/Suggestion: Add this CSS to MediaWiki:Common.css]] */\n \n.mw-sp-translate-edit-info .mw-content-ltr {\n  background-position:left center;\n  padding-left:45px;\n}\nfieldset.mw-sp-translate-edit-info .mw-centent-rtl {\n  background-position:right center;\n  padding-right:45px;\n}\n\n/* Semantic MediaWiki - make special properties easier to identify */\n\n.smwbuiltin a,\n.smwbuiltin a.new {\n\tcolor: #FF8000;\n}\n\n/* Recentchangestext toggle link */\n.white-link a {\n    color: #fff;\n}",
        "common.js": "/* Any JavaScript here will be loaded for all users on every page load. */",
        "widthheight": "$1 - $2",
        "widthheightpage": "$1 × $2, $3 {{PLURAL:$3|pele|peli}}",
        "file-info": "ebatê dosyayi: $1, MIME tip: $2",
-       "file-info-size": "$1 × $2 pixelan, ebatê dosya: $3, MIME type: $4",
+       "file-info-size": "$1 × $2 pikselan, ebatê dosya: $3, MIME tipê cı: $4",
        "file-info-size-pages": "$1 × $2 pikse, dergeya dosyay: $3, MIME tipiya cı: $4, $5 {{PLURAL:$5|pela|pela}}",
        "file-nohires": "Deha berz agozney cı çıniyo",
        "svg-long-desc": "Dosyay SVG, zek vanê $1 × $2 piksela, ebatê dosya: $3",
        "svg-long-desc-animated": "SVG dosya, nominalin $1 × $2 piksela, ebatê dosya: $3",
        "svg-long-error": "Nêmeqbul dosyaya SVG'i: $1",
        "show-big-image": "Dosyaya oricinale",
-       "show-big-image-preview": "Verqaytê dergiya: $1.",
+       "show-big-image-preview": "Vervênayışê ebatê : $1.",
        "show-big-image-other": "Zewmi{{PLURAL:$2|Vılêşnayış|Vılêşnayışê}}: $1.",
        "show-big-image-size": "$1 × $2 piksel",
        "file-info-gif-looped": "viyariye biyo",
        "fileduplicatesearch-result-1": "Dosyayê ''$1î'' de hem-kopya çini yo.",
        "fileduplicatesearch-result-n": "Dosyayê ''$1î'' de {{PLURAL:$2|1 hem-kopya|$2 hem-kopyayî'}} esto.",
        "fileduplicatesearch-noresults": "Ebe namey \"$1\" ra dosya nêdiyayê.",
-       "specialpages": "Pellê xısusiy",
+       "specialpages": "Perrê Hısusi",
        "specialpages-note-top": "Kıtabek",
        "specialpages-note": "* Pelê xasê normali.\n* <span class=\"mw-specialpagerestricted\">Pelê xasê nımıtey.</span>",
        "specialpages-group-maintenance": "Raporê pawıtışi",
        "specialpages-group-login": "Dekew / hesab vıraz",
        "specialpages-group-changes": "Vurnayışê peyêni û qeydi",
        "specialpages-group-media": "Raporê medya û barkerdışi",
-       "specialpages-group-users": "Karberi û heqi",
+       "specialpages-group-users": "Karberi u heqê cı",
        "specialpages-group-highuse": "Peleyê ke vêşi karênê",
        "specialpages-group-pages": "Listeyê pelan",
        "specialpages-group-pagetools": "Haletê pelan",
        "mw-widgets-titleinput-description-redirect": "berd be $1",
        "randomrootpage": "Raştamaye perra çımey",
        "log-action-filter-newusers": "Babetê hesabvıraştışi:",
-       "changecredentials": "Malumatanê karberi bıvurnê"
+       "changecredentials": "Malumatanê karberi bıvurnê",
+       "removecredentials": "Kamiyer wedarne",
+       "removecredentials-submit": "Kamiyer wedarne"
 }
index 2685328..b6e1b18 100644 (file)
        "category-file-count-limited": "निम्न {{PLURAL:$1|फाइल|$1 फाइलहरू}} यै श्रेणीमी रया छ ।",
        "listingcontinuesabbrev": "निरन्तरता...",
        "index-category": "क्रमाङ्कित पानाहरू",
-       "noindex-category": "à¤\95à¥\8dरमाà¤\99à¥\8dà¤\95न à¤¨à¤\97रà¥\80याà¤\95ा à¤ªà¤¾à¤¨à¤¾à¤¹à¤°à¥\82",
+       "noindex-category": "à¤\85नà¥\81à¤\95à¥\8dरमित à¤¨à¤\85रियाऽ à¤ªà¤¨à¥\8dनाà¤\85न",
        "broken-file-category": "टुटेको फाइल लिङ्कहरूसितको पाना",
        "about": "बारेमी",
        "article": "सामाग्री पानो",
        "passwordreset": "पासवर्ड पूर्वनिर्धारित गर",
        "passwordreset-username": "प्रयोगकर्ता-नाम:",
        "passwordreset-domain": "डोमेन",
-       "passwordreset-capture": "निस्कने इमेलको नमुना हेर्ने ?",
        "passwordreset-email": "इमेल ठेगाना:",
        "passwordreset-emailtitle": "{{SITENAME}}मा खाता विवरण",
        "passwordreset-emailelement": "प्रयोगकर्ताको नाम: \n$1\n\nअस्थाई पासवर्ड: \n$2",
        "searchprofile-advanced-tooltip": "अनुकुल नेमस्पेसमा खोज्या",
        "search-result-size": "$1 ({{PLURAL:$2|1 आँखर|$2 आँखर}})",
        "search-result-category-size": "{{PLURAL:$1|एक सदस्य|$1 सदस्यहरू}} ({{PLURAL:$2|1 उपश्रेणी|$2  उपश्रेणीहरू}}, {{PLURAL:$3|एउटा फाइल|$3 फाइलहरू}})",
-       "search-redirect": "(जान्या $1)",
+       "search-redirect": "($1 बठेइ पुन:निर्देशित)",
        "search-section": "(खण्ड $1)",
        "search-category": "(श्रेणी $1)",
        "search-file-match": "(भेटिईया फाइल सामाग्री)",
        "userrights-changeable-col": "तमले परिवर्तन गद्द सक्दया समूहअन",
        "userrights-unchangeable-col": "तमीले परिवर्तन गद्द नसक्ने समूहहरू",
        "userrights-conflict": "प्रयोगकर्ताको अधिकार परिवर्तनमी मतभेद भयो ! कृपया तमरो परिवर्तन पुनरावलोकन तथा पुष्टि गर ।",
-       "userrights-removed-self": "तमले सफलतापूर्वक आफनो अधिकारहरूलाई मेटाया । त्यै कारण तम आब यो पानो हेद्द नाइसक्दा ।",
        "group": "समूह:",
        "group-user": "प्रयोगकर्ताहरू",
        "group-autoconfirmed": "स्वत स्थापित प्रयोगकर्ताहरू",
        "logentry-newusers-create": "प्रयोगकर्ता खाता $1 {{GENDER:$2|खोलियो}}",
        "logentry-upload-upload": "$1 ले $3 {{GENDER:$2|अपलोड अरेका छन्}}",
        "feedback-bugornote": "यदि तमी कुनै प्राविधिक समस्यालाई विस्तारले सम्झाउन तयार छौ भण्या कृपया [$1 बग राख]।\nयदि हैन, भण्या तमी तल दियाको सरल फारमको प्रयोग गद्दसक्द्याहौ । तमरो टिप्पणी, तमरो प्रयोगकर्ता नाम र तमरो ब्राउजरको नाम सहित \"[$3 $2]\" पानामी जोडिन्याछ ।",
-       "searchsuggest-search": "खोज:",
+       "searchsuggest-search": "{{SITENAME}} खोजऽ",
        "api-error-duplicate": "यै साइटमी पहिलीबठे यस्तै सामग्री {{PLURAL:$1|भयाको अर्को फाइल छ|भयाका  केहि अरु फाइलहरू छन्}} ।",
        "api-error-duplicate-archive": "यै साइटमी पहिलेबाट यस्तै सामग्री {{PLURAL:$1|भयाको अर्को फाइल थियो|भयाका केहि अरु फाइलहरू थिए}} ।\nतर {{PLURAL:$1|यो मेट्याको थियो|यी मेटायाका थिए}} ।",
        "expand_templates_preview_fail_html": "<em>किनकि {{SITENAME}} सिधै एचटिएमयल सक्षम छ र तमीले लग इन गर्या छैनौ, पूर्वावलोकन लुकाइयाको छ ताकि सम्भावित जाभास्क्रिप्ट आक्रमणलाई रोक्द सकियोस् ।</em>\n\n<strong>यदि यो मान्य पूर्ववावलोकन प्रयास हो भण्या पुन प्रयास गर ।</strong>\nयदि यसले कार्य पूर्ण भएन भण्या [[Special:UserLogout|लग आउट गरिबर]] फेरी लग इन गर्या ।",
index 9aa0f46..afd13f0 100644 (file)
        "searchdisabled": "{{SITENAME}} search is disabled.\nYou can search via Google in the meantime.\nNote that their indexes of {{SITENAME}} content may be out of date.",
        "googlesearch": "<form method=\"get\" action=\"//www.google.com/search\" id=\"googlesearch\">\n\t<input type=\"hidden\" name=\"domains\" value=\"{{SERVER}}\" />\n\t<input type=\"hidden\" name=\"num\" value=\"50\" />\n\t<input type=\"hidden\" name=\"ie\" value=\"$2\" />\n\t<input type=\"hidden\" name=\"oe\" value=\"$2\" />\n\n\t<input type=\"text\" name=\"q\" size=\"31\" maxlength=\"255\" value=\"$1\" />\n\t<input type=\"submit\" name=\"btnG\" value=\"$3\" />\n  <div>\n\t<input type=\"radio\" name=\"sitesearch\" id=\"gwiki\" value=\"{{SERVER}}\" checked=\"checked\" /><label for=\"gwiki\">{{SITENAME}}</label>\n\t<input type=\"radio\" name=\"sitesearch\" id=\"gWWW\" value=\"\" /><label for=\"gWWW\">WWW</label>\n  </div>\n</form>",
        "search-error": "An error has occurred while searching: $1",
+       "search-warning": "A warning has occured while searching: $1",
        "opensearch-desc": "{{SITENAME}} ({{CONTENTLANGUAGE}})",
        "preferences": "Preferences",
        "preferences-summary": "",
        "listgrants-summary": "The following is a list of grants with their associated access to user rights. Users can authorize applications to use their account, but with limited permissions based on the grants the user gave to the application. An application acting on behalf of a user cannot actually use rights that the user does not have however.\nThere may be [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] about individual rights.",
        "listgrants-grant": "Grant",
        "listgrants-rights": "Rights",
+       "listgrants-grant-display": "$1 <code>($2)</code>",
        "trackingcategories": "Tracking categories",
        "trackingcategories-summary": "This page lists tracking categories which are automatically populated by the MediaWiki software. Their names can be changed by altering the relevant system messages in the {{ns:8}} namespace.",
        "trackingcategories-msg": "Tracking category",
        "mw-widgets-dateinput-no-date": "No date selected",
        "mw-widgets-dateinput-placeholder-day": "YYYY-MM-DD",
        "mw-widgets-dateinput-placeholder-month": "YYYY-MM",
+       "mw-widgets-mediasearch-input-placeholder": "Search for media",
+       "mw-widgets-mediasearch-noresults": "No results found.",
        "mw-widgets-titleinput-description-new-page": "page does not exist yet",
        "mw-widgets-titleinput-description-redirect": "redirect to $1",
        "mw-widgets-categoryselector-add-category-placeholder": "Add a category...",
index 116fdbe..6b8740b 100644 (file)
        "pageinfo-redirects-name": "Número de redirecciones a esta página",
        "pageinfo-redirects-value": "$1",
        "pageinfo-subpages-name": "Subpáginas de esta página",
-       "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|redirección|redirecciones}}; $3 {{PLURAL:$3|no-redirección|no-redirecciones}})",
+       "pageinfo-subpages-value": "$1 ($2 {{PLURAL:$2|redirección|redirecciones}}; $3 {{PLURAL:$3|no redirección|no redirecciones}})",
        "pageinfo-firstuser": "Creador de la página",
        "pageinfo-firsttime": "Fecha de creación de la página",
        "pageinfo-lastuser": "Último editor",
index 6699cc8..35a399d 100644 (file)
        "activeusers-intro": "See on loetelu kasutajatest, kes on viimase $1 {{PLURAL:$1|päev|päeva}} jooksul midagi teinud.",
        "activeusers-count": "$1 {{PLURAL:$1|toiming|toimingut}} viimase {{PLURAL:$3|päeva|$3 päeva}} jooksul",
        "activeusers-from": "Näita kasutajaid alates:",
+       "activeusers-groups": "Kuva kasutajad, kes kuuluvad järgmistesse rühmadesse:",
        "activeusers-noresult": "Kasutajaid ei leidunud.",
        "activeusers-submit": "Kuva aktiivsed kasutajad",
        "listgrouprights": "Kasutajarühma õigused",
        "mw-widgets-titleinput-description-redirect": "ümbersuunamine leheküljele \"$1\"",
        "randomrootpage": "Juhuslik juurlehekülg",
        "log-action-filter-block": "Blokeeringu tüüp:",
+       "log-action-filter-contentmodel": "Sisumudeli muudatuse tüüp:",
        "log-action-filter-delete": "Kustutamise tüüp:",
+       "log-action-filter-import": "Impordi tüüp:",
+       "log-action-filter-managetags": "Märgiste haldamistegevuse tüüp:",
+       "log-action-filter-move": "Teisaldamise tüüp:",
+       "log-action-filter-newusers": "Konto loomise tüüp:",
+       "log-action-filter-patrol": "Kontrolli tüüp:",
+       "log-action-filter-protect": "Kaitsmise tüüp:",
+       "log-action-filter-rights": "Õiguste muudatuse tüüp:",
+       "log-action-filter-upload": "Üleslaadimise tüüp:",
        "log-action-filter-all": "Kõik",
        "log-action-filter-block-block": "Blokeerimine",
        "log-action-filter-block-reblock": "Blokeeringu muutmine",
        "log-action-filter-block-unblock": "Blokeeringu tühistamine",
+       "log-action-filter-contentmodel-change": "Sisumudeli muudatus",
+       "log-action-filter-contentmodel-new": "Ebastandardse sisumudeliga lehekülje loomine",
        "log-action-filter-delete-delete": "Lehekülje kustutamine",
        "log-action-filter-delete-restore": "Lehekülje taastamine",
        "log-action-filter-delete-event": "Logi kustutamine",
        "log-action-filter-delete-revision": "Redaktsiooni kustutamine",
+       "log-action-filter-import-interwiki": "Vikidevaheline import",
+       "log-action-filter-import-upload": "XML-faili üleslaadimisega import",
+       "log-action-filter-managetags-create": "Märgise koostamine",
+       "log-action-filter-managetags-delete": "Märgise kustutamine",
+       "log-action-filter-managetags-activate": "Märgise lubamine",
+       "log-action-filter-managetags-deactivate": "Märgise keelamine",
+       "log-action-filter-move-move": "Teisaldamine ümbersuunamise ülekirjutamiseta",
+       "log-action-filter-move-move_redir": "Teisaldamine ümbersuunamise ülekirjutamisega",
+       "log-action-filter-newusers-create": "Loonud anonüümne kasutaja",
+       "log-action-filter-newusers-create2": "Loonud registreeritud kasutaja",
+       "log-action-filter-newusers-autocreate": "Loodud automaatselt",
+       "log-action-filter-newusers-byemail": "Loodud e-kirjatsi saadetud parooliga",
+       "log-action-filter-patrol-patrol": "Kontrollitud käsitsi",
+       "log-action-filter-patrol-autopatrol": "Kontrollitud automaatselt",
+       "log-action-filter-protect-protect": "Kaitsmine",
+       "log-action-filter-protect-modify": "Kaitse muutmine",
+       "log-action-filter-protect-unprotect": "Kaitse eemaldamine",
+       "log-action-filter-protect-move_prot": "Kaitse teisaldamine",
+       "log-action-filter-rights-rights": "Muudetud käsitsi",
+       "log-action-filter-rights-autopromote": "Muudetud automaatselt",
+       "log-action-filter-upload-upload": "Uus üleslaadimine",
+       "log-action-filter-upload-overwrite": "Uuesti üleslaadimine",
        "authmanager-provider-password": "Paroolipõhine autentimine",
        "authmanager-provider-password-domain": "Parooli- ja domeenipõhine autentimine",
        "authmanager-provider-temporarypassword": "Ajutine parool",
index 8cf7922..0ebbd47 100644 (file)
        "userrights-reason": "Syy:",
        "userrights-no-interwiki": "Sinulla ei ole oikeutta muokata käyttöoikeuksia muissa wikeissä.",
        "userrights-nodatabase": "Tietokantaa $1 ei ole tai se ei ole paikallinen.",
-       "userrights-nologin": "Sinun täytyy [[Special:UserLogin|kirjautua sisään]] ylläpitäjän tunnuksella, jotta voisit muuttaa käyttöoikeuksia.",
-       "userrights-notallowed": "Sinulla ei ole oikeutta lisätä tai poistaa käyttäjien oikeuksia.",
        "userrights-changeable-col": "Ryhmät, joita voit muuttaa",
        "userrights-unchangeable-col": "Ryhmät, joita et voi muuttaa",
        "userrights-conflict": "Päällekkäinen käyttöoikeuksien muutos! Tarkista tekemäsi muutokset ja vahvista ne.",
-       "userrights-removed-self": "Poistit omat oikeutesi. Tämän vuoksi sinulla ei enää ole oikeutta päästä tälle sivulle.",
        "group": "Ryhmä",
        "group-user": "käyttäjät",
        "group-autoconfirmed": "automaattisesti hyväksytyt käyttäjät",
        "apisandbox-alert-field": "Tässä kentässä oleva arvo ei ole kelvollinen.",
        "apisandbox-continue": "Jatka",
        "apisandbox-continue-clear": "Tyhjennä",
+       "apisandbox-multivalue-all-namespaces": "$1 (Kaikki nimiavaruudet)",
+       "apisandbox-multivalue-all-values": "$1 (Kaikki arvot)",
        "booksources": "Kirjalähteet",
        "booksources-search-legend": "Etsi kirjalähteitä",
        "booksources-isbn": "ISBN",
        "changecontentmodel-legend": "Muuta sisältömallia",
        "changecontentmodel-title-label": "Sivun otsikko",
        "changecontentmodel-model-label": "Uusi sisältömalli",
-       "changecontentmodel-reason-label": "Syy:",
+       "changecontentmodel-reason-label": "Syy",
        "changecontentmodel-submit": "Tee muutos",
        "changecontentmodel-success-title": "Sisältömallia on muutettu",
        "changecontentmodel-success-text": "Sisältötyyppiä kohteessa [[:$1]] on muutettu.",
        "mw-widgets-dateinput-placeholder-month": "VVVV-KK",
        "mw-widgets-titleinput-description-new-page": "sivua ei ole olemassa vielä",
        "mw-widgets-titleinput-description-redirect": "ohjaus kohteeseen $1",
+       "mw-widgets-categoryselector-add-category-placeholder": "Lisää luokka...",
        "sessionmanager-tie": "!!FYZZ!!Cannot combine multiple request authentication types: $1.",
        "sessionprovider-generic": "$1 istuntoa",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "istuntoja, joissa on evästeet käytössä",
        "unlinkaccounts-success": "Tunnuksen linkitys poistettiin.",
        "authenticationdatachange-ignored": "Varmennustietojen muutosta ei käsitelty. Ehkä palveluntarjoajaa ei määritelty?",
        "restrictionsfield-badip": "Virheellinen IP-osoite tai alue: $1",
-       "restrictionsfield-label": "Sallitut IP-alueet:",
-       "edit-error-short": "$1",
-       "edit-error-long": "Virheet:\n\n$1"
+       "restrictionsfield-label": "Sallitut IP-alueet:"
 }
index 6b12c2d..5423d90 100644 (file)
        "revdelete-uname-unhid": "nom d'utilisateur affiché",
        "revdelete-restricted": "restrictions appliquées aux administrateurs",
        "revdelete-unrestricted": "restrictions retirées pour les administrateurs",
-       "logentry-block-block": "$1 {{GENDER:$2|a bloqué}} {{GENDER:$4|$3}} $5 $6",
+       "logentry-block-block": "$1 {{GENDER:$2|a bloqué}} {{GENDER:$4|$3}} avec la durée $5 $6",
        "logentry-block-unblock": "$1 {{GENDER:$2|a débloqué}} {{GENDER:$4|$3}}",
-       "logentry-block-reblock": "$1 {{GENDER:$2|a modifié}} les paramètres de blocage pour {{GENDER:$4|$3}} $5 $6",
-       "logentry-suppress-block": "$1 {{GENDER:$2|a bloqué}} {{GENDER:$4|$3}} $5 $6",
+       "logentry-block-reblock": "$1 {{GENDER:$2|a modifié}} les paramètres de blocage pour {{GENDER:$4|$3}} avec une durée de $5 $6",
+       "logentry-suppress-block": "$1 {{GENDER:$2|a bloqué}} {{GENDER:$4|$3}} avec une durée de $5 $6",
        "logentry-suppress-reblock": "$1 {{GENDER:$2|a modifié}} les paramètres de blocage pour {{GENDER:$4|$3}} avec une durée de $5 $6",
        "logentry-import-upload": "$1 {{GENDER:$2|a importé}} $3 par téléchargement de fichier",
        "logentry-import-upload-details": "$1 {{GENDER:$2|a importé}} $3 par téléchargement de fichier ($4 {{PLURAL:$4|révision|révisions}})",
index ea3fd1e..a4120c9 100644 (file)
        "cannotdelete": "Չհաջողվեց ջնջել «$1» էջը կամ ֆայլը։\nՀավանաբար այն արդեն ջնջվել է մեկ այլ մասնակցի կողմից։",
        "cannotdelete-title": "Հնարավոր չէ ջնջել $1 էջը",
        "delete-hook-aborted": "Խմբագրել չեղյալ է.\nԼրացուցիչ պարզաբանումներ չի դրվել.",
-       "no-null-revision": "Չի հաջողվել ստեղծել նոր զրոյական правку համար էջը \"$1\"",
+       "no-null-revision": "Չի հաջողվել ստեղծել նոր զրոյական խմբագրում էջի համար \"$1\"",
        "badtitle": "Անընդունելի անվանում",
        "badtitletext": "Հարցված էջի անվանումը անընդունելի է, դատարկ է կամ սխալ միջ-լեզվական կամ ինտերվիքի անվանում է։ Հնարավոր է, որ այն պարունակում է անթույլատրելի սիմվոլներ։",
        "title-invalid-empty": "Էջի հայցվող վերնագիրը դատարկ է կամ պարունակում է միայն անվանատարածքի անունը։",
index 06058b7..724e86f 100644 (file)
        "views": "Visite",
        "toolbox": "Strumenti",
        "tool-link-userrights": "Modifica gruppi {{GENDER:$1|utente}}",
+       "tool-link-userrights-readonly": "Visualizza gruppi {{GENDER:$1|utente}}",
        "tool-link-emailuser": "Invia una email a questo {{GENDER:$1|utente}}",
        "userpage": "Visualizza la pagina utente",
        "projectpage": "Visualizza la pagina di servizio",
        "prefs-help-recentchangescount": "Comprende ultime modifiche, cronologie e registri.",
        "prefs-help-watchlist-token2": "Questa è la chiave segreta per il feed web dei tuoi osservati speciali.\nChiunque la conosce sarà in grado di leggere i tuoi osservati speciali, per cui non condividerla. [[Special:ResetTokens|Clicca qui se hai bisogno di reimpostarla]].",
        "savedprefs": "Le preferenze sono state salvate.",
-       "savedrights": "I diritti utente di {{GENDER:$1|$1}} sono stati salvati.",
+       "savedrights": "I gruppi utente di {{GENDER:$1|$1}} sono stati salvati.",
        "timezonelegend": "Fuso orario:",
        "localtime": "Ora locale:",
        "timezoneuseserverdefault": "Usa ora predefinita del wiki ($1)",
        "prefswarning-warning": "Hai fatto modifiche alle tue preferenze che non sono state ancora salvate.\nSe esci da questa pagina senza cliccare \"$1\" le preferenze non verranno aggiornate.",
        "prefs-tabs-navigation-hint": "Suggerimento: è possibile utilizzare i tasti freccia sinistra e destra per spostarsi tra le schede nell'elenco delle schede.",
        "userrights": "Gestione dei permessi degli utenti",
-       "userrights-lookup-user": "Gestione dei gruppi utente",
+       "userrights-lookup-user": "Seleziona un utente",
        "userrights-user-editname": "Inserire il nome utente:",
-       "editusergroup": "Modifica gruppi {{GENDER:$1|utente}}",
+       "editusergroup": "Modifica gruppi utente",
        "editinguser": "Modifica in corso dei diritti dell'{{GENDER:$1|utente}} <strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "Modifica gruppi utente",
        "saveusergroups": "Salva gruppi {{GENDER:$1|utente}}",
index 28e84bc..590caf6 100644 (file)
        "passwordreset-emaildisabled": "E-mail мүмкіндігі бұл уикиде өшірілген.",
        "passwordreset-username": "Қатысушы аты:",
        "passwordreset-domain": "Домен:",
-       "passwordreset-capture": "Келген хатты қарау керек пе?",
-       "passwordreset-capture-help": "Егер Сіз берілген белгішені қондырсаңыз, қатысушыға жіберілетін уақытша құпия сөз жазылған хат көрсетіледі.",
        "passwordreset-email": "Е-поштаның мекен-жайы:",
        "passwordreset-emailtitle": "{{SITENAME}} тіркелгісі туралы анықтама",
        "passwordreset-emailtext-ip": "Әлде кім (мүмкін сіз болуыңыз, $1 IP адресінен) {{SITENAME}} сайтында ($4) құпия сөзді өзгертуге өтініш білдірді. Мына қатысушы {{PLURAL:$3|аккаунты|аккаунттары}} осы электронды почта қатысты:\n\n$2\n\n{{PLURAL:$3|Бұл уақытша құпия сөз|Бұл уақытша құпия сөздер}} {{PLURAL:$5|бір күнде|$5 күнде}}уақыты аяқталады.\nСіз кіруіңіз және жаңа құпия сөзді таңдауыңыз керек. Егер бұл өтінішті басқа біреу жасаса, немесе сіз  бұрынғы құпия сөзіңізді еске түсірсеңіз және құпия сөзді ауыстыруды қаламасаңыз, сіз бұл хабарламаны ескермей және бұрынғы құпия сөзді қолдана беруіңізге болады.",
        "passwordreset-emailtext-user": "$1 есімді қатысушы {{SITENAME}} сайтында ($4) құпия сөзді өзгертуге өтініш білдірді. Мына қатысушы {{PLURAL:$3|аккаунт|аккаунттар}} осы електронды почта қатысты:\n\n$2\n\n{{PLURAL:$3|Бұл уақытша құпия сөз|Бұл уақытша құпия сөздер}} {{PLURAL:$5|бір күнде|$5 күнде}}уақыты аяқталады.\nСіз кіруіңіз және жаңа құпия сөзді таңдауыңыз керек. Егер бұл өтінішті басқа біреу жасаса, немесе сіз  бұрынғы құпия сөзіңізді еске түсірсеңіз, және құпия сөзді ауыстыруды қаламасаңыз, сіз бұл хабарламаны ескермей және бұрыңғы құпия сөзді қолдана беруіңізге болады.",
        "passwordreset-emailelement": "Қатысушы есімі: \n$1\n\nУақытша құпия сөз: \n$2",
        "passwordreset-emailsentemail": "Бұл email мекенжайы тіркелгіңізге байланысқан, сол себепті құпия сөзді өзгерту электронды пошта арқылы жөнелтіледі.",
-       "passwordreset-emailsent-capture2": "{{PLURAL:$1|email has|emails have}}үшін құпия сөздің қалпына келтіру хабарламасы жіберілді. {{PLURAL:$1|username and password|list of usernames and passwords}} мында көрсетілген.",
-       "passwordreset-emailerror-capture2": "{{GENDER:$2|user}}-мен электронды поштамен хабарласу нәтижесіз қалды: $1 The {{PLURAL:$3|username and password|list of usernames and passwords}} мында көрсетілген.",
        "changeemail": "Е-пошта мекенжайын өзгерту немесе аластау",
        "changeemail-header": "Е-пошта мекен-жайының өзгертілуі",
        "changeemail-no-info": "Бұл бетке тікелей ену үшін жүйеге кіруіңіз керек.",
        "userrights-reason": "Себебі:",
        "userrights-no-interwiki": "Басқа уикилердегі қатысушы құқықтарын өңдеуге рұқсатыңыз жоқ.",
        "userrights-nodatabase": "$1 дерекқоры жоқ не жергілікті емес.",
-       "userrights-nologin": "Қатысушы құқықтарын тағайындау үшін әкімші тіркелгісімен [[Special:UserLogin|кіруіңіз]] жөн.",
-       "userrights-notallowed": "Сізге қатысушы құқықтарын қосуға немесе алып тастауға рұқсат берілмеген.",
        "userrights-changeable-col": "Өзгерте алатын топтар",
        "userrights-unchangeable-col": "Өзгерте алмайтын топтар",
        "userrights-conflict": "Қатысушы құқықтарының қақтығысы! Өзгертулеріңізді қайта қарап шығыңыз және құптаңыз.",
-       "userrights-removed-self": "Өзіңіздің құқықтарыңызды алып тастадыңыз.  Осылайша бұл бетке бұдан былай қатынай алмайсыз.",
        "group": "Топ:",
        "group-user": "Қатысушылар",
        "group-autoconfirmed": "Өздіктіқұпталған қатысушылар",
        "right-siteadmin": "Дерекқорды құлыптау және құлыптауын өшіру",
        "right-override-export-depth": "Тереңдігі 5-тен жоғары сілтенген бетттерді қамти беттерді экспорттау",
        "right-sendemail": "Басқа қатысушыларға е-пошта жіберу",
-       "right-passwordreset": "Өзгерген құпия сөз арқылы хабарламаларды шолу",
        "right-managechangetags": "[[Special:Tags|Тегтерді]] дерекқордан бастау және жою",
        "right-applychangetags": "[[Special:Tags|Тегтерді]] бір өзгерісімен қолдану",
        "right-changetags": "Кез келген [[Special:Tags|тегті]] жеке нұсқалардан және журнал жазбаларынан аластау және қосу",
        "trackingcategories-msg": "Санатты қадағалау",
        "trackingcategories-name": "Хабарлама атауы",
        "trackingcategories-desc": "Санаттарды қосу шарттары",
-       "restricted-displaytitle-ignored": "Еленбеген көретілетін атауларымен беттер",
+       "restricted-displaytitle-ignored": "Еленбеген көрcетілетін атауларымен беттер",
        "noindex-category-desc": "Бұл бет роботтар арқылы индекстелмеген, себебі онда <code><nowiki>__NOINDEX__</nowiki></code> деген сиқырлы сөзі бар және бұл жалауша рұқсат етілген есім кеңістігінде орналасқан.",
        "index-category-desc": "Бұл бетте <code><nowiki>__INDEX__</nowiki></code> деген код бар (және бұл жалауша рұқсат етілген есім кеңістігінде орналасқан), демек мұнда қалыпты жағдайда роботтар арқылы индекстелмейді.",
        "post-expand-template-inclusion-category-desc": "Беттің мөлшері барлық үлгілерді кеңейткен соң мынадан <code>$wgMaxArticleSize</code> үлкенірек болады, сондықтан біраз үлгілер кеңейтілмейді.",
index 6f63ee0..98b103f 100644 (file)
        "prefswarning-warning": "사용자 환경 설정에서 바뀐 것이 아직 저장되어 있지 않습니다.\n사용자 환경 설정에서 \"$1\"을 클릭하지 않고 이 페이지를 떠나면 바뀌지 않습니다.",
        "prefs-tabs-navigation-hint": "팁: 탭 목록에서 탭 사이를 둘러보려면 왼쪽과 오른쪽 화살표 키를 사용할 수 있습니다.",
        "userrights": "사용자 권한 관리",
-       "userrights-lookup-user": "사용자 권한 관리",
+       "userrights-lookup-user": "사용자 선택",
        "userrights-user-editname": "사용자 이름 입력:",
        "editusergroup": "사용자 그룹 불러오기",
        "editinguser": "<strong>[[User:$1|$1]]</strong> $2 {{GENDER:$1|사용자}}의 권한 바꾸기",
        "activeusers-count": "마지막 {{PLURAL:$3|$3일}} 사이의 {{PLURAL:$1|활동}} $1회",
        "activeusers-from": "다음으로 시작하는 사용자를 보기:",
        "activeusers-groups": "그룹에 속한 사용자 표시:",
+       "activeusers-excludegroups": "그룹에 속한 사용자 제외:",
        "activeusers-noresult": "사용자를 찾을 수 없습니다.",
        "activeusers-submit": "활동하고 있는 사용자 보이기",
        "listgrouprights": "사용자 권한 목록",
index ddc46f0..1596eb6 100644 (file)
        "namespaces": "नामविश्वे",
        "variants": "चले(व्हेरियंट्स)",
        "navigation-heading": "दिक्चालन यादी",
-       "errorpagetitle": "à¤\9aà¥\82à¤\95",
+       "errorpagetitle": "तà¥\8dरà¥\81à¤\9fà¥\80",
        "returnto": "$1 कडे परत चला.",
        "tagline": "{{SITENAME}} कडून",
        "help": "साहाय्य",
        "passwordreset-emaildisabled": "या विकिवर विपत्र पाठविणे 'अशक्य' करण्यात आलेले आहे.",
        "passwordreset-username": "सदस्यनाव:",
        "passwordreset-domain": "डोमेन",
-       "passwordreset-capture": "ईमेल कशी असेल ते बघायचेय ?",
-       "passwordreset-capture-help": "या चौकटीत खूण केली तर, ईमेल (तात्पुरत्या परवलीच्या शब्दासह) दाखविण्यात व सदस्यास पाठविण्यात येईल.",
        "passwordreset-email": "विपत्र पत्ता",
        "passwordreset-emailtitle": "{{SITENAME}} वरील खात्याची माहिती",
        "passwordreset-emailtext-ip": "कुणीतरी (कदाचित तुम्ही, अंकपत्ता $1 वरुन) {{SITENAME}}($4) करिता नविन 'परवलीचा शब्द' पुनर्स्थापनेबद्दल विनंती केली आहे.\nखालील{{PLURAL:$3|सदस्यखाते}}या विपत्रपत्त्याशी निगडीत आहे: \n\"$2\"\n{{PLURAL:$3|हा तात्पुरता परवलीचा शब्द|हे तात्पुरते परवलीचे शब्द}}{{PLURAL:$5|एक दिवस|$5 दिवसात}} मुदतबाह्य होतील.आता आपण लॉग-ईन करून  नविन परवलीचा शब्द निवडा.जर ईतर कोणी ही विनंती केली असेल,किंवा जर आपणास परवलीच शब्द आठवला असेल तर,व जर आपण तो बदलु इच्छित नसाल तर आपण हा संदेश टाळा व आपला जुना परवलीचा शब्द वापरणे सुरू ठेवा.",
        "userrights-reason": "कारण:",
        "userrights-no-interwiki": "इतर विकींवरचे सदस्य अधिकार बदलण्याची परवानगी तुम्हाला नाही.",
        "userrights-nodatabase": "विदा $1 अस्तित्वात नाही अथवा स्थानिक नाही.",
-       "userrights-nologin": "सदस्य अधिकार देण्यासाठी तुम्ही प्रबंधक म्हणून [[Special:UserLogin|सनोंद प्रवेशित]] असणे आवश्यक आहे.",
-       "userrights-notallowed": "तुमच्या सदस्य खात्यास, सदस्य अधिकारांची निश्चिती करण्याची परवानगी नाही.",
        "userrights-changeable-col": "गट जे तुम्ही बदलू शकता",
        "userrights-unchangeable-col": "गट जे तुम्ही बदलू शकत नाही",
        "userrights-conflict": "बदलाबाबत सदस्य-हक्क विसंवाद !कृपया आपले बदल पुन्हा पुनरावलोकित व नक्की करा.",
-       "userrights-removed-self": "आपण आपले हक्क यशस्वीरित्या काढलेत.म्हणुन, या पानात आपण दाखल होऊ शकणार नाही.",
        "group": "गट:",
        "group-user": "सदस्य",
        "group-autoconfirmed": "स्वयंशाबीत सदस्य",
        "right-siteadmin": "माहितीसाठ्याला कुलूप लावा अथवा काढा",
        "right-override-export-depth": "जोडलेल्या पानांचा पाचव्या पातळीपर्यंत अंतर्भाव करुन पाने निर्यात करा",
        "right-sendemail": "इतर सदस्यांना विपत्रे पाठवा",
-       "right-passwordreset": "परवलीचा शब्द पुनर्स्थापित केल्याचे विपत्र पहा.",
        "right-managechangetags": "डाटाबेस मधून [[Special:Tags|खूणपताका]] तयार करा किंवा  वगळा",
        "right-applychangetags": "कोणाच्याही बदलास [[Special:Tags|खूणपताका]] जोडा",
        "right-changetags": "वैयक्तिक आवृत्त्यांना व नोंद प्रवेष्ट्यांना, आहेतुक(arbitrary) [[Special:Tags|खूणपताका]] जोडा अथवा हटवा",
        "listgrants": "अनुदाने",
        "listgrants-grant": "अनुदान",
        "listgrants-rights": "अधिकार",
-       "trackingcategories": "वरà¥\8dà¤\97 à¤¶à¥\8bधत à¤\86हà¥\8bत",
+       "trackingcategories": "माà¤\97à¥\8bवा à¤\98à¥\87णारà¥\87 à¤µà¤°à¥\8dà¤\97",
        "trackingcategories-summary": "या पानात ते रेखापथनातील वर्ग(tracking categories) आहेत, जे, मिडियाविकि संचेतनाद्वारे स्वयंचलितरित्या वसविण्यात (तयार करण्यात) आले आहेत. त्यांची नावे, {{ns:8}} नामविश्वातील संबंधित प्रणाली संदेशात फेरफार करुन, बदलविता येतात.",
+       "trackingcategories-msg": "मागोवा घेणारा वर्ग",
        "trackingcategories-name": "संदेश नाम",
        "trackingcategories-desc": "वर्ग अंतर्भूत करण्याचे निकष",
        "trackingcategories-nodesc": "वर्णन उपलब्ध नाही.",
        "randomrootpage": "अविशिष्ट मूळ पान",
        "log-action-filter-suppress-block": "रोधामार्फत सदस्य दाबणे",
        "changecredentials": "अधिकारपत्रे (क्रेडेंटियल्स)बदला",
-       "removecredentials": "अधिकारपत्रे (क्रेडेंटियल्स) हटवा",
-       "edit-error-short": "त्रुटी: $1",
-       "edit-error-long": "त्रुटी:$1"
+       "removecredentials": "अधिकारपत्रे (क्रेडेंटियल्स) हटवा"
 }
index e61e6d7..10bdd34 100644 (file)
@@ -53,7 +53,7 @@
        "editfont-serif": "Serif machiyōtlahtōliztli",
        "sunday": "Īccemilhuitl",
        "monday": "Īcōmilhuitl",
-       "tuesday": "Īcyēyilhuitl",
+       "tuesday": "Icyeyilhuitl",
        "wednesday": "Īcnāhuilhuitl",
        "thursday": "Īcmācuīlilhuitl",
        "friday": "Īcchicuacemilhuitl",
        "november-date": "Īcmahtlactlioncēmētztli $1",
        "december-date": "Īcmahtlactliomōmemētztli $1",
        "pagecategories": "{{PLURAL:$1|Neneuhcayotl|Neneuhcayomeh}}",
-       "category_header": "Tlâkuilòlpiltin ìpan tlaìxmatkàtlàlilòtl \"$1\"",
-       "subcategories": "Tlaìxmatkàtlàlilòpilòmë",
+       "category_header": "Tlahcuiloltin ipan neneuhcayotl \"$1\"",
+       "subcategories": "Tlani-neneuhcayotl",
        "category-media-header": "Media \"$1\" neneuhcāyōc",
        "category-empty": "''Cah ahtlein inīn neneuhcāyōc.''",
-       "hidden-categories": "{{PLURAL:$1|tlatlàtìlli tlaìxmatkàyòtlàlilòtl|tlatlàtìltìn tlaìxmatkàyòtlàlilòme}}",
+       "hidden-categories": "{{PLURAL:$1|tlatlatilli neneuhcayotl|tlatlatiltin neneuhcayomeh}}",
        "hidden-category-category": "Tlatlàtìlkàtlaìxmatkàtlàlilòmë",
        "category-subcat-count": "{{PLURAL:$2|Inin neneuhcayotl zan quipiya in tetoquilli tlani-neneuhcayotl.|Inn neneuhcayotl {{PLURAL:$1|quipiya intetoquilli tlani-neneuhcayotl|in tetoquiltin $1 tlani-neneuhcayomeh}}, itech tlacecempohualoni $2.}}",
        "category-subcat-count-limited": "Inīn {{PLURAL:$1|neneuhcāyōtzintli cah|$1 neneuhcāyōtzintli cateh}} inīn neneuhcāyōc.",
        "searchbutton": "Tlatemoliztli",
        "go": "Xiyauh",
        "searcharticle": "Xiyauh",
-       "history": "Tlaīxtli ītlahtōllo",
+       "history": "Tlahtollotl",
        "history_short": "Tlahtollotl",
        "updatedmarker": "ōmoyancuīx īhuīcpa xōcoyōc notlahpololiz",
        "printableversion": "Tepoztlahcuilolli",
        "protectthispage": "Xicpiya inīn tlaīxtli",
        "unprotect": "Xicpatla in tlapiyaliztli",
        "unprotectthispage": "Xicpatla inīn tlaīxtli ītlapiyaliz",
-       "newpage": "Yancuic tlaīxtli",
+       "newpage": "Yancuic tlahcuilolli",
        "talkpage": "Xictlahto inīn tlaīxtli ītechcopa",
        "talkpagelinktext": "Teixnamiquiliztli",
        "specialpage": "Nònkuâkìskàtlaìxtlapalli",
        "copyright": "In tlahcuilōlli cah tlacēcencāhuani īpan $1 tel ahmo intlā īcuepca motēnēhua.",
        "copyrightpage": "{{ns:project}}:Tlachīhualōni ītlapiyaliz",
        "currentevents": "Axcancayotl",
-       "currentevents-url": "Project:Āxcāncāyōtl",
+       "currentevents-url": "Project:Axcancayotl",
        "disclaimers": "tlamamalquixtiliztli",
-       "edithelp": "Tlapatlaliztechcopa tēpalēhuiliztli",
+       "edithelp": "Tepalehuiliztli ica tlapatlaliztli",
        "helppage-top-gethelp": "Tēpalēhuiliztli",
        "mainpage": "Yacatlahcuilolli",
        "mainpage-description": "Yacatlahcuilolli",
        "site-rss-feed": "$1 RSS huelītiliztli",
        "site-atom-feed": "$1 Atom huelītiliztli",
        "page-rss-feed": "\"$1\" RSS huelītiliztli",
-       "page-atom-feed": "\"$1\" RSS huelītiliztli",
+       "page-atom-feed": "\"$1\" RSS huelitiliztli",
        "red-link-title": "$1 (ahmo oncah tlahcuilolli)",
        "nstab-main": "Tlahcuilolli-amatl",
        "nstab-user": "Tlatequitiltilīlli",
        "cannotdelete": "Ahmō ōhuelītic mopoloa in zāzanilli \"$1\".\nHueli tlein āquin ōquipolo achtopa.",
        "badtitle": "Ahcualli tōcāitl",
        "badtitletext": "Zāzanilli ticnequi in ītōca cah ahcualli, ahtlein quipiya nozo ahcualtzonhuiliztli interwiki tōcāhuicpa.\nHueliz quimpiya tlahtōl tlein ahmo mohuelītih motequitiltia tōcāpan.",
-       "viewsource": "Xiquitta mēyalli",
+       "viewsource": "Xiquitta meyalli",
        "viewsource-title": "Xiquitta in $1 īmēyal",
        "actionthrottled": "Tlachīhualiztli ōmotzacuili",
        "viewsourcetext": "Tihuelīti tiquittaz auh ticcopīnaz inīn zāzanilli īmachiyōnecaquilizmēyal.",
        "logout": "Xiquīza",
        "userlogout": "Xiquīza",
        "notloggedin": "Ahmō ōtimocalac",
-       "userlogin-noaccount": "Cuix ahmō titlapōhualeh?",
+       "userlogin-noaccount": "Cuix ahmo titlapohualeh?",
        "nologin": "Cuix ahmō titlapōhualeh? $1.",
        "nologinlink": "Xicchīhua cē tlapōhualli",
        "createaccount": "Xicchīhua tlapōhualli",
        "summary": "Mopatlaliz:",
        "subject": "Ītechpa:",
        "minoredit": "Ca tepitōn inīn tlapatlaliztli",
-       "watchthis": "Xicpiya inīn tlaīxtli",
+       "watchthis": "Tictlachiyaz inin tlahcuilolli",
        "savearticle": "Xicpiya tlahcuilolli",
        "preview": "Xiquitta achtochīhualiztli",
        "showpreview": "Xiquitta achtochīhualiztli",
-       "showdiff": "Xicnēxti tlapatlaliztli",
+       "showdiff": "Monextiz tlapatlaliztli",
        "missingcommenttext": "Timitztlātlauhtiah xitlanitlahcuiloa.",
        "summary-preview": "Tlahcuilōltōn achtochīhualiztli:",
        "blockedtitle": "Ōmotzacuili tlatequitiltilīlli",
        "accmailtext": "Ōquiyōcox zāzochtacātlahtōlli in [[User talk:$1|$1]] auh ōmoquitītlan īhuīc $2. Tihueliti ticpatlaz īpan ''[[Special:ChangePassword|Ticpatlaz in ]]'' in ōticalaco achtopa.",
        "newarticle": "(Yancuic)",
        "newarticletext": "Ōtictocac cētiliztli cē zāzanilhuīc oc ahmo ia. Intlā quiēlēhuia quichīhua, xitlahcuiloa niman (nō xiquitta [$1 tēpalēhuiliztli zāzanilli] huehca ōmpa tlapatlaliztli). Intlā ahmo, yāuh achtopa zāzanilli.",
-       "noarticletext": "In āxcān, ahmō onca tlahcuilōlli inīn zāzanilpan.\nTihuelīti [[Special:Search/{{PAGENAME}}|tictēmōz inīn zāzanilli ītōca]] occequīntīn zāzanilpan,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} xictēmoa īpan in tlapōhualāmatechpa],\nahnozo [{{fullurl:{{FULLPAGENAME}}|action=edit}} xichīhua inīn zāzanilli]</span>.",
+       "noarticletext": "In axcan, ahmo oncah tlahcuilolli ipan inin amatl.\nTihueliti [[Special:Search/{{PAGENAME}}|tictemoz inin tlahcuilolli itoca]] occequintin tlahcuilolli,\n<span class=\"plainlinks\">[{{fullurl:{{#Special:Log}}|page={{FULLPAGENAMEE}}}} xictemoa ipan in occe tlahcuilolmachiyotl],\nahnozo [{{fullurl:{{FULLPAGENAME}}|action=edit}} xichihua inin tlahcuilolli]</span>.",
        "userpage-userdoesnotexist": "Ahmo ia cuentah \"<nowiki>$1</nowiki>\" ītōca. Timitztlātlauhtiah xitēchquinōtza intlā ticchīhuāz intlā nozo ticpatlāz inīn zāzanilli.",
        "usercsspreview": "'''Ca inīn moachtochīhualiz ītechcopa moCSS.'''\n'''¡Ahmo ōmochīuh nozan!'''",
        "userjspreview": "'''Ca inīn moachtochīhualiz ītechcopa moJavaScript.'''\n'''¡Ahmo ōmochīuh nozan!'''",
        "templatesusedpreview": "{{PLURAL:$1|Nemachiòtl tlèn motekìuhtia|Nemachiòmë tlèn mokìntekìuhtiä}} ìpan inìn achtochìwalistli:",
        "templatesusedsection": "{{PLURAL:$1|Nemachiòtl tlèn motekìuhtia|Nemachiòmë tlèn mokìntekìuhtiä}} ìpan inìn tlaxélòlistli:",
        "template-protected": "(ōmoquīxti)",
-       "hiddencategories": "Inīn zāzanilli mopiya {{PLURAL:$1|1 neneuhcāyōc ōmotlāti|$1 neneuhcāyōc ōmotlāti}}:",
+       "hiddencategories": "Inin tlahcuilolli pohui {{PLURAL:$1|1 tlatlalilli neneuhcayotl|$1 tlatlaliltin neneuhcayomeh}}:",
        "nocreatetext": "Inīn huiqui ōquitzacuili tlahuelītiliztli ic tlachīhua yancuīc zāzaniltin. Tichuelīti ticcuepa auh ticpatla cē zāzanilli, [[Special:UserLogin|xicalaqui nozo xicchīhua cē cuentah]].",
        "nocreate-loggedin": "Ahmo tihuelīti tiquinchīhua yancuīc zāzaniltin.",
        "permissionserrors": "Tēmācāhualiztli aiuhcāyōtl",
        "nohistory": "Nicān ahmō oncah tlaīxtlapatlaliztlahtōllōtl.",
        "currentrev": "Āxcān tlapatlaliztli",
        "currentrev-asof": "Āxcān tlachiyaliztli īpan $1",
-       "revisionasof": "Tlachiyaliztli īpan $1",
+       "revisionasof": "Tlachiyaliztli ipan $1",
        "revision-info": "Tlachiyaliztli īpan $1 īpal {{GENDER:$6|$2}}$7",
-       "previousrevision": "← Huēhueh tlapatlaliztli",
+       "previousrevision": "← Huehueh tlapatlaliztli",
        "nextrevision": "Yancuīc tlapatlaliztli →",
        "currentrevisionlink": "Āxcān tlapatlaliztli",
-       "cur": "āxcān",
+       "cur": "axcan",
        "next": "niman",
-       "last": "xōcoyōc",
+       "last": "xocoyoc",
        "page_first": "achto",
        "page_last": "xōcoyōc",
        "history-fieldset-title": "Xitlatēmo īpan tlahtōllōtl",
        "mergehistory-reason": "Tleīpampa:",
        "revertmerge": "Tiquīxipehuaz",
        "history-title": "«$1» ītlaceppahuiliztlahtōllo",
-       "lineno": "Pāntli $1:",
+       "lineno": "Pantli $1:",
        "editundo": "Ticxitiniz",
        "searchresults": "motlatemoliz itlananquilizhuan",
        "searchresults-title": "«$1» tlatemoliztli imochihualiz",
        "prevn": "{{PLURAL:$1|$1}} achtopa",
        "nextn": "niman {{PLURAL:$1|$1}}",
-       "shown-title": "Quinēxiltīz $1 {{PLURAL:$1|mochīhualiztli}} cece āmac",
+       "shown-title": "Monextiz $1 {{PLURAL:$1|mochihualiztli}} cecen amatl",
        "viewprevnext": "Xiquintta ($1 {{int:pipe-separator}} $2) ($3).",
        "searchmenu-exists": "'''Ye ia zāzanilli ītōca \"[[$1]]\" inīn huiquipan'''",
        "searchmenu-new": "<strong>Ticchīhuāz in zāzanilli «[[:$1]]» inīn huiquipan.</strong> {{PLURAL:$2|0=|Nō xiquitta in tlanāmiquiliztli in mochīhualiztli.}}",
        "searchprofile-everything": "Mochi",
        "searchprofile-advanced": "Huehca ōmpa",
        "searchprofile-articles-tooltip": "Tictēmōz īpan $1",
-       "searchprofile-images-tooltip": "Tiquintēmōz tlahcuilōlli",
+       "searchprofile-images-tooltip": "motemoz tlapiyaliztecpaliztli",
        "searchprofile-everything-tooltip": "Tictēmōz mochi tlapiyalizpan (mopiyah tēixnāmiquiliztli zāzanilli)",
        "search-result-size": "$1 ({{PLURAL:$2|1 tlahtōl|$2 tlahtōltin}})",
        "search-redirect": "(ixquichca ompa mitzhuica $1)",
        "search-section": "(tlahtōltzintli $1)",
-       "search-category": "(tlaìxmatkàyòtlàlilòtl $1)",
+       "search-category": "(neneuhcayotl $1)",
        "search-suggest": "Ahnōceh tiquihtōznequiya: $1",
        "search-interwiki-caption": "Tlachīhualiztli īcnīhuān",
        "search-interwiki-more": "(huehca ōmpa)",
        "recentchanges-legend": "Yancuīc tlapatlaliztechcopa tlanequiliztli",
        "recentchanges-summary": "Xiquinttāz in achi yancuīc ahmo occequīntīn tlapatlaliztli huiquipan inīn zāzanilpan.",
        "recentchanges-label-newpage": "Inīn tlapatlaliztli ōquiyōcox cē yancuīc āmatl",
-       "recentchanges-label-minor": "Ca tepitōn inīn tlapatlaliztli",
+       "recentchanges-label-minor": " Inin tepiton tlapatlaliztli",
+       "recentchanges-label-bot": "Inin tlapaltlaliztli oquichiuh ce robot",
        "rclistfrom": "Xiquinttāz yancuīc tlapatlaliztli īhuīcpa $3 $2",
        "rcshowhideminor": "$1 tlapatlalitzintli",
        "rcshowhideminor-show": "Ticnēxtīz",
        "rcshowhidebots": "$1 tepoztlācah",
-       "rcshowhidebots-show": "Xicnēxti",
+       "rcshowhidebots-show": "Xicnexti",
        "rcshowhidebots-hide": "Tiquihyānaz",
        "rcshowhideliu": "$1 tēmachiyōmacalli tlatequitiltilīltin",
-       "rcshowhideanons": "$1 ahtōcā tlatequitiltilīlli",
+       "rcshowhideanons": "$1 ahtocatl tequiuhqui",
        "rcshowhideanons-show": "Xicnēxti",
        "rcshowhidepatr": "$1 tlapatlaliztli mochiyahua",
-       "rcshowhidemine": "$1 notlahcuilōl",
+       "rcshowhidemine": "$1 notlahcuilol",
        "rcshowhidemine-show": "Xicnēxti",
        "rclinks": "Xiquintta xōcoyōc $1 tlapatlaliztli xōcoyōc $2 tōnalpan.<br />$3",
        "diff": "ahneneuhqui",
        "recentchangeslinked": "Tlapatlaliztli tzonhuilizpan",
        "recentchangeslinked-feed": "Tlapatlaliztli tzonhuilizpan",
        "recentchangeslinked-toolbox": "Itloc itlapatlalizhuan",
-       "recentchangeslinked-title": "Tlapatlaliztli \"$1\" ītechcopa",
+       "recentchangeslinked-title": "Tlapatlaliztli \"$1\" itechcopa",
        "recentchangeslinked-page": "Tlaīxtli ītōcā:",
        "upload": "Tlahcuilolquetzaliztli",
        "uploadbtn": "Tlahcuilōlquetza",
        "listfiles_count": "Cuepaliztli",
        "listfiles-latestversion-yes": "Quēmah",
        "listfiles-latestversion-no": "Ahmō",
-       "file-anchor-link": "Ihcuilōlli",
+       "file-anchor-link": "Tlapiyaliztecpanaliztli",
        "filehist": "Ihcuilōlli ītlahtōllo",
        "filehist-deleteall": "tiquimpolōz mochīntīn",
        "filehist-deleteone": "xicpolo",
        "listredirects": "Tlacuepaliztli",
        "unusedtemplates": "Nemachiyōtīlli ahmotequitiltiah",
        "unusedtemplateswlh": "occequīntīn tzonhuiliztli",
-       "randompage": "Centlaīxtli",
+       "randompage": "Cecen tlahcuilolli",
        "randompage-nopages": "Ahmo oncah zāzanilli īpan inīn {{PLURAL:$2|tōcāitl}}: $1.",
        "randomincategory-submit": "Yāuh",
        "randomredirect": "Zāzotlacuepaliztli",
        "nbytes": "$1 {{PLURAL:$1|byte}}",
        "ncategories": "$1 {{PLURAL:$1|tlaìxmatkàyòtlàlilòtl|tlaìxmatkàyòtlàlilòme}}",
        "nlinks": "$1 {{PLURAL:$1|tzòwilistli|tzòwilistìn}}",
-       "nmembers": "$1 {{PLURAL:$1|tlâkuilòpilli|tlâkuilòpiltìn}}",
+       "nmembers": "$1 {{PLURAL:$1|tlahcuilolli|tlahcuiloltin}}",
        "nrevisions": "$1 {{PLURAL:$1|tlapiyaliztli}}",
        "nimagelinks": "Motekìuhtia ìpan $1 {{PLURAL:$1|tlaìxtlapalli|tlaìxtlapaltìn}}",
        "ntransclusions": "motekìuhtia ìpan $1 {{PLURAL:$1|tlaìxtlapalli|tlaìxtlapaltìn}}",
        "protectedpages-reason": "Tleīpampa",
        "protectedtitles": "Tōcāitl ōmoquīxtih",
        "listusers": "Tlatequitiltilīlli",
-       "newpages": "Yancuīc zāzaniltin",
+       "newpages": "Yancuic tlahcuiloltin",
        "newpages-username": "Tlatequitiltilīltōcāitl:",
        "ancientpages": "Huēhuehzāzanilli",
        "move": "Ticzacāz",
        "allarticles": "Mochīntīn tlahcuilōlli",
        "allinnamespace": "Mochīntīn zāzanilli (īpan $1)",
        "allpagessubmit": "Tiyāz",
-       "categories": "Tlaìxmatkàyòtlàlilòme",
+       "categories": "Neneuhcayotl",
        "categoriespagetext": "{{PLURAL:$1|Inìn tlaìxmatkàyòtlàlilòtl kimpia|Inîke tlaìxmatkàyòtlàlilòme kimpiâke}} tlaìxtlapaltìn noso medios.\nÂmò monèxtiâke nikàn in [[Special:UnusedCategories|tlaìxmatkàyòtlàlilòme tlèn âmò mokìntekitìltia]].\nNò mà mỏta in tlèn [[Special:WantedCategories|ìpan kineki tlaìxmatkàyòtlàlilòtl]].",
        "categoriesfrom": "Mà monèxtìkàn tlaìxmatkàtlàlilòmë tlèn pèwâkë ìka:",
        "linksearch": "Calān tzonhuiliztli tlatemoliztli",
        "undelete-search-submit": "Tlatēmōz",
        "undelete-error-short": "Ahcuallōtl ihcuāc momāquīxtiya: $1",
        "undelete-show-file-submit": "Quemah",
-       "namespace": "Tōcātlacāuhtli:",
-       "invert": "Tlacuepāz motlahtōl",
+       "namespace": "Tocatlacauhtli:",
+       "invert": "Tlacuepaz motlahtol",
        "blanknamespace": "(Huēyi)",
        "contributions": "In {{GENDER:$1|tlatequitiltilīlli}} ītlahcuilōl",
        "contributions-title": "Tlatequitiltilīlli $1 ītlahcuilōl",
        "tooltip-pt-preferences": "{{GENDER:|Motlaēlēhuiliz}}",
        "tooltip-pt-watchlist": "Zāzaniltin tiquintlachiya ic tlapatlaliztli",
        "tooltip-pt-mycontris": "{{GENDER:|Motlahcuilōl}}",
-       "tooltip-pt-login": "Tihuelīti timocalaqui, tēl ahmo tihuīquilia.",
+       "tooltip-pt-login": "Tihueliti timocalaqui, tel ahmo tihuiquilia.",
        "tooltip-pt-logout": "Tiquīzāz",
        "tooltip-ca-talk": "Iteixnamiquiliz itechpa inin tlahcuilolli",
        "tooltip-ca-edit": "Ticpatlaz inin tlahcuilolli",
        "tooltip-n-mainpage-description": "Tiquittaz in yacatlahcuilolli",
        "tooltip-n-portal": "Tlachīhualiztechcopa, inōn tihuelīti titlachīhua, tlatēmoyān",
        "tooltip-n-recentchanges": "Yancuic īpan tlapatlaliztli in huiqui",
-       "tooltip-n-randompage": "Tiquittaz centlaīxtli",
+       "tooltip-n-randompage": "Tiquittaz cecen tlahcuilolli",
        "tooltip-n-help": "In tēmachtīlōyān",
-       "tooltip-t-whatlinkshere": "Mochīntīn zāzaniltin huiquipan quitzonhuiliah nicān",
+       "tooltip-t-whatlinkshere": "Mochintin tlahcuiloltin huiquipan quitzonhuiliah nican",
        "tooltip-t-recentchangeslinked": "Yancuic tlapatlaliztli ipan tlahcuiloltin tlein quitzonhuilia nican",
        "tooltip-feed-rss": "RSS tlachicāhualiztli inīn zāzaniltechcopa",
        "tooltip-feed-atom": "Atom tlachicāhualiztli inīn zāzaniltechcopa",
        "tooltip-compareselectedversions": "Tiquinttāz ahneneuhquiliztli ōme zāzanilli tlapatlaliznepantlah.",
        "tooltip-watch": "Ticcēntilīz inīn zāzanilli motlachiyalizhuīc",
        "tooltip-upload": "Ticpēhua quetzaliztli",
-       "tooltip-summary": "Xicaquilia tepitōn tlahcuilōltōntli",
+       "tooltip-summary": "Xiquihcuilo ce tepiton tlahcuiloltontli",
        "anonymous": "Ahtōcāitl {{PLURAL:$1|tlatequitiltilīlli}} īpan {{SITENAME}}",
        "siteuser": "$1 tlatequitiltilīlli īpan {{SITENAME}}",
        "lastmodifiedatby": "Inīn zāzanilli ōtlapatlac catca īpan $2, $1 īpal $3.",
        "file-info-size": "$1 × $2 pixel; zāzanilli octacayōtl: $3; machiyōtl MIME: $4",
        "file-nohires": "Ahmo ia achi cualli ahmo occē īxiptli.",
        "show-big-image": "Tzintiliztlahcuilolli",
+       "show-big-image-size": "$1 × $2 pixels",
        "newimages": "Yancuīc īxipcān",
        "imagelisttext": "Nicān {{PLURAL:$1|mopiya|mopiyah}} '''$1''' īxiptli $2 iuhcopa.",
        "noimages": "Ahtlein ic tlatta.",
        "exif-gpslatitude-s": "Huiztlān",
        "exif-gpslongitude-e": "Tlāpcopa huehtlatzīncāyōtl",
        "exif-gpslongitude-w": "Cihuātlāmpa huehtlatzīncāyōtl",
-       "namespacesall": "mochīntīn",
+       "namespacesall": "mochintin",
        "monthsall": "(mochīntīn)",
        "confirmemail": "Ticchicāhuāz e-mail",
        "confirmemail_needlogin": "Tihuīquilia $1 ic ticchicāhua mo e-mail.",
index 8d7511f..d3f89d6 100644 (file)
        "allmessages-filter-translate": "Przetłumacz",
        "thumbnail-more": "Powiększ",
        "filemissing": "Brak pliku",
-       "thumbnail_error": "Błąd przy generowaniu miniatury $1",
+       "thumbnail_error": "Błąd przy generowaniu miniatury: $1",
        "thumbnail_error_remote": "Komunikat o błędzie z {{grammar:2sg|$1}}:\n$2",
        "djvu_page_error": "Strona DjVu poza zakresem",
        "djvu_no_xml": "Nie można pobrać danych w formacie XML dla pliku DjVu",
index 8267ea8..4a75635 100644 (file)
        "botpasswords-insert-failed": "Falhou ao adicionar o nome do robô \"$1\". Já foi adicionado?",
        "botpasswords-update-failed": "Falha ao atualizar o nome do robô \"$1\". Será que foi eliminado?",
        "botpasswords-created-title": "Criada palavra-passe para o robô",
-       "botpasswords-created-body": "A palavra-passe de robô para o robô \"$1\" do utilizador \"$2\" foi criada.",
+       "botpasswords-created-body": "A palavra-passe de robô, para o nome de robô \"$1\" do utilizador \"$2\" foi criada.",
        "botpasswords-updated-title": "A palavra-passe de robô foi atualizada.",
-       "botpasswords-updated-body": "O robô palavra-passe para o nome do robô \"$1\" do utilizador \"$2\" foi atualizado.",
+       "botpasswords-updated-body": "A palavra-passe de robô, para o nome de robô \"$1\" do utilizador \"$2\" foi atualizada.",
        "botpasswords-deleted-title": "Palavra-passe de robô eliminada",
-       "botpasswords-deleted-body": "O robô palavra-passe para o nome do robô \"$1\"do utilizador \"$2\" foi eliminado.",
+       "botpasswords-deleted-body": "A palavra-passe de robô, para o nome de robô \"$1\" do utilizador \"$2\" foi eliminada.",
        "botpasswords-newpassword": "A nova palavra-passe para iniciar sessão com <strong>$1</strong> é <strong>$2</strong>. <em>Anote-a para referência futura, por favor.</em> <br> (Para robôs antigos cujo nome de acesso tenha de ser igual ao eventual nome de utilizador, também pode usar o nome de utilizador <strong>$3</strong> e a palavra-passe <strong>$4</strong>.)",
        "botpasswords-no-provider": "BotPasswordsSessionProvider não está disponível.",
        "botpasswords-restriction-failed": "Restrições de palavra-passe de robô evitam esta autenticação.",
index 7327012..936fd8b 100644 (file)
        "searchdisabled": "{{doc-singularthey}}\nIn this sentence, \"their indexes\" refers to \"Google's indexes\".\n\nShown on [[Special:Search]] when the internal search is disabled.",
        "googlesearch": "{{notranslate}}\nShown when [[mw:Manual:$wgDisableTextSearch|$wgDisableTextSearch]] is set to true and no [[mw:Manual:$wgSearchForwardUrl|$wgSearchForwardUrl]] is set.\n\nParameters:\n* $1 - the search term\n* $2 - \"UTF-8\" (hard-coded)\n* $3 - the message {{msg-mw|Searchbutton}}",
        "search-error": "Shown when an error has occurred when performing a search. Parameters:\n* $1 - the localized error that was returned",
+       "search-warning": "Shown when a warning has occured when performing a search. Parameters:\n* $1 - the localized warning that was returned.",
        "opensearch-desc": "{{ignored}}Link description of the [www.opensearch.org/ OpenSearch] link in the HTML head of pages.",
        "preferences": "Title of the [[Special:Preferences]] page.\n{{Identical|Preferences}}",
        "preferences-summary": "{{doc-specialpagesummary|preferences}}",
        "listgrants-summary": "Explanatory text shown at the top of the grant/rights mapping table.\n\nRefers to {{msg-mw|Listgrouprights-helppage}}.",
        "listgrants-grant": "Used as table header for the grant/rights mapping table.\n{{Identical|Grant}}",
        "listgrants-rights": "Used as table header for the grant/rights mapping table.\n{{Identical|Right}}",
+       "listgrants-grant-display": "{{optional}}\nUsed to display the code name of a grant next to the grant. Parameters:\n* $1 - the text from the \"grant-...\" messages, i.e. {{msg-mw|Grant-highvolume}}\n* $2 - the codename of this grant",
        "trackingcategories": "[[Special:TrackingCategories]] page implementing list of Tracking categories [[mw:Special:MyLanguage/Help:Tracking categories|tracking category]].\n{{Identical|Tracking category}}",
        "trackingcategories-summary": "Description for [[Special:TrackingCategories]] page [[mw:Help:Tracking categories|tracking category]]",
        "trackingcategories-msg": "Header for the message column of the table on [[Special:TrackingCategories]]. This column lists the mediawiki message that controls the tracking category in question.\n{{Identical|Tracking category}}",
        "mw-widgets-dateinput-no-date": "Label of a date input field when no date has been selected.",
        "mw-widgets-dateinput-placeholder-day": "[[File:DateInputWidget active, empty.png|frame|Screenshot]]\nPlaceholder displayed in a date input field when it's empty, representing a date format with 4 digits for year, 2 digits for month, and 2 digits for day, separated with hyphens. This should be uppercase, if possible, and must not include any additional explanations. If there is no good way to translate it, make this message blank.",
        "mw-widgets-dateinput-placeholder-month": "Placeholder displayed in a date input field when it's empty, representing a date format with 4 digits for year and 2 digits for month, separated with hyphens (without a day). This should be uppercase, if possible, and must not include any additional explanations. If there is no good way to translate it, make this message blank.",
+       "mw-widgets-mediasearch-input-placeholder": "Place holder text for media search input",
+       "mw-widgets-mediasearch-noresults": "Label notifying the user no results were found for the media search.",
        "mw-widgets-titleinput-description-new-page": "Description label for a new page in the title input widget.",
        "mw-widgets-titleinput-description-redirect": "Description label for a redirect in the title input widget.",
        "mw-widgets-categoryselector-add-category-placeholder": "Placeholder displayed in the category selector widget after the capsules of already added categories.",
index deeece5..807ced9 100644 (file)
        "mypreferencesprotected": "Non ge tìne le permesse pe cangià le preferenze tune.",
        "ns-specialprotected": "Le pàgene speciale no ponne essere cangete.",
        "titleprotected": "Stu titele ha state prutette da 'a ccreazione da [[User:$1|$1]].\n'U mutive jè <em>$2</em>.",
-       "filereadonlyerror": "Non ge pozze cangià 'u file \"$1\" purcé l'archivije de le file \"$2\" ste in mode sola letture.\n\nL'amministratore ca l'ha bloccate dèje sta spiegazione: \"$3\".",
+       "filereadonlyerror": "Non ge pozze cangià 'u file \"$1\" purcé l'archivije de le file \"$2\" ste in sola letture.\n\nL'amministratore d'u sisteme ca l'ave bloccate dèje sta spiegazione: \"$3\".",
        "invalidtitle-knownnamespace": "Titole invalide cu 'u namespace \"$2\" e teste \"$3\"",
        "invalidtitle-unknownnamespace": "Titele invalide cu numere de namespace scanusciute $1 e teste \"$2\"",
        "exception-nologin": "Non ge sì collegate",
        "noname": "Non gìè specifichete 'nu nome utende valide.",
        "loginsuccesstitle": "Tutte a poste, è trasute!",
        "loginsuccess": "'''Mò tu si colleghete jndr'à {{SITENAME}} cumme \"$1\".'''",
-       "nosuchuser": "Non g'esiste n'utende cu 'u nome \"$1\".\nFà attenzione ca le nome de l'utinde so senzibbele a le lettere granne e piccenne.\nVide bbuene a cumme l'è scritte, o [[Special:CreateAccount|ccreje n'utende nuève]].",
+       "nosuchuser": "Non g'esiste n'utende cu 'u nome \"$1\".\nLe nome de l'utinde so senzibbele a le lettere granne e piccenne.\nVide bbuene a cumme l'è scritte, o [[Special:CreateAccount|ccreje n'utende nuève]].",
        "nosuchusershort": "Non ge ste nisciune utende cu 'u nome \"$1\".\nCondrolle accume l'è scritte.",
        "nouserspecified": "A scrivere pe forze 'u nome de l'utende.",
        "login-userblocked": "Stu utende jè bloccate. Non ge puè trasè.",
        "noemail": "Non ge stonne email reggistrete pe l'utende \"$1\".",
        "noemailcreate": "Tu ha mèttere 'n'indirizze e-mail valide",
        "passwordsent": "'Na nova passuord ha state mannete a l'indirizze e-mail reggistrete pe \"$1\".\nPe piacere, colleghete n'otra vota quanne l'è ricevute.",
-       "blocked-mailpassword": "L'indirizze IP tue jè blocchete pe le cangiaminde e accussì tu non ge puè ausà 'a funzione de recupere d'a password pe prevenìe l'abbuse.",
+       "blocked-mailpassword": "L'indirizze IP tune jè bloccate pe le cangiaminde. Tu non ge puè ausà 'a funzione de recupere d'a password pe prevenìe l'abbuse.",
        "eauthentsent": "'N'e-mail de conferme ha state mannate a l'indirizze ca tu è ditte.\nApprime ca otre e-mail avènene mannate a 'u cunde tune, tu ha seguì le 'struzione ca stonne jndr'à l'e-mail, pe confermà ca 'u cunde jè une de le tune.",
        "throttled-mailpassword": "'Nu arrecordatore de passuord ha stete già mannate jndr'à {{PLURAL:$1|l'urtema ore|l'urteme $1 ore}}.\nPe prevenì l'abbuse, sulamende 'nu arrecordatore de passuord avene mannate ogne {{PLURAL:$1|ore|$1 ore}}.",
        "mailerror": "Errore mannanne 'a mail: $1",
        "passwordreset-emaildisabled": "Le funziune de l'email onne state disabbilitate sus a sta uicchi.",
        "passwordreset-username": "Nome utende:",
        "passwordreset-domain": "Dominie:",
-       "passwordreset-capture": "Vide 'a mail resultande?",
-       "passwordreset-capture-help": "Ce tu signe sta sckatele, 'a mail (cu 'a passuord temboranèe) t'avène fatte vedè cumme adda essere mannate a l'utende.",
        "passwordreset-email": "Indirizze e-mail:",
        "passwordreset-emailtitle": "Dettaglie d'u cunde utende sus a {{SITENAME}}",
        "passwordreset-emailtext-ip": "Quacchedune (pò essere tu, da 'u 'ndirizze IP $1) ha richieste 'na mail pe arrecurdarse de le dettaglie d'u cunde sue pe {{SITENAME}} ($4). {{PLURAL:$3|'U cunde utende seguende jè|le cunde utinde seguende sonde}} associate cu st'indirizze e-mail:\n\n$2\n\n{{PLURAL:$3|Sta passuord temboranèe scade|Ste passuord temboranèe scadene}} 'mbrà {{PLURAL:$5|'nu sciurne|$5 sciurne}}.\nTu avissa trasè e scacchià 'na passuord nova. Ce quacchedun'otre ha fatte sta richieste, o ce tu t'è arrecurdate 'a passuord origgenale toje, e non g'a vuè ccu cange cchiù, tu puè ignorà stu messagge e condinuà ausanne 'a passuord vecchie.",
        "userrights-reason": "Mutive:",
        "userrights-no-interwiki": "Tu non ge tìne le permesse pe cangià le deritte utende sus a l'otre uicchi.",
        "userrights-nodatabase": "'U Database $1 non g'esiste o non g'è lochele.",
-       "userrights-nologin": "Tu à essere [[Special:UserLogin|colleghete]] cu 'nu cunde utende d'amministratore pe assignà le deritte utende.",
-       "userrights-notallowed": "Non ge tìne le permesse pe aggiungere o luà le deritte a le utinde.",
        "userrights-changeable-col": "Gruppe ca tu puè cangià",
        "userrights-unchangeable-col": "Gruppe ca tu non ge puè cangià",
        "userrights-irreversible-marker": "$1*",
        "userrights-conflict": "Conflitte sus a le cangiaminde de le deritte utende! Pe piacere revide e conferme le cangiaminde tune.",
-       "userrights-removed-self": "T'è luate le deritte tune. Mò non ge puè cchiù trasè jndr'à sta pàgene.",
        "group": "Gruppe:",
        "group-user": "Utinde",
        "group-autoconfirmed": "Utinde auto confermatarije",
        "right-siteadmin": "Blocche e sblocche 'u database",
        "right-override-export-depth": "L'esportazione de pàggene inglude pàggene collegate 'mbonde a 'na profonnetà de 5",
        "right-sendemail": "Manne 'a mail a otre utinde",
-       "right-passwordreset": "Vide l'e-mail de azzeramende d'a passuord",
        "right-managechangetags": "CCreje e scangìlle [[Special:Tags|tag]] da 'u database",
        "right-applychangetags": "Appleche [[Special:Tags|tag]] sus a 'u de le cangiaminde tune",
        "right-changetags": "Aggiunge e live arbitrariamende [[Special:Tags|tag]] sus a le revisiune individuale e vôsce de l'archivije",
index a92f7e0..66e53af 100644 (file)
        "views": "Көрүү",
        "toolbox": "Сэп-сэбиргэл",
        "tool-link-userrights": "{{GENDER:$1|Кыттааччы}} бөлөҕүн уларыт",
+       "tool-link-userrights-readonly": "{{GENDER:$1|Кыттааччы}} бөлөхтөрүн көр",
        "tool-link-emailuser": "{{GENDER:$1|Кыттааччыга}} сурук суруйуу",
        "userpage": "Кыттааччы туһунан сирэй",
        "projectpage": "Бырайыак сирэйэ",
        "recentchanges-page-added-to-category": "[[:$1]] категорияҕа эбилиннэ",
        "recentchanges-page-added-to-category-bundled": "[[:$1]] категорияҕа эбилиннэ, [[Special:WhatLinksHere/$1|бу сирэй атын сирэйдэргэ киириитэ]]",
        "recentchanges-page-removed-from-category": "[[:$1]] категорияттан сотулунна",
-       "recentchanges-page-removed-from-category-bundled": "[[:$1]] категорияттан сотулунна, {{PLURAL:$2|бу сирэй атын сирэйдэргэ киириитэ}}",
+       "recentchanges-page-removed-from-category-bundled": "[[:$1]] категорияттан сотулунна, [[Special:WhatLinksHere/$1|бу сирэй атын сирэйдэргэ киириитэ]]",
        "autochange-username": "MediaWiki аптамаатынан уларыйыыта",
        "upload": "Билэни угуу",
        "uploadbtn": "Билэни киллэрии",
        "uploaded-script-svg": "Хачайдаммыт SVG-билэҕэ сценарийы өйүүр куттааллаах «$1» элэмиэн көһүннэ.",
        "uploaded-hostile-svg": "Хачайдаммыт SVG-билэ истиилин элэмиэнигэр кутталлаах CSS-куод көһүннэ.",
        "uploaded-event-handler-on-svg": "SVG-билэлэргэ <code>$1=\"$2\"</code> сабыытыйаны таҥастааччы атрибууттарын туруоруу көҥүллэммэт.",
+       "uploaded-href-attribute-svg": "Манна көстүбүт <code><$1 $2=\"$3\"></code> SVG-билэ сигэҕэ аналлаах href-атрибуттарыгар, маннык эрэ көүллэнэр: http:// биитэр https://.",
        "uploaded-href-unsafe-target-svg": "Хачайдаммыт SVG-билэҕэ кутталлаах сигэ көһүннэ <code>&lt;$1 $2=\"$3\"&gt;</code>.",
        "uploaded-animate-svg": "«Animate» тиэк көһүннэ, кини «from»-атрибут көмөтүнэн  <code>&lt;$1 $2=\"$3\"&gt;</code> хачайдаммыт SVG-билэҕэ сигэни уларытыан сөп.",
        "uploaded-setting-event-handler-svg": "Дьайыы таҥастыыр тэрил атрибуутун уларытар бобуллубут, киллэриллибит SVG-билэҕэ <code>&lt;$1 $2=\"$3\"&gt;</code> куод көстүбүт.",
        "upload-http-error": "HTTP алҕаһа таҕыста: $1",
        "upload-copy-upload-invalid-domain": "Бу домеҥҥа хачайдааһыны хатылыыр табыллыбат.",
        "upload-foreign-cant-upload": "Бу биики ыйыллыбыт репозиторийга хачайдыырга туруоруллубатах",
+       "upload-foreign-cant-load-config": "Билэ тас ыскылаатыгар хачайдааһын конфигурациятын ылар сатаммата.",
+       "upload-dialog-disabled": "Бу тэрил көмөтүнэн бу биикигэ хачайдыыры сабан кэбиспиттэр.",
        "upload-dialog-title": "Билэни угуу",
        "upload-dialog-button-cancel": "Салҕаама",
+       "upload-dialog-button-back": "Төнүн",
        "upload-dialog-button-done": "Оҥоһулунна",
        "upload-dialog-button-save": "Бигэргэт",
        "upload-dialog-button-upload": "Киллэрии",
        "upload-form-label-infoform-title": "Сиһилии",
        "upload-form-label-infoform-name": "Аата",
+       "upload-form-label-infoform-name-tooltip": "Билэ баһа кини аатын курдук бигэргэниэ. Ханнык баҕарар тылы уонна тыллар ыккардыларыгар арыты туһаныахха сөп. Кэтирээһинин ыйыма.",
        "upload-form-label-infoform-description": "Быһаарыыта",
        "upload-form-label-infoform-description-tooltip": "Кылгастык бу айымньы туһунан сүрүннээн этиҥ. Хаартыскаҕа сүнньүнэн туох ойууламмытый, ханна түһэриллибитий.",
        "upload-form-label-usage-title": "Туһаныы",
        "backend-fail-read": "$1 билэни ааҕар табыллыбата.",
        "backend-fail-create": "$1 билэни суруттарар табыллыбата.",
        "backend-fail-maxsize": "$1 билэни суруттарар табыллыбата, тоҕо диэтэххэ кини кээмэйэ $2 баайты куоһарар.",
-       "backend-fail-readonly": "«$1» сиэрбэр «ааҕыы эрэ» эрэсиимҥэ турар. Төрүөтэ: «$2»",
+       "backend-fail-readonly": "«$1» сиэрбэр «ааҕыы эрэ» диэн эрэсиимҥэ турар. Төрүөтэ: <em>$2</em>",
        "backend-fail-synced": "«$1» билэ сөпсөһүллүбэтэх туруктаах эбит",
        "backend-fail-connect": "Маны кытта «$1» холбонор табыллыбата.",
        "backend-fail-internal": "Манна «$1» биллибэт алҕас таҕыста.",
        "uploadstash-summary": "Бу сирэй биикигэ киллэриллибит (эбэтэр киллэриллэ турар) ол гынан баран аһаҕас көрүүгэ тахса илик билэлэри көрөргө аналлаах. Бу билэлэр ааптартан ураты кимиэхэ да көстүбэттэр.",
        "uploadstash-clear": "Кистэммит билэлэри суох оҥорорго",
        "uploadstash-nofiles": "Кистэммит билэлэриҥ суохтар.",
-       "uploadstash-badtoken": "ЫйбÑ\8bÑ\82 Ð´Ñ\8cайÑ\8bÑ\8bгÑ\8bн Ð¾Ò¥Ð¾Ñ\80оÑ\80 Ñ\82абÑ\8bллÑ\8bбаÑ\82а. Ð\90Ñ\80ааһа Ð±Ð¾Ð»Ð´Ñ\8cоÒ\95о Ð±Ò¯Ð¿Ð¿Ò¯Ñ\82 Ð±Ñ\8bÒ»Ñ\8bÑ\8bлааÑ\85. Ó¨Ñ\81Ñ\81Ó© Ð±Ð¾Ñ\80Ñ\83обалаа.",
+       "uploadstash-badtoken": "ЫйбÑ\8bÑ\82 Ð´Ñ\8cайÑ\8bÑ\8bгÑ\8bн Ð¾Ò¥Ð¾Ñ\80оÑ\80 Ñ\82абÑ\8bллÑ\8bбаÑ\82а. Ð\90Ñ\80ааһа ÐºÐ¸Ð¸Ñ\80биÑ\82 Ð°Ð°Ñ\82Ñ\8bÒ¥ Ð±Ð¾Ð»Ð´Ñ\8cоÒ\95о Ð±Ò¯Ð¿Ð¿Ò¯Ñ\82 Ð±Ñ\8bÒ»Ñ\8bÑ\8bлааÑ\85. Ð¥Ð°Ñ\82Ñ\8bлаан ÐºÓ©Ñ\80.",
        "uploadstash-errclear": "Билэлэри сотор табыллыбата.",
        "uploadstash-refresh": "Билэлэр тиһиктэрин саҥардан биэр",
+       "uploadstash-thumbnail": "ойуучааны көрдөр",
+       "uploadstash-exception": "Суруттараргын быстах уурар сиргэ харайар сатаммата ($1): \"$2\".",
        "invalid-chunk-offset": "Бобуллубут сыҕарыйыы",
        "img-auth-accessdenied": "Киирии бобуллубут",
        "img-auth-nopathinfo": "PATH_INFO суох.\nЭн сиэрбэриҥ маннык сибидиэнньэни ыытарга туруоруллубатах эбит.\nБаҕар кини CGI олоҕурара буолуо ол иһин img_auth өйөөбөтө буолуо.\nМаны https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Image_Authorization көр.",
        "filerevert-submit": "Төннөрүү",
        "filerevert-success": "'''[[Media:$1|$1]]''' бу торумҥа төннөрүлүннэ [$4 торум Filetype-missingот $3, $2].",
        "filerevert-badversion": "Бу билэ этиллибит күҥҥэ-ыйга/кэмҥэ оҥоһуллубут урукку торума суох.",
+       "filerevert-identical": "Талбыт торумуҥ билиҥҥи торуму кытта үүт үкчүлэр.",
        "filedelete": "Сот: $1",
        "filedelete-legend": "Билэни сот",
        "filedelete-intro": "Бу билэни '''[[Media:$1|$1]]''' туох баар суруллубут историятын кытта сотон эрэҕин.",
        "apisandbox": "API песочница",
        "apisandbox-jsonly": "API-песочницаны туһанарга JavaScript ирдэнэр.",
        "apisandbox-api-disabled": "Бу сайтка API араарыллыбыт.",
+       "apisandbox-intro": "Бу сирэйи <strong>MediaWiki API</strong> тургутан көрөргө туһан.\nAPI-ни туттар туһунан сиһилии манна ааҕыахха сөп [[mw:API:Main page|API туһунан]]. Холобура, [https://www.mediawiki.org/wiki/API#A_simple_example Сүрүн сирэй иһинээҕитин хайдах ылар туһунан]. Атын холобурдары көрөргө сигэни баттаа.\nБолҕой: бу тургутар сирэй эрээри, манна суруйбутуҥ биикигэ уларытыыны оҥоруон сөп.",
        "apisandbox-fullscreen": "Паныалы арыйыы.",
        "apisandbox-fullscreen-tooltip": "Браузеры толорорго песочница паныалын арыйыы.",
        "apisandbox-unfullscreen": "Сирэйи көрдөрүү",
        "apisandbox-submit": "Ыйытык оҥоруу",
        "apisandbox-reset": "Сот",
        "apisandbox-retry": "Хатылаа",
+       "apisandbox-loading": "«$1» API-модульга аналлаах хачайдана турар…",
+       "apisandbox-load-error": "«$1» API-модулга аналлаах хачайданарыгар алҕас таҕыста: $2",
+       "apisandbox-no-parameters": "Бу API-модулга туруоруута (параметра) суох.",
        "apisandbox-helpurls": "Көмө сигэлэр",
        "apisandbox-examples": "Холобурдар",
        "apisandbox-dynamic-parameters": "Дьайыы кээмэйдэрэ.",
        "apisandbox-results": "Түмүк",
        "apisandbox-sending-request": "API-көрдөбүлү ыытыы…",
        "apisandbox-loading-results": "API-түмүгүн ылыы…",
+       "apisandbox-results-error": "Көрдөбүлгэ API-хоруйу киллэрии  кэмигэр алҕас таҕыста: $1.",
+       "apisandbox-request-url-label": "Көрдөбүл URL-аадырыһа:",
+       "apisandbox-request-time": "Көрдөбүл болдьоҕо: {{PLURAL:$1|$1 мс}}",
        "apisandbox-results-fixtoken": "Токены көннөрөн баран саҥаттан ыыт.",
+       "apisandbox-results-fixtoken-fail": "«$1» токены ыҥырар табыллыбата.",
+       "apisandbox-alert-page": "Бу сирэй хонуулара алҕастаах.",
+       "apisandbox-alert-field": "Хонуу суолтата алҕастаах.",
+       "apisandbox-continue": "Салгыы",
+       "apisandbox-continue-clear": "Сот",
+       "apisandbox-continue-help": "{{int:apisandbox-continue}} бүтэһик көрдөбүлү [https://www.mediawiki.org/wiki/API:Query#Continuing_queries салгыаҕа]; {{int:apisandbox-continue-clear}} салҕааһыны кытта ситимнээх туруоруулары ырастыа.",
+       "apisandbox-param-limit": "Муҥутуур болдьох <kbd>муҥутуурдук</kbd> туттулларын туоруор.",
+       "apisandbox-multivalue-all-namespaces": "$1 (Аат даллара барыта)",
+       "apisandbox-multivalue-all-values": "$1 (Бары суолталара)",
        "booksources": "Кинигэлэр источниктара",
        "booksources-search-legend": "Кинигэ туһунан көрдөө",
        "booksources-search": "Бул",
index 12d7974..290a8b8 100644 (file)
        "tooltip-pt-mytalk": "{{GENDER:|Tvoja}} pogovorna stran",
        "tooltip-pt-anontalk": "Pogovor o urejanjih s tega IP-naslova",
        "tooltip-pt-preferences": "{{GENDER:|Tvoje}} nastavitve",
-       "tooltip-pt-watchlist": "Seznam strani, katerih spremembe spremljate",
+       "tooltip-pt-watchlist": "Seznam strani, katerih spremembe spremljaš",
        "tooltip-pt-mycontris": "Seznam {{GENDER:|tvojih}} prispevkov",
        "tooltip-pt-anoncontribs": "Seznam urejanj s tega IP-naslova",
        "tooltip-pt-login": "Prijava ni obvezna, vendar je zaželena",
index d33657c..f45a897 100644 (file)
        "views": "చూపులు",
        "toolbox": "పనిముట్లు",
        "tool-link-userrights": "{{GENDER:$1|వాడుకరి}} గుంపులను మార్చు",
+       "tool-link-userrights-readonly": "{{GENDER:$1|వాడుకరి}} గుంపులను చూడండి",
        "tool-link-emailuser": "ఈ {{GENDER:$1|వాడుకరికి}} ఈమెయిలు పంపు",
        "userpage": "వాడుకరి పేజీని చూడండి",
        "projectpage": "ప్రాజెక్టు పేజీని చూడు",
        "passwordreset-emaildisabled": "ఈ వికీలో ఈమెయిలు విశేషాలను అశక్తం చేసాం.",
        "passwordreset-username": "వాడుకరి పేరు:",
        "passwordreset-domain": "డొమైన్:",
-       "passwordreset-capture": "ఈమెయిలు ఎలా ఉంటుందో చూస్తారా?",
-       "passwordreset-capture-help": "ఈ పెట్టెను చెక్ చేస్తే, ఈమెయిలును (తాత్కాలిక సంకేతపదంతో) వాడుకరికి పంపిస్తూనే, మీకూ చూపిస్తాం.",
        "passwordreset-email": "ఈ-మెయిలు చిరునామా:",
        "passwordreset-emailtitle": "{{SITENAME}}లో ఖాతా వివరాలు",
        "passwordreset-emailtext-ip": "ఎవరో (బహుశా మీరే, ఐపీ అడ్రసు $1 నుంచి)  {{SITENAME}} ($4) లో మీ సంకేతపదాన్ని మార్చమంటూ అడిగారు. కింది వాడుకరి {{PLURAL:$3|ఖాతా|ఖాతాలు}}\nఈ ఈమెయిలు చిరునామాతో అనుసంధింపబడి ఉన్నాయి:\n\n$2\n\n{{PLURAL:$3|ఈ సంకేతపదానికి|ఈ సంకేతపదాలకు}} {{PLURAL:$5|ఒక్కరోజులో|$5 రోజుల్లో}} కాలం చెల్లుతుంది.\nఇప్పుడు మీరు లాగినై కొత్త సంకేతపదాన్ని ఎంచుకోవాల్సి ఉంటుంది. ఈ అభ్యర్ధన చేసింది మరెవరైనా అయినా, లేక మీ అసలు సంకేతపదం మీకు గుర్తొచ్చి దాన్ని మార్చాల్సిన అవసరం లేదని అనుకున్నా, మీరీ సందేశాన్ని పట్టించుకోనక్కర్లేదు. పాత సంకేతపదాన్నే వాడుకోవచ్చు.",
        "passwordreset-emailelement": "వాడుకరిపేరు: \n$1\n\nతాత్కాలిక సంకేతపదం: \n$2",
        "passwordreset-emailsentemail": "ఈ ఈమెయిలు చిరునామా మీ ఖాతాకు అనుసంధించి ఉంటే, సంకేతపదం మార్పు ఈమెయిలు పంపించబడుతుంది.",
        "passwordreset-emailsentusername": "ఈ వాడుకరిపేరుకు ఏదైనా ఈమెయిలు చిరునామా అనుసంధించి ఉంటే, సంకేతపదం మార్పు ఈమెయిలు పంపించబడుతుంది.",
-       "passwordreset-emailsent-capture2": "సంకేతపదం మార్పు {{PLURAL:$1|ఈమెయిలును|ఈమెయిళ్ళను}} పంపించాం. {{PLURAL:$1|వాడుకరిపేరు, సంకేతపదాన్ని|వాడుకరిపేర్లు, సంకేతపదాల జాబితాను}} ఇక్కడ చూపించాం.",
-       "passwordreset-emailerror-capture2": "{{GENDER:$2|వాడుకరికి}} ఈమెయిలు పంపడం విఫలమైంది: $1 {{PLURAL:$3|వాడుకరిపేరు, సంకేతపదాన్ని|వాడుకరిపేర్లు, సంకేతపదాల జాబితాను}} ఇక్కడ చూపించాం.",
        "passwordreset-invalidemail": "తప్పు ఈ-మెయిలు చిరునామా",
        "passwordreset-nodata": "వాడుకరిపేరుగానీ, ఈ-మెయిలు చిరునామా గానీ ఇవ్వలేదు",
        "changeemail": "ఈ-మెయిలు చిరునామా మార్పు లేదా తొలగింపు",
        "bold_tip": "బొద్దు అక్షరాలు",
        "italic_sample": "వాలు పాఠ్యం",
        "italic_tip": "వాలు పాఠ్యం",
-       "link_sample": "లిà°\82à°\95à±\81 పేరు",
-       "link_tip": "à°\85à°\82తరà±\8dà°\97à°¤ à°²à°¿à°\82à°\95à±\81",
+       "link_sample": "à°²à°\82à°\95à±\86 పేరు",
+       "link_tip": "à°\85à°\82తరà±\8dà°\97à°¤ à°²à°\82à°\95à±\86",
        "extlink_sample": "http://www.example.com లింకు పేరు",
        "extlink_tip": "బయటి లింకు (దీనికి ముందు http:// ఇవ్వటం మరువకండి)",
        "headline_sample": "శీర్షిక పాఠ్యం",
        "prefs-help-recentchangescount": "ఇది ఇటీవలి మార్పులు, పేజీ చరిత్రలు, మరియు చిట్టాలకు వర్తిస్తుంది.",
        "prefs-help-watchlist-token2": "మీ వీక్షణజాబితా యొక్క జాలవడ్డింపుకు చెందిన రహస్య తాళమిది.\nఈ తాళం తెలిసిన ఎవరైనా మీ వీక్షణజాబితాను చదవగలుగుతారు. అందుచేత దీన్ని ఎవరికీ ఇవ్వకండి.\n[[Special:ResetTokens|దాన్ని మార్చాలంటే ఇక్కడ నొక్కండి]].",
        "savedprefs": "మీ అభిరుచులను భద్రపరిచాం.",
-       "savedrights": "{{GENDER:$1|$1}} à°µà°¾à°¡à±\81à°\95à°°à°¿ à°¹à°\95à±\8dà°\95à±\81లనà±\81 à°­à°¦à±\8dరపరà°\9aà°¾à°\82.",
+       "savedrights": "{{GENDER:$1|$1}} à°µà°¾à°¡à±\81à°\95à°°à°¿ à°\97à±\81à°\82à°ªà±\81à°²à±\81 à°­à°¦à±\8dరమయà±\8dయాయి.",
        "timezonelegend": "కాల మండలం:",
        "localtime": "స్థానిక సమయం:",
        "timezoneuseserverdefault": "వికీ అప్రమేయాన్ని ఉపయోగించు ($1)",
        "prefswarning-warning": "మీ అభిరుచులలో మీరు చేసిన మార్పులను ఇంకా భద్రపరచలేదు. మీరు \"$1\" ను నొక్కకుండా ఈ పేజీని వదలి వెళ్తే, మీ అభిరుచులు భద్రం కావు.",
        "prefs-tabs-navigation-hint": "చిట్కా: ట్యాబుల జాబితాలో ఓ ట్యాబు నుండి మరోదానికి వెళ్ళేందుకు కుడి ఎడమ బాణాల కీలను వాడవచ్చు.",
        "userrights": "వాడుకరి హక్కుల నిర్వహణ",
-       "userrights-lookup-user": "వాడుకరి సమూహాలను నిర్వహించండి",
+       "userrights-lookup-user": "వాడుకరిని ఎంచుకోండి",
        "userrights-user-editname": "వాడుకరిపేరును ఇవ్వండి:",
-       "editusergroup": "{{GENDER:$1|వాడుకరి}} గుంపులను మార్చు",
-       "editinguser": "{{GENDER:$1|వాడుకరి}} <strong>[[వాడుకరి:$1|$1]]</strong> $2 యొక్క వాడుకరి హక్కులను మారుస్తున్నారు",
+       "editusergroup": "వాడుకరి గుంపులను చూపించు",
+       "editinguser": "{{GENDER:$1|user}} వాడుకరి హక్కులను మారుస్తున్నారు <strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "వాడుకరి సమూహాలను మార్చండి",
        "saveusergroups": "{{GENDER:$1|వాడుకరి}} గుంపులను భద్రపరచు",
        "userrights-groupsmember": "సభ్యులు:",
        "userrights-reason": "కారణం:",
        "userrights-no-interwiki": "ఇతర వికీలలో వాడుకరి హక్కులను మార్చడానికి మీకు అనుమతి లేదు.",
        "userrights-nodatabase": "$1 అనే డేటాబేసు లేదు లేదా అది స్థానికం కాదు.",
-       "userrights-nologin": "వాడుకరి హక్కులను ఇవ్వడానికి మీరు తప్పనిసరిగా ఓ నిర్వాహక ఖాతాతో [[Special:UserLogin|లాగినవ్వాలి]].",
-       "userrights-notallowed": "వాడుకరి హక్కులను చేర్చే మరియు తొలగించే అనుమతి మీకు లేదు.",
        "userrights-changeable-col": "మీరు మార్చదగిన గుంపులు",
        "userrights-unchangeable-col": "మీరు మార్చలేని గుంపులు",
        "userrights-conflict": "వాడుకరి హక్కుల మార్పులలో ఘర్షణ! మీ మార్పులను సమీక్షించి, నిర్ధారించండి.",
-       "userrights-removed-self": "మీ హక్కులను మీరు తొలగించుకున్నారు. ఇక, మీరీ పేజీని చూడలేరు.",
        "group": "గుంపు:",
        "group-user": "వాడుకరులు",
        "group-autoconfirmed": "ఆటోమాటిగ్గా నిర్ధారించబడిన వాడుకరులు",
        "right-siteadmin": "డేటాబేసును లాక్, అన్‌లాక్ చెయ్యి",
        "right-override-export-depth": "5 లింకుల లోతు వరకు ఉన్న పేజీలతో సహా, పేజీలను ఎగుమతి చెయ్యి",
        "right-sendemail": "ఇతర వాడుకరులకు ఈ-మెయిలు పంపించడం",
-       "right-passwordreset": "సంకేతపదం మార్పు ఈమెయిళ్ళను చూడడం",
        "right-managechangetags": "డేటాబేసులో [[Special:Tags|ట్యాగుల]]ను సృష్టించడం, తొలగించడం",
        "right-applychangetags": "తన మార్పులతో [[Special:Tags|ట్యాగుల]]ను ఆపాదించడం",
        "right-changetags": "విడి కూర్పులకు, చిట్టా పద్దులకు ఏవైనా [[Special:Tags|ట్యాగుల]]ను చేర్చడం, తొలగించడం",
        "upload-http-error": "ఒక HTTP పొరపాటు జరిగింది: $1",
        "upload-copy-upload-invalid-domain": "ఈ డొమెయిన్ నుంచి కాపీ ఎక్కింపులు కుదరదు.",
        "upload-dialog-button-cancel": "రద్దుచేయి",
+       "upload-dialog-button-back": "వెనుకకు",
        "upload-dialog-button-done": "పూర్తయ్యింది",
        "upload-dialog-button-save": "భద్రపరచు",
        "upload-dialog-button-upload": "ఎక్కించు",
        "apisandbox-results": "ఫలితాలు",
        "apisandbox-request-url-label": "అభ్యర్థన URL:",
        "apisandbox-request-time": "అభ్యర్ధన సమయం: $1",
+       "apisandbox-continue": "కొనసాగించు",
+       "apisandbox-continue-clear": "తుడిచివేయి",
+       "apisandbox-multivalue-all-namespaces": "$1 (అన్ని పేరుబరులు)",
+       "apisandbox-multivalue-all-values": "$1 (అన్ని విలువలు)",
        "booksources": "పుస్తక మూలాలు",
        "booksources-search-legend": "పుస్తక మూలాల కోసం వెతుకు",
        "booksources-search": "వెతుకు",
        "contributions": "{{GENDER:$1|వాడుకరి}} రచనలు",
        "contributions-title": "$1 యొక్క మార్పులు-చేర్పులు",
        "mycontris": "నా మార్పులు",
-       "anoncontribs": "à°¯à±\8bà°\97దానములు",
+       "anoncontribs": "మారà±\8dà°ªà±\81à°\9aà±\87à°°à±\8dà°ªులు",
        "contribsub2": "{{GENDER:$3|$1}} ($2) కొరకు",
        "contributions-userdoesnotexist": "వాడుకరి ఖాతా \"$1\" నమోదుకాలేదు.",
        "nocontribs": "ఈ విధమైన మార్పులేమీ దొరకలేదు.",
        "whatlinkshere-hideredirs": "$1 దారిమార్పులు",
        "whatlinkshere-hidetrans": "$1 ట్రాన్స్‌క్లూజన్లు",
        "whatlinkshere-hidelinks": "$1 లింకులు",
-       "whatlinkshere-hideimages": "$1 à°¦à°¸à±\8dà°¤à±\8dరాల లంకెలు",
+       "whatlinkshere-hideimages": "$1 à°¦à°¸à±\8dà°¤à±\8dà°°à°ªà±\81 లంకెలు",
        "whatlinkshere-filters": "వడపోతలు",
        "whatlinkshere-submit": "వెళ్ళు",
        "autoblockid": "tanaDDu #$1",
        "patrol-log-header": "ఇది పర్యవేక్షించిన కూర్పుల చిట్టా.",
        "log-show-hide-patrol": "$1 పర్యవేక్షణ చిట్టా",
        "log-show-hide-tag": "ట్యాగుల చిట్టాను $1",
+       "confirm-markpatrolled-button": "సరే",
        "deletedrevision": "పాత సంచిక $1 తొలగించబడినది.",
        "filedeleteerror-short": "ఫైలు తొలగించడంలో పొరపాటు: $1",
        "filedeleteerror-long": "ఫైలుని తొలగించడంలో పొరపాట్లు జరిగాయి:\n\n$1",
        "watchlistedit-raw-done": "మీ వీక్షణ జాబితాను తాజాకరించాం.",
        "watchlistedit-raw-added": "{{PLURAL:$1|1 శీర్షికను|$1 శీర్షికలను}} చేర్చాం:",
        "watchlistedit-raw-removed": "{{PLURAL:$1|1 శీర్షికను|$1 శీర్షికలను}} తీసివేశాం:",
-       "watchlistedit-clear-title": "à°µà±\80à°\95à±\8dà°·à°£à°\9cాబితా à°\9aà±\86రిపివà±\87యబడిà°\82ది",
+       "watchlistedit-clear-title": "వీక్షణజాబితా చెరిపివేయి",
        "watchlistedit-clear-legend": "వీక్షణజాబితా చెరిపివేయి",
        "watchlistedit-clear-titles": "శీర్షికలు:",
        "watchlistedit-clear-submit": "వీక్షణ జాబితా శుభ్రం చేయి (ఇది శాశ్వతం!)",
        "tags-edit-add": "ఈ ట్యాగులను చేర్చు:",
        "tags-edit-remove": "ఈ ట్యాగులను తొలగించు:",
        "tags-edit-reason": "కారణం:",
-       "tags-edit-success": "మారà±\8dà°ªà±\81à°²à±\81 à°µà°¿à°\9cయవà°\82à°¤à°\82à°\97à°¾ à°\86పాదిà°\82à°\9aబడà±\8dడాయి.",
+       "tags-edit-success": "మార్పులు ఆపాదించబడ్డాయి.",
        "comparepages": "పుటల పోలిక",
        "compare-page1": "పుట 1",
        "compare-page2": "పుట 2",
        "htmlform-cloner-create": "ఇంకా చేర్చు",
        "htmlform-cloner-delete": "తొలగించు",
        "htmlform-cloner-required": "కనీసం ఒక విలువు అయినా ఇవ్వాలి.",
+       "htmlform-date-placeholder": "YYYY-MM-DD",
+       "htmlform-time-placeholder": "HH:MM:SS",
+       "htmlform-datetime-placeholder": "YYYY-MM-DD HH:MM:SS",
        "logentry-delete-delete": "$1 $3 పేజీని {{GENDER:$2|తొలగించారు}}",
        "logentry-delete-restore": "పేజీ $3 ని $1 {{GENDER:$2|పునస్థాపించారు}}",
        "logentry-delete-event": "$3 లో {{PLURAL:$5|ఒక లాగ్ ఘటన|$5 లాగ్ ఘటనల}} యొక్క కన్పట్టటాన్ని (విజిబిలిటీ) $1 {{GENDER:$2|మార్చారు}}: $4",
        "expand_templates_generate_xml": "XML పార్స్ ట్రీని చూపించు",
        "expand_templates_generate_rawhtml": "ముడి HTML ను చూపించు",
        "expand_templates_preview": "మునుజూపు",
-       "pagelanguage": "పేజీ భాష ఎంపిక",
+       "pagelanguage": "పేజీ భాషను మార్చు",
        "pagelang-name": "పేజీ",
        "pagelang-language": "భాష",
        "pagelang-use-default": "అప్రమేయ భాషను వాడు",
        "action-pagelang": "పేజీ భాషను మార్చే",
        "log-name-pagelang": "భాష మార్పుల చిట్టా",
        "log-description-pagelang": "ఇది పేజీ భాష మార్పుల చిట్టా.",
-       "logentry-pagelang-pagelang": "$3 à°ªà±\87à°\9cà±\80 à°­à°¾à°·à°¨à±\81 $4 à°¨à±\81à°\82à°¡à°¿ $5 à°\95à°¿ $1 {{GENDER:$2|మారà±\8dà°\9aారà±\81}}.",
+       "logentry-pagelang-pagelang": "$3 భాషను $4 నుండి $5 కి $1 {{GENDER:$2|మార్చారు}}.",
        "default-skin-not-found-row-enabled": "* <code>$1</code> / $2 (చేతనం)",
        "default-skin-not-found-row-disabled": "* <code>$1</code> / $2 (<strong>అచేతనం</strong>)",
        "mediastatistics": "మాధ్యమ గణాంకాలు",
        "mw-widgets-dateinput-no-date": "ఏ తేదీనీ ఎంచుకోలేదు",
        "mw-widgets-titleinput-description-new-page": "పేజీ ఇంకా లేదు",
        "log-action-filter-all": "అన్నీ",
+       "authmanager-email-label": "ఈమెయిలు",
+       "authmanager-email-help": "ఈమెయిలు చిరునామా",
        "authmanager-realname-label": "అసలు పేరు",
        "authmanager-realname-help": "వాడుకరి అసలు పేరు",
        "authmanager-provider-temporarypassword": "తాత్కాలిక సంకేతపదం",
index cbf3596..b272865 100644 (file)
        "passwordreset-emaildisabled": "Bu wiki'deki e-posta özellikleri devre dışı bırakıldı.",
        "passwordreset-username": "Kullanıcı adı:",
        "passwordreset-domain": "Domain:",
-       "passwordreset-capture": "Sonuç e-postasını görüntüle?",
-       "passwordreset-capture-help": "Bu kutuyu işaretlerseniz, e-posta (geçici şifre ile) size ve yanı sıra kullanıcıya gönderiliyor.",
        "passwordreset-email": "E-posta adresi:",
        "passwordreset-emailtitle": "{{SITENAME}} hesap detayları",
        "passwordreset-emailtext-ip": "Birisi, (muhtemelen siz, $1 IP adresinden) {{SITENAME}} ($4) için hesap bilgilerinizin \nhatırlatılmasını istedi. Aşağıdaki kullanıcı {{PLURAL:$3|hesabı|hesapları}} bu e-posta adresiyle ilişkili:\n\n$2\n\n{{PLURAL:$3|Bu geçici şifre|Bu geçici şifreler}} {{PLURAL:$5|bir gün|$5  gün}} geçerlidir.\nBu geçici parola ile giriş yapın ve yeni bir şifre seçin. Şifre değişimini siz istemediyseniz veya şifrenizi hatırladıysanız ve artık şifrenizi değiştirmek istemiyorsanız; bu iletiyi önemsemeyerek eski şifrenizi kullanmaya devam edebilirsiniz.",
        "userrights-reason": "Neden:",
        "userrights-no-interwiki": "Diğer vikilerdeki kullanıcıların izinlerini değiştirmeye yetkiniz yok.",
        "userrights-nodatabase": "$1 veritabanı mevcut veya bölgesel değil",
-       "userrights-nologin": "Kullanıcı haklarını atamak için hizmetli hesabı ile [[Special:UserLogin|giriş yapmanız gerekir]].",
-       "userrights-notallowed": "Kullanıcı hakları eklemek veya kaldırmak için izniniz yok.",
        "userrights-changeable-col": "Değiştirebildiğiniz gruplar",
        "userrights-unchangeable-col": "Değiştirebilmediğiniz gruplar",
        "userrights-conflict": "Kullanıcı hakları değişikliklerinde çakışma! Lütfen değişikliklerinizi gözden geçirin ve onaylayın.",
-       "userrights-removed-self": "Kendi haklarınız başarıyla kaldırıldı. Bu nedenle, artık bu sayfaya erişemeyeceksiniz.",
        "group": "Grup:",
        "group-user": "Kullanıcılar",
        "group-autoconfirmed": "Otomatik onaylanmış kullanıcılar",
        "right-siteadmin": "Veritabanını kilitle ve kilidi aç",
        "right-override-export-depth": "Sayfaları, derinlik 5'e kadar bağlantılı sayfalarla beraber, dışa aktar",
        "right-sendemail": "Diğer kullanıcılara e-posta gönder",
-       "right-passwordreset": "Parola sıfırlama e-postalarını görür",
        "right-managechangetags": "Veritabanında [[Special:Tags|etiket]] oluşturma veya silme",
        "right-applychangetags": "Değişiklikleriyle beraber [[Special:Tags|etiketleri]] uygula",
        "right-changetags": "Tekil sürümler ve günlük kayıtlarına rastgele [[Special:Tags|etiket]] ekleme veya çıkarma",
        "booksources-search": "Ara",
        "booksources-text": "Aşağıdaki, yeni ve kullanılmış kitap satan diğer sitelere bağlantıların listesidir, ve aradığınız kitaplar hakkında daha fazla bilgiye sahip olabilirler:",
        "booksources-invalid-isbn": "Verilen ISBN geçersiz gibi görünüyor; orijinal kaynaktan kopyalama hataları için kontrol edin.",
+       "magiclink-tracking-rfc": "RFC sihirli bağlantısını kullanan sayfalar",
+       "magiclink-tracking-pmid": "PMID sihirli bağlantısını kullanan sayfalar",
+       "magiclink-tracking-isbn": "ISBN sihirli bağlantısını kullanan sayfalar",
        "specialloguserlabel": "Kullanıcı:",
        "speciallogtitlelabel": "Hedef (başlık ya da kullanıcı):",
        "log": "Kayıtlar",
index 2269267..75b503c 100644 (file)
        "databaseerror-query": "Курон: $1",
        "databaseerror-function": "Функция: $1",
        "databaseerror-error": "Янгыш: $1",
+       "badtitle": "Умойтэм ним",
        "badtitletext": "Курем бам ним луэ мыдлань, буш либо кылъёс куспын яке викиос куспын нимыз умойтэм герӟамын.\nНимын, вылды, ярантэм символъёс вань.",
        "viewsource": "Кодзэ учкыны",
        "viewsource-title": "Кодзэ учкыны бам $1",
        "createacct-another-username-ph": "Учётной книга нимъёс пыртэмын",
        "yourpassword": "Лушкемкыл:",
        "userlogin-yourpassword": "Лушкемкыл",
+       "userlogin-yourpassword-ph": "Гожтэ асьтэлэсь парольдэс",
+       "createacct-yourpassword-ph": "Гожтэ паролез",
        "createacct-yourpasswordagain": "Пароль юнматэ",
+       "createacct-yourpasswordagain-ph": "Гожтэ паролез эшшо одӥг пол",
        "userlogin-remembermypassword": "Кылем сӧзнэтэз",
        "cannotcreateaccount-title": "Уг быгатиськы гожъян кылдӥз учётной",
        "yourdomainname": "Тӥ доменэн:",
        "logout": "Кошкыны",
        "userlogout": "Потыны",
        "notloggedin": "Тон эн тусбуяськыны сӧзнэтэз",
+       "userlogin-noaccount": "Ас учётной записьты ӧвӧл?",
        "nologin": "Учётной книга ӧвӧл-а? $1.",
        "nologinlink": "Выль вики-авторлэн регистрациез",
        "createaccount": "выль вики-авторлэн регистрациез",
        "userlogin-helplink2": "Пыронъя юрттэт",
        "createacct-emailrequired": "Электронной почталэн адресэз",
        "createacct-emailoptional": "Электронной почтаезлэн адресэз (необязательное)",
+       "createacct-email-ph": "Гожтэ асьтэлэн электрон почтадылэсь адрессэ",
        "createaccountmail": "Адрес электронной почта огдырлы кутӥ вылын возьматэм образъёсыныз но соослэн случайной сгенерировать пароль ыстыны",
        "createacct-submit": "Выль вики-авторлэн регистрациез",
        "createacct-another-submit": "Выль вики-авторлэн регистрациез",
+       "createacct-benefit-heading": "{{SITENAME}} — тӥ выллем адямиослэн валче ужамзы.",
+       "createacct-benefit-body1": "{{PLURAL:$1|тупатон}}",
+       "createacct-benefit-body2": "{{PLURAL:$1|бам}}",
+       "createacct-benefit-body3": "{{PLURAL:$1|викиавтор}} берло дыре",
        "loginerror": "Янгышъёс пырон",
        "createacct-error": "Янгышъёс бордын учётной книга кылдытыны",
        "createaccounterror": "Уг быгатиськы гожъян учётной кылдоз: $1",
        "blocked-notice-logextract": "Пользователь заблокирован сётӥз та учырлы.\nСправка понна радъяськылӥсь журнал блокировка лапег берпуметӥ гожтэт:",
        "continue-editing": "Тупатъянэз азьланьтоно",
        "editing": "Тупатон: $1",
+       "creating": "«$1» бамез кылдытон",
        "editingsection": "Тупатон: $1 (люкет)",
+       "templatesused": "Та бам пушкы пыртэм {{PLURAL:$1|шаблон|шаблонъёс}}:",
        "template-protected": "(утемын)",
        "template-semiprotected": "(полуутемын)",
+       "hiddencategories": "Та бам пыре {{PLURAL:$1|$1 ватэм категорие}}:",
        "nocreatetext": "Та сайтлэн бамаз выль сюбегатэм луонлыкъёсын кылдытон.\nТон улыса, берлань вуэ быгатэ бам отредактировать, [[Special:UserLogin|тусбуяськыны книгае яке выль система кылдыто учётной]].",
        "nocreate-loggedin": "Тон доразы юаськыны кылдӥз выль бам ӧвӧл.",
        "permissionserrors": "Янгышъёс юаське",
        "cantcreateaccount-text": "Та книгаез кылдытонлы учётной IP-адрес (<strong>$1</strong>) заблокировать луизы [[User:$3|$3]].\n\nМугез, вайиз $3 возьматэ <em>$2</em>",
        "cantcreateaccount-range-text": "Учётной кылдытон - гожъян IP-адрес диапазонын <strong>$1</strong>, Тон пыриське со IP-адрес (<strong>$4</strong>), заблокировать луизы [[User:$3|$3]].\n\nМугез, вайиз $3 возьматэ <em>$2</em>",
        "viewpagelogs": "Та бамлы журналъёсыз возьматыны",
+       "currentrev-asof": "Алиез версия $1",
        "revisionasof": "Версия $1",
+       "revision-info": "Версия $1; {{GENDER:$6|$2}}$7",
        "previousrevision": "← Вужгем",
+       "nextrevision": "Выльгем →",
+       "currentrevisionlink": "Алиез версия",
        "cur": "али",
        "last": "азьв.",
        "history-show-deleted": "Ӵушылэмъёссэ гинэ",
        "revdelete-radio-unset": "Адӟымон",
        "revdelete-reason-dropdown": "*Вӧлскем палэнскон мугъёсты\n** Авторской правоосты тӥян\n** Яке кулэтэм информациез личной комментарий\n** Логин несоответствовать\n** Курла информациез Потенциально",
        "history-title": "$1 — воштонъёслэн историзы",
+       "difference-title": "$1 — версиосыз куспын пӧртэмлык",
        "lineno": "$1-тӥ чур:",
        "compareselectedversions": "Быръем версиосыз ӵошатыны",
        "showhideselectedversions": "Возьматыны/ватыны быръем версиосыз",
        "search-result-size": "$1 ({{PLURAL:$2|$2 кыл}})",
        "search-redirect": "($1 бамысь ыстон)",
        "search-section": "(«$1» люкет)",
+       "search-suggest": "Тӥ, вылды, утчаллямды «$1».",
        "search-interwiki-more": "(эшшо)",
        "searchall": "Ваньзэ",
        "search-showingresults": "{{PLURAL:$4|<strong>$3</strong> пӧлысь <strong>$1-тӥ</strong> шедьтэм|<strong>$3</strong> пӧлысь <strong>$1—$2</strong> шедьтэмъёс}}",
        "rcshowhideminor-hide": "Ватыны",
        "rcshowhidebots": "$1 ботъёсыз",
        "rcshowhidebots-show": "Возьматыны",
+       "rcshowhidebots-hide": "Ватыны",
        "rcshowhideliu": "$1 пырем викиавторъёсыз",
        "rcshowhideliu-show": "Возьматыны",
        "rcshowhideliu-hide": "Ватыны",
        "upload-dialog-button-cancel": "Берытсконо",
        "license-header": "Лицензия",
        "nolicense": "Ӧвӧл",
+       "imgfile": "файл",
        "file-anchor-link": "Файл",
        "filehist": "Файллэн историез",
        "filehist-help": "Зӥбе дата/дыр шоры, кызьы файл со дырын адӟиськемез учкыны вылысь.",
        "randompage": "Олокыӵе статья",
        "withoutinterwiki-submit": "Возьматыны",
        "nbytes": "{{PLURAL:$1|$1 байт}}",
+       "nmembers": "$1 {{PLURAL:$1|объект}}",
        "prefixindex-submit": "Возьматыны",
        "newpages": "Выль бамъёс",
        "newpages-submit": "Возьматыны",
        "move": "Нимзэ воштыны",
+       "pager-older-n": "{{PLURAL:$1|вужгес $1}}",
        "booksources": "Книгаосын источникъёс",
+       "booksources-search-legend": "Книга сярысь информациез утчан",
+       "booksources-search": "Утчаны",
        "log": "Журналъёс",
        "logeventslist-submit": "Возьматыны",
        "showhideselectedlogentries": "Возьматыны/ватыны быръем журналъёсысь гожъямъёсыз",
        "checkbox-all": "Ваньзэ",
        "checkbox-none": "Номыре",
        "checkbox-invert": "Воштыны интыен",
+       "allarticles": "Ваньмыз бамъёс",
        "allpagessubmit": "Быдэстоно",
+       "categories": "Категориос",
        "categories-submit": "Возьматыны",
        "sp-deletedcontributions-contribs": "тупатонъёсыз",
        "listusers-submit": "Возьматыны",
        "watchlist-options": "Чаклан списокез тупатыны",
        "enotif_reset": "Вань бамъёсыз лыдӟем пусйыны",
        "historyaction-submit": "Возьматыны",
+       "dellogpage": "Быдтонъёсын журнал",
        "deletionlog": "палэнэ журнал",
        "rollbacklink": "ӝог берыктыны",
+       "rollbacklinkcount": "$1 {{PLURAL:$1|тупатонэз}} ӝог берыктыны",
        "revertpage": "Откат шонертон [[Special:Contributions/$2|$2]] ([[User talk:$2|обсуждение]]) доры версия [[User:$1|$1]]",
        "revertpage-nouser": "Откат шонертон (пыриськисьёс ватэм нимъёссы) доры версия {{GENDER:$1|[[User:$1|$1]]}}",
        "restriction-edit": "Тупатон",
        "mycontris": "Гожтэмъёс",
        "anoncontribs": "Гожтэмъёс",
        "nocontribs": "Критерии нокыӵе воштӥськонъёс та соответствующий шедьтыны уг луы.",
+       "month": "Толэзьысен (вазен но):",
+       "year": "Арысен (вазен но):",
        "sp-contributions-blocklog": "блокировка",
        "sp-contributions-deleted": "шонертон палэнтыны {{GENDER:$1|участник|куакеч}}",
        "sp-contributions-blocked-notice": "Пользователь заблокирован сётӥз та учырлы. Справка понна радъяськылӥсь журнал блокировка лапег берпуметӥ гожтэт:",
        "block-log-flags-nousertalk": "тупатъяны ачиз уггес быгаты бамлэн обсуждениосаз",
        "range_block_disabled": "Администратор диапазонэз блокировать али.",
        "move-watch": "Чаклан списоке пыртоно инъет но валтӥсь бамъёсыз",
+       "movelogpage": "Нимъёсты воштонъёсын журнал",
        "export": "Бамъёсты поттон",
        "allmessagesname": "Ивортон",
        "allmessages-filter-all": "Ваньзэ",
        "tooltip-ca-addsection": "Выль люкет кылдытоно",
        "tooltip-ca-viewsource": "Та бам воштонъёслэсь утемын.\nТӥ быгатӥськоды инъет текстсэ учкыны но кӧчырыны",
        "tooltip-ca-history": "Бамлэн воштонъёсыныз журнал",
+       "tooltip-ca-move": "Та бамлэсь нимзэ воштыны",
        "tooltip-ca-watch": "Та бамез чаклан списокады пыртоно",
        "tooltip-search": "Утчано {{SITENAME}}",
        "tooltip-search-go": "Выжоно сыӵе ик нимын баме",
        "tooltip-ca-nstab-main": "Валтӥсь бамез учконо",
        "tooltip-ca-nstab-user": "Викиавторлэн бамез",
        "tooltip-ca-nstab-special": "Та бам нимысьтыз, сое тупатон луонтэм",
+       "tooltip-ca-nstab-project": "Проектлэн бамез",
        "tooltip-ca-nstab-image": "Файллэн бамез",
        "tooltip-ca-nstab-template": "Шаблонлэн бамез",
        "tooltip-ca-nstab-category": "Категорилэн бамез",
        "simpleantispam-label": "Анти-спам эскерон.\n<strong>Эн</strong> гожтэ татчы!",
        "pageinfo-header-edits": "Воштонъёслэн историзы",
        "pageinfo-toolboxlink": "Бам сярысь тодэтъёс",
+       "previousdiff": "← Вужгес тупатон",
+       "nextdiff": "Выльгес тупатон →",
        "file-info-size": "$1 × $2 пиксель, файллэн быдӟалаез: $3, MIME-тип: $4",
        "file-nohires": "Бадӟымгес быдӟалаен суред ӧвӧл.",
        "svg-long-desc": "SVG файл, номинально $1 × $2 пиксель, файллэн быдӟалаез: $3",
        "tags-title": "Меткаос",
        "logentry-delete-delete": "$1 {{GENDER:$2|палэнтыны|палэнтыны}} бам $3",
        "logentry-delete-restore": "$1 {{GENDER:$2|выльысь}} бам $3",
+       "logentry-move-move": "$1 $3 бамлы $4 выль ним {{GENDER:$2|сётӥз}}",
        "logentry-newusers-create": "$1 нимо учётной запись {{GENDER:$2|кылдытэмын}} вал",
+       "logentry-upload-upload": "$1 {{GENDER:$2|понӥз}} $3",
        "searchsuggest-search": "Утчано {{SITENAME}}",
        "searchsuggest-containing": "кудъёсаз вань...",
        "api-error-autoblocked": "Тон IP-адрес заблокировать эрказ луи, малы ке шуоно со заблокировать пользователь кутыны луоз.",
index 360adef..18ad10f 100644 (file)
        "userrights-user-editname": "Введіть ім'я користувача:",
        "editusergroup": "Завантажити групи користувачів",
        "editinguser": "Зміна прав {{GENDER:$1|користувача}} <strong>[[User:$1|$1]]</strong> $2",
-       "userrights-editusergroup": "Змінити групи користувачів",
+       "userrights-editusergroup": "Змінити групи {{GENDER:$1|користувача|користувачки}}",
        "saveusergroups": "Зберегти групи {{GENDER:$1|користувачів}}",
        "userrights-groupsmember": "Член груп:",
        "userrights-groupsmember-auto": "Неявний член:",
index d56a008..e613b7f 100644 (file)
        "views": "Các hiển thị",
        "toolbox": "Công cụ",
        "tool-link-userrights": "Thay đổi nhóm {{GENDER:$1}}người dùng",
+       "tool-link-userrights-readonly": "Xem {{GENDER:$1}}nhóm người dùng",
        "tool-link-emailuser": "Gửi thư cho {{GENDER:$1}}người dùng này",
        "userpage": "Xem trang thành viên",
        "projectpage": "Xem trang dự án",
        "prefs-help-recentchangescount": "Số này bao gồm các thay đổi gần đây, lịch sử trang, và nhật trình.",
        "prefs-help-watchlist-token2": "Đây là chìa khóa bí mật cho nguồn cấp dữ liệu danh sách theo dõi của bạn.\nBất cứ ai biết nó sẽ có thể để đọc danh sách theo dõi của bạn, vì vậy đừng chia sẻ nó.\n[[Special:ResetTokens|Nhấn chuột vào đây nếu bạn cần phải thiết lập lại nó]].",
        "savedprefs": "Đã lưu các tùy chọn cá nhân.",
-       "savedrights": "Đã lưu các quyền hạn của người dùng {{GENDER:$1}}$1.",
+       "savedrights": "Đã lưu các nhóm người dùng của {{GENDER:$1}}$1.",
        "timezonelegend": "Múi giờ:",
        "localtime": "Giờ hiện tại:",
        "timezoneuseserverdefault": "Sử dụng giờ mặc định của wiki ($1)",
        "prefswarning-warning": "Bạn chưa lưu những thay đổi tùy chọn đã thực hiện.\nNếu bạn rời khỏi trang này mà không bấm “$1”, các tùy chọn của bạn sẽ không được cập nhật.",
        "prefs-tabs-navigation-hint": "Mẹo: Bạn có thể bấm các phím mũi tên trái phải để luân chuyển qua các thẻ trong danh sách thẻ.",
        "userrights": "Quản lý quyền thành viên",
-       "userrights-lookup-user": "Quản lý nhóm thành viên",
+       "userrights-lookup-user": "Chọn thành viên",
        "userrights-user-editname": "Nhập tên thành viên:",
-       "editusergroup": "Sửa nhóm {{GENDER:$1}}người dùng",
+       "editusergroup": "Tải nhóm người dùng",
        "editinguser": "Thay đổi quyền hạn của người dùng <strong>[[User:$1|$1]]</strong> $2",
        "userrights-editusergroup": "Sửa nhóm thành viên",
        "saveusergroups": "Lưu nhóm {{GENDER:$1}}người dùng",
        "apisandbox-continue-clear": "Đặt lại",
        "apisandbox-continue-help": "{{int:apisandbox-continue}} sẽ [https://www.mediawiki.org/wiki/API:Query#Continuing_queries tiếp tục] lời yêu cầu cuối cùng; {{int:apisandbox-continue-clear}} sẽ đặt lại các tham số có liên quan đến chức năng tiếp tục yêu cầu.",
        "apisandbox-param-limit": "Nhập <kbd>max</kbd> để sử dụng hạn chế tối đa.",
+       "apisandbox-multivalue-all-namespaces": "$1 (Tất cả các không gian tên)",
+       "apisandbox-multivalue-all-values": "$1 (Tất cả các giá trị)",
        "booksources": "Nguồn sách",
        "booksources-search-legend": "Tìm kiếm nguồn sách",
        "booksources-search": "Tìm kiếm",
        "activeusers-count": "$1 tác vụ trong {{PLURAL:$3|ngày|$3 ngày}} qua",
        "activeusers-from": "Hiển thị thành viên bắt đầu từ:",
        "activeusers-groups": "Xem những người dùng theo nhóm:",
+       "activeusers-excludegroups": "Trừ những người dùng thuộc các nhóm:",
        "activeusers-noresult": "Không thấy thành viên.",
        "activeusers-submit": "Xem người dùng tích cực",
        "listgrouprights": "Nhóm thành viên",
        "htmlform-user-not-exists": "<strong>$1</strong> không tồn tại.",
        "htmlform-user-not-valid": "<strong>$1</strong> không phải là tên người dùng.",
        "logentry-delete-delete": "$1 {{GENDER:$2}}đã xóa trang “$3”",
+       "logentry-delete-delete_redir": "$1 {{GENDER:$2}}đã xóa trang đổi hướng $3 bằng cách ghi đè",
        "logentry-delete-restore": "$1 {{GENDER:$2}}đã phục hồi trang “$3”",
        "logentry-delete-event": "$1 {{GENDER:$2}}đã thay đổi mức hiển thị của {{PLURAL:$5|một mục nhật trình|$5 mục nhật trình}} về $3: $4",
        "logentry-delete-revision": "$1 {{GENDER:$2}}đã thay đổi mức hiển thị của {{PLURAL:$5|một phiên bản|$5 phiên bản}} trang $3: $4",
        "mw-widgets-dateinput-placeholder-month": "YYYY-MM (năm-tháng)",
        "mw-widgets-titleinput-description-new-page": "trang này chưa tồn tại",
        "mw-widgets-titleinput-description-redirect": "đổi hướng đến $1",
+       "mw-widgets-categoryselector-add-category-placeholder": "Thêm thể loại…",
        "sessionmanager-tie": "Không thể kết hợp nhiều yêu cầu xác thực loại: $1.",
        "sessionprovider-generic": "phiên $1",
        "sessionprovider-mediawiki-session-cookiesessionprovider": "phiên dựa trên cookie",
        "log-action-filter-contentmodel-change": "Thay đổi kiểu nội dung",
        "log-action-filter-contentmodel-new": "Tạo trang có kiểu nội dung không chuẩn",
        "log-action-filter-delete-delete": "Xóa trang",
+       "log-action-filter-delete-delete_redir": "Ghi đè trang đổi hướng",
        "log-action-filter-delete-restore": "Phục hồi trang",
        "log-action-filter-delete-event": "Xóa nhật trình",
        "log-action-filter-delete-revision": "Xóa phiên bản",
index ec49fc8..bd8577c 100644 (file)
@@ -15,6 +15,7 @@
        "tog-hideminor": "Ìbòmọ́lẹ̀ àwọn àtúnṣe kékeré nínú àwọn àtúnse tuntun",
        "tog-hidepatrolled": "Ìbòmọ́lẹ̀ àwọn àtúnṣe oníìṣọ́ nínú àwọn àtúnṣe tuntun",
        "tog-newpageshidepatrolled": "Ìbòmọ́lẹ̀ àwọn ojúewé oníìṣọ́ lọ́dọ̀ àtòjọ ojúewé tuntun",
+       "tog-hidecategorization": "Ìbòmọ́lẹ̀ ìṣeẹ̀ka àwọn ojúewé",
        "tog-extendwatchlist": "Ìfẹ̀ àmójútó láti ṣ'àfihàn gbogbo àtúnṣe, kìí ṣe tuntun nìkan",
        "tog-usenewrc": "Ìtò àwọn àtúnṣe gẹ́gẹ́bí ojúewé nínú àwọn àtúnṣe tuntun àti ìmújútó",
        "tog-numberheadings": "Àwọn àkọlé nọmba-araẹni",
@@ -25,6 +26,7 @@
        "tog-watchdefault": "Ṣ'àfikún àwọn ojúewé àti fáìlì tí mo ṣ'àtúnse mọ́ ìmójútó mi",
        "tog-watchmoves": "Ṣ'àfikún àwọn ojúewé ati fáìlì tí mo yípò mọ́ ìmójútó mi",
        "tog-watchdeletion": "Ṣ'àfikún àwọn ojúewé àti fáìlì tí mo parẹ́ mọ́ ìmójútó mi",
+       "tog-watchuploads": "Ìdàpọ̀ àwọn fáìlì tuntun sí ìmójútó mi",
        "tog-minordefault": "Se àmì sí gbogbo àtúnse gẹ́gẹ́ bi kékeré lát'ìbẹ̀rẹ̀.",
        "tog-previewontop": "Se àyẹ̀wò kí ẹ tó s'àtúnṣe",
        "tog-previewonfirst": "S'àfihàn àgbéwò fún àtúnse àkọ́kọ́",
@@ -33,7 +35,7 @@
        "tog-enotifminoredits": "Fi e-mail ránṣẹ́ sí mi bákannà fún àtúnṣe kékékèé sí àwọn ojúewé àti fáìlì",
        "tog-enotifrevealaddr": "Ṣ'àfihàn àdírẹ́ẹ̀sì e-mail mi nínú àwọn ìránṣẹ́ e-mail",
        "tog-shownumberswatching": "S'àfihàn iye àwọn oníṣe tí wọn tẹjú mọ́ọ",
-       "tog-oldsig": "Ìtọwọ́bọ̀wé tówà:",
+       "tog-oldsig": "Ìtọwọ́bọ̀wé yín tówà lọ́wọ́:",
        "tog-fancysig": "Ṣe ìtọwọ́bọ̀wé bíi ìkọ wiki (láìní ìjápọ̀ fúnrararẹ̀)",
        "tog-uselivepreview": "Ìlo àkọ́kọ́yẹ̀wò lẹ́ṣẹ̀kẹṣẹ̀ (àdánwò)",
        "tog-forceeditsummary": "Kìlọ̀ fún mi tí àkótán àtúnṣe bá jẹ́ òfo",
        "passwordreset-emaildisabled": "Ìdálẹ́kun lílo email lórí wiki yìí.",
        "passwordreset-username": "Orúkọ oníṣe:",
        "passwordreset-domain": "Àbùgbé:",
-       "passwordreset-capture": "Wo e-mail tí yíò jáde?",
-       "passwordreset-capture-help": "Tí ẹ bá fagi sínú àpótí yìí, e-mail náà (pẹ̀lú ọ̀rọ̀ìpamọ́ onígbàdíẹ̀) yíò hàn si yín bákannáà yíò jẹ́ fífiránṣẹ́ sí oníṣe náà.",
        "passwordreset-email": "Àdírẹ̀sì e-mail:",
        "passwordreset-emailtitle": "Àwọn ẹ̀kúnrẹ́rẹ́ àpamọ́ lórí {{SITENAME}}",
        "passwordreset-emailtext-ip": "Ẹnìkan (bóyá ẹ̀yin ni, láti àdírẹ̀sì IP $1) tọrọ àtúntò ọ̀rọ̀ìpamọ́ yín fún {{SITENAME}} ($4). {{PLURAL:$3|Àkópamọ́|Àwọn àkópamọ́}} oníṣe ìsàlẹ̀ yìí ní ìbáṣe pọ̀ mọ́ àdírẹ̀sì e-mail yìí:\n\n$2\n\n{{PLURAL:$3|Ọ̀rọ̀ìpamọ́ onígbàdíẹ̀ yìí|Àwọn ọ̀rọ̀ìpamọ́ onígbàdíẹ̀ wọ̀nyí}} yíò dópin lẹ́yìn {{PLURAL:$5|ọjọ́ kan|ọjọ́ $5}}.\nẸ gbọ́dọ̀ lọ yan ọ̀rọ̀ìpamọ́ tuntun báyìí. Tóbá jẹ́ pé ẹ̀lòmíràn ló ṣe ìtọrọ yìí, tàbí tọ́bá jẹ́ pé ẹ ti rántí ọ̀rọ̀ìpamọ́ àtètèkọ́ṣe yín, tí ẹ kọ̀ sí fẹ́ yíipadà mọ́, ẹ lé ṣàìkàsí ìránṣẹ́ yìí, kí ẹ sì tẹ̀síwájú ní lo ọ̀rọ̀ìpamọ́ àtijọ́ yín.",
        "search-section": "(abala $1)",
        "search-suggest": "Ṣé ẹ fẹ́: $1",
        "search-interwiki-caption": "Àwọn iṣẹ́-ọwọ́ mìràn",
-       "search-interwiki-default": "èsì $1",
+       "search-interwiki-default": "Ã\81wá»\8dn Ã¨sì láti $1:",
        "search-interwiki-more": "(tókù)",
        "search-relatedarticle": "Tóbáramu",
        "searchrelated": "tóbáramu",
        "userrights-reason": "Ìdíẹ̀:",
        "userrights-no-interwiki": "Ẹ kò ní ìyọ̀nda láti ṣàtúnṣe àwọn ẹ̀tọ́ oníṣe lórí àwọn wiki míràn.",
        "userrights-nodatabase": "Ibùdó dátà $1 kò sí tàbí kò sí lábẹ́lé.",
-       "userrights-nologin": "Ẹ gbọ́dọ̀ [[Special:UserLogin|wọlé]] pẹ̀lú àpamọ́ alámòójútó láti pín àwọn ẹ̀tọ́ oníṣe.",
-       "userrights-notallowed": "Àpamọ́ yín kò ní ìyọ̀nda láti ṣàfikún tàbí ṣàyọkúrò àwọn ẹ̀tọ́ oníṣe.",
        "userrights-changeable-col": "Àwọn ẹgbẹ́ tí ẹ le túnṣe",
        "userrights-unchangeable-col": "Àwọn ẹgbẹ́ tí ẹ kò le túnṣe",
        "group": "Ìdìpọ̀:",
        "right-siteadmin": "Ìtìpa àti ìṣí ibùdó dátà",
        "right-override-export-depth": "Ìkójáde àwọn ojúewé lámùúpọ̀ mọ́ àwọn ojúewé jíjápọ̀ títí dé ìbú 5",
        "right-sendemail": "Fi e-mail ránṣẹ́ sí àwọn oníṣe míràn",
-       "right-passwordreset": "Ìwo àwọn e-mail fún ìtúntò ọ̀rọ̀ìpamọ́",
        "newuserlogpage": "Àkọsílẹ̀ ìdá oníṣe",
        "newuserlogpagetext": "Àkọọ́lẹ̀ àwọn ìdá oníṣe nì yí.",
        "rightslog": "Àwọn ẹ̀tọ́ oníṣe",
        "action-read": "wo ojúewé yìí",
        "action-edit": "ṣàtúnṣe ojúewé yìí",
        "action-createpage": "dá ojúewé yìí",
-       "action-createtalk": "dá ojúewé ìfọ̀rọ̀wérọ̀",
+       "action-createtalk": "dá ojúewé ìfọ̀rọ̀wérọ̀ yìí",
        "action-createaccount": "dá àpamọ́ oníṣe yìí",
        "action-minoredit": "fagisí àtúnṣe yìí gẹ́gẹ́ bíi kékeré",
        "action-move": "yípò ojúewé yìí",
        "upload-too-many-redirects": "URL náà ní àwọn àtúnjúwe pípọ̀jùlọ",
        "upload-http-error": "Àṣìṣe HTTP ti ṣẹlẹ̀: $1",
        "upload-copy-upload-invalid-domain": "Àwòkọ àwọn ìrùsókè kò sí láti apá yìí.",
+       "upload-dialog-title": "Ìrùsókè fáìlì",
+       "upload-dialog-button-cancel": "Fagilé",
+       "upload-dialog-button-back": "Ẹ̀yìn",
+       "upload-dialog-button-save": "Ìmúpamọ́",
+       "upload-dialog-button-upload": "Ìrùsókè",
+       "upload-form-label-infoform-title": "Àwọn ẹ̀kúnrẹ́rẹ́",
+       "upload-form-label-infoform-name": "Orúkọ",
+       "upload-form-label-infoform-description": "Ìjúwe",
+       "upload-form-label-usage-title": "Ìlò",
+       "upload-form-label-usage-filename": "Ọrúkọ fáìlì",
+       "upload-form-label-own-work": "Iṣẹ́-ọwọ́ mi ló jẹ́",
+       "upload-form-label-infoform-categories": "Àwọn ẹ̀ka",
+       "upload-form-label-infoform-date": "Ọjọ́ọdún",
        "backend-fail-stream": "Kò le ṣe ìgbéhànjáde fáìlì \"$1\".",
        "backend-fail-backup": "Kò le ṣe àwòkọpamọ́ fáìlì \"$1\".",
        "backend-fail-notexists": "Fáìlì $1 kò sí.",
        "license-nopreview": "(Àkọ́yẹ̀wò kò sí)",
        "upload_source_url": " (URL oníìbámu kan tó ṣe é bọ́sí látigboro)",
        "upload_source_file": "(fáìlì lórí kọ̀mpútà yín)",
-       "listfiles-summary": "Ojúewé pàtàkì yìí ṣe àfihàn gbogbo àwọn fáìlì àrùsókè.\nTó bá jẹ́ jíjọ̀ gẹ́gẹ́bí oníṣe, àwọn fáìlì tí oníṣe náà tí ru àtúnyẹ̀wò tuntun sòkè sí nìkan ni yíò hàn.",
+       "listfiles-delete": "ìparẹ́",
+       "listfiles-summary": "Ojúewé pàtàkì yìí ṣe àfihàn gbogbo àwọn fáìlì tí a rùsókè.",
        "listfiles_search_for": "Ṣàwàrí fún orúkọ amóhùnmáwòrán:",
        "imgfile": "fáìlì",
        "listfiles": "Àkójọ \tfáìlì",
        "mostrevisions": "Àwọn ojúewé pẹ̀lu àwọn àtúnyẹ̀wò tópọ̀jùlọ",
        "prefixindex": "Gbogbo ojúewé tó ní ìtọ́ka ìpele",
        "prefixindex-namespace": "Gbogbo ojúewé pẹ̀lú àlẹ̀mọ́wájú (orúkọàyè $1)",
+       "prefixindex-submit": "Ìfihàn",
        "shortpages": "Àwọn ojúewé kúkúrú",
        "longpages": "Ojúewé gúngùn",
        "deadendpages": "Àwọn ojúewé aláìníjàápọ́",
        "protectedpages-indef": "Àwọn àbò aláìlópin",
        "protectedpages-cascade": "Àwọn àbò atẹ̀léra nìkan",
        "protectedpagesempty": "Kò sí àwọn ojúewé kankan tó ní àbò pẹ̀lú àwọn pàrámítà wọ̀nyí.",
+       "protectedpages-page": "Ojúewé",
+       "protectedpages-expiry": "Ìparí",
        "protectedtitles": "Àwọn àkọlé ajẹ́dídáàbòbò",
        "protectedtitlesempty": "Kò sí àwọn àkolé kankan tó ní àbò pẹ̀lú àwọn pàrámítà wọ̀nyí.",
        "listusers": "Àkójọ àwọn oníṣe",
        "wlheader-showupdated": "Àwọn ojúewé tí wọn ti yípadà látìgbà tí ẹ ṣàbẹ̀wò wọn gbẹ̀yìn jẹ́ fífihàn ní ''kedere'''",
        "wlnote": "Lábẹ́ {{PLURAL:$1|ni àtúnṣe tó gbẹ̀yìn|ni àwọn àtúnṣe '''$1''' tí wọn gbẹ̀yìn}} ní {{PLURAL:$2|wákàtí kan|wákàtí '''$2'''}} sẹ́yìn, títí dí ọjọ́ $3, $4.",
        "wlshowlast": "Ìfihàn wákàtí $1 sẹ́yìn ọjọ́ $2 sẹ́yìn",
+       "watchlist-hide": "Ìbòmọ́lẹ̀",
+       "watchlist-submit": "Ìfihàn",
+       "wlshowhideminor": "àwọn àtúnṣe kékéèké",
+       "wlshowhidebots": "àwọn bot",
        "watchlist-options": "Àṣàyàn ìmójútọ́",
        "watching": "Ó ún mójútó...",
        "unwatching": "Jíjáwọ́ ìmójútó...",
        "rollback-success": "Ìdápadà àwọn àtúnṣe ti $1;\njẹ́ yíyípadà sí àtúnyẹ̀wò tógbẹ̀yìn látọwọ́ $2.",
        "sessionfailure-title": "Ìkùnà ètò iṣẹ́",
        "sessionfailure": "Ó dà wípé ìsòro wà pẹ̀lú ìwọlé yín;\na ti fagilé gbogbo ohun tí ẹ ti ṣe nísìnsinyì kí ẹlòmíràn ó mọ́ baà ji mú.\nẸ padà sí ojúewé tó kọjá, ẹ tún ojúewé náà gbéjáde, kí ẹ tó tún tó dán wó.",
+       "changecontentmodel-title-label": "Àkọlé ojúewé",
+       "changecontentmodel-reason-label": "Ìdíẹ̀:",
        "protectlogpage": "Àkọsílẹ̀ àbò",
        "protectlogtext": "Nísàlẹ̀ ni àtòjọ àwọn àtúnṣe sí àwọn àbò ojúewé.\nẸ wo [[Special:ProtectedPages|àtòjọ àwọn ojúewé aláàbò]] fún àtòjọ àwọn àbò ojúewé ìgbàyí.",
        "protectedarticle": "ti dá àbò bo \"[[$1]]\"",
        "whatlinkshere-hidelinks": "Ìjápọ̀ $1",
        "whatlinkshere-hideimages": "$1 àwọn ìjápọ̀ fáìlì",
        "whatlinkshere-filters": "Ajọ̀",
+       "whatlinkshere-submit": "Rìnsó",
        "autoblockid": "Ìdínàaláraẹni #$1",
        "block": "Dínà oníṣe",
        "unblock": "Ìmúkúrò ìdínà oníṣe",
        "movenotallowedfile": "Ẹ kò ní ìyọ̀nda láti yípò fáìlì.",
        "cant-move-user-page": "Ẹ kò ní ìyọ̀nda láti yípò àwọn ojúewé oníṣe (àyàfi láti ọ̀dọ̀ àwọn abẹ́ojúewé).",
        "cant-move-to-user-page": "Ẹ kò ní ìyọ̀nda láti yípò àwọn ojúewé sí ojúewé oníṣe (àyàfi sí abẹ́ojúewé oníṣe).",
-       "newtitle": "Sí àkọlé tuntun:",
+       "newtitle": "Àkọlé tuntun:",
        "move-watch": "Mójútó ojúewé yìí",
        "movepagebtn": "Yípò ojúewé",
        "pagemovedsub": "Ìyípò ti já sí rere",
        "movenosubpage": "Ojúewé yìí kò ní àwọn abẹ́ojúewé.",
        "movereason": "Ìdíẹ̀:",
        "revertmove": "dápadà",
-       "delete_and_move_text": "== Ìparẹ́ pọndandan ==\nOjúewé àdésí \"[[:$1]]\" wà tẹ́lẹ̀tẹ́lẹ̀.\nṢé ẹ fẹ́ paárẹ́ láti sínà fún ìyípò?",
+       "delete_and_move_text": "Ojúewé àdésí \"[[:$1]]\" wà tẹ́lẹ̀.\nṢé ẹ fẹ́ paárẹ́ láti sínà fún ìyípò?",
        "delete_and_move_confirm": "Bẹ́ẹ̀ni, pa ojúewé náà rẹ́",
        "delete_and_move_reason": "Jẹ́ píparẹ́ láti baà fi ayè lẹ̀ fún ìyípòdà láti \"[[$1]]\"",
        "selfmove": "Àwọn àkọlé orísun àti ibiàyè jẹ́ ọ̀kannáà;\nkò le yípò ojúewé padà sí ara rẹ̀.",
        "move-leave-redirect": "Ẹ fún ní àtúnjúwe",
        "protectedpagemovewarning": "'''Àkíyèsí:''' Ojúewé yìí ti jẹ́ dídáàbòbò nítoríẹ̀ àwọn olùmójútó tí wọ́n ní ẹ̀tọ́ nìkan ni wọ́n le yínípòpadà.\nÀkọọ́lẹ̀ àìpẹ́ nìyí nísàlẹ̀ fún ìtọ́kasí:",
        "semiprotectedpagemovewarning": "'''Àkíyèsí:''' Ojúewé yìí ti jẹ́ dídáàbòbò nítoríẹ̀ àwọn oníṣe tí wọ́n ti forúkọsílẹ̀ nìkan ni wọ́n le yínípòpadà.\nÀkọọ́lẹ̀ àìpẹ́ nìyí nísàlẹ̀ fún ìtọ́kasí:",
-       "move-over-sharedrepo": "==Fáìlì wà ==\n[[:$1]] wà lórí ibi-àkójọ àjọpín kan. Ìyípò fáìlì kan padà sí àkọlé yìí yíò gun fáìlì àjọpin náà lórí.",
+       "move-over-sharedrepo": "[[:$1]] wà lórí ibi-àkójọ àjọpín kan. Ìyípò fáìlì kan padà sí àkọlé yìí yíò gun fáìlì àjọpin náà lórí.",
        "file-exists-sharedrepo": "Orúkọ fáìlì tí ẹ yàn pilẹ̀ tí únjẹ́ lílò lórí ibi-àkójọ àjọpín kan.\nẸ jọ̀wọ́ ẹ yan orúkọ míràn.",
        "export": "Ìkójáde àwọn ojúewé",
        "exporttext": "Ẹ le ṣàkójáde ìkọ̀rọ̀ àti ìtàn àtúnṣe ojúewé pàtó kan tàbí àpapọ̀ àwọn ojúewé tí a fi XML yí.\nÈyí ṣe é kówọlé sínú wiki míràn pẹ̀lú MediaWiki láti orí [[Special:Import|ìkówọlé ojúewé]].\n\nLáti ṣàkójáde àwọn ojúewé, ẹ tẹ àkọlé wọn sínú àpótí ọ̀rọ̀ ìsàlẹ̀, àkọlé kan lórí ìlà kan, kí ẹ sì sọ bóyá ẹ fẹ́ àtúnyẹ̀wò ìwòyí àti àwọn àtúnyẹ̀wò tó ti pẹ́, pẹ̀lú ìlà ìtàn ojúewé, tàbí àtúnyẹ̀wò ìwòyí pẹ̀lú ẹ̀kúnrẹ́rẹ́ ọ̀rọ̀ nípa àtúnṣe tó gbẹ̀yìn.\n\nẸ tún le lo àjápọ̀, fún àpẹrẹ  [[{{#Special:Export}}/{{MediaWiki:Mainpage}}]] fún ojúewé \"[[{{MediaWiki:Mainpage}}]]\".",
        "allmessages-prefix": "Ajọ̀ pẹ̀lú àlẹ̀mọ́wájú:",
        "allmessages-language": "Èdè:",
        "allmessages-filter-submit": "Lọ",
+       "allmessages-filter-translate": "Y'édèpadà",
        "thumbnail-more": "Ìmútóbi",
        "filemissing": "Fáìlì kò sí",
        "thumbnail_error": "Asìṣẹ ìdá àwòrán kékeré: $1",
        "patrol-log-page": "Àkọọ́lẹ̀ ìsọ́",
        "patrol-log-header": "Àkọọ́lẹ̀ àwọn àtúnyẹ̀wò sísọ́ nì yí.",
        "log-show-hide-patrol": "$1 àkọọ́lẹ̀ ìsọ́",
+       "confirm-markpatrolled-button": "OK",
        "deletedrevision": "Àtúnyẹ̀wò àtijọ́ píparẹ́ $1",
        "filedeleteerror-short": "Àsìṣe ìparẹ́ fáílì: $1",
        "filedeleteerror-long": "Àwọn àsìṣe ṣẹlẹ̀ nígbà ìṣeìparẹ́ fáìlì náà:\n\n$1",
        "minutes": "{{PLURAL:$1|ìṣẹ́jú $1}}",
        "hours": "{{PLURAL:$1|wákàtí $1}}",
        "days": "{{PLURAL:$1|ọjọ́ $1}}",
+       "weeks": "{{PLURAL:$1|ọ̀sẹ̀ $1|ọ̀sẹ̀ $1}}",
        "months": "{{PLURAL:$1|oṣù $1|oṣù $1}}",
        "years": "{{PLURAL:$1|ọdún $1|ọdún $1}}",
        "ago": "$1 sẹ́yìn",
        "just-now": "nísinsìnyí",
+       "hours-ago": "{{PLURAL:$1|wákàtí|wákàtí}} $1 ṣẹ́yìn",
+       "minutes-ago": "{{PLURAL:$1|ìṣẹ́jú|ìṣẹ́jú}} $1 ṣẹ́yìn",
+       "seconds-ago": "{{PLURAL:$1|ìṣẹ́júàáyá|ìṣẹ́júàáyá}} $1 ṣẹ́yìn",
        "monday-at": "Ọjọ́ajé ní ago $1",
        "tuesday-at": "Ọjọ́ìṣẹ́gun ní ago $1",
        "wednesday-at": "Ọjọ́rú ní ago $1",
        "confirm-watch-top": "Ṣe ìfikún ojúewé yìí mọ́ ìmójútó yín?",
        "confirm-unwatch-button": "OK",
        "confirm-unwatch-top": "Yọ ojúewé yìí kúrò nínú ìmójútó yín?",
+       "quotation-marks": "\"$1\"",
        "imgmultipageprev": "← ojúewé tókọjá",
        "imgmultipagenext": "ojúewé tóúnbọ̀ →",
        "imgmultigo": "Lọ!",
        "special-characters-group-gujarati": "Gujarati",
        "special-characters-group-thai": "Thai",
        "special-characters-group-lao": "Lao",
-       "special-characters-group-khmer": "Khmer",
-       "edit-error-short": "Àṣìṣe: $1",
-       "edit-error-long": "Àwọn àsìṣe:\n\n\n$1"
+       "special-characters-group-khmer": "Khmer"
 }
index 954d911..84b107e 100644 (file)
@@ -13,7 +13,7 @@
  * @author Numulunj pilgae
  */
 
-$fallbak = 'ru';
+$fallback = 'ru';
 
 $namespaceNames = [
        NS_MEDIA            => 'Медиа',
index 838ea33..29627a6 100644 (file)
@@ -12,6 +12,8 @@
  * @author Reder
  */
 
+$fallback = 'it';
+
 $specialPageAliases = [
        'Allmessages'               => [ 'TutteLeMessagge' ],
        'Preferences'               => [ 'Preferenze' ],
index 369e0be..0c381e5 100644 (file)
@@ -58,7 +58,6 @@ $separatorTransformTable = [
        '.' => ','
 ];
 
-$fallback = 'ru';
 $fallback8bitEncoding = 'windows-1251';
 $linkPrefixExtension = true;
 
@@ -86,11 +85,23 @@ $namespaceAliases = [
        'Зображення' => NS_FILE,
        'Обговорення_зображення' => NS_FILE_TALK,
        'Обговорення_шаблона' => NS_TEMPLATE_TALK,
+       // Backwards compatibility from Russian
+       'Медиа' => NS_MEDIA,
+       'Служебная' => NS_SPECIAL,
+       'Обсуждение' => NS_TALK,
+       'Участник' => NS_USER,
+       'Обсуждение_участника' => NS_USER_TALK,
+       'Обсуждение_файла' => NS_FILE_TALK,
+       'Обсуждение_MediaWiki' => NS_MEDIAWIKI_TALK,
+       'Обсуждение_шаблона' => NS_TEMPLATE_TALK,
+       'Справка' => NS_HELP,
+       'Обсуждение_справки' => NS_HELP_TALK,
+       'Категория' => NS_CATEGORY,
+       'Обсуждение_категории' => NS_CATEGORY_TALK,
+       'Изображение' => NS_FILE,
+       'Обсуждение_изображения' => NS_FILE_TALK,
 ];
 
-// Remove Russian aliases
-$namespaceGenderAliases = [];
-
 $dateFormats = [
        'mdy time' => 'H:i',
        'mdy date' => 'xg j, Y',
@@ -113,108 +124,109 @@ $bookstoreList = [
        'Amazon.com' => 'http://www.amazon.com/exec/obidos/ISBN=$1'
 ];
 
+// Russian names are kept for backwards compatibility
 $specialPageAliases = [
-       'Activeusers'               => [ 'Активні_дописувачі' ],
-       'Allmessages'               => [ 'Системні_повідомлення' ],
-       'AllMyUploads'              => [ 'Усі_мої_файли' ],
-       'Allpages'                  => [ 'Усі_сторінки' ],
+       'Activeusers'               => [ 'Активні_дописувачі', 'Активные_участники' ],
+       'Allmessages'               => [ 'Системні_повідомлення', 'Системные_сообщения' ],
+       'AllMyUploads'              => [ 'Усі_мої_файли', 'Все_мои_файлы' ],
+       'Allpages'                  => [ 'Усі_сторінки', 'Все_страницы' ],
        'Ancientpages'              => [ 'Давні_сторінки' ],
-       'Badtitle'                  => [ 'Помилковий_заголовок' ],
-       'Blankpage'                 => [ 'Порожня_сторінка' ],
-       'Block'                     => [ 'Заблокувати' ],
-       'Booksources'               => [ 'Джерела_книг' ],
-       'BrokenRedirects'           => [ 'Розірвані_перенаправлення' ],
-       'Categories'                => [ 'Категорії' ],
-       'ChangeEmail'               => [ 'Змінити_e-mail' ],
-       'ChangePassword'            => [ 'Змінити_пароль' ],
-       'ComparePages'              => [ 'Порівняння_сторінок' ],
-       'Confirmemail'              => [ 'Підтвердити_e-mail' ],
-       'Contributions'             => [ 'Внесок' ],
-       'CreateAccount'             => [ 'Створити_обліковий_запис' ],
-       'Deadendpages'              => [ 'Сторінки_без_посилань' ],
-       'DeletedContributions'      => [ 'Вилучений_внесок' ],
-       'DoubleRedirects'           => [ 'Подвійні_перенаправлення' ],
-       'EditWatchlist'             => [ 'Редагувати_список_спостереження' ],
-       'Emailuser'                 => [ 'Лист_користувачеві' ],
-       'ExpandTemplates'           => [ 'Розгортання_шаблонів' ],
-       'Export'                    => [ 'Експорт' ],
-       'Fewestrevisions'           => [ 'Найменшредаговані' ],
-       'FileDuplicateSearch'       => [ 'Пошук_дублікатів_файлів' ],
-       'Filepath'                  => [ 'Шлях_до_файлу' ],
-       'Import'                    => [ 'Імпорт' ],
-       'Invalidateemail'           => [ 'Неперевірена_email-адреса' ],
-       'JavaScriptTest'            => [ 'JavaScript_тест' ],
-       'BlockList'                 => [ 'Список_блокувань', 'Блокування', 'Блокування_IP-адрес' ],
-       'LinkSearch'                => [ 'Пошук_посилань' ],
-       'Listadmins'                => [ 'Список_адміністраторів' ],
-       'Listbots'                  => [ 'Список_ботів' ],
-       'Listfiles'                 => [ 'Список_файлів' ],
-       'Listgrouprights'           => [ 'Список_прав_груп', 'Права_груп_користувачів' ],
-       'Listredirects'             => [ 'Список_перенаправлень' ],
-       'ListDuplicatedFiles'       => [ 'Список_дубльованих_файлів' ],
-       'Listusers'                 => [ 'Список_користувачів' ],
-       'Lockdb'                    => [ 'Заблокувати_базу_даних' ],
-       'Log'                       => [ 'Журнали' ],
-       'Lonelypages'               => [ 'Ізольовані_сторінки' ],
-       'Longpages'                 => [ 'Найдовші_сторінки' ],
-       'MergeHistory'              => [ 'Об\'єднання_історії' ],
-       'MIMEsearch'                => [ 'Пошук_за_MIME' ],
-       'Mostcategories'            => [ 'Найбільш_категоризовані' ],
-       'Mostimages'                => [ 'Найуживаніші_файли' ],
-       'Mostinterwikis'            => [ 'Найбільше_інтервікі' ],
-       'Mostlinked'                => [ 'Найуживаніші_сторінки', 'Найбільше_посилань' ],
-       'Mostlinkedcategories'      => [ 'Найуживаніші_категорії' ],
-       'Mostlinkedtemplates'       => [ 'Найуживаніші_шаблони' ],
-       'Mostrevisions'             => [ 'Найбільш_редаговані' ],
-       'Movepage'                  => [ 'Перейменувати' ],
-       'Mycontributions'           => [ 'Мій_внесок' ],
-       'MyLanguage'                => [ 'Моя_мова' ],
-       'Mypage'                    => [ 'Моя_сторінка' ],
-       'Mytalk'                    => [ 'Моє_обговорення' ],
-       'Myuploads'                 => [ 'Мої_завантаження' ],
-       'Newimages'                 => [ 'Нові_файли' ],
-       'Newpages'                  => [ 'Нові_сторінки' ],
-       'PasswordReset'             => [ 'Скинути_пароль' ],
-       'PermanentLink'             => [ 'Постійне_посилання' ],
-       'Preferences'               => [ 'Налаштування' ],
-       'Prefixindex'               => [ 'Покажчик_за_початком_назви' ],
-       'Protectedpages'            => [ 'Захищені_сторінки' ],
-       'Protectedtitles'           => [ 'Захищені_назви_сторінок' ],
-       'Randompage'                => [ 'Випадкова_сторінка' ],
-       'Randomredirect'            => [ 'Випадкове_перенаправлення' ],
-       'Recentchanges'             => [ 'Нові_редагування' ],
-       'Recentchangeslinked'       => [ 'Пов\'язані_редагування' ],
+       'Badtitle'                  => [ 'Помилковий_заголовок', 'Недопустимое_название' ],
+       'Blankpage'                 => [ 'Порожня_сторінка', 'Пустая_страница' ],
+       'Block'                     => [ 'Заблокувати', 'Заблокировать' ],
+       'Booksources'               => [ 'Джерела_книг', 'Источники_книг' ],
+       'BrokenRedirects'           => [ 'Розірвані_перенаправлення', 'Разорванные_перенаправления' ],
+       'Categories'                => [ 'Категорії', 'Категории' ],
+       'ChangeEmail'               => [ 'Змінити_e-mail', 'Сменить_e-mail', 'Сменить_почту' ],
+       'ChangePassword'            => [ 'Змінити_пароль', 'Сменить_пароль' ],
+       'ComparePages'              => [ 'Порівняння_сторінок', 'Сравнение_страниц' ],
+       'Confirmemail'              => [ 'Підтвердити_e-mail', 'Подтвердить_e-mail', 'Подтвердить_почту' ],
+       'Contributions'             => [ 'Внесок', 'Вклад' ],
+       'CreateAccount'             => [ 'Створити_обліковий_запис', 'Создать_учётную_запись', 'Создать_пользователя', 'Зарегистрироваться' ],
+       'Deadendpages'              => [ 'Сторінки_без_посилань', 'Тупиковые_страницы' ],
+       'DeletedContributions'      => [ 'Вилучений_внесок', 'Удалённый_вклад' ],
+       'DoubleRedirects'           => [ 'Подвійні_перенаправлення', 'Двойные_перенаправления' ],
+       'EditWatchlist'             => [ 'Редагувати_список_спостереження', 'Править_список_наблюдения' ],
+       'Emailuser'                 => [ 'Лист_користувачеві', 'Письмо_участнику', 'Отправить_письмо' ],
+       'ExpandTemplates'           => [ 'Розгортання_шаблонів', 'Развёртка_шаблонов' ],
+       'Export'                    => [ 'Експорт', 'Экспорт', 'Выгрузка' ],
+       'Fewestrevisions'           => [ 'Найменшредаговані', 'Редко_редактируемые' ],
+       'FileDuplicateSearch'       => [ 'Пошук_дублікатів_файлів', 'Поиск_дубликатов_файлов' ],
+       'Filepath'                  => [ 'Шлях_до_файлу', 'Путь_к_файлу' ],
+       'Import'                    => [ 'Імпорт', 'Импорт' ],
+       'Invalidateemail'           => [ 'Неперевірена_email-адреса', 'Отменить_подтверждение_адреса' ],
+       'JavaScriptTest'            => [ 'JavaScript_тест', 'Тестирование_JavaScript' ],
+       'BlockList'                 => [ 'Список_блокувань', 'Блокування', 'Блокування_IP-адрес', 'Список_блокировок', 'Блокировки' ],
+       'LinkSearch'                => [ 'Пошук_посилань', 'Поиск_ссылок' ],
+       'Listadmins'                => [ 'Список_адміністраторів', 'Список_администраторов' ],
+       'Listbots'                  => [ 'Список_ботів', 'Список_ботов' ],
+       'Listfiles'                 => [ 'Список_файлів', 'Список_файлов', 'Список_изображений' ],
+       'Listgrouprights'           => [ 'Список_прав_груп', 'Права_груп_користувачів', 'Права_групп_участников', 'Список_прав_групп' ],
+       'Listredirects'             => [ 'Список_перенаправлень', 'Список_перенаправлений' ],
+       'ListDuplicatedFiles'       => [ 'Список_дубльованих_файлів', 'Список_файлов-дубликатов' ],
+       'Listusers'                 => [ 'Список_користувачів', 'Список_участников' ],
+       'Lockdb'                    => [ 'Заблокувати_базу_даних', 'Заблокировать_БД', 'Заблокировать_базу_данных' ],
+       'Log'                       => [ 'Журнали', 'Журналы', 'Журнал' ],
+       'Lonelypages'               => [ 'Ізольовані_сторінки', 'Изолированные_страницы' ],
+       'Longpages'                 => [ 'Найдовші_сторінки', 'Длинные_страницы' ],
+       'MergeHistory'              => [ 'Об\'єднання_історії', 'Объединение_историй' ],
+       'MIMEsearch'                => [ 'Пошук_за_MIME', 'Поиск_по_MIME' ],
+       'Mostcategories'            => [ 'Найбільш_категоризовані', 'Самые_категоризованные' ],
+       'Mostimages'                => [ 'Найуживаніші_файли', 'Самые_используемые_файлы' ],
+       'Mostinterwikis'            => [ 'Найбільше_інтервікі', 'Наибольшее_количество_интервики-ссылок' ],
+       'Mostlinked'                => [ 'Найуживаніші_сторінки', 'Найбільше_посилань', 'Самые_используемые_страницы' ],
+       'Mostlinkedcategories'      => [ 'Найуживаніші_категорії', 'Самые_используемые_категории' ],
+       'Mostlinkedtemplates'       => [ 'Найуживаніші_шаблони', 'Самые_используемые_шаблоны' ],
+       'Mostrevisions'             => [ 'Найбільш_редаговані', 'Наибольшее_количество_версий' ],
+       'Movepage'                  => [ 'Перейменувати', 'Переименовать_страницу', 'Переименование', 'Переименовать' ],
+       'Mycontributions'           => [ 'Мій_внесок', 'Мой_вклад' ],
+       'MyLanguage'                => [ 'Моя_мова', 'Мой_язык' ],
+       'Mypage'                    => [ 'Моя_сторінка', 'Моя_страница' ],
+       'Mytalk'                    => [ 'Моє_обговорення', 'Моё_обсуждение' ],
+       'Myuploads'                 => [ 'Мої_завантаження', 'Мои_загрузки' ],
+       'Newimages'                 => [ 'Нові_файли', 'Новые_файлы' ],
+       'Newpages'                  => [ 'Нові_сторінки', 'Новые_страницы' ],
+       'PasswordReset'             => [ 'Скинути_пароль', 'Сброс_пароля' ],
+       'PermanentLink'             => [ 'Постійне_посилання', 'Постоянная_ссылка' ],
+       'Preferences'               => [ 'Налаштування', 'Настройки' ],
+       'Prefixindex'               => [ 'Покажчик_за_початком_назви', 'Указатель_по_началу_названия' ],
+       'Protectedpages'            => [ 'Захищені_сторінки', 'Защищённые_страницы' ],
+       'Protectedtitles'           => [ 'Захищені_назви_сторінок', 'Защищённые_названия' ],
+       'Randompage'                => [ 'Випадкова_сторінка', 'Случайная_страница', 'Случайная' ],
+       'Randomredirect'            => [ 'Випадкове_перенаправлення', 'Случайное_перенаправление' ],
+       'Recentchanges'             => [ 'Нові_редагування', 'Свежие_правки' ],
+       'Recentchangeslinked'       => [ 'Пов\'язані_редагування', 'Связанные_правки' ],
        'Redirect'                  => [ 'Перенаправлення' ],
-       'Revisiondelete'            => [ 'Вилучити_редагування' ],
-       'Search'                    => [ 'Пошук' ],
-       'Shortpages'                => [ 'Короткі_сторінки' ],
-       'Specialpages'              => [ 'Спеціальні_сторінки' ],
+       'Revisiondelete'            => [ 'Вилучити_редагування', 'Удаление_правки' ],
+       'Search'                    => [ 'Пошук', 'Поиск' ],
+       'Shortpages'                => [ 'Короткі_сторінки', 'Короткие_страницы' ],
+       'Specialpages'              => [ 'Спеціальні_сторінки', 'Спецстраницы' ],
        'Statistics'                => [ 'Статистика' ],
-       'Tags'                      => [ 'Мітки' ],
-       'Unblock'                   => [ 'Розблокувати' ],
-       'Uncategorizedcategories'   => [ 'Некатегоризовані_категорії' ],
-       'Uncategorizedimages'       => [ 'Некатегоризовані_файли' ],
-       'Uncategorizedpages'        => [ 'Некатегоризовані_сторінки' ],
-       'Uncategorizedtemplates'    => [ 'Некатегоризовані_шаблони' ],
-       'Undelete'                  => [ 'Відновити' ],
-       'Unlockdb'                  => [ 'Розблокувати_базу_даних' ],
-       'Unusedcategories'          => [ 'Порожні_категорії' ],
-       'Unusedimages'              => [ 'Невикористані_файли' ],
-       'Unusedtemplates'           => [ 'Невикористані_шаблони' ],
+       'Tags'                      => [ 'Мітки', 'Метки' ],
+       'Unblock'                   => [ 'Розблокувати', 'Разблокировка' ],
+       'Uncategorizedcategories'   => [ 'Некатегоризовані_категорії', 'Некатегоризованные_категории' ],
+       'Uncategorizedimages'       => [ 'Некатегоризовані_файли', 'Некатегоризованные_файлы' ],
+       'Uncategorizedpages'        => [ 'Некатегоризовані_сторінки', 'Некатегоризованные_страницы' ],
+       'Uncategorizedtemplates'    => [ 'Некатегоризовані_шаблони', 'Некатегоризованные_шаблоны' ],
+       'Undelete'                  => [ 'Відновити', 'Восстановить', 'Восстановление' ],
+       'Unlockdb'                  => [ 'Розблокувати_базу_даних', 'Разблокировка_БД' ],
+       'Unusedcategories'          => [ 'Порожні_категорії', 'Неиспользуемые_категории' ],
+       'Unusedimages'              => [ 'Невикористані_файли', 'Неиспользуемые_файлы' ],
+       'Unusedtemplates'           => [ 'Невикористані_шаблони', 'Неиспользуемые_шаблоны' ],
        'Unwatchedpages'            => [ 'Неспостережувані' ],
-       'Upload'                    => [ 'Завантаження' ],
-       'UploadStash'               => [ 'Приховане_завантаження' ],
-       'Userlogin'                 => [ 'Вхід' ],
-       'Userlogout'                => [ 'Вихід' ],
-       'Userrights'                => [ 'Керування_правами_користувачів' ],
-       'Version'                   => [ 'Версія' ],
-       'Wantedcategories'          => [ 'Потрібні_категорії' ],
-       'Wantedfiles'               => [ 'Потрібні_файли' ],
-       'Wantedpages'               => [ 'Потрібні_сторінки' ],
-       'Wantedtemplates'           => [ 'Потрібні_шаблони' ],
-       'Watchlist'                 => [ 'Список_спостереження' ],
-       'Whatlinkshere'             => [ 'Посилання_сюди' ],
-       'Withoutinterwiki'          => [ 'Без_інтервікі' ],
+       'Upload'                    => [ 'Завантаження', 'Загрузка' ],
+       'UploadStash'               => [ 'Приховане_завантаження', 'Скрытная_загрузка' ],
+       'Userlogin'                 => [ 'Вхід', 'Вход' ],
+       'Userlogout'                => [ 'Вихід', 'Завершение_сеанса', 'Выход' ],
+       'Userrights'                => [ 'Керування_правами_користувачів', 'Управление_правами' ],
+       'Version'                   => [ 'Версія', 'Версия' ],
+       'Wantedcategories'          => [ 'Потрібні_категорії', 'Требуемые_категории' ],
+       'Wantedfiles'               => [ 'Потрібні_файли', 'Требуемые_файлы' ],
+       'Wantedpages'               => [ 'Потрібні_сторінки', 'Требуемые_страницы' ],
+       'Wantedtemplates'           => [ 'Потрібні_шаблони', 'Требуемые_шаблоны' ],
+       'Watchlist'                 => [ 'Список_спостереження', 'Список_наблюдения' ],
+       'Whatlinkshere'             => [ 'Посилання_сюди', 'Ссылки_сюда' ],
+       'Withoutinterwiki'          => [ 'Без_інтервікі', 'Без_интервики' ],
 ];
 
 $magicWords = [
@@ -368,8 +380,8 @@ $magicWords = [
        'pagesincategory_all'       => [ '0', 'усе', 'все', 'all' ],
        'pagesincategory_pages'     => [ '0', 'сторінки', 'страницы', 'pages' ],
        'pagesincategory_subcats'   => [ '0', 'підкатегорії', 'подкатегории', 'subcats' ],
+       'pagesincategory_files'     => [ '0', 'файли', 'файлы', 'files' ],
 ];
 
 $linkTrail = '/^([a-zабвгґдеєжзиіїйклмнопрстуфхцчшщьєюяёъы“»]+)(.*)$/sDu';
 $linkPrefixCharset = '„«';
-
index aad85da..9fe5009 100644 (file)
@@ -27,6 +27,7 @@
                                        "mw.notification",
                                        "mw.Notification_",
                                        "mw.storage",
+                                       "mw.storage.session",
                                        "mw.user",
                                        "mw.util",
                                        "mw.plugin.*",
index c6bd794..b41e0e0 100644 (file)
@@ -28,6 +28,10 @@ require_once __DIR__ . '/Maintenance.php';
  *  populateContentModel.php --ns=1 --table=page
  */
 class PopulateContentModel extends Maintenance {
+       protected $wikiId;
+
+       protected $wanCache;
+
        public function __construct() {
                parent::__construct();
                $this->addDescription( 'Populate the various content_* fields' );
@@ -38,6 +42,11 @@ class PopulateContentModel extends Maintenance {
 
        public function execute() {
                $dbw = $this->getDB( DB_MASTER );
+
+               $this->wikiId = $dbw->getWikiID();
+
+               $this->wanCache = ObjectCache::getMainWANInstance();
+
                $ns = $this->getOption( 'ns' );
                if ( !ctype_digit( $ns ) && $ns !== 'all' ) {
                        $this->error( 'Invalid namespace', 1 );
@@ -57,6 +66,18 @@ class PopulateContentModel extends Maintenance {
                }
        }
 
+       protected function clearCache( $page_id, $rev_id ) {
+               $contentModelKey = $this->wanCache->makeKey( 'page', 'content-model', $rev_id );
+               $revisionKey =
+                       $this->wanCache->makeGlobalKey( 'revision', $this->wikiId, $page_id, $rev_id );
+
+               // WikiPage content model cache
+               $this->wanCache->delete( $contentModelKey );
+
+               // Revision object cache, which contains a content model
+               $this->wanCache->delete( $revisionKey );
+       }
+
        private function updatePageRows( Database $dbw, $pageIds, $model ) {
                $count = count( $pageIds );
                $this->output( "Setting $count rows to $model..." );
@@ -117,6 +138,7 @@ class PopulateContentModel extends Maintenance {
                        [ $key => $ids ],
                        __METHOD__
                );
+
                $this->output( "done.\n" );
        }
 
@@ -130,19 +152,27 @@ class PopulateContentModel extends Maintenance {
                        $fields = [ 'ar_namespace', 'ar_title' ];
                        $join_conds = [];
                        $where = $ns === 'all' ? [] : [ 'ar_namespace' => $ns ];
+                       $page_id_column = 'ar_page_id';
+                       $rev_id_column = 'ar_rev_id';
                } else { // revision
                        $selectTables = [ 'revision', 'page' ];
                        $fields = [ 'page_title', 'page_namespace' ];
                        $join_conds = [ 'page' => [ 'INNER JOIN', 'rev_page=page_id' ] ];
                        $where = $ns === 'all' ? [] : [ 'page_namespace' => $ns ];
+                       $page_id_column = 'rev_page';
+                       $rev_id_column = 'rev_id';
                }
 
                $toSave = [];
+               $idsToClear = [];
                $lastId = 0;
                do {
                        $rows = $dbw->select(
                                $selectTables,
-                               array_merge( $fields, [ $model_column, $format_column, $key ] ),
+                               array_merge(
+                                       $fields,
+                                       [ $model_column, $format_column, $key, $page_id_column, $rev_id_column ]
+                               ),
                                // @todo support populating format if model is already set
                                [
                                        $model_column => null,
@@ -174,9 +204,17 @@ class PopulateContentModel extends Maintenance {
                                if ( $dbModel === null && $dbFormat === null ) {
                                        // Set the defaults
                                        $toSave[$defaultModel][] = $row->{$key};
+                                       $idsToClear[] = [
+                                               'page_id' => $row->{$page_id_column},
+                                               'rev_id' => $row->{$rev_id_column},
+                                       ];
                                } else { // $dbModel === null, $dbFormat set.
                                        if ( $dbFormat === $defaultFormat ) {
                                                $toSave[$defaultModel][] = $row->{$key};
+                                               $idsToClear[] = [
+                                                       'page_id' => $row->{$page_id_column},
+                                                       'rev_id' => $row->{$rev_id_column},
+                                               ];
                                        } else { // non-default format, just update now
                                                $this->output( "Updating model to match format for $table $id of $title... " );
                                                $dbw->update(
@@ -186,6 +224,7 @@ class PopulateContentModel extends Maintenance {
                                                        __METHOD__
                                                );
                                                wfWaitForSlaves();
+                                               $this->clearCache( $row->{$page_id_column}, $row->{$rev_id_column} );
                                                $this->output( "done.\n" );
                                                continue;
                                        }
@@ -200,6 +239,10 @@ class PopulateContentModel extends Maintenance {
                foreach ( $toSave as $model => $ids ) {
                        $this->updateRevisionOrArchiveRows( $dbw, $ids, $model, $table );
                }
+
+               foreach ( $idsToClear as $idPair ) {
+                       $this->clearCache( $idPair['page_id'], $idPair['rev_id'] );
+               }
        }
 }
 
index 31b2101..f6bb253 100644 (file)
@@ -41,8 +41,8 @@ class Protect extends Maintenance {
        }
 
        public function execute() {
-               $userName = $this->getOption( 'u', false );
-               $reason = $this->getOption( 'r', '' );
+               $userName = $this->getOption( 'user', false );
+               $reason = $this->getOption( 'reason', '' );
 
                $cascade = $this->hasOption( 'cascade' );
 
index 587a84d..b37febd 100644 (file)
@@ -2289,6 +2289,32 @@ return [
                ],
                'targets' => [ 'desktop', 'mobile' ],
        ],
+       'mediawiki.widgets.MediaSearch' => [
+               'scripts' => [
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js',
+               ],
+               'styles' => [
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.css',
+                       'resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.css',
+               ],
+               'dependencies' => [
+                       'oojs-ui-widgets',
+                       'mediawiki.ForeignApi',
+                       'mediawiki.Title',
+               ],
+               'messages' => [
+                       'mw-widgets-mediasearch-noresults',
+                       'mw-widgets-mediasearch-input-placeholder',
+               ],
+               'targets' => [ 'desktop', 'mobile' ],
+       ],
        'mediawiki.widgets.UserInputWidget' => [
                'scripts' => [
                        'resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js',
index 8538417..98835d5 100644 (file)
@@ -24,6 +24,7 @@
        "ooui-dialog-process-dismiss": "Απόρριψη",
        "ooui-dialog-process-retry": "Δοκιμάστε ξανά",
        "ooui-dialog-process-continue": "Συνέχεια",
+       "ooui-selectfile-button-select": "Επιλέξτε ένα αρχείο",
        "ooui-selectfile-not-supported": "Επιλογή αρχείου δεν υποστηρίζεται",
        "ooui-selectfile-placeholder": "Κανένα αρχείο δεν είναι επιλεγμένο",
        "ooui-selectfile-dragdrop-placeholder": "Σύρετε το αρχείο εδώ"
index 542447d..a96ae13 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
index bcc3778..e5e6252 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-element-hidden {
   display: none !important;
index e7c2ee0..6a31fe8 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-element-hidden {
   display: none !important;
   box-shadow: none;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
-  color: #c33;
+  color: #d33;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover > .oo-ui-labelElement-label {
-  color: #e53939;
+  color: #ff4242;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active > .oo-ui-labelElement-label,
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button > .oo-ui-labelElement-label {
-  color: #873636;
+  color: #b32424;
   box-shadow: none;
 }
 .oo-ui-buttonElement-frameless.oo-ui-widget-enabled[class*='oo-ui-flaggedElement'] > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon,
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled > .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button {
-  background-color: #d9d9d9;
+  background-color: #c8ccd1;
   color: #000;
   border-color: #72777d;
 }
   box-shadow: inset 0 0 0 1px #36c;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button {
-  color: #c33;
+  color: #d33;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
   background-color: #fff;
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active:focus,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
-  background-color: #fbf4f4;
-  color: #873636;
-  border-color: #873636;
+  background-color: #ffffff;
+  color: #b32424;
+  border-color: #b32424;
   box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:focus {
-  border-color: #c33;
-  box-shadow: inset 0 0 0 1px #c33;
+  border-color: #d33;
+  box-shadow: inset 0 0 0 1px #d33;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-progressive > .oo-ui-buttonElement-button {
   color: #fff;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button {
   color: #fff;
-  background-color: #c33;
-  border-color: #c33;
+  background-color: #d33;
+  border-color: #d33;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:hover {
-  background-color: #e53939;
-  border-color: #e53939;
+  background-color: #ff4242;
+  border-color: #ff4242;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:active:focus,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-pressed > .oo-ui-buttonElement-button,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive.oo-ui-buttonElement-active > .oo-ui-buttonElement-button {
   color: #fff;
-  background-color: #873636;
-  border-color: #873636;
+  background-color: #b32424;
+  border-color: #b32424;
   box-shadow: none;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary.oo-ui-flaggedElement-destructive > .oo-ui-buttonElement-button:focus {
-  border-color: #c33;
-  box-shadow: inset 0 0 0 1px #c33, inset 0 0 0 2px #fff;
+  border-color: #d33;
+  box-shadow: inset 0 0 0 1px #d33, inset 0 0 0 2px #fff;
 }
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary > .oo-ui-buttonElement-button > .oo-ui-iconElement-icon,
 .oo-ui-buttonElement-framed.oo-ui-widget-enabled.oo-ui-flaggedElement-primary > .oo-ui-buttonElement-button > .oo-ui-indicatorElement-indicator {
 }
 .oo-ui-fieldLayout {
   display: block;
-  margin-bottom: 1em;
+  margin-top: 1.640625em;
 }
 .oo-ui-fieldLayout:before,
 .oo-ui-fieldLayout:after {
   padding: 0.5em 0.75em;
   line-height: 1.5;
 }
-.oo-ui-fieldLayout:last-child {
-  margin-bottom: 0;
+.oo-ui-fieldLayout.oo-ui-labelElement,
+.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
+  margin-top: 1.171875em;
 }
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
-  padding-top: 0.5em;
-  margin-right: 5%;
-  width: 35%;
+.oo-ui-fieldLayout:first-child,
+.oo-ui-fieldLayout.oo-ui-labelElement:first-child,
+.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline:first-child {
+  margin-top: 0;
 }
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field,
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
-  width: 60%;
+.oo-ui-fieldLayout.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
+  padding-bottom: 0.3125em;
 }
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline {
-  margin-bottom: 1.25em;
+.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
+  padding: 0.3125em 0.46875em;
+}
+.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label,
+.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
+  width: 35%;
+  margin-right: 5%;
+  padding-top: 0.3125em;
 }
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-inline.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
-  padding: 0.25em 0.25em 0.25em 0.5em;
+.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-left > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field,
+.oo-ui-fieldLayout.oo-ui-labelElement.oo-ui-fieldLayout-align-right > .oo-ui-fieldLayout-body > .oo-ui-fieldLayout-field {
+  width: 60%;
 }
-.oo-ui-fieldLayout.oo-ui-fieldLayout-align-top.oo-ui-labelElement > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
-  padding-top: 0.25em;
-  padding-bottom: 0.5em;
+.oo-ui-fieldLayout-disabled > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
+  color: #72777d;
 }
 .oo-ui-fieldLayout > .oo-ui-popupButtonWidget {
   margin-right: 0;
 .oo-ui-fieldLayout > .oo-ui-popupButtonWidget:last-child {
   margin-right: 0;
 }
-.oo-ui-fieldLayout-disabled > .oo-ui-fieldLayout-body > .oo-ui-labelElement-label {
-  color: #72777d;
-}
 .oo-ui-fieldLayout-messages {
   list-style: none none;
   margin: 0.25em 0 0 0.25em;
 }
 .oo-ui-fieldLayout-messages .oo-ui-iconWidget {
   display: table-cell;
-  border-right: 0.5em solid transparent;
 }
 .oo-ui-fieldLayout-messages .oo-ui-labelWidget {
   display: table-cell;
-  padding: 0.1em 0;
+  padding: 0.1em 0 0.1em 0.3125em;
   line-height: 1.5;
   vertical-align: middle;
 }
@@ -552,7 +553,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   margin-top: 2em;
 }
 .oo-ui-fieldsetLayout.oo-ui-labelElement > .oo-ui-labelElement-label {
-  margin-bottom: 0.5em;
+  margin-bottom: 0.56818em;
   font-size: 1.1em;
   font-weight: bold;
 }
@@ -687,7 +688,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   background-color: transparent;
 }
 .oo-ui-radioOptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
-  padding: 0.25em 0.25em 0.25em 0.5em;
+  padding: 0.25em 0.25em 0.25em 0.46875em;
 }
 .oo-ui-radioOptionWidget .oo-ui-radioInputWidget {
   margin-right: 0;
@@ -1469,12 +1470,17 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
 }
 .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:hover {
   background-color: #fff;
+  color: #444;
   border-color: #a2a9b1;
 }
 .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:hover .oo-ui-iconElement-icon,
 .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:hover .oo-ui-indicatorElement-indicator {
   opacity: 0.73;
 }
+.oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:active {
+  color: #000;
+  border-color: #72777d;
+}
 .oo-ui-dropdownWidget.oo-ui-widget-enabled .oo-ui-dropdownWidget-handle:focus {
   border-color: #36c;
   outline: 0;
@@ -1610,7 +1616,7 @@ body:not( :-moz-handler-blocked ) .oo-ui-fieldsetLayout {
   vertical-align: middle;
 }
 .oo-ui-checkboxMultioptionWidget.oo-ui-labelElement .oo-ui-labelElement-label {
-  padding: 0.25em 0.25em 0.25em 0.5em;
+  padding: 0.25em 0.25em 0.25em 0.46875em;
 }
 .oo-ui-checkboxMultioptionWidget .oo-ui-checkboxInputWidget {
   margin-right: 0;
index fd4e033..66dfbe8 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
@@ -414,7 +414,7 @@ OO.ui.infuse = function ( idOrNode ) {
                }
                return message;
        };
-} )();
+}() );
 
 /**
  * Package a message and arguments for deferred resolution.
@@ -4308,8 +4308,7 @@ OO.mixinClass( OO.ui.PopupWidget, OO.ui.mixin.ClippableElement );
 OO.ui.PopupWidget.prototype.onMouseDown = function ( e ) {
        if (
                this.isVisible() &&
-               !$.contains( this.$element[ 0 ], e.target ) &&
-               ( !this.$autoCloseIgnore || !this.$autoCloseIgnore.has( e.target ).length )
+               !OO.ui.contains( this.$element.add( this.$autoCloseIgnore ).get(), e.target, true )
        ) {
                this.toggle( false );
        }
@@ -4597,7 +4596,7 @@ OO.ui.mixin.PopupElement = function OoUiMixinPopupElement( config ) {
        this.popup = new OO.ui.PopupWidget( $.extend(
                { autoClose: true },
                config.popup,
-               { $autoCloseIgnore: this.$element }
+               { $autoCloseIgnore: this.$element.add( config.popup && config.popup.$autoCloseIgnore ) }
        ) );
 };
 
@@ -9797,7 +9796,7 @@ OO.ui.ComboBoxInputWidget.prototype.setOptions = function ( options ) {
  * @throws {Error} An error is thrown if no widget is specified
  */
 OO.ui.FieldLayout = function OoUiFieldLayout( fieldWidget, config ) {
-       var hasInputWidget, div;
+       var hasInputWidget, $div;
 
        // Allow passing positional parameters inside the config object
        if ( OO.isPlainObject( fieldWidget ) && config === undefined ) {
@@ -9837,14 +9836,14 @@ OO.ui.FieldLayout = function OoUiFieldLayout( fieldWidget, config ) {
                        icon: 'info'
                } );
 
-               div = $( '<div>' );
+               $div = $( '<div>' );
                if ( config.help instanceof OO.ui.HtmlSnippet ) {
-                       div.html( config.help.toString() );
+                       $div.html( config.help.toString() );
                } else {
-                       div.text( config.help );
+                       $div.text( config.help );
                }
                this.popupButtonWidget.getPopup().$body.append(
-                       div.addClass( 'oo-ui-fieldLayout-help-content' )
+                       $div.addClass( 'oo-ui-fieldLayout-help-content' )
                );
                this.$help = this.popupButtonWidget.$element;
        } else {
@@ -10138,8 +10137,13 @@ OO.inheritClass( OO.ui.ActionFieldLayout, OO.ui.FieldLayout );
  * @constructor
  * @param {Object} [config] Configuration options
  * @cfg {OO.ui.FieldLayout[]} [items] An array of fields to add to the fieldset. See OO.ui.FieldLayout for more information about fields.
+ * @cfg {string|OO.ui.HtmlSnippet} [help] Help text. When help text is specified, a "help" icon will appear
+ *  in the upper-right corner of the rendered field; clicking it will display the text in a popup.
+ *  For important messages, you are advised to use `notices`, as they are always shown.
  */
 OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
+       var $div;
+
        // Configuration initialization
        config = config || {};
 
@@ -10158,10 +10162,14 @@ OO.ui.FieldsetLayout = function OoUiFieldsetLayout( config ) {
                        icon: 'info'
                } );
 
+               $div = $( '<div>' );
+               if ( config.help instanceof OO.ui.HtmlSnippet ) {
+                       $div.html( config.help.toString() );
+               } else {
+                       $div.text( config.help );
+               }
                this.popupButtonWidget.getPopup().$body.append(
-                       $( '<div>' )
-                               .text( config.help )
-                               .addClass( 'oo-ui-fieldsetLayout-help-content' )
+                       $div.addClass( 'oo-ui-fieldsetLayout-help-content' )
                );
                this.$help = this.popupButtonWidget.$element;
        } else {
index 17bca7e..962db9a 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
index 7fb36c4..4b59876 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-popupTool .oo-ui-popupWidget-popup,
 .oo-ui-popupTool .oo-ui-popupWidget-anchor {
index cb9660a..c3b0c98 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-tool.oo-ui-widget-enabled {
   -webkit-transition: background-color 100ms;
index e17f511..f57e2db 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
index d6ba00b..884e48e 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
index bf50532..cfbea3e 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-draggableElement-handle,
 .oo-ui-draggableElement-handle.oo-ui-widget {
 .oo-ui-capsuleMultiselectWidget-handle > .oo-ui-iconElement-icon {
   position: absolute;
 }
+.oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content :-moz-placeholder {
+  color: #72777d;
+  opacity: 1;
+}
+.oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content ::-moz-placeholder {
+  color: #72777d;
+  opacity: 1;
+}
+.oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content :-ms-input-placeholder {
+  color: #72777d;
+}
+.oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content ::-webkit-input-placeholder {
+  color: #72777d;
+}
+.oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content :placeholder-shown {
+  color: #72777d;
+}
 .oo-ui-capsuleMultiselectWidget-handle > .oo-ui-capsuleMultiselectWidget-content > input {
   border: 0;
   line-height: 1.675;
index 6962c92..8242c86 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
@@ -4074,8 +4074,7 @@ OO.ui.CapsuleMultiselectWidget.prototype.onPopupFocusOut = function () {
        setTimeout( function () {
                if (
                        widget.isVisible() &&
-                       !OO.ui.contains( widget.$element[ 0 ], document.activeElement, true ) &&
-                       ( !widget.$autoCloseIgnore || !widget.$autoCloseIgnore.has( document.activeElement ).length )
+                       !OO.ui.contains( widget.$element.add( widget.$autoCloseIgnore ).get(), document.activeElement, true )
                ) {
                        widget.toggle( false );
                }
index 6258b84..40de1d7 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-actionWidget.oo-ui-pendingElement-pending {
   background-image: /* @embed */ url(themes/apex/images/textures/pending.gif);
index 359c469..d1b35e8 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:42Z
+ * Date: 2016-11-29T22:57:42Z
  */
 .oo-ui-window {
   background: transparent;
index 8b614c6..f6e2a39 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * OOjs UI v0.18.0
+ * OOjs UI v0.18.1
  * https://www.mediawiki.org/wiki/OOjs_UI
  *
  * Copyright 2011–2016 OOjs UI Team and other contributors.
  * Released under the MIT license
  * http://oojs.mit-license.org
  *
- * Date: 2016-11-09T00:52:37Z
+ * Date: 2016-11-29T22:57:37Z
  */
 ( function ( OO ) {
 
@@ -1286,7 +1286,8 @@ OO.ui.WindowManager.prototype.getCurrentWindow = function () {
  *
  * @param {OO.ui.Window|string} win Window object or symbolic name of window to open
  * @param {Object} [data] Window opening data
- * @param {jQuery} [data.$returnFocusTo] Element to which the window will return focus when closed.
+ * @param {jQuery|null} [data.$returnFocusTo] Element to which the window will return focus when closed.
+ *  Defaults the current activeElement. If set to null, focus isn't changed on close.
  * @return {jQuery.Promise} An `opening` promise resolved when the window is done opening.
  *  See {@link #event-opening 'opening' event}  for more information about `opening` promises.
  * @fires opening
@@ -1418,7 +1419,9 @@ OO.ui.WindowManager.prototype.closeWindow = function ( win, data ) {
                                                                manager.toggleGlobalEvents( false );
                                                                manager.toggleAriaIsolation( false );
                                                        }
-                                                       manager.$returnFocusTo[ 0 ].focus();
+                                                       if ( manager.$returnFocusTo && manager.$returnFocusTo.length ) {
+                                                               manager.$returnFocusTo[ 0 ].focus();
+                                                       }
                                                        manager.closing = null;
                                                        manager.currentWindow = null;
                                                        closing.resolve( data );
index f5694a1..e6fa863 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 651cddf..80bbcaf 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 6b9e490..21efb82 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 11fcef7..4515405 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index cd4087e..3edb545 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index d168364..c97d770 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 7efe531..f110a04 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 765b8fe..6ff4a0e 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index c844449..7098f23 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 8c7b845..afdb9e5 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index e98012f..3779ae3 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index c545a49..059073f 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 39fdda5..5a70c5e 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index bac9768..61aec85 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 6a7c565..4666fd1 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 53460be..54b9f62 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/block-destructive.png differ
index abf656f..f01a779 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M12 4c-4.4 0-8 3.6-8 8s3.6 8 8 8 8-3.6 8-8-3.6-8-8-8zm5 9H7v-2h10v2z"/>
 </svg>
index 000e529..f574a39 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/cancel-destructive.png differ
index b2b0179..3391d4e 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <g id="cancel">
         <path id="circle-with-strike" d="M12 5.022a6.98 6.98 0 0 0-.003 13.956 6.98 6.98 0 0 0-.002-13.956zM6.885 12c0-1.092.572-3.25.93-2.93l7.113 7.114c.487.525-1.838.93-2.93.93A5.113 5.113 0 0 1 6.884 12zm9.298 2.93L9.07 7.815c-.445-.483 1.837-.93 2.93-.93a5.112 5.112 0 0 1 5.114 5.113c0 1.092-.364 3.542-.93 2.93z"/>
     </g>
index 0cc9169..305f41d 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/check-destructive.png differ
index 7e3dc53..059f0bd 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M17 7.5L9.5 15 6 11.5 4.5 13l5 5L20 7.5c-.706-.706-2.294-.706-3 0z" id="check"/>
 </svg>
index 42311de..e16f042 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-ltr-destructive.png differ
index a9900c1..2cfa62e 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M15 8s0-3-2.5-3S10 8 10 8v1h5zm2 0v1h2v10H9c-1.7 0-3-1.3-3-3V9h2V8s0-5 4.5-5S17 8 17 8z"/>
 </svg>
index 72d6a7b..29cd2b5 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/lock-rtl-destructive.png differ
index 2811b25..2daea47 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M10 8s0-3 2.5-3S15 8 15 8v1h-5zM8 8v1H6v10h10c1.7 0 3-1.3 3-3V9h-2V8s0-5-4.5-5S8 8 8 8z"/>
 </svg>
index 55ab6c4..cf85c4d 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/tag-destructive.png differ
index 7048a40..0732f2e 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M18.748 11.717a1 1 0 0 1 0 1.414l-4.95 4.95a1 1 0 0 1-1.413 0l-6.01-6.01c-.39-.382-.707-1.15-.707-1.7V6c0-.55.45-1 1-1h4.363c.55 0 1.32.318 1.71.707l6.01 6.01zM8.104 7.457a1.477 1.477 0 0 0 0 2.092 1.49 1.49 0 0 0 2.094 0 1.49 1.49 0 0 0 0-2.1 1.484 1.484 0 0 0-2.094 0z" id="tag"/>
 </svg>
index c1d2a66..c367e77 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/trash-destructive.png differ
index 3ebc63b..59ad3f2 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M6 8c0-1.1.9-2 2-2h2l1-1h2l1 1h2c1.1 0 2 .9 2 2H6zm1 1h10l-1 11H8z"/>
 </svg>
index 8fb039c..2cb27f1 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-ltr-destructive.png differ
index 7ee7522..d45ebac 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M12 9V7s0-5-4.5-5S3 7 3 7h2s0-3 2.5-3S10 7 10 7v2H7v7c0 1.7 1.3 3 3 3h10V9z"/>
 </svg>
index 7c2786d..fac51b9 100644 (file)
Binary files a/resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.png and b/resources/lib/oojs-ui/themes/mediawiki/images/icons/unLock-rtl-destructive.png differ
index a5f2721..5e6d205 100644 (file)
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="utf-8"?>
-<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #c33 }</style>
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><style>* { fill: #d33 }</style>
     <path d="M11 9V7s0-5 4.5-5S20 7 20 7h-2s0-3-2.5-3S13 7 13 7v2h3v7c0 1.7-1.3 3-3 3H3V9z"/>
 </svg>
index 349227a..91d0358 100644 (file)
@@ -15,7 +15,7 @@
                        "color": "#36c"
                },
                "destructive": {
-                       "color": "#c33"
+                       "color": "#d33"
                },
                "warning": {
                        "color": "#ff5d00"
index 8c78b67..ae68fc4 100644 (file)
@@ -1,12 +1,12 @@
 /*!
- * QUnit 1.22.0
+ * QUnit 1.23.1
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2016-02-23T15:57Z
+ * Date: 2016-04-12T17:29Z
  */
 
 /** Font Family and Sizes */
index 84873ae..5df0822 100644 (file)
@@ -1,15 +1,15 @@
 /*!
- * QUnit 1.22.0
+ * QUnit 1.23.1
  * https://qunitjs.com/
  *
  * Copyright jQuery Foundation and other contributors
  * Released under the MIT license
  * https://jquery.org/license
  *
- * Date: 2016-02-23T15:57Z
+ * Date: 2016-04-12T17:29Z
  */
 
-(function( global ) {
+( function( global ) {
 
 var QUnit = {};
 
@@ -27,7 +27,7 @@ var window = global.window;
 var defined = {
        document: window && window.document !== undefined,
        setTimeout: setTimeout !== undefined,
-       sessionStorage: (function() {
+       sessionStorage: ( function() {
                var x = "qunit-test-string";
                try {
                        sessionStorage.setItem( x, x );
@@ -46,7 +46,7 @@ var runStarted = false;
 var toString = Object.prototype.toString,
        hasOwn = Object.prototype.hasOwnProperty;
 
-// returns a new Array with the elements that are in a but not in b
+// Returns a new Array with the elements that are in a but not in b
 function diff( a, b ) {
        var i, j,
                result = a.slice();
@@ -63,7 +63,7 @@ function diff( a, b ) {
        return result;
 }
 
-// from jquery.js
+// From jquery.js
 function inArray( elem, array ) {
        if ( array.indexOf ) {
                return array.indexOf( elem );
@@ -157,32 +157,6 @@ function is( type, obj ) {
        return QUnit.objectType( obj ) === type;
 }
 
-var getUrlParams = function() {
-       var i, param, name, value;
-       var urlParams = {};
-       var location = window.location;
-       var params = location.search.slice( 1 ).split( "&" );
-       var length = params.length;
-
-       for ( i = 0; i < length; i++ ) {
-               if ( params[ i ] ) {
-                       param = params[ i ].split( "=" );
-                       name = decodeURIComponent( param[ 0 ] );
-
-                       // allow just a key to turn on a flag, e.g., test.html?noglobals
-                       value = param.length === 1 ||
-                               decodeURIComponent( param.slice( 1 ).join( "=" ) ) ;
-                       if ( urlParams[ name ] ) {
-                               urlParams[ name ] = [].concat( urlParams[ name ], value );
-                       } else {
-                               urlParams[ name ] = value;
-                       }
-               }
-       }
-
-       return urlParams;
-};
-
 // Doesn't support IE6 to IE9, it will return undefined on these browsers
 // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
 function extractStacktrace( e, offset ) {
@@ -212,12 +186,12 @@ function extractStacktrace( e, offset ) {
        // Support: Safari <=6 only
        } else if ( e.sourceURL ) {
 
-               // exclude useless self-reference for generated Error objects
+               // Exclude useless self-reference for generated Error objects
                if ( /qunit.js$/.test( e.sourceURL ) ) {
                        return;
                }
 
-               // for actual exceptions, this is useful
+               // For actual exceptions, this is useful
                return e.sourceURL + ":" + e.line;
        }
 }
@@ -244,53 +218,35 @@ function sourceFromStacktrace( offset ) {
  * `config` initialized at top of scope
  */
 var config = {
+
        // The queue of tests to run
        queue: [],
 
-       // block until document ready
+       // Block until document ready
        blocking: true,
 
-       // by default, run previously failed tests first
+       // By default, run previously failed tests first
        // very useful in combination with "Hide passed tests" checked
        reorder: true,
 
-       // by default, modify document.title when suite is done
+       // By default, modify document.title when suite is done
        altertitle: true,
 
        // HTML Reporter: collapse every test except the first failing test
        // If false, all failing tests will be expanded
        collapse: true,
 
-       // by default, scroll to top of the page when suite is done
+       // By default, scroll to top of the page when suite is done
        scrolltop: true,
 
-       // depth up-to which object will be dumped
+       // Depth up-to which object will be dumped
        maxDepth: 5,
 
-       // when enabled, all tests must call expect()
+       // When enabled, all tests must call expect()
        requireExpects: false,
 
-       // add checkboxes that are persisted in the query-string
-       // when enabled, the id is set to `true` as a `QUnit.config` property
-       urlConfig: [
-               {
-                       id: "hidepassed",
-                       label: "Hide passed tests",
-                       tooltip: "Only show tests and assertions that fail. Stored as query-strings."
-               },
-               {
-                       id: "noglobals",
-                       label: "Check for Globals",
-                       tooltip: "Enabling this will test if any test introduces new properties on the " +
-                               "global object (`window` in Browsers). Stored as query-strings."
-               },
-               {
-                       id: "notrycatch",
-                       label: "No try-catch",
-                       tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " +
-                               "exceptions in IE reasonable. Stored as query-strings."
-               }
-       ],
+       // Placeholder for user-configurable form-exposed URL parameters
+       urlConfig: [],
 
        // Set of all modules.
        modules: [],
@@ -307,27 +263,9 @@ var config = {
        callbacks: {}
 };
 
-var urlParams = defined.document ? getUrlParams() : {};
-
 // Push a loose unnamed module to the modules collection
 config.modules.push( config.currentModule );
 
-if ( urlParams.filter === true ) {
-       delete urlParams.filter;
-}
-
-// String search anywhere in moduleName+testName
-config.filter = urlParams.filter;
-
-config.testId = [];
-if ( urlParams.testId ) {
-       // Ensure that urlParams.testId is an array
-       urlParams.testId = decodeURIComponent( urlParams.testId ).split( "," );
-       for (var i = 0; i < urlParams.testId.length; i++ ) {
-               config.testId.push( urlParams.testId[ i ] );
-       }
-}
-
 var loggingCallbacks = {};
 
 // Register logging callbacks
@@ -431,7 +369,7 @@ function verifyLoggingCallbacks() {
                                }
                                QUnit.pushFailure( error, filePath + ":" + linerNr );
                        } else {
-                               QUnit.test( "global failure", extend(function() {
+                               QUnit.test( "global failure", extend( function() {
                                        QUnit.pushFailure( error, filePath + ":" + linerNr );
                                }, { validTest: true } ) );
                        }
@@ -440,25 +378,23 @@ function verifyLoggingCallbacks() {
 
                return ret;
        };
-} )();
-
-QUnit.urlParams = urlParams;
+}() );
 
 // Figure out if we're running the tests from a server or not
 QUnit.isLocal = !( defined.document && window.location.protocol !== "file:" );
 
 // Expose the current QUnit version
-QUnit.version = "1.22.0";
+QUnit.version = "1.23.1";
 
 extend( QUnit, {
 
-       // call on start of module test to prepend name to all tests
+       // Call on start of module test to prepend name to all tests
        module: function( name, testEnvironment, executeNow ) {
                var module, moduleFns;
                var currentModule = config.currentModule;
 
                if ( arguments.length === 2 ) {
-                       if ( testEnvironment instanceof Function ) {
+                       if ( objectType( testEnvironment ) === "function" ) {
                                executeNow = testEnvironment;
                                testEnvironment = undefined;
                        }
@@ -482,7 +418,7 @@ extend( QUnit, {
                        afterEach: setHook( module, "afterEach" )
                };
 
-               if ( executeNow instanceof Function ) {
+               if ( objectType( executeNow ) === "function" ) {
                        config.moduleStack.push( module );
                        setCurrentModule( module );
                        executeNow.call( module.testEnvironment, moduleFns );
@@ -500,7 +436,8 @@ extend( QUnit, {
                        var module = {
                                name: moduleName,
                                parentModule: parentModule,
-                               tests: []
+                               tests: [],
+                               moduleId: generateHash( moduleName )
                        };
 
                        var env = {};
@@ -573,7 +510,7 @@ extend( QUnit, {
                                return;
                        }
 
-                       // throw an Error if start is called more often than stop
+                       // Throw an Error if start is called more often than stop
                        if ( config.current.semaphore < 0 ) {
                                config.current.semaphore = 0;
 
@@ -634,7 +571,7 @@ extend( QUnit, {
                offset = ( offset || 0 ) + 2;
                return sourceFromStacktrace( offset );
        }
-});
+} );
 
 registerLoggingCallbacks( QUnit );
 
@@ -657,17 +594,17 @@ function begin() {
 
                // Avoid unnecessary information by not logging modules' test environments
                for ( i = 0, l = config.modules.length; i < l; i++ ) {
-                       modulesLog.push({
+                       modulesLog.push( {
                                name: config.modules[ i ].name,
                                tests: config.modules[ i ].tests
-                       });
+                       } );
                }
 
                // The test run is officially beginning now
                runLoggingCallbacks( "begin", {
                        totalTests: Test.count,
                        modules: modulesLog
-               });
+               } );
        }
 
        config.blocking = false;
@@ -706,7 +643,7 @@ function pauseProcessing() {
 
        if ( config.testTimeout && defined.setTimeout ) {
                clearTimeout( config.timeout );
-               config.timeout = setTimeout(function() {
+               config.timeout = setTimeout( function() {
                        if ( config.current ) {
                                config.current.semaphore = 0;
                                QUnit.pushFailure( "Test timed out", sourceFromStacktrace( 2 ) );
@@ -723,7 +660,7 @@ function resumeProcessing() {
 
        // A slight delay to allow this iteration of the event loop to finish (more assertions, etc.)
        if ( defined.setTimeout ) {
-               setTimeout(function() {
+               setTimeout( function() {
                        if ( config.current && config.current.semaphore > 0 ) {
                                return;
                        }
@@ -752,7 +689,7 @@ function done() {
                        passed: config.moduleStats.all - config.moduleStats.bad,
                        total: config.moduleStats.all,
                        runtime: now() - config.moduleStats.started
-               });
+               } );
        }
        delete config.previousModule;
 
@@ -764,7 +701,7 @@ function done() {
                passed: passed,
                total: config.stats.all,
                runtime: runtime
-       });
+       } );
 }
 
 function setHook( module, hookName ) {
@@ -779,6 +716,7 @@ function setHook( module, hookName ) {
 
 var focused = false;
 var priorityCount = 0;
+var unitSampler;
 
 function Test( settings ) {
        var i, l;
@@ -801,10 +739,10 @@ function Test( settings ) {
 
        this.testId = generateHash( this.module.name, this.testName );
 
-       this.module.tests.push({
+       this.module.tests.push( {
                name: this.testName,
                testId: this.testId
-       });
+       } );
 
        if ( settings.skip ) {
 
@@ -840,14 +778,14 @@ Test.prototype = {
                                        passed: config.moduleStats.all - config.moduleStats.bad,
                                        total: config.moduleStats.all,
                                        runtime: now() - config.moduleStats.started
-                               });
+                               } );
                        }
                        config.previousModule = this.module;
                        config.moduleStats = { all: 0, bad: 0, started: now() };
                        runLoggingCallbacks( "moduleStart", {
                                name: this.module.name,
                                tests: this.module.tests
-                       });
+                       } );
                }
 
                config.current = this;
@@ -863,7 +801,7 @@ Test.prototype = {
                        name: this.testName,
                        module: this.module.name,
                        testId: this.testId
-               });
+               } );
 
                if ( !config.pollution ) {
                        saveGlobal();
@@ -892,7 +830,7 @@ Test.prototype = {
                        this.pushFailure( "Died on test #" + ( this.assertions.length + 1 ) + " " +
                                this.stack + ": " + ( e.message || e ), extractStacktrace( e, 0 ) );
 
-                       // else next test will carry the responsibility
+                       // Else next test will carry the responsibility
                        saveGlobal();
 
                        // Restart the tests if they're blocking
@@ -1001,7 +939,7 @@ Test.prototype = {
 
                        // DEPRECATED: this property will be removed in 2.0.0, use runtime instead
                        duration: this.runtime
-               });
+               } );
 
                // QUnit.reset() is deprecated and will be replaced for a new
                // fixture reset function on QUnit 2.0/2.1.
@@ -1021,8 +959,8 @@ Test.prototype = {
 
                function run() {
 
-                       // each of these can by async
-                       synchronize([
+                       // Each of these can by async
+                       synchronize( [
                                function() {
                                        test.before();
                                },
@@ -1040,19 +978,19 @@ Test.prototype = {
                                function() {
                                        test.finish();
                                }
-                       ]);
+                       ] );
                }
 
                // Prioritize previously failed tests, detected from sessionStorage
                priority = QUnit.config.reorder && defined.sessionStorage &&
                                +sessionStorage.getItem( "qunit-test-" + this.module.name + "-" + this.testName );
 
-               return synchronize( run, priority );
+               return synchronize( run, priority, config.seed );
        },
 
        pushResult: function( resultInfo ) {
 
-               // resultInfo = { result, actual, expected, message, negative }
+               // Destructure of resultInfo = { result, actual, expected, message, negative }
                var source,
                        details = {
                                module: this.module.name,
@@ -1076,10 +1014,10 @@ Test.prototype = {
 
                runLoggingCallbacks( "log", details );
 
-               this.assertions.push({
+               this.assertions.push( {
                        result: !!resultInfo.result,
                        message: resultInfo.message
-               });
+               } );
        },
 
        pushFailure: function( message, source, actual ) {
@@ -1104,10 +1042,10 @@ Test.prototype = {
 
                runLoggingCallbacks( "log", details );
 
-               this.assertions.push({
+               this.assertions.push( {
                        result: false,
                        message: message
-               });
+               } );
        },
 
        resolvePromise: function( promise, phase ) {
@@ -1126,7 +1064,7 @@ Test.prototype = {
                                                        " " + test.testName + ": " + ( error.message || error );
                                                test.pushFailure( message, extractStacktrace( error, 0 ) );
 
-                                               // else next test will carry the responsibility
+                                               // Else next test will carry the responsibility
                                                saveGlobal();
 
                                                // Unblock
@@ -1140,30 +1078,43 @@ Test.prototype = {
        valid: function() {
                var filter = config.filter,
                        regexFilter = /^(!?)\/([\w\W]*)\/(i?$)/.exec( filter ),
-                       module = QUnit.urlParams.module && QUnit.urlParams.module.toLowerCase(),
+                       module = config.module && config.module.toLowerCase(),
                        fullName = ( this.module.name + ": " + this.testName );
 
-               function testInModuleChain( testModule ) {
+               function moduleChainNameMatch( testModule ) {
                        var testModuleName = testModule.name ? testModule.name.toLowerCase() : null;
                        if ( testModuleName === module ) {
                                return true;
                        } else if ( testModule.parentModule ) {
-                               return testInModuleChain( testModule.parentModule );
+                               return moduleChainNameMatch( testModule.parentModule );
                        } else {
                                return false;
                        }
                }
 
+               function moduleChainIdMatch( testModule ) {
+                       return inArray( testModule.moduleId, config.moduleId ) > -1 ||
+                               testModule.parentModule && moduleChainIdMatch( testModule.parentModule );
+               }
+
                // Internally-generated tests are always valid
                if ( this.callback && this.callback.validTest ) {
                        return true;
                }
 
-               if ( config.testId.length > 0 && inArray( this.testId, config.testId ) < 0 ) {
+               if ( config.moduleId && config.moduleId.length > 0 &&
+                       !moduleChainIdMatch( this.module ) ) {
+
+                       return false;
+               }
+
+               if ( config.testId && config.testId.length > 0 &&
+                       inArray( this.testId, config.testId ) < 0 ) {
+
                        return false;
                }
 
-               if ( module && !testInModuleChain( this.module ) ) {
+               if ( module && !moduleChainNameMatch( this.module ) ) {
                        return false;
                }
 
@@ -1172,7 +1123,7 @@ Test.prototype = {
                }
 
                return regexFilter ?
-                       this.regexFilter( !!regexFilter[1], regexFilter[2], regexFilter[3], fullName ) :
+                       this.regexFilter( !!regexFilter[ 1 ], regexFilter[ 2 ], regexFilter[ 3 ], fullName ) :
                        this.stringFilter( filter, fullName );
        },
 
@@ -1260,8 +1211,9 @@ function generateHash( module, testName ) {
        return hex.slice( -8 );
 }
 
-function synchronize( callback, priority ) {
-       var last = !priority;
+function synchronize( callback, priority, seed ) {
+       var last = !priority,
+               index;
 
        if ( QUnit.objectType( callback ) === "array" ) {
                while ( callback.length ) {
@@ -1272,6 +1224,14 @@ function synchronize( callback, priority ) {
 
        if ( priority ) {
                config.queue.splice( priorityCount++, 0, callback );
+       } else if ( seed ) {
+               if ( !unitSampler ) {
+                       unitSampler = unitSamplerGenerator( seed );
+               }
+
+               // Insert into a random position after all priority items
+               index = Math.floor( unitSampler() * ( config.queue.length - priorityCount + 1 ) );
+               config.queue.splice( priorityCount + index, 0, callback );
        } else {
                config.queue.push( callback );
        }
@@ -1281,6 +1241,25 @@ function synchronize( callback, priority ) {
        }
 }
 
+function unitSamplerGenerator( seed ) {
+
+       // 32-bit xorshift, requires only a nonzero seed
+       // http://excamera.com/sphinx/article-xorshift.html
+       var sample = parseInt( generateHash( seed ), 16 ) || -1;
+       return function() {
+               sample ^= sample << 13;
+               sample ^= sample >>> 17;
+               sample ^= sample << 5;
+
+               // ECMAScript has no unsigned number type
+               if ( sample < 0 ) {
+                       sample += 0x100000000;
+               }
+
+               return sample / 0x100000000;
+       };
+}
+
 function saveGlobal() {
        config.pollution = [];
 
@@ -1288,7 +1267,7 @@ function saveGlobal() {
                for ( var key in global ) {
                        if ( hasOwn.call( global, key ) ) {
 
-                               // in Opera sometimes DOM element ids show up here, ignore them
+                               // In Opera sometimes DOM element ids show up here, ignore them
                                if ( /^qunit-test-output/.test( key ) ) {
                                        continue;
                                }
@@ -1337,12 +1316,12 @@ function test( testName, expected, callback, async ) {
                expected = null;
        }
 
-       newTest = new Test({
+       newTest = new Test( {
                testName: testName,
                expected: expected,
                async: async,
                callback: callback
-       });
+       } );
 
        newTest.queue();
 }
@@ -1351,10 +1330,10 @@ function test( testName, expected, callback, async ) {
 function skip( testName ) {
        if ( focused )  { return; }
 
-       var test = new Test({
+       var test = new Test( {
                testName: testName,
                skip: true
-       });
+       } );
 
        test.queue();
 }
@@ -1373,12 +1352,12 @@ function only( testName, expected, callback, async ) {
                expected = null;
        }
 
-       newTest = new Test({
+       newTest = new Test( {
                testName: testName,
                expected: expected,
                async: async,
                callback: callback
-       });
+       } );
 
        newTest.queue();
 }
@@ -1448,7 +1427,7 @@ QUnit.assert = Assert.prototype = {
 
        pushResult: function( resultInfo ) {
 
-               // resultInfo = { result, actual, expected, message, negative }
+               // Destructure of resultInfo = { result, actual, expected, message, negative }
                var assert = this,
                        currentTest = ( assert instanceof Assert && assert.test ) || QUnit.config.current;
 
@@ -1594,7 +1573,7 @@ QUnit.assert = Assert.prototype = {
                currentTest.ignoreGlobalErrors = true;
                try {
                        block.call( currentTest.testEnvironment );
-               } catch (e) {
+               } catch ( e ) {
                        actual = e;
                }
                currentTest.ignoreGlobalErrors = false;
@@ -1602,30 +1581,30 @@ QUnit.assert = Assert.prototype = {
                if ( actual ) {
                        expectedType = QUnit.objectType( expected );
 
-                       // we don't want to validate thrown error
+                       // We don't want to validate thrown error
                        if ( !expected ) {
                                ok = true;
                                expectedOutput = null;
 
-                       // expected is a regexp
+                       // Expected is a regexp
                        } else if ( expectedType === "regexp" ) {
                                ok = expected.test( errorString( actual ) );
 
-                       // expected is a string
+                       // Expected is a string
                        } else if ( expectedType === "string" ) {
                                ok = expected === errorString( actual );
 
-                       // expected is a constructor, maybe an Error constructor
+                       // Expected is a constructor, maybe an Error constructor
                        } else if ( expectedType === "function" && actual instanceof expected ) {
                                ok = true;
 
-                       // expected is an Error object
+                       // Expected is an Error object
                        } else if ( expectedType === "object" ) {
                                ok = actual instanceof expected.constructor &&
                                        actual.name === expected.name &&
                                        actual.message === expected.message;
 
-                       // expected is a validation function which returns true if validation passed
+                       // Expected is a validation function which returns true if validation passed
                        } else if ( expectedType === "function" && expected.call( {}, actual ) === true ) {
                                expectedOutput = null;
                                ok = true;
@@ -1643,10 +1622,10 @@ QUnit.assert = Assert.prototype = {
 
 // Provide an alternative to assert.throws(), for environments that consider throws a reserved word
 // Known to us are: Closure Compiler, Narwhal
-(function() {
+( function() {
        /*jshint sub:true */
-       Assert.prototype.raises = Assert.prototype[ "throws" ];
-}());
+       Assert.prototype.raises = Assert.prototype [ "throws" ]; //jscs:ignore requireDotNotation
+}() );
 
 function errorString( error ) {
        var name, message,
@@ -1670,7 +1649,7 @@ function errorString( error ) {
 
 // Test for equality any JavaScript type.
 // Author: Philippe Rathé <prathe@gmail.com>
-QUnit.equiv = (function() {
+QUnit.equiv = ( function() {
 
        // Stack to decide between skip/abort functions
        var callers = [];
@@ -1766,7 +1745,8 @@ QUnit.equiv = (function() {
 
                        len = a.length;
                        if ( len !== b.length ) {
-                               // safe and faster
+
+                               // Safe and faster
                                return false;
                        }
 
@@ -1800,33 +1780,53 @@ QUnit.equiv = (function() {
                },
 
                "set": function( b, a ) {
-                       var aArray, bArray;
-
-                       aArray = [];
-                       a.forEach( function( v ) {
-                               aArray.push( v );
-                       });
-                       bArray = [];
-                       b.forEach( function( v ) {
-                               bArray.push( v );
-                       });
-
-                       return innerEquiv( bArray, aArray );
+                       var innerEq,
+                               outerEq = true;
+
+                       if ( a.size !== b.size ) {
+                               return false;
+                       }
+
+                       a.forEach( function( aVal ) {
+                               innerEq = false;
+
+                               b.forEach( function( bVal ) {
+                                       if ( innerEquiv( bVal, aVal ) ) {
+                                               innerEq = true;
+                                       }
+                               } );
+
+                               if ( !innerEq ) {
+                                       outerEq = false;
+                               }
+                       } );
+
+                       return outerEq;
                },
 
                "map": function( b, a ) {
-                       var aArray, bArray;
-
-                       aArray = [];
-                       a.forEach( function( v, k ) {
-                               aArray.push( [ k, v ] );
-                       });
-                       bArray = [];
-                       b.forEach( function( v, k ) {
-                               bArray.push( [ k, v ] );
-                       });
-
-                       return innerEquiv( bArray, aArray );
+                       var innerEq,
+                               outerEq = true;
+
+                       if ( a.size !== b.size ) {
+                               return false;
+                       }
+
+                       a.forEach( function( aVal, aKey ) {
+                               innerEq = false;
+
+                               b.forEach( function( bVal, bKey ) {
+                                       if ( innerEquiv( [ bVal, bKey ], [ aVal, aKey ] ) ) {
+                                               innerEq = true;
+                                       }
+                               } );
+
+                               if ( !innerEq ) {
+                                       outerEq = false;
+                               }
+                       } );
+
+                       return outerEq;
                },
 
                "object": function( b, a ) {
@@ -1908,11 +1908,11 @@ QUnit.equiv = (function() {
        }
 
        return innerEquiv;
-}());
+}() );
 
 // Based on jsDump by Ariel Flesler
 // http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html
-QUnit.dump = (function() {
+QUnit.dump = ( function() {
        function quote( str ) {
                return "\"" + str.toString().replace( /\\/g, "\\\\" ).replace( /"/g, "\\\"" ) + "\"";
        }
@@ -1950,7 +1950,7 @@ QUnit.dump = (function() {
        var reName = /^function (\w+)/,
                dump = {
 
-                       // objType is used mostly internally, you can fix a (custom) type in advance
+                       // The objType is used mostly internally, you can fix a (custom) type in advance
                        parse: function( obj, objType, stack ) {
                                stack = stack || [];
                                var res, parser, parserType,
@@ -1994,7 +1994,7 @@ QUnit.dump = (function() {
                                        type = "node";
                                } else if (
 
-                                       // native arrays
+                                       // Native arrays
                                        toString.call( obj ) === "[object Array]" ||
 
                                        // NodeList objects
@@ -2010,10 +2010,12 @@ QUnit.dump = (function() {
                                }
                                return type;
                        },
+
                        separator: function() {
                                return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? "&#160;" : " ";
                        },
-                       // extra can be a number, shortcut for increasing-calling-decreasing
+
+                       // Extra can be a number, shortcut for increasing-calling-decreasing
                        indent: function( extra ) {
                                if ( !this.multiline ) {
                                        return "";
@@ -2033,11 +2035,11 @@ QUnit.dump = (function() {
                        setParser: function( name, parser ) {
                                this.parsers[ name ] = parser;
                        },
+
                        // The next 3 are exposed so you can use them
                        quote: quote,
                        literal: literal,
                        join: join,
-                       //
                        depth: 1,
                        maxDepth: QUnit.config.maxDepth,
 
@@ -2054,13 +2056,13 @@ QUnit.dump = (function() {
                                "function": function( fn ) {
                                        var ret = "function",
 
-                                               // functions never have name in IE
+                                               // Functions never have name in IE
                                                name = "name" in fn ? fn.name : ( reName.exec( fn ) || [] )[ 1 ];
 
                                        if ( name ) {
                                                ret += " " + name;
                                        }
-                                       ret += "( ";
+                                       ret += "(";
 
                                        ret = [ ret, dump.parse( fn, "functionArgs" ), "){" ].join( "" );
                                        return join( ret, dump.parse( fn, "functionCode" ), "}" );
@@ -2131,7 +2133,7 @@ QUnit.dump = (function() {
                                        return ret + open + "/" + tag + close;
                                },
 
-                               // function calls it internally, it's the arguments part of the function
+                               // Function calls it internally, it's the arguments part of the function
                                functionArgs: function( fn ) {
                                        var args,
                                                l = fn.length;
@@ -2148,11 +2150,14 @@ QUnit.dump = (function() {
                                        }
                                        return " " + args.join( ", " ) + " ";
                                },
-                               // object calls it internally, the key part of an item in a map
+
+                               // Object calls it internally, the key part of an item in a map
                                key: quote,
-                               // function calls it internally, it's the content of the function
+
+                               // Function calls it internally, it's the content of the function
                                functionCode: "[code]",
-                               // node calls it internally, it's a html attribute value
+
+                               // Node calls it internally, it's a html attribute value
                                attribute: quote,
                                string: quote,
                                date: quote,
@@ -2160,23 +2165,26 @@ QUnit.dump = (function() {
                                number: literal,
                                "boolean": literal
                        },
-                       // if true, entities are escaped ( <, >, \t, space and \n )
+
+                       // If true, entities are escaped ( <, >, \t, space and \n )
                        HTML: false,
-                       // indentation unit
+
+                       // Indentation unit
                        indentChar: "  ",
-                       // if true, items in a collection, are separated by a \n, else just a space.
+
+                       // If true, items in a collection, are separated by a \n, else just a space.
                        multiline: true
                };
 
        return dump;
-}());
+}() );
 
-// back compat
+// Back compat
 QUnit.jsDump = QUnit.dump;
 
 // Deprecated
 // Extend assert methods to QUnit for Backwards compatibility
-(function() {
+( function() {
        var i,
                assertions = Assert.prototype;
 
@@ -2190,12 +2198,12 @@ QUnit.jsDump = QUnit.dump;
        for ( i in assertions ) {
                QUnit[ i ] = applyCurrent( assertions[ i ] );
        }
-})();
+}() );
 
 // For browser, export only select globals
 if ( defined.document ) {
 
-       (function() {
+       ( function() {
                var i, l,
                        keys = [
                                "test",
@@ -2221,7 +2229,7 @@ if ( defined.document ) {
                for ( i = 0, l = keys.length; i < l; i++ ) {
                        window[ keys[ i ] ] = QUnit[ keys[ i ] ];
                }
-       })();
+       }() );
 
        window.QUnit = QUnit;
 }
@@ -2246,1959 +2254,2081 @@ if ( typeof define === "function" && define.amd ) {
        QUnit.config.autostart = false;
 }
 
-/*
- * This file is a modified version of google-diff-match-patch's JavaScript implementation
- * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js),
- * modifications are licensed as more fully set forth in LICENSE.txt.
- *
- * The original source of google-diff-match-patch is attributable and licensed as follows:
- *
- * Copyright 2006 Google Inc.
- * https://code.google.com/p/google-diff-match-patch/
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * https://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * More Info:
- *  https://code.google.com/p/google-diff-match-patch/
- *
- * Usage: QUnit.diff(expected, actual)
- *
- */
-QUnit.diff = ( function() {
-       function DiffMatchPatch() {
-       }
+// Get a reference to the global object, like window in browsers
+}( ( function() {
+       return this;
+}() ) ) );
 
-       //  DIFF FUNCTIONS
+( function() {
 
-       /**
-        * The data structure representing a diff is an array of tuples:
-        * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
-        * which means: delete 'Hello', add 'Goodbye' and keep ' world.'
-        */
-       var DIFF_DELETE = -1,
-               DIFF_INSERT = 1,
-               DIFF_EQUAL = 0;
+// Only interact with URLs via window.location
+var location = typeof window !== "undefined" && window.location;
+if ( !location ) {
+       return;
+}
 
-       /**
-        * Find the differences between two texts.  Simplifies the problem by stripping
-        * any common prefix or suffix off the texts before diffing.
-        * @param {string} text1 Old string to be diffed.
-        * @param {string} text2 New string to be diffed.
-        * @param {boolean=} optChecklines Optional speedup flag. If present and false,
-        *     then don't run a line-level diff first to identify the changed areas.
-        *     Defaults to true, which does a faster, slightly less optimal diff.
-        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
-        */
-       DiffMatchPatch.prototype.DiffMain = function( text1, text2, optChecklines ) {
-               var deadline, checklines, commonlength,
-                       commonprefix, commonsuffix, diffs;
+var urlParams = getUrlParams();
 
-               // The diff must be complete in up to 1 second.
-               deadline = ( new Date() ).getTime() + 1000;
+QUnit.urlParams = urlParams;
 
-               // Check for null inputs.
-               if ( text1 === null || text2 === null ) {
-                       throw new Error( "Null input. (DiffMain)" );
-               }
+// Match module/test by inclusion in an array
+QUnit.config.moduleId = [].concat( urlParams.moduleId || [] );
+QUnit.config.testId = [].concat( urlParams.testId || [] );
 
-               // Check for equality (speedup).
-               if ( text1 === text2 ) {
-                       if ( text1 ) {
-                               return [
-                                       [ DIFF_EQUAL, text1 ]
-                               ];
-                       }
-                       return [];
-               }
+// Exact case-insensitive match of the module name
+QUnit.config.module = urlParams.module;
 
-               if ( typeof optChecklines === "undefined" ) {
-                       optChecklines = true;
-               }
+// Regular expression or case-insenstive substring match against "moduleName: testName"
+QUnit.config.filter = urlParams.filter;
 
-               checklines = optChecklines;
+// Test order randomization
+if ( urlParams.seed === true ) {
 
-               // Trim off common prefix (speedup).
-               commonlength = this.diffCommonPrefix( text1, text2 );
-               commonprefix = text1.substring( 0, commonlength );
-               text1 = text1.substring( commonlength );
-               text2 = text2.substring( commonlength );
+       // Generate a random seed if the option is specified without a value
+       QUnit.config.seed = Math.random().toString( 36 ).slice( 2 );
+} else if ( urlParams.seed ) {
+       QUnit.config.seed = urlParams.seed;
+}
 
-               // Trim off common suffix (speedup).
-               commonlength = this.diffCommonSuffix( text1, text2 );
-               commonsuffix = text1.substring( text1.length - commonlength );
-               text1 = text1.substring( 0, text1.length - commonlength );
-               text2 = text2.substring( 0, text2.length - commonlength );
+// Add URL-parameter-mapped config values with UI form rendering data
+QUnit.config.urlConfig.push(
+       {
+               id: "hidepassed",
+               label: "Hide passed tests",
+               tooltip: "Only show tests and assertions that fail. Stored as query-strings."
+       },
+       {
+               id: "noglobals",
+               label: "Check for Globals",
+               tooltip: "Enabling this will test if any test introduces new properties on the " +
+                       "global object (`window` in Browsers). Stored as query-strings."
+       },
+       {
+               id: "notrycatch",
+               label: "No try-catch",
+               tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " +
+                       "exceptions in IE reasonable. Stored as query-strings."
+       }
+);
 
-               // Compute the diff on the middle block.
-               diffs = this.diffCompute( text1, text2, checklines, deadline );
+QUnit.begin( function() {
+       var i, option,
+               urlConfig = QUnit.config.urlConfig;
 
-               // Restore the prefix and suffix.
-               if ( commonprefix ) {
-                       diffs.unshift( [ DIFF_EQUAL, commonprefix ] );
-               }
-               if ( commonsuffix ) {
-                       diffs.push( [ DIFF_EQUAL, commonsuffix ] );
-               }
-               this.diffCleanupMerge( diffs );
-               return diffs;
-       };
+       for ( i = 0; i < urlConfig.length; i++ ) {
 
-       /**
-        * Reduce the number of edits by eliminating operationally trivial equalities.
-        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
-        */
-       DiffMatchPatch.prototype.diffCleanupEfficiency = function( diffs ) {
-               var changes, equalities, equalitiesLength, lastequality,
-                       pointer, preIns, preDel, postIns, postDel;
-               changes = false;
-               equalities = []; // Stack of indices where equalities are found.
-               equalitiesLength = 0; // Keeping our own length var is faster in JS.
-               /** @type {?string} */
-               lastequality = null;
-               // Always equal to diffs[equalities[equalitiesLength - 1]][1]
-               pointer = 0; // Index of current position.
-               // Is there an insertion operation before the last equality.
-               preIns = false;
-               // Is there a deletion operation before the last equality.
-               preDel = false;
-               // Is there an insertion operation after the last equality.
-               postIns = false;
-               // Is there a deletion operation after the last equality.
-               postDel = false;
-               while ( pointer < diffs.length ) {
+               // Options can be either strings or objects with nonempty "id" properties
+               option = QUnit.config.urlConfig[ i ];
+               if ( typeof option !== "string" ) {
+                       option = option.id;
+               }
 
-                       // Equality found.
-                       if ( diffs[ pointer ][ 0 ] === DIFF_EQUAL ) {
-                               if ( diffs[ pointer ][ 1 ].length < 4 && ( postIns || postDel ) ) {
+               if ( QUnit.config[ option ] === undefined ) {
+                       QUnit.config[ option ] = urlParams[ option ];
+               }
+       }
+} );
 
-                                       // Candidate found.
-                                       equalities[ equalitiesLength++ ] = pointer;
-                                       preIns = postIns;
-                                       preDel = postDel;
-                                       lastequality = diffs[ pointer ][ 1 ];
-                               } else {
+function getUrlParams() {
+       var i, param, name, value;
+       var urlParams = {};
+       var params = location.search.slice( 1 ).split( "&" );
+       var length = params.length;
 
-                                       // Not a candidate, and can never become one.
-                                       equalitiesLength = 0;
-                                       lastequality = null;
-                               }
-                               postIns = postDel = false;
+       for ( i = 0; i < length; i++ ) {
+               if ( params[ i ] ) {
+                       param = params[ i ].split( "=" );
+                       name = decodeURIComponent( param[ 0 ] );
 
-                       // An insertion or deletion.
+                       // Allow just a key to turn on a flag, e.g., test.html?noglobals
+                       value = param.length === 1 ||
+                               decodeURIComponent( param.slice( 1 ).join( "=" ) ) ;
+                       if ( urlParams[ name ] ) {
+                               urlParams[ name ] = [].concat( urlParams[ name ], value );
                        } else {
+                               urlParams[ name ] = value;
+                       }
+               }
+       }
 
-                               if ( diffs[ pointer ][ 0 ] === DIFF_DELETE ) {
-                                       postDel = true;
-                               } else {
-                                       postIns = true;
-                               }
+       return urlParams;
+}
 
-                               /*
-                                * Five types to be split:
-                                * <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del>
-                                * <ins>A</ins>X<ins>C</ins><del>D</del>
-                                * <ins>A</ins><del>B</del>X<ins>C</ins>
-                                * <ins>A</del>X<ins>C</ins><del>D</del>
-                                * <ins>A</ins><del>B</del>X<del>C</del>
-                                */
-                               if ( lastequality && ( ( preIns && preDel && postIns && postDel ) ||
-                                               ( ( lastequality.length < 2 ) &&
-                                               ( preIns + preDel + postIns + postDel ) === 3 ) ) ) {
+// Don't load the HTML Reporter on non-browser environments
+if ( typeof window === "undefined" || !window.document ) {
+       return;
+}
 
-                                       // Duplicate record.
-                                       diffs.splice(
-                                               equalities[ equalitiesLength - 1 ],
-                                               0,
-                                               [ DIFF_DELETE, lastequality ]
-                                       );
+// Deprecated QUnit.init - Ref #530
+// Re-initialize the configuration options
+QUnit.init = function() {
+       var config = QUnit.config;
 
-                                       // Change second copy to insert.
-                                       diffs[ equalities[ equalitiesLength - 1 ] + 1 ][ 0 ] = DIFF_INSERT;
-                                       equalitiesLength--; // Throw away the equality we just deleted;
-                                       lastequality = null;
-                                       if ( preIns && preDel ) {
-                                               // No changes made which could affect previous entry, keep going.
-                                               postIns = postDel = true;
-                                               equalitiesLength = 0;
-                                       } else {
-                                               equalitiesLength--; // Throw away the previous equality.
-                                               pointer = equalitiesLength > 0 ? equalities[ equalitiesLength - 1 ] : -1;
-                                               postIns = postDel = false;
-                                       }
-                                       changes = true;
-                               }
-                       }
-                       pointer++;
-               }
+       config.stats = { all: 0, bad: 0 };
+       config.moduleStats = { all: 0, bad: 0 };
+       config.started = 0;
+       config.updateRate = 1000;
+       config.blocking = false;
+       config.autostart = true;
+       config.autorun = false;
+       config.filter = "";
+       config.queue = [];
 
-               if ( changes ) {
-                       this.diffCleanupMerge( diffs );
-               }
-       };
+       appendInterface();
+};
 
-       /**
-        * Convert a diff array into a pretty HTML report.
-        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
-        * @param {integer} string to be beautified.
-        * @return {string} HTML representation.
-        */
-       DiffMatchPatch.prototype.diffPrettyHtml = function( diffs ) {
-               var op, data, x,
-                       html = [];
-               for ( x = 0; x < diffs.length; x++ ) {
-                       op = diffs[ x ][ 0 ]; // Operation (insert, delete, equal)
-                       data = diffs[ x ][ 1 ]; // Text of change.
-                       switch ( op ) {
-                       case DIFF_INSERT:
-                               html[ x ] = "<ins>" + data + "</ins>";
-                               break;
-                       case DIFF_DELETE:
-                               html[ x ] = "<del>" + data + "</del>";
-                               break;
-                       case DIFF_EQUAL:
-                               html[ x ] = "<span>" + data + "</span>";
-                               break;
+var config = QUnit.config,
+       document = window.document,
+       collapseNext = false,
+       hasOwn = Object.prototype.hasOwnProperty,
+       unfilteredUrl = setUrl( { filter: undefined, module: undefined,
+               moduleId: undefined, testId: undefined } ),
+       defined = {
+               sessionStorage: ( function() {
+                       var x = "qunit-test-string";
+                       try {
+                               sessionStorage.setItem( x, x );
+                               sessionStorage.removeItem( x );
+                               return true;
+                       } catch ( e ) {
+                               return false;
                        }
-               }
-               return html.join( "" );
-       };
+               }() )
+       },
+       modulesList = [];
 
-       /**
-        * Determine the common prefix of two strings.
-        * @param {string} text1 First string.
-        * @param {string} text2 Second string.
-        * @return {number} The number of characters common to the start of each
-        *     string.
-        */
-       DiffMatchPatch.prototype.diffCommonPrefix = function( text1, text2 ) {
-               var pointermid, pointermax, pointermin, pointerstart;
-               // Quick check for common null cases.
-               if ( !text1 || !text2 || text1.charAt( 0 ) !== text2.charAt( 0 ) ) {
-                       return 0;
-               }
-               // Binary search.
-               // Performance analysis: https://neil.fraser.name/news/2007/10/09/
-               pointermin = 0;
-               pointermax = Math.min( text1.length, text2.length );
-               pointermid = pointermax;
-               pointerstart = 0;
-               while ( pointermin < pointermid ) {
-                       if ( text1.substring( pointerstart, pointermid ) ===
-                                       text2.substring( pointerstart, pointermid ) ) {
-                               pointermin = pointermid;
-                               pointerstart = pointermin;
-                       } else {
-                               pointermax = pointermid;
-                       }
-                       pointermid = Math.floor( ( pointermax - pointermin ) / 2 + pointermin );
-               }
-               return pointermid;
-       };
+/**
+* Escape text for attribute or text content.
+*/
+function escapeText( s ) {
+       if ( !s ) {
+               return "";
+       }
+       s = s + "";
 
-       /**
-        * Determine the common suffix of two strings.
-        * @param {string} text1 First string.
-        * @param {string} text2 Second string.
-        * @return {number} The number of characters common to the end of each string.
-        */
-       DiffMatchPatch.prototype.diffCommonSuffix = function( text1, text2 ) {
-               var pointermid, pointermax, pointermin, pointerend;
-               // Quick check for common null cases.
-               if ( !text1 ||
-                               !text2 ||
-                               text1.charAt( text1.length - 1 ) !== text2.charAt( text2.length - 1 ) ) {
-                       return 0;
-               }
-               // Binary search.
-               // Performance analysis: https://neil.fraser.name/news/2007/10/09/
-               pointermin = 0;
-               pointermax = Math.min( text1.length, text2.length );
-               pointermid = pointermax;
-               pointerend = 0;
-               while ( pointermin < pointermid ) {
-                       if ( text1.substring( text1.length - pointermid, text1.length - pointerend ) ===
-                                       text2.substring( text2.length - pointermid, text2.length - pointerend ) ) {
-                               pointermin = pointermid;
-                               pointerend = pointermin;
-                       } else {
-                               pointermax = pointermid;
-                       }
-                       pointermid = Math.floor( ( pointermax - pointermin ) / 2 + pointermin );
+       // Both single quotes and double quotes (for attributes)
+       return s.replace( /['"<>&]/g, function( s ) {
+               switch ( s ) {
+               case "'":
+                       return "&#039;";
+               case "\"":
+                       return "&quot;";
+               case "<":
+                       return "&lt;";
+               case ">":
+                       return "&gt;";
+               case "&":
+                       return "&amp;";
                }
-               return pointermid;
-       };
-
-       /**
-        * Find the differences between two texts.  Assumes that the texts do not
-        * have any common prefix or suffix.
-        * @param {string} text1 Old string to be diffed.
-        * @param {string} text2 New string to be diffed.
-        * @param {boolean} checklines Speedup flag.  If false, then don't run a
-        *     line-level diff first to identify the changed areas.
-        *     If true, then run a faster, slightly less optimal diff.
-        * @param {number} deadline Time when the diff should be complete by.
-        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffCompute = function( text1, text2, checklines, deadline ) {
-               var diffs, longtext, shorttext, i, hm,
-                       text1A, text2A, text1B, text2B,
-                       midCommon, diffsA, diffsB;
+       } );
+}
 
-               if ( !text1 ) {
-                       // Just add some text (speedup).
-                       return [
-                               [ DIFF_INSERT, text2 ]
-                       ];
-               }
+/**
+ * @param {HTMLElement} elem
+ * @param {string} type
+ * @param {Function} fn
+ */
+function addEvent( elem, type, fn ) {
+       if ( elem.addEventListener ) {
 
-               if ( !text2 ) {
-                       // Just delete some text (speedup).
-                       return [
-                               [ DIFF_DELETE, text1 ]
-                       ];
-               }
+               // Standards-based browsers
+               elem.addEventListener( type, fn, false );
+       } else if ( elem.attachEvent ) {
 
-               longtext = text1.length > text2.length ? text1 : text2;
-               shorttext = text1.length > text2.length ? text2 : text1;
-               i = longtext.indexOf( shorttext );
-               if ( i !== -1 ) {
-                       // Shorter text is inside the longer text (speedup).
-                       diffs = [
-                               [ DIFF_INSERT, longtext.substring( 0, i ) ],
-                               [ DIFF_EQUAL, shorttext ],
-                               [ DIFF_INSERT, longtext.substring( i + shorttext.length ) ]
-                       ];
-                       // Swap insertions for deletions if diff is reversed.
-                       if ( text1.length > text2.length ) {
-                               diffs[ 0 ][ 0 ] = diffs[ 2 ][ 0 ] = DIFF_DELETE;
+               // Support: IE <9
+               elem.attachEvent( "on" + type, function() {
+                       var event = window.event;
+                       if ( !event.target ) {
+                               event.target = event.srcElement || document;
                        }
-                       return diffs;
-               }
 
-               if ( shorttext.length === 1 ) {
-                       // Single character string.
-                       // After the previous speedup, the character can't be an equality.
-                       return [
-                               [ DIFF_DELETE, text1 ],
-                               [ DIFF_INSERT, text2 ]
-                       ];
-               }
+                       fn.call( elem, event );
+               } );
+       }
+}
 
-               // Check to see if the problem can be split in two.
-               hm = this.diffHalfMatch( text1, text2 );
-               if ( hm ) {
-                       // A half-match was found, sort out the return data.
-                       text1A = hm[ 0 ];
-                       text1B = hm[ 1 ];
-                       text2A = hm[ 2 ];
-                       text2B = hm[ 3 ];
-                       midCommon = hm[ 4 ];
-                       // Send both pairs off for separate processing.
-                       diffsA = this.DiffMain( text1A, text2A, checklines, deadline );
-                       diffsB = this.DiffMain( text1B, text2B, checklines, deadline );
-                       // Merge the results.
-                       return diffsA.concat( [
-                               [ DIFF_EQUAL, midCommon ]
-                       ], diffsB );
-               }
+/**
+ * @param {Array|NodeList} elems
+ * @param {string} type
+ * @param {Function} fn
+ */
+function addEvents( elems, type, fn ) {
+       var i = elems.length;
+       while ( i-- ) {
+               addEvent( elems[ i ], type, fn );
+       }
+}
 
-               if ( checklines && text1.length > 100 && text2.length > 100 ) {
-                       return this.diffLineMode( text1, text2, deadline );
-               }
+function hasClass( elem, name ) {
+       return ( " " + elem.className + " " ).indexOf( " " + name + " " ) >= 0;
+}
 
-               return this.diffBisect( text1, text2, deadline );
-       };
+function addClass( elem, name ) {
+       if ( !hasClass( elem, name ) ) {
+               elem.className += ( elem.className ? " " : "" ) + name;
+       }
+}
 
-       /**
-        * Do the two texts share a substring which is at least half the length of the
-        * longer text?
-        * This speedup can produce non-minimal diffs.
-        * @param {string} text1 First string.
-        * @param {string} text2 Second string.
-        * @return {Array.<string>} Five element Array, containing the prefix of
-        *     text1, the suffix of text1, the prefix of text2, the suffix of
-        *     text2 and the common middle.  Or null if there was no match.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffHalfMatch = function( text1, text2 ) {
-               var longtext, shorttext, dmp,
-                       text1A, text2B, text2A, text1B, midCommon,
-                       hm1, hm2, hm;
+function toggleClass( elem, name, force ) {
+       if ( force || typeof force === "undefined" && !hasClass( elem, name ) ) {
+               addClass( elem, name );
+       } else {
+               removeClass( elem, name );
+       }
+}
 
-               longtext = text1.length > text2.length ? text1 : text2;
-               shorttext = text1.length > text2.length ? text2 : text1;
-               if ( longtext.length < 4 || shorttext.length * 2 < longtext.length ) {
-                       return null; // Pointless.
+function removeClass( elem, name ) {
+       var set = " " + elem.className + " ";
+
+       // Class name may appear multiple times
+       while ( set.indexOf( " " + name + " " ) >= 0 ) {
+               set = set.replace( " " + name + " ", " " );
+       }
+
+       // Trim for prettiness
+       elem.className = typeof set.trim === "function" ? set.trim() : set.replace( /^\s+|\s+$/g, "" );
+}
+
+function id( name ) {
+       return document.getElementById && document.getElementById( name );
+}
+
+function getUrlConfigHtml() {
+       var i, j, val,
+               escaped, escapedTooltip,
+               selection = false,
+               urlConfig = config.urlConfig,
+               urlConfigHtml = "";
+
+       for ( i = 0; i < urlConfig.length; i++ ) {
+
+               // Options can be either strings or objects with nonempty "id" properties
+               val = config.urlConfig[ i ];
+               if ( typeof val === "string" ) {
+                       val = {
+                               id: val,
+                               label: val
+                       };
                }
-               dmp = this; // 'this' becomes 'window' in a closure.
 
-               /**
-                * Does a substring of shorttext exist within longtext such that the substring
-                * is at least half the length of longtext?
-                * Closure, but does not reference any external variables.
-                * @param {string} longtext Longer string.
-                * @param {string} shorttext Shorter string.
-                * @param {number} i Start index of quarter length substring within longtext.
-                * @return {Array.<string>} Five element Array, containing the prefix of
-                *     longtext, the suffix of longtext, the prefix of shorttext, the suffix
-                *     of shorttext and the common middle.  Or null if there was no match.
-                * @private
-                */
-               function diffHalfMatchI( longtext, shorttext, i ) {
-                       var seed, j, bestCommon, prefixLength, suffixLength,
-                               bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB;
-                       // Start with a 1/4 length substring at position i as a seed.
-                       seed = longtext.substring( i, i + Math.floor( longtext.length / 4 ) );
-                       j = -1;
-                       bestCommon = "";
-                       while ( ( j = shorttext.indexOf( seed, j + 1 ) ) !== -1 ) {
-                               prefixLength = dmp.diffCommonPrefix( longtext.substring( i ),
-                                       shorttext.substring( j ) );
-                               suffixLength = dmp.diffCommonSuffix( longtext.substring( 0, i ),
-                                       shorttext.substring( 0, j ) );
-                               if ( bestCommon.length < suffixLength + prefixLength ) {
-                                       bestCommon = shorttext.substring( j - suffixLength, j ) +
-                                               shorttext.substring( j, j + prefixLength );
-                                       bestLongtextA = longtext.substring( 0, i - suffixLength );
-                                       bestLongtextB = longtext.substring( i + prefixLength );
-                                       bestShorttextA = shorttext.substring( 0, j - suffixLength );
-                                       bestShorttextB = shorttext.substring( j + prefixLength );
+               escaped = escapeText( val.id );
+               escapedTooltip = escapeText( val.tooltip );
+
+               if ( !val.value || typeof val.value === "string" ) {
+                       urlConfigHtml += "<input id='qunit-urlconfig-" + escaped +
+                               "' name='" + escaped + "' type='checkbox'" +
+                               ( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
+                               ( config[ val.id ] ? " checked='checked'" : "" ) +
+                               " title='" + escapedTooltip + "' /><label for='qunit-urlconfig-" + escaped +
+                               "' title='" + escapedTooltip + "'>" + val.label + "</label>";
+               } else {
+                       urlConfigHtml += "<label for='qunit-urlconfig-" + escaped +
+                               "' title='" + escapedTooltip + "'>" + val.label +
+                               ": </label><select id='qunit-urlconfig-" + escaped +
+                               "' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
+
+                       if ( QUnit.is( "array", val.value ) ) {
+                               for ( j = 0; j < val.value.length; j++ ) {
+                                       escaped = escapeText( val.value[ j ] );
+                                       urlConfigHtml += "<option value='" + escaped + "'" +
+                                               ( config[ val.id ] === val.value[ j ] ?
+                                                       ( selection = true ) && " selected='selected'" : "" ) +
+                                               ">" + escaped + "</option>";
                                }
-                       }
-                       if ( bestCommon.length * 2 >= longtext.length ) {
-                               return [ bestLongtextA, bestLongtextB,
-                                       bestShorttextA, bestShorttextB, bestCommon
-                               ];
                        } else {
-                               return null;
+                               for ( j in val.value ) {
+                                       if ( hasOwn.call( val.value, j ) ) {
+                                               urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
+                                                       ( config[ val.id ] === j ?
+                                                               ( selection = true ) && " selected='selected'" : "" ) +
+                                                       ">" + escapeText( val.value[ j ] ) + "</option>";
+                                       }
+                               }
+                       }
+                       if ( config[ val.id ] && !selection ) {
+                               escaped = escapeText( config[ val.id ] );
+                               urlConfigHtml += "<option value='" + escaped +
+                                       "' selected='selected' disabled='disabled'>" + escaped + "</option>";
                        }
+                       urlConfigHtml += "</select>";
                }
+       }
 
-               // First check if the second quarter is the seed for a half-match.
-               hm1 = diffHalfMatchI( longtext, shorttext,
-                       Math.ceil( longtext.length / 4 ) );
-               // Check again based on the third quarter.
-               hm2 = diffHalfMatchI( longtext, shorttext,
-                       Math.ceil( longtext.length / 2 ) );
-               if ( !hm1 && !hm2 ) {
-                       return null;
-               } else if ( !hm2 ) {
-                       hm = hm1;
-               } else if ( !hm1 ) {
-                       hm = hm2;
-               } else {
-                       // Both matched.  Select the longest.
-                       hm = hm1[ 4 ].length > hm2[ 4 ].length ? hm1 : hm2;
-               }
+       return urlConfigHtml;
+}
 
-               // A half-match was found, sort out the return data.
-               text1A, text1B, text2A, text2B;
-               if ( text1.length > text2.length ) {
-                       text1A = hm[ 0 ];
-                       text1B = hm[ 1 ];
-                       text2A = hm[ 2 ];
-                       text2B = hm[ 3 ];
-               } else {
-                       text2A = hm[ 0 ];
-                       text2B = hm[ 1 ];
-                       text1A = hm[ 2 ];
-                       text1B = hm[ 3 ];
+// Handle "click" events on toolbar checkboxes and "change" for select menus.
+// Updates the URL with the new state of `config.urlConfig` values.
+function toolbarChanged() {
+       var updatedUrl, value, tests,
+               field = this,
+               params = {};
+
+       // Detect if field is a select menu or a checkbox
+       if ( "selectedIndex" in field ) {
+               value = field.options[ field.selectedIndex ].value || undefined;
+       } else {
+               value = field.checked ? ( field.defaultValue || true ) : undefined;
+       }
+
+       params[ field.name ] = value;
+       updatedUrl = setUrl( params );
+
+       // Check if we can apply the change without a page refresh
+       if ( "hidepassed" === field.name && "replaceState" in window.history ) {
+               QUnit.urlParams[ field.name ] = value;
+               config[ field.name ] = value || false;
+               tests = id( "qunit-tests" );
+               if ( tests ) {
+                       toggleClass( tests, "hidepass", value || false );
                }
-               midCommon = hm[ 4 ];
-               return [ text1A, text1B, text2A, text2B, midCommon ];
-       };
+               window.history.replaceState( null, "", updatedUrl );
+       } else {
+               window.location = updatedUrl;
+       }
+}
 
-       /**
-        * Do a quick line-level diff on both strings, then rediff the parts for
-        * greater accuracy.
-        * This speedup can produce non-minimal diffs.
-        * @param {string} text1 Old string to be diffed.
-        * @param {string} text2 New string to be diffed.
-        * @param {number} deadline Time when the diff should be complete by.
-        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffLineMode = function( text1, text2, deadline ) {
-               var a, diffs, linearray, pointer, countInsert,
-                       countDelete, textInsert, textDelete, j;
-               // Scan the text on a line-by-line basis first.
-               a = this.diffLinesToChars( text1, text2 );
-               text1 = a.chars1;
-               text2 = a.chars2;
-               linearray = a.lineArray;
+function setUrl( params ) {
+       var key, arrValue, i,
+               querystring = "?",
+               location = window.location;
 
-               diffs = this.DiffMain( text1, text2, false, deadline );
+       params = QUnit.extend( QUnit.extend( {}, QUnit.urlParams ), params );
 
-               // Convert the diff back to original text.
-               this.diffCharsToLines( diffs, linearray );
-               // Eliminate freak matches (e.g. blank lines)
-               this.diffCleanupSemantic( diffs );
+       for ( key in params ) {
 
-               // Rediff any replacement blocks, this time character-by-character.
-               // Add a dummy entry at the end.
-               diffs.push( [ DIFF_EQUAL, "" ] );
-               pointer = 0;
-               countDelete = 0;
-               countInsert = 0;
-               textDelete = "";
-               textInsert = "";
-               while ( pointer < diffs.length ) {
-                       switch ( diffs[ pointer ][ 0 ] ) {
-                       case DIFF_INSERT:
-                               countInsert++;
-                               textInsert += diffs[ pointer ][ 1 ];
-                               break;
-                       case DIFF_DELETE:
-                               countDelete++;
-                               textDelete += diffs[ pointer ][ 1 ];
-                               break;
-                       case DIFF_EQUAL:
-                               // Upon reaching an equality, check for prior redundancies.
-                               if ( countDelete >= 1 && countInsert >= 1 ) {
-                                       // Delete the offending records and add the merged ones.
-                                       diffs.splice( pointer - countDelete - countInsert,
-                                               countDelete + countInsert );
-                                       pointer = pointer - countDelete - countInsert;
-                                       a = this.DiffMain( textDelete, textInsert, false, deadline );
-                                       for ( j = a.length - 1; j >= 0; j-- ) {
-                                               diffs.splice( pointer, 0, a[ j ] );
-                                       }
-                                       pointer = pointer + a.length;
+               // Skip inherited or undefined properties
+               if ( hasOwn.call( params, key ) && params[ key ] !== undefined ) {
+
+                       // Output a parameter for each value of this key (but usually just one)
+                       arrValue = [].concat( params[ key ] );
+                       for ( i = 0; i < arrValue.length; i++ ) {
+                               querystring += encodeURIComponent( key );
+                               if ( arrValue[ i ] !== true ) {
+                                       querystring += "=" + encodeURIComponent( arrValue[ i ] );
                                }
-                               countInsert = 0;
-                               countDelete = 0;
-                               textDelete = "";
-                               textInsert = "";
-                               break;
+                               querystring += "&";
                        }
-                       pointer++;
                }
-               diffs.pop(); // Remove the dummy entry at the end.
+       }
+       return location.protocol + "//" + location.host +
+               location.pathname + querystring.slice( 0, -1 );
+}
 
-               return diffs;
-       };
+function applyUrlParams() {
+       var selectedModule,
+               modulesList = id( "qunit-modulefilter" ),
+               filter = id( "qunit-filter-input" ).value;
 
-       /**
-        * Find the 'middle snake' of a diff, split the problem in two
-        * and return the recursively constructed diff.
-        * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
-        * @param {string} text1 Old string to be diffed.
-        * @param {string} text2 New string to be diffed.
-        * @param {number} deadline Time at which to bail if not yet complete.
-        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffBisect = function( text1, text2, deadline ) {
-               var text1Length, text2Length, maxD, vOffset, vLength,
-                       v1, v2, x, delta, front, k1start, k1end, k2start,
-                       k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2;
-               // Cache the text lengths to prevent multiple calls.
-               text1Length = text1.length;
-               text2Length = text2.length;
-               maxD = Math.ceil( ( text1Length + text2Length ) / 2 );
-               vOffset = maxD;
-               vLength = 2 * maxD;
-               v1 = new Array( vLength );
-               v2 = new Array( vLength );
-               // Setting all elements to -1 is faster in Chrome & Firefox than mixing
-               // integers and undefined.
-               for ( x = 0; x < vLength; x++ ) {
-                       v1[ x ] = -1;
-                       v2[ x ] = -1;
+       selectedModule = modulesList ?
+               decodeURIComponent( modulesList.options[ modulesList.selectedIndex ].value ) :
+               undefined;
+
+       window.location = setUrl( {
+               module: ( selectedModule === "" ) ? undefined : selectedModule,
+               filter: ( filter === "" ) ? undefined : filter,
+
+               // Remove moduleId and testId filters
+               moduleId: undefined,
+               testId: undefined
+       } );
+}
+
+function toolbarUrlConfigContainer() {
+       var urlConfigContainer = document.createElement( "span" );
+
+       urlConfigContainer.innerHTML = getUrlConfigHtml();
+       addClass( urlConfigContainer, "qunit-url-config" );
+
+       // For oldIE support:
+       // * Add handlers to the individual elements instead of the container
+       // * Use "click" instead of "change" for checkboxes
+       addEvents( urlConfigContainer.getElementsByTagName( "input" ), "click", toolbarChanged );
+       addEvents( urlConfigContainer.getElementsByTagName( "select" ), "change", toolbarChanged );
+
+       return urlConfigContainer;
+}
+
+function toolbarLooseFilter() {
+       var filter = document.createElement( "form" ),
+               label = document.createElement( "label" ),
+               input = document.createElement( "input" ),
+               button = document.createElement( "button" );
+
+       addClass( filter, "qunit-filter" );
+
+       label.innerHTML = "Filter: ";
+
+       input.type = "text";
+       input.value = config.filter || "";
+       input.name = "filter";
+       input.id = "qunit-filter-input";
+
+       button.innerHTML = "Go";
+
+       label.appendChild( input );
+
+       filter.appendChild( label );
+       filter.appendChild( button );
+       addEvent( filter, "submit", function( ev ) {
+               applyUrlParams();
+
+               if ( ev && ev.preventDefault ) {
+                       ev.preventDefault();
                }
-               v1[ vOffset + 1 ] = 0;
-               v2[ vOffset + 1 ] = 0;
-               delta = text1Length - text2Length;
-               // If the total number of characters is odd, then the front path will collide
-               // with the reverse path.
-               front = ( delta % 2 !== 0 );
-               // Offsets for start and end of k loop.
-               // Prevents mapping of space beyond the grid.
-               k1start = 0;
-               k1end = 0;
-               k2start = 0;
-               k2end = 0;
-               for ( d = 0; d < maxD; d++ ) {
-                       // Bail out if deadline is reached.
-                       if ( ( new Date() ).getTime() > deadline ) {
-                               break;
-                       }
 
-                       // Walk the front path one step.
-                       for ( k1 = -d + k1start; k1 <= d - k1end; k1 += 2 ) {
-                               k1Offset = vOffset + k1;
-                               if ( k1 === -d || ( k1 !== d && v1[ k1Offset - 1 ] < v1[ k1Offset + 1 ] ) ) {
-                                       x1 = v1[ k1Offset + 1 ];
-                               } else {
-                                       x1 = v1[ k1Offset - 1 ] + 1;
-                               }
-                               y1 = x1 - k1;
-                               while ( x1 < text1Length && y1 < text2Length &&
-                                       text1.charAt( x1 ) === text2.charAt( y1 ) ) {
-                                       x1++;
-                                       y1++;
-                               }
-                               v1[ k1Offset ] = x1;
-                               if ( x1 > text1Length ) {
-                                       // Ran off the right of the graph.
-                                       k1end += 2;
-                               } else if ( y1 > text2Length ) {
-                                       // Ran off the bottom of the graph.
-                                       k1start += 2;
-                               } else if ( front ) {
-                                       k2Offset = vOffset + delta - k1;
-                                       if ( k2Offset >= 0 && k2Offset < vLength && v2[ k2Offset ] !== -1 ) {
-                                               // Mirror x2 onto top-left coordinate system.
-                                               x2 = text1Length - v2[ k2Offset ];
-                                               if ( x1 >= x2 ) {
-                                                       // Overlap detected.
-                                                       return this.diffBisectSplit( text1, text2, x1, y1, deadline );
-                                               }
-                                       }
-                               }
-                       }
+               return false;
+       } );
+
+       return filter;
+}
+
+function toolbarModuleFilterHtml() {
+       var i,
+               moduleFilterHtml = "";
+
+       if ( !modulesList.length ) {
+               return false;
+       }
+
+       moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label>" +
+               "<select id='qunit-modulefilter' name='modulefilter'><option value='' " +
+               ( QUnit.urlParams.module === undefined ? "selected='selected'" : "" ) +
+               ">< All Modules ></option>";
+
+       for ( i = 0; i < modulesList.length; i++ ) {
+               moduleFilterHtml += "<option value='" +
+                       escapeText( encodeURIComponent( modulesList[ i ] ) ) + "' " +
+                       ( QUnit.urlParams.module === modulesList[ i ] ? "selected='selected'" : "" ) +
+                       ">" + escapeText( modulesList[ i ] ) + "</option>";
+       }
+       moduleFilterHtml += "</select>";
+
+       return moduleFilterHtml;
+}
+
+function toolbarModuleFilter() {
+       var toolbar = id( "qunit-testrunner-toolbar" ),
+               moduleFilter = document.createElement( "span" ),
+               moduleFilterHtml = toolbarModuleFilterHtml();
+
+       if ( !toolbar || !moduleFilterHtml ) {
+               return false;
+       }
+
+       moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
+       moduleFilter.innerHTML = moduleFilterHtml;
+
+       addEvent( moduleFilter.lastChild, "change", applyUrlParams );
+
+       toolbar.appendChild( moduleFilter );
+}
+
+function appendToolbar() {
+       var toolbar = id( "qunit-testrunner-toolbar" );
+
+       if ( toolbar ) {
+               toolbar.appendChild( toolbarUrlConfigContainer() );
+               toolbar.appendChild( toolbarLooseFilter() );
+               toolbarModuleFilter();
+       }
+}
+
+function appendHeader() {
+       var header = id( "qunit-header" );
+
+       if ( header ) {
+               header.innerHTML = "<a href='" + escapeText( unfilteredUrl ) + "'>" + header.innerHTML +
+                       "</a> ";
+       }
+}
+
+function appendBanner() {
+       var banner = id( "qunit-banner" );
+
+       if ( banner ) {
+               banner.className = "";
+       }
+}
+
+function appendTestResults() {
+       var tests = id( "qunit-tests" ),
+               result = id( "qunit-testresult" );
+
+       if ( result ) {
+               result.parentNode.removeChild( result );
+       }
+
+       if ( tests ) {
+               tests.innerHTML = "";
+               result = document.createElement( "p" );
+               result.id = "qunit-testresult";
+               result.className = "result";
+               tests.parentNode.insertBefore( result, tests );
+               result.innerHTML = "Running...<br />&#160;";
+       }
+}
+
+function storeFixture() {
+       var fixture = id( "qunit-fixture" );
+       if ( fixture ) {
+               config.fixture = fixture.innerHTML;
+       }
+}
+
+function appendFilteredTest() {
+       var testId = QUnit.config.testId;
+       if ( !testId || testId.length <= 0 ) {
+               return "";
+       }
+       return "<div id='qunit-filteredTest'>Rerunning selected tests: " +
+               escapeText( testId.join( ", " ) ) +
+               " <a id='qunit-clearFilter' href='" +
+               escapeText( unfilteredUrl ) +
+               "'>Run all tests</a></div>";
+}
+
+function appendUserAgent() {
+       var userAgent = id( "qunit-userAgent" );
+
+       if ( userAgent ) {
+               userAgent.innerHTML = "";
+               userAgent.appendChild(
+                       document.createTextNode(
+                               "QUnit " + QUnit.version + "; " + navigator.userAgent
+                       )
+               );
+       }
+}
 
-                       // Walk the reverse path one step.
-                       for ( k2 = -d + k2start; k2 <= d - k2end; k2 += 2 ) {
-                               k2Offset = vOffset + k2;
-                               if ( k2 === -d || ( k2 !== d && v2[ k2Offset - 1 ] < v2[ k2Offset + 1 ] ) ) {
-                                       x2 = v2[ k2Offset + 1 ];
-                               } else {
-                                       x2 = v2[ k2Offset - 1 ] + 1;
-                               }
-                               y2 = x2 - k2;
-                               while ( x2 < text1Length && y2 < text2Length &&
-                                       text1.charAt( text1Length - x2 - 1 ) ===
-                                       text2.charAt( text2Length - y2 - 1 ) ) {
-                                       x2++;
-                                       y2++;
-                               }
-                               v2[ k2Offset ] = x2;
-                               if ( x2 > text1Length ) {
-                                       // Ran off the left of the graph.
-                                       k2end += 2;
-                               } else if ( y2 > text2Length ) {
-                                       // Ran off the top of the graph.
-                                       k2start += 2;
-                               } else if ( !front ) {
-                                       k1Offset = vOffset + delta - k2;
-                                       if ( k1Offset >= 0 && k1Offset < vLength && v1[ k1Offset ] !== -1 ) {
-                                               x1 = v1[ k1Offset ];
-                                               y1 = vOffset + x1 - k1Offset;
-                                               // Mirror x2 onto top-left coordinate system.
-                                               x2 = text1Length - x2;
-                                               if ( x1 >= x2 ) {
-                                                       // Overlap detected.
-                                                       return this.diffBisectSplit( text1, text2, x1, y1, deadline );
-                                               }
-                                       }
-                               }
-                       }
+function appendInterface() {
+       var qunit = id( "qunit" );
+
+       if ( qunit ) {
+               qunit.innerHTML =
+                       "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
+                       "<h2 id='qunit-banner'></h2>" +
+                       "<div id='qunit-testrunner-toolbar'></div>" +
+                       appendFilteredTest() +
+                       "<h2 id='qunit-userAgent'></h2>" +
+                       "<ol id='qunit-tests'></ol>";
+       }
+
+       appendHeader();
+       appendBanner();
+       appendTestResults();
+       appendUserAgent();
+       appendToolbar();
+}
+
+function appendTestsList( modules ) {
+       var i, l, x, z, test, moduleObj;
+
+       for ( i = 0, l = modules.length; i < l; i++ ) {
+               moduleObj = modules[ i ];
+
+               for ( x = 0, z = moduleObj.tests.length; x < z; x++ ) {
+                       test = moduleObj.tests[ x ];
+
+                       appendTest( test.name, test.testId, moduleObj.name );
                }
-               // Diff took too long and hit the deadline or
-               // number of diffs equals number of characters, no commonality at all.
-               return [
-                       [ DIFF_DELETE, text1 ],
-                       [ DIFF_INSERT, text2 ]
-               ];
-       };
+       }
+}
 
-       /**
-        * Given the location of the 'middle snake', split the diff in two parts
-        * and recurse.
-        * @param {string} text1 Old string to be diffed.
-        * @param {string} text2 New string to be diffed.
-        * @param {number} x Index of split point in text1.
-        * @param {number} y Index of split point in text2.
-        * @param {number} deadline Time at which to bail if not yet complete.
-        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffBisectSplit = function( text1, text2, x, y, deadline ) {
-               var text1a, text1b, text2a, text2b, diffs, diffsb;
-               text1a = text1.substring( 0, x );
-               text2a = text2.substring( 0, y );
-               text1b = text1.substring( x );
-               text2b = text2.substring( y );
+function appendTest( name, testId, moduleName ) {
+       var title, rerunTrigger, testBlock, assertList,
+               tests = id( "qunit-tests" );
 
-               // Compute both diffs serially.
-               diffs = this.DiffMain( text1a, text2a, false, deadline );
-               diffsb = this.DiffMain( text1b, text2b, false, deadline );
+       if ( !tests ) {
+               return;
+       }
 
-               return diffs.concat( diffsb );
-       };
+       title = document.createElement( "strong" );
+       title.innerHTML = getNameHtml( name, moduleName );
 
-       /**
-        * Reduce the number of edits by eliminating semantically trivial equalities.
-        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
-        */
-       DiffMatchPatch.prototype.diffCleanupSemantic = function( diffs ) {
-               var changes, equalities, equalitiesLength, lastequality,
-                       pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1,
-                       lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
-               changes = false;
-               equalities = []; // Stack of indices where equalities are found.
-               equalitiesLength = 0; // Keeping our own length var is faster in JS.
-               /** @type {?string} */
-               lastequality = null;
-               // Always equal to diffs[equalities[equalitiesLength - 1]][1]
-               pointer = 0; // Index of current position.
-               // Number of characters that changed prior to the equality.
-               lengthInsertions1 = 0;
-               lengthDeletions1 = 0;
-               // Number of characters that changed after the equality.
-               lengthInsertions2 = 0;
-               lengthDeletions2 = 0;
-               while ( pointer < diffs.length ) {
-                       if ( diffs[ pointer ][ 0 ] === DIFF_EQUAL ) { // Equality found.
-                               equalities[ equalitiesLength++ ] = pointer;
-                               lengthInsertions1 = lengthInsertions2;
-                               lengthDeletions1 = lengthDeletions2;
-                               lengthInsertions2 = 0;
-                               lengthDeletions2 = 0;
-                               lastequality = diffs[ pointer ][ 1 ];
-                       } else { // An insertion or deletion.
-                               if ( diffs[ pointer ][ 0 ] === DIFF_INSERT ) {
-                                       lengthInsertions2 += diffs[ pointer ][ 1 ].length;
-                               } else {
-                                       lengthDeletions2 += diffs[ pointer ][ 1 ].length;
-                               }
-                               // Eliminate an equality that is smaller or equal to the edits on both
-                               // sides of it.
-                               if ( lastequality && ( lastequality.length <=
-                                               Math.max( lengthInsertions1, lengthDeletions1 ) ) &&
-                                               ( lastequality.length <= Math.max( lengthInsertions2,
-                                                       lengthDeletions2 ) ) ) {
+       rerunTrigger = document.createElement( "a" );
+       rerunTrigger.innerHTML = "Rerun";
+       rerunTrigger.href = setUrl( { testId: testId } );
 
-                                       // Duplicate record.
-                                       diffs.splice(
-                                               equalities[ equalitiesLength - 1 ],
-                                               0,
-                                               [ DIFF_DELETE, lastequality ]
-                                       );
+       testBlock = document.createElement( "li" );
+       testBlock.appendChild( title );
+       testBlock.appendChild( rerunTrigger );
+       testBlock.id = "qunit-test-output-" + testId;
 
-                                       // Change second copy to insert.
-                                       diffs[ equalities[ equalitiesLength - 1 ] + 1 ][ 0 ] = DIFF_INSERT;
+       assertList = document.createElement( "ol" );
+       assertList.className = "qunit-assert-list";
 
-                                       // Throw away the equality we just deleted.
-                                       equalitiesLength--;
+       testBlock.appendChild( assertList );
 
-                                       // Throw away the previous equality (it needs to be reevaluated).
-                                       equalitiesLength--;
-                                       pointer = equalitiesLength > 0 ? equalities[ equalitiesLength - 1 ] : -1;
+       tests.appendChild( testBlock );
+}
 
-                                       // Reset the counters.
-                                       lengthInsertions1 = 0;
-                                       lengthDeletions1 = 0;
-                                       lengthInsertions2 = 0;
-                                       lengthDeletions2 = 0;
-                                       lastequality = null;
-                                       changes = true;
-                               }
-                       }
-                       pointer++;
-               }
+// HTML Reporter initialization and load
+QUnit.begin( function( details ) {
+       var i, moduleObj, tests;
 
-               // Normalize the diff.
-               if ( changes ) {
-                       this.diffCleanupMerge( diffs );
+       // Sort modules by name for the picker
+       for ( i = 0; i < details.modules.length; i++ ) {
+               moduleObj = details.modules[ i ];
+               if ( moduleObj.name ) {
+                       modulesList.push( moduleObj.name );
                }
+       }
+       modulesList.sort( function( a, b ) {
+               return a.localeCompare( b );
+       } );
 
-               // Find any overlaps between deletions and insertions.
-               // e.g: <del>abcxxx</del><ins>xxxdef</ins>
-               //   -> <del>abc</del>xxx<ins>def</ins>
-               // e.g: <del>xxxabc</del><ins>defxxx</ins>
-               //   -> <ins>def</ins>xxx<del>abc</del>
-               // Only extract an overlap if it is as big as the edit ahead or behind it.
-               pointer = 1;
-               while ( pointer < diffs.length ) {
-                       if ( diffs[ pointer - 1 ][ 0 ] === DIFF_DELETE &&
-                                       diffs[ pointer ][ 0 ] === DIFF_INSERT ) {
-                               deletion = diffs[ pointer - 1 ][ 1 ];
-                               insertion = diffs[ pointer ][ 1 ];
-                               overlapLength1 = this.diffCommonOverlap( deletion, insertion );
-                               overlapLength2 = this.diffCommonOverlap( insertion, deletion );
-                               if ( overlapLength1 >= overlapLength2 ) {
-                                       if ( overlapLength1 >= deletion.length / 2 ||
-                                                       overlapLength1 >= insertion.length / 2 ) {
-                                               // Overlap found.  Insert an equality and trim the surrounding edits.
-                                               diffs.splice(
-                                                       pointer,
-                                                       0,
-                                                       [ DIFF_EQUAL, insertion.substring( 0, overlapLength1 ) ]
-                                               );
-                                               diffs[ pointer - 1 ][ 1 ] =
-                                                       deletion.substring( 0, deletion.length - overlapLength1 );
-                                               diffs[ pointer + 1 ][ 1 ] = insertion.substring( overlapLength1 );
-                                               pointer++;
-                                       }
-                               } else {
-                                       if ( overlapLength2 >= deletion.length / 2 ||
-                                                       overlapLength2 >= insertion.length / 2 ) {
+       // Capture fixture HTML from the page
+       storeFixture();
 
-                                               // Reverse overlap found.
-                                               // Insert an equality and swap and trim the surrounding edits.
-                                               diffs.splice(
-                                                       pointer,
-                                                       0,
-                                                       [ DIFF_EQUAL, deletion.substring( 0, overlapLength2 ) ]
-                                               );
+       // Initialize QUnit elements
+       appendInterface();
+       appendTestsList( details.modules );
+       tests = id( "qunit-tests" );
+       if ( tests && config.hidepassed ) {
+               addClass( tests, "hidepass" );
+       }
+} );
+
+QUnit.done( function( details ) {
+       var i, key,
+               banner = id( "qunit-banner" ),
+               tests = id( "qunit-tests" ),
+               html = [
+                       "Tests completed in ",
+                       details.runtime,
+                       " milliseconds.<br />",
+                       "<span class='passed'>",
+                       details.passed,
+                       "</span> assertions of <span class='total'>",
+                       details.total,
+                       "</span> passed, <span class='failed'>",
+                       details.failed,
+                       "</span> failed."
+               ].join( "" );
+
+       if ( banner ) {
+               banner.className = details.failed ? "qunit-fail" : "qunit-pass";
+       }
+
+       if ( tests ) {
+               id( "qunit-testresult" ).innerHTML = html;
+       }
+
+       if ( config.altertitle && document.title ) {
 
-                                               diffs[ pointer - 1 ][ 0 ] = DIFF_INSERT;
-                                               diffs[ pointer - 1 ][ 1 ] =
-                                                       insertion.substring( 0, insertion.length - overlapLength2 );
-                                               diffs[ pointer + 1 ][ 0 ] = DIFF_DELETE;
-                                               diffs[ pointer + 1 ][ 1 ] =
-                                                       deletion.substring( overlapLength2 );
-                                               pointer++;
-                                       }
-                               }
-                               pointer++;
+               // Show ✖ for good, ✔ for bad suite result in title
+               // use escape sequences in case file gets loaded with non-utf-8-charset
+               document.title = [
+                       ( details.failed ? "\u2716" : "\u2714" ),
+                       document.title.replace( /^[\u2714\u2716] /i, "" )
+               ].join( " " );
+       }
+
+       // Clear own sessionStorage items if all tests passed
+       if ( config.reorder && defined.sessionStorage && details.failed === 0 ) {
+               for ( i = 0; i < sessionStorage.length; i++ ) {
+                       key = sessionStorage.key( i++ );
+                       if ( key.indexOf( "qunit-test-" ) === 0 ) {
+                               sessionStorage.removeItem( key );
                        }
-                       pointer++;
                }
-       };
+       }
 
-       /**
-        * Determine if the suffix of one string is the prefix of another.
-        * @param {string} text1 First string.
-        * @param {string} text2 Second string.
-        * @return {number} The number of characters common to the end of the first
-        *     string and the start of the second string.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffCommonOverlap = function( text1, text2 ) {
-               var text1Length, text2Length, textLength,
-                       best, length, pattern, found;
-               // Cache the text lengths to prevent multiple calls.
-               text1Length = text1.length;
-               text2Length = text2.length;
-               // Eliminate the null case.
-               if ( text1Length === 0 || text2Length === 0 ) {
-                       return 0;
-               }
-               // Truncate the longer string.
-               if ( text1Length > text2Length ) {
-                       text1 = text1.substring( text1Length - text2Length );
-               } else if ( text1Length < text2Length ) {
-                       text2 = text2.substring( 0, text1Length );
-               }
-               textLength = Math.min( text1Length, text2Length );
-               // Quick check for the worst case.
-               if ( text1 === text2 ) {
-                       return textLength;
-               }
+       // Scroll back to top to show results
+       if ( config.scrolltop && window.scrollTo ) {
+               window.scrollTo( 0, 0 );
+       }
+} );
 
-               // Start by looking for a single character match
-               // and increase length until no match is found.
-               // Performance analysis: https://neil.fraser.name/news/2010/11/04/
-               best = 0;
-               length = 1;
-               while ( true ) {
-                       pattern = text1.substring( textLength - length );
-                       found = text2.indexOf( pattern );
-                       if ( found === -1 ) {
-                               return best;
-                       }
-                       length += found;
-                       if ( found === 0 || text1.substring( textLength - length ) ===
-                                       text2.substring( 0, length ) ) {
-                               best = length;
-                               length++;
-                       }
-               }
-       };
+function getNameHtml( name, module ) {
+       var nameHtml = "";
 
-       /**
-        * Split two texts into an array of strings.  Reduce the texts to a string of
-        * hashes where each Unicode character represents one line.
-        * @param {string} text1 First string.
-        * @param {string} text2 Second string.
-        * @return {{chars1: string, chars2: string, lineArray: !Array.<string>}}
-        *     An object containing the encoded text1, the encoded text2 and
-        *     the array of unique strings.
-        *     The zeroth element of the array of unique strings is intentionally blank.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffLinesToChars = function( text1, text2 ) {
-               var lineArray, lineHash, chars1, chars2;
-               lineArray = []; // e.g. lineArray[4] === 'Hello\n'
-               lineHash = {}; // e.g. lineHash['Hello\n'] === 4
+       if ( module ) {
+               nameHtml = "<span class='module-name'>" + escapeText( module ) + "</span>: ";
+       }
 
-               // '\x00' is a valid character, but various debuggers don't like it.
-               // So we'll insert a junk entry to avoid generating a null character.
-               lineArray[ 0 ] = "";
+       nameHtml += "<span class='test-name'>" + escapeText( name ) + "</span>";
 
-               /**
-                * Split a text into an array of strings.  Reduce the texts to a string of
-                * hashes where each Unicode character represents one line.
-                * Modifies linearray and linehash through being a closure.
-                * @param {string} text String to encode.
-                * @return {string} Encoded string.
-                * @private
-                */
-               function diffLinesToCharsMunge( text ) {
-                       var chars, lineStart, lineEnd, lineArrayLength, line;
-                       chars = "";
-                       // Walk the text, pulling out a substring for each line.
-                       // text.split('\n') would would temporarily double our memory footprint.
-                       // Modifying text would create many large strings to garbage collect.
-                       lineStart = 0;
-                       lineEnd = -1;
-                       // Keeping our own length variable is faster than looking it up.
-                       lineArrayLength = lineArray.length;
-                       while ( lineEnd < text.length - 1 ) {
-                               lineEnd = text.indexOf( "\n", lineStart );
-                               if ( lineEnd === -1 ) {
-                                       lineEnd = text.length - 1;
-                               }
-                               line = text.substring( lineStart, lineEnd + 1 );
-                               lineStart = lineEnd + 1;
+       return nameHtml;
+}
 
-                               if ( lineHash.hasOwnProperty ? lineHash.hasOwnProperty( line ) :
-                                                       ( lineHash[ line ] !== undefined ) ) {
-                                       chars += String.fromCharCode( lineHash[ line ] );
-                               } else {
-                                       chars += String.fromCharCode( lineArrayLength );
-                                       lineHash[ line ] = lineArrayLength;
-                                       lineArray[ lineArrayLength++ ] = line;
-                               }
-                       }
-                       return chars;
-               }
+QUnit.testStart( function( details ) {
+       var running, testBlock, bad;
 
-               chars1 = diffLinesToCharsMunge( text1 );
-               chars2 = diffLinesToCharsMunge( text2 );
-               return {
-                       chars1: chars1,
-                       chars2: chars2,
-                       lineArray: lineArray
-               };
-       };
+       testBlock = id( "qunit-test-output-" + details.testId );
+       if ( testBlock ) {
+               testBlock.className = "running";
+       } else {
 
-       /**
-        * Rehydrate the text in a diff from a string of line hashes to real lines of
-        * text.
-        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
-        * @param {!Array.<string>} lineArray Array of unique strings.
-        * @private
-        */
-       DiffMatchPatch.prototype.diffCharsToLines = function( diffs, lineArray ) {
-               var x, chars, text, y;
-               for ( x = 0; x < diffs.length; x++ ) {
-                       chars = diffs[ x ][ 1 ];
-                       text = [];
-                       for ( y = 0; y < chars.length; y++ ) {
-                               text[ y ] = lineArray[ chars.charCodeAt( y ) ];
-                       }
-                       diffs[ x ][ 1 ] = text.join( "" );
-               }
-       };
+               // Report later registered tests
+               appendTest( details.name, details.testId, details.module );
+       }
 
-       /**
-        * Reorder and merge like edit sections.  Merge equalities.
-        * Any edit section can move as long as it doesn't cross an equality.
-        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
-        */
-       DiffMatchPatch.prototype.diffCleanupMerge = function( diffs ) {
-               var pointer, countDelete, countInsert, textInsert, textDelete,
-                       commonlength, changes, diffPointer, position;
-               diffs.push( [ DIFF_EQUAL, "" ] ); // Add a dummy entry at the end.
-               pointer = 0;
-               countDelete = 0;
-               countInsert = 0;
-               textDelete = "";
-               textInsert = "";
-               commonlength;
-               while ( pointer < diffs.length ) {
-                       switch ( diffs[ pointer ][ 0 ] ) {
-                       case DIFF_INSERT:
-                               countInsert++;
-                               textInsert += diffs[ pointer ][ 1 ];
-                               pointer++;
-                               break;
-                       case DIFF_DELETE:
-                               countDelete++;
-                               textDelete += diffs[ pointer ][ 1 ];
-                               pointer++;
-                               break;
-                       case DIFF_EQUAL:
-                               // Upon reaching an equality, check for prior redundancies.
-                               if ( countDelete + countInsert > 1 ) {
-                                       if ( countDelete !== 0 && countInsert !== 0 ) {
-                                               // Factor out any common prefixes.
-                                               commonlength = this.diffCommonPrefix( textInsert, textDelete );
-                                               if ( commonlength !== 0 ) {
-                                                       if ( ( pointer - countDelete - countInsert ) > 0 &&
-                                                                       diffs[ pointer - countDelete - countInsert - 1 ][ 0 ] ===
-                                                                       DIFF_EQUAL ) {
-                                                               diffs[ pointer - countDelete - countInsert - 1 ][ 1 ] +=
-                                                                       textInsert.substring( 0, commonlength );
-                                                       } else {
-                                                               diffs.splice( 0, 0, [ DIFF_EQUAL,
-                                                                       textInsert.substring( 0, commonlength )
-                                                               ] );
-                                                               pointer++;
-                                                       }
-                                                       textInsert = textInsert.substring( commonlength );
-                                                       textDelete = textDelete.substring( commonlength );
-                                               }
-                                               // Factor out any common suffixies.
-                                               commonlength = this.diffCommonSuffix( textInsert, textDelete );
-                                               if ( commonlength !== 0 ) {
-                                                       diffs[ pointer ][ 1 ] = textInsert.substring( textInsert.length -
-                                                                       commonlength ) + diffs[ pointer ][ 1 ];
-                                                       textInsert = textInsert.substring( 0, textInsert.length -
-                                                               commonlength );
-                                                       textDelete = textDelete.substring( 0, textDelete.length -
-                                                               commonlength );
-                                               }
-                                       }
-                                       // Delete the offending records and add the merged ones.
-                                       if ( countDelete === 0 ) {
-                                               diffs.splice( pointer - countInsert,
-                                                       countDelete + countInsert, [ DIFF_INSERT, textInsert ] );
-                                       } else if ( countInsert === 0 ) {
-                                               diffs.splice( pointer - countDelete,
-                                                       countDelete + countInsert, [ DIFF_DELETE, textDelete ] );
-                                       } else {
-                                               diffs.splice(
-                                                       pointer - countDelete - countInsert,
-                                                       countDelete + countInsert,
-                                                       [ DIFF_DELETE, textDelete ], [ DIFF_INSERT, textInsert ]
-                                               );
-                                       }
-                                       pointer = pointer - countDelete - countInsert +
-                                               ( countDelete ? 1 : 0 ) + ( countInsert ? 1 : 0 ) + 1;
-                               } else if ( pointer !== 0 && diffs[ pointer - 1 ][ 0 ] === DIFF_EQUAL ) {
+       running = id( "qunit-testresult" );
+       if ( running ) {
+               bad = QUnit.config.reorder && defined.sessionStorage &&
+                       +sessionStorage.getItem( "qunit-test-" + details.module + "-" + details.name );
+
+               running.innerHTML = ( bad ?
+                       "Rerunning previously failed test: <br />" :
+                       "Running: <br />" ) +
+                       getNameHtml( details.name, details.module );
+       }
 
-                                       // Merge this equality with the previous one.
-                                       diffs[ pointer - 1 ][ 1 ] += diffs[ pointer ][ 1 ];
-                                       diffs.splice( pointer, 1 );
-                               } else {
-                                       pointer++;
-                               }
-                               countInsert = 0;
-                               countDelete = 0;
-                               textDelete = "";
-                               textInsert = "";
-                               break;
-                       }
-               }
-               if ( diffs[ diffs.length - 1 ][ 1 ] === "" ) {
-                       diffs.pop(); // Remove the dummy entry at the end.
-               }
+} );
 
-               // Second pass: look for single edits surrounded on both sides by equalities
-               // which can be shifted sideways to eliminate an equality.
-               // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
-               changes = false;
-               pointer = 1;
+function stripHtml( string ) {
 
-               // Intentionally ignore the first and last element (don't need checking).
-               while ( pointer < diffs.length - 1 ) {
-                       if ( diffs[ pointer - 1 ][ 0 ] === DIFF_EQUAL &&
-                                       diffs[ pointer + 1 ][ 0 ] === DIFF_EQUAL ) {
+       // Strip tags, html entity and whitespaces
+       return string.replace( /<\/?[^>]+(>|$)/g, "" ).replace( /\&quot;/g, "" ).replace( /\s+/g, "" );
+}
 
-                               diffPointer = diffs[ pointer ][ 1 ];
-                               position = diffPointer.substring(
-                                       diffPointer.length - diffs[ pointer - 1 ][ 1 ].length
-                               );
+QUnit.log( function( details ) {
+       var assertList, assertLi,
+               message, expected, actual, diff,
+               showDiff = false,
+               testItem = id( "qunit-test-output-" + details.testId );
 
-                               // This is a single edit surrounded by equalities.
-                               if ( position === diffs[ pointer - 1 ][ 1 ] ) {
+       if ( !testItem ) {
+               return;
+       }
 
-                                       // Shift the edit over the previous equality.
-                                       diffs[ pointer ][ 1 ] = diffs[ pointer - 1 ][ 1 ] +
-                                               diffs[ pointer ][ 1 ].substring( 0, diffs[ pointer ][ 1 ].length -
-                                                       diffs[ pointer - 1 ][ 1 ].length );
-                                       diffs[ pointer + 1 ][ 1 ] =
-                                               diffs[ pointer - 1 ][ 1 ] + diffs[ pointer + 1 ][ 1 ];
-                                       diffs.splice( pointer - 1, 1 );
-                                       changes = true;
-                               } else if ( diffPointer.substring( 0, diffs[ pointer + 1 ][ 1 ].length ) ===
-                                               diffs[ pointer + 1 ][ 1 ] ) {
+       message = escapeText( details.message ) || ( details.result ? "okay" : "failed" );
+       message = "<span class='test-message'>" + message + "</span>";
+       message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
 
-                                       // Shift the edit over the next equality.
-                                       diffs[ pointer - 1 ][ 1 ] += diffs[ pointer + 1 ][ 1 ];
-                                       diffs[ pointer ][ 1 ] =
-                                               diffs[ pointer ][ 1 ].substring( diffs[ pointer + 1 ][ 1 ].length ) +
-                                               diffs[ pointer + 1 ][ 1 ];
-                                       diffs.splice( pointer + 1, 1 );
-                                       changes = true;
-                               }
-                       }
-                       pointer++;
-               }
-               // If shifts were made, the diff needs reordering and another shift sweep.
-               if ( changes ) {
-                       this.diffCleanupMerge( diffs );
+       // The pushFailure doesn't provide details.expected
+       // when it calls, it's implicit to also not show expected and diff stuff
+       // Also, we need to check details.expected existence, as it can exist and be undefined
+       if ( !details.result && hasOwn.call( details, "expected" ) ) {
+               if ( details.negative ) {
+                       expected = "NOT " + QUnit.dump.parse( details.expected );
+               } else {
+                       expected = QUnit.dump.parse( details.expected );
                }
-       };
 
-       return function( o, n ) {
-               var diff, output, text;
-               diff = new DiffMatchPatch();
-               output = diff.DiffMain( o, n );
-               diff.diffCleanupEfficiency( output );
-               text = diff.diffPrettyHtml( output );
+               actual = QUnit.dump.parse( details.actual );
+               message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" +
+                       escapeText( expected ) +
+                       "</pre></td></tr>";
 
-               return text;
-       };
-}() );
+               if ( actual !== expected ) {
 
-// Get a reference to the global object, like window in browsers
-}( (function() {
-       return this;
-})() ));
+                       message += "<tr class='test-actual'><th>Result: </th><td><pre>" +
+                               escapeText( actual ) + "</pre></td></tr>";
 
-(function() {
+                       // Don't show diff if actual or expected are booleans
+                       if ( !( /^(true|false)$/.test( actual ) ) &&
+                                       !( /^(true|false)$/.test( expected ) ) ) {
+                               diff = QUnit.diff( expected, actual );
+                               showDiff = stripHtml( diff ).length !==
+                                       stripHtml( expected ).length +
+                                       stripHtml( actual ).length;
+                       }
 
-// Don't load the HTML Reporter on non-Browser environments
-if ( typeof window === "undefined" || !window.document ) {
-       return;
-}
+                       // Don't show diff if expected and actual are totally different
+                       if ( showDiff ) {
+                               message += "<tr class='test-diff'><th>Diff: </th><td><pre>" +
+                                       diff + "</pre></td></tr>";
+                       }
+               } else if ( expected.indexOf( "[object Array]" ) !== -1 ||
+                               expected.indexOf( "[object Object]" ) !== -1 ) {
+                       message += "<tr class='test-message'><th>Message: </th><td>" +
+                               "Diff suppressed as the depth of object is more than current max depth (" +
+                               QUnit.config.maxDepth + ").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to " +
+                               " run with a higher max depth or <a href='" +
+                               escapeText( setUrl( { maxDepth: -1 } ) ) + "'>" +
+                               "Rerun</a> without max depth.</p></td></tr>";
+               } else {
+                       message += "<tr class='test-message'><th>Message: </th><td>" +
+                               "Diff suppressed as the expected and actual results have an equivalent" +
+                               " serialization</td></tr>";
+               }
 
-// Deprecated QUnit.init - Ref #530
-// Re-initialize the configuration options
-QUnit.init = function() {
-       var tests, banner, result, qunit,
-               config = QUnit.config;
+               if ( details.source ) {
+                       message += "<tr class='test-source'><th>Source: </th><td><pre>" +
+                               escapeText( details.source ) + "</pre></td></tr>";
+               }
 
-       config.stats = { all: 0, bad: 0 };
-       config.moduleStats = { all: 0, bad: 0 };
-       config.started = 0;
-       config.updateRate = 1000;
-       config.blocking = false;
-       config.autostart = true;
-       config.autorun = false;
-       config.filter = "";
-       config.queue = [];
+               message += "</table>";
 
-       // Return on non-browser environments
-       // This is necessary to not break on node tests
-       if ( typeof window === "undefined" ) {
-               return;
+       // This occurs when pushFailure is set and we have an extracted stack trace
+       } else if ( !details.result && details.source ) {
+               message += "<table>" +
+                       "<tr class='test-source'><th>Source: </th><td><pre>" +
+                       escapeText( details.source ) + "</pre></td></tr>" +
+                       "</table>";
        }
 
-       qunit = id( "qunit" );
-       if ( qunit ) {
-               qunit.innerHTML =
-                       "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
-                       "<h2 id='qunit-banner'></h2>" +
-                       "<div id='qunit-testrunner-toolbar'></div>" +
-                       "<h2 id='qunit-userAgent'></h2>" +
-                       "<ol id='qunit-tests'></ol>";
-       }
+       assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
 
-       tests = id( "qunit-tests" );
-       banner = id( "qunit-banner" );
-       result = id( "qunit-testresult" );
+       assertLi = document.createElement( "li" );
+       assertLi.className = details.result ? "pass" : "fail";
+       assertLi.innerHTML = message;
+       assertList.appendChild( assertLi );
+} );
 
-       if ( tests ) {
-               tests.innerHTML = "";
-       }
+QUnit.testDone( function( details ) {
+       var testTitle, time, testItem, assertList,
+               good, bad, testCounts, skipped, sourceName,
+               tests = id( "qunit-tests" );
 
-       if ( banner ) {
-               banner.className = "";
+       if ( !tests ) {
+               return;
        }
 
-       if ( result ) {
-               result.parentNode.removeChild( result );
-       }
+       testItem = id( "qunit-test-output-" + details.testId );
 
-       if ( tests ) {
-               result = document.createElement( "p" );
-               result.id = "qunit-testresult";
-               result.className = "result";
-               tests.parentNode.insertBefore( result, tests );
-               result.innerHTML = "Running...<br />&#160;";
+       assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
+
+       good = details.passed;
+       bad = details.failed;
+
+       // Store result when possible
+       if ( config.reorder && defined.sessionStorage ) {
+               if ( bad ) {
+                       sessionStorage.setItem( "qunit-test-" + details.module + "-" + details.name, bad );
+               } else {
+                       sessionStorage.removeItem( "qunit-test-" + details.module + "-" + details.name );
+               }
        }
-};
 
-var config = QUnit.config,
-       collapseNext = false,
-       hasOwn = Object.prototype.hasOwnProperty,
-       defined = {
-               document: window.document !== undefined,
-               sessionStorage: (function() {
-                       var x = "qunit-test-string";
-                       try {
-                               sessionStorage.setItem( x, x );
-                               sessionStorage.removeItem( x );
-                               return true;
-                       } catch ( e ) {
-                               return false;
-                       }
-               }())
-       },
-       modulesList = [];
+       if ( bad === 0 ) {
 
-/**
-* Escape text for attribute or text content.
-*/
-function escapeText( s ) {
-       if ( !s ) {
-               return "";
+               // Collapse the passing tests
+               addClass( assertList, "qunit-collapsed" );
+       } else if ( bad && config.collapse && !collapseNext ) {
+
+               // Skip collapsing the first failing test
+               collapseNext = true;
+       } else {
+
+               // Collapse remaining tests
+               addClass( assertList, "qunit-collapsed" );
        }
-       s = s + "";
 
-       // Both single quotes and double quotes (for attributes)
-       return s.replace( /['"<>&]/g, function( s ) {
-               switch ( s ) {
-               case "'":
-                       return "&#039;";
-               case "\"":
-                       return "&quot;";
-               case "<":
-                       return "&lt;";
-               case ">":
-                       return "&gt;";
-               case "&":
-                       return "&amp;";
-               }
-       });
-}
+       // The testItem.firstChild is the test name
+       testTitle = testItem.firstChild;
 
-/**
- * @param {HTMLElement} elem
- * @param {string} type
- * @param {Function} fn
- */
-function addEvent( elem, type, fn ) {
-       if ( elem.addEventListener ) {
+       testCounts = bad ?
+               "<b class='failed'>" + bad + "</b>, " + "<b class='passed'>" + good + "</b>, " :
+               "";
 
-               // Standards-based browsers
-               elem.addEventListener( type, fn, false );
-       } else if ( elem.attachEvent ) {
+       testTitle.innerHTML += " <b class='counts'>(" + testCounts +
+               details.assertions.length + ")</b>";
+
+       if ( details.skipped ) {
+               testItem.className = "skipped";
+               skipped = document.createElement( "em" );
+               skipped.className = "qunit-skipped-label";
+               skipped.innerHTML = "skipped";
+               testItem.insertBefore( skipped, testTitle );
+       } else {
+               addEvent( testTitle, "click", function() {
+                       toggleClass( assertList, "qunit-collapsed" );
+               } );
 
-               // support: IE <9
-               elem.attachEvent( "on" + type, function() {
-                       var event = window.event;
-                       if ( !event.target ) {
-                               event.target = event.srcElement || document;
-                       }
+               testItem.className = bad ? "fail" : "pass";
 
-                       fn.call( elem, event );
-               });
+               time = document.createElement( "span" );
+               time.className = "runtime";
+               time.innerHTML = details.runtime + " ms";
+               testItem.insertBefore( time, assertList );
        }
-}
 
-/**
- * @param {Array|NodeList} elems
- * @param {string} type
- * @param {Function} fn
- */
-function addEvents( elems, type, fn ) {
-       var i = elems.length;
-       while ( i-- ) {
-               addEvent( elems[ i ], type, fn );
+       // Show the source of the test when showing assertions
+       if ( details.source ) {
+               sourceName = document.createElement( "p" );
+               sourceName.innerHTML = "<strong>Source: </strong>" + details.source;
+               addClass( sourceName, "qunit-source" );
+               if ( bad === 0 ) {
+                       addClass( sourceName, "qunit-collapsed" );
+               }
+               addEvent( testTitle, "click", function() {
+                       toggleClass( sourceName, "qunit-collapsed" );
+               } );
+               testItem.appendChild( sourceName );
        }
-}
+} );
 
-function hasClass( elem, name ) {
-       return ( " " + elem.className + " " ).indexOf( " " + name + " " ) >= 0;
-}
+// Avoid readyState issue with phantomjs
+// Ref: #818
+var notPhantom = ( function( p ) {
+       return !( p && p.version && p.version.major > 0 );
+} )( window.phantom );
 
-function addClass( elem, name ) {
-       if ( !hasClass( elem, name ) ) {
-               elem.className += ( elem.className ? " " : "" ) + name;
-       }
+if ( notPhantom && document.readyState === "complete" ) {
+       QUnit.load();
+} else {
+       addEvent( window, "load", QUnit.load );
 }
 
-function toggleClass( elem, name ) {
-       if ( hasClass( elem, name ) ) {
-               removeClass( elem, name );
-       } else {
-               addClass( elem, name );
+/*
+ * This file is a modified version of google-diff-match-patch's JavaScript implementation
+ * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js),
+ * modifications are licensed as more fully set forth in LICENSE.txt.
+ *
+ * The original source of google-diff-match-patch is attributable and licensed as follows:
+ *
+ * Copyright 2006 Google Inc.
+ * https://code.google.com/p/google-diff-match-patch/
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * More Info:
+ *  https://code.google.com/p/google-diff-match-patch/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ */
+QUnit.diff = ( function() {
+       function DiffMatchPatch() {
        }
-}
 
-function removeClass( elem, name ) {
-       var set = " " + elem.className + " ";
-
-       // Class name may appear multiple times
-       while ( set.indexOf( " " + name + " " ) >= 0 ) {
-               set = set.replace( " " + name + " ", " " );
-       }
+       //  DIFF FUNCTIONS
 
-       // trim for prettiness
-       elem.className = typeof set.trim === "function" ? set.trim() : set.replace( /^\s+|\s+$/g, "" );
-}
+       /**
+        * The data structure representing a diff is an array of tuples:
+        * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]
+        * which means: delete 'Hello', add 'Goodbye' and keep ' world.'
+        */
+       var DIFF_DELETE = -1,
+               DIFF_INSERT = 1,
+               DIFF_EQUAL = 0;
 
-function id( name ) {
-       return defined.document && document.getElementById && document.getElementById( name );
-}
+       /**
+        * Find the differences between two texts.  Simplifies the problem by stripping
+        * any common prefix or suffix off the texts before diffing.
+        * @param {string} text1 Old string to be diffed.
+        * @param {string} text2 New string to be diffed.
+        * @param {boolean=} optChecklines Optional speedup flag. If present and false,
+        *     then don't run a line-level diff first to identify the changed areas.
+        *     Defaults to true, which does a faster, slightly less optimal diff.
+        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
+        */
+       DiffMatchPatch.prototype.DiffMain = function( text1, text2, optChecklines ) {
+               var deadline, checklines, commonlength,
+                       commonprefix, commonsuffix, diffs;
 
-function getUrlConfigHtml() {
-       var i, j, val,
-               escaped, escapedTooltip,
-               selection = false,
-               len = config.urlConfig.length,
-               urlConfigHtml = "";
+               // The diff must be complete in up to 1 second.
+               deadline = ( new Date() ).getTime() + 1000;
 
-       for ( i = 0; i < len; i++ ) {
-               val = config.urlConfig[ i ];
-               if ( typeof val === "string" ) {
-                       val = {
-                               id: val,
-                               label: val
-                       };
+               // Check for null inputs.
+               if ( text1 === null || text2 === null ) {
+                       throw new Error( "Null input. (DiffMain)" );
                }
 
-               escaped = escapeText( val.id );
-               escapedTooltip = escapeText( val.tooltip );
-
-               if ( config[ val.id ] === undefined ) {
-                       config[ val.id ] = QUnit.urlParams[ val.id ];
+               // Check for equality (speedup).
+               if ( text1 === text2 ) {
+                       if ( text1 ) {
+                               return [
+                                       [ DIFF_EQUAL, text1 ]
+                               ];
+                       }
+                       return [];
                }
 
-               if ( !val.value || typeof val.value === "string" ) {
-                       urlConfigHtml += "<input id='qunit-urlconfig-" + escaped +
-                               "' name='" + escaped + "' type='checkbox'" +
-                               ( val.value ? " value='" + escapeText( val.value ) + "'" : "" ) +
-                               ( config[ val.id ] ? " checked='checked'" : "" ) +
-                               " title='" + escapedTooltip + "' /><label for='qunit-urlconfig-" + escaped +
-                               "' title='" + escapedTooltip + "'>" + val.label + "</label>";
-               } else {
-                       urlConfigHtml += "<label for='qunit-urlconfig-" + escaped +
-                               "' title='" + escapedTooltip + "'>" + val.label +
-                               ": </label><select id='qunit-urlconfig-" + escaped +
-                               "' name='" + escaped + "' title='" + escapedTooltip + "'><option></option>";
-
-                       if ( QUnit.is( "array", val.value ) ) {
-                               for ( j = 0; j < val.value.length; j++ ) {
-                                       escaped = escapeText( val.value[ j ] );
-                                       urlConfigHtml += "<option value='" + escaped + "'" +
-                                               ( config[ val.id ] === val.value[ j ] ?
-                                                       ( selection = true ) && " selected='selected'" : "" ) +
-                                               ">" + escaped + "</option>";
-                               }
-                       } else {
-                               for ( j in val.value ) {
-                                       if ( hasOwn.call( val.value, j ) ) {
-                                               urlConfigHtml += "<option value='" + escapeText( j ) + "'" +
-                                                       ( config[ val.id ] === j ?
-                                                               ( selection = true ) && " selected='selected'" : "" ) +
-                                                       ">" + escapeText( val.value[ j ] ) + "</option>";
-                                       }
-                               }
-                       }
-                       if ( config[ val.id ] && !selection ) {
-                               escaped = escapeText( config[ val.id ] );
-                               urlConfigHtml += "<option value='" + escaped +
-                                       "' selected='selected' disabled='disabled'>" + escaped + "</option>";
-                       }
-                       urlConfigHtml += "</select>";
+               if ( typeof optChecklines === "undefined" ) {
+                       optChecklines = true;
                }
-       }
 
-       return urlConfigHtml;
-}
+               checklines = optChecklines;
 
-// Handle "click" events on toolbar checkboxes and "change" for select menus.
-// Updates the URL with the new state of `config.urlConfig` values.
-function toolbarChanged() {
-       var updatedUrl, value,
-               field = this,
-               params = {};
+               // Trim off common prefix (speedup).
+               commonlength = this.diffCommonPrefix( text1, text2 );
+               commonprefix = text1.substring( 0, commonlength );
+               text1 = text1.substring( commonlength );
+               text2 = text2.substring( commonlength );
 
-       // Detect if field is a select menu or a checkbox
-       if ( "selectedIndex" in field ) {
-               value = field.options[ field.selectedIndex ].value || undefined;
-       } else {
-               value = field.checked ? ( field.defaultValue || true ) : undefined;
-       }
+               // Trim off common suffix (speedup).
+               commonlength = this.diffCommonSuffix( text1, text2 );
+               commonsuffix = text1.substring( text1.length - commonlength );
+               text1 = text1.substring( 0, text1.length - commonlength );
+               text2 = text2.substring( 0, text2.length - commonlength );
 
-       params[ field.name ] = value;
-       updatedUrl = setUrl( params );
+               // Compute the diff on the middle block.
+               diffs = this.diffCompute( text1, text2, checklines, deadline );
 
-       if ( "hidepassed" === field.name && "replaceState" in window.history ) {
-               config[ field.name ] = value || false;
-               if ( value ) {
-                       addClass( id( "qunit-tests" ), "hidepass" );
-               } else {
-                       removeClass( id( "qunit-tests" ), "hidepass" );
+               // Restore the prefix and suffix.
+               if ( commonprefix ) {
+                       diffs.unshift( [ DIFF_EQUAL, commonprefix ] );
                }
+               if ( commonsuffix ) {
+                       diffs.push( [ DIFF_EQUAL, commonsuffix ] );
+               }
+               this.diffCleanupMerge( diffs );
+               return diffs;
+       };
 
-               // It is not necessary to refresh the whole page
-               window.history.replaceState( null, "", updatedUrl );
-       } else {
-               window.location = updatedUrl;
-       }
-}
-
-function setUrl( params ) {
-       var key,
-               querystring = "?";
+       /**
+        * Reduce the number of edits by eliminating operationally trivial equalities.
+        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
+        */
+       DiffMatchPatch.prototype.diffCleanupEfficiency = function( diffs ) {
+               var changes, equalities, equalitiesLength, lastequality,
+                       pointer, preIns, preDel, postIns, postDel;
+               changes = false;
+               equalities = []; // Stack of indices where equalities are found.
+               equalitiesLength = 0; // Keeping our own length var is faster in JS.
+               /** @type {?string} */
+               lastequality = null;
 
-       params = QUnit.extend( QUnit.extend( {}, QUnit.urlParams ), params );
+               // Always equal to diffs[equalities[equalitiesLength - 1]][1]
+               pointer = 0; // Index of current position.
 
-       for ( key in params ) {
-               if ( hasOwn.call( params, key ) ) {
-                       if ( params[ key ] === undefined ) {
-                               continue;
-                       }
-                       querystring += encodeURIComponent( key );
-                       if ( params[ key ] !== true ) {
-                               querystring += "=" + encodeURIComponent( params[ key ] );
-                       }
-                       querystring += "&";
-               }
-       }
-       return location.protocol + "//" + location.host +
-               location.pathname + querystring.slice( 0, -1 );
-}
+               // Is there an insertion operation before the last equality.
+               preIns = false;
 
-function applyUrlParams() {
-       var selectedModule,
-               modulesList = id( "qunit-modulefilter" ),
-               filter = id( "qunit-filter-input" ).value;
+               // Is there a deletion operation before the last equality.
+               preDel = false;
 
-       selectedModule = modulesList ?
-               decodeURIComponent( modulesList.options[ modulesList.selectedIndex ].value ) :
-               undefined;
+               // Is there an insertion operation after the last equality.
+               postIns = false;
 
-       window.location = setUrl({
-               module: ( selectedModule === "" ) ? undefined : selectedModule,
-               filter: ( filter === "" ) ? undefined : filter,
+               // Is there a deletion operation after the last equality.
+               postDel = false;
+               while ( pointer < diffs.length ) {
 
-               // Remove testId filter
-               testId: undefined
-       });
-}
+                       // Equality found.
+                       if ( diffs[ pointer ][ 0 ] === DIFF_EQUAL ) {
+                               if ( diffs[ pointer ][ 1 ].length < 4 && ( postIns || postDel ) ) {
 
-function toolbarUrlConfigContainer() {
-       var urlConfigContainer = document.createElement( "span" );
+                                       // Candidate found.
+                                       equalities[ equalitiesLength++ ] = pointer;
+                                       preIns = postIns;
+                                       preDel = postDel;
+                                       lastequality = diffs[ pointer ][ 1 ];
+                               } else {
 
-       urlConfigContainer.innerHTML = getUrlConfigHtml();
-       addClass( urlConfigContainer, "qunit-url-config" );
+                                       // Not a candidate, and can never become one.
+                                       equalitiesLength = 0;
+                                       lastequality = null;
+                               }
+                               postIns = postDel = false;
 
-       // For oldIE support:
-       // * Add handlers to the individual elements instead of the container
-       // * Use "click" instead of "change" for checkboxes
-       addEvents( urlConfigContainer.getElementsByTagName( "input" ), "click", toolbarChanged );
-       addEvents( urlConfigContainer.getElementsByTagName( "select" ), "change", toolbarChanged );
+                       // An insertion or deletion.
+                       } else {
 
-       return urlConfigContainer;
-}
+                               if ( diffs[ pointer ][ 0 ] === DIFF_DELETE ) {
+                                       postDel = true;
+                               } else {
+                                       postIns = true;
+                               }
 
-function toolbarLooseFilter() {
-       var filter = document.createElement( "form" ),
-               label = document.createElement( "label" ),
-               input = document.createElement( "input" ),
-               button = document.createElement( "button" );
+                               /*
+                                * Five types to be split:
+                                * <ins>A</ins><del>B</del>XY<ins>C</ins><del>D</del>
+                                * <ins>A</ins>X<ins>C</ins><del>D</del>
+                                * <ins>A</ins><del>B</del>X<ins>C</ins>
+                                * <ins>A</del>X<ins>C</ins><del>D</del>
+                                * <ins>A</ins><del>B</del>X<del>C</del>
+                                */
+                               if ( lastequality && ( ( preIns && preDel && postIns && postDel ) ||
+                                               ( ( lastequality.length < 2 ) &&
+                                               ( preIns + preDel + postIns + postDel ) === 3 ) ) ) {
 
-       addClass( filter, "qunit-filter" );
+                                       // Duplicate record.
+                                       diffs.splice(
+                                               equalities[ equalitiesLength - 1 ],
+                                               0,
+                                               [ DIFF_DELETE, lastequality ]
+                                       );
 
-       label.innerHTML = "Filter: ";
+                                       // Change second copy to insert.
+                                       diffs[ equalities[ equalitiesLength - 1 ] + 1 ][ 0 ] = DIFF_INSERT;
+                                       equalitiesLength--; // Throw away the equality we just deleted;
+                                       lastequality = null;
+                                       if ( preIns && preDel ) {
 
-       input.type = "text";
-       input.value = config.filter || "";
-       input.name = "filter";
-       input.id = "qunit-filter-input";
+                                               // No changes made which could affect previous entry, keep going.
+                                               postIns = postDel = true;
+                                               equalitiesLength = 0;
+                                       } else {
+                                               equalitiesLength--; // Throw away the previous equality.
+                                               pointer = equalitiesLength > 0 ? equalities[ equalitiesLength - 1 ] : -1;
+                                               postIns = postDel = false;
+                                       }
+                                       changes = true;
+                               }
+                       }
+                       pointer++;
+               }
 
-       button.innerHTML = "Go";
+               if ( changes ) {
+                       this.diffCleanupMerge( diffs );
+               }
+       };
 
-       label.appendChild( input );
+       /**
+        * Convert a diff array into a pretty HTML report.
+        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
+        * @param {integer} string to be beautified.
+        * @return {string} HTML representation.
+        */
+       DiffMatchPatch.prototype.diffPrettyHtml = function( diffs ) {
+               var op, data, x,
+                       html = [];
+               for ( x = 0; x < diffs.length; x++ ) {
+                       op = diffs[ x ][ 0 ]; // Operation (insert, delete, equal)
+                       data = diffs[ x ][ 1 ]; // Text of change.
+                       switch ( op ) {
+                       case DIFF_INSERT:
+                               html[ x ] = "<ins>" + escapeText( data ) + "</ins>";
+                               break;
+                       case DIFF_DELETE:
+                               html[ x ] = "<del>" + escapeText( data ) + "</del>";
+                               break;
+                       case DIFF_EQUAL:
+                               html[ x ] = "<span>" + escapeText( data ) + "</span>";
+                               break;
+                       }
+               }
+               return html.join( "" );
+       };
 
-       filter.appendChild( label );
-       filter.appendChild( button );
-       addEvent( filter, "submit", function( ev ) {
-               applyUrlParams();
+       /**
+        * Determine the common prefix of two strings.
+        * @param {string} text1 First string.
+        * @param {string} text2 Second string.
+        * @return {number} The number of characters common to the start of each
+        *     string.
+        */
+       DiffMatchPatch.prototype.diffCommonPrefix = function( text1, text2 ) {
+               var pointermid, pointermax, pointermin, pointerstart;
 
-               if ( ev && ev.preventDefault ) {
-                       ev.preventDefault();
+               // Quick check for common null cases.
+               if ( !text1 || !text2 || text1.charAt( 0 ) !== text2.charAt( 0 ) ) {
+                       return 0;
                }
 
-               return false;
-       });
+               // Binary search.
+               // Performance analysis: https://neil.fraser.name/news/2007/10/09/
+               pointermin = 0;
+               pointermax = Math.min( text1.length, text2.length );
+               pointermid = pointermax;
+               pointerstart = 0;
+               while ( pointermin < pointermid ) {
+                       if ( text1.substring( pointerstart, pointermid ) ===
+                                       text2.substring( pointerstart, pointermid ) ) {
+                               pointermin = pointermid;
+                               pointerstart = pointermin;
+                       } else {
+                               pointermax = pointermid;
+                       }
+                       pointermid = Math.floor( ( pointermax - pointermin ) / 2 + pointermin );
+               }
+               return pointermid;
+       };
 
-       return filter;
-}
+       /**
+        * Determine the common suffix of two strings.
+        * @param {string} text1 First string.
+        * @param {string} text2 Second string.
+        * @return {number} The number of characters common to the end of each string.
+        */
+       DiffMatchPatch.prototype.diffCommonSuffix = function( text1, text2 ) {
+               var pointermid, pointermax, pointermin, pointerend;
 
-function toolbarModuleFilterHtml() {
-       var i,
-               moduleFilterHtml = "";
+               // Quick check for common null cases.
+               if ( !text1 ||
+                               !text2 ||
+                               text1.charAt( text1.length - 1 ) !== text2.charAt( text2.length - 1 ) ) {
+                       return 0;
+               }
 
-       if ( !modulesList.length ) {
-               return false;
-       }
+               // Binary search.
+               // Performance analysis: https://neil.fraser.name/news/2007/10/09/
+               pointermin = 0;
+               pointermax = Math.min( text1.length, text2.length );
+               pointermid = pointermax;
+               pointerend = 0;
+               while ( pointermin < pointermid ) {
+                       if ( text1.substring( text1.length - pointermid, text1.length - pointerend ) ===
+                                       text2.substring( text2.length - pointermid, text2.length - pointerend ) ) {
+                               pointermin = pointermid;
+                               pointerend = pointermin;
+                       } else {
+                               pointermax = pointermid;
+                       }
+                       pointermid = Math.floor( ( pointermax - pointermin ) / 2 + pointermin );
+               }
+               return pointermid;
+       };
 
-       modulesList.sort(function( a, b ) {
-               return a.localeCompare( b );
-       });
+       /**
+        * Find the differences between two texts.  Assumes that the texts do not
+        * have any common prefix or suffix.
+        * @param {string} text1 Old string to be diffed.
+        * @param {string} text2 New string to be diffed.
+        * @param {boolean} checklines Speedup flag.  If false, then don't run a
+        *     line-level diff first to identify the changed areas.
+        *     If true, then run a faster, slightly less optimal diff.
+        * @param {number} deadline Time when the diff should be complete by.
+        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffCompute = function( text1, text2, checklines, deadline ) {
+               var diffs, longtext, shorttext, i, hm,
+                       text1A, text2A, text1B, text2B,
+                       midCommon, diffsA, diffsB;
 
-       moduleFilterHtml += "<label for='qunit-modulefilter'>Module: </label>" +
-               "<select id='qunit-modulefilter' name='modulefilter'><option value='' " +
-               ( QUnit.urlParams.module === undefined ? "selected='selected'" : "" ) +
-               ">< All Modules ></option>";
+               if ( !text1 ) {
 
-       for ( i = 0; i < modulesList.length; i++ ) {
-               moduleFilterHtml += "<option value='" +
-                       escapeText( encodeURIComponent( modulesList[ i ] ) ) + "' " +
-                       ( QUnit.urlParams.module === modulesList[ i ] ? "selected='selected'" : "" ) +
-                       ">" + escapeText( modulesList[ i ] ) + "</option>";
-       }
-       moduleFilterHtml += "</select>";
+                       // Just add some text (speedup).
+                       return [
+                               [ DIFF_INSERT, text2 ]
+                       ];
+               }
 
-       return moduleFilterHtml;
-}
+               if ( !text2 ) {
 
-function toolbarModuleFilter() {
-       var toolbar = id( "qunit-testrunner-toolbar" ),
-               moduleFilter = document.createElement( "span" ),
-               moduleFilterHtml = toolbarModuleFilterHtml();
+                       // Just delete some text (speedup).
+                       return [
+                               [ DIFF_DELETE, text1 ]
+                       ];
+               }
+
+               longtext = text1.length > text2.length ? text1 : text2;
+               shorttext = text1.length > text2.length ? text2 : text1;
+               i = longtext.indexOf( shorttext );
+               if ( i !== -1 ) {
+
+                       // Shorter text is inside the longer text (speedup).
+                       diffs = [
+                               [ DIFF_INSERT, longtext.substring( 0, i ) ],
+                               [ DIFF_EQUAL, shorttext ],
+                               [ DIFF_INSERT, longtext.substring( i + shorttext.length ) ]
+                       ];
 
-       if ( !toolbar || !moduleFilterHtml ) {
-               return false;
-       }
+                       // Swap insertions for deletions if diff is reversed.
+                       if ( text1.length > text2.length ) {
+                               diffs[ 0 ][ 0 ] = diffs[ 2 ][ 0 ] = DIFF_DELETE;
+                       }
+                       return diffs;
+               }
 
-       moduleFilter.setAttribute( "id", "qunit-modulefilter-container" );
-       moduleFilter.innerHTML = moduleFilterHtml;
+               if ( shorttext.length === 1 ) {
 
-       addEvent( moduleFilter.lastChild, "change", applyUrlParams );
+                       // Single character string.
+                       // After the previous speedup, the character can't be an equality.
+                       return [
+                               [ DIFF_DELETE, text1 ],
+                               [ DIFF_INSERT, text2 ]
+                       ];
+               }
 
-       toolbar.appendChild( moduleFilter );
-}
+               // Check to see if the problem can be split in two.
+               hm = this.diffHalfMatch( text1, text2 );
+               if ( hm ) {
 
-function appendToolbar() {
-       var toolbar = id( "qunit-testrunner-toolbar" );
+                       // A half-match was found, sort out the return data.
+                       text1A = hm[ 0 ];
+                       text1B = hm[ 1 ];
+                       text2A = hm[ 2 ];
+                       text2B = hm[ 3 ];
+                       midCommon = hm[ 4 ];
 
-       if ( toolbar ) {
-               toolbar.appendChild( toolbarUrlConfigContainer() );
-               toolbar.appendChild( toolbarLooseFilter() );
-       }
-}
+                       // Send both pairs off for separate processing.
+                       diffsA = this.DiffMain( text1A, text2A, checklines, deadline );
+                       diffsB = this.DiffMain( text1B, text2B, checklines, deadline );
 
-function appendHeader() {
-       var header = id( "qunit-header" );
+                       // Merge the results.
+                       return diffsA.concat( [
+                               [ DIFF_EQUAL, midCommon ]
+                       ], diffsB );
+               }
 
-       if ( header ) {
-               header.innerHTML = "<a href='" +
-                       escapeText( setUrl( { filter: undefined, module: undefined, testId: undefined } ) ) +
-                       "'>" + header.innerHTML + "</a> ";
-       }
-}
+               if ( checklines && text1.length > 100 && text2.length > 100 ) {
+                       return this.diffLineMode( text1, text2, deadline );
+               }
 
-function appendBanner() {
-       var banner = id( "qunit-banner" );
+               return this.diffBisect( text1, text2, deadline );
+       };
 
-       if ( banner ) {
-               banner.className = "";
-       }
-}
+       /**
+        * Do the two texts share a substring which is at least half the length of the
+        * longer text?
+        * This speedup can produce non-minimal diffs.
+        * @param {string} text1 First string.
+        * @param {string} text2 Second string.
+        * @return {Array.<string>} Five element Array, containing the prefix of
+        *     text1, the suffix of text1, the prefix of text2, the suffix of
+        *     text2 and the common middle.  Or null if there was no match.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffHalfMatch = function( text1, text2 ) {
+               var longtext, shorttext, dmp,
+                       text1A, text2B, text2A, text1B, midCommon,
+                       hm1, hm2, hm;
 
-function appendTestResults() {
-       var tests = id( "qunit-tests" ),
-               result = id( "qunit-testresult" );
+               longtext = text1.length > text2.length ? text1 : text2;
+               shorttext = text1.length > text2.length ? text2 : text1;
+               if ( longtext.length < 4 || shorttext.length * 2 < longtext.length ) {
+                       return null; // Pointless.
+               }
+               dmp = this; // 'this' becomes 'window' in a closure.
 
-       if ( result ) {
-               result.parentNode.removeChild( result );
-       }
+               /**
+                * Does a substring of shorttext exist within longtext such that the substring
+                * is at least half the length of longtext?
+                * Closure, but does not reference any external variables.
+                * @param {string} longtext Longer string.
+                * @param {string} shorttext Shorter string.
+                * @param {number} i Start index of quarter length substring within longtext.
+                * @return {Array.<string>} Five element Array, containing the prefix of
+                *     longtext, the suffix of longtext, the prefix of shorttext, the suffix
+                *     of shorttext and the common middle.  Or null if there was no match.
+                * @private
+                */
+               function diffHalfMatchI( longtext, shorttext, i ) {
+                       var seed, j, bestCommon, prefixLength, suffixLength,
+                               bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB;
 
-       if ( tests ) {
-               tests.innerHTML = "";
-               result = document.createElement( "p" );
-               result.id = "qunit-testresult";
-               result.className = "result";
-               tests.parentNode.insertBefore( result, tests );
-               result.innerHTML = "Running...<br />&#160;";
-       }
-}
+                       // Start with a 1/4 length substring at position i as a seed.
+                       seed = longtext.substring( i, i + Math.floor( longtext.length / 4 ) );
+                       j = -1;
+                       bestCommon = "";
+                       while ( ( j = shorttext.indexOf( seed, j + 1 ) ) !== -1 ) {
+                               prefixLength = dmp.diffCommonPrefix( longtext.substring( i ),
+                                       shorttext.substring( j ) );
+                               suffixLength = dmp.diffCommonSuffix( longtext.substring( 0, i ),
+                                       shorttext.substring( 0, j ) );
+                               if ( bestCommon.length < suffixLength + prefixLength ) {
+                                       bestCommon = shorttext.substring( j - suffixLength, j ) +
+                                               shorttext.substring( j, j + prefixLength );
+                                       bestLongtextA = longtext.substring( 0, i - suffixLength );
+                                       bestLongtextB = longtext.substring( i + prefixLength );
+                                       bestShorttextA = shorttext.substring( 0, j - suffixLength );
+                                       bestShorttextB = shorttext.substring( j + prefixLength );
+                               }
+                       }
+                       if ( bestCommon.length * 2 >= longtext.length ) {
+                               return [ bestLongtextA, bestLongtextB,
+                                       bestShorttextA, bestShorttextB, bestCommon
+                               ];
+                       } else {
+                               return null;
+                       }
+               }
 
-function storeFixture() {
-       var fixture = id( "qunit-fixture" );
-       if ( fixture ) {
-               config.fixture = fixture.innerHTML;
-       }
-}
+               // First check if the second quarter is the seed for a half-match.
+               hm1 = diffHalfMatchI( longtext, shorttext,
+                       Math.ceil( longtext.length / 4 ) );
 
-function appendFilteredTest() {
-       var testId = QUnit.config.testId;
-       if ( !testId || testId.length <= 0 ) {
-               return "";
-       }
-       return "<div id='qunit-filteredTest'>Rerunning selected tests: " +
-               escapeText( testId.join(", ") ) +
-               " <a id='qunit-clearFilter' href='" +
-               escapeText( setUrl( { filter: undefined, module: undefined, testId: undefined } ) ) +
-               "'>" + "Run all tests" + "</a></div>";
-}
+               // Check again based on the third quarter.
+               hm2 = diffHalfMatchI( longtext, shorttext,
+                       Math.ceil( longtext.length / 2 ) );
+               if ( !hm1 && !hm2 ) {
+                       return null;
+               } else if ( !hm2 ) {
+                       hm = hm1;
+               } else if ( !hm1 ) {
+                       hm = hm2;
+               } else {
 
-function appendUserAgent() {
-       var userAgent = id( "qunit-userAgent" );
+                       // Both matched.  Select the longest.
+                       hm = hm1[ 4 ].length > hm2[ 4 ].length ? hm1 : hm2;
+               }
 
-       if ( userAgent ) {
-               userAgent.innerHTML = "";
-               userAgent.appendChild(
-                       document.createTextNode(
-                               "QUnit " + QUnit.version + "; " + navigator.userAgent
-                       )
-               );
-       }
-}
+               // A half-match was found, sort out the return data.
+               text1A, text1B, text2A, text2B;
+               if ( text1.length > text2.length ) {
+                       text1A = hm[ 0 ];
+                       text1B = hm[ 1 ];
+                       text2A = hm[ 2 ];
+                       text2B = hm[ 3 ];
+               } else {
+                       text2A = hm[ 0 ];
+                       text2B = hm[ 1 ];
+                       text1A = hm[ 2 ];
+                       text1B = hm[ 3 ];
+               }
+               midCommon = hm[ 4 ];
+               return [ text1A, text1B, text2A, text2B, midCommon ];
+       };
 
-function appendTestsList( modules ) {
-       var i, l, x, z, test, moduleObj;
+       /**
+        * Do a quick line-level diff on both strings, then rediff the parts for
+        * greater accuracy.
+        * This speedup can produce non-minimal diffs.
+        * @param {string} text1 Old string to be diffed.
+        * @param {string} text2 New string to be diffed.
+        * @param {number} deadline Time when the diff should be complete by.
+        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffLineMode = function( text1, text2, deadline ) {
+               var a, diffs, linearray, pointer, countInsert,
+                       countDelete, textInsert, textDelete, j;
 
-       for ( i = 0, l = modules.length; i < l; i++ ) {
-               moduleObj = modules[ i ];
+               // Scan the text on a line-by-line basis first.
+               a = this.diffLinesToChars( text1, text2 );
+               text1 = a.chars1;
+               text2 = a.chars2;
+               linearray = a.lineArray;
 
-               if ( moduleObj.name ) {
-                       modulesList.push( moduleObj.name );
-               }
+               diffs = this.DiffMain( text1, text2, false, deadline );
 
-               for ( x = 0, z = moduleObj.tests.length; x < z; x++ ) {
-                       test = moduleObj.tests[ x ];
+               // Convert the diff back to original text.
+               this.diffCharsToLines( diffs, linearray );
 
-                       appendTest( test.name, test.testId, moduleObj.name );
-               }
-       }
-}
+               // Eliminate freak matches (e.g. blank lines)
+               this.diffCleanupSemantic( diffs );
 
-function appendTest( name, testId, moduleName ) {
-       var title, rerunTrigger, testBlock, assertList,
-               tests = id( "qunit-tests" );
+               // Rediff any replacement blocks, this time character-by-character.
+               // Add a dummy entry at the end.
+               diffs.push( [ DIFF_EQUAL, "" ] );
+               pointer = 0;
+               countDelete = 0;
+               countInsert = 0;
+               textDelete = "";
+               textInsert = "";
+               while ( pointer < diffs.length ) {
+                       switch ( diffs[ pointer ][ 0 ] ) {
+                       case DIFF_INSERT:
+                               countInsert++;
+                               textInsert += diffs[ pointer ][ 1 ];
+                               break;
+                       case DIFF_DELETE:
+                               countDelete++;
+                               textDelete += diffs[ pointer ][ 1 ];
+                               break;
+                       case DIFF_EQUAL:
+
+                               // Upon reaching an equality, check for prior redundancies.
+                               if ( countDelete >= 1 && countInsert >= 1 ) {
 
-       if ( !tests ) {
-               return;
-       }
+                                       // Delete the offending records and add the merged ones.
+                                       diffs.splice( pointer - countDelete - countInsert,
+                                               countDelete + countInsert );
+                                       pointer = pointer - countDelete - countInsert;
+                                       a = this.DiffMain( textDelete, textInsert, false, deadline );
+                                       for ( j = a.length - 1; j >= 0; j-- ) {
+                                               diffs.splice( pointer, 0, a[ j ] );
+                                       }
+                                       pointer = pointer + a.length;
+                               }
+                               countInsert = 0;
+                               countDelete = 0;
+                               textDelete = "";
+                               textInsert = "";
+                               break;
+                       }
+                       pointer++;
+               }
+               diffs.pop(); // Remove the dummy entry at the end.
 
-       title = document.createElement( "strong" );
-       title.innerHTML = getNameHtml( name, moduleName );
+               return diffs;
+       };
 
-       rerunTrigger = document.createElement( "a" );
-       rerunTrigger.innerHTML = "Rerun";
-       rerunTrigger.href = setUrl({ testId: testId });
+       /**
+        * Find the 'middle snake' of a diff, split the problem in two
+        * and return the recursively constructed diff.
+        * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.
+        * @param {string} text1 Old string to be diffed.
+        * @param {string} text2 New string to be diffed.
+        * @param {number} deadline Time at which to bail if not yet complete.
+        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffBisect = function( text1, text2, deadline ) {
+               var text1Length, text2Length, maxD, vOffset, vLength,
+                       v1, v2, x, delta, front, k1start, k1end, k2start,
+                       k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2;
 
-       testBlock = document.createElement( "li" );
-       testBlock.appendChild( title );
-       testBlock.appendChild( rerunTrigger );
-       testBlock.id = "qunit-test-output-" + testId;
+               // Cache the text lengths to prevent multiple calls.
+               text1Length = text1.length;
+               text2Length = text2.length;
+               maxD = Math.ceil( ( text1Length + text2Length ) / 2 );
+               vOffset = maxD;
+               vLength = 2 * maxD;
+               v1 = new Array( vLength );
+               v2 = new Array( vLength );
 
-       assertList = document.createElement( "ol" );
-       assertList.className = "qunit-assert-list";
+               // Setting all elements to -1 is faster in Chrome & Firefox than mixing
+               // integers and undefined.
+               for ( x = 0; x < vLength; x++ ) {
+                       v1[ x ] = -1;
+                       v2[ x ] = -1;
+               }
+               v1[ vOffset + 1 ] = 0;
+               v2[ vOffset + 1 ] = 0;
+               delta = text1Length - text2Length;
 
-       testBlock.appendChild( assertList );
+               // If the total number of characters is odd, then the front path will collide
+               // with the reverse path.
+               front = ( delta % 2 !== 0 );
 
-       tests.appendChild( testBlock );
-}
+               // Offsets for start and end of k loop.
+               // Prevents mapping of space beyond the grid.
+               k1start = 0;
+               k1end = 0;
+               k2start = 0;
+               k2end = 0;
+               for ( d = 0; d < maxD; d++ ) {
 
-// HTML Reporter initialization and load
-QUnit.begin(function( details ) {
-       var qunit = id( "qunit" );
+                       // Bail out if deadline is reached.
+                       if ( ( new Date() ).getTime() > deadline ) {
+                               break;
+                       }
 
-       // Fixture is the only one necessary to run without the #qunit element
-       storeFixture();
+                       // Walk the front path one step.
+                       for ( k1 = -d + k1start; k1 <= d - k1end; k1 += 2 ) {
+                               k1Offset = vOffset + k1;
+                               if ( k1 === -d || ( k1 !== d && v1[ k1Offset - 1 ] < v1[ k1Offset + 1 ] ) ) {
+                                       x1 = v1[ k1Offset + 1 ];
+                               } else {
+                                       x1 = v1[ k1Offset - 1 ] + 1;
+                               }
+                               y1 = x1 - k1;
+                               while ( x1 < text1Length && y1 < text2Length &&
+                                       text1.charAt( x1 ) === text2.charAt( y1 ) ) {
+                                       x1++;
+                                       y1++;
+                               }
+                               v1[ k1Offset ] = x1;
+                               if ( x1 > text1Length ) {
 
-       if ( qunit ) {
-               qunit.innerHTML =
-                       "<h1 id='qunit-header'>" + escapeText( document.title ) + "</h1>" +
-                       "<h2 id='qunit-banner'></h2>" +
-                       "<div id='qunit-testrunner-toolbar'></div>" +
-                       appendFilteredTest() +
-                       "<h2 id='qunit-userAgent'></h2>" +
-                       "<ol id='qunit-tests'></ol>";
-       }
+                                       // Ran off the right of the graph.
+                                       k1end += 2;
+                               } else if ( y1 > text2Length ) {
 
-       appendHeader();
-       appendBanner();
-       appendTestResults();
-       appendUserAgent();
-       appendToolbar();
-       appendTestsList( details.modules );
-       toolbarModuleFilter();
+                                       // Ran off the bottom of the graph.
+                                       k1start += 2;
+                               } else if ( front ) {
+                                       k2Offset = vOffset + delta - k1;
+                                       if ( k2Offset >= 0 && k2Offset < vLength && v2[ k2Offset ] !== -1 ) {
 
-       if ( qunit && config.hidepassed ) {
-               addClass( qunit.lastChild, "hidepass" );
-       }
-});
+                                               // Mirror x2 onto top-left coordinate system.
+                                               x2 = text1Length - v2[ k2Offset ];
+                                               if ( x1 >= x2 ) {
 
-QUnit.done(function( details ) {
-       var i, key,
-               banner = id( "qunit-banner" ),
-               tests = id( "qunit-tests" ),
-               html = [
-                       "Tests completed in ",
-                       details.runtime,
-                       " milliseconds.<br />",
-                       "<span class='passed'>",
-                       details.passed,
-                       "</span> assertions of <span class='total'>",
-                       details.total,
-                       "</span> passed, <span class='failed'>",
-                       details.failed,
-                       "</span> failed."
-               ].join( "" );
+                                                       // Overlap detected.
+                                                       return this.diffBisectSplit( text1, text2, x1, y1, deadline );
+                                               }
+                                       }
+                               }
+                       }
 
-       if ( banner ) {
-               banner.className = details.failed ? "qunit-fail" : "qunit-pass";
-       }
+                       // Walk the reverse path one step.
+                       for ( k2 = -d + k2start; k2 <= d - k2end; k2 += 2 ) {
+                               k2Offset = vOffset + k2;
+                               if ( k2 === -d || ( k2 !== d && v2[ k2Offset - 1 ] < v2[ k2Offset + 1 ] ) ) {
+                                       x2 = v2[ k2Offset + 1 ];
+                               } else {
+                                       x2 = v2[ k2Offset - 1 ] + 1;
+                               }
+                               y2 = x2 - k2;
+                               while ( x2 < text1Length && y2 < text2Length &&
+                                       text1.charAt( text1Length - x2 - 1 ) ===
+                                       text2.charAt( text2Length - y2 - 1 ) ) {
+                                       x2++;
+                                       y2++;
+                               }
+                               v2[ k2Offset ] = x2;
+                               if ( x2 > text1Length ) {
 
-       if ( tests ) {
-               id( "qunit-testresult" ).innerHTML = html;
-       }
+                                       // Ran off the left of the graph.
+                                       k2end += 2;
+                               } else if ( y2 > text2Length ) {
 
-       if ( config.altertitle && defined.document && document.title ) {
+                                       // Ran off the top of the graph.
+                                       k2start += 2;
+                               } else if ( !front ) {
+                                       k1Offset = vOffset + delta - k2;
+                                       if ( k1Offset >= 0 && k1Offset < vLength && v1[ k1Offset ] !== -1 ) {
+                                               x1 = v1[ k1Offset ];
+                                               y1 = vOffset + x1 - k1Offset;
 
-               // show ✖ for good, ✔ for bad suite result in title
-               // use escape sequences in case file gets loaded with non-utf-8-charset
-               document.title = [
-                       ( details.failed ? "\u2716" : "\u2714" ),
-                       document.title.replace( /^[\u2714\u2716] /i, "" )
-               ].join( " " );
-       }
+                                               // Mirror x2 onto top-left coordinate system.
+                                               x2 = text1Length - x2;
+                                               if ( x1 >= x2 ) {
 
-       // clear own sessionStorage items if all tests passed
-       if ( config.reorder && defined.sessionStorage && details.failed === 0 ) {
-               for ( i = 0; i < sessionStorage.length; i++ ) {
-                       key = sessionStorage.key( i++ );
-                       if ( key.indexOf( "qunit-test-" ) === 0 ) {
-                               sessionStorage.removeItem( key );
+                                                       // Overlap detected.
+                                                       return this.diffBisectSplit( text1, text2, x1, y1, deadline );
+                                               }
+                                       }
+                               }
                        }
                }
-       }
-
-       // scroll back to top to show results
-       if ( config.scrolltop && window.scrollTo ) {
-               window.scrollTo( 0, 0 );
-       }
-});
 
-function getNameHtml( name, module ) {
-       var nameHtml = "";
+               // Diff took too long and hit the deadline or
+               // number of diffs equals number of characters, no commonality at all.
+               return [
+                       [ DIFF_DELETE, text1 ],
+                       [ DIFF_INSERT, text2 ]
+               ];
+       };
 
-       if ( module ) {
-               nameHtml = "<span class='module-name'>" + escapeText( module ) + "</span>: ";
-       }
+       /**
+        * Given the location of the 'middle snake', split the diff in two parts
+        * and recurse.
+        * @param {string} text1 Old string to be diffed.
+        * @param {string} text2 New string to be diffed.
+        * @param {number} x Index of split point in text1.
+        * @param {number} y Index of split point in text2.
+        * @param {number} deadline Time at which to bail if not yet complete.
+        * @return {!Array.<!DiffMatchPatch.Diff>} Array of diff tuples.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffBisectSplit = function( text1, text2, x, y, deadline ) {
+               var text1a, text1b, text2a, text2b, diffs, diffsb;
+               text1a = text1.substring( 0, x );
+               text2a = text2.substring( 0, y );
+               text1b = text1.substring( x );
+               text2b = text2.substring( y );
 
-       nameHtml += "<span class='test-name'>" + escapeText( name ) + "</span>";
+               // Compute both diffs serially.
+               diffs = this.DiffMain( text1a, text2a, false, deadline );
+               diffsb = this.DiffMain( text1b, text2b, false, deadline );
 
-       return nameHtml;
-}
+               return diffs.concat( diffsb );
+       };
 
-QUnit.testStart(function( details ) {
-       var running, testBlock, bad;
+       /**
+        * Reduce the number of edits by eliminating semantically trivial equalities.
+        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
+        */
+       DiffMatchPatch.prototype.diffCleanupSemantic = function( diffs ) {
+               var changes, equalities, equalitiesLength, lastequality,
+                       pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1,
+                       lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;
+               changes = false;
+               equalities = []; // Stack of indices where equalities are found.
+               equalitiesLength = 0; // Keeping our own length var is faster in JS.
+               /** @type {?string} */
+               lastequality = null;
 
-       testBlock = id( "qunit-test-output-" + details.testId );
-       if ( testBlock ) {
-               testBlock.className = "running";
-       } else {
+               // Always equal to diffs[equalities[equalitiesLength - 1]][1]
+               pointer = 0; // Index of current position.
 
-               // Report later registered tests
-               appendTest( details.name, details.testId, details.module );
-       }
+               // Number of characters that changed prior to the equality.
+               lengthInsertions1 = 0;
+               lengthDeletions1 = 0;
 
-       running = id( "qunit-testresult" );
-       if ( running ) {
-               bad = QUnit.config.reorder && defined.sessionStorage &&
-                       +sessionStorage.getItem( "qunit-test-" + details.module + "-" + details.name );
+               // Number of characters that changed after the equality.
+               lengthInsertions2 = 0;
+               lengthDeletions2 = 0;
+               while ( pointer < diffs.length ) {
+                       if ( diffs[ pointer ][ 0 ] === DIFF_EQUAL ) { // Equality found.
+                               equalities[ equalitiesLength++ ] = pointer;
+                               lengthInsertions1 = lengthInsertions2;
+                               lengthDeletions1 = lengthDeletions2;
+                               lengthInsertions2 = 0;
+                               lengthDeletions2 = 0;
+                               lastequality = diffs[ pointer ][ 1 ];
+                       } else { // An insertion or deletion.
+                               if ( diffs[ pointer ][ 0 ] === DIFF_INSERT ) {
+                                       lengthInsertions2 += diffs[ pointer ][ 1 ].length;
+                               } else {
+                                       lengthDeletions2 += diffs[ pointer ][ 1 ].length;
+                               }
 
-               running.innerHTML = ( bad ?
-                       "Rerunning previously failed test: <br />" :
-                       "Running: <br />" ) +
-                       getNameHtml( details.name, details.module );
-       }
+                               // Eliminate an equality that is smaller or equal to the edits on both
+                               // sides of it.
+                               if ( lastequality && ( lastequality.length <=
+                                               Math.max( lengthInsertions1, lengthDeletions1 ) ) &&
+                                               ( lastequality.length <= Math.max( lengthInsertions2,
+                                                       lengthDeletions2 ) ) ) {
 
-});
+                                       // Duplicate record.
+                                       diffs.splice(
+                                               equalities[ equalitiesLength - 1 ],
+                                               0,
+                                               [ DIFF_DELETE, lastequality ]
+                                       );
 
-function stripHtml( string ) {
-       // strip tags, html entity and whitespaces
-       return string.replace(/<\/?[^>]+(>|$)/g, "").replace(/\&quot;/g, "").replace(/\s+/g, "");
-}
+                                       // Change second copy to insert.
+                                       diffs[ equalities[ equalitiesLength - 1 ] + 1 ][ 0 ] = DIFF_INSERT;
 
-QUnit.log(function( details ) {
-       var assertList, assertLi,
-               message, expected, actual, diff,
-               showDiff = false,
-               testItem = id( "qunit-test-output-" + details.testId );
+                                       // Throw away the equality we just deleted.
+                                       equalitiesLength--;
 
-       if ( !testItem ) {
-               return;
-       }
+                                       // Throw away the previous equality (it needs to be reevaluated).
+                                       equalitiesLength--;
+                                       pointer = equalitiesLength > 0 ? equalities[ equalitiesLength - 1 ] : -1;
 
-       message = escapeText( details.message ) || ( details.result ? "okay" : "failed" );
-       message = "<span class='test-message'>" + message + "</span>";
-       message += "<span class='runtime'>@ " + details.runtime + " ms</span>";
+                                       // Reset the counters.
+                                       lengthInsertions1 = 0;
+                                       lengthDeletions1 = 0;
+                                       lengthInsertions2 = 0;
+                                       lengthDeletions2 = 0;
+                                       lastequality = null;
+                                       changes = true;
+                               }
+                       }
+                       pointer++;
+               }
 
-       // pushFailure doesn't provide details.expected
-       // when it calls, it's implicit to also not show expected and diff stuff
-       // Also, we need to check details.expected existence, as it can exist and be undefined
-       if ( !details.result && hasOwn.call( details, "expected" ) ) {
-               if ( details.negative ) {
-                       expected = escapeText( "NOT " + QUnit.dump.parse( details.expected ) );
-               } else {
-                       expected = escapeText( QUnit.dump.parse( details.expected ) );
+               // Normalize the diff.
+               if ( changes ) {
+                       this.diffCleanupMerge( diffs );
                }
 
-               actual = escapeText( QUnit.dump.parse( details.actual ) );
-               message += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" +
-                       expected +
-                       "</pre></td></tr>";
+               // Find any overlaps between deletions and insertions.
+               // e.g: <del>abcxxx</del><ins>xxxdef</ins>
+               //   -> <del>abc</del>xxx<ins>def</ins>
+               // e.g: <del>xxxabc</del><ins>defxxx</ins>
+               //   -> <ins>def</ins>xxx<del>abc</del>
+               // Only extract an overlap if it is as big as the edit ahead or behind it.
+               pointer = 1;
+               while ( pointer < diffs.length ) {
+                       if ( diffs[ pointer - 1 ][ 0 ] === DIFF_DELETE &&
+                                       diffs[ pointer ][ 0 ] === DIFF_INSERT ) {
+                               deletion = diffs[ pointer - 1 ][ 1 ];
+                               insertion = diffs[ pointer ][ 1 ];
+                               overlapLength1 = this.diffCommonOverlap( deletion, insertion );
+                               overlapLength2 = this.diffCommonOverlap( insertion, deletion );
+                               if ( overlapLength1 >= overlapLength2 ) {
+                                       if ( overlapLength1 >= deletion.length / 2 ||
+                                                       overlapLength1 >= insertion.length / 2 ) {
 
-               if ( actual !== expected ) {
+                                               // Overlap found.  Insert an equality and trim the surrounding edits.
+                                               diffs.splice(
+                                                       pointer,
+                                                       0,
+                                                       [ DIFF_EQUAL, insertion.substring( 0, overlapLength1 ) ]
+                                               );
+                                               diffs[ pointer - 1 ][ 1 ] =
+                                                       deletion.substring( 0, deletion.length - overlapLength1 );
+                                               diffs[ pointer + 1 ][ 1 ] = insertion.substring( overlapLength1 );
+                                               pointer++;
+                                       }
+                               } else {
+                                       if ( overlapLength2 >= deletion.length / 2 ||
+                                                       overlapLength2 >= insertion.length / 2 ) {
 
-                       message += "<tr class='test-actual'><th>Result: </th><td><pre>" +
-                               actual + "</pre></td></tr>";
+                                               // Reverse overlap found.
+                                               // Insert an equality and swap and trim the surrounding edits.
+                                               diffs.splice(
+                                                       pointer,
+                                                       0,
+                                                       [ DIFF_EQUAL, deletion.substring( 0, overlapLength2 ) ]
+                                               );
 
-                       // Don't show diff if actual or expected are booleans
-                       if ( !( /^(true|false)$/.test( actual ) ) &&
-                                       !( /^(true|false)$/.test( expected ) ) ) {
-                               diff = QUnit.diff( expected, actual );
-                               showDiff = stripHtml( diff ).length !==
-                                       stripHtml( expected ).length +
-                                       stripHtml( actual ).length;
+                                               diffs[ pointer - 1 ][ 0 ] = DIFF_INSERT;
+                                               diffs[ pointer - 1 ][ 1 ] =
+                                                       insertion.substring( 0, insertion.length - overlapLength2 );
+                                               diffs[ pointer + 1 ][ 0 ] = DIFF_DELETE;
+                                               diffs[ pointer + 1 ][ 1 ] =
+                                                       deletion.substring( overlapLength2 );
+                                               pointer++;
+                                       }
+                               }
+                               pointer++;
                        }
+                       pointer++;
+               }
+       };
 
-                       // Don't show diff if expected and actual are totally different
-                       if ( showDiff ) {
-                               message += "<tr class='test-diff'><th>Diff: </th><td><pre>" +
-                                       diff + "</pre></td></tr>";
-                       }
-               } else if ( expected.indexOf( "[object Array]" ) !== -1 ||
-                               expected.indexOf( "[object Object]" ) !== -1 ) {
-                       message += "<tr class='test-message'><th>Message: </th><td>" +
-                               "Diff suppressed as the depth of object is more than current max depth (" +
-                               QUnit.config.maxDepth + ").<p>Hint: Use <code>QUnit.dump.maxDepth</code> to " +
-                               " run with a higher max depth or <a href='" +
-                               escapeText( setUrl( { maxDepth: -1 } ) ) + "'>" +
-                               "Rerun</a> without max depth.</p></td></tr>";
+       /**
+        * Determine if the suffix of one string is the prefix of another.
+        * @param {string} text1 First string.
+        * @param {string} text2 Second string.
+        * @return {number} The number of characters common to the end of the first
+        *     string and the start of the second string.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffCommonOverlap = function( text1, text2 ) {
+               var text1Length, text2Length, textLength,
+                       best, length, pattern, found;
+
+               // Cache the text lengths to prevent multiple calls.
+               text1Length = text1.length;
+               text2Length = text2.length;
+
+               // Eliminate the null case.
+               if ( text1Length === 0 || text2Length === 0 ) {
+                       return 0;
                }
 
-               if ( details.source ) {
-                       message += "<tr class='test-source'><th>Source: </th><td><pre>" +
-                               escapeText( details.source ) + "</pre></td></tr>";
+               // Truncate the longer string.
+               if ( text1Length > text2Length ) {
+                       text1 = text1.substring( text1Length - text2Length );
+               } else if ( text1Length < text2Length ) {
+                       text2 = text2.substring( 0, text1Length );
                }
+               textLength = Math.min( text1Length, text2Length );
 
-               message += "</table>";
+               // Quick check for the worst case.
+               if ( text1 === text2 ) {
+                       return textLength;
+               }
 
-       // this occurs when pushFailure is set and we have an extracted stack trace
-       } else if ( !details.result && details.source ) {
-               message += "<table>" +
-                       "<tr class='test-source'><th>Source: </th><td><pre>" +
-                       escapeText( details.source ) + "</pre></td></tr>" +
-                       "</table>";
-       }
+               // Start by looking for a single character match
+               // and increase length until no match is found.
+               // Performance analysis: https://neil.fraser.name/news/2010/11/04/
+               best = 0;
+               length = 1;
+               while ( true ) {
+                       pattern = text1.substring( textLength - length );
+                       found = text2.indexOf( pattern );
+                       if ( found === -1 ) {
+                               return best;
+                       }
+                       length += found;
+                       if ( found === 0 || text1.substring( textLength - length ) ===
+                                       text2.substring( 0, length ) ) {
+                               best = length;
+                               length++;
+                       }
+               }
+       };
 
-       assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
+       /**
+        * Split two texts into an array of strings.  Reduce the texts to a string of
+        * hashes where each Unicode character represents one line.
+        * @param {string} text1 First string.
+        * @param {string} text2 Second string.
+        * @return {{chars1: string, chars2: string, lineArray: !Array.<string>}}
+        *     An object containing the encoded text1, the encoded text2 and
+        *     the array of unique strings.
+        *     The zeroth element of the array of unique strings is intentionally blank.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffLinesToChars = function( text1, text2 ) {
+               var lineArray, lineHash, chars1, chars2;
+               lineArray = []; // E.g. lineArray[4] === 'Hello\n'
+               lineHash = {};  // E.g. lineHash['Hello\n'] === 4
 
-       assertLi = document.createElement( "li" );
-       assertLi.className = details.result ? "pass" : "fail";
-       assertLi.innerHTML = message;
-       assertList.appendChild( assertLi );
-});
+               // '\x00' is a valid character, but various debuggers don't like it.
+               // So we'll insert a junk entry to avoid generating a null character.
+               lineArray[ 0 ] = "";
 
-QUnit.testDone(function( details ) {
-       var testTitle, time, testItem, assertList,
-               good, bad, testCounts, skipped, sourceName,
-               tests = id( "qunit-tests" );
+               /**
+                * Split a text into an array of strings.  Reduce the texts to a string of
+                * hashes where each Unicode character represents one line.
+                * Modifies linearray and linehash through being a closure.
+                * @param {string} text String to encode.
+                * @return {string} Encoded string.
+                * @private
+                */
+               function diffLinesToCharsMunge( text ) {
+                       var chars, lineStart, lineEnd, lineArrayLength, line;
+                       chars = "";
 
-       if ( !tests ) {
-               return;
-       }
+                       // Walk the text, pulling out a substring for each line.
+                       // text.split('\n') would would temporarily double our memory footprint.
+                       // Modifying text would create many large strings to garbage collect.
+                       lineStart = 0;
+                       lineEnd = -1;
 
-       testItem = id( "qunit-test-output-" + details.testId );
+                       // Keeping our own length variable is faster than looking it up.
+                       lineArrayLength = lineArray.length;
+                       while ( lineEnd < text.length - 1 ) {
+                               lineEnd = text.indexOf( "\n", lineStart );
+                               if ( lineEnd === -1 ) {
+                                       lineEnd = text.length - 1;
+                               }
+                               line = text.substring( lineStart, lineEnd + 1 );
+                               lineStart = lineEnd + 1;
 
-       assertList = testItem.getElementsByTagName( "ol" )[ 0 ];
+                               if ( lineHash.hasOwnProperty ? lineHash.hasOwnProperty( line ) :
+                                                       ( lineHash[ line ] !== undefined ) ) {
+                                       chars += String.fromCharCode( lineHash[ line ] );
+                               } else {
+                                       chars += String.fromCharCode( lineArrayLength );
+                                       lineHash[ line ] = lineArrayLength;
+                                       lineArray[ lineArrayLength++ ] = line;
+                               }
+                       }
+                       return chars;
+               }
 
-       good = details.passed;
-       bad = details.failed;
+               chars1 = diffLinesToCharsMunge( text1 );
+               chars2 = diffLinesToCharsMunge( text2 );
+               return {
+                       chars1: chars1,
+                       chars2: chars2,
+                       lineArray: lineArray
+               };
+       };
 
-       // store result when possible
-       if ( config.reorder && defined.sessionStorage ) {
-               if ( bad ) {
-                       sessionStorage.setItem( "qunit-test-" + details.module + "-" + details.name, bad );
-               } else {
-                       sessionStorage.removeItem( "qunit-test-" + details.module + "-" + details.name );
+       /**
+        * Rehydrate the text in a diff from a string of line hashes to real lines of
+        * text.
+        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
+        * @param {!Array.<string>} lineArray Array of unique strings.
+        * @private
+        */
+       DiffMatchPatch.prototype.diffCharsToLines = function( diffs, lineArray ) {
+               var x, chars, text, y;
+               for ( x = 0; x < diffs.length; x++ ) {
+                       chars = diffs[ x ][ 1 ];
+                       text = [];
+                       for ( y = 0; y < chars.length; y++ ) {
+                               text[ y ] = lineArray[ chars.charCodeAt( y ) ];
+                       }
+                       diffs[ x ][ 1 ] = text.join( "" );
                }
-       }
+       };
 
-       if ( bad === 0 ) {
+       /**
+        * Reorder and merge like edit sections.  Merge equalities.
+        * Any edit section can move as long as it doesn't cross an equality.
+        * @param {!Array.<!DiffMatchPatch.Diff>} diffs Array of diff tuples.
+        */
+       DiffMatchPatch.prototype.diffCleanupMerge = function( diffs ) {
+               var pointer, countDelete, countInsert, textInsert, textDelete,
+                       commonlength, changes, diffPointer, position;
+               diffs.push( [ DIFF_EQUAL, "" ] ); // Add a dummy entry at the end.
+               pointer = 0;
+               countDelete = 0;
+               countInsert = 0;
+               textDelete = "";
+               textInsert = "";
+               commonlength;
+               while ( pointer < diffs.length ) {
+                       switch ( diffs[ pointer ][ 0 ] ) {
+                       case DIFF_INSERT:
+                               countInsert++;
+                               textInsert += diffs[ pointer ][ 1 ];
+                               pointer++;
+                               break;
+                       case DIFF_DELETE:
+                               countDelete++;
+                               textDelete += diffs[ pointer ][ 1 ];
+                               pointer++;
+                               break;
+                       case DIFF_EQUAL:
 
-               // Collapse the passing tests
-               addClass( assertList, "qunit-collapsed" );
-       } else if ( bad && config.collapse && !collapseNext ) {
+                               // Upon reaching an equality, check for prior redundancies.
+                               if ( countDelete + countInsert > 1 ) {
+                                       if ( countDelete !== 0 && countInsert !== 0 ) {
 
-               // Skip collapsing the first failing test
-               collapseNext = true;
-       } else {
+                                               // Factor out any common prefixes.
+                                               commonlength = this.diffCommonPrefix( textInsert, textDelete );
+                                               if ( commonlength !== 0 ) {
+                                                       if ( ( pointer - countDelete - countInsert ) > 0 &&
+                                                                       diffs[ pointer - countDelete - countInsert - 1 ][ 0 ] ===
+                                                                       DIFF_EQUAL ) {
+                                                               diffs[ pointer - countDelete - countInsert - 1 ][ 1 ] +=
+                                                                       textInsert.substring( 0, commonlength );
+                                                       } else {
+                                                               diffs.splice( 0, 0, [ DIFF_EQUAL,
+                                                                       textInsert.substring( 0, commonlength )
+                                                               ] );
+                                                               pointer++;
+                                                       }
+                                                       textInsert = textInsert.substring( commonlength );
+                                                       textDelete = textDelete.substring( commonlength );
+                                               }
 
-               // Collapse remaining tests
-               addClass( assertList, "qunit-collapsed" );
-       }
+                                               // Factor out any common suffixies.
+                                               commonlength = this.diffCommonSuffix( textInsert, textDelete );
+                                               if ( commonlength !== 0 ) {
+                                                       diffs[ pointer ][ 1 ] = textInsert.substring( textInsert.length -
+                                                                       commonlength ) + diffs[ pointer ][ 1 ];
+                                                       textInsert = textInsert.substring( 0, textInsert.length -
+                                                               commonlength );
+                                                       textDelete = textDelete.substring( 0, textDelete.length -
+                                                               commonlength );
+                                               }
+                                       }
 
-       // testItem.firstChild is the test name
-       testTitle = testItem.firstChild;
+                                       // Delete the offending records and add the merged ones.
+                                       if ( countDelete === 0 ) {
+                                               diffs.splice( pointer - countInsert,
+                                                       countDelete + countInsert, [ DIFF_INSERT, textInsert ] );
+                                       } else if ( countInsert === 0 ) {
+                                               diffs.splice( pointer - countDelete,
+                                                       countDelete + countInsert, [ DIFF_DELETE, textDelete ] );
+                                       } else {
+                                               diffs.splice(
+                                                       pointer - countDelete - countInsert,
+                                                       countDelete + countInsert,
+                                                       [ DIFF_DELETE, textDelete ], [ DIFF_INSERT, textInsert ]
+                                               );
+                                       }
+                                       pointer = pointer - countDelete - countInsert +
+                                               ( countDelete ? 1 : 0 ) + ( countInsert ? 1 : 0 ) + 1;
+                               } else if ( pointer !== 0 && diffs[ pointer - 1 ][ 0 ] === DIFF_EQUAL ) {
 
-       testCounts = bad ?
-               "<b class='failed'>" + bad + "</b>, " + "<b class='passed'>" + good + "</b>, " :
-               "";
+                                       // Merge this equality with the previous one.
+                                       diffs[ pointer - 1 ][ 1 ] += diffs[ pointer ][ 1 ];
+                                       diffs.splice( pointer, 1 );
+                               } else {
+                                       pointer++;
+                               }
+                               countInsert = 0;
+                               countDelete = 0;
+                               textDelete = "";
+                               textInsert = "";
+                               break;
+                       }
+               }
+               if ( diffs[ diffs.length - 1 ][ 1 ] === "" ) {
+                       diffs.pop(); // Remove the dummy entry at the end.
+               }
 
-       testTitle.innerHTML += " <b class='counts'>(" + testCounts +
-               details.assertions.length + ")</b>";
+               // Second pass: look for single edits surrounded on both sides by equalities
+               // which can be shifted sideways to eliminate an equality.
+               // e.g: A<ins>BA</ins>C -> <ins>AB</ins>AC
+               changes = false;
+               pointer = 1;
 
-       if ( details.skipped ) {
-               testItem.className = "skipped";
-               skipped = document.createElement( "em" );
-               skipped.className = "qunit-skipped-label";
-               skipped.innerHTML = "skipped";
-               testItem.insertBefore( skipped, testTitle );
-       } else {
-               addEvent( testTitle, "click", function() {
-                       toggleClass( assertList, "qunit-collapsed" );
-               });
+               // Intentionally ignore the first and last element (don't need checking).
+               while ( pointer < diffs.length - 1 ) {
+                       if ( diffs[ pointer - 1 ][ 0 ] === DIFF_EQUAL &&
+                                       diffs[ pointer + 1 ][ 0 ] === DIFF_EQUAL ) {
 
-               testItem.className = bad ? "fail" : "pass";
+                               diffPointer = diffs[ pointer ][ 1 ];
+                               position = diffPointer.substring(
+                                       diffPointer.length - diffs[ pointer - 1 ][ 1 ].length
+                               );
 
-               time = document.createElement( "span" );
-               time.className = "runtime";
-               time.innerHTML = details.runtime + " ms";
-               testItem.insertBefore( time, assertList );
-       }
+                               // This is a single edit surrounded by equalities.
+                               if ( position === diffs[ pointer - 1 ][ 1 ] ) {
 
-       // Show the source of the test when showing assertions
-       if ( details.source ) {
-               sourceName = document.createElement( "p" );
-               sourceName.innerHTML = "<strong>Source: </strong>" + details.source;
-               addClass( sourceName, "qunit-source" );
-               if ( bad === 0 ) {
-                       addClass( sourceName, "qunit-collapsed" );
+                                       // Shift the edit over the previous equality.
+                                       diffs[ pointer ][ 1 ] = diffs[ pointer - 1 ][ 1 ] +
+                                               diffs[ pointer ][ 1 ].substring( 0, diffs[ pointer ][ 1 ].length -
+                                                       diffs[ pointer - 1 ][ 1 ].length );
+                                       diffs[ pointer + 1 ][ 1 ] =
+                                               diffs[ pointer - 1 ][ 1 ] + diffs[ pointer + 1 ][ 1 ];
+                                       diffs.splice( pointer - 1, 1 );
+                                       changes = true;
+                               } else if ( diffPointer.substring( 0, diffs[ pointer + 1 ][ 1 ].length ) ===
+                                               diffs[ pointer + 1 ][ 1 ] ) {
+
+                                       // Shift the edit over the next equality.
+                                       diffs[ pointer - 1 ][ 1 ] += diffs[ pointer + 1 ][ 1 ];
+                                       diffs[ pointer ][ 1 ] =
+                                               diffs[ pointer ][ 1 ].substring( diffs[ pointer + 1 ][ 1 ].length ) +
+                                               diffs[ pointer + 1 ][ 1 ];
+                                       diffs.splice( pointer + 1, 1 );
+                                       changes = true;
+                               }
+                       }
+                       pointer++;
                }
-               addEvent( testTitle, "click", function() {
-                       toggleClass( sourceName, "qunit-collapsed" );
-               });
-               testItem.appendChild( sourceName );
-       }
-});
 
-if ( defined.document ) {
+               // If shifts were made, the diff needs reordering and another shift sweep.
+               if ( changes ) {
+                       this.diffCleanupMerge( diffs );
+               }
+       };
 
-       // Avoid readyState issue with phantomjs
-       // Ref: #818
-       var notPhantom = ( function( p ) {
-               return !( p && p.version && p.version.major > 0 );
-       } )( window.phantom );
+       return function( o, n ) {
+               var diff, output, text;
+               diff = new DiffMatchPatch();
+               output = diff.DiffMain( o, n );
+               diff.diffCleanupEfficiency( output );
+               text = diff.diffPrettyHtml( output );
 
-       if ( notPhantom && document.readyState === "complete" ) {
-               QUnit.load();
-       } else {
-               addEvent( window, "load", QUnit.load );
-       }
-} else {
-       config.pageLoaded = true;
-       config.autorun = true;
-}
+               return text;
+       };
+}() );
 
-})();
+}() );
index 5b08f95..cad530b 100644 (file)
@@ -10,8 +10,8 @@
 }
 
 #pagehistory li.selected {
-       background-color: #f9f9f9;
-       border: 1px dashed #aaa;
+       background-color: #f8f9fa;
+       border: 1px dashed #a2a9b1;
 }
 
 .mw-history-revisionactions {
index d5520a1..1f0365e 100644 (file)
@@ -46,8 +46,8 @@
  */
 #filetoc {
        text-align: center;
-       border: 1px solid #aaa;
-       background-color: #f9f9f9;
+       border: 1px solid #a2a9b1;
+       background-color: #f8f9fa;
        padding: 5px;
        font-size: 95%;
        margin-bottom: 0.5em;
 
 .mw_metadata td,
 .mw_metadata th {
-       border: 1px solid #aaa;
+       border: 1px solid #a2a9b1;
        padding-left: 5px;
        padding-right: 5px;
 }
 
 .mw_metadata th {
-       background-color: #f9f9f9;
+       background-color: #f8f9fa;
 }
 
 .mw_metadata td {
index 1192650..10ceecc 100644 (file)
                return valueParts.join( options.decimal );
        }
 
+       /**
+        * Helper function to flip transformation tables.
+        *
+        * @param {...Object} Transformation tables
+        * @return {Object}
+        */
+       function flipTransform() {
+               var i, key, table, flipped = {};
+
+               // Ensure we strip thousand separators. This might be overwritten.
+               flipped[ ',' ] = '';
+
+               for ( i = 0; i < arguments.length; i++ ) {
+                       table = arguments[ i ];
+                       for ( key in table ) {
+                               if ( table.hasOwnProperty( key ) ) {
+                                       // The thousand separator should be deleted
+                                       flipped[ table[ key ] ] = key === ',' ? '' : key;
+                               }
+                       }
+               }
+
+               return flipped;
+       }
+
        $.extend( mw.language, {
 
                /**
                 * @return {number|string} Formatted number
                 */
                convertNumber: function ( num, integer ) {
-                       var i, tmp, transformTable, numberString, convertedNumber, pattern;
-
-                       pattern = mw.language.getData( mw.config.get( 'wgUserLanguage' ),
-                               'digitGroupingPattern' ) || '#,##0.###';
+                       var transformTable, digitTransformTable, separatorTransformTable,
+                               i, numberString, convertedNumber, pattern;
 
-                       // Set the target transform table:
-                       transformTable = mw.language.getDigitTransformTable();
-
-                       if ( !transformTable ) {
+                       // Quick shortcut for plain numbers
+                       if ( integer && parseInt( num, 10 ) === num ) {
                                return num;
                        }
 
-                       // Check if the 'restore' to Latin number flag is set:
+                       // Load the transformation tables (can be empty)
+                       digitTransformTable = mw.language.getDigitTransformTable();
+                       separatorTransformTable = mw.language.getSeparatorTransformTable();
+
                        if ( integer ) {
-                               if ( parseInt( num, 10 ) === num ) {
-                                       return num;
-                               }
-                               tmp = [];
-                               for ( i in transformTable ) {
-                                       tmp[ transformTable[ i ] ] = i;
-                               }
-                               transformTable = tmp;
+                               // Reverse the digit transformation tables if we are doing unformatting
+                               transformTable = flipTransform( separatorTransformTable, digitTransformTable );
                                numberString = String( num );
                        } else {
-                               // Ignore transform table if wgTranslateNumerals is false
-                               if ( !mw.config.get( 'wgTranslateNumerals' ) ) {
-                                       transformTable = [];
+                               // This check being here means that digits can still be unformatted
+                               // even if we do not produce them. This seems sane behavior.
+                               if ( mw.config.get( 'wgTranslateNumerals' ) ) {
+                                       transformTable = digitTransformTable;
                                }
+
+                               // Commaying is more complex, so we handle it here separately.
+                               // When unformatting, we just use separatorTransformTable.
+                               pattern = mw.language.getData( mw.config.get( 'wgUserLanguage' ),
+                                       'digitGroupingPattern' ) || '#,##0.###';
                                numberString = mw.language.commafy( num, pattern );
                        }
 
                        convertedNumber = '';
                        for ( i = 0; i < numberString.length; i++ ) {
-                               if ( transformTable[ numberString[ i ] ] ) {
+                               if ( transformTable.hasOwnProperty( numberString[ i ] ) ) {
                                        convertedNumber += transformTable[ numberString[ i ] ];
                                } else {
                                        convertedNumber += numberString[ i ];
                                }
                        }
-                       return integer ? parseInt( convertedNumber, 10 ) : convertedNumber;
+
+                       if ( integer ) {
+                               // Parse string to integer. This loses decimals!
+                               convertedNumber = parseInt( convertedNumber, 10 );
+                       }
+
+                       return convertedNumber;
                },
 
                /**
index 1522de1..59f892e 100644 (file)
@@ -343,8 +343,8 @@ a.new {
  */
 table.wikitable {
        margin: 1em 0;
-       background-color: #f9f9f9;
-       border: 1px solid #aaa;
+       background-color: #f8f9fa;
+       border: 1px solid #a2a9b1;
        border-collapse: collapse;
        color: #000;
 }
@@ -359,7 +359,7 @@ table.wikitable > * > tr > td {
 
 table.wikitable > tr > th,
 table.wikitable > * > tr > th {
-       background-color: #f2f2f2;
+       background-color: #eaecf0;
        text-align: center;
 }
 
index 676ecca..9688f1f 100644 (file)
@@ -26,9 +26,9 @@
 // Orange; for contextual use of returning to a past action
 @colorRegressive: #ff5d00;
 // Red; for contextual use of a negative action of high severity
-@colorDestructive: #c33;
-@colorDestructiveHighlight: #e53939;
-@colorDestructiveActive: #873636;
+@colorDestructive: #d33;
+@colorDestructiveHighlight: #ff4242;
+@colorDestructiveActive: #b32424;
 // Orange; for contextual use of a potentially negative action of medium severity
 @colorMediumSevere: #ff5d00;
 // Yellow; for contextual use of a potentially negative action of low severity
index d4c93fd..e1df01d 100644 (file)
@@ -10,8 +10,8 @@
 .toc,
 .mw-warning,
 .toccolours {
-       border: 1px solid #aaa;
-       background-color: #f9f9f9;
+       border: 1px solid #a2a9b1;
+       background-color: #f8f9fa;
        padding: 5px;
        font-size: 95%;
 }
@@ -147,9 +147,9 @@ div.thumb {
 }
 
 div.thumbinner {
-       border: 1px solid #ccc;
+       border: 1px solid #c8ccd1;
        padding: 3px;
-       background-color: #f9f9f9;
+       background-color: #f8f9fa;
        font-size: 94%;
        text-align: center;
        /* new block formatting context,
@@ -158,7 +158,7 @@ div.thumbinner {
 }
 
 html .thumbimage {
-       border: 1px solid #ccc;
+       border: 1px solid #c8ccd1;
 }
 
 html .thumbcaption {
@@ -199,7 +199,7 @@ div.magnify a {
 }
 
 img.thumbborder {
-       border: 1px solid #ddd;
+       border: 1px solid #eaecf0;
 }
 
 /* Directionality-specific styles for thumbnails - their positioning depends on content language */
index 9c52b2a..33ceb48 100644 (file)
@@ -204,8 +204,8 @@ pre, code, tt, kbd, samp, .mw-code {
 
 code {
        color: #000;
-       background-color: #f9f9f9;
-       border: 1px solid #ddd;
+       background-color: #f8f9fa;
+       border: 1px solid #eaecf0;
        border-radius: 2px;
        padding: 1px 4px;
 }
@@ -213,8 +213,8 @@ code {
 pre,
 .mw-code {
        color: #000;
-       background-color: #f9f9f9;
-       border: 1px solid #ddd;
+       background-color: #f8f9fa;
+       border: 1px solid #eaecf0;
        padding: 1em;
        /* Wrap lines in overflow. T2260, T103780 */
        white-space: pre-wrap;
index 4ca2096..7dbcd4d 100644 (file)
@@ -8,8 +8,8 @@
 
 /* Categories */
 .catlinks {
-       border: 1px solid #aaa;
-       background-color: #f9f9f9;
+       border: 1px solid #a2a9b1;
+       background-color: #f8f9fa;
        padding: 5px;
        margin-top: 1em;
        clear: both;
index 5191f92..ebe9ed9 100644 (file)
@@ -53,9 +53,9 @@
        font-size: 97%;
 }
 .mw-search-profile-tabs {
-       background-color: #f3f3f3;
+       background-color: #f8f9fa;
        margin-top: 1em;
-       border: 1px solid #c0c0c0;
+       border: 1px solid #c8ccd1;
 }
 .search-types {
        float: left;
@@ -76,7 +76,7 @@
        padding: 0.5em;
 }
 .search-types .current a {
-       color: #333;
+       color: #222;
        cursor: default;
 }
 .search-types .current a:hover {
@@ -86,7 +86,7 @@
        float: right;
        padding: 0.5em;
        padding-right: 0.75em;
-       color: #666;
+       color: #54595d;
        font-size: 95%;
 }
 #mw-search-top-table div.oo-ui-actionFieldLayout {
@@ -96,8 +96,8 @@
 #mw-searchoptions {
        margin: 0;
        padding: 0.5em 0.75em 0.75em 0.75em;
-       background-color: #f9f9f9;
-       border: 1px solid #c0c0c0;
+       background-color: #f8f9fa;
+       border: 1px solid #c8ccd1;
        border-top-width: 0;
 }
 #mw-searchoptions legend {
 }
 #mw-searchoptions .divider {
        clear: both;
-       border-bottom: 1px solid #ddd;
+       border-bottom: 1px solid #eaecf0;
        padding-top: 0.5em;
        margin-bottom: 0.5em;
 }
 #mw-search-interwiki {
        float: right;
        width: 18em;
-       border: 1px solid #aaa;
+       border: 1px solid #a2a9b1;
        margin-top: 2ex;
 }
 .searchalttitle,
        font-size: 97%;
        text-align: left;
        padding: 0.15em 0.15em 0.2em 0.2em;
-       background-color: #ececec;
-       border-top: 1px solid #bbb;
+       background-color: #eaecf0;
+       border-top: 1px solid #c8ccd1;
 }
 .searchdidyoumean {
        font-size: 127%;
        margin-top: 0.8em;
        /* Note that this color won't affect the link, as desired. */
-       color: #c00;
+       color: #d33;
 }
diff --git a/resources/src/mediawiki.widgets/MediaSearch/broken-image.png b/resources/src/mediawiki.widgets/MediaSearch/broken-image.png
new file mode 100644 (file)
index 0000000..f5be958
Binary files /dev/null and b/resources/src/mediawiki.widgets/MediaSearch/broken-image.png differ
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsProvider.js
new file mode 100644 (file)
index 0000000..dd07b92
--- /dev/null
@@ -0,0 +1,229 @@
+/*!
+ * MediaWiki Widgets - APIResultsProvider class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
+ */
+( function ( $, mw ) {
+
+       /**
+        * API Results Provider object.
+        *
+        * @class
+        * @mixins OO.EventEmitter
+        *
+        * @constructor
+        * @param {string} apiurl The URL to the api
+        * @param {Object} [config] Configuration options
+        * @cfg {number} fetchLimit The default number of results to fetch
+        * @cfg {string} lang The language of the API
+        * @cfg {number} offset Initial offset, if relevant, to call results from
+        * @cfg {Object} ajaxSettings The settings for the ajax call
+        * @cfg {Object} staticParams The data parameters that are static and should
+        *  always be sent to the API request, as opposed to user parameters.
+        * @cfg {Object} userParams Initial user parameters to be sent as data to
+        *  the API request. These can change per request, like the search query term
+        *  or sizing parameters for images, etc.
+        */
+       mw.widgets.APIResultsProvider = function MwWidgetsAPIResultsProvider( apiurl, config ) {
+               config = config || {};
+
+               this.setAPIurl( apiurl );
+               this.setDefaultFetchLimit( config.fetchLimit || 30 );
+               this.setLang( config.lang );
+               this.setOffset( config.offset || 0 );
+               this.setAjaxSettings( config.ajaxSettings || {} );
+
+               this.staticParams = config.staticParams || {};
+               this.userParams = config.userParams || {};
+
+               this.toggleDepleted( false );
+
+               // Mixin constructors
+               OO.EventEmitter.call( this );
+       };
+
+       /* Setup */
+       OO.mixinClass( mw.widgets.APIResultsProvider, OO.EventEmitter );
+
+       /* Methods */
+
+       /**
+        * Get results from the source
+        *
+        * @param {number} howMany Number of results to ask for
+        * @return {jQuery.Promise} Promise that is resolved into an array
+        * of available results, or is rejected if no results are available.
+        */
+       mw.widgets.APIResultsProvider.prototype.getResults = function () {
+               var xhr,
+                       deferred = $.Deferred(),
+                       allParams = $.extend( {}, this.getStaticParams(), this.getUserParams() );
+
+               xhr = $.getJSON( this.getAPIurl(), allParams )
+                       .done( function ( data ) {
+                               if (
+                                       $.type( data ) !== 'array' ||
+                                       (
+                                               $.type( data ) === 'array' &&
+                                               data.length === 0
+                                       )
+                               ) {
+                                       deferred.resolve();
+                               } else {
+                                       deferred.resolve( data );
+                               }
+                       } );
+               return deferred.promise( { abort: xhr.abort } );
+       };
+
+       /**
+        * Set API url
+        *
+        * @param {string} apiurl API url
+        */
+       mw.widgets.APIResultsProvider.prototype.setAPIurl = function ( apiurl ) {
+               this.apiurl = apiurl;
+       };
+
+       /**
+        * Set api url
+        *
+        * @return {string} API url
+        */
+       mw.widgets.APIResultsProvider.prototype.getAPIurl = function () {
+               return this.apiurl;
+       };
+
+       /**
+        * Get the static, non-changing data parameters sent to the API
+        *
+        * @return {Object} Data parameters
+        */
+       mw.widgets.APIResultsProvider.prototype.getStaticParams = function () {
+               return this.staticParams;
+       };
+
+       /**
+        * Get the user-inputted dynamic data parameters sent to the API
+        *
+        * @return {Object} Data parameters
+        */
+       mw.widgets.APIResultsProvider.prototype.getUserParams = function () {
+               return this.userParams;
+       };
+
+       /**
+        * Set the data parameters sent to the API
+        *
+        * @param {Object} params User defined data parameters
+        */
+       mw.widgets.APIResultsProvider.prototype.setUserParams = function ( params ) {
+               // Asymmetrically compare (params is subset of this.userParams)
+               if ( !OO.compare( params, this.userParams, true ) ) {
+                       this.userParams = $.extend( {}, this.userParams, params );
+                       this.reset();
+               }
+       };
+
+       /**
+        * Reset the provider
+        */
+       mw.widgets.APIResultsProvider.prototype.reset = function () {
+               // Reset offset
+               this.setOffset( 0 );
+               // Reset depleted status
+               this.toggleDepleted( false );
+       };
+
+       /**
+        * Get fetch limit or 'page' size. This is the number
+        * of results per request.
+        *
+        * @return {number} limit
+        */
+       mw.widgets.APIResultsProvider.prototype.getDefaultFetchLimit = function () {
+               return this.limit;
+       };
+
+       /**
+        * Set limit
+        *
+        * @param {number} limit Default number of results to fetch from the API
+        */
+       mw.widgets.APIResultsProvider.prototype.setDefaultFetchLimit = function ( limit ) {
+               this.limit = limit;
+       };
+
+       /**
+        * Get provider API language
+        *
+        * @return {string} Provider API language
+        */
+       mw.widgets.APIResultsProvider.prototype.getLang = function () {
+               return this.lang;
+       };
+
+       /**
+        * Set provider API language
+        *
+        * @param {string} lang Provider API language
+        */
+       mw.widgets.APIResultsProvider.prototype.setLang = function ( lang ) {
+               this.lang = lang;
+       };
+
+       /**
+        * Get result offset
+        *
+        * @return {number} Offset Results offset for the upcoming request
+        */
+       mw.widgets.APIResultsProvider.prototype.getOffset = function () {
+               return this.offset;
+       };
+
+       /**
+        * Set result offset
+        *
+        * @param {number} offset Results offset for the upcoming request
+        */
+       mw.widgets.APIResultsProvider.prototype.setOffset = function ( offset ) {
+               this.offset = offset;
+       };
+
+       /**
+        * Check whether the provider is depleted and has no more results
+        * to hand off.
+        *
+        * @return {boolean} The provider is depleted
+        */
+       mw.widgets.APIResultsProvider.prototype.isDepleted = function () {
+               return this.depleted;
+       };
+
+       /**
+        * Toggle depleted state
+        *
+        * @param {boolean} isDepleted The provider is depleted
+        */
+       mw.widgets.APIResultsProvider.prototype.toggleDepleted = function ( isDepleted ) {
+               this.depleted = isDepleted !== undefined ? isDepleted : !this.depleted;
+       };
+
+       /**
+        * Get the default ajax settings
+        *
+        * @return {Object} Ajax settings
+        */
+       mw.widgets.APIResultsProvider.prototype.getAjaxSettings = function () {
+               return this.ajaxSettings;
+       };
+
+       /**
+        * Get the default ajax settings
+        *
+        * @param {Object} settings Ajax settings
+        */
+       mw.widgets.APIResultsProvider.prototype.setAjaxSettings = function ( settings ) {
+               this.ajaxSettings = settings;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.APIResultsQueue.js
new file mode 100644 (file)
index 0000000..3bc1d51
--- /dev/null
@@ -0,0 +1,224 @@
+/*!
+ * MediaWiki Widgets - APIResultsQueue class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see http://ve.mit-license.org
+ */
+( function ( $, mw ) {
+
+       /**
+        * API Results Queue object.
+        *
+        * @class
+        * @mixins OO.EventEmitter
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @cfg {number} limit The default number of results to fetch
+        * @cfg {number} threshold The default number of extra results
+        *  that the queue should always strive to have on top of the
+        *  individual requests for items.
+        */
+       mw.widgets.APIResultsQueue = function MwWidgetsAPIResultsQueue( config ) {
+               config = config || {};
+
+               this.fileRepoPromise = null;
+               this.providers = [];
+               this.providerPromises = [];
+               this.queue = [];
+
+               this.params = {};
+
+               this.limit = config.limit || 20;
+               this.setThreshold( config.threshold || 10 );
+
+               // Mixin constructors
+               OO.EventEmitter.call( this );
+       };
+
+       /* Setup */
+       OO.mixinClass( mw.widgets.APIResultsQueue, OO.EventEmitter );
+
+       /* Methods */
+
+       /**
+        * Set up the queue and its resources.
+        * This should be overridden if there are any setup steps to perform.
+        *
+        * @return {jQuery.Promise} Promise that resolves when the resources
+        *  are set up. Note: The promise must have an .abort() functionality.
+        */
+       mw.widgets.APIResultsQueue.prototype.setup = function () {
+               return $.Deferred().resolve().promise( { abort: $.noop } );
+       };
+
+       /**
+        * Get items from the queue
+        *
+        * @param {number} [howMany] How many items to retrieve. Defaults to the
+        *  default limit supplied on initialization.
+        * @return {jQuery.Promise} Promise that resolves into an array of items.
+        */
+       mw.widgets.APIResultsQueue.prototype.get = function ( howMany ) {
+               var fetchingPromise = null,
+                       me = this;
+
+               howMany = howMany || this.limit;
+
+               // Check if the queue has enough items
+               if ( this.queue.length < howMany + this.threshold ) {
+                       // Call for more results
+                       fetchingPromise = this.queryProviders( howMany + this.threshold )
+                               .then( function ( items ) {
+                                       // Add to the queue
+                                       me.queue = me.queue.concat.apply( me.queue, items );
+                               } );
+               }
+
+               return $.when( fetchingPromise )
+                       .then( function () {
+                               return me.queue.splice( 0, howMany );
+                       } );
+
+       };
+
+       /**
+        * Get results from all providers
+        *
+        * @param {number} [howMany] How many items to retrieve. Defaults to the
+        *  default limit supplied on initialization.
+        * @return {jQuery.Promise} Promise that is resolved into an array
+        *  of fetched items. Note: The promise must have an .abort() functionality.
+        */
+       mw.widgets.APIResultsQueue.prototype.queryProviders = function ( howMany ) {
+               var i, len,
+                       queue = this;
+
+               // Make sure there are resources set up
+               return this.setup()
+                       .then( function () {
+                               // Abort previous requests
+                               for ( i = 0, len = queue.providerPromises.length; i < len; i++ ) {
+                                       queue.providerPromises[ i ].abort();
+                               }
+                               queue.providerPromises = [];
+                               // Set up the query to all providers
+                               for ( i = 0, len = queue.providers.length; i < len; i++ ) {
+                                       if ( !queue.providers[ i ].isDepleted() ) {
+                                               queue.providerPromises.push(
+                                                       queue.providers[ i ].getResults( howMany )
+                                               );
+                                       }
+                               }
+
+                               return $.when.apply( $, queue.providerPromises )
+                                       .then( Array.prototype.concat.bind( [] ) );
+                       } );
+       };
+
+       /**
+        * Set the search query for all the providers.
+        *
+        * This also makes sure to abort any previous promises.
+        *
+        * @param {Object} params API search parameters
+        */
+       mw.widgets.APIResultsQueue.prototype.setParams = function ( params ) {
+               var i, len;
+               if ( !OO.compare( params, this.params, true ) ) {
+                       this.reset();
+                       this.params = $.extend( this.params, params );
+                       // Reset queue
+                       this.queue = [];
+                       // Reset promises
+                       for ( i = 0, len = this.providerPromises.length; i < len; i++ ) {
+                               this.providerPromises[ i ].abort();
+                       }
+                       // Change queries
+                       for ( i = 0, len = this.providers.length; i < len; i++ ) {
+                               this.providers[ i ].setUserParams( this.params );
+                       }
+               }
+       };
+
+       /**
+        * Reset the queue and all its providers
+        */
+       mw.widgets.APIResultsQueue.prototype.reset = function () {
+               var i, len;
+               // Reset queue
+               this.queue = [];
+               // Reset promises
+               for ( i = 0, len = this.providerPromises.length; i < len; i++ ) {
+                       this.providerPromises[ i ].abort();
+               }
+               // Change queries
+               for ( i = 0, len = this.providers.length; i < len; i++ ) {
+                       this.providers[ i ].reset();
+               }
+       };
+
+       /**
+        * Get the data parameters sent to the API
+        *
+        * @return {Object} params API search parameters
+        */
+       mw.widgets.APIResultsQueue.prototype.getParams = function () {
+               return this.params;
+       };
+
+       /**
+        * Set the providers
+        *
+        * @param {mw.widgets.APIResultsProvider[]} providers An array of providers
+        */
+       mw.widgets.APIResultsQueue.prototype.setProviders = function ( providers ) {
+               this.providers = providers;
+       };
+
+       /**
+        * Add a provider to the group
+        *
+        * @param {mw.widgets.APIResultsProvider} provider A provider object
+        */
+       mw.widgets.APIResultsQueue.prototype.addProvider = function ( provider ) {
+               this.providers.push( provider );
+       };
+
+       /**
+        * Set the providers
+        *
+        * @return {mw.widgets.APIResultsProvider[]} providers An array of providers
+        */
+       mw.widgets.APIResultsQueue.prototype.getProviders = function () {
+               return this.providers;
+       };
+
+       /**
+        * Get the queue size
+        *
+        * @return {number} Queue size
+        */
+       mw.widgets.APIResultsQueue.prototype.getQueueSize = function () {
+               return this.queue.length;
+       };
+
+       /**
+        * Set queue threshold
+        *
+        * @param {number} threshold Queue threshold, below which we will
+        *  request more items
+        */
+       mw.widgets.APIResultsQueue.prototype.setThreshold = function ( threshold ) {
+               this.threshold = threshold;
+       };
+
+       /**
+        * Get queue threshold
+        *
+        * @return {number} threshold Queue threshold, below which we will
+        *  request more items
+        */
+       mw.widgets.APIResultsQueue.prototype.getThreshold = function () {
+               return this.threshold;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceProvider.js
new file mode 100644 (file)
index 0000000..d767109
--- /dev/null
@@ -0,0 +1,322 @@
+/*!
+ * MediaWiki Widgets - MediaResourceProvider class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * MediaWiki media resource provider.
+        *
+        * @class
+        * @extends mw.widgets.APIResultsProvider
+        *
+        * @constructor
+        * @param {string} apiurl The API url
+        * @param {Object} [config] Configuration options
+        * @cfg {string} [scriptDirUrl] The url of the API script
+        */
+       mw.widgets.MediaResourceProvider = function MwWidgetsMediaResourceProvider( apiurl, config ) {
+               config = config || {};
+
+               // Parent constructor
+               mw.widgets.MediaResourceProvider.super.call( this, apiurl, config );
+
+               // Fetching configuration
+               this.scriptDirUrl = config.scriptDirUrl;
+               this.isLocal = config.local !== undefined;
+
+               if ( this.isLocal ) {
+                       this.setAPIurl( mw.util.wikiScript( 'api' ) );
+               } else {
+                       // If 'apiurl' is set, use that. Otherwise, build the url
+                       // from scriptDirUrl and /api.php suffix
+                       this.setAPIurl( this.getAPIurl() || ( this.scriptDirUrl + '/api.php' ) );
+               }
+
+               this.siteInfoPromise = null;
+               this.thumbSizes = [];
+               this.imageSizes = [];
+       };
+
+       /* Inheritance */
+       OO.inheritClass( mw.widgets.MediaResourceProvider, mw.widgets.APIResultsProvider );
+
+       /* Methods */
+
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.MediaResourceProvider.prototype.getStaticParams = function () {
+               return $.extend(
+                       {},
+                       // Parent method
+                       mw.widgets.MediaResourceProvider.super.prototype.getStaticParams.call( this ),
+                       {
+                               action: 'query',
+                               iiprop: 'dimensions|url|mediatype|extmetadata|timestamp|user',
+                               iiextmetadatalanguage: this.getLang(),
+                               prop: 'imageinfo'
+                       }
+               );
+       };
+
+       /**
+        * Initialize the source and get the site info.
+        *
+        * Connect to the api url and retrieve the siteinfo parameters
+        * that are required for fetching results.
+        *
+        * @return {jQuery.Promise} Promise that resolves when the class
+        * properties are set.
+        */
+       mw.widgets.MediaResourceProvider.prototype.loadSiteInfo = function () {
+               var provider = this;
+
+               if ( !this.siteInfoPromise ) {
+                       this.siteInfoPromise = new mw.Api().get( {
+                               action: 'query',
+                               meta: 'siteinfo'
+                       } )
+                               .then( function ( data ) {
+                                       provider.setImageSizes( data.query.general.imagelimits || [] );
+                                       provider.setThumbSizes( data.query.general.thumblimits || [] );
+                                       provider.setUserParams( {
+                                               // Standard width per resource
+                                               iiurlwidth: provider.getStandardWidth()
+                                       } );
+                               } );
+               }
+               return this.siteInfoPromise;
+       };
+
+       /**
+        * Override parent method and get results from the source
+        *
+        * @param {number} [howMany] The number of items to pull from the API
+        * @return {jQuery.Promise} Promise that is resolved into an array
+        * of available results, or is rejected if no results are available.
+        */
+       mw.widgets.MediaResourceProvider.prototype.getResults = function ( howMany ) {
+               var xhr,
+                       aborted = false,
+                       provider = this;
+
+               return this.loadSiteInfo()
+                       .then( function () {
+                               if ( aborted ) {
+                                       return $.Deferred().reject();
+                               }
+                               xhr = provider.fetchAPIresults( howMany );
+                               return xhr;
+                       } )
+                       .then(
+                               function ( results ) {
+                                       if ( !results || results.length === 0 ) {
+                                               provider.toggleDepleted( true );
+                                               return [];
+                                       }
+                                       return results;
+                               },
+                               // Process failed, return an empty promise
+                               function () {
+                                       provider.toggleDepleted( true );
+                                       return $.Deferred().resolve( [] );
+                               }
+                       )
+                       .promise( { abort: function () {
+                               aborted = true;
+                               if ( xhr ) {
+                                       xhr.abort();
+                               }
+                       } } );
+       };
+
+       /**
+        * Get continuation API data
+        *
+        * @param {number} howMany The number of results to retrieve
+        * @return {Object} API request data
+        */
+       mw.widgets.MediaResourceProvider.prototype.getContinueData = function () {
+               return {};
+       };
+
+       /**
+        * Set continuation data for the next page
+        *
+        * @param {Object} continueData Continuation data
+        */
+       mw.widgets.MediaResourceProvider.prototype.setContinue = function () {
+       };
+
+       /**
+        * Sort the results
+        *
+        * @param {Object[]} results API results
+        * @return {Object[]} Sorted results
+        */
+       mw.widgets.MediaResourceProvider.prototype.sort = function ( results ) {
+               return results;
+       };
+
+       /**
+        * Call the API for search results.
+        *
+        * @param {number} howMany The number of results to retrieve
+        * @return {jQuery.Promise} Promise that resolves with an array of objects that contain
+        *  the fetched data.
+        */
+       mw.widgets.MediaResourceProvider.prototype.fetchAPIresults = function ( howMany ) {
+               var xhr, api,
+                       provider = this;
+
+               if ( !this.isValid() ) {
+                       return $.Deferred().reject().promise( { abort: $.noop } );
+               }
+
+               api = this.isLocal ? new mw.Api() : new mw.ForeignApi( this.getAPIurl(), { anonymous: true } );
+               xhr = api.get( $.extend( {}, this.getStaticParams(), this.getUserParams(), this.getContinueData( howMany ) ) );
+               return xhr
+                       .then( function ( data ) {
+                               var page, newObj, raw,
+                                       results = [];
+
+                               if ( data.error ) {
+                                       provider.toggleDepleted( true );
+                                       return [];
+                               }
+
+                               if ( data.continue ) {
+                                       // Update the offset for next time
+                                       provider.setContinue( data.continue );
+                               } else {
+                                       // This is the last available set of results. Mark as depleted!
+                                       provider.toggleDepleted( true );
+                               }
+
+                               // If the source returned no results, it will not have a
+                               // query property
+                               if ( data.query ) {
+                                       raw = data.query.pages;
+                                       if ( raw ) {
+                                               // Strip away the page ids
+                                               for ( page in raw ) {
+                                                       if ( !raw[ page ].imageinfo ) {
+                                                               // The search may give us pages that belong to the File:
+                                                               // namespace but have no files in them, either because
+                                                               // they were deleted or imported wrongly, or just started
+                                                               // as pages. In that case, the response will not include
+                                                               // imageinfo. Skip those files.
+                                                               continue;
+                                                       }
+                                                       newObj = raw[ page ].imageinfo[ 0 ];
+                                                       newObj.title = raw[ page ].title;
+                                                       newObj.index = raw[ page ].index;
+                                                       results.push( newObj );
+                                               }
+                                       }
+                               }
+                               return provider.sort( results );
+                       } )
+                       .promise( { abort: xhr.abort } );
+       };
+
+       /**
+        * Set name
+        *
+        * @param {string} name
+        */
+       mw.widgets.MediaResourceProvider.prototype.setName = function ( name ) {
+               this.name = name;
+       };
+
+       /**
+        * Get name
+        *
+        * @return {string} name
+        */
+       mw.widgets.MediaResourceProvider.prototype.getName = function () {
+               return this.name;
+       };
+
+       /**
+        * Get standard width, based on the provider source's thumb sizes.
+        *
+        * @return {number|undefined} fetchWidth
+        */
+       mw.widgets.MediaResourceProvider.prototype.getStandardWidth = function () {
+               return ( this.thumbSizes && this.thumbSizes[ this.thumbSizes.length - 1 ] ) ||
+                       ( this.imageSizes && this.imageSizes[ 0 ] ) ||
+                       // Fall back on a number
+                       300;
+       };
+
+       /**
+        * Get prop
+        *
+        * @return {string} prop
+        */
+       mw.widgets.MediaResourceProvider.prototype.getFetchProp = function () {
+               return this.fetchProp;
+       };
+
+       /**
+        * Set prop
+        *
+        * @param {string} prop
+        */
+       mw.widgets.MediaResourceProvider.prototype.setFetchProp = function ( prop ) {
+               this.fetchProp = prop;
+       };
+
+       /**
+        * Set thumb sizes
+        *
+        * @param {number[]} sizes Available thumbnail sizes
+        */
+       mw.widgets.MediaResourceProvider.prototype.setThumbSizes = function ( sizes ) {
+               this.thumbSizes = sizes;
+       };
+
+       /**
+        * Set image sizes
+        *
+        * @param {number[]} sizes Available image sizes
+        */
+       mw.widgets.MediaResourceProvider.prototype.setImageSizes = function ( sizes ) {
+               this.imageSizes = sizes;
+       };
+
+       /**
+        * Get thumb sizes
+        *
+        * @return {number[]} sizes Available thumbnail sizes
+        */
+       mw.widgets.MediaResourceProvider.prototype.getThumbSizes = function () {
+               return this.thumbSizes;
+       };
+
+       /**
+        * Get image sizes
+        *
+        * @return {number[]} sizes Available image sizes
+        */
+       mw.widgets.MediaResourceProvider.prototype.getImageSizes = function () {
+               return this.imageSizes;
+       };
+
+       /**
+        * Check if this source is valid.
+        *
+        * @return {boolean} Source is valid
+        */
+       mw.widgets.MediaResourceProvider.prototype.isValid = function () {
+               return this.isLocal ||
+                       // If we don't have either 'apiurl' or 'scriptDirUrl'
+                       // the source is invalid, and we will skip it
+                       this.apiurl !== undefined ||
+                       this.scriptDirUrl !== undefined;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResourceQueue.js
new file mode 100644 (file)
index 0000000..34fa44b
--- /dev/null
@@ -0,0 +1,68 @@
+/*!
+ * MediaWiki Widgets - MediaResourceQueue class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * MediaWiki media resource queue.
+        *
+        * @class
+        * @extends mw.widgets.APIResultsQueue
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @cfg {number} maxHeight The maximum height of the media, used in the
+        *  search call to the API.
+        */
+       mw.widgets.MediaResourceQueue = function MwWidgetsMediaResourceQueue( config ) {
+               config = config || {};
+
+               // Parent constructor
+               mw.widgets.MediaResourceQueue.super.call( this, config );
+
+               this.maxHeight = config.maxHeight || 200;
+       };
+
+       /* Inheritance */
+       OO.inheritClass( mw.widgets.MediaResourceQueue, mw.widgets.APIResultsQueue );
+
+       /**
+        * Fetch the file repos.
+        *
+        * @return {jQuery.Promise} Promise that resolves when the resources are set up
+        */
+       mw.widgets.MediaResourceQueue.prototype.getFileRepos = function () {
+               var defaultSource = [ {
+                       url: mw.util.wikiScript( 'api' ),
+                       local: ''
+               } ];
+
+               if ( !this.fileRepoPromise ) {
+                       this.fileRepoPromise = new mw.Api().get( {
+                               action: 'query',
+                               meta: 'filerepoinfo'
+                       } ).then(
+                               function ( resp ) {
+                                       return resp.query && resp.query.repos || defaultSource;
+                               },
+                               function () {
+                                       return $.Deferred().resolve( defaultSource );
+                               }
+                       );
+               }
+
+               return this.fileRepoPromise;
+       };
+
+       /**
+        * Get image maximum height
+        *
+        * @return {string} Image max height
+        */
+       mw.widgets.MediaResourceQueue.prototype.getMaxHeight = function () {
+               return this.maxHeight;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.css b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.css
new file mode 100644 (file)
index 0000000..bc752b5
--- /dev/null
@@ -0,0 +1,89 @@
+/*!
+ * MediaWiki Widgets - MediaResultWidget styles.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.mw-widget-mediaResultWidget {
+       display: inline-block;
+       position: relative;
+       padding: 0;
+       margin: 2px;
+       overflow: hidden;
+       box-sizing: border-box;
+       text-align: center;
+}
+
+.mw-widget-mediaResultWidget-error {
+       background-color: #f3f3f3;
+}
+
+.mw-widget-mediaResultWidget-thumbnail {
+       opacity: 0;
+       display: inline-block;
+       /* stylelint-disable no-unsupported-browser-features */
+       -webkit-transition: opacity 400ms;
+       -moz-transition: opacity 400ms;
+       transition: opacity 400ms;
+       /* stylelint-enable no-unsupported-browser-features */
+}
+
+.mw-widget-mediaResultWidget-done .mw-widget-mediaResultWidget-thumbnail,
+.mw-widget-mediaResultWidget-error .mw-widget-mediaResultWidget-thumbnail {
+       opacity: 1;
+}
+
+.mw-widget-mediaResultWidget-crop {
+       background-size: cover; /* stylelint-disable-line no-unsupported-browser-features */
+       background-position: center center;
+}
+
+.mw-widget-mediaResultWidget-overlay {
+       position: absolute;
+       top: 0;
+       bottom: 0;
+       left: 0;
+       right: 0;
+       box-shadow: inset 0 0 0 1px #ccc;
+}
+
+.mw-widget-mediaResultWidget.oo-ui-optionWidget-highlighted,
+.mw-widget-mediaResultWidget.oo-ui-optionWidget-selected {
+       box-shadow: 0 0 0.3em #a7dcff, 0 0 0 #fff;
+}
+
+.mw-widget-mediaResultWidget-error .mw-widget-mediaResultWidget-thumbnail {
+       /* @embed */
+       background-image: url( broken-image.png );
+       background-size: auto; /* stylelint-disable-line no-unsupported-browser-features */
+       background-position: center center;
+       background-repeat: no-repeat;
+}
+
+.mw-widget-mediaResultWidget .mw-widget-mediaResultWidget-nameLabel {
+       position: absolute;
+       bottom: 0;
+       left: 0;
+       right: 0;
+       overflow: hidden;
+       padding: 0.5em;
+       color: #fff;
+       text-shadow: 1px 1px #000; /* stylelint-disable-line no-unsupported-browser-features */
+       line-height: 1.125em;
+       background-color: rgba( 0, 0, 0, 0.5 );
+       text-overflow: ellipsis;
+       text-align: left;
+}
+
+.mw-widget-mediaResultWidget.oo-ui-optionWidget-highlighted .mw-widget-mediaResultWidget-nameLabel {
+       background-color: rgba( 0, 0, 0, 0.75 );
+}
+
+.mw-widget-mediaResultWidget.oo-ui-optionWidget-selected .mw-widget-mediaResultWidget-nameLabel {
+       background-color: #000;
+}
+
+.mw-widget-mediaSearchWidget-noresults {
+       padding-top: 1em;
+}
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js
new file mode 100644 (file)
index 0000000..7607e84
--- /dev/null
@@ -0,0 +1,274 @@
+/*!
+ * MediaWiki Widgets - MediaResultWidget class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * Creates an mw.widgets.MediaResultWidget object.
+        *
+        * @class
+        * @extends OO.ui.OptionWidget
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @cfg {number} [rowHeight] Height of the row this result is part of
+        * @cfg {number} [maxRowWidth] A limit for the width of the row this
+        *  result is a part of.
+        * @cfg {number} [minWidth] Minimum width for the result
+        * @cfg {number} [maxWidth] Maximum width for the result
+        */
+       mw.widgets.MediaResultWidget = function MwWidgetsMediaResultWidget( config ) {
+               // Configuration initialization
+               config = config || {};
+
+               // Parent constructor
+               mw.widgets.MediaResultWidget.super.call( this, config );
+
+               // Properties
+               this.setRowHeight( config.rowHeight || 150 );
+               this.maxRowWidth = config.maxRowWidth || 500;
+               this.minWidth = config.minWidth || this.maxRowWidth / 5;
+               this.maxWidth = config.maxWidth || this.maxRowWidth * 2 / 3;
+
+               this.imageDimensions = {};
+
+               this.isAudio = this.data.mediatype === 'AUDIO';
+
+               // Store the thumbnail url
+               this.thumbUrl = this.data.thumburl;
+               this.src = null;
+               this.row = null;
+
+               this.$thumb = $( '<img>' )
+                       .addClass( 'mw-widget-mediaResultWidget-thumbnail' )
+                       .on( {
+                               load: this.onThumbnailLoad.bind( this ),
+                               error: this.onThumbnailError.bind( this )
+                       } );
+               this.$overlay = $( '<div>' )
+                       .addClass( 'mw-widget-mediaResultWidget-overlay' );
+
+               this.calculateSizing( this.data );
+
+               // Get wiki default thumbnail size
+               this.defaultThumbSize = mw.config.get( 'wgVisualEditorConfig' )
+                       .defaultUserOptions.defaultthumbsize;
+
+               // Initialization
+               this.setLabel( new mw.Title( this.data.title ).getNameText() );
+               this.$label.addClass( 'mw-widget-mediaResultWidget-nameLabel' );
+
+               this.$element
+                       .addClass( 'mw-widget-mediaResultWidget ve-ui-texture-pending' )
+                       .prepend( this.$thumb, this.$overlay );
+       };
+
+       /* Inheritance */
+
+       OO.inheritClass( mw.widgets.MediaResultWidget, OO.ui.OptionWidget );
+
+       /* Static methods */
+
+       // Copied from ve.dm.MWImageNode
+       mw.widgets.MediaResultWidget.static.resizeToBoundingBox = function ( imageDimensions, boundingBox ) {
+               var newDimensions = OO.copy( imageDimensions ),
+                       scale = Math.min(
+                               boundingBox.height / imageDimensions.height,
+                               boundingBox.width / imageDimensions.width
+                       );
+
+               if ( scale < 1 ) {
+                       // Scale down
+                       newDimensions = {
+                               width: Math.floor( newDimensions.width * scale ),
+                               height: Math.floor( newDimensions.height * scale )
+                       };
+               }
+               return newDimensions;
+       };
+
+       /* Methods */
+       /** */
+       mw.widgets.MediaResultWidget.prototype.onThumbnailLoad = function () {
+               this.$thumb.first().addClass( 've-ui-texture-transparency' );
+               this.$element
+                       .addClass( 'mw-widget-mediaResultWidget-done' )
+                       .removeClass( 've-ui-texture-pending' );
+       };
+
+       /** */
+       mw.widgets.MediaResultWidget.prototype.onThumbnailError = function () {
+               this.$thumb.last()
+                       .css( 'background-image', '' )
+                       .addClass( 've-ui-texture-alert' );
+               this.$element
+                       .addClass( 'mw-widget-mediaResultWidget-error' )
+                       .removeClass( 've-ui-texture-pending' );
+       };
+
+       /**
+        * Resize the thumbnail and wrapper according to row height and bounding boxes, if given.
+        *
+        * @param {Object} originalDimensions Original image dimensions with width and height values
+        * @param {Object} [boundingBox] Specific bounding box, if supplied
+        */
+       mw.widgets.MediaResultWidget.prototype.calculateSizing = function ( originalDimensions, boundingBox ) {
+               var wrapperPadding,
+                       imageDimensions = {};
+
+               boundingBox = boundingBox || {};
+
+               if ( this.isAudio ) {
+                       // HACK: We are getting the wrong information from the
+                       // API about audio files. Set their thumbnail to square 120px
+                       imageDimensions = {
+                               width: 120,
+                               height: 120
+                       };
+               } else {
+                       // Get the image within the bounding box
+                       imageDimensions = this.constructor.static.resizeToBoundingBox(
+                               // Image original dimensions
+                               {
+                                       width: originalDimensions.width || originalDimensions.thumbwidth,
+                                       height: originalDimensions.height || originalDimensions.thumbwidth
+                               },
+                               // Bounding box
+                               {
+                                       width: boundingBox.width || this.getImageMaxWidth(),
+                                       height: boundingBox.height || this.getRowHeight()
+                               }
+                       );
+               }
+               this.imageDimensions = imageDimensions;
+               // Set the thumbnail size
+               this.$thumb.css( this.imageDimensions );
+
+               // Set the box size
+               wrapperPadding = this.calculateWrapperPadding( this.imageDimensions );
+               this.$element.css( wrapperPadding );
+       };
+
+       /**
+        * Replace the empty .src attribute of the image with the
+        * actual src.
+        */
+       mw.widgets.MediaResultWidget.prototype.lazyLoad = function () {
+               if ( !this.hasSrc() ) {
+                       this.src = this.thumbUrl;
+                       this.$thumb.attr( 'src', this.thumbUrl );
+               }
+       };
+
+       /**
+        * Retrieve the store dimensions object
+        *
+        * @return {Object} Thumb dimensions
+        */
+       mw.widgets.MediaResultWidget.prototype.getDimensions = function () {
+               return this.dimensions;
+       };
+
+       /**
+        * Resize thumbnail and element according to the resize factor
+        *
+        * @param {number} resizeFactor The resizing factor for the image
+        */
+       mw.widgets.MediaResultWidget.prototype.resizeThumb = function ( resizeFactor ) {
+               var boundingBox,
+                       imageOriginalWidth = this.imageDimensions.width,
+                       wrapperWidth = this.$element.width();
+               // Set the new row height
+               this.setRowHeight( Math.ceil( this.getRowHeight() * resizeFactor ) );
+
+               boundingBox = {
+                       width: Math.ceil( this.imageDimensions.width * resizeFactor ),
+                       height: this.getRowHeight()
+               };
+
+               this.calculateSizing( this.data, boundingBox );
+
+               // We need to adjust the wrapper this time to fit the "perfect"
+               // dimensions, regardless of how small the image is
+               if ( imageOriginalWidth < wrapperWidth ) {
+                       boundingBox.width = wrapperWidth * resizeFactor;
+               }
+               this.$element.css( this.calculateWrapperPadding( boundingBox ) );
+       };
+
+       /**
+        * Adjust the wrapper padding for small images
+        *
+        * @param {Object} thumbDimensions Thumbnail dimensions
+        * @return {Object} Css styling for the wrapper
+        */
+       mw.widgets.MediaResultWidget.prototype.calculateWrapperPadding = function ( thumbDimensions ) {
+               var css = {
+                       height: this.rowHeight,
+                       width: thumbDimensions.width,
+                       lineHeight: this.getRowHeight() + 'px'
+               };
+
+               // Check if the image is too thin so we can make a bit of space around it
+               if ( thumbDimensions.width < this.minWidth ) {
+                       css.width = this.minWidth;
+               }
+
+               return css;
+       };
+
+       /**
+        * Set the row height for all size calculations
+        *
+        * @return {number} rowHeight Row height
+        */
+       mw.widgets.MediaResultWidget.prototype.getRowHeight = function () {
+               return this.rowHeight;
+       };
+
+       /**
+        * Set the row height for all size calculations
+        *
+        * @param {number} rowHeight Row height
+        */
+       mw.widgets.MediaResultWidget.prototype.setRowHeight = function ( rowHeight ) {
+               this.rowHeight = rowHeight;
+       };
+
+       mw.widgets.MediaResultWidget.prototype.setImageMaxWidth = function ( width ) {
+               this.maxWidth = width;
+       };
+       mw.widgets.MediaResultWidget.prototype.getImageMaxWidth = function () {
+               return this.maxWidth;
+       };
+
+       /**
+        * Set the row this result is in.
+        *
+        * @param {number} row Row number
+        */
+       mw.widgets.MediaResultWidget.prototype.setRow = function ( row ) {
+               this.row = row;
+       };
+
+       /**
+        * Get the row this result is in.
+        *
+        * @return {number} row Row number
+        */
+       mw.widgets.MediaResultWidget.prototype.getRow = function () {
+               return this.row;
+       };
+
+       /**
+        * Check if the image has a src attribute already
+        *
+        * @return {boolean} Thumbnail has its source attribute set
+        */
+       mw.widgets.MediaResultWidget.prototype.hasSrc = function () {
+               return !!this.src;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js
new file mode 100644 (file)
index 0000000..a46d911
--- /dev/null
@@ -0,0 +1,69 @@
+/*!
+ * MediaWiki Widgets - MediaSearchProvider class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * MediaWiki media search provider.
+        *
+        * @class
+        * @extends mw.widgets.MediaResourceProvider
+        *
+        * @constructor
+        * @param {string} apiurl The API url
+        * @param {Object} [config] Configuration options
+        */
+       mw.widgets.MediaSearchProvider = function MwWidgetsMediaSearchProvider( apiurl, config ) {
+               config = config || {};
+
+               config.staticParams = $.extend( {
+                       generator: 'search',
+                       gsrnamespace: mw.config.get( 'wgNamespaceIds' ).file
+               }, config.staticParams );
+
+               // Parent constructor
+               mw.widgets.MediaSearchProvider.super.call( this, apiurl, config );
+       };
+
+       /* Inheritance */
+       OO.inheritClass( mw.widgets.MediaSearchProvider, mw.widgets.MediaResourceProvider );
+
+       /* Methods */
+
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.MediaSearchProvider.prototype.getContinueData = function ( howMany ) {
+               return {
+                       gsroffset: this.getOffset(),
+                       gsrlimit: howMany || this.getDefaultFetchLimit()
+               };
+       };
+
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.MediaSearchProvider.prototype.setContinue = function ( continueData ) {
+               // Update the offset for next time
+               this.setOffset( continueData.gsroffset );
+       };
+
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.MediaSearchProvider.prototype.sort = function ( results ) {
+               return results.sort( function ( a, b ) {
+                       return a.index - b.index;
+               } );
+       };
+
+       /**
+        * @inheritdoc
+        */
+       mw.widgets.MediaSearchProvider.prototype.isValid = function () {
+               return this.getUserParams().gsrsearch && mw.widgets.MediaSearchProvider.super.prototype.isValid.call( this );
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js
new file mode 100644 (file)
index 0000000..7ee98bb
--- /dev/null
@@ -0,0 +1,82 @@
+/*!
+ * MediaWiki Widgets - MediaSearchQueue class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * MediaWiki media resource queue.
+        *
+        * @class
+        * @extends mw.widgets.MediaResourceQueue
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @cfg {number} maxHeight The maximum height of the media, used in the
+        *  search call to the API.
+        */
+       mw.widgets.MediaSearchQueue = function MwWidgetsMediaSearchQueue( config ) {
+               config = config || {};
+
+               // Parent constructor
+               mw.widgets.MediaSearchQueue.super.call( this, config );
+
+               this.searchQuery = '';
+       };
+
+       /* Inheritance */
+       OO.inheritClass( mw.widgets.MediaSearchQueue, mw.widgets.MediaResourceQueue );
+
+       /**
+        * Override parent method to set up the providers according to
+        * the file repos
+        *
+        * @return {jQuery.Promise} Promise that resolves when the resources are set up
+        */
+       mw.widgets.MediaSearchQueue.prototype.setup = function () {
+               var i, len,
+                       queue = this;
+
+               return this.getFileRepos().then( function ( sources ) {
+                       if ( queue.providers.length === 0 ) {
+                               // Set up the providers
+                               for ( i = 0, len = sources.length; i < len; i++ ) {
+                                       queue.providers.push( new mw.widgets.MediaSearchProvider(
+                                               sources[ i ].apiurl,
+                                               {
+                                                       name: sources[ i ].name,
+                                                       local: sources[ i ].local,
+                                                       scriptDirUrl: sources[ i ].scriptDirUrl,
+                                                       userParams: {
+                                                               gsrsearch: queue.getSearchQuery()
+                                                       },
+                                                       staticParams: {
+                                                               iiurlheight: queue.getMaxHeight()
+                                                       }
+                                               } )
+                                       );
+                               }
+                       }
+               } );
+       };
+
+       /**
+        * Set the search query
+        *
+        * @param {string} searchQuery API search query
+        */
+       mw.widgets.MediaSearchQueue.prototype.setSearchQuery = function ( searchQuery ) {
+               this.setParams( { gsrsearch: searchQuery } );
+       };
+
+       /**
+        * Get the search query
+        *
+        * @return {string} API search query
+        */
+       mw.widgets.MediaSearchQueue.prototype.getSearchQuery = function () {
+               return this.getParams().gsrsearch;
+       };
+}( jQuery, mediaWiki ) );
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.css b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.css
new file mode 100644 (file)
index 0000000..3d28ef8
--- /dev/null
@@ -0,0 +1,10 @@
+/*!
+ * MediaWiki Widgets - MediaSearchWidget styles.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+.mw-widget-mediaSearchWidget .oo-ui-searchWidget-query .oo-ui-inputWidget {
+       max-width: none;
+}
diff --git a/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js b/resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
new file mode 100644 (file)
index 0000000..c6938e8
--- /dev/null
@@ -0,0 +1,462 @@
+/*!
+ * MediaWiki Widgets - MediaSearchWidget class.
+ *
+ * @copyright 2011-2016 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+( function ( $, mw ) {
+
+       /**
+        * Creates an mw.widgets.MediaSearchWidget object.
+        *
+        * @class
+        * @extends OO.ui.SearchWidget
+        *
+        * @constructor
+        * @param {Object} [config] Configuration options
+        * @param {number} [size] Vertical size of thumbnails
+        */
+       mw.widgets.MediaSearchWidget = function MwWidgetsMediaSearchWidget( config ) {
+               // Configuration initialization
+               config = $.extend( {
+                       placeholder: mw.msg( 'mw-widgets-mediasearch-input-placeholder' )
+               }, config );
+
+               // Parent constructor
+               mw.widgets.MediaSearchWidget.super.call( this, config );
+
+               // Properties
+               this.providers = {};
+               this.lastQueryValue = '';
+               this.searchQueue = new mw.widgets.MediaSearchQueue( {
+                       limit: this.constructor.static.limit,
+                       threshold: this.constructor.static.threshold
+               } );
+
+               this.queryTimeout = null;
+               this.itemCache = {};
+               this.promises = [];
+               this.lang = config.lang || 'en';
+               this.$panels = config.$panels;
+
+               this.externalLinkUrlProtocolsRegExp = new RegExp(
+                       '^(' + mw.config.get( 'wgUrlProtocols' ) + ')',
+                       'i'
+               );
+
+               // Masonry fit properties
+               this.rows = [];
+               this.rowHeight = config.rowHeight || 200;
+               this.layoutQueue = [];
+               this.numItems = 0;
+               this.currentItemCache = [];
+
+               this.resultsSize = {};
+
+               this.selected = null;
+
+               this.noItemsMessage = new OO.ui.LabelWidget( {
+                       label: mw.msg( 'mw-widgets-mediasearch-noresults' ),
+                       classes: [ 'mw-widget-mediaSearchWidget-noresults' ]
+               } );
+               this.noItemsMessage.toggle( false );
+
+               // Events
+               this.$results.on( 'scroll', this.onResultsScroll.bind( this ) );
+               this.$query.append( this.noItemsMessage.$element );
+               this.results.connect( this, {
+                       add: 'onResultsAdd',
+                       remove: 'onResultsRemove'
+               } );
+
+               this.resizeHandler = OO.ui.debounce( this.afterResultsResize.bind( this ), 500 );
+
+               // Initialization
+               this.$element.addClass( 'mw-widget-mediaSearchWidget' );
+       };
+
+       /* Inheritance */
+
+       OO.inheritClass( mw.widgets.MediaSearchWidget, OO.ui.SearchWidget );
+
+       /* Static properties */
+
+       mw.widgets.MediaSearchWidget.static.limit = 10;
+
+       mw.widgets.MediaSearchWidget.static.threshold = 5;
+
+       /* Methods */
+
+       /**
+        * Respond to window resize and check if the result display should
+        * be updated.
+        */
+       mw.widgets.MediaSearchWidget.prototype.afterResultsResize = function () {
+               var items = this.currentItemCache;
+
+               if (
+                       items.length > 0 &&
+                       (
+                               this.resultsSize.width !== this.$results.width() ||
+                               this.resultsSize.height !== this.$results.height()
+                       )
+               ) {
+                       this.resetRows();
+                       this.itemCache = {};
+                       this.processQueueResults( items );
+                       if ( this.results.getItems().length > 0 ) {
+                               this.lazyLoadResults();
+                       }
+
+                       // Cache the size
+                       this.resultsSize = {
+                               width: this.$results.width(),
+                               height: this.$results.height()
+                       };
+               }
+       };
+
+       /**
+        * Teardown the widget; disconnect the window resize event.
+        */
+       mw.widgets.MediaSearchWidget.prototype.teardown = function () {
+               $( window ).off( 'resize', this.resizeHandler );
+       };
+
+       /**
+        * Setup the widget; activate the resize event.
+        */
+       mw.widgets.MediaSearchWidget.prototype.setup = function () {
+               $( window ).on( 'resize', this.resizeHandler );
+       };
+
+       /**
+        * Query all sources for media.
+        *
+        * @method
+        */
+       mw.widgets.MediaSearchWidget.prototype.queryMediaQueue = function () {
+               var search = this,
+                       value = this.getQueryValue();
+
+               if ( value === '' ) {
+                       return;
+               }
+
+               this.query.pushPending();
+               search.noItemsMessage.toggle( false );
+
+               this.searchQueue.setSearchQuery( value );
+               this.searchQueue.get( this.constructor.static.limit )
+                       .then( function ( items ) {
+                               if ( items.length > 0 ) {
+                                       search.processQueueResults( items );
+                                       search.currentItemCache = search.currentItemCache.concat( items );
+                               }
+
+                               search.query.popPending();
+                               search.noItemsMessage.toggle( search.results.getItems().length === 0 );
+                               if ( search.results.getItems().length > 0 ) {
+                                       search.lazyLoadResults();
+                               }
+
+                       } );
+       };
+
+       /**
+        * Process the media queue giving more items
+        *
+        * @method
+        * @param {Object[]} items Given items by the media queue
+        */
+       mw.widgets.MediaSearchWidget.prototype.processQueueResults = function ( items ) {
+               var i, len, title,
+                       resultWidgets = [],
+                       inputSearchQuery = this.getQueryValue(),
+                       queueSearchQuery = this.searchQueue.getSearchQuery();
+
+               if ( inputSearchQuery === '' || queueSearchQuery !== inputSearchQuery ) {
+                       return;
+               }
+
+               for ( i = 0, len = items.length; i < len; i++ ) {
+                       title = new mw.Title( items[ i ].title ).getMainText();
+                       // Do not insert duplicates
+                       if ( !Object.prototype.hasOwnProperty.call( this.itemCache, title ) ) {
+                               this.itemCache[ title ] = true;
+                               resultWidgets.push(
+                                       new mw.widgets.MediaResultWidget( {
+                                               data: items[ i ],
+                                               rowHeight: this.rowHeight,
+                                               maxWidth: this.results.$element.width() / 3,
+                                               minWidth: 30,
+                                               rowWidth: this.results.$element.width()
+                                       } )
+                               );
+                       }
+               }
+               this.results.addItems( resultWidgets );
+
+       };
+
+       /**
+        * Get the sanitized query value from the input
+        *
+        * @return {string} Query value
+        */
+       mw.widgets.MediaSearchWidget.prototype.getQueryValue = function () {
+               var queryValue = this.query.getValue().trim();
+
+               if ( queryValue.match( this.externalLinkUrlProtocolsRegExp ) ) {
+                       queryValue = queryValue.match( /.+\/([^\/]+)/ )[ 1 ];
+               }
+               return queryValue;
+       };
+
+       /**
+        * Handle search value change
+        *
+        * @param {string} value New value
+        */
+       mw.widgets.MediaSearchWidget.prototype.onQueryChange = function () {
+               // Get the sanitized query value
+               var queryValue = this.getQueryValue();
+
+               if ( queryValue === this.lastQueryValue ) {
+                       return;
+               }
+
+               // Parent method
+               mw.widgets.MediaSearchWidget.super.prototype.onQueryChange.apply( this, arguments );
+
+               // Reset
+               this.itemCache = {};
+               this.currentItemCache = [];
+               this.resetRows();
+
+               // Empty the results queue
+               this.layoutQueue = [];
+
+               // Change resource queue query
+               this.searchQueue.setSearchQuery( queryValue );
+               this.lastQueryValue = queryValue;
+
+               // Queue
+               clearTimeout( this.queryTimeout );
+               this.queryTimeout = setTimeout( this.queryMediaQueue.bind( this ), 350 );
+       };
+
+       /**
+        * Handle results scroll events.
+        *
+        * @param {jQuery.Event} e Scroll event
+        */
+       mw.widgets.MediaSearchWidget.prototype.onResultsScroll = function () {
+               var position = this.$results.scrollTop() + this.$results.outerHeight(),
+                       threshold = this.results.$element.outerHeight() - this.rowHeight * 3;
+
+               // Check if we need to ask for more results
+               if ( !this.query.isPending() && position > threshold ) {
+                       this.queryMediaQueue();
+               }
+
+               this.lazyLoadResults();
+       };
+
+       /**
+        * Lazy-load the images that are visible.
+        */
+       mw.widgets.MediaSearchWidget.prototype.lazyLoadResults = function () {
+               var i, elementTop,
+                       items = this.results.getItems(),
+                       resultsScrollTop = this.$results.scrollTop(),
+                       position = resultsScrollTop + this.$results.outerHeight();
+
+               // Lazy-load results
+               for ( i = 0; i < items.length; i++ ) {
+                       elementTop = items[ i ].$element.position().top;
+                       if ( elementTop <= position && !items[ i ].hasSrc() ) {
+                               // Load the image
+                               items[ i ].lazyLoad();
+                       }
+               }
+       };
+
+       /**
+        * Reset all the rows; destroy the jQuery elements and reset
+        * the rows array.
+        */
+       mw.widgets.MediaSearchWidget.prototype.resetRows = function () {
+               var i, len;
+
+               for ( i = 0, len = this.rows.length; i < len; i++ ) {
+                       this.rows[ i ].$element.remove();
+               }
+
+               this.rows = [];
+               this.itemCache = {};
+       };
+
+       /**
+        * Find an available row at the end. Either we will need to create a new
+        * row or use the last available row if it isn't full.
+        *
+        * @return {number} Row index
+        */
+       mw.widgets.MediaSearchWidget.prototype.getAvailableRow = function () {
+               var row;
+
+               if ( this.rows.length === 0 ) {
+                       row = 0;
+               } else {
+                       row = this.rows.length - 1;
+               }
+
+               if ( !this.rows[ row ] ) {
+                       // Create new row
+                       this.rows[ row ] = {
+                               isFull: false,
+                               width: 0,
+                               items: [],
+                               $element: $( '<div>' )
+                                       .addClass( 'mw-widget-mediaResultWidget-row' )
+                                       .css( {
+                                               overflow: 'hidden'
+                                       } )
+                                       .data( 'row', row )
+                                       .attr( 'data-full', false )
+                       };
+                       // Append to results
+                       this.results.$element.append( this.rows[ row ].$element );
+               } else if ( this.rows[ row ].isFull ) {
+                       row++;
+                       // Create new row
+                       this.rows[ row ] = {
+                               isFull: false,
+                               width: 0,
+                               items: [],
+                               $element: $( '<div>' )
+                                       .addClass( 'mw-widget-mediaResultWidget-row' )
+                                       .css( {
+                                               overflow: 'hidden'
+                                       } )
+                                       .data( 'row', row )
+                                       .attr( 'data-full', false )
+                       };
+                       // Append to results
+                       this.results.$element.append( this.rows[ row ].$element );
+               }
+
+               return row;
+       };
+
+       /**
+        * Respond to add results event in the results widget.
+        * Override the way SelectWidget and GroupElement append the items
+        * into the group so we can append them in groups of rows.
+        *
+        * @param {mw.widgets.MediaResultWidget[]} items An array of item elements
+        */
+       mw.widgets.MediaSearchWidget.prototype.onResultsAdd = function ( items ) {
+               var search = this;
+
+               // Add method to a queue; this queue will only run when the widget
+               // is visible
+               this.layoutQueue.push( function () {
+                       var i, j, ilen, jlen, itemWidth, row, effectiveWidth,
+                               resizeFactor,
+                               maxRowWidth = search.results.$element.width() - 15;
+
+                       // Go over the added items
+                       row = search.getAvailableRow();
+                       for ( i = 0, ilen = items.length; i < ilen; i++ ) {
+                               itemWidth = items[ i ].$element.outerWidth( true );
+
+                               // Add items to row until it is full
+                               if ( search.rows[ row ].width + itemWidth >= maxRowWidth ) {
+                                       // Mark this row as full
+                                       search.rows[ row ].isFull = true;
+                                       search.rows[ row ].$element.attr( 'data-full', true );
+
+                                       // Find the resize factor
+                                       effectiveWidth = search.rows[ row ].width;
+                                       resizeFactor = maxRowWidth / effectiveWidth;
+
+                                       search.rows[ row ].$element.attr( 'data-effectiveWidth', effectiveWidth );
+                                       search.rows[ row ].$element.attr( 'data-resizeFactor', resizeFactor );
+                                       search.rows[ row ].$element.attr( 'data-row', row );
+
+                                       // Resize all images in the row to fit the width
+                                       for ( j = 0, jlen = search.rows[ row ].items.length; j < jlen; j++ ) {
+                                               search.rows[ row ].items[ j ].resizeThumb( resizeFactor );
+                                       }
+
+                                       // find another row
+                                       row = search.getAvailableRow();
+                               }
+
+                               // Add the cumulative
+                               search.rows[ row ].width += itemWidth;
+
+                               // Store reference to the item and to the row
+                               search.rows[ row ].items.push( items[ i ] );
+                               items[ i ].setRow( row );
+
+                               // Append the item
+                               search.rows[ row ].$element.append( items[ i ].$element );
+                       }
+
+                       // If we have less than 4 rows, call for more images
+                       if ( search.rows.length < 4 ) {
+                               search.queryMediaQueue();
+                       }
+               } );
+               this.runLayoutQueue();
+       };
+
+       /**
+        * Run layout methods from the queue only if the element is visible.
+        */
+       mw.widgets.MediaSearchWidget.prototype.runLayoutQueue = function () {
+               var i, len;
+
+               if ( this.$element.is( ':visible' ) ) {
+                       for ( i = 0, len = this.layoutQueue.length; i < len; i++ ) {
+                               this.layoutQueue.pop()();
+                       }
+               }
+       };
+
+       /**
+        * Respond to removing results event in the results widget.
+        * Clear the relevant rows.
+        *
+        * @param {OO.ui.OptionWidget[]} items Removed items
+        */
+       mw.widgets.MediaSearchWidget.prototype.onResultsRemove = function ( items ) {
+               if ( items.length > 0 ) {
+                       // In the case of the media search widget, if any items are removed
+                       // all are removed (new search)
+                       this.resetRows();
+                       this.currentItemCache = [];
+               }
+       };
+
+       /**
+        * Set language for the search results.
+        *
+        * @param {string} lang Language
+        */
+       mw.widgets.MediaSearchWidget.prototype.setLang = function ( lang ) {
+               this.lang = lang;
+       };
+
+       /**
+        * Get language for the search results.
+        *
+        * @return {string} lang Language
+        */
+       mw.widgets.MediaSearchWidget.prototype.getLang = function () {
+               return this.lang;
+       };
+}( jQuery, mediaWiki ) );
index 39bee7c..2ac75c5 100755 (executable)
@@ -78,7 +78,7 @@
         * @inheritdoc mw.widgets.TitleWidget
         */
        mw.widgets.SearchInputWidget.prototype.getSuggestionsPromise = function () {
-               var api = new mw.Api(),
+               var api = this.getApi(),
                        promise,
                        self = this;
 
index e1e50ea..0e5e0c5 100644 (file)
@@ -6,16 +6,6 @@
  */
 ( function ( $, mw ) {
 
-       var interwikiPrefixesPromise = new mw.Api().get( {
-               action: 'query',
-               meta: 'siteinfo',
-               siprop: 'interwikimap'
-       } ).then( function ( data ) {
-               return $.map( data.query.interwikimap, function ( interwiki ) {
-                       return interwiki.prefix;
-               } );
-       } );
-
        /**
         * Mixin for title widgets
         *
@@ -36,6 +26,7 @@
         * @cfg {boolean} [validateTitle=true] Whether the input must be a valid title (if set to true,
         *  the widget will marks itself red for invalid inputs, including an empty query).
         * @cfg {Object} [cache] Result cache which implements a 'set' method, taking keyed values as an argument
+        * @cfg {mw.Api} [api] API object to use, creates a default mw.Api instance if not specified
         */
        mw.widgets.TitleWidget = function MwWidgetsTitleWidget( config ) {
                // Config initialization
@@ -56,6 +47,7 @@
                this.excludeCurrentPage = !!config.excludeCurrentPage;
                this.validateTitle = config.validateTitle !== undefined ? config.validateTitle : true;
                this.cache = config.cache;
+               this.api = config.api || new mw.Api();
 
                // Initialization
                this.$element.addClass( 'mw-widget-titleWidget' );
 
        OO.initClass( mw.widgets.TitleWidget );
 
+       /* Static properties */
+
+       mw.widgets.TitleWidget.static.interwikiPrefixesPromiseCache = {};
+
        /* Methods */
 
        /**
                this.namespace = namespace;
        };
 
+       mw.widgets.TitleWidget.prototype.getInterwikiPrefixesPromise = function () {
+               var api = this.getApi(),
+                       cache = this.constructor.static.interwikiPrefixesPromiseCache,
+                       key = api.defaults.ajax.url;
+               if ( !cache.hasOwnProperty( key ) ) {
+                       cache[ key ] = api.get( {
+                               action: 'query',
+                               meta: 'siteinfo',
+                               siprop: 'interwikimap'
+                       } ).then( function ( data ) {
+                               return $.map( data.query.interwikimap, function ( interwiki ) {
+                                       return interwiki.prefix;
+                               } );
+                       } );
+               }
+               return cache[ key ];
+       };
+
        /**
         * Get a promise which resolves with an API repsonse for suggested
         * links for the current query.
         */
        mw.widgets.TitleWidget.prototype.getSuggestionsPromise = function () {
                var req,
+                       api = this.getApi(),
                        query = this.getQueryValue(),
                        widget = this,
                        promiseAbortObject = { abort: function () {
                        } };
 
                if ( mw.Title.newFromText( query ) ) {
-                       return interwikiPrefixesPromise.then( function ( interwikiPrefixes ) {
+                       return this.getInterwikiPrefixesPromise().then( function ( interwikiPrefixes ) {
                                var params,
                                        interwiki = query.substring( 0, query.indexOf( ':' ) );
                                if (
                                                params.prop.push( 'pageterms' );
                                                params.wbptterms = 'description';
                                        }
-                                       req = new mw.Api().get( params );
+                                       req = api.get( params );
                                        promiseAbortObject.abort = req.abort.bind( req ); // TODO ew
                                        return req.then( function ( ret ) {
                                                if ( ret.query === undefined ) {
-                                                       ret = new mw.Api().get( { action: 'query', titles: query } );
+                                                       ret = api.get( { action: 'query', titles: query } );
                                                        promiseAbortObject.abort = ret.abort.bind( ret );
                                                }
                                                return ret;
                }
        };
 
+       /**
+        * Get the API object for title requests
+        *
+        * @return {mw.Api} MediaWiki API
+        */
+       mw.widgets.TitleWidget.prototype.getApi = function () {
+               return this.api;
+       };
+
        /**
         * Get option widgets from the server response
         *
index b9e05c3..0c08ca4 100644 (file)
                                                        } );
                                                }
 
-                                               // Different error, pass on to let caller handle the error code
-                                               return this;
+                                               // Let caller handle the error code
+                                               return $.Deferred().rejectWith( this, arguments );
                                        }
                                );
                        } ).promise( { abort: function () {
                        promiseGroup = promises[ this.defaults.ajax.url ];
                        d = promiseGroup && promiseGroup[ type + 'Token' ];
 
+                       if ( !promiseGroup ) {
+                               promiseGroup = promises[ this.defaults.ajax.url ] = {};
+                       }
+
                        if ( !d ) {
                                apiPromise = this.get( {
                                        action: 'query',
                                                // Clear promise. Do not cache errors.
                                                delete promiseGroup[ type + 'Token' ];
 
-                                               // Pass on to allow the caller to handle the error
-                                               return this;
+                                               // Let caller handle the error code
+                                               return $.Deferred().rejectWith( this, arguments );
                                        } )
                                        // Attach abort handler
                                        .promise( { abort: apiPromise.abort } );
 
                                // Store deferred now so that we can use it again even if it isn't ready yet
-                               if ( !promiseGroup ) {
-                                       promiseGroup = promises[ this.defaults.ajax.url ] = {};
-                               }
                                promiseGroup[ type + 'Token' ] = d;
                        }
 
index a9d17ff..20f8efb 100644 (file)
@@ -1,65 +1,91 @@
 ( function ( mw ) {
        'use strict';
 
-       /**
-        * Library for storing device specific information. It should be used for storing simple
-        * strings and is not suitable for storing large chunks of data.
-        *
-        * @class mw.storage
-        * @singleton
-        */
-       mw.storage = {
-
-               localStorage: ( function () {
-                       // Catch exceptions to avoid fatal in Chrome's "Block data storage" mode
-                       // which throws when accessing the localStorage property itself, as opposed
-                       // to the standard behaviour of throwing on getItem/setItem. (T148998)
+       // Catch exceptions to avoid fatal in Chrome's "Block data storage" mode
+       // which throws when accessing the localStorage property itself, as opposed
+       // to the standard behaviour of throwing on getItem/setItem. (T148998)
+       var
+               localStorage = ( function () {
                        try {
                                return window.localStorage;
                        } catch ( e ) {}
                }() ),
-
-               /**
-                * Retrieve value from device storage.
-                *
-                * @param {string} key Key of item to retrieve
-                * @return {string|boolean} False when localStorage not available, otherwise string
-                */
-               get: function ( key ) {
+               sessionStorage = ( function () {
                        try {
-                               return mw.storage.localStorage.getItem( key );
+                               return window.sessionStorage;
                        } catch ( e ) {}
-                       return false;
-               },
+               }() );
 
-               /**
-                 * Set a value in device storage.
-                 *
-                 * @param {string} key Key name to store under
-                 * @param {string} value Value to be stored
-                 * @return {boolean} Whether the save succeeded or not
-                 */
-               set: function ( key, value ) {
-                       try {
-                               mw.storage.localStorage.setItem( key, value );
-                               return true;
-                       } catch ( e ) {}
-                       return false;
-               },
+       /**
+        * A wrapper for an HTML5 Storage interface (`localStorage` or `sessionStorage`)
+        * that is safe to call on all browsers.
+        *
+        * @class mw.SafeStorage
+        * @private
+        */
 
-               /**
-                 * Remove a value from device storage.
-                 *
-                 * @param {string} key Key of item to remove
-                 * @return {boolean} Whether the save succeeded or not
-                 */
-               remove: function ( key ) {
-                       try {
-                               mw.storage.localStorage.removeItem( key );
-                               return true;
-                       } catch ( e ) {}
-                       return false;
-               }
+       /**
+        * @ignore
+        * @param {Object|undefined} store The Storage instance to wrap around
+        */
+       function SafeStorage( store ) {
+               this.store = store;
+       }
+
+       /**
+        * Retrieve value from device storage.
+        *
+        * @param {string} key Key of item to retrieve
+        * @return {string|boolean} False when localStorage not available, otherwise string
+        */
+       SafeStorage.prototype.get = function ( key ) {
+               try {
+                       return this.store.getItem( key );
+               } catch ( e ) {}
+               return false;
+       };
+
+       /**
+         * Set a value in device storage.
+         *
+         * @param {string} key Key name to store under
+         * @param {string} value Value to be stored
+         * @return {boolean} Whether the save succeeded or not
+         */
+       SafeStorage.prototype.set = function ( key, value ) {
+               try {
+                       this.store.setItem( key, value );
+                       return true;
+               } catch ( e ) {}
+               return false;
+       };
+
+       /**
+         * Remove a value from device storage.
+         *
+         * @param {string} key Key of item to remove
+         * @return {boolean} Whether the save succeeded or not
+         */
+       SafeStorage.prototype.remove = function ( key ) {
+               try {
+                       this.store.removeItem( key );
+                       return true;
+               } catch ( e ) {}
+               return false;
        };
 
+       /**
+        * @class
+        * @singleton
+        * @extends mw.SafeStorage
+        */
+       mw.storage = new SafeStorage( localStorage );
+
+       /**
+        * @class
+        * @singleton
+        * @extends mw.SafeStorage
+        */
+       mw.storage.session = new SafeStorage( sessionStorage );
+
 }( mediaWiki ) );
index 474d541..b7a9132 100644 (file)
@@ -28,8 +28,8 @@ li.gallerycaption {
 
 li.gallerybox div.thumb {
        text-align: center;
-       border: 1px solid #ccc;
-       background-color: #f9f9f9;
+       border: 1px solid #c8ccd1;
+       background-color: #f8f9fa;
        margin: 2px;
 }
 
index 66df315..b67c9ab 100644 (file)
@@ -29,11 +29,13 @@ $wgAutoloadClasses += [
        # tests/common
        'TestSetup' => "$testDir/common/TestSetup.php",
 
+       # tests/integration
+       'MWHttpRequestTestCase' => "$testDir/integration/includes/http/MWHttpRequestTestCase.php",
+
        # tests/parser
        'DbTestPreviewer' => "$testDir/parser/DbTestPreviewer.php",
        'DbTestRecorder' => "$testDir/parser/DbTestRecorder.php",
        'DjVuSupport' => "$testDir/parser/DjVuSupport.php",
-       'TestRecorder' => "$testDir/parser/TestRecorder.php",
        'MultiTestRecorder' => "$testDir/parser/MultiTestRecorder.php",
        'ParserTestMockParser' => "$testDir/parser/ParserTestMockParser.php",
        'ParserTestRunner' => "$testDir/parser/ParserTestRunner.php",
diff --git a/tests/integration/includes/http/CurlHttpRequestTest.php b/tests/integration/includes/http/CurlHttpRequestTest.php
new file mode 100644 (file)
index 0000000..04f80f4
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+class CurlHttpRequestTest extends MWHttpRequestTestCase {
+       protected static $httpEngine = 'curl';
+}
diff --git a/tests/integration/includes/http/MWHttpRequestTestCase.php b/tests/integration/includes/http/MWHttpRequestTestCase.php
new file mode 100644 (file)
index 0000000..fb52de9
--- /dev/null
@@ -0,0 +1,208 @@
+<?php
+
+class MWHttpRequestTestCase extends PHPUnit_Framework_TestCase {
+       protected static $httpEngine;
+       protected $oldHttpEngine;
+
+       public function setUp() {
+               parent::setUp();
+               $this->oldHttpEngine = Http::$httpEngine;
+               Http::$httpEngine = static::$httpEngine;
+
+               try {
+                       $request = MWHttpRequest::factory( 'null:' );
+               } catch ( DomainException $e ) {
+                       $this->markTestSkipped( static::$httpEngine . ' engine not supported' );
+               }
+
+               if ( static::$httpEngine === 'php' ) {
+                       $this->assertInstanceOf( PhpHttpRequest::class, $request );
+               } else {
+                       $this->assertInstanceOf( CurlHttpRequest::class, $request );
+               }
+       }
+
+       public function tearDown() {
+               parent::tearDown();
+               Http::$httpEngine = $this->oldHttpEngine;
+       }
+
+       // --------------------
+
+       public function testIsRedirect() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/get' );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertFalse( $request->isRedirect() );
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/1' );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertTrue( $request->isRedirect() );
+       }
+
+       public function testgetFinalUrl() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3' );
+               if ( !$request->canFollowRedirects() ) {
+                       $this->markTestSkipped( 'cannot follow redirects' );
+               }
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertNotSame( 'http://httpbin.org/get', $request->getFinalUrl() );
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+                       => true ] );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertSame( 'http://httpbin.org/get', $request->getFinalUrl() );
+               $this->assertResponseFieldValue( 'url', 'http://httpbin.org/get', $request );
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+               => true ] );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertSame( 'http://httpbin.org/get', $request->getFinalUrl() );
+               $this->assertResponseFieldValue( 'url', 'http://httpbin.org/get', $request );
+
+               if ( static::$httpEngine === 'curl' ) {
+                       $this->markTestIncomplete( 'maxRedirects seems to be ignored by CurlHttpRequest' );
+                       return;
+               }
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/redirect/3', [ 'followRedirects'
+               => true, 'maxRedirects' => 1 ] );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertNotSame( 'http://httpbin.org/get', $request->getFinalUrl() );
+       }
+
+       public function testSetCookie() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies' );
+               $request->setCookie( 'foo', 'bar' );
+               $request->setCookie( 'foo2', 'bar2', [ 'domain' => 'example.com' ] );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertResponseFieldValue( 'cookies', [ 'foo' => 'bar' ], $request );
+       }
+
+       public function testSetCookieJar() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies' );
+               $cookieJar = new CookieJar();
+               $cookieJar->setCookie( 'foo', 'bar', [ 'domain' => 'httpbin.org' ] );
+               $cookieJar->setCookie( 'foo2', 'bar2', [ 'domain' => 'example.com' ] );
+               $request->setCookieJar( $cookieJar );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertResponseFieldValue( 'cookies', [ 'foo' => 'bar' ], $request );
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies/set?foo=bar' );
+               $cookieJar = new CookieJar();
+               $request->setCookieJar( $cookieJar );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertHasCookie( 'foo', 'bar', $request->getCookieJar() );
+
+               $this->markTestIncomplete( 'CookieJar does not handle deletion' );
+               return;
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/cookies/delete?foo' );
+               $cookieJar = new CookieJar();
+               $cookieJar->setCookie( 'foo', 'bar', [ 'domain' => 'httpbin.org' ] );
+               $cookieJar->setCookie( 'foo2', 'bar2', [ 'domain' => 'httpbin.org' ] );
+               $request->setCookieJar( $cookieJar );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertNotHasCookie( 'foo', $request->getCookieJar() );
+               $this->assertHasCookie( 'foo2', 'bar2', $request->getCookieJar() );
+       }
+
+       public function testGetResponseHeaders() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/response-headers?Foo=bar' );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $headers = array_change_key_case( $request->getResponseHeaders(), CASE_LOWER );
+               $this->assertArrayHasKey( 'foo', $headers );
+               $this->assertSame( $request->getResponseHeader( 'Foo' ), 'bar' );
+       }
+
+       public function testSetHeader() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/headers' );
+               $request->setHeader( 'Foo', 'bar' );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertResponseFieldValue( [ 'headers', 'Foo' ], 'bar', $request );
+       }
+
+       public function testGetStatus() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/status/418' );
+               $status = $request->execute();
+               $this->assertFalse( $status->isOK() );
+               $this->assertSame( $request->getStatus(), 418 );
+       }
+
+       public function testSetUserAgent() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/user-agent' );
+               $request->setUserAgent( 'foo' );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertResponseFieldValue( 'user-agent', 'foo', $request );
+       }
+
+       public function testSetData() {
+               $request = MWHttpRequest::factory( 'http://httpbin.org/post', [ 'method' => 'POST' ] );
+               $request->setData( [ 'foo' => 'bar', 'foo2' => 'bar2' ] );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $this->assertResponseFieldValue( 'form', [ 'foo' => 'bar', 'foo2' => 'bar2' ], $request );
+       }
+
+       public function testSetCallback() {
+               if ( static::$httpEngine === 'php' ) {
+                       $this->markTestIncomplete( 'PhpHttpRequest does not use setCallback()' );
+                       return;
+               }
+
+               $request = MWHttpRequest::factory( 'http://httpbin.org/ip' );
+               $data = '';
+               $request->setCallback( function ( $fh, $content ) use ( &$data ) {
+                       $data .= $content;
+                       return strlen( $content );
+               } );
+               $status = $request->execute();
+               $this->assertTrue( $status->isGood() );
+               $data = json_decode( $data, true );
+               $this->assertInternalType( 'array', $data );
+               $this->assertArrayHasKey( 'origin', $data );
+       }
+
+       // --------------------
+
+       protected function assertResponseFieldValue( $key, $expectedValue, MWHttpRequest $response ) {
+               $this->assertSame( 200, $response->getStatus(), 'response status is not 200' );
+               $data = json_decode( $response->getContent(), true );
+               $this->assertInternalType( 'array', $data, 'response is not JSON' );
+               $keyPath = '';
+               foreach ( (array)$key as $keySegment ) {
+                       $keyPath .= ( $keyPath ? '.' : '' ) . $keySegment;
+                       $this->assertArrayHasKey( $keySegment, $data, $keyPath . ' not found' );
+                       $data = $data[$keySegment];
+               }
+               $this->assertSame( $expectedValue, $data );
+       }
+
+       protected function assertHasCookie( $expectedName, $expectedValue, CookieJar $cookieJar ) {
+               $cookieJar = TestingAccessWrapper::newFromObject( $cookieJar );
+               $cookies = array_change_key_case( $cookieJar->cookie, CASE_LOWER );
+               $this->assertArrayHasKey( strtolower( $expectedName ), $cookies );
+               $cookie = TestingAccessWrapper::newFromObject(
+                       $cookies[strtolower( $expectedName )] );
+               $this->assertSame( $expectedValue, $cookie->value );
+       }
+
+       protected function assertNotHasCookie( $name, CookieJar $cookieJar ) {
+               $cookieJar = TestingAccessWrapper::newFromObject( $cookieJar );
+               $this->assertArrayNotHasKey( strtolower( $name ),
+                       array_change_key_case( $cookieJar->cookie, CASE_LOWER ) );
+       }
+}
+
diff --git a/tests/integration/includes/http/PhpHttpRequestTest.php b/tests/integration/includes/http/PhpHttpRequestTest.php
new file mode 100644 (file)
index 0000000..d0222a5
--- /dev/null
@@ -0,0 +1,5 @@
+<?php
+
+class PhpHttpRequestTest extends MWHttpRequestTestCase {
+       protected static $httpEngine = 'php';
+}
diff --git a/tests/phpunit/data/localisationcache/ba.json b/tests/phpunit/data/localisationcache/ba.json
new file mode 100644 (file)
index 0000000..59b8912
--- /dev/null
@@ -0,0 +1,3 @@
+{
+       "present-ba": "ba"
+}
index 27600cd..39cce86 100644 (file)
@@ -1,5 +1,5 @@
 {
-       "present-uk": "en",
+       "present-ba": "en",
        "present-ru": "en",
        "present-en": "en"
 }
index 79e1444..c9f89d3 100644 (file)
@@ -1,4 +1,4 @@
 {
-       "present-uk": "ru",
+       "present-ba": "ru",
        "present-ru": "ru"
 }
diff --git a/tests/phpunit/data/localisationcache/uk.json b/tests/phpunit/data/localisationcache/uk.json
deleted file mode 100644 (file)
index f63ce5d..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-       "present-uk": "uk"
-}
diff --git a/tests/phpunit/includes/HttpTest.php b/tests/phpunit/includes/HttpTest.php
deleted file mode 100644 (file)
index c3804c6..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-<?php
-
-/**
- * @group Http
- */
-class HttpTest extends MediaWikiTestCase {
-       /**
-        * @dataProvider cookieDomains
-        * @covers Cookie::validateCookieDomain
-        */
-       public function testValidateCookieDomain( $expected, $domain, $origin = null ) {
-               if ( $origin ) {
-                       $ok = Cookie::validateCookieDomain( $domain, $origin );
-                       $msg = "$domain against origin $origin";
-               } else {
-                       $ok = Cookie::validateCookieDomain( $domain );
-                       $msg = "$domain";
-               }
-               $this->assertEquals( $expected, $ok, $msg );
-       }
-
-       public static function cookieDomains() {
-               return [
-                       [ false, "org" ],
-                       [ false, ".org" ],
-                       [ true, "wikipedia.org" ],
-                       [ true, ".wikipedia.org" ],
-                       [ false, "co.uk" ],
-                       [ false, ".co.uk" ],
-                       [ false, "gov.uk" ],
-                       [ false, ".gov.uk" ],
-                       [ true, "supermarket.uk" ],
-                       [ false, "uk" ],
-                       [ false, ".uk" ],
-                       [ false, "127.0.0." ],
-                       [ false, "127." ],
-                       [ false, "127.0.0.1." ],
-                       [ true, "127.0.0.1" ],
-                       [ false, "333.0.0.1" ],
-                       [ true, "example.com" ],
-                       [ false, "example.com." ],
-                       [ true, ".example.com" ],
-
-                       [ true, ".example.com", "www.example.com" ],
-                       [ false, "example.com", "www.example.com" ],
-                       [ true, "127.0.0.1", "127.0.0.1" ],
-                       [ false, "127.0.0.1", "localhost" ],
-               ];
-       }
-
-       /**
-        * Test Http::isValidURI()
-        * @bug 27854 : Http::isValidURI is too lax
-        * @dataProvider provideURI
-        * @covers Http::isValidURI
-        */
-       public function testIsValidUri( $expect, $URI, $message = '' ) {
-               $this->assertEquals(
-                       $expect,
-                       (bool)Http::isValidURI( $URI ),
-                       $message
-               );
-       }
-
-       /**
-        * @covers Http::getProxy
-        */
-       public function testGetProxy() {
-               $this->setMwGlobals( 'wgHTTPProxy', 'proxy.domain.tld' );
-               $this->assertEquals(
-                       'proxy.domain.tld',
-                       Http::getProxy()
-               );
-       }
-
-       /**
-        * Feeds URI to test a long regular expression in Http::isValidURI
-        */
-       public static function provideURI() {
-               /** Format: 'boolean expectation', 'URI to test', 'Optional message' */
-               return [
-                       [ false, '¿non sens before!! http://a', 'Allow anything before URI' ],
-
-                       # (http|https) - only two schemes allowed
-                       [ true, 'http://www.example.org/' ],
-                       [ true, 'https://www.example.org/' ],
-                       [ true, 'http://www.example.org', 'URI without directory' ],
-                       [ true, 'http://a', 'Short name' ],
-                       [ true, 'http://étoile', 'Allow UTF-8 in hostname' ], # 'étoile' is french for 'star'
-                       [ false, '\\host\directory', 'CIFS share' ],
-                       [ false, 'gopher://host/dir', 'Reject gopher scheme' ],
-                       [ false, 'telnet://host', 'Reject telnet scheme' ],
-
-                       # :\/\/ - double slashes
-                       [ false, 'http//example.org', 'Reject missing colon in protocol' ],
-                       [ false, 'http:/example.org', 'Reject missing slash in protocol' ],
-                       [ false, 'http:example.org', 'Must have two slashes' ],
-                       # Following fail since hostname can be made of anything
-                       [ false, 'http:///example.org', 'Must have exactly two slashes, not three' ],
-
-                       # (\w+:{0,1}\w*@)? - optional user:pass
-                       [ true, 'http://user@host', 'Username provided' ],
-                       [ true, 'http://user:@host', 'Username provided, no password' ],
-                       [ true, 'http://user:pass@host', 'Username and password provided' ],
-
-                       # (\S+) - host part is made of anything not whitespaces
-                       // commented these out in order to remove @group Broken
-                       // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them
-                       // [ false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ],
-                       // [ false, 'http://exam:ple.org/', 'hostname can not use colons!' ],
-
-                       # (:[0-9]+)? - port number
-                       [ true, 'http://example.org:80/' ],
-                       [ true, 'https://example.org:80/' ],
-                       [ true, 'http://example.org:443/' ],
-                       [ true, 'https://example.org:443/' ],
-
-                       # Part after the hostname is / or / with something else
-                       [ true, 'http://example/#' ],
-                       [ true, 'http://example/!' ],
-                       [ true, 'http://example/:' ],
-                       [ true, 'http://example/.' ],
-                       [ true, 'http://example/?' ],
-                       [ true, 'http://example/+' ],
-                       [ true, 'http://example/=' ],
-                       [ true, 'http://example/&' ],
-                       [ true, 'http://example/%' ],
-                       [ true, 'http://example/@' ],
-                       [ true, 'http://example/-' ],
-                       [ true, 'http://example//' ],
-                       [ true, 'http://example/&' ],
-
-                       # Fragment
-                       [ true, 'http://exam#ple.org', ], # This one is valid, really!
-                       [ true, 'http://example.org:80#anchor' ],
-                       [ true, 'http://example.org/?id#anchor' ],
-                       [ true, 'http://example.org/?#anchor' ],
-
-                       [ false, 'http://a ¿non !!sens after', 'Allow anything after URI' ],
-               ];
-       }
-
-       /**
-        * Warning:
-        *
-        * These tests are for code that makes use of an artifact of how CURL
-        * handles header reporting on redirect pages, and will need to be
-        * rewritten when bug 29232 is taken care of (high-level handling of
-        * HTTP redirects).
-        */
-       public function testRelativeRedirections() {
-               $h = MWHttpRequestTester::factory( 'http://oldsite/file.ext', [], __METHOD__ );
-
-               # Forge a Location header
-               $h->setRespHeaders( 'location', [
-                               'http://newsite/file.ext',
-                               '/newfile.ext',
-                       ]
-               );
-               # Verify we correctly fix the Location
-               $this->assertEquals(
-                       'http://newsite/newfile.ext',
-                       $h->getFinalUrl(),
-                       "Relative file path Location: interpreted as full URL"
-               );
-
-               $h->setRespHeaders( 'location', [
-                               'https://oldsite/file.ext'
-                       ]
-               );
-               $this->assertEquals(
-                       'https://oldsite/file.ext',
-                       $h->getFinalUrl(),
-                       "Location to the HTTPS version of the site"
-               );
-
-               $h->setRespHeaders( 'location', [
-                               '/anotherfile.ext',
-                               'http://anotherfile/hoster.ext',
-                               'https://anotherfile/hoster.ext'
-                       ]
-               );
-               $this->assertEquals(
-                       'https://anotherfile/hoster.ext',
-                       $h->getFinalUrl( "Relative file path Location: should keep the latest host and scheme!" )
-               );
-       }
-
-       /**
-        * Constant values are from PHP 5.3.28 using cURL 7.24.0
-        * @see https://secure.php.net/manual/en/curl.constants.php
-        *
-        * All constant values are present so that developers don’t need to remember
-        * to add them if added at a later date. The commented out constants were
-        * not found anywhere in the MediaWiki core code.
-        *
-        * Commented out constants that were not available in:
-        * HipHop VM 3.3.0 (rel)
-        * Compiler: heads/master-0-g08810d920dfff59e0774cf2d651f92f13a637175
-        * Repo schema: 3214fc2c684a4520485f715ee45f33f2182324b1
-        * Extension API: 20140829
-        *
-        * Commented out constants that were removed in PHP 5.6.0
-        *
-        * @covers CurlHttpRequest::execute
-        */
-       public function provideCurlConstants() {
-               return [
-                       [ 'CURLAUTH_ANY' ],
-                       [ 'CURLAUTH_ANYSAFE' ],
-                       [ 'CURLAUTH_BASIC' ],
-                       [ 'CURLAUTH_DIGEST' ],
-                       [ 'CURLAUTH_GSSNEGOTIATE' ],
-                       [ 'CURLAUTH_NTLM' ],
-                       // [ 'CURLCLOSEPOLICY_CALLBACK' ], // removed in PHP 5.6.0
-                       // [ 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ], // removed in PHP 5.6.0
-                       // [ 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ], // removed in PHP 5.6.0
-                       // [ 'CURLCLOSEPOLICY_OLDEST' ], // removed in PHP 5.6.0
-                       // [ 'CURLCLOSEPOLICY_SLOWEST' ], // removed in PHP 5.6.0
-                       [ 'CURLE_ABORTED_BY_CALLBACK' ],
-                       [ 'CURLE_BAD_CALLING_ORDER' ],
-                       [ 'CURLE_BAD_CONTENT_ENCODING' ],
-                       [ 'CURLE_BAD_FUNCTION_ARGUMENT' ],
-                       [ 'CURLE_BAD_PASSWORD_ENTERED' ],
-                       [ 'CURLE_COULDNT_CONNECT' ],
-                       [ 'CURLE_COULDNT_RESOLVE_HOST' ],
-                       [ 'CURLE_COULDNT_RESOLVE_PROXY' ],
-                       [ 'CURLE_FAILED_INIT' ],
-                       [ 'CURLE_FILESIZE_EXCEEDED' ],
-                       [ 'CURLE_FILE_COULDNT_READ_FILE' ],
-                       [ 'CURLE_FTP_ACCESS_DENIED' ],
-                       [ 'CURLE_FTP_BAD_DOWNLOAD_RESUME' ],
-                       [ 'CURLE_FTP_CANT_GET_HOST' ],
-                       [ 'CURLE_FTP_CANT_RECONNECT' ],
-                       [ 'CURLE_FTP_COULDNT_GET_SIZE' ],
-                       [ 'CURLE_FTP_COULDNT_RETR_FILE' ],
-                       [ 'CURLE_FTP_COULDNT_SET_ASCII' ],
-                       [ 'CURLE_FTP_COULDNT_SET_BINARY' ],
-                       [ 'CURLE_FTP_COULDNT_STOR_FILE' ],
-                       [ 'CURLE_FTP_COULDNT_USE_REST' ],
-                       [ 'CURLE_FTP_PORT_FAILED' ],
-                       [ 'CURLE_FTP_QUOTE_ERROR' ],
-                       [ 'CURLE_FTP_SSL_FAILED' ],
-                       [ 'CURLE_FTP_USER_PASSWORD_INCORRECT' ],
-                       [ 'CURLE_FTP_WEIRD_227_FORMAT' ],
-                       [ 'CURLE_FTP_WEIRD_PASS_REPLY' ],
-                       [ 'CURLE_FTP_WEIRD_PASV_REPLY' ],
-                       [ 'CURLE_FTP_WEIRD_SERVER_REPLY' ],
-                       [ 'CURLE_FTP_WEIRD_USER_REPLY' ],
-                       [ 'CURLE_FTP_WRITE_ERROR' ],
-                       [ 'CURLE_FUNCTION_NOT_FOUND' ],
-                       [ 'CURLE_GOT_NOTHING' ],
-                       [ 'CURLE_HTTP_NOT_FOUND' ],
-                       [ 'CURLE_HTTP_PORT_FAILED' ],
-                       [ 'CURLE_HTTP_POST_ERROR' ],
-                       [ 'CURLE_HTTP_RANGE_ERROR' ],
-                       [ 'CURLE_LDAP_CANNOT_BIND' ],
-                       [ 'CURLE_LDAP_INVALID_URL' ],
-                       [ 'CURLE_LDAP_SEARCH_FAILED' ],
-                       [ 'CURLE_LIBRARY_NOT_FOUND' ],
-                       [ 'CURLE_MALFORMAT_USER' ],
-                       [ 'CURLE_OBSOLETE' ],
-                       [ 'CURLE_OK' ],
-                       [ 'CURLE_OPERATION_TIMEOUTED' ],
-                       [ 'CURLE_OUT_OF_MEMORY' ],
-                       [ 'CURLE_PARTIAL_FILE' ],
-                       [ 'CURLE_READ_ERROR' ],
-                       [ 'CURLE_RECV_ERROR' ],
-                       [ 'CURLE_SEND_ERROR' ],
-                       [ 'CURLE_SHARE_IN_USE' ],
-                       // [ 'CURLE_SSH' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLE_SSL_CACERT' ],
-                       [ 'CURLE_SSL_CERTPROBLEM' ],
-                       [ 'CURLE_SSL_CIPHER' ],
-                       [ 'CURLE_SSL_CONNECT_ERROR' ],
-                       [ 'CURLE_SSL_ENGINE_NOTFOUND' ],
-                       [ 'CURLE_SSL_ENGINE_SETFAILED' ],
-                       [ 'CURLE_SSL_PEER_CERTIFICATE' ],
-                       [ 'CURLE_TELNET_OPTION_SYNTAX' ],
-                       [ 'CURLE_TOO_MANY_REDIRECTS' ],
-                       [ 'CURLE_UNKNOWN_TELNET_OPTION' ],
-                       [ 'CURLE_UNSUPPORTED_PROTOCOL' ],
-                       [ 'CURLE_URL_MALFORMAT' ],
-                       [ 'CURLE_URL_MALFORMAT_USER' ],
-                       [ 'CURLE_WRITE_ERROR' ],
-                       [ 'CURLFTPAUTH_DEFAULT' ],
-                       [ 'CURLFTPAUTH_SSL' ],
-                       [ 'CURLFTPAUTH_TLS' ],
-                       // [ 'CURLFTPMETHOD_MULTICWD' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLFTPMETHOD_NOCWD' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLFTPMETHOD_SINGLECWD' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLFTPSSL_ALL' ],
-                       [ 'CURLFTPSSL_CONTROL' ],
-                       [ 'CURLFTPSSL_NONE' ],
-                       [ 'CURLFTPSSL_TRY' ],
-                       // [ 'CURLINFO_CERTINFO' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLINFO_CONNECT_TIME' ],
-                       [ 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' ],
-                       [ 'CURLINFO_CONTENT_LENGTH_UPLOAD' ],
-                       [ 'CURLINFO_CONTENT_TYPE' ],
-                       [ 'CURLINFO_EFFECTIVE_URL' ],
-                       [ 'CURLINFO_FILETIME' ],
-                       [ 'CURLINFO_HEADER_OUT' ],
-                       [ 'CURLINFO_HEADER_SIZE' ],
-                       [ 'CURLINFO_HTTP_CODE' ],
-                       [ 'CURLINFO_NAMELOOKUP_TIME' ],
-                       [ 'CURLINFO_PRETRANSFER_TIME' ],
-                       [ 'CURLINFO_PRIVATE' ],
-                       [ 'CURLINFO_REDIRECT_COUNT' ],
-                       [ 'CURLINFO_REDIRECT_TIME' ],
-                       // [ 'CURLINFO_REDIRECT_URL' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLINFO_REQUEST_SIZE' ],
-                       [ 'CURLINFO_SIZE_DOWNLOAD' ],
-                       [ 'CURLINFO_SIZE_UPLOAD' ],
-                       [ 'CURLINFO_SPEED_DOWNLOAD' ],
-                       [ 'CURLINFO_SPEED_UPLOAD' ],
-                       [ 'CURLINFO_SSL_VERIFYRESULT' ],
-                       [ 'CURLINFO_STARTTRANSFER_TIME' ],
-                       [ 'CURLINFO_TOTAL_TIME' ],
-                       [ 'CURLMSG_DONE' ],
-                       [ 'CURLM_BAD_EASY_HANDLE' ],
-                       [ 'CURLM_BAD_HANDLE' ],
-                       [ 'CURLM_CALL_MULTI_PERFORM' ],
-                       [ 'CURLM_INTERNAL_ERROR' ],
-                       [ 'CURLM_OK' ],
-                       [ 'CURLM_OUT_OF_MEMORY' ],
-                       [ 'CURLOPT_AUTOREFERER' ],
-                       [ 'CURLOPT_BINARYTRANSFER' ],
-                       [ 'CURLOPT_BUFFERSIZE' ],
-                       [ 'CURLOPT_CAINFO' ],
-                       [ 'CURLOPT_CAPATH' ],
-                       // [ 'CURLOPT_CERTINFO' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_CLOSEPOLICY' ], // removed in PHP 5.6.0
-                       [ 'CURLOPT_CONNECTTIMEOUT' ],
-                       [ 'CURLOPT_CONNECTTIMEOUT_MS' ],
-                       [ 'CURLOPT_COOKIE' ],
-                       [ 'CURLOPT_COOKIEFILE' ],
-                       [ 'CURLOPT_COOKIEJAR' ],
-                       [ 'CURLOPT_COOKIESESSION' ],
-                       [ 'CURLOPT_CRLF' ],
-                       [ 'CURLOPT_CUSTOMREQUEST' ],
-                       [ 'CURLOPT_DNS_CACHE_TIMEOUT' ],
-                       [ 'CURLOPT_DNS_USE_GLOBAL_CACHE' ],
-                       [ 'CURLOPT_EGDSOCKET' ],
-                       [ 'CURLOPT_ENCODING' ],
-                       [ 'CURLOPT_FAILONERROR' ],
-                       [ 'CURLOPT_FILE' ],
-                       [ 'CURLOPT_FILETIME' ],
-                       [ 'CURLOPT_FOLLOWLOCATION' ],
-                       [ 'CURLOPT_FORBID_REUSE' ],
-                       [ 'CURLOPT_FRESH_CONNECT' ],
-                       [ 'CURLOPT_FTPAPPEND' ],
-                       [ 'CURLOPT_FTPLISTONLY' ],
-                       [ 'CURLOPT_FTPPORT' ],
-                       [ 'CURLOPT_FTPSSLAUTH' ],
-                       [ 'CURLOPT_FTP_CREATE_MISSING_DIRS' ],
-                       // [ 'CURLOPT_FTP_FILEMETHOD' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_FTP_SKIP_PASV_IP' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_FTP_SSL' ],
-                       [ 'CURLOPT_FTP_USE_EPRT' ],
-                       [ 'CURLOPT_FTP_USE_EPSV' ],
-                       [ 'CURLOPT_HEADER' ],
-                       [ 'CURLOPT_HEADERFUNCTION' ],
-                       [ 'CURLOPT_HTTP200ALIASES' ],
-                       [ 'CURLOPT_HTTPAUTH' ],
-                       [ 'CURLOPT_HTTPGET' ],
-                       [ 'CURLOPT_HTTPHEADER' ],
-                       [ 'CURLOPT_HTTPPROXYTUNNEL' ],
-                       [ 'CURLOPT_HTTP_VERSION' ],
-                       [ 'CURLOPT_INFILE' ],
-                       [ 'CURLOPT_INFILESIZE' ],
-                       [ 'CURLOPT_INTERFACE' ],
-                       [ 'CURLOPT_IPRESOLVE' ],
-                       // [ 'CURLOPT_KEYPASSWD' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_KRB4LEVEL' ],
-                       [ 'CURLOPT_LOW_SPEED_LIMIT' ],
-                       [ 'CURLOPT_LOW_SPEED_TIME' ],
-                       [ 'CURLOPT_MAXCONNECTS' ],
-                       [ 'CURLOPT_MAXREDIRS' ],
-                       // [ 'CURLOPT_MAX_RECV_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_MAX_SEND_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_NETRC' ],
-                       [ 'CURLOPT_NOBODY' ],
-                       [ 'CURLOPT_NOPROGRESS' ],
-                       [ 'CURLOPT_NOSIGNAL' ],
-                       [ 'CURLOPT_PORT' ],
-                       [ 'CURLOPT_POST' ],
-                       [ 'CURLOPT_POSTFIELDS' ],
-                       [ 'CURLOPT_POSTQUOTE' ],
-                       [ 'CURLOPT_POSTREDIR' ],
-                       [ 'CURLOPT_PRIVATE' ],
-                       [ 'CURLOPT_PROGRESSFUNCTION' ],
-                       // [ 'CURLOPT_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_PROXY' ],
-                       [ 'CURLOPT_PROXYAUTH' ],
-                       [ 'CURLOPT_PROXYPORT' ],
-                       [ 'CURLOPT_PROXYTYPE' ],
-                       [ 'CURLOPT_PROXYUSERPWD' ],
-                       [ 'CURLOPT_PUT' ],
-                       [ 'CURLOPT_QUOTE' ],
-                       [ 'CURLOPT_RANDOM_FILE' ],
-                       [ 'CURLOPT_RANGE' ],
-                       [ 'CURLOPT_READDATA' ],
-                       [ 'CURLOPT_READFUNCTION' ],
-                       // [ 'CURLOPT_REDIR_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_REFERER' ],
-                       [ 'CURLOPT_RESUME_FROM' ],
-                       [ 'CURLOPT_RETURNTRANSFER' ],
-                       // [ 'CURLOPT_SSH_AUTH_TYPES' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_SSH_PRIVATE_KEYFILE' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLOPT_SSH_PUBLIC_KEYFILE' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLOPT_SSLCERT' ],
-                       [ 'CURLOPT_SSLCERTPASSWD' ],
-                       [ 'CURLOPT_SSLCERTTYPE' ],
-                       [ 'CURLOPT_SSLENGINE' ],
-                       [ 'CURLOPT_SSLENGINE_DEFAULT' ],
-                       [ 'CURLOPT_SSLKEY' ],
-                       [ 'CURLOPT_SSLKEYPASSWD' ],
-                       [ 'CURLOPT_SSLKEYTYPE' ],
-                       [ 'CURLOPT_SSLVERSION' ],
-                       [ 'CURLOPT_SSL_CIPHER_LIST' ],
-                       [ 'CURLOPT_SSL_VERIFYHOST' ],
-                       [ 'CURLOPT_SSL_VERIFYPEER' ],
-                       [ 'CURLOPT_STDERR' ],
-                       [ 'CURLOPT_TCP_NODELAY' ],
-                       [ 'CURLOPT_TIMECONDITION' ],
-                       [ 'CURLOPT_TIMEOUT' ],
-                       [ 'CURLOPT_TIMEOUT_MS' ],
-                       [ 'CURLOPT_TIMEVALUE' ],
-                       [ 'CURLOPT_TRANSFERTEXT' ],
-                       [ 'CURLOPT_UNRESTRICTED_AUTH' ],
-                       [ 'CURLOPT_UPLOAD' ],
-                       [ 'CURLOPT_URL' ],
-                       [ 'CURLOPT_USERAGENT' ],
-                       [ 'CURLOPT_USERPWD' ],
-                       [ 'CURLOPT_VERBOSE' ],
-                       [ 'CURLOPT_WRITEFUNCTION' ],
-                       [ 'CURLOPT_WRITEHEADER' ],
-                       // [ 'CURLPROTO_ALL' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_DICT' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_FILE' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_FTP' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_FTPS' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_HTTP' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_HTTPS' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_LDAP' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_LDAPS' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_SCP' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_SFTP' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_TELNET' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLPROTO_TFTP' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLPROXY_HTTP' ],
-                       // [ 'CURLPROXY_SOCKS4' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLPROXY_SOCKS5' ],
-                       // [ 'CURLSSH_AUTH_DEFAULT' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLSSH_AUTH_HOST' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLSSH_AUTH_KEYBOARD' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLSSH_AUTH_NONE' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLSSH_AUTH_PASSWORD' ], // not present in HHVM 3.3.0-dev
-                       // [ 'CURLSSH_AUTH_PUBLICKEY' ], // not present in HHVM 3.3.0-dev
-                       [ 'CURLVERSION_NOW' ],
-                       [ 'CURL_HTTP_VERSION_1_0' ],
-                       [ 'CURL_HTTP_VERSION_1_1' ],
-                       [ 'CURL_HTTP_VERSION_NONE' ],
-                       [ 'CURL_IPRESOLVE_V4' ],
-                       [ 'CURL_IPRESOLVE_V6' ],
-                       [ 'CURL_IPRESOLVE_WHATEVER' ],
-                       [ 'CURL_NETRC_IGNORED' ],
-                       [ 'CURL_NETRC_OPTIONAL' ],
-                       [ 'CURL_NETRC_REQUIRED' ],
-                       [ 'CURL_TIMECOND_IFMODSINCE' ],
-                       [ 'CURL_TIMECOND_IFUNMODSINCE' ],
-                       [ 'CURL_TIMECOND_LASTMOD' ],
-                       [ 'CURL_VERSION_IPV6' ],
-                       [ 'CURL_VERSION_KERBEROS4' ],
-                       [ 'CURL_VERSION_LIBZ' ],
-                       [ 'CURL_VERSION_SSL' ],
-               ];
-       }
-
-       /**
-        * Added this test based on an issue experienced with HHVM 3.3.0-dev
-        * where it did not define a cURL constant.
-        *
-        * @bug 70570
-        * @dataProvider provideCurlConstants
-        */
-       public function testCurlConstants( $value ) {
-               $this->assertTrue( defined( $value ), $value . ' not defined' );
-       }
-}
-
-/**
- * Class to let us overwrite MWHttpRequest respHeaders variable
- */
-class MWHttpRequestTester extends MWHttpRequest {
-       // function derived from the MWHttpRequest factory function but
-       // returns appropriate tester class here
-       public static function factory( $url, $options = null, $caller = __METHOD__ ) {
-               if ( !Http::$httpEngine ) {
-                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
-               } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
-                       throw new MWException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
-                               'Http::$httpEngine is set to "curl"' );
-               }
-
-               switch ( Http::$httpEngine ) {
-                       case 'curl':
-                               return new CurlHttpRequestTester( $url, $options, $caller );
-                       case 'php':
-                               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
-                                       throw new MWException( __METHOD__ .
-                                               ': allow_url_fopen needs to be enabled for pure PHP HTTP requests to work. '
-                                                       . 'If possible, curl should be used instead. See http://php.net/curl.' );
-                               }
-
-                               return new PhpHttpRequestTester( $url, $options, $caller );
-                       default:
-               }
-       }
-}
-
-class CurlHttpRequestTester extends CurlHttpRequest {
-       function setRespHeaders( $name, $value ) {
-               $this->respHeaders[$name] = $value;
-       }
-}
-
-class PhpHttpRequestTester extends PhpHttpRequest {
-       function setRespHeaders( $name, $value ) {
-               $this->respHeaders[$name] = $value;
-       }
-}
index e8afb4c..4fe806c 100644 (file)
@@ -512,6 +512,108 @@ class MessageTest extends MediaWikiLangTestCase {
                );
        }
 
+       public static function provideListParam() {
+               $lang = Language::factory( 'de' );
+               $msg1 = new Message( 'mainpage', [], $lang );
+               $msg2 = new RawMessage( "''link''", [], $lang );
+
+               return [
+                       'Simple comma list' => [
+                               [ 'a', 'b', 'c' ],
+                               'comma',
+                               'text',
+                               'a, b, c'
+                       ],
+
+                       'Simple semicolon list' => [
+                               [ 'a', 'b', 'c' ],
+                               'semicolon',
+                               'text',
+                               'a; b; c'
+                       ],
+
+                       'Simple pipe list' => [
+                               [ 'a', 'b', 'c' ],
+                               'pipe',
+                               'text',
+                               'a | b | c'
+                       ],
+
+                       'Simple text list' => [
+                               [ 'a', 'b', 'c' ],
+                               'text',
+                               'text',
+                               'a, b and c'
+                       ],
+
+                       'Empty list' => [
+                               [],
+                               'comma',
+                               'text',
+                               ''
+                       ],
+
+                       'List with all "before" params, ->text()' => [
+                               [ "''link''", Message::numParam( 12345678 ) ],
+                               'semicolon',
+                               'text',
+                               '\'\'link\'\'; 12,345,678'
+                       ],
+
+                       'List with all "before" params, ->parse()' => [
+                               [ "''link''", Message::numParam( 12345678 ) ],
+                               'semicolon',
+                               'parse',
+                               '<i>link</i>; 12,345,678'
+                       ],
+
+                       'List with all "after" params, ->text()' => [
+                               [ $msg1, $msg2, Message::rawParam( '[[foo]]' ) ],
+                               'semicolon',
+                               'text',
+                               'Main Page; \'\'link\'\'; [[foo]]'
+                       ],
+
+                       'List with all "after" params, ->parse()' => [
+                               [ $msg1, $msg2, Message::rawParam( '[[foo]]' ) ],
+                               'semicolon',
+                               'parse',
+                               'Main Page; <i>link</i>; [[foo]]'
+                       ],
+
+                       'List with both "before" and "after" params, ->text()' => [
+                               [ $msg1, $msg2, Message::rawParam( '[[foo]]' ), "''link''", Message::numParam( 12345678 ) ],
+                               'semicolon',
+                               'text',
+                               'Main Page; \'\'link\'\'; [[foo]]; \'\'link\'\'; 12,345,678'
+                       ],
+
+                       'List with both "before" and "after" params, ->parse()' => [
+                               [ $msg1, $msg2, Message::rawParam( '[[foo]]' ), "''link''", Message::numParam( 12345678 ) ],
+                               'semicolon',
+                               'parse',
+                               'Main Page; <i>link</i>; [[foo]]; <i>link</i>; 12,345,678'
+                       ],
+               ];
+       }
+
+       /**
+        * @covers Message::listParam
+        * @covers Message::extractParam
+        * @covers Message::formatListParam
+        * @dataProvider provideListParam
+        */
+       public function testListParam( $list, $type, $format, $expect ) {
+               $lang = Language::factory( 'en' );
+
+               $msg = new RawMessage( '$1' );
+               $msg->params( [ Message::listParam( $list, $type ) ] );
+               $this->assertEquals(
+                       $expect,
+                       $msg->inLanguage( $lang )->$format()
+               );
+       }
+
        /**
         * @covers Message::extractParam
         */
index bc43709..c5a7e04 100644 (file)
@@ -129,11 +129,11 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
                                'results' => [
                                        'Special:ActiveUsers',
                                        'Special:AllMessages',
-                                       'Special:AllMyFiles',
+                                       'Special:AllMyUploads',
                                ],
                                // Third result when testing offset
                                'offsetresult' => [
-                                       'Special:AllMyUploads',
+                                       'Special:AllPages',
                                ],
                        ] ],
                        [ [
@@ -146,7 +146,7 @@ class PrefixSearchTest extends MediaWikiLangTestCase {
                                ],
                                // Third result when testing offset
                                'offsetresult' => [
-                                       'Special:UncategorizedImages',
+                                       'Special:UncategorizedPages',
                                ],
                        ] ],
                        [ [
index cb34be2..72a03c3 100644 (file)
@@ -451,7 +451,7 @@ class LocalPasswordPrimaryAuthenticationProviderTest extends \MediaWikiTestCase
                $changeReq->password = $newpass;
                $provider->providerChangeAuthenticationData( $changeReq );
 
-               if ( $loginOnly ) {
+               if ( $loginOnly && $changed ) {
                        $old = 'fail';
                        $new = 'fail';
                        $expectExpiry = null;
index 697eb2d..ed82153 100644 (file)
@@ -61,14 +61,14 @@ class LocalisationCacheTest extends MediaWikiTestCase {
 
        public function testRecacheFallbacks() {
                $lc = $this->getMockLocalisationCache();
-               $lc->recache( 'uk' );
+               $lc->recache( 'ba' );
                $this->assertEquals(
                        [
-                               'present-uk' => 'uk',
+                               'present-ba' => 'ba',
                                'present-ru' => 'ru',
                                'present-en' => 'en',
                        ],
-                       $lc->getItem( 'uk', 'messages' ),
+                       $lc->getItem( 'ba', 'messages' ),
                        'Fallbacks are only used to fill missing data'
                );
        }
@@ -84,7 +84,7 @@ class LocalisationCacheTest extends MediaWikiTestCase {
                                        array &$cache
                                ) {
                                        if ( $code === 'ru' ) {
-                                               $cache['messages']['present-uk'] = 'ru-override';
+                                               $cache['messages']['present-ba'] = 'ru-override';
                                                $cache['messages']['present-ru'] = 'ru-override';
                                                $cache['messages']['present-en'] = 'ru-override';
                                        }
@@ -93,14 +93,14 @@ class LocalisationCacheTest extends MediaWikiTestCase {
                ] );
 
                $lc = $this->getMockLocalisationCache();
-               $lc->recache( 'uk' );
+               $lc->recache( 'ba' );
                $this->assertEquals(
                        [
-                               'present-uk' => 'uk',
+                               'present-ba' => 'ba',
                                'present-ru' => 'ru-override',
                                'present-en' => 'ru-override',
                        ],
-                       $lc->getItem( 'uk', 'messages' ),
+                       $lc->getItem( 'ba', 'messages' ),
                        'Updates provided by hooks follow the normal fallback order.'
                );
        }
diff --git a/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php b/tests/phpunit/includes/debug/logger/monolog/LogstashFormatterTest.php
new file mode 100644 (file)
index 0000000..8086b4b
--- /dev/null
@@ -0,0 +1,55 @@
+<?php
+
+namespace MediaWiki\Logger\Monolog;
+
+class LogstashFormatterTest extends \PHPUnit_Framework_TestCase {
+       /**
+        * @dataProvider provideV1
+        * @param array $record The input record.
+        * @param array $expected Associative array of expected keys and their values.
+        * @param array $notExpected List of keys that should not exist.
+        */
+       public function testV1( array $record, array $expected, array $notExpected ) {
+               $formatter = new LogstashFormatter( 'app', 'system', null, null, LogstashFormatter::V1 );
+               $formatted = json_decode( $formatter->format( $record ), true );
+               foreach ( $expected as $key => $value ) {
+                       $this->assertArrayHasKey( $key, $formatted );
+                       $this->assertSame( $value, $formatted[$key] );
+               }
+               foreach ( $notExpected as $key ) {
+                       $this->assertArrayNotHasKey( $key, $formatted );
+               }
+       }
+
+       public function provideV1() {
+               return [
+                       [
+                               [ 'extra' => [ 'foo' => 1 ], 'context' => [ 'bar' => 2 ] ],
+                               [ 'foo' => 1, 'bar' => 2 ],
+                               [ 'logstash_formatter_key_conflict' ],
+                       ],
+                       [
+                               [ 'extra' => [ 'url' => 1 ], 'context' => [ 'url' => 2 ] ],
+                               [ 'url' => 1, 'c_url' => 2, 'logstash_formatter_key_conflict' => [ 'url' ] ],
+                               [],
+                       ],
+                       [
+                               [ 'channel' => 'x', 'context' => [ 'channel' => 'y' ] ],
+                               [ 'channel' => 'x', 'c_channel' => 'y',
+                                       'logstash_formatter_key_conflict' => [ 'channel' ] ],
+                               [],
+                       ],
+               ];
+       }
+
+       public function testV1WithPrefix() {
+               $formatter = new LogstashFormatter( 'app', 'system', null, 'ctx_', LogstashFormatter::V1 );
+               $record = [ 'extra' => [ 'url' => 1 ], 'context' => [ 'url' => 2 ] ];
+               $formatted = json_decode( $formatter->format( $record ), true );
+               $this->assertArrayHasKey( 'url', $formatted );
+               $this->assertSame( 1, $formatted['url'] );
+               $this->assertArrayHasKey( 'ctx_url', $formatted );
+               $this->assertSame( 2, $formatted['ctx_url'] );
+               $this->assertArrayNotHasKey( 'c_url', $formatted );
+       }
+}
diff --git a/tests/phpunit/includes/http/HttpTest.php b/tests/phpunit/includes/http/HttpTest.php
new file mode 100644 (file)
index 0000000..7e98d1c
--- /dev/null
@@ -0,0 +1,534 @@
+<?php
+
+/**
+ * @group Http
+ */
+class HttpTest extends MediaWikiTestCase {
+       /**
+        * @dataProvider cookieDomains
+        * @covers Cookie::validateCookieDomain
+        */
+       public function testValidateCookieDomain( $expected, $domain, $origin = null ) {
+               if ( $origin ) {
+                       $ok = Cookie::validateCookieDomain( $domain, $origin );
+                       $msg = "$domain against origin $origin";
+               } else {
+                       $ok = Cookie::validateCookieDomain( $domain );
+                       $msg = "$domain";
+               }
+               $this->assertEquals( $expected, $ok, $msg );
+       }
+
+       public static function cookieDomains() {
+               return [
+                       [ false, "org" ],
+                       [ false, ".org" ],
+                       [ true, "wikipedia.org" ],
+                       [ true, ".wikipedia.org" ],
+                       [ false, "co.uk" ],
+                       [ false, ".co.uk" ],
+                       [ false, "gov.uk" ],
+                       [ false, ".gov.uk" ],
+                       [ true, "supermarket.uk" ],
+                       [ false, "uk" ],
+                       [ false, ".uk" ],
+                       [ false, "127.0.0." ],
+                       [ false, "127." ],
+                       [ false, "127.0.0.1." ],
+                       [ true, "127.0.0.1" ],
+                       [ false, "333.0.0.1" ],
+                       [ true, "example.com" ],
+                       [ false, "example.com." ],
+                       [ true, ".example.com" ],
+
+                       [ true, ".example.com", "www.example.com" ],
+                       [ false, "example.com", "www.example.com" ],
+                       [ true, "127.0.0.1", "127.0.0.1" ],
+                       [ false, "127.0.0.1", "localhost" ],
+               ];
+       }
+
+       /**
+        * Test Http::isValidURI()
+        * @bug 27854 : Http::isValidURI is too lax
+        * @dataProvider provideURI
+        * @covers Http::isValidURI
+        */
+       public function testIsValidUri( $expect, $URI, $message = '' ) {
+               $this->assertEquals(
+                       $expect,
+                       (bool)Http::isValidURI( $URI ),
+                       $message
+               );
+       }
+
+       /**
+        * @covers Http::getProxy
+        */
+       public function testGetProxy() {
+               $this->setMwGlobals( 'wgHTTPProxy', 'proxy.domain.tld' );
+               $this->assertEquals(
+                       'proxy.domain.tld',
+                       Http::getProxy()
+               );
+       }
+
+       /**
+        * Feeds URI to test a long regular expression in Http::isValidURI
+        */
+       public static function provideURI() {
+               /** Format: 'boolean expectation', 'URI to test', 'Optional message' */
+               return [
+                       [ false, '¿non sens before!! http://a', 'Allow anything before URI' ],
+
+                       # (http|https) - only two schemes allowed
+                       [ true, 'http://www.example.org/' ],
+                       [ true, 'https://www.example.org/' ],
+                       [ true, 'http://www.example.org', 'URI without directory' ],
+                       [ true, 'http://a', 'Short name' ],
+                       [ true, 'http://étoile', 'Allow UTF-8 in hostname' ], # 'étoile' is french for 'star'
+                       [ false, '\\host\directory', 'CIFS share' ],
+                       [ false, 'gopher://host/dir', 'Reject gopher scheme' ],
+                       [ false, 'telnet://host', 'Reject telnet scheme' ],
+
+                       # :\/\/ - double slashes
+                       [ false, 'http//example.org', 'Reject missing colon in protocol' ],
+                       [ false, 'http:/example.org', 'Reject missing slash in protocol' ],
+                       [ false, 'http:example.org', 'Must have two slashes' ],
+                       # Following fail since hostname can be made of anything
+                       [ false, 'http:///example.org', 'Must have exactly two slashes, not three' ],
+
+                       # (\w+:{0,1}\w*@)? - optional user:pass
+                       [ true, 'http://user@host', 'Username provided' ],
+                       [ true, 'http://user:@host', 'Username provided, no password' ],
+                       [ true, 'http://user:pass@host', 'Username and password provided' ],
+
+                       # (\S+) - host part is made of anything not whitespaces
+                       // commented these out in order to remove @group Broken
+                       // @todo are these valid tests? if so, fix Http::isValidURI so it can handle them
+                       // [ false, 'http://!"èèè¿¿¿~~\'', 'hostname is made of any non whitespace' ],
+                       // [ false, 'http://exam:ple.org/', 'hostname can not use colons!' ],
+
+                       # (:[0-9]+)? - port number
+                       [ true, 'http://example.org:80/' ],
+                       [ true, 'https://example.org:80/' ],
+                       [ true, 'http://example.org:443/' ],
+                       [ true, 'https://example.org:443/' ],
+
+                       # Part after the hostname is / or / with something else
+                       [ true, 'http://example/#' ],
+                       [ true, 'http://example/!' ],
+                       [ true, 'http://example/:' ],
+                       [ true, 'http://example/.' ],
+                       [ true, 'http://example/?' ],
+                       [ true, 'http://example/+' ],
+                       [ true, 'http://example/=' ],
+                       [ true, 'http://example/&' ],
+                       [ true, 'http://example/%' ],
+                       [ true, 'http://example/@' ],
+                       [ true, 'http://example/-' ],
+                       [ true, 'http://example//' ],
+                       [ true, 'http://example/&' ],
+
+                       # Fragment
+                       [ true, 'http://exam#ple.org', ], # This one is valid, really!
+                       [ true, 'http://example.org:80#anchor' ],
+                       [ true, 'http://example.org/?id#anchor' ],
+                       [ true, 'http://example.org/?#anchor' ],
+
+                       [ false, 'http://a ¿non !!sens after', 'Allow anything after URI' ],
+               ];
+       }
+
+       /**
+        * Warning:
+        *
+        * These tests are for code that makes use of an artifact of how CURL
+        * handles header reporting on redirect pages, and will need to be
+        * rewritten when bug 29232 is taken care of (high-level handling of
+        * HTTP redirects).
+        */
+       public function testRelativeRedirections() {
+               $h = MWHttpRequestTester::factory( 'http://oldsite/file.ext', [], __METHOD__ );
+
+               # Forge a Location header
+               $h->setRespHeaders( 'location', [
+                               'http://newsite/file.ext',
+                               '/newfile.ext',
+                       ]
+               );
+               # Verify we correctly fix the Location
+               $this->assertEquals(
+                       'http://newsite/newfile.ext',
+                       $h->getFinalUrl(),
+                       "Relative file path Location: interpreted as full URL"
+               );
+
+               $h->setRespHeaders( 'location', [
+                               'https://oldsite/file.ext'
+                       ]
+               );
+               $this->assertEquals(
+                       'https://oldsite/file.ext',
+                       $h->getFinalUrl(),
+                       "Location to the HTTPS version of the site"
+               );
+
+               $h->setRespHeaders( 'location', [
+                               '/anotherfile.ext',
+                               'http://anotherfile/hoster.ext',
+                               'https://anotherfile/hoster.ext'
+                       ]
+               );
+               $this->assertEquals(
+                       'https://anotherfile/hoster.ext',
+                       $h->getFinalUrl( "Relative file path Location: should keep the latest host and scheme!" )
+               );
+       }
+
+       /**
+        * Constant values are from PHP 5.3.28 using cURL 7.24.0
+        * @see https://secure.php.net/manual/en/curl.constants.php
+        *
+        * All constant values are present so that developers don’t need to remember
+        * to add them if added at a later date. The commented out constants were
+        * not found anywhere in the MediaWiki core code.
+        *
+        * Commented out constants that were not available in:
+        * HipHop VM 3.3.0 (rel)
+        * Compiler: heads/master-0-g08810d920dfff59e0774cf2d651f92f13a637175
+        * Repo schema: 3214fc2c684a4520485f715ee45f33f2182324b1
+        * Extension API: 20140829
+        *
+        * Commented out constants that were removed in PHP 5.6.0
+        *
+        * @covers CurlHttpRequest::execute
+        */
+       public function provideCurlConstants() {
+               return [
+                       [ 'CURLAUTH_ANY' ],
+                       [ 'CURLAUTH_ANYSAFE' ],
+                       [ 'CURLAUTH_BASIC' ],
+                       [ 'CURLAUTH_DIGEST' ],
+                       [ 'CURLAUTH_GSSNEGOTIATE' ],
+                       [ 'CURLAUTH_NTLM' ],
+                       // [ 'CURLCLOSEPOLICY_CALLBACK' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_LEAST_RECENTLY_USED' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_LEAST_TRAFFIC' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_OLDEST' ], // removed in PHP 5.6.0
+                       // [ 'CURLCLOSEPOLICY_SLOWEST' ], // removed in PHP 5.6.0
+                       [ 'CURLE_ABORTED_BY_CALLBACK' ],
+                       [ 'CURLE_BAD_CALLING_ORDER' ],
+                       [ 'CURLE_BAD_CONTENT_ENCODING' ],
+                       [ 'CURLE_BAD_FUNCTION_ARGUMENT' ],
+                       [ 'CURLE_BAD_PASSWORD_ENTERED' ],
+                       [ 'CURLE_COULDNT_CONNECT' ],
+                       [ 'CURLE_COULDNT_RESOLVE_HOST' ],
+                       [ 'CURLE_COULDNT_RESOLVE_PROXY' ],
+                       [ 'CURLE_FAILED_INIT' ],
+                       [ 'CURLE_FILESIZE_EXCEEDED' ],
+                       [ 'CURLE_FILE_COULDNT_READ_FILE' ],
+                       [ 'CURLE_FTP_ACCESS_DENIED' ],
+                       [ 'CURLE_FTP_BAD_DOWNLOAD_RESUME' ],
+                       [ 'CURLE_FTP_CANT_GET_HOST' ],
+                       [ 'CURLE_FTP_CANT_RECONNECT' ],
+                       [ 'CURLE_FTP_COULDNT_GET_SIZE' ],
+                       [ 'CURLE_FTP_COULDNT_RETR_FILE' ],
+                       [ 'CURLE_FTP_COULDNT_SET_ASCII' ],
+                       [ 'CURLE_FTP_COULDNT_SET_BINARY' ],
+                       [ 'CURLE_FTP_COULDNT_STOR_FILE' ],
+                       [ 'CURLE_FTP_COULDNT_USE_REST' ],
+                       [ 'CURLE_FTP_PORT_FAILED' ],
+                       [ 'CURLE_FTP_QUOTE_ERROR' ],
+                       [ 'CURLE_FTP_SSL_FAILED' ],
+                       [ 'CURLE_FTP_USER_PASSWORD_INCORRECT' ],
+                       [ 'CURLE_FTP_WEIRD_227_FORMAT' ],
+                       [ 'CURLE_FTP_WEIRD_PASS_REPLY' ],
+                       [ 'CURLE_FTP_WEIRD_PASV_REPLY' ],
+                       [ 'CURLE_FTP_WEIRD_SERVER_REPLY' ],
+                       [ 'CURLE_FTP_WEIRD_USER_REPLY' ],
+                       [ 'CURLE_FTP_WRITE_ERROR' ],
+                       [ 'CURLE_FUNCTION_NOT_FOUND' ],
+                       [ 'CURLE_GOT_NOTHING' ],
+                       [ 'CURLE_HTTP_NOT_FOUND' ],
+                       [ 'CURLE_HTTP_PORT_FAILED' ],
+                       [ 'CURLE_HTTP_POST_ERROR' ],
+                       [ 'CURLE_HTTP_RANGE_ERROR' ],
+                       [ 'CURLE_LDAP_CANNOT_BIND' ],
+                       [ 'CURLE_LDAP_INVALID_URL' ],
+                       [ 'CURLE_LDAP_SEARCH_FAILED' ],
+                       [ 'CURLE_LIBRARY_NOT_FOUND' ],
+                       [ 'CURLE_MALFORMAT_USER' ],
+                       [ 'CURLE_OBSOLETE' ],
+                       [ 'CURLE_OK' ],
+                       [ 'CURLE_OPERATION_TIMEOUTED' ],
+                       [ 'CURLE_OUT_OF_MEMORY' ],
+                       [ 'CURLE_PARTIAL_FILE' ],
+                       [ 'CURLE_READ_ERROR' ],
+                       [ 'CURLE_RECV_ERROR' ],
+                       [ 'CURLE_SEND_ERROR' ],
+                       [ 'CURLE_SHARE_IN_USE' ],
+                       // [ 'CURLE_SSH' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLE_SSL_CACERT' ],
+                       [ 'CURLE_SSL_CERTPROBLEM' ],
+                       [ 'CURLE_SSL_CIPHER' ],
+                       [ 'CURLE_SSL_CONNECT_ERROR' ],
+                       [ 'CURLE_SSL_ENGINE_NOTFOUND' ],
+                       [ 'CURLE_SSL_ENGINE_SETFAILED' ],
+                       [ 'CURLE_SSL_PEER_CERTIFICATE' ],
+                       [ 'CURLE_TELNET_OPTION_SYNTAX' ],
+                       [ 'CURLE_TOO_MANY_REDIRECTS' ],
+                       [ 'CURLE_UNKNOWN_TELNET_OPTION' ],
+                       [ 'CURLE_UNSUPPORTED_PROTOCOL' ],
+                       [ 'CURLE_URL_MALFORMAT' ],
+                       [ 'CURLE_URL_MALFORMAT_USER' ],
+                       [ 'CURLE_WRITE_ERROR' ],
+                       [ 'CURLFTPAUTH_DEFAULT' ],
+                       [ 'CURLFTPAUTH_SSL' ],
+                       [ 'CURLFTPAUTH_TLS' ],
+                       // [ 'CURLFTPMETHOD_MULTICWD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLFTPMETHOD_NOCWD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLFTPMETHOD_SINGLECWD' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLFTPSSL_ALL' ],
+                       [ 'CURLFTPSSL_CONTROL' ],
+                       [ 'CURLFTPSSL_NONE' ],
+                       [ 'CURLFTPSSL_TRY' ],
+                       // [ 'CURLINFO_CERTINFO' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLINFO_CONNECT_TIME' ],
+                       [ 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' ],
+                       [ 'CURLINFO_CONTENT_LENGTH_UPLOAD' ],
+                       [ 'CURLINFO_CONTENT_TYPE' ],
+                       [ 'CURLINFO_EFFECTIVE_URL' ],
+                       [ 'CURLINFO_FILETIME' ],
+                       [ 'CURLINFO_HEADER_OUT' ],
+                       [ 'CURLINFO_HEADER_SIZE' ],
+                       [ 'CURLINFO_HTTP_CODE' ],
+                       [ 'CURLINFO_NAMELOOKUP_TIME' ],
+                       [ 'CURLINFO_PRETRANSFER_TIME' ],
+                       [ 'CURLINFO_PRIVATE' ],
+                       [ 'CURLINFO_REDIRECT_COUNT' ],
+                       [ 'CURLINFO_REDIRECT_TIME' ],
+                       // [ 'CURLINFO_REDIRECT_URL' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLINFO_REQUEST_SIZE' ],
+                       [ 'CURLINFO_SIZE_DOWNLOAD' ],
+                       [ 'CURLINFO_SIZE_UPLOAD' ],
+                       [ 'CURLINFO_SPEED_DOWNLOAD' ],
+                       [ 'CURLINFO_SPEED_UPLOAD' ],
+                       [ 'CURLINFO_SSL_VERIFYRESULT' ],
+                       [ 'CURLINFO_STARTTRANSFER_TIME' ],
+                       [ 'CURLINFO_TOTAL_TIME' ],
+                       [ 'CURLMSG_DONE' ],
+                       [ 'CURLM_BAD_EASY_HANDLE' ],
+                       [ 'CURLM_BAD_HANDLE' ],
+                       [ 'CURLM_CALL_MULTI_PERFORM' ],
+                       [ 'CURLM_INTERNAL_ERROR' ],
+                       [ 'CURLM_OK' ],
+                       [ 'CURLM_OUT_OF_MEMORY' ],
+                       [ 'CURLOPT_AUTOREFERER' ],
+                       [ 'CURLOPT_BINARYTRANSFER' ],
+                       [ 'CURLOPT_BUFFERSIZE' ],
+                       [ 'CURLOPT_CAINFO' ],
+                       [ 'CURLOPT_CAPATH' ],
+                       // [ 'CURLOPT_CERTINFO' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_CLOSEPOLICY' ], // removed in PHP 5.6.0
+                       [ 'CURLOPT_CONNECTTIMEOUT' ],
+                       [ 'CURLOPT_CONNECTTIMEOUT_MS' ],
+                       [ 'CURLOPT_COOKIE' ],
+                       [ 'CURLOPT_COOKIEFILE' ],
+                       [ 'CURLOPT_COOKIEJAR' ],
+                       [ 'CURLOPT_COOKIESESSION' ],
+                       [ 'CURLOPT_CRLF' ],
+                       [ 'CURLOPT_CUSTOMREQUEST' ],
+                       [ 'CURLOPT_DNS_CACHE_TIMEOUT' ],
+                       [ 'CURLOPT_DNS_USE_GLOBAL_CACHE' ],
+                       [ 'CURLOPT_EGDSOCKET' ],
+                       [ 'CURLOPT_ENCODING' ],
+                       [ 'CURLOPT_FAILONERROR' ],
+                       [ 'CURLOPT_FILE' ],
+                       [ 'CURLOPT_FILETIME' ],
+                       [ 'CURLOPT_FOLLOWLOCATION' ],
+                       [ 'CURLOPT_FORBID_REUSE' ],
+                       [ 'CURLOPT_FRESH_CONNECT' ],
+                       [ 'CURLOPT_FTPAPPEND' ],
+                       [ 'CURLOPT_FTPLISTONLY' ],
+                       [ 'CURLOPT_FTPPORT' ],
+                       [ 'CURLOPT_FTPSSLAUTH' ],
+                       [ 'CURLOPT_FTP_CREATE_MISSING_DIRS' ],
+                       // [ 'CURLOPT_FTP_FILEMETHOD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_FTP_SKIP_PASV_IP' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_FTP_SSL' ],
+                       [ 'CURLOPT_FTP_USE_EPRT' ],
+                       [ 'CURLOPT_FTP_USE_EPSV' ],
+                       [ 'CURLOPT_HEADER' ],
+                       [ 'CURLOPT_HEADERFUNCTION' ],
+                       [ 'CURLOPT_HTTP200ALIASES' ],
+                       [ 'CURLOPT_HTTPAUTH' ],
+                       [ 'CURLOPT_HTTPGET' ],
+                       [ 'CURLOPT_HTTPHEADER' ],
+                       [ 'CURLOPT_HTTPPROXYTUNNEL' ],
+                       [ 'CURLOPT_HTTP_VERSION' ],
+                       [ 'CURLOPT_INFILE' ],
+                       [ 'CURLOPT_INFILESIZE' ],
+                       [ 'CURLOPT_INTERFACE' ],
+                       [ 'CURLOPT_IPRESOLVE' ],
+                       // [ 'CURLOPT_KEYPASSWD' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_KRB4LEVEL' ],
+                       [ 'CURLOPT_LOW_SPEED_LIMIT' ],
+                       [ 'CURLOPT_LOW_SPEED_TIME' ],
+                       [ 'CURLOPT_MAXCONNECTS' ],
+                       [ 'CURLOPT_MAXREDIRS' ],
+                       // [ 'CURLOPT_MAX_RECV_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_MAX_SEND_SPEED_LARGE' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_NETRC' ],
+                       [ 'CURLOPT_NOBODY' ],
+                       [ 'CURLOPT_NOPROGRESS' ],
+                       [ 'CURLOPT_NOSIGNAL' ],
+                       [ 'CURLOPT_PORT' ],
+                       [ 'CURLOPT_POST' ],
+                       [ 'CURLOPT_POSTFIELDS' ],
+                       [ 'CURLOPT_POSTQUOTE' ],
+                       [ 'CURLOPT_POSTREDIR' ],
+                       [ 'CURLOPT_PRIVATE' ],
+                       [ 'CURLOPT_PROGRESSFUNCTION' ],
+                       // [ 'CURLOPT_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_PROXY' ],
+                       [ 'CURLOPT_PROXYAUTH' ],
+                       [ 'CURLOPT_PROXYPORT' ],
+                       [ 'CURLOPT_PROXYTYPE' ],
+                       [ 'CURLOPT_PROXYUSERPWD' ],
+                       [ 'CURLOPT_PUT' ],
+                       [ 'CURLOPT_QUOTE' ],
+                       [ 'CURLOPT_RANDOM_FILE' ],
+                       [ 'CURLOPT_RANGE' ],
+                       [ 'CURLOPT_READDATA' ],
+                       [ 'CURLOPT_READFUNCTION' ],
+                       // [ 'CURLOPT_REDIR_PROTOCOLS' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_REFERER' ],
+                       [ 'CURLOPT_RESUME_FROM' ],
+                       [ 'CURLOPT_RETURNTRANSFER' ],
+                       // [ 'CURLOPT_SSH_AUTH_TYPES' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_HOST_PUBLIC_KEY_MD5' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_PRIVATE_KEYFILE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLOPT_SSH_PUBLIC_KEYFILE' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLOPT_SSLCERT' ],
+                       [ 'CURLOPT_SSLCERTPASSWD' ],
+                       [ 'CURLOPT_SSLCERTTYPE' ],
+                       [ 'CURLOPT_SSLENGINE' ],
+                       [ 'CURLOPT_SSLENGINE_DEFAULT' ],
+                       [ 'CURLOPT_SSLKEY' ],
+                       [ 'CURLOPT_SSLKEYPASSWD' ],
+                       [ 'CURLOPT_SSLKEYTYPE' ],
+                       [ 'CURLOPT_SSLVERSION' ],
+                       [ 'CURLOPT_SSL_CIPHER_LIST' ],
+                       [ 'CURLOPT_SSL_VERIFYHOST' ],
+                       [ 'CURLOPT_SSL_VERIFYPEER' ],
+                       [ 'CURLOPT_STDERR' ],
+                       [ 'CURLOPT_TCP_NODELAY' ],
+                       [ 'CURLOPT_TIMECONDITION' ],
+                       [ 'CURLOPT_TIMEOUT' ],
+                       [ 'CURLOPT_TIMEOUT_MS' ],
+                       [ 'CURLOPT_TIMEVALUE' ],
+                       [ 'CURLOPT_TRANSFERTEXT' ],
+                       [ 'CURLOPT_UNRESTRICTED_AUTH' ],
+                       [ 'CURLOPT_UPLOAD' ],
+                       [ 'CURLOPT_URL' ],
+                       [ 'CURLOPT_USERAGENT' ],
+                       [ 'CURLOPT_USERPWD' ],
+                       [ 'CURLOPT_VERBOSE' ],
+                       [ 'CURLOPT_WRITEFUNCTION' ],
+                       [ 'CURLOPT_WRITEHEADER' ],
+                       // [ 'CURLPROTO_ALL' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_DICT' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FILE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_FTPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_HTTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_HTTPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_LDAP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_LDAPS' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_SCP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_SFTP' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_TELNET' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLPROTO_TFTP' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLPROXY_HTTP' ],
+                       // [ 'CURLPROXY_SOCKS4' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLPROXY_SOCKS5' ],
+                       // [ 'CURLSSH_AUTH_DEFAULT' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_HOST' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_KEYBOARD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_NONE' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_PASSWORD' ], // not present in HHVM 3.3.0-dev
+                       // [ 'CURLSSH_AUTH_PUBLICKEY' ], // not present in HHVM 3.3.0-dev
+                       [ 'CURLVERSION_NOW' ],
+                       [ 'CURL_HTTP_VERSION_1_0' ],
+                       [ 'CURL_HTTP_VERSION_1_1' ],
+                       [ 'CURL_HTTP_VERSION_NONE' ],
+                       [ 'CURL_IPRESOLVE_V4' ],
+                       [ 'CURL_IPRESOLVE_V6' ],
+                       [ 'CURL_IPRESOLVE_WHATEVER' ],
+                       [ 'CURL_NETRC_IGNORED' ],
+                       [ 'CURL_NETRC_OPTIONAL' ],
+                       [ 'CURL_NETRC_REQUIRED' ],
+                       [ 'CURL_TIMECOND_IFMODSINCE' ],
+                       [ 'CURL_TIMECOND_IFUNMODSINCE' ],
+                       [ 'CURL_TIMECOND_LASTMOD' ],
+                       [ 'CURL_VERSION_IPV6' ],
+                       [ 'CURL_VERSION_KERBEROS4' ],
+                       [ 'CURL_VERSION_LIBZ' ],
+                       [ 'CURL_VERSION_SSL' ],
+               ];
+       }
+
+       /**
+        * Added this test based on an issue experienced with HHVM 3.3.0-dev
+        * where it did not define a cURL constant.
+        *
+        * @bug 70570
+        * @dataProvider provideCurlConstants
+        */
+       public function testCurlConstants( $value ) {
+               $this->assertTrue( defined( $value ), $value . ' not defined' );
+       }
+}
+
+/**
+ * Class to let us overwrite MWHttpRequest respHeaders variable
+ */
+class MWHttpRequestTester extends MWHttpRequest {
+       // function derived from the MWHttpRequest factory function but
+       // returns appropriate tester class here
+       public static function factory( $url, $options = null, $caller = __METHOD__ ) {
+               if ( !Http::$httpEngine ) {
+                       Http::$httpEngine = function_exists( 'curl_init' ) ? 'curl' : 'php';
+               } elseif ( Http::$httpEngine == 'curl' && !function_exists( 'curl_init' ) ) {
+                       throw new DomainException( __METHOD__ . ': curl (http://php.net/curl) is not installed, but' .
+                               'Http::$httpEngine is set to "curl"' );
+               }
+
+               switch ( Http::$httpEngine ) {
+                       case 'curl':
+                               return new CurlHttpRequestTester( $url, $options, $caller );
+                       case 'php':
+                               if ( !wfIniGetBool( 'allow_url_fopen' ) ) {
+                                       throw new DomainException( __METHOD__ .
+                                               ': allow_url_fopen needs to be enabled for pure PHP HTTP requests to work. '
+                                                       . 'If possible, curl should be used instead. See http://php.net/curl.' );
+                               }
+
+                               return new PhpHttpRequestTester( $url, $options, $caller );
+                       default:
+               }
+       }
+}
+
+class CurlHttpRequestTester extends CurlHttpRequest {
+       function setRespHeaders( $name, $value ) {
+               $this->respHeaders[$name] = $value;
+       }
+}
+
+class PhpHttpRequestTester extends PhpHttpRequest {
+       function setRespHeaders( $name, $value ) {
+               $this->respHeaders[$name] = $value;
+       }
+}
diff --git a/tests/phpunit/includes/installer/DatabaseUpdaterTest.php b/tests/phpunit/includes/installer/DatabaseUpdaterTest.php
deleted file mode 100644 (file)
index 2a75cf4..0000000
+++ /dev/null
@@ -1,286 +0,0 @@
-<?php
-
-class DatabaseUpdaterTest extends MediaWikiTestCase {
-
-       public function testSetAppliedUpdates() {
-               $db = new FakeDatabase();
-               $dbu = new FakeDatabaseUpdater( $db );
-               $dbu->setAppliedUpdates( "test", [] );
-               $expected = "updatelist-test-" . time() . "0";
-               $actual = $db->lastInsertData['ul_key'];
-               $this->assertEquals( $expected, $actual, var_export( $db->lastInsertData, true ) );
-               $dbu->setAppliedUpdates( "test", [] );
-               $expected = "updatelist-test-" . time() . "1";
-               $actual = $db->lastInsertData['ul_key'];
-               $this->assertEquals( $expected, $actual, var_export( $db->lastInsertData, true ) );
-       }
-}
-
-class FakeDatabase extends Database {
-       public $lastInsertTable;
-       public $lastInsertData;
-
-       function __construct() {
-               $this->cliMode = true;
-               $this->connLogger = new \Psr\Log\NullLogger();
-               $this->queryLogger = new \Psr\Log\NullLogger();
-               $this->errorLogger = function ( Exception $e ) {
-                       wfWarn( get_class( $e ) . ": {$e->getMessage()}" );
-               };
-               $this->currentDomain = DatabaseDomain::newUnspecified();
-       }
-
-       function clearFlag( $arg, $remember = self::REMEMBER_NOTHING ) {
-       }
-
-       function setFlag( $arg, $remember = self::REMEMBER_NOTHING ) {
-       }
-
-       public function insert( $table, $a, $fname = __METHOD__, $options = [] ) {
-               $this->lastInsertTable = $table;
-               $this->lastInsertData = $a;
-       }
-
-       /**
-        * Get the type of the DBMS, as it appears in $wgDBtype.
-        *
-        * @return string
-        */
-       function getType() {
-               // TODO: Implement getType() method.
-       }
-
-       /**
-        * Open a connection to the database. Usually aborts on failure
-        *
-        * @param string $server Database server host
-        * @param string $user Database user name
-        * @param string $password Database user password
-        * @param string $dbName Database name
-        * @return bool
-        * @throws DBConnectionError
-        */
-       function open( $server, $user, $password, $dbName ) {
-               // TODO: Implement open() method.
-       }
-
-       /**
-        * Fetch the next row from the given result object, in object form.
-        * Fields can be retrieved with $row->fieldname, with fields acting like
-        * member variables.
-        * If no more rows are available, false is returned.
-        *
-        * @param ResultWrapper|stdClass $res Object as returned from Database::query(), etc.
-        * @return stdClass|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       function fetchObject( $res ) {
-               // TODO: Implement fetchObject() method.
-       }
-
-       /**
-        * Fetch the next row from the given result object, in associative array
-        * form. Fields are retrieved with $row['fieldname'].
-        * If no more rows are available, false is returned.
-        *
-        * @param ResultWrapper $res Result object as returned from Database::query(), etc.
-        * @return array|bool
-        * @throws DBUnexpectedError Thrown if the database returns an error
-        */
-       function fetchRow( $res ) {
-               // TODO: Implement fetchRow() method.
-       }
-
-       /**
-        * Get the number of rows in a result object
-        *
-        * @param mixed $res A SQL result
-        * @return int
-        */
-       function numRows( $res ) {
-               // TODO: Implement numRows() method.
-       }
-
-       /**
-        * Get the number of fields in a result object
-        * @see https://secure.php.net/mysql_num_fields
-        *
-        * @param mixed $res A SQL result
-        * @return int
-        */
-       function numFields( $res ) {
-               // TODO: Implement numFields() method.
-       }
-
-       /**
-        * Get a field name in a result object
-        * @see https://secure.php.net/mysql_field_name
-        *
-        * @param mixed $res A SQL result
-        * @param int $n
-        * @return string
-        */
-       function fieldName( $res, $n ) {
-               // TODO: Implement fieldName() method.
-       }
-
-       /**
-        * Get the inserted value of an auto-increment row
-        *
-        * The value inserted should be fetched from nextSequenceValue()
-        *
-        * Example:
-        * $id = $dbw->nextSequenceValue( 'page_page_id_seq' );
-        * $dbw->insert( 'page', [ 'page_id' => $id ] );
-        * $id = $dbw->insertId();
-        *
-        * @return int
-        */
-       function insertId() {
-               // TODO: Implement insertId() method.
-       }
-
-       /**
-        * Change the position of the cursor in a result object
-        * @see https://secure.php.net/mysql_data_seek
-        *
-        * @param mixed $res A SQL result
-        * @param int $row
-        */
-       function dataSeek( $res, $row ) {
-               // TODO: Implement dataSeek() method.
-       }
-
-       /**
-        * Get the last error number
-        * @see https://secure.php.net/mysql_errno
-        *
-        * @return int
-        */
-       function lastErrno() {
-               // TODO: Implement lastErrno() method.
-       }
-
-       /**
-        * Get a description of the last error
-        * @see https://secure.php.net/mysql_error
-        *
-        * @return string
-        */
-       function lastError() {
-               // TODO: Implement lastError() method.
-       }
-
-       /**
-        * mysql_fetch_field() wrapper
-        * Returns false if the field doesn't exist
-        *
-        * @param string $table Table name
-        * @param string $field Field name
-        *
-        * @return Field
-        */
-       function fieldInfo( $table, $field ) {
-               // TODO: Implement fieldInfo() method.
-       }
-
-       /**
-        * Get information about an index into an object
-        * @param string $table Table name
-        * @param string $index Index name
-        * @param string $fname Calling function name
-        * @return mixed Database-specific index description class or false if the index does not exist
-        */
-       function indexInfo( $table, $index, $fname = __METHOD__ ) {
-               // TODO: Implement indexInfo() method.
-       }
-
-       /**
-        * Get the number of rows affected by the last write query
-        * @see https://secure.php.net/mysql_affected_rows
-        *
-        * @return int
-        */
-       function affectedRows() {
-               // TODO: Implement affectedRows() method.
-       }
-
-       /**
-        * Wrapper for addslashes()
-        *
-        * @param string $s String to be slashed.
-        * @return string Slashed string.
-        */
-       function strencode( $s ) {
-               // TODO: Implement strencode() method.
-       }
-
-       /**
-        * Returns a wikitext link to the DB's website, e.g.,
-        *   return "[https://www.mysql.com/ MySQL]";
-        * Should at least contain plain text, if for some reason
-        * your database has no website.
-        *
-        * @return string Wikitext of a link to the server software's web site
-        */
-       function getSoftwareLink() {
-               // TODO: Implement getSoftwareLink() method.
-       }
-
-       /**
-        * A string describing the current software version, like from
-        * mysql_get_server_info().
-        *
-        * @return string Version information from the database server.
-        */
-       function getServerVersion() {
-               // TODO: Implement getServerVersion() method.
-       }
-
-       /**
-        * Closes underlying database connection
-        * @since 1.20
-        * @return bool Whether connection was closed successfully
-        */
-       protected function closeConnection() {
-               // TODO: Implement closeConnection() method.
-       }
-
-       /**
-        * The DBMS-dependent part of query()
-        *
-        * @param string $sql SQL query.
-        * @return ResultWrapper|bool Result object to feed to fetchObject,
-        *   fetchRow, ...; or false on failure
-        */
-       protected function doQuery( $sql ) {
-               // TODO: Implement doQuery() method.
-       }
-}
-
-class FakeDatabaseUpdater extends DatabaseUpdater {
-       function __construct( $db ) {
-               $this->db = $db;
-               self::$updateCounter = 0;
-       }
-
-       /**
-        * Get an array of updates to perform on the database. Should return a
-        * multi-dimensional array. The main key is the MediaWiki version (1.12,
-        * 1.13...) with the values being arrays of updates, identical to how
-        * updaters.inc did it (for now)
-        *
-        * @return array
-        */
-       protected function getCoreUpdateList() {
-               return [];
-       }
-
-       public function canUseNewUpdatelog() {
-               return true;
-       }
-
-       public function setAppliedUpdates( $version, $updates = [] ) {
-               parent::setAppliedUpdates( $version, $updates );
-       }
-}
diff --git a/tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php b/tests/phpunit/includes/libs/rdbms/connectionmanager/ConnectionManagerTest.php
new file mode 100644 (file)
index 0000000..1677851
--- /dev/null
@@ -0,0 +1,139 @@
+<?php
+
+namespace Wikimedia\Tests\Rdbms;
+
+use IDatabase;
+use LoadBalancer;
+use PHPUnit_Framework_MockObject_MockObject;
+use Wikimedia\Rdbms\ConnectionManager;
+
+/**
+ * @covers Wikimedia\Rdbms\ConnectionManager
+ *
+ * @license GPL-2.0+
+ * @author Daniel Kinzler
+ */
+class ConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+
+       /**
+        * @return IDatabase|PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getIDatabaseMock() {
+               return $this->getMock( IDatabase::class );
+       }
+
+       /**
+        * @return LoadBalancer|PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getLoadBalancerMock() {
+               $lb = $this->getMockBuilder( LoadBalancer::class )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               return $lb;
+       }
+
+       public function testGetReadConnection_nullGroups() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_REPLICA, [ 'group1' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getReadConnection();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetReadConnection_withGroups() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_REPLICA, [ 'group2' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getReadConnection( [ 'group2' ] );
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetWriteConnection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_MASTER, [ 'group1' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getWriteConnection();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testReleaseConnection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'reuseConnection' )
+                       ->with( $database )
+                       ->will( $this->returnValue( null ) );
+
+               $manager = new ConnectionManager( $lb );
+               $manager->releaseConnection( $database );
+       }
+
+       public function testGetReadConnectionRef_nullGroups() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnectionRef' )
+                       ->with( DB_REPLICA, [ 'group1' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getReadConnectionRef();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetReadConnectionRef_withGroups() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnectionRef' )
+                       ->with( DB_REPLICA, [ 'group2' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getReadConnectionRef( [ 'group2' ] );
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetWriteConnectionRef() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnectionRef' )
+                       ->with( DB_MASTER, [ 'group1' ], 'someDbName' )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new ConnectionManager( $lb, 'someDbName', [ 'group1' ] );
+               $actual = $manager->getWriteConnectionRef();
+
+               $this->assertSame( $database, $actual );
+       }
+
+}
diff --git a/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php b/tests/phpunit/includes/libs/rdbms/connectionmanager/SessionConsistentConnectionManagerTest.php
new file mode 100644 (file)
index 0000000..4dcab82
--- /dev/null
@@ -0,0 +1,164 @@
+<?php
+
+namespace Wikimedia\Tests\Rdbms;
+
+use IDatabase;
+use LoadBalancer;
+use PHPUnit_Framework_MockObject_MockObject;
+use Wikimedia\Rdbms\SessionConsistentConnectionManager;
+
+/**
+ * @covers Wikimedia\Rdbms\SessionConsistentConnectionManager
+ *
+ * @license GPL-2.0+
+ * @author Daniel Kinzler
+ */
+class SessionConsistentConnectionManagerTest extends \PHPUnit_Framework_TestCase {
+
+       /**
+        * @return IDatabase|PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getIDatabaseMock() {
+               return $this->getMock( IDatabase::class );
+       }
+
+       /**
+        * @return LoadBalancer|PHPUnit_Framework_MockObject_MockObject
+        */
+       private function getLoadBalancerMock() {
+               $lb = $this->getMockBuilder( LoadBalancer::class )
+                       ->disableOriginalConstructor()
+                       ->getMock();
+
+               return $lb;
+       }
+
+       public function testGetReadConnection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_REPLICA )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $actual = $manager->getReadConnection();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetReadConnectionReturnsWriteDbOnForceMatser() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_MASTER )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->prepareForUpdates();
+               $actual = $manager->getReadConnection();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testGetWriteConnection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_MASTER )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $actual = $manager->getWriteConnection();
+
+               $this->assertSame( $database, $actual );
+       }
+
+       public function testForceMaster() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'getConnection' )
+                       ->with( DB_MASTER )
+                       ->will( $this->returnValue( $database ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->prepareForUpdates();
+               $manager->getReadConnection();
+       }
+
+       public function testReleaseConnection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'reuseConnection' )
+                       ->with( $database )
+                       ->will( $this->returnValue( null ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->releaseConnection( $database );
+       }
+
+       public function testBeginAtomicSection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->exactly( 2 ) )
+                       ->method( 'getConnection' )
+                       ->with( DB_MASTER )
+                       ->will( $this->returnValue( $database ) );
+
+               $database->expects( $this->once() )
+                       ->method( 'startAtomic' )
+                       ->will( $this->returnValue( null ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->beginAtomicSection( 'TEST' );
+
+               // Should also ask for a DB_MASTER connection.
+               // This is asserted by the $lb mock.
+               $manager->getReadConnection();
+       }
+
+       public function testCommitAtomicSection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'reuseConnection' )
+                       ->with( $database )
+                       ->will( $this->returnValue( null ) );
+
+               $database->expects( $this->once() )
+                       ->method( 'endAtomic' )
+                       ->will( $this->returnValue( null ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->commitAtomicSection( $database, 'TEST' );
+       }
+
+       public function testRollbackAtomicSection() {
+               $database = $this->getIDatabaseMock();
+               $lb = $this->getLoadBalancerMock();
+
+               $lb->expects( $this->once() )
+                       ->method( 'reuseConnection' )
+                       ->with( $database )
+                       ->will( $this->returnValue( null ) );
+
+               $database->expects( $this->once() )
+                       ->method( 'rollback' )
+                       ->will( $this->returnValue( null ) );
+
+               $manager = new SessionConsistentConnectionManager( $lb );
+               $manager->rollbackAtomicSection( $database, 'TEST' );
+       }
+
+}
index 1de4265..9b57e1c 100644 (file)
@@ -259,7 +259,7 @@ class ExtensionRegistryTest extends MediaWikiTestCase {
                                                'JsonZeroConfig' => [
                                                        'namespace' => 480,
                                                        'nsName' => 'Zero',
-                                                       'isLocal' => false,
+                                                       'isLocal' => true,
                                                ],
                                        ],
                                ],
index e0de588..a88264b 100644 (file)
@@ -126,11 +126,11 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase {
                                'results' => [
                                        'Special:ActiveUsers',
                                        'Special:AllMessages',
-                                       'Special:AllMyFiles',
+                                       'Special:AllMyUploads',
                                ],
                                // Third result when testing offset
                                'offsetresult' => [
-                                       'Special:AllMyUploads',
+                                       'Special:AllPages',
                                ],
                        ] ],
                        [ [
@@ -143,7 +143,7 @@ class SearchEnginePrefixTest extends MediaWikiLangTestCase {
                                ],
                                // Third result when testing offset
                                'offsetresult' => [
-                                       'Special:UncategorizedImages',
+                                       'Special:UncategorizedPages',
                                ],
                        ] ],
                        [ [
index 9d0fdf5..1676130 100644 (file)
@@ -3,16 +3,10 @@
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
                        this.server.respondImmediately = true;
-                       this.clock = this.sandbox.useFakeTimers();
-               },
-               teardown: function () {
-                       // https://github.com/jquery/jquery/issues/2453
-                       this.clock.tick();
                }
        } ) );
 
-       QUnit.test( 'origin is included in GET requests', function ( assert ) {
-               QUnit.expect( 1 );
+       QUnit.test( 'origin is included in GET requests', 1, function ( assert ) {
                var api = new mw.ForeignApi( '//localhost:4242/w/api.php' );
 
                this.server.respond( function ( request ) {
                        request.respond( 200, { 'Content-Type': 'application/json' }, '[]' );
                } );
 
-               api.get( {} );
+               return api.get( {} );
        } );
 
-       QUnit.test( 'origin is included in POST requests', function ( assert ) {
-               QUnit.expect( 2 );
+       QUnit.test( 'origin is included in POST requests', 2, function ( assert ) {
                var api = new mw.ForeignApi( '//localhost:4242/w/api.php' );
 
                this.server.respond( function ( request ) {
@@ -33,7 +26,7 @@
                        request.respond( 200, { 'Content-Type': 'application/json' }, '[]' );
                } );
 
-               api.post( {} );
+               return api.post( {} );
        } );
 
 }( mediaWiki ) );
index a0c7daf..a79bff6 100644 (file)
@@ -2,29 +2,24 @@
        QUnit.module( 'mediawiki.api.category', QUnit.newMwEnvironment( {
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
+                       this.server.respondImmediately = true;
                }
        } ) );
 
-       QUnit.test( '.getCategoriesByPrefix()', function ( assert ) {
-               QUnit.expect( 1 );
+       QUnit.test( '.getCategoriesByPrefix()', 1, function ( assert ) {
+               this.server.respondWith( [ 200, { 'Content-Type': 'application/json' },
+                       '{ "query": { "allpages": [ ' +
+                               '{ "title": "Category:Food" },' +
+                               '{ "title": "Category:Fool Supermarine S.6" },' +
+                               '{ "title": "Category:Fools" }' +
+                               '] } }'
+               ] );
 
-               var api = new mw.Api();
-
-               api.getCategoriesByPrefix( 'Foo' ).done( function ( matches ) {
+               return new mw.Api().getCategoriesByPrefix( 'Foo' ).then( function ( matches ) {
                        assert.deepEqual(
                                matches,
                                [ 'Food', 'Fool Supermarine S.6', 'Fools' ]
                        );
                } );
-
-               this.server.respond( function ( req ) {
-                       req.respond( 200, { 'Content-Type': 'application/json' },
-                               '{ "query": { "allpages": [ ' +
-                                       '{ "title": "Category:Food" },' +
-                                       '{ "title": "Category:Fool Supermarine S.6" },' +
-                                       '{ "title": "Category:Fools" }' +
-                                       '] } }'
-                       );
-               } );
        } );
 }( mediaWiki ) );
index 5880962..d8b5db8 100644 (file)
@@ -2,14 +2,21 @@
        QUnit.module( 'mediawiki.api.messages', QUnit.newMwEnvironment( {
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
+                       this.server.respondImmediately = true;
                }
        } ) );
 
-       QUnit.test( '.getMessages()', function ( assert ) {
-               QUnit.expect( 1 );
+       QUnit.test( '.getMessages()', 1, function ( assert ) {
+               this.server.respondWith( /ammessages=foo%7Cbaz/, [
+                       200,
+                       { 'Content-Type': 'application/json' },
+                       '{ "query": { "allmessages": [' +
+                               '{ "name": "foo", "content": "Foo bar" },' +
+                               '{ "name": "baz", "content": "Baz Quux" }' +
+                               '] } }'
+               ] );
 
-               var api = new mw.Api();
-               api.getMessages( [ 'foo', 'baz' ] ).then( function ( messages ) {
+               return new mw.Api().getMessages( [ 'foo', 'baz' ] ).then( function ( messages ) {
                        assert.deepEqual(
                                messages,
                                {
                                }
                        );
                } );
-
-               this.server.respond( /ammessages=foo%7Cbaz/, [
-                       200,
-                       { 'Content-Type': 'application/json' },
-                       '{ "query": { "allmessages": [' +
-                               '{ "name": "foo", "content": "Foo bar" },' +
-                               '{ "name": "baz", "content": "Baz Quux" }' +
-                               '] } }'
-               ] );
        } );
 }( mediaWiki ) );
index 0797f32..7ed1875 100644 (file)
@@ -2,14 +2,12 @@
        QUnit.module( 'mediawiki.api.options', QUnit.newMwEnvironment( {
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
+                       this.server.respondImmediately = true;
                }
        } ) );
 
-       QUnit.test( 'saveOption', function ( assert ) {
-               QUnit.expect( 2 );
-
-               var
-                       api = new mw.Api(),
+       QUnit.test( 'saveOption', 2, function ( assert ) {
+               var api = new mw.Api(),
                        stub = this.sandbox.stub( mw.Api.prototype, 'saveOptions' );
 
                api.saveOption( 'foo', 'bar' );
@@ -18,9 +16,7 @@
                assert.deepEqual( stub.getCall( 0 ).args, [ { foo: 'bar' } ], '#saveOptions called correctly' );
        } );
 
-       QUnit.test( 'saveOptions without Unit Separator', function ( assert ) {
-               QUnit.expect( 13 );
-
+       QUnit.test( 'saveOptions without Unit Separator', 13, function ( assert ) {
                var api = new mw.Api( { useUS: false } );
 
                // We need to respond to the request for token first, otherwise the other requests won't be sent
                                '{ "query": { "tokens": { "csrftoken": "+\\\\" } } }' ]
                );
 
-               api.saveOptions( {} ).done( function () {
-                       assert.ok( true, 'Request completed: empty case' );
-               } );
-               api.saveOptions( { foo: 'bar' } ).done( function () {
-                       assert.ok( true, 'Request completed: simple' );
-               } );
-               api.saveOptions( { foo: 'bar', baz: 'quux' } ).done( function () {
-                       assert.ok( true, 'Request completed: two options' );
-               } );
-               api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', baz: 'quux' } ).done( function () {
-                       assert.ok( true, 'Request completed: not bundleable' );
-               } );
-               api.saveOptions( { foo: null } ).done( function () {
-                       assert.ok( true, 'Request completed: reset an option' );
-               } );
-               api.saveOptions( { 'foo|bar=quux': null } ).done( function () {
-                       assert.ok( true, 'Request completed: reset an option, not bundleable' );
-               } );
-
                // Requests are POST, match requestBody instead of url
                this.server.respond( function ( request ) {
                        switch ( request.requestBody ) {
                                        assert.ok( false, 'Unexpected request: ' + request.requestBody );
                        }
                } );
-       } );
 
-       QUnit.test( 'saveOptions with Unit Separator', function ( assert ) {
-               QUnit.expect( 14 );
+               return QUnit.whenPromisesComplete(
+                       api.saveOptions( {} ).then( function () {
+                               assert.ok( true, 'Request completed: empty case' );
+                       } ),
+                       api.saveOptions( { foo: 'bar' } ).then( function () {
+                               assert.ok( true, 'Request completed: simple' );
+                       } ),
+                       api.saveOptions( { foo: 'bar', baz: 'quux' } ).then( function () {
+                               assert.ok( true, 'Request completed: two options' );
+                       } ),
+                       api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', baz: 'quux' } ).then( function () {
+                               assert.ok( true, 'Request completed: not bundleable' );
+                       } ),
+                       api.saveOptions( { foo: null } ).then( function () {
+                               assert.ok( true, 'Request completed: reset an option' );
+                       } ),
+                       api.saveOptions( { 'foo|bar=quux': null } ).then( function () {
+                               assert.ok( true, 'Request completed: reset an option, not bundleable' );
+                       } )
+               );
+       } );
 
+       QUnit.test( 'saveOptions with Unit Separator', 14, function ( assert ) {
                var api = new mw.Api( { useUS: true } );
 
                // We need to respond to the request for token first, otherwise the other requests won't be sent
                                '{ "query": { "tokens": { "csrftoken": "+\\\\" } } }' ]
                );
 
-               api.saveOptions( {} ).done( function () {
-                       assert.ok( true, 'Request completed: empty case' );
-               } );
-               api.saveOptions( { foo: 'bar' } ).done( function () {
-                       assert.ok( true, 'Request completed: simple' );
-               } );
-               api.saveOptions( { foo: 'bar', baz: 'quux' } ).done( function () {
-                       assert.ok( true, 'Request completed: two options' );
-               } );
-               api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', baz: 'quux' } ).done( function () {
-                       assert.ok( true, 'Request completed: bundleable with unit separator' );
-               } );
-               api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', 'baz=baz': 'quux' } ).done( function () {
-                       assert.ok( true, 'Request completed: not bundleable with unit separator' );
-               } );
-               api.saveOptions( { foo: null } ).done( function () {
-                       assert.ok( true, 'Request completed: reset an option' );
-               } );
-               api.saveOptions( { 'foo|bar=quux': null } ).done( function () {
-                       assert.ok( true, 'Request completed: reset an option, not bundleable' );
-               } );
-
                // Requests are POST, match requestBody instead of url
                this.server.respond( function ( request ) {
                        switch ( request.requestBody ) {
                                        assert.ok( false, 'Unexpected request: ' + request.requestBody );
                        }
                } );
+
+               return QUnit.whenPromisesComplete(
+                       api.saveOptions( {} ).done( function () {
+                               assert.ok( true, 'Request completed: empty case' );
+                       } ),
+                       api.saveOptions( { foo: 'bar' } ).done( function () {
+                               assert.ok( true, 'Request completed: simple' );
+                       } ),
+                       api.saveOptions( { foo: 'bar', baz: 'quux' } ).done( function () {
+                               assert.ok( true, 'Request completed: two options' );
+                       } ),
+                       api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', baz: 'quux' } ).done( function () {
+                               assert.ok( true, 'Request completed: bundleable with unit separator' );
+                       } ),
+                       api.saveOptions( { foo: 'bar|quux', bar: 'a|b|c', 'baz=baz': 'quux' } ).done( function () {
+                               assert.ok( true, 'Request completed: not bundleable with unit separator' );
+                       } ),
+                       api.saveOptions( { foo: null } ).done( function () {
+                               assert.ok( true, 'Request completed: reset an option' );
+                       } ),
+                       api.saveOptions( { 'foo|bar=quux': null } ).done( function () {
+                               assert.ok( true, 'Request completed: reset an option, not bundleable' );
+                       } )
+               );
        } );
 }( mediaWiki ) );
index dc0cff4..7d27352 100644 (file)
@@ -2,42 +2,44 @@
        QUnit.module( 'mediawiki.api.parse', QUnit.newMwEnvironment( {
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
+                       this.server.respondImmediately = true;
                }
        } ) );
 
-       QUnit.test( 'Hello world', function ( assert ) {
-               QUnit.expect( 3 );
+       QUnit.test( '.parse( string )', function ( assert ) {
+               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+                       { 'Content-Type': 'application/json' },
+                       '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
+               ] );
 
-               var api = new mw.Api();
-
-               api.parse( '\'\'\'Hello world\'\'\'' ).done( function ( html ) {
+               return new mw.Api().parse( '\'\'\'Hello world\'\'\'' ).done( function ( html ) {
                        assert.equal( html, '<p><b>Hello world</b></p>', 'Parse wikitext by string' );
                } );
+       } );
 
-               api.parse( {
+       QUnit.test( '.parse( Object.toString )', function ( assert ) {
+               this.server.respondWith( /action=parse.*&text='''Hello(\+|%20)world'''/, [ 200,
+                       { 'Content-Type': 'application/json' },
+                       '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
+               ] );
+
+               return new mw.Api().parse( {
                        toString: function () {
                                return '\'\'\'Hello world\'\'\'';
                        }
                } ).done( function ( html ) {
                        assert.equal( html, '<p><b>Hello world</b></p>', 'Parse wikitext by toString object' );
                } );
+       } );
 
-               this.server.respondWith( /action=parse.*&text='''Hello\+world'''/, function ( request ) {
-                       request.respond( 200, { 'Content-Type': 'application/json' },
-                               '{ "parse": { "text": "<p><b>Hello world</b></p>" } }'
-                       );
-               } );
+       QUnit.test( '.parse( mw.Title )', function ( assert ) {
+               this.server.respondWith( /action=parse.*&page=Earth/, [ 200,
+                       { 'Content-Type': 'application/json' },
+                       '{ "parse": { "text": "<p><b>Earth</b> is a planet.</p>" } }'
+               ] );
 
-               api.parse( new mw.Title( 'Earth' ) ).done( function ( html ) {
+               return new mw.Api().parse( new mw.Title( 'Earth' ) ).done( function ( html ) {
                        assert.equal( html, '<p><b>Earth</b> is a planet.</p>', 'Parse page by Title object'  );
                } );
-
-               this.server.respondWith( /action=parse.*&page=Earth/, function ( request ) {
-                       request.respond( 200, { 'Content-Type': 'application/json' },
-                               '{ "parse": { "text": "<p><b>Earth</b> is a planet.</p>" } }'
-                       );
-               } );
-
-               this.server.respond();
        } );
 }( mediaWiki ) );
index 10fcd5d..b1bd12b 100644 (file)
@@ -1,8 +1,7 @@
 ( function ( mw, $ ) {
        QUnit.module( 'mediawiki.api.upload', QUnit.newMwEnvironment( {} ) );
 
-       QUnit.test( 'Basic functionality', function ( assert ) {
-               QUnit.expect( 2 );
+       QUnit.test( 'Basic functionality', 2, function ( assert ) {
                var api = new mw.Api();
                assert.ok( api.upload );
                assert.throws( function () {
@@ -10,8 +9,7 @@
                } );
        } );
 
-       QUnit.test( 'Set up iframe upload', function ( assert ) {
-               QUnit.expect( 5 );
+       QUnit.test( 'Set up iframe upload', 5, function ( assert ) {
                var $iframe, $form, $input,
                        api = new mw.Api();
 
index 64a5184..8641469 100644 (file)
@@ -2,37 +2,45 @@
        QUnit.module( 'mediawiki.api.watch', QUnit.newMwEnvironment( {
                setup: function () {
                        this.server = this.sandbox.useFakeServer();
+                       this.server.respondImmediately = true;
                }
        } ) );
 
-       QUnit.test( '.watch()', function ( assert ) {
-               QUnit.expect( 4 );
-
-               var api = new mw.Api();
-
-               // Ensure we don't mistake a single item array for a single item and vice versa.
-               // The query parameter in request is the same either way (separated by pipe).
-               api.watch( 'Foo' ).done( function ( item ) {
-                       assert.equal( item.title, 'Foo' );
-               } );
-
-               api.watch( [ 'Foo' ] ).done( function ( items ) {
-                       assert.equal( items[ 0 ].title, 'Foo' );
+       QUnit.test( '.watch( string )', function ( assert ) {
+               this.server.respond( function ( req ) {
+                       // Match POST requestBody
+                       if ( /action=watch.*&titles=Foo(&|$)/.test( req.requestBody ) ) {
+                               req.respond( 200, { 'Content-Type': 'application/json' },
+                                       '{ "watch": [ { "title": "Foo", "watched": true, "message": "<b>Added</b>" } ] }'
+                               );
+                       }
                } );
 
-               api.watch( [ 'Foo', 'Bar' ] ).done( function ( items ) {
-                       assert.equal( items[ 0 ].title, 'Foo' );
-                       assert.equal( items[ 1 ].title, 'Bar' );
+               return new mw.Api().watch( 'Foo' ).done( function ( item ) {
+                       assert.equal( item.title, 'Foo' );
                } );
+       } );
 
-               // Requests are POST, match requestBody instead of url
+       // Ensure we don't mistake a single item array for a single item and vice versa.
+       // The query parameter in request is the same either way (separated by pipe).
+       QUnit.test( '.watch( Array ) - single', function ( assert ) {
                this.server.respond( function ( req ) {
+                       // Match POST requestBody
                        if ( /action=watch.*&titles=Foo(&|$)/.test( req.requestBody ) ) {
                                req.respond( 200, { 'Content-Type': 'application/json' },
                                        '{ "watch": [ { "title": "Foo", "watched": true, "message": "<b>Added</b>" } ] }'
                                );
                        }
+               } );
+
+               return new mw.Api().watch( [ 'Foo' ] ).done( function ( items ) {
+                       assert.equal( items[ 0 ].title, 'Foo' );
+               } );
+       } );
 
+       QUnit.test( '.watch( Array ) - multi', function ( assert ) {
+               this.server.respond( function ( req ) {
+                       // Match POST requestBody
                        if ( /action=watch.*&titles=Foo%7CBar/.test( req.requestBody ) ) {
                                req.respond( 200, { 'Content-Type': 'application/json' },
                                        '{ "watch": [ ' +
                                );
                        }
                } );
+
+               return new mw.Api().watch( [ 'Foo', 'Bar' ] ).done( function ( items ) {
+                       assert.equal( items[ 0 ].title, 'Foo' );
+                       assert.equal( items[ 1 ].title, 'Bar' );
+               } );
        } );
+
 }( mediaWiki ) );
index 1218137..f848f3e 100644 (file)
        QUnit.test( 'Match PHP parser', mw.libs.phpParserData.tests.length, function ( assert ) {
                mw.messages.set( mw.libs.phpParserData.messages );
                var tasks = $.map( mw.libs.phpParserData.tests, function ( test ) {
+                       var done = assert.async();
                        return function ( next, abort ) {
-                               var done = assert.async();
                                getMwLanguage( test.lang )
                                        .then( function ( langClass ) {
                                                mw.config.set( 'wgUserLanguage', test.lang );
                },
                {
                        lang: 'hi',
-                       number: '१२३४५६,७८९',
+                       number: '१,२३,४५६',
                        result: '123456',
                        integer: true,
                        description: 'formatnum test for Hindi, Devanagari digits passed to get integer value'
                mw.messages.set( 'formatnum-msg', '{{formatnum:$1}}' );
                mw.messages.set( 'formatnum-msg-int', '{{formatnum:$1|R}}' );
                var queue = $.map( formatnumTests, function ( test ) {
+                       var done = assert.async();
                        return function ( next, abort ) {
-                               var done = assert.async();
                                getMwLanguage( test.lang )
                                        .then( function ( langClass ) {
                                                mw.config.set( 'wgUserLanguage', test.lang );
index e4c3851..23720a8 100644 (file)
                assert.equal( mw.language.commafy( 123456789.567, '###,###,#0.00' ), '1,234,567,89.56', 'Decimal part as group of 3 and last one 2' );
        } );
 
+       QUnit.test( 'mw.language.convertNumber', 2, function ( assert ) {
+               mw.language.setData( 'en', 'digitGroupingPattern', null );
+               mw.language.setData( 'en', 'digitTransformTable', null );
+               mw.language.setData( 'en', 'separatorTransformTable', { ',': '.', '.': ',' } );
+               mw.config.set( 'wgUserLanguage', 'en' );
+
+               assert.equal( mw.language.convertNumber( 1800 ), '1.800', 'formatting' );
+               assert.equal( mw.language.convertNumber( "1.800", true ), '1800', 'unformatting' );
+       } );
+
        function grammarTest( langCode, test ) {
                // The test works only if the content language is opt.language
                // because it requires [lang].js to be loaded.
index 92d1326..92ee7dd 100644 (file)
                .done( function () {
                        assert.strictEqual( isAwesomeDone, true, 'test.promise module should\'ve caused isAwesomeDone to be true' );
                        delete mw.loader.testCallback;
-
                } )
                .fail( function () {
                        assert.ok( false, 'Error callback fired while loader.using "test.promise" module' );
        } );
 
        QUnit.test( '.using() Error: Circular dependency', function ( assert ) {
+               var done = assert.async();
+
                mw.loader.register( [
                        [ 'test.circle1', '0', [ 'test.circle2' ] ],
                        [ 'test.circle2', '0', [ 'test.circle3' ] ],
                        function fail( e ) {
                                assert.ok( /Circular/.test( String( e ) ), 'Detect circular dependency' );
                        }
-               );
+               )
+               .always( done );
        } );
 
        QUnit.test( '.load() - Error: Circular dependency', function ( assert ) {
        } );
 
        QUnit.test( '.using() - Error: Unregistered', function ( assert ) {
+               var done = assert.async();
+
                mw.loader.using( 'test.using.unreg' ).then(
                        function done() {
                                assert.ok( false, 'Unexpected resolution, expected error.' );
                        function fail( e ) {
                                assert.ok( /Unknown/.test( String( e ) ), 'Detect unknown dependency' );
                        }
-               );
+               ).always( done );
        } );
 
        QUnit.test( '.load() - Error: Unregistered (ignored)', 0, function ( assert ) {
index 6cef4a7..436cb2e 100644 (file)
@@ -1,36 +1,56 @@
 ( function ( mw ) {
        QUnit.module( 'mediawiki.storage' );
 
-       QUnit.test( 'set/get with localStorage', 3, function ( assert ) {
-               this.sandbox.stub( mw.storage, 'localStorage', {
+       QUnit.test( 'set/get with storage support', function ( assert ) {
+               var stub = {
                        setItem: this.sandbox.spy(),
                        getItem: this.sandbox.stub()
-               } );
+               };
+               stub.getItem.withArgs( 'foo' ).returns( 'test' );
+               stub.getItem.returns( null );
+               this.sandbox.stub( mw.storage, 'store', stub );
 
                mw.storage.set( 'foo', 'test' );
-               assert.ok( mw.storage.localStorage.setItem.calledOnce );
+               assert.ok( stub.setItem.calledOnce );
 
-               mw.storage.localStorage.getItem.withArgs( 'foo' ).returns( 'test' );
-               mw.storage.localStorage.getItem.returns( null );
                assert.strictEqual( mw.storage.get( 'foo' ), 'test', 'Check value gets stored.' );
                assert.strictEqual( mw.storage.get( 'bar' ), null, 'Unset values are null.' );
        } );
 
-       QUnit.test( 'set/get without localStorage', 3, function ( assert ) {
-               this.sandbox.stub( mw.storage, 'localStorage', {
+       QUnit.test( 'set/get with storage methods disabled', function ( assert ) {
+               // This covers browsers where storage is disabled
+               // (quota full, or security/privacy settings).
+               // On most browsers, these interface will be accessible with
+               // their methods throwing.
+               var stub = {
                        getItem: this.sandbox.stub(),
                        removeItem: this.sandbox.stub(),
                        setItem: this.sandbox.stub()
-               } );
+               };
+               stub.getItem.throws();
+               stub.setItem.throws();
+               stub.removeItem.throws();
+               this.sandbox.stub( mw.storage, 'store', stub );
 
-               mw.storage.localStorage.getItem.throws();
                assert.strictEqual( mw.storage.get( 'foo' ), false );
-
-               mw.storage.localStorage.setItem.throws();
                assert.strictEqual( mw.storage.set( 'foo', 'test' ), false );
+               assert.strictEqual( mw.storage.remove( 'foo', 'test' ), false );
+       } );
+
+       QUnit.test( 'set/get with storage object disabled', function ( assert ) {
+               // On other browsers, these entire object is disabled.
+               // `'localStorage' in window` would be true (and pass feature test)
+               // but trying to read the object as window.localStorage would throw
+               // an exception. Such case would instantiate SafeStorage with
+               // undefined after the internal try/catch.
+               var old = mw.storage.store;
+               mw.storage.store = undefined;
 
-               mw.storage.localStorage.removeItem.throws();
+               assert.strictEqual( mw.storage.get( 'foo' ), false );
+               assert.strictEqual( mw.storage.set( 'foo', 'test' ), false );
                assert.strictEqual( mw.storage.remove( 'foo', 'test' ), false );
+
+               mw.storage.store = old;
        } );
 
 }( mediaWiki ) );
index fca25c5..c38b89c 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -341,6 +341,7 @@ function wfStreamThumb( array $params ) {
        // Check for thumbnail generation errors...
        $msg = wfMessage( 'thumbnail_error' );
        $errorCode = 500;
+
        if ( !$thumb ) {
                $errorMsg = $errorMsg ?: $msg->rawParams( 'File::transform() returned false' )->escaped();
                if ( $errorMsg instanceof MessageSpecifier &&
@@ -350,6 +351,7 @@ function wfStreamThumb( array $params ) {
                }
        } elseif ( $thumb->isError() ) {
                $errorMsg = $thumb->getHtmlMsg();
+               $errorCode = $thumb->getHttpStatusCode();
        } elseif ( !$thumb->hasFile() ) {
                $errorMsg = $msg->rawParams( 'No path supplied in thumbnail object' )->escaped();
        } elseif ( $thumb->fileIsSource() ) {