You are here

function parser_common_syndication_uninstall in FeedAPI 6

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

Implementation of hook_uninstall().

File

parser_common_syndication/parser_common_syndication.install, line 52
Adds it to the content-type configuration

Code

function parser_common_syndication_uninstall() {
  drupal_uninstall_schema('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');
}