[Fusionforge-commits] r11240 - trunk/src/www/frs/reporting
Alain Peyrat
aljeux at libremir.placard.fr.eu.org
Thu Oct 28 18:27:02 CEST 2010
Author: aljeux
Date: 2010-10-28 18:27:01 +0200 (Thu, 28 Oct 2010)
New Revision: 11240
Modified:
trunk/src/www/frs/reporting/downloads.php
Log:
FRS: Small improments on frs/reporting code.
Modified: trunk/src/www/frs/reporting/downloads.php
===================================================================
--- trunk/src/www/frs/reporting/downloads.php 2010-10-28 16:26:56 UTC (rev 11239)
+++ trunk/src/www/frs/reporting/downloads.php 2010-10-28 16:27:01 UTC (rev 11240)
@@ -58,10 +58,13 @@
exit_no_group();
}
-$g =& group_get_object($group_id);
-if (!$g || $g->isError()) {
- exit_error($g->getErrorMessage(),'frs');
+$group=group_get_object($group_id);
+if (!$group || !is_object($group)) {
+ exit_no_group();
+} elseif ($group->isError()) {
+ exit_error($group->getErrorMessage(),'frs');
}
+
session_require_perm ('frs', $group_id, 'write') ;
$report=new Report();
@@ -69,17 +72,13 @@
exit_error($report->getErrorMessage(),'frs');
}
-// Fix: Add current month to the reports.
-$z =& $report->getMonthStartArr();
-$z[] = mktime(0,0,0,date('m')+1,1,date('Y'));
+if (!$start || !$end) $z =& $report->getMonthStartArr();
if (!$start) {
- $z =& $report->getMonthStartArr();
$start = $z[0];
}
if (!$end) {
- $z =& $report->getMonthStartArr();
$end = $z[ count($z)-1];
}
if ($end < $start) list($start, $end) = array($end, $start);
@@ -91,8 +90,6 @@
?>
-<h1><?php echo _('File Release Reporting') ?></h1>
-
<form action="<?php echo util_make_url('/frs/reporting/downloads.php') ?>" method="get">
<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
<table><tr>
More information about the Fusionforge-commits
mailing list