## Script (Python) "portlet_calendaring_search_helper"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=states
##title=
##
#in order to have plones queryCatalog using
#a list of states we must proviede a rather clumsy parameter list
if not states:
    states = ['published']
if same_type(states, ''):
    states = [states]
result = ""
for state in states:
    if result:
        result += '&'
    result += 'review_state:list=%s' % state

return result
