Switch to unified view

a/Allura/allura/controllers/discuss.py b/Allura/allura/controllers/discuss.py
...
...
12
12
13
from allura import model as M
13
from allura import model as M
14
from base import BaseController
14
from base import BaseController
15
from allura.lib import utils
15
from allura.lib import utils
16
from allura.lib import helpers as h
16
from allura.lib import helpers as h
17
from allura.lib.decorators import require_post
17
from allura.lib.security import require, has_artifact_access
18
from allura.lib.security import require, has_artifact_access
18
from allura.lib.helpers import DateTimeConverter
19
from allura.lib.helpers import DateTimeConverter
19
20
20
from allura.lib.widgets import discuss as DW
21
from allura.lib.widgets import discuss as DW
21
from .attachments import AttachmentsController, AttachmentController
22
from .attachments import AttachmentsController, AttachmentController
...
...
265
                        post=post)
266
                        post=post)
266
267
267
    @h.vardec
268
    @h.vardec
268
    @expose()
269
    @expose()
269
    @validate(pass_validator, error_handler=index)
270
    @validate(pass_validator, error_handler=index)
271
    @require_post(redir='.')
270
    def reply(self, **kw):
272
    def reply(self, **kw):
271
        require(has_artifact_access('post', self.thread))
273
        require(has_artifact_access('post', self.thread))
272
        kw = self.W.edit_post.to_python(kw, None)
274
        kw = self.W.edit_post.to_python(kw, None)
273
        self.thread.post(parent_id=self.post._id, **kw)
275
        self.thread.post(parent_id=self.post._id, **kw)
274
        self.thread.num_replies += 1
276
        self.thread.num_replies += 1
275
        redirect(request.referer)
277
        redirect(self.thread.url())
276
278
277
    @h.vardec
279
    @h.vardec
278
    @expose()
280
    @expose()
279
    @validate(pass_validator, error_handler=index)
281
    @validate(pass_validator, error_handler=index)
280
    def moderate(self, **kw):
282
    def moderate(self, **kw):