about summary refs log tree commit diff
path: root/app/controllers/admin/dashboard_controller.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2019-08-06 19:40:06 +0200
committerGitHub <noreply@github.com>2019-08-06 19:40:06 +0200
commitdd38c280a50a8feb70ad341c3561fe2f87c8cf3d (patch)
tree2249217b9b7eff444d60a9962321eb56ecf0ed48 /app/controllers/admin/dashboard_controller.rb
parent9072fe5ab6464cc9c7a871d388464c7afcf41cd0 (diff)
Fix admin dashboard missing latest features (#11505)
Fix redis-namespace deprecation warning about administrative commands
Diffstat (limited to 'app/controllers/admin/dashboard_controller.rb')
-rw-r--r--app/controllers/admin/dashboard_controller.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb
index 70afdedd7..ab56065e0 100644
--- a/app/controllers/admin/dashboard_controller.rb
+++ b/app/controllers/admin/dashboard_controller.rb
@@ -28,9 +28,12 @@ module Admin
       @pam_enabled           = ENV['PAM_ENABLED'] == 'true'
       @hidden_service        = ENV['ALLOW_ACCESS_TO_HIDDEN_SERVICE'] == 'true'
       @trending_hashtags     = TrendingTags.get(10, filtered: false)
+      @authorized_fetch      = authorized_fetch_mode?
+      @whitelist_enabled     = whitelist_mode?
       @profile_directory     = Setting.profile_directory
       @timeline_preview      = Setting.timeline_preview
       @spam_check_enabled    = Setting.spam_check_enabled
+      @trends_enabled        = Setting.trends
     end
 
     private
@@ -40,7 +43,13 @@ module Admin
     end
 
     def redis_info
-      @redis_info ||= Redis.current.info
+      @redis_info ||= begin
+        if Redis.current.is_a?(Redis::Namespace)
+          Redis.current.redis.info
+        else
+          Redis.current.info
+        end
+      end
     end
   end
 end