[Zope-Checkins] CVS: Zope2 - Catalog.py:1.72 ZCatalog.py:1.91
andreas@serenade.digicool.com
andreas@serenade.digicool.com
Thu, 31 May 2001 08:22:54 -0400
Update of /cvs-repository/Zope2/lib/python/Products/ZCatalog
In directory serenade:/tmp/cvs-serv24400/ZCatalog
Modified Files:
Catalog.py ZCatalog.py
Log Message:
- Fix for passing additional parameters
- minor code cleanup for handling wrong index names
--- Updated File Catalog.py in package Zope2 --
--- Catalog.py 2001/05/30 15:57:37 1.71
+++ Catalog.py 2001/05/31 12:22:53 1.72
@@ -333,8 +333,11 @@
if self.indexes.has_key(name):
raise 'Index Exists', 'The index specified already exists'
- if name[0] == '_':
+ if name.startswith('_'):
raise 'Invalid Index Name', 'Cannot index fields beginning with "_"'
+
+ if not name:
+ raise 'Invalid Index Name', 'Name of index is empty'
# this is currently a succesion of hacks. Indexes should be
# pluggable and managable
--- Updated File ZCatalog.py in package Zope2 --
--- ZCatalog.py 2001/05/30 15:57:37 1.90
+++ ZCatalog.py 2001/05/31 12:22:53 1.91
@@ -405,9 +405,9 @@
if REQUEST and RESPONSE:
RESPONSE.redirect(URL1 + '/manage_catalogSchema?manage_tabs_message=Column%20Deleted')
- def manage_addIndex(self, name, type, REQUEST=None, RESPONSE=None, URL1=None):
+ def manage_addIndex(self, name, type, extra=None,REQUEST=None, RESPONSE=None, URL1=None):
""" add an index """
- self.addIndex(name, type)
+ self.addIndex(name, type,extra)
if REQUEST and RESPONSE:
RESPONSE.redirect(URL1 + '/manage_main?manage_tabs_message=Index%20Added')
@@ -791,7 +791,7 @@
# Indexing methods
#
- def addIndex(self, name, type):
+ def addIndex(self, name, type,extra=None):
# Convert the type by finding an appropriate product which supports
# this interface by that name. Bleah