You are here

function parser_common_syndication_uninstall in FeedAPI 5

Same name and namespace in other branches
  1. 6 parser_common_syndication/parser_common_syndication.install \parser_common_syndication_uninstall()

Implementation of hook_uninstall().

File

parser_common_syndication/parser_common_syndication.install, line 39

Code

function parser_common_syndication_uninstall() {
  db_query("DROP TABLE {parser_common_syndication}");

  // Empty cache directory
  $cache_dir = variable_get('parser_common_syndication_cache', FALSE);
  if (is_dir($cache_dir)) {
    $dp = opendir($cache_dir);
    while (($file = readdir($dp)) !== FALSE) {
      if (is_file($file)) {
        unlink($cache_dir . '/' . $file);
      }
    }
    closedir($dp);
    rmdir($cache_dir);
  }
  variable_del('parser_common_syndication_cache');
}