From 20b4b7b861f16376d040b5ed6c5e711d163046e9 Mon Sep 17 00:00:00 2001 From: Jean-Paul Smets <jp@nexedi.com> Date: Wed, 1 Dec 2004 05:47:50 +0000 Subject: [PATCH] Modified to support view feature of ZSQLCatalog git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1940 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Catalog/sql/erp5_mysql/z_search_results.zsql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/product/ERP5Catalog/sql/erp5_mysql/z_search_results.zsql b/product/ERP5Catalog/sql/erp5_mysql/z_search_results.zsql index acdaf70010..0e72e81240 100755 --- a/product/ERP5Catalog/sql/erp5_mysql/z_search_results.zsql +++ b/product/ERP5Catalog/sql/erp5_mysql/z_search_results.zsql @@ -16,13 +16,14 @@ from_table_list:list sort_on</params> SELECT DISTINCT <dtml-in getCatalogSearchResultKeys> <dtml-var sequence-item><dtml-if sequence-end> <dtml-else>, </dtml-if> </dtml-in> + FROM - <dtml-var "','.join(from_table_list)"> + <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in> <dtml-if selection_domain>, <dtml-var "selection_domain.asSqlJoinExpression()"> </dtml-if> <dtml-if selection_report>, <dtml-var "selection_report.asSqlJoinExpression()"> </dtml-if> + WHERE 1 = 1 -<dtml-in from_table_list><dtml-if "_['sequence-item']=='roles_and_users'">AND catalog.security_uid = <dtml-var sequence-item>.uid <dtml-else> AND catalog.uid = <dtml-var sequence-item>.uid </dtml-if> </dtml-in> <dtml-if where_expression> AND <dtml-var where_expression> </dtml-if> -- 2.30.9