From e4ec28829cba38e0ba00b5a025cd237e39c6ca31 Mon Sep 17 00:00:00 2001
From: Jean-Paul Smets <jp@nexedi.com>
Date: Thu, 5 Apr 2007 07:31:58 +0000
Subject: [PATCH] Use edit instead of manage_upload and support new revision
 system.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@13955 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../portal_skins/erp5_dms/Document_uploadFile.xml | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_uploadFile.xml b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_uploadFile.xml
index 29083aed29..7334f0966b 100644
--- a/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_uploadFile.xml
+++ b/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/Document_uploadFile.xml
@@ -99,18 +99,9 @@ if candidate_type_list and current_type not in candidate_type_list:\n
                                 mapping = dict(portal_type = current_type, appropriate_type = str(candidate_type_list)))\n
   return context.Base_redirect(dialog_id, keep_items = dict(portal_status_message =portal_status_message, cancel_url = kw[\'cancel_url\']), **kw)\n
 \n
-context.manage_upload(file)\n
+context.edit(file=file)\n
 context.discoverMetadata(file_name=file_name)\n
 \n
-# increase revision\n
-try:\n
-  current_revision = int(context.getRevision())\n
-except ValueError:\n
-  current_revision = 0\n
-\n
-rev = \'%03d\' % (current_revision + 1)\n
-context.setRevision(rev)\n
-\n
 msg = translateString(\'File uploaded.\')\n
 \n
 # Return to view mode\n
@@ -174,10 +165,6 @@ return context.Base_redirect(form_id, keep_items = {\'portal_status_message\' :
                             <string>str</string>
                             <string>portal_status_message</string>
                             <string>_apply_</string>
-                            <string>int</string>
-                            <string>current_revision</string>
-                            <string>ValueError</string>
-                            <string>rev</string>
                             <string>msg</string>
                           </tuple>
                         </value>
-- 
2.30.9