- if not user.is_authenticated() or (user.reputation < settings.REP_TO_FOR_NO_SPAM_CHECK and not user.is_staff and not user.is_superuser):
- if api.comment_check(comment, data):
- if request.is_ajax():
- response = {
- 'success': False,
- 'error_message': _("Sorry, but akismet thinks your %s is spam.") % comment_type
- }
- return HttpResponse(simplejson.dumps(response), mimetype="application/json")
- else:
- return render_to_response('modules/akismet/foundspam.html', {
- 'action_name': comment_type
- })
-
+ if api.comment_check(comment, data):
+ if request.is_ajax():
+ response = {
+ 'success': False,
+ 'error_message': _("Sorry, but akismet thinks your %s is spam.") % comment_type
+ }
+ return HttpResponse(simplejson.dumps(response), mimetype="application/json")
+ else:
+ return render_to_response('modules/akismet/foundspam.html', {
+ 'action_name': comment_type
+ })
+