Commit c0868e26 authored by Dave Reid's avatar Dave Reid

#545392 by Dave Reid: Changed engine submission to always respect the 'Submit...

#545392 by Dave Reid: Changed engine submission to always respect the 'Submit the sitemap when content changes' option if enabled.
parent db219dc8
......@@ -28,7 +28,7 @@ function xmlsitemap_engines_settings() {
$form['submission']['xmlsitemap_engines_submit'] = array(
'#type' => 'checkbox',
'#title' => t('Submit the sitemap when content changes'),
'#description' => t('If enabled, the search engines will be notified of changes to the sitemap each time the sitemap content is changed.'),
'#description' => t('If enabled, the search engines will only be notified of changes to the sitemap whenever the sitemap content is changed.'),
'#default_value' => variable_get('xmlsitemap_engines_submit', FALSE),
);
$form['submission']['xmlsitemap_engines_cron_submit_frequency'] = array(
......
......@@ -26,7 +26,7 @@ function xmlsitemap_engines_cron() {
$last_ping = variable_get('xmlsitemap_engines_cron_timestamp_submit', 0);
$submit_on_change = variable_get('xmlsitemap_engines_submit', FALSE);
$content_changed = variable_get('xmlsitemap_sitemap_is_changed', FALSE);
$ping_engines = ($submit_on_change && $content_changed) ||
$ping_engines = (!$submit_on_change || $content_changed) &&
((REQUEST_TIME - $last_ping) >= $frequency);
if ($ping_engines) {
xmlsitemap_engines_ping_sitemap();
......
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