Commit 1ce39569 authored by Bartek Górny's avatar Bartek Górny

bugfixes

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10409 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 0b7a3b6f
...@@ -76,7 +76,7 @@ if ctype is None:\n ...@@ -76,7 +76,7 @@ if ctype is None:\n
\n \n
# create content\n # create content\n
ob=context.document_module.newContent(portal_type=ctype)\n ob=context.document_module.newContent(portal_type=ctype)\n
ob.Base_edit(file=data) # XXX to nie jest dobrze\n ob.manage_upload(data)\n
ob.DMS_ingestFile(fname,data)\n ob.DMS_ingestFile(fname,data)\n
return ob\n return ob\n
</string> </value> </string> </value>
......
...@@ -69,9 +69,9 @@ ...@@ -69,9 +69,9 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>pref=context.portal_preferences.getPreferredDmsIngestEmailNotification()\n <value> <string>pref=context.portal_preferences.getPreferredDmsIngestEmailNotification()\n
if len(pref)==0:return\n if pref is not None and len(pref)==0:\n
pref=pref[0]\n pref=pref[0]\n
if pref==\'never\':return\n if pref==\'never\':return\n
\n \n
subjecttpl=\'ingested %(name)s\'\n subjecttpl=\'ingested %(name)s\'\n
msgtpl="""Your document "%(name)s" was successfully ingested.\n msgtpl="""Your document "%(name)s" was successfully ingested.\n
...@@ -79,8 +79,8 @@ msgtpl="""Your document "%(name)s" was successfully ingested.\n ...@@ -79,8 +79,8 @@ msgtpl="""Your document "%(name)s" was successfully ingested.\n
click here: %(url)s/view to proceed with your work.\n click here: %(url)s/view to proceed with your work.\n
"""\n """\n
ob=kw[\'object\']\n ob=kw[\'object\']\n
subject=subjecttpl % {\'name\':ob.getOriginalFilename()}\n subject=subjecttpl % {\'name\':ob.getSourceReference()}\n
msg=msgtpl % {\'url\':ob.absolute_url(),\'name\':ob.getOriginalFilename()}\n msg=msgtpl % {\'url\':ob.absolute_url(),\'name\':ob.getSourceReference()}\n
mto=kw[\'address\']\n mto=kw[\'address\']\n
mfro=\'dms@dms.nexedi.com\'\n mfro=\'dms@dms.nexedi.com\'\n
\n \n
...@@ -131,6 +131,7 @@ context.MailHost.send(msg,mto,mfro,subject)\n ...@@ -131,6 +131,7 @@ context.MailHost.send(msg,mto,mfro,subject)\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>pref</string> <string>pref</string>
<string>None</string>
<string>len</string> <string>len</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>subjecttpl</string> <string>subjecttpl</string>
......
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