Skip to content

Commit

Permalink
Merge pull request #191 from plone/remove-portal_properties
Browse files Browse the repository at this point in the history
Remove portal properties
  • Loading branch information
mauritsvanrees authored Jun 18, 2024
2 parents b506b27 + af8b150 commit 41dfeea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
3 changes: 3 additions & 0 deletions news/125.breaking
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Remove use of portal_properties.
Theoretically we were using this for sorting the navigation portlet.
[maurits]
11 changes: 0 additions & 11 deletions plone/app/portlets/portlets/navigation.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ def __init__(self, context, portlet):
self.context = context
self.portlet = portlet

portal_properties = getToolByName(context, "portal_properties")
navtree_properties = getattr(portal_properties, "navtree_properties")

# Acquire a custom nav query if available
customQuery = getattr(context, "getCustomNavQuery", None)
if customQuery is not None and safe_callable(customQuery):
Expand Down Expand Up @@ -443,14 +440,6 @@ def __init__(self, context, portlet):
# Only list the applicable types
query["portal_type"] = typesToList(context)

# Apply the desired sort
sortAttribute = navtree_properties.getProperty("sortAttribute", None)
if sortAttribute is not None:
query["sort_on"] = sortAttribute
sortOrder = navtree_properties.getProperty("sortOrder", None)
if sortOrder is not None:
query["sort_order"] = sortOrder

# Filter on workflow states, if enabled
registry = getUtility(IRegistry)
navigation_settings = registry.forInterface(INavigationSchema, prefix="plone")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from setuptools import setup


version = "5.0.8.dev0"
version = "6.0.0.dev0"

setup(
name="plone.app.portlets",
Expand Down

0 comments on commit 41dfeea

Please sign in to comment.