From: Stefan Bund Date: Thu, 22 Oct 2009 07:43:38 +0000 (+0200) Subject: Change portal language X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=e20c223be2602a75e30ec3352a559e9eb1c55140;p=zope-bootstrap.git Change portal language --- diff --git a/src/koehsel.policy/koehsel/policy/profiles/default/portal_languages.xml b/src/koehsel.policy/koehsel/policy/profiles/default/portal_languages.xml new file mode 100644 index 0000000..08790bd --- /dev/null +++ b/src/koehsel.policy/koehsel/policy/profiles/default/portal_languages.xml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/koehsel.policy/koehsel/policy/setuphandlers.py b/src/koehsel.policy/koehsel/policy/setuphandlers.py index 71cd558..d175a1f 100644 --- a/src/koehsel.policy/koehsel/policy/setuphandlers.py +++ b/src/koehsel.policy/koehsel/policy/setuphandlers.py @@ -16,9 +16,10 @@ specify additional factory arguments. After creation, the object is published if id = container.invokeFactory(id=id, type_name=type_name, **kw) ob = getattr(container,id) event.notify(ObjectInitializedEvent(ob)) - ob.at_post_create_script() -# if hasattr(aq_base(ob), 'manage_afterPortalFactoryCreate'): -# ob.manage_afterPortalFactoryCreate() + if hasattr(aq_base(ob), 'at_post_create_script'): + ob.at_post_create_script() + if hasattr(aq_base(ob), 'manage_afterPortalFactoryCreate'): + ob.manage_afterPortalFactoryCreate() wf = getToolByName(container, 'portal_workflow') if wf.getInfoFor(ob,'review_state','') != 'published': wf.doActionFor(ob,'publish',comment='site setup') @@ -70,7 +71,7 @@ def appInit(app): # Call 'contentSetup' as SITE_OWNER user with a valid REQUEST req = makerequest(app) - newSecurityManager(req.REQUEST, app.acl_users.getUser(SITE_OWNER).__of__(app.acl_users)) + newSecurityManager(req.REQUEST, app.acl_users.getUserById(SITE_OWNER).__of__(app.acl_users)) contentSetup(req) transaction.commit() newSecurityManager(None, AccessControl.User.system)