[Erp5-report] r39591 fabien - in /erp5/trunk/bt5/erp5_web_blog: SkinTemplateItem/portal_ski...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Oct 28 11:31:29 CEST 2010
Author: fabien
Date: Thu Oct 28 11:31:28 2010
New Revision: 39591
URL: http://svn.erp5.org?rev=39591&view=rev
Log:
speed up the script in case there is no tag
Modified:
erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml
erp5/trunk/bt5/erp5_web_blog/bt/revision
Modified: erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml?rev=39591&r1=39590&r2=39591&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/SkinTemplateItem/portal_skins/erp5_web_blog/WebSection_getPostList.xml [utf8] Thu Oct 28 11:31:28 2010
@@ -67,13 +67,13 @@ request = container.REQUEST\n
\n
requested_tag = request.get(\'tag\') # XXX-JPS it would be better to use subject which is the normal term in ERP5\n
current_section = context.getWebSectionValue()\n
-result = []\n
-for item in current_section.WebSection_getDocumentValueList(**kw): # XXX-JPS this could be way too slow\n
- if requested_tag is not None:\n
+result = current_section.WebSection_getDocumentValueList(**kw)\n
+tagged_result = []\n
+if requested_tag is not None:\n
+ for item in result: # XXX-JPS this could be way too slow\n
if requested_tag in item.getSubjectList():\n
- result.append(item)\n
- else:\n
- result.append(item)\n
+ tagged_result.append(item)\n
+ return tagged_result\n
\n
return result\n
</string> </value>
@@ -119,11 +119,12 @@ return result\n
<string>requested_tag</string>
<string>context</string>
<string>current_section</string>
+ <string>_apply_</string>
<string>result</string>
+ <string>tagged_result</string>
+ <string>None</string>
<string>_getiter_</string>
- <string>_apply_</string>
<string>item</string>
- <string>None</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_web_blog/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_web_blog/bt/revision?rev=39591&r1=39590&r2=39591&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_web_blog/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_web_blog/bt/revision [utf8] Thu Oct 28 11:31:28 2010
@@ -1 +1 @@
-54
\ No newline at end of file
+55
\ No newline at end of file
More information about the Erp5-report
mailing list