mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
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>
This commit is contained in:
parent
d136d7c874
commit
98235c834b
1 changed files with 2 additions and 0 deletions
|
@ -173,6 +173,7 @@ function pkgreq_file($ids, $type, $merge_into, $comments) {
|
||||||
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
|
"[2] " . $AUR_LOCATION . get_pkgbase_uri($row['Name']) . "\n";
|
||||||
}
|
}
|
||||||
$body = wordwrap($body, 70);
|
$body = wordwrap($body, 70);
|
||||||
|
$cc = array_unique($cc);
|
||||||
$headers = "MIME-Version: 1.0\r\n" .
|
$headers = "MIME-Version: 1.0\r\n" .
|
||||||
"Content-type: text/plain; charset=UTF-8\r\n" .
|
"Content-type: text/plain; charset=UTF-8\r\n" .
|
||||||
"Cc: " . implode(', ', $cc) . "\r\n";
|
"Cc: " . implode(', ', $cc) . "\r\n";
|
||||||
|
@ -281,6 +282,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) {
|
||||||
$body .= "\n";
|
$body .= "\n";
|
||||||
}
|
}
|
||||||
$body = wordwrap($body, 70);
|
$body = wordwrap($body, 70);
|
||||||
|
$cc = array_unique($cc);
|
||||||
$headers = "MIME-Version: 1.0\r\n" .
|
$headers = "MIME-Version: 1.0\r\n" .
|
||||||
"Content-type: text/plain; charset=UTF-8\r\n" .
|
"Content-type: text/plain; charset=UTF-8\r\n" .
|
||||||
"Cc: " . implode(', ', $cc) . "\r\n";
|
"Cc: " . implode(', ', $cc) . "\r\n";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue