You are here

function xmlsitemap_menu_xmlsitemap_index_links in XML sitemap 7.2

Same name and namespace in other branches
  1. 6.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 87
Main file for XML sitemap menu.

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_link' AND ml.mlid = x.id WHERE x.id IS NULL AND ml.menu_name IN (:menus) ORDER BY ml.mlid DESC";
    $mlids = db_query_range($sql, 0, $limit, array(
      ':menus' => $menus,
    ))
      ->fetchCol();
    xmlsitemap_menu_xmlsitemap_process_menu_links($mlids);
  }
}