summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMerov Linden <merov@lindenlab.com>2014-05-14 10:40:22 -0700
committerMerov Linden <merov@lindenlab.com>2014-05-14 10:40:22 -0700
commit989250ab0a91087a5709b3e377660059096c9e6f (patch)
treed0ad024546d58cc9f6c93518b9092fca5ea21590
parentacdd70688bf2c53f50cb39781179bbffcb2a400d (diff)
DD-95 : Prevent validation to run on folders that are not under the marketplace root
-rwxr-xr-xindra/newview/llinventoryfunctions.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 283736f607..a31edfe183 100755
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -1100,6 +1100,12 @@ void validate_marketplacelistings(LLInventoryCategory* cat, validation_callback_
LLViewerInventoryCategory * viewer_cat = (LLViewerInventoryCategory *) (cat);
const LLFolderType::EType folder_type = cat->getPreferredType();
S32 depth = depth_nesting_in_marketplace(cat->getUUID());
+ if (depth < 0)
+ {
+ // If the folder is not under the marketplace listings root, validation should not be applied
+ // *TODO: Should we call update_marketplace_category(cat->getUUID()) ?
+ return;
+ }
if (depth == 1)
{
std::string message = "Validating listing : " + cat->getName();