Index: branches/1.1dev/lib/Upload.inc.php
===================================================================
--- branches/1.1dev/lib/Upload.inc.php	(revision 646)
+++ branches/1.1dev/lib/Upload.inc.php	(revision 648)
@@ -1,5 +1,5 @@
 <?php
 /**
- * Upload.inc.php 
+ * Upload.inc.php
  * Code by Strangecode :: www.strangecode.com :: This document contains copyrighted information
  */
@@ -16,8 +16,8 @@
 
 class Upload {
-    
+
     // Display error messages to the user?
     var $display_messages = true;
-    
+
     // Existing files with the same name will be overwritten?
     var $allow_overwriting = false;
@@ -28,12 +28,12 @@
     // Array of files with errors.
     var $errors = array();
-    
+
     // Array of acceptable file extensions (lowercase).
     var $valid_file_extensions = array('jpg', 'jpeg', 'gif', 'png', 'pdf', 'txt', 'text', 'html', 'htm');
-    
-    // The uploaded files will be owned by user 'apache'. Set world-read/write 
+
+    // The uploaded files will be owned by user 'apache'. Set world-read/write
     // if the website admin needs to read/delete these files.
     var $dest_file_perms = 0600;
-    
+
     // Array of file extensions and corresponding mime-types.
     var $mime_extension_map = array(
@@ -221,5 +221,5 @@
     {
         $path = realpath($path);
-        
+
         if (!is_dir($path)) {
             logMsg(sprintf('Upload directory invalid: %s', $path), LOG_ERR, __FILE__, __LINE__);
@@ -228,5 +228,5 @@
             logMsg(sprintf('Upload directory not writable: %s', $path), LOG_ERR, __FILE__, __LINE__);
         }
-        
+
         // Set the default upload path, stripping any extra slashes if needed.
         $this->upload_directory_path = preg_replace('!/+$!', '', $path);
@@ -246,5 +246,5 @@
             return false;
         }
-        
+
         if (!isset($_FILES[$form_name])) {
             logMsg(sprintf(_("Form element %s not posted."), $form_name), LOG_ERR, __FILE__, __LINE__);
@@ -254,5 +254,5 @@
             return false;
         }
-        
+
         if (is_array($_FILES[$form_name]['name'])) {
             $files = $_FILES[$form_name];
@@ -269,7 +269,7 @@
 
         // To keep this script running even if user tries to stop browser.
-        ignore_user_abort(true); 
-        if (!ini_get('safe_mode')) { 
-            set_time_limit(300); 
+        ignore_user_abort(true);
+        if (!ini_get('safe_mode')) {
+            set_time_limit(300);
         }
 
@@ -284,5 +284,5 @@
                 continue;
             }
-            
+
             // Check The php upload error messages.
             if (UPLOAD_ERR_INI_SIZE === $files['error'][$i]) {
@@ -326,5 +326,5 @@
                 continue;
             }
-            
+
             // Check to be sure it's an uploaded file.
             if (!is_uploaded_file($files['tmp_name'][$i])) {
@@ -336,5 +336,5 @@
                 continue;
             }
-            
+
             // Check to be sure the file is not empty.
             if ($files['size'][$i] < 1) {
@@ -346,5 +346,5 @@
                 continue;
             }
-            
+
             // Check to be sure the file has a valid file extension.
             if (!in_array(strtolower($this->getFilenameExtension($files['name'][$i])), $this->valid_file_extensions)) {
@@ -356,5 +356,5 @@
                 continue;
             }
-            
+
             // Check to be sure the file has a unique file name.
             if (!$this->allow_overwriting && $this->exists($files['name'][$i])) {
@@ -366,5 +366,5 @@
                 continue;
             }
-            
+
             // Determine file name.
             if ($num == 1) {
@@ -413,5 +413,5 @@
             // Clean the file name of bad characters.
             $file_name = $this->cleanFileName($file_name);
-            
+
             // If the file name has no extension, use the mime-type extension.
             if (!preg_match('/\.[^.]{1,5}$/', $file_name) && function_exists('mime_content_type')) {
@@ -420,8 +420,8 @@
                 }
             }
-            
+
             // Set the path and file name.
             $file_path_name = $this->upload_directory_path . '/' . $file_name;
-            
+
             // Move the file to the final place.
             if (move_uploaded_file($files['tmp_name'][$i], $file_path_name)) {
@@ -456,5 +456,5 @@
         return (sizeof($new_file_names) > 0) ? $new_file_names : false;
     }
-    
+
     /**
      *
@@ -467,5 +467,5 @@
             return false;
         }
-        
+
         $file_path_name = $this->upload_directory_path . '/' . $file_name;
 
@@ -483,5 +483,5 @@
         }
     }
-    
+
     /**
      *
@@ -494,5 +494,5 @@
             return false;
         }
-        
+
         $old_file_path_name = $this->upload_directory_path . '/' . $old_name;
         $new_file_path_name = $this->upload_directory_path . '/' . $new_name;
@@ -513,5 +513,5 @@
         }
     }
-    
+
     /**
      *
@@ -524,5 +524,5 @@
             return false;
         }
-        
+
         return file_exists($this->upload_directory_path . '/' . $file_name);
     }
