[Zope-Checkins] CVS: Zope/lib/python/OFS/dtml - imageEdit.dtml:1.8

Brian Lloyd brian@digicool.com
Wed, 17 Oct 2001 11:15:00 -0400


Update of /cvs-repository/Zope/lib/python/OFS/dtml
In directory cvs.zope.org:/tmp/cvs-serv1744

Modified Files:
	imageEdit.dtml 
Log Message:
Fixed Image edit form to handle really old images with string height and 
width properties.


=== Zope/lib/python/OFS/dtml/imageEdit.dtml 1.7 => 1.8 ===
   </td>
   <td align="left" valign="top">
-    <dtml-if "height < 250">
-    <dtml-var tag>
-    <dtml-else>
+    <dtml-if "_.same_type(height, 1) and height and height > 250">
     <dtml-var "tag(scale=250.0 / height)">
+    <dtml-elif "_.same_type(height, 's') and height and _.int(height) > 250">
+    <dtml-var "tag(scale=250.0 / _.int(height))">
+    <dtml-else>
+    <dtml-var tag>
     </dtml-if>
   </td>
 </tr>