[Fusionforge-commits] FusionForge branch master updated. 6.0.4-560-g03b3c1b

Franck Villaume nerville at libremir.placard.fr.eu.org
Sat Jun 18 18:34:16 CEST 2016


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  03b3c1bbecca35a63a5a494a39a154f873e73eee (commit)
      from  a4c84331f0589514d18a1a83fa6a0b5bac897062 (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=03b3c1bbecca35a63a5a494a39a154f873e73eee

commit 03b3c1bbecca35a63a5a494a39a154f873e73eee
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Jun 18 18:33:58 2016 +0200

    docman: less code

diff --git a/src/common/docman/views/listfile.php b/src/common/docman/views/listfile.php
index 1a250f0..60e6d8e 100644
--- a/src/common/docman/views/listfile.php
+++ b/src/common/docman/views/listfile.php
@@ -124,26 +124,22 @@ if ($dirid) {
 	}
 }
 
-if ($d_arr != NULL) {
-	if (!$d_arr || count($d_arr) > 0) {
-		// Get the document groups info
-		//put the doc objects into an array keyed off the docgroup
-		foreach ($d_arr as $doc) {
-			$nested_docs[$doc->getDocGroupID()][] = $doc;
-		}
+if (is_array($d_arr) && count($d_arr) > 0) {
+	// Get the document groups info
+	//put the doc objects into an array keyed off the docgroup
+	foreach ($d_arr as $doc) {
+		$nested_docs[$doc->getDocGroupID()][] = $doc;
 	}
 }
 
 $df->setStateID(array(3));
 $d_pending_arr =& $df->getDocuments();
 
-if ($d_pending_arr != NULL) {
-	if (!$d_pending_arr || count($d_pending_arr) > 0) {
-		// Get the document groups info
-		//put the doc objects into an array keyed off the docgroup
-		foreach ($d_pending_arr as $doc) {
-			$nested_pending_docs[$doc->getDocGroupID()][] = $doc;
-		}
+if (is_array($d_pending_arr) && count($d_pending_arr) > 0) {
+	// Get the document groups info
+	//put the doc objects into an array keyed off the docgroup
+	foreach ($d_pending_arr as $doc) {
+		$nested_pending_docs[$doc->getDocGroupID()][] = $doc;
 	}
 }
 
diff --git a/src/common/docman/views/listtrashfile.php b/src/common/docman/views/listtrashfile.php
index 829ff44..a82ede0 100644
--- a/src/common/docman/views/listtrashfile.php
+++ b/src/common/docman/views/listtrashfile.php
@@ -5,8 +5,8 @@
  * Copyright 2000, Quentin Cregan/Sourceforge
  * Copyright 2002-2003, Tim Perdue/GForge, LLC
  * Copyright 2010-2011, Franck Villaume - Capgemini
- * Copyright 2011-2016, Franck Villaume - TrivialDev
  * Copyright (C) 2011 Alain Peyrat - Alcatel-Lucent
+ * Copyright 2011-2016, Franck Villaume - TrivialDev
  * http://fusionforge.org
  *
  * This file is part of FusionForge. FusionForge is free software;
@@ -87,13 +87,11 @@ if ($dirid) {
 	}
 }
 
-if ($d_arr != NULL ) {
-	if (!$d_arr || count($d_arr) > 0) {
-		// Get the document groups info
-		//put the doc objects into an array keyed off the docgroup
-		foreach ($d_arr as $doc) {
-			$nested_docs[$doc->getDocGroupID()][] = $doc;
-		}
+if (is_array($d_arr) && count($d_arr) > 0) {
+	// Get the document groups info
+	//put the doc objects into an array keyed off the docgroup
+	foreach ($d_arr as $doc) {
+		$nested_docs[$doc->getDocGroupID()][] = $doc;
 	}
 }
 

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

Summary of changes:
 src/common/docman/views/listfile.php      | 24 ++++++++++--------------
 src/common/docman/views/listtrashfile.php | 14 ++++++--------
 2 files changed, 16 insertions(+), 22 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list