From 20c02507ab2e9ea1f36910611b50b00f32a8365d Mon Sep 17 00:00:00 2001 From: pjmattal Date: Wed, 6 Apr 2005 03:25:28 +0000 Subject: fixed multiple maintainer mess --- web/lib/aur.inc | 14 ++++++++++++++ web/lib/pkgfuncs.inc | 12 ++++++++---- 2 files changed, 22 insertions(+), 4 deletions(-) (limited to 'web/lib') diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 793ef7c4..0563da86 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -56,6 +56,20 @@ function getDevelopers() { return $devs; } +# return an array of info for each user +function getUsers() { + $users = array(); + $dbh = db_connect(); + $q = "SELECT * FROM Users ORDER BY Username ASC"; + $result = db_query($q, $dbh); + if ($result) { + while ($row = mysql_fetch_assoc($result)) { + $users[$row["ID"]] = $row; + } + } + return $users; +} + # see if the visitor is already logged in # function check_sid() { diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc index bef63005..b5428dde 100644 --- a/web/lib/pkgfuncs.inc +++ b/web/lib/pkgfuncs.inc @@ -444,6 +444,7 @@ function pkg_search_page($SID="") { $cats = pkgCategories(); $devs = getDevelopers(); $tus = getTrustedUsers(); + $users = getUsers(); $dbh = db_connect(); @@ -827,10 +828,13 @@ function pkg_search_page($SID="") { # print the package manager, also determine if it is managed # $managed = 1; - if (isset($devs[$row["AURMaintainerUID"]])) { - print $devs[$row["AURMaintainerUID"]]["Username"]; - } elseif (isset($tus[$row["MaintainerUID"]])) { - print $tus[$row["MaintainerUID"]]["Username"]; + # if (isset($devs[$row["AURMaintainerUID"]])) { + # print $devs[$row["AURMaintainerUID"]]["Username"]; + # } else + # if (isset($tus[$row["MaintainerUID"]])) { + # print $tus[$row["MaintainerUID"]]["Username"]; + if (isset($users[$row["MaintainerUID"]])) { + print $users[$row["MaintainerUID"]]["Username"]; } else { print __("None"); $managed = 0; -- cgit v1.2.3-24-g4f1b