You are here

function fast_404_boot in Fast 404 7

Same name and namespace in other branches
  1. 6 fast_404.module \fast_404_boot()

Implements hook_boot().

Run the 404 check on boot. This function gets called during the DRUPAL_BOOTSTRAP_LATE_PAGE_CACHE stage of drupal_bootstrap. This means that if there is already cached content for the current URL, it will be delivered before this hook is reached.

File

./fast_404.module, line 15
Main hook implementations for Fast_404.

Code

function fast_404_boot() {

  // Load up the inc file.
  require_once 'fast_404.inc';

  // If the file extension wasn't set to be checked in settings.php, do it
  // here.
  if (!defined('FAST_404_EXT_CHECKED')) {

    // This function has an exit in it, so it will end the page if needed.
    fast_404_ext_check();
  }

  // Don't do a full check if the path was already checked in settings.php.
  if (defined('FAST_404_PATH_CHECKED')) {
    return TRUE;
  }

  // If the path is invalid then return the Fast 404 html.
  fast_404_path_check();
}