mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-06 21:35:55 +01:00
bug fix: wp manager
This commit is contained in:
@@ -1997,12 +1997,12 @@ class CloudManager:
|
|||||||
## Search index
|
## Search index
|
||||||
|
|
||||||
command = 'wp option get blog_public --path=%s' % (path)
|
command = 'wp option get blog_public --path=%s' % (path)
|
||||||
finalDic['searchIndex'] = int(ProcessUtilities.outputExecutioner(command, website.externalApp).rstrip('\n'))
|
finalDic['searchIndex'] = int(ProcessUtilities.outputExecutioner(command, website.externalApp).splitlines()[-1])
|
||||||
|
|
||||||
## Maintenece mode
|
## Maintenece mode
|
||||||
|
|
||||||
command = 'wp maintenance-mode status --path=%s' % (path)
|
command = 'wp maintenance-mode status --path=%s' % (path)
|
||||||
result = ProcessUtilities.outputExecutioner(command, website.externalApp)
|
result = ProcessUtilities.outputExecutioner(command, website.externalApp).splitlines()[-1]
|
||||||
|
|
||||||
if result.find('not active') > -1:
|
if result.find('not active') > -1:
|
||||||
finalDic['maintenanceMode'] = 0
|
finalDic['maintenanceMode'] = 0
|
||||||
@@ -2012,7 +2012,7 @@ class CloudManager:
|
|||||||
## Get title
|
## Get title
|
||||||
|
|
||||||
command = 'wp option get blogname --path=%s' % (path)
|
command = 'wp option get blogname --path=%s' % (path)
|
||||||
finalDic['title'] = ProcessUtilities.outputExecutioner(command, website.externalApp)
|
finalDic['title'] = ProcessUtilities.outputExecutioner(command, website.externalApp).splitlines()[-1]
|
||||||
|
|
||||||
##
|
##
|
||||||
|
|
||||||
@@ -2171,7 +2171,7 @@ class CloudManager:
|
|||||||
path = '/home/%s/public_html' % (self.data['domain'])
|
path = '/home/%s/public_html' % (self.data['domain'])
|
||||||
|
|
||||||
command = 'wp plugin list --format=json --path=%s' % (path)
|
command = 'wp plugin list --format=json --path=%s' % (path)
|
||||||
json_data = ProcessUtilities.outputExecutioner(command, website.externalApp)
|
json_data = ProcessUtilities.outputExecutioner(command, website.externalApp).splitlines()[-1]
|
||||||
final_json = json.dumps({'status': 1, 'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
final_json = json.dumps({'status': 1, 'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
||||||
|
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
@@ -2314,7 +2314,7 @@ class CloudManager:
|
|||||||
path = '/home/%s/public_html' % (self.data['domain'])
|
path = '/home/%s/public_html' % (self.data['domain'])
|
||||||
|
|
||||||
command = 'wp theme list --format=json --path=%s' % (path)
|
command = 'wp theme list --format=json --path=%s' % (path)
|
||||||
json_data = ProcessUtilities.outputExecutioner(command, website.externalApp)
|
json_data = ProcessUtilities.outputExecutioner(command, website.externalApp).splitlines()[-1]
|
||||||
final_json = json.dumps({'status': 1, 'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
final_json = json.dumps({'status': 1, 'fetchStatus': 1, 'error_message': "None", "data": json_data})
|
||||||
return HttpResponse(final_json)
|
return HttpResponse(final_json)
|
||||||
except BaseException as msg:
|
except BaseException as msg:
|
||||||
|
|||||||
Reference in New Issue
Block a user