Skip to content

Commit

Permalink
Delete a source.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Barth committed Feb 17, 2010
1 parent e0beb52 commit 235f503
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion sites/all/modules/feeds/includes/FeedsSource.inc
Expand Up @@ -41,9 +41,14 @@ interface FeedsSourceInterface {
public function sourceFormValidate(&$source_config);

/**
* A source is being saved.
* A source is being deleted.
*/
public function sourceSave(FeedsSource $source);

/**
* A source is being saved.
*/
public function sourceDelete(FeedsSource $source);
}

/**
Expand Down Expand Up @@ -215,6 +220,11 @@ class FeedsSource extends FeedsConfigurable {
* from database, does not delete configuration itself.
*/
public function delete() {
// Alert implementers of FeedsSourceInterface to the fact that we're
// deleting.
foreach ($this->importer->plugin_types as $type) {
$this->importer->$type->sourceDelete($this);
}
db_query('DELETE FROM {feeds_source} WHERE id = "%s" AND feed_nid = %d', $this->id, $this->feed_nid);
}

Expand Down

0 comments on commit 235f503

Please sign in to comment.