mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
[BREAKING CHANGE] Drop support for contacting Parsoid without VirtualRestConfig
Change-Id: I3f7c3f8326c6fa76bd49e53c9fd2a24de9568f13
This commit is contained in:
parent
db24f81138
commit
89e043452d
|
@ -43,7 +43,7 @@ class ApiVisualEditor extends ApiBase {
|
|||
// the VRS class to use, defaults to Parsoid
|
||||
$class = ParsoidVirtualRESTService::class;
|
||||
$config = $this->veConfig;
|
||||
// the global virtual rest service config object, if any
|
||||
// The global virtual rest service config object, if any
|
||||
$vrs = $this->getConfig()->get( 'VirtualRestConfig' );
|
||||
if ( isset( $vrs['modules'] ) && isset( $vrs['modules']['restbase'] ) ) {
|
||||
// if restbase is available, use it
|
||||
|
@ -56,16 +56,12 @@ class ApiVisualEditor extends ApiBase {
|
|||
$params = $vrs['modules']['parsoid'];
|
||||
$params['restbaseCompat'] = true;
|
||||
} else {
|
||||
// no global modules defined, fall back to old defaults
|
||||
$params = [
|
||||
'URL' => $config->get( 'VisualEditorParsoidURL' ),
|
||||
'prefix' => $config->get( 'VisualEditorParsoidPrefix' ),
|
||||
'domain' => $config->get( 'VisualEditorParsoidDomain' ),
|
||||
'timeout' => $config->get( 'VisualEditorParsoidTimeout' ),
|
||||
'HTTPProxy' => $config->get( 'VisualEditorParsoidHTTPProxy' ),
|
||||
'forwardCookies' => $config->get( 'VisualEditorParsoidForwardCookies' ),
|
||||
'restbaseCompat' => true
|
||||
];
|
||||
// No global modules defined, so no way to contact the document server.
|
||||
$this->dieUsage(
|
||||
'The VirtualRESTService for the document server is not defined; see ' .
|
||||
'https://www.mediawiki.org/wiki/Extension:VisualEditor',
|
||||
'no_vrs'
|
||||
);
|
||||
}
|
||||
// merge the global and service-specific params
|
||||
if ( isset( $vrs['global'] ) ) {
|
||||
|
|
|
@ -37,11 +37,8 @@
|
|||
"VisualEditorFeedbackTitle": false,
|
||||
"VisualEditorSerializationCacheTimeout": 3600,
|
||||
"VisualEditorUseChangeTagging": true,
|
||||
"VisualEditorParsoidPrefix": "localhost",
|
||||
"VisualEditorParsoidDomain": "localhost",
|
||||
"VisualEditorDisableForAnons": false,
|
||||
"VisualEditorPluginModules": [],
|
||||
"VisualEditorParsoidForwardCookies": false,
|
||||
"VisualEditorTabMessages": {
|
||||
"edit": null,
|
||||
"editsource": "visualeditor-ca-editsource",
|
||||
|
@ -53,7 +50,6 @@
|
|||
"editsectionsource": "visualeditor-ca-editsource-section"
|
||||
},
|
||||
"VisualEditorShowBetaWelcome": true,
|
||||
"VisualEditorParsoidHTTPProxy": false,
|
||||
"VisualEditorBrowserBlacklist": {
|
||||
"android": [
|
||||
[
|
||||
|
@ -89,7 +85,6 @@
|
|||
"silk": null
|
||||
},
|
||||
"VisualEditorTabPosition": "before",
|
||||
"VisualEditorParsoidURL": "http://localhost:8000",
|
||||
"VisualEditorNewAccountEnableProportion": false,
|
||||
"VisualEditorEnableTocWidget": false,
|
||||
"VisualEditorEnableWikitext": false,
|
||||
|
@ -106,7 +101,6 @@
|
|||
"_merge_strategy": "array_plus"
|
||||
},
|
||||
"VisualEditorSkinToolbarScrollOffset": [],
|
||||
"VisualEditorParsoidTimeout": 100,
|
||||
"VisualEditorUseSingleEditTab": false,
|
||||
"VisualEditorSingleEditTabSwitchTime": 20160101000000
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue