Index: feedapi_mapper.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi_mapper/feedapi_mapper.module,v
retrieving revision 1.1.2.7.2.7
diff -u -r1.1.2.7.2.7 feedapi_mapper.module
--- feedapi_mapper.module	27 Oct 2008 00:07:34 -0000	1.1.2.7.2.7
+++ feedapi_mapper.module	26 Nov 2008 19:58:11 -0000
@@ -34,8 +34,8 @@
       'page arguments' => array(3),
       'load arguments' => array(3),
       'type' => MENU_LOCAL_TASK,
-      'access callback' => 'user_access',
-      'access arguments' => array('administer feedapi'),
+      'access callback' => 'feedapi_mapper_access_mapper',
+      'access arguments' => array(3),
       );
   }
   return $items;
@@ -55,6 +55,23 @@
 }
 
 /**
+ * Determine whether current user can map on a given content type.
+ * Primarily used as menu acess callback. @see feedapi_mapper_menu()
+ * 
+ * @param $node_type
+ *   String that defines a content type.
+ * @return 
+ *   TRUE if current user can map feed elements AND content type is feed enabled.
+ *   FALSE otherwise.
+ */
+function feedapi_mapper_access_mapper($node_type) {
+  if (feedapi_enabled_type($node_type) && user_access('administer feedapi')) {
+    return TRUE;
+  }
+  return FALSE;
+}
+
+/**
  * Map feed item elements to node.
  */
 function _feedapi_mapper_map(&$node) {
@@ -103,10 +120,6 @@
     $node = new stdClass();
     $node->type = str_replace('-', '_', $node_type);
   }
-  if (!feedapi_enabled_type($node->type)) {
-    drupal_set_message(t('This content type is not FeedAPI enabled. Enable it if you would like to use the FeedAPI mapper on it.'));
-    return '';
-  }
   $names = node_get_types('names');
   drupal_set_title($node->title ? $node->title : $names[$node->type]);
   $output = t('Map feed item elements to feed item node fields.');
