Commit f4c48efa authored by Jim Fulton's avatar Jim Fulton

Changed to use DestinationURL

parent 749a99d0
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""DTML Document objects.""" """DTML Document objects."""
__version__='$Revision: 1.17 $'[11:-2] __version__='$Revision: 1.18 $'[11:-2]
from DocumentTemplate.DT_Util import InstanceDict, TemplateDict from DocumentTemplate.DT_Util import InstanceDict, TemplateDict
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTML, HTMLFile, MessageDialog from Globals import HTML, HTMLFile, MessageDialog
...@@ -204,7 +204,8 @@ def addDTMLDocument(self, id, title='', file='', REQUEST=None, submit=None): ...@@ -204,7 +204,8 @@ def addDTMLDocument(self, id, title='', file='', REQUEST=None, submit=None):
ob.title=title ob.title=title
id=self._setObject(id, ob) id=self._setObject(id, ob)
if REQUEST is not None: if REQUEST is not None:
u=REQUEST['URL1'] try: u=self.DestinationURL()
except: u=REQUEST['URL1']
if submit==" Add and Edit ": u="%s/%s" % (u,quote(id)) if submit==" Add and Edit ": u="%s/%s" % (u,quote(id))
REQUEST.RESPONSE.redirect(u+'/manage_main') REQUEST.RESPONSE.redirect(u+'/manage_main')
return '' return ''
......
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