[CMF-checkins] CVS: CMF/CMFCollector/skins/collector - collector_search.py:1.3
Ken Manheimer
klm@zope.com
Wed, 17 Oct 2001 22:28:09 -0400
Update of /cvs-repository/CMF/CMFCollector/skins/collector
In directory cvs.zope.org:/tmp/cvs-serv14322
Modified Files:
collector_search.py
Log Message:
Do the right thing with new security_related options, and culling of
'_confidential' from form display.
=== CMF/CMFCollector/skins/collector/collector_search.py 1.2 => 1.3 ===
supplement_query("SearchableText")
supplement_query("Creator")
-supplement_query("status", "review_state")
supplement_subject_many("classifications", "classification")
supplement_subject_many("severities", "severity")
supplement_subject_many("supporters", "assigned_to")
supplement_subject_one("resolution")
-supplement_subject_one("security_related")
supplement_subject_one("reported_version")
+
+sr = reqget("security_related", 'x')
+if sr in ['0', '1']:
+ subj_items.append('security_related:%s' % sr)
+
if subj_items:
query["Subject"] = subj_items
+
+rs = []
+for i in reqget("status", []):
+ rs.append(i)
+ # Include confidential alternatives to selected states.
+ if i in ['Pending', 'Accepted']:
+ rs.append("%s_confidential" % i)
+if rs:
+ query['review_state'] = rs
return context.portal_catalog(REQUEST=query)