Commit a61a4367 authored by Arnaud Fontaine's avatar Arnaud Fontaine

Folder: Followup of 04b49859 to not use portal_trash since temp_object can now be created anywhere.

parent 01ed5d3d
...@@ -147,9 +147,10 @@ def checkConversionToolAvailability(self): ...@@ -147,9 +147,10 @@ def checkConversionToolAvailability(self):
severity = 0 severity = 0
try: try:
temp_document = portal.portal_trash.newContent( temp_document = self.newContent(
portal_type='OOo Document', portal_type='OOo Document',
temp_object=True, temp_object=True,
id=document_id,
data=document_file.data, data=document_file.data,
source_reference=document_id) source_reference=document_id)
temp_document.convertToBaseFormat() temp_document.convertToBaseFormat()
......
...@@ -66,7 +66,7 @@ class PaypalService(XMLObject): ...@@ -66,7 +66,7 @@ class PaypalService(XMLObject):
"""See Payment Service Interface Documentation""" """See Payment Service Interface Documentation"""
page_template = kw.pop("page_template") page_template = kw.pop("page_template")
paypal_dict = kw.get("paypal_dict", {}) paypal_dict = kw.get("paypal_dict", {})
temp_document = self.getPortalObject().portal_trash.newContent( temp_document = self.newContent(
portal_type='Document', portal_type='Document',
temp_object=True, temp_object=True,
link_url_string=self.getLinkUrlString(), link_url_string=self.getLinkUrlString(),
...@@ -75,7 +75,7 @@ class PaypalService(XMLObject): ...@@ -75,7 +75,7 @@ class PaypalService(XMLObject):
# append the rest of transmitted parameters page template # append the rest of transmitted parameters page template
**kw **kw
) )
return getattr(temp_document.__of__(self), page_template)() return getattr(temp_document, page_template)()
def notifySuccess(self, redirect_path=None, REQUEST=None): def notifySuccess(self, redirect_path=None, REQUEST=None):
"""See Payment Service Interface Documentation""" """See Payment Service Interface Documentation"""
......
...@@ -84,7 +84,7 @@ if hasattr(import_file, 'headers'): ...@@ -84,7 +84,7 @@ if hasattr(import_file, 'headers'):
content_type = import_file.headers.get('Content-Type', '') content_type = import_file.headers.get('Content-Type', '')
if not (content_type.startswith('application/vnd.sun.xml') if not (content_type.startswith('application/vnd.sun.xml')
or content_type.startswith('application/vnd.oasis.opendocument')): or content_type.startswith('application/vnd.oasis.opendocument')):
tmp_ooo = portal.portal_trash.newContent( tmp_ooo = context.newContent(
portal_type='OOo Document', portal_type='OOo Document',
temp_object=True, temp_object=True,
data=import_file.read(), data=import_file.read(),
......
'''Returns all possible document conversions from the `base_content_type`. '''Returns all possible document conversions from the `base_content_type`.
''' '''
td = context.getPortalObject().portal_trash.newContent( td = context.newContent(
portal_type='OOo Document', portal_type='OOo Document',
temp_object=True, temp_object=True,
base_content_type=base_content_type, base_content_type=base_content_type,
......
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