[Zope-Checkins] SVN: Zope/trunk/ Revert c81408 HelpSys changes,
it didn't make much of a difference. Making the
whole help system optional would be a better approach.
Hanno Schlichting
plone at hannosch.info
Sat Nov 10 06:38:22 EST 2007
Log message for revision 81697:
Revert c81408 HelpSys changes, it didn't make much of a difference. Making the whole help system optional would be a better approach.
Changed:
U Zope/trunk/doc/CHANGES.txt
U Zope/trunk/lib/python/HelpSys/HelpSys.py
-=-
Modified: Zope/trunk/doc/CHANGES.txt
===================================================================
--- Zope/trunk/doc/CHANGES.txt 2007-11-10 11:28:15 UTC (rev 81696)
+++ Zope/trunk/doc/CHANGES.txt 2007-11-10 11:38:21 UTC (rev 81697)
@@ -9,9 +9,6 @@
Restructuring
- - Made Helpsys.HelpSys internal ZCatalog creation lazy, so it isn't
- created unless first accessed.
-
- Turned deprecation warnings for manage_afterAdd, manage_beforeDelete
and manage_afterClone methods into discouraged warnings. These methods
will not be removed in Zope 2.11, but stay for the foreseeable future.
Modified: Zope/trunk/lib/python/HelpSys/HelpSys.py
===================================================================
--- Zope/trunk/lib/python/HelpSys/HelpSys.py 2007-11-10 11:28:15 UTC (rev 81696)
+++ Zope/trunk/lib/python/HelpSys/HelpSys.py 2007-11-10 11:38:21 UTC (rev 81697)
@@ -219,27 +219,21 @@
def __init__(self, id='Help', title=''):
self.id=id
self.title=title
- self._catalog = None
+ c=self.catalog=ZCatalog('catalog')
+ # clear catalog
+ for index in c.indexes():
+ c.delIndex(index)
+ for col in c.schema():
+ c.delColumn(col)
+ c.addIndex('SearchableText', 'TextIndex')
+ c.addIndex('categories', 'KeywordIndex')
+ c.addIndex('permissions', 'KeywordIndex')
+ c.addColumn('categories')
+ c.addColumn('permissions')
+ c.addColumn('title_or_id')
+ c.addColumn('url')
+ c.addColumn('id')
- @property
- def catalog(self):
- if self._catalog is None:
- c=self._catalog=ZCatalog('catalog')
- # clear catalog
- for index in c.indexes():
- c.delIndex(index)
- for col in c.schema():
- c.delColumn(col)
- c.addIndex('SearchableText', 'TextIndex')
- c.addIndex('categories', 'KeywordIndex')
- c.addIndex('permissions', 'KeywordIndex')
- c.addColumn('categories')
- c.addColumn('permissions')
- c.addColumn('title_or_id')
- c.addColumn('url')
- c.addColumn('id')
- return self._catalog
-
security.declareProtected(add_documents_images_and_files, 'addTopicForm')
addTopicForm=DTMLFile('dtml/addTopic', globals())
More information about the Zope-Checkins
mailing list