Index: trunk/lib/ImageThumb.inc.php
===================================================================
--- trunk/lib/ImageThumb.inc.php	(revision 154)
+++ trunk/lib/ImageThumb.inc.php	(revision 199)
@@ -36,5 +36,5 @@
         'dest_dir_perms' => 0700,
 
-        // Require file to have one of the following file name extentions.
+        // Require file to have one of the following file name extensions.
         'valid_file_extensions' => array('jpg', 'jpeg', 'gif', 'png'),
         
@@ -61,5 +61,5 @@
 
         // Destination file types. ('jpg', 'png', 'gif', 'wbmp')
-        'dest_file_extention' => 'jpg',
+        'dest_file_extension' => 'jpg',
         
         // Type of scaling to perform, and sizes used to calculate max dimentions.
@@ -174,5 +174,5 @@
                     $app->logMsg(sprintf('IMG_JPG is not supported by this version of PHP GD.', null), LOG_ERR, __FILE__, __LINE__);
                 }
-                $spec['dest_file_extention'] = 'jpg';
+                $spec['dest_file_extension'] = 'jpg';
                 break;
             case IMG_PNG :
@@ -180,5 +180,5 @@
                     $app->logMsg(sprintf('IMG_PNG is not supported by this version of PHP GD.', null), LOG_ERR, __FILE__, __LINE__);
                 }
-                $spec['dest_file_extention'] = 'png';
+                $spec['dest_file_extension'] = 'png';
                 break;
             case IMG_GIF :
@@ -186,5 +186,5 @@
                     $app->logMsg(sprintf('IMG_GIF is not supported by this version of PHP GD.', null), LOG_ERR, __FILE__, __LINE__);
                 }
-                $spec['dest_file_extention'] = 'gif';
+                $spec['dest_file_extension'] = 'gif';
                 break;
             case IMG_WBMP :
@@ -192,5 +192,5 @@
                     $app->logMsg(sprintf('IMG_WBMP is not supported by this version of PHP GD.', null), LOG_ERR, __FILE__, __LINE__);
                 }
-                $spec['dest_file_extention'] = 'wbmp';
+                $spec['dest_file_extension'] = 'wbmp';
                 break;
             default :
@@ -269,5 +269,5 @@
      *
      * @access  public
-     * @param   string $file_name Name of file with extention.
+     * @param   string $file_name Name of file with extension.
      * @param   array $runtime_specs Array of specifications that will override all configured specifications.
      * @return  bool true on success, false on failure.
