mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 16:28:01 -05:00
random special subreddits: retain querystring in redirect
This commit is contained in:
committed by
Ricky Ramirez
parent
3996eb185e
commit
9fc3297091
@@ -1032,16 +1032,16 @@ class RedditController(MinimalController):
|
||||
# random reddit trickery -- have to do this after the content lang is set
|
||||
if c.site == Random:
|
||||
c.site = Subreddit.random_reddit(user=c.user)
|
||||
redirect_to("/" + c.site.path.strip('/') + request.path)
|
||||
redirect_to("/" + c.site.path.strip('/') + request.path_qs)
|
||||
elif c.site == RandomSubscription:
|
||||
if c.user.gold:
|
||||
c.site = Subreddit.random_subscription(c.user)
|
||||
redirect_to('/' + c.site.path.strip('/') + request.path)
|
||||
redirect_to('/' + c.site.path.strip('/') + request.path_qs)
|
||||
else:
|
||||
redirect_to('/gold/about')
|
||||
elif c.site == RandomNSFW:
|
||||
c.site = Subreddit.random_reddit(over18=True, user=c.user)
|
||||
redirect_to("/" + c.site.path.strip('/') + request.path)
|
||||
redirect_to("/" + c.site.path.strip('/') + request.path_qs)
|
||||
|
||||
if not request.path.startswith("/api/login/"):
|
||||
# is the subreddit banned?
|
||||
|
||||
Reference in New Issue
Block a user