diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-02 22:33:55 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2011-02-02 22:33:55 +0100 |
commit | 7853e83e48fe2a8678fc870195e563c7b867643a (patch) | |
tree | a68b347ee628f0bc61075bcfa9df2188370ca8dd /module/web | |
parent | correct import (diff) | |
download | pyload-7853e83e48fe2a8678fc870195e563c7b867643a.tar.xz |
webif fixes
Diffstat (limited to 'module/web')
-rw-r--r-- | module/web/ServerThread.py | 5 | ||||
-rw-r--r-- | module/web/pyload_app.py | 7 |
2 files changed, 6 insertions, 6 deletions
diff --git a/module/web/ServerThread.py b/module/web/ServerThread.py index 7f47f80c6..9a3e6cb2a 100644 --- a/module/web/ServerThread.py +++ b/module/web/ServerThread.py @@ -5,8 +5,6 @@ import threading import logging import sqlite3 -import webinterface - core = None log = logging.getLogger("log") @@ -27,6 +25,9 @@ class WebServer(threading.Thread): self.setDaemon(True) def run(self): + import webinterface + global webinterface + self.checkDB() if self.https: diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 28c9f03fb..3682a3962 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -17,7 +17,6 @@ @author: RaNaN """ from copy import deepcopy -import datetime from datetime import datetime from itertools import chain from operator import itemgetter @@ -262,10 +261,10 @@ def config(): for pluginname, accdata in accs.iteritems(): for data in accdata: newpw = request.POST.get("Accounts|%s|password;%s" % (pluginname, data["login"]), "").strip() - time = request.POST.get("Accounts|%s|time;%s" % (pluginname, data["login"]), "").strip() + new_time = request.POST.get("Accounts|%s|time;%s" % (pluginname, data["login"]), "").strip() - if newpw or (time and (not data["options"].has_key("time") or [time] != data["options"]["time"])): - PYLOAD.update_account(pluginname, data["login"], newpw, {"time": [time]}) + if newpw or (new_time and (not data["options"].has_key("time") or [new_time] != data["options"]["time"])): + PYLOAD.update_account(pluginname, data["login"], newpw, {"time": [new_time]}) if errors: messages.append(_("Error occured when setting the following options:")) |