You are here

function xmlsitemap_disable in XML sitemap 5

Same name and namespace in other branches
  1. 6 xmlsitemap.install \xmlsitemap_disable()

Implementation of hook_disable().

File

./xmlsitemap.install, line 102

Code

function xmlsitemap_disable() {
  $path = file_directory_path() . '/xmlsitemap';
  if ($dir = @opendir($path)) {
    while (($file = readdir($dir)) !== FALSE) {
      if ($file != '.' && $file != '..') {
        unlink("{$path}/{$file}");
      }
    }
    closedir($dir);
    rmdir($path);
  }
}