This commit is contained in:
Janio Sarmento
2022-01-23 15:14:24 -03:00
parent b4476d3aa7
commit 555269decf
11 changed files with 943 additions and 45 deletions

View File

@@ -39,6 +39,10 @@ class WOSiteCreateController(CementBaseController):
dict(help="create php 7.3 site", action='store_true')),
(['--php74'],
dict(help="create php 7.4 site", action='store_true')),
(['--php80'],
dict(help="create php 8.0 site", action='store_true')),
(['--php81'],
dict(help="create php 8.1 site", action='store_true')),
(['--mysql'],
dict(help="create mysql site", action='store_true')),
(['--wp'],
@@ -167,7 +171,7 @@ class WOSiteCreateController(CementBaseController):
data['port'] = port
data['basic'] = True
if pargs.php72 or pargs.php73 or pargs.php74:
if pargs.php72 or pargs.php73 or pargs.php74 or pargs.php80 or pargs.php81:
data = dict(
site_name=wo_domain, www_domain=wo_www_domain,
static=False, basic=False,
@@ -214,6 +218,8 @@ class WOSiteCreateController(CementBaseController):
data['php73'] = False
data['php74'] = False
data['php72'] = False
data['php80'] = False
data['php81'] = False
if data and pargs.php73:
data['php73'] = True
@@ -224,6 +230,12 @@ class WOSiteCreateController(CementBaseController):
elif data and pargs.php72:
data['php72'] = True
data['wo_php'] = 'php72'
elif data and pargs.php80:
data['php80'] = True
data['wo_php'] = 'php80'
elif data and pargs.php81:
data['php81'] = True
data['wo_php'] = 'php81'
else:
if self.app.config.has_section('php'):
config_php_ver = self.app.config.get(
@@ -237,6 +249,12 @@ class WOSiteCreateController(CementBaseController):
elif config_php_ver == '7.4':
data['php74'] = True
data['wo_php'] = 'php74'
elif config_php_ver == '8.0':
data['php80'] = True
data['wo_php'] = 'php80'
elif config_php_ver == '8.1':
data['php81'] = True
data['wo_php'] = 'php81'
else:
data['php73'] = True
data['wo_php'] = 'php73'
@@ -306,6 +324,10 @@ class WOSiteCreateController(CementBaseController):
php_version = "7.2"
elif data['php74']:
php_version = "7.4"
elif data['php80']:
php_version = "8.0"
elif data['php81']:
php_version = "8.1"
else:
php_version = "7.3"