Changeset 952
- Timestamp:
- 12/19/06 20:54:25 (2 years ago)
- Files:
-
- branches/wheeljack/lib/MT/Asset/Image.pm (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/wheeljack/lib/MT/Asset/Image.pm
r940 r952 124 124 } 125 125 126 my $dimensions = sprintf('width="%s" height="%s"', ($thumb 127 ? ($thumb->image_width, $thumb->image_height) 128 : ($asset->image_width, $asset->image_height))); 129 126 130 if ($param->{popup}) { 127 my $dimensions = '';128 if ($thumb->image_width && $thumb->image_height) {129 $dimensions = sprintf('width="%s" height="%s"',130 $thumb->image_width, $thumb->image_height);131 }132 131 my $link = $thumb 133 132 ? sprintf('<img src="%s" %s alt="%s" />', … … 147 146 ? 'class="display_img_' . $param->{align} . '" ' : ''; 148 147 if ($param->{thumb}) { 149 my $dimensions = '';150 if ($thumb->image_width && $thumb->image_height) {151 $dimensions = sprintf('width="%s" height="%s"',152 $thumb->image_width, $thumb->image_height);153 }154 148 $text = sprintf( 155 149 '<a href="%s"><img alt="%s" src="%s" %s %s/></a>', … … 160 154 ); 161 155 } else { 162 my $dimensions = '';163 if ($asset->image_width && $asset->image_height) {164 $dimensions = sprintf('width="%s" height="%s"',165 $asset->image_width, $asset->image_height);166 }167 156 $text = sprintf( 168 157 '<img alt="%s" src="%s" %s %s/>', … … 173 162 } 174 163 } else { 175 $text = sprintf( 176 '<a href="%s">' . MT->translate('Download file') . '</a>', 164 $text = sprintf('<a href="%s">%s</a>', 177 165 MT::Util::encode_html($asset->url), 166 MT->translate('Download file'), 178 167 ); 179 168 }
