1bd2c6949fb0bf0d05d2af88dfb93370ab9a59f6
[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.')