[Fusionforge-commits] FusionForge branch 6.0 updated. v6.0.1-33-g021ca32

Sylvain Beucler beuc-inria at libremir.placard.fr.eu.org
Tue Jun 30 18:19:16 CEST 2015


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, 6.0 has been updated
       via  021ca32ca5e8ee908ad81d955c33d7914b1422d1 (commit)
      from  f75251fb1af02798645a1e6bf7f4ee7eaf833ac9 (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 -----------------------------------------------------------------
https://scm.fusionforge.org/anonscm/gitweb/?p=fusionforge/fusionforge.git;a=commitdiff;h=021ca32ca5e8ee908ad81d955c33d7914b1422d1

commit 021ca32ca5e8ee908ad81d955c33d7914b1422d1
Author: Sylvain Beucler <sylvain.beucler at inria.fr>
Date:   Tue Jun 30 18:19:08 2015 +0200

    fix FRS: do not display hidden releases publicly (2)

diff --git a/src/CHANGES b/src/CHANGES
index fc9a93d..651ccd5 100644
--- a/src/CHANGES
+++ b/src/CHANGES
@@ -4,7 +4,7 @@ FusionForge 6.0.2:
 * Mailing lists: fix default list URL path (Inria)
 * Mailing lists: fix installation on CentOS (Inria)
 * FRS: don't reset permissions when derefencing roles in other projects [#782] (Inria)
-* FRS: do not display hidden releases publicly (TrivialDev)
+* FRS: do not display hidden releases publicly (TrivialDev & Inria)
 * Tracker: fix column title in add/update custom field elements (TrivialDev)
 * Plugin Taskboard: fix logic on initialize error (TrivialDev)
 * Plugin Taskboard: fix background column color setting (TrivialDev)
diff --git a/src/common/frs/FRSPackage.class.php b/src/common/frs/FRSPackage.class.php
index 02c9159..791f777 100644
--- a/src/common/frs/FRSPackage.class.php
+++ b/src/common/frs/FRSPackage.class.php
@@ -474,18 +474,18 @@ class FRSPackage extends Error {
 	 *
 	 * @return	array	Array of FRSRelease Objects.
 	 */
-	function &getReleases($status = false) {
+	function &getReleases($include_hidden = true) {
 		if (!is_array($this->package_releases) || count($this->package_releases) < 1) {
 			$this->package_releases=array();
 			$res = db_query_params('SELECT * FROM frs_release WHERE package_id=$1 ORDER BY release_date DESC',
 						array($this->getID()));
 			while ($arr = db_fetch_array($res)) {
-				if ($status) {
-					if (forge_check_perm('frs', $arr['release_id'], 'read')) {
+				if ($include_hidden) {
+					$this->package_releases[] = $this->newFRSRelease($arr['release_id'], $arr);
+				} else {
+					if (forge_check_perm('frs', $this->getID(), 'read')) {
 						$this->package_releases[] = $this->newFRSRelease($arr['release_id'], $arr);
 					}
-				} else {
-					$this->package_releases[] = $this->newFRSRelease($arr['release_id'], $arr);
 				}
 			}
 		}
diff --git a/src/common/frs/views/listpackages.php b/src/common/frs/views/listpackages.php
index e9b5147..8d0452f 100644
--- a/src/common/frs/views/listpackages.php
+++ b/src/common/frs/views/listpackages.php
@@ -88,7 +88,7 @@ if (count($FRSPackages) < 1) {
 		}
 
 		// get the releases of the package
-		$FRSPackageReleases = $FRSPackage->getReleases(true);
+		$FRSPackageReleases = $FRSPackage->getReleases(false);
 		$num_releases = count($FRSPackageReleases);
 
 		$proj_stats['releases'] += $num_releases;

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

Summary of changes:
 src/CHANGES                           |  2 +-
 src/common/frs/FRSPackage.class.php   | 10 +++++-----
 src/common/frs/views/listpackages.php |  2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list