[evolvis-commits] r6553: Merged bugfixes from delegate-role-settings-to-plugins

Roland Mas lolando at debian.org
Tue Apr 20 17:20:00 CEST 2010


Author: Roland Mas <lolando at debian.org>
Date: 2010-04-20 17:19:59 +0200 (Tue, 20 Apr 2010)
New Revision: 6553

Modified:
   trunk/gforge_base/evolvisforge/gforge/common/include/Group.class.php
   trunk/gforge_base/evolvisforge/gforge/plugins/mediawiki/www/LocalSettings.php
Log:
Merged bugfixes from delegate-role-settings-to-plugins

Modified: trunk/gforge_base/evolvisforge/gforge/common/include/Group.class.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/common/include/Group.class.php	2010-04-20 15:19:56 UTC (rev 6552)
+++ trunk/gforge_base/evolvisforge/gforge/common/include/Group.class.php	2010-04-20 15:19:59 UTC (rev 6553)
@@ -2442,7 +2442,6 @@
 		$roles = $this->getRolesId () ;
 
 		foreach ($roles as $role_id) {
-			$r = new Role ($this, $role_id) ;
 			$result[] = new Role ($this, $role_id) ;
 		}
 

Modified: trunk/gforge_base/evolvisforge/gforge/plugins/mediawiki/www/LocalSettings.php
===================================================================
--- trunk/gforge_base/evolvisforge/gforge/plugins/mediawiki/www/LocalSettings.php	2010-04-20 15:19:56 UTC (rev 6552)
+++ trunk/gforge_base/evolvisforge/gforge/plugins/mediawiki/www/LocalSettings.php	2010-04-20 15:19:59 UTC (rev 6553)
@@ -127,12 +127,12 @@
 		$current_groups = $user->getGroups() ;
 
 		# Role-based access control
-		if ($r->isError()) {
+		if (!isset ($r) || !$r || $r->isError()) {
 			$rname = '' ;
 		} else {
 			$rname = "ForgeRole:".$r->getName () ;
 		}
-		$role_groups = preg_grep ("^ForgeRole:", $current_groups) ;
+		$role_groups = preg_grep ("/^ForgeRole:/", $current_groups) ;
 		foreach ($role_groups as $cg) {
 			if ($cg != $rname) {
                                 $user->removeGroup ($cg) ;




More information about the evolvis-commits mailing list