Copie depuis le svn du cri à l'état :
[Plinn.git] / skins / control / reply_add_control.py
1 ##parameters=title, text, **kw
2 title = title.strip()
3 text = text.strip()
4
5 if title and text :
6 try : talkback = context.talkback
7 except : talkback = context.portal_discussion.getDiscussionFor(context)
8 replyId = talkback.createReply(title=title, text=text)
9 return context.setStatus(replyId, 'Comment added.')
10 else :
11 return context.setStatus(False, 'You must enter a title and body.')