2 form
= context
.REQUEST
.form
3 form_has
= form
.has_key
5 if context
.meta_type
== 'Discussion Item' :
6 contentOb
= context
.parentsInThread()[0]
10 if form_has('cancel_reply') :
11 contentOb
.setRedirect(contentOb
, 'object/view', **form
)
13 elif form_has('add_reply') :
14 replyId
= context
.reply_add_control(**form
)
16 context
.setRedirect(contentOb
, 'object/view', new_reply_id
=replyId
, **form
)
19 options
= {'reply_for_ob' : context
, 'ajax' : form_has('ajax') and '1' or None, 'inReplyTo' : context
}
20 return getattr(contentOb
, contentOb
.getActionInfo('object/view')['url'].split('/')[-1])(**options
)