From 7e3de6ae0acb258e87746633674a851ec310e4d1 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 29 Jun 2009 13:44:46 +0000 Subject: [PATCH] remove unnecessary paths variable for BulkActionView methods, set self.paths instead. svn path=/plone.app.discussion/trunk/; revision=27722 --- plone/app/discussion/browser/moderation.py | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/plone/app/discussion/browser/moderation.py b/plone/app/discussion/browser/moderation.py index 4a82c50..a2a1e5a 100644 --- a/plone/app/discussion/browser/moderation.py +++ b/plone/app/discussion/browser/moderation.py @@ -123,40 +123,40 @@ class BulkActionsView(BrowserView): bulkaction = self.request.get('form.select.BulkAction') - paths = self.request.get('paths') + self.paths = self.request.get('paths') if bulkaction == '-1': # no bulk action was selected pass elif bulkaction == 'retract': - self.retract(paths) + self.retract() elif bulkaction == 'publish': - self.publish(paths) + self.publish() elif bulkaction == 'mark_as_spam': - self.mark_as_spam(paths) + self.mark_as_spam() elif bulkaction == 'delete': - self.delete(paths) + self.delete() else: raise KeyError - def retract(self, paths): + def retract(self): raise NotImplementedError - def publish(self, paths): + def publish(self): context = aq_inner(self.context) - for path in paths: + for path in self.paths: comment = context.restrictedTraverse(path) portal_workflow = getToolByName(comment, 'portal_workflow') portal_workflow.doActionFor(comment, 'publish') catalog = getToolByName(comment, 'portal_catalog') catalog.reindexObject(comment) - def mark_as_spam(self, paths): + def mark_as_spam(self): raise NotImplementedError - def delete(self, paths): + def delete(self): context = aq_inner(self.context) - for path in paths: + for path in self.paths: comment = context.restrictedTraverse(path) conversation = aq_parent(comment) del conversation[comment.id]