mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-27 21:42:59 +00:00
f035ce51f1
What: Add hook that runs after a save attempt is made in ApiVisualEditorEdit. The hook receives the same data available in ApiVisualEditorEdit, and implementations of the hook can modify the API response. Also introduce templated parameters (https://www.mediawiki.org/wiki/API:Templated_parameters) in the API parameters; this allows plugins to pass arbitrary data along with their request using e.g. plugins=linkrecommendation&data-linkrecommendation=foo Add ServiceWiring files, a PHP namespace, and a HookRunner class to support the above changes. Why: VE plugins may wish to send additional data when saving an edit and take action based on that data on the server-side. See for example the AddLink plugin in I7a052f8e which sends annotation data, and then uses the new hook to perform a database operation. Change-Id: I392691475fbdcec766acbd832600e82efcb5bfe8
82 lines
5.1 KiB
JSON
82 lines
5.1 KiB
JSON
{
|
|
"@metadata": {
|
|
"authors": [
|
|
"Amire80",
|
|
"Arjunaraoc",
|
|
"Beta16",
|
|
"Erik Moeller",
|
|
"Jdforrester",
|
|
"Liuxinyu970226",
|
|
"Lloffiwr",
|
|
"Matma Rex",
|
|
"Metalhead64",
|
|
"Mooeypoo",
|
|
"Mormegil",
|
|
"Nemo bis",
|
|
"Nike",
|
|
"PoLuX124",
|
|
"Purodha",
|
|
"Raymond",
|
|
"Robby",
|
|
"Sagan",
|
|
"Sayak Sarkar",
|
|
"Shirayuki",
|
|
"Siebrand",
|
|
"Tacsipacsi",
|
|
"Trevor Parscal",
|
|
"UV",
|
|
"Umherirrender",
|
|
"Woytecr",
|
|
"Yejianfei"
|
|
]
|
|
},
|
|
"apierror-visualeditor-badcachekey": "{{doc-apierror}}",
|
|
"apierror-visualeditor-difffailed": "{{doc-apierror}}",
|
|
"apierror-visualeditor-docserver-http-error": "{{Related|apierror-visualeditor-docserver}}\n{{doc-apierror}}\n\nParameters:\n* $1 - Error message, probably in English",
|
|
"apierror-visualeditor-docserver-http": "{{Related|apierror-visualeditor-docserver}}\n{{doc-apierror}}\n\nParameters:\n* $1 - HTTP status code (numeric)",
|
|
"apierror-visualeditor-docserver-unconfigured": "{{doc-apierror}}",
|
|
"apierror-visualeditor-docserver": "{{Related|apierror-visualeditor-docserver}}\n{{doc-apierror}}",
|
|
"apierror-visualeditor-latestnotfound": "{{doc-apierror}}",
|
|
"apihelp-visualeditor-description": "{{doc-apihelp-description|visualeditor}}",
|
|
"apihelp-visualeditor-param-basetimestamp": "{{doc-apihelp-param|visualeditor|basetimestamp}}",
|
|
"apihelp-visualeditor-param-badetag": "{{doc-apihelp-param|visualeditor|badetag}}",
|
|
"apihelp-visualeditor-param-cachekey": "In computer science, in the context of data storage, serialization is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and reconstructed later in the same or another computer environment.\n{{doc-apihelp-param|visualeditor|cachekey}}",
|
|
"apihelp-visualeditor-param-editintro": "{{doc-apihelp-param|visualeditor|editintro}}",
|
|
"apihelp-visualeditor-param-etag": "{{doc-apihelp-param|visualeditor|etag}}",
|
|
"apihelp-visualeditor-param-format": "{{doc-apihelp-param|visualeditor|format}}",
|
|
"apihelp-visualeditor-param-html": "{{doc-apihelp-param|visualeditor|html}}",
|
|
"apihelp-visualeditor-param-oldid": "{{doc-apihelp-param|visualeditor|oldid}}",
|
|
"apihelp-visualeditor-param-paction": "{{doc-apihelp-param|visualeditor|paction}}",
|
|
"apihelp-visualeditor-param-page": "{{doc-apihelp-param|visualeditor|page}}",
|
|
"apihelp-visualeditor-param-preload": "{{doc-apihelp-param|visualeditor|preload}}",
|
|
"apihelp-visualeditor-param-preloadparams": "{{doc-apihelp-param|visualeditor|preloadparams}}",
|
|
"apihelp-visualeditor-param-pst": "{{doc-apihelp-param|visualeditor|pst}}",
|
|
"apihelp-visualeditor-param-section": "{{doc-apihelp-param|visualeditor|section}}",
|
|
"apihelp-visualeditor-param-starttimestamp": "{{doc-apihelp-param|visualeditor|starttimestamp}}",
|
|
"apihelp-visualeditor-param-stash": "{{doc-apihelp-param|visualeditor|stash}}",
|
|
"apihelp-visualeditor-param-wikitext": "{{doc-apihelp-param|visualeditor|wikitext}}",
|
|
"apihelp-visualeditor-summary": "{{doc-apihelp-summary|visualeditor}}",
|
|
"apihelp-visualeditoredit-description": "{{doc-apihelp-description|visualeditoredit}}",
|
|
"apihelp-visualeditoredit-param-basetimestamp": "{{doc-apihelp-param|visualeditoredit|basetimestamp}}",
|
|
"apihelp-visualeditoredit-param-cachekey": "{{doc-apihelp-param|visualeditoredit|cachekey}}",
|
|
"apihelp-visualeditoredit-param-captchaid": "{{doc-apihelp-param|visualeditoredit|captchaid}}",
|
|
"apihelp-visualeditoredit-param-captchaword": "{{doc-apihelp-param|visualeditoredit|captchaword}}",
|
|
"apihelp-visualeditoredit-param-plugins": "{{doc-apihelp-param|visualeditoredit|plugins}}",
|
|
"apihelp-visualeditoredit-param-data-{plugin}": "{{doc-apihelp-param|visualeditoredit|data-{plugin} }}",
|
|
"apihelp-visualeditoredit-param-etag": "{{doc-apihelp-param|visualeditoredit|etag}}",
|
|
"apihelp-visualeditoredit-param-html": "{{doc-apihelp-param|visualeditoredit|html}}",
|
|
"apihelp-visualeditoredit-param-minor": "{{doc-apihelp-param|visualeditoredit|minor}}",
|
|
"apihelp-visualeditoredit-param-needcheck": "{{doc-apihelp-param|visualeditoredit|needcheck}}",
|
|
"apihelp-visualeditoredit-param-oldid": "{{doc-apihelp-param|visualeditoredit|oldid}}",
|
|
"apihelp-visualeditoredit-param-paction": "{{doc-apihelp-param|visualeditoredit|paction}}",
|
|
"apihelp-visualeditoredit-param-page": "{{doc-apihelp-param|visualeditoredit|page}}",
|
|
"apihelp-visualeditoredit-param-section": "{{doc-apihelp-param|visualeditoredit|section}}",
|
|
"apihelp-visualeditoredit-param-sectiontitle": "{{doc-apihelp-param|visualeditoredit|sectiontitle}}",
|
|
"apihelp-visualeditoredit-param-starttimestamp": "{{doc-apihelp-param|visualeditoredit|starttimestamp}}",
|
|
"apihelp-visualeditoredit-param-summary": "{{doc-apihelp-param|visualeditoredit|summary}}\n{{Identical|Edit summary}}",
|
|
"apihelp-visualeditoredit-param-tags": "{{doc-apihelp-param|visualeditoredit|tags}}",
|
|
"apihelp-visualeditoredit-param-watchlist": "{{notranslate}}\n{{doc-apihelp-param|visualeditoredit|watchlist}}",
|
|
"apihelp-visualeditoredit-param-wikitext": "{{doc-apihelp-param|visualeditoredit|wikitext}}",
|
|
"apihelp-visualeditoredit-summary": "{{doc-apihelp-summary|visualeditoredit}}"
|
|
}
|