fixes #3668
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
class TagCorrectionsController < ApplicationController
|
class TagCorrectionsController < ApplicationController
|
||||||
before_action :builder_only
|
before_action :builder_only, only: [:new, :create]
|
||||||
|
|
||||||
def new
|
def new
|
||||||
@correction = TagCorrection.new(params[:tag_id])
|
@correction = TagCorrection.new(params[:tag_id])
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ class TagCorrection
|
|||||||
end
|
end
|
||||||
|
|
||||||
def fill_hash!
|
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?
|
if res.success?
|
||||||
json = JSON.parse(res.body)
|
json = JSON.parse(res.body)
|
||||||
statistics_hash["category_cache"] = json["category_cache"]
|
statistics_hash["category_cache"] = json["category_cache"]
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ class PostPresenter < Presenter
|
|||||||
|
|
||||||
def safe_mode_message(template)
|
def safe_mode_message(template)
|
||||||
html = ["This image is unavailable on safe mode (#{Danbooru.config.app_name}). Go to "]
|
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 << " or disable safe mode to view ("
|
||||||
html << template.link_to("learn more", template.wiki_pages_path(title: "help:user_settings"))
|
html << template.link_to("learn more", template.wiki_pages_path(title: "help:user_settings"))
|
||||||
html << ")."
|
html << ")."
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<% if post_set.safe_posts.present? %>
|
<% 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 %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ module Danbooru
|
|||||||
"Find good anime art fast"
|
"Find good anime art fast"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def domain
|
||||||
|
"donmai.us"
|
||||||
|
end
|
||||||
|
|
||||||
# The canonical hostname of the site.
|
# The canonical hostname of the site.
|
||||||
def hostname
|
def hostname
|
||||||
Socket.gethostname
|
Socket.gethostname
|
||||||
|
|||||||
Reference in New Issue
Block a user