diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2015-10-17 14:48:10 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2015-10-17 17:33:45 +0200 |
commit | 4411a55ec9a131619e8e8f33c2fe2b8d3da21ee2 (patch) | |
tree | 7f0a4b5749c2d285587ba9e3d25b8b427eca08ac /web | |
parent | 2f6471b0b1c039e653a8787e5faeaa13dabb2e46 (diff) |
Send notifications when changing co-maintainership
Implements FS#45590.
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web')
-rw-r--r-- | web/lib/pkgbasefuncs.inc.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index bb9d241..aad9d14 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -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.")); |