diff --git a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php index 234467c..5ffcc88 100644 --- a/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php +++ b/core/modules/comment/lib/Drupal/comment/Form/CommentAdminOverview.php @@ -8,6 +8,7 @@ namespace Drupal\comment\Form; use Drupal\comment\CommentStorageControllerInterface; +use Drupal\Component\Utility\Unicode; use Drupal\Core\Cache\Cache; use Drupal\Core\Database\Connection; use Drupal\Core\Datetime\Date; @@ -76,7 +77,6 @@ public static function create(ContainerInterface $container) { $container->get('database'), $container->get('date'), $container->get('module_handler') - ); } @@ -179,7 +179,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') { '#type' => 'link', '#title' => $comment->subject->value, '#href' => 'comment/' . $comment->id(), - '#options' => array('attributes' => array('title' => truncate_utf8($comment->comment_body->value, 128)), 'fragment' => 'comment-' . $comment->id()), + '#options' => array('attributes' => array('title' => Unicode::truncate($comment->comment_body->value, 128)), 'fragment' => 'comment-' . $comment->id()), ), ), 'author' => drupal_render($username), @@ -198,7 +198,7 @@ public function buildForm(array $form, array &$form_state, $type = 'new') { 'href' => 'comment/' . $comment->id() . '/edit', 'query' => $destination, ); - if ($this->moduleHandler->invoke('content_translation', 'translate_access', $comment)) { + if ($this->moduleHandler->invoke('content_translation', 'translate_access', array($comment))) { $links['translate'] = array( 'title' => $this->t('translate'), 'href' => 'comment/' . $comment->id() . '/translations',