We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
CMFPlone must not depend on plone.api
Dependency in setup.py, used in 

https://github.com/plone/Products.CMFPlone/blob/5f866f56d979ca0879181823a1a802035f727079/Products/CMFPlone/controlpanel/browser/error_log_form.py#L6

plone.api depends on CMFPlone, not vice versa!

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `setup.py`
Content:
```
1 from setuptools import find_packages
2 from setuptools import setup
3 
4 
5 version = "6.1.0a4.dev0"
6 
7 
8 setup(
9     name="Products.CMFPlone",
10     version=version,
11     description="The Plone Content Management System (core)",
12     long_description=open("README.md").read() + "\n" + open("CHANGES.md").read(),
13     long_description_content_type="text/markdown",
14     classifiers=[
15         "Development Status :: 5 - Production/Stable",
16         "Environment :: Web Environment",
17         "Framework :: Plone",
18         "Framework :: Plone :: 6.0",
19         "Framework :: Plone :: Core",
20         "Framework :: Zope :: 5",
21         "License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
22         "Operating System :: OS Independent",
23         "Programming Language :: Python",
24         "Programming Language :: Python :: 3.8",
25         "Programming Language :: Python :: 3.9",
26         "Programming Language :: Python :: 3.10",
27         "Programming Language :: Python :: 3.11",
28         "Programming Language :: Python :: 3.12",
29     ],
30     python_requires=">=3.8",
31     keywords="Plone CMF Python Zope CMS Webapplication",
32     author="Plone Foundation",
33     author_email="releasemanager@plone.org",
34     url="https://plone.org",
35     license="GPL version 2",
36     project_urls={
37         "Homepage": "https://plone.org",
38         "Documentation": "https://6.docs.plone.org",
39         "Source": "https://github.com/plone/Products.CMFPlone",
40         "Issues": "https://github.com/plone/plone.org/Products.CMFPlone",
41         "Forum": "https://community.plone.org/",
42         "Chat": "https://discord.gg/zFY3EBbjaj",
43         "Mastodon": "https://plone.social/@plone",
44         "Twitter": "https://twitter.com/plone",
45         "Videos": "https://youtube.com/@plonecms",
46         "Sponsor": "https://github.com/sponsors/plone",
47     },
48     packages=find_packages(),
49     namespace_packages=["Products"],
50     include_package_data=True,
51     zip_safe=False,
52     install_requires=[
53         "borg.localrole",
54         "five.customerize",
55         "lxml",
56         "plone.api >= 1.4.4",
57         "plone.app.content",
58         "plone.app.contentlisting",
59         "plone.app.contentmenu >= 2.0.1",
60         "plone.app.contentrules",
61         "plone.app.contenttypes",
62         "plone.app.customerize",
63         "plone.app.dexterity",
64         "plone.app.discussion",
65         "plone.app.i18n",
66         "plone.app.layout >= 2.5.15",
67         "plone.app.linkintegrity >=1.0.3",
68         "plone.app.locales",
69         "plone.app.portlets",
70         "plone.app.redirector",
71         "plone.app.registry",
72         "plone.app.theming",
73         "plone.app.users",
74         "plone.app.uuid",
75         "plone.app.viewletmanager",
76         "plone.app.vocabularies",
77         "plone.app.workflow",
78         "plone.app.z3cform >= 4.1.0",
79         "plone.base",
80         "plone.browserlayer >= 2.1.5",
81         "plone.contentrules",
82         "plone.folder",
83         "plone.i18n >= 4.0.5",
84         "plone.indexer",
85         "plone.intelligenttext",
86         "plone.locking",
87         "plone.memoize",
88         "plone.outputfilters",
89         "plone.portlet.collection",
90         "plone.portlet.static",
91         "plone.portlets",
92         "plone.protect >= 3.0.0",
93         "plone.resource",
94         "plone.schema",
95         "plone.session",
96         "plone.staticresources",
97         "plone.theme",
98         "plonetheme.barceloneta",
99         "Products.CMFEditions",
100         "Products.DCWorkflow",
101         "Products.ExtendedPathIndex",
102         "Products.isurlinportal",
103         "Products.MimetypesRegistry",
104         "Products.PlonePAS",
105         "Products.PortalTransforms",
106         "Products.SiteErrorLog",
107         "Products.statusmessages",
108         "setuptools>=36.2",
109         "plone.autoinclude",
110         "webresource>=1.2",
111         "Zope[wsgi] >= 5.0",
112         "zope.app.locales >= 3.6.0",
113         "zope.cachedescriptors",
114         "zope.deferredimport",
115         "zope.deprecation",
116         "zope.dottedname",
117         "zope.i18n",
118         "zope.i18nmessageid",
119         "zope.structuredtext",
120     ],
121     extras_require={
122         "test": [
123             "lxml",
124             "plone.app.robotframework>=1.0",
125             "robotframework-debuglibrary",
126             "plone.app.testing",
127             "zope.globalrequest",
128             "zope.testing",
129             "gunicorn",
130         ]
131     },
132 )
133
```

