[pLog-svn] r6950 - plog/branches/lifetype-1.2/class/gallery/dao
jondaley at devel.lifetype.net
jondaley at devel.lifetype.net
Thu Jan 7 10:31:37 EST 2010
Author: jondaley
Date: 2010-01-07 10:31:36 -0500 (Thu, 07 Jan 2010)
New Revision: 6950
Modified:
plog/branches/lifetype-1.2/class/gallery/dao/galleryresources.class.php
Log:
do the right thing when the image exif data isn't set. fixes #1616 (I think)
Modified: plog/branches/lifetype-1.2/class/gallery/dao/galleryresources.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/gallery/dao/galleryresources.class.php 2010-01-06 20:50:57 UTC (rev 6949)
+++ plog/branches/lifetype-1.2/class/gallery/dao/galleryresources.class.php 2010-01-07 15:31:36 UTC (rev 6950)
@@ -490,12 +490,14 @@
$config =& Config::getConfig();
$imgWidth = $info["video"]["resolution_x"];
- $imgHeight = $info["video"]["resolution_y"];
-
+ $imgHeight = $info["video"]["resolution_y"];
+
$previewHeight = $config->getValue( "thumbnail_height", GALLERY_DEFAULT_THUMBNAIL_HEIGHT );
$previewWidth = $config->getValue( "thumbnail_width", GALLERY_DEFAULT_THUMBNAIL_WIDTH );
- $thumbHeight = ( $imgHeight > $previewHeight ? $previewHeight : $imgHeight );
- $thumbWidth = ( $imgWidth > $previewWidth ? $previewWidth : $imgWidth );
+ $thumbHeight = ((!$imgHeight || ($imgHeight > $previewHeight)) ?
+ $previewHeight : $imgHeight);
+ $thumbWidth = ((!$imgWidth || ($imgWidth > $previewWidth)) ?
+ $previewWidth : $imgWidth);
GalleryThumbnailGenerator::generateResourceThumbnail( $resFile, $resourceId, $ownerId, $thumbHeight, $thumbWidth );
$medPreviewHeight = $config->getValue( "medium_size_thumbnail_height", GALLERY_DEFAULT_MEDIUM_SIZE_THUMBNAIL_HEIGHT );
More information about the pLog-svn
mailing list