A better purge of trash folder.

This commit is contained in:
Diva Canto
2009-08-19 00:13:51 -07:00
parent e5f33e7505
commit c5af39239f
20 changed files with 107 additions and 54 deletions

View File

@@ -105,8 +105,8 @@ namespace OpenSim.Server.Handlers.Inventory
"POST", "/PurgeFolder/", m_InventoryService.PurgeFolder, CheckAuthSession));
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<InventoryItemBase, bool>(
"POST", "/DeleteItem/", m_InventoryService.DeleteItem, CheckAuthSession));
new RestDeserialiseSecureHandler<List<Guid>, bool>(
"POST", "/DeleteItem/", DeleteItems, CheckAuthSession));
m_httpServer.AddStreamHandler(
new RestDeserialiseSecureHandler<InventoryItemBase, InventoryItemBase>(
@@ -247,6 +247,15 @@ namespace OpenSim.Server.Handlers.Inventory
return m_InventoryService.GetAssetPermissions(item.Owner, item.AssetID);
}
public bool DeleteItems(List<Guid> items)
{
List<UUID> uuids = new List<UUID>();
foreach (Guid g in items)
uuids.Add(new UUID(g));
// oops we lost the user info here. Bad bad handlers
return m_InventoryService.DeleteItems(UUID.Zero, uuids);
}
#endregion
/// <summary>