summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2015-06-09 09:05:05 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2015-06-09 09:05:05 +0200
commit5c64ae1a0ea55c9d38d11659cf5a48761e44571f (patch)
tree8194e11c70e3fb8e6daad4d18b123bdf97e36e84
parent9b19f7595e45431a7984b50369eccd1a54ae4636 (diff)
downloadaurweb-5c64ae1a0ea55c9d38d11659cf5a48761e44571f.tar.xz
Drop suffixes from confirm parameters
Remove the _delete and _disown suffixes from HTTP POST confirmation parameters. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--web/html/account.php2
-rw-r--r--web/html/pkgbase.php4
-rw-r--r--web/html/pkgdel.php2
-rw-r--r--web/html/pkgdisown.php2
-rw-r--r--web/html/pkgmerge.php2
-rw-r--r--web/lib/pkgfuncs.inc.php2
-rw-r--r--web/template/account_delete.php2
-rw-r--r--web/template/pkg_search_results.php2
8 files changed, 9 insertions, 9 deletions
diff --git a/web/html/account.php b/web/html/account.php
index cb33c4e..6ecd56e 100644
--- a/web/html/account.php
+++ b/web/html/account.php
@@ -70,7 +70,7 @@ if (isset($_COOKIE["AURSID"])) {
/* Details for account being deleted. */
if (can_edit_account($row)) {
$UID = $row['ID'];
- if (in_request('confirm_Delete') && check_token()) {
+ if (in_request('confirm') && check_token()) {
user_delete($UID);
header('Location: /');
} else {
diff --git a/web/html/pkgbase.php b/web/html/pkgbase.php
index 7c24b79..2f8f932 100644
--- a/web/html/pkgbase.php
+++ b/web/html/pkgbase.php
@@ -54,7 +54,7 @@ if (check_token()) {
} elseif (current_action("do_Adopt")) {
list($ret, $output) = pkgbase_adopt($ids, true, NULL);
} elseif (current_action("do_Disown")) {
- if (isset($_POST['confirm_Disown'])) {
+ if (isset($_POST['confirm'])) {
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
list($ret, $output) = pkgbase_adopt($ids, false, $via);
} else {
@@ -66,7 +66,7 @@ if (check_token()) {
} elseif (current_action("do_UnVote")) {
list($ret, $output) = pkgbase_vote($ids, false);
} elseif (current_action("do_Delete")) {
- if (isset($_POST['confirm_Delete'])) {
+ if (isset($_POST['confirm'])) {
$via = isset($_POST['via']) ? $_POST['via'] : NULL;
if (!isset($_POST['merge_Into']) || empty($_POST['merge_Into'])) {
list($ret, $output) = pkgbase_delete($ids, NULL, $via);
diff --git a/web/html/pkgdel.php b/web/html/pkgdel.php
index 45a3ad4..bad1cd3 100644
--- a/web/html/pkgdel.php
+++ b/web/html/pkgdel.php
@@ -34,7 +34,7 @@ if (has_credential(CRED_PKGBASE_DELETE)): ?>
<?php if (isset($_GET['via'])): ?>
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
<?php endif; ?>
- <p><input type="checkbox" name="confirm_Delete" value="1" />
+ <p><input type="checkbox" name="confirm" value="1" />
<?= __("Confirm package deletion") ?></p>
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Delete") ?>" /></p>
</fieldset>
diff --git a/web/html/pkgdisown.php b/web/html/pkgdisown.php
index d4a3714..50f5c79 100644
--- a/web/html/pkgdisown.php
+++ b/web/html/pkgdisown.php
@@ -41,7 +41,7 @@ if (has_credential(CRED_PKGBASE_DISOWN, $maintainer_uids)): ?>
<?php if (isset($_GET['via'])): ?>
<input type="hidden" name="via" value="<?= intval($_GET['via']) ?>" />
<?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>
<p><input type="submit" class="button" name="do_Disown" value="<?= __("Disown") ?>" /></p>
</fieldset>
diff --git a/web/html/pkgmerge.php b/web/html/pkgmerge.php
index 5fbdbd8..a9c8894 100644
--- a/web/html/pkgmerge.php
+++ b/web/html/pkgmerge.php
@@ -55,7 +55,7 @@ if (has_credential(CRED_PKGBASE_DELETE)): ?>
</script>
<p><label for="merge_Into" ><?= __("Merge into:") ?></label>
<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>
<p><input type="submit" class="button" name="do_Delete" value="<?= __("Merge") ?>" /></p>
</fieldset>
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 1178550..b467a3d 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -503,7 +503,7 @@ function pkg_display_details($id=0, $row, $SID="") {
* do_UnFlag - Remove out-of-date flag
* do_Adopt - Adopt
* do_Disown - Disown
- * do_Delete - Delete (requires confirm_Delete to be set)
+ * do_Delete - Delete
* do_Notify - Enable notification
* do_UnNotify - Disable notification
*/
diff --git a/web/template/account_delete.php b/web/template/account_delete.php
index 0d40e5a..03951fe 100644
--- a/web/template/account_delete.php
+++ b/web/template/account_delete.php
@@ -12,7 +12,7 @@
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
</fieldset>
<fieldset>
- <p><input type="checkbox" name="confirm_Delete" value="1" />
+ <p><input type="checkbox" name="confirm" value="1" />
<?= __("Confirm deletion") ?></p>
<p>
diff --git a/web/template/pkg_search_results.php b/web/template/pkg_search_results.php
index e901408..86b4c74 100644
--- a/web/template/pkg_search_results.php
+++ b/web/template/pkg_search_results.php
@@ -122,7 +122,7 @@ if (!$result): ?>
<?php if (has_credential(CRED_PKGBASE_DELETE)): ?>
<label for="merge_Into"><?= __("Merge into") ?></label>
<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; ?>
<input type="hidden" name="token" value="<?= htmlspecialchars($_COOKIE['AURSID']) ?>" />
<input type="submit" class="button" style="width: 80px" value="<?= __("Go") ?>" />