Commit a9cb984f authored by webchick's avatar webchick

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
...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment