Improve identation
This commit is contained in:
@@ -1004,21 +1004,23 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
data['currcachetype'] = oldcachetype
|
data['currcachetype'] = oldcachetype
|
||||||
|
|
||||||
if stype == 'php':
|
if stype == 'php':
|
||||||
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
data = dict(
|
||||||
static=False, basic=True, wp=False, wpfc=False,
|
site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
wpsc=False, wpredis=False, wprocket=False, wpce=False,
|
static=False, basic=True, wp=False, wpfc=False,
|
||||||
multisite=False, wpsubdir=False, webroot=wo_site_webroot,
|
wpsc=False, wpredis=False, wprocket=False, wpce=False,
|
||||||
currsitetype=oldsitetype, currcachetype=oldcachetype)
|
multisite=False, wpsubdir=False, webroot=wo_site_webroot,
|
||||||
|
currsitetype=oldsitetype, currcachetype=oldcachetype)
|
||||||
|
|
||||||
elif stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
elif stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
||||||
|
|
||||||
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
data = dict(
|
||||||
static=False, basic=True, wp=False, wpfc=False,
|
site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
wpsc=False, wpredis=False, wprocket=False, wpce=False,
|
static=False, basic=True, wp=False, wpfc=False,
|
||||||
multisite=False, wpsubdir=False, webroot=wo_site_webroot,
|
wpsc=False, wpredis=False, wprocket=False, wpce=False,
|
||||||
wo_db_name='', wo_db_user='', wo_db_pass='',
|
multisite=False, wpsubdir=False, webroot=wo_site_webroot,
|
||||||
wo_db_host='',
|
wo_db_name='', wo_db_user='', wo_db_pass='',
|
||||||
currsitetype=oldsitetype, currcachetype=oldcachetype)
|
wo_db_host='',
|
||||||
|
currsitetype=oldsitetype, currcachetype=oldcachetype)
|
||||||
|
|
||||||
if stype in ['wp', 'wpsubdir', 'wpsubdomain']:
|
if stype in ['wp', 'wpsubdir', 'wpsubdomain']:
|
||||||
data['wp'] = True
|
data['wp'] = True
|
||||||
@@ -1031,10 +1033,11 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
|
|
||||||
if pargs.php73:
|
if pargs.php73:
|
||||||
if not data:
|
if not data:
|
||||||
data = dict(site_name=wo_domain, www_domain=wo_www_domain,
|
data = dict(
|
||||||
currsitetype=oldsitetype,
|
site_name=wo_domain, www_domain=wo_www_domain,
|
||||||
currcachetype=oldcachetype,
|
currsitetype=oldsitetype,
|
||||||
webroot=wo_site_webroot)
|
currcachetype=oldcachetype,
|
||||||
|
webroot=wo_site_webroot)
|
||||||
stype = oldsitetype
|
stype = oldsitetype
|
||||||
cache = oldcachetype
|
cache = oldcachetype
|
||||||
if oldsitetype == 'html' or oldsitetype == 'proxy':
|
if oldsitetype == 'html' or oldsitetype == 'proxy':
|
||||||
@@ -1572,26 +1575,27 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
(data['wpfc'])) or (oldsitetype == 'wp' and
|
(data['wpfc'])) or (oldsitetype == 'wp' and
|
||||||
data['multisite'] and data['wpfc'])):
|
data['multisite'] and data['wpfc'])):
|
||||||
try:
|
try:
|
||||||
plugin_data_object = {"log_level": "INFO",
|
plugin_data_object = {
|
||||||
"log_filesize": 5,
|
"log_level": "INFO",
|
||||||
"enable_purge": 1,
|
"log_filesize": 5,
|
||||||
"enable_map": "0",
|
"enable_purge": 1,
|
||||||
"enable_log": 0,
|
"enable_map": "0",
|
||||||
"enable_stamp": 1,
|
"enable_log": 0,
|
||||||
"purge_homepage_on_new": 1,
|
"enable_stamp": 1,
|
||||||
"purge_homepage_on_edit": 1,
|
"purge_homepage_on_new": 1,
|
||||||
"purge_homepage_on_del": 1,
|
"purge_homepage_on_edit": 1,
|
||||||
"purge_archive_on_new": 1,
|
"purge_homepage_on_del": 1,
|
||||||
"purge_archive_on_edit": 0,
|
"purge_archive_on_new": 1,
|
||||||
"purge_archive_on_del": 0,
|
"purge_archive_on_edit": 0,
|
||||||
"purge_archive_on_new_comment": 0,
|
"purge_archive_on_del": 0,
|
||||||
"purge_archive_on_deleted_comment": 0,
|
"purge_archive_on_new_comment": 0,
|
||||||
"purge_page_on_mod": 1,
|
"purge_archive_on_deleted_comment": 0,
|
||||||
"purge_page_on_new_comment": 1,
|
"purge_page_on_mod": 1,
|
||||||
"purge_page_on_deleted_comment": 1,
|
"purge_page_on_new_comment": 1,
|
||||||
"cache_method": "enable_fastcgi",
|
"purge_page_on_deleted_comment": 1,
|
||||||
"purge_method": "get_request",
|
"cache_method": "enable_fastcgi",
|
||||||
"redis_hostname": "127.0.0.1",
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
"redis_port": "6379",
|
"redis_port": "6379",
|
||||||
"redis_prefix": "nginx-cache:"}
|
"redis_prefix": "nginx-cache:"}
|
||||||
plugin_data = json.dumps(plugin_data_object)
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
@@ -1613,26 +1617,27 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
data['multisite'] and
|
data['multisite'] and
|
||||||
data['wpredis'])):
|
data['wpredis'])):
|
||||||
try:
|
try:
|
||||||
plugin_data_object = {"log_level": "INFO",
|
plugin_data_object = {
|
||||||
"log_filesize": 5,
|
"log_level": "INFO",
|
||||||
"enable_purge": 1,
|
"log_filesize": 5,
|
||||||
"enable_map": "0",
|
"enable_purge": 1,
|
||||||
"enable_log": 0,
|
"enable_map": "0",
|
||||||
"enable_stamp": 1,
|
"enable_log": 0,
|
||||||
"purge_homepage_on_new": 1,
|
"enable_stamp": 1,
|
||||||
"purge_homepage_on_edit": 1,
|
"purge_homepage_on_new": 1,
|
||||||
"purge_homepage_on_del": 1,
|
"purge_homepage_on_edit": 1,
|
||||||
"purge_archive_on_new": 1,
|
"purge_homepage_on_del": 1,
|
||||||
"purge_archive_on_edit": 0,
|
"purge_archive_on_new": 1,
|
||||||
"purge_archive_on_del": 0,
|
"purge_archive_on_edit": 0,
|
||||||
"purge_archive_on_new_comment": 0,
|
"purge_archive_on_del": 0,
|
||||||
"purge_archive_on_deleted_comment": 0,
|
"purge_archive_on_new_comment": 0,
|
||||||
"purge_page_on_mod": 1,
|
"purge_archive_on_deleted_comment": 0,
|
||||||
"purge_page_on_new_comment": 1,
|
"purge_page_on_mod": 1,
|
||||||
"purge_page_on_deleted_comment": 1,
|
"purge_page_on_new_comment": 1,
|
||||||
"cache_method": "enable_redis",
|
"purge_page_on_deleted_comment": 1,
|
||||||
"purge_method": "get_request",
|
"cache_method": "enable_redis",
|
||||||
"redis_hostname": "127.0.0.1",
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
"redis_port": "6379",
|
"redis_port": "6379",
|
||||||
"redis_prefix": "nginx-cache:"}
|
"redis_prefix": "nginx-cache:"}
|
||||||
plugin_data = json.dumps(plugin_data_object)
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
@@ -1650,26 +1655,27 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
# disable nginx-helper
|
# disable nginx-helper
|
||||||
plugin_data_object = {"log_level": "INFO",
|
plugin_data_object = {
|
||||||
"log_filesize": 5,
|
"log_level": "INFO",
|
||||||
"enable_purge": 0,
|
"log_filesize": 5,
|
||||||
"enable_map": 0,
|
"enable_purge": 0,
|
||||||
"enable_log": 0,
|
"enable_map": 0,
|
||||||
"enable_stamp": 0,
|
"enable_log": 0,
|
||||||
"purge_homepage_on_new": 1,
|
"enable_stamp": 0,
|
||||||
"purge_homepage_on_edit": 1,
|
"purge_homepage_on_new": 1,
|
||||||
"purge_homepage_on_del": 1,
|
"purge_homepage_on_edit": 1,
|
||||||
"purge_archive_on_new": 1,
|
"purge_homepage_on_del": 1,
|
||||||
"purge_archive_on_edit": 0,
|
"purge_archive_on_new": 1,
|
||||||
"purge_archive_on_del": 0,
|
"purge_archive_on_edit": 0,
|
||||||
"purge_archive_on_new_comment": 0,
|
"purge_archive_on_del": 0,
|
||||||
"purge_archive_on_deleted_comment": 0,
|
"purge_archive_on_new_comment": 0,
|
||||||
"purge_page_on_mod": 1,
|
"purge_archive_on_deleted_comment": 0,
|
||||||
"purge_page_on_new_comment": 1,
|
"purge_page_on_mod": 1,
|
||||||
"purge_page_on_deleted_comment": 1,
|
"purge_page_on_new_comment": 1,
|
||||||
"cache_method": "enable_redis",
|
"purge_page_on_deleted_comment": 1,
|
||||||
"purge_method": "get_request",
|
"cache_method": "enable_redis",
|
||||||
"redis_hostname": "127.0.0.1",
|
"purge_method": "get_request",
|
||||||
|
"redis_hostname": "127.0.0.1",
|
||||||
"redis_port": "6379",
|
"redis_port": "6379",
|
||||||
"redis_prefix": "nginx-cache:"}
|
"redis_prefix": "nginx-cache:"}
|
||||||
plugin_data = json.dumps(plugin_data_object)
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
@@ -1685,24 +1691,26 @@ class WOSiteUpdateController(CementBaseController):
|
|||||||
"and please try again")
|
"and please try again")
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
if ((oldcachetype in ['wpsc', 'basic', 'wpfc', 'wprocket', 'wpredis'] and
|
if ((oldcachetype in ['wpsc', 'basic',
|
||||||
|
'wpfc', 'wprocket', 'wpredis'] and
|
||||||
(data['wpce'])) or (oldsitetype == 'wp' and
|
(data['wpce'])) or (oldsitetype == 'wp' and
|
||||||
data['multisite'] and
|
data['multisite'] and
|
||||||
data['wpce'])):
|
data['wpce'])):
|
||||||
try:
|
try:
|
||||||
installwp_plugin(self, 'cache-enabler', data)
|
installwp_plugin(self, 'cache-enabler', data)
|
||||||
# setup cache-enabler
|
# setup cache-enabler
|
||||||
plugin_data_object = {"expires": 24,
|
plugin_data_object = {
|
||||||
"new_post": 1,
|
"expires": 24,
|
||||||
"new_comment": 0,
|
"new_post": 1,
|
||||||
"webp": 0,
|
"new_comment": 0,
|
||||||
"clear_on_upgrade": 1,
|
"webp": 0,
|
||||||
"compress": 0,
|
"clear_on_upgrade": 1,
|
||||||
"excl_ids": "",
|
"compress": 0,
|
||||||
"excl_regexp": "",
|
"excl_ids": "",
|
||||||
"excl_cookies": "",
|
"excl_regexp": "",
|
||||||
"incl_attributes": "",
|
"excl_cookies": "",
|
||||||
"minify_html": 1}
|
"incl_attributes": "",
|
||||||
|
"minify_html": 1}
|
||||||
plugin_data = json.dumps(plugin_data_object)
|
plugin_data = json.dumps(plugin_data_object)
|
||||||
setupwp_plugin(self, 'cache-enabler',
|
setupwp_plugin(self, 'cache-enabler',
|
||||||
'cache-enabler', plugin_data, data)
|
'cache-enabler', plugin_data, data)
|
||||||
|
|||||||
Reference in New Issue
Block a user