summaryrefslogtreecommitdiffstats
path: root/module/web
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-02 23:22:33 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-02 23:22:33 +0200
commitb642f147c006366ed039b533d212b6c3e2c19a44 (patch)
tree7dc22fd673eb4525283be6a172d8c5947915b51a /module/web
parentformated output (diff)
downloadpyload-b642f147c006366ed039b533d212b6c3e2c19a44.tar.xz
fixes
Diffstat (limited to 'module/web')
-rw-r--r--module/web/pyload/views.py27
1 files changed, 14 insertions, 13 deletions
diff --git a/module/web/pyload/views.py b/module/web/pyload/views.py
index cdf0e280f..b38f89b31 100644
--- a/module/web/pyload/views.py
+++ b/module/web/pyload/views.py
@@ -328,19 +328,20 @@ def config(request):
messages.append(_("All options were set correctly."))
accs = settings.PYLOAD.get_accounts()
- for user,data in accs.iteritems():
- if data["trafficleft"] == -1:
- data["trafficleft"] = _("unlimited")
- elif not data["trafficleft"]:
- data["trafficleft"] = ""
-
- if data["validuntil"] == -1:
- data["validuntil"] = _("unlimited")
- elif not data["validuntil"]:
- data["validuntil"] = ""
- else:
- t = localtime(data["validuntil"])
- data["validuntil"] = strftime("%d-%m-%Y",t)
+ for plugin,accounts in accs.iteritems():
+ for user,data in accounts:
+ if data["trafficleft"] == -1:
+ data["trafficleft"] = _("unlimited")
+ elif not data["trafficleft"]:
+ data["trafficleft"] = ""
+
+ if data["validuntil"] == -1:
+ data["validuntil"] = _("unlimited")
+ elif not data["validuntil"]:
+ data["validuntil"] = ""
+ else:
+ t = localtime(data["validuntil"])
+ data["validuntil"] = strftime("%d-%m-%Y",t)
return render_to_response(join(settings.TEMPLATE, 'settings.html'), RequestContext(request, {'conf': {'Plugin':plugin, 'General':conf, 'Accounts': accs}, 'errors': messages}, [status_proc]))