function main()
{
// Get the shortname
var shortName = url.extension;
// Get the site
var site = siteService.getSite(shortName);
var patterns = new Array();
// Get the list of sites
var sites = siteService.listSites(null, null);
// Copen: select child patterns of current community only
if (sites != null)
{
for each (sitepat in sites)
{
if(sitepat.sitePreset == "pattern-dashboard")
{
var community = sitepat.description.substring(18, sitepat.description.indexOf("]", 0));
if( community == shortName)
{
var pat = siteService.getSite(sitepat.shortName);
patterns.push(pat);
}
}
}
}
if (site != null)
{
for(var i = 0; i < patterns.length; i++)
{
patterns[i].description = "communityRecovery";
patterns[i].save();
}
// Delete the site
site.deleteSite();
}
else
{
// Return 404
status.setCode(404, "The community " + shortName + " does not exist");
return;
}
}
main();
if( community == shortName)
{
var pat = siteService.getSite(sitepat.shortName);
patterns.push(pat);
}
if( community == "site2")
{
var pat = siteService.getSite(sitepat.shortName);
patterns.push(pat);
}
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.