Skip to content

Commit

Permalink
Merge pull request #9 from sclaeys/patch-1
Browse files Browse the repository at this point in the history
Update autoinstall.php
  • Loading branch information
radwebhosting authored Jan 2, 2024
2 parents 26e4948 + c55de54 commit 0c58b08
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions whmcs/modules/servers/virtualizor_cloud/autoinstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ function virtualizor_cloud_installpredefined()
'ubuntu-20.04-x86_64|Ubuntu 20.04 (64 bit)',
'ubuntu-22.04-x86_64|Ubuntu 22.04 (64 bit)',
'cyberpanel-centos7-x86_64|CyberPanel (64 bit) (10GB+ Disk)',
'azuracast-20.04-lts-x86_64|AzuraCast on Focal (64 bit) (10GB+ Disk)',
'windows-2008r2|Windows Server 2008 R2 EVAL (15GB+ Disk)',
'windows-2012r2|Windows Server 2012 R2 EVAL (15GB+ Disk)',
'windows-2016|Windows Server 2016 EVAL (20GB+ Disk)',
'windows-2019|Windows Server 2019 EVAL (20GB+ Disk)',
'windows-2022|Windows Server 2022 EVAL (20GB+ Disk)',
'azuracast-20.04-lts-x86_64|AzuraCast on Focal (64 bit) (10GB+ Disk)',
'windows-2008r2|Windows Server 2008 R2 EVAL (15GB+ Disk)',
'windows-2012r2|Windows Server 2012 R2 EVAL (15GB+ Disk)',
'windows-2016|Windows Server 2016 EVAL (20GB+ Disk)',
'windows-2019|Windows Server 2019 EVAL (20GB+ Disk)',
'windows-2022|Windows Server 2022 EVAL (20GB+ Disk)',
];
$currenciesarray = Capsule::table('tblcurrencies')->pluck('code', 'id');
if (!is_array($currenciesarray)) {
Expand Down Expand Up @@ -147,7 +147,21 @@ function virtualizor_cloud_installpredefined()
"required" => 0,
"showorder" => 1,
"showinvoice" => 1,
"sortorder" => 0
"sortorder" => 2
]);
Capsule::table('tblcustomfields')->insert([
"type" => "product",
"relid" => $newProduct->id,
"fieldname" => 'OS|Operating System',
"fieldtype" => 'dropdown',
"description" => 'Choose Operating System',
"fieldoptions" => 'almalinux-8.4-x86_64|AlmaLinux 8 (64 bit),almalinux-9.2-x86_64|AlmaLinux 9 (64 bit),oracle-8.6-x86_64|Oracle Linux 8 (64 bit),oracle-9.2-x86_64|Oracle Linux 8 (64 bit),rocky-8.4-x86_64|Rocky Linux 8 (64 bit),rocky-9.1-x86_64|Rocky Linux 9 (64 bit),centos-7.8-x86_64|CentOS 7 (64 bit),centos-8.2-x86_64|CentOS 8 (64 bit),debian-9.4-x86_64|Debian 9 (64 bit),debian-10-x86_64|Debian 10 (64 bit),debian-11-x86_64|Debian 11 (64 bit),debian-12-x86_64|Debian 11 (64 bit),fedora-34-x86_64|Fedora 34 (64 bit),scientific-7.4-x86_64|Scientific Linux 7.4 (64 bit),suse-13.1-x86_64|openSUSE 13.1 (64 bit),suse-15.1-x86_64|openSUSE 15.1 (64 bit),ubuntu-18.04-x86_64|Ubuntu 18.04 (64 bit),ubuntu-20.04-x86_64|Ubuntu 20.04 (64 bit),ubuntu-22.04-x86_64|Ubuntu 22.04 (64 bit),cyberpanel-centos7-x86_64|CyberPanel (64 bit) (10GB+ Disk),azuracast-20.04-lts-x86_64|AzuraCast on Focal (64 bit) (10GB+ Disk),windows-2008r2|Windows Server 2008 R2 EVAL (15GB+ Disk),windows-2012r2|Windows Server 2012 R2 EVAL (15GB+ Disk),windows-2016|Windows Server 2016 EVAL (20GB+ Disk),windows-2019|Windows Server 2019 EVAL (20GB+ Disk),windows-2022|Windows Server 2022 EVAL (20GB+ Disk)',
"regexpr" => '',
"adminonly" => '',
"required" => 0,
"showorder" => 1,
"showinvoice" => 1,
"sortorder" => 1
]);
\WHMCS\Config\Setting::setValue('virtualizor_cloud_installed', '1');
return '';
Expand Down

0 comments on commit 0c58b08

Please sign in to comment.