https://www.mediawiki.org/wiki/Special:Code/MediaWiki/114096
Revision: 114096 Author: cervidae Date: 2012-03-18 12:38:47 +0000 (Sun, 18 Mar 2012) Log Message: ----------- Removed redundant , moved up $wgExtensionCredits and gave descriptions for classes, internationlization and default values Modified Paths: -------------- trunk/extensions/Genderize/Genderize.php Modified: trunk/extensions/Genderize/Genderize.php =================================================================== --- trunk/extensions/Genderize/Genderize.php 2012-03-18 08:08:35 UTC (rev 114095) +++ trunk/extensions/Genderize/Genderize.php 2012-03-18 12:38:47 UTC (rev 114096) @@ -22,35 +22,32 @@ die( 'Not an entry point.' ); }; // if -global $wgAutoloadClasses; -$wgAutoloadClasses[ 'Genderize' ] = __DIR__ . '/Genderize.class.php'; +$wgExtensionCredits[ 'other' ][] = array( + 'path' => __FILE__, + 'name' => 'Genderize', + 'license' => 'AGPLv3', + 'version' => '0.0.1+', + 'author' => array( '[https://www.mediawiki.org/wiki/User:Van_de_Bugger Van de Bugger]' ), + 'url' => 'https://www.mediawiki.org/wiki/Extension:Genderize', + 'descriptionmsg' => 'genderize-desc', +); -global $wgExtensionFunctions; -$wgExtensionFunctions[] = array( 'Genderize', 'onInitExtension' ); - -global $wgHooks; +// Hooks $wgHooks[ 'LinkBegin' ][] = 'Genderize::onLinkBegin'; $wgHooks[ 'SkinTemplateNavigation' ][] = 'Genderize::onSkinTemplateNavigation'; -global $wgExtensionMessagesFiles; -$wgExtensionMessagesFiles[ 'Genderize' ] = __DIR__ . '/Genderize.i18n.php'; +// Classes +$wgAutoloadClasses[ 'Genderize' ] = dirname(__FILE__) . '/Genderize.class.php'; +$wgExtensionFunctions[] = array( 'Genderize', 'onInitExtension' ); -global $egGenderize; +// Internationlization +$wgExtensionMessagesFiles[ 'Genderize' ] = dirname(__FILE__) . '/Genderize.i18n.php'; + +// Default definitions $egGenderize = array( 'male' => 'User', 'female' => 'User', 'unknown' => 'User', ); -global $wgExtensionCredits; -$wgExtensionCredits[ 'other' ][] = array( - 'path' => __FILE__, - 'name' => 'Genderize', - 'license' => 'AGPLv3', - 'version' => '0.0.1+', - 'author' => array( '[https://www.mediawiki.org/wiki/User:Van_de_Bugger Van de Bugger]' ), - 'url' => 'https://www.mediawiki.org/wiki/Extension:Genderize', - 'descriptionmsg' => 'genderize-desc', -); - // end of file // _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs