From ce5919fe4e6868d7a43cae9b036a51541322e92d Mon Sep 17 00:00:00 2001
From: Rafael Monnerat <rafael@nexedi.com>
Date: Thu, 8 May 2008 19:39:20 +0000
Subject: [PATCH] Used Base_updateListboxSelection instead.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20895 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_xhtml_style/ERP5Site_prepareAction.xml      | 12 +++++++-----
 .../portal_skins/erp5_xhtml_style/Folder_print.xml   | 11 +++++++++--
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_prepareAction.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_prepareAction.xml
index 5490d21f5b..b2794a64d1 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_prepareAction.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/ERP5Site_prepareAction.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>
@@ -69,6 +66,9 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string># Script to call in action scripts before executig the actual action.\n
+from Products.ERP5Type.Log import log\n
+log("ERP5Site_prepare is deprecated, "\n
+    "use Base_updateListboxSelection instead")\n
 \n
 # Update checked uids\n
 if None not in (selection_name, uids, listbox_uid):\n
@@ -125,6 +125,8 @@ if None not in (selection_name, uids, listbox_uid):\n
                             <string>uids</string>
                             <string>listbox_uid</string>
                             <string>kw</string>
+                            <string>Products.ERP5Type.Log</string>
+                            <string>log</string>
                             <string>None</string>
                             <string>_getattr_</string>
                             <string>context</string>
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml
index 9d4da1a19b..62b7c16dfe 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/Folder_print.xml
@@ -67,7 +67,11 @@
             <key> <string>_body</string> </key>
             <value> <string>request = container.REQUEST\n
 kw.update(request.form)\n
-context.ERP5Site_prepareAction(**kw)\n
+\n
+# Base_updateListboxSelection cannot be found.\n
+Base_updateListboxSelection = getattr(context, \'Base_updateListboxSelection\', None)\n
+if Base_updateListboxSelection is not None:\n
+  Base_updateListboxSelection()\n
 \n
 new_print_action_list = context.Base_fixDialogActions(\n
      context.Base_filterDuplicateActions(\n
@@ -132,9 +136,12 @@ if new_print_action_list:\n
                             <string>_getattr_</string>
                             <string>container</string>
                             <string>request</string>
-                            <string>_apply_</string>
+                            <string>getattr</string>
                             <string>context</string>
+                            <string>None</string>
+                            <string>Base_updateListboxSelection</string>
                             <string>new_print_action_list</string>
+                            <string>_apply_</string>
                             <string>_getitem_</string>
                           </tuple>
                         </value>
-- 
2.30.9