Merge "resourceloader: Simplify StringSet fallback"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 20 Sep 2018 07:58:03 +0000 (07:58 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 20 Sep 2018 07:58:03 +0000 (07:58 +0000)
420 files changed:
.eslintrc.json
.phpcs.xml
RELEASE-NOTES-1.32
autoload.php
composer.json
docs/hooks.txt
includes/AutoLoader.php
includes/DefaultSettings.php
includes/EditPage.php
includes/Revision/RenderedRevision.php
includes/Revision/SlotRenderingProvider.php [new file with mode: 0644]
includes/Storage/DerivedPageDataUpdater.php
includes/Storage/RevisionStore.php
includes/Title.php
includes/WebRequest.php
includes/actions/RollbackAction.php
includes/api/ApiQueryAllDeletedRevisions.php
includes/api/ApiQueryInfo.php
includes/api/i18n/ar.json
includes/api/i18n/ja.json
includes/api/i18n/zh-hant.json
includes/cache/localisation/LocalisationCache.php
includes/content/Content.php
includes/content/ContentHandler.php
includes/gallery/PackedImageGallery.php
includes/installer/i18n/nap.json
includes/jobqueue/JobQueueDB.php
includes/libs/virtualrest/ParsoidVirtualRESTService.php
includes/media/JpegHandler.php
includes/page/Article.php
includes/page/ImageHistoryList.php
includes/page/WikiPage.php
includes/parser/Preprocessor_Hash.php
includes/resourceloader/ResourceLoader.php
includes/resourceloader/ResourceLoaderClientHtml.php
includes/resourceloader/ResourceLoaderImage.php
includes/resourceloader/ResourceLoaderSkinModule.php
includes/resourceloader/ResourceLoaderStartUpModule.php
includes/specialpage/LoginSignupSpecialPage.php
includes/specials/SpecialFilepath.php
includes/specials/SpecialRedirect.php
includes/specials/forms/PreferencesFormOOUI.php
includes/user/User.php
includes/watcheditem/WatchedItemStore.php
languages/Language.php
languages/classes/LanguageKk.php
languages/data/CrhExceptions.php
languages/i18n/ar.json
languages/i18n/ast.json
languages/i18n/be-tarask.json
languages/i18n/bg.json
languages/i18n/bn.json
languages/i18n/cdo.json
languages/i18n/cs.json
languages/i18n/da.json
languages/i18n/de.json
languages/i18n/en.json
languages/i18n/fi.json
languages/i18n/fr.json
languages/i18n/gcr.json
languages/i18n/gl.json
languages/i18n/gsw.json
languages/i18n/he.json
languages/i18n/hu.json
languages/i18n/hy.json
languages/i18n/io.json
languages/i18n/it.json
languages/i18n/ja.json
languages/i18n/jv.json
languages/i18n/kjp.json
languages/i18n/ko.json
languages/i18n/lt.json
languages/i18n/lv.json
languages/i18n/mk.json
languages/i18n/mnw.json
languages/i18n/mr.json
languages/i18n/my.json
languages/i18n/nan.json
languages/i18n/nap.json
languages/i18n/nb.json
languages/i18n/nl.json
languages/i18n/or.json
languages/i18n/pfl.json
languages/i18n/pl.json
languages/i18n/pt-br.json
languages/i18n/pt.json
languages/i18n/qqq.json
languages/i18n/roa-tara.json
languages/i18n/ru.json
languages/i18n/rue.json
languages/i18n/skr-arab.json
languages/i18n/sl.json
languages/i18n/sr-ec.json
languages/i18n/sv.json
languages/i18n/ta.json
languages/i18n/tr.json
languages/i18n/uk.json
languages/i18n/zh-hans.json
languages/i18n/zh-hant.json
languages/messages/MessagesBi.php [new file with mode: 0644]
languages/messages/MessagesEn_ca.php [new file with mode: 0644]
languages/messages/MessagesEn_gb.php
languages/messages/MessagesJam.php [new file with mode: 0644]
languages/messages/MessagesPih.php [new file with mode: 0644]
languages/messages/MessagesSco.php [new file with mode: 0644]
maintenance/Maintenance.php
maintenance/benchmarks/benchmarkTidy.php
maintenance/cleanupInvalidDbKeys.php
maintenance/createCommonPasswordCdb.php
maintenance/dumpIterator.php
maintenance/edit.php
maintenance/includes/DeleteLocalPasswords.php
mw-config/config.js
resources/src/jquery.spinner/spinner.js
resources/src/jquery.tablesorter/jquery.tablesorter.js
resources/src/jquery.tipsy/jquery.tipsy.js
resources/src/jquery/jquery.accessKeyLabel.js
resources/src/jquery/jquery.byteLength.js
resources/src/jquery/jquery.checkboxShiftClick.js
resources/src/jquery/jquery.color.js
resources/src/jquery/jquery.colorUtil.js
resources/src/jquery/jquery.confirmable.js
resources/src/jquery/jquery.confirmable.mediawiki.js
resources/src/jquery/jquery.getAttrs.js
resources/src/jquery/jquery.hidpi.js
resources/src/jquery/jquery.highlightText.js
resources/src/jquery/jquery.lengthLimit.js
resources/src/jquery/jquery.localize.js
resources/src/jquery/jquery.makeCollapsible.js
resources/src/jquery/jquery.mw-jump.js
resources/src/jquery/jquery.suggestions.js
resources/src/jquery/jquery.tabIndex.js
resources/src/jquery/jquery.textSelection.js
resources/src/mediawiki.ForeignApi.core.js
resources/src/mediawiki.ForeignStructuredUpload.BookletLayout/BookletLayout.js
resources/src/mediawiki.ForeignStructuredUpload.js
resources/src/mediawiki.ForeignUpload.js
resources/src/mediawiki.RegExp.js
resources/src/mediawiki.Title/Title.js
resources/src/mediawiki.Title/phpCharToUpper.js
resources/src/mediawiki.Upload.BookletLayout/BookletLayout.js
resources/src/mediawiki.Upload.Dialog.js
resources/src/mediawiki.Upload.js
resources/src/mediawiki.Uri/Uri.js
resources/src/mediawiki.action/mediawiki.action.delete.file.js
resources/src/mediawiki.action/mediawiki.action.delete.js
resources/src/mediawiki.action/mediawiki.action.edit.collapsibleFooter.js
resources/src/mediawiki.action/mediawiki.action.edit.editWarning.js
resources/src/mediawiki.action/mediawiki.action.edit.js
resources/src/mediawiki.action/mediawiki.action.edit.preview.js
resources/src/mediawiki.action/mediawiki.action.edit.stash.js
resources/src/mediawiki.action/mediawiki.action.history.js
resources/src/mediawiki.action/mediawiki.action.view.dblClickEdit.js
resources/src/mediawiki.action/mediawiki.action.view.metadata.js
resources/src/mediawiki.action/mediawiki.action.view.postEdit.js
resources/src/mediawiki.action/mediawiki.action.view.redirect.js
resources/src/mediawiki.action/mediawiki.action.view.rightClickEdit.js
resources/src/mediawiki.api/category.js
resources/src/mediawiki.api/edit.js
resources/src/mediawiki.api/index.js
resources/src/mediawiki.api/login.js
resources/src/mediawiki.api/messages.js
resources/src/mediawiki.api/options.js
resources/src/mediawiki.api/parse.js
resources/src/mediawiki.api/rollback.js
resources/src/mediawiki.api/upload.js
resources/src/mediawiki.api/user.js
resources/src/mediawiki.api/watch.js
resources/src/mediawiki.checkboxtoggle.js
resources/src/mediawiki.confirmCloseWindow.js
resources/src/mediawiki.cookie.js
resources/src/mediawiki.debug/debug.js
resources/src/mediawiki.debug/jquery.footHovzer.js
resources/src/mediawiki.experiments.js
resources/src/mediawiki.feedback/feedback.js
resources/src/mediawiki.filewarning/filewarning.js
resources/src/mediawiki.htmlform.checker.js
resources/src/mediawiki.htmlform.ooui/Element.js
resources/src/mediawiki.htmlform/autocomplete.js
resources/src/mediawiki.htmlform/autoinfuse.js
resources/src/mediawiki.htmlform/checkmatrix.js
resources/src/mediawiki.htmlform/cloner.js
resources/src/mediawiki.htmlform/hide-if.js
resources/src/mediawiki.htmlform/htmlform.js
resources/src/mediawiki.htmlform/multiselect.js
resources/src/mediawiki.htmlform/selectandother.js
resources/src/mediawiki.htmlform/selectorother.js
resources/src/mediawiki.inspect.js
resources/src/mediawiki.jqueryMsg/mediawiki.jqueryMsg.js
resources/src/mediawiki.language/mediawiki.cldr.js
resources/src/mediawiki.language/mediawiki.language.fallback.js
resources/src/mediawiki.language/mediawiki.language.init.js
resources/src/mediawiki.language/mediawiki.language.js
resources/src/mediawiki.language/mediawiki.language.months.js
resources/src/mediawiki.language/mediawiki.language.numbers.js
resources/src/mediawiki.legacy/protect.js
resources/src/mediawiki.legacy/wikibits.js
resources/src/mediawiki.libs.jpegmeta/export.js
resources/src/mediawiki.libs.pluralruleparser/export.js
resources/src/mediawiki.messagePoster.wikitext/WikitextMessagePoster.js
resources/src/mediawiki.messagePoster/MessagePoster.js
resources/src/mediawiki.messagePoster/factory.js
resources/src/mediawiki.notification.convertmessagebox.js
resources/src/mediawiki.notification/notification.js
resources/src/mediawiki.notify.js
resources/src/mediawiki.page.gallery.js
resources/src/mediawiki.page.gallery.slideshow.js
resources/src/mediawiki.page.image.pagination.js
resources/src/mediawiki.page.patrol.ajax.js
resources/src/mediawiki.page.ready.js
resources/src/mediawiki.page.rollback.js
resources/src/mediawiki.page.startup.js
resources/src/mediawiki.page.watch.ajax.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ChangesListViewModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterGroup.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.ItemModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueriesModel.js
resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.SavedQueryItemModel.js
resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
resources/src/mediawiki.rcfilters/mw.rcfilters.HighlightColors.js
resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
resources/src/mediawiki.rcfilters/mw.rcfilters.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitAndDateButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesLimitPopupWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.CheckboxInputWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.DatePopupWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemHighlightButton.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuHeaderWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuOptionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterMenuSectionOptionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterTagMultiselectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.GroupWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightColorPickerWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.HighlightPopupWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ItemMenuOptionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.LiveUpdateButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MainWrapperWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MarkSeenButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTargetPageWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclToOrFromWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RclTopSectionWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SaveFiltersPopupButtonWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.SavedLinksListWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.TagItemWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ValuePickerWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ViewSwitchWidget.js
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.WatchlistTopSectionWidget.js
resources/src/mediawiki.searchSuggest/searchSuggest.js
resources/src/mediawiki.special.apisandbox/apisandbox.js
resources/src/mediawiki.special.block.js
resources/src/mediawiki.special.changecredentials.js
resources/src/mediawiki.special.changeslist.legend.js
resources/src/mediawiki.special.contributions.js
resources/src/mediawiki.special.edittags.js
resources/src/mediawiki.special.import.js
resources/src/mediawiki.special.movePage.js
resources/src/mediawiki.special.pageLanguage.js
resources/src/mediawiki.special.preferences.ooui/editfont.js
resources/src/mediawiki.special.preferences.ooui/tabs.js
resources/src/mediawiki.special.preferences.styles.ooui.less
resources/src/mediawiki.special.preferences/confirmClose.js
resources/src/mediawiki.special.preferences/convertmessagebox.js
resources/src/mediawiki.special.preferences/personalEmail.js
resources/src/mediawiki.special.preferences/tabs.legacy.js
resources/src/mediawiki.special.preferences/timezone.js
resources/src/mediawiki.special.recentchanges.js
resources/src/mediawiki.special.revisionDelete.js
resources/src/mediawiki.special.search.commonsInterwikiWidget.js
resources/src/mediawiki.special.search/search.js
resources/src/mediawiki.special.undelete.js
resources/src/mediawiki.special.unwatchedPages/unwatchedPages.js
resources/src/mediawiki.special.upload/upload.js
resources/src/mediawiki.special.userlogin.signup.js
resources/src/mediawiki.special.userrights.js
resources/src/mediawiki.special.watchlist/visitedstatus.js
resources/src/mediawiki.special.watchlist/watchlist.js
resources/src/mediawiki.storage.js
resources/src/mediawiki.template.js
resources/src/mediawiki.template.mustache.js
resources/src/mediawiki.template.regexp.js
resources/src/mediawiki.toc/toc.js
resources/src/mediawiki.toolbar/toolbar.js
resources/src/mediawiki.user.js
resources/src/mediawiki.userSuggest.js
resources/src/mediawiki.util.js
resources/src/mediawiki.viewport.js
resources/src/mediawiki.visibleTimeout.js
resources/src/mediawiki.widgets.datetime/CalendarWidget.js
resources/src/mediawiki.widgets.datetime/DateTimeFormatter.js
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.less
resources/src/mediawiki.widgets.datetime/DiscordianDateTimeFormatter.js
resources/src/mediawiki.widgets.datetime/ProlepticGregorianDateTimeFormatter.js
resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.definitions.less
resources/src/mediawiki.widgets.datetime/mediawiki.widgets.datetime.js
resources/src/mediawiki.widgets.visibleLengthLimit/mediawiki.widgets.visibleLengthLimit.js
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.MediaResourceQueue.js
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaResultWidget.js
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchProvider.js
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchQueue.js
resources/src/mediawiki.widgets/MediaSearch/mw.widgets.MediaSearchWidget.js
resources/src/mediawiki.widgets/mw.widgets.CalendarWidget.js
resources/src/mediawiki.widgets/mw.widgets.CategoryMultiselectWidget.js
resources/src/mediawiki.widgets/mw.widgets.CategoryTagItemWidget.js
resources/src/mediawiki.widgets/mw.widgets.CheckMatrixWidget.js
resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.DateInputWidget.styles.less
resources/src/mediawiki.widgets/mw.widgets.ExpiryInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.NamespaceInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.SearchInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.SelectWithInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.SizeFilterWidget.js
resources/src/mediawiki.widgets/mw.widgets.StashedFileWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleSearchWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.js
resources/src/mediawiki.widgets/mw.widgets.TitleWidget.less
resources/src/mediawiki.widgets/mw.widgets.UserInputWidget.js
resources/src/mediawiki.widgets/mw.widgets.UsersMultiselectWidget.js
resources/src/moment/moment-locale-overrides.js
resources/src/ooui-local.js
resources/src/startup/mediawiki.js
tests/integration/includes/http/MWHttpRequestTestCase.php
tests/parser/ParserTestRunner.php
tests/parser/editTests.php
tests/phpunit/MediaWikiTestCase.php
tests/phpunit/includes/Storage/DerivedPageDataUpdaterTest.php
tests/phpunit/includes/Storage/RevisionRecordTests.php
tests/phpunit/includes/Storage/RevisionStoreDbTestBase.php
tests/phpunit/includes/api/ApiQueryPrefixSearchTest.php
tests/phpunit/includes/api/ApiQuerySiteinfoTest.php
tests/phpunit/includes/content/WikitextContentHandlerTest.php
tests/phpunit/includes/libs/composer/ComposerLockTest.php
tests/phpunit/includes/linker/LinkRendererTest.php
tests/phpunit/includes/media/FormatMetadataTest.php
tests/phpunit/includes/page/WikiPageDbTestBase.php
tests/phpunit/includes/page/WikiPageMcrReadNewDbTest.php
tests/phpunit/includes/page/WikiPageNoContentModelDbTest.php
tests/phpunit/includes/poolcounter/PoolWorkArticleViewTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderTest.php
tests/phpunit/includes/resourceloader/ResourceLoaderWikiModuleTest.php
tests/phpunit/includes/sparql/SparqlClientTest.php
tests/phpunit/includes/specials/SpecialRedirectTest.php [new file with mode: 0644]
tests/phpunit/includes/watcheditem/WatchedItemStoreUnitTest.php
tests/phpunit/structure/StructureTest.php
tests/qunit/data/mwLoaderTestCallback.js
tests/qunit/data/testrunner.js
tests/qunit/suites/resources/jquery/jquery.accessKeyLabel.test.js
tests/qunit/suites/resources/jquery/jquery.color.test.js
tests/qunit/suites/resources/jquery/jquery.colorUtil.test.js
tests/qunit/suites/resources/jquery/jquery.getAttrs.test.js
tests/qunit/suites/resources/jquery/jquery.hidpi.test.js
tests/qunit/suites/resources/jquery/jquery.highlightText.test.js
tests/qunit/suites/resources/jquery/jquery.lengthLimit.test.js
tests/qunit/suites/resources/jquery/jquery.localize.test.js
tests/qunit/suites/resources/jquery/jquery.makeCollapsible.test.js
tests/qunit/suites/resources/jquery/jquery.tabIndex.test.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
tests/qunit/suites/resources/jquery/jquery.tablesorter.test.js
tests/qunit/suites/resources/jquery/jquery.textSelection.test.js
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.edit.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.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.rcfilters/UriProcessor.test.js
tests/qunit/suites/resources/mediawiki.rcfilters/dm.FilterItem.test.js
tests/qunit/suites/resources/mediawiki.rcfilters/dm.FiltersViewModel.test.js
tests/qunit/suites/resources/mediawiki.rcfilters/dm.SavedQueriesModel.test.js
tests/qunit/suites/resources/mediawiki.rcfilters/dm.SavedQueryItemModel.test.js
tests/qunit/suites/resources/mediawiki.special/mediawiki.special.recentchanges.test.js
tests/qunit/suites/resources/mediawiki.widgets/MediaSearch/mediawiki.widgets.APIResultsQueue.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.RegExp.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.String.trimByteLength.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.Uri.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.base.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.cldr.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.cookie.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.errorLogger.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.experiments.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.html.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.inspect.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jqueryMsg.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.jscompat.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.messagePoster.factory.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.requestIdleCallback.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.storage.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.template.mustache.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.template.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.track.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.user.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.util.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.viewport.test.js
tests/qunit/suites/resources/mediawiki/mediawiki.visibleTimeout.test.js

index 4630e07..c076751 100644 (file)
@@ -8,8 +8,6 @@
                "module": false,
                "mw": false,
                "$": false,
-               "mediaWiki": false,
-               "jQuery": false,
                "OO": false
        },
        "rules": {
index bd0ab82..2bce5b2 100644 (file)
@@ -2,14 +2,12 @@
 <ruleset name="MediaWiki">
        <rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
                <exclude name="Generic.ControlStructures.InlineControlStructure" />
-               <exclude name="MediaWiki.Commenting.FunctionAnnotations.UnrecognizedAnnotation" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationProtected" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingParamTag" />
                <exclude name="MediaWiki.Commenting.FunctionComment.MissingReturn" />
                <exclude name="MediaWiki.Commenting.FunctionComment.ExtraParamComment" />
                <exclude name="MediaWiki.Commenting.FunctionComment.WrongStyle" />
-               <exclude name="MediaWiki.Commenting.PhpunitAnnotations.NotClassTrait" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart" />
                <exclude name="MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentEnd" />
                <exclude name="MediaWiki.ControlStructures.AssignmentInControlStructures.AssignmentInControlStructures" />
index afafc23..5954b87 100644 (file)
@@ -433,6 +433,18 @@ because of Phabricator reports.
   'help', 'help-message', 'help-messages' instead.
 * (T197179) HTMLFormField::getNotices() is now deprecated.
 * The jquery.localize module is now deprecated. Use jquery.i18n instead.
+* The SecondaryDataUpdates hook was deprecated in favor of RevisionDataUpdates,
+  or overriding ContentHandler::getSecondaryDataUpdates (T194038).
+* The WikiPageDeletionUpdates hook was deprecated in favor of
+  PageDeletionDataUpdates, or overriding ContentHandler::getDeletionDataUpdates
+  (T194038).
+* Content::getSecondaryDataUpdates has been deprecated in favor of
+  ContentHandler::getSecondaryDataUpdates() for overriding by extensions
+  (T194038).
+  Application logic should call WikiPage::doSecondaryDataUpdates() (T194037).
+* Content::getDeletionUpdates has been deprecated in favor of
+  ContentHandler::getDeletionUpdates() for overriding by extensions (T194038).
+  Application logic should call WikiPage::doSecondaryDataUpdates() (T194037).
 
 === Other changes in 1.32 ===
 * (T198811) The following tables have had their UNIQUE indexes turned into
index b52dfb7..67285d0 100644 (file)
@@ -897,6 +897,7 @@ $wgAutoloadLocalClasses = [
        'MediaWiki\\ProcOpenError' => __DIR__ . '/includes/exception/ProcOpenError.php',
        'MediaWiki\\Revision\\RenderedRevision' => __DIR__ . '/includes/Revision/RenderedRevision.php',
        'MediaWiki\\Revision\\RevisionRenderer' => __DIR__ . '/includes/Revision/RevisionRenderer.php',
+       'MediaWiki\\Revision\\SlotRenderingProvider' => __DIR__ . '/includes/Revision/SlotRenderingProvider.php',
        'MediaWiki\\Search\\ParserOutputSearchDataExtractor' => __DIR__ . '/includes/search/ParserOutputSearchDataExtractor.php',
        'MediaWiki\\ShellDisabledError' => __DIR__ . '/includes/exception/ShellDisabledError.php',
        'MediaWiki\\Site\\MediaWikiPageNameNormalizer' => __DIR__ . '/includes/site/MediaWikiPageNameNormalizer.php',
index bd3a696..e99fe81 100644 (file)
@@ -62,7 +62,7 @@
                "jakub-onderka/php-parallel-lint": "0.9.2",
                "jetbrains/phpstorm-stubs": "dev-master#38ff1a581b297f7901e961b8c923862ea80c3b96",
                "justinrainbow/json-schema": "~5.2",
-               "mediawiki/mediawiki-codesniffer": "21.0.0",
+               "mediawiki/mediawiki-codesniffer": "22.0.0",
                "monolog/monolog": "~1.22.1",
                "nikic/php-parser": "3.1.3",
                "seld/jsonlint": "1.7.1",
index 9a53ccf..8223814 100644 (file)
@@ -2546,6 +2546,12 @@ $originalRevId: if the edit restores or repeats an earlier revision (such as a
   (Used to be called $baseRevId.)
 $undidRevId: the rev ID (or 0) this edit undid
 
+'PageDeletionDataUpdates': Called when constructing a list of DeferrableUpdate to be
+executed when a page is deleted.
+$title The Title of the page being deleted.
+$revision A RevisionRecord representing the page's current revision at the time of deletion.
+&$updates A list of DeferrableUpdate that can be manipulated by the hook handler.
+
 'PageHistoryBeforeList': When a history page list is about to be constructed.
 &$article: the article that the history is loading for
 $context: RequestContext object
@@ -2919,6 +2925,13 @@ called after the addition of 'qunit' and MediaWiki testing resources.
   added to any module.
 &$ResourceLoader: object
 
+'RevisionDataUpdates': Called when constructing a list of DeferrableUpdate to be
+executed to record secondary data about a revision.
+$title The Title of the page the revision  belongs to
+$renderedRevision a RenderedRevision object representing the new revision and providing access
+  to the RevisionRecord as well as ParserOutput of that revision.
+&$updates A list of DeferrableUpdate that can be manipulated by the hook handler.
+
 'RevisionRecordInserted': Called after a revision is inserted into the database.
 $revisionRecord: the RevisionRecord that has just been inserted.
 
@@ -2978,9 +2991,9 @@ result augmentors.
 Note that lists should be in the format name => object and the names in both
   lists should be distinct.
 
-'SecondaryDataUpdates': Allows modification of the list of DataUpdates to
-perform when page content is modified. Currently called by
-AbstractContent::getSecondaryDataUpdates.
+'SecondaryDataUpdates': DEPRECATED! Use RevisionDataUpdates or override
+ContentHandler::getSecondaryDataUpdates instead.
+Allows modification of the list of DataUpdates to perform when page content is modified.
 $title: Title of the page that is being edited.
 $oldContent: Content object representing the page's content before the edit.
 $recursive: bool indicating whether DataUpdates should trigger recursive
@@ -4038,10 +4051,9 @@ dumps. One, and only one hook should set this, and return false.
 &$opts: Options to use for the query
 &$join: Join conditions
 
-'WikiPageDeletionUpdates': manipulate the list of DeferrableUpdates to be
-applied when a page is deleted. Called in WikiPage::getDeletionUpdates(). Note
-that updates specific to a content model should be provided by the respective
-Content's getDeletionUpdates() method.
+'WikiPageDeletionUpdates': DEPRECATED! Use PageDeletionDataUpdates or
+override ContentHandler::getDeletionDataUpdates instead.
+Manipulates the list of DeferrableUpdates to be applied when a page is deleted.
 $page: the WikiPage
 $content: the Content to generate updates for, or null in case the page revision
   could not be loaded. The delete will succeed despite this.
index c9932d6..5482f6a 100644 (file)
@@ -132,14 +132,14 @@ class AutoLoader {
                        'MediaWiki\\Auth\\' => __DIR__ . '/auth/',
                        'MediaWiki\\Edit\\' => __DIR__ . '/edit/',
                        'MediaWiki\\EditPage\\' => __DIR__ . '/editpage/',
-                       'MediaWiki\\Linker\\' => __DIR__ .'/linker/',
-                       'MediaWiki\\Preferences\\' => __DIR__ .'/preferences/',
-                       'MediaWiki\\Services\\' => __DIR__ .'/services/',
-                       'MediaWiki\\Session\\' => __DIR__ .'/session/',
-                       'MediaWiki\\Shell\\' => __DIR__ .'/shell/',
-                       'MediaWiki\\Sparql\\' => __DIR__ .'/sparql/',
-                       'MediaWiki\\Storage\\' => __DIR__ .'/Storage/',
-                       'MediaWiki\\Tidy\\' => __DIR__ .'/tidy/',
+                       'MediaWiki\\Linker\\' => __DIR__ . '/linker/',
+                       'MediaWiki\\Preferences\\' => __DIR__ . '/preferences/',
+                       'MediaWiki\\Services\\' => __DIR__ . '/services/',
+                       'MediaWiki\\Session\\' => __DIR__ . '/session/',
+                       'MediaWiki\\Shell\\' => __DIR__ . '/shell/',
+                       'MediaWiki\\Sparql\\' => __DIR__ . '/sparql/',
+                       'MediaWiki\\Storage\\' => __DIR__ . '/Storage/',
+                       'MediaWiki\\Tidy\\' => __DIR__ . '/tidy/',
                ];
        }
 }
index 343e80d..ab67225 100644 (file)
@@ -3288,7 +3288,7 @@ $wgUseMediaWikiUIEverywhere = false;
  *
  * @since 1.32
  */
-$wgOOUIPreferences = false;
+$wgOOUIPreferences = true;
 
 /**
  * Whether to label the store-to-database-and-show-to-others button in the editor
@@ -4833,7 +4833,7 @@ $wgReservedUsernames = [
        'Maintenance script', // Maintenance scripts which perform editing, image import script
        'Template namespace initialisation script', // Used in 1.2->1.3 upgrade
        'ScriptImporter', // Default user name used by maintenance/importSiteScripts.php
-       'Unknown user', // Used in WikiImporter when importing revisions with no author
+       'Unknown user', // Used in WikiImporter and RevisionStore for revisions with no author
        'msg:double-redirect-fixer', // Automatic double redirect fix
        'msg:usermessage-editor', // Default user for leaving user messages
        'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
index 64b2f01..f1f0572 100644 (file)
@@ -1689,7 +1689,7 @@ class EditPage {
                                // is if an extension hook aborted from inside ArticleSave.
                                // Render the status object into $this->hookError
                                // FIXME this sucks, we should just use the Status object throughout
-                               $this->hookError = '<div class="error">' ."\n" . $status->getWikiText() .
+                               $this->hookError = '<div class="error">' . "\n" . $status->getWikiText() .
                                        '</div>';
                                return true;
                }
index ba40a81..fa16c61 100644 (file)
@@ -42,7 +42,7 @@ use Wikimedia\Assert\Assert;
  *
  * @since 1.32
  */
-class RenderedRevision {
+class RenderedRevision implements SlotRenderingProvider {
 
        /**
         * @var Title
diff --git a/includes/Revision/SlotRenderingProvider.php b/includes/Revision/SlotRenderingProvider.php
new file mode 100644 (file)
index 0000000..740f0f2
--- /dev/null
@@ -0,0 +1,32 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: daki
+ * Date: 05.09.18
+ * Time: 16:08
+ */
+namespace MediaWiki\Revision;
+
+use MediaWiki\Storage\SuppressedDataException;
+use ParserOutput;
+
+/**
+ * A lazy provider of ParserOutput objects for a revision's individual slots.
+ *
+ * @since 1.32
+ */
+interface SlotRenderingProvider {
+
+       /**
+        * @param string $role
+        * @param array $hints Hints given as an associative array. Known keys:
+        *      - 'generate-html' => bool: Whether the caller is interested in output HTML (as opposed
+        *        to just meta-data). Default is to generate HTML.
+        *
+        * @throws SuppressedDataException if the content is not accessible for the audience
+        *         specified in the constructor.
+        * @return ParserOutput
+        */
+       public function getSlotParserOutput( $role, array $hints = [] );
+
+}
index 99c31b2..e34e406 100644 (file)
@@ -27,12 +27,14 @@ use CategoryMembershipChangeJob;
 use Content;
 use ContentHandler;
 use DataUpdate;
+use DeferrableUpdate;
 use DeferredUpdates;
 use Hooks;
 use IDBAccessObject;
 use InvalidArgumentException;
 use JobQueueGroup;
 use Language;
+use LinksDeletionUpdate;
 use LinksUpdate;
 use LogicException;
 use MediaWiki\Edit\PreparedEdit;
@@ -165,8 +167,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
         *
         * Contains the following fields:
         * - oldRevision (RevisionRecord|null): the revision that was current before the change
-        *   associated with this update. Might not be set, use getOldRevision() instead of direct
-        *   access.
+        *   associated with this update. Might not be set, use getParentRevision().
         * - oldId (int|null): the id of the above revision. 0 if there is no such revision (the change
         *   was about creating a new page); null if not known (that should not happen).
         * - oldIsRedirect (bool|null): whether the page was a redirect before the change. Lazy-loaded,
@@ -183,6 +184,11 @@ class DerivedPageDataUpdater implements IDBAccessObject {
         */
        private $slotsUpdate = null;
 
+       /**
+        * @var RevisionRecord|null
+        */
+       private $parentRevision = null;
+
        /**
         * @var RevisionRecord|null
         */
@@ -456,29 +462,34 @@ class DerivedPageDataUpdater implements IDBAccessObject {
        }
 
        /**
-        * Returns the revision that was current before the edit. This would be null if the edit
-        * created the page, or the revision's parent for a regular edit, or the revision itself
-        * for a null-edit.
-        * Only defined after calling grabCurrentRevision() or prepareContent() or prepareUpdate()!
+        * Returns the parent revision of the new revision wrapped by this update.
+        * If the update is a null-edit, this will return the parent of the current (and new) revision.
+        * This will return null if the revision wrapped by this update created the page.
+        * Only defined after calling prepareContent() or prepareUpdate()!
         *
-        * @return RevisionRecord|null the revision that was current before the edit, or null if
-        *         the edit created the page.
+        * @return RevisionRecord|null the parent revision of the new revision, or null if
+        *         the update created the page.
         */
-       private function getOldRevision() {
-               $this->assertHasPageState( __METHOD__ );
+       private function getParentRevision() {
+               $this->assertPrepared( __METHOD__ );
 
-               // If 'oldRevision' is not set, load it!
-               // Useful if $this->oldPageState is initialized by prepareUpdate.
-               if ( !array_key_exists( 'oldRevision', $this->pageState ) ) {
-                       /** @var int $oldId */
-                       $oldId = $this->pageState['oldId'];
-                       $flags = $this->useMaster() ? RevisionStore::READ_LATEST : 0;
-                       $this->pageState['oldRevision'] = $oldId
-                               ? $this->revisionStore->getRevisionById( $oldId, $flags )
-                               : null;
+               if ( $this->parentRevision ) {
+                       return $this->parentRevision;
                }
 
-               return $this->pageState['oldRevision'];
+               if ( !$this->pageState['oldId'] ) {
+                       // If there was no current revision, there is no parent revision,
+                       // since the page didn't exist.
+                       return null;
+               }
+
+               $oldId = $this->revision->getParentId();
+               $flags = $this->useMaster() ? RevisionStore::READ_LATEST : 0;
+               $this->parentRevision = $oldId
+                       ? $this->revisionStore->getRevisionById( $oldId, $flags )
+                       : null;
+
+               return $this->parentRevision;
        }
 
        /**
@@ -495,8 +506,8 @@ class DerivedPageDataUpdater implements IDBAccessObject {
         * @note After prepareUpdate() was called, grabCurrentRevision() will throw an exception
         * to avoid confusion, since the page's current revision is then the new revision after
         * the edit, which was presumably passed to prepareUpdate() as the $revision parameter.
-        * Use getOldRevision() instead to access the revision that used to be current before the
-        * edit.
+        * Use getParentRevision() instead to access the revision that is the parent of the
+        * new revision.
         *
         * @return RevisionRecord|null the page's current revision, or null if the page does not
         * yet exist.
@@ -834,6 +845,8 @@ class DerivedPageDataUpdater implements IDBAccessObject {
 
                        // prepareUpdate() is redundant for null-edits
                        $this->doTransition( 'has-revision' );
+               } else {
+                       $this->parentRevision = $parentRevision;
                }
        }
 
@@ -969,7 +982,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
                $this->assertPrepared( __METHOD__ );
 
                if ( !$this->slotsUpdate ) {
-                       $old = $this->getOldRevision();
+                       $old = $this->getParentRevision();
                        $this->slotsUpdate = RevisionSlotsUpdate::newFromRevisionSlots(
                                $this->revision->getSlots(),
                                $old ? $old->getSlots() : null
@@ -1077,7 +1090,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
                        } else {
                                throw new LogicException(
                                        'Trying to re-use DerivedPageDataUpdater with revision '
-                                       .$revision->getId()
+                                       . $revision->getId()
                                        . ', but it\'s already bound to revision '
                                        . $this->revision->getId()
                                );
@@ -1138,7 +1151,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
                        if ( !$this->user->equals( $user ) ) {
                                throw new LogicException(
                                        'The Revision provided has a mismatching actor: expected '
-                                       .$this->user->getName()
+                                       . $this->user->getName()
                                        . ', got '
                                        . $user->getName()
                                );
@@ -1252,34 +1265,103 @@ class DerivedPageDataUpdater implements IDBAccessObject {
        /**
         * @param bool $recursive
         *
-        * @return DataUpdate[]
+        * @return DeferrableUpdate[]
         */
        public function getSecondaryDataUpdates( $recursive = false ) {
-               // TODO: MCR: getSecondaryDataUpdates() needs a complete overhaul to avoid DataUpdates
-               // from different slots overwriting each other in the database. Plan:
-               // * replace direct calls to Content::getSecondaryDataUpdates() with calls to this method
-               // * Construct LinksUpdate here, on the combined ParserOutput, instead of in AbstractContent
-               //   for each slot.
-               // * Pass $slot into getSecondaryDataUpdates() - probably be introducing a new duplicate
-               //   version of this function in ContentHandler.
-               // * The new method gets the PreparedEdit, but no $recursive flag (that's for LinksUpdate)
-               // * Hack: call both the old and the new getSecondaryDataUpdates method here; Pass
-               //   the per-slot ParserOutput to the old method, for B/C.
-               // * Hack: If there is more than one slot, filter LinksUpdate from the DataUpdates
-               //   returned by getSecondaryDataUpdates, and use a LinksUpdated for the combined output
-               //   instead.
-               // * Call the SecondaryDataUpdates hook here (or kill it - its signature doesn't make sense)
-
-               $content = $this->getSlots()->getContent( 'main' );
-
-               // NOTE: $output is the combined output, to be shown in the default view.
+               if ( $this->isContentDeleted() ) {
+                       // This shouldn't happen, since the current content is always public,
+                       // and DataUpates are only needed for current content.
+                       return [];
+               }
+
                $output = $this->getCanonicalParserOutput();
 
-               $updates = $content->getSecondaryDataUpdates(
-                       $this->getTitle(), null, $recursive, $output
+               // Construct a LinksUpdate for the combined canonical output.
+               $linksUpdate = new LinksUpdate(
+                       $this->getTitle(),
+                       $output,
+                       $recursive
                );
 
-               return $updates;
+               $allUpdates = [ $linksUpdate ];
+
+               // NOTE: Run updates for all slots, not just the modified slots! Otherwise,
+               // info for an inherited slot may end up being removed. This is also needed
+               // to ensure that purges are effective.
+               $renderedRevision = $this->getRenderedRevision();
+               foreach ( $this->getSlots()->getSlotRoles() as $role ) {
+                       $slot = $this->getRawSlot( $role );
+                       $content = $slot->getContent();
+                       $handler = $content->getContentHandler();
+
+                       $updates = $handler->getSecondaryDataUpdates(
+                               $this->getTitle(),
+                               $content,
+                               $role,
+                               $renderedRevision
+                       );
+                       $allUpdates = array_merge( $allUpdates, $updates );
+
+                       // TODO: remove B/C hack in 1.32!
+                       // NOTE: we assume that the combined output contains all relevant meta-data for
+                       // all slots!
+                       $legacyUpdates = $content->getSecondaryDataUpdates(
+                               $this->getTitle(),
+                               null,
+                               $recursive,
+                               $output
+                       );
+
+                       // HACK: filter out redundant and incomplete LinksUpdates
+                       $legacyUpdates = array_filter( $legacyUpdates, function ( $update ) {
+                               return !( $update instanceof LinksUpdate );
+                       } );
+
+                       $allUpdates = array_merge( $allUpdates, $legacyUpdates );
+               }
+
+               // XXX: if a slot was removed by an earlier edit, but deletion updates failed to run at
+               // that time, we don't know for which slots to run deletion updates when purging a page.
+               // We'd have to examine the entire history of the page to determine that. Perhaps there
+               // could be a "try extra hard" mode for that case that would run a DB query to find all
+               // roles/models ever used on the page. On the other hand, removing slots should be quite
+               // rare, so perhaps this isn't worth the trouble.
+
+               // TODO: consolidate with similar logic in WikiPage::getDeletionUpdates()
+               $wikiPage = $this->getWikiPage();
+               $parentRevision = $this->getParentRevision();
+               foreach ( $this->getRemovedSlotRoles() as $role ) {
+                       // HACK: we should get the content model of the removed slot from a SlotRoleHandler!
+                       // For now, find the slot in the parent revision - if the slot was removed, it should
+                       // always exist in the parent revision.
+                       $parentSlot = $parentRevision->getSlot( $role, RevisionRecord::RAW );
+                       $content = $parentSlot->getContent();
+                       $handler = $content->getContentHandler();
+
+                       $updates = $handler->getDeletionUpdates(
+                               $this->getTitle(),
+                               $role
+                       );
+                       $allUpdates = array_merge( $allUpdates, $updates );
+
+                       // TODO: remove B/C hack in 1.32!
+                       $legacyUpdates = $content->getDeletionUpdates( $wikiPage );
+
+                       // HACK: filter out redundant and incomplete LinksDeletionUpdate
+                       $legacyUpdates = array_filter( $legacyUpdates, function ( $update ) {
+                               return !( $update instanceof LinksDeletionUpdate );
+                       } );
+
+                       $allUpdates = array_merge( $allUpdates, $legacyUpdates );
+               }
+
+               // TODO: hard deprecate SecondaryDataUpdates in favor of RevisionDataUpdates in 1.33!
+               Hooks::run(
+                       'RevisionDataUpdates',
+                       [ $this->getTitle(), $renderedRevision, &$allUpdates ]
+               );
+
+               return $allUpdates;
        }
 
        /**
@@ -1425,7 +1507,7 @@ class DerivedPageDataUpdater implements IDBAccessObject {
                        WikiPage::onArticleEdit( $title, $legacyRevision, $this->getTouchedSlotRoles() );
                }
 
-               $oldRevision = $this->getOldRevision();
+               $oldRevision = $this->getParentRevision();
                $oldLegacyRevision = $oldRevision ? new Revision( $oldRevision ) : null;
 
                // TODO: In the wiring, register a listener for this on the new PageEventEmitter
@@ -1484,7 +1566,9 @@ class DerivedPageDataUpdater implements IDBAccessObject {
                }
 
                foreach ( $updates as $update ) {
-                       $update->setCause( $causeAction, $causeAgent );
+                       if ( $update instanceof DataUpdate ) {
+                               $update->setCause( $causeAction, $causeAgent );
+                       }
                        if ( $update instanceof LinksUpdate ) {
                                $update->setRevision( $legacyRevision );
                                $update->setTriggeringUser( $triggeringUser );
index 8e66906..61b428f 100644 (file)
@@ -525,11 +525,11 @@ class RevisionStore
                        $slot = $rev->getSlot( $role, RevisionRecord::RAW );
                        Assert::postcondition(
                                $slot->getContent() !== null,
-                               $role .  ' slot must have content'
+                               $role . ' slot must have content'
                        );
                        Assert::postcondition(
                                $slot->hasRevision(),
-                               $role .  ' slot must have a revision associated'
+                               $role . ' slot must have a revision associated'
                        );
                }
 
@@ -1711,8 +1711,8 @@ class RevisionStore
                                $row->ar_actor ?? null
                        );
                } catch ( InvalidArgumentException $ex ) {
-                       wfWarn( __METHOD__ . ': ' . $ex->getMessage() );
-                       $user = new UserIdentityValue( 0, '', 0 );
+                       wfWarn( __METHOD__ . ': ' . $title->getPrefixedDBkey() . ': ' . $ex->getMessage() );
+                       $user = new UserIdentityValue( 0, 'Unknown user', 0 );
                }
 
                $db = $this->getDBConnectionRefForQueryFlags( $queryFlags );
@@ -1759,8 +1759,8 @@ class RevisionStore
                                $row->rev_actor ?? null
                        );
                } catch ( InvalidArgumentException $ex ) {
-                       wfWarn( __METHOD__ . ': ' . $ex->getMessage() );
-                       $user = new UserIdentityValue( 0, '', 0 );
+                       wfWarn( __METHOD__ . ': ' . $title->getPrefixedDBkey() . ': ' . $ex->getMessage() );
+                       $user = new UserIdentityValue( 0, 'Unknown user', 0 );
                }
 
                $db = $this->getDBConnectionRefForQueryFlags( $queryFlags );
index ca62e0e..bbc1d63 100644 (file)
@@ -1665,7 +1665,7 @@ class Title implements LinkTarget {
                        if ( $nsText === false ) {
                                // See T165149. Awkward, but better than erroneously linking to the main namespace.
                                $nsText = MediaWikiServices::getInstance()->getContentLanguage()->
-                                       getNsText( NS_SPECIAL ) .  ":Badtitle/NS{$this->mNamespace}";
+                                       getNsText( NS_SPECIAL ) . ":Badtitle/NS{$this->mNamespace}";
                        }
 
                        $p .= $nsText . ':';
index 327dd54..ed10615 100644 (file)
@@ -856,7 +856,7 @@ class WebRequest {
         * @return string
         */
        public function getFullRequestURL() {
-               return wfGetServerUrl( PROTO_CURRENT ) .  $this->getRequestURL();
+               return wfGetServerUrl( PROTO_CURRENT ) . $this->getRequestURL();
        }
 
        /**
index 9d336e4..dc7b00e 100644 (file)
@@ -151,7 +151,6 @@ class RollbackAction extends FormlessAction {
                        );
                        $de->showDiff( '', '' );
                }
-               return;
        }
 
        protected function getDescription() {
index 830df59..bae6885 100644 (file)
@@ -76,7 +76,7 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                                if ( !is_null( $params[$param] ) ) {
                                        $p = $this->getModulePrefix();
                                        $this->dieWithError(
-                                               [ 'apierror-invalidparammix-cannotusewith', $p.$param, "{$p}user" ],
+                                               [ 'apierror-invalidparammix-cannotusewith', $p . $param, "{$p}user" ],
                                                'invalidparammix'
                                        );
                                }
@@ -86,7 +86,7 @@ class ApiQueryAllDeletedRevisions extends ApiQueryRevisionsBase {
                                if ( !is_null( $params[$param] ) ) {
                                        $p = $this->getModulePrefix();
                                        $this->dieWithError(
-                                               [ 'apierror-invalidparammix-mustusewith', $p.$param, "{$p}user" ],
+                                               [ 'apierror-invalidparammix-mustusewith', $p . $param, "{$p}user" ],
                                                'invalidparammix'
                                        );
                                }
index 0cf6b04..3b7b00d 100644 (file)
@@ -522,7 +522,7 @@ class ApiQueryInfo extends ApiQueryBase {
                }
 
                if ( $this->params['testactions'] ) {
-                       $limit = $this->getMain()->canApiHighLimits() ? self::LIMIT_SML1 : self::LIMIT_SML2;
+                       $limit = $this->getMain()->canApiHighLimits() ? self::LIMIT_SML2 : self::LIMIT_SML1;
                        if ( $this->countTestedActions >= $limit ) {
                                return null; // force a continuation
                        }
index 403f742..d6af2f1 100644 (file)
        "apihelp-compare-param-fromid": "رقم الصفحة الأول للمقارنة.",
        "apihelp-compare-param-fromrev": "أول مراجعة للمقارنة.",
        "apihelp-compare-param-frompst": "قم بإجراء تحويل ما قبل الحفظ على <var>fromtext-&#x7B;slot}</var>.",
+       "apihelp-compare-param-fromslots": "تجاوز محتوى المراجعة المحددة بواسطة <var>fromtitle</var> أو <var>fromid</var> أو <var>fromrev</var>.\n\nيحدد هذا الوسيط الفتحات المراد تعديلها، استخدم <var>fromtext-&#x7B;slot}</var> و<var>fromcontentmodel-&#x7B;slot}</var> و<var>fromcontentformat-&#x7B;slot}</var> لتحديد محتوى لكل فتحة.",
+       "apihelp-compare-param-fromtext-{slot}": "نص الفتحة المحددة، إذا تم حذفها، تتم إزالة الفتحة من المراجعة.",
+       "apihelp-compare-param-fromsection-{slot}": "عندما يكون <var>fromtext-&#x7B;slot}</var> هو محتوى قسم واحد، فهذا هو رقم القسم، سيتم دمجه في المراجعة المحددة بواسطة <var>fromtitle</var> أو <var>fromid</var> أو <var>fromrev</var> كما لو كانت لتعديل القسم.",
+       "apihelp-compare-param-fromcontentmodel-{slot}": "نموذج محتوى <var>fromtext-&#x7B;slot}</var>، إذا لم يتم توفيره، فسيتم تخمينه استنادا إلى الوسائط الأخرى.",
+       "apihelp-compare-param-fromcontentformat-{slot}": "تنسيق تسلسل محتوى <var>fromtext-&#x7B;slot}</var>.",
        "apihelp-compare-param-fromtext": "حدد <kbd>fromslots=main</kbd> واستخدم <var>fromtext-main</var> كبديل.",
        "apihelp-compare-param-fromcontentmodel": "حدد <kbd>fromslots=main</kbd> واستخدم <var>fromcontentmodel-main</var> كبديل.",
        "apihelp-compare-param-fromcontentformat": "حدد <kbd>fromslots=main</kbd> واستخدم <var>fromcontentformat-main</var> كبديل.",
        "apihelp-compare-param-torev": "المراجعة الثانية للمقارنة.",
        "apihelp-compare-param-torelative": "استخدم مراجعة متعلقة بالمراجعة المحددة من <var>fromtitle</var> أو <var>fromid</var> أو <var>fromrev</var>، سيتم تجاهل جميع خيارات 'إلى' الأخرى.",
        "apihelp-compare-param-topst": "قم بإجراء تحويل ما قبل الحفظ على <var>totext</var>.",
+       "apihelp-compare-param-toslots": "تجاوز محتوى المراجعة المحددة بواسطة <var>totitle</var> أو <var>toid</var> أو <var>torev</var>.\n\nيحدد هذا الوسيط الفتحات المراد تعديلها، استخدم <var>totext-&#x7B;slot}</var> و<var>tocontentmodel-&#x7B;slot}</var> و<var>tocontentformat-&#x7B;slot}</var> لتحديد محتوى لكل فتحة.",
+       "apihelp-compare-param-totext-{slot}": "نص الفتحة المحددة، إذا تم حذفه، تتم إزالة الفتحة من المراجعة.",
+       "apihelp-compare-param-tosection-{slot}": "عندما يكون <var>totext-&#x7B;slot}</var> هو محتوى قسم واحد، فهذا هو رقم القسم، سيتم دمجه في المراجعة المحددة بواسطة <var>totitle</var> أو <var>toid</var> أو <var>torev</var> كما لو كانت لتعديل القسم.",
+       "apihelp-compare-param-tocontentmodel-{slot}": "نموذج محتوى <var>totext-&#x7B;slot}</var>، إذا لم يتم توفيره، فسيتم تخمينه استنادا إلى الوسائط الأخرى.",
+       "apihelp-compare-param-tocontentformat-{slot}": "تنسيق تسلسل محتوى <var>totext-&#x7B;slot}</var>.",
        "apihelp-compare-param-totext": "حدد <kbd>toslots=main</kbd> واستخدم <var>totext-main</var> كبديل.",
        "apihelp-compare-param-tocontentmodel": "حدد <kbd>toslots=main</kbd> واستخدم <var>tocontentmodel-main</var> كبديل.",
        "apihelp-compare-param-tocontentformat": "حدد <kbd>toslots=main</kbd> واستخدم <var>tocontentformat-main</var> كبديل.",
@@ -88,6 +98,7 @@
        "apihelp-compare-paramvalue-prop-comment": "التعليق على المراجعات 'من' و'إلى'.",
        "apihelp-compare-paramvalue-prop-parsedcomment": "التعليق المحلل على المراجعات 'من' و'إلى'.",
        "apihelp-compare-paramvalue-prop-size": "حجم المراجعات 'من' و'إلى'.",
+       "apihelp-compare-param-slots": "إرجاع فرق فردي لهذه الفتحات، بدلا من فرق واحد مشترك لجميع فتحات.",
        "apihelp-compare-example-1": "إنشاء فرق بين المراجعة 1 و2.",
        "apihelp-createaccount-summary": "انشاء حساب مستخدم جديد",
        "apihelp-createaccount-param-preservestate": "إذا تم عرض <kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd> بشكل صحيح لـ<samp>hasprimarypreservedstate</samp>، فقد تم تعليم طلبات <samp>primary-required</samp> لكي يجب حذفها، إذا عرضت قيمة غير فارغة لـ<samp>preservedusername</samp> فيجب استخدام اسم المستخدم هذا للوسيط <var>username</var>.",
        "apihelp-query+iwbacklinks-paramvalue-prop-iwprefix": "يضيف بادئة الإنترويكي.",
        "apihelp-query+iwbacklinks-paramvalue-prop-iwtitle": "يضيف عنوان الإنترويكي.",
        "apihelp-query+iwbacklinks-param-dir": "الاتجاه للإدراج فيه.",
+       "apihelp-query+iwbacklinks-example-simple": "الحصول على الصفحات التي تصل إلى [[wikibooks:Test]].",
+       "apihelp-query+iwbacklinks-example-generator": "الحصول على معلومات عن الصفحات التي تصل إلى [[wikibooks:Test]].",
        "apihelp-query+iwlinks-summary": "يعرض جميع روابط الإنترويكي من الصفحات المحددة.",
        "apihelp-query+iwlinks-param-url": "ما إذا كنت تريد الحصول على المسار الكامل (لا يمكن استخدامه مع $1prop).",
        "apihelp-query+iwlinks-param-prop": "الخصائص الإضافية التي يمكنك الحصول عليها لكل رابط بين اللغات:",
        "apihelp-query+revisions+base-paramvalue-prop-tags": "وسوم للمراجعة.",
        "apihelp-query+revisions+base-paramvalue-prop-roles": "أدرج أدوار فتحة المحتوى الموجودة في المراجعة.",
        "apihelp-query+revisions+base-paramvalue-prop-parsetree": "استخدم <kbd>[[Special:ApiHelp/expandtemplates|action=expandtemplates]]</kbd> أو <kbd>[[Special:ApiHelp/parse|action=parse]]</kbd> بدلا من ذلك، شجرة تحليل XML لمحتوى المراجعة (تتطلب نموذج المحتوى <code>$1</code>).",
+       "apihelp-query+revisions+base-param-slots": "أي الفتحات المراجعة لتعيد البيانات، عندما يتم تضمين الخصائص ذات الصلة بالفتحات في <var>$1props</var>، إذا تم حذفها، فسيتم إرجاع البيانات من فتحة <kbd>main</kbd> بتنسيق متوافق مع الإصدارات السابقة.",
        "apihelp-query+revisions+base-param-limit": "الحد من عدد المراجعات التي سيتم إرجاعها.",
        "apihelp-query+revisions+base-param-expandtemplates": "استخدم <kbd>[[Special:ApiHelp/expandtemplates|action=expandtemplates]]</kbd> بدلا من ذلك، قم بتوسيع القوالب في محتوى المراجعة (يتطلب $1prop=content).",
        "apihelp-query+revisions+base-param-generatexml": "استخدم <kbd>[[Special:ApiHelp/expandtemplates|action=expandtemplates]]</kbd> أو <kbd>[[Special:ApiHelp/parse|action=parse]]</kbd> بدلا من ذلك، قم بتوليد شجرة تحليل XML لمحتوى المراجعة (تتطلب $1prop=content).",
        "apihelp-json-param-callback": "إذا تم تحديده، فسيقوم بإخراج الإخراج في استدعاء دالة معينة، للسلامة; سيتم تقييد جميع البيانات الخاصة بالمستخدم.",
        "apihelp-json-param-utf8": "إذا تم تحديده، يقوم بترميز معظم (وليس كل) الأحرف غير ASCII كـUTF-8 بدلا من استبدالها بتسلسلات الهروب السداسية العشرية، افتراضي عندما لا يكون <var>formatversion</var>  <kbd>1</kbd>.",
        "apihelp-json-param-ascii": "إذا تم تحديده، يشفر كل غير ASCII باستخدام تسلسلات الهروب السداسية العشرية، افتراضي عندما يكون <var>formatversion</var> <kbd>1</kbd>.",
+       "apihelp-json-param-formatversion": "تنسيق الإخراج: \n;1:تنسيق متوافق مع الإصدارات السابقة (مصفوفات منطقية بتنسيق XML، ومفاتيح  <samp>*</samp>  لعقد المحتوى، وما إلى ذلك).\n;2:التنسيق الحديث التجريبي، التفاصيل قد تتغير!\n;الأحدث: استخدم أحدث تنسيق (حاليا <kbd>2</kbd>)، قد يتغير دون سابق إنذار.",
        "apihelp-jsonfm-summary": "بيانات الإخراج بتنسيق JSON (الطباعة بـHTML).",
        "apihelp-none-summary": "عدم إخراج أي شيء.",
        "apihelp-php-summary": "بيانات الإخراج بتنسيق PHP المتسلسل.",
+       "apihelp-php-param-formatversion": "تنسيق الإخراج: \n;1:تنسيق متوافق مع الإصدارات السابقة (مصفوفات منطقية بتنسيق XML، ومفاتيح  <samp>*</samp>  لعقد المحتوى، وما إلى ذلك).\n;2:التنسيق الحديث التجريبي، التفاصيل قد تتغير!\n;الأحدث: استخدم أحدث تنسيق (حاليا <kbd>2</kbd>)، قد يتغير دون سابق إنذار.",
        "apihelp-phpfm-summary": "بيانات الإخراج بتنسيق JSON (الطباعة بـHTML).",
        "apihelp-rawfm-summary": "بيانات الإخراج، بما في ذلك عناصر تصحيح الأخطاء، بتنسيق JSON (الطباعة بـHTML).",
        "apihelp-xml-summary": "بيانات الإخراج بتنسيق XML.",
        "apierror-changeauth-norequest": "فشل في إنشاء طلب التغيير.",
        "apierror-chunk-too-small": "الحد الأدنى لحجم القطعة هو $1 {{PLURAL:$1|بايت}} للقطع غير النهائية.",
        "apierror-cidrtoobroad": "لا يُقبَل مدى $1 CIDR أكبر من /$2.",
+       "apierror-compare-maintextrequired": "الوسيط <var>$1text-main</var> مطلوب عندما يكون <var>$1slots</var> يحتوي على <kbd>main</kbd> (لا يمكن حذف الفتحة الرئيسية).",
        "apierror-compare-no-title": "لا يمكن الحفظ المسبق للحفظ بدون عنوان; حاول تحديد <var>fromtitle</var> أو <var>totitle</var>.",
        "apierror-compare-nosuchfromsection": "لا يوجد قسم $1 في المحتوى 'من'.",
        "apierror-compare-nosuchtosection": "لا يوجد قسم $1 في المحتوى 'إلى'.",
+       "apierror-compare-nofromrevision": "ليس 'من' مراجعة، حدد <var>fromrev</var> أو <var>fromtitle</var> أو <var>fromid</var>.",
+       "apierror-compare-notext": "لا يمكن استخدام الوسيط <var>$1</var> بدون <var>$2</var>.",
+       "apierror-compare-notorevision": "ليس 'إلى' مراجعة، حدد <var>torev</var> أو <var>totitle</var> أو <var>toid</var>.",
        "apierror-compare-relative-to-nothing": "لا توجد مراجعة 'من' لـ<var>torelative</var> لتكون نسبة.",
        "apierror-contentserializationexception": "فشل تسلسل المحتوى: $1",
        "apierror-contenttoobig": "يتجاوز المحتوى الذي أدخلته حد حجم المقالة البالغ $1 {{PLURAL:$1|كيلوبايت}}.",
        "apierror-mimesearchdisabled": "تم تعطيل بحث MIME في وضع Miser.",
        "apierror-missingcontent-pageid": "محتوى مفقود لمعرف الصفحة $1.",
        "apierror-missingcontent-revid": "محتوى مفقود لمعرف المراجعة $1.",
+       "apierror-missingcontent-revid-role": "محتوى مفقود لمعرف المراجعة $1 للدور $2.",
        "apierror-missingparam-at-least-one-of": "مطلوب {{PLURAL:$2|الوسيط|واحد على الأقل من الوسائط}} $1.",
        "apierror-missingparam-one-of": "مطلوب {{PLURAL:$2|الوسيط|واحد على الأقل من الوسائط}} $1.",
        "apierror-missingparam": "يجب تعيين الوسيط <var>$1</var>.",
        "apiwarn-deprecation-login-botpw": "تم إيقاف تسجيل الدخول إلى الحساب الرئيسي عبر <kbd>action=login</kbd> وقد يتوقف عن العمل دون سابق إنذار، لمتابعة تسجيل الدخول باستخدام <kbd>action=login</kbd>; راجع [[Special:BotPasswords]]، لمتابعة استخدام تسجيل الدخول إلى الحساب الرئيسي بأمان; راجع <kbd>action=clientlogin</kbd>.",
        "apiwarn-deprecation-login-nobotpw": "تم إيقاف تسجيل الدخول إلى الحساب الرئيسي عبر <kbd>action=login</kbd>، وقد يتوقف عن العمل دون سابق إنذار، لتسجيل الدخول بأمان; راجع <kbd>action=clientlogin</kbd>.",
        "apiwarn-deprecation-login-token": "تم إيقاف عمل رمز مميز عبر <kbd>action=login</kbd> ;استخدم <kbd>action=query&meta=tokens&type=login</kbd> بدلا من ذلك.",
+       "apiwarn-deprecation-missingparam": "نظرا لعدم تحديد <var>$1</var>; تم استخدام تنسيق قديم للإخراج، تم إيقاف هذا التنسيق، وسيتم دائما استخدام التنسيق الجديد في المستقبل.",
        "apiwarn-deprecation-parameter": "تم إيقاف الوسيط <var>$1</var>.",
        "apiwarn-deprecation-parse-headitems": "تم إيقاف <kbd>prop=headitems</kbd> منذ ميدياويكي 1.28; استخدم <kbd>prop=headhtml</kbd> عند إنشاء مستندات HTML جديدة، أو <kbd>prop=modules|jsconfigvars</kbd> عند تحديث مستند من جانب العميل.",
        "apiwarn-deprecation-purge-get": "تم إيقاف استخدام <kbd>action=purge</kbd> عبر GET; استخدم POST بدلا من ذلك.",
        "apiwarn-parse-nocontentmodel": "لم يتم إعطاء <var>title</var> أو <var>contentmodel</var>، على افتراض $1.",
        "apiwarn-parse-revidwithouttext": "تم استخدام <var>revid</var> بدون <var>text</var>، وتم طلب خصائص الصفحة المحللة، هل تقصد استخدام <var>oldid</var> بدلا من <var>revid</var>؟",
        "apiwarn-parse-titlewithouttext": "تم استخدام <var>title</var> بدون <var>text</var>، وتم طلب خصائص الصفحة المحللة، هل تقصد استخدام <var>page</var> بدلا من <var>title</var>؟",
+       "apiwarn-redirectsandrevids": "لا يمكن استخدام دقة تحويلة مع الوسيط <var>revids</var>، أية تحويلات لنقطة <var>revids</var> لم يتم حلها.",
        "apiwarn-tokennotallowed": "الإجراء \"$1\" غير مسموح به للمستخدم الحالي.",
        "apiwarn-tokens-origin": "قد لا يتم الحصول على الرموز عند عدم تطبيق السياسة الأصلية.",
        "apiwarn-truncatedresult": "تم اقتطاع هذه النتيجة لأنها قد تكون أكبر من حد الـ$1 بايت.",
index 8022833..d943e47 100644 (file)
@@ -63,8 +63,8 @@
        "apihelp-compare-param-fromtitle": "比較する1つ目のページ名。",
        "apihelp-compare-param-fromid": "比較する1つ目のページID。",
        "apihelp-compare-param-fromrev": "比較する1つ目の版。",
-       "apihelp-compare-param-frompst": "<var>fromtext</var>に保存前変換を行います。",
-       "apihelp-compare-param-fromtext": "<var>fromtitle</var>, <var>fromid</var> or <var>fromrev</var> で指定された版の内容の代わりに、このテキストを使用します。",
+       "apihelp-compare-param-frompst": "<var>fromtext-&#x7B;slot}</var>に保存前変換を行います。",
+       "apihelp-compare-param-fromtext": "<kbd>fromslots=main</kbd>を指定し、代わりに<var>fromtext-main</var> を使用してください。",
        "apihelp-compare-param-fromcontentmodel": "<var>fromtext</var>のコンテンツモデル。指定されていない場合は、他のパラメータに基づいて推測されます。",
        "apihelp-compare-param-fromsection": "'from' の内容のうち指定された節のみを使用します。",
        "apihelp-compare-param-totitle": "比較する2つ目のページ名。",
        "apihelp-query+revisions+base-paramvalue-prop-size": "その版の長さ (バイト) 。",
        "apihelp-query+revisions+base-paramvalue-prop-comment": "その版の利用者によるコメント。",
        "apihelp-query+revisions+base-paramvalue-prop-parsedcomment": "その版の利用者による、構文解析されたコメント。",
-       "apihelp-query+revisions+base-paramvalue-prop-content": "その版のテキスト。",
+       "apihelp-query+revisions+base-paramvalue-prop-content": "各リビジョンスロットの内容。",
        "apihelp-query+revisions+base-paramvalue-prop-tags": "その版のタグ。",
        "apihelp-query+revisions+base-param-limit": "返す版の数を制限する。",
        "apihelp-query+search-summary": "全文検索を行います。",
index a4be26f..55c0671 100644 (file)
        "apihelp-options-example-complex": "重置所有偏好設定,然後再設定 <kbd>skin</kbd> 與 <kbd>nickname</kbd>。",
        "apihelp-paraminfo-summary": "獲得有關 API 模組的資訊。",
        "apihelp-paraminfo-param-helpformat": "說明字串的格式。",
+       "apihelp-paraminfo-param-formatmodules": "格式模組名稱清單(<var>format</var> 參數的值)。請改用 <var>$1modules</var> 。",
        "apihelp-paraminfo-example-1": "顯示 <kbd>[[Special:ApiHelp/parse|action=parse]]</kbd>、<kbd>[[Special:ApiHelp/jsonfm|format=jsonfm]]</kbd>、<kbd>[[Special:ApiHelp/query+allpages|action=query&list=allpages]]</kbd>、和 <kbd>[[Special:ApiHelp/query+siteinfo|action=query&meta=siteinfo]]</kbd> 的資訊。",
        "apihelp-paraminfo-example-2": "顯示 <kbd>[[Special:ApiHelp/query|action=query]]</kbd> 所有子模組的資訊。",
        "apihelp-parse-summary": "解析內容併回傳解析器輸出。",
        "apihelp-query+allimages-param-to": "要停止列舉的圖片標題。僅能與 $1sort=name 一起使用。",
        "apihelp-query+allimages-param-start": "要開始列舉的時間戳記。僅能與 $1sort=timestamp 一起使用。",
        "apihelp-query+allimages-param-end": "要停止列舉的時間戳記。僅能與 $1sort=timestamp 一起使用。",
+       "apihelp-query+allimages-param-prefix": "搜尋所有以此值為開頭的圖片。僅能與 $1sort=name 一起使用。",
        "apihelp-query+allimages-param-minsize": "限制圖片至少要有這樣多的位元組。",
        "apihelp-query+allimages-param-maxsize": "限制圖片最多只能這樣多的位元組。",
        "apihelp-query+allimages-param-sha1": "圖片的 SHA1 雜湊值。覆蓋 $1sha1base36。",
        "apihelp-query+allusers-example-Y": "列出以<kbd>Y</kbd>開頭的使用者。",
        "apihelp-query+authmanagerinfo-summary": "取得目前身分核對狀態的資訊。",
        "apihelp-query+backlinks-summary": "找出連結至指定頁面的所有頁面。",
+       "apihelp-query+backlinks-param-title": "要搜尋的標題。不能與 <var>$1pageid</var> 一起使用。",
        "apihelp-query+backlinks-param-pageid": "要搜尋的頁面 ID。不能與 <var>$1title</var> 一起使用。",
        "apihelp-query+backlinks-param-namespace": "要列舉的命名空間。",
        "apihelp-query+backlinks-param-dir": "列出時所採用的方向。",
        "apihelp-query+blocks-paramvalue-prop-userid": "添加已封鎖使用者的使用者 ID。",
        "apihelp-query+blocks-paramvalue-prop-by": "添加進行封鎖中的使用者之使用者名稱。",
        "apihelp-query+blocks-paramvalue-prop-byid": "添加進行封鎖中的使用者之使用者 ID。",
+       "apihelp-query+blocks-paramvalue-prop-timestamp": "添加當封鎖生效的時間戳記。",
+       "apihelp-query+blocks-paramvalue-prop-expiry": "添加當封鎖到期的時間戳記。",
        "apihelp-query+blocks-paramvalue-prop-reason": "添加封鎖的原因。",
        "apihelp-query+blocks-example-simple": "列出封鎖。",
        "apihelp-query+blocks-example-users": "列出使用者 <kbd>Alice</kbd> 與 <kbd>Bob</kbd> 的封鎖。",
        "apihelp-query+categorymembers-paramvalue-prop-timestamp": "添加在頁面有被包含時的時間戳記。",
        "apihelp-query+categorymembers-param-limit": "回傳的頁面數量上限。",
        "apihelp-query+categorymembers-param-sort": "作為排序順序的屬性。",
+       "apihelp-query+categorymembers-param-start": "起始列出的時間戳記。僅能與 <kbd>$1sort=timestamp</kbd> 一起使用。",
+       "apihelp-query+categorymembers-param-end": "結束列出的時間戳記。僅能與 <kbd>$1sort=timestamp</kbd> 一起使用。",
        "apihelp-query+categorymembers-param-startsortkey": "請改用 $1starthexsortkey。",
        "apihelp-query+categorymembers-param-endsortkey": "請改用 $1endhexsortkey。",
        "apihelp-query+categorymembers-example-simple": "取得在 <kbd>Category:Physics</kbd> 裡前 10 項的頁面。",
        "apihelp-query+logevents-paramvalue-prop-userid": "添加承擔日誌事件的使用者 ID。",
        "apihelp-query+logevents-paramvalue-prop-timestamp": "添加日誌事件的時間戳記。",
        "apihelp-query+logevents-paramvalue-prop-comment": "添加日誌事件的註釋。",
+       "apihelp-query+logevents-paramvalue-prop-parsedcomment": "添加日誌事件的解析註釋。",
        "apihelp-query+logevents-paramvalue-prop-details": "列出日誌事件的額外詳細資訊。",
        "apihelp-query+logevents-paramvalue-prop-tags": "列出日誌事件的標籤。",
        "apihelp-query+logevents-param-type": "篩選僅為此類型的日誌項目。",
        "apihelp-query+logevents-param-tag": "僅列出以此標籤所標記的事件項目。",
        "apihelp-query+logevents-param-limit": "要回傳的事件項目總數。",
        "apihelp-query+logevents-example-simple": "列出近期日誌事件。",
+       "apihelp-query+pagepropnames-summary": "列出所有在 wiki 使用的頁面屬性名稱。",
        "apihelp-query+pagepropnames-param-limit": "回傳的名稱數量上限。",
        "apihelp-query+pagepropnames-example-simple": "取得前 10 個屬性名稱。",
        "apihelp-query+pageprops-example-simple": "取得頁面 <kbd>Main Page</kbd> 與 <kbd>MediaWiki</kbd> 的屬性。",
        "apihelp-query+prefixsearch-param-limit": "回傳的結果數量上限。",
        "apihelp-query+prefixsearch-param-offset": "要略過的結果數量。",
        "apihelp-query+prefixsearch-example-simple": "搜尋開頭為 <kbd>meaning</kbd> 的頁面標題。",
+       "apihelp-query+prefixsearch-param-profile": "搜尋要使用的配置。",
        "apihelp-query+protectedtitles-param-namespace": "僅列出這些命名空間的標題。",
        "apihelp-query+protectedtitles-param-level": "僅列出具有這些保護層級的標題。",
        "apihelp-query+protectedtitles-param-limit": "要回傳的頁面總數。",
        "apihelp-query+protectedtitles-param-prop": "要取得的屬性。",
+       "apihelp-query+protectedtitles-paramvalue-prop-user": "添加做出添加保護操作的使用者。",
+       "apihelp-query+protectedtitles-paramvalue-prop-userid": "添加做出添加保護操作的使用者 ID。",
+       "apihelp-query+protectedtitles-paramvalue-prop-comment": "添加保護的註釋。",
+       "apihelp-query+protectedtitles-paramvalue-prop-parsedcomment": "添加保護的解析註釋。",
        "apihelp-query+protectedtitles-paramvalue-prop-level": "添加保護層級。",
        "apihelp-query+protectedtitles-example-simple": "列出已保護的標題。",
+       "apihelp-query+querypage-summary": "取得透過特殊頁面 QueryPage-based 所提供的清單。",
        "apihelp-query+querypage-param-page": "特殊頁面的名稱。註:區分大小寫。",
        "apihelp-query+querypage-param-limit": "回傳的結果數量。",
+       "apihelp-query+querypage-example-ancientpages": "回傳來自 [[Special:Ancientpages]] 的結果。",
        "apihelp-query+random-summary": "取得隨機頁面集合",
        "apihelp-query+random-param-namespace": "僅回傳在這些命名空間的頁面。",
        "apihelp-query+random-param-redirect": "請改用 <kbd>$1filterredir=redirects</kbd>。",
        "apihelp-query+recentchanges-param-excludeuser": "不要列出由該使用者作出的更改。",
        "apihelp-query+recentchanges-param-tag": "僅列出以此標籤所標記的更改。",
        "apihelp-query+recentchanges-param-prop": "包含的額外資訊部份:",
+       "apihelp-query+recentchanges-paramvalue-prop-comment": "添加編輯的註釋。",
+       "apihelp-query+recentchanges-paramvalue-prop-parsedcomment": "添加編輯的解析註釋。",
        "apihelp-query+recentchanges-paramvalue-prop-flags": "添加編輯的標籤。",
        "apihelp-query+recentchanges-paramvalue-prop-timestamp": "添加編輯的時間戳記。",
        "apihelp-query+recentchanges-paramvalue-prop-title": "添加編輯的頁面標題。",
        "apihelp-query+revisions-example-first5-user": "取得 <kbd>Main Page</kbd> 裡由使用者 <kbd>MediaWiki default</kbd> 所做出的最早前 5 筆修訂。",
        "apihelp-query+revisions+base-paramvalue-prop-ids": "修訂 ID。",
        "apihelp-query+revisions+base-paramvalue-prop-flags": "修訂標籤(小修改)。",
+       "apihelp-query+revisions+base-paramvalue-prop-timestamp": "修訂的時間戳記。",
        "apihelp-query+revisions+base-paramvalue-prop-user": "做出修訂的使用者。",
+       "apihelp-query+revisions+base-paramvalue-prop-userid": "修訂創建者的使用者 ID",
        "apihelp-query+revisions+base-paramvalue-prop-size": "修訂的長度(位元組)。",
+       "apihelp-query+revisions+base-paramvalue-prop-sha1": "修訂的 SHA-1(base 16)。",
        "apihelp-query+revisions+base-paramvalue-prop-tags": "修訂標籤。",
        "apihelp-query+revisions+base-param-limit": "限制所回傳的修訂數量。",
        "apihelp-query+search-summary": "執行全文搜尋。",
        "apihelp-query+search-param-limit": "要回傳的頁面總數。",
        "apihelp-query+search-param-interwiki": "若可用的話,在搜尋裡包含跨 wiki 結果。",
        "apihelp-query+search-param-backend": "是否搜尋使用的後端,若否則為預設。",
+       "apihelp-query+search-param-sort": "設定回傳結果的排序。",
        "apihelp-query+search-example-simple": "搜尋 <kbd>meaning</kbd>。",
        "apihelp-query+search-example-text": "搜尋 <kbd>meaning</kbd> 的文字。",
        "apihelp-query+siteinfo-summary": "回傳有關站台的一般資訊。",
        "apihelp-query+siteinfo-param-prop": "要取得的資訊:",
        "apihelp-query+siteinfo-paramvalue-prop-general": "全面系統資訊。",
        "apihelp-query+siteinfo-paramvalue-prop-specialpagealiases": "特殊頁面別名清單。",
+       "apihelp-query+siteinfo-param-showalldb": "列出所有資料庫伺服器,不是只有最延遲的那台。",
        "apihelp-query+siteinfo-param-numberingroup": "列出在使用者群組裡的使用者數目。",
+       "apihelp-query+siteinfo-param-inlanguagecode": "用於本地化語言的語言代碼(盡可能)與外觀名稱。",
        "apihelp-query+siteinfo-example-simple": "索取站台資訊。",
        "apihelp-query+siteinfo-example-interwiki": "索取本地端跨 wiki 前綴的清單。",
        "apihelp-query+siteinfo-example-replag": "檢查目前的響應延遲。",
        "apihelp-query+usercontribs-paramvalue-prop-title": "添加標題與頁面的命名空間 ID。",
        "apihelp-query+usercontribs-paramvalue-prop-timestamp": "添加編輯的時間戳記。",
        "apihelp-query+usercontribs-paramvalue-prop-comment": "添加編輯的註釋。",
-       "apihelp-query+usercontribs-paramvalue-prop-parsedcomment": "添加編輯的已解析註解。",
+       "apihelp-query+usercontribs-paramvalue-prop-parsedcomment": "添加編輯的解析註釋。",
        "apihelp-query+usercontribs-paramvalue-prop-size": "添加編輯的新大小。",
        "apihelp-query+usercontribs-paramvalue-prop-flags": "添加編輯的標籤。",
        "apihelp-query+usercontribs-paramvalue-prop-patrolled": "標記已巡查編輯。",
        "apihelp-query+watchlist-paramvalue-prop-user": "添加有做出編輯的使用者。",
        "apihelp-query+watchlist-paramvalue-prop-userid": "添加有做出編輯的使用者 ID。",
        "apihelp-query+watchlist-paramvalue-prop-comment": "添加編輯的註釋。",
-       "apihelp-query+watchlist-paramvalue-prop-parsedcomment": "添加編輯的已解析註解。",
+       "apihelp-query+watchlist-paramvalue-prop-parsedcomment": "添加編輯的解析註釋。",
        "apihelp-query+watchlist-paramvalue-prop-timestamp": "添加編輯的時間戳記。",
        "apihelp-query+watchlist-paramvalue-prop-tags": "列出項目的標籤。",
        "apihelp-query+watchlist-param-type": "要顯示的更改類型:",
        "apihelp-revisiondelete-param-reason": "刪除或取消刪除的原因。",
        "apihelp-revisiondelete-param-tags": "在刪除日誌裡套用到項目的標籤。",
        "apihelp-rollback-summary": "撤修頁面的最後一次編輯。",
+       "apihelp-rollback-param-tags": "套用到回退的標籤。",
+       "apihelp-rollback-param-summary": "自定義編輯摘要。若為空,則使用預設摘要。",
        "apihelp-rollback-param-watchlist": "無條件使用設置將頁面加入或移除目前使用者的監視清單或者是不更改監視清單。",
        "apihelp-setnotificationtimestamp-param-entirewatchlist": "在所有已監視頁面運作。",
+       "apihelp-setnotificationtimestamp-example-page": "重新設定用於 <kbd>Main page</kbd> 的通知狀態。",
+       "apihelp-setnotificationtimestamp-example-allpages": "重新設定在 <kbd>{{ns:user}}</kbd> 命名空間裡頁面的通知狀態。",
        "apihelp-setpagelanguage-summary": "更改頁面的語言。",
+       "apihelp-setpagelanguage-extended-description-disabled": "您不被允許在此 wiki 上變更頁面的語言。\n\n請啟用 <var>[[mw:Special:MyLanguage/Manual:$wgPageLanguageUseDB|$wgPageLanguageUseDB]]</var> 來進行此操作。",
        "apihelp-setpagelanguage-param-reason": "變更的原因。",
        "apihelp-setpagelanguage-example-language": "更改 <kbd>Main Page</kbd> 的語言成巴斯克語。",
        "apihelp-stashedit-summary": "在分享快取裡預備編輯。",
        "apihelp-unblock-param-reason": "解除封鎖的原因。",
        "apihelp-unblock-param-tags": "在封鎖日誌裡更改套用到項目的標籤。",
        "apihelp-unblock-example-id": "解除封銷 ID #<kbd>105</kbd>。",
+       "apihelp-undelete-summary": "恢復已刪除頁面的修訂。",
        "apihelp-undelete-param-title": "要恢復的頁面標題。",
        "apihelp-undelete-param-reason": "還原的原因。",
        "apihelp-undelete-param-tags": "在刪除日誌裡更改套用到項目的標籤。",
        "apihelp-undelete-example-page": "取消刪除頁面 <kbd>Main Page</kbd>。",
        "apihelp-undelete-example-revisions": "取消刪除 <kbd>Main Page</kbd> 的兩筆修訂。",
        "apihelp-unlinkaccount-summary": "移除目前使用者所連結到的第三方帳號。",
+       "apihelp-upload-summary": "上傳檔案,或取得等待上傳的狀態。",
        "apihelp-upload-param-filename": "目標檔案名稱。",
        "apihelp-upload-param-comment": "上傳註釋。如果 <var>$1text</var> 未指定的話,也會作為新檔案用的初始頁面文字。",
        "apihelp-upload-param-text": "用於新檔案的初始頁面文字。",
        "api-format-prettyprint-header-hyperlinked": "這是$1格式的HTML實現。HTML對除錯很有用,但不適合應用程式使用。\n\n指定<var>format</var>參數以更改輸出格式。要查看$1格式的非HTML實現,設置[$3 <kbd>format=$2</kbd>]。\n\n參見[[mw:API|完整文件]],或[[Special:ApiHelp/main|API幫助]]以獲取更多信息。",
        "api-format-prettyprint-status": "此回應將會傳回HTTP狀態$1 $2。",
        "api-login-fail-badsessionprovider": "當使用$1無法登入。",
+       "api-login-fail-sameorigin": "當未套用相同原有方針時無法登入。",
        "api-pageset-param-titles": "要使用的標題清單。",
        "api-pageset-param-pageids": "要使用的頁面 ID 清單。",
        "api-pageset-param-revids": "要使用的修訂 ID 清單。",
        "api-help-param-upload": "必須使用 multipart/form-data 以檔案上傳的方式傳送。",
        "api-help-param-multi-separate": "將幾個值以 <kbd>|</kbd> 或 [[Special:ApiHelp/main#main/datatypes|alternative]] 分隔。",
        "api-help-param-multi-max": "上限值為 {{PLURAL:$1|$1}} (機器人為 {{PLURAL:$2|$2}})。",
+       "api-help-param-multi-max-simple": "值的最大數量為 {{PLURAL:$1|$1}}。",
        "api-help-param-multi-all": "要指定所有值,請使用<kbd>$1</kbd>。",
        "api-help-param-default": "預設值:$1",
        "api-help-param-default-empty": "預設值:<span class=\"apihelp-empty\">(空)</span>",
        "api-help-authmanagerhelper-returnurl": "為第三方身份驗證流程傳回URL,必須為絕對值。需要此值或<var>$1continue</var>兩者之一。\n\n在接收<samp>REDIRECT</samp>回應時,一般狀況下您將打開瀏覽器或網站瀏覽功能到特定的<samp>redirecttarget</samp> URL以進行第三方身份驗證流程。當它完成時,第三方會將瀏覽器或網站瀏覽功能送至此URL。您應當提取任何來自URL的查詢或POST參數,並將之作為<var>$1continue</var>請求傳遞至此API模組。",
        "api-help-authmanagerhelper-continue": "此請求是在先前的<samp>UI</samp>或<samp>REDIRECT</samp>回應之後的後續動作。必須為此值或<var>$1returnurl</var>。",
        "api-help-authmanagerhelper-additional-params": "此模組允許額外參數,取決於可用的身份驗證請求。使用<kbd>[[Special:ApiHelp/query+authmanagerinfo|action=query&meta=authmanagerinfo]]</kbd>与<kbd>amirequestsfor=$1</kbd>(或之前來自此模組的回應,如果合適)以決定可用請求及其使用的欄位。",
+       "apierror-appendnotsupported": "無法附加到使用內容模組 $1 的頁面。",
        "apierror-articleexists": "您所嘗試建立的條目剛剛已被創建。",
        "apierror-assertbotfailed": "斷言使用者擁有的 <code>bot</code> 權限失效。",
        "apierror-assertnameduserfailed": "斷言使用者「$1」出錯。",
        "apierror-contentserializationexception": "內容序列化失敗:$1",
        "apierror-copyuploadbadurl": "不允許從此 URL 來上傳。",
        "apierror-csp-report": "處理 CSP 報告時錯誤:$1。",
+       "apierror-emptypage": "不允許建立空白的新頁面。",
        "apierror-filedoesnotexist": "檔案不存在。",
        "apierror-filenopath": "無法取得本地端檔案路徑。",
        "apierror-filetypecannotberotated": "無法旋轉的檔案類型。",
        "apierror-imageusage-badtitle": "<kbd>$1</kbd>的標題必須是檔案。",
        "apierror-import-unknownerror": "未知的匯入錯誤:$1",
        "apierror-invalidcategory": "您所輸入的分類名稱無效。",
+       "apierror-invalidlang": "用於參數 <var>$1</var> 的語言代碼無效。",
+       "apierror-invalidoldimage": "<var>oldimage</var> 參數含有無效格式。",
+       "apierror-invalidparammix-cannotusewith": "參數 <kbd>$1</kbd> 不能與 <kbd>$2</kbd> 一起使用。",
+       "apierror-invalidparammix-mustusewith": "<kbd>$1</kbd> 參數僅能與 <kbd>$2</kbd> 一起使用。",
        "apierror-invalidparammix": "{{PLURAL:$2|參數}} $1 不能一起使用。",
        "apierror-invalidsha1base36hash": "所提供的 SHA1Base36 雜湊無效。",
        "apierror-invalidsha1hash": "所提供的 SHA1 雜湊無效。",
        "apierror-invalidtitle": "錯誤標題「$1」。",
+       "apierror-invalidurlparam": "<var>$1urlparam</var> 的值無效(<kbd>$2=$3</kbd>)。",
        "apierror-invaliduser": "無效的使用者名稱「$1」。",
        "apierror-invaliduserid": "使用者 ID <var>$1</var> 無效。",
+       "apierror-maxbytes": "參數 <var>$1</var> 不能大於 $2 {{PLURAL:$2|位元組|位元組}}",
+       "apierror-maxchars": "參數 <var>$1</var> 不能多於 $2 個{{PLURAL:$2|字元|字元}}",
+       "apierror-maxlag-generic": "正等待資料庫伺服器:已延遲 $1 {{PLURAL:$1|秒|秒}}。",
+       "apierror-maxlag": "正等待$2:已延遲 $1 {{PLURAL:$1|秒|秒}}。",
        "apierror-mimesearchdisabled": "MIME 搜尋在 Miser 模式裡被停用。",
        "apierror-missingcontent-pageid": "遺失頁面 ID 為 $1 的內容。",
        "apierror-missingcontent-revid": "遺失修訂 ID 為 $1 的內容。",
+       "apierror-missingparam-one-of": "{{PLURAL:$2|參數|參數其一}} $1 為必要。",
        "apierror-missingparam": "<var>$1</var>參數必須被設定。",
        "apierror-missingrev-pageid": "沒有頁面 ID 為 $1 的目前修訂。",
        "apierror-missingrev-title": "沒有標題為$1的目前修訂。",
        "apierror-missingtitle": "您所指定的頁面不存在。",
        "apierror-missingtitle-byname": "頁面$1不存在。",
+       "apierror-moduledisabled": "模組 <kbd>$1</kbd> 已停用。",
        "apierror-mustbeloggedin-changeauth": "必須登入,才能變更身分核對資取。",
        "apierror-mustbeloggedin-generic": "您必須登入。",
        "apierror-mustbeloggedin-linkaccounts": "您必須登入到連結帳號。",
index 9cf7acf..d0381cf 100644 (file)
@@ -838,17 +838,23 @@ class LocalisationCache {
                }
 
                # Fill in the fallback if it's not there already
-               if ( is_null( $coreData['fallback'] ) ) {
-                       $coreData['fallback'] = $code === 'en' ? false : 'en';
-               }
-               if ( $coreData['fallback'] === false ) {
-                       $coreData['fallbackSequence'] = [];
+               if ( ( is_null( $coreData['fallback'] ) || $coreData['fallback'] === false ) && $code === 'en' ) {
+                       $coreData['fallback'] = false;
+                       $coreData['originalFallbackSequence'] = $coreData['fallbackSequence'] = [];
                } else {
-                       $coreData['fallbackSequence'] = array_map( 'trim', explode( ',', $coreData['fallback'] ) );
+                       if ( !is_null( $coreData['fallback'] ) ) {
+                               $coreData['fallbackSequence'] = array_map( 'trim', explode( ',', $coreData['fallback'] ) );
+                       } else {
+                               $coreData['fallbackSequence'] = [];
+                       }
                        $len = count( $coreData['fallbackSequence'] );
 
-                       # Ensure that the sequence ends at en
-                       if ( $coreData['fallbackSequence'][$len - 1] !== 'en' ) {
+                       # Before we add the 'en' fallback for messages, keep a copy of
+                       # the original fallback sequence
+                       $coreData['originalFallbackSequence'] = $coreData['fallbackSequence'];
+
+                       # Ensure that the sequence ends at 'en' for messages
+                       if ( !$len || $coreData['fallbackSequence'][$len - 1] !== 'en' ) {
                                $coreData['fallbackSequence'][] = 'en';
                        }
                }
index 000bff2..bb3fb10 100644 (file)
@@ -284,13 +284,8 @@ interface Content {
         * made to replace information about the old content with information about
         * the new content.
         *
-        * This default implementation calls
-        * $this->getParserOutput( $content, $title, null, null, false ),
-        * and then calls getSecondaryDataUpdates( $title, $recursive ) on the
-        * resulting ParserOutput object.
-        *
-        * Subclasses may implement this to determine the necessary updates more
-        * efficiently, or make use of information about the old content.
+        * @deprecated since 1.32, call and override
+        *   ContentHandler::getSecondaryDataUpdates instead.
         *
         * @note Implementations should call the SecondaryDataUpdates hook, like
         *   AbstractContent does.
@@ -481,8 +476,10 @@ interface Content {
         * the current state of the database.
         *
         * @since 1.21
+        * @deprecated since 1.32, call and override
+        *   ContentHandler::getDeletionUpdates instead.
         *
-        * @param WikiPage $page The deleted page
+        * @param WikiPage $page The page the content was deleted from.
         * @param ParserOutput|null $parserOutput Optional parser output object
         *    for efficient access to meta-information about the content object.
         *    Provide if you have one handy.
index 7a378b3..fab043a 100644 (file)
@@ -28,6 +28,7 @@
 use Wikimedia\Assert\Assert;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
+use MediaWiki\Revision\SlotRenderingProvider;
 use MediaWiki\Search\ParserOutputSearchDataExtractor;
 
 /**
@@ -1410,4 +1411,75 @@ abstract class ContentHandler {
                return $parserOutput;
        }
 
+       /**
+        * Returns a list of DeferrableUpdate objects for recording information about the
+        * given Content in some secondary data store.
+        *
+        * Application logic should not call this method directly. Instead, it should call
+        * DerivedPageDataUpdater::getSecondaryDataUpdates().
+        *
+        * @note Implementations must not return a LinksUpdate instance. Instead, a LinksUpdate
+        * is created by the calling code in DerivedPageDataUpdater, on the combined ParserOutput
+        * of all slots, not for each slot individually. This is in contrast to the old
+        * getSecondaryDataUpdates method defined by AbstractContent, which returned a LinksUpdate.
+        *
+        * @note Implementations should not call $content->getParserOutput, they should call
+        * $slotOutput->getSlotRendering( $role, false ) instead if they need to access a ParserOutput
+        * of $content. This allows existing ParserOutput objects to be re-used, while avoiding
+        * creating a ParserOutput when none is needed.
+        *
+        * @param Title $title The title of the page to supply the updates for
+        * @param Content $content The content to generate data updates for.
+        * @param string $role The role (slot) in which the content is being used. Which updates
+        *        are performed should generally not depend on the role the content has, but the
+        *        DeferrableUpdates themselves may need to know the role, to track to which slot the
+        *        data refers, and to avoid overwriting data of the same kind from another slot.
+        * @param SlotRenderingProvider $slotOutput A provider that can be used to gain access to
+        *        a ParserOutput of $content by calling $slotOutput->getSlotParserOutput( $role, false ).
+        * @return DeferrableUpdate[] A list of DeferrableUpdate objects for putting information
+        *        about this content object somewhere. The default implementation returns an empty
+        *        array.
+        * @since 1.32
+        */
+       public function getSecondaryDataUpdates(
+               Title $title,
+               Content $content,
+               $role,
+               SlotRenderingProvider $slotOutput
+       ) {
+               return [];
+       }
+
+       /**
+        * Returns a list of DeferrableUpdate objects for removing information about content
+        * in some secondary data store. This is used when a page is deleted, and also when
+        * a slot is removed from a page.
+        *
+        * Application logic should not call this method directly. Instead, it should call
+        * WikiPage::getSecondaryDataUpdates().
+        *
+        * @note Implementations must not return a LinksDeletionUpdate instance. Instead, a
+        * LinksDeletionUpdate is created by the calling code in WikiPage.
+        * This is in contrast to the old getDeletionUpdates method defined by AbstractContent,
+        * which returned a LinksUpdate.
+        *
+        * @note Implementations should not rely on the page's current content, but rather the current
+        * state of the secondary data store.
+        *
+        * @param Title $title The title of the page to supply the updates for
+        * @param string $role The role (slot) in which the content is being used. Which updates
+        *        are performed should generally not depend on the role the content has, but the
+        *        DeferrableUpdates themselves may need to know the role, to track to which slot the
+        *        data refers, and to avoid overwriting data of the same kind from another slot.
+        *
+        * @return DeferrableUpdate[] A list of DeferrableUpdate objects for putting information
+        *        about this content object somewhere. The default implementation returns an empty
+        *        array.
+        *
+        * @since 1.32
+        */
+       public function getDeletionUpdates( Title $title, $role ) {
+               return [];
+       }
+
 }
index d1c9455..7aa8c78 100644 (file)
@@ -107,6 +107,5 @@ class PackedImageGallery extends TraditionalImageGallery {
         * @param int $num
         */
        public function setPerRow( $num ) {
-               return;
        }
 }
index e391609..8183ed7 100644 (file)
@@ -61,6 +61,7 @@
        "config-memory-raised": "'O valore 'e PHP <code>memory_limit</code> è $1, aumentato a $2.",
        "config-memory-bad": "<strong>Attenziò:</strong> 'o valore 'e PHP <code>memory_limit</code> è $1.\nProbabbilmente troppo basso.\n'A installazione se putesse scassà!",
        "config-apc": "[https://secure.php.net/apc APC] è installato",
+       "config-apcu": "[https://secure.php.net/apcu APCu] è installato",
        "config-wincache": "[https://www.iis.net/downloads/microsoft/wincache-extension WinCache] è installato",
        "config-no-cache-apcu": "<strong>Attenziò:</strong> [https://secure.php.net/apcu APCu], [http://xcache.lighttpd.net/ XCache] o [https://www.iis.net/downloads/microsoft/wincache-extension WinCache] nun so' state truvate.\n'A funziona caching 'e ll'oggette non è apicciata.",
        "config-mod-security": "<strong>Attenziò:</strong> 'O servitore web vuosto téne [https://modsecurity.org/ mod_security]/mod_security2 appicciato. Ce stanno tante mpustaziune commune ca 'o facessero causà prubbleme a MediaWiki e ll'ati software ca permettessero ll'utente 'e pubbrecà cuntenute.\nSi putite, stutate sta funziona. Sinò, riferite 'a [https://modsecurity.org/documentation/ documentaziona ncopp' 'o mod_security] o cuntattate 'o host vuosto pe' ve dà supporto quanno se scummogliasse cocch'errore.",
@@ -78,6 +79,7 @@
        "config-no-cli-uploads-check": "<strong>Attenziò:</strong> 'a cartella predefinita p' 'e carreche (<code>$1</code>) nun è stata cuntrullata p' 'a vulnerabbelità ncopp'a l'esecuzione arbitraria 'e script pe' tramente ca se fà l'installazione 'a linea 'e commando.",
        "config-brokenlibxml": "'O sistema vuosto ave na combinazione 'e verziune 'e PHP e libxml2 nguacchiata ca putesse scassà 'e date 'e MediaWiki 'n manera annascunnusa e pure l'ati apprecaziune p' 'o web.\nAgghiurnate a libxml2 2.7.3 o cchiù muderno ([https://bugs.php.net/bug.php?id=45996 'o bug studiato d' 'o lato PHP]).\nInstallaziona spezzata.",
        "config-suhosin-max-value-length": "Suhosin è installato e miette lemmeto 'o parametro GET <code>length</code> a $1 byte.\n'O componente MediaWiki ResourceLoader funzionarrà aggirann'a stu lemmeto, ma luvanno prestaziune.\nSi pussibile, avit'a mpustà <code>suhosin.get.max_value_length</code> a 1024 o cchiù auto 'n <code>php.ini</code>, e mpustà <code>$wgResourceLoaderMaxQueryLength</code> a 'o stesso valore 'n <code>LocalSettings.php</code>.",
+       "config-using-32bit": "<strong>Attenziò:</strong> 'o sistema vuosto pare c'ausasse nummere sane 'e 32-bit. Chest' [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:32-bit è scunzigliat].",
        "config-db-type": "Tipo 'e database:",
        "config-db-host": "Host d' 'o database:",
        "config-db-host-help": "Si 'o server database vuosto stà mpizzato dint' 'a nu server differente, miette 'o nomme d' 'o host o l'indirizzo IP sujo.\n\nSi state ausanno nu servizio spartuto web hosting, 'aggenzia 'e hosting v'avess'a dà 'o nomme buono 'e nomme host dint' 'a documentaziona suoja.\n\nSi state installanno chisto dint'a nu server Windows cu MySQL, ausanno \"localhost\" può darse ca nun funziona p' 'o nomme server. Si chisto nun funziona, mettite \"127.0.0.1\" p' 'o ndirizzo locale vuosto.\n\nSi state ausanno PostgreSQL, lassate abbacante stu campo pe' v'accucchià cu nu socket Unix.",
        "config-type-mysql": "MariaDB, MySQL o compatibbele",
        "config-type-mssql": "Microsoft SQL Server",
        "config-support-info": "MediaWiki supporta 'e sisteme 'e database ccà abbascio:\n\n$1\n\nSi nfra chiste ccà nun vedite 'o sistema 'e database ca vulite ausà, allora avite liegge 'e instruziune ccà ncoppa pe' ne dà supporto.",
-       "config-dbsupport-mysql": "* [{{int:version-db-mysql-url}} MySQL] è 'a configurazione cchiù mmeglio p' 'o MediaWiki e è chilla meglio suppurtata. MediaWiki può faticà pure cu' [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], ca fossero MySQL cumpatibbele. ([https://secure.php.net/manual/en/mysqli.installation.php Comme s'adda fà pe' cumpilà PHP cu suppuorto MySQL])",
-       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è nu sistema canusciuto 'e database open source ca fosse n'alternativa a MySQL. Putess'avé cocch'errore p'arricettà, e nun è cunzigliato 'e ll'ausà dint'a n'ambiente 'e produziona. ([https://secure.php.net/manual/en/pgsql.installation.php Comme s'avess'a cumpilà PHP cu suppuorto PostgreSQL])",
-       "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]  è nu sistema 'e database leggero, ca fosse assaje buono suppurtato. ([http://www.php.net/manual/en/pdo.installation.php Comme cumpilà PHP cu suppuorto SQLite], aùsa PDO)",
-       "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] è nu database 'e na fraveca commerciale. ([http://www.php.net/manual/en/oci8.installation.php Comme cumpilà PHP cu suppuorto OCI8])",
+       "config-dbsupport-mysql": "* [{{int:version-db-mariadb-url}} MariaDB] è 'a configurazione cchiù mmeglio p' 'o MediaWiki e è chilla meglio suppurtata. MediaWiki può faticà pure cu' [{{int:version-db-mariadb-url}} MariaDB] e [{{int:version-db-percona-url}} Percona Server], ca fossero MariaDB cumpatibbele. ([https://secure.php.net/manual/en/mysqli.installation.php Comme s'adda fà pe' cumpilà PHP cu suppuorto MySQL])",
+       "config-dbsupport-postgres": "* [{{int:version-db-postgres-url}} PostgreSQL] è nu sistema canusciuto 'e database open source ca fosse n'alternativa a MySQL.\n([https://secure.php.net/manual/en/pgsql.installation.php Comme s'avess'a cumpilà PHP cu suppuorto PostgreSQL])",
+       "config-dbsupport-sqlite": "* [{{int:version-db-sqlite-url}} SQLite]  è nu sistema 'e database leggero, ca fosse assaje buono suppurtato.\n([https://secure.php.net/manual/en/pdo.installation.php Comme cumpilà PHP cu suppuorto SQLite], aùsa PDO)",
+       "config-dbsupport-oracle": "* [{{int:version-db-oracle-url}} Oracle] è nu database 'e na fraveca commerciale. ([https://secure.php.net/manual/en/oci8.installation.php Comme cumpilà PHP cu suppuorto OCI8])",
        "config-dbsupport-mssql": "* [{{int:version-db-mssql-url}} Microsoft SQL Server] è nu database 'e na fraveca commerciale p' 'o Windows. ([https://secure.php.net/manual/en/sqlsrv.installation.php Comme cumpilà PHP cu suppuorto SQLSRV])",
-       "config-header-mysql": "Mpustaziune MySQL",
+       "config-header-mysql": "Mpustaziune MariaDB/MySQL",
        "config-header-postgres": "Mpustaziune PostgreSQL",
        "config-header-sqlite": "Mpustaziune SQLite",
        "config-header-oracle": "Mpustaziune Oracle",
        "config-db-web-create": "Crìa 'o cunto si nun esiste ancora",
        "config-db-web-no-create-privs": "'O cunto ausato pe' ne fà l'installazione nun tene diritte necessarie pe' ne putè crià n'atu cunto.\n'O cunto zegnàto ccà adda esistere già.",
        "config-mysql-engine": "Mutore d'astipo:",
-       "config-mysql-innodb": "InnoDB",
+       "config-mysql-innodb": "InnoDB (fosse 'o cunzigliato)",
        "config-mysql-myisam": "MyISAM",
        "config-mysql-myisam-dep": "<strong>Attenziò:</strong> avite scigliuto MyISAM comm' 'o mutore 'archiviaziona MySQL, ca nun è raccummannato pe' l'ausà cu MediaWiki, pecché:\n* supporta debolmente 'a concorrenza p' 'o blocco d' 'a tabbella\n* è cchiù inchine 'a corruzione 'e l'ati mutore\n* 'o codece 'e base 'e MediaWiki nun gestisce sempe MyISAM comme l'avess'a gistiunà\n\nSi ll'installazione vosta MySQL suppuorta InnoDB, è autamente raccummandato ca si scigliesse a 'o posto suo.\nSi 'a installazione MySQL nun suppurtasse InnoDB, forse è 'o mumento 'e ll'agghiurnà.",
        "config-mysql-only-myisam-dep": "<strong>Attenziò:</strong> MyISAM è l'uneco mutore p'astipà date ca se trova mo' a disposizione p' 'o MySQL dint'a sta macchina, e nun fosse raccumandato 'e s'ausà cu MediaWiki, pecché:\n* suppurtasse minimamente concorrenza pe' bbìa 'e bluccà tabbelle\n* è cchiù facile ca jesse a se scassà cchiù 'e l'ati mutore\n* 'o codece MediaWiki nun maniasse sempe MyISAM comme l'avesse 'e manià\n\nL'installazione MySQL nun suppurtasse InnoDB, può darse ca chist'è 'o mumento pe' ve ll'agghiurnà.",
        "config-subscribe": "Mettiteve dint' 'a [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce mailing list 'e ll'annunciazione 'e verziune d' 'o software rilassate].",
        "config-subscribe-help": "Chest'è na mailing list a basso traffeco ca se dedicasse a se ffà annunzie 'e verziune nove, piglianno pure mpurtante nutarelle ca riguardassero 'a sicurezza.\nFosse cunzigliato 'e se nzegnà e s'agghiurnà l'installazione 'e MediaWiki quanno na verziona nova fosse pubbreca.",
        "config-subscribe-noemail": "Vuje avite tentato 'e ve trasì dint' 'a mailing list addedecata a se fà annunzie ncopp' 'e verziune nove senza ve dà n'indirizzo email.\nNzertanno n'indirizzo email se vulite affettuà l'iscrizione dint'a mailing list.",
+       "config-pingback": "Sparte 'e date 'e st'installazione ch' 'e sviluppature 'e MediaWiki.",
+       "config-pingback-help": "Si vuje sciglite st'opzione, MediaWiki cuntattasse spisso https://www.mediawiki.org ch' 'e date 'e base e st'istanza MediaWiki. Dint' 'a sta categoria 'e date, tràseno, p'esempie, 'o tipo 'e sistema, 'a virziona 'e PHP e database 'e backend scigliuto. 'A Wikimedia Foundation spartisse sti date ch' 'e sviluppature Mediawiki p' 'a puté aiutà a guidà 'e fatiche 'e sviluppo future. P' 'o sistema d' 'o vuosto 'e date se mannan'accussì:\n<pre>$1</pre>",
        "config-almost-done": "Avite quase fernuto!\nMo' putite zumpà 'a parta r' 'a configurazione e sempricemente installà 'a wiki.",
        "config-optional-continue": "Spiate cchiù dimanne.",
        "config-optional-skip": "Me so' scucciato già, installa surtanto 'o wiki.",
        "config-cache-options": "Mpustaziune p' 'a cache d'oggette:",
        "config-cache-help": "'O caching 'uggette s'ausa pe' puté migliurà 'a velocità 'e MediaWiki a fforza 'e ffà caching d' 'e date cchiù spisso ausàte.\nE Mezze a gruosse site se songo ncuraggiate a ll'appiccià chiste, e site piccerilli vedarranno migliuramente pure.",
        "config-cache-none": "Nisciuna memorizzazione n cache (nisciuna funziunalità è luvata, ma 'a velocità se putesse ffà a meno dint' 'e wiki cchiù gruosse)",
-       "config-cache-accel": "Mettere 'n cache oggette PHP (APC, XCache o WinCache)",
+       "config-cache-accel": "Mettere 'n cache oggette PHP (APC, APCu o WinCache)",
        "config-cache-memcached": "Aúsa 'o Memcached (richiede cchiù mpustaziune 'installazione e configuraziona)",
        "config-memcached-servers": "Server memcached:",
        "config-memcached-help": "Elenco 'e ll'indirizzi IP p' 'e putè ausà p' 'o Memcached.\nS'avess'a specificà uno pe' riga e scrivere 'a porta 'e trasuta. P'esempio:\n 127.0.0.1:11211\n 192.168.1.25:1234",
        "config-install-subscribe-fail": "Nun se pò sottoscrivere mediawiki-announce: $1",
        "config-install-subscribe-notpossible": "cURL nun è installato e <code>allow_url_fopen</code> nun è disponibbele.",
        "config-install-mainpage": "Crianno 'a paggena prencepale ch' 'e cuntenute predefinite",
+       "config-install-mainpage-exists": "'A paggena principale esiste già, è zumpata",
        "config-install-extension-tables": "Crianno tabelle pe' estenziune appicciate",
        "config-install-mainpage-failed": "Nun se pò nzertà 'a paggena prencepale: $1",
-       "config-install-done": "<strong>Cumplimente!</strong>\nAvite installato MediaWiki apposto.\n\n'O prugramma 'installazione ha generato nu file <code>LocalSettings.php</code> ca cuntene tuttuquante 'e mpustaziune.\n\nAvit'a scarrecà chisto e 'o nzertà dint' 'a cartella bbase d' 'o wiki vuosto ('a stessa addò fosse prisente l' index.php). 'A scarreca avess'a partì automaticamente.\n\nSi nu download nun s'avviasse, o si è stato annullato, putite riavvià cliccanno ncopp' 'o cullegamento 'e seguito:\n\n$3\n\n<strong>Nota:</strong> si ascite mò 'a ll'installazione senza manco scarrecà 'o file 'e configurazione che s'è criato, po chesto nun sarrà cchiù dispunibbele.\n\nQuanno fosse tutto fernuto allora <strong>[$2 trasite dint' 'o wiki vuosto]</strong>.",
+       "config-install-done": "<strong>Cumplimente!</strong>\nAvite installato MediaWiki.\n\n'O prugramma 'installazione ha generato nu file <code>LocalSettings.php</code> ca cuntene tuttuquante 'e mpustaziune.\n\nAvit'a scarrecà chisto e 'o nzertà dint' 'a cartella bbase d' 'o wiki vuosto ('a stessa addò fosse prisente l' index.php). 'A scarreca avess'a partì automaticamente.\n\nSi nu download nun s'avviasse, o si è stato annullato, putite riavvià cliccanno ncopp' 'o cullegamento 'e seguito:\n\n$3\n\n<strong>Nota:</strong> si ascite mò 'a ll'installazione senza manco scarrecà 'o file 'e configurazione che s'è criato, po chesto nun sarrà cchiù dispunibbele.\n\nQuanno fosse tutto fernuto allora <strong>[$2 trasite dint' 'o wiki vuosto]</strong>.",
+       "config-install-done-path": "<strong>Cumplimente!</strong>\nAvite installato MediaWiki.\n\n'O prugramma 'installazione ha generato nu file <code>LocalSettings.php</code> ca cuntene tuttuquante 'e mpustaziune.\n\nAvit'a scarrecà chisto, e l'avit'azzeccà dint' 'o <code>$4</code>. 'A scarreca avess'a partì automaticamente.\n\nSi nu download nun s'avviasse, o si è stato annullato, putite riavvià cliccanno ncopp' 'o cullegamento 'e seguito:\n\n$3\n\n<strong>Nota:</strong> si ascite mò 'a ll'installazione senza manco scarrecà 'o file 'e configurazione che s'è criato, po chesto nun sarrà cchiù dispunibbele.\n\nQuanno fosse tutto fernuto allora <strong>[$2 trasite dint' 'o wiki vuosto]</strong>.",
+       "config-install-success": "Avite installato MediaWiki apposto. Mo' putite vedé ncopp'a <$1$2> 'o wiki vuosto.\nSi avite cocche dubbio, vedite 'e trasí dint' 'a l'elenco 'e quistione FAQ:\n<https://www.mediawiki.org/wiki/Manual:FAQ> o vedite 'e cuntattà cocche forum 'e suppuorto dint' 'a chilla paggena.",
        "config-download-localsettings": "Scarreca <code>LocalSettings.php</code>",
        "config-help": "ajùto",
        "config-help-tooltip": "cliccà pe' 'o spannere",
        "config-nofile": "'O file \"$1\" nun se trova. Forse è stato scancellato?",
        "config-extension-link": "'O sapevate ch' 'o wiki vuosto suppurtasse 'e [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Extensions estensiune]?\n\nPutite navigà nfra chiste [https://www.mediawiki.org/wiki/Special:MyLanguage/Category:Extensions_by_category estensiune pe' categurìa].",
-       "mainpagetext": "<strong>MediaWiki è stato nstallato.</strong>",
-       "mainpagedocfooter": "Iate a cunzultà [https://meta.wikimedia.org/wiki/Help:Contents User's Guide] pe' n'avé nfurmaziune ncopp' 'o modo aùso d' 'o software wiki.\n\n== P'accummincià ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Elenco 'e mpustaziune pe' sta configuraziona]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ FAQ 'e Mediawiki]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Elenco 'e nutizie 'e Mediawiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizzazzione 'e MediaWiki p' 'a lengua vuosta]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Mparate a cumbattere 'o spammo dint' 'a wiki d' 'a vosta]"
+       "config-skins-screenshots": "$1 (screenshots: $2)",
+       "config-extensions-requires": "$1 (vuless' 'o $2)",
+       "config-screenshot": "screenshot",
+       "mainpagetext": "<strong>MediaWiki è stato installato.</strong>",
+       "mainpagedocfooter": "Iate a cunzultà [https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Contents User's Guide] pe' n'avé nfurmaziune ncopp' 'o modo aùso d' 'o software wiki.\n\n== P'accummincià ==\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Configuration_settings Elenco 'e mpustaziune pe' sta configuraziona]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:FAQ FAQ 'e Mediawiki]\n* [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce Elenco 'e nutizie 'e Mediawiki]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Localisation#Translation_resources Localizzazzione 'e MediaWiki p' 'a lengua vuosta]\n* [https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Combating_spam Mparate a cumbattere 'o spammo dint' 'a wiki d' 'a vosta]"
 }
index 689326e..0b85fbe 100644 (file)
@@ -264,8 +264,6 @@ class JobQueueDB extends JobQueue {
                if ( $flags & self::QOS_ATOMIC ) {
                        $dbw->endAtomic( $method );
                }
-
-               return;
        }
 
        /**
index 73ecc9d..3f8a11b 100644 (file)
@@ -181,7 +181,7 @@ class ParsoidVirtualRESTService extends VirtualRESTService {
                                unset( $req['query']['oldid'] );
                        }
                } elseif ( $reqType === 'transform' ) {
-                       $req['url'] .= 'transform/'. $parts[3] . '/to/' . $parts[5];
+                       $req['url'] .= 'transform/' . $parts[3] . '/to/' . $parts[5];
                        // the title
                        if ( isset( $parts[6] ) ) {
                                $req['url'] .= '/' . $parts[6];
index 287c198..91bed4a 100644 (file)
@@ -259,13 +259,13 @@ class JpegHandler extends ExifBitmapHandler {
 
                // Make a regex out of the source data to match it to an array of color
                // spaces in a case-insensitive way
-               $colorSpaceRegex = '/'.preg_quote( $data[0], '/' ).'/i';
+               $colorSpaceRegex = '/' . preg_quote( $data[0], '/' ) . '/i';
                if ( empty( preg_grep( $colorSpaceRegex, $colorSpaces ) ) ) {
                        // We can't establish that this file matches the color space, don't process it
                        return false;
                }
 
-               $profileRegex = '/'.preg_quote( $data[1], '/' ).'/i';
+               $profileRegex = '/' . preg_quote( $data[1], '/' ) . '/i';
                if ( empty( preg_grep( $profileRegex, $oldProfileStrings ) ) ) {
                        // We can't establish that this file has the expected ICC profile, don't process it
                        return false;
index 7404f83..6a42d58 100644 (file)
@@ -355,7 +355,7 @@ class Article implements Page {
                                if ( $this->mRevision !== null ) {
                                        // Revision title doesn't match the page title given?
                                        if ( $this->mPage->getId() != $this->mRevision->getPage() ) {
-                                               $function = get_class( $this->mPage ). '::newFromID';
+                                               $function = get_class( $this->mPage ) . '::newFromID';
                                                $this->mPage = $function( $this->mRevision->getPage() );
                                        }
                                }
@@ -817,6 +817,7 @@ class Article implements Page {
                // Note that the ArticleViewHeader hook is allowed to set $outputDone to a
                // ParserOutput instance.
                $pOutput = ( $outputDone instanceof ParserOutput )
+                       // phpcs:ignore MediaWiki.Usage.NestedInlineTernary.UnparenthesizedTernary -- FIXME T203805
                        ? $outputDone // object fetched by hook
                        : $this->mParserOutput ?: null; // ParserOutput or null, avoid false
 
@@ -2155,7 +2156,7 @@ class Article implements Page {
 
        /**
         * Lightweight method to get the parser output for a page, checking the parser cache
-        * and so on. Doesn't consider most of the stuff that WikiPage::view is forced to
+        * and so on. Doesn't consider most of the stuff that Article::view() is forced to
         * consider, so it's not appropriate to use there.
         *
         * @since 1.16 (r52326) for LiquidThreads
@@ -2304,8 +2305,13 @@ class Article implements Page {
         * Call to WikiPage function for backwards compatibility.
         * @see WikiPage::doDeleteUpdates
         */
-       public function doDeleteUpdates( $id, Content $content = null ) {
-               return $this->mPage->doDeleteUpdates( $id, $content );
+       public function doDeleteUpdates(
+               $id,
+               Content $content = null,
+               $revision = null,
+               User $user = null
+       ) {
+               $this->mPage->doDeleteUpdates( $id, $content, $revision, $user );
        }
 
        /**
index 1f87d93..0a07c68 100644 (file)
@@ -266,7 +266,7 @@ class ImageHistoryList extends ContextSource {
                } else {
                        $row .=
                                '<td dir="' . MediaWikiServices::getInstance()->getContentLanguage()->getDir() .
-                               '">' .  Linker::formatComment( $description, $this->title ) . '</td>';
+                               '">' . Linker::formatComment( $description, $this->title ) . '</td>';
                }
 
                $rowClass = null;
index bf21a56..74e3179 100644 (file)
@@ -29,6 +29,7 @@ use MediaWiki\Storage\PageUpdater;
 use MediaWiki\Storage\RevisionRecord;
 use MediaWiki\Storage\RevisionSlotsUpdate;
 use MediaWiki\Storage\RevisionStore;
+use MediaWiki\Storage\SlotRecord;
 use Wikimedia\Assert\Assert;
 use Wikimedia\Rdbms\FakeResultWrapper;
 use Wikimedia\Rdbms\IDatabase;
@@ -2820,15 +2821,21 @@ class WikiPage implements Page, IDBAccessObject {
         * Do some database updates after deletion
         *
         * @param int $id The page_id value of the page being deleted
-        * @param Content|null $content Optional page content to be used when determining
+        * @param Content|null $content Page content to be used when determining
         *   the required updates. This may be needed because $this->getContent()
         *   may already return null when the page proper was deleted.
-        * @param Revision|null $revision The latest page revision
+        * @param RevisionRecord|Revision|null $revision The current page revision at the time of
+        *   deletion, used when determining the required updates. This may be needed because
+        *   $this->getRevision() may already return null when the page proper was deleted.
         * @param User|null $user The user that caused the deletion
         */
        public function doDeleteUpdates(
                $id, Content $content = null, Revision $revision = null, User $user = null
        ) {
+               if ( $id !== $this->getId() ) {
+                       throw new InvalidArgumentException( 'Mismatching page ID' );
+               }
+
                try {
                        $countable = $this->isCountable();
                } catch ( Exception $ex ) {
@@ -2843,7 +2850,9 @@ class WikiPage implements Page, IDBAccessObject {
                ) );
 
                // Delete pagelinks, update secondary indexes, etc
-               $updates = $this->getDeletionUpdates( $content );
+               $updates = $this->getDeletionUpdates(
+                       $revision ? $revision->getRevisionRecord() : $content
+               );
                foreach ( $updates as $update ) {
                        DeferredUpdates::addUpdate( $update );
                }
@@ -3545,32 +3554,68 @@ class WikiPage implements Page, IDBAccessObject {
         * updates should remove any information about this page from secondary data
         * stores such as links tables.
         *
-        * @param Content|null $content Optional Content object for determining the
-        *   necessary updates.
+        * @param RevisionRecord|Content|null $rev The revision being deleted. Also accepts a Content
+        *       object for backwards compatibility.
         * @return DeferrableUpdate[]
         */
-       public function getDeletionUpdates( Content $content = null ) {
-               if ( !$content ) {
-                       // load content object, which may be used to determine the necessary updates.
-                       // XXX: the content may not be needed to determine the updates.
+       public function getDeletionUpdates( $rev = null ) {
+               if ( !$rev ) {
+                       wfDeprecated( __METHOD__ . ' without a RevisionRecord', '1.32' );
+
                        try {
-                               $content = $this->getContent( Revision::RAW );
+                               $rev = $this->getRevisionRecord();
                        } catch ( Exception $ex ) {
                                // If we can't load the content, something is wrong. Perhaps that's why
                                // the user is trying to delete the page, so let's not fail in that case.
                                // Note that doDeleteArticleReal() will already have logged an issue with
                                // loading the content.
+                               wfDebug( __METHOD__ . ' failed to load current revision of page ' . $this->getId() );
                        }
                }
 
-               if ( !$content ) {
-                       $updates = [];
+               if ( !$rev ) {
+                       $slotContent = [];
+               } elseif ( $rev instanceof Content ) {
+                       wfDeprecated( __METHOD__ . ' with a Content object instead of a RevisionRecord', '1.32' );
+
+                       $slotContent = [ 'main' => $rev ];
                } else {
-                       $updates = $content->getDeletionUpdates( $this );
+                       $slotContent = array_map( function ( SlotRecord $slot ) {
+                               return $slot->getContent( Revision::RAW );
+                       }, $rev->getSlots()->getSlots() );
                }
 
-               Hooks::run( 'WikiPageDeletionUpdates', [ $this, $content, &$updates ] );
-               return $updates;
+               $allUpdates = [ new LinksDeletionUpdate( $this ) ];
+
+               // NOTE: once Content::getDeletionUpdates() is removed, we only need to content
+               // model here, not the content object!
+               // TODO: consolidate with similar logic in DerivedPageDataUpdater::getSecondaryDataUpdates()
+               /** @var Content $content */
+               foreach ( $slotContent as $role => $content ) {
+                       $handler = $content->getContentHandler();
+
+                       $updates = $handler->getDeletionUpdates(
+                               $this->getTitle(),
+                               $role
+                       );
+                       $allUpdates = array_merge( $allUpdates, $updates );
+
+                       // TODO: remove B/C hack in 1.32!
+                       $legacyUpdates = $content->getDeletionUpdates( $this );
+
+                       // HACK: filter out redundant and incomplete LinksDeletionUpdate
+                       $legacyUpdates = array_filter( $legacyUpdates, function ( $update ) {
+                               return !( $update instanceof LinksDeletionUpdate );
+                       } );
+
+                       $allUpdates = array_merge( $allUpdates, $legacyUpdates );
+               }
+
+               Hooks::run( 'PageDeletionDataUpdates', [ $this->getTitle(), $rev, &$allUpdates ] );
+
+               // TODO: hard deprecate old hook in 1.33
+               Hooks::run( 'WikiPageDeletionUpdates', [ $this, $content, &$allUpdates ] );
+               return $allUpdates;
        }
 
        /**
index 0326499..6d6dd89 100644 (file)
@@ -1088,7 +1088,7 @@ class PPFrame_Hash implements PPFrame {
                        } elseif ( is_array( $contextNode ) ) {
                                // Node descriptor array
                                if ( count( $contextNode ) !== 2 ) {
-                                       throw new MWException( __METHOD__.
+                                       throw new MWException( __METHOD__ .
                                                ': found an array where a node descriptor should be' );
                                }
                                list( $contextName, $contextChildren ) = $contextNode;
@@ -1786,7 +1786,7 @@ class PPNode_Hash_Tree implements PPNode {
                                $class = self::class;
                        }
                } else {
-                       throw new MWException( __METHOD__.': invalid node descriptor' );
+                       throw new MWException( __METHOD__ . ': invalid node descriptor' );
                }
                return new $class( $store, $index );
        }
@@ -2206,7 +2206,7 @@ class PPNode_Hash_Attr implements PPNode {
        public function __construct( array $store, $index ) {
                $descriptor = $store[$index];
                if ( $descriptor[PPNode_Hash_Tree::NAME][0] !== '@' ) {
-                       throw new MWException( __METHOD__.': invalid name in attribute descriptor' );
+                       throw new MWException( __METHOD__ . ': invalid name in attribute descriptor' );
                }
                $this->name = substr( $descriptor[PPNode_Hash_Tree::NAME], 1 );
                $this->value = $descriptor[PPNode_Hash_Tree::CHILDREN][0];
index 9764549..604a140 100644 (file)
@@ -1162,8 +1162,8 @@ MESSAGE;
                        }
                } else {
                        if ( $states ) {
-                               // Keep default escaping of slashes (e.g. "</script>") for ResourceLoaderClientHtml.
-                               $this->errors[] = 'Problematic modules: ' . json_encode( $states, JSON_PRETTY_PRINT );
+                               $this->errors[] = 'Problematic modules: '
+                                       . self::encodeJsonForScript( $states );
                        }
                }
 
@@ -1223,7 +1223,7 @@ MESSAGE;
                        if ( self::inDebugMode() ) {
                                $scripts = new XmlJsCode( "function ( $, jQuery, require, module ) {\n{$scripts->value}\n}" );
                        } else {
-                               $scripts = new XmlJsCode( 'function($,jQuery,require,module){'. $scripts->value . '}' );
+                               $scripts = new XmlJsCode( 'function($,jQuery,require,module){' . $scripts->value . '}' );
                        }
                } elseif ( !is_string( $scripts ) && !is_array( $scripts ) ) {
                        throw new MWException( 'Invalid scripts error. Array of URLs or string of code expected.' );
@@ -1292,6 +1292,35 @@ MESSAGE;
                return $out;
        }
 
+       /**
+        * Wrapper around json_encode that avoids needless escapes,
+        * and pretty-prints in debug mode.
+        *
+        * @internal
+        * @since 1.32
+        * @param bool|string|array $data
+        * @return string JSON
+        */
+       public static function encodeJsonForScript( $data ) {
+               // Keep output as small as possible by disabling needless escape modes
+               // that PHP uses by default.
+               // However, while most module scripts are only served on HTTP responses
+               // for JavaScript, some modules can also be embedded in the HTML as inline
+               // scripts. This, and the fact that we sometimes need to export strings
+               // containing user-generated content and labels that may genuinely contain
+               // a sequences like "</script>", we need to encode either '/' or '<'.
+               // By default PHP escapes '/'. Let's escape '<' instead which is less common
+               // and allows URLs to mostly remain readable.
+               $jsonFlags = JSON_UNESCAPED_SLASHES |
+                       JSON_UNESCAPED_UNICODE |
+                       JSON_HEX_TAG |
+                       JSON_HEX_AMP;
+               if ( self::inDebugMode() ) {
+                       $jsonFlags |= JSON_PRETTY_PRINT;
+               }
+               return json_encode( $data, $jsonFlags );
+       }
+
        /**
         * Returns a JS call to mw.loader.state, which sets the state of one
         * ore more modules to a given value. Has two calling conventions:
@@ -1317,31 +1346,6 @@ MESSAGE;
                );
        }
 
-       /**
-        * Returns JS code which calls the script given by $script. The script will
-        * be called with local variables name, version, dependencies and group,
-        * which will have values corresponding to $name, $version, $dependencies
-        * and $group as supplied.
-        *
-        * @param string $name Module name
-        * @param string $version Module version hash
-        * @param array $dependencies List of module names on which this module depends
-        * @param string $group Group which the module is in.
-        * @param string $source Source of the module, or 'local' if not foreign.
-        * @param string $script JavaScript code
-        * @return string JavaScript code
-        */
-       public static function makeCustomLoaderScript( $name, $version, $dependencies,
-               $group, $source, $script
-       ) {
-               $script = str_replace( "\n", "\n\t", trim( $script ) );
-               return Xml::encodeJsCall(
-                       "( function ( name, version, dependencies, group, source ) {\n\t$script\n} )",
-                       [ $name, $version, $dependencies, $group, $source ],
-                       self::inDebugMode()
-               );
-       }
-
        private static function isEmptyObject( stdClass $obj ) {
                foreach ( $obj as $key => $value ) {
                        return false;
@@ -1378,69 +1382,56 @@ MESSAGE;
 
        /**
         * Returns JS code which calls mw.loader.register with the given
-        * parameters. Has three calling conventions:
-        *
-        *   - ResourceLoader::makeLoaderRegisterScript( $name, $version,
-        *        $dependencies, $group, $source, $skip
-        *     ):
-        *        Register a single module.
+        * parameter.
         *
-        *   - ResourceLoader::makeLoaderRegisterScript( [ $name1, $name2 ] ):
-        *        Register modules with the given names.
+        * @par Example
+        * @code
         *
-        *   - ResourceLoader::makeLoaderRegisterScript( [
+        *     ResourceLoader::makeLoaderRegisterScript( [
         *        [ $name1, $version1, $dependencies1, $group1, $source1, $skip1 ],
         *        [ $name2, $version2, $dependencies1, $group2, $source2, $skip2 ],
         *        ...
         *     ] ):
-        *        Registers modules with the given names and parameters.
+        * @endcode
         *
-        * @param string $name Module name
-        * @param string|null $version Module version hash
-        * @param array|null $dependencies List of module names on which this module depends
-        * @param string|null $group Group which the module is in
-        * @param string|null $source Source of the module, or 'local' if not foreign
-        * @param string|null $skip Script body of the skip function
+        * @internal
+        * @since 1.32
+        * @param array $modules Array of module registration arrays, each containing
+        *  - string: module name
+        *  - string: module version
+        *  - array|null: List of dependencies (optional)
+        *  - string|null: Module group (optional)
+        *  - string|null: Name of foreign module source, or 'local' (optional)
+        *  - string|null: Script body of a skip function (optional)
         * @return string JavaScript code
         */
-       public static function makeLoaderRegisterScript( $name, $version = null,
-               $dependencies = null, $group = null, $source = null, $skip = null
-       ) {
-               if ( is_array( $name ) ) {
+       public static function makeLoaderRegisterScript( array $modules ) {
+               // Optimisation: Transform dependency names into indexes when possible
+               // to produce smaller output. They are expanded by mw.loader.register on
+               // the other end using resolveIndexedDependencies().
+               $index = [];
+               foreach ( $modules as $i => &$module ) {
                        // Build module name index
-                       $index = [];
-                       foreach ( $name as $i => &$module ) {
-                               $index[$module[0]] = $i;
-                       }
-
-                       // Transform dependency names into indexes when possible, they will be resolved by
-                       // mw.loader.register on the other end
-                       foreach ( $name as &$module ) {
-                               if ( isset( $module[2] ) ) {
-                                       foreach ( $module[2] as &$dependency ) {
-                                               if ( isset( $index[$dependency] ) ) {
-                                                       $dependency = $index[$dependency];
-                                               }
+                       $index[$module[0]] = $i;
+               }
+               foreach ( $modules as &$module ) {
+                       if ( isset( $module[2] ) ) {
+                               foreach ( $module[2] as &$dependency ) {
+                                       if ( isset( $index[$dependency] ) ) {
+                                               // Replace module name in dependency list with index
+                                               $dependency = $index[$dependency];
                                        }
                                }
                        }
+               }
 
-                       array_walk( $name, [ 'self', 'trimArray' ] );
+               array_walk( $modules, [ 'self', 'trimArray' ] );
 
-                       return Xml::encodeJsCall(
-                               'mw.loader.register',
-                               [ $name ],
-                               self::inDebugMode()
-                       );
-               } else {
-                       $registration = [ $name, $version, $dependencies, $group, $source, $skip ];
-                       self::trimArray( $registration );
-                       return Xml::encodeJsCall(
-                               'mw.loader.register',
-                               $registration,
-                               self::inDebugMode()
-                       );
-               }
+               return Xml::encodeJsCall(
+                       'mw.loader.register',
+                       [ $modules ],
+                       self::inDebugMode()
+               );
        }
 
        /**
@@ -1491,7 +1482,7 @@ MESSAGE;
        public static function makeInlineCodeWithModule( $modules, $script ) {
                // Adds an array to lazy-created RLQ
                return '(window.RLQ=window.RLQ||[]).push(['
-                       . json_encode( $modules ) . ','
+                       . self::encodeJsonForScript( $modules ) . ','
                        . 'function(){' . trim( $script ) . '}'
                        . ']);';
        }
index 8d08366..5c072bf 100644 (file)
@@ -304,7 +304,10 @@ class ResourceLoaderClientHtml {
                // Inline RLQ: Load general modules
                if ( $data['general'] ) {
                        $chunks[] = ResourceLoader::makeInlineScript(
-                               Xml::encodeJsCall( 'mw.loader.load', [ $data['general'] ] ),
+                               'RLPAGEMODULES='
+                                       . ResourceLoader::encodeJsonForScript( $data['general'] )
+                                       . ';'
+                                       . 'mw.loader.load(RLPAGEMODULES);',
                                $nonce
                        );
                }
index 0adbd0c..d9c369d 100644 (file)
@@ -140,13 +140,9 @@ class ResourceLoaderImage {
                        if ( isset( $desc['lang'][$contextLang] ) ) {
                                return $this->basePath . '/' . $desc['lang'][$contextLang];
                        }
-                       $fallbacks = Language::getFallbacksFor( $contextLang );
+                       $fallbacks = Language::getFallbacksFor( $contextLang, Language::STRICT_FALLBACKS );
                        foreach ( $fallbacks as $lang ) {
-                               // Images will fallback to 'default' instead of 'en', except for 'en-*' variants
-                               if (
-                                       ( $lang !== 'en' || substr( $contextLang, 0, 3 ) === 'en-' ) &&
-                                       isset( $desc['lang'][$lang] )
-                               ) {
+                               if ( isset( $desc['lang'][$lang] ) ) {
                                        return $this->basePath . '/' . $desc['lang'][$lang];
                                }
                        }
index 2455596..e0fbeee 100644 (file)
@@ -117,7 +117,7 @@ class ResourceLoaderSkinModule extends ResourceLoaderFileModule {
                }
 
                // Because PHP can't have floats as array keys
-               uksort( $logosPerDppx, function ( $a , $b ) {
+               uksort( $logosPerDppx, function ( $a, $b ) {
                        $a = floatval( $a );
                        $b = floatval( $b );
                        // Sort from smallest to largest (e.g. 1x, 1.5x, 2x)
index 8140c2c..e4a753f 100644 (file)
@@ -404,16 +404,9 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
                        $mwLoaderCode .= file_get_contents( "$IP/resources/src/startup/profiler.js" );
                }
 
-               // Keep output as small as possible by disabling needless escapes that PHP uses by default.
-               // This is not HTML output, only used in a JS response.
-               $jsonFlags = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE;
-               if ( ResourceLoader::inDebugMode() ) {
-                       $jsonFlags |= JSON_PRETTY_PRINT;
-               }
-
                // Perform replacements for mediawiki.js
                $mwLoaderPairs = [
-                       '$VARS.baseModules' => json_encode( $this->getBaseModules(), $jsonFlags ),
+                       '$VARS.baseModules' => ResourceLoader::encodeJsonForScript( $this->getBaseModules() ),
                ];
                $profilerStubs = [
                        '$CODE.profileExecuteStart();' => 'mw.loader.profiler.onExecuteStart( module );',
@@ -432,13 +425,11 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule {
 
                // Perform string replacements for startup.js
                $pairs = [
-                       '$VARS.wgLegacyJavaScriptGlobals' => json_encode(
-                               $this->getConfig()->get( 'LegacyJavaScriptGlobals' ),
-                               $jsonFlags
+                       '$VARS.wgLegacyJavaScriptGlobals' => ResourceLoader::encodeJsonForScript(
+                               $this->getConfig()->get( 'LegacyJavaScriptGlobals' )
                        ),
-                       '$VARS.configuration' => json_encode(
-                               $this->getConfigSettings( $context ),
-                               $jsonFlags
+                       '$VARS.configuration' => ResourceLoader::encodeJsonForScript(
+                               $this->getConfigSettings( $context )
                        ),
                        // Raw JavaScript code (not JSON)
                        '$CODE.registrations();' => trim( $this->getModuleRegistrations( $context ) ),
index e94f3db..bf6c9bb 100644 (file)
@@ -1127,7 +1127,7 @@ abstract class LoginSignupSpecialPage extends AuthManagerSpecialPage {
                        if ( !$signupendMsg->isDisabled() ) {
                                $usingHTTPS = $this->getRequest()->getProtocol() === 'https';
                                $signupendText = ( $usingHTTPS && !$signupendHttpsMsg->isBlank() )
-                                       ? $signupendHttpsMsg ->parse() : $signupendMsg->parse();
+                                       ? $signupendHttpsMsg->parse() : $signupendMsg->parse();
                                $fieldDefinitions['signupend'] = [
                                        'type' => 'info',
                                        'raw' => true,
index c18faa1..618fd1d 100644 (file)
@@ -41,12 +41,17 @@ class SpecialFilepath extends RedirectSpecialPage {
        public function getRedirect( $par ) {
                $file = $par ?: $this->getRequest()->getText( 'file' );
 
+               $redirect = null;
                if ( $file ) {
-                       $argument = "file/$file";
-               } else {
-                       $argument = 'file';
+                       $redirect = SpecialPage::getSafeTitleFor( 'Redirect', "file/$file" );
                }
-               return SpecialPage::getSafeTitleFor( 'Redirect', $argument );
+               if ( $redirect === null ) {
+                       // The user input is empty or an invalid title,
+                       // redirect to form of Special:Redirect with the invalid value prefilled
+                       $this->mAddedRedirectParams['wpvalue'] = $file;
+                       $redirect = SpecialPage::getSafeTitleFor( 'Redirect', 'file' );
+               }
+               return $redirect;
        }
 
        protected function getGroupName() {
index e827911..1b2bda9 100644 (file)
@@ -68,37 +68,44 @@ class SpecialRedirect extends FormSpecialPage {
        /**
         * Handle Special:Redirect/user/xxxx (by redirecting to User:YYYY)
         *
-        * @return string|null Url to redirect to, or null if $mValue is invalid.
+        * @return Status A good status contains the url to redirect to
         */
        function dispatchUser() {
                if ( !ctype_digit( $this->mValue ) ) {
-                       return null;
+                       // Message: redirect-not-numeric
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-numeric' );
                }
                $user = User::newFromId( (int)$this->mValue );
                $username = $user->getName(); // load User as side-effect
                if ( $user->isAnon() ) {
-                       return null;
+                       // Message: redirect-not-exists
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
                $userpage = Title::makeTitle( NS_USER, $username );
 
-               return $userpage->getFullURL( '', false, PROTO_CURRENT );
+               return Status::newGood( $userpage->getFullURL( '', false, PROTO_CURRENT ) );
        }
 
        /**
         * Handle Special:Redirect/file/xxxx
         *
-        * @return string|null Url to redirect to, or null if $mValue is not found.
+        * @return Status A good status contains the url to redirect to
         */
        function dispatchFile() {
-               $title = Title::makeTitleSafe( NS_FILE, $this->mValue );
-
-               if ( !$title instanceof Title ) {
-                       return null;
+               try {
+                       $title = Title::newFromTextThrow( $this->mValue, NS_FILE );
+                       if ( $title && !$title->inNamespace( NS_FILE ) ) {
+                               // If the given value contains a namespace enforce file namespace
+                               $title = Title::newFromTextThrow( Title::makeName( NS_FILE, $this->mValue ) );
+                       }
+               } catch ( MalformedTitleException $e ) {
+                       return Status::newFatal( $e->getMessageObject() );
                }
                $file = wfFindFile( $title );
 
                if ( !$file || !$file->exists() ) {
-                       return null;
+                       // Message: redirect-not-exists
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
                // Default behavior: Use the direct link to the file.
                $url = $file->getUrl();
@@ -116,48 +123,52 @@ class SpecialRedirect extends FormSpecialPage {
                        }
                }
 
-               return $url;
+               return Status::newGood( $url );
        }
 
        /**
         * Handle Special:Redirect/revision/xxx
         * (by redirecting to index.php?oldid=xxx)
         *
-        * @return string|null Url to redirect to, or null if $mValue is invalid.
+        * @return Status A good status contains the url to redirect to
         */
        function dispatchRevision() {
                $oldid = $this->mValue;
                if ( !ctype_digit( $oldid ) ) {
-                       return null;
+                       // Message: redirect-not-numeric
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-numeric' );
                }
                $oldid = (int)$oldid;
                if ( $oldid === 0 ) {
-                       return null;
+                       // Message: redirect-not-exists
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
 
-               return wfAppendQuery( wfScript( 'index' ), [
+               return Status::newGood( wfAppendQuery( wfScript( 'index' ), [
                        'oldid' => $oldid
-               ] );
+               ] ) );
        }
 
        /**
         * Handle Special:Redirect/page/xxx (by redirecting to index.php?curid=xxx)
         *
-        * @return string|null Url to redirect to, or null if $mValue is invalid.
+        * @return Status A good status contains the url to redirect to
         */
        function dispatchPage() {
                $curid = $this->mValue;
                if ( !ctype_digit( $curid ) ) {
-                       return null;
+                       // Message: redirect-not-numeric
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-numeric' );
                }
                $curid = (int)$curid;
                if ( $curid === 0 ) {
-                       return null;
+                       // Message: redirect-not-exists
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
 
-               return wfAppendQuery( wfScript( 'index' ), [
+               return Status::newGood( wfAppendQuery( wfScript( 'index' ), [
                        'curid' => $curid
-               ] );
+               ] ) );
        }
 
        /**
@@ -165,19 +176,21 @@ class SpecialRedirect extends FormSpecialPage {
         * (by redirecting to index.php?title=Special:Log&logid=xxx)
         *
         * @since 1.27
-        * @return string|null Url to redirect to, or null if $mValue is invalid.
+        * @return Status A good status contains the url to redirect to
         */
        function dispatchLog() {
                $logid = $this->mValue;
                if ( !ctype_digit( $logid ) ) {
-                       return null;
+                       // Message: redirect-not-numeric
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-numeric' );
                }
                $logid = (int)$logid;
                if ( $logid === 0 ) {
-                       return null;
+                       // Message: redirect-not-exists
+                       return Status::newFatal( $this->getMessagePrefix() . '-not-exists' );
                }
                $query = [ 'title' => 'Special:Log', 'logid' => $logid ];
-               return wfAppendQuery( wfScript( 'index' ), $query );
+               return Status::newGood( wfAppendQuery( wfScript( 'index' ), $query ) );
        }
 
        /**
@@ -186,41 +199,39 @@ class SpecialRedirect extends FormSpecialPage {
         * or do nothing (if $mValue wasn't set) allowing the form to be
         * displayed.
         *
-        * @return bool True if a redirect was successfully handled.
+        * @return Status|bool True if a redirect was successfully handled.
         */
        function dispatch() {
                // the various namespaces supported by Special:Redirect
                switch ( $this->mType ) {
                        case 'user':
-                               $url = $this->dispatchUser();
+                               $status = $this->dispatchUser();
                                break;
                        case 'file':
-                               $url = $this->dispatchFile();
+                               $status = $this->dispatchFile();
                                break;
                        case 'revision':
-                               $url = $this->dispatchRevision();
+                               $status = $this->dispatchRevision();
                                break;
                        case 'page':
-                               $url = $this->dispatchPage();
+                               $status = $this->dispatchPage();
                                break;
                        case 'logid':
-                               $url = $this->dispatchLog();
+                               $status = $this->dispatchLog();
                                break;
                        default:
-                               $url = null;
+                               $status = null;
                                break;
                }
-               if ( $url ) {
-                       $this->getOutput()->redirect( $url );
+               if ( $status && $status->isGood() ) {
+                       $this->getOutput()->redirect( $status->getValue() );
 
                        return true;
                }
                if ( !is_null( $this->mValue ) ) {
                        $this->getOutput()->setStatusCode( 404 );
-                       // Message: redirect-not-exists
-                       $msg = $this->getMessagePrefix() . '-not-exists';
 
-                       return Status::newFatal( $msg );
+                       return $status;
                }
 
                return false;
index a5171e3..bf4d9af 100644 (file)
@@ -172,7 +172,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                                        'div',
                                        [
                                                'class' =>
-                                                       'oo-ui-widget oo-ui-widget-enabled oo-ui-optionWidget '.
+                                                       'oo-ui-widget oo-ui-widget-enabled oo-ui-optionWidget ' .
                                                        'oo-ui-tabOptionWidget oo-ui-labelElement' .
                                                        ( $i === 0 ? ' oo-ui-optionWidget-selected' : '' )
                                        ],
@@ -193,7 +193,7 @@ class PreferencesFormOOUI extends OOUIHTMLForm {
                        [ 'class' => 'oo-ui-layout oo-ui-panelLayout oo-ui-indexLayout-tabPanel' ],
                        Html::rawElement(
                                'div',
-                               [ 'class' => 'oo-ui-widget oo-ui-widget-enabled oo-ui-selectWidget '.
+                               [ 'class' => 'oo-ui-widget oo-ui-widget-enabled oo-ui-selectWidget ' .
                                        'oo-ui-selectWidget-depressed oo-ui-tabSelectWidget' ],
                                implode( $fakeTabs )
                        )
index 7bebe80..d6d4db2 100644 (file)
@@ -1010,10 +1010,10 @@ class User implements IDBAccessObject, UserIdentity {
                // Should these be merged into the title char list?
                $unicodeBlacklist = '/[' .
                        '\x{0080}-\x{009f}' . # iso-8859-1 control chars
-                       '\x{00a0}' .          # non-breaking space
+                       '\x{00a0}' . # non-breaking space
                        '\x{2000}-\x{200f}' . # various whitespace
                        '\x{2028}-\x{202f}' . # breaks and control chars
-                       '\x{3000}' .          # ideographic space
+                       '\x{3000}' . # ideographic space
                        '\x{e000}-\x{f8ff}' . # private use
                        ']/u';
                if ( preg_match( $unicodeBlacklist, $name ) ) {
index 6e907de..6b0c2aa 100644 (file)
@@ -407,6 +407,11 @@ class WatchedItemStore implements WatchedItemStoreInterface, StatsdAwareInterfac
                array $targetsWithVisitThresholds,
                $minimumWatchers = null
        ) {
+               if ( $targetsWithVisitThresholds === [] ) {
+                       // No titles requested => no results returned
+                       return [];
+               }
+
                $dbr = $this->getConnectionRef( DB_REPLICA );
 
                $conds = $this->getVisitingWatchersCondition( $dbr, $targetsWithVisitThresholds );
index 34edb75..5897241 100644 (file)
@@ -80,6 +80,18 @@ class Language {
 
        static public $mLangObjCache = [];
 
+       /**
+        * Return a fallback chain for messages in getFallbacksFor
+        * @since 1.32
+        */
+       const MESSAGES_FALLBACKS = 0;
+
+       /**
+        * Return a strict fallback chain in getFallbacksFor
+        * @since 1.32
+        */
+       const STRICT_FALLBACKS = 1;
+
        static public $mWeekdayMsgs = [
                'sunday', 'monday', 'tuesday', 'wednesday', 'thursday',
                'friday', 'saturday'
@@ -4588,15 +4600,29 @@ class Language {
         *
         * @since 1.19
         * @param string $code Language code
-        * @return array Non-empty array, ending in "en"
+        * @param int $mode Fallback mode, either MESSAGES_FALLBACKS (which always falls back to 'en'),
+        * or STRICT_FALLBACKS (whic honly falls back to 'en' when explicitly defined)
+        * @throws MWException
+        * @return array List of language codes
         */
-       public static function getFallbacksFor( $code ) {
+       public static function getFallbacksFor( $code, $mode = self::MESSAGES_FALLBACKS ) {
                if ( $code === 'en' || !self::isValidBuiltInCode( $code ) ) {
                        return [];
                }
-               // For unknown languages, fallbackSequence returns an empty array,
-               // hardcode fallback to 'en' in that case.
-               return self::getLocalisationCache()->getItem( $code, 'fallbackSequence' ) ?: [ 'en' ];
+               switch ( $mode ) {
+                       case self::MESSAGES_FALLBACKS:
+                               // For unknown languages, fallbackSequence returns an empty array,
+                               // hardcode fallback to 'en' in that case as English messages are
+                               // always defined.
+                               return self::getLocalisationCache()->getItem( $code, 'fallbackSequence' ) ?: [ 'en' ];
+                       case self::STRICT_FALLBACKS:
+                               // Use this mode when you don't want to fallback to English unless
+                               // explicitly defined, for example when you have language-variant icons
+                               // and an international language-independent fallback.
+                               return self::getLocalisationCache()->getItem( $code, 'originalFallbackSequence' );
+                       default:
+                               throw new MWException( "Invalid fallback mode \"$mode\"" );
+               }
        }
 
        /**
index dc8a9f8..4184508 100644 (file)
@@ -329,21 +329,18 @@ class KkConverter extends LanguageConverter {
                                        $text = preg_replace( $pat, $rep, $text );
                                }
                                return $text;
-                               break;
                        case 'kk-latn':
                        case 'kk-tr':
                                foreach ( $this->mCyrl2Latn as $pat => $rep ) {
                                        $text = preg_replace( $pat, $rep, $text );
                                }
                                return $text;
-                               break;
                        case 'kk-cyrl':
                        case 'kk-kz':
                                foreach ( $this->mLatn2Cyrl as $pat => $rep ) {
                                        $text = preg_replace( $pat, $rep, $text );
                                }
                                return $text;
-                               break;
                        default:
                                return $text;
                }
index fcba6dc..92c1f86 100644 (file)
@@ -104,9 +104,9 @@ class CrhExceptions {
 
                # load C2L and L2C bidirectional affix mappings
                $this->addMappings( $this->prefixMapping,
-                       $this->Cyrl2LatnPatterns, $this->Latn2CyrlPatterns, false, '/'.self::WB, '/u' );
+                       $this->Cyrl2LatnPatterns, $this->Latn2CyrlPatterns, false, '/' . self::WB, '/u' );
                $this->addMappings( $this->suffixMapping,
-                       $this->Cyrl2LatnPatterns, $this->Latn2CyrlPatterns, false, '/', self::WB.'/u' );
+                       $this->Cyrl2LatnPatterns, $this->Latn2CyrlPatterns, false, '/', self::WB . '/u' );
 
                # tack on one-way mappings to the ends of the prefix and suffix patterns
                $this->Cyrl2LatnPatterns += $this->Cyrl2LatnRegexes;
@@ -388,8 +388,8 @@ class CrhExceptions {
                'му([иэИЭ])' => 'mü$1',
 
                # originally L2C, here swapped
-               'роль$1' => 'rol([^ü]|'.self::WB.')',
-               'усть$1' => 'üst([^ü]|'.self::WB.')',
+               'роль$1' => 'rol([^ü]|' . self::WB . ')',
+               'усть$1' => 'üst([^ü]|' . self::WB . ')',
 
                # more prefixes
                'ком-кок' => 'köm-kök',
@@ -410,80 +410,80 @@ class CrhExceptions {
                        // TODO: refactor upper/lower/first capital whole words without
                        // regexes into simpler list
 
-                       '/'.self::WB.'КъЮШ'.self::WB.'/u' => 'QYŞ',
-                       '/'.self::WB.'ЮШ'.self::WB.'/u' => 'YŞ',
-
-                       '/'.self::WB.'кок'.self::WB.'/u' => 'kök',
-                       '/'.self::WB.'Кок'.self::WB.'/u' => 'Kök',
-                       '/'.self::WB.'КОК'.self::WB.'/u' => 'KÖK',
-                       '/'.self::WB.'ком-кок'.self::WB.'/u' => 'köm-kök',
-                       '/'.self::WB.'Ком-кок'.self::WB.'/u' => 'Köm-kök',
-                       '/'.self::WB.'КОМ-КОК'.self::WB.'/u' => 'KÖM-KÖK',
-
-                       '/'.self::WB.'коп'.self::WB.'/u' => 'köp',
-                       '/'.self::WB.'Коп'.self::WB.'/u' => 'Köp',
-                       '/'.self::WB.'КОП'.self::WB.'/u' => 'KÖP',
-
-                       '/'.self::WB.'курк'.self::WB.'/u' => 'kürk',
-                       '/'.self::WB.'Курк'.self::WB.'/u' => 'Kürk',
-                       '/'.self::WB.'КУРК'.self::WB.'/u' => 'KÜRK',
-
-                       '/'.self::WB.'ог'.self::WB.'/u' => 'ög',
-                       '/'.self::WB.'Ог'.self::WB.'/u' => 'Ög',
-                       '/'.self::WB.'ОГ'.self::WB.'/u' => 'ÖG',
-
-                       '/'.self::WB.'юрип'.self::WB.'/u' => 'yürip',
-                       '/'.self::WB.'Юрип'.self::WB.'/u' => 'Yürip',
-                       '/'.self::WB.'ЮРИП'.self::WB.'/u' => 'YÜRİP',
-
-                       '/'.self::WB.'юз'.self::WB.'/u' => 'yüz',
-                       '/'.self::WB.'Юз'.self::WB.'/u' => 'Yüz',
-                       '/'.self::WB.'ЮЗ'.self::WB.'/u' => 'YÜZ',
-
-                       '/'.self::WB.'юк'.self::WB.'/u' => 'yük',
-                       '/'.self::WB.'Юк'.self::WB.'/u' => 'Yük',
-                       '/'.self::WB.'ЮК'.self::WB.'/u' => 'YÜK',
-
-                       '/'.self::WB.'буюп'.self::WB.'/u' => 'büyüp',
-                       '/'.self::WB.'Буюп'.self::WB.'/u' => 'Büyüp',
-                       '/'.self::WB.'БУЮП'.self::WB.'/u' => 'BÜYÜP',
-
-                       '/'.self::WB.'буюк'.self::WB.'/u' => 'büyük',
-                       '/'.self::WB.'Буюк'.self::WB.'/u' => 'Büyük',
-                       '/'.self::WB.'БУЮК'.self::WB.'/u' => 'BÜYÜK',
-
-                       '/'.self::WB.'джонк'.self::WB.'/u' => 'cönk',
-                       '/'.self::WB.'Джонк'.self::WB.'/u' => 'Cönk',
-                       '/'.self::WB.'ДЖОНК'.self::WB.'/u' => 'CÖNK',
-                       '/'.self::WB.'джонкю'.self::WB.'/u' => 'cönkü',
-                       '/'.self::WB.'Джонкю'.self::WB.'/u' => 'Cönkü',
-                       '/'.self::WB.'ДЖОНКЮ'.self::WB.'/u' => 'CÖNKÜ',
-
-                       '/'.self::WB.'куркчи/u' => 'kürkçi',
-                       '/'.self::WB.'Куркчи/u' => 'Kürkçi',
-                       '/'.self::WB.'КУРКЧИ/u' => 'KÜRKÇI',
-
-                       '/'.self::WB.'устке'.self::WB.'/u' => 'üstke',
-                       '/'.self::WB.'Устке'.self::WB.'/u' => 'Üstke',
-                       '/'.self::WB.'УСТКЕ'.self::WB.'/u' => 'ÜSTKE',
-                       '/'.self::WB.'устте'.self::WB.'/u' => 'üstte',
-                       '/'.self::WB.'Устте'.self::WB.'/u' => 'Üstte',
-                       '/'.self::WB.'УСТТЕ'.self::WB.'/u' => 'ÜSTTE',
-                       '/'.self::WB.'усттен'.self::WB.'/u' => 'üstten',
-                       '/'.self::WB.'Усттен'.self::WB.'/u' => 'Üstten',
-                       '/'.self::WB.'УСТТЕН'.self::WB.'/u' => 'ÜSTTEN',
+                       '/' . self::WB . 'КъЮШ' . self::WB . '/u' => 'QYŞ',
+                       '/' . self::WB . 'ЮШ' . self::WB . '/u' => 'YŞ',
+
+                       '/' . self::WB . 'кок' . self::WB . '/u' => 'kök',
+                       '/' . self::WB . 'Кок' . self::WB . '/u' => 'Kök',
+                       '/' . self::WB . 'КОК' . self::WB . '/u' => 'KÖK',
+                       '/' . self::WB . 'ком-кок' . self::WB . '/u' => 'köm-kök',
+                       '/' . self::WB . 'Ком-кок' . self::WB . '/u' => 'Köm-kök',
+                       '/' . self::WB . 'КОМ-КОК' . self::WB . '/u' => 'KÖM-KÖK',
+
+                       '/' . self::WB . 'коп' . self::WB . '/u' => 'köp',
+                       '/' . self::WB . 'Коп' . self::WB . '/u' => 'Köp',
+                       '/' . self::WB . 'КОП' . self::WB . '/u' => 'KÖP',
+
+                       '/' . self::WB . 'курк' . self::WB . '/u' => 'kürk',
+                       '/' . self::WB . 'Курк' . self::WB . '/u' => 'Kürk',
+                       '/' . self::WB . 'КУРК' . self::WB . '/u' => 'KÜRK',
+
+                       '/' . self::WB . 'ог' . self::WB . '/u' => 'ög',
+                       '/' . self::WB . 'Ог' . self::WB . '/u' => 'Ög',
+                       '/' . self::WB . 'ОГ' . self::WB . '/u' => 'ÖG',
+
+                       '/' . self::WB . 'юрип' . self::WB . '/u' => 'yürip',
+                       '/' . self::WB . 'Юрип' . self::WB . '/u' => 'Yürip',
+                       '/' . self::WB . 'ЮРИП' . self::WB . '/u' => 'YÜRİP',
+
+                       '/' . self::WB . 'юз' . self::WB . '/u' => 'yüz',
+                       '/' . self::WB . 'Юз' . self::WB . '/u' => 'Yüz',
+                       '/' . self::WB . 'ЮЗ' . self::WB . '/u' => 'YÜZ',
+
+                       '/' . self::WB . 'юк' . self::WB . '/u' => 'yük',
+                       '/' . self::WB . 'Юк' . self::WB . '/u' => 'Yük',
+                       '/' . self::WB . 'ЮК' . self::WB . '/u' => 'YÜK',
+
+                       '/' . self::WB . 'буюп' . self::WB . '/u' => 'büyüp',
+                       '/' . self::WB . 'Буюп' . self::WB . '/u' => 'Büyüp',
+                       '/' . self::WB . 'БУЮП' . self::WB . '/u' => 'BÜYÜP',
+
+                       '/' . self::WB . 'буюк' . self::WB . '/u' => 'büyük',
+                       '/' . self::WB . 'Буюк' . self::WB . '/u' => 'Büyük',
+                       '/' . self::WB . 'БУЮК' . self::WB . '/u' => 'BÜYÜK',
+
+                       '/' . self::WB . 'джонк' . self::WB . '/u' => 'cönk',
+                       '/' . self::WB . 'Джонк' . self::WB . '/u' => 'Cönk',
+                       '/' . self::WB . 'ДЖОНК' . self::WB . '/u' => 'CÖNK',
+                       '/' . self::WB . 'джонкю' . self::WB . '/u' => 'cönkü',
+                       '/' . self::WB . 'Джонкю' . self::WB . '/u' => 'Cönkü',
+                       '/' . self::WB . 'ДЖОНКЮ' . self::WB . '/u' => 'CÖNKÜ',
+
+                       '/' . self::WB . 'куркчи/u' => 'kürkçi',
+                       '/' . self::WB . 'Куркчи/u' => 'Kürkçi',
+                       '/' . self::WB . 'КУРКЧИ/u' => 'KÜRKÇI',
+
+                       '/' . self::WB . 'устке' . self::WB . '/u' => 'üstke',
+                       '/' . self::WB . 'Устке' . self::WB . '/u' => 'Üstke',
+                       '/' . self::WB . 'УСТКЕ' . self::WB . '/u' => 'ÜSTKE',
+                       '/' . self::WB . 'устте' . self::WB . '/u' => 'üstte',
+                       '/' . self::WB . 'Устте' . self::WB . '/u' => 'Üstte',
+                       '/' . self::WB . 'УСТТЕ' . self::WB . '/u' => 'ÜSTTE',
+                       '/' . self::WB . 'усттен' . self::WB . '/u' => 'üstten',
+                       '/' . self::WB . 'Усттен' . self::WB . '/u' => 'Üstten',
+                       '/' . self::WB . 'УСТТЕН' . self::WB . '/u' => 'ÜSTTEN',
 
                        # отдельно стоящие Ё и Я
                        # stand-alone Ё and Я
-                       '/'.self::WB.'Я'.self::WB.'/u' => 'Ya',
-                       '/'.self::WB.'Ё'.self::WB.'/u' => 'Yo',
+                       '/' . self::WB . 'Я' . self::WB . '/u' => 'Ya',
+                       '/' . self::WB . 'Ё' . self::WB . '/u' => 'Yo',
 
                        ############################
                        # относятся к началу слова #
                        # word prefixes            #
                        ############################
-                       '/'.self::WB.'КъЮШн/u' => 'QYŞn',
-                       '/'.self::WB.'ЮШн/u' => 'YŞn',
+                       '/' . self::WB . 'КъЮШн/u' => 'QYŞn',
+                       '/' . self::WB . 'ЮШн/u' => 'YŞn',
 
                        # need to convert digraphs (гъ, къ, нъ, дж) now to match patterns
                        '/гъ/u' => 'ğ',
@@ -496,69 +496,73 @@ class CrhExceptions {
                        '/Д[жЖ]/u' => 'C',
 
                        # о => ö
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])о(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u'
-                               => '$1ö$2$3$4',
-                       '/'.self::WB.'о(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ö$1$2$3',
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])О(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u'
-                               => '$1Ö$2$3$4',
-                       '/'.self::WB.'О(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => 'Ö$1$2$3',
-
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])о(['.Crh::C_CONS.'])([еиэюьü])/u' => '$1ö$2$3',
-                       '/'.self::WB.'о(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ö$1$2',
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])О(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => '$1Ö$2$3',
-                       '/'.self::WB.'О(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => 'Ö$1$2',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])о([' . Crh::C_CONS . '])([' . Crh::C_CONS .
+                               '])([еиэюьü])/u' => '$1ö$2$3$4',
+                       '/' . self::WB . 'о([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ö$1$2$3',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])О([' . Crh::C_CONS . '])([' . Crh::C_CONS .
+                               '])([еиэюьüЕИЭЮЬÜ])/u' => '$1Ö$2$3$4',
+                       '/' . self::WB . 'О([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u'
+                               => 'Ö$1$2$3',
+
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])о([' . Crh::C_CONS . '])([еиэюьü])/u' => '$1ö$2$3',
+                       '/' . self::WB . 'о([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ö$1$2',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])О([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u'
+                               => '$1Ö$2$3',
+                       '/' . self::WB . 'О([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u' => 'Ö$1$2',
 
                        # ё => yö
-                       '/'.self::WB.'ё(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([ьеюü])/u' => 'yö$1$2$3',
-                       '/'.self::WB.'Ё(['.Crh::C_CONS_LC.'])(['.Crh::C_CONS_LC.'])([ьеюü])/u' => 'Yö$1$2$3',
-                       '/'.self::WB.'Ё(['.Crh::C_CONS_UC.'])(['.Crh::C_CONS_UC.'])([ЬЕЮÜ])/u' => 'YÖ$1$2$3',
-                       '/'.self::WB.'ё(['.Crh::C_CONS.'])([ьеюü])/u' => 'yö$1$2',
-                       '/'.self::WB.'Ё(['.Crh::C_CONS_LC.'])([ьеюü])/u' => 'Yö$1$2',
-                       '/'.self::WB.'Ё(['.Crh::C_CONS_UC.'])([ЬЕЮÜ])/u' => 'YÖ$1$2',
+                       '/' . self::WB . 'ё([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([ьеюü])/u' => 'yö$1$2$3',
+                       '/' . self::WB . 'Ё([' . Crh::C_CONS_LC . '])([' . Crh::C_CONS_LC . '])([ьеюü])/u' => 'Yö$1$2$3',
+                       '/' . self::WB . 'Ё([' . Crh::C_CONS_UC . '])([' . Crh::C_CONS_UC . '])([ЬЕЮÜ])/u' => 'YÖ$1$2$3',
+                       '/' . self::WB . 'ё([' . Crh::C_CONS . '])([ьеюü])/u' => 'yö$1$2',
+                       '/' . self::WB . 'Ё([' . Crh::C_CONS_LC . '])([ьеюü])/u' => 'Yö$1$2',
+                       '/' . self::WB . 'Ё([' . Crh::C_CONS_UC . '])([ЬЕЮÜ])/u' => 'YÖ$1$2',
 
                        # у => ü, ую => üyü
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])у(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u'
-                               => '$1ü$2$3$4',
-                       '/'.self::WB.'у(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ü$1$2$3',
-                       '/'.self::WB.'ую(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u' => 'üyü$1$2$3',
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])У(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u'
-                               => '$1Ü$2$3$4',
-                       '/'.self::WB.'У(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => 'Ü$1$2$3',
-                       '/'.self::WB.'Ую(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u' => 'Üyü$1$2$3',
-                       '/'.self::WB.'УЮ(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ÜYÜ$1$2$3',
-
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])у(['.Crh::C_CONS.'])([еиэюьü])/u' => '$1ü$2$3',
-                       '/'.self::WB.'у(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ü$1$2',
-                       '/'.self::WB.'ую(['.Crh::C_CONS.'])([еиэюьü])/u' => 'üyü$1$2',
-                       '/'.self::WB.'(['.Crh::C_M_CONS.'])У(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => '$1Ü$2$3',
-                       '/'.self::WB.'У(['.Crh::C_CONS.'])([еиэюьüЕИЭЮЬÜ])/u' => 'Ü$1$2',
-                       '/'.self::WB.'Ую(['.Crh::C_CONS.'])([еиэюьü])/u' => 'Üyü$1$2',
-                       '/'.self::WB.'УЮ(['.Crh::C_CONS.'])([еиэюьü])/u' => 'ÜYÜ$1$2',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])у([' . Crh::C_CONS . '])([' . Crh::C_CONS .
+                               '])([еиэюьü])/u' => '$1ü$2$3$4',
+                       '/' . self::WB . 'у([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ü$1$2$3',
+                       '/' . self::WB . 'ую([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьü])/u' => 'üyü$1$2$3',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])У([' . Crh::C_CONS . '])([' . Crh::C_CONS .
+                               '])([еиэюьüЕИЭЮЬÜ])/u' => '$1Ü$2$3$4',
+                       '/' . self::WB . 'У([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u'
+                               => 'Ü$1$2$3',
+                       '/' . self::WB . 'Ую([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьü])/u' => 'Üyü$1$2$3',
+                       '/' . self::WB . 'УЮ([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ÜYÜ$1$2$3',
+
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])у([' . Crh::C_CONS . '])([еиэюьü])/u' => '$1ü$2$3',
+                       '/' . self::WB . 'у([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ü$1$2',
+                       '/' . self::WB . 'ую([' . Crh::C_CONS . '])([еиэюьü])/u' => 'üyü$1$2',
+                       '/' . self::WB . '([' . Crh::C_M_CONS . '])У([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u'
+                               => '$1Ü$2$3',
+                       '/' . self::WB . 'У([' . Crh::C_CONS . '])([еиэюьüЕИЭЮЬÜ])/u' => 'Ü$1$2',
+                       '/' . self::WB . 'Ую([' . Crh::C_CONS . '])([еиэюьü])/u' => 'Üyü$1$2',
+                       '/' . self::WB . 'УЮ([' . Crh::C_CONS . '])([еиэюьü])/u' => 'ÜYÜ$1$2',
 
                        # ю => yü
-                       '/'.self::WB.'([аыоуеиёюАЫОУЕИЁЮ]?)ю(['.Crh::C_CONS.'])(['.Crh::C_CONS.'])([ьеюü])/u'
+                       '/' . self::WB . '([аыоуеиёюАЫОУЕИЁЮ]?)ю([' . Crh::C_CONS . '])([' . Crh::C_CONS . '])([ьеюü])/u'
                                => '$1yü$2$3$4',
-                       '/'.self::WB.'([АЫОУЕИЁЮ]?)Ю(['.Crh::C_CONS_LC.'])(['.Crh::C_CONS_LC.'])([ьеюü])/u'
+                       '/' . self::WB . '([АЫОУЕИЁЮ]?)Ю([' . Crh::C_CONS_LC . '])([' . Crh::C_CONS_LC . '])([ьеюü])/u'
                                => '$1Yü$2$3$4',
-                       '/'.self::WB.'([АЫОУЕИЁЮ]?)Ю(['.Crh::C_CONS_UC.'])(['.Crh::C_CONS_UC.'])([ЬЕЮÜ])/u'
+                       '/' . self::WB . '([АЫОУЕИЁЮ]?)Ю([' . Crh::C_CONS_UC . '])([' . Crh::C_CONS_UC . '])([ЬЕЮÜ])/u'
                                => '$1YÜ$2$3$4',
-                       '/'.self::WB.'([аыоуеиёюАЫОУЕИЁЮ]?)ю(['.Crh::C_CONS.'])([ьеюü])/u' => '$1yü$2$3',
-                       '/'.self::WB.'([АЫОУЕИЁЮ]?)Ю(['.Crh::C_CONS_LC.'])([ьеюü])/u' => '$1Yü$2$3',
-                       '/'.self::WB.'([АЫОУЕИЁЮ]?)Ю(['.Crh::C_CONS_UC.'])([ЬЕЮÜ])/u' => '$1YÜ$2$3',
+                       '/' . self::WB . '([аыоуеиёюАЫОУЕИЁЮ]?)ю([' . Crh::C_CONS . '])([ьеюü])/u' => '$1yü$2$3',
+                       '/' . self::WB . '([АЫОУЕИЁЮ]?)Ю([' . Crh::C_CONS_LC . '])([ьеюü])/u' => '$1Yü$2$3',
+                       '/' . self::WB . '([АЫОУЕИЁЮ]?)Ю([' . Crh::C_CONS_UC . '])([ЬЕЮÜ])/u' => '$1YÜ$2$3',
 
                        # e => ye, я => ya
-                       '/'.self::WB.'е/u' => 'ye',
-                       '/'.self::WB.'Е(['.Crh::C_LC.'cğñqöü])/u' => 'Ye$1',
-                       '/'.self::WB.'Е(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'YE$1',
-                       '/'.self::WB.'я/u' => 'ya',
-                       '/'.self::WB.'Я(['.Crh::C_LC.'cğñqöü])/u' => 'Ya$1',
-                       '/'.self::WB.'Я(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'YA$1',
+                       '/' . self::WB . 'е/u' => 'ye',
+                       '/' . self::WB . 'Е([' . Crh::C_LC . 'cğñqöü])/u' => 'Ye$1',
+                       '/' . self::WB . 'Е([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YE$1',
+                       '/' . self::WB . 'я/u' => 'ya',
+                       '/' . self::WB . 'Я([' . Crh::C_LC . 'cğñqöü])/u' => 'Ya$1',
+                       '/' . self::WB . 'Я([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YA$1',
                        '/([аеёиоуыэюяйьъaeöüАЕЁИОУЫЭЮЯЙЬЪAEÖÜ])е/u' => '$1ye',
-                       '/([аеёиоуыэюяйьъaeöüАЕЁИОУЫЭЮЯЙЬЪAEÖÜ])Е(['.Crh::C_LC.'cğñqöü])/u' => '$1Ye$2',
-                       '/([аеёиоуыэюяйьъaeöüАЕЁИОУЫЭЮЯЙЬЪAEÖÜ])Е(['.Crh::C_UC.'CĞÑQÖÜ])/u' => '$1YE$2',
+                       '/([аеёиоуыэюяйьъaeöüАЕЁИОУЫЭЮЯЙЬЪAEÖÜ])Е([' . Crh::C_LC . 'cğñqöü])/u' => '$1Ye$2',
+                       '/([аеёиоуыэюяйьъaeöüАЕЁИОУЫЭЮЯЙЬЪAEÖÜ])Е([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => '$1YE$2',
                        '/([аеёиоуыэюяйьъaeöüğqАЕЁИОУЫЭЮЯЙЬЪAEÖÜĞQ])я/u' => '$1ya',
-                       '/([аеёиоуыэюяйьъaeöüğqАЕЁИОУЫЭЮЯЙЬЪAEÖÜĞQ])Я(['.Crh::C_LC.'cğñqöü])/u' => '$1Ya$2',
-                       '/([аеёиоуыэюяйьъaeöüğqАЕЁИОУЫЭЮЯЙЬЪAEÖÜĞQ])Я(['.Crh::C_UC.'CĞÑQÖÜ])/u' => '$1YA$2',
+                       '/([аеёиоуыэюяйьъaeöüğqАЕЁИОУЫЭЮЯЙЬЪAEÖÜĞQ])Я([' . Crh::C_LC . 'cğñqöü])/u' => '$1Ya$2',
+                       '/([аеёиоуыэюяйьъaeöüğqАЕЁИОУЫЭЮЯЙЬЪAEÖÜĞQ])Я([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => '$1YA$2',
 
                        ###############################
                        # не зависят от места в слове #
@@ -576,19 +580,19 @@ class CrhExceptions {
 
                        # Ö, Ü 1-й заход: ё, ю после согласных > ö, ü
                        # Ö, Ü 1st instance: ё, ю after consonants > ö, ü
-                       '/(['.Crh::C_CONS.'])ю/u' => '$1ü',
-                       '/(['.Crh::C_CONS.'])Ю/u' => '$1Ü',
-                       '/(['.Crh::C_CONS.'])ё/u' => '$1ö',
-                       '/(['.Crh::C_CONS.'])Ё/u' => '$1Ö',
+                       '/([' . Crh::C_CONS . '])ю/u' => '$1ü',
+                       '/([' . Crh::C_CONS . '])Ю/u' => '$1Ü',
+                       '/([' . Crh::C_CONS . '])ё/u' => '$1ö',
+                       '/([' . Crh::C_CONS . '])Ё/u' => '$1Ö',
 
                        # остальные вхождения о, у, ё, ю
                        # other occurences of о, у, ё, ю
-                       '/Ё(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'YO$1',
-                       '/Ю(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'YU$1',
+                       '/Ё([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YO$1',
+                       '/Ю([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'YU$1',
 
                        # Ц & Щ
-                       '/Ц(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'TS$1',
-                       '/Щ(['.Crh::C_UC.'CĞÑQÖÜ])/u' => 'ŞÇ$1',
+                       '/Ц([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'TS$1',
+                       '/Щ([' . Crh::C_UC . 'CĞÑQÖÜ])/u' => 'ŞÇ$1',
                ];
 
                $this->Latn2CyrlRegexes = [
@@ -596,31 +600,31 @@ class CrhExceptions {
                        // TODO: refactor upper/lower/first capital whole words without
                        // regexes into simpler list
 
-                       '/'.self::WB.'an'.self::WB.'/u' => 'ань',
-                       '/'.self::WB.'An'.self::WB.'/u' => 'Ань',
-                       '/'.self::WB.'AN'.self::WB.'/u' => 'АНЬ',
-                       '/'.self::WB.'ange'.self::WB.'/u' => 'аньге',
-                       '/'.self::WB.'Ange'.self::WB.'/u' => 'Аньге',
-                       '/'.self::WB.'ANGE'.self::WB.'/u' => 'АНЬГЕ',
-                       '/'.self::WB.'ande'.self::WB.'/u' => 'аньде',
-                       '/'.self::WB.'Ande'.self::WB.'/u' => 'Аньде',
-                       '/'.self::WB.'ANDE'.self::WB.'/u' => 'АНЬДЕ',
-                       '/'.self::WB.'anki'.self::WB.'/u' => 'аньки',
-                       '/'.self::WB.'Anki'.self::WB.'/u' => 'Аньки',
-                       '/'.self::WB.'ANKİ'.self::WB.'/u' => 'АНЬКИ',
-                       '/'.self::WB.'deral'.self::WB.'/u' => 'деръал',
-                       '/'.self::WB.'Deral'.self::WB.'/u' => 'Деръал',
-                       '/'.self::WB.'DERAL'.self::WB.'/u' => 'ДЕРЪАЛ',
-                       '/'.self::WB.'kör'.self::WB.'/u' => 'кёр',
-                       '/'.self::WB.'Kör'.self::WB.'/u' => 'Кёр',
-                       '/'.self::WB.'KÖR'.self::WB.'/u' => 'КЁР',
-                       '/'.self::WB.'mer'.self::WB.'/u' => 'мэр',
-                       '/'.self::WB.'Mer'.self::WB.'/u' => 'Мэр',
-                       '/'.self::WB.'MER'.self::WB.'/u' => 'МЭР',
-
-                       '/'.self::WB.'cönk/u' => 'джонк',
-                       '/'.self::WB.'Cönk/u' => 'Джонк',
-                       '/'.self::WB.'CÖNK/u' => 'ДЖОНК',
+                       '/' . self::WB . 'an' . self::WB . '/u' => 'ань',
+                       '/' . self::WB . 'An' . self::WB . '/u' => 'Ань',
+                       '/' . self::WB . 'AN' . self::WB . '/u' => 'АНЬ',
+                       '/' . self::WB . 'ange' . self::WB . '/u' => 'аньге',
+                       '/' . self::WB . 'Ange' . self::WB . '/u' => 'Аньге',
+                       '/' . self::WB . 'ANGE' . self::WB . '/u' => 'АНЬГЕ',
+                       '/' . self::WB . 'ande' . self::WB . '/u' => 'аньде',
+                       '/' . self::WB . 'Ande' . self::WB . '/u' => 'Аньде',
+                       '/' . self::WB . 'ANDE' . self::WB . '/u' => 'АНЬДЕ',
+                       '/' . self::WB . 'anki' . self::WB . '/u' => 'аньки',
+                       '/' . self::WB . 'Anki' . self::WB . '/u' => 'Аньки',
+                       '/' . self::WB . 'ANKİ' . self::WB . '/u' => 'АНЬКИ',
+                       '/' . self::WB . 'deral' . self::WB . '/u' => 'деръал',
+                       '/' . self::WB . 'Deral' . self::WB . '/u' => 'Деръал',
+                       '/' . self::WB . 'DERAL' . self::WB . '/u' => 'ДЕРЪАЛ',
+                       '/' . self::WB . 'kör' . self::WB . '/u' => 'кёр',
+                       '/' . self::WB . 'Kör' . self::WB . '/u' => 'Кёр',
+                       '/' . self::WB . 'KÖR' . self::WB . '/u' => 'КЁР',
+                       '/' . self::WB . 'mer' . self::WB . '/u' => 'мэр',
+                       '/' . self::WB . 'Mer' . self::WB . '/u' => 'Мэр',
+                       '/' . self::WB . 'MER' . self::WB . '/u' => 'МЭР',
+
+                       '/' . self::WB . 'cönk/u' => 'джонк',
+                       '/' . self::WB . 'Cönk/u' => 'Джонк',
+                       '/' . self::WB . 'CÖNK/u' => 'ДЖОНК',
 
                        # (y)etsin -> етсин/этсин
                        # note that target starts with CYRILLIC е/Е!
@@ -636,67 +640,77 @@ class CrhExceptions {
 
                        # буква Ё - первый заход
                        # расставляем Ь после согласных
-                       '/'.self::WB.'([yY])ö(['.Crh::L_N_CONS.'])([aAuU'.Crh::L_CONS.']|'.self::WB.')/u' => '$1ö$2ь$3',
-                       '/'.self::WB.'([yY])Ö(['.Crh::L_N_CONS.'])([aAuU'.Crh::L_CONS.']|'.self::WB.')/u' => '$1Ö$2Ь$3',
-                       '/'.self::WB.'AQŞ([^AEI]|'.self::WB.')/u' => 'АКъШ$1',
+                       '/' . self::WB . '([yY])ö([' . Crh::L_N_CONS . '])([aAuU' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => '$1ö$2ь$3',
+                       '/' . self::WB . '([yY])Ö([' . Crh::L_N_CONS . '])([aAuU' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => '$1Ö$2Ь$3',
+                       '/' . self::WB . 'AQŞ([^AEI]|' . self::WB . ')/u' => 'АКъШ$1',
 
                        # буква Ю - первый заход
                        # расставляем Ь после согласных
-                       '/'.self::WB.'([yY])ü(['.Crh::L_N_CONS.'])([aAuU'.Crh::L_CONS.']|'.self::WB.')/u' => '$1ü$2ь$3',
-                       '/'.self::WB.'([yY])Ü(['.Crh::L_N_CONS.'])([aAuU'.Crh::L_CONS.']|'.self::WB.')/u' => '$1Ü$2Ь$3',
-
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])ö(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
-                               => '$1ö$2ь$3',
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])Ö(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
-                               => '$1Ö$2Ь$3',
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])Ö(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
-                               => '$1Ö$2Ь$3',
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])ü(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
+                       '/' . self::WB . '([yY])ü([' . Crh::L_N_CONS . '])([aAuU' . Crh::L_CONS . ']|' . self::WB . ')/u'
                                => '$1ü$2ь$3',
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])Ü(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
-                               => '$1Ü$2Ь$3',
-                       '/'.self::WB.'([bcgkpşBCGKPŞ])Ü(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u'
+                       '/' . self::WB . '([yY])Ü([' . Crh::L_N_CONS . '])([aAuU' . Crh::L_CONS . ']|' . self::WB . ')/u'
                                => '$1Ü$2Ь$3',
 
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])ö([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1ö$2ь$3',
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])Ö([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1Ö$2Ь$3',
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])Ö([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1Ö$2Ь$3',
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])ü([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1ü$2ь$3',
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])Ü([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1Ü$2Ь$3',
+                       '/' . self::WB . '([bcgkpşBCGKPŞ])Ü([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' .
+                               self::WB . ')/u' => '$1Ü$2Ь$3',
+
                         # ö и ü в начале слова
                         # случаи, когда нужен Ь
-                       '/'.self::WB.'ö(['.Crh::L_N_CONS.'pP])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'ö$1ь$2',
-                       '/'.self::WB.'Ö(['.Crh::L_N_CONS_LC.'p])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'Ö$1ь$2',
-                       '/'.self::WB.'Ö(['.Crh::L_N_CONS_UC.'P])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'Ö$1Ь$2',
-                       '/'.self::WB.'ü(['.Crh::L_N_CONS.'])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'ü$1ь$2',
-                       '/'.self::WB.'Ü(['.Crh::L_N_CONS_LC.'])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'Ü$1ь$2',
-                       '/'.self::WB.'Ü(['.Crh::L_N_CONS_UC.'])(['.Crh::L_CONS.']|'.self::WB.')/u' => 'Ü$1Ь$2',
-
-                       '/ts'.self::WB.'/u' => 'ц',
-                       '/şç'.self::WB.'/u' => 'щ',
-                       '/Ş[çÇ]'.self::WB.'/u' => 'Щ',
-                       '/T[sS]'.self::WB.'/u' => 'Ц',
+                       '/' . self::WB . 'ö([' . Crh::L_N_CONS . 'pP])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'ö$1ь$2',
+                       '/' . self::WB . 'Ö([' . Crh::L_N_CONS_LC . 'p])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'Ö$1ь$2',
+                       '/' . self::WB . 'Ö([' . Crh::L_N_CONS_UC . 'P])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'Ö$1Ь$2',
+                       '/' . self::WB . 'ü([' . Crh::L_N_CONS . '])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'ü$1ь$2',
+                       '/' . self::WB . 'Ü([' . Crh::L_N_CONS_LC . '])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'Ü$1ь$2',
+                       '/' . self::WB . 'Ü([' . Crh::L_N_CONS_UC . '])([' . Crh::L_CONS . ']|' . self::WB . ')/u'
+                               => 'Ü$1Ь$2',
+
+                       '/ts' . self::WB . '/u' => 'ц',
+                       '/şç' . self::WB . '/u' => 'щ',
+                       '/Ş[çÇ]' . self::WB . '/u' => 'Щ',
+                       '/T[sS]' . self::WB . '/u' => 'Ц',
 
                        # Ь после Л
                        # add Ь after Л
-                       '/(['.Crh::L_F.'])l(['.Crh::L_CONS_LC.']|'.self::WB.')/u' => '$1ль$2',
-                       '/(['.Crh::L_F_UC.'])L(['.Crh::L_CONS.']|'.self::WB.')/u' => '$1ЛЬ$2',
+                       '/([' . Crh::L_F . '])l([' . Crh::L_CONS_LC . ']|' . self::WB . ')/u' => '$1ль$2',
+                       '/([' . Crh::L_F_UC . '])L([' . Crh::L_CONS . ']|' . self::WB . ')/u' => '$1ЛЬ$2',
 
                        # относятся к началу слова
-                       '/'.self::WB.'ts/u' => 'ц',
-                       '/'.self::WB.'T[sS]/u' => 'Ц',
+                       '/' . self::WB . 'ts/u' => 'ц',
+                       '/' . self::WB . 'T[sS]/u' => 'Ц',
 
-                       '/'.self::WB.'şç/u' => 'щ',
-                       '/'.self::WB.'Ş[çÇ]/u' => 'Щ',
+                       '/' . self::WB . 'şç/u' => 'щ',
+                       '/' . self::WB . 'Ş[çÇ]/u' => 'Щ',
 
                        # Э
-                       '/('.self::WB.'|['.Crh::L_VOW.'аеэяАЕЭЯ])e/u' => '$1э',
-                       '/('.self::WB.'|['.Crh::L_VOW_UC.'АЕЭЯ])E/u' => '$1Э',
+                       '/(' . self::WB . '|[' . Crh::L_VOW . 'аеэяАЕЭЯ])e/u' => '$1э',
+                       '/(' . self::WB . '|[' . Crh::L_VOW_UC . 'АЕЭЯ])E/u' => '$1Э',
 
-                       '/'.self::WB.'(['.Crh::L_M_CONS.'])ö/u' => '$1о',
-                       '/'.self::WB.'(['.Crh::L_M_CONS.'])Ö/u' => '$1О',
-                       '/'.self::WB.'(['.Crh::L_M_CONS.'])ü/u' => '$1у',
-                       '/'.self::WB.'(['.Crh::L_M_CONS.'])Ü/u' => '$1У',
+                       '/' . self::WB . '([' . Crh::L_M_CONS . '])ö/u' => '$1о',
+                       '/' . self::WB . '([' . Crh::L_M_CONS . '])Ö/u' => '$1О',
+                       '/' . self::WB . '([' . Crh::L_M_CONS . '])ü/u' => '$1у',
+                       '/' . self::WB . '([' . Crh::L_M_CONS . '])Ü/u' => '$1У',
 
-                       '/'.self::WB.'ö/u' => 'о',
-                       '/'.self::WB.'Ö/u' => 'О',
-                       '/'.self::WB.'ü/u' => 'у',
-                       '/'.self::WB.'Ü/u' => 'У',
+                       '/' . self::WB . 'ö/u' => 'о',
+                       '/' . self::WB . 'Ö/u' => 'О',
+                       '/' . self::WB . 'ü/u' => 'у',
+                       '/' . self::WB . 'Ü/u' => 'У',
 
                        # некоторые исключения
                        # some exceptions
@@ -718,10 +732,10 @@ class CrhExceptions {
                        '/T[sS][iİ]([^zZñÑ])/u' => 'ЦИ$1',
                        '/ts([ou])/u' => 'ц$1',
                        '/T[sS]([oOuU])/u' => 'Ц$1',
-                       '/ts(['.Crh::L_CONS.'])/u' => 'ц$1',
-                       '/T[sS](['.Crh::L_CONS.'])/u' => 'Ц$1',
-                       '/(['.Crh::L_CONS.'])ts/u' => '$1ц',
-                       '/(['.Crh::L_CONS.'])T[sS]/u' => '$1Ц',
+                       '/ts([' . Crh::L_CONS . '])/u' => 'ц$1',
+                       '/T[sS]([' . Crh::L_CONS . '])/u' => 'Ц$1',
+                       '/([' . Crh::L_CONS . '])ts/u' => '$1ц',
+                       '/([' . Crh::L_CONS . '])T[sS]/u' => '$1Ц',
                        '/tsиал/u' => 'циал',
                        '/TSИАЛ/u' => 'ЦИАЛ',
 
@@ -730,15 +744,15 @@ class CrhExceptions {
                        '/[ьЬ]([iİ])/u' => '$1',
 
                        # ya & ye
-                       '/(['.Crh::L_CONS.'])ya/u' => '$1ья',
-                       '/(['.Crh::L_CONS.'])Y[aA]/u' => '$1ЬЯ',
-                       '/(['.Crh::L_CONS.'])ye/u' => '$1ье',
-                       '/(['.Crh::L_CONS.'])Y[eE]/u' => '$1ЬЕ',
+                       '/([' . Crh::L_CONS . '])ya/u' => '$1ья',
+                       '/([' . Crh::L_CONS . '])Y[aA]/u' => '$1ЬЯ',
+                       '/([' . Crh::L_CONS . '])ye/u' => '$1ье',
+                       '/([' . Crh::L_CONS . '])Y[eE]/u' => '$1ЬЕ',
 
                         # расставляем Ь перед Ё
                         # place Ь in front of Ё
-                       '/(['.Crh::L_CONS.'])y[oö]/u' => '$1ьё',
-                       '/(['.Crh::L_CONS.'])Y[oOöÖ]/u' => '$1ЬЁ',
+                       '/([' . Crh::L_CONS . '])y[oö]/u' => '$1ьё',
+                       '/([' . Crh::L_CONS . '])Y[oOöÖ]/u' => '$1ЬЁ',
                         # оставшиеся вхождения yo и yö
                         # remaining occurrences of yo and yö
                        '/y[oö]/u' => 'ё',
@@ -746,8 +760,8 @@ class CrhExceptions {
 
                         # расставляем Ь перед Ю
                         # place Ь in front of Ю
-                       '/(['.Crh::L_CONS.'])y[uü]/u' => '$1ью',
-                       '/(['.Crh::L_CONS.'])Y[uUüÜ]/u' => '$1ЬЮ',
+                       '/([' . Crh::L_CONS . '])y[uü]/u' => '$1ью',
+                       '/([' . Crh::L_CONS . '])Y[uUüÜ]/u' => '$1ЬЮ',
                         # оставшиеся вхождения yu и yü
                         # remaining occurrences of yu and yü
                        '/y[uü]/u' => 'ю',
@@ -758,18 +772,18 @@ class CrhExceptions {
                        '/[ьЬ]([aA])/u' => '$1',
 
                        # дж
-                       '/C(['.Crh::L_UC.Crh::C_UC.'АЕЁЙОУЭЮЯ])/u' => 'ДЖ$1',
-                       '/(['.Crh::L_UC.Crh::C_UC.'АЕЁЙОУЭЮЯ])C/u' => '$1ДЖ',
+                       '/C([' . Crh::L_UC . Crh::C_UC . 'АЕЁЙОУЭЮЯ])/u' => 'ДЖ$1',
+                       '/([' . Crh::L_UC . Crh::C_UC . 'АЕЁЙОУЭЮЯ])C/u' => '$1ДЖ',
 
                        # гъ, къ, нъ
-                       '/Ğ(['.Crh::L_UC.Crh::C_UC.'])/u' => 'ГЪ$1',
-                       '/(['.Crh::L_UC.Crh::C_UC.'Ъ])Ğ/u' => '$1ГЪ',
+                       '/Ğ([' . Crh::L_UC . Crh::C_UC . '])/u' => 'ГЪ$1',
+                       '/([' . Crh::L_UC . Crh::C_UC . 'Ъ])Ğ/u' => '$1ГЪ',
 
-                       '/Q(['.Crh::L_UC.Crh::C_UC.'])/u' => 'КЪ$1',
-                       '/(['.Crh::L_UC.Crh::C_UC.'Ъ])Q/u' => '$1КЪ',
+                       '/Q([' . Crh::L_UC . Crh::C_UC . '])/u' => 'КЪ$1',
+                       '/([' . Crh::L_UC . Crh::C_UC . 'Ъ])Q/u' => '$1КЪ',
 
-                       '/Ñ(['.Crh::L_UC.Crh::C_UC.'])/u' => 'НЪ$1',
-                       '/(['.Crh::L_UC.Crh::C_UC.'Ъ])Ñ/u' => '$1НЪ',
+                       '/Ñ([' . Crh::L_UC . Crh::C_UC . '])/u' => 'НЪ$1',
+                       '/([' . Crh::L_UC . Crh::C_UC . 'Ъ])Ñ/u' => '$1НЪ',
 
                ];
        }
index 6c57d8a..48156fe 100644 (file)
@@ -75,7 +75,8 @@
                        "سامي الرحيلي",
                        "Azouz.anis",
                        "Elbasyouny",
-                       "Omar Ghrida"
+                       "Omar Ghrida",
+                       "AHmed Khaled"
                ]
        },
        "tog-underline": "سطر تحت الوصلات:",
        "redirect-file": "اسم ملف",
        "redirect-logid": "معرف السجل",
        "redirect-not-exists": "المطلوب غير موجود",
+       "redirect-not-numeric": "قيمة غير رقمية",
        "fileduplicatesearch": "بحث عن ملفات مكررة",
        "fileduplicatesearch-summary": "ابحث عن الملفات المكررة بناء على قيم الهاش.",
        "fileduplicatesearch-filename": "اسم الملف:",
index b1977cf..920ae6b 100644 (file)
        "customcssprotected": "Nun tienes permisu pa editar esta páxina CSS porque contien preferencies personales d'otru usuariu.",
        "customjsonprotected": "Nun tienes permisu pa editar esta páxina JSON porque contien preferencies personales d'otru usuariu.",
        "customjsprotected": "Nun tienes permisu pa editar esta páxina de JavaScript porque contien preferencies personales d'otru usuariu.",
-       "sitecssprotected": "Nun tienes permisu pa editar esta páxina de CSS porque puede afeutar a tolos visitantes",
-       "sitejsonprotected": "Nun tienes permisu pa editar esta páxina en JSON porque puede afeutar a tolos visitantes",
-       "sitejsprotected": "Nun tienes permisu para editar esta páxina de JavaScript porque puede afeutar a tolos visitantes",
+       "sitecssprotected": "Nun tienes permisu pa editar esta páxina de CSS porque puede afeutar a tolos visitantes.",
+       "sitejsonprotected": "Nun tienes permisu pa editar esta páxina en JSON porque puede afeutar a tolos visitantes.",
+       "sitejsprotected": "Nun tienes permisu para editar esta páxina de JavaScript porque puede afeutar a tolos visitantes.",
        "mycustomcssprotected": "Nun tien permisu pa editar esta páxina CSS.",
        "mycustomjsonprotected": "Nun tien permisu pa editar esta páxina JSON.",
        "mycustomjsprotected": "Nun tien permisu pa editar esta páxina JavaScript.",
        "redirect-file": "Nome del ficheru",
        "redirect-logid": "ID del rexistru",
        "redirect-not-exists": "Nun s'alcontró'l valor",
+       "redirect-not-numeric": "El valor nun ye un númberu",
        "fileduplicatesearch": "Buscar archivos duplicaos",
        "fileduplicatesearch-summary": "Busca archivos duplicaos basándose nos sos valores fragmentarios.",
        "fileduplicatesearch-filename": "Nome del ficheru:",
        "edit-error-long": "Errores:\n\n$1",
        "revid": "revisión $1",
        "pageid": "ID de páxina $1",
-       "interfaceadmin-info": "$1\n\nLos permisos pa editar los ficheros  CSS, JS y JSON globales del sitiu fueron apocayá dixebraos del permisu <code>editinterface</code>. Si nun entiendes por qué recibes esti error, por favor llei [[mw:MediaWiki_1.32/interface-admin]].",
+       "interfaceadmin-info": "$1\n\nLos permisos pa editar los ficheros  CSS, JS y JSON globales del sitiu dixebráronse apocayá del permisu <code>editinterface</code>. Si nun entiendes por qué recibes esti error, llei [[mw:MediaWiki_1.32/interface-admin]].",
        "rawhtml-notallowed": "Les etiquetes &lt;html&gt; nun pueden usase fuera de les páxines normales.",
        "gotointerwiki": "Dexando {{SITENAME}}",
        "gotointerwiki-invalid": "El títulu especificáu nun ye válidu.",
index 33383e2..596aebd 100644 (file)
        "backend-fail-internal": "Узьнікла невядомая памылка на сэрвэры сховішча «$1».",
        "backend-fail-contenttype": "Немагчыма вызначыць тып зьместу файлу, які павінен быць захаваны ў «$1».",
        "backend-fail-batchsize": "Cховішча атрымала блёк з $1 {{PLURAL:$1|файлавай апэрацыі|файлавых апэрацыяў|файлавых апэрацыяў}}; абмежаваньне складае $2 {{PLURAL:$2|апэрацыю|апэрацыі|апэрацыяў}}.",
-       "backend-fail-usable": "Ð\9dе Ð°Ñ\82Ñ\80Ñ\8bмалаÑ\81Ñ\8f Ð¿Ñ\80аÑ\87Ñ\8bÑ\82аÑ\86Ñ\8c Ñ\86Ñ\96 Ð·Ð°Ð¿Ñ\96Ñ\81аÑ\86Ñ\8c Ñ\84айл Â«$1» Ð·-за Ð½ÐµÐ´Ð°Ñ\81Ñ\82аÑ\87Ñ\8b Ð¿Ñ\80авоÑ\9e Ñ\86Ñ\96 Ð°Ð´Ñ\81Ñ\83Ñ\82наÑ\81Ñ\8cÑ\86Ñ\96 Ð´Ñ\8bÑ\80Ñ\8dкÑ\82оÑ\80Ñ\8bÑ\8fў або кантэйнэраў.",
+       "backend-fail-usable": "Ð\9dе Ð°Ñ\82Ñ\80Ñ\8bмалаÑ\81Ñ\8f Ð¿Ñ\80аÑ\87Ñ\8bÑ\82аÑ\86Ñ\8c Ñ\86Ñ\96 Ð·Ð°Ð¿Ñ\96Ñ\81аÑ\86Ñ\8c Ñ\84айл Â«$1» Ð¿Ñ\80азÑ\8c Ð½ÐµÐ´Ð°Ñ\85оп Ð¿Ñ\80авоÑ\9e Ñ\86Ñ\96 Ð°Ð´Ñ\81Ñ\83Ñ\82наÑ\81Ñ\8cÑ\86Ñ\96 ÐºÐ°Ñ\82алÑ\91гаў або кантэйнэраў.",
        "filejournal-fail-dbconnect": "Не атрымалася злучыцца з базай зьвестак журнала для сховішча «$1».",
        "filejournal-fail-dbquery": "Не атрымалася абнавіць базу зьвестак журнала для сховішча «$1».",
        "lockmanager-notlocked": "Немагчыма разблякаваць «$1», які не заблякаваны.",
        "redirect-file": "Назва файлу",
        "redirect-logid": "ID журнала",
        "redirect-not-exists": "Значэньне ня знойдзена",
+       "redirect-not-numeric": "Значэньне ня лікавае",
        "fileduplicatesearch": "Пошук дублікатаў файлаў",
        "fileduplicatesearch-summary": "Пошук аднолькавых файлаў на падставе іх хэшаў.",
        "fileduplicatesearch-filename": "Назва файла:",
index e63b7a1..e833d9d 100644 (file)
        "brokenredirects-edit": "редактиране",
        "brokenredirects-delete": "изтриване",
        "withoutinterwiki": "Страници без междуезикови препратки",
-       "withoutinterwiki-summary": "Следните страници не препращат към версии на други езици:",
+       "withoutinterwiki-summary": "Следните страници не са свързани с версии на други езици:",
        "withoutinterwiki-legend": "Представка",
        "withoutinterwiki-submit": "Показване",
        "fewestrevisions": "Страници с най-малко редакции",
        "listusers-noresult": "Няма намерени потребители.",
        "listusers-blocked": "(блокиран)",
        "activeusers": "Списък на активните потребители",
-       "activeusers-intro": "Това Ðµ Ñ\81пиÑ\81Ñ\8aк Ð½Ð° Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82елиÑ\82е, ÐºÐ¾Ð¸Ñ\82о Ñ\81а Ð´ÐµÐ¼Ð¾Ð½Ñ\81Ñ\82Ñ\80иÑ\80али някаква активност през {{PLURAL:$1|последния|последните}} $1 {{PLURAL:$1|ден|дни}}.",
+       "activeusers-intro": "Това Ðµ Ñ\81пиÑ\81Ñ\8aк Ð½Ð° Ð¿Ð¾Ñ\82Ñ\80ебиÑ\82елиÑ\82е, ÐºÐ¾Ð¸Ñ\82о Ñ\81а Ð¸Ð¼али някаква активност през {{PLURAL:$1|последния|последните}} $1 {{PLURAL:$1|ден|дни}}.",
        "activeusers-count": "$1 {{PLURAL:$1|действие|действия}} за {{PLURAL:$3|последния ден|последните $3 дни}}",
        "activeusers-from": "Показване на потребителите, започвайки от:",
        "activeusers-groups": "Показване на потребителите, принадлежащи към групи:",
        "emailuser-title-target": "Писмо до {{GENDER:$1|потребителя}}",
        "emailuser-title-notarget": "Изпращане на е-писмо на потребител",
        "emailpagetext": "Можете да използвате формуляра по-долу, за да изпратите електронно писмо на {{GENDER:$1|този потребител}}.\nАдресът, който се въвели в [[Special:Preferences|настройките си]], ще се появи в полето „От“ на писмото, така че получателят ще е в състояние да ви отговори директно.",
-       "defemailsubject": "Писмо от потребител $1 в {{SITENAME}}",
+       "defemailsubject": "Писмо от потребител „$1“ в {{SITENAME}}",
        "usermaildisabled": "Потребителят не е разрешил да получава електронна поща",
        "usermaildisabledtext": "Не можете да изпращате електронна поща на други потребители от това уики",
        "noemailtitle": "Няма електронна поща",
        "noemailtext": "Този потребител не е посочил валиден адрес за електронна поща.",
        "nowikiemailtext": "Този потребител е избрал да не получава електронна поща от други потребители.",
-       "emailnotarget": "Несъществуващ или невалиден получател на е-писмото.",
+       "emailnotarget": "Несъществуващо или невалидно потребителско име за получател.",
        "emailtarget": "Въвежда се получателят на е-писмото",
        "emailusername": "Потребителско име:",
        "emailusernamesubmit": "Изпращане",
        "emailmessage": "Съобщение:",
        "emailsend": "Изпращане",
        "emailccme": "Изпращане на копие