diff -up imagefield_import/imagefield_import.info /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.info
--- imagefield_import/imagefield_import.info	2008-07-28 16:05:15.000000000 -0600
+++ /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.info	2008-10-14 11:07:18.000000000 -0600
@@ -2,7 +2,9 @@
 name = Imagefield Import
 description = Allows batches of images to be imported from a directory on the server.
 package = CCK
-dependencies = imagefield content
+dependencies[] = imagefield
+dependencies[] = content
+core = 6.x
 
 
 
diff -up imagefield_import/imagefield_import.install /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.install
--- imagefield_import/imagefield_import.install	2008-05-16 10:25:11.000000000 -0600
+++ /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.install	2008-10-14 14:00:01.000000000 -0600
@@ -1,6 +1,12 @@
 <?php
 // $Id: imagefield_import.install,v 1.3 2008/05/16 16:25:11 vordude Exp $
 
+/**
+ * @file
+ * Imagefield Import Install
+ * Cleans up variables after itself
+ */
 function imagefield_import_uninstall() {
   variable_del('imagefield_import_path');
+  variable_del('imagefield_import_fieldname');
 }
diff -up imagefield_import/imagefield_import.module /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.module
--- imagefield_import/imagefield_import.module	2008-07-28 15:28:38.000000000 -0600
+++ /var/www/drupal6/drupal-6.5/sites/all/modules/imagefield_import/imagefield_import.module	2008-10-14 13:53:23.000000000 -0600
@@ -2,6 +2,7 @@
 // $Id: imagefield_import.module,v 1.8 2008/07/28 21:28:38 vordude Exp $
 
 /**
+ * @file
  * Imports images (that the user has already uploaded to an import folder) into a CCK field's imagefield.
  * A Big shout out to the image_import.module folks,  Here's is most of your code again.
  */
@@ -12,8 +13,8 @@
  * hook_help provides data for the $help on a page to help out the user
  *
  */
