further refoctor default render tuning

This commit is contained in:
Usman Nasir
2021-03-06 11:45:17 +05:00
parent 325e592b63
commit 5472c88710
2 changed files with 12 additions and 19 deletions

View File

@@ -31,24 +31,18 @@ class tuningManager:
return proc.render()
def phpTuning(self, request, userID):
try:
userID = request.session['userID']
currentACL = ACLManager.loadedACL(userID)
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
websitesName = ACLManager.findAllSites(currentACL, userID)
OLS = 1
proc = httpProc(request, 'tuning/phpTuning.html',
{'websiteList': websitesName, 'OLS': OLS}, 'admin')
return proc.render()
else:
OLS = 0
proc = httpProc(request, 'tuning/phpTuning.html',
{'OLS': OLS}, 'admin')
return proc.render()
except KeyError:
return redirect(loadLoginPage)
currentACL = ACLManager.loadedACL(userID)
if ProcessUtilities.decideServer() == ProcessUtilities.OLS:
websitesName = ACLManager.findAllSites(currentACL, userID)
OLS = 1
proc = httpProc(request, 'tuning/phpTuning.html',
{'websiteList': websitesName, 'OLS': OLS}, 'admin')
return proc.render()
else:
OLS = 0
proc = httpProc(request, 'tuning/phpTuning.html',
{'OLS': OLS}, 'admin')
return proc.render()
def tuneLitespeed(self, userID, data):
try: