diff --git a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml index ecaa96ec7e6414202dc5a480922b40f0388f8731..07513f9d641c39da28f98960494394e34176f7a9 100644 --- a/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml +++ b/product/ERP5/bootstrap/erp5_core/SkinTemplateItem/portal_skins/erp5_core/Base_showFoundText.xml @@ -2,10 +2,7 @@ <ZopeData> <record id="1" aka="AAAAAAAAAAE="> <pickle> - <tuple> - <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> - <tuple/> - </tuple> + <global name="PythonScript" module="Products.PythonScripts.PythonScript"/> </pickle> <pickle> <dictionary> @@ -82,7 +79,10 @@ def getRandomDocumentTextExcerpt(document_text):\n \n if document_text is None:\n try:\n - document_text = context.getSearchableText()\n + # if SearchableText is joinned as it is, we use it for better performance.\n + document_text = getattr(context, \'SearchableText\', None)\n + if not isinstance(document_text, (str, unicode)):\n + document_text = context.getSearchableText()\n except NotConvertedError:\n return context.Base_translateString("This document is not converted yet.")\n \n @@ -161,11 +161,14 @@ else:\n <string>is_gadget_mode</string> <string>getRandomDocumentTextExcerpt</string> <string>None</string> + <string>getattr</string> + <string>isinstance</string> + <string>str</string> + <string>unicode</string> <string>search_string</string> <string>search_argument_list</string> <string>found_text_fragments</string> <string>map</string> - <string>str</string> <string>result</string> <string>unicode_result</string> </tuple> diff --git a/product/ERP5/bootstrap/erp5_core/bt/revision b/product/ERP5/bootstrap/erp5_core/bt/revision index 870e31e0ee98a8a5208484d7a3d641dc8161f5db..3c3948ade99869e23fae1f21668b4112f680fd55 100644 --- a/product/ERP5/bootstrap/erp5_core/bt/revision +++ b/product/ERP5/bootstrap/erp5_core/bt/revision @@ -1 +1 @@ -1697 \ No newline at end of file +1698 \ No newline at end of file