danbooru default config: remove unused config settings.
This commit is contained in:
@@ -18,7 +18,7 @@ class CloudflareService
|
||||
"X-Auth-Email" => email,
|
||||
"X-Auth-Key" => key,
|
||||
"Content-Type" => "application/json",
|
||||
"User-Agent" => "#{Danbooru.config.app_name}/#{Danbooru.config.version}"
|
||||
"User-Agent" => "#{Danbooru.config.app_name}/#{Rails.application.config.x.git_hash}"
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
require 'socket'
|
||||
|
||||
module Danbooru
|
||||
class Configuration
|
||||
# The version of this Danbooru.
|
||||
def version
|
||||
"2.105.0"
|
||||
end
|
||||
|
||||
# The name of this Danbooru.
|
||||
def app_name
|
||||
if CurrentUser.safe_mode?
|
||||
@@ -20,10 +13,6 @@ module Danbooru
|
||||
"Find good anime art fast"
|
||||
end
|
||||
|
||||
def domain
|
||||
"donmai.us"
|
||||
end
|
||||
|
||||
# The canonical hostname of the site.
|
||||
def hostname
|
||||
Socket.gethostname
|
||||
@@ -52,10 +41,6 @@ module Danbooru
|
||||
ForumTopic.where(title: "Upload Feedback Thread").first
|
||||
end
|
||||
|
||||
def upgrade_account_email
|
||||
contact_email
|
||||
end
|
||||
|
||||
def source_code_url
|
||||
"https://github.com/r888888888/danbooru"
|
||||
end
|
||||
@@ -64,24 +49,10 @@ module Danbooru
|
||||
"#{source_code_url}/commit/#{hash}"
|
||||
end
|
||||
|
||||
def releases_url
|
||||
"#{source_code_url}/releases"
|
||||
end
|
||||
|
||||
def issues_url
|
||||
"#{source_code_url}/issues"
|
||||
end
|
||||
|
||||
# Stripped of any special characters.
|
||||
def safe_app_name
|
||||
app_name.gsub(/[^a-zA-Z0-9_-]/, "_")
|
||||
end
|
||||
|
||||
# The default name to use for anyone who isn't logged in.
|
||||
def default_guest_name
|
||||
"Anonymous"
|
||||
end
|
||||
|
||||
# This is a salt used to make dictionary attacks on account passwords harder.
|
||||
def password_salt
|
||||
"choujin-steiner"
|
||||
@@ -103,13 +74,6 @@ module Danbooru
|
||||
true
|
||||
end
|
||||
|
||||
# What method to use to store images.
|
||||
# local_flat: Store every image in one directory.
|
||||
# local_hierarchy: Store every image in a hierarchical directory, based on the post's MD5 hash. On some file systems this may be faster.
|
||||
def image_store
|
||||
:local_flat
|
||||
end
|
||||
|
||||
# Thumbnail size
|
||||
def small_image_width
|
||||
150
|
||||
@@ -144,11 +108,6 @@ module Danbooru
|
||||
100
|
||||
end
|
||||
|
||||
# Determines who can see ads.
|
||||
def can_see_ads?(user)
|
||||
!user.is_gold?
|
||||
end
|
||||
|
||||
# Users cannot search for more than X regular tags at a time.
|
||||
def base_tag_query_limit
|
||||
6
|
||||
@@ -469,14 +428,6 @@ module Danbooru
|
||||
nil
|
||||
end
|
||||
|
||||
def tinami_login
|
||||
nil
|
||||
end
|
||||
|
||||
def tinami_password
|
||||
nil
|
||||
end
|
||||
|
||||
def nico_seiga_login
|
||||
nil
|
||||
end
|
||||
@@ -485,14 +436,6 @@ module Danbooru
|
||||
nil
|
||||
end
|
||||
|
||||
def pixa_login
|
||||
nil
|
||||
end
|
||||
|
||||
def pixa_password
|
||||
nil
|
||||
end
|
||||
|
||||
def nijie_login
|
||||
nil
|
||||
end
|
||||
@@ -564,7 +507,7 @@ module Danbooru
|
||||
# services will fail if you don't set a valid User-Agent.
|
||||
def http_headers
|
||||
{
|
||||
"User-Agent" => "#{Danbooru.config.safe_app_name}/#{Danbooru.config.version}",
|
||||
"User-Agent" => "#{Danbooru.config.app_name}/#{Rails.application.config.x.git_hash}",
|
||||
}
|
||||
end
|
||||
|
||||
@@ -625,11 +568,6 @@ module Danbooru
|
||||
def addthis_key
|
||||
end
|
||||
|
||||
# enable s3-nginx proxy caching
|
||||
def use_s3_proxy?(post)
|
||||
false
|
||||
end
|
||||
|
||||
# include essential tags in image urls (requires nginx/apache rewrites)
|
||||
def enable_seo_post_urls
|
||||
false
|
||||
@@ -709,9 +647,6 @@ module Danbooru
|
||||
false
|
||||
end
|
||||
|
||||
def aws_sqs_saved_search_url
|
||||
end
|
||||
|
||||
def aws_sqs_reltagcalc_url
|
||||
end
|
||||
|
||||
@@ -727,15 +662,6 @@ module Danbooru
|
||||
def aws_sqs_archives_url
|
||||
end
|
||||
|
||||
def ccs_server
|
||||
end
|
||||
|
||||
def ccs_key
|
||||
end
|
||||
|
||||
def aws_sqs_cropper_url
|
||||
end
|
||||
|
||||
# Use a recaptcha on the signup page to protect against spambots creating new accounts.
|
||||
# https://developers.google.com/recaptcha/intro
|
||||
def enable_recaptcha?
|
||||
|
||||
Reference in New Issue
Block a user