Mercurial > hg > cmmr2012-drupal-site
comparison core/modules/statistics/statistics.tokens.inc @ 5:12f9dff5fda9 tip
Update to Drupal core 8.7.1
author | Chris Cannam |
---|---|
date | Thu, 09 May 2019 15:34:47 +0100 |
parents | c75dbcec494b |
children |
comparison
equal
deleted
inserted
replaced
4:a9cd425dd02b | 5:12f9dff5fda9 |
---|---|
50 $statistics = statistics_get($node->id()); | 50 $statistics = statistics_get($node->id()); |
51 $replacements[$original] = $statistics['daycount']; | 51 $replacements[$original] = $statistics['daycount']; |
52 } | 52 } |
53 elseif ($name == 'last-view') { | 53 elseif ($name == 'last-view') { |
54 $statistics = statistics_get($node->id()); | 54 $statistics = statistics_get($node->id()); |
55 $replacements[$original] = format_date($statistics['timestamp']); | 55 $replacements[$original] = \Drupal::service('date.formatter')->format($statistics['timestamp']); |
56 } | 56 } |
57 } | 57 } |
58 | 58 |
59 if ($created_tokens = $token_service->findWithPrefix($tokens, 'last-view')) { | 59 if ($created_tokens = $token_service->findWithPrefix($tokens, 'last-view')) { |
60 $statistics = statistics_get($node->id()); | 60 $statistics = statistics_get($node->id()); |