From 4d1072a0a8912748bc62d42617cc6d5679a1bf20 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Fri, 3 Apr 2015 18:36:14 +0300 Subject: MAINT-4878 FIXED Outfits worn from library copy the subfolders too --- indra/newview/llaisapi.cpp | 7 ++++++- indra/newview/llaisapi.h | 2 +- indra/newview/llappearancemgr.cpp | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) (limited to 'indra') diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp index 9d887a61f1..714b456ae7 100755 --- a/indra/newview/llaisapi.cpp +++ b/indra/newview/llaisapi.cpp @@ -315,7 +315,8 @@ SlamFolderCommand::SlamFolderCommand(const LLUUID& folder_id, const LLSD& conten CopyLibraryCategoryCommand::CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, - LLPointer callback): + LLPointer callback, + bool copy_subfolders): AISCommand(callback) { std::string cap; @@ -328,6 +329,10 @@ CopyLibraryCategoryCommand::CopyLibraryCategoryCommand(const LLUUID& source_id, LLUUID tid; tid.generate(); std::string url = cap + std::string("/category/") + source_id.asString() + "?tid=" + tid.asString(); + if (!copy_subfolders) + { + url += ",depth=0"; + } LL_INFOS() << url << LL_ENDL; LLCurl::ResponderPtr responder = this; LLSD headers; diff --git a/indra/newview/llaisapi.h b/indra/newview/llaisapi.h index 5a2ec94af9..bb483fb133 100755 --- a/indra/newview/llaisapi.h +++ b/indra/newview/llaisapi.h @@ -124,7 +124,7 @@ private: class CopyLibraryCategoryCommand: public AISCommand { public: - CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, LLPointer callback); + CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, LLPointer callback, bool copy_subfolders = true); protected: /* virtual */ bool getResponseUUID(const LLSD& content, LLUUID& id); diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp index c6971edf9f..0ac0dccc4e 100755 --- a/indra/newview/llappearancemgr.cpp +++ b/indra/newview/llappearancemgr.cpp @@ -2357,7 +2357,7 @@ void LLAppearanceMgr::wearInventoryCategory(LLInventoryCategory* category, bool LLPointer copy_cb = new LLWearCategoryAfterCopy(append); LLPointer track_cb = new LLTrackPhaseWrapper( std::string("wear_inventory_category_callback"), copy_cb); - LLPointer cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb); + LLPointer cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb, false); ais_ran=cmd_ptr->run_command(); } -- cgit v1.2.3