diff -urp feedapi_mapper_orig/feedapi_mapper.info feedapi_mapper/feedapi_mapper.info
--- feedapi_mapper_orig/feedapi_mapper.info	2008-03-18 01:06:20.000000000 +0100
+++ feedapi_mapper/feedapi_mapper.info	2008-09-07 13:21:07.000000000 +0200
@@ -1,9 +1,6 @@
 name = FeedAPI Mapper
 description = "Maps feed item elements to node fields."
-dependencies = feedapi feedapi_node
+dependencies[] = feedapi_node
+dependencies[] = feedapi
 package = FeedAPI Add On
-; Information added by drupal.org packaging script on 2008-03-18
-version = "5.x-1.x-dev"
-project = "feedapi_mapper"
-datestamp = "1205798780"
-
+core = 6.x
\ No newline at end of file
diff -urp feedapi_mapper_orig/feedapi_mapper.install feedapi_mapper/feedapi_mapper.install
--- feedapi_mapper_orig/feedapi_mapper.install	2008-01-18 22:59:58.000000000 +0100
+++ feedapi_mapper/feedapi_mapper.install	2008-09-07 13:51:30.000000000 +0200
@@ -2,33 +2,37 @@
 // $Id: feedapi_mapper.install,v 1.1 2008/01/18 21:59:58 alexb Exp $
 
 /**
- * Implementaton of hook_install().
+ * Implementation of hook_schema().
+ */
+function feedapi_mapper_schema() {
+  $schema['feedapi_mapper'] = array(
+    'description' => t('Store date for the feedapi mapper'),
+    'fields' => array(
+      'nid' => array(
+        'description' => t('The primary identifier for the feed.'),
+        'type' => 'int',
+        'unsigned' => TRUE,
+        'not null' => TRUE),
+      'mapping' => array(
+        'type' => 'text',
+        'size' => 'big',
+        'not null' => TRUE),
+      ),
+    'primary key' => array('nid'),
+  );
+  return $schema;
+}
+
+/**
+ * Implementation of hook_install().
  */
 function feedapi_mapper_install() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysqli':
-    case 'mysql':
-      db_query("CREATE TABLE {feedapi_mapper} (
-        `nid` INT( 10 ) UNSIGNED NOT NULL ,
-        `mapping` LONGTEXT NOT NULL ,
-        PRIMARY KEY ( `nid` )
-        )"); 
-      break;
-    case 'pgsql':
-      // Todo.
-      break;
-  }
+  drupal_install_schema('feedapi_mapper');
 }
 
 /**
- * Implementaton of hook_uninstall().
+ * Implementation of hook_uninstall().
  */
 function feedapi_mapper_uninstall() {
-  switch ($GLOBALS['db_type']) {
-    case 'mysqli':
-    case 'mysql':
-    case 'pgsql':
-      db_query("DROP TABLE {feedapi_mapper}");
-      break;
-  }
+  drupal_uninstall_schema('feedapi_mapper');
 }
\ No newline at end of file
diff -urp feedapi_mapper_orig/feedapi_mapper.module feedapi_mapper/feedapi_mapper.module
--- feedapi_mapper_orig/feedapi_mapper.module	2008-03-17 17:24:16.000000000 +0100
+++ feedapi_mapper/feedapi_mapper.module	2008-09-07 13:52:39.000000000 +0200
@@ -4,8 +4,8 @@
 /**
  * Implementation of hook_help().
  */
