Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
1b4408e5
Commit
1b4408e5
authored
11 years ago
by
Merov Linden
Browse files
Options
Downloads
Patches
Plain Diff
DD-59 : WIP : Added marketplace consitency check and cleaning when updating a marketplace folder
parent
45ec0833
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/llinventoryfunctions.cpp
+20
-2
20 additions, 2 deletions
indra/newview/llinventoryfunctions.cpp
with
20 additions
and
2 deletions
indra/newview/llinventoryfunctions.cpp
+
20
−
2
View file @
1b4408e5
...
...
@@ -155,8 +155,8 @@ void update_marketplace_category(const LLUUID& cat_id)
const
LLUUID
marketplace_listings_uuid
=
gInventory
.
findCategoryUUIDForType
(
LLFolderType
::
FT_MARKETPLACE_LISTINGS
,
false
);
// No marketplace -> likely called too early... or
// Not a descendent of the marketplace listings root -> likely called in error then...
if
(
marketplace_listings_uuid
.
isNull
()
||
!
gInventory
.
isObjectDescendentOf
(
cat_id
,
marketplace_listings_uuid
))
// Not a descendent of the marketplace listings root
and not part of marketplace
-> likely called in error then...
if
(
marketplace_listings_uuid
.
isNull
()
||
(
!
gInventory
.
isObjectDescendentOf
(
cat_id
,
marketplace_listings_uuid
)
&&
!
LLMarketplaceData
::
instance
().
isListed
(
cat_id
)
&&
!
LLMarketplaceData
::
instance
().
isVersionFolder
(
cat_id
))
)
{
// In those cases, just do the regular category update
LLViewerInventoryCategory
*
cat
=
gInventory
.
getCategory
(
cat_id
);
...
...
@@ -169,6 +169,24 @@ void update_marketplace_category(const LLUUID& cat_id)
S32
depth
=
depth_nesting_in_marketplace
(
cat_id
);
LLUUID
listing_uuid
=
nested_parent_id
(
cat_id
,
depth
);
// Verify marketplace data consistency for this listing
if
(
LLMarketplaceData
::
instance
().
isListed
(
listing_uuid
))
{
LLUUID
version_folder_uuid
=
LLMarketplaceData
::
instance
().
getVersionFolderID
(
listing_uuid
);
if
(
!
gInventory
.
isObjectDescendentOf
(
version_folder_uuid
,
listing_uuid
))
{
// *TODO : Confirm with Producer that this is what we want to happen in that case!
llinfos
<<
"Merov : Delisting as the version folder is not under the listing folder anymore!!"
<<
llendl
;
LLMarketplaceData
::
instance
().
deleteListing
(
listing_uuid
);
}
if
(
!
gInventory
.
isObjectDescendentOf
(
listing_uuid
,
marketplace_listings_uuid
))
{
// *TODO : Confirm with Producer that this is what we want to happen in that case!
llinfos
<<
"Merov : Delisting as the listing folder is not under the marketplace folder anymore!!"
<<
llendl
;
LLMarketplaceData
::
instance
().
deleteListing
(
listing_uuid
);
}
}
// Update all descendents starting from the listing root
update_marketplace_folder_hierarchy
(
listing_uuid
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment