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

merge-requests/26/head
Angie Byron 2010-11-24 18:14:25 +00:00
parent a66344453b
commit 47768bfaa5
3 changed files with 8 additions and 7 deletions

View File

@ -146,7 +146,7 @@ if (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'])) {

View File

@ -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;
}

View File

@ -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');
}
/**