diff --git a/tuning/tuning.py b/tuning/tuning.py index 76956181b..8afff2e2d 100755 --- a/tuning/tuning.py +++ b/tuning/tuning.py @@ -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: diff --git a/tuning/views.py b/tuning/views.py index 0e86d44ff..61d97ba27 100755 --- a/tuning/views.py +++ b/tuning/views.py @@ -1,6 +1,5 @@ # -*- coding: utf-8 -*- - from django.shortcuts import redirect import json from loginSystem.views import loadLoginPage