This commit is contained in:
BoHung Chiu 2023-04-26 11:52:22 +08:00
parent f0df2fac26
commit 4ff7a6e998
1 changed files with 2 additions and 2 deletions

View File

@ -286,13 +286,13 @@ class Admin::SitePanelController < OrbitAdminController
db_name = site_construct.db_name db_name = site_construct.db_name
path = site_construct.path path = site_construct.path
site_construct_id = site_construct.id.to_s site_construct_id = site_construct.id.to_s
if params[:site_construct][:copy_id].blank? if site_construct.copy_id.blank?
Thread.new do Thread.new do
system("bundle exec rake create_site:create_site['#{git_template_url}','#{git_extension_url}','#{git_url}','#{ip}','#{server_port}','#{user}','#{password}','#{site_name}','#{domain_name}','#{port}','#{db_name}','#{path}','#{site_construct_id}']") system("bundle exec rake create_site:create_site['#{git_template_url}','#{git_extension_url}','#{git_url}','#{ip}','#{server_port}','#{user}','#{password}','#{site_name}','#{domain_name}','#{port}','#{db_name}','#{path}','#{site_construct_id}']")
end end
else else
Thread.new do Thread.new do
system("bundle exec rake create_site:copy_site['#{ip}','#{server_port}', #{user}','#{password}','#{site_name}','#{domain_name}','#{port}','#{db_name}','#{path}','#{site_construct_id}','#{params[:site_construct][:copy_id]}',#{site_construct.only_copy_installed_module}]") system("bundle exec rake create_site:copy_site['#{ip}','#{server_port}','#{user}','#{password}','#{site_name}','#{domain_name}','#{port}','#{db_name}','#{path}','#{site_construct_id}','#{site_construct.copy_id}',#{site_construct.only_copy_installed_module}]")
end end
end end
redirect_to "#{admin_site_panel_sites_list_path}?id=#{site_construct_id}" redirect_to "#{admin_site_panel_sites_list_path}?id=#{site_construct_id}"