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
|
return letter_avatar_template(username) if !uploaded_avatar_id
|
||||||
id = uploaded_avatar_id
|
id = uploaded_avatar_id
|
||||||
username ||= ""
|
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
|
end
|
||||||
|
|
||||||
def self.letter_avatar_template(username)
|
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
|
end
|
||||||
|
|
||||||
def avatar_template
|
def avatar_template
|
||||||
|
|
Loading…
Reference in New Issue