//��������
if(loginUser!=null && isUserInBlackList(site, loginUser)){
msgs.add("topic", new ActionMessage("error.user_in_blacklist"));
break;
}
DiaryOutlineBean diary = DiaryDAO.getDiaryOutlineByID(reply.getParentId());
if (diary == null || diary.getSite().getId() != reply.getSid()) {
msgs.add("reply", new ActionMessage("error.param"));
break;
}
if(diary.getLock()==1) {
msgs.add("reply", new ActionMessage("error.diary.locked"));
break;
}
// ��������������
DiaryReplyBean rbean = new DiaryReplyBean();
rbean.setUser(loginUser);
rbean.setAuthor(super.autoFiltrate(site,reply.getAuthor()));
if (StringUtils.isNotEmpty(reply.getAuthorURL()))
rbean.setAuthorURL(reply.getAuthorURL());
if (StringUtils.isNotEmpty(reply.getAuthorEmail()))
rbean.setAuthorEmail(reply.getAuthorEmail());
rbean.setClient(new ClientInfo(request, reply
.getClientType()));
String content = StringUtils.abbreviate(super.autoFiltrate(null,
reply.getContent()), MAX_REPLY_LENGTH);
rbean.setContent(super.filterScriptAndStyle(content));
rbean.setDiary(diary);
rbean.setReplyTime(new Date());
rbean.setSite(site);
rbean.setStatus(DiaryReplyBean.STATUS_NORMAL);
rbean.setOwnerOnly(reply.getOwnerOnly());
DiaryDAO.createDiaryReply(rbean);
// �ж��Ƿ���Ҫ�ʼ�����
if (diary.getReplyNotify() == 1) {
String email = diary.getOwner().getContactInfo()
.getEmail();
if (StringUtils.isEmail(email)) {
this.sendReplyNotify(request, rbean.getSite().getId(), rbean);
}
}