MAINT-4878 FIXED Outfits worn from library copy the subfolders too

master
andreykproductengine 2015-04-03 18:36:14 +03:00
parent e538853d8d
commit 4d1072a0a8
3 changed files with 8 additions and 3 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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();
}