use of net.jforum.view.admin.common.ModerationCommon in project jforum2 by rafaelsteil.
the class CategoryAction method editSave.
// Save information
public void editSave() {
Category c = new Category(ForumRepository.getCategory(this.request.getIntParameter("categories_id")));
c.setName(this.request.getParameter("category_name"));
c.setModerated("1".equals(this.request.getParameter("moderate")));
this.cm.update(c);
ForumRepository.reloadCategory(c);
new ModerationCommon().setForumsModerationStatus(c, c.isModerated());
this.list();
}
use of net.jforum.view.admin.common.ModerationCommon in project jforum2 by rafaelsteil.
the class ForumAction method editSave.
public void editSave() {
ForumDAO forumDao = DataAccessDriver.getInstance().newForumDAO();
Forum f = forumDao.selectById(this.request.getIntParameter("forum_id"));
boolean moderated = f.isModerated();
int categoryId = f.getCategoryId();
f.setDescription(this.request.getParameter("description"));
f.setIdCategories(this.request.getIntParameter("categories_id"));
f.setName(this.request.getParameter("forum_name"));
f.setModerated("1".equals(this.request.getParameter("moderate")));
forumDao.update(f);
if (moderated != f.isModerated()) {
new ModerationCommon().setTopicModerationStatus(f.getId(), f.isModerated());
}
if (categoryId != f.getCategoryId()) {
f.setIdCategories(categoryId);
ForumRepository.removeForum(f);
f.setIdCategories(this.request.getIntParameter("categories_id"));
ForumRepository.addForum(f);
} else {
ForumRepository.reloadForum(f.getId());
}
//this.handleMailIntegration();
this.list();
}
Aggregations