r59691 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59690‎ | r59691 | r59692 >
Date:02:16, 3 December 2009
Author:tomasz
Status:ok
Tags:
Comment:
Pulling in r59690 for conversion rate fixes
Modified paths:
  • /branches/wmf-deployment/extensions/ContributionReporting (modified) (history)
  • /branches/wmf-deployment/extensions/ContributionReporting/ContributionTrackingStatistics_body.php (modified) (history)

Diff [purge]

Index: branches/wmf-deployment/extensions/ContributionReporting/ContributionTrackingStatistics_body.php
@@ -103,7 +103,7 @@
104104 continue;
105105 }
106106 // Pull together templates, clicks, donations, conversion rate
107 - $conversion_rate = ( $template[1] == 0 ) ? 0 : ( $template[2] / $template[1] ) * 100;
 107+ $conversion_rate = ( $template[2] == 0 ) ? 0 : ( $template[2] / ( $template[1] + $template[2] ) ) * 100;
108108 $amount = ( $template[3] == 0 ) ? 0 : $template[3];
109109
110110 $link = $wgContributionReportingBaseURL.$expanded_template[0];
@@ -119,7 +119,7 @@
120120 Xml::tags( 'td', array( 'align' => 'left'), $template_link ) .
121121 Xml::element( 'td', array( 'align' => 'left'), $expanded_template[1] ) .
122122 Xml::element( 'td', array( 'align' => 'left'), $expanded_template[2] ) .
123 - Xml::element( 'td', array( 'align' => 'right'), $template[1] ) .
 123+ Xml::element( 'td', array( 'align' => 'right'), $template[1] + $template[2] ) .
124124 Xml::element( 'td', array( 'align' => 'right'), $template[2] ) .
125125 Xml::element( 'td', array( 'align' => 'right'), $amount ) .
126126 Xml::element( 'td', array( 'align' => 'right'), round($average, 2) ) .
Property changes on: branches/wmf-deployment/extensions/ContributionReporting
___________________________________________________________________
Name: svn:mergeinfo
127127 - /branches/REL1_15/phase3/extensions/ContributionReporting:51646
/trunk/extensions/ContributionReporting:56151-57449,58684,58687-59049,59134-59163,59176
/trunk/extensions/ContributionTracking:58684
/trunk/phase3/extensions/ContributionReporting:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57541,57916,58151,58219,58633,58816
128128 + /branches/REL1_15/phase3/extensions/ContributionReporting:51646
/trunk/extensions/ContributionReporting:56151-57449,58684,58687-59049,59134-59163,59176,59690
/trunk/extensions/ContributionTracking:58684
/trunk/phase3/extensions/ContributionReporting:56213,56215-56216,56218,56325,56334-56336,56338,56340,56343,56345,56347,56350,57541,57916,58151,58219,58633,58816

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r59690Fixing a bug in conversion rate due to wrong values being compared. Displayin...tomasz02:14, 3 December 2009

Status & tagging log