aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules/Avatar/Inventory
diff options
context:
space:
mode:
authorAliciaRaven2014-09-13 04:25:31 +0100
committerJustin Clark-Casey (justincc)2014-09-23 00:04:59 +0100
commit1e220911938ef3d16cee0112b81333a60b3e5d52 (patch)
tree8f7104983c4760c06b721ce4b0211ec4817b7b6e /OpenSim/Region/CoreModules/Avatar/Inventory
parentAdd an event callback for loading IAR files. The callback for creating them a... (diff)
downloadopensim-SC_OLD-1e220911938ef3d16cee0112b81333a60b3e5d52.zip
opensim-SC_OLD-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.gz
opensim-SC_OLD-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.bz2
opensim-SC_OLD-1e220911938ef3d16cee0112b81333a60b3e5d52.tar.xz
Modifications to previous IAR commits to bring them more inline with existing OpenSim code conventions. Also include new IAR save switch in console help print out.
Diffstat (limited to 'OpenSim/Region/CoreModules/Avatar/Inventory')
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs11
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs6
2 files changed, 10 insertions, 7 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
index 401a238..9fb8aa5 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiveWriteRequest.cs
@@ -57,7 +57,8 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
57 public bool SaveAssets { get; set; } 57 public bool SaveAssets { get; set; }
58 58
59 /// <summary> 59 /// <summary>
60 /// Determine whether this archive will filter content based on inventory permissions. Default is false 60 /// Determines which items will be included in the archive, according to their permissions.
61 /// Default is null, meaning no permission checks.
61 /// </summary> 62 /// </summary>
62 public string FilterContent { get; set; } 63 public string FilterContent { get; set; }
63 64
@@ -139,7 +140,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
139 m_assetGatherer = new UuidGatherer(m_scene.AssetService); 140 m_assetGatherer = new UuidGatherer(m_scene.AssetService);
140 141
141 SaveAssets = true; 142 SaveAssets = true;
142 FilterContent = string.Empty; 143 FilterContent = null;
143 } 144 }
144 145
145 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut) 146 protected void ReceivedAllAssets(ICollection<UUID> assetsFoundUuids, ICollection<UUID> assetsNotFoundUuids, bool timedOut)
@@ -287,7 +288,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
287 /// <returns>Whether the user is allowed to export the object to an IAR</returns> 288 /// <returns>Whether the user is allowed to export the object to an IAR</returns>
288 private bool CanUserArchiveObject(UUID UserID, InventoryItemBase InvItem) 289 private bool CanUserArchiveObject(UUID UserID, InventoryItemBase InvItem)
289 { 290 {
290 if (FilterContent == string.Empty) 291 if (FilterContent == null)
291 return true;// Default To Allow Export 292 return true;// Default To Allow Export
292 293
293 bool permitted = true; 294 bool permitted = true;
@@ -317,10 +318,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
317 SaveAssets = false; 318 SaveAssets = false;
318 319
319 // Set Permission filter if flag is set 320 // Set Permission filter if flag is set
320 if (options.ContainsKey("perm")) 321 if (options.ContainsKey("checkPermissions"))
321 { 322 {
322 Object temp; 323 Object temp;
323 if (options.TryGetValue("perm", out temp)) 324 if (options.TryGetValue("checkPermissions", out temp))
324 FilterContent = temp.ToString().ToUpper(); 325 FilterContent = temp.ToString().ToUpper();
325 } 326 }
326 327
diff --git a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
index b85bbea..5b5987d 100644
--- a/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Inventory/Archiver/InventoryArchiverModule.cs
@@ -141,7 +141,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
141 + "-e|--exclude=<name/uuid> don't save the inventory item in archive" + Environment.NewLine 141 + "-e|--exclude=<name/uuid> don't save the inventory item in archive" + Environment.NewLine
142 + "-f|--excludefolder=<folder/uuid> don't save contents of the folder in archive" + Environment.NewLine 142 + "-f|--excludefolder=<folder/uuid> don't save contents of the folder in archive" + Environment.NewLine
143 + "-v|--verbose extra debug messages.\n" 143 + "-v|--verbose extra debug messages.\n"
144 + "--noassets stops assets being saved to the IAR.", 144 + "--noassets stops assets being saved to the IAR."
145 + "--perm=<permissions> stops items with insufficient permissions from being saved to the IAR.\n"
146 + " <permissions> can contain one or more of these characters: \"C\" = Copy, \"T\" = Transfer, \"M\" = Modify.\n",
145 HandleSaveInvConsoleCommand); 147 HandleSaveInvConsoleCommand);
146 148
147 m_aScene = scene; 149 m_aScene = scene;
@@ -455,7 +457,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Inventory.Archiver
455 options["excludefolders"] = new List<String>(); 457 options["excludefolders"] = new List<String>();
456 ((List<String>)options["excludefolders"]).Add(v); 458 ((List<String>)options["excludefolders"]).Add(v);
457 }); 459 });
458 ops.Add("perm=", delegate(string v) { options["perm"] = v; }); 460 ops.Add("perm=", delegate(string v) { options["checkPermissions"] = v; });
459 461
460 List<string> mainParams = ops.Parse(cmdparams); 462 List<string> mainParams = ops.Parse(cmdparams);
461 463