mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Gadgets
synced 2024-11-15 03:23:51 +00:00
fc31e94ac9
Change-Id: Iffbb3751753b211221728fa890e2c82e94f0150e
54 lines
2.1 KiB
PHP
54 lines
2.1 KiB
PHP
<?php
|
|
/**
|
|
* Gadgets extension - lets users select custom javascript gadgets
|
|
*
|
|
* For more info see http://mediawiki.org/wiki/Extension:Gadgets
|
|
*
|
|
* @file
|
|
* @ingroup Extensions
|
|
* @author Daniel Kinzler, brightbyte.de
|
|
* @copyright © 2007 Daniel Kinzler
|
|
* @license GNU General Public Licence 2.0 or later
|
|
*/
|
|
|
|
if ( !defined( 'MEDIAWIKI' ) ) {
|
|
echo( "This file is an extension to the MediaWiki software and cannot be used standalone.\n" );
|
|
die( 1 );
|
|
}
|
|
|
|
if ( version_compare( $wgVersion, '1.19', '<' ) ) {
|
|
die( "This version of Extension:Gadgets requires MediaWiki 1.19+\n" );
|
|
}
|
|
|
|
$wgExtensionCredits['other'][] = array(
|
|
'path' => __FILE__,
|
|
'name' => 'Gadgets',
|
|
'author' => array( 'Daniel Kinzler', 'Max Semenik' ),
|
|
'url' => 'https://www.mediawiki.org/wiki/Extension:Gadgets',
|
|
'descriptionmsg' => 'gadgets-desc',
|
|
);
|
|
|
|
$wgHooks['ArticleSaveComplete'][] = 'GadgetHooks::articleSaveComplete';
|
|
$wgHooks['BeforePageDisplay'][] = 'GadgetHooks::beforePageDisplay';
|
|
$wgHooks['UserGetDefaultOptions'][] = 'GadgetHooks::userGetDefaultOptions';
|
|
$wgHooks['GetPreferences'][] = 'GadgetHooks::getPreferences';
|
|
$wgHooks['ResourceLoaderRegisterModules'][] = 'GadgetHooks::registerModules';
|
|
$wgHooks['UnitTestsList'][] = 'GadgetHooks::onUnitTestsList';
|
|
|
|
$dir = dirname( __FILE__ ) . '/';
|
|
$wgExtensionMessagesFiles['Gadgets'] = $dir . 'Gadgets.i18n.php';
|
|
$wgExtensionMessagesFiles['GadgetsAlias'] = $dir . 'Gadgets.alias.php';
|
|
|
|
$wgAutoloadClasses['ApiQueryGadgetCategories'] = $dir . 'ApiQueryGadgetCategories.php';
|
|
$wgAutoloadClasses['ApiQueryGadgets'] = $dir . 'ApiQueryGadgets.php';
|
|
$wgAutoloadClasses['Gadget'] = $dir . 'Gadgets_body.php';
|
|
$wgAutoloadClasses['GadgetHooks'] = $dir . 'Gadgets_body.php';
|
|
$wgAutoloadClasses['GadgetResourceLoaderModule'] = $dir . 'Gadgets_body.php';
|
|
$wgAutoloadClasses['SpecialGadgets'] = $dir . 'SpecialGadgets.php';
|
|
|
|
$wgSpecialPages['Gadgets'] = 'SpecialGadgets';
|
|
$wgSpecialPageGroups['Gadgets'] = 'wiki';
|
|
|
|
$wgAPIListModules['gadgetcategories'] = 'ApiQueryGadgetCategories';
|
|
$wgAPIListModules['gadgets'] = 'ApiQueryGadgets';
|