* removed always true if
parent
d82ed9a8c5
commit
d508d77122
|
@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications
|
||||||
if (typeInterface != null)
|
if (typeInterface != null)
|
||||||
{
|
{
|
||||||
IInventoryData plug =
|
IInventoryData plug =
|
||||||
(IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
(IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString()));
|
||||||
plug.Initialise();
|
plug.Initialise();
|
||||||
m_plugins.Add(plug.getName(), plug);
|
m_plugins.Add(plug.getName(), plug);
|
||||||
MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface");
|
MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface");
|
||||||
|
@ -74,44 +74,41 @@ namespace OpenSim.Framework.Communications
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID)
|
public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID)
|
||||||
{
|
{
|
||||||
LLUUID userID = new LLUUID(rawUserID);
|
LLUUID userID = new LLUUID(rawUserID);
|
||||||
return RequestFirstLevelFolders(userID);
|
return RequestFirstLevelFolders(userID);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
|
/// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userID"></param>
|
/// <param name="userID"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
|
public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID)
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>();
|
||||||
InventoryFolderBase rootFolder = null;
|
InventoryFolderBase rootFolder = null;
|
||||||
|
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
{
|
{
|
||||||
rootFolder = plugin.Value.getUserRootFolder(userID);
|
rootFolder = plugin.Value.getUserRootFolder(userID);
|
||||||
if (rootFolder != null)
|
if (rootFolder != null)
|
||||||
{
|
{
|
||||||
MainLog.Instance.Verbose(
|
MainLog.Instance.Verbose(
|
||||||
"INVENTORY",
|
"INVENTORY",
|
||||||
"Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
|
"Found root folder for user with ID " + userID + ". Retrieving inventory contents.");
|
||||||
|
|
||||||
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
|
inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID);
|
||||||
inventoryList.Insert(0, rootFolder);
|
inventoryList.Insert(0, rootFolder);
|
||||||
return inventoryList;
|
return inventoryList;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (null == rootFolder)
|
MainLog.Instance.Warn(
|
||||||
{
|
"INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
|
||||||
MainLog.Instance.Warn(
|
|
||||||
"INVENTORY", "Could not find a root folder belonging to user with ID " + userID);
|
|
||||||
}
|
|
||||||
|
|
||||||
return inventoryList;
|
return inventoryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue