You are here

function aggregator_remove in Drupal 7

Same name and namespace in other branches
  1. 4 modules/aggregator.module \aggregator_remove()
  2. 5 modules/aggregator/aggregator.module \aggregator_remove()
  3. 6 modules/aggregator/aggregator.module \aggregator_remove()

Removes all items from a feed.

Parameters

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

1 call to aggregator_remove()
aggregator_admin_remove_feed_submit in modules/aggregator/aggregator.admin.inc
Form submission handler for aggregator_admin_remove_feed().

File

modules/aggregator/aggregator.module, line 575
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_update('aggregator_feed')
    ->condition('fid', $feed->fid)
    ->fields(array(
    'checked' => 0,
    'hash' => '',
    'etag' => '',
    'modified' => 0,
  ))
    ->execute();
}