Skip to content

Commit

Permalink
[fc] Repository: Products.CMFPlone
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2023-07-30T22:46:54+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: plone/Products.CMFPlone@c5da33b

fix deprecated import from `plone.app.z3cform`

Files changed:
M Products/CMFPlone/controlpanel/browser/syndication.py
Repository: Products.CMFPlone

Branch: refs/heads/master
Date: 2023-07-30T23:03:17+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: plone/Products.CMFPlone@3957b03

fix deprecated import from `plone.app.layout`

Files changed:
M Products/CMFPlone/patterns/tinymce.py
Repository: Products.CMFPlone

Branch: refs/heads/master
Date: 2023-07-30T23:03:24+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: plone/Products.CMFPlone@51c3be9

changenote

Files changed:
A news/3830.bugfix
Repository: Products.CMFPlone

Branch: refs/heads/master
Date: 2023-10-04T14:57:56+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: plone/Products.CMFPlone@9ae8565

Merge pull request #3830 from plone/paz3cform-import-fix

Fix deprecated imports

Files changed:
A news/3830.bugfix
M Products/CMFPlone/controlpanel/browser/syndication.py
M Products/CMFPlone/patterns/tinymce.py
  • Loading branch information
jensens committed Oct 4, 2023
1 parent 2118018 commit f7f89c1
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions last_commit.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,62 +2,63 @@ Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2023-09-22T15:22:59+02:00
Author: Mauro Amico (mamico) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/98bbf8deecdb210096bd2d9f6f13db0d97fcf522
Date: 2023-07-30T22:46:54+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/c5da33b889164bb931ee3780798802654e0feec0

fix: avoid searching all users when many_users is flagged
fix deprecated import from `plone.app.z3cform`

Files changed:
M Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py
M Products/CMFPlone/controlpanel/browser/syndication.py

b'diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\nindex 27b817a144..d4216be172 100644\n--- a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n+++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n@@ -53,7 +53,6 @@ def update(self):\n search = form.get("form.button.Search", None) is not None\n edit = form.get("form.button.Edit", None) is not None and toDelete\n add = form.get("form.button.Add", None) is not None and toAdd\n- isBatched = form.get("b_start", None) is not None\n findAll = (\n form.get("form.button.FindAll", None) is not None\n and not self.many_users\n@@ -64,7 +63,7 @@ def update(self):\n if findAll or unbatchedAll or edit or add:\n form["searchstring"] = ""\n self.searchString = form.get("searchstring", "")\n- if findAll or isBatched or unbatchedAll or bool(self.searchString):\n+ if findAll or bool(self.searchString):\n self.searchResults = self.getPotentialMembers(self.searchString)\n \n if search or findAll:\n'
b'diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py\nindex a34305772e..7a048f5950 100644\n--- a/Products/CMFPlone/controlpanel/browser/syndication.py\n+++ b/Products/CMFPlone/controlpanel/browser/syndication.py\n@@ -1,5 +1,5 @@\n from plone.app.registry.browser import controlpanel\n-from plone.app.z3cform.widget import SelectFieldWidget\n+from plone.app.z3cform.widgets.select import Select2FieldWidget\n from plone.base.interfaces.syndication import ISiteSyndicationSettings\n from Products.CMFCore.utils import getToolByName\n from Products.statusmessages.interfaces import IStatusMessage\n@@ -17,7 +17,7 @@ class SyndicationControlPanelForm(controlpanel.RegistryEditForm):\n \n def updateFields(self):\n super().updateFields()\n- self.fields["site_rss_items"].widgetFactory = SelectFieldWidget\n+ self.fields["site_rss_items"].widgetFactory = Select2FieldWidget\n \n def getSyndicationSettingsButtonShown(self):\n actions = getToolByName(self.context, "portal_actions")\n'

Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2023-09-22T17:00:17+02:00
Author: Mauro Amico (mamico) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/f3096371d80c3ca8a5829c12976bd0ab2d2c08a4
Date: 2023-07-30T23:03:17+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/3957b0359058cb3fb2732d06b1d9b7bff26295d8

fix tests
fix deprecated import from `plone.app.layout`

Files changed:
M Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py
M Products/CMFPlone/patterns/tinymce.py

b'diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\nindex d4216be172..a8f19fa26f 100644\n--- a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n+++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n@@ -63,7 +63,7 @@ def update(self):\n if findAll or unbatchedAll or edit or add:\n form["searchstring"] = ""\n self.searchString = form.get("searchstring", "")\n- if findAll or bool(self.searchString):\n+ if not (self.many_users) or bool(self.searchString):\n self.searchResults = self.getPotentialMembers(self.searchString)\n \n if search or findAll:\n'
b'diff --git a/Products/CMFPlone/patterns/tinymce.py b/Products/CMFPlone/patterns/tinymce.py\nindex 9eeef14dab..27d569ef83 100644\n--- a/Products/CMFPlone/patterns/tinymce.py\n+++ b/Products/CMFPlone/patterns/tinymce.py\n@@ -1,8 +1,8 @@\n from lxml import html\n-from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.app.theming.utils import theming_policy\n from plone.base.interfaces import IFilterSchema\n from plone.base.interfaces import ITinyMCESchema\n+from plone.base.navigationroot import get_navigation_root_object\n from plone.base.utils import safe_text\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -22,7 +22,7 @@ def __init__(self, context, request):\n self.filter_settings = getUtility(IRegistry).forInterface(\n IFilterSchema, prefix="plone", check=False\n )\n- self.nav_root = getNavigationRootObject(\n+ self.nav_root = get_navigation_root_object(\n self.context,\n get_portal(),\n )\n'

Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2023-09-25T14:53:31+02:00
Author: Mauro Amico (mamico) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/53d55beb99433088b5af2cd27e886ade024051ea
Date: 2023-07-30T23:03:24+02:00
Author: Peter Mathis (petschki) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/51c3be932109c2608b2f172abf5c9f1e86013e2c

