aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2013-07-21 14:34:43 -0700
committerDiva Canto2013-07-26 15:53:21 -0700
commit5e094bcd460680c115e3c43a156bce193a5bdcb2 (patch)
tree108372d223748ab1ce046ed304a4878c43a78401
parentCommitting the same fix here for the infinity problem on TPs. (diff)
downloadopensim-SC_OLD-5e094bcd460680c115e3c43a156bce193a5bdcb2.zip
opensim-SC_OLD-5e094bcd460680c115e3c43a156bce193a5bdcb2.tar.gz
opensim-SC_OLD-5e094bcd460680c115e3c43a156bce193a5bdcb2.tar.bz2
opensim-SC_OLD-5e094bcd460680c115e3c43a156bce193a5bdcb2.tar.xz
Add the Current Outfit folder as an available folder in the SuitcaseInventory.
-rw-r--r--OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs16
1 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
index 784f136..50552c1 100644
--- a/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
+++ b/OpenSim/Services/HypergridService/HGSuitcaseInventoryService.cs
@@ -472,6 +472,18 @@ namespace OpenSim.Services.HypergridService
472 return null; 472 return null;
473 } 473 }
474 474
475 private XInventoryFolder GetCurrentOutfitXFolder(UUID userID)
476 {
477 XInventoryFolder[] folders = m_Database.GetFolders(
478 new string[] { "agentID", "type" },
479 new string[] { userID.ToString(), ((int)AssetType.CurrentOutfitFolder).ToString() });
480
481 if (folders.Length == 0)
482 return null;
483
484 return folders[0];
485 }
486
475 private XInventoryFolder GetSuitcaseXFolder(UUID principalID) 487 private XInventoryFolder GetSuitcaseXFolder(UUID principalID)
476 { 488 {
477 // Warp! Root folder for travelers 489 // Warp! Root folder for travelers
@@ -510,6 +522,7 @@ namespace OpenSim.Services.HypergridService
510 if (m_SuitcaseTrees.TryGetValue(principalID, out t)) 522 if (m_SuitcaseTrees.TryGetValue(principalID, out t))
511 return t; 523 return t;
512 524
525 // Get the tree of the suitcase folder
513 t = GetFolderTreeRecursive(folder); 526 t = GetFolderTreeRecursive(folder);
514 m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes 527 m_SuitcaseTrees.AddOrUpdate(principalID, t, 5*60); // 5minutes
515 return t; 528 return t;
@@ -555,6 +568,9 @@ namespace OpenSim.Services.HypergridService
555 List<XInventoryFolder> tree = new List<XInventoryFolder>(); 568 List<XInventoryFolder> tree = new List<XInventoryFolder>();
556 tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder 569 tree.Add(suitcase); // Warp! the tree is the real root folder plus the children of the suitcase folder
557 tree.AddRange(GetFolderTree(principalID, suitcase.folderID)); 570 tree.AddRange(GetFolderTree(principalID, suitcase.folderID));
571 // Also add the Current Outfit folder to the list of available folders
572 tree.Add(GetCurrentOutfitXFolder(principalID));
573
558 XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl) 574 XInventoryFolder f = tree.Find(delegate(XInventoryFolder fl)
559 { 575 {
560 if (fl.folderID == folderID) return true; 576 if (fl.folderID == folderID) return true;