[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 0ae1c5afd334314c7b104c421e016faba077de28

Franck Villaume nerville at fusionforge.org
Mon Mar 17 11:19:55 CET 2014


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, Branch_5_3 has been updated
       via  0ae1c5afd334314c7b104c421e016faba077de28 (commit)
      from  112220ccb3742044f2d76bb9802bc4f4f06fd789 (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 0ae1c5afd334314c7b104c421e016faba077de28
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Mar 17 11:19:04 2014 +0100

    docman: reporting page: fix display user, fix performance issue

diff --git a/src/common/docman/views/reporting.php b/src/common/docman/views/reporting.php
index 2e7e1e1..275b7a5 100644
--- a/src/common/docman/views/reporting.php
+++ b/src/common/docman/views/reporting.php
@@ -1,7 +1,7 @@
 <?php
 /**
  * Copyright (C) 2009-2012 Alain Peyrat, Alcatel-Lucent
- * Copyright 2012, Franck Villaume - TrivialDev
+ * Copyright 2012-2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -171,13 +171,18 @@ if (count($data) == 0) {
 	echo $HTML->listTableTop($tabletop, false, 'sortable_docman_listfile', 'sortable', $classth);
 	for ($i=0; $i<count($data); $i++) {
 		$date = preg_replace('/^(....)(..)(..)$/', '\1-\2-\3', $data[$i][2]);
-		$ndg = new DocumentGroup($g, $data[$i][4]);
+		$ndg = new DocumentGroup($g, $data[$i][3]);
 		$path = $ndg->getPath(true);
 		echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
 			'<td>'.$path.'</td>'.
-			'<td>'. $data[$i][0] .'</td>'.
-			'<td><a class="tabtitle" title="'._('View user profile').'" href="/users/'.urlencode($data[$i][3]).'/">'. $data[$i][1] .'</a></td>'.
-			'<td class="align-center">'. $date .'</td></tr>';
+			'<td>'. $data[$i][0] .'</td>';
+		if ( $data[$i][1] != 100) {
+			$userObject = user_get_object($data[$i][1]);
+			echo '<td>'.util_display_user($userObject->getUnixname(), $data[$i][1], $userObject->getRealname()).'</td>';
+		} else {
+			echo '<td>'._('Anonymous user').'</td>';
+		}
+		echo '<td class="align-center">'. $date .'</td></tr>';
 	}
 	echo $HTML->listTableBottom();
 }
diff --git a/src/common/reporting/ReportPerGroupDocmanDownloads.class.php b/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
index 42ae597..addf91c 100644
--- a/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
+++ b/src/common/reporting/ReportPerGroupDocmanDownloads.class.php
@@ -5,6 +5,7 @@
  * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
  * Copyright 2009, Roland Mas
  * Copyright 2012, Franck Villaume
+ * Copyright 2014, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -70,14 +71,14 @@ class ReportPerGroupDocmanDownloads extends Report {
 			return;
 		}
 
-		$res = db_query_params ('SELECT docdata_vw.filename, docdata_vw.realname,
+		$res = db_query_params ('SELECT docdata_vw.filename, docman_dlstats_doc.user_id,
 					docman_dlstats_doc.month || lpad(docman_dlstats_doc.day::text,2,0::text),
-					docdata_vw.user_name,
 					docdata_vw.doc_group
 					FROM docman_dlstats_doc, docdata_vw
 					WHERE docdata_vw.group_id = $1
 					AND docman_dlstats_doc.month >= $2
 					AND docman_dlstats_doc.month <= $3
+					AND docdata_vw.docid = docman_dlstats_doc.docid
 					ORDER BY docman_dlstats_doc.month DESC,
 					docman_dlstats_doc.day DESC',
 					array ($group_id,

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

Summary of changes:
 src/common/docman/views/reporting.php                   |   15 ++++++++++-----
 .../reporting/ReportPerGroupDocmanDownloads.class.php   |    5 +++--
 2 files changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list