diff options
Diffstat (limited to 'web/lib')
-rw-r--r-- | web/lib/DB.class.php | 2 | ||||
-rw-r--r-- | web/lib/acctfuncs.inc.php | 8 | ||||
-rw-r--r-- | web/lib/pkgbasefuncs.inc.php | 28 | ||||
-rw-r--r-- | web/lib/pkgreqfuncs.inc.php | 17 |
4 files changed, 28 insertions, 27 deletions
diff --git a/web/lib/DB.class.php b/web/lib/DB.class.php index b538e0d..4c58c3c 100644 --- a/web/lib/DB.class.php +++ b/web/lib/DB.class.php @@ -32,7 +32,7 @@ class DB { self::$dbh = new PDO($dsn, $user, $password); self::$dbh->exec("SET NAMES 'utf8' COLLATE 'utf8_general_ci';"); } catch (PDOException $e) { - die('Error - Could not connect to AUR database'); + die('Error - Could not connect to ' . config_get('options', 'branding_shortname') . ' database'); } } diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php index 81118e8..abc40c3 100644 --- a/web/lib/acctfuncs.inc.php +++ b/web/lib/acctfuncs.inc.php @@ -294,7 +294,7 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$P="",$C="", return; } - $subject = 'Welcome to the Arch User Repository'; + $subject = __('Welcome to the %s', config_get('options', 'branding_longname')); $body = __('Welcome to %s! In order ' . 'to set an initial password ' . 'for your new account, ' . @@ -726,10 +726,10 @@ function send_resetkey($email, $subject, $body) { "?resetkey={$resetkey}"; $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . - "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . + "Reply-to: noreply@".config_get('options', 'email_domain')."\r\n" . + "From: notify@".config_get('options', 'email_domain')."\r\n" . "X-Mailer: PHP\r\n" . - "X-MimeOLE: Produced By AUR"; + "X-MimeOLE: Produced By ".config_get('options', 'branding_shortname'); @mail($email, $subject, $body, $headers); } diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php index 92202bf..09312ec 100644 --- a/web/lib/pkgbasefuncs.inc.php +++ b/web/lib/pkgbasefuncs.inc.php @@ -118,16 +118,16 @@ function pkgbase_add_comment($base_id, $uid, $comment) { . "\n\n---\nIf you no longer wish to receive notifications about this package, please go the the above package page and click the UnNotify button."; $body = wordwrap($body, 70); $bcc = implode(', ', $bcc); - $thread_id = "<pkg-notifications-" . $row['Name'] . "@aur.archlinux.org>"; + $thread_id = "<pkg-notifications-" . $row['Name'] . "@".config_get('options', 'email_domain').">"; $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . "Bcc: $bcc\r\n" . - "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . + "Reply-to: noreply@".config_get('options', 'email_domain')."\r\n" . + "From: notify@".config_get('options', 'email_domain')."\r\n" . "In-Reply-To: $thread_id\r\n" . "References: $thread_id\r\n" . - "X-Mailer: AUR"; - @mail('undisclosed-recipients: ;', "AUR Comment for " . $row['Name'], $body, $headers); + "X-Mailer: " . config_get('options', 'branding_shortname'); + @mail('undisclosed-recipients: ;', config_get('options', 'branding_shortname') . " Comment for " . $row['Name'], $body, $headers); } } @@ -375,11 +375,11 @@ function pkgbase_flag($base_ids) { $body = wordwrap($body, 70); $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . - "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . + "Reply-to: noreply@".config_get('options', 'email_domain')."\r\n" . + "From: notify@".config_get('options', 'email_domain')."\r\n" . "X-Mailer: PHP\r\n" . - "X-MimeOLE: Produced By AUR"; - @mail($row['Email'], "AUR Out-of-date Notification for ".$row['Name'], $body, $headers); + "X-MimeOLE: Produced By " . config_get('options', 'branding_shortname'); + @mail($row['Email'], config_get('options', 'branding_shortname') . " Out-of-date Notification for ".$row['Name'], $body, $headers); } } } @@ -475,7 +475,7 @@ function pkgbase_delete ($base_ids, $merge_base_id, $via, $grant=false) { $body = ""; if ($merge_base_id) { $body .= username_from_sid($_COOKIE['AURSID']) . " merged \"".$pkgbase_name."\" into \"$merge_base_name\".\n\n"; - $body .= "You will no longer receive notifications about this package, please go to https://aur.archlinux.org" . get_pkgbase_uri($merge_base_name) . " and click the Notify button if you wish to recieve them again."; + $body .= "You will no longer receive notifications about this package, please go to " . config_get('options', 'aur_location') . get_pkgbase_uri($merge_base_name) . " and click the Notify button if you wish to recieve them again."; } else { $body .= username_from_sid($_COOKIE['AURSID']) . " deleted \"".$pkgbase_name."\".\n\n"; $body .= "You will no longer receive notifications about this package."; @@ -485,10 +485,10 @@ function pkgbase_delete ($base_ids, $merge_base_id, $via, $grant=false) { $headers = "MIME-Version: 1.0\r\n" . "Content-type: text/plain; charset=UTF-8\r\n" . "Bcc: $bcc\r\n" . - "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . - "X-Mailer: AUR"; - @mail('undisclosed-recipients: ;', "AUR Package deleted: " . $pkgbase_name, $body, $headers); + "Reply-to: noreply@".config_get('options', 'email_domain')."\r\n" . + "From: notify@".config_get('options', 'email_domain')."\r\n" . + "X-Mailer: " . config_get('options', 'branding_shortname'); + @mail('undisclosed-recipients: ;', config_get('options', 'branding_shortname') . " Package deleted: " . $pkgbase_name, $body, $headers); } } 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 = "<pkg-request-" . $request_id . "@aur.archlinux.org>"; - $headers .= "From: notify@aur.archlinux.org\r\n" . + $thread_id = "<pkg-request-" . $request_id . "@".config_get('options', 'email_domain').">"; + $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 = "<pkg-request-" . $id . "@aur.archlinux.org>"; - $headers .= "From: notify@aur.archlinux.org\r\n" . + $thread_id = "<pkg-request-" . $id . "@".config_get('options', 'email_domain').">"; + $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); |