Skip to content

Commit

Permalink
[fc] Repository: plone.app.registry
Browse files Browse the repository at this point in the history
Branch: refs/heads/master
Date: 2019-03-02T15:09:51+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.app.registry@94379ab

fix registry-export with Generic Setup

Files changed:
M plone/app/registry/exportimport/handler.py
Repository: plone.app.registry

Branch: refs/heads/master
Date: 2019-03-02T15:12:23+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.app.registry@72961ac

add changelog

Files changed:
A news/34.bugfix
Repository: plone.app.registry

Branch: refs/heads/master
Date: 2019-03-02T15:22:00+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.app.registry@69f2dba

fix export by interface or prefix

Files changed:
M plone/app/registry/browser/exportxml.py
Repository: plone.app.registry

Branch: refs/heads/master
Date: 2019-03-02T16:50:22+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: plone/plone.app.registry@7ca417f

Merge pull request #35 from plone/gix_gs_export

Fix Generic Setup Export

Files changed:
A news/34.bugfix
M plone/app/registry/browser/exportxml.py
M plone/app/registry/exportimport/handler.py
  • Loading branch information
pbauer committed Mar 2, 2019
1 parent c651b52 commit c935d36
Showing 1 changed file with 46 additions and 18 deletions.
64 changes: 46 additions & 18 deletions last_commit.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,64 @@
Repository: plone.app.workflow
Repository: plone.app.registry


Branch: refs/heads/master
Date: 2019-03-02T00:43:33+01:00
Author: ale-rt (ale-rt) <alessandro.pisa@gmail.com>
Commit: https://github.com/plone/plone.app.workflow/commit/9793bec9629db5563c6e90f6171d0c67f3b38abd
Date: 2019-03-02T15:09:51+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.registry/commit/94379ab861f3586982808cc772d70660f01d0216

The sharing search form remembers the search term
fix registry-export with Generic Setup

Fixes #19
Files changed:
M plone/app/registry/exportimport/handler.py

b"diff --git a/plone/app/registry/exportimport/handler.py b/plone/app/registry/exportimport/handler.py\nindex 9c47bdc..f34cf5e 100644\n--- a/plone/app/registry/exportimport/handler.py\n+++ b/plone/app/registry/exportimport/handler.py\n@@ -14,14 +14,14 @@\n from plone.supermodel.utils import ns\n from plone.supermodel.utils import prettyXML\n from plone.supermodel.utils import valueToElement\n+from Products.CMFPlone.utils import safe_encode\n+from Products.CMFPlone.utils import safe_unicode\n from zope.component import queryUtility\n from zope.configuration import config\n from zope.configuration import xmlconfig\n from zope.dottedname.resolve import resolve\n from zope.schema import getFieldNames\n \n-import six\n-\n \n _marker = object()\n \n@@ -91,7 +91,7 @@ def exportRegistry(context):\n exporter = RegistryExporter(registry, context)\n body = exporter.exportDocument()\n if body is not None:\n- context.writeDataFile('registry.xml', body, 'text/xml')\n+ context.writeDataFile('registry.xml', safe_encode(body), 'text/xml')\n \n \n class RegistryImporter(object):\n@@ -370,7 +370,7 @@ def importRecords(self, node):\n continue\n elif child.tag.lower() == 'omit':\n if child.text:\n- omit.append(six.text_type(child.text))\n+ omit.append(safe_unicode(child.text))\n elif child.tag.lower() == 'value':\n values.append(child)\n \n"

Repository: plone.app.registry


Branch: refs/heads/master
Date: 2019-03-02T15:12:23+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.registry/commit/72961aca9beb0b3473700332532e6d1939406137

add changelog

Files changed:
A news/34.bugfix

b'diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..1d6810e\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1,2 @@\n+Fix export of registry with Generic Setup.\n+[pbauer]\n\\ No newline at end of file\n'

Repository: plone.app.registry


Branch: refs/heads/master
Date: 2019-03-02T15:22:00+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.registry/commit/69f2dbad62ea5245de7a7898686e6778a25f7c8b

fix export by interface or prefix

Files changed:
A news/19.bugfix
M plone/app/workflow/browser/sharing.pt
M plone/app/registry/browser/exportxml.py

b'diff --git a/news/19.bugfix b/news/19.bugfix\nnew file mode 100644\nindex 0000000..94e1475\n--- /dev/null\n+++ b/news/19.bugfix\n@@ -0,0 +1 @@\n+The sharing search form remembers the search term [ale-rt]\ndiff --git a/plone/app/workflow/browser/sharing.pt b/plone/app/workflow/browser/sharing.pt\nindex 2afb4af..7f9cfb5 100644\n--- a/plone/app/workflow/browser/sharing.pt\n+++ b/plone/app/workflow/browser/sharing.pt\n@@ -57,7 +57,7 @@\n placeholder="Search for user or group"\n i18n:attributes="title; placeholder"\n class="searchField"\n- value=""\n+ value="${request/search_term|nothing}"\n />\n <input type="submit"\n id="sharing-search-button"\n'
b"diff --git a/plone/app/registry/browser/exportxml.py b/plone/app/registry/browser/exportxml.py\nindex 4fccfd4..60e9cdd 100644\n--- a/plone/app/registry/browser/exportxml.py\n+++ b/plone/app/registry/browser/exportxml.py\n@@ -6,6 +6,7 @@\n from zope.component import getUtility\n \n import os\n+import six\n \n _current_dir = os.path.dirname(__file__)\n \n@@ -95,7 +96,7 @@ def export(self, sinterface=None, sname=None):\n xmlel.text = element\n elif isinstance(record.value, bool):\n xmlvalue.text = 'True' if record.value else 'False'\n- elif isinstance(record.value, basestring):\n+ elif isinstance(record.value, six.string_types):\n xmlvalue.text = record.value\n else:\n xmlvalue.text = str(record.value)\n"

