summaryrefslogtreecommitdiffstats
path: root/globals.pl
diff options
context:
space:
mode:
authorcyeh%bluemartini.com <>2000-04-26 10:43:51 +0200
committercyeh%bluemartini.com <>2000-04-26 10:43:51 +0200
commit14f53bd7f091ae5dd40671ad1154ed11be7a2c8e (patch)
tree22130c5e79fe8bc08880ac6a35fc293f9dd694ec /globals.pl
parente057014bdfe4e7441f44da458eabec52b13c7b22 (diff)
downloadbugzilla-14f53bd7f091ae5dd40671ad1154ed11be7a2c8e.tar.gz
bugzilla-14f53bd7f091ae5dd40671ad1154ed11be7a2c8e.tar.xz
better implementation of realnames support. remove overhead of two sql
calls from bug_form.
Diffstat (limited to 'globals.pl')
-rw-r--r--globals.pl10
1 files changed, 5 insertions, 5 deletions
diff --git a/globals.pl b/globals.pl
index 948fa7feb..32772df56 100644
--- a/globals.pl
+++ b/globals.pl
@@ -546,14 +546,14 @@ sub InsertNewUser {
return $password;
}
-sub DBID_to_real_name {
+sub DBID_to_real_or_loginname {
my ($id) = (@_);
- SendSQL("SELECT realname FROM profiles WHERE userid = $id");
- my ($r) = FetchSQLData();
+ SendSQL("SELECT login_name,realname FROM profiles WHERE userid = $id");
+ my ($l, $r) = FetchSQLData();
if ($r eq "") {
- return;
+ return $l;
} else {
- return "($r)";
+ return "$l ($r)";
}
}