function parser_common_syndication_nodeapi in FeedAPI 6
Same name and namespace in other branches
- 5 parser_common_syndication/parser_common_syndication.module \parser_common_syndication_nodeapi()
Delete cache validating functions when feed is deleted
File
- parser_common_syndication/
parser_common_syndication.inc, line 197 - Downloading and parsing functions for Common Syndication Parser
Code
function parser_common_syndication_nodeapi(&$node, $op) {
if (isset($node->feed) || feedapi_enabled_type($node->type)) {
switch ($op) {
case 'delete':
db_query("DELETE FROM {parser_common_syndication} WHERE url = '%s'", $node->feed->url);
$cache_dir = _parser_common_syndication_sanitize_cache();
$cache_filename = $cache_dir . '/' . md5($node->feed->url);
if (file_exists($cache_filename)) {
unlink($cache_filename);
}
break;
}
}
}