mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged RETURN-OF-THE-API (5.2.0) to 5.2.N (5.2.1)
128597 jvonka: REPO-900: Fix "autoRename not working if using a relativePath (with create/add node via json request)" git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@129175 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1589,6 +1589,10 @@ public class NodesImpl implements Nodes
|
||||
props = mapToNodeProperties(nodeInfo.getProperties());
|
||||
}
|
||||
|
||||
// Optionally, lookup by relative path
|
||||
String relativePath = nodeInfo.getRelativePath();
|
||||
parentNodeRef = getOrCreatePath(parentNodeRef, relativePath);
|
||||
|
||||
// Existing file/folder name handling
|
||||
boolean autoRename = Boolean.valueOf(parameters.getParameter(PARAM_AUTO_RENAME));
|
||||
if (autoRename && (isContent || isSubClass(nodeTypeQName, ContentModel.TYPE_FOLDER)))
|
||||
@@ -1601,9 +1605,6 @@ public class NodesImpl implements Nodes
|
||||
}
|
||||
}
|
||||
|
||||
String relativePath = nodeInfo.getRelativePath();
|
||||
parentNodeRef = getOrCreatePath(parentNodeRef, relativePath);
|
||||
|
||||
QName assocTypeQName = ContentModel.ASSOC_CONTAINS;
|
||||
if ((nodeInfo.getAssociation() != null) && (nodeInfo.getAssociation().getAssocType() != null))
|
||||
{
|
||||
|
Reference in New Issue
Block a user