[aur-dev][PATCH] Requests: use a link instead of a form to accept orphan requests

Eli Schwartz eschwartz at archlinux.org
Thu May 10 21:17:05 UTC 2018


This forwards to a confirmation page, and currently drops the "via"
parameter in the process.

As a result, accepted orphan requests usually show:

Request #XXXXXX has been accepted automatically by the Arch User
Repository package request system:

The user YYYYYYY disowned the package.

This is wrong, and should show (will show, if you manually add it or use
the close button instead of the accept button):

Request #XXXXXX has been rejected by YYYYYYY [1]:

Fixes FS#56606

Signed-off-by: Eli Schwartz <eschwartz at archlinux.org>
---
 web/template/pkgreq_results.php | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/web/template/pkgreq_results.php b/web/template/pkgreq_results.php
index fb49dfa..3c824c0 100644
--- a/web/template/pkgreq_results.php
+++ b/web/template/pkgreq_results.php
@@ -82,11 +82,7 @@
 			<a href="<?= get_pkgbase_uri($row['Name']) ?>merge/?into=<?= urlencode($row['MergeInto']) ?>&via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
 			<br />
 			<?php elseif ($row['Type'] == 'orphan' && $due): ?>
-			<form action="<?= get_pkgbase_uri($row['Name']) . 'disown/'; ?>" method="post">
-				<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
-				<input type="hidden" name="via" value="<?= intval($row['ID']) ?>" />
-				<input type="submit" class="button text-button" name="do_Disown" value="<?= __('Accept') ?>" />
-			</form>
+			<a href="<?= get_pkgbase_uri($row['Name']) ?>disown/?via=<?= intval($row['ID']) ?>"><?= __('Accept') ?></a>
 			<?php elseif ($row['Type'] == 'orphan' && !$due): ?>
 			<?= __('Locked') ?> (<?= $time_left_fmt ?>)
 			<br />
-- 
2.17.0


More information about the aur-dev mailing list