Mercurial > hg
comparison mercurial/hgweb/hgweb_mod.py @ 7348:1a5c9ca2bfd5
merge with mpm
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Sat, 08 Nov 2008 00:29:04 +0100 |
parents | feb0b76b6717 55651328dfcc |
children | 526c40a74bd0 |
comparison
equal
deleted
inserted
replaced
7347:bc158cd800fa | 7348:1a5c9ca2bfd5 |
---|---|
226 yield tmpl("footer", **map) | 226 yield tmpl("footer", **map) |
227 | 227 |
228 def motd(**map): | 228 def motd(**map): |
229 yield self.config("web", "motd", "") | 229 yield self.config("web", "motd", "") |
230 | 230 |
231 def sessionvars(**map): | |
232 fields = [] | |
233 if 'style' in req.form: | |
234 style = req.form['style'][0] | |
235 if style != self.config('web', 'style', ''): | |
236 fields.append(('style', style)) | |
237 | |
238 separator = req.url[-1] == '?' and ';' or '?' | |
239 for name, value in fields: | |
240 yield dict(name=name, value=value, separator=separator) | |
241 separator = ';' | |
242 | |
243 # figure out which style to use | 231 # figure out which style to use |
244 | 232 |
233 vars = {} | |
245 style = self.config("web", "style", "paper") | 234 style = self.config("web", "style", "paper") |
246 if 'style' in req.form: | 235 if 'style' in req.form: |
247 style = req.form['style'][0] | 236 style = req.form['style'][0] |
237 vars['style'] = style | |
238 | |
239 start = req.url[-1] == '?' and '&' or '?' | |
240 sessionvars = webutil.sessionvars(vars, start) | |
248 mapfile = style_map(self.templatepath, style) | 241 mapfile = style_map(self.templatepath, style) |
249 | 242 |
250 if not self.reponame: | 243 if not self.reponame: |
251 self.reponame = (self.config("web", "name") | 244 self.reponame = (self.config("web", "name") |
252 or req.env.get('REPO_NAME') | 245 or req.env.get('REPO_NAME') |