Commit 62a8bf60 authored by Dries's avatar Dries
Browse files

- Patch #807396 by Berdir, carlos8f, David_Rothstein: database errors not...

- Patch #807396 by Berdir, carlos8f, David_Rothstein: database errors not displaying during install.
parent 4b256665
......@@ -700,7 +700,7 @@ function install_display_output($output, $install_state) {
$active_task = $install_state['installation_finished'] ? NULL : $install_state['active_task'];
drupal_add_region_content('sidebar_first', theme('task_list', array('items' => install_tasks_to_display($install_state), 'active' => $active_task)));
}
print theme($install_state['database_tables_exist'] ? 'maintenance_page' : 'install_page', array('content' => $output));
print theme('install_page', array('content' => $output));
exit;
}
......
......@@ -141,33 +141,6 @@ function theme_task_list($variables) {
*/
function theme_install_page($variables) {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
// Delay setting the message variable so it can be processed below.
$variables['show_messages'] = FALSE;
// Special handling of error messages
$messages = drupal_set_message();
if (isset($messages['error'])) {
$title = count($messages['error']) > 1 ? st('The following errors must be resolved before you can continue the installation process') : st('The following error must be resolved before you can continue the installation process');
$variables['messages'] .= '<h3>' . $title . ':</h3>';
$variables['messages'] .= theme('status_messages', array('display' => 'error'));
$variables['content'] .= '<p>' . st('Check the error messages and <a href="!url">try again</a>.', array('!url' => check_url(request_uri()))) . '</p>';
}
// Special handling of warning messages
if (isset($messages['warning'])) {
$title = count($messages['warning']) > 1 ? st('The following installation warnings should be carefully reviewed') : st('The following installation warning should be carefully reviewed');
$variables['messages'] .= '<h4>' . $title . ':</h4>';
$variables['messages'] .= theme('status_messages', array('display' => 'warning'));
}
// Special handling of status messages
if (isset($messages['status'])) {
$title = count($messages['status']) > 1 ? st('The following installation warnings should be carefully reviewed, but in most cases may be safely ignored') : st('The following installation warning should be carefully reviewed, but in most cases may be safely ignored');
$variables['messages'] .= '<h4>' . $title . ':</h4>';
$variables['messages'] .= theme('status_messages', array('display' => 'status'));
}
return theme('maintenance_page', $variables);
}
......
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