Project

General

Profile

Patch #14592 ยป migrate_from_trac.rake.txt

Craig Rodrigues, 2013-08-01 09:07

 
1
Index: migrate_from_trac.rake
2
===================================================================
3
--- migrate_from_trac.rake	(revision 12072)
4
+++ migrate_from_trac.rake	(working copy)
5
@@ -249,8 +249,8 @@ namespace :redmine do
6
           if name_attr = TracSessionAttribute.find_by_sid_and_name(username, 'name')
7
             name = name_attr.value
8
           end
9
-          name =~ (/(.*)(\s+\w+)?/)
10
-          fn = $1.strip
11
+          name =~ (/(\w+)(\s+\w+)?/)
12
+          fn = ($1 || "-").strip
13
           ln = ($2 || '-').strip
14
 
15
           u = User.new :mail => mail.gsub(/[^-@a-z0-9\.]/i, '-'),
    (1-1/1)