diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index df5f43f..44df6bc 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -533,7 +533,7 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_ 'fragment' => 'comments', 'html' => TRUE, ); - if (module_exists('history')) { + if (Drupal::moduleHandler()->moduleExists('history')) { $links['comment-new-comments'] = array( 'title' => '', 'href' => '', @@ -612,7 +612,7 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_ '#links' => $links, '#attributes' => array('class' => array('links', 'inline')), ); - if ($view_mode == 'teaser' && module_exists('history')) { + if ($view_mode == 'teaser' && Drupal::moduleHandler()->moduleExists('history')) { $node->content['links']['#attached']['library'][] = array('comment', 'drupal.node-new-comments-link'); } @@ -630,7 +630,7 @@ function comment_node_view(EntityInterface $node, EntityDisplay $display, $view_ * Implements hook_node_view_alter(). */ function comment_node_view_alter(&$build, EntityInterface $node, EntityDisplay $display) { - if (module_exists('history')) { + if (Drupal::moduleHandler()->moduleExists('history')) { $build['#attributes']['data-history-node-id'] = $node->id(); } } diff --git a/core/modules/comment/lib/Drupal/comment/CommentRenderController.php b/core/modules/comment/lib/Drupal/comment/CommentRenderController.php index 71097b6..76fc0e6 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentRenderController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentRenderController.php @@ -73,7 +73,7 @@ public function buildContent(array $entities, array $displays, $view_mode, $lang $entity->content['#attached'] = array(); } $entity->content['#attached']['library'][] = array('comment', 'drupal.comment-by-viewer'); - if (module_exists('history') && $user->isAuthenticated()) { + if (Drupal::moduleHandler()->moduleExists('history') && $user->isAuthenticated()) { $entity->content['#attached']['library'][] = array('comment', 'drupal.comment-new-indicator'); } } diff --git a/core/modules/node/node.module b/core/modules/node/node.module index 211cf82..a19c50f 100644 --- a/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -589,7 +589,7 @@ function node_show(EntityInterface $node, $message = FALSE) { // Update the history table, stating that this user viewed this node. global $user; - if (module_exists('history') && $user->isAuthenticated()) { + if (Drupal::moduleHandler()->moduleExists('history') && $user->isAuthenticated()) { $page['#attached'] = array( 'js' => array( // When the window's "load" event is triggered, mark the node as read. diff --git a/core/modules/tracker/tracker.pages.inc b/core/modules/tracker/tracker.pages.inc index 073151b..b102360 100644 --- a/core/modules/tracker/tracker.pages.inc +++ b/core/modules/tracker/tracker.pages.inc @@ -143,7 +143,7 @@ function tracker_page($account = NULL, $set_title = FALSE) { ); $page['#sorted'] = TRUE; - if (module_exists('history') && $user->isAuthenticated()) { + if (Drupal::moduleHandler()->moduleExists('history') && $user->isAuthenticated()) { $page['#attached']['library'][] = array('tracker', 'drupal.tracker-history'); }