You are here

fast_404.module in Fast 404 7

Same filename and directory in other branches
  1. 6 fast_404.module

Main hook implementations for Fast_404.

File

fast_404.module
View source
<?php

/**
 * @file
 * Main hook implementations for Fast_404.
 */

/**
 * 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.
 */
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();
}

Functions

Namesort descending Description
fast_404_boot Implements hook_boot().