Commit 37b3d5ca authored by Dries's avatar Dries

Issue #2073957 by herom, joelpittet, -enzo-: Remove useless 'early render' in Comment Module.

parent 85a5b1ee
......@@ -121,10 +121,6 @@ function comment_admin_overview($form, &$form_state, $arg) {
$entity_uri = $entity->uri();
// Remove the first node title from the node_titles array and attach to
// the comment.
$username = array(
'#theme' => 'username',
'#account' => comment_prepare_author($comment),
);
$body = '';
if (!empty($comment->comment_body->value)) {
$body = $comment->comment_body->value;
......@@ -139,7 +135,12 @@ function comment_admin_overview($form, &$form_state, $arg) {
'#options' => array('attributes' => array('title' => truncate_utf8($body, 128)), 'fragment' => 'comment-' . $comment->id()),
),
),
'author' => drupal_render($username),
'author' => array(
'data' => array(
'#theme' => 'username',
'#account' => comment_prepare_author($comment),
),
),
'posted_in' => array(
'data' => array(
'#type' => 'link',
......
......@@ -148,11 +148,8 @@ public function form(array $form, array &$form_state) {
elseif ($this->currentUser->isAuthenticated()) {
$form['author']['name']['#type'] = 'item';
$form['author']['name']['#value'] = $form['author']['name']['#default_value'];
$username = array(
'#theme' => 'username',
'#account' => $this->currentUser,
);
$form['author']['name']['#markup'] = drupal_render($username);
$form['author']['name']['#theme'] = 'username';
$form['author']['name']['#account'] = $this->currentUser;
}
// Add author e-mail and homepage fields depending on the current user.
......
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