Index: trunk/extensions/Deployment/Deployment.php |
— | — | @@ -17,8 +17,14 @@ |
18 | 18 | |
19 | 19 | include_once 'Deployment_Settings.php'; |
20 | 20 | |
21 | | -// Register the initialization function. |
22 | | -$wgExtensionFunctions[] = 'efDeploymentSetup'; |
| 21 | +$wgExtensionCredits['other'][] = array( |
| 22 | + 'path' => __FILE__, |
| 23 | + 'name' => 'Deployment', |
| 24 | + 'version' => Deployment_VERSION, |
| 25 | + 'author' => '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
| 26 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Deployment', |
| 27 | + 'descriptionmsg' => 'deployment-desc', |
| 28 | +); |
23 | 29 | |
24 | 30 | // Register the internationalization and aliasing files. |
25 | 31 | $wgExtensionMessagesFiles['Deployment'] = dirname( __FILE__ ) . '/Deployment.i18n.php'; |
— | — | @@ -52,19 +58,3 @@ |
53 | 59 | * By default only sysops have this permission. |
54 | 60 | */ |
55 | 61 | $wgGroupPermissions['sysop']['siteadmin'] = true; |
56 | | - |
57 | | -/** |
58 | | - * Initialization function for the Deployment extension. |
59 | | - */ |
60 | | -function efDeploymentSetup() { |
61 | | - global $wgExtensionCredits; |
62 | | - |
63 | | - $wgExtensionCredits['other'][] = array( |
64 | | - 'path' => __FILE__, |
65 | | - 'name' => 'Deployment', |
66 | | - 'version' => Deployment_VERSION, |
67 | | - 'author' => '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', |
68 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Deployment', |
69 | | - 'descriptionmsg' => 'deployment-desc', |
70 | | - ); |
71 | | -} |
Index: trunk/extensions/Distribution/Distribution.php |
— | — | @@ -17,17 +17,24 @@ |
18 | 18 | |
19 | 19 | define( 'Distribution_VERSION', '0.1 alpha' ); |
20 | 20 | |
| 21 | +$wgExtensionCredits['other'][] = array( |
| 22 | + 'path' => __FILE__, |
| 23 | + 'name' => 'Distribution', |
| 24 | + 'version' => Distribution_VERSION, |
| 25 | + 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', 'Chad Horohoe' ), |
| 26 | + 'url' => 'http://www.mediawiki.org/wiki/Extension:Distribution', |
| 27 | + 'descriptionmsg' => 'distribution-desc', |
| 28 | +); |
| 29 | + |
21 | 30 | include_once 'Distribution_Settings.php'; |
22 | 31 | |
23 | | -// Register the initialization function. |
24 | | -$wgExtensionFunctions[] = 'efDistributionSetup'; |
25 | 32 | |
26 | 33 | // Register the internationalization and aliasing files. |
27 | 34 | $wgExtensionMessagesFiles['Distribution'] = dirname( __FILE__ ) . '/Distribution.i18n.php'; |
28 | 35 | $wgExtensionAliasesFiles['Distribution'] = dirname( __FILE__ ) . '/Distribution.alias.php'; |
29 | 36 | |
30 | 37 | // Load classes. |
31 | | -$wgAutoloadClasses['DistributionRelease'] = dirname( __FILE__ ) . '/includes/DistributionRelease.php'; |
| 38 | +$wgAutoloadClasses['DistributionRelease'] = dirname( __FILE__ ) . '/includes/DistributionRelease.php'; |
32 | 39 | $wgAutoloadClasses['ExtensionDataImporter'] = dirname( __FILE__ ) . '/includes/ExtensionDataImporter.php'; |
33 | 40 | $wgAutoloadClasses['ReleaseRepo'] = dirname( __FILE__ ) . '/includes/ReleaseRepo.php'; |
34 | 41 | // $wgAutoloadClasses['Release'] = dirname( __FILE__ ) . '/includes/Release.php'; |
— | — | @@ -60,29 +67,10 @@ |
61 | 68 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efDistributionSchemaUpdate'; |
62 | 69 | |
63 | 70 | /** |
64 | | - * Initialization function for the Distribution extension. |
65 | | - * |
66 | | - * @since 0.1 |
67 | | - */ |
68 | | -// FIXME: no need to put these extension credits in a hook. |
69 | | -function efDistributionSetup() { |
70 | | - global $wgExtensionCredits; |
71 | | - |
72 | | - $wgExtensionCredits['other'][] = array( |
73 | | - 'path' => __FILE__, |
74 | | - 'name' => 'Distribution', |
75 | | - 'version' => Distribution_VERSION, |
76 | | - 'author' => array( '[http://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De Dauw]', 'Chad Horohoe' ), |
77 | | - 'url' => 'http://www.mediawiki.org/wiki/Extension:Distribution', |
78 | | - 'descriptionmsg' => 'distribution-desc', |
79 | | - ); |
80 | | -} |
81 | | - |
82 | | -/** |
83 | 71 | * LoadExtensionSchemaUpdates hook. |
84 | | - * |
| 72 | + * |
85 | 73 | * @since 0.1 |
86 | | - * |
| 74 | + * |
87 | 75 | * @return true |
88 | 76 | */ |
89 | 77 | function efDistributionSchemaUpdate() { |
— | — | @@ -92,12 +80,12 @@ |
93 | 81 | 'distribution_packages', |
94 | 82 | dirname( __FILE__ ) . '/distribution.sql' |
95 | 83 | ); |
96 | | - |
| 84 | + |
97 | 85 | $wgExtNewTables[] = array( |
98 | 86 | 'distribution_units', |
99 | 87 | dirname( __FILE__ ) . '/distribution.sql' |
100 | | - ); |
101 | | - |
| 88 | + ); |
| 89 | + |
102 | 90 | $wgExtNewTables[] = array( |
103 | 91 | 'distribution_unit_versions', |
104 | 92 | dirname( __FILE__ ) . '/distribution.sql' |
— | — | @@ -106,7 +94,7 @@ |
107 | 95 | $wgExtNewTables[] = array( |
108 | 96 | 'distribution_mwreleases', |
109 | 97 | dirname( __FILE__ ) . '/distribution.sql' |
110 | | - ); |
| 98 | + ); |
111 | 99 | |
112 | 100 | return true; |
113 | 101 | } |