@@ -298,5 +298,5 @@
         // Confirm source image exists.
         if (!file_exists($source_file)) {
-            $this->_raiseMsg(sprintf(_("Image resizing failed: source image %s was not found."), $file_name), MSG_ERR, __FILE__, __LINE__);
+            $this->_raiseMsg(sprintf(_("Image resizing failed: source image <em>%s</em> was not found."), $file_name), MSG_ERR, __FILE__, __LINE__);
             $app->logMsg(sprintf('Source image not found: %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
             return false;
@@ -305,5 +305,5 @@
         // Confirm source image is readable.
         if (!is_readable($source_file)) {
-            $this->_raiseMsg(sprintf(_("Image resizing failed: source image %s is not readable."), $file_name), MSG_ERR, __FILE__, __LINE__);
+            $this->_raiseMsg(sprintf(_("Image resizing failed: source image <em>%s</em> is not readable."), $file_name), MSG_ERR, __FILE__, __LINE__);
             $app->logMsg(sprintf('Source image not readable: %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
             return false;
@@ -312,5 +312,5 @@
         // Confirm source image contains data.
         if (filesize($source_file) <= 0) {
-            $this->_raiseMsg(sprintf(_("Image resizing failed: source image %s is zero bytes."), $file_name), MSG_ERR, __FILE__, __LINE__);
+            $this->_raiseMsg(sprintf(_("Image resizing failed: source image <em>%s</em> is zero bytes."), $file_name), MSG_ERR, __FILE__, __LINE__);
             $app->logMsg(sprintf('Source image is zero bytes: %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
             return false;
@@ -319,5 +319,5 @@
         // Confirm source image has a valid file extension.
         if (!$this->_validFileExtension($file_name)) {
-            $this->_raiseMsg(sprintf(_("Image resizing failed: source image %s not a valid type. It must have one of the following file name extensions: %s"), $file_name, join(', ', $this->getParam('valid_file_extensions'))), MSG_ERR, __FILE__, __LINE__);
+            $this->_raiseMsg(sprintf(_("Image resizing failed: source image <em>%s</em> not a valid type. It must have one of the following file name extensions: %s"), $file_name, join(', ', $this->getParam('valid_file_extensions'))), MSG_ERR, __FILE__, __LINE__);
             $app->logMsg(sprintf('Image resizing failed: source image not of valid type: %s', $source_file), LOG_WARNING, __FILE__, __LINE__);
             return false;
@@ -344,11 +344,11 @@
             }
             
-            // Destination filename uses the extention defined by dest_file_extention.
+            // Destination filename uses the extension defined by dest_file_extension.
             if ('/' == $spec['dest_dir']{0}) {
                 // Absolute path.
-                $dest_file = sprintf('%s/%s.%s', $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extention']);
+                $dest_file = sprintf('%s/%s.%s', $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extension']);
             } else {
                 // Relative path.
-                $dest_file = sprintf('%s/%s/%s.%s', $this->getParam('source_dir'), $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extention']);
+                $dest_file = sprintf('%s/%s/%s.%s', $this->getParam('source_dir'), $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extension']);
             }
                  
@@ -440,5 +440,5 @@
 
         // Format the command that creates the thumbnail.
-        $command = sprintf('%s %s | %s %s | %s %s > %s/%s',
+        $command = sprintf('%s %s | %s %s | %s %s > %s',
             escapeshellcmd($this->getParam('anytopnm_binary')),
             escapeshellcmd($source_file),
@@ -447,6 +447,5 @@
             escapeshellcmd($this->getParam('cjpeg_binary')),
             escapeshellcmd($cjpeg_args),
-            escapeshellcmd($dest_file),
-            escapeshellcmd($file_name)
+            escapeshellcmd($dest_file)
         );
         $app->logMsg(sprintf('ImageThumb Netpbm command: %s', $command), LOG_DEBUG, __FILE__, __LINE__);
@@ -609,5 +608,5 @@
      *
      * @access  public
-     * @param   string $file_name The file name to delete, with extention.
+     * @param   string $file_name The file name to delete, with extension.
      * @return  bool true on success, false on failure.
      */
@@ -626,8 +625,8 @@
             if ('/' == $spec['dest_dir']{0}) {
                 // Absolute path.
-                $dest_file = realpath(sprintf('%s/%s.%s', $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extention']));                
+                $dest_file = realpath(sprintf('%s/%s.%s', $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extension']));                
             } else {
                 // Relative path.
-                $dest_file = realpath(sprintf('%s/%s/%s.%s', $this->getParam('source_dir'), $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extention']));
+                $dest_file = realpath(sprintf('%s/%s/%s.%s', $this->getParam('source_dir'), $spec['dest_dir'], substr($file_name, 0, strrpos($file_name, '.')), $spec['dest_file_extension']));
             }
             if (file_exists($dest_file)) {
@@ -638,5 +637,5 @@
             }
         }
-        $this->_raiseMsg(sprintf(_("The thumbnails for file %s have been deleted."), $file_name), MSG_SUCCESS, __FILE__, __LINE__);
+        $app->logMsg(sprintf('THumbnails successfully deleted for file: %s', $file_name), LOG_DEBUG, __FILE__, __LINE__);
         return 0 === $return_val;
     }
@@ -646,5 +645,5 @@
      *
      * @access  public
-     * @param   string $file_name The file name to delete, with extention.
+     * @param   string $file_name The file name to delete, with extension.
      * @return  bool true on success, false on failure.
      */
@@ -664,5 +663,5 @@
             return false;
         }
-        $this->_raiseMsg(sprintf(_("The original file %s has been deleted."), $file_name), MSG_SUCCESS, __FILE__, __LINE__);
+        $app->logMsg(sprintf('Original file successfully deleted: %s', $file_name), LOG_DEBUG, __FILE__, __LINE__);
         return true;
     }
@@ -672,5 +671,5 @@
      *
      * @access  public
-     * @param   string $file_name The file name to test, with extention.
+     * @param   string $file_name The file name to test, with extension.
      * @return  bool true on success, false on failure.
      */
@@ -690,5 +689,5 @@
 
     /**
-     * Tests if extention of $file_name is in the array valid_file_extensions.
+     * Tests if extension of $file_name is in the array valid_file_extensions.
      *
      * @access  public
