summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-07-29 17:50:11 +0200
committerLukas Fleischer <archlinux@cryptocrack.de>2014-07-29 17:52:09 +0200
commit98235c834b08c4528585fb46e0206699ccdbdecb (patch)
tree03b3328c3384e2bfe138f8da77b31ea2a8aa2746 /web
parentd136d7c874cd3fbc012ca43250c64deb9e791b94 (diff)
downloadaurweb-98235c834b08c4528585fb46e0206699ccdbdecb.tar.xz
Remove duplicate recipients from Cc
When a user files a request for a package maintained by himself, he is currently included in the Cc list twice. Use array_unique() to omit repeated entries. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web')
-rw-r--r--web/lib/pkgreqfuncs.inc.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php
index 8fba838..2ae64e0 100644
--- a/web/lib/pkgreqfuncs.inc.php
+++ b/web/lib/pkgreqfuncs.inc.php
@@ -173,6 +173,7 @@ function pkgreq_file($ids, $type, $merge_into, $comments) {
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
}
$body = wordwrap($body, 70);
+ $cc = array_unique($cc);
$headers = "MIME-Version: 1.0\r\n" .
"Content-type: text/plain; charset=UTF-8\r\n" .
"Cc: " . implode(', ', $cc) . "\r\n";
@@ -281,6 +282,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) {
$body .= "\n";
}
$body = wordwrap($body, 70);
+ $cc = array_unique($cc);
$headers = "MIME-Version: 1.0\r\n" .
"Content-type: text/plain; charset=UTF-8\r\n" .
"Cc: " . implode(', ', $cc) . "\r\n";