def manage_FTPget(self): "Get the document body for FTP download (also used for the WebDAV SRC)" if self.Format() == 'text/html': ti = self.getTypeInfo() method_id = ti and ti.queryMethodID('gethtml') if method_id: method = getattr(self, method_id) if getattr(aq_base(method), 'isDocTemp', 0): bodytext = method(self, self.REQUEST) else: bodytext = method() else: # Use the old code as fallback. May be removed some day. hdrlist = self.getMetadataHeaders() 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(), } else: hdrlist = self.getMetadataHeaders() hdrtext = formatRFC822Headers( hdrlist ) bodytext = '%s\r\n\r\n%s' % ( hdrtext, self.text ) return bodytext
def manage_FTPget(self): "Get the document body for FTP download (also used for the WebDAV SRC)" if self.Format() == 'text/html': ti = self.getTypeInfo() method_id = ti and ti.queryMethodID('gethtml', context=self) if method_id: method = getattr(self, method_id) if getattr(aq_base(method), 'isDocTemp', 0): bodytext = method(self, self.REQUEST) else: bodytext = method() else: # Use the old code as fallback. May be removed some day. hdrlist = self.getMetadataHeaders() 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(), } else: hdrlist = self.getMetadataHeaders() hdrtext = formatRFC822Headers(hdrlist) bodytext = '%s\r\n\r\n%s' % (hdrtext, self.text) return bodytext
def manage_FTPget(self): """ Get the link as text for WebDAV src / FTP download. """ hdrlist = self.getMetadataHeaders() hdrtext = formatRFC822Headers( hdrlist ) bodytext = '%s\n\n%s' % ( hdrtext, self.getRemoteUrl() ) return bodytext
def manage_FTPget(self): """ Get the link as text for WebDAV src / FTP download. """ hdrlist = self.getMetadataHeaders() hdrtext = formatRFC822Headers(hdrlist) bodytext = '%s\n\n%s' % (hdrtext, self.getRemoteUrl()) return bodytext
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(), } else: hdrtext = formatRFC822Headers( hdrlist ) bodytext = '%s\r\n\r\n%s' % ( hdrtext, self.text ) return bodytext
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(), } else: hdrtext = formatRFC822Headers(hdrlist) bodytext = '%s\r\n\r\n%s' % (hdrtext, self.text) return bodytext