diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 064494d..a6ae9a2 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1157,7 +1157,7 @@ function comment_num_new($entity_id, $entity_type, $field_name = NULL, $timestam if ($account->isAuthenticated() && \Drupal::moduleHandler()->moduleExists('history')) { // Retrieve the timestamp at which the current user last viewed this entity. if (!$timestamp) { - $timestamp = \Drupal::service('history.manager')->getLastViewed($entity_type, array($entity_id), $account); + $timestamp = \Drupal::service('history.repository')->getLastViewed($entity_type, array($entity_id), $account); $timestamp = $timestamp[$entity_id]; } $timestamp = ($timestamp > HISTORY_READ_LIMIT ? $timestamp : HISTORY_READ_LIMIT); diff --git a/core/modules/history/history.module b/core/modules/history/history.module index 8bc07ad..a0dd96c 100644 --- a/core/modules/history/history.module +++ b/core/modules/history/history.module @@ -47,7 +47,7 @@ function history_help($path, $arg) { */ function history_read($nid) { $account = \Drupal::currentUser(); - $history = \Drupal::service('history.manager')->getLastViewed('node', array($nid), $account); + $history = \Drupal::service('history.repository')->getLastViewed('node', array($nid), $account); return $history[$nid]; } @@ -66,7 +66,7 @@ function history_read($nid) { */ function history_read_multiple($nids) { $account = \Drupal::currentUser(); - return \Drupal::service('history.manager')->getLastViewed('node', $nids, $account); + return \Drupal::service('history.repository')->getLastViewed('node', $nids, $account); } /** @@ -85,7 +85,7 @@ function history_write($nid, AccountInterface $account = NULL) { $account = \Drupal::currentUser(); } $node = entity_load('node', $nid); - \Drupal::service('history.manager')->updateLastViewed($node, $account); + \Drupal::service('history.repository')->updateLastViewed($node, $account); } /** @@ -181,7 +181,7 @@ function history_library_info() { */ function history_attach_timestamp(array $element, array $context) { $account = \Drupal::currentUser(); - $history = \Drupal::service('history.manager')->getLastViewed($context['entity_type'], array($context['entity_id']), $account); + $history = \Drupal::service('history.repository')->getLastViewed($context['entity_type'], array($context['entity_id']), $account); $element['#attached']['js'][] = array( 'type' => 'setting', 'data' => array(