You are here

function xmlsitemap_get_directory in XML sitemap 7.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_get_directory()
  2. 6.2 xmlsitemap.module \xmlsitemap_get_directory()
  3. 2.x xmlsitemap.module \xmlsitemap_get_directory()

End of "defgroup xmlsitemap_api"

Related topics

8 calls to xmlsitemap_get_directory()
xmlsitemap_check_all_directories in ./xmlsitemap.module
Check all directories.
xmlsitemap_check_directory in ./xmlsitemap.module
Check that the sitemap files directory exists and is writable.
xmlsitemap_clear_directory in ./xmlsitemap.module
Clear Directory.
xmlsitemap_requirements in ./xmlsitemap.install
Implements hook_requirements().
xmlsitemap_settings_form in ./xmlsitemap.admin.inc
Form builder; Administration settings form.

... See full list

2 string references to 'xmlsitemap_get_directory'
XMLSitemapUnitTest::testClearDirectory in ./xmlsitemap.test
Test xmlsitemap_clear_directory().
XMLSitemapUnitTest::testUninstallDeleteDirectory in ./xmlsitemap.test
Test that uninstalling the module correctly deletes the directory.

File

./xmlsitemap.module, line 870
xmlsitemap XML sitemap

Code

function xmlsitemap_get_directory(stdClass $sitemap = NULL) {
  $directory =& drupal_static(__FUNCTION__);
  if (!isset($directory)) {
    $directory = variable_get('xmlsitemap_path', 'xmlsitemap');
  }
  if (empty($directory)) {
    return FALSE;
  }
  elseif (!empty($sitemap->smid)) {
    return file_build_uri($directory . '/' . $sitemap->smid);
  }
  else {
    return file_build_uri($directory);
  }
}