From 0bff45959f0eb07919131cfbcbd0cf8d33f64fb1 Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Mon, 7 Oct 2013 15:55:22 -0700 Subject: [PATCH] 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 --- VisualEditor.hooks.php | 6 ++---- VisualEditor.php | 3 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 6559799c9d..53c7908cdd 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -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, diff --git a/VisualEditor.php b/VisualEditor.php index 6a9e71f07b..012ba10e76 100644 --- a/VisualEditor.php +++ b/VisualEditor.php @@ -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;