mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Convert server side paths to use /u/
This commit is contained in:
@ -194,7 +194,7 @@ begin
|
||||
["categories", "/categories"],
|
||||
["home", "/"],
|
||||
["topic", "/t/oh-how-i-wish-i-could-shut-up-like-a-tunnel-for-so/69"]
|
||||
# ["user", "/users/admin1/activity"],
|
||||
# ["user", "/u/admin1/activity"],
|
||||
]
|
||||
|
||||
tests = tests.map{|k,url| ["#{k}_admin", "#{url}#{append}"]} + tests
|
||||
|
@ -98,8 +98,6 @@ EOM
|
||||
def import_users
|
||||
puts '', "creating users"
|
||||
|
||||
username = nil
|
||||
|
||||
total_count = mysql_query("SELECT count(*) count FROM #{TABLE_PREFIX}userdata WHERE last_login > '#{IMPORT_AFTER}';").first['count']
|
||||
|
||||
batches(BATCH_SIZE) do |offset|
|
||||
@ -404,7 +402,7 @@ EOM
|
||||
User.find_each do |u|
|
||||
ucf = u.custom_fields
|
||||
if ucf && ucf["import_id"] && ucf["import_username"]
|
||||
Permalink.create( url: "#{BASE}/user-id-#{ucf['import_id']}.html", external_url: "/users/#{u.username}" ) rescue nil
|
||||
Permalink.create( url: "#{BASE}/user-id-#{ucf['import_id']}.html", external_url: "/u/#{u.username}" ) rescue nil
|
||||
print '.'
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user