Module: check_mk
Branch: master
Commit: 2ad9f49a11f89fc2bc49664e61d3e05096cfe1f9
URL: http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=2ad9f49a11f89f…
Author: Mathias Kettner <mk(a)mathias-kettner.de>
Date: Thu Mar 21 12:29:13 2013 +0100
html: remove duplicate varnames in makeuri
---
web/htdocs/htmllib.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/web/htdocs/htmllib.py b/web/htdocs/htmllib.py
index 7c3361b..d05a70f 100644
--- a/web/htdocs/htmllib.py
+++ b/web/htdocs/htmllib.py
@@ -361,7 +361,10 @@ class html:
# [('varname1', value1), ('varname2', value2) ]
def makeuri(self, addvars, remove_prefix = None, filename=None):
- vars = [ (v, self.var(v)) for v in self.req.vars if v[0] != "_" ]
+ new_vars = [ nv[0] for nv in addvars ]
+ vars = [ (v, self.var(v))
+ for v in self.req.vars
+ if v[0] != "_" and v not in new_vars ]
if remove_prefix != None:
vars = [ i for i in vars if not i[0].startswith(remove_prefix) ]
vars = vars + addvars