Skip to content
Snippets Groups Projects
Commit d97d1aae authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2008990 by heddn, InternetDevels, giammi: Replace theme() with...

Issue #2008990 by heddn, InternetDevels, giammi: Replace theme() with drupal_render() in dblog module.
parent a5ae85b3
Branches
Tags
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
...@@ -97,6 +97,10 @@ function dblog_event($id) { ...@@ -97,6 +97,10 @@ function dblog_event($id) {
$message = t($dblog->message, unserialize($dblog->variables)); $message = t($dblog->message, unserialize($dblog->variables));
} }
} }
$username = array(
'#theme' => 'username',
'#account' => $dblog,
);
$rows = array( $rows = array(
array( array(
array('data' => t('Type'), 'header' => TRUE), array('data' => t('Type'), 'header' => TRUE),
...@@ -108,7 +112,7 @@ function dblog_event($id) { ...@@ -108,7 +112,7 @@ function dblog_event($id) {
), ),
array( array(
array('data' => t('User'), 'header' => TRUE), array('data' => t('User'), 'header' => TRUE),
theme('username', array('account' => $dblog)), drupal_render($username),
), ),
array( array(
array('data' => t('Location'), 'header' => TRUE), array('data' => t('Location'), 'header' => TRUE),
......
...@@ -162,6 +162,10 @@ public function overview() { ...@@ -162,6 +162,10 @@ public function overview() {
$message = l($log_text, 'admin/reports/event/' . $dblog->wid, array('html' => TRUE)); $message = l($log_text, 'admin/reports/event/' . $dblog->wid, array('html' => TRUE));
} }
} }
$username = array(
'#theme' => 'username',
'#account' => $dblog,
);
$rows[] = array( $rows[] = array(
'data' => array( 'data' => array(
// Cells. // Cells.
...@@ -169,7 +173,7 @@ public function overview() { ...@@ -169,7 +173,7 @@ public function overview() {
t($dblog->type), t($dblog->type),
format_date($dblog->timestamp, 'short'), format_date($dblog->timestamp, 'short'),
$message, $message,
theme('username', array('account' => $dblog)), array('data' => $username),
filter_xss($dblog->link), filter_xss($dblog->link),
), ),
// Attributes for table row. // Attributes for table row.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment