You are here

function system_error_reporting_settings in Drupal 6

Same name and namespace in other branches
  1. 5 modules/system/system.module \system_error_reporting_settings()

Form builder; Configure error reporting settings.

See also

system_settings_form()

Related topics

1 string reference to 'system_error_reporting_settings'
system_menu in modules/system/system.module
Implementation of hook_menu().

File

modules/system/system.admin.inc, line 1234
Admin page callbacks for the system module.

Code

function system_error_reporting_settings() {
  $form['site_403'] = array(
    '#type' => 'textfield',
    '#title' => t('Default 403 (access denied) page'),
    '#default_value' => variable_get('site_403', ''),
    '#size' => 40,
    '#description' => t('This page is displayed when the requested document is denied to the current user. If unsure, specify nothing.'),
    '#field_prefix' => url(NULL, array(
      'absolute' => TRUE,
    )) . (variable_get('clean_url', 0) ? '' : '?q='),
  );
  $form['site_404'] = array(
    '#type' => 'textfield',
    '#title' => t('Default 404 (not found) page'),
    '#default_value' => variable_get('site_404', ''),
    '#size' => 40,
    '#description' => t('This page is displayed when no other content matches the requested document. If unsure, specify nothing.'),
    '#field_prefix' => url(NULL, array(
      'absolute' => TRUE,
    )) . (variable_get('clean_url', 0) ? '' : '?q='),
  );
  $form['error_level'] = array(
    '#type' => 'select',
    '#title' => t('Error reporting'),
    '#default_value' => variable_get('error_level', 1),
    '#options' => array(
      t('Write errors to the log'),
      t('Write errors to the log and to the screen'),
    ),
    '#description' => t('Specify where Drupal, PHP and SQL errors are logged. While it is recommended that a site running in a production environment write errors to the log only, in a development or testing environment it may be helpful to write errors both to the log and to the screen.'),
  );
  return system_settings_form($form);
}