From 3b5c6ac1b27189ff017910816324420cb3b2cec6 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 21 Jul 2011 13:01:24 +0200 Subject: show updates on webif --- module/web/pyload_app.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'module/web/pyload_app.py') diff --git a/module/web/pyload_app.py b/module/web/pyload_app.py index 7492114ca..35203ad7b 100644 --- a/module/web/pyload_app.py +++ b/module/web/pyload_app.py @@ -45,16 +45,27 @@ def pre_processor(): user = parse_userdata(s) perms = parse_permissions(s) status = {} - if user["is_authenticated"]: - status = PYLOAD.statusServer() captcha = False + update = False + plugins = False if user["is_authenticated"]: + status = PYLOAD.statusServer() + info = PYLOAD.getInfoByPlugin("UpdateManager") captcha = PYLOAD.isCaptchaWaiting() + + # check if update check is available + if info: + if info["pyload"] == "True": update = True + if info["plugins"] == "True": plugins = True + + return {"user": user, 'status': status, 'captcha': captcha, 'perms': perms, - 'url': request.url} + 'url': request.url, + 'update': update, + 'plugins': plugins} def base(messages): -- cgit v1.2.3