[Fusionforge-commits] r10701 - trunk/src/common/include

Roland Mas lolando at libremir.placard.fr.eu.org
Sat Sep 25 20:47:23 CEST 2010


Author: lolando
Date: 2010-09-25 20:47:22 +0200 (Sat, 25 Sep 2010)
New Revision: 10701

Modified:
   trunk/src/common/include/Group.class.php
Log:
Unbreak project approval when not using PFO-RBAC

Modified: trunk/src/common/include/Group.class.php
===================================================================
--- trunk/src/common/include/Group.class.php	2010-09-25 17:42:18 UTC (rev 10700)
+++ trunk/src/common/include/Group.class.php	2010-09-25 18:47:22 UTC (rev 10701)
@@ -2113,6 +2113,7 @@
 			Activate member(s) of the project
 		*/
 		
+		if (USE_PFO_RBAC) {
 		$members = $this->getUsers (true) ;
 
 		foreach ($members as $member) {
@@ -2127,6 +2128,16 @@
 			}
 			
 		}
+		} else {
+			$res_member = db_query_params ('SELECT user_id,role_id FROM user_group WHERE group_id=$1',
+						       array ($this->getID())) ;
+			while ($row_member = db_fetch_array($res_member)) {
+				$u = user_get_object($row_member['user_id']) ;
+				if (!$this->addUser($u->getUnixName(),$row_member['role_id'])) {
+					return false ;
+				}
+			}
+		}
 		
 		return true ;
 	}




More information about the Fusionforge-commits mailing list