about summary refs log tree commit diff
path: root/app/controllers/admin/dashboard_controller.rb
diff options
context:
space:
mode:
authorThibaut Girka <thib@sitedethib.com>2019-08-07 13:56:48 +0200
committerThibaut Girka <thib@sitedethib.com>2019-08-07 13:56:48 +0200
commit04534604c654060eca24628247fdb51b7ff5372a (patch)
treef8ae222e84056fb2674d23187e66517da1fc2af9 /app/controllers/admin/dashboard_controller.rb
parent8400ddca7155005ab79485ed6054c04ea3ca5667 (diff)
parentac33f1aedd9a6c72c6c176afb1f5d62a1ce5d44d (diff)
Merge branch 'master' into glitch-soc/merge-upstream
Conflicts:
- app/models/user.rb
- app/serializers/initial_state_serializer.rb
- app/views/admin/dashboard/index.html.haml
- config/locales/simple_form.en.yml
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 4f4341918..92bf7fbb9 100644
--- a/app/controllers/admin/dashboard_controller.rb
+++ b/app/controllers/admin/dashboard_controller.rb
@@ -28,10 +28,13 @@ 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
       @keybase_integration   = Setting.enable_keybase
       @spam_check_enabled    = Setting.spam_check_enabled
+      @trends_enabled        = Setting.trends
     end
 
     private
@@ -41,7 +44,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