diff options
author | lbsa71 | 2007-12-27 21:06:44 +0000 |
---|---|---|
committer | lbsa71 | 2007-12-27 21:06:44 +0000 |
commit | d508d771220a97e28a79f08c429d39dd0e87862d (patch) | |
tree | ca8fa37283ec0b87a426f22cb92d6e1ec2a3b7a2 /OpenSim/Framework | |
parent | * Fixed MonoSQLite Update Table routine (diff) | |
download | opensim-SC-d508d771220a97e28a79f08c429d39dd0e87862d.zip opensim-SC-d508d771220a97e28a79f08c429d39dd0e87862d.tar.gz opensim-SC-d508d771220a97e28a79f08c429d39dd0e87862d.tar.bz2 opensim-SC-d508d771220a97e28a79f08c429d39dd0e87862d.tar.xz |
* removed always true if
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/Communications/InventoryServiceBase.cs | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/OpenSim/Framework/Communications/InventoryServiceBase.cs b/OpenSim/Framework/Communications/InventoryServiceBase.cs index 0797a84..534383a 100644 --- a/OpenSim/Framework/Communications/InventoryServiceBase.cs +++ b/OpenSim/Framework/Communications/InventoryServiceBase.cs | |||
@@ -65,7 +65,7 @@ namespace OpenSim.Framework.Communications | |||
65 | if (typeInterface != null) | 65 | if (typeInterface != null) |
66 | { | 66 | { |
67 | IInventoryData plug = | 67 | IInventoryData plug = |
68 | (IInventoryData) Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); | 68 | (IInventoryData)Activator.CreateInstance(pluginAssembly.GetType(pluginType.ToString())); |
69 | plug.Initialise(); | 69 | plug.Initialise(); |
70 | m_plugins.Add(plug.getName(), plug); | 70 | m_plugins.Add(plug.getName(), plug); |
71 | MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); | 71 | MainLog.Instance.Verbose("AGENTINVENTORY", "Added IInventoryData Interface"); |
@@ -74,44 +74,41 @@ namespace OpenSim.Framework.Communications | |||
74 | } | 74 | } |
75 | } | 75 | } |
76 | } | 76 | } |
77 | 77 | ||
78 | public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID) | 78 | public List<InventoryFolderBase> RequestFirstLevelFolders(Guid rawUserID) |
79 | { | 79 | { |
80 | LLUUID userID = new LLUUID(rawUserID); | 80 | LLUUID userID = new LLUUID(rawUserID); |
81 | return RequestFirstLevelFolders(userID); | 81 | return RequestFirstLevelFolders(userID); |
82 | } | 82 | } |
83 | 83 | ||
84 | /// <summary> | 84 | /// <summary> |
85 | /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) | 85 | /// Returns the root folder plus any folders in root (so down one level in the Inventory folders tree) |
86 | /// </summary> | 86 | /// </summary> |
87 | /// <param name="userID"></param> | 87 | /// <param name="userID"></param> |
88 | /// <returns></returns> | 88 | /// <returns></returns> |
89 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) | 89 | public List<InventoryFolderBase> RequestFirstLevelFolders(LLUUID userID) |
90 | { | 90 | { |
91 | List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); | 91 | List<InventoryFolderBase> inventoryList = new List<InventoryFolderBase>(); |
92 | InventoryFolderBase rootFolder = null; | 92 | InventoryFolderBase rootFolder = null; |
93 | 93 | ||
94 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) | 94 | foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins) |
95 | { | 95 | { |
96 | rootFolder = plugin.Value.getUserRootFolder(userID); | 96 | rootFolder = plugin.Value.getUserRootFolder(userID); |
97 | if (rootFolder != null) | 97 | if (rootFolder != null) |
98 | { | 98 | { |
99 | MainLog.Instance.Verbose( | 99 | MainLog.Instance.Verbose( |
100 | "INVENTORY", | 100 | "INVENTORY", |
101 | "Found root folder for user with ID " + userID + ". Retrieving inventory contents."); | 101 | "Found root folder for user with ID " + userID + ". Retrieving inventory contents."); |
102 | 102 | ||
103 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); | 103 | inventoryList = plugin.Value.getInventoryFolders(rootFolder.folderID); |
104 | inventoryList.Insert(0, rootFolder); | 104 | inventoryList.Insert(0, rootFolder); |
105 | return inventoryList; | 105 | return inventoryList; |
106 | } | 106 | } |
107 | } | 107 | } |
108 | 108 | ||
109 | if (null == rootFolder) | 109 | MainLog.Instance.Warn( |
110 | { | 110 | "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); |
111 | MainLog.Instance.Warn( | 111 | |
112 | "INVENTORY", "Could not find a root folder belonging to user with ID " + userID); | ||
113 | } | ||
114 | |||
115 | return inventoryList; | 112 | return inventoryList; |
116 | } | 113 | } |
117 | 114 | ||