Index: mappers/feedapi_mapper_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/feedapi_mapper/mappers/Attic/feedapi_mapper_node.inc,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 feedapi_mapper_node.inc
--- mappers/feedapi_mapper_node.inc	20 Apr 2009 13:31:04 -0000	1.1.2.4
+++ mappers/feedapi_mapper_node.inc	3 Jun 2009 13:21:37 -0000
@@ -14,15 +14,23 @@
  */
 function node_feedapi_mapper($op, $node, $feed_element = array(), $field_name = '', $sub_field = '') {
   if ($op == 'describe') {
-    return t('Maps a feed element to a title, created date or a body of a node. Note that standard field mapping by FeedAPI still applies. For example if there is no feed element mapped to the node body you will still find the description in node body because that is how FeedAPI stores nodes.');
+    return t('Maps a feed element to the title, created date, published state or body of a node. Note that standard field mapping by FeedAPI still applies. For example if there is no feed element mapped to the node body you will still find the description in node body because that is how FeedAPI stores nodes.');
   }
   else if ($op == 'list') {
-    return array('title' => t('Title'), 'created' => t('Published date'), 'body' => t('Body'));
+    return array('title' => t('Title'), 'created' => t('Published date'), 'body' => t('Body'), 'status' => t('Published state'));
   }
-  else if ($op == 'map' && in_array($field_name, array('title', 'body', 'created'))) {
-    if (is_string($feed_element) || is_numeric($feed_element)) {
-      $node->{$field_name} = $feed_element;
+  else if ($op == 'map') {
+    if (in_array($field_name, array('title', 'body', 'created'))) {
+      if (is_string($feed_element) || is_numeric($feed_element)) {
+        $node->{$field_name} = $feed_element;
+      }
+      return $node;
+    }
+    else if ($field_name == 'status') {
+      if (isset($feed_element)) {
+        $node->{$field_name} = empty($feed_element) ? 0 : 1;
+      }
+      return $node;
     }
-    return $node;
   }
 }
