Index: trunk/extensions/ContributionReporting/FundraiserStatistics_body.php |
— | — | @@ -29,6 +29,17 @@ |
30 | 30 | $htmlOut = Xml::openElement( 'div', array( 'style' => 'margin-bottom: 10px;' ) ); |
31 | 31 | $today = strtotime( date( 'M j Y' ) ); |
32 | 32 | |
| 33 | + $max = 0; |
| 34 | + foreach ( $egFundraiserStatisticsFundraisers as $fundraiser ) { |
| 35 | + $days = $this->getDailyTotals( $fundraiser['start'], $fundraiser['end'] ); |
| 36 | + // Determine maximimum for fundraiser |
| 37 | + foreach ( $days as $day ) { |
| 38 | + if ( $day[0] > $max ) { |
| 39 | + $max = $day[0]; |
| 40 | + } |
| 41 | + } |
| 42 | + } |
| 43 | + |
33 | 44 | $columns = array(); |
34 | 45 | foreach ( $egFundraiserStatisticsFundraisers as $fundraiser ) { |
35 | 46 | $htmlOut .= Xml::element( 'span', |
— | — | @@ -43,14 +54,6 @@ |
44 | 55 | // Get data for fundraiser |
45 | 56 | $days = $this->getDailyTotals( $fundraiser['start'], $fundraiser['end'] ); |
46 | 57 | |
47 | | - // Determine maximimum for fundraiser |
48 | | - $max = 0; |
49 | | - foreach ( $days as $day ) { |
50 | | - if ( $day[0] > $max ) { |
51 | | - $max = $day[0]; |
52 | | - } |
53 | | - } |
54 | | - |
55 | 58 | $todayStyle = 'position:absolute;' . |
56 | 59 | 'width:6px;' . |
57 | 60 | 'height:6px;' . |