r75395 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75394‎ | r75395 | r75396 >
Date:23:26, 25 October 2010
Author:nimishg
Status:deferred
Tags:
Comment:
removed event_name and replaced with ref
Modified paths:
  • /trunk/extensions/ContributionTracking/ContributionTracking.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionTracking/ContributionTracking.php
@@ -23,7 +23,8 @@
2424 $wgExtensionAliasesFiles['ContributionTracking'] = $dir . 'ContributionTracking.alias.php';
2525 $wgAutoloadClasses['ContributionTracking'] = $dir . 'ContributionTracking_body.php';
2626 $wgSpecialPages['ContributionTracking'] = 'ContributionTracking';
27 -$wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates';
 27+//this only works if contribution tracking is inside a mediawiki DB, which typically it isn't.
 28+//$wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates';
2829
2930
3031 $wgContributionTrackingDBserver = $wgDBserver;
@@ -49,7 +50,7 @@
5051 //convert a referrer URL to an index in the owa_ref table
5152 function ef_contribution_tracking_owa_get_ref_id($ref){
5253 // Replication lag means sometimes a new event will not exist in the table yet
53 - $dbw = wfGetDB( DB_MASTER );
 54+ $dbw = contributionTrackingConnection();
5455 $id_num = $dbw->selectField(
5556 'contribution_tracking_owa_ref',
5657 'id',
@@ -60,7 +61,7 @@
6162 if ( $id_num === false ) {
6263 $dbw->insert(
6364 'contribution_tracking_owa_ref',
64 - array( 'url' => (string) $event_name ),
 65+ array( 'url' => (string) $ref ),
6566 __METHOD__
6667 );
6768 $id_num = $dbw->insertId();

Status & tagging log