[Erp5-report] r38311 jerome - in /erp5/trunk/bt5/erp5_ingestion: SkinTemplateItem/portal_sk...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Sep 13 16:35:59 CEST 2010
Author: jerome
Date: Mon Sep 13 16:35:58 2010
New Revision: 38311
URL: http://svn.erp5.org?rev=38311&view=rev
Log:
calculate context.getRelativeUrl() only once, and fix a mix of value and relative url when attaching document to context
Modified:
erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml
erp5/trunk/bt5/erp5_ingestion/bt/revision
Modified: erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml?rev=38311&r1=38310&r2=38311&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_ingestion/SkinTemplateItem/portal_skins/erp5_ingestion/Base_contribute.xml [utf8] Mon Sep 13 16:35:58 2010
@@ -59,6 +59,7 @@ from ZTUtils import make_query\n
MARKER = [\'\', None]\n
portal = context.getPortalObject()\n
portal_contributions = portal.portal_contributions\n
+context_url = context.getRelativeUrl()\n
\n
if synchronous_metadata_discovery is None:\n
synchronous_metadata_discovery = portal.portal_preferences.isPreferredSynchronousMetadataDiscovery(False)\n
@@ -72,7 +73,7 @@ if user_login is None:\n
document_kw = {}\n
document_kw[\'user_login\'] = user_login\n
if use_context_for_container:\n
- document_kw[\'container_path\'] = context.getRelativeUrl()\n
+ document_kw[\'container_path\'] = context_url\n
if portal_type not in MARKER:\n
document_kw[\'portal_type\'] = portal_type\n
if classification not in MARKER:\n
@@ -126,9 +127,9 @@ for key in property_id_list:\n
if attach_document_to_context:\n
# attach document to current context using follow_up\n
follow_up_list = document.getFollowUpList()\n
- if context.getRelativeUrl() not in follow_up_list:\n
+ if context_url not in follow_up_list:\n
# attach to context only if not already attached\n
- follow_up_list.append(context)\n
+ follow_up_list.append(context_url)\n
document.setFollowUpList(follow_up_list)\n
# edit document \n
if document_edit_kw is not {}:\n
@@ -219,6 +220,7 @@ return document\n
<string>context</string>
<string>portal</string>
<string>portal_contributions</string>
+ <string>context_url</string>
<string>False</string>
<string>str</string>
<string>document_kw</string>
Modified: erp5/trunk/bt5/erp5_ingestion/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_ingestion/bt/revision?rev=38311&r1=38310&r2=38311&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_ingestion/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_ingestion/bt/revision [utf8] Mon Sep 13 16:35:58 2010
@@ -1 +1 @@
-107
\ No newline at end of file
+109
\ No newline at end of file
More information about the Erp5-report
mailing list