Commit 4e4805e5 authored by Yusei Tahara's avatar Yusei Tahara

Fixed a bug that does not use selection argument.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15984 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent ea4bf9d0
...@@ -76,7 +76,6 @@ ...@@ -76,7 +76,6 @@
containing searched words as well highlighting the searched \n containing searched words as well highlighting the searched \n
words in the text itself.\n words in the text itself.\n
"""\n """\n
\n
# convert object to text (if possible)\n # convert object to text (if possible)\n
document_text = \'\'\n document_text = \'\'\n
if hasattr(context, \'asText\'):\n if hasattr(context, \'asText\'):\n
...@@ -90,7 +89,11 @@ argument_names = (\'advanced_search_text\', \n ...@@ -90,7 +89,11 @@ argument_names = (\'advanced_search_text\', \n
\'SearchableText_any\',\n \'SearchableText_any\',\n
\'SearchableText_all\', \n \'SearchableText_all\', \n
\'SearchableText_phrase\',)\n \'SearchableText_phrase\',)\n
params = context.portal_selections.getSelectionParamsFor(\'web_search_result_selection\')\n if selection is not None:\n
params = selection.getParams()\n
else:\n
params = context.portal_selections.getSelectionParamsFor(\'web_search_result_selection\')\n
\n
params = [params.get(name, \'\') for name in argument_names]\n params = [params.get(name, \'\') for name in argument_names]\n
params = [(hasattr(par, \'sort\') and \'\'.join(par) or par) for par in params]\n params = [(hasattr(par, \'sort\') and \'\'.join(par) or par) for par in params]\n
search_string = \' \'.join(params)\n search_string = \' \'.join(params)\n
...@@ -146,7 +149,7 @@ return \' \'.join(map(str, found_text_fragments))\n ...@@ -146,7 +149,7 @@ return \' \'.join(map(str, found_text_fragments))\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>brain, selection</string> </value> <value> <string>brain, selection=None</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -179,6 +182,7 @@ return \' \'.join(map(str, found_text_fragments))\n ...@@ -179,6 +182,7 @@ return \' \'.join(map(str, found_text_fragments))\n
<string>context</string> <string>context</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>argument_names</string> <string>argument_names</string>
<string>None</string>
<string>params</string> <string>params</string>
<string>append</string> <string>append</string>
<string>$append0</string> <string>$append0</string>
...@@ -189,7 +193,6 @@ return \' \'.join(map(str, found_text_fragments))\n ...@@ -189,7 +193,6 @@ return \' \'.join(map(str, found_text_fragments))\n
<string>_getitem_</string> <string>_getitem_</string>
<string>search_argument_list</string> <string>search_argument_list</string>
<string>search_words</string> <string>search_words</string>
<string>None</string>
<string>result</string> <string>result</string>
<string>isinstance</string> <string>isinstance</string>
<string>str</string> <string>str</string>
...@@ -208,7 +211,9 @@ return \' \'.join(map(str, found_text_fragments))\n ...@@ -208,7 +211,9 @@ return \' \'.join(map(str, found_text_fragments))\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<none/> <tuple>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <item>
......
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