mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Fixed issue where discussions were lost after checkin & updated version number
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2230 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -694,19 +694,17 @@ public class ForumsBean implements IContextListener
|
|||||||
ForumModel.ASSOC_DISCUSSION, RegexQNamePattern.MATCH_ALL);
|
ForumModel.ASSOC_DISCUSSION, RegexQNamePattern.MATCH_ALL);
|
||||||
|
|
||||||
// there should only be one child, retrieve it if there is
|
// there should only be one child, retrieve it if there is
|
||||||
if (children.size() == 1)
|
if (children.size() != 1)
|
||||||
{
|
{
|
||||||
|
throw new IllegalStateException("Node has the discussable aspect but does not have 1 child, it has " +
|
||||||
|
children.size() + " children!");
|
||||||
|
}
|
||||||
|
|
||||||
// show the forum for the discussion
|
// show the forum for the discussion
|
||||||
NodeRef forumNodeRef = children.get(0).getChildRef();
|
NodeRef forumNodeRef = children.get(0).getChildRef();
|
||||||
this.browseBean.clickSpace(forumNodeRef);
|
this.browseBean.clickSpace(forumNodeRef);
|
||||||
context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum");
|
context.getApplication().getNavigationHandler().handleNavigation(context, null, "showForum");
|
||||||
}
|
}
|
||||||
else if (logger.isWarnEnabled())
|
|
||||||
{
|
|
||||||
logger.warn("Node has the discussable aspect but does not have 1 child, it has " +
|
|
||||||
children.size() + " children!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the user confirms they wish to delete a forum space
|
* Called when the user confirms they wish to delete a forum space
|
||||||
|
@@ -34,7 +34,6 @@ import org.alfresco.service.cmr.repository.NodeRef;
|
|||||||
import org.alfresco.service.namespace.QName;
|
import org.alfresco.service.namespace.QName;
|
||||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||||
import org.alfresco.web.app.Application;
|
import org.alfresco.web.app.Application;
|
||||||
import org.alfresco.web.bean.repository.Node;
|
|
||||||
import org.alfresco.web.bean.repository.Repository;
|
import org.alfresco.web.bean.repository.Repository;
|
||||||
import org.alfresco.web.ui.common.Utils;
|
import org.alfresco.web.ui.common.Utils;
|
||||||
import org.alfresco.web.ui.common.component.UIActionLink;
|
import org.alfresco.web.ui.common.component.UIActionLink;
|
||||||
@@ -107,7 +106,7 @@ public class NewDiscussionWizard extends NewTopicWizard
|
|||||||
this.nodeService.addAspect(forumNodeRef, ContentModel.ASPECT_UIFACETS, uiFacetsProps);
|
this.nodeService.addAspect(forumNodeRef, ContentModel.ASPECT_UIFACETS, uiFacetsProps);
|
||||||
|
|
||||||
if (logger.isDebugEnabled())
|
if (logger.isDebugEnabled())
|
||||||
logger.debug("created forum for content: " + forumNodeRef.toString());
|
logger.debug("created forum for content: " + this.discussingNodeRef.toString());
|
||||||
|
|
||||||
// commit the transaction
|
// commit the transaction
|
||||||
tx.commit();
|
tx.commit();
|
||||||
|
Reference in New Issue
Block a user