Commit ab158d82 authored by Dries's avatar Dries
Browse files

- Patch #221399 by smk-ka, jeffschuler, lilou, earnie et al: make it possible...

- Patch #221399 by smk-ka, jeffschuler, lilou, earnie et al: make it possible to enable blocks on 404 pages.
parent f696a0ca
......@@ -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);
}
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment