Fix deleting object that have been persisted already from the DB
parent
401a250491
commit
a104cc2c62
|
@ -42,6 +42,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
public IClientAPI remoteClient;
|
public IClientAPI remoteClient;
|
||||||
public SceneObjectGroup objectGroup;
|
public SceneObjectGroup objectGroup;
|
||||||
public UUID folderID;
|
public UUID folderID;
|
||||||
|
public bool permissionToDelete;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -87,6 +88,7 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
dtis.folderID = folderID;
|
dtis.folderID = folderID;
|
||||||
dtis.objectGroup = objectGroup;
|
dtis.objectGroup = objectGroup;
|
||||||
dtis.remoteClient = remoteClient;
|
dtis.remoteClient = remoteClient;
|
||||||
|
dtis.permissionToDelete = permissionToDelete;
|
||||||
|
|
||||||
m_inventoryDeletes.Enqueue(dtis);
|
m_inventoryDeletes.Enqueue(dtis);
|
||||||
}
|
}
|
||||||
|
@ -127,6 +129,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
if (x.permissionToDelete)
|
||||||
|
m_scene.DeleteFromStorage(x.objectGroup.UUID);
|
||||||
m_scene.DeleteToInventory(x.destination, x.folderID, x.objectGroup, x.remoteClient);
|
m_scene.DeleteToInventory(x.destination, x.folderID, x.objectGroup, x.remoteClient);
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -1638,8 +1638,9 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="remoteClient"> </param>
|
/// <param name="remoteClient"> </param>
|
||||||
/// <param name="objectGroup"></param>
|
/// <param name="objectGroup"></param>
|
||||||
/// <param name="folderID"></param>
|
/// <param name="folderID"></param>
|
||||||
|
/// <param name="permissionToDelete"></param>
|
||||||
public virtual UUID DeleteToInventory(int destination, UUID folderID,
|
public virtual UUID DeleteToInventory(int destination, UUID folderID,
|
||||||
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
SceneObjectGroup objectGroup, IClientAPI remoteClient)
|
||||||
{
|
{
|
||||||
UUID assetID = UUID.Zero;
|
UUID assetID = UUID.Zero;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue