Commit 7a1daffd authored by Tres Seaver's avatar Tres Seaver

Better testability.

parent 627bb14f
...@@ -384,19 +384,7 @@ class PLexicon(Lexicon, Implicit, SimpleItem): ...@@ -384,19 +384,7 @@ class PLexicon(Lexicon, Implicit, SimpleItem):
columns.append(words[i:i + rows]) columns.append(words[i:i + rows])
i += rows i += rows
if REQUEST is not None: info = dict(page=page,
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,
rows=rows, rows=rows,
cols=cols, cols=cols,
start_word=start+1, start_word=start+1,
...@@ -406,6 +394,11 @@ class PLexicon(Lexicon, Implicit, SimpleItem): ...@@ -406,6 +394,11 @@ class PLexicon(Lexicon, Implicit, SimpleItem):
page_range=xrange(page_count), page_range=xrange(page_count),
page_columns=columns) page_columns=columns)
if REQUEST is not None:
return self._queryLexicon(self, REQUEST, **info)
return info
security.declareProtected(LexiconMgmtPerm, 'manage_main') security.declareProtected(LexiconMgmtPerm, 'manage_main')
manage_main = DTMLFile('dtml/manageLexicon', globals()) manage_main = DTMLFile('dtml/manageLexicon', globals())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment