commit 74cf1afc51110123cacbface6ecc3cada757a729 Author: Joel Pittet Date: Thu Apr 18 20:50:46 2013 -0700 remove theme() replace with drupal_render for both status_label's diff --git a/core/modules/update/templates/update-report.html.twig b/core/modules/update/templates/update-report.html.twig index 562838b..8e97022 100644 --- a/core/modules/update/templates/update-report.html.twig +++ b/core/modules/update/templates/update-report.html.twig @@ -39,7 +39,7 @@ {% spaceless %}
- {{ project.status_label|default(project.reason) }} + {{- project.status_label|default(project.reason) -}} {{ project.icon }}
{% endspaceless %} diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index 1bb30fc..973d4a1 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -125,10 +125,14 @@ function template_preprocess_update_report(&$variables) { $row = array(); $row['attributes'] = new Attribute(array('class' => $class)); $row['icon'] = $icon; - $row['status_label'] = array( + + // Rendered status label here because we can't check that a TwigReference + // is empty in the twig file. + $status_label = array( '#theme' => 'update_status_label', '#status' => $project['status'], ); + $row['status_label'] = drupal_render($status_label); if (!empty($project['reason'])) { $row['reason'] = check_plain($project['reason']); @@ -277,9 +281,13 @@ function template_preprocess_update_report(&$variables) { case UPDATE_NOT_SECURE: case UPDATE_REVOKED: case UPDATE_NOT_SUPPORTED: + $status_label = array( + '#theme' => 'update_status_label', + '#status' => $status[$base_key], + ); $base_themes[] = t('%base_theme (!base_label)', array( '%base_theme' => $base_theme, - '!base_label' => theme('update_status_label', array('status' => $status[$base_key])), + '!base_label' => drupal_render($status_label), )); break;