Skip to content

Commit

Permalink
fix: getIcon for archetypes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gagaro committed Dec 2, 2015
1 parent 9abfa6c commit 197fae6
Show file tree
Hide file tree
Showing 2 changed files with 15 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
14 changes: 12 additions & 2 deletions Products/CMFPlone/CatalogTool.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,18 @@ 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
"""
if obj.aq_base.image:
return True
return False


@indexer(Interface)
Expand Down

0 comments on commit 197fae6

Please sign in to comment.