Browse Source

Fixed #486

bugfixes
harshadyeola 10 years ago
parent
commit
b0b77a47aa
  1. 1
      .travis.yml
  2. 22
      ee/cli/plugins/site_functions.py

1
.travis.yml

@ -48,6 +48,7 @@ script:
- sudo ee site create site4.org --wpfc --wp - sudo ee site create site4.org --wpfc --wp
- sudo ee site create site5.com --wpsubdir - sudo ee site create site5.com --wpsubdir
- sudo ee site create site5.net --wpsubdir - sudo ee site create site5.net --wpsubdir
- sudo ee site create site6.net --php --mysql
- sudo ee site create site6.com --wpsubdir --wpsc - sudo ee site create site6.com --wpsubdir --wpsc
- sudo ee site create site6.net --wpsc --wpsubdir - sudo ee site create site6.net --wpsc --wpsubdir

22
ee/cli/plugins/site_functions.py

@ -797,6 +797,22 @@ def detSitePar(opts):
elif val and key in ['wpfc', 'wpsc', 'w3tc']: elif val and key in ['wpfc', 'wpsc', 'w3tc']:
cachelist.append(key) cachelist.append(key)
if len(typelist) > 1:
if set(['wpsubdir', 'wpsubdomain'].issubset(set[typelist])):
raise RuntimeError("could not determine site and cache type")
elif 'wpsubdir' in typelist:
typelist = 'wpsubdir'
elif 'wpsubdomain' in typelist:
typelist = 'wpsubdomain'
elif 'wp' in typelist:
typelist = 'wp'
elif 'mysql' in typelist:
typelist = 'mysql'
elif 'php' in typelist:
typelist = 'php'
else:
typelist = 'html'
if len(typelist) > 1 or len(cachelist) > 1: if len(typelist) > 1 or len(cachelist) > 1:
raise RuntimeError("could not determine site and cache type") raise RuntimeError("could not determine site and cache type")
else: else:
@ -807,11 +823,11 @@ def detSitePar(opts):
sitetype = 'wp' sitetype = 'wp'
cachetype = cachelist[0] cachetype = cachelist[0]
elif typelist and (not cachelist): elif typelist and (not cachelist):
sitetype = typelist[0] sitetype = typelist
cachetype = 'basic' cachetype = 'basic'
else: else:
sitetype = typelist[0] sitetype = typelist
cachetype = cachelist[0] cachetype = cachelist
return (sitetype, cachetype) return (sitetype, cachetype)

Loading…
Cancel
Save