[Erp5-report] r14357 - /erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/

nobody at svn.erp5.org nobody at svn.erp5.org
Fri May 4 13:47:08 CEST 2007


Author: jp
Date: Fri May  4 13:47:07 2007
New Revision: 14357

URL: http://svn.erp5.org?rev=14357&view=rev
Log:
added support for text data streams (with no len support)

Modified:
    erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml

Modified: erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml?rev=14357&r1=14356&r2=14357&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml (original)
+++ erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Base_showFoundText.xml Fri May  4 13:47:07 2007
@@ -108,6 +108,7 @@
 if search_words is None or search_words == \'\':\n
   # if the searched text is empty (e.g. because we used only parameters without pure searchable text)\n
   # we return something\n
+  if not hasattr(txt, \'len\'): txt = str(txt)\n
   return txt[min(len(txt) - 300, 200) : 500] # a somewhat arbitrary choice to trim searchable attrs\n
 \n
 res = context.cutFound(context, txt, search_words, tags, trail, maxlines)\n
@@ -184,11 +185,11 @@
                             <string>search_argument_list</string>
                             <string>search_words</string>
                             <string>None</string>
+                            <string>str</string>
                             <string>min</string>
                             <string>len</string>
                             <string>res</string>
                             <string>map</string>
-                            <string>str</string>
                           </tuple>
                         </value>
                     </item>




More information about the Erp5-report mailing list