[Fusionforge-commits] FusionForge branch master updated. a9fc159438192e9ea502dae4030b5e2ec271b86d

Franck Villaume nerville at fusionforge.org
Thu Sep 11 15:43:12 CEST 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, master has been updated
       via  a9fc159438192e9ea502dae4030b5e2ec271b86d (commit)
      from  153d7c9b4655453ea6a82e0c705f993e9c592baa (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 a9fc159438192e9ea502dae4030b5e2ec271b86d
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Thu Sep 11 15:41:31 2014 +0200

    Widget Project Documents Activity: better check about data

diff --git a/src/common/widget/Widget_ProjectDocumentsActivity.class.php b/src/common/widget/Widget_ProjectDocumentsActivity.class.php
index fe02f0b..a271233 100644
--- a/src/common/widget/Widget_ProjectDocumentsActivity.class.php
+++ b/src/common/widget/Widget_ProjectDocumentsActivity.class.php
@@ -118,9 +118,41 @@ class Widget_ProjectDocumentsActivity extends Widget {
 		$activitysArray[] = $dm->getActivity($sections, $begin3, $end3);
 		$activitysArray[] = $dm->getActivity($sections, $begin2, $end2);
 		$activitysArray[] = $dm->getActivity($sections, $begin1, $end1);
-		if ( $activitysArray[0]['docmannew'] + $activitysArray[1]['docmannew'] + $activitysArray[2]['docmannew'] + $activitysArray[3]['docmannew'] +
-			$activitysArray[0]['docmanupdate'] + $activitysArray[1]['docmanupdate'] + $activitysArray[2]['docmanupdate'] + $activitysArray[3]['docmanupdate'] +
-			$activitysArray[0]['docgroupnew'] + $activitysArray[1]['docgroupnew'] + $activitysArray[2]['docgroupnew'] + $activitysArray[3]['docgroupnew'] ) {
+		switch ($this->_statistic_show) {
+			case 'F': {
+				$visibility = $activitysArray[0]['docmannew'] + $activitysArray[1]['docmannew'] + $activitysArray[2]['docmannew'] + $activitysArray[3]['docmannew'];
+
+				break;
+			}
+			case 'U': {
+				$visibility = $activitysArray[0]['docmanupdate'] + $activitysArray[1]['docmanupdate'] + $activitysArray[2]['docmanupdate'] + $activitysArray[3]['docmanupdate'];
+
+				break;
+			}
+			case 'D': {
+				$visibility = $activitysArray[0]['docgroupnew'] + $activitysArray[1]['docgroupnew'] + $activitysArray[2]['docgroupnew'] + $activitysArray[3]['docgroupnew'];
+
+				break;
+			}
+			case 'FU': {
+				$visibility = $activitysArray[0]['docmannew'] + $activitysArray[1]['docmannew'] + $activitysArray[2]['docmannew'] + $activitysArray[3]['docmannew'] +
+						$activitysArray[0]['docmanupdate'] + $activitysArray[1]['docmanupdate'] + $activitysArray[2]['docmanupdate'] + $activitysArray[3]['docmanupdate'];
+
+				break;
+			}
+			case 'FD': {
+				$visibility = $activitysArray[0]['docmannew'] + $activitysArray[1]['docmannew'] + $activitysArray[2]['docmannew'] + $activitysArray[3]['docmannew'] +
+						$activitysArray[0]['docgroupnew'] + $activitysArray[1]['docgroupnew'] + $activitysArray[2]['docgroupnew'] + $activitysArray[3]['docgroupnew'];
+
+				break;
+			}
+			default: {
+				$visibility = $activitysArray[0]['docmannew'] + $activitysArray[1]['docmannew'] + $activitysArray[2]['docmannew'] + $activitysArray[3]['docmannew'] +
+						$activitysArray[0]['docmanupdate'] + $activitysArray[1]['docmanupdate'] + $activitysArray[2]['docmanupdate'] + $activitysArray[3]['docmanupdate'] +
+						$activitysArray[0]['docgroupnew'] + $activitysArray[1]['docgroupnew'] + $activitysArray[2]['docgroupnew'] + $activitysArray[3]['docgroupnew'];
+			}
+		}
+		if ($visibility) {
 			echo '<script type="text/javascript">//<![CDATA['."\n";
 			switch($this->_statistic_show) {
 				case 'F':

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

Summary of changes:
 .../Widget_ProjectDocumentsActivity.class.php      |   38 ++++++++++++++++++--
 1 file changed, 35 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list