mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Convert server side paths to use /u/
This commit is contained in:
parent
45a257815a
commit
14410b71fb
38 changed files with 82 additions and 80 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue