Skip navigation
Help

aggregator_remove

6 aggregator.module aggregator_remove($feed)
7 aggregator.module aggregator_remove($feed)

Removes all items from a feed.

Parameters

$feed: An object describing the feed to be cleared.

1 call to aggregator_remove()

File

drupal/modules/aggregator/aggregator.module, line 555
Used to aggregate syndicated content (RSS, RDF, and Atom).

Code

function aggregator_remove($feed) {
  _aggregator_get_variables();
  // Call hook_aggregator_remove() on all modules.
  module_invoke_all('aggregator_remove', $feed);
  // Reset feed.
  db_merge('aggregator_feed')
    ->key(array('fid' => $feed->fid))
    ->fields(array(
    'checked' => 0, 
    'hash' => '', 
    'etag' => '', 
    'modified' => 0, 
    'description' => $feed->description, 
    'image' => $feed->image,
  ))
    ->execute();
}