mirror of
https://github.com/neocities/neocities.git
synced 2025-04-24 17:22:35 +02:00
Remove legacy custom domain code
This commit is contained in:
parent
b36a062eb4
commit
217333cdff
1 changed files with 0 additions and 7 deletions
|
@ -386,19 +386,12 @@ class Site < Sequel::Model
|
|||
def save(validate={})
|
||||
DB.transaction do
|
||||
is_new = new?
|
||||
install_custom_domain if !domain.nil? && !domain.empty?
|
||||
result = super(validate)
|
||||
install_new_files if is_new
|
||||
result
|
||||
end
|
||||
end
|
||||
|
||||
def install_custom_domain
|
||||
File.open(File.join(DIR_ROOT, 'domains', "#{username}.conf"), 'w') do |file|
|
||||
file.write render_template('domain.erb')
|
||||
end
|
||||
end
|
||||
|
||||
def install_new_files
|
||||
FileUtils.mkdir_p files_path
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue