CVS: Products/ExternalEditor - ExternalEditor.py:1.27.2.2

Zachery Bir <[email protected]>
Newsgroups gmane.comp.web.zope.public-cvs
Message-ID <[email protected]>
Update of /cvs-repository/Products/ExternalEditor
In directory cvs.zope.org:/tmp/cvs-serv11134

Modified Files:
      Tag: ExternalEditor-zbir-extra-methods-branch
	ExternalEditor.py 
Log Message:
Better generation of the URL to use for the external edit link


=== Products/ExternalEditor/ExternalEditor.py 1.27.2.1 => 1.27.2.2 ===
--- Products/ExternalEditor/ExternalEditor.py:1.27.2.1	Wed Aug 17 16:40:49 2005
+++ Products/ExternalEditor/ExternalEditor.py	Tue Aug 23 10:25:32 2005
@@ -204,9 +204,9 @@
         if borrow_lock:
             query['borrow_lock'] = 1
 
-        return "%s/externalEdit_/%s%s%s" % (object.aq_parent.absolute_url(), 
-                                           urllib.quote(object.getId()), 
-                                           ext, querystr(query))
+        path = object.absolute_url().split('/')
+        path.insert(-1, 'externalEdit_')
+        return "%s%s%s" % ('/'.join(path), ext, querystr(query))
     return ''
 
 def EditLink(self, object, borrow_lock=0):

_______________________________________________
Zope-CVS maillist  -  [email protected]
http://mail.zope.org/mailman/listinfo/zope-cvs

Zope CVS instructions: http://dev.zope.org/CVS
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.