diff -ur Plone-2.5.5.orig/CMFPlone/exportimport/configure.zcml Plone-2.5.5/CMFPlone/exportimport/configure.zcml --- Plone-2.5.5.orig/CMFPlone/exportimport/configure.zcml 2007-12-04 22:33:37.000000000 -0500 +++ Plone-2.5.5/CMFPlone/exportimport/configure.zcml 2008-01-17 13:15:43.000000000 -0500 @@ -32,12 +32,6 @@ /> <adapter - factory="Products.CMFCore.exportimport.content.StructureFolderWalkingAdapter" - provides="Products.GenericSetup.interfaces.IFilesystemImporter" - for="Products.ATContentTypes.interface.IATContentType" - /> - - <adapter factory=".propertiestool.SimpleItemWithPropertiesXMLAdapter" provides="Products.GenericSetup.interfaces.IBody" for="Products.CMFCore.interfaces.IMemberDataTool @@ -51,19 +45,6 @@ Products.GenericSetup.interfaces.ISetupEnviron" /> - <!-- Mark ATCT objects as IDAVAware so CMFSetup can export/import them --> - <five:implements - class="Products.ATContentTypes.content.document.ATDocument" - interface="Products.GenericSetup.interfaces.IDAVAware" - /> - - <!-- XXX: Temporarily disable ATTopic exporting until we have an - actual exporter or Marshaller --> - <five:implements - class="Products.ATContentTypes.content.topic.ATTopic" - interface="Products.CMFPlone.exportimport.content.IDisabledExport" - /> - <adapter factory=".content.NullExporterAdapter" provides="Products.GenericSetup.interfaces.IFilesystemExporter" diff -ur Plone-2.5.5.orig/CMFPlone/MembershipTool.py Plone-2.5.5/CMFPlone/MembershipTool.py --- Plone-2.5.5.orig/CMFPlone/MembershipTool.py 2007-12-04 22:33:37.000000000 -0500 +++ Plone-2.5.5/CMFPlone/MembershipTool.py 2008-01-17 13:15:43.000000000 -0500 @@ -1,4 +1,3 @@ -import PIL from cStringIO import StringIO from DateTime import DateTime from Products.CMFCore.utils import getToolByName, _checkPermission @@ -589,6 +588,7 @@ if portrait_data == '': continue try: + import PIL img = PIL.Image.open(StringIO(portrait_data)) except ConflictError: pass diff -ur Plone-2.5.5.orig/CMFPlone/setup/dependencies.py Plone-2.5.5/CMFPlone/setup/dependencies.py --- Plone-2.5.5.orig/CMFPlone/setup/dependencies.py 2007-12-04 22:33:37.000000000 -0500 +++ Plone-2.5.5/CMFPlone/setup/dependencies.py 2008-01-17 13:16:49.000000000 -0500 @@ -107,7 +107,8 @@ except ImportError: log(("PIL not found. Plone needs PIL 1.1.5 or newer. " "Please download it from http://www.pythonware.com/products/pil/ or " - "http://effbot.org/downloads/#Imaging")) + "http://effbot.org/downloads/#Imaging"), + severity=logging.INFO, optional=1) raise ImportError, 'PIL is required' try: diff -ur Plone-2.5.5.orig/CMFPlone/utils.py Plone-2.5.5/CMFPlone/utils.py --- Plone-2.5.5.orig/CMFPlone/utils.py 2007-12-04 22:33:38.000000000 -0500 +++ Plone-2.5.5/CMFPlone/utils.py 2008-01-17 13:15:43.000000000 -0500 @@ -3,8 +3,6 @@ from os.path import join, abspath, split from cStringIO import StringIO -from PIL import Image - import zope.interface from zope.interface import implementedBy from zope.component import getMultiAdapter @@ -41,15 +39,6 @@ DANGEROUS_CHARS_REGEX = re.compile(r"[?&/:\\#]+") EXTRA_DASHES_REGEX = re.compile(r"(^\-+)|(\-+$)") -# Settings for member image resize quality -PIL_SCALING_ALGO = Image.ANTIALIAS -PIL_QUALITY = 88 -MEMBER_IMAGE_SCALE = (75, 100) -IMAGE_SCALE_PARAMS = {'scale': MEMBER_IMAGE_SCALE, - 'quality': PIL_QUALITY, - 'algorithm': PIL_SCALING_ALGO, - 'default_format': 'PNG'} - _marker = [] class BrowserView(BaseView): @@ -632,6 +621,17 @@ return security def scale_image(image_file, max_size=None, default_format=None): + from PIL import Image + + # Settings for member image resize quality + PIL_SCALING_ALGO = Image.ANTIALIAS + PIL_QUALITY = 88 + MEMBER_IMAGE_SCALE = (75, 100) + IMAGE_SCALE_PARAMS = {'scale': MEMBER_IMAGE_SCALE, + 'quality': PIL_QUALITY, + 'algorithm': PIL_SCALING_ALGO, + 'default_format': 'PNG'} + """Scales an image down to at most max_size preserving aspect ratio from an input file