[CMF-checkins] CVS: CMF/CMFDefault - Document.py:1.57.6.1
Yvo Schubbe
schubbe@web.de
Sat, 21 Jun 2003 10:00:20 -0400
Update of /cvs-repository/CMF/CMFDefault
In directory cvs.zope.org:/tmp/cvs-serv5813/CMFDefault
Modified Files:
Tag: yuppie-collector168-branch
Document.py
Log Message:
- un-hardwired manage_FTPget for 'text/html' (Collector #168)
( there are still some unresolved issues, see http://collector.zope.org/CMF/168 )
=== CMF/CMFDefault/Document.py 1.57 => 1.57.6.1 ===
--- CMF/CMFDefault/Document.py:1.57 Fri May 9 17:40:24 2003
+++ CMF/CMFDefault/Document.py Sat Jun 21 09:59:49 2003
@@ -377,34 +377,13 @@
self.reindexObject()
return RESPONSE
- _htmlsrc = (
- '<html>\n <head>\n'
- ' <title>%(title)s</title>\n'
- '%(metatags)s\n'
- ' </head>\n'
- ' <body>\n%(body)s\n </body>\n'
- '</html>\n'
- )
-
security.declareProtected(View, 'manage_FTPget')
def manage_FTPget(self):
"Get the document body for FTP download (also used for the WebDAV SRC)"
- hdrlist = self.getMetadataHeaders()
if self.Format() == 'text/html':
- hdrtext = ''
- for name, content in hdrlist:
- if name.lower() == 'title':
- continue
- else:
- hdrtext = '%s\n <meta name="%s" content="%s" />' % (
- hdrtext, name, content)
-
- bodytext = self._htmlsrc % {
- 'title': self.Title(),
- 'metatags': hdrtext,
- 'body': self.EditableBody(),
- }
+ bodytext = self.source_html(self)
else:
+ hdrlist = self.getMetadataHeaders()
hdrtext = formatRFC822Headers( hdrlist )
bodytext = '%s\r\n\r\n%s' % ( hdrtext, self.text )