Skip to content

Commit 41dfeea

Browse files
Merge pull request #191 from plone/remove-portal_properties
Remove portal properties
2 parents b506b27 + af8b150 commit 41dfeea

File tree

3 files changed

+4
-12
lines changed

3 files changed

+4
-12
lines changed

news/125.breaking

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Remove use of portal_properties.
2+
Theoretically we were using this for sorting the navigation portlet.
3+
[maurits]

plone/app/portlets/portlets/navigation.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,6 @@ def __init__(self, context, portlet):
406406
self.context = context
407407
self.portlet = portlet
408408

409-
portal_properties = getToolByName(context, "portal_properties")
410-
navtree_properties = getattr(portal_properties, "navtree_properties")
411-
412409
# Acquire a custom nav query if available
413410
customQuery = getattr(context, "getCustomNavQuery", None)
414411
if customQuery is not None and safe_callable(customQuery):
@@ -443,14 +440,6 @@ def __init__(self, context, portlet):
443440
# Only list the applicable types
444441
query["portal_type"] = typesToList(context)
445442

446-
# Apply the desired sort
447-
sortAttribute = navtree_properties.getProperty("sortAttribute", None)
448-
if sortAttribute is not None:
449-
query["sort_on"] = sortAttribute
450-
sortOrder = navtree_properties.getProperty("sortOrder", None)
451-
if sortOrder is not None:
452-
query["sort_order"] = sortOrder
453-
454443
# Filter on workflow states, if enabled
455444
registry = getUtility(IRegistry)
456445
navigation_settings = registry.forInterface(INavigationSchema, prefix="plone")

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
from setuptools import setup
33

44

5-
version = "5.0.8.dev0"
5+
version = "6.0.0.dev0"
66

77
setup(
88
name="plone.app.portlets",

0 commit comments

Comments
 (0)