From 36d5732ff8a06e72fb4ec6abe519850ef0912711 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Sat, 20 Jul 2013 20:35:36 +0100 Subject: [PATCH] Issue #2009688 by tsphethean, aaronott: Replace theme() with drupal_render() in update module. --- core/update.php | 33 ++++++++++++++++++++++++++++----- 1 file changed, 28 insertions(+), 5 deletions(-) diff --git a/core/update.php b/core/update.php index fba6b86f8429..607a1b7aa8de 100644 --- a/core/update.php +++ b/core/update.php @@ -225,7 +225,11 @@ function update_results_page() { $output .= "

Reminder: don't forget to set the \$settings['update_free_access'] value in your settings.php file back to FALSE.

"; } - $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 try again.'; 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 @@ if (isset($output) && $output) { } 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); } }