aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Data/NHibernate/NHibernateInventoryData.cs45
1 files changed, 16 insertions, 29 deletions
diff --git a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
index 8305646..fa75588 100644
--- a/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
+++ b/OpenSim/Data/NHibernate/NHibernateInventoryData.cs
@@ -392,22 +392,15 @@ namespace OpenSim.Data.NHibernate
392 { 392 {
393 using (ISession session = factory.OpenSession()) 393 using (ISession session = factory.OpenSession())
394 { 394 {
395 // try 395 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
396 // { 396 criteria.Add(Expression.Eq("ParentID", LLUUID.Zero));
397 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); 397 criteria.Add(Expression.Eq("Owner", user));
398 criteria.Add(Expression.Eq("ParentID", LLUUID.Zero)); 398 foreach (InventoryFolderBase folder in criteria.List())
399 criteria.Add(Expression.Eq("Owner", user)); 399 {
400 foreach (InventoryFolderBase folder in criteria.List()) 400 return folder;
401 { 401 }
402 return folder; 402 m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user);
403 } 403 return null;
404 m_log.ErrorFormat("No Inventory Root Folder Found for: {0}", user);
405 return new InventoryFolderBase();
406// }
407// catch
408// {
409// return new InventoryFolderBase();
410// }
411 } 404 }
412 } 405 }
413 406
@@ -420,19 +413,13 @@ namespace OpenSim.Data.NHibernate
420 { 413 {
421 using (ISession session = factory.OpenSession()) 414 using (ISession session = factory.OpenSession())
422 { 415 {
423 // try 416
424// { 417 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase));
425 ICriteria criteria = session.CreateCriteria(typeof(InventoryFolderBase)); 418 criteria.Add(Expression.Eq("ParentID", parentID));
426 criteria.Add(Expression.Eq("ParentID", parentID)); 419 foreach (InventoryFolderBase item in criteria.List())
427 foreach (InventoryFolderBase item in criteria.List()) 420 {
428 { 421 folders.Add(item);
429 folders.Add(item); 422 }
430 }
431 // }
432 // catch
433 // {
434 // m_log.ErrorFormat("Can't run getInventoryFolders for Folder ID: {0}", parentID);
435 // }
436 } 423 }
437 } 424 }
438 425