From b823ef21987dedc6ce53490b74b825a63cbc01a7 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Tue, 22 Jan 2008 14:21:24 +0000
Subject: [PATCH] Do not paste objects if the portal type is not visible

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@18824 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/Folder_paste.xml              | 9 +++------
 product/ERP5/bootstrap/erp5_core/bt/revision             | 2 +-
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.xml
index a70446238a..42fe0fd242 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Folder_paste.xml
@@ -3,11 +3,8 @@
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
       <tuple>
-        <tuple>
-          <string>Products.PythonScripts.PythonScript</string>
-          <string>PythonScript</string>
-        </tuple>
-        <none/>
+        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+        <tuple/>
       </tuple>
     </pickle>
     <pickle>
@@ -81,7 +78,7 @@ if context.cb_dataValid:\n
   except AttributeError:\n
     error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
   else:\n
-    allowed_type_list = [x.id for x in context.allowedContentTypes()]\n
+    allowed_type_list = [x.id for x in context.getVisibleAllowedContentTypeList()]\n
     for portal_type in portal_type_list:\n
       if portal_type not in allowed_type_list:\n
         error_message = N_(\'Sorry+you+can+not+paste+theses+Items+here\')\n
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index 3ea66354ca..55b7e8800f 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-679
\ No newline at end of file
+680
\ No newline at end of file
-- 
2.30.9