forked from e621ng/e621ng
fixes #3668
This commit is contained in:
parent
c4a4394ea0
commit
4b6019d6ad
@ -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])
|
||||
|
@ -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"]
|
||||
|
@ -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 << ")."
|
||||
|
@ -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 %>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user