2007-07-31 10:21:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Gadgets extension - lets users select custom javascript gadgets
|
|
|
|
*
|
|
|
|
* For more info see http://mediawiki.org/wiki/Extension:Gadgets
|
|
|
|
*
|
2010-06-06 15:12:22 +00:00
|
|
|
* @file
|
|
|
|
* @ingroup Extensions
|
2007-07-31 10:21:34 +00:00
|
|
|
* @author Daniel Kinzler, brightbyte.de
|
|
|
|
* @copyright © 2007 Daniel Kinzler
|
2008-07-09 14:57:19 +00:00
|
|
|
* @license GNU General Public Licence 2.0 or later
|
2007-07-31 10:21:34 +00:00
|
|
|
*/
|
|
|
|
|
2011-09-23 06:48:37 +00:00
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
2007-07-31 10:21:34 +00:00
|
|
|
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
|
|
|
|
die( 1 );
|
|
|
|
}
|
|
|
|
|
2012-09-02 23:10:23 +00:00
|
|
|
if ( version_compare( $wgVersion, '1.19', '<' ) ) {
|
|
|
|
die( "This version of Extension:Gadgets requires MediaWiki 1.19+\n" );
|
2010-11-11 18:19:57 +00:00
|
|
|
}
|
|
|
|
|
2008-02-04 08:08:43 +00:00
|
|
|
$wgExtensionCredits['other'][] = array(
|
2009-04-27 03:15:19 +00:00
|
|
|
'path' => __FILE__,
|
2008-02-04 08:08:43 +00:00
|
|
|
'name' => 'Gadgets',
|
2010-11-11 18:19:57 +00:00
|
|
|
'author' => array( 'Daniel Kinzler', 'Max Semenik' ),
|
2013-06-14 17:10:19 +00:00
|
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:Gadgets',
|
2008-02-04 08:40:17 +00:00
|
|
|
'descriptionmsg' => 'gadgets-desc',
|
2007-07-31 10:21:34 +00:00
|
|
|
);
|
|
|
|
|
2010-11-11 18:19:57 +00:00
|
|
|
$wgHooks['ArticleSaveComplete'][] = 'GadgetHooks::articleSaveComplete';
|
|
|
|
$wgHooks['BeforePageDisplay'][] = 'GadgetHooks::beforePageDisplay';
|
2011-09-17 03:03:02 +00:00
|
|
|
$wgHooks['UserGetDefaultOptions'][] = 'GadgetHooks::userGetDefaultOptions';
|
2010-11-11 18:19:57 +00:00
|
|
|
$wgHooks['GetPreferences'][] = 'GadgetHooks::getPreferences';
|
|
|
|
$wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetHooks::registerModules';
|
2013-05-01 01:19:35 +00:00
|
|
|
$wgHooks['UnitTestsList'][] = 'GadgetHooks::onUnitTestsList';
|
2007-07-31 10:21:34 +00:00
|
|
|
|
2011-09-23 06:48:37 +00:00
|
|
|
$dir = dirname( __FILE__ ) . '/';
|
2014-03-27 09:02:52 +00:00
|
|
|
$wgMessagesDirs['Gadgets'] = __DIR__ . '/i18n';
|
2008-02-04 08:40:17 +00:00
|
|
|
$wgExtensionMessagesFiles['Gadgets'] = $dir . 'Gadgets.i18n.php';
|
2011-12-25 23:09:26 +00:00
|
|
|
$wgExtensionMessagesFiles['GadgetsAlias'] = $dir . 'Gadgets.alias.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
|
2011-04-17 05:37:56 +00:00
|
|
|
$wgAutoloadClasses['ApiQueryGadgetCategories'] = $dir . 'ApiQueryGadgetCategories.php';
|
2011-04-16 16:29:33 +00:00
|
|
|
$wgAutoloadClasses['ApiQueryGadgets'] = $dir . 'ApiQueryGadgets.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
$wgAutoloadClasses['Gadget'] = $dir . 'Gadgets_body.php';
|
2013-08-29 23:32:32 +00:00
|
|
|
$wgAutoloadClasses['GadgetHooks'] = $dir . 'GadgetHooks.php';
|
2011-04-16 15:48:24 +00:00
|
|
|
$wgAutoloadClasses['GadgetResourceLoaderModule'] = $dir . 'Gadgets_body.php';
|
2008-02-04 08:40:17 +00:00
|
|
|
$wgAutoloadClasses['SpecialGadgets'] = $dir . 'SpecialGadgets.php';
|
2010-11-11 18:19:57 +00:00
|
|
|
|
2007-07-31 10:21:34 +00:00
|
|
|
$wgSpecialPages['Gadgets'] = 'SpecialGadgets';
|
2008-07-09 14:57:19 +00:00
|
|
|
$wgSpecialPageGroups['Gadgets'] = 'wiki';
|
2011-04-16 16:29:33 +00:00
|
|
|
|
2011-04-17 05:37:56 +00:00
|
|
|
$wgAPIListModules['gadgetcategories'] = 'ApiQueryGadgetCategories';
|
2011-04-16 16:29:33 +00:00
|
|
|
$wgAPIListModules['gadgets'] = 'ApiQueryGadgets';
|