mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
fixed multiple maintainer mess
This commit is contained in:
parent
71b5b9e6b7
commit
20c02507ab
3 changed files with 49 additions and 28 deletions
|
@ -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() {
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue