http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82769
Revision: 82769 Author: janpaul123 Date: 2011-02-25 00:01:57 +0000 (Fri, 25 Feb 2011) Log Message: ----------- 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 trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js Modified: trunk/extensions/WikiEditor/WikiEditor.hooks.php =================================================================== --- trunk/extensions/WikiEditor/WikiEditor.hooks.php 2011-02-25 00:01:06 UTC (rev 82768) +++ trunk/extensions/WikiEditor/WikiEditor.hooks.php 2011-02-25 00:01:57 UTC (rev 82769) @@ -158,9 +158,17 @@ ), ); - /* Protected Static Methods */ + /* Static Methods */ - protected static function isEnabled( $name ) { + /** + * Checks if a certain option is enabled + * + * This method is public to allow other extensions that use WikiEditor to use the + * same configuration as WikiEditor itself + * + * @param $name Name of the feature, should be a key of $features + */ + public static function isEnabled( $name ) { global $wgWikiEditorFeatures, $wgUser; // Features with global set to true are always enabled @@ -183,8 +191,6 @@ return false; } - /* Static Methods */ - /** * EditPage::showEditForm:initial hook * Modified: trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js =================================================================== --- trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js 2011-02-25 00:01:06 UTC (rev 82768) +++ trunk/extensions/WikiEditor/modules/ext.wikiEditor.dialogs.js 2011-02-25 00:01:57 UTC (rev 82769) @@ -3,11 +3,10 @@ */ $( document ).ready( function() { - /* if ( !$.wikiEditor.isSupported( $.wikiEditor.modules.dialogs ) ) { return; } - */ + // Replace icons $.wikiEditor.modules.dialogs.config.replaceIcons( $( '#wpTextbox1' ) ); _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs