Fixes mantis #3803. Thanks jhurliman.

0.6.6-post-fixes
diva 2009-06-11 20:27:13 +00:00
parent 6c1d6283e6
commit 2afd733229
8 changed files with 18 additions and 13 deletions

View File

@ -497,7 +497,7 @@ namespace OpenSim.Framework.Communications.Tests
{ {
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return null; return null;
} }

View File

@ -196,7 +196,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory
} }
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return new List<InventoryItemBase>(); return new List<InventoryItemBase>();
} }

View File

@ -170,9 +170,9 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory
m_InventoryService.GetUserInventory(userID, callback); m_InventoryService.GetUserInventory(userID, callback);
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return m_InventoryService.GetFolderItems(folderID); return m_InventoryService.GetFolderItems(userID, folderID);
} }
/// <summary> /// <summary>

View File

@ -163,7 +163,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectors.Inventory
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return new List<InventoryItemBase>(); return new List<InventoryItemBase>();
} }

View File

@ -159,7 +159,11 @@ namespace OpenSim.Server.Handlers.Inventory
{ {
List<InventoryItemBase> allItems = new List<InventoryItemBase>(); List<InventoryItemBase> allItems = new List<InventoryItemBase>();
List<InventoryItemBase> items = m_InventoryService.GetFolderItems(new UUID(folderID)); // TODO: UUID.Zero is passed as the userID here, making the old assumption that the OpenSim
// inventory server only has a single inventory database and not per-user inventory databases.
// This could be changed but it requirs a bit of hackery to pass another parameter into this
// callback
List<InventoryItemBase> items = m_InventoryService.GetFolderItems(UUID.Zero, new UUID(folderID));
if (items != null) if (items != null)
{ {

View File

@ -106,7 +106,7 @@ namespace OpenSim.Services.Connectors
{ {
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
return null; return null;
} }

View File

@ -72,9 +72,10 @@ namespace OpenSim.Services.Interfaces
/// <summary> /// <summary>
/// Gets the items inside a folder /// Gets the items inside a folder
/// </summary> /// </summary>
/// <param name="userID"></param>
/// <param name="folderID"></param> /// <param name="folderID"></param>
/// <returns></returns> /// <returns></returns>
List<InventoryItemBase> GetFolderItems(UUID folderID); List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID);
/// <summary> /// <summary>
/// Add a new folder to the user's inventory /// Add a new folder to the user's inventory

View File

@ -150,7 +150,7 @@ namespace OpenSim.Services.InventoryService
foreach (InventoryFolderBase folder in allFolders) foreach (InventoryFolderBase folder in allFolders)
{ {
List<InventoryItemBase> items = GetFolderItems(folder.ID); List<InventoryItemBase> items = GetFolderItems(userID, folder.ID);
if (items != null) if (items != null)
{ {
@ -205,7 +205,7 @@ namespace OpenSim.Services.InventoryService
{ {
rootFolder = new InventoryFolderImpl(folder); rootFolder = new InventoryFolderImpl(folder);
folders.Add(rootFolder); folders.Add(rootFolder);
items.AddRange(GetFolderItems(rootFolder.ID)); items.AddRange(GetFolderItems(userID, rootFolder.ID));
break; // Only 1 root folder per user break; // Only 1 root folder per user
} }
} }
@ -217,7 +217,7 @@ namespace OpenSim.Services.InventoryService
if (folder.ID != rootFolder.ID) if (folder.ID != rootFolder.ID)
{ {
folders.Add(new InventoryFolderImpl(folder)); folders.Add(new InventoryFolderImpl(folder));
items.AddRange(GetFolderItems(folder.ID)); items.AddRange(GetFolderItems(userID, folder.ID));
} }
} }
} }
@ -255,7 +255,7 @@ namespace OpenSim.Services.InventoryService
return inventoryList; return inventoryList;
} }
public List<InventoryItemBase> GetFolderItems(UUID folderID) public List<InventoryItemBase> GetFolderItems(UUID userID, UUID folderID)
{ {
List<InventoryItemBase> itemsList = new List<InventoryItemBase>(); List<InventoryItemBase> itemsList = new List<InventoryItemBase>();
@ -377,7 +377,7 @@ namespace OpenSim.Services.InventoryService
m_Database.deleteInventoryFolder(subFolder.ID); m_Database.deleteInventoryFolder(subFolder.ID);
} }
List<InventoryItemBase> items = GetFolderItems(folder.ID); List<InventoryItemBase> items = GetFolderItems(folder.Owner, folder.ID);
foreach (InventoryItemBase item in items) foreach (InventoryItemBase item in items)
{ {