mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-12-18 09:10:59 +00:00
Defer the user save in onCustomEditor() to post-send
Bug: T92357 Change-Id: Ifc71b57f006673b2ea62175976292ca0562fc787
This commit is contained in:
parent
3028f4f2d6
commit
42943a49d1
|
@ -132,7 +132,9 @@ class VisualEditorHooks {
|
||||||
if ( isset( $params['venoscript'] ) ) {
|
if ( isset( $params['venoscript'] ) ) {
|
||||||
$req->response()->setCookie( 'VEE', 'wikitext', 0, [ 'prefix' => '' ] );
|
$req->response()->setCookie( 'VEE', 'wikitext', 0, [ 'prefix' => '' ] );
|
||||||
$user->setOption( 'visualeditor-editor', 'wikitext' );
|
$user->setOption( 'visualeditor-editor', 'wikitext' );
|
||||||
$user->saveSettings();
|
DeferredUpdates::addCallableUpdate( function () use ( $user ) {
|
||||||
|
$user->saveSettings();
|
||||||
|
} );
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue