Skip to content

Commit

Permalink
Merge pull request #1271 from plone/fix-geticon-archetypes
Browse files Browse the repository at this point in the history
fix: getIcon for archetypes
  • Loading branch information
jensens committed Dec 3, 2015
2 parents 9abfa6c + ad873f9 commit 530ebe6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ Fixes:
https://github.com/plone/Products.CMFPlone/issues/1226
[fgrcon]

- Also remove deprecated icons for archetypes
[Gagaro]

- Fixed white space pep8 warnings.
[maurits]

Expand Down
12 changes: 10 additions & 2 deletions Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,16 @@ def is_default_page(obj):

@indexer(Interface)
def getIcon(obj):
"""Make sure we index icon relative to portal"""
return obj.getIcon(True)
"""
geticon redefined in Plone > 5.0
see https://github.com/plone/Products.CMFPlone/issues/1226
reuse of metadata field,
now used for showing thumbs in content listings etc.
when obj is an image or has a lead image
or has an image field with name 'image': true else false
"""
return bool(getattr(obj.aq_base, 'image', False))


@indexer(Interface)
Expand Down

0 comments on commit 530ebe6

Please sign in to comment.