[Fusionforge-commits] FusionForge branch Branch_5_3 updated. 1ec190c2ae2adb605910f5e287b80d06a18e1d26

Franck Villaume nerville at fusionforge.org
Mon Mar 17 11:54:45 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  1ec190c2ae2adb605910f5e287b80d06a18e1d26 (commit)
      from  0ae1c5afd334314c7b104c421e016faba077de28 (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 1ec190c2ae2adb605910f5e287b80d06a18e1d26
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Mar 17 11:54:17 2014 +0100

    frs: reporting, fix anonymous user

diff --git a/src/common/reporting/ReportDownloads.class.php b/src/common/reporting/ReportDownloads.class.php
index 59e1628..c50e58e 100644
--- a/src/common/reporting/ReportDownloads.class.php
+++ b/src/common/reporting/ReportDownloads.class.php
@@ -1,5 +1,5 @@
 <?php
-/*
+/**
  * FusionForge reporting system
  *
  * Copyright (C) 2009 Alain Peyrat, Alcatel-Lucent
@@ -21,7 +21,7 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-/*
+/**
  * Standard Alcatel-Lucent disclaimer for contributing to open source
  *
  * "The class ("Contribution") has not been tested and/or
@@ -79,21 +79,21 @@ class ReportDownloads extends Report {
 		}
 
 		$res = db_query_params ('SELECT frs_package.name, frs_release.name,
-                       frs_file.filename, users.realname,
-                       frs_dlstats_file.month || lpad(frs_dlstats_file.day::text,2,0::text),
-                       users.user_name
-                FROM frs_dlstats_file, frs_file, frs_release,
-                     frs_package, users
-                WHERE frs_dlstats_file.user_id = users.user_id
-                  AND frs_dlstats_file.file_id = frs_file.file_id
-                  AND frs_file.release_id = frs_release.release_id
-                  AND frs_release.package_id = frs_package.package_id
-                  AND frs_package.group_id = $1
-                  AND frs_release.package_id = $2
-                  AND frs_dlstats_file.month >= $3
-                  AND frs_dlstats_file.month <= $4
-                ORDER BY frs_dlstats_file.month DESC,
-                       frs_dlstats_file.day DESC',
+					frs_file.filename, users.realname,
+					frs_dlstats_file.month || lpad(frs_dlstats_file.day::text,2,0::text),
+					users.user_name, users.user_id
+					FROM frs_dlstats_file, frs_file, frs_release,
+					frs_package, users
+					WHERE frs_dlstats_file.user_id = users.user_id
+					AND frs_dlstats_file.file_id = frs_file.file_id
+					AND frs_file.release_id = frs_release.release_id
+					AND frs_release.package_id = frs_package.package_id
+					AND frs_package.group_id = $1
+					AND frs_release.package_id = $2
+					AND frs_dlstats_file.month >= $3
+					AND frs_dlstats_file.month <= $4
+					ORDER BY frs_dlstats_file.month DESC,
+					frs_dlstats_file.day DESC',
 					array ($group_id,
 					       $package_id,
 					       $start_m,
diff --git a/src/www/frs/reporting/downloads.php b/src/www/frs/reporting/downloads.php
index e2050d1..eedd587 100644
--- a/src/www/frs/reporting/downloads.php
+++ b/src/www/frs/reporting/downloads.php
@@ -201,9 +201,13 @@ if ($start == $end) {
 		echo '<tr '. $HTML->boxGetAltRowStyle($i) .'>'.
 			'<td>'. $data[$i][0] .'</td>'.
 			'<td>'. $data[$i][1] .'</td>'.
-			'<td>'. basename($data[$i][2]) .'</td>'.
-			'<td><a href="/users/'.urlencode($data[$i][5]).'/">'. $data[$i][3] .'</a></td>'.
-			'<td class="align-center">'. $date .'</td></tr>';
+			'<td>'. basename($data[$i][2]) .'</td>';
+		if ($data[$i][6] != 100) {
+			echo '<td><a href="/users/'.urlencode($data[$i][5]).'/">'. $data[$i][3] .'</a></td>';
+		} else {
+			echo '<td>'.$data[$i][3].'</td>';
+		}
+		echo '<td class="align-center">'. $date .'</td></tr>';
 	}
 	echo $HTML->listTableBottom();
 }

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

Summary of changes:
 src/common/reporting/ReportDownloads.class.php |   34 ++++++++++++------------
 src/www/frs/reporting/downloads.php            |   10 ++++---
 2 files changed, 24 insertions(+), 20 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list