-function imagefield_import_help($section) {
-  switch ($section) {
+function imagefield_import_help($path, $arg) {
+  switch (path) {
     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':
@@ -37,32 +38,27 @@ function imagefield_import_perm() {
  * admin/content/imagefield_import (The Import Page),
  * and admin/settings/imagefield_import  (The Settings Page).
  */
-function imagefield_import_menu($may_cache) {
-  $items = array();
-  if (!$may_cache) {
-    $items[] = array(
-      'path' => 'admin/content/imagefield_import',
-      'title' => t('Imagefield import'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('imagefield_import_form'),
-      'access' => user_access('import images'),
-      'type' => MENU_NORMAL_ITEM,
-      'description' => t('Import images into CCK imagefields from an import folder in filesystem.')
-    );
-    $items[] = array(
-      'path' => 'admin/settings/imagefield_import',
-      'title' => t('Imagefield import'),
-      'callback' => 'drupal_get_form',
-      'callback arguments' => array('imagefield_import_admin_settings'),
-      'access' => user_access('administer site configuration'),
-      'type' => MENU_NORMAL_ITEM,
-      'description' => t('Change settings for the imagefield_import module.')
-    );
-  }
+function imagefield_import_menu() {
+  $items['admin/content/imagefield_import'] = array(
+    'title' => 'Imagefield Import',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('imagefield_import_form', 2),
+    'access arguments' => array('import images'),
+    'type' => MENU_NORMAL_ITEM,
+    'description' => 'Import images into CCK imagefields from an import folder in filesystem.'
+  );
+  $items['admin/settings/imagefield_import'] = array(
+    'title' => 'Imagefield Import',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('imagefield_import_admin_settings', 2),
+    'access arguments' => array('administer site configuration'),
+    'type' => MENU_NORMAL_ITEM,
+    'description' => 'Import images into CCK imagefields from an import folder in filesystem.'
+  );
   return $items;
 }
 
-// Create the imagefield_import_form that was defined in callback arguments in the Implementation of hook_menu().
+// Create the imagefield_import_form that was defined in callback arguments in hook_menu().
 function imagefield_import_form() {
   $form = array();
 
@@ -87,8 +83,8 @@ function imagefield_import_form() {
       $form['type'] = array('#type' => 'value', '#value' => $type);
       $form['#node'] = new stdClass();
       $form['#node']->type = $type;
-      $form_id = $type . '_node_form';
-      taxonomy_form_alter($form_id, $form);
+      $form_id = $type .'_node_form';
+      taxonomy_form_alter(&$form, &$form_state, $form_id);
       unset($form['type']);
       unset($form['#node']);
     }
@@ -153,12 +149,12 @@ function imagefield_import_form() {
       '#type' => 'submit',
       '#value' => t('Import'),
     );
-     $targetsetting = variable_get('imagefield_import_fieldname', FALSE);
-     list($type, $field) = split(":::", $targetsetting);
-     $form['conf_message'] = array(
+    $targetsetting = variable_get('imagefield_import_fieldname', FALSE);
+    list($type, $field) = split(":::", $targetsetting);
+    $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(
@@ -196,8 +192,8 @@ function theme_imagefield_import_form($f
 }
 
 // imagefield_import_form submit handler
-function imagefield_import_form_submit($form_id, $form_values) {
-  $op = isset($form_values['op']) ? $form_values['op'] : '';
+function imagefield_import_form_submit($form, &$form_state) {
+  $op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
   if ($op == t('Import')) {
     if (! variable_get('imagefield_import_fieldname', FALSE) ) {
       drupal_set_message("Could not import images. Please make sure to set Target Field on the ". l("Imagefield Settings", "admin/settings/imagefield_import") ." page.", "error");
@@ -207,19 +203,19 @@ function imagefield_import_form_submit($
     if (file_check_directory($dirpath)) {
       $nodes = array();
       $files = array();
-      foreach (array_filter($form_values['import_file']) as $index) {
+      foreach (array_filter($form_state['values']['import_file']) as $index) {
         // try to avoid php's script timeout with a bunch of large files or a slow machine
         if (!ini_get('safe_mode')) {
           set_time_limit(0);
         }
-        $origname = $form_values['file_list'][$index];
+        $origname = $form_state['values']['file_list'][$index];
         $filename = file_check_location($dirpath .'/'. $origname, $dirpath);
         if ($filename) {
           $node = imagefield_create_node_from(
             $filename,
-            $form_values['title'][$index],
-            $form_values['body'][$index],
-            $form_values['taxonomy']
+            $form_state['values']['title'][$index],
+            $form_state['values']['body'][$index],
+            $form_state['values']['taxonomy']
           );
           if ($node) {
             $nodes[] = t('%filename as <a href="!node-link">@node-title</a> <a href="!edit-link">[edit]</a>', array(
@@ -245,7 +241,7 @@ function imagefield_import_form_submit($
   }
 }
 
-//Create the imagefield_import_admin_settings that was called in callback arguments in the Implementation of hook_menu().
+//Create the imagefield_import_admin_settings that was called in callback arguments in hook_menu().
 function imagefield_import_admin_settings() {
   $form['imagefield_import_path'] = array(
     '#type' => 'textfield',
@@ -357,14 +353,14 @@ function imagefield_create_node_from($fi
   $node->status = in_array('status', $node_options);
   $node->promote = in_array('promote', $node_options);
   if (module_exists('comment')) {
-     $node->comment = variable_get("comment_{$node->type}", COMMENT_NODE_READ_WRITE);
+    $node->comment = variable_get("comment_{$node->type}", COMMENT_NODE_READ_WRITE);
   }
   if (module_exists('taxonomy')) {
-     $node->taxonomy = $taxonomy;
+    $node->taxonomy = $taxonomy;
   }
   $node->new_file = TRUE;
   $node->$field = array(
-     array(
+    array(
       'fid'   => 'upload',
       'title' => basename($filepath),
       'filename' => basename($filepath),
@@ -392,7 +388,7 @@ function _image_filename($filename, $lab
   // Insert the resized name in non-original images
   if ($label && ($label != IMAGE_ORIGINAL)) {
     $pos = strrpos($filename, '.');
-    if ($pos === false) {
+    if ($pos === FALSE) {
       // The file had no extension - which happens in really old image.module
       // versions, so figure out the extension.
       $image_info = image_get_info(file_create_path($path . $filename));
@@ -405,4 +401,14 @@ function _image_filename($filename, $lab
   return file_create_path($path . $filename);
 }
 
+/**
+ * Implementation of hook_theme().
+ */
+function imagefield_import_theme() {
+  return array(
+    'imagefield_import_form' => array(
+      'arguments' => array('form' => NULL),
+    ),
+  );
+}
 
