[Fusionforge-commits] r9183 - branches/Branch_5_0/gforge/www/project/admin

Roland Mas lolando at libremir.placard.fr.eu.org
Sat Mar 20 22:27:26 CET 2010


Author: lolando
Date: 2010-03-20 22:27:26 +0100 (Sat, 20 Mar 2010)
New Revision: 9183

Modified:
   branches/Branch_5_0/gforge/www/project/admin/roleedit.php
Log:
Backport from trunk: minor refactoring, use always var $group

Modified: branches/Branch_5_0/gforge/www/project/admin/roleedit.php
===================================================================
--- branches/Branch_5_0/gforge/www/project/admin/roleedit.php	2010-03-20 21:27:16 UTC (rev 9182)
+++ branches/Branch_5_0/gforge/www/project/admin/roleedit.php	2010-03-20 21:27:26 UTC (rev 9183)
@@ -37,6 +37,8 @@
 $role_id = getStringFromRequest('role_id');
 $data = getStringFromRequest('data');
 
+$group = group_get_object($group_id);
+
 //
 //	The observer is a special role, which is actually
 //	just controlling the is_public/allow anon flags
@@ -44,7 +46,7 @@
 //	Get observer role instead of regular role
 //
 if ($role_id=='observer') {
-	$role = new RoleObserver(group_get_object($group_id));
+	$role = new RoleObserver($group);
 	if (!$role || !is_object($role)) {
 		exit_error('Error','Could Not Get RoleObserver');
 	} elseif ($role->isError()) {
@@ -59,7 +61,7 @@
 		}
 	}
 } else {
-	$role = new Role(group_get_object($group_id),$role_id);
+	$role = new Role($group,$role_id);
 	if (!$role || !is_object($role)) {
 		exit_error('Error',_('Could Not Get Role'));
 	} elseif ($role->isError()) {
@@ -95,8 +97,6 @@
 
 project_admin_header(array('title'=>_('Edit Role'),'group'=>$group_id));
 
-$group = group_get_object($group_id);
-
 //
 //	If observer role, show title
 //
@@ -272,7 +272,7 @@
 
 echo $HTML->listTableBottom();
 
-echo '<p><input type="submit" name="submit" value="'._('Submit').'"></p>
+echo '<p><input type="submit" name="submit" value="'._('Submit').'" /></p>
 </form>';
 
 project_admin_footer(array());




More information about the Fusionforge-commits mailing list