[Fusionforge-commits] FusionForge branch master updated. 74622b2c47f1fa8e2ffd0f28076b9d49366d3540

Franck VILLAUME nerville at fusionforge.org
Sat Dec 28 01:12:04 CET 2013


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  74622b2c47f1fa8e2ffd0f28076b9d49366d3540 (commit)
      from  c272440dccaa406443c7c891ea4533301d9d489c (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 74622b2c47f1fa8e2ffd0f28076b9d49366d3540
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Sat Dec 28 01:11:32 2013 +0100

    pm: fix ganttpage with user Nobody

diff --git a/src/www/pm/ganttpage.php b/src/www/pm/ganttpage.php
index 5928f40..d256070 100644
--- a/src/www/pm/ganttpage.php
+++ b/src/www/pm/ganttpage.php
@@ -37,7 +37,8 @@ echo $HTML->getStylesheets();
 echo '</head><body>';
 
 /* define global vars */
-global $pg, $g;
+global $pg;
+$gid = $pg->Group->getID();
 
 $offset = getIntFromRequest('offset');
 $_assigned_to = getIntFromRequest('_assigned_to', 0);
@@ -76,7 +77,7 @@ foreach ($techs as $tech) {
 	$tech_id_arr[] = $tech->getID();
 	$tech_name_arr[] = $tech->getRealName();
 	$transformedTechsArr[] = array('id' => $tech->getID(), 'name' => $tech->getRealName());
-	$role = $tech->getRole($g);
+	$role = $tech->getRole($gid);
 	$transformedRolesArr[] = array('id' => $role->getID(), 'name' => $role->getName());
 }
 $transformedTasksArr = array();
@@ -96,11 +97,16 @@ foreach ($pt_arr as $task) {
 	$assigneesIdArr = $task->getAssignedTo();
 	foreach ($assigneesIdArr as $assigneeId) {
 		$assigneeOjbject = user_get_object($assigneeId);
-		$assigneeRole = $assigneeOjbject->getRole($g);
+		$assigneeRole = $assigneeOjbject->getRole($gid);
+		if ($assigneeRole) {
+			$roleId = $assigneeRole->getID();
+		} else {
+			$roleId = false;
+		}
 		$assignees[] = array(
 					'resourceId' => $assigneeOjbject->getID(),
 					'id' => $assigneeOjbject->getID(),
-					'roleId' => $assigneeRole->getID(),
+					'roleId' => $roleId,
 					'effort' => 0
 				);
 	}

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

Summary of changes:
 src/www/pm/ganttpage.php |   14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list