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