diff options
author | Justin Clark-Casey (justincc) | 2012-05-04 20:37:21 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-05-04 20:37:21 +0100 |
commit | e83bc049dffba51a4d739d150cbd82a68453a0c6 (patch) | |
tree | 75cbed8858964209704e2a4dca341387e7a522c6 /OpenSim/Services/InventoryService/XInventoryService.cs | |
parent | Allow deleting folders even if they're not in the Trash (diff) | |
download | opensim-SC-e83bc049dffba51a4d739d150cbd82a68453a0c6.zip opensim-SC-e83bc049dffba51a4d739d150cbd82a68453a0c6.tar.gz opensim-SC-e83bc049dffba51a4d739d150cbd82a68453a0c6.tar.bz2 opensim-SC-e83bc049dffba51a4d739d150cbd82a68453a0c6.tar.xz |
refactor: Rename new DeleteFoldersEx/PurgeFoldersEx methods to DeleteFolders/PurgeFolders overloads as previously discussed with Oren - I think this makes more sense on balance
These overloads are not publicly available on core connectors or IInventoryService.
Diffstat (limited to 'OpenSim/Services/InventoryService/XInventoryService.cs')
-rw-r--r-- | OpenSim/Services/InventoryService/XInventoryService.cs | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/OpenSim/Services/InventoryService/XInventoryService.cs b/OpenSim/Services/InventoryService/XInventoryService.cs index 37a6a42..15156d0 100644 --- a/OpenSim/Services/InventoryService/XInventoryService.cs +++ b/OpenSim/Services/InventoryService/XInventoryService.cs | |||
@@ -52,6 +52,7 @@ namespace OpenSim.Services.InventoryService | |||
52 | : this(config, "InventoryService") | 52 | : this(config, "InventoryService") |
53 | { | 53 | { |
54 | } | 54 | } |
55 | |||
55 | public XInventoryService(IConfigSource config, string configName) : base(config) | 56 | public XInventoryService(IConfigSource config, string configName) : base(config) |
56 | { | 57 | { |
57 | if (configName != string.Empty) | 58 | if (configName != string.Empty) |
@@ -364,10 +365,10 @@ namespace OpenSim.Services.InventoryService | |||
364 | // | 365 | // |
365 | public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) | 366 | public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs) |
366 | { | 367 | { |
367 | return DeleteFoldersEx(principalID, folderIDs, true); | 368 | return DeleteFolders(principalID, folderIDs, true); |
368 | } | 369 | } |
369 | 370 | ||
370 | public bool DeleteFoldersEx(UUID principalID, List<UUID> folderIDs, bool onlyIfTrash) | 371 | public virtual bool DeleteFolders(UUID principalID, List<UUID> folderIDs, bool onlyIfTrash) |
371 | { | 372 | { |
372 | if (!m_AllowDelete) | 373 | if (!m_AllowDelete) |
373 | return false; | 374 | return false; |
@@ -381,7 +382,7 @@ namespace OpenSim.Services.InventoryService | |||
381 | //m_log.InfoFormat("[XINVENTORY SERVICE]: Delete folder {0}", id); | 382 | //m_log.InfoFormat("[XINVENTORY SERVICE]: Delete folder {0}", id); |
382 | InventoryFolderBase f = new InventoryFolderBase(); | 383 | InventoryFolderBase f = new InventoryFolderBase(); |
383 | f.ID = id; | 384 | f.ID = id; |
384 | PurgeFolderEx(f, onlyIfTrash); | 385 | PurgeFolder(f, onlyIfTrash); |
385 | m_Database.DeleteFolders("folderID", id.ToString()); | 386 | m_Database.DeleteFolders("folderID", id.ToString()); |
386 | } | 387 | } |
387 | 388 | ||
@@ -390,10 +391,10 @@ namespace OpenSim.Services.InventoryService | |||
390 | 391 | ||
391 | public virtual bool PurgeFolder(InventoryFolderBase folder) | 392 | public virtual bool PurgeFolder(InventoryFolderBase folder) |
392 | { | 393 | { |
393 | return PurgeFolderEx(folder, true); | 394 | return PurgeFolder(folder, true); |
394 | } | 395 | } |
395 | 396 | ||
396 | private bool PurgeFolderEx(InventoryFolderBase folder, bool onlyIfTrash) | 397 | public virtual bool PurgeFolder(InventoryFolderBase folder, bool onlyIfTrash) |
397 | { | 398 | { |
398 | if (!m_AllowDelete) | 399 | if (!m_AllowDelete) |
399 | return false; | 400 | return false; |
@@ -407,7 +408,7 @@ namespace OpenSim.Services.InventoryService | |||
407 | 408 | ||
408 | foreach (XInventoryFolder x in subFolders) | 409 | foreach (XInventoryFolder x in subFolders) |
409 | { | 410 | { |
410 | PurgeFolderEx(ConvertToOpenSim(x), onlyIfTrash); | 411 | PurgeFolder(ConvertToOpenSim(x), onlyIfTrash); |
411 | m_Database.DeleteFolders("folderID", x.folderID.ToString()); | 412 | m_Database.DeleteFolders("folderID", x.folderID.ToString()); |
412 | } | 413 | } |
413 | 414 | ||