From f308ac796b6e24b216b68aeac0d456d21c3b37f3 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/html/home.php | 28 +++++++++++++++++----------- web/html/login.php | 4 ++-- web/html/pkgdel.php | 4 ++-- web/html/rss.php | 8 ++++---- web/lib/DB.class.php | 2 +- web/template/account_delete.php | 3 ++- web/template/account_edit_form.php | 2 +- web/template/footer.php | 2 +- web/template/header.php | 8 ++++---- web/template/stats/updates_table.php | 2 +- 10 files changed, 35 insertions(+), 28 deletions(-) (limited to 'web') diff --git a/web/html/home.php b/web/html/home.php index 475370b..204e00d 100644 --- a/web/html/home.php +++ b/web/html/home.php @@ -15,14 +15,17 @@ html_header( __("Home") );
-

AUR

+

', + config_get('options', 'branding_shortname'), '', '', + config_get('options', 'branding_shortname'), '' ); ?> @@ -58,7 +61,7 @@ html_header( __("Home") );

  • :
  • -
  • :
  • +
  • :
  • :

@@ -76,7 +79,8 @@ html_header( __("Home") );

', '' ); @@ -84,7 +88,7 @@ html_header( __("Home") );

- +

    $fingerprint): ?> @@ -98,11 +102,12 @@ html_header( __("Home") );

    ', - '', - '', - '' + 'General discussion regarding the %s (%s) and Trusted User structure takes place on %s. For discussion relating to the development of the %s web interface (aurweb), use the %s mailing list.', + config_get('options', 'branding_longname'), + config_get('options', 'branding_shortname'), + 'aur-general', + config_get('options', 'branding_shortname'), + 'aur-dev' ); ?>

    @@ -112,7 +117,8 @@ html_header( __("Home") );

    ', '', '', diff --git a/web/html/login.php b/web/html/login.php index 7345439..f6b5b87 100644 --- a/web/html/login.php +++ b/web/html/login.php @@ -11,10 +11,10 @@ if (!$disable_http_login || (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'])) { $login_error = $login['error']; } -html_header('AUR ' . __("Login")); +html_header(config_get('options', 'branding_shortname') . ' ' . __("Login")); ?>

    -

    AUR

    +

    ' . username_from_sid($_COOKIE["AURSID"]) . ''); ?> diff --git a/web/html/pkgdel.php b/web/html/pkgdel.php index 21a2677..f32ff47 100644 --- a/web/html/pkgdel.php +++ b/web/html/pkgdel.php @@ -14,8 +14,8 @@ if (has_credential(CRED_PKGBASE_DELETE)): ?>

    :

    - ', htmlspecialchars($pkgbase_name), ''); ?> + ', htmlspecialchars($pkgbase_name), '', config_get('options', 'branding_shortname')); ?>

      diff --git a/web/html/rss.php b/web/html/rss.php index 8585d81..2ecf218 100644 --- a/web/html/rss.php +++ b/web/html/rss.php @@ -26,15 +26,15 @@ $rss->xslStyleSheet = false; $rss->encoding = "UTF-8"; #All the general RSS setup -$rss->title = "AUR Newest Packages"; -$rss->description = "The latest and greatest packages in the AUR"; +$rss->title = config_get('options', 'branding_shortname') . " Newest Packages"; +$rss->description = "The latest and greatest packages in the " . config_get('options', 'branding_shortname'); $rss->link = "${protocol}://{$host}"; $rss->syndicationURL = "{$protocol}://{$host}" . get_uri('/rss/'); $image = new FeedImage(); -$image->title = "AUR"; +$image->title = config_get('options', 'branding_shortname'); $image->url = "{$protocol}://{$host}/css/archnavbar/aurlogo.png"; $image->link = $rss->link; -$image->description = "AUR Newest Packages Feed"; +$image->description = config_get('options', 'branding_shortname') . " Newest Packages Feed"; $rss->image = $image; #Get the latest packages and add items for them 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/template/account_delete.php b/web/template/account_delete.php index 74f386d..6a874f5 100644 --- a/web/template/account_delete.php +++ b/web/template/account_delete.php @@ -1,5 +1,6 @@

      - ' . htmlspecialchars($username) . '') ?> + ' . htmlspecialchars($username) . '') ?>

      ', '') ?> diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php index 19821a0..fda5a28 100644 --- a/web/template/account_edit_form.php +++ b/web/template/account_edit_form.php @@ -132,7 +132,7 @@

      - +

      diff --git a/web/template/footer.php b/web/template/footer.php index 572dbb2..0e96870 100644 --- a/web/template/footer.php +++ b/web/template/footer.php @@ -6,7 +6,7 @@

      aurweb

      -

      +

    diff --git a/web/template/header.php b/web/template/header.php index 874109a..2ab1d6b 100644 --- a/web/template/header.php +++ b/web/template/header.php @@ -4,7 +4,7 @@ - AUR (<?= htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?> + <?= config_get('options', 'branding_shortname'); ?> (<?= htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?> @@ -16,7 +16,7 @@
    - +
    @@ -53,7 +53,7 @@
      -
    • AUR
    • +
    • ">
    • diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php index 580583b..4bc8a63 100644 --- a/web/template/stats/updates_table.php +++ b/web/template/stats/updates_table.php @@ -1,6 +1,6 @@

      ()

      -RSS Feed +RSS Feed -- cgit v1.2.3-54-g00ecf