From fa67d85667c8419f77f5bb3d64a9ec786447167f Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 29 Apr 2014 23:17:36 +0200 Subject: [PATCH] Fix PHP Notice: Undefined index visualeditor-enable-language Follows-up I14560b758c6. Change-Id: I3e4d821fb52fd6fd9ffc0529741218005a33702f --- VisualEditor.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/VisualEditor.php b/VisualEditor.php index 520951e25b..c641ecb153 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -69,11 +69,6 @@ $wgHooks['EditPage::showEditForm:fields'][] = 'VisualEditorHooks::onEditPageShow $wgHooks['PageContentSaveComplete'][] = 'VisualEditorHooks::onPageContentSaveComplete'; $wgExtensionFunctions[] = 'VisualEditorHooks::onSetup'; -// Set default values for new preferences -$wgDefaultUserOptions['visualeditor-enable'] = 0; -$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0; -$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0; - // Register resource modules $wgVisualEditorResourceTemplate = array( @@ -1181,6 +1176,14 @@ $wgResourceModules += array( ), ); +/* Extend MediaWiki configuration */ + +// Set default values for new preferences +$wgDefaultUserOptions['visualeditor-enable'] = 0; +$wgDefaultUserOptions['visualeditor-betatempdisable'] = 0; +$wgDefaultUserOptions['visualeditor-enable-experimental'] = 0; +$wgDefaultUserOptions['visualeditor-enable-language'] = 0; + /* Configuration */ @@ -1190,6 +1193,7 @@ $wgVisualEditorPluginModules = array(); // Array of modules to load based on a preference. Keys are preference names, values are // ResourceLoader module names. +// Remember to also set defaults in $wgDefaultUserOptions! $wgVisualEditorPreferenceModules = array( 'visualeditor-enable-experimental' => 'ext.visualEditor.experimental', 'visualeditor-enable-language' => 'ext.visualEditor.language',