Index: trunk/extensions/Distribution/Distribution.php |
— | — | @@ -22,10 +22,23 @@ |
23 | 23 | // Register the internationalization file. |
24 | 24 | $wgExtensionMessagesFiles['Distribution'] = dirname( __FILE__ ) . '/Distribution.i18n.php'; |
25 | 25 | |
| 26 | +// Hook registration. |
26 | 27 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efDistributionSchemaUpdate'; |
27 | 28 | |
| 29 | +// API modules registration. |
| 30 | +$wgAutoloadClasses['ApiQueryExtensions'] = dirname( __FILE__ ) . '/api/ApiQueryExtensions.php'; |
| 31 | +$wgAPIModules['queryextensions'] = 'ApiQueryExtensions'; |
| 32 | + |
| 33 | +$wgAutoloadClasses['ApiExtension'] = dirname( __FILE__ ) . '/api/ApiExtension.php'; |
| 34 | +$wgAPIModules['extension'] = 'ApiExtension'; |
| 35 | + |
| 36 | +$wgAutoloadClasses['ApiPackage'] = dirname( __FILE__ ) . '/api/ApiPackage.php'; |
| 37 | +$wgAPIModules['package'] = 'ApiPackage'; |
| 38 | + |
28 | 39 | /** |
29 | 40 | * Initialization function for the Distribution extension. |
| 41 | + * |
| 42 | + * @since 0.1 |
30 | 43 | */ |
31 | 44 | function efDistributionSetup() { |
32 | 45 | global $wgExtensionCredits; |
— | — | @@ -41,6 +54,13 @@ |
42 | 55 | |
43 | 56 | } |
44 | 57 | |
| 58 | +/** |
| 59 | + * LoadExtensionSchemaUpdates hook. |
| 60 | + * |
| 61 | + * @since 0.1 |
| 62 | + * |
| 63 | + * @return true |
| 64 | + */ |
45 | 65 | function efDistributionSchemaUpdate() { |
46 | 66 | global $wgExtNewTables; |
47 | 67 | |