From 211674acc64ce8adb350d79e2a231ffd49049945 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Mon, 26 May 2008 07:57:34 +0000
Subject: [PATCH] Automatically set configuration form. Use Unauthorized
 exception to catch invisible breadcrumb.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@21113 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_web/WebSection_getBreadcrumbItemList.xml      | 10 ++++------
 .../portal_skins/erp5_web/WebSite_init.xml             |  5 +----
 bt5/erp5_web/bt/revision                               |  2 +-
 3 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getBreadcrumbItemList.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getBreadcrumbItemList.xml
index c8e323458e..e254e16833 100644
--- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getBreadcrumbItemList.xml
+++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSection_getBreadcrumbItemList.xml
@@ -119,7 +119,7 @@
  folder. The later is recommended for hosting\n
  multiple sites on a single ERP5Site instance.\n
 """\n
-from ZODB.POSException import ConflictError\n
+from zExceptions import Unauthorized\n
 if document is None: document = context\n
 crumb_list = []\n
 \n
@@ -133,9 +133,7 @@ for i in range(0, len(chain_list)):\n
                      crumb.title\n
                    , crumb\n
                    ))\n
-  except ConflictError:\n
-    raise\n
-  except:\n
+  except Unauthorized:\n
     # We should ignore any item in the chain which raises \n
     # a security exception. We use a catchall except here\n
     # because there is no way to import Unauthorized permission\n
@@ -198,8 +196,8 @@ return crumb_list\n
                         <value>
                           <tuple>
                             <string>document</string>
-                            <string>ZODB.POSException</string>
-                            <string>ConflictError</string>
+                            <string>zExceptions</string>
+                            <string>Unauthorized</string>
                             <string>None</string>
                             <string>context</string>
                             <string>crumb_list</string>
diff --git a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_init.xml b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_init.xml
index e8643787b6..00e989797e 100644
--- a/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_init.xml
+++ b/bt5/erp5_web/SkinTemplateItem/portal_skins/erp5_web/WebSite_init.xml
@@ -72,10 +72,7 @@
 # Set Web Site layout to default one\n
 context.setContainerLayout(\'erp5_web_layout\')\n
 context.setContentLayout(\'erp5_web_content_layout\')\n
-\n
-# Set default webmaster to current user\n
-# user_id = context.portal_membership.getAuthenticatedMember().getUserName()\n
-# context.setWebmaster(user_id)\n
+context.setLayoutConfigurationFormId(\'WebSection_viewDefaultThemeConfiguration\')\n
 </string> </value>
         </item>
         <item>
diff --git a/bt5/erp5_web/bt/revision b/bt5/erp5_web/bt/revision
index b0c703c41a..0da6a13444 100644
--- a/bt5/erp5_web/bt/revision
+++ b/bt5/erp5_web/bt/revision
@@ -1 +1 @@
-628
\ No newline at end of file
+630
\ No newline at end of file
-- 
2.30.9