From 8849727bd9ea1c4360fd5bc980a38449a2dd6b0c Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 13 Oct 2013 08:26:18 +0000 Subject: [PATCH] Merged r12164 from trunk (#14592). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12212 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- lib/tasks/migrate_from_trac.rake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake index db36dfe05..655ada33e 100644 --- a/lib/tasks/migrate_from_trac.rake +++ b/lib/tasks/migrate_from_trac.rake @@ -245,8 +245,8 @@ namespace :redmine do if name_attr = TracSessionAttribute.find_by_sid_and_name(username, 'name') name = name_attr.value end - name =~ (/(.*)(\s+\w+)?/) - fn = $1.strip + name =~ (/(\w+)(\s+\w+)?/) + fn = ($1 || "-").strip ln = ($2 || '-').strip u = User.new :mail => mail.gsub(/[^-@a-z0-9\.]/i, '-'), -- 2.39.5