Commit 09f5b1db authored by Jim Fulton's avatar Jim Fulton

Added fix to avoid circular references through parents with

acquisition.
parent e9fd19ff
...@@ -518,7 +518,7 @@ Publishing a module using Fast CGI ...@@ -518,7 +518,7 @@ Publishing a module using Fast CGI
o Configure the Fast CGI-enabled web server to execute this o Configure the Fast CGI-enabled web server to execute this
file. file.
$Id: Publish.py,v 1.36 1997/03/20 22:31:46 jim Exp $""" $Id: Publish.py,v 1.37 1997/03/26 19:05:56 jim Exp $"""
#' #'
# Copyright # Copyright
# #
...@@ -572,7 +572,7 @@ $Id: Publish.py,v 1.36 1997/03/20 22:31:46 jim Exp $""" ...@@ -572,7 +572,7 @@ $Id: Publish.py,v 1.36 1997/03/20 22:31:46 jim Exp $"""
# #
# See end of file for change log. # See end of file for change log.
# #
__version__='$Revision: 1.36 $'[11:-2] __version__='$Revision: 1.37 $'[11:-2]
def main(): def main():
...@@ -944,7 +944,12 @@ class ModulePublisher: ...@@ -944,7 +944,12 @@ class ModulePublisher:
query['PARENT_URL']=URL[:string.rfind(URL,'/')] query['PARENT_URL']=URL[:string.rfind(URL,'/')]
if parents: if parents:
parents.reverse() parents.reverse()
query['self']=parents[0] selfarg=parents[0]
for i in range(len(parents)):
try:
p=parents[i].aq_self
parents[i]=p
except: pass
query['PARENTS']=parents query['PARENTS']=parents
response.setBase(self.base,URL) response.setBase(self.base,URL)
...@@ -956,7 +961,8 @@ class ModulePublisher: ...@@ -956,7 +961,8 @@ class ModulePublisher:
v=query[argument_name] v=query[argument_name]
args.append(v) args.append(v)
except (KeyError,AttributeError,IndexError): except (KeyError,AttributeError,IndexError):
if name_index < nrequired: if argument_name=='self': args.append(selfarg)
elif name_index < nrequired:
self.badRequestError(argument_name) self.badRequestError(argument_name)
else: else:
args.append(defaults[name_index-nrequired]) args.append(defaults[name_index-nrequired])
...@@ -1426,6 +1432,10 @@ def publish_module(module_name, ...@@ -1426,6 +1432,10 @@ def publish_module(module_name,
# #
# $Log: Publish.py,v $ # $Log: Publish.py,v $
# Revision 1.37 1997/03/26 19:05:56 jim
# Added fix to avoid circular references through parents with
# acquisition.
#
# Revision 1.36 1997/03/20 22:31:46 jim # Revision 1.36 1997/03/20 22:31:46 jim
# Added logic to requote URL components as I re-build URL path. # Added logic to requote URL components as I re-build URL path.
# #
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment