diff --git a/app/controllers/tag_corrections_controller.rb b/app/controllers/tag_corrections_controller.rb index 7bda603c6..5a3635f33 100644 --- a/app/controllers/tag_corrections_controller.rb +++ b/app/controllers/tag_corrections_controller.rb @@ -1,5 +1,5 @@ class TagCorrectionsController < ApplicationController - before_action :builder_only + before_action :builder_only, only: [:new, :create] def new @correction = TagCorrection.new(params[:tag_id]) diff --git a/app/logical/tag_correction.rb b/app/logical/tag_correction.rb index 9094ea904..f3efd7c2c 100644 --- a/app/logical/tag_correction.rb +++ b/app/logical/tag_correction.rb @@ -19,7 +19,7 @@ class TagCorrection end def fill_hash! - res = HTTParty.get("http://#{hostname}/tags/#{tag_id}/correction.json", Danbooru.config.httparty_options) + res = HTTParty.get("https://#{hostname}.#{Danbooru.config.domain}/tags/#{tag_id}/correction.json", Danbooru.config.httparty_options) if res.success? json = JSON.parse(res.body) statistics_hash["category_cache"] = json["category_cache"] diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 865d12eef..bec9cc382 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -168,7 +168,7 @@ class PostPresenter < Presenter def safe_mode_message(template) html = ["This image is unavailable on safe mode (#{Danbooru.config.app_name}). Go to "] - html << template.link_to("Danbooru", "http://danbooru.donmai.us") # XXX don't hardcode. + html << template.link_to("Danbooru", "https://danbooru.donmai.us") # XXX don't hardcode. html << " or disable safe mode to view (" html << template.link_to("learn more", template.wiki_pages_path(title: "help:user_settings")) html << ")." diff --git a/app/views/posts/partials/index/_posts.html.erb b/app/views/posts/partials/index/_posts.html.erb index 3322db011..000f7c607 100644 --- a/app/views/posts/partials/index/_posts.html.erb +++ b/app/views/posts/partials/index/_posts.html.erb @@ -14,7 +14,7 @@ <% end %> <% if post_set.safe_posts.present? %> - <%= post_set.safe_posts.size %> post(s) on this page were hidden by safe mode (<%= Danbooru.config.app_name %>). Go to <%= link_to "Danbooru", "http://danbooru.donmai.us" %> or disable safe mode to view (<%= link_to "learn more", wiki_pages_path(title: "help:user_settings") %>).
+ <%= post_set.safe_posts.size %> post(s) on this page were hidden by safe mode (<%= Danbooru.config.app_name %>). Go to <%= link_to "Danbooru", "https://danbooru.donmai.us" %> or disable safe mode to view (<%= link_to "learn more", wiki_pages_path(title: "help:user_settings") %>).
<% end %> <% end %> diff --git a/config/danbooru_default_config.rb b/config/danbooru_default_config.rb index 329c8143b..34f805ba1 100644 --- a/config/danbooru_default_config.rb +++ b/config/danbooru_default_config.rb @@ -20,6 +20,10 @@ module Danbooru "Find good anime art fast" end + def domain + "donmai.us" + end + # The canonical hostname of the site. def hostname Socket.gethostname