function _feedapi_aggregator_unique in FeedAPI 5
Is this feed item created?
File
- feedapi_aggregator/
feedapi_aggregator.module, line 512
Code
function _feedapi_aggregator_unique($feed_item, $feed_nid, $settings = array()) {
$entry = FALSE;
if ($feed_item->options->guid) {
$entry = db_fetch_object(db_query("SELECT iid FROM {feedapi_aggregator_item} WHERE feed_nid = %d AND guid = '%s'", $feed_nid, $feed_item->options->guid));
}
else {
if ($feed_item->options->original_url) {
$entry = db_fetch_object(db_query("SELECT iid FROM {feedapi_aggregator_item} WHERE feed_nid = %d AND link = '%s'", $feed_nid, $feed_item->options->original_url));
}
else {
$entry = db_fetch_object(db_query("SELECT iid FROM {feedapi_aggregator_item} WHERE feed_nid = %d AND title = '%s'", $feed_nid, $feed_item->title));
}
}
return is_object($entry) ? FALSE : TRUE;
}