mirror of
https://github.com/neocities/neocities.git
synced 2025-04-25 01:32:36 +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={})
|
def save(validate={})
|
||||||
DB.transaction do
|
DB.transaction do
|
||||||
is_new = new?
|
is_new = new?
|
||||||
install_custom_domain if !domain.nil? && !domain.empty?
|
|
||||||
result = super(validate)
|
result = super(validate)
|
||||||
install_new_files if is_new
|
install_new_files if is_new
|
||||||
result
|
result
|
||||||
end
|
end
|
||||||
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
|
def install_new_files
|
||||||
FileUtils.mkdir_p files_path
|
FileUtils.mkdir_p files_path
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue