[ZCM] [ZC] 1317/ 1 Request "ZopeFind doesn't search in CMF content"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed May 5 19:24:24 EDT 2004


Issue #1317 Update (Request) "ZopeFind doesn't search in CMF content"
 Status Pending, Zope/feature+solution low
To followup, visit:
  http://zope.org/Collectors/Zope/1317

==============================================================
= Request - Entry #1 by slinkp on May 5, 2004 7:24 pm

I'm always being bit by this... i'm using ZopeFind for one thing or another and oops, it doesn't look in CMF content bodies. 
CMF is widespread enough that this seems warty to me.

Trivial patch:


*** lib/python/OFS/FindSupport.py.OLD   Wed May  5 19:02:11 2004
--- lib/python/OFS/FindSupport.py       Wed May  5 19:21:52 2004
***************
*** 109,115 ****
              if hasattr(ob, 'aq_base'):
                  bs=ob.aq_base
              else: bs=ob
- 
              if (
                  (not obj_ids or absattr(bs.getId()) in obj_ids)
                  and
--- 109,114 ----
***************
*** 118,125 ****
                  and
                  (not obj_searchterm or
                   (hasattr(ob, 'PrincipiaSearchSource') and
!                   ob.PrincipiaSearchSource().find(str(obj_searchterm)) >= 0
!                   ))
                  and
                  (not obj_expr or expr_match(ob, obj_expr))
                  and
--- 117,127 ----
                  and
                  (not obj_searchterm or
                   (hasattr(ob, 'PrincipiaSearchSource') and
!                   ob.PrincipiaSearchSource().find(str(obj_searchterm)) >= 0) 
!                  or
!                  (hasattr(ob, 'SearchableText') and
!                   ob.SearchableText().find(str(obj_searchterm)) >= 0) 
!                 )
                  and
                  (not obj_expr or expr_match(ob, obj_expr))
                  and




==============================================================




More information about the Zope-Collector-Monitor mailing list