[Erp5-report] r39066 ivan - in /erp5/trunk/bt5/erp5_dms: SkinTemplateItem/portal_skins/erp5...

nobody at svn.erp5.org nobody at svn.erp5.org
Tue Oct 12 17:52:05 CEST 2010


Author: ivan
Date: Tue Oct 12 17:52:04 2010
New Revision: 39066

URL: http://svn.erp5.org?rev=39066&view=rev
Log:
We do not have any data so we can allow conversion to proceed and lead to a different conversion error rather than raise Unautorized.

Modified:
    erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/PDF_checkConversionFormatPermission.xml
    erp5/trunk/bt5/erp5_dms/bt/revision

Modified: erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/PDF_checkConversionFormatPermission.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/PDF_checkConversionFormatPermission.xml?rev=39066&r1=39065&r2=39066&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/PDF_checkConversionFormatPermission.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/SkinTemplateItem/portal_skins/erp5_dms/PDF_checkConversionFormatPermission.xml [utf8] Tue Oct 12 17:52:04 2010
@@ -2,10 +2,7 @@
 <ZopeData>
   <record id="1" aka="AAAAAAAAAAE=">
     <pickle>
-      <tuple>
-        <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
-        <tuple/>
-      </tuple>
+      <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
     </pickle>
     <pickle>
       <dictionary>
@@ -58,6 +55,11 @@
 from Products.ERP5.Document.Document import VALID_IMAGE_FORMAT_LIST\n
 \n
 if format in VALID_IMAGE_FORMAT_LIST:\n
+  # we do not have any data so we can allow conversion to proceed and lead to a \n
+  # different conversion errorrather than raise Unautorized\n
+  if not context.hasData():\n
+    return True\n
+\n
   # Check if PDF size is not too large for conversion tool\n
   content_information = context.getContentInformation()\n
   size = content_information.get(\'Page size\')\n
@@ -123,6 +125,7 @@ return True\n
                             <string>VALID_IMAGE_FORMAT_LIST</string>
                             <string>_getattr_</string>
                             <string>context</string>
+                            <string>True</string>
                             <string>content_information</string>
                             <string>size</string>
                             <string>False</string>
@@ -131,7 +134,6 @@ return True\n
                             <string>width</string>
                             <string>height</string>
                             <string>maximum_surface</string>
-                            <string>True</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_dms/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_dms/bt/revision?rev=39066&r1=39065&r2=39066&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_dms/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_dms/bt/revision [utf8] Tue Oct 12 17:52:04 2010
@@ -1 +1 @@
-1185
\ No newline at end of file
+1186
\ No newline at end of file




More information about the Erp5-report mailing list