Repository: plone.app.workflow
Repository: plone.app.registry


Branch: refs/heads/master
Date: 2019-03-02T11:37:52+01:00
Author: Jens W. Klein (jensens) <jk@kleinundpartner.at>
Commit: https://github.com/plone/plone.app.workflow/commit/99c35923870cc7c15e37ae3b9ed78d5f788a8a4d
Date: 2019-03-02T16:50:22+01:00
Author: Philip Bauer (pbauer) <bauer@starzel.de>
Commit: https://github.com/plone/plone.app.registry/commit/7ca417ff63837febed30c259df705baf5edfb334

Merge pull request #20 from plone/19-remember-search
Merge pull request #35 from plone/gix_gs_export

The sharing search form remembers the search term
Fix Generic Setup Export

Files changed:
A news/19.bugfix
M plone/app/workflow/browser/sharing.pt
A news/34.bugfix
M plone/app/registry/browser/exportxml.py
M plone/app/registry/exportimport/handler.py

b'diff --git a/news/19.bugfix b/news/19.bugfix\nnew file mode 100644\nindex 0000000..94e1475\n--- /dev/null\n+++ b/news/19.bugfix\n@@ -0,0 +1 @@\n+The sharing search form remembers the search term [ale-rt]\ndiff --git a/plone/app/workflow/browser/sharing.pt b/plone/app/workflow/browser/sharing.pt\nindex 2afb4af..7f9cfb5 100644\n--- a/plone/app/workflow/browser/sharing.pt\n+++ b/plone/app/workflow/browser/sharing.pt\n@@ -57,7 +57,7 @@\n placeholder="Search for user or group"\n i18n:attributes="title; placeholder"\n class="searchField"\n- value=""\n+ value="${request/search_term|nothing}"\n />\n <input type="submit"\n id="sharing-search-button"\n'
b"diff --git a/news/34.bugfix b/news/34.bugfix\nnew file mode 100644\nindex 0000000..1d6810e\n--- /dev/null\n+++ b/news/34.bugfix\n@@ -0,0 +1,2 @@\n+Fix export of registry with Generic Setup.\n+[pbauer]\n\\ No newline at end of file\ndiff --git a/plone/app/registry/browser/exportxml.py b/plone/app/registry/browser/exportxml.py\nindex 4fccfd4..60e9cdd 100644\n--- a/plone/app/registry/browser/exportxml.py\n+++ b/plone/app/registry/browser/exportxml.py\n@@ -6,6 +6,7 @@\n from zope.component import getUtility\n \n import os\n+import six\n \n _current_dir = os.path.dirname(__file__)\n \n@@ -95,7 +96,7 @@ def export(self, sinterface=None, sname=None):\n xmlel.text = element\n elif isinstance(record.value, bool):\n xmlvalue.text = 'True' if record.value else 'False'\n- elif isinstance(record.value, basestring):\n+ elif isinstance(record.value, six.string_types):\n xmlvalue.text = record.value\n else:\n xmlvalue.text = str(record.value)\ndiff --git a/plone/app/registry/exportimport/handler.py b/plone/app/registry/exportimport/handler.py\nindex 9c47bdc..f34cf5e 100644\n--- a/plone/app/registry/exportimport/handler.py\n+++ b/plone/app/registry/exportimport/handler.py\n@@ -14,14 +14,14 @@\n from plone.supermodel.utils import ns\n from plone.supermodel.utils import prettyXML\n from plone.supermodel.utils import valueToElement\n+from Products.CMFPlone.utils import safe_encode\n+from Products.CMFPlone.utils import safe_unicode\n from zope.component import queryUtility\n from zope.configuration import config\n from zope.configuration import xmlconfig\n from zope.dottedname.resolve import resolve\n from zope.schema import getFieldNames\n \n-import six\n-\n \n _marker = object()\n \n@@ -91,7 +91,7 @@ def exportRegistry(context):\n exporter = RegistryExporter(registry, context)\n body = exporter.exportDocument()\n if body is not None:\n- context.writeDataFile('registry.xml', body, 'text/xml')\n+ context.writeDataFile('registry.xml', safe_encode(body), 'text/xml')\n \n \n class RegistryImporter(object):\n@@ -370,7 +370,7 @@ def importRecords(self, node):\n continue\n elif child.tag.lower() == 'omit':\n if child.text:\n- omit.append(six.text_type(child.text))\n+ omit.append(safe_unicode(child.text))\n elif child.tag.lower() == 'value':\n values.append(child)\n \n"

0 comments on commit c935d36

Please sign in to comment.