From 41fc1aa24c9e91d42d4f896b99aa880e7b04b7f1 Mon Sep 17 00:00:00 2001
From: Yusei Tahara <yusei@nexedi.com>
Date: Tue, 5 Jan 2010 03:34:59 +0000
Subject: [PATCH] 2010-01-05 yusei * Update ERP5Site_reindexAll and index some
 tools correctly.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@31567 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_core/ERP5Site_reindexAll.xml     | 10 +++++++---
 product/ERP5/bootstrap/erp5_core/bt/change_log         |  5 ++++-
 product/ERP5/bootstrap/erp5_core/bt/revision           |  2 +-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
index 745886e190..da57a3ee27 100644
--- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
+++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/ERP5Site_reindexAll.xml
@@ -165,8 +165,11 @@ tool_list = [portal.portal_templates, portal.portal_trash,\n
              portal.portal_domains, portal.portal_rules,\n
              portal.portal_deliveries, portal.portal_orders,\n
              portal.portal_caches, portal.portal_types]\n
-if hasattr(portal, \'portal_gadgets\'):\n
-  tool_list.append(portal.portal_gadgets)\n
+possible_tool_list = [\'portal_gadgets\', \'portal_contribution_registry\',\n
+                      \'portal_roundings\',]\n
+for tool_id in possible_tool_list:\n
+  if getattr(portal, tool_id, None) is not None:\n
+    tool_list.append(getattr(portal, tool_id))\n
 \n
 for folder in tool_list:\n
   folder.activate(\n
@@ -304,7 +307,8 @@ return printed\n
                             <string>_getiter_</string>
                             <string>folder</string>
                             <string>tool_list</string>
-                            <string>hasattr</string>
+                            <string>possible_tool_list</string>
+                            <string>tool_id</string>
                           </tuple>
                         </value>
                     </item>
diff --git a/product/ERP5/bootstrap/erp5_core/bt/change_log b/product/ERP5/bootstrap/erp5_core/bt/change_log
index 6f64cb7c5e..eb486e63ab 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/change_log
+++ b/product/ERP5/bootstrap/erp5_core/bt/change_log
@@ -1,6 +1,9 @@
+2010-01-05 yusei
+* Update ERP5Site_reindexAll and index some tools correctly.
+
 2009-12-04 jm
 * Allow use of ParallelListFields in ListBox cells. Fields using
-  Base_hashCategoryList requires ERP5Form to be up-to-date.
+Base_hashCategoryList requires ERP5Form to be up-to-date.
 
 2009-11-18 yo
 * Move localization-related preferences to General from UI.
diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision
index ea41690fb6..90f664aa46 100644
--- a/product/ERP5/bootstrap/erp5_core/bt/revision
+++ b/product/ERP5/bootstrap/erp5_core/bt/revision
@@ -1 +1 @@
-1406
\ No newline at end of file
+1408
\ No newline at end of file
-- 
2.30.9