Changeset 2376


Ignore:
Timestamp:
05/09/08 16:03:35 (12 years ago)
Author:
jukka
Message:

Fixed #1736 according to good suggestions from Pjotr.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/LeMillTool.py

    r2375 r2376  
    10501050 
    10511051        pcatalog = getToolByName(self, 'portal_catalog') 
     1052 
     1053        if 'review_state' not in kw.keys(): 
     1054            kw['review_state'] = ('public', 'draft') 
    10521055 
    10531056        if kw.get('sort_on', '')=='getLatestEdit' and not kw.has_key('Creator'): # 'Blog style' results shouldn't be limited by language 
  • trunk/skins/lemill/livesearch_reply.py

    r2339 r2376  
    5656    q = q.replace(char, ' ') 
    5757r=q.split() 
    58 r = " AND ".join(r) 
     58if 'and' in r or 'AND' in r:  
     59    r = " ".join(r) 
     60else: 
     61    r = " AND ".join(r) 
    5962r = quote_bad_chars(r)+'*' 
    6063searchterms = url_quote(r.replace(' ','+')) 
    6164 
    62 results = catalog(SearchableText=r, portal_type=friendly_types) 
    63 results = [x for x in results if x.review_state!='deleted'] 
     65results = catalog(SearchableText=r, portal_type=friendly_types, review_state=('public', 'draft')) 
    6466 
    6567RESPONSE = context.REQUEST.RESPONSE 
Note: See TracChangeset for help on using the changeset viewer.