summaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
Diffstat (limited to 'web')
-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
-rw-r--r--web/lib/acctfuncs.inc.php15
-rw-r--r--web/lib/confparser.inc.php2
-rw-r--r--web/lib/pkgbasefuncs.inc.php9
-rw-r--r--web/lib/pkgfuncs.inc.php4
-rw-r--r--web/lib/pkgreqfuncs.inc.php2
-rw-r--r--web/lib/version.inc.php2
-rw-r--r--web/template/account_details.php12
-rw-r--r--web/template/account_edit_form.php10
-rw-r--r--web/template/footer.php2
-rw-r--r--web/template/pkg_search_results.php2
-rw-r--r--web/template/pkgbase_actions.php2
-rw-r--r--web/template/pkgreq_form.php19
-rw-r--r--web/template/pkgreq_results.php2
18 files changed, 186 insertions, 46 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>';
diff --git a/web/lib/acctfuncs.inc.php b/web/lib/acctfuncs.inc.php
index 2d70f65..172b962 100644
--- a/web/lib/acctfuncs.inc.php
+++ b/web/lib/acctfuncs.inc.php
@@ -52,19 +52,21 @@ function html_format_pgp_fingerprint($fingerprint) {
* @param string $C The confirmed password value of the displayed user
* @param string $R The real name of the displayed user
* @param string $L The language preference of the displayed user
+ * @param string $HP The homepage of the displayed user
* @param string $I The IRC nickname of the displayed user
* @param string $K The PGP key fingerprint of the displayed user
* @param string $PK The list of SSH public keys
* @param string $J The inactivity status of the displayed user
* @param string $CN Whether to notify of new comments
* @param string $UN Whether to notify of package updates
+ * @param string $ON Whether to notify of ownership changes
* @param string $UID The user ID of the displayed user
* @param string $N The username as present in the database
*
* @return void
*/
function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R="",
- $L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") {
+ $L="",$HP="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") {
global $SUPPORTED_LANGS;
include("account_edit_form.php");
@@ -86,19 +88,21 @@ function display_account_form($A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",$R=""
* @param string $C The confirmed password for the user
* @param string $R The real name of the user
* @param string $L The language preference of the user
+ * @param string $HP The homepage of the displayed user
* @param string $I The IRC nickname of the user
* @param string $K The PGP fingerprint of the user
* @param string $PK The list of public SSH keys
* @param string $J The inactivity status of the user
* @param string $CN Whether to notify of new comments
* @param string $UN Whether to notify of package updates
+ * @param string $ON Whether to notify of ownership changes
* @param string $UID The user ID of the modified account
* @param string $N The username as present in the database
*
* @return array Boolean indicating success and message to be printed
*/
function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C="",
- $R="",$L="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$UID=0,$N="") {
+ $R="",$L="",$HP="",$I="",$K="",$PK="",$J="",$CN="",$UN="",$ON="",$UID=0,$N="") {
global $SUPPORTED_LANGS;
$error = '';
@@ -274,13 +278,14 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
$salt = $dbh->quote($salt);
$R = $dbh->quote($R);
$L = $dbh->quote($L);
+ $HP = $dbh->quote($HP);
$I = $dbh->quote($I);
$K = $dbh->quote(str_replace(" ", "", $K));
$q = "INSERT INTO Users (AccountTypeID, Suspended, ";
$q.= "InactivityTS, Username, Email, Passwd, Salt, ";
- $q.= "RealName, LangPreference, IRCNick, PGPKey) ";
+ $q.= "RealName, LangPreference, Homepage, IRCNick, PGPKey) ";
$q.= "VALUES (1, 0, 0, $U, $E, $P, $salt, $R, $L, ";
- $q.= "$I, $K)";
+ $q.= "$HP, $I, $K)";
$result = $dbh->exec($q);
if (!$result) {
$message = __("Error trying to create account, %s%s%s.",
@@ -342,11 +347,13 @@ function process_account_form($TYPE,$A,$U="",$T="",$S="",$E="",$H="",$P="",$C=""
}
$q.= ", RealName = " . $dbh->quote($R);
$q.= ", LangPreference = " . $dbh->quote($L);
+ $q.= ", Homepage = " . $dbh->quote($HP);
$q.= ", IRCNick = " . $dbh->quote($I);
$q.= ", PGPKey = " . $dbh->quote(str_replace(" ", "", $K));
$q.= ", InactivityTS = " . $inactivity_ts;
$q.= ", CommentNotify = " . ($CN ? "1" : "0");
$q.= ", UpdateNotify = " . ($UN ? "1" : "0");
+ $q.= ", OwnershipNotify = " . ($ON ? "1" : "0");
$q.= " WHERE ID = ".intval($UID);
$result = $dbh->exec($q);
diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php
index 6368b86..789300e 100644
--- a/web/lib/confparser.inc.php
+++ b/web/lib/confparser.inc.php
@@ -4,7 +4,7 @@ function config_load() {
global $AUR_CONFIG;
if (!isset($AUR_CONFIG)) {
- $AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW);
+ $AUR_CONFIG = parse_ini_file("/etc/aurweb/config", true, INI_SCANNER_RAW);
}
}
diff --git a/web/lib/pkgbasefuncs.inc.php b/web/lib/pkgbasefuncs.inc.php
index 1691bff..b082784 100644
--- a/web/lib/pkgbasefuncs.inc.php
+++ b/web/lib/pkgbasefuncs.inc.php
@@ -661,6 +661,9 @@ function pkgbase_adopt ($base_ids, $action=true, $via) {
$q.= "SET MaintainerUID = $uid ";
$q.= "WHERE ID IN (" . implode(",", $base_ids) . ") ";
$dbh->exec($q);
+
+ /* Add the new maintainer to the notification list. */
+ pkgbase_notify($base_ids);
} else {
/* Update the co-maintainer list when disowning a package. */
if (has_credential(CRED_PKGBASE_DISOWN)) {
@@ -692,8 +695,11 @@ function pkgbase_adopt ($base_ids, $action=true, $via) {
}
}
+ foreach ($base_ids as $base_id) {
+ notify(array($action ? 'adopt' : 'disown', $base_id, $uid));
+ }
+
if ($action) {
- pkgbase_notify($base_ids);
return array(true, __("The selected packages have been adopted."));
} else {
return array(true, __("The selected packages have been disowned."));
@@ -1056,7 +1062,6 @@ function pkgbase_set_keywords($base_id, $keywords) {
$i = 0;
foreach ($keywords as $keyword) {
$q = sprintf("INSERT INTO PackageKeywords (PackageBaseID, Keyword) VALUES (%d, %s)", $base_id, $dbh->quote($keyword));
- var_dump($q);
$dbh->exec($q);
$i++;
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index f34dbba..4b0fdba 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -230,7 +230,7 @@ function pkg_providers($name) {
* Get package dependencies for a specific package
*
* @param int $pkgid The package to get dependencies for
- * @param int $limit An upper bound on the number of packages to retrieve
+ * @param int $limit An upper bound for the number of packages to retrieve
*
* @return array All package dependencies for the package
*/
@@ -506,7 +506,7 @@ function pkg_source_link($url, $arch) {
*
* @param string $name The package name for the dependency search
* @param array $provides A list of virtual provisions of the package
- * @param int $limit An upper bound on the number of packages to retrieve
+ * @param int $limit An upper bound for the number of packages to retrieve
*
* @return array All packages that depend on the specified package name
*/
diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php
index cf56663..8ceac8d 100644
--- a/web/lib/pkgreqfuncs.inc.php
+++ b/web/lib/pkgreqfuncs.inc.php
@@ -221,7 +221,7 @@ function pkgreq_close($id, $reason, $comments, $auto_close=false) {
$dbh = DB::connect();
$id = intval($id);
- $uid = uid_from_sid($_COOKIE["AURSID"]);
+ $uid = $auto_close ? 0 : uid_from_sid($_COOKIE["AURSID"]);
if (!$auto_close && !has_credential(CRED_PKGREQ_CLOSE)) {
return array(false, __("Only TUs and developers can close requests."));
diff --git a/web/lib/version.inc.php b/web/lib/version.inc.php
index 9c0a5e6..dcf5666 100644
--- a/web/lib/version.inc.php
+++ b/web/lib/version.inc.php
@@ -1,3 +1,3 @@
<?php
-define("AURWEB_VERSION", "v4.2.1");
+define("AURWEB_VERSION", "v4.4.1");
diff --git a/web/template/account_details.php b/web/template/account_details.php
index 59a6a63..024bd9c 100644
--- a/web/template/account_details.php
+++ b/web/template/account_details.php
@@ -42,6 +42,10 @@
<td><?= htmlspecialchars($row["RealName"], ENT_QUOTES) ?></td>
</tr>
<tr>
+ <th><?= __("Homepage") . ":" ?></th>
+ <td><a href="<?= htmlspecialchars($row["Homepage"], ENT_QUOTES) ?>" rel="nofollow"><?= htmlspecialchars($row["Homepage"], ENT_QUOTES) ?></a></td>
+ </tr>
+ <tr>
<th><?= __("IRC Nick") . ":" ?></th>
<td><?= htmlspecialchars($row["IRCNick"], ENT_QUOTES) ?></td>
</tr>
@@ -55,6 +59,14 @@
<?= $row["InactivityTS"] ? __("Inactive since") . ' ' . date("Y-m-d H:i", $row["InactivityTS"]) : __("Active"); ?>
</td>
</tr>
+ <tr>
+ <th><?= __("Registration date:") ?></th>
+ <?php if ($row["RegistrationTS"]): ?>
+ <td><?= (new DateTime($row["RegistrationTS"]))->format('Y-m-d') ?></td>
+ <?php else: ?>
+ <td><?= __("unknown") ?></td>
+ <?php endif; ?>
+ </tr>
<?php if (has_credential(CRED_ACCOUNT_LAST_LOGIN)): ?>
<tr>
<th><?= __("Last Login") . ":" ?></th>
diff --git a/web/template/account_edit_form.php b/web/template/account_edit_form.php
index b9affd6..19821a0 100644
--- a/web/template/account_edit_form.php
+++ b/web/template/account_edit_form.php
@@ -1,6 +1,7 @@
<?php if ($A == "UpdateAccount"): ?>
<p>
<?= __('Click %shere%s if you want to permanently delete this account.', '<a href="' . get_user_uri($N) . 'delete/' . '">', '</a>') ?>
+ <?= __('Click %shere%s for user details.', '<a href="' . get_user_uri($N) . '">', '</a>') ?>
</p>
<form id="edit-profile-form" action="<?= get_user_uri($N) . 'update/'; ?>" method="post">
@@ -99,6 +100,11 @@
</p>
<p>
+ <label for="id_homepage"><?= __("Homepage") ?>:</label>
+ <input type="text" size="30" name="HP" id="id_homepage" value="<?= htmlspecialchars($HP,ENT_QUOTES) ?>" />
+ </p>
+
+ <p>
<label for="id_irc"><?= __("IRC Nick") ?>:</label>
<input type="text" size="30" maxlength="32" name="I" id="id_irc" value="<?= htmlspecialchars($I,ENT_QUOTES) ?>" />
</p>
@@ -143,6 +149,10 @@
<label for="id_updatenotify"><?= __("Notify of package updates") ?>:</label>
<input type="checkbox" name="UN" id="id_updatenotify" <?= $UN ? 'checked="checked"' : '' ?> />
</p>
+ <p>
+ <label for="id_ownershipnotify"><?= __("Notify of ownership changes") ?>:</label>
+ <input type="checkbox" name="ON" id="id_ownershipnotify" <?= $ON ? 'checked="checked"' : '' ?> />
+ </p>
</fieldset>
<fieldset>
diff --git a/web/template/footer.php b/web/template/footer.php
index f5dc2d0..572dbb2 100644
--- a/web/template/footer.php
+++ b/web/template/footer.php
@@ -3,7 +3,7 @@
<div id="footer">
<?php if ($ver): ?>
- <p>aurweb <a href="https://projects.archlinux.org/aurweb.git/log/?h=<?= htmlspecialchars($ver, ENT_QUOTES) ?>"><?= htmlspecialchars($ver) ?></a></p>
+ <p>aurweb <a href="https://git.archlinux.org/aurweb.git/log/?h=<?= htmlspecialchars($ver, ENT_QUOTES) ?>"><?= htmlspecialchars($ver) ?></a></p>
<?php endif; ?>
<p><?= __('Copyright %s 2004-%d aurweb Development Team.', '&copy;', date('Y')) ?></p>
<p><?= __('AUR packages are user produced content. Any use of the provided files is at your own risk.') ?></p>
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index 3046c25..37a9032 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -35,7 +35,7 @@ if (!$result): ?>
<th><a href="?<?= mkurl('SB=n&SO=' . $SO_next) ?>"><?= __("Name") ?></a></th>
<th><?= __("Version") ?></th>
<th><a href="?<?= mkurl('SB=v&SO=' . $SO_next) ?>"><?= __("Votes") ?></a></th>
- <th><a href="?<?= mkurl('SB=p&SO=' . $SO_next) ?>"><?= __("Popularity") ?></a><span title="<?= __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of 0.98 per day since its creation.') ?>" class="hover-help"><sup>?</sup></span></th>
+ <th><a href="?<?= mkurl('SB=p&SO=' . $SO_next) ?>"><?= __("Popularity") ?></a><span title="<?= __('Popularity is calculated as the sum of all votes with each vote being weighted with a factor of %.2f per day since its creation.', 0.98) ?>" class="hover-help"><sup>?</sup></span></th>
<?php if ($SID): ?>
<th><a href="?<?= mkurl('SB=w&SO=' . $SO_next) ?>"><?= __("Voted") ?></a></th>
<th><a href="?<?= mkurl('SB=o&SO=' . $SO_next) ?>"><?= __("Notify") ?></a></th>
diff --git a/web/template/pkgbase_actions.php b/web/template/pkgbase_actions.php
index 237e712..d3f0592 100644
--- a/web/template/pkgbase_actions.php
+++ b/web/template/pkgbase_actions.php
@@ -24,7 +24,7 @@
<?php if (pkgbase_user_notify($uid, $base_id)): ?>
<li><?= html_action_form($base_uri . 'unnotify/', "do_UnNotify", __('Disable notifications')) ?></li>
<?php else: ?>
- <li><?= html_action_form($base_uri . 'notify/', "do_Notify", __('Notify of new comments')) ?></li>
+ <li><?= html_action_form($base_uri . 'notify/', "do_Notify", __('Enable notifications')) ?></li>
<?php endif; ?>
<?php if (has_credential(CRED_PKGBASE_EDIT_COMAINTAINERS, array($row["MaintainerUID"]))): ?>
diff --git a/web/template/pkgreq_form.php b/web/template/pkgreq_form.php
index 4fd7851..35dbef5 100644
--- a/web/template/pkgreq_form.php
+++ b/web/template/pkgreq_form.php
@@ -16,7 +16,7 @@
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
<p>
<label for="id_type"><?= __("Request type") ?>:</label>
- <select name="type" id="id_type" onchange="showHideMergeSection()">
+ <select name="type" id="id_type" onchange="showHideMergeSection(); showHideRequestHints()">
<option value="deletion"><?= __('Deletion') ?></option>
<option value="merge"><?= __('Merge') ?></option>
<?php if (pkgbase_maintainer_uid($base_id)): ?>
@@ -35,8 +35,16 @@
}
}
+ function showHideRequestHints() {
+ $('#deletion_hint').hide();
+ $('#merge_hint').hide();
+ $('#orphan_hint').hide();
+ $('#' + $('#id_type').val() + '_hint').show();
+ }
+
$(document).ready(function() {
showHideMergeSection();
+ showHideRequestHints();
$('#id_merge_into').typeahead({
source: function(query, callback) {
@@ -59,6 +67,15 @@
<label for="id_comments"><?= __("Comments") ?>:</label>
<textarea name="comments" id="id_comments" rows="5" cols="50"></textarea>
</p>
+ <p id="deletion_hint">
+ <?= __('By submitting a deletion request, you ask a Trusted User to delete the package base. This type of request should be used for duplicates, software abandoned by upstream, as well as illegal and irreparably broken packages.') ?>
+ </p>
+ <p id="merge_hint">
+ <?= __('By submitting a merge request, you ask a Trusted User to delete the package base and transfer its votes and comments to another package base. Merging a package does not affect the corresponding Git repositories. Make sure you update the Git history of the target package yourself.') ?>
+ </p>
+ <p id="orphan_hint">
+ <?= __('By submitting an orphan request, you ask a Trusted User to disown the package base. Please only do this if the package needs maintainer action, the maintainer is MIA and you already tried to contact the maintainer previously.') ?>
+ </p>
<p>
<input type="submit" class="button" name="do_FileRequest" value="<?= __("Submit Request") ?>" />
</p>
diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index 24ee877..b27963b 100644
--- a/web/template/pkgreq_results.php
+++ b/web/template/pkgreq_results.php
@@ -39,7 +39,7 @@
if (!$due) {
$time_left = $idle_time - (time() - intval($row['RequestTS']));
if ($time_left > 48 * 3600) {
- $time_left_fmt = __("~%d days left", round($time_left / (24 * 3600)));
+ $time_left_fmt = _n("~%d day left", "~%d days left", round($time_left / (24 * 3600)));
} elseif ($time_left > 3600) {
$time_left_fmt = _n("~%d hour left", "~%d hours left", round($time_left / 3600));
} else {