From bb11d07196ff133c47349589b6aadb5617b41f37 Mon Sep 17 00:00:00 2001 From: Romain Courteaud <romain@nexedi.com> Date: Fri, 16 Mar 2007 09:46:13 +0000 Subject: [PATCH] Restore portal_type parameter to Base_zSearchRelatedObjectsByCategoryList for performance. git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13448 20353a03-c40f-0410-a6d1-a30d3c3de9de --- ...se_zSearchRelatedObjectsByCategoryList.xml | 22 +++++++++++++++++++ product/ERP5/bootstrap/erp5_core/bt/revision | 2 +- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml index 03707b4888..5272eb8bde 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_zSearchRelatedObjectsByCategoryList.xml @@ -44,6 +44,12 @@ <dictionary/> </value> </item> + <item> + <key> <string>portal_type</string> </key> + <value> + <dictionary/> + </value> + </item> <item> <key> <string>strict_membership</string> </key> <value> @@ -64,6 +70,7 @@ <value> <list> <string>category_list</string> +<string>portal_type</string> <string>strict_membership</string> <string>where_expression</string> <string>order_by_expression</string> @@ -84,6 +91,7 @@ <item> <key> <string>arguments_src</string> </key> <value> <string>category_list\r\n +portal_type\r\n strict_membership\r\n where_expression\r\n order_by_expression</string> </value> @@ -129,6 +137,13 @@ order_by_expression</string> </value> SELECT DISTINCT catalog.uid, catalog.path, portal_type\n FROM catalog, category\n WHERE catalog.uid = category.uid\n + <dtml-if portal_type>\n + AND\n + (<dtml-in portal_type>\n + <dtml-unless sequence-start> OR </dtml-unless>\n + catalog.portal_type=\'<dtml-var sequence-item>\'\n + </dtml-in>)\n + </dtml-if>\n AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n <dtml-if strict_membership>\n AND category.category_strict_membership = 1\n @@ -180,6 +195,13 @@ ORDER BY\n SELECT DISTINCT catalog.uid, catalog.path, portal_type\n FROM catalog, category\n WHERE catalog.uid = category.uid\n + <dtml-if portal_type>\n + AND\n + (<dtml-in portal_type>\n + <dtml-unless sequence-start> OR </dtml-unless>\n + catalog.portal_type=\'<dtml-var sequence-item>\'\n + </dtml-in>)\n + </dtml-if>\n AND (<dtml-var "portal_categories.buildSQLSelector(category_list)">)\n <dtml-if strict_membership>\n AND category.category_strict_membership = 1\n diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 02225a563f..2a095c4d56 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -268 \ No newline at end of file +271 \ No newline at end of file -- 2.30.9