diff options
Merge branch 'master' into careminster-presence-refactor
Diffstat (limited to 'OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs index 702eab9..d948b82 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/ArchiveReadRequest.cs | |||
@@ -78,6 +78,19 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
78 | /// </summary> | 78 | /// </summary> |
79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); | 79 | private IDictionary<UUID, bool> m_validUserUuids = new Dictionary<UUID, bool>(); |
80 | 80 | ||
81 | private IUserManagement m_UserMan; | ||
82 | private IUserManagement UserManager | ||
83 | { | ||
84 | get | ||
85 | { | ||
86 | if (m_UserMan == null) | ||
87 | { | ||
88 | m_UserMan = m_scene.RequestModuleInterface<IUserManagement>(); | ||
89 | } | ||
90 | return m_UserMan; | ||
91 | } | ||
92 | } | ||
93 | |||
81 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) | 94 | public ArchiveReadRequest(Scene scene, string loadPath, bool merge, bool skipAssets, Guid requestId) |
82 | { | 95 | { |
83 | m_scene = scene; | 96 | m_scene = scene; |
@@ -251,8 +264,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
251 | 264 | ||
252 | foreach (SceneObjectPart part in sceneObject.Parts) | 265 | foreach (SceneObjectPart part in sceneObject.Parts) |
253 | { | 266 | { |
254 | if (!ResolveUserUuid(part.CreatorID)) | 267 | if (part.CreatorData == null || part.CreatorData == string.Empty) |
255 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 268 | { |
269 | if (!ResolveUserUuid(part.CreatorID)) | ||
270 | part.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
271 | } | ||
272 | if (UserManager != null) | ||
273 | UserManager.AddUser(part.CreatorID, part.CreatorData); | ||
256 | 274 | ||
257 | if (!ResolveUserUuid(part.OwnerID)) | 275 | if (!ResolveUserUuid(part.OwnerID)) |
258 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 276 | part.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
@@ -293,10 +311,13 @@ namespace OpenSim.Region.CoreModules.World.Archiver | |||
293 | { | 311 | { |
294 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 312 | kvp.Value.OwnerID = m_scene.RegionInfo.EstateSettings.EstateOwner; |
295 | } | 313 | } |
296 | if (!ResolveUserUuid(kvp.Value.CreatorID)) | 314 | if (kvp.Value.CreatorData == null || kvp.Value.CreatorData == string.Empty) |
297 | { | 315 | { |
298 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | 316 | if (!ResolveUserUuid(kvp.Value.CreatorID)) |
317 | kvp.Value.CreatorID = m_scene.RegionInfo.EstateSettings.EstateOwner; | ||
299 | } | 318 | } |
319 | if (UserManager != null) | ||
320 | UserManager.AddUser(kvp.Value.CreatorID, kvp.Value.CreatorData); | ||
300 | } | 321 | } |
301 | part.TaskInventory.LockItemsForRead(false); | 322 | part.TaskInventory.LockItemsForRead(false); |
302 | } | 323 | } |