From 1fc3ca62eeb334f55fc1ac6503df00f7e06edbb1 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 23 Nov 2016 00:12:05 -0500 Subject: Make the instance name and domain configurable. --- web/lib/pkgreqfuncs.inc.php | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'web/lib/pkgreqfuncs.inc.php') diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index c056d68..ea4a5eb 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -199,10 +199,10 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . "Cc: " . implode(', ', $cc) . "\r\n"; - $thread_id = ""; - $headers .= "From: notify@aur.archlinux.org\r\n" . + $thread_id = ""; + $headers .= "From: notify@".config_get('options', 'email_domain')."\r\n" . "Message-ID: $thread_id\r\n" . - "X-Mailer: AUR"; + "X-Mailer: " . config_get('options', 'branding_shortname'); $ml = config_get('options', 'aur_request_ml'); @mail($ml, "[PRQ#" . $request_id . "] " . ucfirst($type) . " Request for " . $row['Name'], $body, $headers); @@ -302,8 +302,9 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) { */ if ($auto_close) { $body = "Request #" . intval($id) . " has been " . $reason . - " automatically by the Arch User Repository package " . - "request system"; + " automatically by the " . + config_get('options', 'branding_longname') . + " package request system"; } else { $username = username_from_sid($_COOKIE['AURSID']); $body = "Request #" . intval($id) . " has been " . $reason . @@ -324,11 +325,11 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) { $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . "Cc: " . implode(', ', $cc) . "\r\n"; - $thread_id = ""; - $headers .= "From: notify@aur.archlinux.org\r\n" . + $thread_id = ""; + $headers .= "From: notify@".config_get('options', 'email_domain')."\r\n" . "In-Reply-To: $thread_id\r\n" . "References: $thread_id\r\n" . - "X-Mailer: AUR"; + "X-Mailer: " . config_get('options', 'branding_shortname'); $ml = config_get('options', 'aur_request_ml'); @mail($ml, "[PRQ#" . $id . "] Request " . ucfirst($reason), $body, $headers); -- cgit v1.2.3-54-g00ecf