diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2016-06-30 15:57:53 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-06-30 22:45:26 +0200 |
commit | 60cdad28eebf45ac2822155cea27277e1f7de455 (patch) | |
tree | ca6d776153967c9b7008d3dffeab34d1f69c6853 /web/lib | |
parent | fbf3e5405781f0f7ded67e99ab83bebc0737499d (diff) |
Distinguish auto-accepted requests
Before commit 9746a65 (Port notification routines to Python,
2015-06-27), notification emails for automatically closed requests
explicitly stated that the action was taken "automatically by the Arch
User Repository package request system". When porting the notification
routines to Python, this feature was overlooked and emails sent by the
new script always reported that the requester triggered the acceptance
or rejection of a request.
This patch reimplements the old behavior such that notifications no
longer look as if the requester had accepted the request himself.
Reported-by: Johannes Löthberg <johannes@kyriasis.com>
Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/pkgreqfuncs.inc.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index cf56663..8ceac8d 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -221,7 +221,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) { $dbh = DB::connect(); $id = intval($id); - $uid = uid_from_sid($_COOKIE["AURSID"]); + $uid = $auto_close ? 0 : uid_from_sid($_COOKIE["AURSID"]); if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) { return array(false, __("Only TUs and developers can close requests.")); |