From be371f2d6b896a9f8991f329f8ee25ba83bec453 Mon Sep 17 00:00:00 2001
From: Gabriel Monnerat <gabriel@tiolive.com>
Date: Mon, 6 Dec 2010 08:59:49 +0000
Subject: [PATCH] 2010-12-06 gabriel * refactor the script
 WebSection_deleteObjectList to remove completely the objects with state
 'deleted'.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41149 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../erp5_web_ung_theme/WebSection_deleteObjectList.xml        | 4 ++--
 bt5/erp5_web_ung_theme/bt/change_log                          | 3 +++
 bt5/erp5_web_ung_theme/bt/revision                            | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml
index a1ca8127c0..8654851768 100644
--- a/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml
+++ b/bt5/erp5_web_ung_theme/SkinTemplateItem/portal_skins/erp5_web_ung_theme/WebSection_deleteObjectList.xml
@@ -60,11 +60,11 @@ if uid_list is not None:\n
   for catalog_object in portal.portal_catalog(portal_type=portal_type_list, \n
                                       uid=uid_list):\n
     if catalog_object.getValidationState() == "deleted":\n
+      portal.web_page_module.deleteContent(catalog_object.getId())\n
       continue\n
     object = context.restrictedTraverse(catalog_object.getPath())\n
+    object.setPublicationSection("trash")\n
     object.delete()\n
-  \n
-    #portal.web_page_module.deleteContent(id_list)\n
 \n
 return context.ERP5Site_redirect(website_url, keep_items={"reset": 1})\n
 </string> </value>
diff --git a/bt5/erp5_web_ung_theme/bt/change_log b/bt5/erp5_web_ung_theme/bt/change_log
index aa37e797a7..89fca7a87b 100644
--- a/bt5/erp5_web_ung_theme/bt/change_log
+++ b/bt5/erp5_web_ung_theme/bt/change_log
@@ -1,3 +1,6 @@
+2010-12-06 gabriel
+* refactor the script WebSection_deleteObjectList to remove completely the objects with state 'deleted'.
+
 2010-12-06 gabriel
 * Added one domain and categories to filter the documents in listbox.
 
diff --git a/bt5/erp5_web_ung_theme/bt/revision b/bt5/erp5_web_ung_theme/bt/revision
index d7f3668a68..d97edbb29f 100644
--- a/bt5/erp5_web_ung_theme/bt/revision
+++ b/bt5/erp5_web_ung_theme/bt/revision
@@ -1 +1 @@
-98
\ No newline at end of file
+99
\ No newline at end of file
-- 
2.30.9