[Erp5-report] r38975 ivan - in /erp5/trunk/bt5/erp5_km: SkinTemplateItem/portal_skins/erp5_...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 7 16:41:18 CEST 2010
Author: ivan
Date: Thu Oct 7 16:41:17 2010
New Revision: 38975
URL: http://svn.erp5.org?rev=38975&view=rev
Log:
Handle case when no tag has been defined.
Modified:
erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_widget_library/WebSection_getTagListFromUserPreferences.xml
erp5/trunk/bt5/erp5_km/bt/revision
Modified: erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_widget_library/WebSection_getTagListFromUserPreferences.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_widget_library/WebSection_getTagListFromUserPreferences.xml?rev=38975&r1=38974&r2=38975&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_widget_library/WebSection_getTagListFromUserPreferences.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/SkinTemplateItem/portal_skins/erp5_km_widget_library/WebSection_getTagListFromUserPreferences.xml [utf8] Thu Oct 7 16:41:17 2010
@@ -55,11 +55,9 @@ box = context.restrictedTraverse(box_rel
preferences = box.KnowledgeBox_getDefaultPreferencesDict()\n
preferred_tag = preferences.get(\'preferred_tag\', None)\n
if preferred_tag is not None:\n
- subject_list_from_preferences=preferred_tag.split(\' \')\n
- filtered_subject_list_from_preferences =[]\n
- for x in subject_list_from_preferences:\n
- filtered_subject_list_from_preferences.append("%" + x + "%")\n
- return context.portal_catalog(subject=filtered_subject_list_from_preferences)\n
+ subject_list_from_preferences=[x for x in preferred_tag.split(\' \') if x!=\'\']\n
+ if subject_list_from_preferences:\n
+ return context.portal_catalog(subject=["%%%s%%" %tag for tag in subject_list_from_preferences])\n
return []\n
</string> </value>
</item>
@@ -105,10 +103,12 @@ return []\n
<string>box</string>
<string>preferences</string>
<string>preferred_tag</string>
- <string>subject_list_from_preferences</string>
- <string>filtered_subject_list_from_preferences</string>
+ <string>append</string>
+ <string>$append0</string>
<string>_getiter_</string>
<string>x</string>
+ <string>subject_list_from_preferences</string>
+ <string>tag</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_km/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_km/bt/revision?rev=38975&r1=38974&r2=38975&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_km/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_km/bt/revision [utf8] Thu Oct 7 16:41:17 2010
@@ -1 +1 @@
-1581
\ No newline at end of file
+1583
\ No newline at end of file
More information about the Erp5-report
mailing list