[Zope-Checkins] SVN: Zope/branches/2.12/src/Products/ZCTextIndex/ZCTextIndex.py Better testability.
Tres Seaver
tseaver at palladion.com
Mon Apr 12 08:26:39 EDT 2010
Log message for revision 110739:
Better testability.
Changed:
U Zope/branches/2.12/src/Products/ZCTextIndex/ZCTextIndex.py
-=-
Modified: Zope/branches/2.12/src/Products/ZCTextIndex/ZCTextIndex.py
===================================================================
--- Zope/branches/2.12/src/Products/ZCTextIndex/ZCTextIndex.py 2010-04-12 12:26:37 UTC (rev 110738)
+++ Zope/branches/2.12/src/Products/ZCTextIndex/ZCTextIndex.py 2010-04-12 12:26:38 UTC (rev 110739)
@@ -384,19 +384,7 @@
columns.append(words[i:i + rows])
i += rows
- if REQUEST is not None:
- return self._queryLexicon(self,
- REQUEST,
- page=page,
- rows=rows,
- cols=cols,
- start_word=start+1,
- end_word=end,
- word_count=word_count,
- page_count=page_count,
- page_range=xrange(page_count),
- page_columns=columns)
- return dict(page=page,
+ info = dict(page=page,
rows=rows,
cols=cols,
start_word=start+1,
@@ -406,6 +394,11 @@
page_range=xrange(page_count),
page_columns=columns)
+ if REQUEST is not None:
+ return self._queryLexicon(self, REQUEST, **info)
+
+ return info
+
security.declareProtected(LexiconMgmtPerm, 'manage_main')
manage_main = DTMLFile('dtml/manageLexicon', globals())
More information about the Zope-Checkins
mailing list