r58984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58983‎ | r58984 | r58985 >
Date:22:57, 12 November 2009
Author:nimishg
Status:deferred
Tags:
Comment:
more fields for analysis
Modified paths:
  • /trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php
@@ -75,6 +75,8 @@
7676 if ( isset ( $totals ) ) {
7777 // Table headers
7878 $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ), wfMsg( 'contribstats-template' ) ) ;
 79+ $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ), wfMsg( 'contribstats-landingpage' ) ) ;
 80+ $htmlOut .= Xml::element( 'th', array( 'align' => 'left' ), wfMsg( 'contribstats-donatepage' ) ) ;
7981 $htmlOut .= Xml::element( 'th', array( 'align' => 'right' ), wfMsg( 'contribstats-clicks' ) );
8082 $htmlOut .= Xml::element( 'th', array( 'align' => 'right' ), wfMsg( 'contribstats-donations' ) );
8183 $htmlOut .= Xml::element( 'th', array( 'align' => 'right' ), wfMsg( 'contribstats-amount' ) );
@@ -87,8 +89,16 @@
8890 $conversion_rate = ( $template[1] == 0 ) ? 0 : ( $template[2] / $template[1] ) * 100;
8991 $amount = ( $template[3] == 0 ) ? 0 : $template[3];
9092
 93+ $expanded_template = explode(".", $template);
 94+ if(!isset($expanded_template[1])){ $expanded_template[1] = "";}
 95+ if(!isset($expanded_template[2])){ $expanded_template[2] = "";}
 96+
 97+
 98+
9199 $htmlOut .= Xml::tags( 'tr', null,
92 - Xml::element( 'td', array( 'align' => 'left'), $template[0] ) .
 100+ Xml::element( 'td', array( 'align' => 'left'), $expanded_template[0] ) .
 101+ Xml::element( 'td', array( 'align' => 'left'), $expanded_template[1] ) .
 102+ Xml::element( 'td', array( 'align' => 'left'), $expanded_template[2] ) .
93103 Xml::element( 'td', array( 'align' => 'right'), $template[1] ) .
94104 Xml::element( 'td', array( 'align' => 'right'), $template[2] ) .
95105 Xml::element( 'td', array( 'align' => 'right'), $amount ) .

Status & tagging log