Skip to content

Commit

Permalink
fixed deprecated getLinkHtml (requested by KPOH)
Browse files Browse the repository at this point in the history
svn path=/ZMS/branches/zms4/; revision=5560
  • Loading branch information
zmsdev committed Apr 25, 2020
1 parent e1b93d5 commit 16b8468
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions Products/zms/_deprecatedapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,17 +100,13 @@ def getLinkHtml( self, url, html='<a href="%s">&raquo;</a>', REQUEST=None):
s = ''
ob = self
while ob is not None:
if html in ob.getMetaobjIds():
metaObj = ob.getMetaobj( html)
metaObjAttr = ob.getMetaobjAttr( metaObj['id'], 'getLinkHtml')
if isinstance(metaObjAttr, dict):
REQUEST.set( 'ref_id', url)
return standard.dt_exec(self, metaObjAttr['custom'])
if html in ob.getMetaobjIds() and 'getLinkHtml' in ob.getMetaobjAttrIds(html):
REQUEST.set( 'ref_id', url)
return ob.evalMetaobjAttr('%s.getLinkHtml'%html,ref_id=url)
ob = ob.getPortalMaster()
ob = self.getLinkObj(url)
if ob is not None:
if ob.isActive(REQUEST) and \
ob.isVisible(REQUEST):
if ob.isVisible(REQUEST):
url = ob.getHref2IndexHtml(REQUEST)
s = html%url
return s
Expand Down

0 comments on commit 16b8468

Please sign in to comment.