Accidentally committed too early

Revert "Allow item links to be deleted even when other deletes and purges are disabled."

This reverts commit 491279f99a.
This commit is contained in:
Justin Clark-Casey (justincc)
2011-05-18 00:23:35 +01:00
parent c562b9ef19
commit 6dcc87b1ad
8 changed files with 30 additions and 149 deletions

View File

@@ -411,30 +411,12 @@ namespace OpenSim.Services.InventoryService
public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs)
{
if (!m_AllowDelete)
{
// We must still allow links and links to folders to be deleted, otherwise they will build up
// in the player's inventory until they can no longer log in. Deletions of links due to code bugs or
// similar is inconvenient but on a par with accidental movement of items. The original item is never
// touched.
foreach (UUID id in itemIDs)
{
if (!m_Database.DeleteItems(
new string[] { "inventoryID", "assetType" },
new string[] { id.ToString(), ((sbyte)AssetType.Link).ToString() }));
{
m_Database.DeleteItems(
new string[] { "inventoryID", "assetType" },
new string[] { id.ToString(), ((sbyte)AssetType.LinkFolder).ToString() });
}
}
}
else
{
// Just use the ID... *facepalms*
//
foreach (UUID id in itemIDs)
m_Database.DeleteItems("inventoryID", id.ToString());
}
return false;
// Just use the ID... *facepalms*
//
foreach (UUID id in itemIDs)
m_Database.DeleteItems("inventoryID", id.ToString());
return true;
}