mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 04:53:16 +00:00
[DS-596] Cannot Delete Community which has two or more levels of SubCommunities
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5298 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -1056,6 +1056,13 @@ public class Community extends DSpaceObject
|
||||
|
||||
if (parent != null)
|
||||
{
|
||||
// remove the subcommunities first
|
||||
Community[] subcommunities = getSubcommunities();
|
||||
for (int i = 0; i < subcommunities.length; i++)
|
||||
{
|
||||
subcommunities[i].delete();
|
||||
}
|
||||
// now let the parent remove the community
|
||||
parent.removeSubcommunity(this);
|
||||
|
||||
return;
|
||||
@@ -1085,12 +1092,12 @@ public class Community extends DSpaceObject
|
||||
removeCollection(cols[i]);
|
||||
}
|
||||
|
||||
// Remove subcommunities
|
||||
// delete subcommunities
|
||||
Community[] comms = getSubcommunities();
|
||||
|
||||
for (int j = 0; j < comms.length; j++)
|
||||
{
|
||||
removeSubcommunity(comms[j]);
|
||||
comms[j].delete();
|
||||
}
|
||||
|
||||
// Remove the logo
|
||||
|
Reference in New Issue
Block a user