mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Send notifications when changing co-maintainership
Implements FS#45590. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
2f6471b0b1
commit
4411a55ec9
2 changed files with 33 additions and 0 deletions
|
@ -1048,6 +1048,7 @@ function pkgbase_set_comaintainers($base_id, $users) {
|
|||
foreach ($uids_new as $uid) {
|
||||
if (in_array($uid, $uids_add)) {
|
||||
$q = sprintf("INSERT INTO PackageComaintainers (PackageBaseID, UsersID, Priority) VALUES (%d, %d, %d)", $base_id, $uid, $i);
|
||||
notify(array('comaintainer-add', $base_id, $uid));
|
||||
} else {
|
||||
$q = sprintf("UPDATE PackageComaintainers SET Priority = %d WHERE PackageBaseID = %d AND UsersID = %d", $i, $base_id, $uid);
|
||||
}
|
||||
|
@ -1059,6 +1060,7 @@ function pkgbase_set_comaintainers($base_id, $users) {
|
|||
foreach ($uids_rem as $uid) {
|
||||
$q = sprintf("DELETE FROM PackageComaintainers WHERE PackageBaseID = %d AND UsersID = %d", $base_id, $uid);
|
||||
$dbh->exec($q);
|
||||
notify(array('comaintainer-remove', $base_id, $uid));
|
||||
}
|
||||
|
||||
return array(true, __("The package base co-maintainers have been updated."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue