summaryrefslogtreecommitdiff
path: root/web/lib
diff options
context:
space:
mode:
Diffstat (limited to 'web/lib')
-rw-r--r--web/lib/DB.class.php2
-rw-r--r--web/lib/acctfuncs.inc.php12
-rw-r--r--web/lib/aur.inc.php14
-rw-r--r--web/lib/aurjson.class.php2
-rw-r--r--web/lib/pkgbasefuncs.inc.php28
-rw-r--r--web/lib/pkgreqfuncs.inc.php17
-rw-r--r--web/lib/stats.inc.php2
7 files changed, 39 insertions, 38 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 edd38ee..abc40c3 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -41,7 +41,7 @@ function html_format_pgp_fingerprint($fingerprint) {
/**
* Loads the account editing form, with any values that are already saved
*
- * @global array $SUPPORTED_LANGS Languages that are supported by the AUR
+ * @global array $SUPPORTED_LANGS Languages that are supported by the aurweb instance
* @param string $A Form to use, either UpdateAccount or NewAccount
* @param string $U The username to display
* @param string $T The account type of the displayed user
@@ -70,7 +70,7 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$P="",$C="",$R="",
/**
* Process information given to new/edit account form
*
- * @global array $SUPPORTED_LANGS Languages that are supported by the AUR
+ * @global array $SUPPORTED_LANGS Languages that are supported by the aurweb instance
* @param string $TYPE Either "edit" for editing or "new" for registering an account
* @param string $A Form to use, either UpdateAccount or NewAccount
* @param string $U The username for the account
@@ -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/aur.inc.php b/web/lib/aur.inc.php
index b410db5..3504662 100644
--- a/web/lib/aur.inc.php
+++ b/web/lib/aur.inc.php
@@ -345,11 +345,11 @@ function uid_from_sid($sid="") {
}
/**
- * Common AUR header displayed on all pages
+ * Common aurweb header displayed on all pages
*
* @global string $LANG Language selected by the visitor
- * @global array $SUPPORTED_LANGS Languages that are supported by the AUR
- * @param string $title Name of the AUR page to be displayed on browser
+ * @global array $SUPPORTED_LANGS Languages that are supported by the aurweb instance
+ * @param string $title Name of the aurweb page to be displayed on browser
*
* @return void
*/
@@ -362,9 +362,9 @@ function html_header($title="", $details=array()) {
}
/**
- * Common AUR footer displayed on all pages
+ * Common aurweb footer displayed on all pages
*
- * @param string $ver The AUR version
+ * @param string $ver The aurweb version
*
* @return void
*/
@@ -668,9 +668,9 @@ function bound($n, $min, $max) {
}
/**
- * Return the URL of the AUR root
+ * Return the URL of the aurweb root
*
- * @return string The URL of the AUR root
+ * @return string The URL of the aurweb root
*/
function aur_location() {
$location = config_get('options', 'aur_location');
diff --git a/web/lib/aurjson.class.php b/web/lib/aurjson.class.php
index debffc4..13b7427 100644
--- a/web/lib/aurjson.class.php
+++ b/web/lib/aurjson.class.php
@@ -3,7 +3,7 @@
include_once("aur.inc.php");
/*
- * This class defines a remote interface for fetching data from the AUR using
+ * This class defines a remote interface for fetching data from aurweb using
* JSON formatted elements.
*
* @package rpc
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);
diff --git a/web/lib/stats.inc.php b/web/lib/stats.inc.php
index 203be0a..eaa3321 100644
--- a/web/lib/stats.inc.php
+++ b/web/lib/stats.inc.php
@@ -58,7 +58,7 @@ function user_table($userid) {
* @return void
*/
function general_stats_table() {
- # AUR statistics
+ # aurweb statistics
$q = "SELECT COUNT(*) FROM PackageBases WHERE PackagerUID IS NOT NULL";
$unsupported_count = db_cache_value($q, 'unsupported_count');