Merge "Do not try to save options for anonymous user"

This commit is contained in:
jenkins-bot 2015-11-29 10:38:09 +00:00 committed by Gerrit Code Review
commit 52ef9085a9

View file

@ -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',