function xmlsitemap_sitemap_query in XML sitemap 6
Complete the query used to select rows from the xmlsitemap table.
3 calls to xmlsitemap_sitemap_query()
- xmlsitemap_link_count in ./
xmlsitemap.module - Return the number of links present in xmlsitemap table.
- _xmlsitemap_create_cache_chunk in ./
xmlsitemap.pages.inc - Create a sitemap chunk cache file.
- _xmlsitemap_create_cache_files in ./
xmlsitemap.pages.inc - Create the cache files containing the sitemap.
File
- ./
xmlsitemap.module, line 372 - Creates a sitemap compatible with the sitemaps.org schema.
Code
function xmlsitemap_sitemap_query() {
global $language;
$default = language_default();
$language_query = "AND xsm.language IN ('" . $language->language . "', '')";
switch (variable_get('language_negotiation', LANGUAGE_NEGOTIATION_NONE)) {
case LANGUAGE_NEGOTIATION_NONE:
$language_query = '';
break;
case LANGUAGE_NEGOTIATION_PATH_DEFAULT:
case LANGUAGE_NEGOTIATION_PATH:
if (variable_get('xmlsitemap_all_links_to_default_language', 0) && $language->language == $default->language) {
$language_query = '';
}
break;
}
return "\n FROM {xmlsitemap} xsm\n INNER JOIN {system} s ON s.name = xsm.module\n WHERE s.type = 'module'\n AND s.status = 1\n AND xsm.changefreq <> 0\n AND xsm.changed <> 0\n {$language_query}\n AND (xsm.priority >= 0 AND xsm.priority <= 1)\n ";
}