Same name and namespace in other branches
  1. 4.6.x includes/common.inc \drupal_page_footer()
  2. 4.7.x includes/common.inc \drupal_page_footer()
  3. 5.x includes/common.inc \drupal_page_footer()
  4. 6.x includes/common.inc \drupal_page_footer()

Performs end-of-request tasks.

This function sets the page cache if appropriate, and allows modules to react to the closing of the page by calling hook_exit().

1 call to drupal_page_footer()
drupal_deliver_html_page in includes/common.inc
Packages and sends the result of a page callback to the browser as HTML.

File

includes/common.inc, line 2849
Common functions that many Drupal modules will need to reference.

Code

function drupal_page_footer() {
  global $user;
  module_invoke_all('exit');

  // Commit the user session, if needed.
  drupal_session_commit();
  if (variable_get('cache', 0) && ($cache = drupal_page_set_cache())) {
    drupal_serve_page_from_cache($cache);
  }
  else {
    ob_flush();
  }
  _registry_check_code(REGISTRY_WRITE_LOOKUP_CACHE);
  drupal_cache_system_paths();
  module_implements_write_cache();
  drupal_file_scan_write_cache();
  system_run_automated_cron();
}