[Zope-CMF] A 'Portal Image' added programaticaly behaves different than a manualy added one

Tres Seaver tseaver@palladion.com
Fri, 3 Aug 2001 07:21:19 -0400 (EDT)


On Fri, 3 Aug 2001, [iso-8859-1] Gr=E9goire Weber wrote:

> > diff -u -r1.10 MembershipTool.py
> > --- CMFDefault/MembershipTool.py=0913 Jun 2001 18:02:14 -0000=091.10
> > +++ CMFDefault/MembershipTool.py=093 Aug 2001 00:59:41 -0000
> > @@ -178,6 +178,7 @@
> >               user =3D acl_users.getUser(member_id).__of__(acl_users)
> >               f.changeOwnership(user)
> >               f.manage_setLocalRoles(member_id, ['Owner'])
> > +            f._setPortalTypeName( 'Document' )
> >=20
> >               # Create Member's home page.
> >               # default_member_content ought to be configurable per
>=20
> Aem, are you sure you don't set the folders portal_type this way?
>=20
> Shouldn't it be f.index_html._setPortalTypeName( 'Document' )
> after the addDocument instanation?

Yep, you're right -- I didn't look at the code carefully enough.

Thanks for catching this!

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