Path: `Products/CMFPlone/controlpanel/browser/error_log_form.py`
Content:
```
1 from DateTime import DateTime
2 from plone.base import PloneMessageFactory as _
3 from Products.CMFPlone.utils import safe_nativestring
4 from Products.Five import BrowserView
5 
6 import plone.api as api
7 
8 
9 class ErrorLogUpdate(BrowserView):
10     def __call__(self):
11         member = api.user.get_current()
12 
13         if getattr(self.request, "form.button.search", None) is not None:
14             search = self.request.form.get("search_entry")
15             if search == "":
16                 member.setProperties(error_log_update=0.0)
17                 self.context.plone_utils.addPortalMessage(_("Showing all entries"))
18                 return self.request.RESPONSE.redirect(
19                     self.context.absolute_url() + "/@@error-log-form"
20                 )
21             return self.request.RESPONSE.redirect(
22                 self.context.absolute_url() + "/@@error-log-show-entry?id=%s" % search
23             )
24 
25         elif getattr(self.request, "form.button.showall", None) is not None:
26             member.setProperties(error_log_update=0.0)
27             self.context.plone_utils.addPortalMessage(_("Showing all entries"))
28             return self.request.RESPONSE.redirect(
29                 self.context.absolute_url() + "/@@error-log-form"
30             )
31 
32         elif getattr(self.request, "form.button.clear", None) is not None:
33             member.setProperties(error_log_update=DateTime().timeTime())
34             self.context.plone_utils.addPortalMessage(_("Entries cleared"))
35             return self.request.RESPONSE.redirect(
36                 self.context.absolute_url() + "/@@error-log-form"
37             )
38 
39         else:
40             return self.request.RESPONSE.redirect(
41                 self.context.absolute_url() + "/@@error-log-form"
42             )
43 
44 
45 class ErrorLogSetProperties(BrowserView):
46     def __call__(self):
47         keep_entries = self.request.form.get("keep_entries")
48         ignored_exceptions = self.request.form.get("ignored_exceptions")
49         copy_to_zlog = self.request.form.get("copy_to_zlog", 0)
50 
51         ignored_exceptions = map(safe_nativestring, ignored_exceptions)
52         self.context.error_log.setProperties(
53             keep_entries, copy_to_zlog, ignored_exceptions
54         )
55         self.context.plone_utils.addPortalMessage(_("Changes made."))
56 
57         return self.request.RESPONSE.redirect(
58             self.context.absolute_url() + "/@@error-log-form"
59         )
60
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/Products/CMFPlone/controlpanel/browser/error_log_form.py b/Products/CMFPlone/controlpanel/browser/error_log_form.py
--- a/Products/CMFPlone/controlpanel/browser/error_log_form.py
+++ b/Products/CMFPlone/controlpanel/browser/error_log_form.py
@@ -1,14 +1,14 @@
 from DateTime import DateTime
 from plone.base import PloneMessageFactory as _
+from Products.CMFCore.utils import getToolByName
 from Products.CMFPlone.utils import safe_nativestring
 from Products.Five import BrowserView
 
-import plone.api as api
-
 
 class ErrorLogUpdate(BrowserView):
     def __call__(self):
-        member = api.user.get_current()
+        portal_membership = getToolByName(self.context, "portal_membership")
+        member = portal_membership.getAuthenticatedMember()
 
         if getattr(self.request, "form.button.search", None) is not None:
             search = self.request.form.get("search_entry")
diff --git a/setup.py b/setup.py
--- a/setup.py
+++ b/setup.py
@@ -53,7 +53,6 @@
         "borg.localrole",
         "five.customerize",
         "lxml",
-        "plone.api >= 1.4.4",
         "plone.app.content",
         "plone.app.contentlisting",
         "plone.app.contentmenu >= 2.0.1",

{"golden_diff": "diff --git a/Products/CMFPlone/controlpanel/browser/error_log_form.py b/Products/CMFPlone/controlpanel/browser/error_log_form.py\n--- a/Products/CMFPlone/controlpanel/browser/error_log_form.py\n+++ b/Products/CMFPlone/controlpanel/browser/error_log_form.py\n@@ -1,14 +1,14 @@\n from DateTime import DateTime\n from plone.base import PloneMessageFactory as _\n+from Products.CMFCore.utils import getToolByName\n from Products.CMFPlone.utils import safe_nativestring\n from Products.Five import BrowserView\n \n-import plone.api as api\n-\n \n class ErrorLogUpdate(BrowserView):\n     def __call__(self):\n-        member = api.user.get_current()\n+        portal_membership = getToolByName(self.context, \"portal_membership\")\n+        member = portal_membership.getAuthenticatedMember()\n \n         if getattr(self.request, \"form.button.search\", None) is not None:\n             search = self.request.form.get(\"search_entry\")\ndiff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -53,7 +53,6 @@\n         \"borg.localrole\",\n         \"five.customerize\",\n         \"lxml\",\n-        \"plone.api >= 1.4.4\",\n         \"plone.app.content\",\n         \"plone.app.contentlisting\",\n         \"plone.app.contentmenu >= 2.0.1\",\n", "issue": "CMFPlone must not depend on plone.api\nDependency in setup.py, used in \r\n\r\nhttps://github.com/plone/Products.CMFPlone/blob/5f866f56d979ca0879181823a1a802035f727079/Products/CMFPlone/controlpanel/browser/error_log_form.py#L6\r\n\r\nplone.api depends on CMFPlone, not vice versa!\n", "before_files": [{"content": "from setuptools import find_packages\nfrom setuptools import setup\n\n\nversion = \"6.1.0a4.dev0\"\n\n\nsetup(\n    name=\"Products.CMFPlone\",\n    version=version,\n    description=\"The Plone Content Management System (core)\",\n    long_description=open(\"README.md\").read() + \"\\n\" + open(\"CHANGES.md\").read(),\n    long_description_content_type=\"text/markdown\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Web Environment\",\n        \"Framework :: Plone\",\n        \"Framework :: Plone :: 6.0\",\n        \"Framework :: Plone :: Core\",\n        \"Framework :: Zope :: 5\",\n        \"License :: OSI Approved :: GNU General Public License v2 (GPLv2)\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: 3.12\",\n    ],\n    python_requires=\">=3.8\",\n    keywords=\"Plone CMF Python Zope CMS Webapplication\",\n    author=\"Plone Foundation\",\n    author_email=\"releasemanager@plone.org\",\n    url=\"https://plone.org\",\n    license=\"GPL version 2\",\n    project_urls={\n        \"Homepage\": \"https://plone.org\",\n        \"Documentation\": \"https://6.docs.plone.org\",\n        \"Source\": \"https://github.com/plone/Products.CMFPlone\",\n        \"Issues\": \"https://github.com/plone/plone.org/Products.CMFPlone\",\n        \"Forum\": \"https://community.plone.org/\",\n        \"Chat\": \"https://discord.gg/zFY3EBbjaj\",\n        \"Mastodon\": \"https://plone.social/@plone\",\n        \"Twitter\": \"https://twitter.com/plone\",\n        \"Videos\": \"https://youtube.com/@plonecms\",\n        \"Sponsor\": \"https://github.com/sponsors/plone\",\n    },\n    packages=find_packages(),\n    namespace_packages=[\"Products\"],\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=[\n        \"borg.localrole\",\n        \"five.customerize\",\n        \"lxml\",\n        \"plone.api >= 1.4.4\",\n        \"plone.app.content\",\n        \"plone.app.contentlisting\",\n        \"plone.app.contentmenu >= 2.0.1\",\n        \"plone.app.contentrules\",\n        \"plone.app.contenttypes\",\n        \"plone.app.customerize\",\n        \"plone.app.dexterity\",\n        \"plone.app.discussion\",\n        \"plone.app.i18n\",\n        \"plone.app.layout >= 2.5.15\",\n        \"plone.app.linkintegrity >=1.0.3\",\n        \"plone.app.locales\",\n        \"plone.app.portlets\",\n        \"plone.app.redirector\",\n        \"plone.app.registry\",\n        \"plone.app.theming\",\n        \"plone.app.users\",\n        \"plone.app.uuid\",\n        \"plone.app.viewletmanager\",\n        \"plone.app.vocabularies\",\n        \"plone.app.workflow\",\n        \"plone.app.z3cform >= 4.1.0\",\n        \"plone.base\",\n        \"plone.browserlayer >= 2.1.5\",\n        \"plone.contentrules\",\n        \"plone.folder\",\n        \"plone.i18n >= 4.0.5\",\n        \"plone.indexer\",\n        \"plone.intelligenttext\",\n        \"plone.locking\",\n        \"plone.memoize\",\n        \"plone.outputfilters\",\n        \"plone.portlet.collection\",\n        \"plone.portlet.static\",\n        \"plone.portlets\",\n        \"plone.protect >= 3.0.0\",\n        \"plone.resource\",\n        \"plone.schema\",\n        \"plone.session\",\n        \"plone.staticresources\",\n        \"plone.theme\",\n        \"plonetheme.barceloneta\",\n        \"Products.CMFEditions\",\n        \"Products.DCWorkflow\",\n        \"Products.ExtendedPathIndex\",\n        \"Products.isurlinportal\",\n        \"Products.MimetypesRegistry\",\n        \"Products.PlonePAS\",\n        \"Products.PortalTransforms\",\n        \"Products.SiteErrorLog\",\n        \"Products.statusmessages\",\n        \"setuptools>=36.2\",\n        \"plone.autoinclude\",\n        \"webresource>=1.2\",\n        \"Zope[wsgi] >= 5.0\",\n        \"zope.app.locales >= 3.6.0\",\n        \"zope.cachedescriptors\",\n        \"zope.deferredimport\",\n        \"zope.deprecation\",\n        \"zope.dottedname\",\n        \"zope.i18n\",\n        \"zope.i18nmessageid\",\n        \"zope.structuredtext\",\n    ],\n    extras_require={\n        \"test\": [\n            \"lxml\",\n            \"plone.app.robotframework>=1.0\",\n            \"robotframework-debuglibrary\",\n            \"plone.app.testing\",\n            \"zope.globalrequest\",\n            \"zope.testing\",\n            \"gunicorn\",\n        ]\n    },\n)\n", "path": "setup.py"}, {"content": "from DateTime import DateTime\nfrom plone.base import PloneMessageFactory as _\nfrom Products.CMFPlone.utils import safe_nativestring\nfrom Products.Five import BrowserView\n\nimport plone.api as api\n\n\nclass ErrorLogUpdate(BrowserView):\n    def __call__(self):\n        member = api.user.get_current()\n\n        if getattr(self.request, \"form.button.search\", None) is not None:\n            search = self.request.form.get(\"search_entry\")\n            if search == \"\":\n                member.setProperties(error_log_update=0.0)\n                self.context.plone_utils.addPortalMessage(_(\"Showing all entries\"))\n                return self.request.RESPONSE.redirect(\n                    self.context.absolute_url() + \"/@@error-log-form\"\n                )\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-show-entry?id=%s\" % search\n            )\n\n        elif getattr(self.request, \"form.button.showall\", None) is not None:\n            member.setProperties(error_log_update=0.0)\n            self.context.plone_utils.addPortalMessage(_(\"Showing all entries\"))\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n        elif getattr(self.request, \"form.button.clear\", None) is not None:\n            member.setProperties(error_log_update=DateTime().timeTime())\n            self.context.plone_utils.addPortalMessage(_(\"Entries cleared\"))\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n        else:\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n\nclass ErrorLogSetProperties(BrowserView):\n    def __call__(self):\n        keep_entries = self.request.form.get(\"keep_entries\")\n        ignored_exceptions = self.request.form.get(\"ignored_exceptions\")\n        copy_to_zlog = self.request.form.get(\"copy_to_zlog\", 0)\n\n        ignored_exceptions = map(safe_nativestring, ignored_exceptions)\n        self.context.error_log.setProperties(\n            keep_entries, copy_to_zlog, ignored_exceptions\n        )\n        self.context.plone_utils.addPortalMessage(_(\"Changes made.\"))\n\n        return self.request.RESPONSE.redirect(\n            self.context.absolute_url() + \"/@@error-log-form\"\n        )\n", "path": "Products/CMFPlone/controlpanel/browser/error_log_form.py"}], "after_files": [{"content": "from setuptools import find_packages\nfrom setuptools import setup\n\n\nversion = \"6.1.0a4.dev0\"\n\n\nsetup(\n    name=\"Products.CMFPlone\",\n    version=version,\n    description=\"The Plone Content Management System (core)\",\n    long_description=open(\"README.md\").read() + \"\\n\" + open(\"CHANGES.md\").read(),\n    long_description_content_type=\"text/markdown\",\n    classifiers=[\n        \"Development Status :: 5 - Production/Stable\",\n        \"Environment :: Web Environment\",\n        \"Framework :: Plone\",\n        \"Framework :: Plone :: 6.0\",\n        \"Framework :: Plone :: Core\",\n        \"Framework :: Zope :: 5\",\n        \"License :: OSI Approved :: GNU General Public License v2 (GPLv2)\",\n        \"Operating System :: OS Independent\",\n        \"Programming Language :: Python\",\n        \"Programming Language :: Python :: 3.8\",\n        \"Programming Language :: Python :: 3.9\",\n        \"Programming Language :: Python :: 3.10\",\n        \"Programming Language :: Python :: 3.11\",\n        \"Programming Language :: Python :: 3.12\",\n    ],\n    python_requires=\">=3.8\",\n    keywords=\"Plone CMF Python Zope CMS Webapplication\",\n    author=\"Plone Foundation\",\n    author_email=\"releasemanager@plone.org\",\n    url=\"https://plone.org\",\n    license=\"GPL version 2\",\n    project_urls={\n        \"Homepage\": \"https://plone.org\",\n        \"Documentation\": \"https://6.docs.plone.org\",\n        \"Source\": \"https://github.com/plone/Products.CMFPlone\",\n        \"Issues\": \"https://github.com/plone/plone.org/Products.CMFPlone\",\n        \"Forum\": \"https://community.plone.org/\",\n        \"Chat\": \"https://discord.gg/zFY3EBbjaj\",\n        \"Mastodon\": \"https://plone.social/@plone\",\n        \"Twitter\": \"https://twitter.com/plone\",\n        \"Videos\": \"https://youtube.com/@plonecms\",\n        \"Sponsor\": \"https://github.com/sponsors/plone\",\n    },\n    packages=find_packages(),\n    namespace_packages=[\"Products\"],\n    include_package_data=True,\n    zip_safe=False,\n    install_requires=[\n        \"borg.localrole\",\n        \"five.customerize\",\n        \"lxml\",\n        \"plone.app.content\",\n        \"plone.app.contentlisting\",\n        \"plone.app.contentmenu >= 2.0.1\",\n        \"plone.app.contentrules\",\n        \"plone.app.contenttypes\",\n        \"plone.app.customerize\",\n        \"plone.app.dexterity\",\n        \"plone.app.discussion\",\n        \"plone.app.i18n\",\n        \"plone.app.layout >= 2.5.15\",\n        \"plone.app.linkintegrity >=1.0.3\",\n        \"plone.app.locales\",\n        \"plone.app.portlets\",\n        \"plone.app.redirector\",\n        \"plone.app.registry\",\n        \"plone.app.theming\",\n        \"plone.app.users\",\n        \"plone.app.uuid\",\n        \"plone.app.viewletmanager\",\n        \"plone.app.vocabularies\",\n        \"plone.app.workflow\",\n        \"plone.app.z3cform >= 4.1.0\",\n        \"plone.base\",\n        \"plone.browserlayer >= 2.1.5\",\n        \"plone.contentrules\",\n        \"plone.folder\",\n        \"plone.i18n >= 4.0.5\",\n        \"plone.indexer\",\n        \"plone.intelligenttext\",\n        \"plone.locking\",\n        \"plone.memoize\",\n        \"plone.outputfilters\",\n        \"plone.portlet.collection\",\n        \"plone.portlet.static\",\n        \"plone.portlets\",\n        \"plone.protect >= 3.0.0\",\n        \"plone.resource\",\n        \"plone.schema\",\n        \"plone.session\",\n        \"plone.staticresources\",\n        \"plone.theme\",\n        \"plonetheme.barceloneta\",\n        \"Products.CMFEditions\",\n        \"Products.DCWorkflow\",\n        \"Products.ExtendedPathIndex\",\n        \"Products.isurlinportal\",\n        \"Products.MimetypesRegistry\",\n        \"Products.PlonePAS\",\n        \"Products.PortalTransforms\",\n        \"Products.SiteErrorLog\",\n        \"Products.statusmessages\",\n        \"setuptools>=36.2\",\n        \"plone.autoinclude\",\n        \"webresource>=1.2\",\n        \"Zope[wsgi] >= 5.0\",\n        \"zope.app.locales >= 3.6.0\",\n        \"zope.cachedescriptors\",\n        \"zope.deferredimport\",\n        \"zope.deprecation\",\n        \"zope.dottedname\",\n        \"zope.i18n\",\n        \"zope.i18nmessageid\",\n        \"zope.structuredtext\",\n    ],\n    extras_require={\n        \"test\": [\n            \"lxml\",\n            \"plone.app.robotframework>=1.0\",\n            \"robotframework-debuglibrary\",\n            \"plone.app.testing\",\n            \"zope.globalrequest\",\n            \"zope.testing\",\n            \"gunicorn\",\n        ]\n    },\n)\n", "path": "setup.py"}, {"content": "from DateTime import DateTime\nfrom plone.base import PloneMessageFactory as _\nfrom Products.CMFCore.utils import getToolByName\nfrom Products.CMFPlone.utils import safe_nativestring\nfrom Products.Five import BrowserView\n\n\nclass ErrorLogUpdate(BrowserView):\n    def __call__(self):\n        portal_membership = getToolByName(self.context, \"portal_membership\")\n        member = portal_membership.getAuthenticatedMember()\n\n        if getattr(self.request, \"form.button.search\", None) is not None:\n            search = self.request.form.get(\"search_entry\")\n            if search == \"\":\n                member.setProperties(error_log_update=0.0)\n                self.context.plone_utils.addPortalMessage(_(\"Showing all entries\"))\n                return self.request.RESPONSE.redirect(\n                    self.context.absolute_url() + \"/@@error-log-form\"\n                )\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-show-entry?id=%s\" % search\n            )\n\n        elif getattr(self.request, \"form.button.showall\", None) is not None:\n            member.setProperties(error_log_update=0.0)\n            self.context.plone_utils.addPortalMessage(_(\"Showing all entries\"))\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n        elif getattr(self.request, \"form.button.clear\", None) is not None:\n            member.setProperties(error_log_update=DateTime().timeTime())\n            self.context.plone_utils.addPortalMessage(_(\"Entries cleared\"))\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n        else:\n            return self.request.RESPONSE.redirect(\n                self.context.absolute_url() + \"/@@error-log-form\"\n            )\n\n\nclass ErrorLogSetProperties(BrowserView):\n    def __call__(self):\n        keep_entries = self.request.form.get(\"keep_entries\")\n        ignored_exceptions = self.request.form.get(\"ignored_exceptions\")\n        copy_to_zlog = self.request.form.get(\"copy_to_zlog\", 0)\n\n        ignored_exceptions = map(safe_nativestring, ignored_exceptions)\n        self.context.error_log.setProperties(\n            keep_entries, copy_to_zlog, ignored_exceptions\n        )\n        self.context.plone_utils.addPortalMessage(_(\"Changes made.\"))\n\n        return self.request.RESPONSE.redirect(\n            self.context.absolute_url() + \"/@@error-log-form\"\n        )\n", "path": "Products/CMFPlone/controlpanel/browser/error_log_form.py"}]}