-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[fc] Repository: plone.app.contentlisting
Branch: refs/heads/2.x Date: 2022-08-06T20:45:42+02:00 Author: Mikel Larreategi (erral) <[email protected]> Commit: plone/plone.app.contentlisting@b7e986c build the mime-type icon with absolute url Files changed: A news/44.bugfix M plone/app/contentlisting/contentlisting.py Repository: plone.app.contentlisting Branch: refs/heads/2.x Date: 2022-08-13T17:16:39+02:00 Author: Jens W. Klein (jensens) <[email protected]> Commit: plone/plone.app.contentlisting@1280e88 Merge pull request #45 from plone/erral-issue-44-branch-2.x build the mime-type icon with absolute url Files changed: A news/44.bugfix M plone/app/contentlisting/contentlisting.py
- Loading branch information
Showing
1 changed file
with
17 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,34 @@ | ||
Repository: Products.CMFPlone | ||
Repository: plone.app.contentlisting | ||
|
||
|
||
Branch: refs/heads/5.2.x | ||
Date: 2022-08-06T19:28:25+02:00 | ||
Branch: refs/heads/2.x | ||
Date: 2022-08-06T20:45:42+02:00 | ||
Author: Mikel Larreategi (erral) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/00d3f0c4f770cca3afec9583c7ed870eb5833b21 | ||
Commit: https://github.com/plone/plone.app.contentlisting/commit/b7e986c120a8c216a14bee024094c8272cd4ff82 | ||
|
||
change test to make sure email is sent in utf-8 | ||
build the mime-type icon with absolute url | ||
|
||
Files changed: | ||
M Products/CMFPlone/tests/testRegistrationTool.py | ||
A news/44.bugfix | ||
M plone/app/contentlisting/contentlisting.py | ||
|
||
b'diff --git a/Products/CMFPlone/tests/testRegistrationTool.py b/Products/CMFPlone/tests/testRegistrationTool.py\nindex 0a922935f1..c2131b93ce 100644\n--- a/Products/CMFPlone/tests/testRegistrationTool.py\n+++ b/Products/CMFPlone/tests/testRegistrationTool.py\n@@ -243,7 +243,7 @@ def testMailPasswordEncoding(self):\n mail_settings.email_from_address = \'[email protected]\'\n \n # Set the portal email encoding\n- mail_settings.email_charset = \'us-ascii\'\n+ self.assertEqual(mail_settings.email_charset, "utf-8")\n \n from zope.publisher.browser import TestRequest\n self.registration.mailPassword(member_id, TestRequest())\n@@ -251,7 +251,7 @@ def testMailPasswordEncoding(self):\n msg = message_from_bytes(mails.messages[0])\n \n # Ensure charset (and thus Content-Type) were set via template\n- self.assertEqual(msg[\'Content-Type\'], \'text/plain; charset="us-ascii"\')\n+ self.assertEqual(msg[\'Content-Type\'], \'text/plain; charset="utf-8"\')\n \n \n class TestPasswordGeneration(PloneTestCase.PloneTestCase):\n' | ||
b"diff --git a/news/44.bugfix b/news/44.bugfix\nnew file mode 100644\nindex 0000000..d55a0dd\n--- /dev/null\n+++ b/news/44.bugfix\n@@ -0,0 +1,2 @@\n+Build the mime-type icon url with an absolute url. Fixes #44\n+[erral]\ndiff --git a/plone/app/contentlisting/contentlisting.py b/plone/app/contentlisting/contentlisting.py\nindex 2dc6588..778b260 100644\n--- a/plone/app/contentlisting/contentlisting.py\n+++ b/plone/app/contentlisting/contentlisting.py\n@@ -3,7 +3,7 @@\n from Acquisition import aq_base\n from plone.app.contentlisting.interfaces import IContentListing\n from plone.app.contentlisting.interfaces import IContentListingObject\n-from plone.app.layout.navigation.root import getNavigationRoot\n+from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.i18n.normalizer.interfaces import IIDNormalizer\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -164,7 +164,9 @@ def isVisibleInNav(self):\n \n def MimeTypeIcon(self):\n mimeicon = None\n- navroot = getNavigationRoot(self._brain)\n+ portal_url_object = getToolByName(self._brain, 'portal_url')\n+ portal = portal_url_object.getPortalObject()\n+ navroot = getNavigationRootObject(self._brain, portal)\n contenttype = aq_base(\n getattr(self._brain, 'mime_type', None),\n )\n@@ -176,7 +178,7 @@ def MimeTypeIcon(self):\n ctype = mtt.lookup(contenttype)\n if ctype:\n mimeicon = os.path.join(\n- navroot,\n+ navroot.absolute_url(),\n guess_icon_path(ctype[0]),\n )\n \n" | ||
|
||
Repository: Products.CMFPlone | ||
Repository: plone.app.contentlisting | ||
|
||
|
||
Branch: refs/heads/5.2.x | ||
Date: 2022-08-06T19:29:29+02:00 | ||
Author: Mikel Larreategi (erral) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/f9fe79026c4ce77469d8a3351580e3fda445ce53 | ||
|
||
changelog | ||
|
||
Files changed: | ||
A news/3588.bugfix | ||
|
||
b'diff --git a/news/3588.bugfix b/news/3588.bugfix\nnew file mode 100644\nindex 0000000000..5b6ba8ef04\n--- /dev/null\n+++ b/news/3588.bugfix\n@@ -0,0 +1,2 @@\n+Change test to make sure email is sent in utf-8\n+[erral]\n' | ||
|
||
Repository: Products.CMFPlone | ||
|
||
|
||
Branch: refs/heads/5.2.x | ||
Date: 2022-08-13T16:52:51+02:00 | ||
Branch: refs/heads/2.x | ||
Date: 2022-08-13T17:16:39+02:00 | ||
Author: Jens W. Klein (jensens) <[email protected]> | ||
Commit: https://github.com/plone/Products.CMFPlone/commit/485632bf1939aba8c002e9f1ec012e1e23477444 | ||
Commit: https://github.com/plone/plone.app.contentlisting/commit/1280e88d443ba826a159c05ecd92623db96825cb | ||
|
||
Merge pull request #3588 from plone/erral-issue-317-plone-app-layout-plone-5.2 | ||
Merge pull request #45 from plone/erral-issue-44-branch-2.x | ||
|
||
change test to make sure email is sent in utf-8 | ||
build the mime-type icon with absolute url | ||
|
||
Files changed: | ||
A news/3588.bugfix | ||
M Products/CMFPlone/tests/testRegistrationTool.py | ||
A news/44.bugfix | ||
M plone/app/contentlisting/contentlisting.py | ||
|
||
b'diff --git a/Products/CMFPlone/tests/testRegistrationTool.py b/Products/CMFPlone/tests/testRegistrationTool.py\nindex 0a922935f1..c2131b93ce 100644\n--- a/Products/CMFPlone/tests/testRegistrationTool.py\n+++ b/Products/CMFPlone/tests/testRegistrationTool.py\n@@ -243,7 +243,7 @@ def testMailPasswordEncoding(self):\n mail_settings.email_from_address = \'[email protected]\'\n \n # Set the portal email encoding\n- mail_settings.email_charset = \'us-ascii\'\n+ self.assertEqual(mail_settings.email_charset, "utf-8")\n \n from zope.publisher.browser import TestRequest\n self.registration.mailPassword(member_id, TestRequest())\n@@ -251,7 +251,7 @@ def testMailPasswordEncoding(self):\n msg = message_from_bytes(mails.messages[0])\n \n # Ensure charset (and thus Content-Type) were set via template\n- self.assertEqual(msg[\'Content-Type\'], \'text/plain; charset="us-ascii"\')\n+ self.assertEqual(msg[\'Content-Type\'], \'text/plain; charset="utf-8"\')\n \n \n class TestPasswordGeneration(PloneTestCase.PloneTestCase):\ndiff --git a/news/3588.bugfix b/news/3588.bugfix\nnew file mode 100644\nindex 0000000000..5b6ba8ef04\n--- /dev/null\n+++ b/news/3588.bugfix\n@@ -0,0 +1,2 @@\n+Change test to make sure email is sent in utf-8\n+[erral]\n' | ||
b"diff --git a/news/44.bugfix b/news/44.bugfix\nnew file mode 100644\nindex 0000000..d55a0dd\n--- /dev/null\n+++ b/news/44.bugfix\n@@ -0,0 +1,2 @@\n+Build the mime-type icon url with an absolute url. Fixes #44\n+[erral]\ndiff --git a/plone/app/contentlisting/contentlisting.py b/plone/app/contentlisting/contentlisting.py\nindex 2dc6588..778b260 100644\n--- a/plone/app/contentlisting/contentlisting.py\n+++ b/plone/app/contentlisting/contentlisting.py\n@@ -3,7 +3,7 @@\n from Acquisition import aq_base\n from plone.app.contentlisting.interfaces import IContentListing\n from plone.app.contentlisting.interfaces import IContentListingObject\n-from plone.app.layout.navigation.root import getNavigationRoot\n+from plone.app.layout.navigation.root import getNavigationRootObject\n from plone.i18n.normalizer.interfaces import IIDNormalizer\n from plone.registry.interfaces import IRegistry\n from Products.CMFCore.utils import getToolByName\n@@ -164,7 +164,9 @@ def isVisibleInNav(self):\n \n def MimeTypeIcon(self):\n mimeicon = None\n- navroot = getNavigationRoot(self._brain)\n+ portal_url_object = getToolByName(self._brain, 'portal_url')\n+ portal = portal_url_object.getPortalObject()\n+ navroot = getNavigationRootObject(self._brain, portal)\n contenttype = aq_base(\n getattr(self._brain, 'mime_type', None),\n )\n@@ -176,7 +178,7 @@ def MimeTypeIcon(self):\n ctype = mtt.lookup(contenttype)\n if ctype:\n mimeicon = os.path.join(\n- navroot,\n+ navroot.absolute_url(),\n guess_icon_path(ctype[0]),\n )\n \n" | ||
|