mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 00:00:49 +00:00
ApiVisualEditorEdit: Fix handling of 'minor' parameter
The client-side code sends the empty string as the value of this
parameter when the edit should be marked as minor, and doesn't set it
at all when it shouldn't (this is the normal convention for boolean
parameters). However, the API code here was incorrectly handling the
empty string, and not marking the edit as minor as a result.
This was revealed by 50883dd7fe
. Prior
to that change the original 'minor' parameter was forwarded to the
action=edit call if it was provided, overriding the 'notminor'
parameter, which was effectively added unconditionally.
Bug: T248257
Change-Id: I37fd73851d94906d79943692fb9136da03ea95fa
This commit is contained in:
parent
fa3363972d
commit
73dcfb7122
|
@ -48,7 +48,7 @@ class ApiVisualEditorEdit extends ApiVisualEditor {
|
|||
'errorformat' => 'html',
|
||||
];
|
||||
|
||||
if ( $params['minor'] ) {
|
||||
if ( $params['minor'] !== null ) {
|
||||
$apiParams['minor'] = true;
|
||||
} else {
|
||||
$apiParams['notminor'] = true;
|
||||
|
|
Loading…
Reference in a new issue