Changeset 893
- Timestamp:
- 06/21/07 14:34:31
- Files:
-
- qRSS2Syndication/trunk/skins/qrss2syndication/setup_rss2.cpt (modified) (1 diff)
- qRSS2Syndication/trunk/utils.py (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
qRSS2Syndication/trunk/skins/qrss2syndication/setup_rss2.cpt
r608 r893 67 67 <input type="checkbox" 68 68 name="include_subfolders" 69 value=" 0"69 value="1" 70 70 tal:define="checked python:sy_info['include_subfolders'] and 'checked'" 71 71 tal:attributes="checked checked"/> qRSS2Syndication/trunk/utils.py
r707 r893 45 45 res = [] 46 46 ps = getToolByName(context,'portal_syndication') 47 cpath = '/'.join(context.getPhysicalPath())48 syProperties = {}49 syProperties = getRSS2Properties(context)50 include_subfolders = 051 47 if ps.isSyndicationAllowed(context): 48 cpath = '/'.join(context.getPhysicalPath()) 49 syProperties = getRSS2Properties(context) 52 50 types = syProperties['rss2_types'] 53 51 only_published = syProperties['only_published'] … … 56 54 57 55 catalog = getToolByName(context,'portal_catalog') 58 args = {'portal_type':types, 59 'path':cpath,56 args = {'portal_type':types, 57 'path':cpath, 60 58 'sort_on':'effective', 61 59 'sort_order':'reverse',} … … 63 61 args['review_state'] = 'published' 64 62 if include_subfolders == 0: 63 path_length=len(cpath)+1 64 for i in catalog.searchResults(args): 65 if i.getPath()[path_length:].find('/')<0: 66 res.append(i) 67 res = res[:articles_number] 68 else: 65 69 args['sort_limit'] = articles_number 66 res=catalog.searchResults(args) 67 path_length=len(cpath)+1 68 res1=[] 69 if include_subfolders == 0: 70 for i in res : 71 if i.getPath()[path_length:].find('/')<0: 72 res1.append(i) 73 res = res1[:articles_number] 74 res = [r.getObject() for r in res] 70 res=catalog.searchResults(args) 71 res = [r.getObject() for r in res] 75 72 return res 76 73
