danbooru default config: remove unused config settings.
This commit is contained in:
@@ -18,7 +18,7 @@ class CloudflareService
|
|||||||
"X-Auth-Email" => email,
|
"X-Auth-Email" => email,
|
||||||
"X-Auth-Key" => key,
|
"X-Auth-Key" => key,
|
||||||
"Content-Type" => "application/json",
|
"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
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,5 @@
|
|||||||
require 'socket'
|
|
||||||
|
|
||||||
module Danbooru
|
module Danbooru
|
||||||
class Configuration
|
class Configuration
|
||||||
# The version of this Danbooru.
|
|
||||||
def version
|
|
||||||
"2.105.0"
|
|
||||||
end
|
|
||||||
|
|
||||||
# The name of this Danbooru.
|
# The name of this Danbooru.
|
||||||
def app_name
|
def app_name
|
||||||
if CurrentUser.safe_mode?
|
if CurrentUser.safe_mode?
|
||||||
@@ -20,10 +13,6 @@ 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
|
||||||
@@ -52,10 +41,6 @@ module Danbooru
|
|||||||
ForumTopic.where(title: "Upload Feedback Thread").first
|
ForumTopic.where(title: "Upload Feedback Thread").first
|
||||||
end
|
end
|
||||||
|
|
||||||
def upgrade_account_email
|
|
||||||
contact_email
|
|
||||||
end
|
|
||||||
|
|
||||||
def source_code_url
|
def source_code_url
|
||||||
"https://github.com/r888888888/danbooru"
|
"https://github.com/r888888888/danbooru"
|
||||||
end
|
end
|
||||||
@@ -64,24 +49,10 @@ module Danbooru
|
|||||||
"#{source_code_url}/commit/#{hash}"
|
"#{source_code_url}/commit/#{hash}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def releases_url
|
|
||||||
"#{source_code_url}/releases"
|
|
||||||
end
|
|
||||||
|
|
||||||
def issues_url
|
def issues_url
|
||||||
"#{source_code_url}/issues"
|
"#{source_code_url}/issues"
|
||||||
end
|
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.
|
# This is a salt used to make dictionary attacks on account passwords harder.
|
||||||
def password_salt
|
def password_salt
|
||||||
"choujin-steiner"
|
"choujin-steiner"
|
||||||
@@ -103,13 +74,6 @@ module Danbooru
|
|||||||
true
|
true
|
||||||
end
|
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
|
# Thumbnail size
|
||||||
def small_image_width
|
def small_image_width
|
||||||
150
|
150
|
||||||
@@ -144,11 +108,6 @@ module Danbooru
|
|||||||
100
|
100
|
||||||
end
|
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.
|
# Users cannot search for more than X regular tags at a time.
|
||||||
def base_tag_query_limit
|
def base_tag_query_limit
|
||||||
6
|
6
|
||||||
@@ -469,14 +428,6 @@ module Danbooru
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def tinami_login
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def tinami_password
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def nico_seiga_login
|
def nico_seiga_login
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
@@ -485,14 +436,6 @@ module Danbooru
|
|||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
|
|
||||||
def pixa_login
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def pixa_password
|
|
||||||
nil
|
|
||||||
end
|
|
||||||
|
|
||||||
def nijie_login
|
def nijie_login
|
||||||
nil
|
nil
|
||||||
end
|
end
|
||||||
@@ -564,7 +507,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.safe_app_name}/#{Danbooru.config.version}",
|
"User-Agent" => "#{Danbooru.config.app_name}/#{Rails.application.config.x.git_hash}",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -625,11 +568,6 @@ module Danbooru
|
|||||||
def addthis_key
|
def addthis_key
|
||||||
end
|
end
|
||||||
|
|
||||||
# enable s3-nginx proxy caching
|
|
||||||
def use_s3_proxy?(post)
|
|
||||||
false
|
|
||||||
end
|
|
||||||
|
|
||||||
# include essential tags in image urls (requires nginx/apache rewrites)
|
# include essential tags in image urls (requires nginx/apache rewrites)
|
||||||
def enable_seo_post_urls
|
def enable_seo_post_urls
|
||||||
false
|
false
|
||||||
@@ -709,9 +647,6 @@ module Danbooru
|
|||||||
false
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
def aws_sqs_saved_search_url
|
|
||||||
end
|
|
||||||
|
|
||||||
def aws_sqs_reltagcalc_url
|
def aws_sqs_reltagcalc_url
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -727,15 +662,6 @@ module Danbooru
|
|||||||
def aws_sqs_archives_url
|
def aws_sqs_archives_url
|
||||||
end
|
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.
|
# Use a recaptcha on the signup page to protect against spambots creating new accounts.
|
||||||
# https://developers.google.com/recaptcha/intro
|
# https://developers.google.com/recaptcha/intro
|
||||||
def enable_recaptcha?
|
def enable_recaptcha?
|
||||||
|
|||||||
Reference in New Issue
Block a user