You are here

function xmlsitemap_menu_xmlsitemap_index_links in XML sitemap 6.2

Same name and namespace in other branches
  1. 7.2 xmlsitemap_menu/xmlsitemap_menu.module \xmlsitemap_menu_xmlsitemap_index_links()

Implements hook_xmlsitemap_index_links().

1 call to xmlsitemap_menu_xmlsitemap_index_links()
xmlsitemap_menu_cron in xmlsitemap_menu/xmlsitemap_menu.module
Implements hook_cron().

File

xmlsitemap_menu/xmlsitemap_menu.module, line 53

Code

function xmlsitemap_menu_xmlsitemap_index_links($limit) {
  if ($menus = xmlsitemap_get_link_type_enabled_bundles('menu_link')) {
    $sql = "SELECT ml.mlid FROM {menu_links} ml LEFT JOIN {xmlsitemap} x ON x.type = 'menu' AND ml.mlid = x.id WHERE x.id IS NULL AND ml.menu_name IN (" . db_placeholders($menus, 'varchar') . ") ORDER BY ml.mlid DESC";
    $query = db_query_range($sql, $menus, 0, $limit);
    $mlids = xmlsitemap_db_fetch_col($query);
    xmlsitemap_menu_xmlsitemap_process_menu_links($mlids);
  }
}