You are here

function xmlsitemap_get_link_count in XML sitemap 6.2

Same name and namespace in other branches
  1. 8 xmlsitemap.module \xmlsitemap_get_link_count()
  2. 7.2 xmlsitemap.module \xmlsitemap_get_link_count()
  3. 2.x xmlsitemap.module \xmlsitemap_get_link_count()

Get the current number of sitemap links.

4 calls to xmlsitemap_get_link_count()
XMLSitemapUnitTest::testGetChunkCount in ./xmlsitemap.test
Tests for xmlsitemap_get_chunk_count().
xmlsitemap_get_chunk_count in ./xmlsitemap.module
Get the current number of sitemap chunks.
xmlsitemap_get_chunk_size in ./xmlsitemap.module
Get the sitemap chunk size.
xmlsitemap_settings_form_validate in ./xmlsitemap.admin.inc
Form validator; Check the sitemap files directory.

File

./xmlsitemap.module, line 1121
Main file for the xmlsitemap module.

Code

function xmlsitemap_get_link_count($reset = FALSE) {
  static $count;
  if (!isset($count) || $reset) {
    $count = db_result(db_query("SELECT COUNT(id) FROM {xmlsitemap} WHERE access = 1 AND status = 1"));
  }
  return $count;
}