diff --git a/core/modules/comment/comment.admin.inc b/core/modules/comment/comment.admin.inc index ac186cc..154d917 100644 --- a/core/modules/comment/comment.admin.inc +++ b/core/modules/comment/comment.admin.inc @@ -104,7 +104,7 @@ function comment_admin_overview($form, &$form_state, $arg) { // Ensure all nodes are statically cached so that we do not have to load them // individually when getting their labels below. node_load_multiple($nids); - $comments = comment_load_multiple($cids); + $comments = entity_load_multiple('comment', $cids); // Build a table listing the appropriate comments. $options = array(); diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index b38892d..33ed0ee 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -646,7 +646,7 @@ function comment_node_page_additions(EntityInterface $node) { $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED); $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50); if ($cids = comment_get_thread($node, $mode, $comments_per_page)) { - $comments = comment_load_multiple($cids); + $comments = entity_load_multiple('comment', $cids); comment_prepare_thread($comments); $build = comment_view_multiple($comments); $build['pager']['#theme'] = 'pager'; @@ -930,7 +930,7 @@ function comment_links(Comment $comment, EntityInterface $node) { * Constructs render array from an array of loaded comments. * * @param $comments - * An array of comments as returned by comment_load_multiple(). + * An array of comments as returned by entity_load_multiple(). * @param $view_mode * View mode, e.g. 'full', 'teaser'... * @param $langcode @@ -1211,7 +1211,7 @@ function comment_node_update_index(EntityInterface $node, $langcode) { $mode = variable_get('comment_default_mode_' . $node->type, COMMENT_MODE_THREADED); $comments_per_page = variable_get('comment_default_per_page_' . $node->type, 50); if ($node->comment && $cids = comment_get_thread($node, $mode, $comments_per_page)) { - $comments = comment_load_multiple($cids); + $comments = entity_load_multiple('comment', $cids); comment_prepare_thread($comments); $build = comment_view_multiple($comments, $langcode); return drupal_render($build); @@ -1278,24 +1278,6 @@ function comment_user_predelete($account) { } /** - * Loads comment entities from the database. - * - * @param array $cids - * (optional) An array of entity IDs. If omitted, all entities are loaded. - * @param bool $reset - * (optional) Whether to reset the internal static entity cache. - * - * @return array - * An array of comment objects, indexed by comment ID. - * - * @see entity_load() - * @see Drupal\Core\Entity\Query\QueryInterface - */ -function comment_load_multiple(array $cids = NULL, $reset = FALSE) { - return entity_load_multiple('comment', $cids, $reset); -} - -/** * Loads the entire comment by comment ID. * * @param int $cid diff --git a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php index eeaec0b..728c74c 100644 --- a/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php +++ b/core/modules/comment/lib/Drupal/comment/Plugin/views/row/Rss.php @@ -62,7 +62,7 @@ public function preRender($result) { $cids[] = $row->cid; } - $this->comments = comment_load_multiple($cids); + $this->comments = entity_load_multiple('comment', $cids); foreach ($this->comments as $comment) { $comment->depth = count(explode('.', $comment->thread->value)) - 1; }