|
|
@ -4,7 +4,7 @@ from cement.core import handler, hook |
|
|
|
from ee.core.variables import EEVariables |
|
|
|
from ee.core.domainvalidate import validate_domain |
|
|
|
from ee.core.fileutils import EEFileUtils |
|
|
|
from ee.cli.plugins.site_functions import setup_domain, setup_database |
|
|
|
from ee.cli.plugins.site_functions import * |
|
|
|
import sys |
|
|
|
import os |
|
|
|
|
|
|
@ -149,7 +149,8 @@ class EESiteCreateController(CementBaseController): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=True, wp=False, w3tc=False, |
|
|
|
wpfc=False, wpsc=False, multisite=False, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
|
|
|
|
if ((self.app.pargs.wp or self.app.pargs.w3tc or self.app.pargs.wpfc or |
|
|
|
self.app.pargs.wpsc) and not (self.app.pargs.html or |
|
|
@ -160,25 +161,29 @@ class EESiteCreateController(CementBaseController): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=True, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=False, multisite=False, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.w3tc and not |
|
|
|
(self.app.pargs.wpfc or self.app.pargs.wpsc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=True, |
|
|
|
wpfc=False, wpsc=False, multisite=False, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpfc and not |
|
|
|
(self.app.pargs.wpsc or self.app.pargs.w3tc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=True, wpsc=False, multisite=False, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpsc and not |
|
|
|
(self.app.pargs.w3tc or self.app.pargs.wpfc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=True, multisite=False, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
|
|
|
|
if (self.app.pargs.wpsubdir and not (self.app.pargs.html or |
|
|
|
self.app.pargs.php or self.app.pargs.mysql or |
|
|
@ -188,25 +193,29 @@ class EESiteCreateController(CementBaseController): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=True, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=False, multisite=True, |
|
|
|
wpsubdir=True, webroot=ee_site_webroot) |
|
|
|
wpsubdir=True, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.w3tc and not |
|
|
|
(self.app.pargs.wpfc or self.app.pargs.wpsc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=True, |
|
|
|
wpfc=False, wpsc=False, multisite=True, |
|
|
|
wpsubdir=True, webroot=ee_site_webroot) |
|
|
|
wpsubdir=True, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpfc and not |
|
|
|
(self.app.pargs.wpsc or self.app.pargs.w3tc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=True, wpsc=False, multisite=True, |
|
|
|
wpsubdir=True, webroot=ee_site_webroot) |
|
|
|
wpsubdir=True, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpsc and not |
|
|
|
(self.app.pargs.w3tc or self.app.pargs.wpfc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=True, multisite=True, |
|
|
|
wpsubdir=True, webroot=ee_site_webroot) |
|
|
|
wpsubdir=True, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
|
|
|
|
if (self.app.pargs.wpsubdomain and not (self.app.pargs.html or |
|
|
|
self.app.pargs.php or self.app.pargs.mysql or |
|
|
@ -216,28 +225,35 @@ class EESiteCreateController(CementBaseController): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=True, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=False, multisite=True, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.w3tc and not |
|
|
|
(self.app.pargs.wpfc or self.app.pargs.wpsc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=True, |
|
|
|
wpfc=False, wpsc=False, multisite=True, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpfc and not |
|
|
|
(self.app.pargs.wpsc or self.app.pargs.w3tc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=True, wpsc=False, multisite=True, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
if (self.app.pargs.wpsc and not |
|
|
|
(self.app.pargs.w3tc or self.app.pargs.wpfc)): |
|
|
|
data = dict(site_name=ee_domain_name, |
|
|
|
static=False, basic=False, wp=True, w3tc=False, |
|
|
|
wpfc=False, wpsc=True, multisite=True, |
|
|
|
wpsubdir=False, webroot=ee_site_webroot) |
|
|
|
wpsubdir=False, webroot=ee_site_webroot, |
|
|
|
ee_db_name='', ee_db_user='', ee_db_pass='') |
|
|
|
|
|
|
|
setup_domain(self, data) |
|
|
|
setup_database(self, data) |
|
|
|
if 'ee_db_name' in data.keys(): |
|
|
|
data = setup_database(self, data) |
|
|
|
if data['wp']: |
|
|
|
setup_wordpress(self, data) |
|
|
|
|
|
|
|
|
|
|
|
class EESiteUpdateController(CementBaseController): |
|
|
|