meow-7.2.2
Merov Linden 2015-05-06 23:48:28 -07:00
commit cfd4027ba9
2 changed files with 14 additions and 7 deletions

View File

@ -1490,16 +1490,23 @@ bool LLInvFVBridge::canListOnMarketplaceNow() const
std::string error_msg;
LLInventoryModel* model = getInventoryModel();
const LLUUID &marketplacelistings_id = model->findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS, false);
LLViewerInventoryCategory * master_folder = model->getCategory(marketplacelistings_id);
LLInventoryCategory *cat = model->getCategory(mUUID);
if (cat)
if (marketplacelistings_id.notNull())
{
can_list = can_move_folder_to_marketplace(master_folder, master_folder, cat, error_msg);
LLViewerInventoryCategory * master_folder = model->getCategory(marketplacelistings_id);
LLInventoryCategory *cat = model->getCategory(mUUID);
if (cat)
{
can_list = can_move_folder_to_marketplace(master_folder, master_folder, cat, error_msg);
}
else
{
LLInventoryItem *item = model->getItem(mUUID);
can_list = (item ? can_move_item_to_marketplace(master_folder, master_folder, item, error_msg) : false);
}
}
else
{
LLInventoryItem *item = model->getItem(mUUID);
can_list = (item ? can_move_item_to_marketplace(master_folder, master_folder, item, error_msg) : false);
can_list = false;
}
}
}

View File

@ -124,7 +124,7 @@ LLUUID getVersionFolderIfUnique(const LLUUID& folder_id)
void log_SLM_warning(const std::string& request, U32 status, const std::string& reason, const std::string& code, const std::string& description)
{
LL_WARNS("SLM") << "SLM API : Responder to " << request << ". status : " << status << ", reason : " << reason << ", code : " << code << ", description : " << description << LL_ENDL;
if (status == 422)
if ((status == 422) && (description == "[\"You must have an English description to list the product\", \"You must choose a category for your product before it can be listed\", \"Listing could not change state.\", \"Price can't be blank\"]"))
{
// Unprocessable Entity : Special case that error as it is a frequent answer when trying to list an incomplete listing
LLNotificationsUtil::add("MerchantUnprocessableEntity");