mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-14 09:27:57 -05:00
Don't "submit it again" to restricted subreddit.
The submit link is based off the comments page of the already submitted link. Check whether the user can submit a link to that subreddit and if they can't don't take them to that subreddit's submit page.
This commit is contained in:
@@ -288,8 +288,9 @@ class FrontController(RedditController):
|
||||
if request.GET.get('already_submitted'):
|
||||
submit_url = request.GET.get('submit_url') or article.url
|
||||
resubmit_url = Link.resubmit_link(submit_url)
|
||||
sr_resubmit_url = add_sr(resubmit_url)
|
||||
infotext = strings.already_submitted % sr_resubmit_url
|
||||
if c.user_is_loggedin and c.site.can_submit(c.user):
|
||||
resubmit_url = add_sr(resubmit_url)
|
||||
infotext = strings.already_submitted % resubmit_url
|
||||
|
||||
check_cheating('comments')
|
||||
|
||||
|
||||
Reference in New Issue
Block a user