config: fix references to Danbooru.config.app_name.
Danbooru.config.app_name is either Safebooru or Danbooru. Fix some places where it should always be Danbooru.
This commit is contained in:
@@ -8,7 +8,7 @@ module UserUpgradesHelper
|
|||||||
<script
|
<script
|
||||||
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
|
src="https://checkout.stripe.com/checkout.js" class="stripe-button"
|
||||||
data-key="#{Danbooru.config.stripe_publishable_key}"
|
data-key="#{Danbooru.config.stripe_publishable_key}"
|
||||||
data-name="#{Danbooru.config.app_name}"
|
data-name="#{Danbooru.config.canonical_app_name}"
|
||||||
data-description="#{desc}"
|
data-description="#{desc}"
|
||||||
data-label="#{desc}"
|
data-label="#{desc}"
|
||||||
data-amount="#{cost}">
|
data-amount="#{cost}">
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class CloudflareService
|
|||||||
Danbooru.config.httparty_options.deep_merge(headers: {
|
Danbooru.config.httparty_options.deep_merge(headers: {
|
||||||
"Authorization" => "Bearer #{api_token}",
|
"Authorization" => "Bearer #{api_token}",
|
||||||
"Content-Type" => "application/json",
|
"Content-Type" => "application/json",
|
||||||
"User-Agent" => "#{Danbooru.config.app_name}/#{Rails.application.config.x.git_hash}"
|
"User-Agent" => "#{Danbooru.config.canonical_app_name}/#{Rails.application.config.x.git_hash}"
|
||||||
})
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -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", "https://danbooru.donmai.us" %> or disable safe mode to view (<%= link_to_wiki "learn more", "help:user_settings" %>).<br>
|
<%= post_set.safe_posts.size %> post(s) on this page were hidden by safe mode. Go to <%= link_to "Danbooru", "https://danbooru.donmai.us" %> or disable safe mode to view them (<%= link_to_wiki "learn more", "help:user_settings" %>).<br>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<% elsif post.levelblocked? -%>
|
<% elsif post.levelblocked? -%>
|
||||||
<p><%= link_to("You need a gold account to see this image", new_user_upgrade_path) %>.</p>
|
<p><%= link_to("You need a gold account to see this image", new_user_upgrade_path) %>.</p>
|
||||||
<% elsif post.safeblocked? -%>
|
<% elsif post.safeblocked? -%>
|
||||||
<p>This image is unavailable on safe mode (<%= Danbooru.config.app_name %>). Go to <%= link_to("Danbooru", "https://danbooru.donmai.us") %> or disable safe mode to view (<%= link_to_wiki "learn more", "help:user_settings" %>).</p>
|
<p>This image is unavailable on <%= Danbooru.config.app_name %>. Go to <%= link_to("Danbooru", "https://danbooru.donmai.us") %> or disable safe mode to view (<%= link_to_wiki "learn more", "help:user_settings" %>).</p>
|
||||||
<% elsif post.is_flash? -%>
|
<% elsif post.is_flash? -%>
|
||||||
<%= render("posts/partials/show/flash", post: post) -%>
|
<%= render("posts/partials/show/flash", post: post) -%>
|
||||||
<% elsif post.is_video? -%>
|
<% elsif post.is_video? -%>
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ module Danbooru
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def canonical_app_name
|
||||||
|
"Danbooru"
|
||||||
|
end
|
||||||
|
|
||||||
def description
|
def description
|
||||||
"Find good anime art fast"
|
"Find good anime art fast"
|
||||||
end
|
end
|
||||||
@@ -451,7 +455,7 @@ module Danbooru
|
|||||||
# services will fail if you don't set a valid User-Agent.
|
# services will fail if you don't set a valid User-Agent.
|
||||||
def http_headers
|
def http_headers
|
||||||
{
|
{
|
||||||
"User-Agent" => "#{Danbooru.config.app_name}/#{Rails.application.config.x.git_hash}",
|
"User-Agent" => "#{Danbooru.config.canonical_app_name}/#{Rails.application.config.x.git_hash}",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user