aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/InventoryService
diff options
context:
space:
mode:
authorBlueWall2011-05-19 01:35:11 -0400
committerBlueWall2011-05-19 01:35:11 -0400
commit584bce36acd00c2e5cc10d3cd8eb6f491acaca13 (patch)
tree1e640ad8658b739bdd8031420971c279716b88db /OpenSim/Services/InventoryService
parentAdd stub for llGetLinkNumberOfSides(integer link) (diff)
parentAllow item links to be deleted even when other deletes and purges are disabled. (diff)
downloadopensim-SC_OLD-584bce36acd00c2e5cc10d3cd8eb6f491acaca13.zip
opensim-SC_OLD-584bce36acd00c2e5cc10d3cd8eb6f491acaca13.tar.gz
opensim-SC_OLD-584bce36acd00c2e5cc10d3cd8eb6f491acaca13.tar.bz2
opensim-SC_OLD-584bce36acd00c2e5cc10d3cd8eb6f491acaca13.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/InventoryService/XInventoryService.cs34
1 files changed, 28 insertions, 6 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs
index 0af35c8..2282ee8 100644
--- a/OpenSim/Services/InventoryService/XInventoryService.cs
+++ b/OpenSim/Services/InventoryService/XInventoryService.cs
@@ -393,6 +393,10 @@ namespace OpenSim.Services.InventoryService
393 393
394 public virtual bool UpdateItem(InventoryItemBase item) 394 public virtual bool UpdateItem(InventoryItemBase item)
395 { 395 {
396 if (!m_AllowDelete)
397 if (item.AssetType == (sbyte)AssetType.Link || item.AssetType == (sbyte)AssetType.LinkFolder)
398 return false;
399
396 return m_Database.StoreItem(ConvertFromOpenSim(item)); 400 return m_Database.StoreItem(ConvertFromOpenSim(item));
397 } 401 }
398 402
@@ -411,12 +415,30 @@ namespace OpenSim.Services.InventoryService
411 public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs) 415 public virtual bool DeleteItems(UUID principalID, List<UUID> itemIDs)
412 { 416 {
413 if (!m_AllowDelete) 417 if (!m_AllowDelete)
414 return false; 418 {
415 419 // We must still allow links and links to folders to be deleted, otherwise they will build up
416 // Just use the ID... *facepalms* 420 // in the player's inventory until they can no longer log in. Deletions of links due to code bugs or
417 // 421 // similar is inconvenient but on a par with accidental movement of items. The original item is never
418 foreach (UUID id in itemIDs) 422 // touched.
419 m_Database.DeleteItems("inventoryID", id.ToString()); 423 foreach (UUID id in itemIDs)
424 {
425 if (!m_Database.DeleteItems(
426 new string[] { "inventoryID", "assetType" },
427 new string[] { id.ToString(), ((sbyte)AssetType.Link).ToString() }));
428 {
429 m_Database.DeleteItems(
430 new string[] { "inventoryID", "assetType" },
431 new string[] { id.ToString(), ((sbyte)AssetType.LinkFolder).ToString() });
432 }
433 }
434 }
435 else
436 {
437 // Just use the ID... *facepalms*
438 //
439 foreach (UUID id in itemIDs)
440 m_Database.DeleteItems("inventoryID", id.ToString());
441 }
420 442
421 return true; 443 return true;
422 } 444 }