Index: trunk/extensions/ContributionReporting/DailyTotal_body.php |
— | — | @@ -19,6 +19,8 @@ |
20 | 20 | |
21 | 21 | public function execute( $sub ) { |
22 | 22 | global $wgRequest, $wgOut; |
| 23 | + |
| 24 | + $js = $wgRequest->getBool( 'js', false ); |
23 | 25 | |
24 | 26 | $timezone = $wgRequest->getVal( 'timezone', '0' ); |
25 | 27 | // Make sure it's a number and reasonable |
— | — | @@ -34,7 +36,12 @@ |
35 | 37 | $total = $this->query( $timezone, $start ); |
36 | 38 | |
37 | 39 | $content = "wgFundraisingDailyTotal = $total;"; |
38 | | - echo $content; |
| 40 | + |
| 41 | + if ( $js ) { |
| 42 | + echo $content; |
| 43 | + } else { |
| 44 | + echo $total; |
| 45 | + } |
39 | 46 | } |
40 | 47 | |
41 | 48 | /* Private Functions */ |
Index: trunk/extensions/ContributionReporting/YearlyTotal_body.php |
— | — | @@ -20,6 +20,8 @@ |
21 | 21 | public function execute( $sub ) { |
22 | 22 | global $wgRequest, $wgOut, $egFundraiserStatisticsFundraisers; |
23 | 23 | |
| 24 | + $js = $wgRequest->getBool( 'js', false ); |
| 25 | + |
24 | 26 | $adjustment = $wgRequest->getVal( 'adjustment' ); |
25 | 27 | // Make sure it's a number |
26 | 28 | if ( is_nan( $adjustment ) ) { |
— | — | @@ -33,7 +35,12 @@ |
34 | 36 | $total = $this->query( $adjustment ); |
35 | 37 | |
36 | 38 | $content = "wgFundraisingYearlyTotal = $total;"; |
37 | | - echo $content; |
| 39 | + |
| 40 | + if ( $js ) { |
| 41 | + echo $content; |
| 42 | + } else { |
| 43 | + echo $total; |
| 44 | + } |
38 | 45 | } |
39 | 46 | |
40 | 47 | /* Private Functions */ |