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
a828f715
Commit
a828f715
authored
Jun 19, 2001
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added warning when using deprecated textindex_operator
parent
946ea6cc
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
+6
-3
No files found.
lib/python/Products/PluginIndexes/TextIndex/TextIndex.py
View file @
a828f715
...
...
@@ -91,11 +91,11 @@ undo information so that objects can be unindexed when the old value
is no longer known.
"""
__version__
=
'$Revision: 1.
8
$'
[
11
:
-
2
]
__version__
=
'$Revision: 1.
9
$'
[
11
:
-
2
]
import
string
,
re
import
operator
import
operator
,
warnings
from
Globals
import
Persistent
,
DTMLFile
from
zLOG
import
LOG
,
ERROR
from
OFS.SimpleItem
import
SimpleItem
...
...
@@ -510,7 +510,8 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
query_operator
=
record
.
get
(
'operator'
,
self
.
useOperator
)
if
not
query_operator
in
self
.
operators
.
keys
():
raise
exceptions
.
RuntimeError
,
"Invalid operator '%s' for a TextIndex"
%
query_operator
raise
exceptions
.
RuntimeError
,
"Invalid operator '%s' for a TextIndex"
\
%
query_operator
# We keep this for pre-2.4 compatibility
# This stinking code should go away somewhere. A global
...
...
@@ -520,6 +521,8 @@ class TextIndex(PluggableIndex.PluggableIndex, Persistent,
if
request
.
has_key
(
'textindex_operator'
):
query_operator
=
request
[
'textindex_operator'
]
warnings
.
warn
(
"The usage of the 'textindex_operator' is no longer recommended.
\
n
"
\
"Please use a mapping object and the 'operator' to specify the operator"
)
r
=
None
...
...
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