You are here

function _feedapi_node_fetch in FeedAPI 5

Construct the basic information (nid, feed_nid) of all feeds into an array.

Parameters

$feed: Feed object

Return value

The array of feed elements with basic information

File

feedapi_node/feedapi_node.module, line 365
Handle how the feed items are represented as a content Handle the processing of the feed items

Code

function _feedapi_node_fetch($feed) {
  $result = db_query("SELECT fni.nid, ff.feed_nid, fni.arrived, fni.timestamp FROM {feedapi_node_item} fni JOIN {feedapi_node_item_feed} ff ON ff.feed_item_nid = fni.nid WHERE ff.feed_nid = %d ORDER BY fni.timestamp DESC", $feed->nid);
  $items = array();
  while ($item = db_fetch_object($result)) {
    $node = node_load($item->nid);
    $item->title = $node->title;
    $items[] = $item;
  }
  return $items;
}