mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Fix user name in disown notifications
Do not overwrite the $uid variable when updating co-maintainers. Fixes FS#52225. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
08f56e76d7
commit
31754909b1
1 changed files with 3 additions and 3 deletions
|
@ -680,15 +680,15 @@ function pkgbase_adopt ($base_ids, $action=true, $via) {
|
||||||
$comaintainers = pkgbase_get_comaintainers($base_id);
|
$comaintainers = pkgbase_get_comaintainers($base_id);
|
||||||
|
|
||||||
if (count($comaintainers) > 0) {
|
if (count($comaintainers) > 0) {
|
||||||
$uid = uid_from_username($comaintainers[0]);
|
$comaintainer_uid = uid_from_username($comaintainers[0]);
|
||||||
$comaintainers = array_diff($comaintainers, array($comaintainers[0]));
|
$comaintainers = array_diff($comaintainers, array($comaintainers[0]));
|
||||||
pkgbase_set_comaintainers($base_id, $comaintainers);
|
pkgbase_set_comaintainers($base_id, $comaintainers);
|
||||||
} else {
|
} else {
|
||||||
$uid = "NULL";
|
$comaintainer_uid = "NULL";
|
||||||
}
|
}
|
||||||
|
|
||||||
$q = "UPDATE PackageBases ";
|
$q = "UPDATE PackageBases ";
|
||||||
$q.= "SET MaintainerUID = " . $uid . " ";
|
$q.= "SET MaintainerUID = " . $comaintainer_uid . " ";
|
||||||
$q.= "WHERE ID = " . $base_id;
|
$q.= "WHERE ID = " . $base_id;
|
||||||
$dbh->exec($q);
|
$dbh->exec($q);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue