mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Send notifications when changing ownership
Add a new option that makes it possible to subscribe to package ownership changes (adoption/disownment). Fixes FS#15412. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
c23914fc1d
commit
6ec4a3589e
5 changed files with 65 additions and 3 deletions
|
@ -661,6 +661,9 @@ function pkgbase_adopt ($base_ids, $action=true, $via) {
|
|||
$q.= "SET MaintainerUID = $uid ";
|
||||
$q.= "WHERE ID IN (" . implode(",", $base_ids) . ") ";
|
||||
$dbh->exec($q);
|
||||
|
||||
/* Add the new maintainer to the notification list. */
|
||||
pkgbase_notify($base_ids);
|
||||
} else {
|
||||
/* Update the co-maintainer list when disowning a package. */
|
||||
if (has_credential(CRED_PKGBASE_DISOWN)) {
|
||||
|
@ -692,8 +695,11 @@ function pkgbase_adopt ($base_ids, $action=true, $via) {
|
|||
}
|
||||
}
|
||||
|
||||
foreach ($base_ids as $base_id) {
|
||||
notify(array($action ? 'adopt' : 'disown', $base_id, $uid));
|
||||
}
|
||||
|
||||
if ($action) {
|
||||
pkgbase_notify($base_ids);
|
||||
return array(true, __("The selected packages have been adopted."));
|
||||
} else {
|
||||
return array(true, __("The selected packages have been disowned."));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue