From cb9b33f547d73f8fd97d4f702acd5172dfcb3352 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 6 Feb 2009 15:48:11 +0000
Subject: [PATCH] When generating portal_type= parameter for worklists, don't
 generate a string that the catalog should parse later, but pass it multiple
 time (portal_type=A&portal_type=B ..), zope publisher will convert this
 format to a list.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@25480 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 product/ERP5Type/patches/DCWorkflow.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/product/ERP5Type/patches/DCWorkflow.py b/product/ERP5Type/patches/DCWorkflow.py
index ca9a247832..d1952164d0 100644
--- a/product/ERP5Type/patches/DCWorkflow.py
+++ b/product/ERP5Type/patches/DCWorkflow.py
@@ -179,11 +179,11 @@ def DCWorkflowDefinition_listGlobalActions(self, info):
               # Patch for ERP5 by JP Smets in order to
               # filter per portal type more easily (ie. without
               # hardcoding it all)
-              fmt_data._push({'portal_type': ' OR '.join(dict['portal_type'])})
+              fmt_data._push({'portal_type': '&portal_type='.join(dict['portal_type'])})
               # Patch for ERP5 by JP Smets in order
               # to implement worklists and search of local roles
               if dict.has_key('local_roles'):
-                fmt_data._push({'local_roles': join(dict['local_roles'],'%3B')})
+                fmt_data._push({'local_roles': '&local_roles='.join(dict['local_roles'])})
               else:
                 fmt_data._push({'local_roles': ''})
               res.append((id, {'name': qdef.actbox_name % fmt_data,
@@ -251,8 +251,8 @@ def DCWorkflowDefinition_getWorklistVariableMatchDict(self, info):
       if is_permitted_worklist:
         format_data = TemplateDict()
         format_data._push(info)
-        format_data._push({'portal_type': ' OR '.join(variable_match['portal_type']),
-                           'local_roles': '%3B'.join(variable_match.get(SECURITY_PARAMETER_ID, []))})
+        format_data._push({'portal_type': '&portal_type='.join(variable_match['portal_type']),
+                           'local_roles': '&local_roles='.join(variable_match.get(SECURITY_PARAMETER_ID, []))})
         variable_match[WORKLIST_METADATA_KEY] = {'format_data': format_data,
                                                  'worklist_title': action_box_name,
                                                  'worklist_id': worklist_id,
-- 
2.30.9