From eafde362280623bfa4d9fb1dc1c876d494291ae0 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Mon, 21 Jul 2014 14:18:32 -0400 Subject: [PATCH] FIX: If a site has no logo, don't show a broken image in the digest. --- app/helpers/user_notifications_helper.rb | 2 ++ app/views/user_notifications/digest.html.erb | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/app/helpers/user_notifications_helper.rb b/app/helpers/user_notifications_helper.rb index 5cddf3ff8..a6a7efac4 100644 --- a/app/helpers/user_notifications_helper.rb +++ b/app/helpers/user_notifications_helper.rb @@ -28,6 +28,8 @@ module UserNotificationsHelper def logo_url logo_url = SiteSetting.digest_logo_url logo_url = SiteSetting.logo_url if logo_url.blank? + + return nil if logo_url.blank? if logo_url !~ /http(s)?\:\/\// logo_url = "#{Discourse.base_url}#{logo_url}" end diff --git a/app/views/user_notifications/digest.html.erb b/app/views/user_notifications/digest.html.erb index b2b47eda2..ef21d2fb1 100644 --- a/app/views/user_notifications/digest.html.erb +++ b/app/views/user_notifications/digest.html.erb @@ -2,7 +2,11 @@ - + <%- if logo_url.blank? %> + <%= SiteSetting.title %> + <%- else %> + + <%- end %>