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

def zope-coreblog-1.0::Entry::Entry::editTrackback (   self,
  trackback_id,
  title,
  excerpt,
  url,
  blog_name,
  REQUEST = None 
)

Edit a trackback 

Definition at line 767 of file Entry.py.

00767                                                                                  :
        """ Edit a trackback """
        if self.receive_trackback != trackback_open:
            #This entry does not allow editing trackback
            raise RuntimeError,"This entry is closed for editing trackback."
        cb = self.blog()
        v_h = cb.removeHTML
        v_c = cb.validateCommentBody

        int_trackback_id = int(trackback_id)
        obj = cb.getTrackback(int_trackback_id)

        obj.title = v_h(title)
        obj.excerpt = v_h(excerpt)
        obj.url = v_c(url)
        obj.blog_name = v_c(blog_name)

        cb.setTrackback(trackback_id,obj)

        if obj.moderated:
            #catalogging...
            self.index()

        #tell ZODB that object has added.
        self._p_changed = 1

        if REQUEST:
            return REQUEST.RESPONSE.redirect('./manage_trackbacks')


    security.declareProtected(AddCOREBlogComments, 'deleteAllTrackbacks')


Generated by  Doxygen 1.6.0   Back to index