r103967 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r103966‎ | r103967 | r103968 >
Date:22:05, 22 November 2011
Author:kaldari
Status:ok
Tags:
Comment:
more flexible
Modified paths:
  • /trunk/extensions/ContributionReporting/DailyTotal_body.php (modified) (history)
  • /trunk/extensions/ContributionReporting/YearlyTotal_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/DailyTotal_body.php
@@ -19,6 +19,8 @@
2020
2121 public function execute( $sub ) {
2222 global $wgRequest, $wgOut;
 23+
 24+ $js = $wgRequest->getBool( 'js', false );
2325
2426 $timezone = $wgRequest->getVal( 'timezone', '0' );
2527 // Make sure it's a number and reasonable
@@ -34,7 +36,12 @@
3537 $total = $this->query( $timezone, $start );
3638
3739 $content = "wgFundraisingDailyTotal = $total;";
38 - echo $content;
 40+
 41+ if ( $js ) {
 42+ echo $content;
 43+ } else {
 44+ echo $total;
 45+ }
3946 }
4047
4148 /* Private Functions */
Index: trunk/extensions/ContributionReporting/YearlyTotal_body.php
@@ -20,6 +20,8 @@
2121 public function execute( $sub ) {
2222 global $wgRequest, $wgOut, $egFundraiserStatisticsFundraisers;
2323
 24+ $js = $wgRequest->getBool( 'js', false );
 25+
2426 $adjustment = $wgRequest->getVal( 'adjustment' );
2527 // Make sure it's a number
2628 if ( is_nan( $adjustment ) ) {
@@ -33,7 +35,12 @@
3436 $total = $this->query( $adjustment );
3537
3638 $content = "wgFundraisingYearlyTotal = $total;";
37 - echo $content;
 39+
 40+ if ( $js ) {
 41+ echo $content;
 42+ } else {
 43+ echo $total;
 44+ }
3845 }
3946
4047 /* Private Functions */

Follow-up revisions

RevisionCommit summaryAuthorDate
r103998MFT r103884, r103947, r103959, r103967, r103991, r103996awjrichards01:24, 23 November 2011
r104000MFT r103884, r103947, r103959, r103967, r103991, r103996awjrichards01:51, 23 November 2011

Status & tagging log