aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/Scene.Inventory.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/Scene.Inventory.cs51
1 files changed, 29 insertions, 22 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
index a284ba5..850962d 100644
--- a/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
+++ b/OpenSim/Region/Environment/Scenes/Scene.Inventory.cs
@@ -1690,31 +1690,32 @@ namespace OpenSim.Region.Environment.Scenes
1690 //returnstring += "</scene>\n"; 1690 //returnstring += "</scene>\n";
1691 1691
1692 1692
1693 CachedUserInfo userInfo = 1693
1694 CommsManager.UserProfileCacheService.GetUserDetails(AgentId);
1695 if (userInfo != null)
1696 {
1697 LLUUID folderID = LLUUID.Zero;
1698
1699 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
1700 foreach (InventoryFolderBase flder in subrootfolders)
1701 {
1702 if (flder.Name == "Lost And Found")
1703 {
1704 folderID = flder.ID;
1705 break;
1706 }
1707 }
1708
1709 if (folderID == LLUUID.Zero)
1710 {
1711 folderID = userInfo.RootFolder.ID;
1712 }
1713 1694
1714 bool permissionToDelete = false; 1695 bool permissionToDelete = false;
1715 1696
1716 for (int i = 0; i < returnobjects.Length; i++) 1697 for (int i = 0; i < returnobjects.Length; i++)
1717 { 1698 {
1699 CachedUserInfo userInfo =
1700 CommsManager.UserProfileCacheService.GetUserDetails(returnobjects[i].OwnerID);
1701 if (userInfo != null)
1702 {
1703 LLUUID folderID = LLUUID.Zero;
1704
1705 List<InventoryFolderBase> subrootfolders = userInfo.RootFolder.RequestListOfFolders();
1706 foreach (InventoryFolderBase flder in subrootfolders)
1707 {
1708 if (flder.Name == "Lost And Found")
1709 {
1710 folderID = flder.ID;
1711 break;
1712 }
1713 }
1714
1715 if (folderID == LLUUID.Zero)
1716 {
1717 folderID = userInfo.RootFolder.ID;
1718 }
1718 permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(returnobjects[i].UUID, AgentId); 1719 permissionToDelete = ExternalChecks.ExternalChecksCanDeleteObject(returnobjects[i].UUID, AgentId);
1719 1720
1720 // If the user doesn't have permission, go on to the next one. 1721 // If the user doesn't have permission, go on to the next one.
@@ -1732,7 +1733,7 @@ namespace OpenSim.Region.Environment.Scenes
1732 1733
1733 InventoryItemBase item = new InventoryItemBase(); 1734 InventoryItemBase item = new InventoryItemBase();
1734 item.Creator = returnobjects[i].RootPart.CreatorID; 1735 item.Creator = returnobjects[i].RootPart.CreatorID;
1735 item.Owner = AgentId; 1736 item.Owner = returnobjects[i].OwnerID;
1736 item.ID = LLUUID.Random(); 1737 item.ID = LLUUID.Random();
1737 item.AssetID = asset.FullID; 1738 item.AssetID = asset.FullID;
1738 item.Description = asset.Description; 1739 item.Description = asset.Description;
@@ -1768,7 +1769,13 @@ namespace OpenSim.Region.Environment.Scenes
1768 // TODO: add the new fields (Flags, Sale info, etc) 1769 // TODO: add the new fields (Flags, Sale info, etc)
1769 1770
1770 userInfo.AddItem(item); 1771 userInfo.AddItem(item);
1771 1772
1773 ScenePresence notifyUser = GetScenePresence(item.Owner);
1774 if (notifyUser != null)
1775 {
1776 notifyUser.ControllingClient.SendInventoryItemCreateUpdate(item);
1777 }
1778
1772 SceneObjectGroup ObjectDeleting = returnobjects[i]; 1779 SceneObjectGroup ObjectDeleting = returnobjects[i];
1773 1780
1774 returnobjects[i] = null; 1781 returnobjects[i] = null;