$message=variable_get('site_404_message',t('We are sorry, the requested page was not found on this webserver. Either the URL does not exist or the page you were looking has been deleted.'));
drupal_set_message(filter_xss_admin($message));
}
watchdog('page not found',check_plain($_GET['q']),WATCHDOG_WARNING);
$message=variable_get('site_403_message',t('We are sorry, you do not have access to this page. If you are not already logged in, please try to login and then visit this page again. If you think should be able to access this page, please contact site admins.'));
@@ -550,67 +550,35 @@ function system_clean_url_settings() {
}
functionsystem_error_reporting_settings(){
$form['403']=array(
'#type'=>'fieldset',
'#title'=>t('Access denied page (403)'),
'#description'=>t('These settings apply when the requested document is denied to the current user, i.e. a <em>403 error</em>.'),
);
$form['403']['site_403']=array(
$form['site_403']=array(
'#type'=>'textfield',
'#title'=>t('Page to display'),
'#title'=>t('Default 403 (access denied) page'),
'#default_value'=>variable_get('site_403',''),
'#description'=>t('This page is displayed when a 403 error occurs. If you are not using clean URLs, specify the part after "<code>?q=</code>". If unsure, leave blank.'),
);
$form['403']['site_403_message_display']=array(
'#type'=>'checkbox',
'#title'=>t('Display error message'),
'#description'=>t('Enabling this feature will display the message below when a 403 error occurs, even if <em>"Page to display"</em> is set.'),
'#default_value'=>variable_get('site_403_message',t('We are sorry, you do not have access to this page. If you are not already logged in, please try to login and then visit this page again. If you think should be able to access this page, please contact site admins.')),
);
$form['404']=array(
'#type'=>'fieldset',
'#title'=>t('File not found page (404)'),
'#description'=>t('These settings apply when the requested document could not be found, i.e. a <em>404 error</em>.'),
'#description'=>t('This page is displayed when the requested document is denied to the current user. If you are not using clean URLs, specify the part after "<code>?q=</code>". If unsure, specify nothing.')
);
$form['404']['site_404']=array(
$form['site_404']=array(
'#type'=>'textfield',
'#title'=>t('Page to display'),
'#title'=>t('Default 404 (not found) page'),
'#default_value'=>variable_get('site_404',''),
'#description'=>t('This page is displayed when a 404 error occurs. If you are not using clean URLs, specify the part after "<code>?q=</code>". If unsure, leave blank.'),
);
$form['404']['site_404_message_display']=array(
'#type'=>'checkbox',
'#title'=>t('Display error message'),
'#description'=>t('Enabling this feature will display the message below when a 404 error occurs, even if <em>"Page to display"</em> is set.'),
'#default_value'=>variable_get('site_404_message',t('We are sorry, the requested page was not found on this webserver. Either the URL does not exist or the page you were looking has been deleted.')),
'#description'=>t('This page is displayed when no other content matches the requested document. If you are not using clean URLs, specify the part after "<code>?q=</code>". If unsure, specify nothing.')
'#options'=>array(t('Write errors to the log'),t('Write errors to the log and to the screen')),
'#description'=>t('Where Drupal, PHP and SQL errors are logged. On a production server it is recommended that errors are only written to the error log. On a test server it can be helpful to write logs to the screen.'),
'#description'=>t('Where Drupal, PHP and SQL errors are logged. On a production server it is recommended that errors are only written to the error log. On a test server it can be helpful to write logs to the screen.')