summaryrefslogtreecommitdiffstats
path: root/web/html
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2017-02-26 10:30:16 +0100
committerLukas Fleischer <lfleischer@archlinux.org>2017-02-26 10:30:16 +0100
commit69f7eb115a0a48d4d2808708bcfef9eaf292f64c (patch)
treee8e4ac633b88099b6836ba3f637b0ab2b1d6a472 /web/html
parentfdd932ff8d5e5899cfeae9a8b29011fa2cf9d439 (diff)
parent5fd417d70154470d145c83a4b60693c8d877b016 (diff)
downloadaur-69f7eb115a0a48d4d2808708bcfef9eaf292f64c.tar.gz
aur-69f7eb115a0a48d4d2808708bcfef9eaf292f64c.tar.xz
Merge branch 'master' into maint
Diffstat (limited to 'web/html')
-rw-r--r--web/html/account.php27
-rw-r--r--web/html/home.php62
-rw-r--r--web/html/packages.php9
-rw-r--r--web/html/passreset.php5
-rw-r--r--web/html/pkgbase.php2
-rw-r--r--web/html/pkgdel.php2
-rw-r--r--web/html/pkgdisown.php2
-rw-r--r--web/html/pkgflag.php2
-rw-r--r--web/html/pkgmerge.php2
-rw-r--r--web/html/pkgreq.php3
-rw-r--r--web/html/register.php2
-rw-r--r--web/html/voters.php2
12 files changed, 99 insertions, 21 deletions
diff --git a/web/html/account.php b/web/html/account.php
index 2892f046..0b757612 100644
--- a/web/html/account.php
+++ b/web/html/account.php
@@ -31,12 +31,25 @@ if ($action == "UpdateAccount") {
/* Update the details for the existing account */
list($success, $update_account_message) = process_account_form(
"edit", "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"),
+ 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("TZ"),
+ 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"]);
}
}
@@ -89,6 +102,7 @@ if (isset($_COOKIE["AURSID"])) {
"",
$row["RealName"],
$row["LangPreference"],
+ $row["Timezone"],
$row["Homepage"],
$row["IRCNick"],
$row["PGPKey"],
@@ -141,6 +155,7 @@ if (isset($_COOKIE["AURSID"])) {
in_request("C"),
in_request("R"),
in_request("L"),
+ in_request("TZ"),
in_request("HP"),
in_request("I"),
in_request("K"),
diff --git a/web/html/home.php b/web/html/home.php
index 475370bb..26754916 100644
--- a/web/html/home.php
+++ b/web/html/home.php
@@ -8,12 +8,69 @@ check_sid();
include_once('stats.inc.php');
-html_header( __("Home") );
+if (isset($_COOKIE["AURSID"])) {
+ html_header( __("Dashboard") );
+} else {
+ html_header( __("Home") );
+}
?>
<div id="content-left-wrapper">
<div id="content-left">
+ <?php if (isset($_COOKIE["AURSID"])): ?>
+ <div id="intro" class="box">
+ <h2><?= __("Dashboard"); ?></h2>
+ <h3><?= __("My Flagged Packages"); ?></h3>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'M',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'outdated' => 'on',
+ 'SB' => 'l',
+ 'SO' => 'a'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ <h3><?= __("My Requests"); ?></h3>
+ <?php
+ $archive_time = config_get_int('options', 'request_archive_time');
+ $from = time() - $archive_time;
+ $results = pkgreq_list(0, 50, uid_from_sid($_COOKIE["AURSID"]), $from);
+ $show_headers = false;
+ include('pkgreq_results.php');
+ ?>
+ </div>
+ <div id="intro" class="box">
+ <h2><?= __("My Packages"); ?></h2>
+ <p><a href="<?= get_uri('/packages/') ?>?SeB=m&amp;K=<?= username_from_sid($_COOKIE["AURSID"]); ?>"><?= __('Search for packages I maintain') ?></a></p>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'm',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'SB' => 'l',
+ 'SO' => 'd'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ </div>
+ <div id="intro" class="box">
+ <h2><?= __("Co-Maintained Packages"); ?></h2>
+ <p><a href="<?= get_uri('/packages/') ?>?SeB=c&amp;K=<?= username_from_sid($_COOKIE["AURSID"]); ?>"><?= __('Search for packages I co-maintain') ?></a></p>
+ <?php
+ $params = array(
+ 'PP' => 50,
+ 'SeB' => 'c',
+ 'K' => username_from_sid($_COOKIE["AURSID"]),
+ 'SB' => 'l',
+ 'SO' => 'd'
+ );
+ pkg_search_page($params, false, $_COOKIE["AURSID"]);
+ ?>
+ </div>
+ <?php else: ?>
<div id="intro" class="box">
<h2>AUR <?= __("Home"); ?></h2>
<p>
@@ -122,6 +179,7 @@ html_header( __("Home") );
</p>
</div>
</div>
+ <?php endif; ?>
</div>
</div>
<div id="content-right">
@@ -140,7 +198,7 @@ html_header( __("Home") );
<div id="pkg-stats" class="widget box">
<?php general_stats_table(); ?>
</div>
- <?php if (!empty($_COOKIE["AURSID"])): ?>
+ <?php if (isset($_COOKIE["AURSID"])): ?>
<div id="pkg-stats" class="widget box">
<?php user_table(uid_from_sid($_COOKIE["AURSID"])); ?>
</div>
diff --git a/web/html/packages.php b/web/html/packages.php
index 1b892781..113a1145 100644
--- a/web/html/packages.php
+++ b/web/html/packages.php
@@ -80,8 +80,9 @@ $(document).ready(function() {
</script>
<?php
+include('pkg_search_form.php');
+
if (isset($pkgid)) {
- include('pkg_search_form.php');
if ($pkgid) {
if (isset($_COOKIE["AURSID"])) {
pkg_display_details($pkgid, $details, $_COOKIE["AURSID"]);
@@ -97,11 +98,13 @@ if (isset($pkgid)) {
$_GET['SB'] = 'p';
$_GET['SO'] = 'd';
}
+ echo '<div id="pkglist-results" class="box">';
if (isset($_COOKIE["AURSID"])) {
- pkg_search_page($_COOKIE["AURSID"]);
+ pkg_search_page($_GET, true, $_COOKIE["AURSID"]);
} else {
- pkg_search_page();
+ pkg_search_page($_GET, true);
}
+ echo '</div>';
}
html_footer(AURWEB_VERSION);
diff --git a/web/html/passreset.php b/web/html/passreset.php
index cb2f6bcd..e89967d4 100644
--- a/web/html/passreset.php
+++ b/web/html/passreset.php
@@ -34,10 +34,7 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
}
if (empty($error)) {
- $salt = generate_salt();
- $hash = salted_hash($password, $salt);
-
- $error = password_reset($hash, $salt, $resetkey, $email);
+ $error = password_reset($password, $resetkey, $email);
}
} elseif (isset($_POST['email'])) {
$email = $_POST['email'];
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 11fdf74a..23aa6c83 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -30,7 +30,7 @@ if (!isset($base_id) || !isset($pkgbase_name)) {
}
/* Set the title to package base name. */
-$title = $pkgbase_name;
+$title = isset($pkgbase_name) ? $pkgbase_name : __("Package Bases");
/* Grab the list of package base IDs to be operated on. */
$ids = array();
diff --git a/web/html/pkgdel.php b/web/html/pkgdel.php
index 21a2677c..591ccce8 100644
--- a/web/html/pkgdel.php
+++ b/web/html/pkgdel.php
@@ -12,7 +12,7 @@ html_header(__("Package Deletion"));
if (has_credential(CRED_PKGBASE_DELETE)): ?>
<div class="box">
- <h2><?= __('Delete Package') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Delete Package') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to delete the package base %s%s%s and the following packages from the AUR: ',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/html/pkgdisown.php b/web/html/pkgdisown.php
index f24a2d6d..036fe6d8 100644
--- a/web/html/pkgdisown.php
+++ b/web/html/pkgdisown.php
@@ -15,7 +15,7 @@ $comaintainers = pkgbase_get_comaintainers($base_id);
if (has_credential(CRED_PKGBASE_DISOWN, $maintainer_uids)): ?>
<div class="box">
- <h2><?= __('Disown Package') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Disown Package') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to disown the package base %s%s%s which includes the following packages: ',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/html/pkgflag.php b/web/html/pkgflag.php
index f50c2085..44849d88 100644
--- a/web/html/pkgflag.php
+++ b/web/html/pkgflag.php
@@ -43,7 +43,7 @@ html_header(__("Flag Package Out-Of-Date"));
if (has_credential(CRED_PKGBASE_FLAG)): ?>
<div class="box">
- <h2><?= __('Flag Package Out-Of-Date') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Flag Package Out-Of-Date') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to flag the package base %s%s%s and the following packages out-of-date: ',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/html/pkgmerge.php b/web/html/pkgmerge.php
index c0ce655c..e8e7ca93 100644
--- a/web/html/pkgmerge.php
+++ b/web/html/pkgmerge.php
@@ -12,7 +12,7 @@ html_header(__("Package Merging"));
if (has_credential(CRED_PKGBASE_DELETE)): ?>
<div class="box">
- <h2><?= __('Merge Package') ?>: <? htmlspecialchars($pkgbase_name) ?></h2>
+ <h2><?= __('Merge Package') ?>: <?= htmlspecialchars($pkgbase_name) ?></h2>
<p>
<?= __('Use this form to merge the package base %s%s%s into another package. ',
'<strong>', htmlspecialchars($pkgbase_name), '</strong>'); ?>
diff --git a/web/html/pkgreq.php b/web/html/pkgreq.php
index 8348a4f3..f981c25d 100644
--- a/web/html/pkgreq.php
+++ b/web/html/pkgreq.php
@@ -77,7 +77,10 @@ if (isset($base_id)) {
$SID = $_COOKIE['AURSID'];
html_header(__("Requests"));
+ echo '<div id="pkglist-results" class="box">';
+ $show_headers = true;
include('pkgreq_results.php');
+ echo '</div>';
}
html_footer(AURWEB_VERSION);
diff --git a/web/html/register.php b/web/html/register.php
index 6c6d52e6..843fea97 100644
--- a/web/html/register.php
+++ b/web/html/register.php
@@ -31,6 +31,7 @@ if (in_request("Action") == "NewAccount") {
'',
in_request("R"),
in_request("L"),
+ in_request("TZ"),
in_request("HP"),
in_request("I"),
in_request("K"),
@@ -53,6 +54,7 @@ if (in_request("Action") == "NewAccount") {
'',
in_request("R"),
in_request("L"),
+ in_request("TZ"),
in_request("HP"),
in_request("I"),
in_request("K"),
diff --git a/web/html/voters.php b/web/html/voters.php
index 8833be1e..997186d8 100644
--- a/web/html/voters.php
+++ b/web/html/voters.php
@@ -20,7 +20,7 @@ if (has_credential(CRED_PKGBASE_LIST_VOTERS)):
<li>
<a href="<?= get_user_uri($row['Username']); ?>"><?= htmlspecialchars($row['Username']) ?></a>
<?php if ($row["VoteTS"] > 0): ?>
- (<?= gmdate("Y-m-d H:i", intval($row["VoteTS"])) ?>)
+ (<?= date("Y-m-d H:i", intval($row["VoteTS"])) ?>)
<?php endif; ?>
</li>
<?php endwhile; ?>