summaryrefslogtreecommitdiff
path: root/extensions/WikiEditor/WikiEditor.hooks.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /extensions/WikiEditor/WikiEditor.hooks.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'extensions/WikiEditor/WikiEditor.hooks.php')
-rw-r--r--extensions/WikiEditor/WikiEditor.hooks.php24
1 files changed, 24 insertions, 0 deletions
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(
@@ -214,6 +217,27 @@ class WikiEditorHooks {
}
/**
+ * 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
*
* Adds WikiEditor-releated items to the preferences