summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2015-04-03 18:36:14 +0300
committerandreykproductengine <akleshchev@productengine.com>2015-04-03 18:36:14 +0300
commit4d1072a0a8912748bc62d42617cc6d5679a1bf20 (patch)
treec670fddc2b7a5855ed82788a730264e21508504e /indra/newview
parente538853d8d0f8ef06ed2ba7cefc4d09bf2617099 (diff)
MAINT-4878 FIXED Outfits worn from library copy the subfolders too
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llaisapi.cpp7
-rwxr-xr-xindra/newview/llaisapi.h2
-rwxr-xr-xindra/newview/llappearancemgr.cpp2
3 files changed, 8 insertions, 3 deletions
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<LLInventoryCallback> callback):
+ LLPointer<LLInventoryCallback> 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<LLInventoryCallback> callback);
+ CopyLibraryCategoryCommand(const LLUUID& source_id, const LLUUID& dest_id, LLPointer<LLInventoryCallback> 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<LLInventoryCallback> copy_cb = new LLWearCategoryAfterCopy(append);
LLPointer<LLInventoryCallback> track_cb = new LLTrackPhaseWrapper(
std::string("wear_inventory_category_callback"), copy_cb);
- LLPointer<AISCommand> cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb);
+ LLPointer<AISCommand> cmd_ptr = new CopyLibraryCategoryCommand(category->getUUID(), parent_id, track_cb, false);
ais_ran=cmd_ptr->run_command();
}