[Fusionforge-commits] r7096 - trunk/gforge/www/project/admin

Julien HEYMAN jheyman at libremir.placard.fr.eu.org
Mon Mar 2 11:48:26 CET 2009


Author: jheyman
Date: 2009-03-02 11:48:26 +0100 (Mon, 02 Mar 2009)
New Revision: 7096

Modified:
   trunk/gforge/www/project/admin/project_admin_utils.php
Log:
Display user name instead of user id in group history


Modified: trunk/gforge/www/project/admin/project_admin_utils.php
===================================================================
--- trunk/gforge/www/project/admin/project_admin_utils.php	2009-03-02 10:46:48 UTC (rev 7095)
+++ trunk/gforge/www/project/admin/project_admin_utils.php	2009-03-02 10:48:26 UTC (rev 7096)
@@ -147,6 +147,7 @@
 		show the group_history rows that are relevant to 
 		this group_id
 	*/
+
 	$result=group_get_history($group_id);
 	$rows=db_numrows($result);
 	
@@ -162,14 +163,17 @@
 		$title_arr[]=_('By');
 		
 		echo $GLOBALS['HTML']->listTableTop ($title_arr);
-		
 		for ($i=0; $i < $rows; $i++) { 
 			$field=db_result($result, $i, 'field_name');
 			echo '
 			<tr '. $GLOBALS['HTML']->boxGetAltRowStyle($i) .'><td>'.$field.'</td><td>';
 			
-			if ($field=='removed user') {
-				echo user_getname(db_result($result, $i, 'old_value'));
+			if (is_numeric(db_result($result, $i, 'old_value'))) {
+				if (ereg("user|User", $field)) {
+					echo user_getname(db_result($result, $i, 'old_value'));
+				} else {
+					echo db_result($result, $i, 'old_value');
+				}
 			} else {
 				echo db_result($result, $i, 'old_value');
 			}			




More information about the Fusionforge-commits mailing list