diff -u b/xmlsitemap.generate.inc b/xmlsitemap.generate.inc --- b/xmlsitemap.generate.inc +++ b/xmlsitemap.generate.inc @@ -453,7 +453,7 @@ $result = $query->execute(); $ids = array_keys($result[$entity]); - $info['xmlsitemap']['process callback']($ids, $entity); + $info['xmlsitemap']['process callback']($ids); $context['sandbox']['last_id'] = end($ids); $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'])); @@ -488,7 +488,7 @@ $result = $query->execute(); $ids = array_keys($result[$entity]); - $info['xmlsitemap']['process callback']($ids); + $info['xmlsitemap']['process callback']($ids, array('entity_type' => $entity)); $context['sandbox']['last_id'] = end($ids); $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'])); diff -u b/xmlsitemap_entity/xmlsitemap_entity.module b/xmlsitemap_entity/xmlsitemap_entity.module --- b/xmlsitemap_entity/xmlsitemap_entity.module +++ b/xmlsitemap_entity/xmlsitemap_entity.module @@ -194,7 +194,7 @@ $ids = $query->execute()->fetchCol(); if ($ids) { - xmlsitemap_entity_xmlsitemap_process_entity_links($ids, $entity_type); + xmlsitemap_entity_xmlsitemap_process_entity_links($ids, array('entity_type' => $entity_type)); } } } @@ -209,11 +209,11 @@ * @param $entity_type * The entity type. */ -function xmlsitemap_entity_xmlsitemap_process_entity_links(array $entity_ids, $entity_type) { - $entities = entity_load($entity_type, $entity_ids); +function xmlsitemap_entity_xmlsitemap_process_entity_links(array $entity_ids, $data) { + $entities = entity_load($data['entity_type'], $entity_ids); foreach ($entities as $entity) { - _xmlsitemap_entity_xmlsitemap_update_link($entity_type, $entity); + _xmlsitemap_entity_xmlsitemap_update_link($data['entity_type'], $entity); } } only in patch2: unchanged: --- a/xmlsitemap.module +++ b/xmlsitemap.module @@ -1572,7 +1572,7 @@ function xmlsitemap_link_queue_process($data) { $info = xmlsitemap_get_link_info($data['type']); $ids = isset($data['ids']) ? $data['ids'] : array($data['id']); if (function_exists($info['xmlsitemap']['process callback'])) { - $info['xmlsitemap']['process callback']($ids); + $info['xmlsitemap']['process callback']($ids, array('entity_type' => $data['type'])); } } only in patch2: unchanged: --- a/xmlsitemap_menu/xmlsitemap_menu.module +++ b/xmlsitemap_menu/xmlsitemap_menu.module @@ -90,7 +90,7 @@ function xmlsitemap_menu_xmlsitemap_index_links($limit) { * @param $mlids * An array of menu link IDs. */ -function xmlsitemap_menu_xmlsitemap_process_menu_links(array $mlids, array $xmlsitemap = array()) { +function xmlsitemap_menu_xmlsitemap_process_menu_links(array $mlids, $data = array()) { // Set the global user variable to the anonymous user. xmlsitemap_switch_user(0); @@ -99,8 +99,8 @@ function xmlsitemap_menu_xmlsitemap_process_menu_links(array $mlids, array $xmls if (empty($menu_item)) { continue; } - if (!empty($xmlsitemap)) { - $menu_item['xmlsitemap'] = $xmlsitemap; + if (!empty($data['xmlsitemap'])) { + $menu_item['xmlsitemap'] = array('xmlsitemap' => (array) $data['xmlsitemap']); } $link = xmlsitemap_menu_create_link($menu_item); xmlsitemap_link_save($link, array($link['type'] => $menu_item)); @@ -193,7 +193,7 @@ function xmlsitemap_menu_menu_delete(array $menu) { */ function xmlsitemap_menu_menu_link_insert(array $link) { $link += array('xmlsitemap' => array()); - xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); + xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), array('xmlsitemap' => $link['xmlsitemap'])); } /** @@ -203,7 +203,7 @@ function xmlsitemap_menu_menu_link_insert(array $link) { */ function xmlsitemap_menu_menu_link_update(array $link) { //$link += array('xmlsitemap' => array()); - //xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); + //xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), array('xmlsitemap' => $link['xmlsitemap'])); } /** @@ -218,7 +218,7 @@ function xmlsitemap_menu_menu_link_update(array $link) { function xmlsitemap_menu_menu_link_alter(array &$link) { if (!empty($link['mlid'])) { $link += array('xmlsitemap' => array()); - xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), $link['xmlsitemap']); + xmlsitemap_menu_xmlsitemap_process_menu_links(array($link['mlid']), array('xmlsitemap' => $link['xmlsitemap'])); } }