[Fusionforge-commits] FusionForge branch master updated. 7da11ff77f421ec26050e8442bc63f56cfb989ce

Alain Peyrat aljeux at fusionforge.org
Mon Dec 17 10:55:49 CET 2012


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  7da11ff77f421ec26050e8442bc63f56cfb989ce (commit)
      from  73d80414219833e0e7dd7f7b9dc487f4a6a7dfbf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7da11ff77f421ec26050e8442bc63f56cfb989ce
Author: Alain Peyrat <alain.peyrat at alcatel-lucent.com>
Date:   Mon Dec 17 10:55:31 2012 +0100

    Revert "Small rework FRS reporting, start merging code"
    
    This reverts commit 73d80414219833e0e7dd7f7b9dc487f4a6a7dfbf.

diff --git a/src/common/docman/views/reporting.php b/src/common/docman/views/reporting.php
index cba95b4..14dff49 100644
--- a/src/common/docman/views/reporting.php
+++ b/src/common/docman/views/reporting.php
@@ -49,22 +49,13 @@ global $d_arr; // document array
 global $group_id; // id of group
 global $g; // the group object
 
-$group_id = getIntFromRequest('group_id');
-$start = getIntFromRequest('start');
-$end = getIntFromRequest('end');
-
-if (!$group_id) {
-	exit_no_group();
+if ( !forge_check_perm('docman', $group_id, 'admin')) {
+	$return_msg= _('Document Manager Access Denied');
+	session_redirect('/docman/?group_id='.$group_id.'&warning_msg='.urlencode($return_msg));
 }
 
-$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('docman', $group_id, 'admin');
+$start = getIntFromRequest('start');
+$end = getIntFromRequest('end');
 
 $report = new Report();
 if ($report->isError()) {
@@ -86,25 +77,23 @@ html_use_jqueryjqplotpluginCanvas();
 echo $HTML->getJavascripts();
 echo $HTML->getStylesheets();
 
+
 $report = new ReportPerGroupDocmanDownloads($group_id, $start, $end);
 if ($report->isError()) {
-	exit_error($report->getErrorMessage(), 'docman');
-}
-
+	echo '<p class="information">'.$report->getErrorMessage().'</p>';
+} else {
 ?>
 
 <form action="<?php echo util_make_url('/docman/') ?>" method="get">
-	<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
-	<input type="hidden" name="view" value="reporting" />
-	<table>
-		<tr>
-			<td><strong><?php echo _('Start'); ?>:</strong><br />
-				<?php echo report_months_box($report, 'start', $start); ?></td>
-			<td><strong><?php echo _('End'); ?>:</strong><br />
-				<?php echo report_months_box($report, 'end', $end); ?></td>
-			<td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
-		</tr>
-	</table>
+<input type="hidden" name="group_id" value="<?php echo $group_id; ?>" />
+<input type="hidden" name="view" value="reporting" />
+<table><tr>
+<td><strong><?php echo _('Start'); ?>:</strong><br />
+<?php echo report_months_box($report, 'start', $start); ?></td>
+<td><strong><?php echo _('End'); ?>:</strong><br />
+<?php echo report_months_box($report, 'end', $end); ?></td>
+<td><input type="submit" name="submit" value="<?php echo _('Refresh'); ?>" /></td>
+</tr></table>
 </form>
 
 <?php
@@ -113,7 +102,7 @@ $data = $report->getData();
 
 if (count($data) == 0) {
 	echo '<p class="information">';
-	echo _('There have been no downloads for this project.');
+	echo _('There have been no documents for this project.');
 	echo '</p>';
 } else {
 	echo '<script type="text/javascript">//<![CDATA['."\n";
@@ -176,3 +165,6 @@ if (count($data) == 0) {
 	}
 	echo $HTML->listTableBottom();
 }
+
+}
+ 
diff --git a/src/common/reporting/ReportPerGroupDocmanDownloads.class.php b/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
index 4876b12..0ad469e 100644
--- a/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
+++ b/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
@@ -91,7 +91,7 @@ class ReportPerGroupDocmanDownloads extends Report {
 			$this->setError('ReportUserAct:: '.db_error());
 			return false;
 		}
-
+		
 		$rows = db_numrows($res);
 		$arr = array();
 		$i = 0;

-----------------------------------------------------------------------

Summary of changes:
 src/common/docman/views/reporting.php              |   50 ++++++++------------
 .../ReportPerGroupDocmanDownloads.class.php        |    2 +-
 2 files changed, 22 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list