Commit 2bda6a85 authored by juampynr's avatar juampynr
Browse files

Remove duplicated logic in hook_cron

parent 4e3e4928
......@@ -185,11 +185,6 @@ function xmlsitemap_cron() {
return;
}
// If cron sitemap file regeneration is disabled, stop.
if (\Drupal::config('xmlsitemap.settings')->get('disable_cron_regeneration')) {
return;
}
// If the minimum sitemap lifetime hasn't been passed, skip.
$lifetime = REQUEST_TIME - \Drupal::state()->get('xmlsitemap_generated_last');
if ($lifetime < \Drupal::config('xmlsitemap.settings')->get('minimum_lifetime')) {
......
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