Index: imagefield_import.module
===================================================================
--- imagefield_import.module	(revision 4)
+++ imagefield_import.module	(working copy)
@@ -8,16 +8,16 @@
 
 /**
  * Implementation of hook_help().
- * 
+ *
  * hook_help provides data for the $help on a page to help out the user
- * 
+ *
  */
 function imagefield_import_help($section) {
   switch ($section) {
     case 'admin/content/imagefield_import':
       return '<p>'. t('This is where the Import Magic happens.  If there are images currently in the Directory you set up for import you will see them in the list below.  You can customize the Title and body text of each of the nodes before submitting them all for creation.  Do not forget to click the checkbox on the left that indicates you want to import this image into an imagefield node, or click the top checkbox to select or deslect all.') .'</p>';
     case 'admin/settings/imagefield_import':
-  return '<p>'. t('The Imagefield Import Path is where you want to transfer -likely FTP or SSH- your images that are in need of uploading, then select the targe field.  You will be creating one node for each image.  So here you are choosing what field you want your imported image to populate') .'</p>';  
+  return '<p>'. t('The Imagefield Import Path is where you want to transfer -likely FTP or SSH- your images that are in need of uploading, then select the targe field.  You will be creating one node for each image.  So here you are choosing what field you want your imported image to populate') .'</p>';
   }
 }
 
@@ -65,11 +65,11 @@
 // Create the imagefield_import_form that was defined in callback arguments in the Implementation of hook_menu().
 function imagefield_import_form() {
   $form = array();
-  
+
   //get the content type and field names
   $targetsetting = variable_get('imagefield_import_fieldname', FALSE);
   list($type, $field) = split(":::", $targetsetting);
-  
+
   // Getting the path the user set as in import folder
   $dirpath = variable_get('imagefield_import_path', '');
   // Check it's configuration out and throw a DSM if it isn't configured properly
@@ -159,7 +159,7 @@
      $form['conf_message'] = array(
       '#type'  => 'item',
       '#value' => t("Will import images into content type <b>'$type'</b>, field <b>'$field'</b>. To configure this visit the !settings page.", array('!settings' => l("Imagefield import settings", "admin/settings/imagefield_import"))),
-     ); 
+     );
   }
   else {
     $form['import_file'] = array(
@@ -175,7 +175,7 @@
   $output =  "";
   if (isset($form['conf_message']))
     $output .= drupal_render($form['conf_message']);
-  	
+
   if (isset($form['import_file']) && $form['import_file']['#type'] == 'checkboxes') {
     $header = array(theme('table_select_header_cell'), t('Name'), t('Size'), t('Dimensions'), t('Title'), t('Body'));
     $rows = array();
@@ -256,12 +256,12 @@
     '#description' => t("The directory to import image nodes from. Drupal will need to have write access to this directory so we can move and remove the file.") .'<br />'. t("<br /><strong>Note:</strong> a path begining with a <kbd>/</kbd> indicates the path is relative to the server's root, not the website's root. One starting without a <kbd>/</kbd> specifies a path relative to Drupal's root. For example: <kbd>/tmp/image</kbd> would be the temp directory off the root of the <strong>server</strong> while <kbd>tmp/image</kbd> would be a path relative to the Drupal's directory."),
     '#required' => TRUE,
   );
-  
+
   //examine the node types they have available and find ones that have an imagefield associated with them
   $types = content_types();
   $matches = array();
   $keys = array();
-  
+
   foreach ($types as $key => $type) {
     foreach ($type['fields'] as $field) {
       if ($field['type']="image") {
@@ -270,7 +270,7 @@
       }
     }
   }
-  
+
   if (count($matches) == 0 ) {
     drupal_set_message("In order to import images into an imagefield, you must first have a node type that has an imagefield associated with it. "."Configure this on the ". l('Content Types', 'admin/content/types') .' Page', 'error');
   }
@@ -290,7 +290,7 @@
       '#default_value' => variable_get('imagefield_import_fieldname', $keys[0]),
       '#required' => TRUE
     );
-  } 
+  }
   return system_settings_form($form);
 }
 
@@ -330,7 +330,7 @@
  */
 function imagefield_create_node_from($filepath, $title = NULL, $body = '', $taxonomy = NULL) {
   global $user;
-  if (!user_access('Import Images to Imagefields')) {
+  if (!user_access('import images')) {
     drupal_access_denied();
   }
   // Ensure it's a valid image.
