From fb5682e7cd587e7e6c871588240fc49b325b042f Mon Sep 17 00:00:00 2001
From: Artem Sidorenko <artem@posteo.de>
Date: Sat, 30 Apr 2016 16:35:10 +0200
Subject: [PATCH] Use the new admin settings for gravatar

---
 CHANGELOG                         | 1 +
 app/views/profiles/show.html.haml | 4 ++--
 config/gitlab.yml.example         | 1 -
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index cc6588c6cbd..4505b424987 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -18,6 +18,7 @@ v 8.8.0 (unreleased)
   - Added multiple colors for labels in dropdowns when dups happen.
   - Improve description for the Two-factor Authentication sign-in screen. (Connor Shea)
   - API support for the 'since' and 'until' operators on commit requests (Paco Guzman)
+  - Fix Gravatar hint in user profile when Gravatar is disabled. !3988 (Artem Sidorenko)
 
 v 8.7.3
   - Emails, Gitlab::Email::Message, Gitlab::Diff, and Premailer::Adapter::Nokogiri are now instrumented
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml
index f59d27f7ed0..eef50d887c7 100644
--- a/app/views/profiles/show.html.haml
+++ b/app/views/profiles/show.html.haml
@@ -8,11 +8,11 @@
       %p
         - if @user.avatar?
           You can change your avatar here
-          - if Gitlab.config.gravatar.enabled
+          - if gravatar_enabled?
             or remove the current avatar to revert to #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
         - else
           You can upload an avatar here
-          - if Gitlab.config.gravatar.enabled
+          - if gravatar_enabled?
             or change it at #{link_to Gitlab.config.gravatar.host, "http://" + Gitlab.config.gravatar.host}
     .col-lg-9
       .clearfix.avatar-image.append-bottom-default
diff --git a/config/gitlab.yml.example b/config/gitlab.yml.example
index 07ce4b6d715..e682bcb976d 100644
--- a/config/gitlab.yml.example
+++ b/config/gitlab.yml.example
@@ -152,7 +152,6 @@ production: &base
   ## Gravatar
   ## For Libravatar see: http://doc.gitlab.com/ce/customization/libravatar.html
   gravatar:
-    enabled: true                 # Use user avatar image from Gravatar.com (default: true)
     # gravatar urls: possible placeholders: %{hash} %{size} %{email}
     # plain_url: "http://..."     # default: http://www.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon
     # ssl_url:   "https://..."    # default: https://secure.gravatar.com/avatar/%{hash}?s=%{size}&d=identicon
-- 
GitLab