Commit 36d5732f authored by alexpott's avatar alexpott
Browse files

Issue #2009688 by tsphethean, aaronott: Replace theme() with drupal_render() in update module.

parent 91fbd4b5
......@@ -225,7 +225,11 @@ function update_results_page() {
$output .= "<p><strong>Reminder: don't forget to set the <code>\$settings['update_free_access']</code> value in your <code>settings.php</code> file back to <code>FALSE</code>.</strong></p>";
}
$output .= theme('links', array('links' => update_helpful_links()));
$links = array(
'#theme' => 'links',
'#links' => update_helpful_links(),
);
$output .= drupal_render($links);
// Output a list of queries executed.
if (!empty($_SESSION['update_results'])) {
......@@ -371,7 +375,13 @@ function update_task_list($active = NULL) {
'finished' => 'Review log',
);
drupal_add_region_content('sidebar_first', theme('task_list', array('items' => $tasks, 'active' => $active)));
$task_list = array(
'#theme' => 'task_list',
'#items' => $tasks,
'#active' => $active,
);
drupal_add_region_content('sidebar_first', drupal_render($task_list));
}
/**
......@@ -404,10 +414,18 @@ function update_check_requirements($skip_warnings = FALSE) {
if ($severity == REQUIREMENT_ERROR || ($severity == REQUIREMENT_WARNING && !$skip_warnings)) {
update_task_list('requirements');
drupal_set_title('Requirements problem');
$status_report = theme('status_report', array('requirements' => $requirements));
$status = array(
'#theme' => 'status_report',
'#requirements' => $requirements,
);
$status_report = drupal_render($status);
$status_report .= 'Check the messages and <a href="' . check_url(drupal_requirements_url($severity)) . '">try again</a>.';
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
print theme('maintenance_page', array('content' => $status_report));
$maintenance_page = array(
'#theme' => 'maintenance_page',
'#content' => $status_report,
);
print drupal_render($maintenance_page);
exit();
}
}
......@@ -546,6 +564,11 @@ function update_check_requirements($skip_warnings = FALSE) {
}
else {
drupal_add_http_header('Content-Type', 'text/html; charset=utf-8');
print theme('maintenance_page', array('content' => $output, 'show_messages' => !$progress_page));
$maintenance_page = array(
'#theme' => 'maintenance_page',
'#content' => $output,
'#show_messages' => !$progress_page,
);
print drupal_render($maintenance_page);
}
}
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