Logo Search packages:      
Sourcecode: zope-coreblog version File versions

def zope-coreblog-1.0::Entry::Entry::moderateComments (   self,
  mod_ids = [],
  REQUEST = None 
)

Chenge moderate setting for comments in mod_ids 

Definition at line 643 of file Entry.py.

00643                                                       :
        """ Chenge moderate setting for comments in mod_ids """
        if type(mod_ids) != ListType:
            raise TypeError,"Paramater 'ids' must be a ListType."
        for id in mod_ids:
            self.moderateComment(int(id),1)
        unmod_list = []
        int_mod_list = []
        for id in mod_ids:
            int_mod_list.append(int(id))
        for id in self.comments:
            if id not in int_mod_list:
                unmod_list.append(id)
        for id in unmod_list:
            self.moderateComment(id,0)

        self.moderated_comment_count = len(mod_ids)

        if REQUEST:
            return REQUEST.RESPONSE.redirect(REQUEST['HTTP_REFERER'])


    security.declareProtected(ManageCOREBlog, 'moderateComment')


Generated by  Doxygen 1.6.0   Back to index