Global creator information working on MySQL DB and on load/save OARs. Creator name properly shown on the viewer as first.last @authority.

New option added to save oar -profile=url. Migration on RegionStore making CreatorID be 255 chars.
Moved Handling of user UUID -> name requests to a new module UserManagement/UserManagementModule.
This commit is contained in:
Diva Canto
2010-11-21 13:16:52 -08:00
parent f1151f20dc
commit 6a9ae9e7cb
14 changed files with 434 additions and 56 deletions

View File

@@ -78,6 +78,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver
/// </summary>
private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>();
private IUserManagement m_UserMan;
private IUserManagement UserManager
{
get
{
if (m_UserMan == null)
{
m_UserMan = m_scene.RequestModuleInterface<IUserManagement>();
}
return m_UserMan;
}
}
public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId)
{
m_scene = scene;
@@ -251,8 +264,12 @@ namespace OpenSim.Region.CoreModules.World.Archiver
foreach (SceneObjectPart part in sceneObject.Parts)
{
if (!ResolveUserUuid(part.CreatorID))
part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
if (part.CreatorData == null || part.CreatorData == string.Empty)
{
if (!ResolveUserUuid(part.CreatorID))
part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner;
}
UserManager.AddUser(part.CreatorID, part.CreatorData);
if (!ResolveUserUuid(part.OwnerID))
part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner;

View File

@@ -126,6 +126,7 @@ namespace OpenSim.Region.CoreModules.World.Archiver
OptionSet ops = new OptionSet();
ops.Add("v|version=", delegate(string v) { options["version"] = v; });
ops.Add("p|profile=", delegate(string v) { options["profile"] = v; });
List<string> mainParams = ops.Parse(cmdparams);

View File

@@ -771,8 +771,14 @@ namespace OpenSim.Region.CoreModules.World.Estate
for (int i = 0; i < uuidarr.Length; i++)
{
// string lookupname = m_scene.CommsManager.UUIDNameRequestString(uuidarr[i]);
m_scene.GetUserName(uuidarr[i]);
IUserManagement userManager = m_scene.RequestModuleInterface<IUserManagement>();
string userName = "Unkown User";
if (userManager != null)
userName = userManager.GetUserName(uuidarr[i]);
// we drop it. It gets cached though... so we're ready for the next request.
// diva commnent 11/21/2010: uh?!? wft?
}
}
#endregion