mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 10:43:03 +01:00
Drop suffixes from confirm parameters
Remove the _delete and _disown suffixes from HTTP POST confirmation parameters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
This commit is contained in:
parent
9b19f7595e
commit
5c64ae1a0e
8 changed files with 9 additions and 9 deletions
|
@ -70,7 +70,7 @@ if (isset($_COOKIE["AURSID"])) {
|
||||||
/* Details for account being deleted. */
|
/* Details for account being deleted. */
|
||||||
if (can_edit_account($row)) {
|
if (can_edit_account($row)) {
|
||||||
$UID = $row['ID'];
|
$UID = $row['ID'];
|
||||||
if (in_request('confirm_Delete') && check_token()) {
|
if (in_request('confirm') && check_token()) {
|
||||||
user_delete($UID);
|
user_delete($UID);
|
||||||
header('Location: /');
|
header('Location: /');
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -54,7 +54,7 @@ if (check_token()) {
|
||||||
} elseif (current_action("do_Adopt")) {
|
} elseif (current_action("do_Adopt")) {
|
||||||
list($ret, $output) = pkgbase_adopt($ids, true, NULL);
|
list($ret, $output) = pkgbase_adopt($ids, true, NULL);
|
||||||
} elseif (current_action("do_Disown")) {
|
} elseif (current_action("do_Disown")) {
|
||||||
if (isset($_POST['confirm_Disown'])) {
|
if (isset($_POST['confirm'])) {
|
||||||
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
|
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
|
||||||
list($ret, $output) = pkgbase_adopt($ids, false, $via);
|
list($ret, $output) = pkgbase_adopt($ids, false, $via);
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,7 +66,7 @@ if (check_token()) {
|
||||||
} elseif (current_action("do_UnVote")) {
|
} elseif (current_action("do_UnVote")) {
|
||||||
list($ret, $output) = pkgbase_vote($ids, false);
|
list($ret, $output) = pkgbase_vote($ids, false);
|
||||||
} elseif (current_action("do_Delete")) {
|
} elseif (current_action("do_Delete")) {
|
||||||
if (isset($_POST['confirm_Delete'])) {
|
if (isset($_POST['confirm'])) {
|
||||||
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
|
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
|
||||||
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
|
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
|
||||||
list($ret, $output) = pkgbase_delete($ids, NULL, $via);
|
list($ret, $output) = pkgbase_delete($ids, NULL, $via);
|
||||||
|
|
|
@ -34,7 +34,7 @@ if (has_credential(CRED_PKGBASE_DELETE)): ?>
|
||||||
<?php if (isset($_GET['via'])): ?>
|
<?php if (isset($_GET['via'])): ?>
|
||||||
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
|
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p><input type="checkbox" name="confirm_Delete" value="1" />
|
<p><input type="checkbox" name="confirm" value="1" />
|
||||||
<?= __("Confirm package deletion") ?></p>
|
<?= __("Confirm package deletion") ?></p>
|
||||||
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Delete") ?>" /></p>
|
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Delete") ?>" /></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -41,7 +41,7 @@ if (has_credential(CRED_PKGBASE_DISOWN, $maintainer_uids)): ?>
|
||||||
<?php if (isset($_GET['via'])): ?>
|
<?php if (isset($_GET['via'])): ?>
|
||||||
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
|
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<p><input type="checkbox" name="confirm_Disown" value="1" />
|
<p><input type="checkbox" name="confirm" value="1" />
|
||||||
<?= __("Confirm to disown the package") ?></p>
|
<?= __("Confirm to disown the package") ?></p>
|
||||||
<p><input type="submit" class="button" name="do_Disown" value="<?= __("Disown") ?>" /></p>
|
<p><input type="submit" class="button" name="do_Disown" value="<?= __("Disown") ?>" /></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -55,7 +55,7 @@ if (has_credential(CRED_PKGBASE_DELETE)): ?>
|
||||||
</script>
|
</script>
|
||||||
<p><label for="merge_Into" ><?= __("Merge into:") ?></label>
|
<p><label for="merge_Into" ><?= __("Merge into:") ?></label>
|
||||||
<input type="text" id="merge_Into" name="merge_Into" value="<?= isset($_GET['into']) ? $_GET['into'] : '' ?>" /></p>
|
<input type="text" id="merge_Into" name="merge_Into" value="<?= isset($_GET['into']) ? $_GET['into'] : '' ?>" /></p>
|
||||||
<p><input type="checkbox" name="confirm_Delete" value="1" />
|
<p><input type="checkbox" name="confirm" value="1" />
|
||||||
<?= __("Confirm package merge") ?></p>
|
<?= __("Confirm package merge") ?></p>
|
||||||
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Merge") ?>" /></p>
|
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Merge") ?>" /></p>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
|
@ -503,7 +503,7 @@ function pkg_display_details($id=0, $row, $SID="") {
|
||||||
* do_UnFlag - Remove out-of-date flag
|
* do_UnFlag - Remove out-of-date flag
|
||||||
* do_Adopt - Adopt
|
* do_Adopt - Adopt
|
||||||
* do_Disown - Disown
|
* do_Disown - Disown
|
||||||
* do_Delete - Delete (requires confirm_Delete to be set)
|
* do_Delete - Delete
|
||||||
* do_Notify - Enable notification
|
* do_Notify - Enable notification
|
||||||
* do_UnNotify - Disable notification
|
* do_UnNotify - Disable notification
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<p><input type="checkbox" name="confirm_Delete" value="1" />
|
<p><input type="checkbox" name="confirm" value="1" />
|
||||||
<?= __("Confirm deletion") ?></p>
|
<?= __("Confirm deletion") ?></p>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
|
|
|
@ -122,7 +122,7 @@ if (!$result): ?>
|
||||||
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
|
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
|
||||||
<label for="merge_Into"><?= __("Merge into") ?></label>
|
<label for="merge_Into"><?= __("Merge into") ?></label>
|
||||||
<input type="text" id="merge_Into" name="merge_Into" />
|
<input type="text" id="merge_Into" name="merge_Into" />
|
||||||
<input type="checkbox" name="confirm_Delete" value="1" /> <?= __("Confirm") ?>
|
<input type="checkbox" name="confirm" value="1" /> <?= __("Confirm") ?>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
|
||||||
<input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />
|
<input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />
|
||||||
|
|
Loading…
Add table
Reference in a new issue