Merge branch 'fix/facivon-url-if-uploads-object-store-enabled' into 'master'
fix(favicon): get favicon_path, so it works also with uploads object store See merge request gitlab-org/gitlab-ce!29482
This commit is contained in:
		
						commit
						adeccba136
					
				| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					title: 'Fix favicon path with uploads of object store'
 | 
				
			||||||
 | 
					merge_request: 29482
 | 
				
			||||||
 | 
					author: Roger Meier
 | 
				
			||||||
 | 
					type: fixed
 | 
				
			||||||
| 
						 | 
					@ -5,8 +5,8 @@ module Gitlab
 | 
				
			||||||
    class << self
 | 
					    class << self
 | 
				
			||||||
      def main
 | 
					      def main
 | 
				
			||||||
        image_name =
 | 
					        image_name =
 | 
				
			||||||
          if appearance_favicon.exists?
 | 
					          if appearance.favicon.exists?
 | 
				
			||||||
            appearance_favicon.url
 | 
					            appearance.favicon_path
 | 
				
			||||||
          elsif Gitlab::Utils.to_boolean(ENV['CANARY'])
 | 
					          elsif Gitlab::Utils.to_boolean(ENV['CANARY'])
 | 
				
			||||||
            'favicon-yellow.png'
 | 
					            'favicon-yellow.png'
 | 
				
			||||||
          elsif Rails.env.development?
 | 
					          elsif Rails.env.development?
 | 
				
			||||||
| 
						 | 
					@ -57,10 +57,6 @@ module Gitlab
 | 
				
			||||||
      def appearance
 | 
					      def appearance
 | 
				
			||||||
        Gitlab::SafeRequestStore[:appearance] ||= (Appearance.current || Appearance.new)
 | 
					        Gitlab::SafeRequestStore[:appearance] ||= (Appearance.current || Appearance.new)
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					 | 
				
			||||||
      def appearance_favicon
 | 
					 | 
				
			||||||
        appearance.favicon
 | 
					 | 
				
			||||||
      end
 | 
					 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue