Move skin support into $wgVisualEditorSupportedSkins

$supportedSkins is mostly an artefact of the currently-unrefactored init code that
will have a sub-class for each skin (so skin's maintainers can add VisualEditor
support without hacking around inside VisualEditor itself), but until then let's
split it out into a global configuration variable at least, so that they have a
hope.

Change-Id: I0742cea6469678c5599768340dfb1f6d2f4debf4
This commit is contained in:
James D. Forrester 2013-10-07 15:55:22 -07:00
parent bcbefc63cc
commit 0bff45959f
2 changed files with 5 additions and 4 deletions

View file

@ -9,9 +9,6 @@
*/
class VisualEditorHooks {
/** List of skins VisualEditor integration supports */
protected static $supportedSkins = array( 'vector', 'apex', 'monobook' );
public static function onSetup() {
global $wgResourceModules, $wgVisualEditorResourceTemplate,
$wgVisualEditorTabMessages;
@ -280,6 +277,7 @@ class VisualEditorHooks {
$wgVisualEditorPluginModules,
$wgVisualEditorTabPosition,
$wgVisualEditorTabMessages,
$wgVisualEditorSupportedSkins,
$wgVisualEditorShowBetaWelcome;
$vars['wgVisualEditorConfig'] = array(
@ -292,7 +290,7 @@ class VisualEditorHooks {
'enable' => $wgDefaultUserOptions['visualeditor-enable'],
'experimental' => $wgDefaultUserOptions['visualeditor-enable-experimental'],
),
'skins' => self::$supportedSkins,
'skins' => $wgVisualEditorSupportedSkins,
'tabPosition' => $wgVisualEditorTabPosition,
'tabMessages' => $wgVisualEditorTabMessages,
'showBetaWelcome' => $wgVisualEditorShowBetaWelcome,

View file

@ -805,6 +805,9 @@ $wgVisualEditorParsoidTimeout = 100;
// Namespaces to enable VisualEditor in
$wgVisualEditorNamespaces = $wgContentNamespaces;
// List of skins VisualEditor integration supports
$wgVisualEditorSupportedSkins = array( 'vector', 'apex', 'monobook' );
// Whether to use change tagging for VisualEditor edits
$wgVisualEditorUseChangeTagging = true;