From 7625a4e91ab81b52f5cd74cabe5b0e0324ef8bb4 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 1 Aug 2005 05:14:05 +0000 Subject: - Patch #27737 by Gerhard: format_name($object) -> theme('username', $object). Usernames can now be themed; eg. an icon/avatar could be added. TODO: update contributed modules + update the migration docs. --- modules/statistics/statistics.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/statistics') diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 4f10af1c9..4c9f40762 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -149,7 +149,7 @@ function statistics_access_log($aid) { $output .= ' '. t('Page title') .''. check_plain($access->title) .''; $output .= ' '. t('Referrer') ."". ($access->url ? l($access->url, $access->url) : '') .""; $output .= ' '. t('Date') .''. format_date($access->timestamp, 'large') .''; - $output .= ' '. t('User') .''. format_name($access) .''; + $output .= ' '. t('User') .''. theme('username', $access) .''; $output .= ' '. t('Hostname') .''. check_plain($access->hostname) .''; $output .= ''; return $output; @@ -173,7 +173,7 @@ function statistics_node_tracker() { $rows[] = array( array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), l(_statistics_column_width($log->url), $log->url), - format_name($log), + theme('username', $log), l(t('details'), "admin/logs/access/$log->aid")); } @@ -235,7 +235,7 @@ function statistics_recent_hits($type = 'all', $id = 0) { $rows[] = array( array('data' => format_date($log->timestamp, 'small'), 'class' => 'nowrap'), _statistics_format_item($log->title, $log->path), - format_name($log), + theme('username', $log), l(t('details'), "admin/logs/access/$log->aid")); } @@ -293,7 +293,7 @@ function statistics_top_visitors() { while ($account = db_fetch_object($result)) { $qs = drupal_get_destination(); $ban_link = $account->aid ? l(t('unban'), "admin/access/rules/delete/$account->aid", array(), $qs) : l(t('ban'), "admin/access/rules/add/$account->hostname/host", array(), $qs); - $rows[] = array($account->hits, ($account->uid ? format_name($account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link); + $rows[] = array($account->hits, ($account->uid ? theme('username', $account) : $account->hostname), format_interval(round($account->total / 1000)), $ban_link); } if ($pager = theme('pager', NULL, 30, 0, tablesort_pager())) { -- cgit v1.2.3