about summary refs log tree commit diff
path: root/app/controllers/admin
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2019-08-07 20:04:22 +0200
committerGitHub <noreply@github.com>2019-08-07 20:04:22 +0200
commit86cfa2ea6cb94c9597b9fcda034c8b4d959c5e3e (patch)
tree2e1b3be0201e53c96f05993f1295b0e97bb14166 /app/controllers/admin
parent8400ddca7155005ab79485ed6054c04ea3ca5667 (diff)
parente8ad0a800616a1f95fd71ab8457869e716212ca0 (diff)
Merge pull request #1193 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers/admin')
-rw-r--r--app/controllers/admin/dashboard_controller.rb11
-rw-r--r--app/controllers/admin/tags_controller.rb2
2 files changed, 11 insertions, 2 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
diff --git a/app/controllers/admin/tags_controller.rb b/app/controllers/admin/tags_controller.rb
index 0e9dda302..ed271aedc 100644
--- a/app/controllers/admin/tags_controller.rb
+++ b/app/controllers/admin/tags_controller.rb
@@ -17,7 +17,7 @@ module Admin
       authorize @tag, :update?
 
       if @tag.update(tag_params.merge(reviewed_at: Time.now.utc))
-        redirect_to admin_tag_path(@tag.id)
+        redirect_to admin_tag_path(@tag.id), notice: I18n.t('admin.tags.updated_msg')
       else
         render :show
       end