Browse Source

Fixed issue where HHVM and Pagespeed config is not updating

bugfixes
gau1991 10 years ago
parent
commit
f7d84999ef
  1. 28
      ee/cli/plugins/site.py
  2. 4
      ee/cli/plugins/sitedb.py

28
ee/cli/plugins/site.py

@ -668,51 +668,51 @@ class EESiteUpdateController(CementBaseController):
if self.app.pargs.hhvm != 'off': if self.app.pargs.hhvm != 'off':
data['hhvm'] = True data['hhvm'] = True
hhvm = 1 hhvm = True
elif self.app.pargs.hhvm == 'off': elif self.app.pargs.hhvm == 'off':
data['hhvm'] = False data['hhvm'] = False
hhvm = 0 hhvm = False
if self.app.pargs.pagespeed != 'off': if self.app.pargs.pagespeed != 'off':
data['pagespeed'] = True data['pagespeed'] = True
pagespeed = 1 pagespeed = True
elif self.app.pargs.pagespeed == 'off': elif self.app.pargs.pagespeed == 'off':
data['pagespeed'] = False data['pagespeed'] = False
pagespeed = 0 pagespeed = False
if self.app.pargs.pagespeed: if self.app.pargs.pagespeed:
if pagespeed == old_pagespeed: if pagespeed == old_pagespeed:
if pagespeed == 0: if pagespeed is False:
Log.error(self, "Pagespeed is allready disabled for given " Log.error(self, "Pagespeed is allready disabled for given "
"site") "site")
elif pagespeed == 1: elif pagespeed is True:
Log.error(self, "Pagespeed is allready enabled for given " Log.error(self, "Pagespeed is allready enabled for given "
"site") "site")
if self.app.pargs.hhvm: if self.app.pargs.hhvm:
if hhvm == old_hhvm: if hhvm == old_hhvm:
if hhvm == 0: if hhvm is False:
Log.error(self, "HHVM is allready disabled for given " Log.error(self, "HHVM is allready disabled for given "
"site") "site")
elif hhvm == 1: elif hhvm is True:
Log.error(self, "HHVM is allready enabled for given " Log.error(self, "HHVM is allready enabled for given "
"site") "site")
if data and (not self.app.pargs.hhvm): if data and (not self.app.pargs.hhvm):
if old_hhvm == 1: if old_hhvm is True:
data['hhvm'] = True data['hhvm'] = True
hhvm = 1 hhvm = True
else: else:
data['hhvm'] = False data['hhvm'] = False
hhvm = 0 hhvm = False
if data and (not self.app.pargs.pagespeed): if data and (not self.app.pargs.pagespeed):
if old_pagespeed == 1: if old_pagespeed is True:
data['pagespeed'] = True data['pagespeed'] = True
pagespeed = 1 pagespeed = True
else: else:
data['pagespeed'] = False data['pagespeed'] = False
pagespeed = 0 pagespeed = False
if not data: if not data:
Log.error(self, " Cannot update {0}, Invalid Options" Log.error(self, " Cannot update {0}, Invalid Options"

4
ee/cli/plugins/sitedb.py

@ -82,10 +82,10 @@ def updateSiteInfo(self, site, stype='', cache='', webroot='',
if webroot and q.site_path != webroot: if webroot and q.site_path != webroot:
q.site_path = webroot q.site_path = webroot
if hhvm and q.is_hhvm != hhvm: if (hhvm is not None) and (q.is_hhvm is not hhvm):
q.is_hhvm = hhvm q.is_hhvm = hhvm
if webroot and q.is_pagespeed != pagespeed: if (pagespeed is not None) and (q.is_pagespeed is not pagespeed):
q.is_pagespeed = pagespeed q.is_pagespeed = pagespeed
try: try:

Loading…
Cancel
Save