aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes
diff options
context:
space:
mode:
authorJustin Clarke Casey2008-05-03 18:13:32 +0000
committerJustin Clarke Casey2008-05-03 18:13:32 +0000
commita5dfca8958a28da415719ba880a77138ec205842 (patch)
treed5dfd209e082ee17e565e50cc17acc977b8b0565 /OpenSim/Region/Environment/Scenes
parent* Refactor: remove pointless agentId parameter from CachedUserInfo.AddItem() (diff)
downloadopensim-SC-a5dfca8958a28da415719ba880a77138ec205842.zip
opensim-SC-a5dfca8958a28da415719ba880a77138ec205842.tar.gz
opensim-SC-a5dfca8958a28da415719ba880a77138ec205842.tar.bz2
opensim-SC-a5dfca8958a28da415719ba880a77138ec205842.tar.xz
* Refactor: remove redundant userId parameter from UpdateItem() and DeleteItem()
* Put warning in remove folder method about non implementation (not that this is used anyway - may be legacy)
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs21
1 files changed, 16 insertions, 5 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index baca696..59c45fa 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -136,7 +136,7 @@ namespace OpenSim.Region.Environment.Scenes
136 AssetCache.AddAsset(asset); 136 AssetCache.AddAsset(asset);
137 137
138 item.AssetID = asset.FullID; 138 item.AssetID = asset.FullID;
139 userInfo.UpdateItem(remoteClient.AgentId, item); 139 userInfo.UpdateItem(item);
140 140
141 // remoteClient.SendInventoryItemCreateUpdate(item); 141 // remoteClient.SendInventoryItemCreateUpdate(item);
142 if ((InventoryType) item.InvType == InventoryType.Notecard) 142 if ((InventoryType) item.InvType == InventoryType.Notecard)
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Environment.Scenes
294 item.SaleType = itemUpd.SaleType; 294 item.SaleType = itemUpd.SaleType;
295 item.Flags = itemUpd.Flags; 295 item.Flags = itemUpd.Flags;
296 296
297 userInfo.UpdateItem(remoteClient.AgentId, item); 297 userInfo.UpdateItem(item);
298 } 298 }
299 else 299 else
300 { 300 {
@@ -486,7 +486,7 @@ namespace OpenSim.Region.Environment.Scenes
486 item.Name = newName; 486 item.Name = newName;
487 } 487 }
488 item.Folder = folderID; 488 item.Folder = folderID;
489 userInfo.DeleteItem(remoteClient.AgentId, item); 489 userInfo.DeleteItem(item);
490 490
491 // TODO: preserve current permissions? 491 // TODO: preserve current permissions?
492 AddInventoryItem(remoteClient, item); 492 AddInventoryItem(remoteClient, item);
@@ -630,11 +630,17 @@ namespace OpenSim.Region.Environment.Scenes
630 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID); 630 InventoryItemBase item = userInfo.RootFolder.HasItem(itemID);
631 if (item != null) 631 if (item != null)
632 { 632 {
633 userInfo.DeleteItem(remoteClient.AgentId, item); 633 userInfo.DeleteItem(item);
634 } 634 }
635 } 635 }
636 } 636 }
637 637
638 /// <summary>
639 /// Removes an inventory folder. Although there is a packet in the Linden protocol for this, it may be
640 /// legacy and not currently used (purge folder is used to remove folders from trash instead).
641 /// </summary>
642 /// <param name="remoteClient"></param>
643 /// <param name="folderID"></param>
638 private void RemoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID) 644 private void RemoveInventoryFolder(IClientAPI remoteClient, LLUUID folderID)
639 { 645 {
640 CachedUserInfo userInfo 646 CachedUserInfo userInfo
@@ -648,10 +654,15 @@ namespace OpenSim.Region.Environment.Scenes
648 if (userInfo.RootFolder != null) 654 if (userInfo.RootFolder != null)
649 { 655 {
650 InventoryItemBase folder = userInfo.RootFolder.HasItem(folderID); 656 InventoryItemBase folder = userInfo.RootFolder.HasItem(folderID);
657
651 if (folder != null) 658 if (folder != null)
652 { 659 {
660 m_log.WarnFormat(
661 "[AGENT INVENTORY]: Remove folder not implemented in request by {0} {1} for {2}",
662 remoteClient.Name, remoteClient.AgentId, folderID);
663
653 // doesn't work just yet, commented out. will fix in next patch. 664 // doesn't work just yet, commented out. will fix in next patch.
654 // userInfo.DeleteItem(remoteClient.AgentId, folder); 665 // userInfo.DeleteItem(folder);
655 } 666 }
656 } 667 }
657 } 668 }