comparison mercurial/hgweb/hgwebdir_mod.py @ 2500:76ff5efe8181

Fixed [web] allow_archive for comma separated parameters by using ui.configlist. Changed tests/test-archive to use allow_archive instead of the deprecated allowzip, allowgz and allowbz2.
author Thomas Arendsen Hein <thomas@intevation.de>
date Mon, 26 Jun 2006 14:56:14 +0200
parents d351a3be3371
children 6350b01d173f
comparison
equal deleted inserted replaced
2499:894435215344 2500:76ff5efe8181
58 tmpl = templater.templater(m, templater.common_filters, 58 tmpl = templater.templater(m, templater.common_filters,
59 defaults={"header": header, 59 defaults={"header": header,
60 "footer": footer}) 60 "footer": footer})
61 61
62 def archivelist(ui, nodeid, url): 62 def archivelist(ui, nodeid, url):
63 allowed = (ui.config("web", "allow_archive", "") 63 allowed = ui.configlist("web", "allow_archive")
64 .replace(",", " ").split())
65 for i in ['zip', 'gz', 'bz2']: 64 for i in ['zip', 'gz', 'bz2']:
66 if i in allowed or ui.configbool("web", "allow" + i): 65 if i in allowed or ui.configbool("web", "allow" + i):
67 yield {"type" : i, "node": nodeid, "url": url} 66 yield {"type" : i, "node": nodeid, "url": url}
68 67
69 def entries(sortcolumn="", descending=False, **map): 68 def entries(sortcolumn="", descending=False, **map):