Commit ed477cd4 authored by Dave Reid's avatar Dave Reid

by Dave Reid: Replaced constant XMLSITEMAP_MAX_SITEMAP_CHUNKS with...

by Dave Reid: Replaced constant XMLSITEMAP_MAX_SITEMAP_CHUNKS with XMLSITEMAP_MAX_SITEMAP_LINKS since both are equal now.
parent f67c8d8b
......@@ -41,7 +41,7 @@ function xmlsitemap_requirements($phase) {
'description' => xmlsitemap_get_directory(),
);
}
$max_links = XMLSITEMAP_MAX_SITEMAP_LINKS * XMLSITEMAP_MAX_SITEMAP_CHUNKS;
$max_links = XMLSITEMAP_MAX_SITEMAP_LINKS * XMLSITEMAP_MAX_SITEMAP_LINKS;
if (xmlsitemap_get_link_count() > $max_links) {
$requirements['xmlsitemap_link_count'] = array(
'title' => $t('XML sitemap link count'),
......@@ -50,11 +50,11 @@ function xmlsitemap_requirements($phase) {
'severity' => REQUIREMENT_ERROR,
);
}
if (xmlsitemap_get_chunk_count() > XMLSITEMAP_MAX_SITEMAP_CHUNKS) {
if (xmlsitemap_get_chunk_count() > XMLSITEMAP_MAX_SITEMAP_LINKS) {
$requirements['xmlsitemap_chunk_count'] = array(
'title' => $t('XML sitemap page count'),
'value' => xmlsitemap_get_chunk_count(),
'description' => $t('You have exceeded the number of sitemap pages (@number).', array('@number' => number_format(XMLSITEMAP_MAX_SITEMAP_CHUNKS))),
'description' => $t('You have exceeded the number of sitemap pages (@number).', array('@number' => number_format(XMLSITEMAP_MAX_SITEMAP_LINKS))),
'severity' => REQUIREMENT_ERROR,
);
if (!in_array(xmlsitemap_get_chunk_size(), array(50000, 'auto'))) {
......
......@@ -20,11 +20,6 @@ define('XMLSITEMAP_MAX_SITEMAP_LINKS', 50000);
*/
define('XMLSITEMAP_MAX_SITEMAP_FILESIZE', 10485760);
/**
* The maximum number of links in one sitemap index file.
*/
define('XMLSITEMAP_MAX_SITEMAP_CHUNKS', 50000);
define('XMLSITEMAP_FREQUENCY_YEARLY', 31449600); // 60 * 60 * 24 * 7 * 52
define('XMLSITEMAP_FREQUENCY_MONTHLY', 2419200); // 60 * 60 * 24 * 7 * 4
define('XMLSITEMAP_FREQUENCY_WEEKLY', 604800); // 60 * 60 * 24 * 7
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment