mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeEditor
synced 2024-11-15 03:23:45 +00:00
Do not try to save options for anonymous user
This change requires 65062d3c from core included in MediaWiki 1.20+. Change-Id: I130ab8e93107e066d2cb757c511c844e161b703f
This commit is contained in:
parent
d0ef64af5d
commit
2278f87b89
|
@ -294,6 +294,10 @@
|
|||
},
|
||||
setCodeEditorPreference: function ( prefValue ) {
|
||||
var api = new mw.Api();
|
||||
// Do not try to save options for anonymous user
|
||||
if ( mw.user.isAnon() ) {
|
||||
return;
|
||||
}
|
||||
api.postWithToken( 'options', {
|
||||
action: 'options',
|
||||
optionname: 'usecodeeditor',
|
||||
|
|
Loading…
Reference in a new issue