Commit 47768bfa authored by webchick's avatar webchick

#602484 by rschwab: Fix the report page when authorize.php completes an update manager operation.

parent a6634445
......@@ -146,7 +146,7 @@ function authorize_access_allowed() {
l(t('Front page'), '<front>'),
));
$output .= theme('item_list', array('items' => $links));
$output .= theme('item_list', array('items' => $links, 'title' => t('Next steps')));
}
// If a batch is running, let it run.
elseif (isset($_GET['batch'])) {
......
......@@ -176,13 +176,14 @@ function theme_authorize_report($variables) {
if (!empty($messages)) {
$output .= '<div id="authorize-results">';
foreach ($messages as $heading => $logs) {
$output .= '<h3>' . check_plain($heading) . '</h3>';
$items = array();
foreach ($logs as $number => $log_message) {
if ($number === '#abort') {
continue;
}
$output .= theme('authorize_message', array('message' => $log_message['message'], 'success' => $log_message['success']));
$items[] = theme('authorize_message', array('message' => $log_message['message'], 'success' => $log_message['success']));
}
$output .= theme('item_list', array('items' => $items, 'title' => $heading));
}
$output .= '</div>';
}
......@@ -200,14 +201,13 @@ function theme_authorize_report($variables) {
* @ingroup themeable
*/
function theme_authorize_message($variables) {
$output = '';
$message = $variables['message'];
$success = $variables['success'];
if ($success) {
$output .= '<li class="success">' . $message . '</li>';
$item = array('data' => $message, 'class' => array('success'));
}
else {
$output .= '<li class="failure"><strong>' . t('Failed') . ':</strong> ' . $message . '</li>';
$item = array('data' => '<strong>' . $message . '</strong>', 'class' => array('failure'));
}
return $output;
return $item;
}
......@@ -265,6 +265,7 @@ function update_authorize_install_batch_finished($success, $results) {
$_SESSION['authorize_results']['page_message'] = $page_message;
$_SESSION['authorize_results']['messages'] = $results['log'];
$_SESSION['authorize_results']['tasks'] = $results['tasks'];
$_SESSION['authorize_operation']['page_title'] = t('Drupal Update Manager');
}
/**
......
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