-function feedapi_mapper_help($section) {
-  switch ($section) {
+function feedapi_mapper_help($path, $arg) {
+  switch ($path) {
     case 'admin/help#feedapi_mapper':
       return t('FeedAPI Mapper - maps feed item elements to node fields');
     case 'feedapi_mapper/full_name':
@@ -16,58 +16,57 @@ function feedapi_mapper_help($section) {
 /**
  * Implementation of hook_menu().
  */
-function feedapi_mapper_menu($may_cache) {
+function feedapi_mapper_menu() {
   $items = array();
-  if (!$may_cache) {
-    if (arg(0) == 'node' && is_numeric(arg(1))) {
-      $node = node_load(arg(1));
-      if (feedapi_enabled($node->type)) {
-        global $user;
-        $items[] = array('path' => 'node/'. $node->nid .'/map',
-          'title' => t('Map'),
-          'callback' => 'feedapi_mapper_page',
-          'callback arguments' => array($node),
-          'type' => MENU_LOCAL_TASK,
-          'access' => (user_access('administer feedapi')),
-          );
-      }
-    }
-    else if (arg(0) == 'admin' && arg(1) == 'content' && arg(2) == 'types') {
-      $node_type = arg(3) ? str_replace('-', '_', arg(3)) : NULL;
-      if ($node_type && feedapi_enabled($node_type)) {
-        $items[] = array(
-            'path' => 'admin/content/types/'. str_replace('_', '-', $node_type) .'/edit',
-            'title' => t('Edit'),
-            'callback' => 'drupal_get_form',
-            'callback arguments' => array('node_type_form', $node_type),
-            'type' => MENU_DEFAULT_LOCAL_TASK,
-          );
-        // @todo: this should finally live in a sub tab of "Feed".
-        $node = new stdClass();
-        $node->type = $node_type;
-        $items[] = array('path' => 'admin/content/types/'. str_replace('_', '-', $node_type) .'/map',
-          'title' => t('Map'),
-          'callback' => 'feedapi_mapper_page',
-          'callback arguments' => array($node),
-          'type' => MENU_LOCAL_TASK,
-          'access' => user_access('administer feedapi'),
-          );
-      }
-    }
-  }
+  $items['node/%node/map'] = array(
+    'title' => 'Map',
+    'page callback' => 'feedapi_mapper_page',
+    'page arguments' => array(1),
+    'type' => MENU_LOCAL_TASK,
+    'access callback' => 'user_access',
+    'access arguments' => array('administer feedapi'),
+  );
+  $items['admin/content/node-type/%feedapi_mapper_node_type/edit'] = array(
+    'title' => 'Edit',
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('node_type_form', 3),
+    'type' => MENU_DEFAULT_LOCAL_TASK,
+    'access callback' => 'user_access',
+    'access arguments' => array('administer node types'),
+  );
+  $items['admin/content/node-type/%feedapi_mapper_node_type/map'] = array(
+    'title' => 'Map',
+    'page callback' => 'feedapi_mapper_page',
+    'callback arguments' => array(3),
+    'type' => MENU_LOCAL_TASK,
+    'page callback' => 'user_access',
+    'access arguments' => array('administer feedapi'),
+  );
   return $items;
 }
 
 /**
+ * Implementation of hook_load().
+ */
+function feedapi_mapper_node_type_load($node_type) {
+  if (feedapi_enabled($node_type)) {
+    $node = new stdClass();
+    $node->type = $node_type;
+    return $node;
+  }
+  return FALSE;
+}
+
+/**
  * Implementation of hook_nodeapi().
  */
 function feedapi_mapper_nodeapi(&$node, $op, $teaser, $page) {
   switch ($op) {
   case 'prepare':
-   if ($node->feedapi->feed_item) {
-     _feedapi_mapper_map($node);
-   }
-   break;
+    if ($node->feedapi->feed_item) {
+      _feedapi_mapper_map($node);
+    }
+    break;
   }
 }
 
@@ -125,7 +124,7 @@ function feedapi_mapper_page($node) {
 /**
  * Mapping form.
  */
-function feedapi_mapper_form($node) {
+function feedapi_mapper_form($form_state, $node) {
   // Get fields of node type with available feed element mappers.
   if ($node->feed->settings['processors']['feedapi_node']['content_type']) {
     $settings = $node->feed->settings;
@@ -148,7 +147,7 @@ function feedapi_mapper_form($node) {
   if (!$mapping = _feedapi_mapper_load_mapping($node->nid )) {
     $mapping = _feedapi_mapper_load_mapping($node->type);
   }
-  
+
   if ($merged_item) {
     $form['feed_item'] = array(
       '#type' => 'fieldset',
@@ -156,16 +155,16 @@ function feedapi_mapper_form($node) {
       '#collapsible' => TRUE,
       '#collapsed' => TRUE,
       '#description' => t('All feed items of this feed merged into one. Here you can see which feed item elements are available for mapping. As this view is derived from the actual feed items on this feed, there might be more mappable elements than those listed here.'),
-      );
+    );
     $form['feed_item']['item'] = array(
       '#type' => 'markup',
-      '#value' => '<pre>'. print_r(_feedapi_mapper_truncate_array($merged_item), true) .'</pre>',
-      );
+      '#value' => '<pre>'. print_r(_feedapi_mapper_truncate_array($merged_item), TRUE) .'</pre>',
+    );
   }
   $form['nid'] = array(
     '#type' => 'value',
     '#value' => ($node->nid ? $node->nid: $node->type),
-    );
+  );
   // Pass on feed item elements.
   $form['elements'] = array('#type' => 'value', '#value' => $elements);
   // Print descriptions if there are any.
@@ -177,11 +176,11 @@ function feedapi_mapper_form($node) {
       '#collapsible' => TRUE,
       '#collapsed' => FALSE,
       '#tree' => TRUE,
-      );  
+    );
     $form['descriptions']['descriptions'] = array(
       '#type' => 'markup',
       '#value' => $descriptions,
-      );  
+    );
   }
   // Create mapping form.
   $form['mapping'] = array(
@@ -191,27 +190,27 @@ function feedapi_mapper_form($node) {
     '#collapsible' => TRUE,
     '#collapsed' => FALSE,
     '#tree' => TRUE,
-    );
+  );
   foreach ($elements as $element_name => $path) {
     $form['mapping'][$element_name] = array(
       '#type' => 'select',
       '#title' => $element_name,
       '#options' => $field_mappers,
       '#default_value' => $mapping[$path],
-      );
+    );
   }
   $form['submit'] = array(
     '#type' => 'submit',
     '#value' => t('Update'),
-    );
+  );
   return $form;
 }
 
 /**
  * Submit hook.
  */
-function feedapi_mapper_form_submit($form_id, $form_values) {
-  _feedapi_mapper_store_mapping($form_values['nid'], $form_values['mapping'], $form_values['elements']);
+function feedapi_mapper_form_submit($form, &$form_state) {
+  _feedapi_mapper_store_mapping($form_state['values']['nid'], $form_state['values']['mapping'], $form_state['values']['elements']);
 }
 
 /**
@@ -225,8 +224,8 @@ function feedapi_mapper_form_submit($for
  */
 function _feedapi_mapper_store_mapping($param, $mapping, $elements) {
   // Wrap the mapping array (element_name => node_field)
-  // and the elements array (element_name => element_path) 
-  // arrays into one: 
+  // and the elements array (element_name => element_path)
+  // arrays into one:
   // We store a mapping as element_path => node_field.
   // - element_path and node_field are both a serialized array.
   $stored_mapping = array();
@@ -250,7 +249,7 @@ function _feedapi_mapper_store_mapping($
 
 /**
  * Retrieve mapping from db.
- * @param $param 
+ * @param $param
  * node id or node type
  * @return Associative array in the format
  * array(
@@ -282,9 +281,9 @@ function _feedapi_mapper_load_mappers() 
   static $loaded = FALSE;
   if (!$loaded) {
     // Load all feedapi mapper implementations from ./mappers
-    $path = drupal_get_path('module', 'feedapi_mapper') . '/mappers';
+    $path = drupal_get_path('module', 'feedapi_mapper') .'/mappers';
     $files = drupal_system_listing('.*\.inc$', $path, 'name', 0);
-    foreach($files as $file) {
+    foreach ($files as $file) {
       require_once("./$file->filename");
     }
     // Rebuild cache.
@@ -371,7 +370,7 @@ function _feedapi_mapper_get_feed_elemen
 /**
  * Traverse an associative array and look for path to first leaf.
  * If found, unset leaf and return path to it.
- * @return 
+ * @return
  * A path to a leaf element in the format
  * array(path, to, leaf, element);
  */
@@ -408,7 +407,7 @@ function _feedapi_mapper_next_element_pa
 }
 
 /**
- * Converts a multidemensional associative array with interdispersed objects into 
+ * Converts a multidemensional associative array with interdispersed objects into
  * an associative array only.
  */
 function _feedapi_mapper_obj2array($items) {
@@ -440,7 +439,7 @@ function _feedapi_mapper_truncate_array(
 }
 
 /**
- * Like array_merge_recursive. Only difference: does NOT merge 
+ * Like array_merge_recursive. Only difference: does NOT merge
  * two different keys into an array, but merges key on key.
  * Argument 1 always has to be an array.
  */
@@ -467,11 +466,11 @@ function _feedapi_mapper_array_merge_rec
 }
 
 /**
- * Get field mappers for a given node type. Returns an array of all 
+ * Get field mappers for a given node type. Returns an array of all
  * feed mappers that are applicable to this node type.
  * @param $node_type
  *   Valid node type.
- * @return 
+ * @return
  *   Array of fields that are mappable for this content type.
  */
 function _feedapi_mapper_get_field_mappers($node_type) {
@@ -502,10 +501,10 @@ function _feedapi_mapper_get_field_mappe
 
 /**
  * Returns descriptions for all mappable fields of given node type.
- * @return 
- *   Array in the format 
- *   array('field_name_a' => 
- *          array('module_name_a' => 'Descriptive text'), 
+ * @return
+ *   Array in the format
+ *   array('field_name_a' =>
+ *          array('module_name_a' => 'Descriptive text'),
  *                'module_name_b' => ...),
  *         'field_name_b' =>  array(...),
  *         );
@@ -535,20 +534,23 @@ function _feedapi_mapper_get_node_form($
   // Some modules (userreview...) "hide" their node forms, resulting in no field
   // being listed. We set a special flag to inform them this form is special.
   $node->cck_dummy_node_form = TRUE;
-  
-  $form = call_user_func_array('drupal_retrieve_form', array($form_id, $node));
-  drupal_process_form($form_id, $form);
-  // return drupal_render_form($args[0], $form);
+
+  // Include node.pages.inc which contains the node_form definitions.
+  include_once(drupal_get_path('module', 'node') .'/node.pages.inc');
+  $form_state = array('storage' => NULL, 'submitted' => FALSE);
+  $form = drupal_retrieve_form($form_id, $form_state, $node);
+  drupal_prepare_form($form_id, $form, $form_state);
+
   return $form;
 }
 
 /**
  * Retrieve all field names on a given node type.
- * 
+ *
  * @todo:
  * This is still somewhat of a cooking recipe and e. g. does not expose teaser nor body filter,
  * as they are not present as such neither on the form nor in the node of the initial form.
- * 
+ *
  * If there are suggestions on how to improve this routine, I'd be happy to know them.
  *
  * @param string $node_type
@@ -556,13 +558,15 @@ function _feedapi_mapper_get_node_form($
 function _feedapi_mapper_get_field_names($node_type) {
   static $field_names;
   if (!is_array($field_names[$node_type])) {
-    $form = _feedapi_mapper_get_node_form($node_type);
+		$form = _feedapi_mapper_get_node_form($node_type);
+
     $node = (array)$form['#node'];
+    $node['taxonomy'] = array();
     $fields = array_merge($form, $node);
-    $i = 0;
+
     foreach ($fields as $k => $v ) {
       if (strpos($k, '#') === FALSE) {
-        $field_names[$node_type][$i++] = $k;
+        $field_names[$node_type][] = $k;
       }
     }
   }
@@ -573,7 +577,7 @@ function _feedapi_mapper_get_field_names
  * Theming function for outputting result of _feedapi_mapper_get_field_mappers_descriptions().
  * @param $descriptions
  *   Result of _feedapi_mapper_get_field_mappers_descriptions().
- * @return 
+ * @return
  *   HTML output.
  */
 function theme_feedapi_mapper_descriptions($descriptions) {
@@ -586,4 +590,16 @@ function theme_feedapi_mapper_descriptio
   }
   $output .= '</dl>';
   return $output;
+}
+
+/**
+ * Implementation of hook_theme().
+ *
+ */
+function feedapi_mapper_theme() {
+  return array(
+    'feedapi_mapper_descriptions' => array(
+      'arguments' => array('descriptions'),
+    ),
+  );
 }
\ No newline at end of file
diff -urp feedapi_mapper_orig/mappers/feedapi_mapper_content.inc feedapi_mapper/mappers/feedapi_mapper_content.inc
--- feedapi_mapper_orig/mappers/feedapi_mapper_content.inc	2008-02-28 22:15:12.000000000 +0100
+++ feedapi_mapper/mappers/feedapi_mapper_content.inc	2008-09-07 13:48:36.000000000 +0200
@@ -9,13 +9,13 @@
  * @param string $field_name
  * @param string, number or array of string or number $feed_element
  * @param string or number as id $sub_field
- * 
+ *
  */
 function content_feedapi_mapper($op, $node, $field_name, $feed_element = array(), $sub_field = '') {
   // Test for the node field that we would like to map to.
   if (strpos($field_name, 'field_') === 0) {
     if ($op == 'describe') {
-      // Describe what we are doing in this mapper. This shows up as help text on the mapping page. 
+      // Describe what we are doing in this mapper. This shows up as help text on the mapping page.
       if (feedapi_mapper_content_is_cck_type($field_name, array('text', 'number_integer', 'number_decimal'))) {
         return t('Maps a string or a number to this CCK field.');
       }
@@ -29,7 +29,7 @@ function content_feedapi_mapper($op, $no
     }
     else if ($op == 'map') {
       // Here is where the actual mapping happens.
-      // When we are called at this point, $field_name contains the name of the field the user has 
+      // When we are called at this point, $field_name contains the name of the field the user has
       // decided to map to and $field_element is the feed item element the user has decided to map.
       // We just need to put the two things together. The data structure here depends a lot on
       // CCK. We stick the value in $feed_element into $node->$field_name[0]['value'].
diff -urp feedapi_mapper_orig/mappers/feedapi_mapper_date.inc feedapi_mapper/mappers/feedapi_mapper_date.inc
--- feedapi_mapper_orig/mappers/feedapi_mapper_date.inc	2008-02-28 23:35:22.000000000 +0100
+++ feedapi_mapper/mappers/feedapi_mapper_date.inc	2008-09-07 13:48:52.000000000 +0200
@@ -9,7 +9,7 @@
  * @param string $field_name
  * @param string, number or array of string or number $feed_element
  * @param string or number as id $sub_field
- * 
+ *
  */
 function date_feedapi_mapper($op, $node, $field_name, $feed_element = array(), $sub_field = '') {
   if (!$field = feedapi_mapper_content_is_cck_type($field_name, array('date', 'datestamp'))) {
@@ -19,7 +19,7 @@ function date_feedapi_mapper($op, $node,
 
   switch ($op) {
     case 'describe':
-      // Describe what we are doing in this mapper. This shows up as help text on the mapping page. 
+      // Describe what we are doing in this mapper. This shows up as help text on the mapping page.
       return t('Maps a date to a date CCK field.');
     case 'list':
       // just for sub_fields
diff -urp feedapi_mapper_orig/mappers/feedapi_mapper_link.inc feedapi_mapper/mappers/feedapi_mapper_link.inc
--- feedapi_mapper_orig/mappers/feedapi_mapper_link.inc	2008-02-28 22:15:12.000000000 +0100
+++ feedapi_mapper/mappers/feedapi_mapper_link.inc	2008-09-07 13:49:29.000000000 +0200
@@ -5,13 +5,13 @@
  * On behalf implementation of hook_feedapi_mapper for link.module (CCK).
  * Link module available at http://drupal.org/project/link
  * based on feedapi_mapper_content.inc
- * 
+ *
  * @param string $op
  * @param Drupal node $node
  * @param string $field_name
  * @param string, number or array of string or number $feed_element
  * @param string or number as id $sub_field
- * 
+ *
  */
 function link_feedapi_mapper($op, $node, $field_name, $feed_element = array(), $sub_field = '') {
   // Test for the node field that we would like to map to.
@@ -20,7 +20,7 @@ function link_feedapi_mapper($op, $node,
       if (feedapi_mapper_content_is_cck_type($field_name, array('link'))) {
         return t('Maps a URL to this link CCK field.');
       }
-      // Describe what we are doing in this mapper. This shows up as help text on the mapping page. 
+      // Describe what we are doing in this mapper. This shows up as help text on the mapping page.
     }
     else if ($op == 'list') {
       if (feedapi_mapper_content_is_cck_type($field_name, array('link'))) {
@@ -32,7 +32,7 @@ function link_feedapi_mapper($op, $node,
     }
     else if ($op == 'map') {
       // Here is where the actual mapping happens.
-      // When we are called at this point, $field_name contains the name of the field the user has 
+      // When we are called at this point, $field_name contains the name of the field the user has
       // decided to map to and $field_element is the feed item element the user has decided to map.
       // We just need to put the two things together. The data structure here depends a lot on
       // CCK. We stick the value in $feed_element into $node->$field_name[0]['value'].
diff -urp feedapi_mapper_orig/mappers/feedapi_mapper_taxonomy.inc feedapi_mapper/mappers/feedapi_mapper_taxonomy.inc
--- feedapi_mapper_orig/mappers/feedapi_mapper_taxonomy.inc	2008-01-18 22:59:58.000000000 +0100
+++ feedapi_mapper/mappers/feedapi_mapper_taxonomy.inc	2008-09-07 13:50:10.000000000 +0200
@@ -19,14 +19,14 @@
  *   Subfield on field to map to. Parameter only present on $op = 'map'.
  *   This parameter will depend on if the hook implementation returns a subfield on 
  *   $op = 'list'.
- * 
+ *
  * Return key => name array of sub fields on 'list'.
  * If only one field and no subfields are available for this content type return TRUE.
  * If no fields available for this content type return FALSE.
- * Options are necessary because a field like 
+ * Options are necessary because a field like
  * e. g. "taxonomy" might have more than one slot for information - e. g. vocabularies.
  * 
- * Todo: $node could be passed by reference - implementers wouldn't need to return node 
+ * Todo: $node could be passed by reference - implementers wouldn't need to return node
  * (PHP5 passes in by reference by default).
  */
 function taxonomy_feedapi_mapper($op, $node, $field_name, $feed_element = array(), $sub_field = '') {
diff -urp feedapi_mapper_orig/mappers/feedapi_mapper_video_cck.inc feedapi_mapper/mappers/feedapi_mapper_video_cck.inc
--- feedapi_mapper_orig/mappers/feedapi_mapper_video_cck.inc	2008-03-17 18:09:27.000000000 +0100
+++ feedapi_mapper/mappers/feedapi_mapper_video_cck.inc	2008-09-07 13:50:45.000000000 +0200
@@ -9,7 +9,7 @@
  * @param string $field_name
  * @param string, number or array of string or number $feed_element
  * @param string or number as id $sub_field
- * 
+ *
  */
 function video_cck_feedapi_mapper($op, $node, $field_name, $feed_element = array(), $sub_field = '') {
   $field = content_fields($field_name);
@@ -20,7 +20,7 @@ function video_cck_feedapi_mapper($op, $
 
   switch ($op) {
     case 'describe':
-      // Describe what we are doing in this mapper. This shows up as help text on the mapping page. 
+      // Describe what we are doing in this mapper. This shows up as help text on the mapping page.
       return t('Maps a link to a video to the Embedded Media Video CCK field. Use the original_url element for mapping to this field.');
     case 'list':
       // just for sub_fields
@@ -49,7 +49,7 @@ function video_cck_feedapi_mapper($op, $
           }
         }
       }
-      video_cck_field('submit', $node, $field, $items, FALSE, FALSE); 
+      video_cck_field('submit', $node, $field, $items, FALSE, FALSE);
       $node->$field_name = $items;
       return $node;
   }