chhangelog
changenote

Files changed:
A news/3845.bugfix
A news/3830.bugfix

b'diff --git a/news/3845.bugfix b/news/3845.bugfix\nnew file mode 100644\nindex 0000000000..36023919e3\n--- /dev/null\n+++ b/news/3845.bugfix\n@@ -0,0 +1 @@\n+avoid searching all users after group editing, when many_users is flagged @mamico\n'
b'diff --git a/news/3830.bugfix b/news/3830.bugfix\nnew file mode 100644\nindex 0000000000..5375b8e25f\n--- /dev/null\n+++ b/news/3830.bugfix\n@@ -0,0 +1,2 @@\n+Fix deprecated imports.\n+[petschki]\n'

Repository: Products.CMFPlone


Branch: refs/heads/master
Date: 2023-10-04T14:55:35+02:00
Date: 2023-10-04T14:57:56+02:00
Author: Jens W. Klein (jensens) <[email protected]>
Commit: https://github.com/plone/Products.CMFPlone/commit/0577f0c557ecf9d50b6ccb9f6d2aac511fdf5292
Commit: https://github.com/plone/Products.CMFPlone/commit/9ae85658982c1c97755a2ec1bf65dba712d8f986

Merge pull request #3845 from plone/many_users
Merge pull request #3830 from plone/paz3cform-import-fix

fix: avoid searching all users when many_users is flagged
Fix deprecated imports

Files changed:
A news/3845.bugfix
M Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py
A news/3830.bugfix
M Products/CMFPlone/controlpanel/browser/syndication.py
M Products/CMFPlone/patterns/tinymce.py

b'diff --git a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\nindex 27b817a144..a8f19fa26f 100644\n--- a/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n+++ b/Products/CMFPlone/controlpanel/browser/usergroups_groupmembership.py\n@@ -53,7 +53,6 @@ def update(self):\n search = form.get("form.button.Search", None) is not None\n edit = form.get("form.button.Edit", None) is not None and toDelete\n add = form.get("form.button.Add", None) is not None and toAdd\n- isBatched = form.get("b_start", None) is not None\n findAll = (\n form.get("form.button.FindAll", None) is not None\n and not self.many_users\n@@ -64,7 +63,7 @@ def update(self):\n if findAll or unbatchedAll or edit or add:\n form["searchstring"] = ""\n self.searchString = form.get("searchstring", "")\n- if findAll or isBatched or unbatchedAll or bool(self.searchString):\n+ if not (self.many_users) or bool(self.searchString):\n self.searchResults = self.getPotentialMembers(self.searchString)\n \n if search or findAll:\ndiff --git a/news/3845.bugfix b/news/3845.bugfix\nnew file mode 100644\nindex 0000000000..36023919e3\n--- /dev/null\n+++ b/news/3845.bugfix\n@@ -0,0 +1 @@\n+avoid searching all users after group editing, when many_users is flagged @mamico\n'
b'diff --git a/Products/CMFPlone/controlpanel/browser/syndication.py b/Products/CMFPlone/controlpanel/browser/syndication.py\nindex a34305772e..7a048f5950 100644\n--- a/Products/CMFPlone/controlpanel/browser/syndication.py\n+++ b/Products/CMFPlone/controlpanel/browser/syndication.py\n@@ -1,5 +1,5 @@\n from plone.app.registry.browser import controlpanel\n-from plone.app.z3cform.widget import SelectFieldWidget\n+from plone.app.z3cform.widgets.select import Select2FieldWidget\n from plone.base.interfaces.syndication import ISiteSyndicationSettings\n from Products.CMFCore.utils import getToolByName\n from Products.statusmessages.interfaces import IStatusMessage\n@@ -17,7 +17,7 @@ class SyndicationControlPanelForm(controlpanel.RegistryEditForm):\n \n def updateFields(self):\n super().updateFields()\n- self.fields["site_rss_items"].widgetFactory = SelectFieldWidget\n+ self.fields["site_rss_items"].widgetFactory = Select2FieldWidget\n \n def getSyndicationSettingsButtonShown(self):\n actions = getToolByName(self.context, "portal_actions")\ndiff --git a/Products/CMFPlone/patterns/tinymce.py b/Products/CMFPlone/patterns/tinymce.py\nindex 9eeef14dab..27d569ef83 100644\n--- a/Products/CMFPlone/patterns/tinymce.py\n+++ b/Products/CMFPlone/patterns/tinymce.py\n@@ -1,8 +1,8 @@\n from lxml import html\n-from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.app.theming.utils import theming_policy\n from plone.base.interfaces import IFilterSchema\n from plone.base.interfaces import ITinyMCESchema\n+from plone.base.navigationroot import get_navigation_root_object\n from plone.base.utils import safe_text\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -22,7 +22,7 @@ def __init__(self, context, request):\n self.filter_settings = getUtility(IRegistry).forInterface(\n IFilterSchema, prefix="plone", check=False\n )\n- self.nav_root = getNavigationRootObject(\n+ self.nav_root = get_navigation_root_object(\n self.context,\n get_portal(),\n )\ndiff --git a/news/3830.bugfix b/news/3830.bugfix\nnew file mode 100644\nindex 0000000000..5375b8e25f\n--- /dev/null\n+++ b/news/3830.bugfix\n@@ -0,0 +1,2 @@\n+Fix deprecated imports.\n+[petschki]\n'

0 comments on commit f7f89c1

Please sign in to comment.