You are here

function customerror_header in Customerror 6

Same name and namespace in other branches
  1. 8 customerror.module \customerror_header()
  2. 5 customerror.module \customerror_header()
  3. 7 customerror.module \customerror_header()

Make sure that we sent an appropriate header.

1 call to customerror_header()
customerror_page in ./customerror.module
Displays the 403 or 404 error page.

File

./customerror.module, line 228
Enables custom 404 (not found) and 403 (access denied) pages in Drupal.

Code

function customerror_header($code) {
  switch ($code) {
    case 403:
      drupal_set_header('HTTP/1.1 403 Forbidden');
      break;
    case 404:
      drupal_set_header('HTTP/1.1 404 Not Found');
      break;
  }
}