Commit c5d6a299 authored by Dave Reid's avatar Dave Reid

Issue #1291898: Prevent rebuild batch errors if new content is added while...

Issue #1291898: Prevent rebuild batch errors if new content is added while xmlsitemap_rebuild_batch_fetch() is running.
parent e94c0ac5
......@@ -458,7 +458,10 @@ function xmlsitemap_rebuild_batch_fetch($entity, &$context) {
$context['sandbox']['progress'] += count($ids);
$context['message'] = t('Now processing %entity @last_id (@progress of @count).', array('%entity' => $entity, '@last_id' => $context['sandbox']['last_id'], '@progress' => $context['sandbox']['progress'], '@count' => $context['sandbox']['max']));
if ($context['sandbox']['progress'] != $context['sandbox']['max']) {
if ($context['sandbox']['progress'] >= $context['sandbox']['max']) {
$context['finished'] = 1;
}
else {
$context['finished'] = $context['sandbox']['progress'] / $context['sandbox']['max'];
}
}
......
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