Index: trunk/extensions/ContributionTracking/ContributionTracking.php |
— | — | @@ -23,12 +23,29 @@ |
24 | 24 | $wgExtensionAliasesFiles['ContributionTracking'] = $dir . 'ContributionTracking.alias.php'; |
25 | 25 | $wgAutoloadClasses['ContributionTracking'] = $dir . 'ContributionTracking_body.php'; |
26 | 26 | $wgSpecialPages['ContributionTracking'] = 'ContributionTracking'; |
| 27 | +$wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates'; |
27 | 28 | |
| 29 | + |
28 | 30 | $wgContributionTrackingDBserver = $wgDBserver; |
29 | 31 | $wgContributionTrackingDBname = $wgDBname; |
30 | 32 | $wgContributionTrackingDBuser = $wgDBuser; |
31 | 33 | $wgContributionTrackingDBpassword = $wgDBpassword; |
32 | 34 | |
| 35 | +function efContributionTrackingLoadUpdates(){ |
| 36 | + global $wgExtNewTables, $wgExtNewFields; |
| 37 | + $dir = dirname( __FILE__ ) . '/'; |
| 38 | + $wgExtNewTables[] = array( 'contribution_tracking', $dir . 'ContributionTracking.sql' ); |
| 39 | + $wgExtNewTables[] = array( 'contribution_tracking_owa_ref', $dir . 'ContributionTracking_OWA_ref.sql' ); |
| 40 | + |
| 41 | + $wgExtNewFields[] = array( |
| 42 | + 'contribution_tracking', |
| 43 | + 'owa_session', |
| 44 | + $dir . 'patch-owa.sql', |
| 45 | + ); |
| 46 | + return true; |
| 47 | + |
| 48 | +} |
| 49 | + |
33 | 50 | function contributionTrackingConnection() { |
34 | 51 | global $wgContributionTrackingDBserver, $wgContributionTrackingDBname; |
35 | 52 | global $wgContributionTrackingDBuser, $wgContributionTrackingDBpassword; |