wiki.techinc.nl/includes
Brad Jorsch 3f1142045f Generalize ResourceLoader 'excludepage' functionality
There has long been a hack for previewing edits to user JS/CSS, where
OutputPage would pass an 'excludepage' parameter to
ResourceLoaderUserModule to tell it not to load one particular page and
would instead embed that page statically. That's nice, but there are
other places where we could use the same thing.

This patch generalizes it:
* DerivativeResourceLoaderContext may now contain a callback for mapping
  titles to replacement Content objects.
* ResourceLoaderWikiModule::getContent() uses the overrides, and
  requests embedding when they're used. All subclasses in Gerrit should
  pick it up automatically.
* OutputPage gains methods for callers to add to the override mapping,
  which it passes on to RL. It loses a bunch of the special casing it
  had for the 'user' and 'user.styles' modules.
* EditPage sets the overrides on OutputPage when doing the preview, as
  does ApiParse for prop=headhtml. TemplateSandbox does too in I83fa0856.
* OutputPage::userCanPreview() gets less specific to editing user CSS
  and JS, since RL now handles the embedding based on the actual
  modules' dependencies and EditPage only requests it on preview.

ApiParse also gets a new hook to support TemplateSandbox's API
integration (used in I83fa0856).

Bug: T112474
Change-Id: Ib9d2ce42931c1de8372e231314a1f672d7e2ac0e
2018-04-25 00:37:08 +00:00
..
actions Add protection for User: JSON pages in the same manner as JS & CSS ones 2018-03-29 14:33:46 +00:00
api Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
auth Avoid use of deprecated SiteStatsUpdate::__construct() 2018-02-27 19:15:43 -08:00
cache Add actor table and code to start using it 2018-02-23 10:06:20 -08:00
changes Remove the feature switch for disabling autopatrol logging 2018-04-13 20:52:53 +00:00
changetags Remove deprecated functions from ChangeTags class 2018-03-26 10:22:16 -07:00
clientpool Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
collation Merge "Add collation for Abkhaz (ab)" 2018-01-23 18:42:29 +00:00
compat Hard deprecate UtfNormalUtil 2018-02-06 14:44:37 -08:00
composer build: Updating mediawiki/mediawiki-codesniffer to 17.0.0 2018-03-29 21:53:10 +02:00
config Expose the latest modified index seen by EtcdConfig 2018-03-01 13:44:15 +01:00
content Merge "Add cleanup for handlers cache." 2018-03-15 23:48:16 +00:00
context Update MediaWiki\quietCall() -> Wikimedia\quietCall() 2018-02-10 10:49:33 +00:00
dao build: Updating mediawiki/mediawiki-codesniffer to 17.0.0 2018-03-29 21:53:10 +02:00
db rdbms: make sure cpPosIndex cookie is applied to LBFactory in time 2018-04-23 15:44:02 +00:00
debug Remove internal use of deprecated $wgRequestTime 2018-03-18 04:41:12 +00:00
deferred Avoid triggering Category::refreshCounts() on HTTP GET requests 2018-04-19 04:45:24 +00:00
diff Drop deprecated EnableAPI and EnableWriteAPI settings 2018-04-18 00:30:34 +00:00
edit Remove deprecated PreparedEdit properties 2018-01-26 16:57:13 -08:00
editpage Use Sanitizer::mergeAttributes when merging classes into attributes 2018-01-05 10:32:56 +01:00
exception exception: Improve formatting of fatal error log messages 2018-03-21 19:27:12 +00:00
export Don't use deprecated NS_IMAGE* 2018-03-16 22:58:58 -07:00
externalstore Fix typo accessable --> accessible 2018-03-14 05:25:34 +00:00
filebackend Fix and improve PHPDoc type hints in FileBackend and FileRepo 2018-04-19 10:32:09 +02:00
filerepo Fix and improve PHPDoc type hints in FileBackend and FileRepo 2018-04-19 10:32:09 +02:00
gallery Make ImageGallery more flexible for use in Wikibase 2018-04-13 12:57:30 +02:00
htmlform Create Expiry Widget with Date Time Selector 2018-04-19 20:24:08 -04:00
http Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
import Merge "ImportStreamSource: Replace magic numbers with constants" 2018-04-18 19:52:45 +00:00
installer Localisation updates from https://translatewiki.net. 2018-04-24 21:55:15 +02:00
interwiki Remove superfluous spaces and semicolons in comments 2018-02-05 19:05:57 +00:00
jobqueue rdbms: make IDatabase::onTransaction* methods pass the DB handle for convenience 2018-04-24 16:45:11 -07:00
json
libs rdbms: make IDatabase::onTransaction* methods pass the DB handle for convenience 2018-04-24 16:45:11 -07:00
linkeddata Remove various redundant '@license' tags in file headers 2018-01-12 18:15:11 +00:00
linker Remove various redundant '@license' tags in file headers 2018-01-12 18:15:11 +00:00
logging Remove the feature switch for disabling autopatrol logging 2018-04-13 20:52:53 +00:00
mail Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
media Add $wgJpegQuality to control jpg thumb quality 2018-04-19 10:00:16 -07:00
objectcache Avoid warnings in ObjectCache::newWANCacheFromParams if "channels" is not set" 2018-04-19 07:53:13 +00:00
page rdbms: make IDatabase::onTransaction* methods pass the DB handle for convenience 2018-04-24 16:45:11 -07:00
pager Change ResultWrapper to IResultWrapper in pagers and special pages 2018-04-04 14:52:10 +02:00
parser Remove language as string for DateFormatter::getInstance 2018-04-19 18:09:16 +00:00
password Use ::class to resolve class names in includes files 2018-01-27 20:34:29 +01:00
poolcounter poolcounter: Fix type hint for PoolWorkArticleView::getParserOutput 2018-01-24 18:41:52 +00:00
preferences Drop deprecated EnableAPI and EnableWriteAPI settings 2018-04-18 00:30:34 +00:00
profiler rdbms: make IDatabase::onTransaction* methods pass the DB handle for convenience 2018-04-24 16:45:11 -07:00
rcfeed Pass $key into CommentStore methods and use MediawikiServices 2018-02-05 15:34:12 +00:00
registration Handle extension dependencies in the installer 2018-04-13 15:28:40 -07:00
resourceloader Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
revisiondelete Use constants for rc_patrolled values instead of numbers 2018-04-13 23:56:35 +02:00
search Drop OpenSearch::getOpenSearchTemplate(), deprecated in 1.25 2018-03-08 10:43:28 +00:00
services Use short type bool/int in param documentation 2017-08-20 13:20:59 +02:00
session Update MediaWiki\quietCall() -> Wikimedia\quietCall() 2018-02-10 10:49:33 +00:00
shell Restrict shell commands by default 2018-04-16 11:50:13 -07:00
site Improve normalizePageName documentation 2018-04-11 15:48:16 +02:00
skins Merge "skins: Remove MediaWikiI18N class and QuickTemplate::setTranslator" 2018-04-19 00:42:17 +00:00
sparql Replace recently introduced mediawiki/at-ease calls 2018-04-18 14:11:13 +00:00
specialpage Merge "Use constants for rc_patrolled values instead of numbers" 2018-04-14 02:39:33 +00:00
specials Merge "Special:PrefixIndex: Fix form legend" 2018-04-24 23:59:38 +00:00
Storage Merge "Drop archive.ar_text and ar_flags" 2018-04-23 20:15:26 +00:00
templates Remove $wgScriptExtension (deprecated and ignored since 1.25) 2018-04-19 01:11:23 +01:00
tidy Merge "Immediately drop wgValidateAllHtml and related code" 2018-04-12 05:29:53 +00:00
title Remove various redundant '@license' tags in file headers 2018-01-12 18:15:11 +00:00
upload Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
user Remove EDIT_TOKEN_SUFFIX constant 2018-04-20 15:33:50 +00:00
utils Don't use phpcs:ignoreFile to selectively ignore sniffs 2018-04-08 17:08:53 -07:00
watcheditem Use constants for rc_patrolled values instead of numbers 2018-04-13 23:56:35 +02:00
widget Create Expiry Widget with Date Time Selector 2018-04-19 20:24:08 -04:00
.htaccess
ActorMigration.php Add actor table and code to start using it 2018-02-23 10:06:20 -08:00
AjaxDispatcher.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
AjaxResponse.php
AuthPlugin.php Add missing @param and @return documentation 2017-08-11 22:17:01 +02:00
AutoLoader.php Fix additional usage of incorrect case 2017-12-15 11:58:11 +01:00
Autopromote.php
Block.php Switch Block::purgeExpired to use AutoCommitUpdate 2018-02-28 15:54:57 -08:00
CategoriesRdf.php Add more data to categories dump 2018-01-17 00:40:16 +00:00
Category.php Merge "Avoid locking aggregated SELECT in Category::refresh" 2018-04-23 20:00:14 +00:00
CategoryFinder.php Drop the 'CategorizedRecentChanges' feature 2018-02-15 10:45:10 -08:00
CategoryViewer.php Avoid triggering Category::refreshCounts() on HTTP GET requests 2018-04-19 04:45:24 +00:00
CommentStore.php This patch reduces the edit summary length to 500 characters 2018-03-21 16:28:11 -07:00
CommentStoreComment.php build: Updating mediawiki/mediawiki-codesniffer to 13.0.0 2017-09-25 17:31:56 +02:00
ConfiguredReadOnlyMode.php Split ConfiguredReadOnlyMode into own file 2017-08-07 09:24:19 +00:00
DefaultSettings.php Merge "Create Expiry Widget with Date Time Selector" 2018-04-24 18:22:58 +00:00
Defines.php Drop XCache support 2018-02-07 13:45:40 -08:00
DeprecatedGlobal.php build: Updating mediawiki/mediawiki-codesniffer to 15.0.0 2018-01-01 14:10:16 +01:00
DerivativeRequest.php
DevelopmentSettings.php tests: Remove verbose logging settings from DevelopmentSettings.php 2018-02-19 22:19:15 +00:00
DummyLinker.php
EditPage.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
EventRelayerGroup.php Remove "@author Aaron Schulz" annotations 2017-06-27 15:24:14 -07:00
FauxRequest.php Add missing @param and @return documentation 2017-08-11 22:17:01 +02:00
Feed.php Fix called function case in a bunch of places 2018-01-22 09:10:09 -08:00
FeedUtils.php Pass $key into CommentStore methods and use MediawikiServices 2018-02-05 15:34:12 +00:00
FileDeleteForm.php rdbms: make IDatabase::onTransaction* methods pass the DB handle for convenience 2018-04-24 16:45:11 -07:00
ForkController.php Treat phpdbg as run from the command line when checking PHP_SAPI 2018-01-03 23:00:37 -08:00
FormOptions.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
GitInfo.php Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
GlobalFunctions.php Hard-deprecate wfUsePHP() 2018-04-18 18:45:47 -07:00
HeaderCallback.php
HistoryBlob.php Update suppressWarning()/restoreWarning() calls 2018-02-10 08:50:12 +00:00
Hooks.php Hooks: Introduce Hooks::runWithoutAbort() alongside Hooks::run() 2017-09-04 18:55:42 +00:00
Html.php ParserOutput: Add 'deduplicateStyles' post-cache transformation 2018-02-11 05:55:56 +00:00
Linker.php Add actor table and code to start using it 2018-02-23 10:06:20 -08:00
LinkFilter.php build: Update mediawiki/mediawiki-codesniffer to 0.10.1 2017-07-22 18:24:09 -07:00
ListToggle.php ListToggle: Avoid href="#" for JavaScript buttons 2017-08-01 22:57:45 +02:00
MagicWord.php Updated type and function docs for MagicWord.php 2017-10-02 13:52:51 +02:00
MagicWordArray.php Replace uses of each() 2017-09-20 09:51:28 -04:00
MediaWiki.php Deprecate $wgUseAjax, act as always-true 2018-04-18 00:50:45 +00:00
MediaWikiServices.php Add missing ActorMigration use statement to MediaWikiServices 2018-03-23 14:12:11 +00:00
MediaWikiVersionFetcher.php
MergeHistory.php Remove "Created on" from file header comments 2018-01-26 23:12:40 +00:00
Message.php build: Updating mediawiki/mediawiki-codesniffer to 16.0.0 2018-02-17 13:29:13 +01:00
MimeMagic.php Add wfDeprecated() call to MimeMagic::singleton() 2017-11-27 02:20:17 +00:00
MovePage.php Tag redirects from moves as new redirects 2018-02-09 15:45:29 +00:00
MWGrants.php Remove various redundant '@license' tags in file headers 2018-01-12 18:15:11 +00:00
MWNamespace.php Improve namespace handling in tests 2017-09-29 05:21:47 +00:00
MWTimestamp.php
NoLocalSettings.php Remove $wgScriptExtension (deprecated and ignored since 1.25) 2018-04-19 01:11:23 +01:00
OrderedStreamingForkController.php Improve some parameter docs 2017-09-10 20:32:31 +02:00
OutputHandler.php Immediately drop wgValidateAllHtml and related code 2018-04-10 10:51:28 -07:00
OutputPage.php Generalize ResourceLoader 'excludepage' functionality 2018-04-25 00:37:08 +00:00
PageProps.php Only do one query for page ids in PageProps::getGoodIDs 2017-08-30 20:32:19 +02:00
PathRouter.php
PHPVersionCheck.php Prepare for REL1_31 cut, labelling master as 1.32-alpha 2018-04-17 21:04:58 +00:00
Pingback.php Added heartbeat for pingback. 2018-03-26 11:48:27 -04:00
Preferences.php Use ::class to resolve class names in includes files 2018-01-27 20:34:29 +01:00
PrefixSearch.php
ProtectionForm.php Allow limiting comment length by characters rather than bytes in JS 2018-02-23 22:12:29 +00:00
ProxyLookup.php Update IPSet use statements 2018-01-21 04:37:26 +00:00
RawMessage.php Move RawMessage out of Message.php to its own file 2017-08-14 17:33:52 +00:00
ReadOnlyMode.php Split ConfiguredReadOnlyMode into own file 2017-08-07 09:24:19 +00:00
Revision.php Merge "Drop archive.ar_text and ar_flags" 2018-04-23 20:15:26 +00:00
RevisionList.php Add actor table and code to start using it 2018-02-23 10:06:20 -08:00
ServiceWiring.php rdbms: make sure cpPosIndex cookie is applied to LBFactory in time 2018-04-23 15:44:02 +00:00
Setup.php Remove $wgScriptExtension (deprecated and ignored since 1.25) 2018-04-19 01:11:23 +01:00
SiteConfiguration.php Deprecate wfShellWikiCmd() 2018-04-16 16:38:05 +00:00
SiteStats.php Salvage site_stats row with negative values in miser mode 2018-02-14 15:37:55 -08:00
SiteStatsInit.php Drop 'comma' value for wgArticleCountMethod 2018-03-01 16:37:23 -08:00
Status.php Use ParserOutput stateless transforms 2017-11-30 14:27:49 -05:00
StreamFile.php Replace MimeMagic::singleton() calls 2017-11-27 02:13:51 +00:00
StubObject.php Use wikimedia/object-factory 1.0.0 2018-02-04 12:52:44 -08:00
TemplateParser.php Enable recursive partials in TemplateParser 2017-09-10 05:51:07 +00:00
TemplatesOnThisPageFormatter.php
Title.php Title: Simplify use of MWNamespace::getCanonicalName() 2018-04-10 18:11:03 +01:00
TitleArray.php Use IResultWrapper in UserArray and TitleArray 2018-04-06 00:06:35 +02:00
TitleArrayFromResult.php Use IResultWrapper in UserArray and TitleArray 2018-04-06 00:06:35 +02:00
TrackingCategories.php Add @since tag to TrackingCategories class 2017-08-07 09:24:07 +00:00
WebRequest.php Remove $wgScriptExtension (deprecated and ignored since 1.25) 2018-04-19 01:11:23 +01:00
WebRequestUpload.php
WebResponse.php
WebStart.php Merge "Setup: Move mbstring.func_overload from WebStart to Setup" 2018-04-18 16:22:16 +00:00
WikiMap.php Clean up wiki ID and DB domain ID handling 2017-09-30 10:25:03 +00:00
WikiReference.php
Xml.php Merge "Remove @param comments that literally repeat what the code says" 2018-01-11 23:48:03 +00:00
XmlJsCode.php Fix a few minor mistakes in PHPDoc tags 2017-09-15 11:17:17 +02:00
XmlSelect.php