diff options
author | Lukas Fleischer <lfleischer@archlinux.org> | 2016-10-17 15:34:21 +0200 |
---|---|---|
committer | Lukas Fleischer <lfleischer@archlinux.org> | 2016-10-17 15:34:21 +0200 |
commit | fdd932ff8d5e5899cfeae9a8b29011fa2cf9d439 (patch) | |
tree | 07afb8664e18e4d4fb479525b16db6edf026b72b /web/html | |
parent | b091fb77580d56dbdca6424f9065581945b8e815 (diff) | |
parent | c3f464f50fb35ffb7825b90437bd912051a994ee (diff) | |
download | aur-fdd932ff8d5e5899cfeae9a8b29011fa2cf9d439.tar.gz aur-fdd932ff8d5e5899cfeae9a8b29011fa2cf9d439.tar.xz |
Merge branch 'master' into maint
Diffstat (limited to 'web/html')
-rw-r--r-- | web/html/404.php | 33 | ||||
-rw-r--r-- | web/html/account.php | 62 | ||||
-rw-r--r-- | web/html/css/aurweb.css | 5 | ||||
-rw-r--r-- | web/html/index.php | 4 | ||||
-rw-r--r-- | web/html/register.php | 45 |
5 files changed, 119 insertions, 30 deletions
diff --git a/web/html/404.php b/web/html/404.php index a47ae1e4..757c4855 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 9007ace5..2892f046 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 f5e10371..f777ab83 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 3787d4e4..78ab6ad7 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 3155449c..6c6d52e6 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>'; |