diff options
author | Merov Linden <merov@lindenlab.com> | 2014-08-22 00:18:00 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2014-08-22 00:18:00 -0700 |
commit | 6ab1e773d55b9dbe4a0af161ac194536a5892904 (patch) | |
tree | ed2b04c7898fb2516b511dc2d9a5f71da531016b /indra/newview/llinventorybridge.cpp | |
parent | 51e8b7fae6ff14c58bf32ef740a60386bc15baee (diff) |
DD-122 : WIP : Raise error when trying to list something that is empty or has empty stock folders.
Diffstat (limited to 'indra/newview/llinventorybridge.cpp')
-rwxr-xr-x | indra/newview/llinventorybridge.cpp | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index 51d1f088e0..60474dd125 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -2983,17 +2983,21 @@ void LLFolderBridge::performAction(LLInventoryModel* model, std::string action) } else if ("marketplace_list" == action) { - LLViewerInventoryCategory* cat = gInventory.getCategory(mUUID); - mMessage = ""; - if (!validate_marketplacelistings(cat,boost::bind(&LLFolderBridge::gatherMessage, this, _1, _2))) - { - LLSD subs; - subs["[ERROR_CODE]"] = mMessage; - LLNotificationsUtil::add("MerchantListingFailed", subs); - } - else if (depth_nesting_in_marketplace(mUUID) == 1) + if (depth_nesting_in_marketplace(mUUID) == 1) { - LLMarketplaceData::instance().activateListing(mUUID,true); + LLUUID version_folder_id = LLMarketplaceData::instance().getVersionFolder(mUUID); + LLViewerInventoryCategory* cat = gInventory.getCategory(version_folder_id); + mMessage = ""; + if (!validate_marketplacelistings(cat,boost::bind(&LLFolderBridge::gatherMessage, this, _1, _2))) + { + LLSD subs; + subs["[ERROR_CODE]"] = mMessage; + LLNotificationsUtil::add("MerchantListingFailed", subs); + } + else + { + LLMarketplaceData::instance().activateListing(mUUID,true); + } } return; } @@ -3090,7 +3094,10 @@ void LLFolderBridge::gatherMessage(std::string& message, LLError::ELevel log_lev { mMessage += "\n"; } - mMessage += message; + // Take the leading spaces out... + std::string::size_type start = message.find_first_not_of(" "); + // Append the message + mMessage += message.substr(start, message.length() - start); } } |