r99282 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99281‎ | r99282 | r99283 >
Date:23:43, 7 October 2011
Author:khorn
Status:ok
Tags:fundraising 
Comment:
Now checks to see if the communication_stats table exists in our ContributionTracking database before just trying to write to it.
r97106
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/gateway_common/gateway.adapter.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/gateway_common/gateway.adapter.php
@@ -791,10 +791,17 @@
792792 * @param type $additional
793793 * @param type $vars
794794 */
795 - function saveCommunicationStats( $function = '', $additional = '', $vars = '' ) { //easier than looking at logs...
 795+ function saveCommunicationStats( $function = '', $additional = '', $vars = '' ) {
796796 $params = array( );
797 - if ( self::getGlobal( 'SaveCommStats' ) ) { //TODO: I should do this for real at some point.
 797+ if ( self::getGlobal( 'SaveCommStats' ) ) {
798798 $db = ContributionTrackingProcessor::contributionTrackingConnection();
 799+
 800+ //TODO: Actually define this table somewhere in the code, once we
 801+ //are reasonably certain we know what we want to see in it.
 802+ if ( !( $db->tableExists( 'communication_stats' ) ) ){
 803+ return;
 804+ }
 805+
799806 $params['contribution_id'] = $this->dataObj->getVal( 'contribution_tracking_id' );
800807 $params['ts'] = $db->timestamp();
801808 $params['duration'] = $this->getStopwatch( __FUNCTION__ );
@@ -803,8 +810,6 @@
804811 $params['vars'] = $vars;
805812 $params['additional'] = $additional;
806813
807 - //can we check to see if the table exists? Bah, I should almost certianly do this Fer Reals.
808 -
809814 $db->insert( 'communication_stats', $params );
810815 }
811816 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r97106DonationInterface's GlobalCollect gateway can now post server-side through ex...khorn22:09, 14 September 2011

Status & tagging log