From 297a03bffd1d9aaaead7b8984ce86c1e64385ba9 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Thu, 26 Jun 2008 13:09:50 -0400 Subject: [PATCH] Fixing construct_user_display() * includes/functions.php: (construct_user_display): Convert to the BSTemplate * templates/username_display.tpl --- includes/functions.php | 11 +++++++---- templates/username_display.tpl | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 38f4942..ac960bc 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -59,12 +59,15 @@ function construct_option_select($name, $array, $selected = 0, $valuekey = '', $ return '"; } -// ################### Start construct_user_display ################## -// $userinfo needs userid, email, displayname, and showemail +/** + * Constructs the user information link + * + * @param array Userinfo array - requires userid, email, displayname, and showemail values + * @param bool Return HTML or just a string? + * @return string + */ function construct_user_display($userinfo, $html = true) { - global $bugsys; - if (!$userinfo['userid']) { $userinfo['displayname'] = T('Guest'); diff --git a/templates/username_display.tpl b/templates/username_display.tpl index 49cc015..73abcfe 100644 --- a/templates/username_display.tpl +++ b/templates/username_display.tpl @@ -1 +1 @@ -{@"User ID: %1$s"}"><% if ($userinfo['showemail']): %><%- $userinfo['displayname'] %><% else: %><%- $userinfo['displayname'] %><% endif %> \ No newline at end of file +<% if ($userinfo['showemail']): %><%- $userinfo['displayname'] %><% else: %><%- $userinfo['displayname'] %><% endif %> \ No newline at end of file -- 2.43.5