Redirect old-style link details page URLs.

This commit is contained in:
Max Goodman
2012-06-19 14:41:36 -07:00
parent ce6b2ca6b1
commit 42c4e91f3a

View File

@@ -113,11 +113,19 @@ class FrontController(RedditController):
@prevent_framing_and_css()
@validate(VAdmin(),
thing = VByName('article'))
def GET_details(self, thing):
thing = VByName('article'),
oldid36 = nop('article'))
def GET_details(self, thing, oldid36):
"""The (now deprecated) details page. Content on this page
has been subsubmed by the presence of the LinkInfoBar on the
rightbox, so it is only useful for Admin-only wizardry."""
if not thing:
try:
link = Link._byID36(oldid36)
return self.redirect('/details/' + link._fullname)
except (NotFound, ValueError):
abort(404)
return DetailsPage(thing=thing, expand_children=False).render()
def GET_selfserviceoatmeal(self):