This commit is contained in:
Albert Yi 2018-04-26 10:24:20 -07:00
parent c4a4394ea0
commit 4b6019d6ad
5 changed files with 8 additions and 4 deletions

View File

@ -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])

View File

@ -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"]

View File

@ -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 << ")."

View File

@ -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") %>).<br>
<%= 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") %>).<br>
<% end %>
</div>
<% end %>

View File

@ -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