mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-23 14:56:43 +00:00
Merge "Use core behaviour regarding saving options for non-registered users"
This commit is contained in:
commit
fe024e6813
|
@ -299,11 +299,6 @@
|
|||
context.fn.updateButtonIcon( 'lineWrapping', context.fn.isLineWrappingActive );
|
||||
},
|
||||
setCodeEditorPreference: function ( prefValue ) {
|
||||
// Do not try to save options for anonymous user
|
||||
if ( mw.user.isAnon() ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Abort any previous request
|
||||
api.abort();
|
||||
|
||||
|
@ -313,6 +308,10 @@
|
|||
// Request was aborted. Ignore error
|
||||
return;
|
||||
}
|
||||
if ( code === 'notloggedin' ) {
|
||||
// Expected for non-registered users
|
||||
return;
|
||||
}
|
||||
|
||||
var message = 'Failed to set code editor preference: ' + code;
|
||||
if ( result.error && result.error.info ) {
|
||||
|
|
Loading…
Reference in a new issue