summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Meier <r.meier@siemens.com>2019-06-11 14:07:24 +0200
committerRoger Meier <r.meier@siemens.com>2019-06-14 13:58:51 +0200
commit38514630c0fd52e2647b2be0928220c7c7567a69 (patch)
treefe786ac207e3855ea8f90ede15eb0f04006e68c4
parent577832598f1b35187efafc426068ef7ac36ae09f (diff)
downloadgitlab-ce-38514630c0fd52e2647b2be0928220c7c7567a69.tar.gz
fix(favicon): get favicon_path, so it works also with uploads object store
-rw-r--r--changelogs/unreleased/fix-facivon-url-if-uploads-object-store-enabled.yml5
-rw-r--r--lib/gitlab/favicon.rb8
2 files changed, 7 insertions, 6 deletions
diff --git a/changelogs/unreleased/fix-facivon-url-if-uploads-object-store-enabled.yml b/changelogs/unreleased/fix-facivon-url-if-uploads-object-store-enabled.yml
new file mode 100644
index 00000000000..4e6d9c087ef
--- /dev/null
+++ b/changelogs/unreleased/fix-facivon-url-if-uploads-object-store-enabled.yml
@@ -0,0 +1,5 @@
+---
+title: 'Fix favicon path with uploads of object store'
+merge_request: 29482
+author: Roger Meier
+type: fixed
diff --git a/lib/gitlab/favicon.rb b/lib/gitlab/favicon.rb
index 6e31064f737..519213e143c 100644
--- a/lib/gitlab/favicon.rb
+++ b/lib/gitlab/favicon.rb
@@ -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