From e16ae00efcaa9f87791f70dd92c9534ef6db8d9a Mon Sep 17 00:00:00 2001 From: evazion Date: Sun, 28 Jan 2018 20:46:33 -0600 Subject: [PATCH] Fix hardcoded http:// urls. --- app/presenters/post_presenter.rb | 2 +- app/views/layouts/default.html.erb | 10 +++++----- app/views/legacy/create_post.xml.erb | 2 +- app/views/static/mrtg.html.erb | 16 ++++++++-------- app/views/users/edit.html.erb | 2 +- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 9fec67a23..c77fdcd47 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") + html << template.link_to("Danbooru", "http://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/layouts/default.html.erb b/app/views/layouts/default.html.erb index d0f854bbe..09d58b2a8 100644 --- a/app/views/layouts/default.html.erb +++ b/app/views/layouts/default.html.erb @@ -48,9 +48,9 @@ "@context" : "http://schema.org", "@type" : "Organization", "name" : "<%= Danbooru.config.app_name %>", - "url" : "http://<%= Danbooru.config.hostname%>", + "url" : "<%= root_url %>", "sameAs" : [ - "http://twitter.com/<%= Danbooru.config.twitter_site[1..-1] %>" + "https://twitter.com/<%= Danbooru.config.twitter_site[1..-1] %>" ] } @@ -59,10 +59,10 @@ { "@context": "http://schema.org", "@type": "WebSite", - "url" : "http://<%= Danbooru.config.hostname %>", + "url" : "<%= root_url %>", "potentialAction": [{ "@type": "SearchAction", - "target": "http://<%= Danbooru.config.hostname %>/posts?tags={search_term_string}", + "target": "<%= posts_url %>?tags={search_term_string}", "query-input": "required name=search_term_string" }] } @@ -73,7 +73,7 @@ "@type": "WebSite", "name": "<%= Danbooru.config.app_name %>", "alternateName": "<%= Danbooru.config.description %>", - "url" : "http://<%= Danbooru.config.hostname %>" + "url" : "<%= root_url %>" } diff --git a/app/views/legacy/create_post.xml.erb b/app/views/legacy/create_post.xml.erb index d8eea6d96..1cd4dbe4c 100644 --- a/app/views/legacy/create_post.xml.erb +++ b/app/views/legacy/create_post.xml.erb @@ -1,5 +1,5 @@ 0 - http://<%= Danbooru.config.hostname %>/uploads/<%= @upload.id %> + <%= upload_url(@upload) %> diff --git a/app/views/static/mrtg.html.erb b/app/views/static/mrtg.html.erb index e4f11a515..2245ef9bb 100644 --- a/app/views/static/mrtg.html.erb +++ b/app/views/static/mrtg.html.erb @@ -2,37 +2,37 @@

5 min

- +

30 min

- +

2 hour

- +

1 day

- +

hijiribe

5 min

- +

30 min

- +

2 hour

- +

1 day

- + <% content_for(:page_title) do %> MRTG - <%= Danbooru.config.app_name %> diff --git a/app/views/users/edit.html.erb b/app/views/users/edit.html.erb index 8a850a2b7..01ea347bf 100644 --- a/app/views/users/edit.html.erb +++ b/app/views/users/edit.html.erb @@ -93,7 +93,7 @@ <%= f.input :disable_responsive_mode, :as => :select, :collection => [["No", "false"], ["Yes", "true"]], :include_blank => false, :hint => "Disable alternative layout for mobile and tablet" %> - <%= f.input :custom_style, :label => "Custom CSS style".html_safe, :hint => "Style to apply to the whole site.", :input_html => {:size => "40x5"} %> + <%= f.input :custom_style, :label => "Custom CSS style".html_safe, :hint => "Style to apply to the whole site.", :input_html => {:size => "40x5"} %> <%= f.button :submit, "Submit" %>