mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 09:26:54 -06:00
fix custom emoji support when using subfolder
This commit is contained in:
parent
823e50b099
commit
747f4812e4
@ -43,7 +43,7 @@ class Emoji
|
||||
filename = "#{emoji['filename'] || name}.png"
|
||||
Emoji.new.tap do |e|
|
||||
e.name = name
|
||||
e.url = "/images/emoji/#{SiteSetting.emoji_set}/#{filename}"
|
||||
e.url = "#{Discourse.base_uri}/images/emoji/#{SiteSetting.emoji_set}/#{filename}"
|
||||
end
|
||||
end
|
||||
|
||||
@ -102,6 +102,7 @@ class Emoji
|
||||
Plugin::CustomEmoji.emojis.each do |name, url|
|
||||
result << Emoji.new.tap do |e|
|
||||
e.name = name
|
||||
url = (Discourse.base_uri + url) if url[/^\/[^\/]/]
|
||||
e.url = url
|
||||
end
|
||||
end
|
||||
|
@ -15,7 +15,6 @@ class Plugin::CustomEmoji
|
||||
|
||||
def self.register(name, url)
|
||||
@@cache_key = Digest::SHA1.hexdigest(cache_key + name)[0..10]
|
||||
url = Discourse.base_uri + url if url[/^\/[^\/]/]
|
||||
emojis[name] = url
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user