diff --git a/core/modules/update/templates/update-version.html.twig b/core/modules/update/templates/update-version.html.twig index 119a781..ee81f14 100644 --- a/core/modules/update/templates/update-version.html.twig +++ b/core/modules/update/templates/update-version.html.twig @@ -5,9 +5,9 @@ * * Available variables: * - attributes: HTML attributes for the update versions table. - * - version_link: @todo. + * - version_link: Link to this version's release notes on drupal.org. * - version_date: The date of the release. - * - version_links: @todo. + * - version_links: Links to download this version and to this version's release notes. * - tag: The title of the project. * * @see template_preprocess() diff --git a/core/modules/update/update.report.inc b/core/modules/update/update.report.inc index ae14ada..356825f 100644 --- a/core/modules/update/update.report.inc +++ b/core/modules/update/update.report.inc @@ -8,43 +8,6 @@ use Drupal\Core\Template\Attribute; /** - * Page callback: Generates a page about the update status of projects. - * - * @see update_menu() - */ -function update_status() { - $build = array(); - $last = state()->get('update.last_check') ?: 0; - $build['last_check'] = array( - '#theme' => 'update_last_check', - '#last' => $last, - ); - if ($available = update_get_available(TRUE)) { - module_load_include('inc', 'update', 'update.compare'); - $data = update_calculate_project_data($available); - } - else { - $data = _update_no_data(); - } - - if (!is_array($data)) { - $build['data'] = array( - '#markup' => $data, - '#prefix' => '

', - '#suffix' => '

', - ); - return $build; - } - - $build['report'] = array( - '#theme' => 'update_report', - '#data' => $data, - ); - - return $build; -} - -/** * Prepares variables for project status report templates. * * Default template: update-report.html.twig. @@ -60,10 +23,6 @@ function template_preprocess_update_report(&$variables) { $notification_level = Drupal::config('update.settings')->get('notification.threshold'); $last = Drupal::state()->get('update.last_check') ?: 0; - $update_last_check = array( - '#theme' => 'update_last_check', - '#last' => $last, - ); $variables['last_checked'] = ($last != NULL); $variables['time'] = format_interval(REQUEST_TIME - $last); $variables['link'] = l(t('Check manually'), 'admin/reports/updates/check', array('query' => drupal_get_destination())); @@ -290,26 +249,28 @@ function template_preprocess_update_report(&$variables) { asort($project['base_themes']); $base_themes = array(); foreach ($project['base_themes'] as $base_key => $base_theme) { - $update_status_label = array( - '#theme' => 'update_status_label', - '#status' => $status[$base_key], - ); switch ($status[$base_key]) { case UPDATE_NOT_SECURE: + $status_label = t('Security update required!'); + break; case UPDATE_REVOKED: + $status_label = t('Revoked!'); + break; 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' => drupal_render($status_label), - )); + $status_label = t('Not supported!'); break; - default: - $base_themes[] = drupal_placeholder($base_theme); + $status_label = ''; + } + + if ($status_label) { + $base_themes[] = t('%base_theme (!base_label)', array( + '%base_theme' => $base_theme, + '!base_label' => $status_label, + )); + } + else { + $base_themes[] = drupal_placeholder($base_theme); } } $row['base_themes'] = $base_themes; @@ -366,9 +327,6 @@ function template_preprocess_update_report(&$variables) { function template_preprocess_update_version(&$variables) { $version = $variables['version']; - // Remove 'update_version' from the attributes array. This is added through - // template_preprocess() but we do not need it. - // @todo Remove after http://drupal.org/node/1938430 is resolved. $attributes = array('class' => array('version')); $variables['attributes'] = new Attribute($attributes);