r82769 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82768‎ | r82769 | r82770 >
Date:00:01, 25 February 2011
Author:janpaul123
Status:ok
Tags:
Comment:
1. Re-introduces check if the browser supports the dialogs, which was removed for no apparent reason in r74276.

2. Makes the isEnabled function public, to allow other extensions to use the same configuration settings as WikiEditor.
Modified paths:
  • /trunk/extensions/WikiEditor/WikiEditor.hooks.php (modified) (history)
  • /trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiEditor/WikiEditor.hooks.php
@@ -158,9 +158,17 @@
159159 ),
160160 );
161161
162 - /* Protected Static Methods */
 162+ /* Static Methods */
163163
164 - protected static function isEnabled( $name ) {
 164+ /**
 165+ * Checks if a certain option is enabled
 166+ *
 167+ * This method is public to allow other extensions that use WikiEditor to use the
 168+ * same configuration as WikiEditor itself
 169+ *
 170+ * @param $name Name of the feature, should be a key of $features
 171+ */
 172+ public static function isEnabled( $name ) {
165173 global $wgWikiEditorFeatures, $wgUser;
166174
167175 // Features with global set to true are always enabled
@@ -183,8 +191,6 @@
184192 return false;
185193 }
186194
187 - /* Static Methods */
188 -
189195 /**
190196 * EditPage::showEditForm:initial hook
191197 *
Index: trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js
@@ -3,11 +3,10 @@
44 */
55
66 $( document ).ready( function() {
7 - /*
87 if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) {
98 return;
109 }
11 - */
 10+
1211 // Replace icons
1312 $.wikiEditor.modules.dialogs.config.replaceIcons( $( '#wpTextbox1' ) );
1413

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74276Got more dialogs working againtparscal21:08, 4 October 2010

Status & tagging log