diff --git a/last_commit.txt b/last_commit.txt index 99c5dfda3b..b3a0664132 100644 --- a/last_commit.txt +++ b/last_commit.txt @@ -1,17 +1,34 @@ -Repository: plone.memoize +Repository: Products.CMFEditions Branch: refs/heads/master -Date: 2018-08-21T09:54:48+02:00 -Author: Michael Howitz (icemac) -Commit: https://github.com/plone/plone.memoize/commit/5a2830379559e85c43100fd6befd0151f74fe05c +Date: 2018-09-03T13:57:39+02:00 +Author: Davi Lima (davilima6) +Commit: https://github.com/plone/Products.CMFEditions/commit/bf653c6c3f414d08e62d9f55bfe0d0c9eeb6dd32 -Fix the Travis config (#11) +Fixes plone/Products.CMFPlone#2463 -* Fix the Travis config so it actually runs the tests. +Files changed: +M CHANGES.rst +M Products/CMFEditions/skins/CMFEditions/revertversion.py + +b"diff --git a/CHANGES.rst b/CHANGES.rst\nindex e19b410..6ac273a 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,9 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix Unauthorized error due to importing six inside Restricted Python\n+ `Plone issue 2463 `_\n+ [davilima6]\n \n \n 3.2.1 (2018-06-18)\ndiff --git a/Products/CMFEditions/skins/CMFEditions/revertversion.py b/Products/CMFEditions/skins/CMFEditions/revertversion.py\nindex b3bcea1..e01b0cc 100644\n--- a/Products/CMFEditions/skins/CMFEditions/revertversion.py\n+++ b/Products/CMFEditions/skins/CMFEditions/revertversion.py\n@@ -9,8 +9,7 @@\n ##\n from Products.CMFEditions import CMFEditionsMessageFactory as _\n from Products.CMFEditions.interfaces.IModifier import FileTooLargeToVersionError\n-\n-import six\n+from Products.CMFPlone.utils import safe_unicode\n \n \n RESPONSE = context.REQUEST.RESPONSE\n@@ -20,16 +19,11 @@\n \n obj_type_view_url = context.getTypeInfo().getActionInfo('object/view')['url']\n if obj_type_view_url != '/':\n- view_url = '%s/%s' % (context.absolute_url(),\n- obj_type_view_url\n- )\n+ view_url = '%s/%s' % (context.absolute_url(), obj_type_view_url)\n else:\n view_url = context.absolute_url()\n \n-title = context.title_or_id()\n-if not isinstance(title, six.text_type):\n- title = six.text_type(title, 'utf-8', 'ignore')\n-\n+title = safe_unicode(context.title_or_id())\n msg = _(u'${title} has been reverted to revision ${version}.',\n mapping={'title': title,\n 'version': version_id})\n@@ -47,4 +41,5 @@\n )\n \n context.plone_utils.addPortalMessage(msg)\n+\n return RESPONSE.redirect(view_url)\n" + +Repository: Products.CMFEditions + + +Branch: refs/heads/master +Date: 2018-09-04T09:21:03+02:00 +Author: Jens W. Klein (jensens) +Commit: https://github.com/plone/Products.CMFEditions/commit/b3915dfc5abb219ea11e34ff78d30b9f97ac460d + +Merge pull request #59 from plone/Products.CMFPlone_2463 + +Fixes Products.CMFPlone#2463 Files changed: -M .travis.yml +M CHANGES.rst +M Products/CMFEditions/skins/CMFEditions/revertversion.py -b'diff --git a/.travis.yml b/.travis.yml\nindex 78a4d14..e18197c 100644\n--- a/.travis.yml\n+++ b/.travis.yml\n@@ -10,7 +10,7 @@ install:\n - buildout bootstrap\n - buildout install test\n script:\n- - coverage run bin/tests -v\n+ - coverage run bin/test -v\n after_success:\n - coveralls\n notifications:\n' +b"diff --git a/CHANGES.rst b/CHANGES.rst\nindex e19b410..6ac273a 100644\n--- a/CHANGES.rst\n+++ b/CHANGES.rst\n@@ -14,7 +14,9 @@ New features:\n \n Bug fixes:\n \n-- *add item here*\n+- Fix Unauthorized error due to importing six inside Restricted Python\n+ `Plone issue 2463 `_\n+ [davilima6]\n \n \n 3.2.1 (2018-06-18)\ndiff --git a/Products/CMFEditions/skins/CMFEditions/revertversion.py b/Products/CMFEditions/skins/CMFEditions/revertversion.py\nindex b3bcea1..e01b0cc 100644\n--- a/Products/CMFEditions/skins/CMFEditions/revertversion.py\n+++ b/Products/CMFEditions/skins/CMFEditions/revertversion.py\n@@ -9,8 +9,7 @@\n ##\n from Products.CMFEditions import CMFEditionsMessageFactory as _\n from Products.CMFEditions.interfaces.IModifier import FileTooLargeToVersionError\n-\n-import six\n+from Products.CMFPlone.utils import safe_unicode\n \n \n RESPONSE = context.REQUEST.RESPONSE\n@@ -20,16 +19,11 @@\n \n obj_type_view_url = context.getTypeInfo().getActionInfo('object/view')['url']\n if obj_type_view_url != '/':\n- view_url = '%s/%s' % (context.absolute_url(),\n- obj_type_view_url\n- )\n+ view_url = '%s/%s' % (context.absolute_url(), obj_type_view_url)\n else:\n view_url = context.absolute_url()\n \n-title = context.title_or_id()\n-if not isinstance(title, six.text_type):\n- title = six.text_type(title, 'utf-8', 'ignore')\n-\n+title = safe_unicode(context.title_or_id())\n msg = _(u'${title} has been reverted to revision ${version}.',\n mapping={'title': title,\n 'version': version_id})\n@@ -47,4 +41,5 @@\n )\n \n context.plone_utils.addPortalMessage(msg)\n+\n return RESPONSE.redirect(view_url)\n"