[Fusionforge-commits] r8003 - trunk/gforge/plugins/scmcvs/common

Roland Mas lolando at libremir.placard.fr.eu.org
Thu Aug 27 15:43:06 CEST 2009


Author: lolando
Date: 2009-08-27 15:43:06 +0200 (Thu, 27 Aug 2009)
New Revision: 8003

Modified:
   trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
Log:
Fixes

Modified: trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php
===================================================================
--- trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-08-27 13:42:57 UTC (rev 8002)
+++ trunk/gforge/plugins/scmcvs/common/CVSPlugin.class.php	2009-08-27 13:43:06 UTC (rev 8003)
@@ -317,10 +317,9 @@
 				
 			foreach ( $user_list as $user ) {
 				// trying to get user id from user name
-				$user_res = db_query_params ('SELECT user_id FROM users WHERE user_name=$1',
-							     array ($user)) ;
-				if ( $user_row = db_fetch_array($user_res) ) {
-					$user_id = $user_row[0];
+				$u = &user_get_object_by_name ($last_user) ;
+				if ($u) {
+					$user_id = $u->getID();
 				} else {
 					continue;
 				}
@@ -330,8 +329,8 @@
 							     $day,
 							     $project->getID(),
 							     $user_id,
-							     $usr_commit{$user} ? $usr_commit{$user} : 0,
-							     $usr_add{$user} ? $usr_add{$user} : 0))) {
+							     $usr_commit[$user] ? $usr_commit[$user] : 0,
+							     $usr_add[$user] ? $usr_add[$user] : 0))) {
 					echo "Error while inserting into stats_cvs_user\n" ;
 					db_rollback () ;
 					return false ;




More information about the Fusionforge-commits mailing list