Skip to content
Snippets Groups Projects
Commit a9cb984f authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2203853 by sidharthap, YesCT: Duplicate case 'name': unreachable in...

Issue #2203853 by sidharthap, YesCT: Duplicate case 'name': unreachable in comment_tokens(), remove one.
parent 2a1d8d14
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -142,11 +142,6 @@ function comment_tokens($type, $tokens, array $data = array(), array $options = ...@@ -142,11 +142,6 @@ function comment_tokens($type, $tokens, array $data = array(), array $options =
$replacements[$original] = $sanitize ? check_plain($comment->getHostname()) : $comment->getHostname(); $replacements[$original] = $sanitize ? check_plain($comment->getHostname()) : $comment->getHostname();
break; break;
case 'name':
$name = ($comment->getOwnerId() == 0) ? \Drupal::config('user.settings')->get('anonymous') : $comment->getAuthorName();
$replacements[$original] = $sanitize ? filter_xss($name) : $name;
break;
case 'mail': case 'mail':
$mail = $comment->getAuthorEmail(); $mail = $comment->getAuthorEmail();
$replacements[$original] = $sanitize ? check_plain($mail) : $mail; $replacements[$original] = $sanitize ? check_plain($mail) : $mail;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment