Recaptcha support added when reporting screenshots
There's lots of spam recently. We need to do something against it.
This commit is contained in:
parent
85b9f1014f
commit
ff0b93380a
5 changed files with 16 additions and 4 deletions
|
|
@ -177,10 +177,12 @@ class PackagesController < ApplicationController
|
|||
# Receive an anonymous report from a user to have a screenshot removed.
|
||||
def report_screenshot
|
||||
@screenshot = Screenshot.find(params[:id])
|
||||
@screenshot.delete_reason = params[:delete_reason]
|
||||
@screenshot.markedfordelete = true
|
||||
@screenshot.save!
|
||||
flash['notice'] = "Screenshot reported. The moderators will deal with it."
|
||||
if verify_recaptcha
|
||||
@screenshot.delete_reason = params[:delete_reason]
|
||||
@screenshot.markedfordelete = true
|
||||
@screenshot.save!
|
||||
flash['notice'] = "Screenshot reported. The moderators will deal with it."
|
||||
end
|
||||
redirect_to :back
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue