diff options
-rw-r--r-- | includes/common.inc | 4 | ||||
-rw-r--r-- | modules/system/system.admin.inc | 10 |
2 files changed, 10 insertions, 4 deletions
diff --git a/includes/common.inc b/includes/common.inc index e1e2053d6..3ace4c637 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -378,8 +378,8 @@ function drupal_not_found() { drupal_set_page_content($return); $page = element_info('page'); - // To conserve CPU and bandwidth, omit the blocks. - $page['#show_blocks'] = FALSE; + // Optionally omit the blocks to conserve CPU and bandwidth. + $page['#show_blocks'] = variable_get('site_404_blocks', FALSE); print drupal_render_page($page); } diff --git a/modules/system/system.admin.inc b/modules/system/system.admin.inc index ba0024574..5425ae15f 100644 --- a/modules/system/system.admin.inc +++ b/modules/system/system.admin.inc @@ -1224,7 +1224,7 @@ function system_site_information_settings() { '#title' => t('Default 403 (access denied) page'), '#default_value' => '', '#size' => 40, - '#description' => t('This page is displayed when the requested document is denied to the current user. If unsure, specify nothing.'), + '#description' => t('This page is displayed when the requested document is denied to the current user. Leave blank to display a generic "access denied" page.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=') ); $form['site_404'] = array( @@ -1232,9 +1232,15 @@ function system_site_information_settings() { '#title' => t('Default 404 (not found) page'), '#default_value' => '', '#size' => 40, - '#description' => t('This page is displayed when no other content matches the requested document. If unsure, specify nothing.'), + '#description' => t('This page is displayed when no other content matches the requested document. Leave blank to display a generic "page not found" page.'), '#field_prefix' => url(NULL, array('absolute' => TRUE)) . (variable_get('clean_url', 0) ? '' : '?q=') ); + $form['site_404_blocks'] = array( + '#type' => 'checkbox', + '#title' => t('Display blocks on default 404 (not found) page'), + '#description' => t('Render all blocks on the default 404 (not found) page. Disabling blocks can help with performance but might leave users with a less functional site.'), + '#default_value' => variable_get('site_404_blocks', 0) + ); $form['#validate'][] = 'system_site_information_settings_validate'; return system_settings_form($form); |