You are here

function tweet_feed_node_delete in Tweet Feed 7.2

Same name and namespace in other branches
  1. 7.3 tweet_feed.module \tweet_feed_node_delete()

Implements hook_node_delete

Remove hashes when tweets or profiles deleted

File

./tweet_feed.module, line 941

Code

function tweet_feed_node_delete($node) {
  switch ($node->type) {
    case 'twitter_tweet_feed':
      db_delete('tweet_hashes')
        ->condition('nid', $node->nid)
        ->execute();
      break;
    case 'twitter_user_profile':
      db_delete('tweet_user_hashes')
        ->condition('nid', $node->nid)
        ->execute();
      break;
    default:
      break;
  }
}