Commit 31754909 authored by Lukas Fleischer's avatar Lukas Fleischer
Browse files

Fix user name in disown notifications



Do not overwrite the $uid variable when updating co-maintainers.

Fixes FS#52225.
Signed-off-by: Lukas Fleischer's avatarLukas Fleischer <lfleischer@archlinux.org>
parent 08f56e76
...@@ -680,15 +680,15 @@ function pkgbase_adopt ($base_ids, $action=true, $via) { ...@@ -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);
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment