diff options
author | Justin Clarke Casey | 2008-05-01 20:47:33 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2008-05-01 20:47:33 +0000 |
commit | 1de6cffa28348975a2492ce1e8a85c365df4dfaf (patch) | |
tree | 6431e5598defd603a4b2a8c5020b65d7df5a56a7 /OpenSim/Data/MySQL/MySQLInventoryData.cs | |
parent | create pass through of UserManagerBase to plugin calls (diff) | |
download | opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.zip opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.gz opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.bz2 opensim-SC_OLD-1de6cffa28348975a2492ce1e8a85c365df4dfaf.tar.xz |
* Refactor: Remove the unused userID parameter that was being passed into almost every inventory method
* This allows lots of redundant inventory methods with only slightly different names to be eliminated.
Diffstat (limited to 'OpenSim/Data/MySQL/MySQLInventoryData.cs')
-rw-r--r-- | OpenSim/Data/MySQL/MySQLInventoryData.cs | 63 |
1 files changed, 7 insertions, 56 deletions
diff --git a/OpenSim/Data/MySQL/MySQLInventoryData.cs b/OpenSim/Data/MySQL/MySQLInventoryData.cs index c9765c0..b529d4e 100644 --- a/OpenSim/Data/MySQL/MySQLInventoryData.cs +++ b/OpenSim/Data/MySQL/MySQLInventoryData.cs | |||
@@ -332,62 +332,13 @@ namespace OpenSim.Data.MySQL | |||
332 | item.InvType = (int) reader["invType"]; | 332 | item.InvType = (int) reader["invType"]; |
333 | item.Creator = new LLUUID((string) reader["creatorID"]); | 333 | item.Creator = new LLUUID((string) reader["creatorID"]); |
334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; | 334 | item.BasePermissions = (uint) reader["inventoryBasePermissions"]; |
335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; | 335 | item.EveryOnePermissions = (uint) reader["inventoryEveryOnePermissions"]; |
336 | 336 | item.SalePrice = (int) reader["salePrice"]; | |
337 | try | 337 | item.SaleType = Convert.ToByte(reader["saleType"]); |
338 | { | 338 | item.CreationDate = (int) reader["creationDate"]; |
339 | item.SalePrice = (int) reader["salePrice"]; | 339 | item.GroupID = new LLUUID(reader["groupID"].ToString()); |
340 | } | 340 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); |
341 | catch (InvalidCastException) | 341 | item.Flags = (uint) reader["flags"]; |
342 | { | ||
343 | m_log.WarnFormat("Could not cast salePrice {0} to {1}", reader["salePrice"], "int"); | ||
344 | } | ||
345 | |||
346 | try | ||
347 | { | ||
348 | item.SaleType = Convert.ToByte(reader["saleType"]); | ||
349 | } | ||
350 | catch (InvalidCastException) | ||
351 | { | ||
352 | m_log.WarnFormat("Could not convert saleType {0} to {1}", reader["saleType"], "byte"); | ||
353 | } | ||
354 | |||
355 | try | ||
356 | { | ||
357 | item.CreationDate = (int) reader["creationDate"]; | ||
358 | } | ||
359 | catch (InvalidCastException) | ||
360 | { | ||
361 | m_log.WarnFormat("Could not cast creationDate {0} to {1}", reader["creationDate"], "int"); | ||
362 | } | ||
363 | |||
364 | try | ||
365 | { | ||
366 | item.GroupID = new LLUUID(reader["groupID"].ToString()); | ||
367 | } | ||
368 | catch (Exception) | ||
369 | { | ||
370 | item.GroupID = LLUUID.Zero; | ||
371 | m_log.WarnFormat("Could not convert groupID {0} to {1}", reader["groupID"], "LLUUID"); | ||
372 | } | ||
373 | |||
374 | try | ||
375 | { | ||
376 | item.GroupOwned = Convert.ToBoolean(reader["groupOwned"]); | ||
377 | } | ||
378 | catch (InvalidCastException) | ||
379 | { | ||
380 | m_log.WarnFormat("Could not cast groupOwned {0} to {1}", reader["groupOwned"], "boolean"); | ||
381 | } | ||
382 | |||
383 | try | ||
384 | { | ||
385 | item.Flags = (uint) reader["flags"]; | ||
386 | } | ||
387 | catch (InvalidCastException) | ||
388 | { | ||
389 | m_log.WarnFormat("Could not cast flags {0} to {1}", reader["flags"], "uint"); | ||
390 | } | ||
391 | 342 | ||
392 | return item; | 343 | return item; |
393 | } | 344 | } |