Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F1B49E913 for ; Tue, 22 Jan 2013 15:13:16 +0000 (UTC) Received: (qmail 31101 invoked by uid 500); 22 Jan 2013 15:13:16 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 30992 invoked by uid 500); 22 Jan 2013 15:13:12 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 30887 invoked by uid 99); 22 Jan 2013 15:13:08 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2013 15:13:08 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 0DDEF822CEA; Tue, 22 Jan 2013 15:13:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: johnsca@apache.org To: allura-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [1/2] git commit: Revert "[#5336] Add logging to figure out why posts can't be deleted" Message-Id: <20130122151308.0DDEF822CEA@tyr.zones.apache.org> Date: Tue, 22 Jan 2013 15:13:08 +0000 (UTC) Revert "[#5336] Add logging to figure out why posts can't be deleted" This reverts commit a2363141deec662559e7e30b2bc5c12a323a72ee. Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ce29a327 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ce29a327 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ce29a327 Branch: refs/heads/master Commit: ce29a3272ece75be9483db9c9a216377fa075a92 Parents: df1a971 Author: Tim Van Steenburgh Authored: Mon Jan 21 21:51:09 2013 +0000 Committer: Cory Johns Committed: Tue Jan 22 15:12:41 2013 +0000 ---------------------------------------------------------------------- Allura/allura/controllers/discuss.py | 10 ---------- .../forgediscussion/controllers/forum.py | 12 ------------ 2 files changed, 0 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ce29a327/Allura/allura/controllers/discuss.py ---------------------------------------------------------------------- diff --git a/Allura/allura/controllers/discuss.py b/Allura/allura/controllers/discuss.py index 6b7eb7e..97f722c 100644 --- a/Allura/allura/controllers/discuss.py +++ b/Allura/allura/controllers/discuss.py @@ -1,4 +1,3 @@ -import logging from urllib import unquote from datetime import datetime @@ -22,8 +21,6 @@ from allura.lib.helpers import DateTimeConverter from allura.lib.widgets import discuss as DW from .attachments import AttachmentsController, AttachmentController -log = logging.getLogger(__name__) - class pass_validator(object): def validate(self, v, s): return v @@ -332,20 +329,13 @@ class PostController(BaseController): @require_post() @validate(pass_validator, error_handler=index) def moderate(self, **kw): - log.debug('Moderating post on project "%s"', c.project.shortname) - log.debug('... requiring access on %r', self.post.thread) require_access(self.post.thread, 'moderate') if kw.pop('delete', None): - log.debug('... deleting post') self.post.delete() - log.debug('... updating thread stats') self.thread.update_stats() elif kw.pop('spam', None): - log.debug('... marking post as spam') self.post.status = 'spam' - log.debug('... updating thread stats') self.thread.update_stats() - log.debug('... redirecting to referrer: %s', request.referer) redirect(request.referer) @h.vardec http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ce29a327/ForgeDiscussion/forgediscussion/controllers/forum.py ---------------------------------------------------------------------- diff --git a/ForgeDiscussion/forgediscussion/controllers/forum.py b/ForgeDiscussion/forgediscussion/controllers/forum.py index b37e039..7a81fdd 100644 --- a/ForgeDiscussion/forgediscussion/controllers/forum.py +++ b/ForgeDiscussion/forgediscussion/controllers/forum.py @@ -151,28 +151,16 @@ class ForumPostController(PostController): @require_post() @validate(pass_validator, error_handler=index) def moderate(self, **kw): - log.debug('Moderating post on project "%s"', c.project.shortname) - log.debug('... requiring access on %r', self.post.thread) require_access(self.post.thread, 'moderate') - log.debug('... self.thread.discussion.deleted = %s', self.thread.discussion.deleted) - log.debug('... has_access(c.app, "configure") = %s', has_access(c.app, 'configure')()) if self.thread.discussion.deleted and not has_access(c.app, 'configure')(): redirect(self.thread.discussion.url()+'deleted') - log.debug('... validating kw: %s', kw) args = self.W.moderate_post.validate(kw, None) - log.debug('... calculating thread stats') tasks.calc_thread_stats.post(self.post.thread._id) - log.debug('... calculating forum stats') tasks.calc_forum_stats(self.post.discussion.shortname) - log.debug('... "promote" in args?: %s', 'promote' in args) if args.pop('promote', None): - log.debug('... promoting thread') new_thread = self.post.promote() - log.debug('... recalculating thread stats') tasks.calc_thread_stats.post(new_thread._id) - log.debug('... redirecting to referrer: %s', request.referer) redirect(request.referer) - log.debug('... calling moderate() on superclass') super(ForumPostController, self).moderate(**kw) class ForumModerationController(ModerationController):