Changeset 16281
- Timestamp:
- 03/12/09 21:01:07 (4 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
plugins/pkPersistentFileUploadPlugin/trunk/lib/widget/pkWidgetFormInputFilePersistent.class.php
r16153 r16281 75 75 pkValidatorFilePersistent::removeOldFiles($dir); 76 76 $imagePreview = $this->getOption('image-preview'); 77 $width = $imagePreview['width'] + 0; 78 $height = $imagePreview['height'] + 0; 77 $width = $imagePreview['width']; 78 $height = $imagePreview['height']; 79 if ($height === false) 80 { 81 list($iwidth, $iheight) = getimagesize($info['tmp_name']); 82 if ($iheight && $iwidth) 83 { 84 $height = $width * ($iheight / $iwidth); 85 } 86 } 79 87 $resizeType = $imagePreview['resizeType']; 80 88 if (!in_array($resizeType, array('c', 's'))) … … 104 112 $info['tmp_name'], 105 113 $output, 106 $ imagePreview['width'],107 $ imagePreview['height']);114 $width, 115 $height); 108 116 } 109 117 $result .= "<img src='$url' />";