mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-13 04:53:16 +00:00
Simulate a remove event at the site on deletion of a top level community
Fixes DS-1966
This commit is contained in:
@@ -1091,8 +1091,15 @@ public class Community extends DSpaceObject
|
|||||||
// will call rawDelete() before removing the linkage
|
// will call rawDelete() before removing the linkage
|
||||||
Community parent = getParentCommunity();
|
Community parent = getParentCommunity();
|
||||||
|
|
||||||
if (parent != null)
|
if (parent == null)
|
||||||
{
|
{
|
||||||
|
// if removing a top level Community, simulate a REMOVE event at the Site.
|
||||||
|
if (getParentCommunity() == null)
|
||||||
|
{
|
||||||
|
ourContext.addEvent(new Event(Event.REMOVE, Constants.SITE, Site.SITE_ID,
|
||||||
|
Constants.COMMUNITY, getID(), getHandle()));
|
||||||
|
}
|
||||||
|
} else {
|
||||||
// remove the subcommunities first
|
// remove the subcommunities first
|
||||||
Community[] subcommunities = getSubcommunities();
|
Community[] subcommunities = getSubcommunities();
|
||||||
for (int i = 0; i < subcommunities.length; i++)
|
for (int i = 0; i < subcommunities.length; i++)
|
||||||
|
Reference in New Issue
Block a user