VisualEditor.php: Set default preferences values

This not being here caused and causes various unexpected
scenarios to evolve around preferences being falsy (undefined)
or set to 0, and inability to distinguish between a user having
not set the preference, the preference not existing due to cache
or the preference being disabled explictly by the user.

Change-Id: Ie50b63ba5064e85d26dad8b622554bbe809c2634
This commit is contained in:
Timo Tijhof 2013-07-26 22:12:48 +02:00
parent 2e091b0509
commit 429587df7d

View file

@ -58,6 +58,10 @@ $wgExtensionFunctions[] = 'VisualEditorHooks::onSetup';
$wgHooks['AddNewAccount'][] = 'VisualEditorHooks::onAddNewAccount';
$wgHooks['BeforeWelcomeCreation'][] = 'VisualEditorHooks::onBeforeWelcomeCreation';
// Set default values for new preferences
$wgDefaultUserOptions['visualeditor-enable'] = 1;
$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0;
// Register resource modules
$wgVisualEditorResourceTemplate = array(