r59021 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r59020‎ | r59021 | r59022 >
Date:20:04, 13 November 2009
Author:nimishg
Status:deferred
Tags:
Comment:
date order makes sense now
Modified paths:
  • /trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionReporting/ContributionTrackingStatistics_body.php
@@ -44,13 +44,12 @@
4545 /* Wrapper */
4646 public function showDayTotalsForLastDays( $num_days ){
4747 //Seriously, PHP 5.3 has cleaner ways of doing this, till then strtotime to the rescue!
48 - $end_day = new DateTime( "now" );
 48+ $current_day = new DateTime( "now" );
4949 ++$num_days; //really you probably don't want today
50 - $end_day->modify("-$num_days days");
51 -
52 - for( $i = 0 ; $i < ($num_days - 2) ; $i++){ //you don't want today
 50+
 51+ for( $i = 0 ; $i < ($num_days - 1) ; $i++){ //you don't want today
5352 $this->showDayTotals(false, $end_day->format("YmdHis")); //MW Format
54 - $end_day->modify("+1 day");
 53+ $current_day->modify("-1 day");
5554 }
5655 }
5756

Status & tagging log