summaryrefslogtreecommitdiff
path: root/web/html
diff options
context:
space:
mode:
Diffstat (limited to 'web/html')
-rw-r--r--web/html/404.php33
-rw-r--r--web/html/account.php62
-rw-r--r--web/html/css/aurweb.css5
-rw-r--r--web/html/index.php4
-rw-r--r--web/html/register.php45
5 files changed, 119 insertions, 30 deletions
diff --git a/web/html/404.php b/web/html/404.php
index a47ae1e..757c485 100644
--- a/web/html/404.php
+++ b/web/html/404.php
@@ -2,12 +2,45 @@
set_include_path(get_include_path() . PATH_SEPARATOR . '../lib');
+$path = $_SERVER['PATH_INFO'];
+$tokens = explode('/', $path);
+
+if (preg_match('/^([a-z0-9][a-z0-9.+_-]*?)(\.git)?$/', $tokens[1], $matches)) {
+ $gitpkg = $matches[1];
+ if (pkg_from_name($gitpkg)) {
+ $gitcmd = 'git clone ' . sprintf(config_get('options', 'git_clone_uri_anon'), htmlspecialchars($gitpkg));
+ $gitlink = get_pkgbase_uri($gitpkg);
+ } else {
+ unset($gitpkg);
+ }
+} else {
+ unset($gitpkg);
+}
+
html_header( __("Page Not Found") );
?>
<div id="error-page" class="box 404">
<h2>404 - <?= __("Page Not Found") ?></h2>
<p><?= __("Sorry, the page you've requested does not exist.") ?></p>
+ <?php if (isset($gitpkg)): ?>
+ <ul>
+ <li>
+ <strong><?= __("Note") ?>:</strong>
+ <?= __("Git clone URLs are not meant to be opened in a browser.") ?>
+ </li>
+ <li>
+ <?= __("To clone the Git repository of %s, run %s.",
+ '<strong>' . htmlspecialchars($gitpkg) . '</strong>',
+ '<code>' . htmlspecialchars($gitcmd) . '</code>') ?>
+ </li>
+ <li>
+ <?= __("Click %shere%s to return to the %s details page.",
+ '<a href="' . htmlspecialchars($gitlink, ENT_QUOTES) . '">', '</a>',
+ '<strong>' . htmlspecialchars($gitpkg) . '</strong>') ?>
+ </li>
+ </ul>
+ <?php endif; ?>
</div>
<?php
diff --git a/web/html/account.php b/web/html/account.php
index 9007ace..2892f04 100644
--- a/web/html/account.php
+++ b/web/html/account.php
@@ -34,9 +34,10 @@ if ($action == "UpdateAccount") {
in_request("U"), in_request("T"), in_request("S"),
in_request("E"), in_request("H"), in_request("P"),
in_request("C"), in_request("R"), in_request("L"),
- in_request("I"), in_request("K"), in_request("PK"),
- in_request("J"), in_request("CN"), in_request("UN"),
- in_request("ID"), $row["Username"]);
+ in_request("HP"), in_request("I"), in_request("K"),
+ in_request("PK"), in_request("J"), in_request("CN"),
+ in_request("UN"), in_request("ON"), in_request("ID"),
+ $row["Username"]);
}
}
@@ -78,12 +79,26 @@ if (isset($_COOKIE["AURSID"])) {
} else {
/* Verify user has permission to edit the account */
if (can_edit_account($row)) {
- display_account_form("UpdateAccount", $row["Username"],
- $row["AccountTypeID"], $row["Suspended"], $row["Email"],
- $row["HideEmail"], "", "", $row["RealName"],
- $row["LangPreference"], $row["IRCNick"], $row["PGPKey"], $PK,
- $row["InactivityTS"] ? 1 : 0, $row["CommentNotify"],
- $row["UpdateNotify"], $row["ID"], $row["Username"]);
+ display_account_form("UpdateAccount",
+ $row["Username"],
+ $row["AccountTypeID"],
+ $row["Suspended"],
+ $row["Email"],
+ $row["HideEmail"],
+ "",
+ "",
+ $row["RealName"],
+ $row["LangPreference"],
+ $row["Homepage"],
+ $row["IRCNick"],
+ $row["PGPKey"],
+ $PK,
+ $row["InactivityTS"] ? 1 : 0,
+ $row["CommentNotify"],
+ $row["UpdateNotify"],
+ $row["OwnershipNotify"],
+ $row["ID"],
+ $row["Username"]);
} else {
print __("You do not have permission to edit this account.");
}
@@ -116,15 +131,26 @@ if (isset($_COOKIE["AURSID"])) {
print $update_account_message;
if (!$success) {
- display_account_form("UpdateAccount", in_request("U"),
- in_request("T"), in_request("S"),
- in_request("E"), in_request("H"),
- in_request("P"), in_request("C"),
- in_request("R"), in_request("L"),
- in_request("I"), in_request("K"),
- in_request("PK"), in_request("J"),
- in_request("CN"), in_request("UN"),
- in_request("ID"), $row["Username"]);
+ display_account_form("UpdateAccount",
+ in_request("U"),
+ in_request("T"),
+ in_request("S"),
+ in_request("E"),
+ in_request("H"),
+ in_request("P"),
+ in_request("C"),
+ in_request("R"),
+ in_request("L"),
+ in_request("HP"),
+ in_request("I"),
+ in_request("K"),
+ in_request("PK"),
+ in_request("J"),
+ in_request("CN"),
+ in_request("UN"),
+ in_request("ON"),
+ in_request("ID"),
+ $row["Username"]);
}
} else {
diff --git a/web/html/css/aurweb.css b/web/html/css/aurweb.css
index f5e1037..f777ab8 100644
--- a/web/html/css/aurweb.css
+++ b/web/html/css/aurweb.css
@@ -148,3 +148,8 @@ label.confirmation,
color: red;
font-weight: bold;
}
+
+#news div p {
+ max-height: 15em;
+ overflow: auto;
+}
diff --git a/web/html/index.php b/web/html/index.php
index 3787d4e..78ab6ad 100644
--- a/web/html/index.php
+++ b/web/html/index.php
@@ -167,10 +167,6 @@ if (!empty($tokens[1]) && '/' . $tokens[1] == get_pkg_route()) {
header("Content-Type: image/gif");
readfile("./$path");
break;
- case "/css/archnavbar/archlogo.gif":
- header("Content-Type: image/png");
- readfile("./$path");
- break;
case "/css/archnavbar/archlogo.png":
case "/css/archnavbar/aurlogo.png":
case "/images/favicon.ico":
diff --git a/web/html/register.php b/web/html/register.php
index 3155449..6c6d52e 100644
--- a/web/html/register.php
+++ b/web/html/register.php
@@ -20,18 +20,47 @@ echo '<h2>' . __('Register') . '</h2>';
if (in_request("Action") == "NewAccount") {
list($success, $message) = process_account_form(
- "new", "NewAccount", in_request("U"), 1, 0,
- in_request("E"), in_request("H"), '', '', in_request("R"),
- in_request("L"), in_request("I"), in_request("K"),
- in_request("PK"), 0, in_request("CN"), in_request("UN"));
+ "new",
+ "NewAccount",
+ in_request("U"),
+ 1,
+ 0,
+ in_request("E"),
+ in_request("H"),
+ '',
+ '',
+ in_request("R"),
+ in_request("L"),
+ in_request("HP"),
+ in_request("I"),
+ in_request("K"),
+ in_request("PK"),
+ 0,
+ in_request("CN"),
+ in_request("UN"),
+ in_request("ON"));
print $message;
if (!$success) {
- display_account_form("NewAccount", in_request("U"), 1, 0,
- in_request("E"), in_request("H"), '', '', in_request("R"),
- in_request("L"), in_request("I"), in_request("K"),
- in_request("PK"), 0, in_request("CN"), in_request("UN"));
+ display_account_form("NewAccount",
+ in_request("U"),
+ 1,
+ 0,
+ in_request("E"),
+ in_request("H"),
+ '',
+ '',
+ in_request("R"),
+ in_request("L"),
+ in_request("HP"),
+ in_request("I"),
+ in_request("K"),
+ in_request("PK"),
+ 0,
+ in_request("CN"),
+ in_request("UN"),
+ in_request("ON"));
}
} else {
print '<p>' . __("Use this form to create an account.") . '</p>';