update php version in data

This commit is contained in:
Usman Nasir
2022-11-12 17:14:05 +05:00
parent d4ce8fcb3d
commit 6857912f39
2 changed files with 11 additions and 1 deletions

View File

@@ -864,7 +864,6 @@ class WebsiteManager:
json_data = stdoutput.splitlines()[-1]
data_ret = {'status': 1, 'error_message': 'None', 'plugins': json_data}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)
@@ -3257,6 +3256,15 @@ class WebsiteManager:
execPath = execPath + " changePHP --phpVersion '" + phpVersion + "' --path " + completePathToConfigFile
ProcessUtilities.popenExecutioner(execPath)
try:
website = Websites.objects.get(domain=self.domain)
website.phpSelection = data['phpSelection']
website.save()
except:
website = ChildDomains.objects.get(domain=self.domain)
website.phpSelection = data['phpSelection']
website.save()
data_ret = {'status': 1, 'changePHP': 1, 'error_message': "None"}
json_data = json.dumps(data_ret)
return HttpResponse(json_data)