[Erp5-report] r36731 ivan - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: SkinTemplateI...
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Jun 30 13:47:29 CEST 2010
Author: ivan
Date: Wed Jun 30 13:47:29 2010
New Revision: 36731
URL: http://svn.erp5.org?rev=36731&view=rev
Log:
Get with higher priority items from REQUEST than selection.
Remove hard coded selection name.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml?rev=36731&r1=36730&r2=36731&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_getSearchText.xml [utf8] Wed Jun 30 13:47:29 2010
@@ -56,6 +56,7 @@
<value> <string>"""\n
Get search text from REQUEST or selection.\n
"""\n
+request = context.REQUEST\n
# get search words from listbox selection\n
argument_names = (\'advanced_search_text\', \n
\'your_search_text\',\n
@@ -65,18 +66,16 @@ argument_names = (\'advanced_search_text
\'searchabletext_any\',\n
\'searchabletext_all\', \n
\'searchabletext_phrase\',)\n
-\n
if selection is None:\n
selection_name = context.REQUEST.get("selection_name", None)\n
if selection_name is not None:\n
selection = context.portal_selections.getSelectionFor(selection_name)\n
\n
+params = {}\n
if selection is not None:\n
params = selection.getParams()\n
-else:\n
- params = context.portal_selections.getSelectionParamsFor(\'search_result_selection\')\n
\n
-params = [params.get(name, \'\') for name in argument_names]\n
+params = [request.get(name, params.get(name, \'\')) for name in argument_names]\n
# flatten value if it is list\n
params = [(hasattr(param, \'sort\') and \' \'.join(param) or param) for param in params]\n
search_string = \' \'.join(params).strip()\n
@@ -119,10 +118,11 @@ return search_string\n
<value>
<tuple>
<string>selection</string>
- <string>argument_names</string>
- <string>None</string>
<string>_getattr_</string>
<string>context</string>
+ <string>request</string>
+ <string>argument_names</string>
+ <string>None</string>
<string>selection_name</string>
<string>params</string>
<string>append</string>
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=36731&r1=36730&r2=36731&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Wed Jun 30 13:47:29 2010
@@ -1 +1 @@
-1623
\ No newline at end of file
+1620
\ No newline at end of file
More information about the Erp5-report
mailing list