diff options
Diffstat (limited to 'OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs')
-rw-r--r-- | OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs index 4da6c3d..e3a9a22 100644 --- a/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs +++ b/OpenSim/Capabilities/Handlers/FetchInventory/FetchInvDescHandler.cs | |||
@@ -403,10 +403,7 @@ namespace OpenSim.Capabilities.Handlers | |||
403 | return contents; | 403 | return contents; |
404 | } | 404 | } |
405 | contents = fetchedContents; | 405 | contents = fetchedContents; |
406 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | 406 | InventoryFolderBase containingFolder = m_InventoryService.GetFolder(agentID, folderID); |
407 | containingFolder.ID = folderID; | ||
408 | containingFolder.Owner = agentID; | ||
409 | containingFolder = m_InventoryService.GetFolder(containingFolder); | ||
410 | 407 | ||
411 | if (containingFolder != null) | 408 | if (containingFolder != null) |
412 | { | 409 | { |
@@ -429,7 +426,7 @@ namespace OpenSim.Capabilities.Handlers | |||
429 | { | 426 | { |
430 | if (item.AssetType == (int)AssetType.Link) | 427 | if (item.AssetType == (int)AssetType.Link) |
431 | { | 428 | { |
432 | InventoryItemBase linkedItem = m_InventoryService.GetItem(new InventoryItemBase(item.AssetID)); | 429 | InventoryItemBase linkedItem = m_InventoryService.GetItem(agentID, item.AssetID); |
433 | 430 | ||
434 | // Take care of genuinely broken links where the target doesn't exist | 431 | // Take care of genuinely broken links where the target doesn't exist |
435 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, | 432 | // HACK: Also, don't follow up links that just point to other links. In theory this is legitimate, |
@@ -659,10 +656,7 @@ from docs seems this was never a spec | |||
659 | // Must fetch it individually | 656 | // Must fetch it individually |
660 | else if (contents.FolderID == UUID.Zero) | 657 | else if (contents.FolderID == UUID.Zero) |
661 | { | 658 | { |
662 | InventoryFolderBase containingFolder = new InventoryFolderBase(); | 659 | InventoryFolderBase containingFolder = m_InventoryService.GetFolder(freq.owner_id, freq.folder_id); |
663 | containingFolder.ID = freq.folder_id; | ||
664 | containingFolder.Owner = freq.owner_id; | ||
665 | containingFolder = m_InventoryService.GetFolder(containingFolder); | ||
666 | 660 | ||
667 | if (containingFolder != null) | 661 | if (containingFolder != null) |
668 | { | 662 | { |
@@ -759,12 +753,9 @@ from docs seems this was never a spec | |||
759 | m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); | 753 | m_log.WarnFormat("[WEB FETCH INV DESC HANDLER]: GetMultipleItems failed. Falling back to fetching inventory items one by one."); |
760 | linked = new InventoryItemBase[itemIDs.Count]; | 754 | linked = new InventoryItemBase[itemIDs.Count]; |
761 | int i = 0; | 755 | int i = 0; |
762 | InventoryItemBase item = new InventoryItemBase(); | ||
763 | item.Owner = freq.owner_id; | ||
764 | foreach (UUID id in itemIDs) | 756 | foreach (UUID id in itemIDs) |
765 | { | 757 | { |
766 | item.ID = id; | 758 | linked[i++] = m_InventoryService.GetItem(freq.owner_id, id); |
767 | linked[i++] = m_InventoryService.GetItem(item); | ||
768 | } | 759 | } |
769 | } | 760 | } |
770 | 761 | ||
@@ -850,4 +841,4 @@ from docs seems this was never a spec | |||
850 | public InventoryCollection Collection; | 841 | public InventoryCollection Collection; |
851 | public int Descendents; | 842 | public int Descendents; |
852 | } | 843 | } |
853 | } \ No newline at end of file | 844 | } |