mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 22:35:41 +00:00
Merge "ApiVisualEditor: Replace use of ApiBase::dieUsage() with ::dieWithError()"
This commit is contained in:
commit
670f39790f
|
@ -23,6 +23,7 @@
|
|||
"apierror-visualeditor-difffailed": "Diff failed",
|
||||
"apierror-visualeditor-docserver-http-error": "$1",
|
||||
"apierror-visualeditor-docserver-http": "HTTP $1",
|
||||
"apierror-visualeditor-docserver-unconfigured": "The VirtualRESTService for the document server is not defined; see https://www.mediawiki.org/wiki/Extension:VisualEditor",
|
||||
"apierror-visualeditor-docserver": "Error contacting the Parsoid/RESTbase server",
|
||||
"apierror-visualeditor-invaliddeflate": "Content provided is not properly deflated",
|
||||
"apierror-visualeditor-latestnotfound": "Could not find latest revision for title",
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
"apierror-visualeditor-difffailed": "{{doc-apierror}}",
|
||||
"apierror-visualeditor-docserver-http-error": "{{doc-apierror}}\n\nParameters:\n* $1 - Error message, probably in English",
|
||||
"apierror-visualeditor-docserver-http": "{{doc-apierror}}\n\nParameters:\n* $1 - HTTP status code (numeric)",
|
||||
"apierror-visualeditor-docserver-unconfigured": "{{doc-apierror}}",
|
||||
"apierror-visualeditor-docserver": "{{doc-apierror}}",
|
||||
"apierror-visualeditor-invaliddeflate": "{{doc-apierror}}",
|
||||
"apierror-visualeditor-latestnotfound": "{{doc-apierror}}",
|
||||
|
|
|
@ -57,11 +57,7 @@ class ApiVisualEditor extends ApiBase {
|
|||
$params['restbaseCompat'] = true;
|
||||
} else {
|
||||
// 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'
|
||||
);
|
||||
$this->dieWithError( 'apierror-visualeditor-docserver-unconfigured', 'no_vrs' );
|
||||
}
|
||||
// merge the global and service-specific params
|
||||
if ( isset( $vrs['global'] ) ) {
|
||||
|
|
Loading…
Reference in a new issue