diff options
author | Thibaut Girka <thib@sitedethib.com> | 2019-08-07 13:56:48 +0200 |
---|---|---|
committer | Thibaut Girka <thib@sitedethib.com> | 2019-08-07 13:56:48 +0200 |
commit | 04534604c654060eca24628247fdb51b7ff5372a (patch) | |
tree | f8ae222e84056fb2674d23187e66517da1fc2af9 /app/controllers | |
parent | 8400ddca7155005ab79485ed6054c04ea3ca5667 (diff) | |
parent | ac33f1aedd9a6c72c6c176afb1f5d62a1ce5d44d (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')
-rw-r--r-- | app/controllers/admin/dashboard_controller.rb | 11 | ||||
-rw-r--r-- | app/controllers/admin/tags_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/directories_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/settings/preferences_controller.rb | 1 | ||||
-rw-r--r-- | app/controllers/tags_controller.rb | 2 |
5 files changed, 14 insertions, 4 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 diff --git a/app/controllers/directories_controller.rb b/app/controllers/directories_controller.rb index 0702ebc04..f2d1f5661 100644 --- a/app/controllers/directories_controller.rb +++ b/app/controllers/directories_controller.rb @@ -30,7 +30,7 @@ class DirectoriesController < ApplicationController end def set_tag - @tag = Tag.discoverable.find_by!(name: params[:id].downcase) + @tag = Tag.discoverable.find_normalized!(params[:id]) end def set_tags diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index ea4491d1e..418ea5d7a 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -58,6 +58,7 @@ class Settings::PreferencesController < Settings::BaseController :setting_default_content_type, :setting_use_blurhash, :setting_use_pending_items, + :setting_trends, notification_emails: %i(follow follow_request reblog favourite mention digest report pending_account trending_tag), interactions: %i(must_be_follower must_be_following must_be_following_dm) ) diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index ec494bb2d..d6bb28eb5 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -48,7 +48,7 @@ class TagsController < ApplicationController private def set_tag - @tag = Tag.find_normalized!(params[:id]) + @tag = Tag.usable.find_normalized!(params[:id]) end def set_body_classes |