diff options
author | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-16 11:00:57 +0200 |
---|---|---|
committer | Lukas Fleischer <archlinux@cryptocrack.de> | 2014-07-16 11:11:23 +0200 |
commit | e9b13cef3f73996ead4361b7f601c2c8f0cb36db (patch) | |
tree | 488634812678f4ffa7d8d11243931e6e6f4786a4 /web/lib/pkgreqfuncs.inc.php | |
parent | 42d927366a2dc97b5d0c070232a8ddb4e215c2ba (diff) | |
download | aur-e9b13cef3f73996ead4361b7f601c2c8f0cb36db.tar.gz aur-e9b13cef3f73996ead4361b7f601c2c8f0cb36db.tar.xz |
Mention the target of merge requests in emails
When sending the initial notification email for a merge request, include
the name of the package base that is the target of the requested merge
operation.
Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgreqfuncs.inc.php')
-rw-r--r-- | web/lib/pkgreqfuncs.inc.php | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index 005825fa..fcab648a 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -148,11 +148,21 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { * user who posted the comment was in. */ $username = username_from_sid($_COOKIE['AURSID']); - $body = - $username . " [1] filed a " . $type . " request for " . - $row['Name'] . " [2]:\n\n" . $comments . "\n\n" . - "[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" . - "[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n"; + if ($type == 'merge') { + $body = + $username . " [1] filed a request to merge " . + $row['Name'] . " [2] into " . $merge_into . + " [3]:\n\n" . $comments . "\n\n" . + "[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" . + "[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n" . + "[3] " . $AUR_LOCATION . get_pkgbase_uri($merge_into) . "\n"; + } else { + $body = + $username . " [1] filed a " . $type . " request for " . + $row['Name'] . " [2]:\n\n" . $comments . "\n\n" . + "[1] " . $AUR_LOCATION . get_user_uri($username) . "\n" . + "[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n"; + } $body = wordwrap($body, 70); $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . |