Skip to content

Commit

Permalink
signature of ajaxGetNode
Browse files Browse the repository at this point in the history
  • Loading branch information
zmsdev committed Jul 20, 2023
1 parent ec356b2 commit e5f2dec
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions Products/zms/zmsobject.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,28 +1149,16 @@ def ajaxGetNodes(self, context=None, lang=None, xml_header=True, REQUEST=None):
if ob is None:
xml += '<page ref="%s" not_found="1"/>'%ref
else:
xml += ob.ajaxGetNode(context=context, lang=lang, xml_header=False, REQUEST=REQUEST)
xml += ob.ajaxGetNode(context, REQUEST)
xml += "</pages>"
return xml


# --------------------------------------------------------------------------
# ZMSObject.ajaxGetNode:
# --------------------------------------------------------------------------
def ajaxGetNode(self, context=None, lang=None, xml_header=True, meta_types=None, REQUEST=None):

#-- Build xml.
def ajaxGetNode(self, context, REQUEST):
xml = ''
if xml_header:
RESPONSE = REQUEST.RESPONSE
content_type = 'text/xml; charset=utf-8'
filename = 'ajaxGetNode.xml'
RESPONSE.setHeader('Content-Type', content_type)
RESPONSE.setHeader('Content-Disposition', 'inline;filename="%s"'%filename)
RESPONSE.setHeader('Cache-Control', 'no-cache')
RESPONSE.setHeader('Pragma', 'no-cache')
self.f_standard_html_request( self, REQUEST)
xml += self.getXmlHeader()
xml += '<page'
xml += " absolute_url=\"%s\""%str(self.getAbsoluteUrlInContext(context))
xml += " physical_path=\"%s\""%('/'.join(self.getPhysicalPath()))
Expand Down Expand Up @@ -1250,7 +1238,7 @@ def ajaxGetParentNodes(self, lang, xml_header=True, meta_types=None, REQUEST=Non
xml += ">\n"
# Process nodes.
for node in self.breadcrumbs_obj_path():
nodexml = node.ajaxGetNode( context=context, lang=lang, xml_header=False, meta_types=meta_types, REQUEST=REQUEST)
nodexml = node.ajaxGetNode( context, REQUEST)
try:
xml += str(nodexml, 'utf-8', errors='ignore')
except:
Expand Down Expand Up @@ -1321,7 +1309,7 @@ def ajaxGetChildNodes(self, lang, xml_header=True, meta_types=None, REQUEST=None
childNodes.extend( self.getPortalClients())

for ob in childNodes:
xml += ob.ajaxGetNode( context=context, lang=lang, xml_header=False, meta_types=meta_types, REQUEST=REQUEST)
xml += ob.ajaxGetNode( context, REQUEST)

xml += "</pages>"

Expand Down

1 comment on commit e5f2dec

@drfho
Copy link
Contributor

@drfho drfho commented on e5f2dec Jul 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

now, ajaxGetNode is not accessible anymore
image

Please sign in to comment.