From 83ef13a79add392247ae8e36b419fdc8bc8c6b8b Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Fri, 3 Feb 2012 23:53:18 +0100 Subject: Changed save oar and save iar parameter -p|--profile to -h|--home, including corresponding RemoteAdmin parameter --- .../ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs | 4 ++-- .../Serialization/External/UserInventoryItemSerializer.cs | 4 ++-- .../Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs | 2 +- .../Avatar/Inventory/Archiver/InventoryArchiverModule.cs | 10 +++++----- OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs index 7f1a0ed..24570d6 100644 --- a/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs +++ b/OpenSim/ApplicationPlugins/RemoteController/RemoteAdminPlugin.cs @@ -1410,9 +1410,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController // options["version"] = (string)requestData["version"]; //} - if (requestData.Contains("profile")) + if (requestData.Contains("home")) { - options["profile"] = (string)requestData["profile"]; + options["home"] = (string)requestData["home"]; } if ((string)requestData["noassets"] == "true") diff --git a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs index f138437..b351703 100644 --- a/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs +++ b/OpenSim/Framework/Serialization/External/UserInventoryItemSerializer.cs @@ -305,14 +305,14 @@ namespace OpenSim.Framework.Serialization.External writer.WriteEndElement(); if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty) writer.WriteElementString("CreatorData", inventoryItem.CreatorData); - else if (options.ContainsKey("profile")) + else if (options.ContainsKey("home")) { if (userAccountService != null) { UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid); if (account != null) { - writer.WriteElementString("CreatorData", (string)options["profile"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName); + writer.WriteElementString("CreatorData", (string)options["home"] + "/" + inventoryItem.CreatorIdAsUuid + ";" + account.FirstName + " " + account.LastName); } writer.WriteElementString("CreatorID", inventoryItem.CreatorId); } diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs index 36ecb3b..5238325 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs @@ -415,7 +415,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver { int majorVersion, minorVersion; - if (options.ContainsKey("profile")) + if (options.ContainsKey("home")) { majorVersion = 1; minorVersion = 2; diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs index 09b4ba6..a81f36c 100644 --- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs @@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver scene.AddCommand( this, "save iar", - "save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]", + "save iar [-h|--home=] [--noassets] [] [-c|--creators] [-v|--verbose]", "Save user inventory archive (IAR).", " is the user's first name." + Environment.NewLine + " is the user's last name." + Environment.NewLine @@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.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; }); + ops.Add("h|home=", delegate(string v) { options["home"] = v; }); ops.Add("v|verbose", delegate(string v) { options["verbose"] = v; }); ops.Add("c|creators", delegate(string v) { options["creators"] = v; }); ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); @@ -408,13 +408,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver if (mainParams.Count < 6) { m_log.Error( - "[INVENTORY ARCHIVER]: usage is save iar [-p|--profile=] [--noassets] [] [-c|--creators] [-v|--verbose]"); + "[INVENTORY ARCHIVER]: usage is save iar [-h|--home=] [--noassets] [] [-c|--creators] [-v|--verbose]"); return; } m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); - if (options.ContainsKey("profile")) - m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -profile option if you want to produce a compatible IAR"); + if (options.ContainsKey("home")) + m_log.WarnFormat("[INVENTORY ARCHIVER]: Please be aware that inventory archives with creator information are not compatible with OpenSim 0.7.0.2 and earlier. Do not use the -home option if you want to produce a compatible IAR"); string firstName = mainParams[2]; string lastName = mainParams[3]; diff --git a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs index 948aac8..8e29e3c 100644 --- a/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs +++ b/OpenSim/Region/CoreModules/World/Archiver/AssetsRequest.cs @@ -310,10 +310,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver protected AssetBase PostProcess(AssetBase asset) { - if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("profile")) + if (asset.Type == (sbyte)AssetType.Object && asset.Data != null && m_options.ContainsKey("home")) { //m_log.DebugFormat("[ARCHIVER]: Rewriting object data for {0}", asset.ID); - string xml = ExternalRepresentationUtils.RewriteSOP(Utils.BytesToString(asset.Data), m_options["profile"].ToString(), m_userAccountService, m_scopeID); + string xml = ExternalRepresentationUtils.RewriteSOP(Utils.BytesToString(asset.Data), m_options["home"].ToString(), m_userAccountService, m_scopeID); asset.Data = Utils.StringToBytes(xml); } return asset; -- cgit v1.1