You are here

function m4032404_callback in 403 to 404 7

The 403 to 404 callback function for outputting the error page.

1 string reference to 'm4032404_callback'
m4032404_menu in ./m4032404.module
Implements hook_menu().

File

./m4032404.module, line 33
403 to 404 module functions.

Code

function m4032404_callback() {
  $admin_only = variable_get('m4032404_admin_only', FALSE);
  $is_admin_url = path_is_admin(request_path());
  if ($admin_only) {
    if (!$is_admin_url) {
      if (function_exists('r4032login_redirect')) {
        return r4032login_redirect();
      }
      drupal_access_denied();
      drupal_exit();
    }
  }
  drupal_not_found();
  drupal_exit();
}