mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-25 06:48:01 -05:00
Fix the param names in top/controversial listings.
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user