Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
3b932eea
Commit
3b932eea
authored
May 31, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Fix for passing additional parameters
- minor code cleanup for handling wrong index names
parent
055612f3
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
26 additions
and
20 deletions
+26
-20
lib/python/Products/PluginIndexes/FieldIndex/FieldIndex.py
lib/python/Products/PluginIndexes/FieldIndex/FieldIndex.py
+3
-2
lib/python/Products/PluginIndexes/KeywordIndex/KeywordIndex.py
...ython/Products/PluginIndexes/KeywordIndex/KeywordIndex.py
+2
-1
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
+3
-2
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
+10
-8
lib/python/Products/PluginIndexes/TextIndex/dtml/addTextIndex.dtml
...n/Products/PluginIndexes/TextIndex/dtml/addTextIndex.dtml
+1
-3
lib/python/Products/ZCatalog/Catalog.py
lib/python/Products/ZCatalog/Catalog.py
+4
-1
lib/python/Products/ZCatalog/ZCatalog.py
lib/python/Products/ZCatalog/ZCatalog.py
+3
-3
No files found.
lib/python/Products/PluginIndexes/FieldIndex/FieldIndex.py
View file @
3b932eea
...
...
@@ -85,7 +85,7 @@
"""Simple column indices"""
__version__
=
'$Revision: 1.
2
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
from
Globals
import
Persistent
from
Acquisition
import
Implicit
...
...
@@ -137,5 +137,6 @@ manage_addFieldIndexForm = DTMLFile('dtml/addFieldIndex', globals())
def
manage_addFieldIndex
(
self
,
id
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL3
=
None
):
"""Add a field index"""
return
self
.
manage_addIndex
(
id
,
'FieldIndex'
,
REQUEST
,
RESPONSE
,
URL3
)
return
self
.
manage_addIndex
(
id
,
'FieldIndex'
,
extra
=
None
,
\
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL3
)
lib/python/Products/PluginIndexes/KeywordIndex/KeywordIndex.py
View file @
3b932eea
...
...
@@ -194,5 +194,6 @@ manage_addKeywordIndexForm = DTMLFile('dtml/addKeywordIndex', globals())
def
manage_addKeywordIndex
(
self
,
id
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL3
=
None
):
"""Add a keyword index"""
return
self
.
manage_addIndex
(
id
,
'KeywordIndex'
,
REQUEST
,
RESPONSE
,
URL3
)
return
self
.
manage_addIndex
(
id
,
'KeywordIndex'
,
extra
=
None
,
\
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL3
)
lib/python/Products/PluginIndexes/PathIndex/PathIndex.py
View file @
3b932eea
...
...
@@ -83,7 +83,7 @@
#
##############################################################################
__version__
=
'$Id: PathIndex.py,v 1.
2 2001/05/30 15:57:3
2 andreas Exp $'
__version__
=
'$Id: PathIndex.py,v 1.
3 2001/05/31 12:22:5
2 andreas Exp $'
from
Products.PluginIndexes
import
PluggableIndex
from
Products.PluginIndexes.common.util
import
parseIndexRequest
...
...
@@ -369,7 +369,8 @@ manage_addPathIndexForm = DTMLFile('dtml/addPathIndex', globals())
def
manage_addPathIndex
(
self
,
id
,
REQUEST
=
None
,
RESPONSE
=
None
,
URL3
=
None
):
"""Add a path index"""
return
self
.
manage_addIndex
(
id
,
'PathIndex'
,
REQUEST
,
RESPONSE
,
URL3
)
return
self
.
manage_addIndex
(
id
,
'PathIndex'
,
extra
=
None
,
\
REQUEST
=
REQUEST
,
RESPONSE
=
RESPONSE
,
URL1
=
URL3
)
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
View file @
3b932eea
...
...
@@ -91,7 +91,7 @@ undo information so that objects can be unindexed when the old value
is no longer known.
"""
__version__
=
'$Revision: 1.
3
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
4
$'
[
11
:
-
2
]
import
string
,
re
...
...
@@ -150,7 +150,7 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
'help'
:
(
'TextIndex'
,
'TextIndex_Settings.stx'
)},
)
def
__init__
(
self
,
id
,
ignore_ex
=
None
,
call_methods
=
None
,
lexicon
=
None
):
def
__init__
(
self
,
id
,
ignore_ex
=
None
,
call_methods
=
None
,
lexicon
=
None
,
extra
=
None
):
"""Create an index
The arguments are:
...
...
@@ -180,7 +180,9 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
self
.
clear
()
self
.
vocabulary_id
=
"Vocabulary"
if
extra
:
self
.
vocabulary_id
=
extra
.
vocabulary
else
:
self
.
vocabulary_id
=
"Vocabulary"
self
.
_lexicon
=
None
if
lexicon
is
not
None
:
...
...
@@ -795,7 +797,7 @@ def quotes(s, ws=(string.whitespace,)):
manage_addTextIndexForm = DTMLFile('dtml/addTextIndex', globals())
def manage_addTextIndex(self, id, REQUEST=None, RESPONSE=None, URL3=None):
def manage_addTextIndex(self, id,
extra=None,
REQUEST=None, RESPONSE=None, URL3=None):
"""Add a text index"""
return self.manage_addIndex(id, 'TextIndex', REQUEST, RESPONSE, URL3)
return self.manage_addIndex(id, 'TextIndex',
extra,
REQUEST, RESPONSE, URL3)
lib/python/Products/PluginIndexes/TextIndex/dtml/addTextIndex.dtml
View file @
3b932eea
...
...
@@ -26,7 +26,6 @@ from the most relevant to the lest relevant.
</td>
</tr>
<dtml-comment>
<tr>
<td align="left" valign="top">
<div class="form-label">
...
...
@@ -35,7 +34,7 @@ from the most relevant to the lest relevant.
</td>
<td>
<select name="
vocabulary
">
<select name="
extra.vocabulary:record
">
<dtml-in "this().aq_parent.objectItems('Vocabulary')">
<option value="&dtml-sequence-key;">&dtml-sequence-key; (<dtml-var "_['sequence-item'].title">)
</dtml-in>
...
...
@@ -43,7 +42,6 @@ from the most relevant to the lest relevant.
</td>
</tr>
</dtml-comment>
<tr>
...
...
lib/python/Products/ZCatalog/Catalog.py
View file @
3b932eea
...
...
@@ -333,9 +333,12 @@ class Catalog(Persistent, Acquisition.Implicit, ExtensionClass.Base):
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
...
...
lib/python/Products/ZCatalog/ZCatalog.py
View file @
3b932eea
...
...
@@ -405,9 +405,9 @@ class ZCatalog(Folder, Persistent, Implicit):
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 @@ class ZCatalog(Folder, Persistent, Implicit):
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment