[pLog-svn] r2034 - plog/branches/plog-1.0.1/class/gallery/resizers

jondaley at devel.plogworld.net jondaley at devel.plogworld.net
Fri May 20 14:21:21 GMT 2005


Author: jondaley
Date: 2005-05-20 14:21:21 +0000 (Fri, 20 May 2005)
New Revision: 2034

Modified:
   plog/branches/plog-1.0.1/class/gallery/resizers/galleryimagemagickresizer.class.php
Log:
check return value correctly.  Doesn't really matter, as this result is ignored by the caller.  replaced tabs with spaces, so it looks like I changed a lot.  I get paid by the number of lines changed.  http://www.plogworld.net/forums/viewtopic.php?t=2441

Modified: plog/branches/plog-1.0.1/class/gallery/resizers/galleryimagemagickresizer.class.php
===================================================================
--- plog/branches/plog-1.0.1/class/gallery/resizers/galleryimagemagickresizer.class.php	2005-05-20 11:01:15 UTC (rev 2033)
+++ plog/branches/plog-1.0.1/class/gallery/resizers/galleryimagemagickresizer.class.php	2005-05-20 14:21:21 UTC (rev 2034)
@@ -31,17 +31,15 @@
         function generate( $outFile, $width, $height )
         {
         	// get the path to the convert tool
-        	$config =& Config::getConfig();
-        	$convertPath = $config->getValue( "path_to_convert", DEFAULT_PATH_TO_CONVERT );
-
-            // run the command
-        	$command = $convertPath." -geometry ".$width."x".$height." ".$this->_image." ".$outFile;
-        	$cmdOuput = system($command, $retval);
-
-            // check if there was an error creating the thubmnail
-            if( !$retval )
+            $config =& Config::getConfig();
+            $convertPath = $config->getValue( "path_to_convert", DEFAULT_PATH_TO_CONVERT );
+                // run the command
+            $command = $convertPath." -geometry ".$width."x".$height." ".$this->_image." ".$outFile;
+            $cmdOuput = system($command, $retval);
+            
+                // check if there was an error creating the thubmnail
+            if($cmdOutput === FALSE || $retval )
             	return false;
-
             return $outFile;
         }
     }




More information about the pLog-svn mailing list