##// END OF EJS Templates
Check if the post is OP when opening a thread with post ID
neko259 -
r490:0e717b22 1.6-dev
parent child Browse files
Show More
@@ -211,6 +211,11 b' def thread(request, post_id, mode=MODE_N'
211 kwargs = {}
211 kwargs = {}
212
212
213 opening_post = get_object_or_404(Post, id=post_id)
213 opening_post = get_object_or_404(Post, id=post_id)
214
215 # If this is not OP, don't show it as it is
216 if not opening_post.is_opening():
217 raise Http404
218
214 if request.method == 'POST' and not opening_post.thread_new.archived:
219 if request.method == 'POST' and not opening_post.thread_new.archived:
215 form = postFormClass(request.POST, request.FILES,
220 form = postFormClass(request.POST, request.FILES,
216 error_class=PlainErrorList, **kwargs)
221 error_class=PlainErrorList, **kwargs)
General Comments 0
You need to be logged in to leave comments. Login now