[Fusionforge-commits] r9552 - in branches/Branch_5_0/gforge/www: project/stats reporting tracker/reporting

Roland Mas lolando at libremir.placard.fr.eu.org
Tue Apr 20 20:40:43 CEST 2010


Author: lolando
Date: 2010-04-20 20:40:43 +0200 (Tue, 20 Apr 2010)
New Revision: 9552

Modified:
   branches/Branch_5_0/gforge/www/project/stats/index.php
   branches/Branch_5_0/gforge/www/reporting/groupadded.php
   branches/Branch_5_0/gforge/www/reporting/groupcum.php
   branches/Branch_5_0/gforge/www/reporting/projectact.php
   branches/Branch_5_0/gforge/www/reporting/siteact.php
   branches/Branch_5_0/gforge/www/reporting/useract.php
   branches/Branch_5_0/gforge/www/reporting/useradded.php
   branches/Branch_5_0/gforge/www/reporting/usercum.php
   branches/Branch_5_0/gforge/www/tracker/reporting/index.php
Log:
Use the same default values for all statistics and reports

Modified: branches/Branch_5_0/gforge/www/project/stats/index.php
===================================================================
--- branches/Branch_5_0/gforge/www/project/stats/index.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/project/stats/index.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -29,17 +29,17 @@
 }
 
 $area = getStringFromRequest('area');
-$SPAN = getIntFromRequest('SPAN', 1);
+$SPAN = getIntFromRequest('SPAN', REPORT_TYPE_MONTHLY);
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');
 
-
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
 if (!$end || $end <= $start) {
-        $end = time () ;
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
 }
 
 site_project_header(array('title'=>_('Project Activity').' '.$group->getPublicName(),'group'=>$group_id,'toptab'=>'home'));

Modified: branches/Branch_5_0/gforge/www/reporting/groupadded.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/groupadded.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/groupadded.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -40,8 +40,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 session_require( array('group'=>$sys_stats_group) );
 

Modified: branches/Branch_5_0/gforge/www/reporting/groupcum.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/groupcum.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/groupcum.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -40,8 +40,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 session_require( array('group'=>$sys_stats_group) );
 

Modified: branches/Branch_5_0/gforge/www/reporting/projectact.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/projectact.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/projectact.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -38,14 +38,18 @@
 
 $g_id = getStringFromRequest('g_id');
 $area = getStringFromRequest('area');
-$SPAN = getIntFromRequest('SPAN');
+$SPAN = getIntFromRequest('SPAN', 1);
 $start = getIntFromRequest('start');
 $end = getIntFromRequest('end');
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 echo report_header(_('Project Activity'));
 

Modified: branches/Branch_5_0/gforge/www/reporting/siteact.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/siteact.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/siteact.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -43,8 +43,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 $area = util_ensure_value_in_set ($area, array ('tracker','forum','docman','taskman','downloads')) ;
 

Modified: branches/Branch_5_0/gforge/www/reporting/useract.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/useract.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/useract.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -45,8 +45,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 echo report_header(_('User Activity'));
 

Modified: branches/Branch_5_0/gforge/www/reporting/useradded.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/useradded.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/useradded.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -40,8 +40,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 session_require( array('group'=>$sys_stats_group) );
 

Modified: branches/Branch_5_0/gforge/www/reporting/usercum.php
===================================================================
--- branches/Branch_5_0/gforge/www/reporting/usercum.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/reporting/usercum.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -40,8 +40,12 @@
 
 if (!$start) {
 	$z =& $report->getMonthStartArr();
-	$start = $z[count($z)-1];
+	$start = $z[0];
 }
+if (!$end || $end <= $start) {
+	$z =& $report->getMonthStartArr();
+	$end = $z[count($z)-1];
+}
 
 session_require( array('group'=>$sys_stats_group) );
 

Modified: branches/Branch_5_0/gforge/www/tracker/reporting/index.php
===================================================================
--- branches/Branch_5_0/gforge/www/tracker/reporting/index.php	2010-04-20 18:25:26 UTC (rev 9551)
+++ branches/Branch_5_0/gforge/www/tracker/reporting/index.php	2010-04-20 18:40:43 UTC (rev 9552)
@@ -53,10 +53,9 @@
 	$z =& $report->getMonthStartArr();
 	$start = $z[0];
 }
-
-if (!$end) {
+if (!$end || $end <= $start) {
 	$z =& $report->getMonthStartArr();
-	$end = $z[ count($z)-1];
+	$end = $z[count($z)-1];
 }
 
 $group =& group_get_object($group_id);




More information about the Fusionforge-commits mailing list