commit 91f22c7511fd79c5dd9ed1e8e66e8b13cae47807 Author: Aaron Froehlich Date: Thu Jun 5 16:04:20 2014 -0500 2226863-8 Removed unecessary variable and trans diff --git a/core/modules/update/templates/update-last-check.html.twig b/core/modules/update/templates/update-last-check.html.twig index 9e70cee..90838c2 100644 --- a/core/modules/update/templates/update-last-check.html.twig +++ b/core/modules/update/templates/update-last-check.html.twig @@ -4,8 +4,8 @@ * Default theme implementation for the last of update data templates. * * Available variables: - * - last_checked: A flag indicating whether the site checked for updates. - * - time: The time the site last checked for updates. + * - last: The timestamp that the site was last checked for updates. + * - time: The formatted time since the site last checked for updates. * - link: A link to check for updates manually. * * @see template_preprocess_update_last_check() @@ -14,10 +14,8 @@ */ #}
- {% if last_checked %} - {% trans %} - Last checked: {{ time }} ago - {% endtrans %} + {% if last %} + {{ 'Last checked: @time ago'|t({'@time': time}) }} {% else %} {{ 'Last checked: never'|t }} {% endif %} diff --git a/core/modules/update/update.module b/core/modules/update/update.module index 8015051..120f348 100644 --- a/core/modules/update/update.module +++ b/core/modules/update/update.module @@ -177,7 +177,7 @@ function update_theme() { 'file' => 'update.manager.inc', ), 'update_last_check' => array( - 'variables' => array('last' => NULL), + 'variables' => array('last' => 0), 'template' => 'update-last-check', ), 'update_report' => array( @@ -573,9 +573,7 @@ function _update_project_status_sort($a, $b) { * @ingroup themeable */ function template_preprocess_update_last_check(&$variables) { - $last = $variables['last']; - $variables['last_checked'] = ($last != NULL); - $variables['time'] = format_interval(REQUEST_TIME - $last); + $variables['time'] = format_interval(REQUEST_TIME - $variables['last']); $variables['link'] = \Drupal::l(t('Check manually'), 'update.manual_status', array(), array('query' => drupal_get_destination())); }