Mercurial > p > roundup > code
diff roundup/cgi/templating.py @ 3698:c2d232b377d5
optimize parsing of sort/group options according to suggestion...
...from alexander smishlajev
| author | Ralf Schlatterbeck <schlatterbeck@users.sourceforge.net> |
|---|---|
| date | Wed, 06 Sep 2006 08:14:59 +0000 |
| parents | 790363e96852 |
| children | 976191d749fb |
line wrap: on
line diff
--- a/roundup/cgi/templating.py Wed Aug 30 20:36:42 2006 +0000 +++ b/roundup/cgi/templating.py Wed Sep 06 08:14:59 2006 +0000 @@ -2135,7 +2135,7 @@ ''' fields = [] dirs = [] - for special in ':@': + for special in '@:': idx = 0 key = '%s%s%d'%(special, name, idx) while key in self.form: @@ -2155,9 +2155,7 @@ fields = handleListCGIValue(self.form[key]) if dirkey in self.form: dirs.append(self.form[dirkey].value) - else: - dirs.append(None) - if fields: + if fields: # only try other special char if nothing found break for f, d in map(None, fields, dirs): if f.startswith('-'):
