From d9022f63880ce039446fba8364f68e656b7bf4cb Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 3 May 2012 13:01:35 +0200 Subject: Update to MediaWiki 1.19.0 --- extensions/WikiEditor/WikiEditor.hooks.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'extensions/WikiEditor/WikiEditor.hooks.php') diff --git a/extensions/WikiEditor/WikiEditor.hooks.php b/extensions/WikiEditor/WikiEditor.hooks.php index 7a2c2e41..a840dc4b 100644 --- a/extensions/WikiEditor/WikiEditor.hooks.php +++ b/extensions/WikiEditor/WikiEditor.hooks.php @@ -29,6 +29,9 @@ class WikiEditorHooks { 'modules' => array( 'ext.wikiEditor.toolbar', ), + 'configurations' => array( + 'wgWikiEditorToolbarClickTracking', + ), ), 'dialogs' => array( 'preferences' => array( @@ -213,6 +216,27 @@ class WikiEditorHooks { return true; } + /** + * EditPageBeforeEditToolbar hook + * + * Disable the old toolbar if the new one is enabled + * + * @param $toolbar html + * @return bool + */ + public static function EditPageBeforeEditToolbar( &$toolbar ) { + if ( self::isEnabled( 'toolbar' ) ) { + $toolbar = Html::rawElement( + 'div', array( + 'class' => 'wikiEditor-oldToolbar', + 'style' => 'display:none;' + ), + $toolbar + ); + } + return true; + } + /** * GetPreferences hook * -- cgit v1.2.3-54-g00ecf