From 124f66bfc25984a01491b8447fa97bea2633281c Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 18 Aug 2009 22:17:47 -0700 Subject: jhurliman's patch in http://opensimulator.org/mantis/view.php?id=4024 --- .../CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs | 3 ++- .../Region/CoreModules/Avatar/Gestures/GesturesModule.cs | 6 ++++-- .../Avatar/Inventory/Transfer/InventoryTransferModule.cs | 13 ++++++------- .../ServiceConnectorsOut/Inventory/HGInventoryBroker.cs | 3 +-- .../CoreModules/World/Permissions/PermissionsModule.cs | 9 ++++++--- 5 files changed, 19 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/CoreModules') diff --git a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 582beee..35c59aa 100644 --- a/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/AvatarFactory/AvatarFactoryModule.cs @@ -130,7 +130,8 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory } else { - InventoryItemBase baseItem = invService.GetItem(new InventoryItemBase(appearance.Wearables[i].ItemID)); + InventoryItemBase baseItem = new InventoryItemBase(appearance.Wearables[i].ItemID, userID); + baseItem = invService.GetItem(baseItem); if (baseItem != null) { diff --git a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs index a68db1b..ff12361 100644 --- a/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Gestures/GesturesModule.cs @@ -65,7 +65,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures { IInventoryService invService = m_scene.InventoryService; - InventoryItemBase item = invService.GetItem(new InventoryItemBase(gestureId)); + InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); + item = invService.GetItem(item); if (item != null) { item.Flags = 1; @@ -80,7 +81,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Gestures { IInventoryService invService = m_scene.InventoryService; - InventoryItemBase item = invService.GetItem(new InventoryItemBase(gestureId)); + InventoryItemBase item = new InventoryItemBase(gestureId, client.AgentId); + item = invService.GetItem(item); if (item != null) { item.Flags = 0; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs index 5315c11..3a65336 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Transfer/InventoryTransferModule.cs @@ -257,8 +257,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer invService.GetFolderForType(client.AgentId, AssetType.TrashFolder); UUID inventoryEntityID = new UUID(im.imSessionID); // The inventory item/folder, back from it's trip - - InventoryItemBase item = invService.GetItem(new InventoryItemBase(inventoryEntityID)); + + InventoryItemBase item = new InventoryItemBase(inventoryEntityID, client.AgentId); + item = invService.GetItem(item); InventoryFolderBase folder = null; if (item != null && trashFolder != null) @@ -271,7 +272,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer } else { - folder = invService.GetFolder(new InventoryFolderBase(inventoryEntityID)); + folder = new InventoryFolderBase(inventoryEntityID, client.AgentId); + folder = invService.GetFolder(folder); if (folder != null & trashFolder != null) { @@ -451,10 +453,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Transfer else { UUID itemID = new UUID(msg.binaryBucket, 1); - InventoryItemBase item = new InventoryItemBase(); - - item.ID = itemID; - item.Owner = user.ControllingClient.AgentId; + InventoryItemBase item = new InventoryItemBase(itemID, user.ControllingClient.AgentId); // Fetch from service // diff --git a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs index dd451ef..492598e 100644 --- a/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs +++ b/OpenSim/Region/CoreModules/ServiceConnectorsOut/Inventory/HGInventoryBroker.cs @@ -483,12 +483,11 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Inventory string userInventoryServerURI = HGNetworkServersInfo.ServerURI(uinfo.UserProfile.UserInventoryURI); string uri = m_LocalGridInventoryURI.TrimEnd('/'); - m_log.DebugFormat("[HG INVENTORY CONNECTOR]: IsLocalGridUser, comparing {0} to {1}.", userInventoryServerURI, uri); - if ((userInventoryServerURI == uri) || (userInventoryServerURI == "")) { return true; } + m_log.DebugFormat("[HG INVENTORY CONNECTOR]: user is foreign({0} - {1})", userInventoryServerURI, uri); return false; } diff --git a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs index 9c71b41..f360577 100644 --- a/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs +++ b/OpenSim/Region/CoreModules/World/Permissions/PermissionsModule.cs @@ -966,7 +966,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (objectID == UUID.Zero) // User inventory { IInventoryService invService = m_scene.InventoryService; - InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(notecard)); + InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); + assetRequestItem = invService.GetItem(assetRequestItem); if (assetRequestItem == null) // Library item { assetRequestItem = scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); @@ -1385,7 +1386,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (objectID == UUID.Zero) // User inventory { IInventoryService invService = m_scene.InventoryService; - InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(script)); + InventoryItemBase assetRequestItem = new InventoryItemBase(script, user); + assetRequestItem = invService.GetItem(assetRequestItem); if (assetRequestItem == null) // Library item { assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(script); @@ -1479,7 +1481,8 @@ namespace OpenSim.Region.CoreModules.World.Permissions if (objectID == UUID.Zero) // User inventory { IInventoryService invService = m_scene.InventoryService; - InventoryItemBase assetRequestItem = invService.GetItem(new InventoryItemBase(notecard)); + InventoryItemBase assetRequestItem = new InventoryItemBase(notecard, user); + assetRequestItem = invService.GetItem(assetRequestItem); if (assetRequestItem == null) // Library item { assetRequestItem = m_scene.CommsManager.UserProfileCacheService.LibraryRoot.FindItem(notecard); -- cgit v1.1