From 35dec2e53a7e79f7a1cc6db954723ca9769c993b Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Fri, 28 Mar 2008 17:37:55 +0000 Subject: [PATCH] * Refactor: Eliminate RequestUsersRoot() redundant method --- .../Communications/InventoryServiceBase.cs | 20 ++++++++----------- .../Local/LocalInventoryService.cs | 2 +- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 78de4a52a3..595fa65a87 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs @@ -109,19 +109,10 @@ namespace OpenSim.Framework.Communications return inventoryList; } - // See IInventoryServices - public InventoryFolderBase RequestUsersRoot(LLUUID userID) - { - foreach (KeyValuePair plugin in m_plugins) - { - return plugin.Value.getUserRootFolder(userID); - } - return null; - } - // See IInventoryServices public void MoveInventoryFolder(LLUUID userID, InventoryFolderBase folder) { + // FIXME: Probably doesn't do what was originally intended - only ever queries the first plugin foreach (KeyValuePair plugin in m_plugins) { plugin.Value.moveInventoryFolder(folder); @@ -137,7 +128,12 @@ namespace OpenSim.Framework.Communications // See IInventoryServices public InventoryFolderBase RequestRootFolder(LLUUID userID) { - return RequestUsersRoot(userID); + // FIXME: Probably doesn't do what was originally intended - only ever queries the first plugin + foreach (KeyValuePair plugin in m_plugins) + { + return plugin.Value.getUserRootFolder(userID); + } + return null; } // See IInventoryServices @@ -149,7 +145,7 @@ namespace OpenSim.Framework.Communications // See IInventoryServices public void CreateNewUserInventory(LLUUID user) { - InventoryFolderBase existingRootFolder = RequestUsersRoot(user); + InventoryFolderBase existingRootFolder = RequestRootFolder(user); if (null != existingRootFolder) { diff --git a/OpenSim/Region/Communications/Local/LocalInventoryService.cs b/OpenSim/Region/Communications/Local/LocalInventoryService.cs index 3396d5cd2a..f154cd85ce 100644 --- a/OpenSim/Region/Communications/Local/LocalInventoryService.cs +++ b/OpenSim/Region/Communications/Local/LocalInventoryService.cs @@ -88,7 +88,7 @@ namespace OpenSim.Region.Communications.Local public override bool HasInventoryForUser(LLUUID userID) { - InventoryFolderBase root = RequestUsersRoot(userID); + InventoryFolderBase root = RequestRootFolder(userID); if (root == null) { return false;