[Fusionforge-commits] r7031 - trunk/gforge/plugins/scmsvn/cronjobs
Roland Mas
lolando at libremir.placard.fr.eu.org
Fri Feb 20 18:46:24 CET 2009
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_-]', '',
+ strtolower (trim ($chars))) ;
// 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
More information about the Fusionforge-commits
mailing list