Changed save oar and save iar parameter -p|--profile to -h|--home, including corresponding RemoteAdmin parameter

iar_mods
Snoopy Pfeffer 2012-02-03 23:53:18 +01:00
parent 1a18948935
commit 83ef13a79a
5 changed files with 12 additions and 12 deletions

View File

@ -1410,9 +1410,9 @@ namespace OpenSim.ApplicationPlugins.RemoteController
// options["version"] = (string)requestData["version"]; // 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") if ((string)requestData["noassets"] == "true")

View File

@ -305,14 +305,14 @@ namespace OpenSim.Framework.Serialization.External
writer.WriteEndElement(); writer.WriteEndElement();
if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty) if (options.ContainsKey("creators") && inventoryItem.CreatorData != null && inventoryItem.CreatorData != string.Empty)
writer.WriteElementString("CreatorData", inventoryItem.CreatorData); writer.WriteElementString("CreatorData", inventoryItem.CreatorData);
else if (options.ContainsKey("profile")) else if (options.ContainsKey("home"))
{ {
if (userAccountService != null) if (userAccountService != null)
{ {
UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid); UserAccount account = userAccountService.GetUserAccount(UUID.Zero, inventoryItem.CreatorIdAsUuid);
if (account != null) 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); writer.WriteElementString("CreatorID", inventoryItem.CreatorId);
} }

View File

@ -415,7 +415,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
{ {
int majorVersion, minorVersion; int majorVersion, minorVersion;
if (options.ContainsKey("profile")) if (options.ContainsKey("home"))
{ {
majorVersion = 1; majorVersion = 1;
minorVersion = 2; minorVersion = 2;

View File

@ -122,7 +122,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
scene.AddCommand( scene.AddCommand(
this, "save iar", this, "save iar",
"save iar [-p|--profile=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [-c|--creators] [-v|--verbose]", "save iar [-h|--home=<url>] [--noassets] <first> <last> <inventory path> <password> [<IAR path>] [-c|--creators] [-v|--verbose]",
"Save user inventory archive (IAR).", "Save user inventory archive (IAR).",
"<first> is the user's first name." + Environment.NewLine "<first> is the user's first name." + Environment.NewLine
+ "<last> is the user's last name." + Environment.NewLine + "<last> is the user's last name." + Environment.NewLine
@ -396,7 +396,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
OptionSet ops = new OptionSet(); OptionSet ops = new OptionSet();
//ops.Add("v|version=", delegate(string v) { options["version"] = v; }); //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("v|verbose", delegate(string v) { options["verbose"] = v; });
ops.Add("c|creators", delegate(string v) { options["creators"] = v; }); ops.Add("c|creators", delegate(string v) { options["creators"] = v; });
ops.Add("noassets", delegate(string v) { options["noassets"] = v != null; }); 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) if (mainParams.Count < 6)
{ {
m_log.Error( m_log.Error(
"[INVENTORY ARCHIVER]: usage is save iar [-p|--profile=<url>] [--noassets] <first name> <last name> <inventory path> <user password> [<save file path>] [-c|--creators] [-v|--verbose]"); "[INVENTORY ARCHIVER]: usage is save iar [-h|--home=<url>] [--noassets] <first name> <last name> <inventory path> <user password> [<save file path>] [-c|--creators] [-v|--verbose]");
return; return;
} }
m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME."); m_log.Info("[INVENTORY ARCHIVER]: PLEASE NOTE THAT THIS FACILITY IS EXPERIMENTAL. BUG REPORTS WELCOME.");
if (options.ContainsKey("profile")) 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 -profile option if you want to produce a compatible IAR"); 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 firstName = mainParams[2];
string lastName = mainParams[3]; string lastName = mainParams[3];

View File

@ -310,10 +310,10 @@ namespace OpenSim.Region.CoreModules.World.Archiver
protected AssetBase PostProcess(AssetBase asset) 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); //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); asset.Data = Utils.StringToBytes(xml);
} }
return asset; return asset;