mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
- fixed illegal character use in forum article names
- fixed navigation issue with editing rules - added links to details pages in forums area - you can no longer create spaces, forums or topics with illegal characters in the name git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2745 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -930,7 +930,7 @@ public class ForumsBean implements IContextListener
|
||||
StringBuilder name = new StringBuilder("posted-");
|
||||
|
||||
// add a timestamp
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy-hh:mm:ss");
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MM-yyyy-HH-mm-ss");
|
||||
name.append(dateFormat.format(new Date()));
|
||||
|
||||
// add the HTML file extension
|
||||
|
@@ -622,7 +622,7 @@ public abstract class BaseContentWizard extends AbstractWizardBean
|
||||
/**
|
||||
* Performs any processing sub classes may wish to do before commit is called
|
||||
*/
|
||||
protected void performCustomProcessing()
|
||||
protected void performCustomProcessing() throws Exception
|
||||
{
|
||||
// used by subclasses if necessary
|
||||
}
|
||||
|
@@ -24,6 +24,7 @@ import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.model.ForumModel;
|
||||
import org.alfresco.service.cmr.repository.ContentReader;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.web.app.AlfrescoNavigationHandler;
|
||||
import org.alfresco.web.bean.ForumsBean;
|
||||
import org.alfresco.web.bean.repository.Node;
|
||||
@@ -127,14 +128,25 @@ public class NewPostWizard extends CreateContentWizard
|
||||
* @see org.alfresco.web.bean.wizard.BaseContentWizard#performCustomProcessing()
|
||||
*/
|
||||
@Override
|
||||
protected void performCustomProcessing()
|
||||
protected void performCustomProcessing() throws Exception
|
||||
{
|
||||
if (this.editMode)
|
||||
{
|
||||
// update the content
|
||||
Node currentDocument = this.browseBean.getDocument();
|
||||
NodeRef postNode = this.browseBean.getDocument().getNodeRef();
|
||||
|
||||
ContentWriter writer = this.contentService.getWriter(currentDocument.getNodeRef(),
|
||||
// check that the name of this post does not contain the :
|
||||
// character (used in previous versions), if it does rename
|
||||
// the post.
|
||||
String name = (String)this.nodeService.getProperty(
|
||||
postNode, ContentModel.PROP_NAME);
|
||||
if (name.indexOf(":") != -1)
|
||||
{
|
||||
String newName = name.replace(':', '-');
|
||||
this.fileFolderService.rename(postNode, newName);
|
||||
}
|
||||
|
||||
ContentWriter writer = this.contentService.getWriter(postNode,
|
||||
ContentModel.PROP_CONTENT, true);
|
||||
if (writer != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user