function fast_404_path_check in Fast 404 6
Same name and namespace in other branches
- 7 fast_404.inc \fast_404_path_check()
1 call to fast_404_path_check()
- fast_404_boot in ./
fast_404.module - @desc 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.inc, line 78
Code
function fast_404_path_check() {
$valid = TRUE;
if (variable_get('fast_404_path_check', FALSE) && !empty($_GET['q'])) {
// Determine if we have the db_query function. If so, we are in boot and have functions. If not we are in settings.php and do not have functions.
if (function_exists('db_query')) {
$valid = fast_404_validate_path_drupal();
}
else {
$valid = fast_404_validate_path_mysql();
}
}
if (!$valid) {
fast_404_error_return();
}
define('FAST_404_PATH_CHECKED', TRUE);
}