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
\n
# create content\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
return ob\n
</string> </value>
......
......@@ -69,9 +69,9 @@
<item>
<key> <string>_body</string> </key>
<value> <string>pref=context.portal_preferences.getPreferredDmsIngestEmailNotification()\n
if len(pref)==0:return\n
pref=pref[0]\n
if pref==\'never\':return\n
if pref is not None and len(pref)==0:\n
pref=pref[0]\n
if pref==\'never\':return\n
\n
subjecttpl=\'ingested %(name)s\'\n
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
"""\n
ob=kw[\'object\']\n
subject=subjecttpl % {\'name\':ob.getOriginalFilename()}\n
msg=msgtpl % {\'url\':ob.absolute_url(),\'name\':ob.getOriginalFilename()}\n
subject=subjecttpl % {\'name\':ob.getSourceReference()}\n
msg=msgtpl % {\'url\':ob.absolute_url(),\'name\':ob.getSourceReference()}\n
mto=kw[\'address\']\n
mfro=\'dms@dms.nexedi.com\'\n
\n
......@@ -131,6 +131,7 @@ context.MailHost.send(msg,mto,mfro,subject)\n
<string>_getattr_</string>
<string>context</string>
<string>pref</string>
<string>None</string>
<string>len</string>
<string>_getitem_</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