[Fusionforge-commits] r7603 - trunk/gforge/utils

Roland Mas lolando at libremir.placard.fr.eu.org
Tue May 5 13:31:07 CEST 2009


Author: lolando
Date: 2009-05-05 13:31:06 +0200 (Tue, 05 May 2009)
New Revision: 7603

Modified:
   trunk/gforge/utils/inject-groups.php
   trunk/gforge/utils/inject-users.php
Log:
Remove leading/trailing whitespace from input data

Modified: trunk/gforge/utils/inject-groups.php
===================================================================
--- trunk/gforge/utils/inject-groups.php	2009-05-05 11:30:58 UTC (rev 7602)
+++ trunk/gforge/utils/inject-groups.php	2009-05-05 11:31:06 UTC (rev 7603)
@@ -47,7 +47,7 @@
 
 $f = fopen ('groups.txt', 'r') ;
 while (! feof ($f)) {
-        $l = fgets ($f, 1024);
+        $l = trim (fgets ($f, 1024)) ;
 	if ($l == "") { continue ; } ;
 	$array = explode (':', $l) ;
 	$unixname = $array[0] ;

Modified: trunk/gforge/utils/inject-users.php
===================================================================
--- trunk/gforge/utils/inject-users.php	2009-05-05 11:30:58 UTC (rev 7602)
+++ trunk/gforge/utils/inject-users.php	2009-05-05 11:31:06 UTC (rev 7603)
@@ -35,7 +35,7 @@
 
 $f = fopen ('users.txt', 'r') ;
 while (! feof ($f)) {
-        $l = fgets ($f, 1024);
+        $l = trim (fgets ($f, 1024)) ;
 	if ($l == "") { continue ; } ;
 	$array = explode (':', $l, 5) ;
 	$login = $array[0] ;




More information about the Fusionforge-commits mailing list