Commit b80b8efd authored by Jean-Paul Smets's avatar Jean-Paul Smets

Added support for in place ingestion

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13768 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 65ce95bf
...@@ -96,9 +96,13 @@ if 1:\n ...@@ -96,9 +96,13 @@ if 1:\n
file_name = contribute_file.filename\n file_name = contribute_file.filename\n
else:\n else:\n
file_name = None\n file_name = None\n
new_content.discoverMetadata(file_name=file_name) # Consider putting an exception handler\n merged_content = new_content.discoverMetadata(file_name=file_name) # Consider putting an exception handler\n
msg = context.Base_translateString(\'Document successfully created\')\n if merged_content is not new_content:\n
target = new_content\n msg = context.Base_translateString(\'Document successfully updated\')\n
target = merged_content\n
else:\n
msg = context.Base_translateString(\'Document successfully created\')\n
target = new_content\n
editable_mode = 1\n editable_mode = 1\n
else:\n else:\n
#except Exception, e:\n #except Exception, e:\n
...@@ -169,6 +173,7 @@ return target.Base_redirect(\'view\', keep_items=dict(portal_status_message=msg, ...@@ -169,6 +173,7 @@ return target.Base_redirect(\'view\', keep_items=dict(portal_status_message=msg,
<string>new_content</string> <string>new_content</string>
<string>hasattr</string> <string>hasattr</string>
<string>file_name</string> <string>file_name</string>
<string>merged_content</string>
<string>msg</string> <string>msg</string>
<string>target</string> <string>target</string>
<string>editable_mode</string> <string>editable_mode</string>
......
544 546
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment