From 16b8468ebd2abf91604086ce6a98f154b8fc732e Mon Sep 17 00:00:00 2001 From: zmsdev Date: Sat, 25 Apr 2020 07:26:44 +0000 Subject: [PATCH] fixed deprecated getLinkHtml (requested by KPOH) svn path=/ZMS/branches/zms4/; revision=5560 --- Products/zms/_deprecatedapi.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/Products/zms/_deprecatedapi.py b/Products/zms/_deprecatedapi.py index 2e2405501..2ff0e2c2f 100644 --- a/Products/zms/_deprecatedapi.py +++ b/Products/zms/_deprecatedapi.py @@ -100,17 +100,13 @@ def getLinkHtml( self, url, html='»', 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