[pLog-svn] r5553 - plog/branches/lifetype-1.2/class/gallery/dao

oscar at devel.lifetype.net oscar at devel.lifetype.net
Mon Jun 18 15:30:20 EDT 2007


Author: oscar
Date: 2007-06-18 15:30:19 -0400 (Mon, 18 Jun 2007)
New Revision: 5553

Modified:
   plog/branches/lifetype-1.2/class/gallery/dao/galleryresource.class.php
Log:
Fix for issue http://bugs.lifetype.net/view.php?id=1343, related to images with upper case extensions and different thumbnail format than the original image.

Modified: plog/branches/lifetype-1.2/class/gallery/dao/galleryresource.class.php
===================================================================
--- plog/branches/lifetype-1.2/class/gallery/dao/galleryresource.class.php	2007-06-16 09:30:03 UTC (rev 5552)
+++ plog/branches/lifetype-1.2/class/gallery/dao/galleryresource.class.php	2007-06-18 19:30:19 UTC (rev 5553)
@@ -381,7 +381,7 @@
 		 * @return the path to the small preview file
 		 */
 		function getPreviewFileName()
-		{
+		{			
     		lt_include( PLOG_CLASS_PATH."class/gallery/dao/galleryresourcestorage.class.php" );	
 
 			$config =& Config::getConfig();
@@ -395,8 +395,9 @@
 			// change the file extension, if the thumbnail output format is different from the original file
 			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
 				$previewFile = $fileName;
-			else
-				$previewFile = str_replace( ".".$this->getFileExtension(), ".".$this->getThumbnailFormat(), $fileName );
+			else {
+				$previewFile = str_replace( ".".strtolower($this->getFileExtension()), ".".strtolower($this->getThumbnailFormat()), $fileName );
+			}
 
 			return $previewFile;
 		}
@@ -441,7 +442,7 @@
 			if( $this->getThumbnailFormat() == THUMBNAIL_OUTPUT_FORMAT_SAME_AS_IMAGE )
 				$previewFile = $fileName;
 			else
-				$previewFile = str_replace( ".".$this->getFileExtension(), ".".$this->getThumbnailFormat(), $fileName );
+				$previewFile = str_replace( ".".strtolower($this->getFileExtension()), ".".strtolower($this->getThumbnailFormat()), $fileName );
 
 			return $previewFile;
 		}



More information about the pLog-svn mailing list