Show More
@@ -48,9 +48,10 b' class hgweb(object):' | |||||
48 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) |
|
48 | self.allowpull = self.repo.ui.configbool("web", "allowpull", True) | |
49 |
|
49 | |||
50 | def archivelist(self, nodeid): |
|
50 | def archivelist(self, nodeid): | |
51 |
al = self.repo.ui.config("web", "allow_archive", "") |
|
51 | allowed = (self.repo.ui.config("web", "allow_archive", "") | |
|
52 | .replace(",", " ").split()) | |||
52 | for i in self.archives: |
|
53 | for i in self.archives: | |
53 |
if i in al or self.repo.ui.configbool("web", "allow" + i |
|
54 | if i in allowed or self.repo.ui.configbool("web", "allow" + i): | |
54 | yield {"type" : i, "node" : nodeid, "url": ""} |
|
55 | yield {"type" : i, "node" : nodeid, "url": ""} | |
55 |
|
56 | |||
56 | def listfiles(self, files, mf): |
|
57 | def listfiles(self, files, mf): |
@@ -58,9 +58,10 b' class hgwebdir(object):' | |||||
58 | "footer": footer}) |
|
58 | "footer": footer}) | |
59 |
|
59 | |||
60 | def archivelist(ui, nodeid, url): |
|
60 | def archivelist(ui, nodeid, url): | |
61 |
al = ui.config("web", "allow_archive", "") |
|
61 | allowed = (ui.config("web", "allow_archive", "") | |
|
62 | .replace(",", " ").split()) | |||
62 | for i in ['zip', 'gz', 'bz2']: |
|
63 | for i in ['zip', 'gz', 'bz2']: | |
63 |
if i in al or ui.configbool("web", "allow" + i |
|
64 | if i in allowed or ui.configbool("web", "allow" + i): | |
64 | yield {"type" : i, "node": nodeid, "url": url} |
|
65 | yield {"type" : i, "node": nodeid, "url": url} | |
65 |
|
66 | |||
66 | def entries(sortcolumn="", descending=False, **map): |
|
67 | def entries(sortcolumn="", descending=False, **map): |
General Comments 0
You need to be logged in to leave comments.
Login now