## Script (Python) "getSearchParams"
##bind container=container
##bind context=context
##bind namespace=
##bind script=script
##bind subpath=traverse_subpath
##parameters=REQUEST
##title=
##
kw = {}

if REQUEST.has_key('SearchableText'):
  kw.keys().append('SearchableText')
  kw['SearchableText'] = REQUEST.SearchableText

if REQUEST.has_key('Type') and not REQUEST.Type=='':
  kw.keys().append('Type')
  kw['Type'] = REQUEST.Type
else:
  kw.keys().append('Type')
  kw['Type'] = context.getSearchableContentTypes()

if REQUEST.has_key('review_state') and not REQUEST.review_state=='':
  kw.keys().append('review_state')
  kw['review_state'] = REQUEST.review_state

if REQUEST.has_key('Creator') and not REQUEST.Creator=='':
  kw.keys().append('Creator')
  kw['Creator'] = REQUEST.Creator

if REQUEST.has_key('dato') and not REQUEST.dato=='':
  kw.keys().append('Date')
#  kw['Date'] = context.streng_til_dato(REQUEST.dato)
  kw['Date'] = context.streng_til_dato(REQUEST.dato).strftime('%Y-%m-%d')

  if REQUEST.has_key('modified') and not REQUEST.modified=='':
    kw.keys().append('Date_usage')
    kw['Date_usage'] = REQUEST.modified

return kw
