[Fusionforge-commits] r7031 - trunk/gforge/plugins/scmsvn/cronjobs

Gonéri Le Bouder goneri.lebouder at atosorigin.com
Sat Feb 21 19:33:59 CET 2009


On Fri, Feb 20, 2009 at 06:46:24PM +0100, Roland Mas wrote:
> Author: lolando
> Date: 2009-02-20 18:46:24 +0100 (Fri, 20 Feb 2009)
> New Revision: 7031
> 
> Modified:
>    trunk/gforge/plugins/scmsvn/cronjobs/svn-stats.php
> Log:
> Bugfix: be more aggressive in ignoring invalid authors when aggregating stats on SVN commits (they might come from a previous SVN repository and contain strange characters).
> 
> Modified: trunk/gforge/plugins/scmsvn/cronjobs/svn-stats.php
> ===================================================================
> --- trunk/gforge/plugins/scmsvn/cronjobs/svn-stats.php	2009-02-20 14:32:19 UTC (rev 7030)
> +++ trunk/gforge/plugins/scmsvn/cronjobs/svn-stats.php	2009-02-20 17:46:24 UTC (rev 7031)
> @@ -75,13 +75,14 @@
>  			$end_time, $time_ok, $date_key, $user_list;
>  	switch ($last_tag) {
>  		case "AUTHOR":
> -			$last_user = strtolower(trim($chars));
> +			$last_user = ereg_replace ('[^a-z0-9_-]', '',
                                    ^^^^^^^^^^^^^^
Hi Roland, PHP6 is supposed to drop the ereg* functions from the core and
keep only the preg_* ones.
http://www.php.net/~derick/meeting-notes.html#move-ereg-to-pecl

Cheers,

      Gonéri




>  			// We can save time by looking up users and caching them
>  			if (!array_key_exists($last_user, $user_list)) {
>  				// trying to get user id from user name
>  				$user_res = db_query("SELECT user_id FROM users WHERE " .
> -									"user_name='$last_user'");
> -	            if ($user_row = db_fetch_array($user_res)) {
> +						     "user_name='$last_user'");
> +				if ($user_row = db_fetch_array($user_res)) {
>  					$user_list[$last_user] = $user_row[0];
>  				} else {
>  					// We don't know about them, so give them the 
> 
> 
> _______________________________________________
> Fusionforge-commits mailing list
> Fusionforge-commits at lists.fusionforge.org
> http://lists.fusionforge.org/cgi-bin/mailman/listinfo/fusionforge-commits
> 



More information about the Fusionforge-commits mailing list