msgs.add("content",
new ActionMessage("error.empty_not_allowed"));
break;
}
// ����û���Ȩ��
TopicBean topic = BBSTopicDAO.getTopicByID(log.getId());
if (topic != null) {
if (topic.getUser().getId() != loginUser.getId()
&& loginUser.getOwnSiteId() != log.getSid()) {
msgs.add("bbs", new ActionMessage("error.access_deny"));
break;
}
// �Է����ı����Լ������Զ����������ִʹ���
String title = super.autoFiltrate(topic.getSite(),log.getTitle());
if (!StringUtils.equals(title, topic.getTitle()))
topic.setTitle(title);
String content = StringUtils.abbreviate(super.autoFiltrate(
null, log.getContent()), MAX_TOPIC_LENGTH);
if (!StringUtils.equals(content, topic.getContent())){
topic.setContent(super.filterScriptAndStyle(content));
//�����ı�����(Winter Lau, 2006-5-12)
TextCacheManager.updateTextContent(
TopicBean.TYPE_BBS, topic.getId(), topic.getContent());
}
String keyword = super.autoFiltrate(topic.getSite(),log.getSearchKey());
boolean updateTags = false;
if (!StringUtils.equals(keyword, topic.getKeyword())) {
topic.setKeyword(keyword);
updateTags = true;
}
topic.setModifyTime(new Date());
if(topic.getSite().getOwner().getId()==loginUser.getId()){
topic.setTop(log.getTop() == 1);
topic.setElite(log.getElite() == 1);
}
BBSTopicDAO.update(topic, updateTags);
}
break;
}