--- /home/user01/uploadpath/uploadpath.admin.inc	2008-09-08 13:50:02.000000000 +0530
+++ ./uploadpath.admin.inc	2008-12-12 13:54:07.000000000 +0530
@@ -7,10 +7,24 @@
   $form['uploadpath_prefix'] = array(
     '#type' => 'textfield',
     '#title' => t('Default pattern for the file path prefix'),
-    '#description' => t('Specify the pattern to prefix to file names uploaded with the upload module.  It will be appended after the site files directory (e.g., files) but before the file name itself.  Do not include a leading or trailing slash.  Spaces will be converted to underscores to avoid file system issues.'),
+    '#description' => t('Specify the pattern for the directories to which the uploaded file names are placed with the upload module.  It will be appended after the site files directory (e.g., files) but before the file name itself.  Do not include a leading or trailing slash.  Spaces will be converted to underscores to avoid file system issues.'),
     '#default_value' => variable_get('uploadpath_prefix', '[type]/[yyyy]/[mm]'),
     '#weight' => -9
   );
+
+  /**
+   * Added by Zyxware to control file naming also
+   */
+  
+  $form['uploadfiles_pattern'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Default pattern for the file name, Leave blank for keeping original file names'),
+    '#description' => t('Specify the pattern for renaming file names uploaded with the upload module. Do not include a leading or trailing slash.  Spaces will be converted to underscores to avoid file system issues. <span style="color:red">This setting should not be used along with Clean File names</span>'),
+    '#default_value' => variable_get('uploadfiles_pattern', ''),
+    '#weight' => -9
+  );
+  
+  //Addition Ends
   
   $form['misc'] = array(
     '#title' => t('Miscellaneous'),
@@ -47,6 +61,20 @@
     '#description' => t('Patterns for node types. If empty, the default pattern will be used.'),
     '#weight' => -7
   );
+  
+  /**
+   * Added by Zyxware to control file naming also
+   */
+  $form['file_names'] = array(
+    '#title' => t('Patterns for each file uploaded'),
+    '#type' => 'fieldset',
+    '#collapsible' => TRUE,
+    '#collapsed' => TRUE,
+    '#description' => t('Patterns for file names. If empty, the default pattern will be used.'),
+    '#weight' => -7
+  );
+
+  //Addition ends
   
   $form['token_help'] = array(
     '#title' => t('Replacement patterns'),
@@ -83,7 +111,18 @@
       '#title' => t('Path pattern for '.$type->name),
       '#description' => t('Specify the path pattern to prefix for '.$type->name.' type nodes'),
       '#default_value' => variable_get('uploadpath_prefix_'.$type->type, ''),  	
-      );
+      );
+      
+      /**
+       * Added by Zyxware to control file naming also
+       */
+      $form['file_names']['uploadfiles_pattern_'.$type->type] = array(
+      '#type' => 'textfield',
+      '#title' => t('File name pattern for '.$type->name),
+      '#description' => t('Specify the file name pattern to prefix for '.$type->name.' type nodes'),
+      '#default_value' => variable_get('uploadfiles_pattern_'.$type->type, ''),   
+      );
+      //Addition Ends
     }
   }
   return system_settings_form($form);
