fix(favicon): get favicon_path, so it works also with uploads object store

This commit is contained in:
Roger Meier 2019-06-11 14:07:24 +02:00
parent 577832598f
commit 38514630c0
2 changed files with 7 additions and 6 deletions

View file

@ -0,0 +1,5 @@
---
title: 'Fix favicon path with uploads of object store'
merge_request: 29482
author: Roger Meier
type: fixed

View file

@ -5,8 +5,8 @@ module Gitlab
class << self
def main
image_name =
if appearance_favicon.exists?
appearance_favicon.url
if appearance.favicon.exists?
appearance.favicon_path
elsif Gitlab::Utils.to_boolean(ENV['CANARY'])
'favicon-yellow.png'
elsif Rails.env.development?
@ -57,10 +57,6 @@ module Gitlab
def appearance
Gitlab::SafeRequestStore[:appearance] ||= (Appearance.current || Appearance.new)
end
def appearance_favicon
appearance.favicon
end
end
end
end