r75027 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75026‎ | r75027 | r75028 >
Date:18:47, 19 October 2010
Author:nimishg
Status:deferred
Tags:
Comment:
hooks for database schema changes
Modified paths:
  • /trunk/extensions/ContributionTracking/ContributionTracking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionTracking/ContributionTracking.php
@@ -23,12 +23,29 @@
2424 $wgExtensionAliasesFiles['ContributionTracking'] = $dir . 'ContributionTracking.alias.php';
2525 $wgAutoloadClasses['ContributionTracking'] = $dir . 'ContributionTracking_body.php';
2626 $wgSpecialPages['ContributionTracking'] = 'ContributionTracking';
 27+$wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates';
2728
 29+
2830 $wgContributionTrackingDBserver = $wgDBserver;
2931 $wgContributionTrackingDBname = $wgDBname;
3032 $wgContributionTrackingDBuser = $wgDBuser;
3133 $wgContributionTrackingDBpassword = $wgDBpassword;
3234
 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+
3350 function contributionTrackingConnection() {
3451 global $wgContributionTrackingDBserver, $wgContributionTrackingDBname;
3552 global $wgContributionTrackingDBuser, $wgContributionTrackingDBpassword;

Status & tagging log