FIX: avatar_template when using relative_url_root
This commit is contained in:
parent
3252bf1252
commit
b2fd69a675
|
@ -415,11 +415,11 @@ class User < ActiveRecord::Base
|
|||
return letter_avatar_template(username) if !uploaded_avatar_id
|
||||
id = uploaded_avatar_id
|
||||
username ||= ""
|
||||
"/user_avatar/#{RailsMultisite::ConnectionManagement.current_hostname}/#{username.downcase}/{size}/#{id}.png"
|
||||
"#{Discourse.base_uri}/user_avatar/#{RailsMultisite::ConnectionManagement.current_hostname}/#{username.downcase}/{size}/#{id}.png"
|
||||
end
|
||||
|
||||
def self.letter_avatar_template(username)
|
||||
"/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png"
|
||||
"#{Discourse.base_uri}/letter_avatar/#{username.downcase}/{size}/#{LetterAvatar.version}.png"
|
||||
end
|
||||
|
||||
def avatar_template
|
||||
|
|
Loading…
Reference in New Issue