Fix the param names in top/controversial listings.

This commit is contained in:
Logan Hanks
2011-07-12 09:37:27 -07:00
parent 83058d48ce
commit 537a2bab67

View File

@@ -413,23 +413,23 @@ class BrowseController(ListingController):
# TODO: this is a hack with sort.
@validate(sort = VOneOf('sort', ('top', 'controversial')),
time = VMenu('where', ControversyTimeMenu))
def POST_listing(self, sort, time, **env):
t = VMenu('sort', ControversyTimeMenu))
def POST_listing(self, sort, t, **env):
# VMenu validator will save the value of time before we reach this
# point. Now just redirect to GET mode.
return self.redirect(
request.fullpath + query_string(dict(sort=sort, time=time)))
request.fullpath + query_string(dict(sort=sort, t=t)))
# TODO: this is a hack with sort.
@validate(sort = VOneOf('sort', ('top', 'controversial')),
time = VMenu('where', ControversyTimeMenu))
def GET_listing(self, sort, time, **env):
t = VMenu('sort', ControversyTimeMenu))
def GET_listing(self, sort, t, **env):
self.sort = sort
if sort == 'top':
self.title_text = _('top scoring links')
elif sort == 'controversial':
self.title_text = _('most controversial links')
self.time = time
self.time = t
return ListingController.GET_listing(self, **env)