[Zope-CMF] CMFOptions for CMF 1.3?

Tres Seaver tseaver@zope.com
30 May 2003 13:38:20 -0400


--=-CbmiTfAfMfJGBb7S+Q6r
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Fri, 2003-05-30 at 08:13, Rainer Thaden wrote:

> as i understand from several postings and googling the latest
> CMFOptions distribution does not work with CMF1.3. Where can i find a
> fix or an updated distribution?

I'll post my patch again.

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com

--=-CbmiTfAfMfJGBb7S+Q6r
Content-Disposition: attachment; filename=CMFOptions-CMF-1.3-compatible.diff
Content-Transfer-Encoding: quoted-printable
Content-Type: text/x-patch; name=CMFOptions-CMF-1.3-compatible.diff;
	charset=ISO-8859-1

diff -wru CMFOptions-1.2/Blark.py CMFOptions-patched/Blark.py
--- CMFOptions-1.2/Blark.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/Blark.py	Fri Oct 11 13:31:13 2002
@@ -26,7 +26,7 @@
 from Products.CMFDefault.Document import Document,addDocument=0D
 from Products.CMFCore.PortalFolder import PortalFolder=0D
 from Products.CMFCore.CatalogTool import CatalogTool=0D
-from Products.CMFCore.utils import modifyPermissionMappings=0D
+from Products.CMFCore.utils import _modifyPermissionMappings
 from Products.CMFCore.MembershipTool import MembershipTool=0D
 from Products.CMFCore import utils=0D
 from AccessControl import ClassSecurityInfo  =20=0D
@@ -40,7 +40,7 @@
=20=0D
 # Factory type information -- makes Blark objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D {'id': 'Blark',=0D
+factory_type_information =3D ({'id': 'Blark',
      'content_icon': 'blark_icon.gif',=0D
      'meta_type': 'Blark Weblog',=0D
      'description': ('A blark weblog allows a user to create a personal we=
blog or a public news log'),=0D
@@ -70,7 +70,8 @@
=20=0D
=20=0D
                  ),                     # End Actions=0D
-     }=0D
+     },
+)
=20=0D
=20=0D
 widthSettings =3D {'4060':('40%','60%'),'5050':('50%','50%'),'6040':('60%'=
,'40%'),=0D
@@ -627,8 +628,8 @@
         str_id =3D 'BLARKENTRY_' + str_id + '_' + logtime  =20=0D
=20=0D
         #either one of these works=0D
-        #self.invokeFactory('Document', str_id, title=3Dself.defaultArticl=
eTitle)=0D
-        addDocument(self,str_id,self.defaultArticleTitle)=0D
+        self.invokeFactory('Document', str_id, title=3Dself.defaultArticle=
Title)
+        #addDocument(self,str_id,self.defaultArticleTitle)
=20=0D
         ob =3D self._getOb(str_id, self)=0D
         if ob is self:=0D
diff -wru CMFOptions-1.2/CMFExtFile.py CMFOptions-patched/CMFExtFile.py
--- CMFOptions-1.2/CMFExtFile.py	Tue Jan 29 16:22:11 2002
+++ CMFOptions-patched/CMFExtFile.py	Fri Oct 11 13:12:22 2002
@@ -126,7 +126,7 @@
=20=0D
 # Factory type information -- makes CMFExtFile objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D  {'id': 'CMFExtFile',=0D
+factory_type_information =3D  ({'id': 'CMFExtFile',
      'meta_type': 'Portal External File',=0D
      'description': ('Arbitrary-content Files that are stored in the files=
ystem '=0D
                      'rather than in the Zope Database.'),=0D
@@ -149,7 +149,8 @@
             'permissions': ('Modify portal content',)},=0D
        =20=0D
             )=0D
-       }=0D
+       },
+)
    =20=0D
=20=0D
=20=0D
diff -wru CMFOptions-1.2/CMFExtImage.py CMFOptions-patched/CMFExtImage.py
--- CMFOptions-1.2/CMFExtImage.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/CMFExtImage.py	Fri Oct 11 13:13:07 2002
@@ -131,7 +131,7 @@
=20=0D
 # Factory type information -- makes CMFExtImage objects play nicely=0D
 # with the Types Tool (portal_types)=0D
-factory_type_information =3D  {'id': 'CMFExtImage',=0D
+factory_type_information =3D  ( {'id': 'CMFExtImage',
      'meta_type': 'Portal External Image',=0D
      'description': ('External Images are Images that are stored in the fi=
lesystem '=0D
                      'rather than in the Zope Database.'),=0D
@@ -150,7 +150,8 @@
                   'permissions': ('Modify portal content',)},=0D
=20=0D
                  ),                     # End Actions=0D
-     }=0D
+     },
+)
    =20=0D
=20=0D
=20=0D
diff -wru CMFOptions-1.2/__init__.py CMFOptions-patched/__init__.py
--- CMFOptions-1.2/__init__.py	Tue Jan 29 16:22:10 2002
+++ CMFOptions-patched/__init__.py	Fri Oct 11 13:14:19 2002
@@ -117,5 +117,7 @@
         content_types =3D (CMFExtImage.CMFExtImage,CMFExtFile.CMFExtFile,B=
lark.Blark),=0D
         permission =3D 'Add portal content',=0D
         extra_constructors =3D (CMFExtImage.addCMFExtImage,CMFExtFile.addC=
MFExtFile,Blark.addBlarkFolder),=0D
-        fti =3D (CMFExtImage.factory_type_information,CMFExtFile.factory_t=
ype_information,Blark.factory_type_information),=0D
+        fti =3D (CMFExtImage.factory_type_information
+              +CMFExtFile.factory_type_information
+              +Blark.factory_type_information),
         ).initialize(context)=0D

--=-CbmiTfAfMfJGBb7S+Q6r--