|
a/Allura/allura/controllers/discuss.py |
|
b/Allura/allura/controllers/discuss.py |
|
... |
|
... |
455 |
|
455 |
|
456 |
@h.vardec
|
456 |
@h.vardec
|
457 |
@expose()
|
457 |
@expose()
|
458 |
@require_post()
|
458 |
@require_post()
|
459 |
@validate(pass_validator, error_handler=h.json_validation_error)
|
459 |
@validate(pass_validator, error_handler=h.json_validation_error)
|
460 |
@utils.AntiSpam.validate('Spambot protection engaged')
|
|
|
461 |
def reply(self, **kw):
|
460 |
def reply(self, **kw):
|
462 |
require_access(self.thread, 'post')
|
461 |
require_access(self.thread, 'post')
|
463 |
kw = self.W.edit_post.to_python(kw, None)
|
462 |
kw = self.W.edit_post.to_python(kw, None)
|
464 |
post = self.thread.post(parent_id=self.post._id, **kw)
|
463 |
post = self.thread.post(parent_id=self.post._id, **kw)
|
465 |
self.thread.num_replies += 1
|
464 |
self.thread.num_replies += 1
|
|
... |
|
... |
473 |
|
472 |
|
474 |
@h.vardec
|
473 |
@h.vardec
|
475 |
@expose()
|
474 |
@expose()
|
476 |
@require_post()
|
475 |
@require_post()
|
477 |
@validate(pass_validator, error_handler=h.json_validation_error)
|
476 |
@validate(pass_validator, error_handler=h.json_validation_error)
|
478 |
@utils.AntiSpam.validate('Spambot protection engaged')
|
|
|
479 |
def new(self, **kw):
|
477 |
def new(self, **kw):
|
480 |
require_access(self.thread, 'post')
|
478 |
require_access(self.thread, 'post')
|
481 |
kw = self.W.edit_post.to_python(kw, None)
|
479 |
kw = self.W.edit_post.to_python(kw, None)
|
482 |
p = self.thread.add_post(**kw)
|
480 |
p = self.thread.add_post(**kw)
|
483 |
redirect(p.slug + '/')
|
481 |
redirect(p.slug + '/')
|