mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
BUGFIX: backup/restore rake tasks weren't working
This commit is contained in:
parent
7f6b2e5563
commit
438f97d8b0
6 changed files with 107 additions and 80 deletions
|
@ -80,9 +80,20 @@ module RailsMultisite
|
|||
|
||||
def self.current_hostname
|
||||
config = ActiveRecord::Base.connection_pool.spec.config
|
||||
config[:host_names].nil? ? config[:host] : config[:host_names].first
|
||||
config[:host_names].nil? ? current_host : config[:host_names].first
|
||||
end
|
||||
|
||||
def self.current_host
|
||||
ActiveRecord::Base.connection_pool.spec.config[:host]
|
||||
end
|
||||
|
||||
def self.current_username
|
||||
ActiveRecord::Base.connection_pool.spec.config[:username]
|
||||
end
|
||||
|
||||
def self.current_password
|
||||
ActiveRecord::Base.connection_pool.spec.config[:password]
|
||||
end
|
||||
|
||||
def self.clear_settings!
|
||||
@@db_spec_cache = nil
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue