mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged HEAD (5.2) to 5.2.N (5.2.1)
127614 jkaabimofrad: Merged API-STRIKES-BACK (5.2.0) to HEAD (5.2) 127461 jvonka: Fix RA-1011: REST API create site - can't create site with id/shortName = 'true' git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/5.2.N/root@127721 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -927,13 +927,14 @@ public class SitesImpl implements Sites
|
||||
}
|
||||
|
||||
String siteId = siteInfo.getShortName();
|
||||
NodeRef siteNodeRef = siteInfo.getNodeRef();
|
||||
|
||||
// default false (if not provided)
|
||||
boolean skipShareSurfConfig = Boolean.valueOf(parameters.getParameter(PARAM_SKIP_SURF_CONFIGURATION));
|
||||
if (skipShareSurfConfig == false)
|
||||
{
|
||||
// import default/fixed preset Share surf config
|
||||
importSite(siteId);
|
||||
importSite(siteId, siteNodeRef);
|
||||
}
|
||||
|
||||
// pre-create doclib
|
||||
@@ -943,7 +944,6 @@ public class SitesImpl implements Sites
|
||||
boolean skipAddToFavorites = Boolean.valueOf(parameters.getParameter(PARAM_SKIP_ADDTOFAVORITES));
|
||||
if (skipAddToFavorites == false)
|
||||
{
|
||||
NodeRef siteNodeRef = siteInfo.getNodeRef();
|
||||
String personId = AuthenticationUtil.getFullyAuthenticatedUser();
|
||||
favouritesService.addFavourite(personId, siteNodeRef); // ignore result
|
||||
}
|
||||
@@ -1012,11 +1012,10 @@ public class SitesImpl implements Sites
|
||||
return site;
|
||||
}
|
||||
|
||||
private void importSite(final String siteId)
|
||||
private void importSite(final String siteId, final NodeRef siteNodeRef)
|
||||
{
|
||||
ImportPackageHandler acpHandler = new SiteImportPackageHandler(siteSurfConfig, siteId);
|
||||
Location location = new Location(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
|
||||
location.setPath("/app:company_home/st:sites/cm:" + ISO9075.encode(siteId));
|
||||
Location location = new Location(siteNodeRef);
|
||||
ImporterBinding binding = new ImporterBinding()
|
||||
{
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user