* Minor: If a user exists but has no inventory in standalone, automatically create new inventory folders
* This mirrors the grid behaviour0.6.0-stable
parent
48fc4ee059
commit
93303072dd
|
@ -79,7 +79,7 @@ namespace OpenSim.Framework.Communications
|
||||||
// See IInventoryServices
|
// See IInventoryServices
|
||||||
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
public List<InventoryFolderBase> GetInventorySkeleton(LLUUID userId)
|
||||||
{
|
{
|
||||||
m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
|
// m_log.DebugFormat("[AGENT INVENTORY]: Getting inventory skeleton for {0}", userId);
|
||||||
|
|
||||||
InventoryFolderBase rootFolder = RequestRootFolder(userId);
|
InventoryFolderBase rootFolder = RequestRootFolder(userId);
|
||||||
|
|
||||||
|
@ -87,9 +87,10 @@ namespace OpenSim.Framework.Communications
|
||||||
if (null == rootFolder)
|
if (null == rootFolder)
|
||||||
{
|
{
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
|
||||||
|
|
||||||
List<InventoryFolderBase> userFolders = new List<InventoryFolderBase>();
|
|
||||||
userFolders.Add(rootFolder);
|
userFolders.Add(rootFolder);
|
||||||
|
|
||||||
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
foreach (KeyValuePair<string, IInventoryData> plugin in m_plugins)
|
||||||
|
|
|
@ -299,7 +299,7 @@ namespace OpenSim.Grid.UserServer
|
||||||
// In theory, the user will only ever be missing a root folder in situations where a grid
|
// In theory, the user will only ever be missing a root folder in situations where a grid
|
||||||
// which didn't previously run a grid wide inventory server is being transitioned to one
|
// which didn't previously run a grid wide inventory server is being transitioned to one
|
||||||
// which does.
|
// which does.
|
||||||
if (null == folders | folders.Count == 0)
|
if (null == folders || folders.Count == 0)
|
||||||
{
|
{
|
||||||
m_log.Warn(
|
m_log.Warn(
|
||||||
"[LOGIN]: " +
|
"[LOGIN]: " +
|
||||||
|
|
|
@ -217,47 +217,32 @@ namespace OpenSim.Region.Communications.Local
|
||||||
{
|
{
|
||||||
List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
|
List<InventoryFolderBase> folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
|
||||||
|
|
||||||
if (folders.Count > 0)
|
// If we have user auth but no inventory folders for some reason, create a new set of folders.
|
||||||
|
if (null == folders || 0 == folders.Count)
|
||||||
{
|
{
|
||||||
LLUUID rootID = LLUUID.Zero;
|
m_Parent.InventoryService.CreateNewUserInventory(userID);
|
||||||
ArrayList AgentInventoryArray = new ArrayList();
|
folders = m_Parent.InventoryService.GetInventorySkeleton(userID);
|
||||||
Hashtable TempHash;
|
|
||||||
foreach (InventoryFolderBase InvFolder in folders)
|
|
||||||
{
|
|
||||||
if (InvFolder.parentID == LLUUID.Zero)
|
|
||||||
{
|
|
||||||
rootID = InvFolder.folderID;
|
|
||||||
}
|
|
||||||
TempHash = new Hashtable();
|
|
||||||
TempHash["name"] = InvFolder.name;
|
|
||||||
TempHash["parent_id"] = InvFolder.parentID.ToString();
|
|
||||||
TempHash["version"] = (Int32) InvFolder.version;
|
|
||||||
TempHash["type_default"] = (Int32) InvFolder.type;
|
|
||||||
TempHash["folder_id"] = InvFolder.folderID.ToString();
|
|
||||||
AgentInventoryArray.Add(TempHash);
|
|
||||||
}
|
|
||||||
return new InventoryData(AgentInventoryArray, rootID);
|
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
LLUUID rootID = LLUUID.Zero;
|
||||||
|
ArrayList AgentInventoryArray = new ArrayList();
|
||||||
|
Hashtable TempHash;
|
||||||
|
foreach (InventoryFolderBase InvFolder in folders)
|
||||||
{
|
{
|
||||||
AgentInventory userInventory = new AgentInventory();
|
if (InvFolder.parentID == LLUUID.Zero)
|
||||||
userInventory.CreateRootFolder(userID);
|
|
||||||
|
|
||||||
ArrayList AgentInventoryArray = new ArrayList();
|
|
||||||
Hashtable TempHash;
|
|
||||||
foreach (InventoryFolder InvFolder in userInventory.InventoryFolders.Values)
|
|
||||||
{
|
{
|
||||||
TempHash = new Hashtable();
|
rootID = InvFolder.folderID;
|
||||||
TempHash["name"] = InvFolder.FolderName;
|
|
||||||
TempHash["parent_id"] = InvFolder.ParentID.ToString();
|
|
||||||
TempHash["version"] = (Int32) InvFolder.Version;
|
|
||||||
TempHash["type_default"] = (Int32) InvFolder.DefaultType;
|
|
||||||
TempHash["folder_id"] = InvFolder.FolderID.ToString();
|
|
||||||
AgentInventoryArray.Add(TempHash);
|
|
||||||
}
|
}
|
||||||
|
TempHash = new Hashtable();
|
||||||
return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
|
TempHash["name"] = InvFolder.name;
|
||||||
|
TempHash["parent_id"] = InvFolder.parentID.ToString();
|
||||||
|
TempHash["version"] = (Int32) InvFolder.version;
|
||||||
|
TempHash["type_default"] = (Int32) InvFolder.type;
|
||||||
|
TempHash["folder_id"] = InvFolder.folderID.ToString();
|
||||||
|
AgentInventoryArray.Add(TempHash);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return new InventoryData(AgentInventoryArray, rootID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1208,6 +1208,8 @@ namespace OpenSim.Region.Environment.Scenes
|
||||||
/// <param name="flags"></param>
|
/// <param name="flags"></param>
|
||||||
public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID)
|
public void DuplicateObject(uint originalPrim, LLVector3 offset, uint flags, LLUUID AgentID, LLUUID GroupID)
|
||||||
{
|
{
|
||||||
|
m_log.DebugFormat("[SCENE]: Duplication of object {0} at offset {1} requested by agent {2}", originalPrim, offset, AgentID);
|
||||||
|
|
||||||
List<EntityBase> EntityList = GetEntities();
|
List<EntityBase> EntityList = GetEntities();
|
||||||
|
|
||||||
SceneObjectGroup originPrim = null;
|
SceneObjectGroup originPrim = null;
|
||||||
|
|
Loading…
Reference in New Issue