Fixing construct_user_display()
authorRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 17:09:50 +0000 (13:09 -0400)
committerRobert Sesek <rsesek@bluestatic.org>
Thu, 26 Jun 2008 17:09:50 +0000 (13:09 -0400)
* includes/functions.php:
(construct_user_display): Convert to the BSTemplate
* templates/username_display.tpl

includes/functions.php
templates/username_display.tpl

index 38f494289be961b311d4250c862bb081ad3186c4..ac960bcaa04b71e577785477a5644ade2dad6f41 100755 (executable)
@@ -59,12 +59,15 @@ function construct_option_select($name, $array, $selected = 0, $valuekey = '', $
        return '<select class="input" name="' . $name . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" size="' . (sizeof($array) < 8 ? sizeof($array) + 1 : 8) . '"' : '') . '>' . implode("\n\t", $opts) . "\r</select>";
 }
 
-// ################### 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');
index 49cc015d05565c02cd4254b6b5888727104c381c..73abcfe44838e7857b5a954ac33133aa041b0d78 100644 (file)
@@ -1 +1 @@
-<span title="<lang 1="$userinfo[userid]">{@"User ID: %1$s"}</lang>"><% if ($userinfo['showemail']): %><a href="mailto:$userinfo[email]"><%- $userinfo['displayname'] %></a><% else: %><%- $userinfo['displayname'] %><% endif %></span>
\ No newline at end of file
+<span title="<%- sprintf(T('User ID: %1$s'), $userinfo['userid']) %>"><% if ($userinfo['showemail']): %><a href="mailto:<%- $userinfo['email'] %>"><%- $userinfo['displayname'] %></a><% else: %><%- $userinfo['displayname'] %><% endif %></span>
\ No newline at end of file