Esempio n. 1
0
 def moderate(self, **kw):
     require_access(self.post.thread, 'moderate')
     if self.thread.discussion.deleted and not has_access(c.app, 'configure')():
         redirect(self.thread.discussion.url() + 'deleted')
     tasks.calc_thread_stats.post(self.post.thread._id)
     tasks.calc_forum_stats(self.post.discussion.shortname)
     super(ForumPostController, self).moderate(**kw)
Esempio n. 2
0
 def moderate(self, **kw):
     require_access(self.post.thread, 'moderate')
     if self.thread.discussion.deleted and not has_access(
             c.app, 'configure')():
         redirect(self.thread.discussion.url() + 'deleted')
     tasks.calc_thread_stats.post(self.post.thread._id)
     tasks.calc_forum_stats(self.post.discussion.shortname)
     super(ForumPostController, self).moderate(**kw)
Esempio n. 3
0
 def moderate(self, **kw):
     require_access(self.post.thread, 'moderate')
     if self.thread.discussion.deleted and not has_access(c.app, 'configure')():
         redirect(self.thread.discussion.url()+'deleted')
     args = self.W.moderate_post.validate(kw, None)
     tasks.calc_thread_stats.post(self.post.thread._id)
     tasks.calc_forum_stats(self.post.discussion.shortname)
     if args.pop('promote', None):
         new_thread = self.post.promote()
         tasks.calc_thread_stats.post(new_thread._id)
         redirect(request.referer)
     super(ForumPostController, self).moderate(**kw)
Esempio n. 4
0
 def moderate(self, **kw):
     require_access(self.post.thread, 'moderate')
     if self.thread.discussion.deleted and not has_access(c.app, 'configure')():
         redirect(self.thread.discussion.url()+'deleted')
     args = self.W.moderate_post.validate(kw, None)
     tasks.calc_thread_stats.post(self.post.thread._id)
     tasks.calc_forum_stats(self.post.discussion.shortname)
     if args.pop('promote', None):
         new_thread = self.post.promote()
         tasks.calc_thread_stats.post(new_thread._id)
         redirect(request.referer)
     super(ForumPostController, self).moderate(**kw)