aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/InventoryService/XInventoryService.cs
diff options
context:
space:
mode:
authorTom2011-05-26 03:42:45 -0700
committerTom2011-05-26 03:42:45 -0700
commit03525959c96a76cf555923f9441407bddd538398 (patch)
tree2c293d455250908de315bd2de805e510538963d3 /OpenSim/Services/InventoryService/XInventoryService.cs
parentSome additional protection, it seems that responsedata needs to be locked, bu... (diff)
parentAdd PayPrice to serialization format Xml2 (diff)
downloadopensim-SC-03525959c96a76cf555923f9441407bddd538398.zip
opensim-SC-03525959c96a76cf555923f9441407bddd538398.tar.gz
opensim-SC-03525959c96a76cf555923f9441407bddd538398.tar.bz2
opensim-SC-03525959c96a76cf555923f9441407bddd538398.tar.xz
Merge branch 'careminster-presence-refactor' of ssh://3dhosting.de/var/git/careminster into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Services/InventoryService/XInventoryService.cs')
-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 }