Commit 59cc336b authored by Bartek Górny's avatar Bartek Górny

Use the same script for simple text (if SearchableText is provided directly)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13132 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 813cc30f
......@@ -74,8 +74,12 @@ puts together a search string in a search syntax, depending on\n
parameters received. It is the reverse of parseSearchString external\n
method.\n
"""\n
\n
req = context.REQUEST\n
\n
search_straight = req.get(\'SearchableText\', \'\')\n
if search_straight != \'\':\n
return search_straight\n
\n
# words to search in \'any of the words\' form - left intact\n
search_string = req.get(\'SearchableText_any\',\'\')\n
\n
......@@ -149,6 +153,8 @@ if search_mode and search_mode_map.has_key(search_mode):\n
search_string += \' mode:%s\' % search_mode_map[search_mode]\n
\n
return search_string\n
\n
# vim: filetype=python syntax=python shiftwidth=2\n
</string> </value>
</item>
<item>
......@@ -202,6 +208,7 @@ return search_string\n
<string>_getattr_</string>
<string>context</string>
<string>req</string>
<string>search_straight</string>
<string>search_string</string>
<string>search_phrase</string>
<string>search_all</string>
......
558
\ No newline at end of file
559
\ No newline at end of file
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